Browse Source

取消出纳限制当天

lihong 4 months ago
parent
commit
9327d6ede6
1 changed files with 13 additions and 3 deletions
  1. 13 3
      src/views/hospitalization/zfsf/CashierProcessInfo.vue

+ 13 - 3
src/views/hospitalization/zfsf/CashierProcessInfo.vue

@@ -43,7 +43,7 @@
           </el-form>
             <div style="height:25px">
               <el-button :disabled="saveFlag" icon="Check" type="success" @click="saveCashData">保存</el-button>
-              <el-button :disabled="qxFlag"  icon="Minus" type="danger" @click="cancelCash">取消出纳</el-button>
+              <el-button :disabled="qxFlag"  icon="Minus" type="danger"  @click="cancelCash">取消出纳</el-button>
               <el-button  type="primary" icon="RefreshLeft"  @click="chongZhiData" >重置</el-button>
               <el-button  type="primary" icon="Money"  @click="openPos" >智能POS工具包</el-button>
             </div>
@@ -436,14 +436,14 @@ import {consume} from '@/api/zfsf/pos-transaction.js'
 
 import {stringIsBlank} from "@/utils/blank-utils";
 import { ElMessage, ElMessageBox } from 'element-plus'
-import {getDateTiffDays, getFormatDatetime} from "@/utils/date";
+import {getDateDiffToDay, getFormatDatetime} from "@/utils/date";
 import router from "@/router";
 import {queryHospitalName} from "@/api/zy-gl/zy-daily.js";
 
 const hospitalName = ref('')
 const zyFpPrintVisible = ref(false)
 const saveFlag = ref(false)
-const qxFlag =ref(false)
+const qxFlag =ref(true)
 const activeName = ref('one')
 const patientInfo = ref({
   inpatientNo : "",
@@ -476,6 +476,7 @@ const openPos = ()=>{
 
 const chongZhiData = ()=>{
   clearData(true)
+  qxFlag.value = false
   patientBaseListRef.value.clearAllData()
 }
 
@@ -652,12 +653,21 @@ const getCashierProcessInfo = (param,zyLedgerFile,checkParam)=>{
   if(zyLedgerFile && stringIsBlank(zyLedgerFile.accountDate)){
     setShowFlag.value = false
     clearData(false)
+    qxFlag.value = true
     ElMessage.error('不存在病人已结算待出纳信息!')
     patientBaseListRef.value.showCashName('未结算')
   }else {
+    qxFlag.value = true
     patientBaseListRef.value.showCashName('已结算')
   }
   if(zyLedgerFile && !stringIsBlank(zyLedgerFile.cashDate)){
+   let tempCashDate = zyLedgerFile.cashDate.substring(0,10) +' 00:00:00'
+   let days =  getDateDiffToDay(tempCashDate,new Date())
+    if(days === 0){
+      qxFlag.value = false
+    }else {
+      qxFlag.value = true
+    }
     setShowFlag.value = false
     clearData(false)
     patientBaseListRef.value.showCashName('已出纳')