Procházet zdrojové kódy

Merge branch 'master' of https://172.16.32.165/lighter/vue-intergration-platform

xiaochan před 11 měsíci
rodič
revize
484d83d3cf

+ 121 - 3
src/api/dictionary/personnel/bed-dept-dict.js

@@ -15,14 +15,14 @@ export function selectDeptInfoForBed(text) {
 
 /**
  * 查询具体科室床位详细信息
- * @param {*} deptCode 科室id
+ * @param {*} wardCode 科室id
  * @returns
  */
-export function selectBedInfoForDept(deptCode) {
+export function selectBedInfoForDept(wardCode) {
     return request({
         url: '/bedDict/selectBedInfoForDept',
         method: 'get',
-        params: { deptCode },
+        params: { wardCode },
     })
 }
 
@@ -63,4 +63,122 @@ export function updateBedInfoForDept(data) {
         method: 'post',
         data
     })
+}
+
+/**
+ * 新增科室床位信息
+ * @param {*} data 科室床位信息
+ * @returns
+ */
+export function saveBedForDept(data) {
+    return request({
+        url: '/bedDict/saveBedForDept',
+        method: 'post',
+        data
+    })
+}
+
+
+// 床位类别
+export const bedType = [{ value: '1', label: '普通' }, { value: '2', label: '加床' }, { value: '4', label: '家庭病床' }, { value: '9', label: '临时' }]
+export const formatBedType = (bedTypeList) => {
+    if (bedTypeList) {
+        return bedTypeList.map(type => {
+            const item = bedType.find(item => item.value === type)
+            return item ? item.label : type
+        }).join(',')
+    }
+    return ''
+}
+// 房间属性
+export const sexType = [{ value: '1', label: '男' }, { value: '2', label: '女' }]
+export const formatSex = (sexList) => {
+    if (sexList) {
+        return sexList.map(sex => {
+            const item = sexType.find(item => item.value === sex)
+            return item ? item.label : sex
+        }).join(',')
+    }
+    return ''
+}
+// 生效(空调状态)
+export const heatColdType = [{ value: '1', label: '停止' }, { value: '2', label: '取暖' }, { value: '3', label: '空调' }]
+export const formatHeatColdType = (heatColdList) => {
+    if (heatColdList) {
+        return heatColdList.map(heatCold => {
+            const item = heatColdType.find(item => item.value === heatCold)
+            return item ? item.label : heatCold
+        }).join(',')
+    }
+    return ''
+}
+// 床位状态
+export const bedStatusType = [{ value: '1', label: '空闲' }, { value: '2', label: '占用' }]
+
+/**
+ * 查询病房科室字典--相关
+ * @returns
+ */
+export function selectRoomDept(text) {
+    return request({
+        url: '/bedDict/selectRoomDept',
+        method: 'get',
+        params: { text },
+    })
+}
+
+export function saveRoomDept(data) {
+    return request({
+        url: '/bedDict/saveRoomDept',
+        method: 'post',
+        data
+    })
+}
+
+export function delRoomDeptByCode(wardCode, deptCode) {
+    return request({
+        url: '/bedDict/delRoomDeptByCode',
+        method: 'get',
+        params: { wardCode, deptCode },
+    })
+}
+
+/**
+ * 查询小科室字典--相关
+ * @returns
+ */
+export function selectSmallDept(text) {
+    return request({
+        url: '/bedDict/selectSmallDept',
+        method: 'get',
+        params: { text },
+    })
+}
+
+export function saveSmallDept(data) {
+    return request({
+        url: '/bedDict/saveSmallDept',
+        method: 'post',
+        data
+    })
+}
+
+export function delSmallDeptByCode(deptId) {
+    return request({
+        url: '/bedDict/delSmallDeptByCode',
+        method: 'get',
+        params: { deptId },
+    })
+}
+
+/**
+ * 查询科室字典信息
+ * @returns
+ */
+export function selectZdUnitCode(text) {
+    return request({
+        url: '/personnel/selectZdUnitCode',
+        method: 'get',
+        params: { text },
+    })
 }

+ 203 - 0
src/api/zfsf/cashier-process.js

@@ -0,0 +1,203 @@
+import request from '@/utils/request'
+
+
+/**
+ * 分页查询病人信息
+ * @param data
+ * @returns {*}
+ */
+export function queryPatientInfoPage(data) {
+    return request({
+        url: '/cashierProcess/queryPatientInfoPage',
+        method: 'post',
+        data
+    })
+}
+
+/**
+ * 查询结算 出纳标识
+ * @param data
+ * @returns {*}
+ */
+export function queryCashFlag(data) {
+    return request({
+        url: '/cashierProcess/queryCashFlag',
+        method: 'post',
+        data
+    })
+}
+
+/**
+ *  查询出纳处理页面所有数据
+ * @param data
+ * @returns {*}
+ */
+export function queryCashierProcessInfo(data) {
+    return request({
+        url: '/cashierProcess/queryCashierProcessInfo',
+        method: 'post',
+        data
+    })
+}
+
+/**
+ * 查询病人账页信息
+ * @param data
+ * @returns {*}
+ */
+export function queryPatientZyLedgerFile(data) {
+    return request({
+        url: '/cashierProcess/queryPatientZyLedgerFile',
+        method: 'post',
+        data
+    })
+}
+
+/**
+ * 对出纳处理操做数据效验
+ * @param data
+ * @returns {*}
+ */
+export function checkCashierProcess(data) {
+    return request({
+        url: '/cashierProcess/checkCashierProcess',
+        method: 'post',
+        data
+    })
+}
+
+/**
+ * 查询可出纳列表数据
+ * @param data
+ * @returns {*}
+ */
+export function queryKyCashierList(data) {
+    return request({
+        url: '/cashierProcess/queryKyCashierList',
+        method: 'post',
+        data
+    })
+}
+
+/**
+ * 查询住院发票信息
+ * @param data
+ * @returns {*}
+ */
+export function queryZyReceipt(data) {
+    return request({
+        url: '/cashierProcess/queryZyReceipt',
+        method: 'post',
+        data
+    })
+}
+
+/**
+ * 查询押金
+ * @param data
+ * @returns {*}
+ */
+export function queryZyDepositFileList(data) {
+    return request({
+        url: '/cashierProcess/queryZyDepositFileList',
+        method: 'post',
+        data
+    })
+}
+
+/**
+ * 查询付款字典
+ * @returns {*}
+ */
+export function queryZdChequeType() {
+    return request({
+        url: '/cashierProcess/queryZdChequeType',
+        method: 'get',
+    })
+}
+
+/**
+ * 保存出纳处理数据
+ * @param data
+ * @returns {*}
+ */
+export function saveCashierData(data) {
+    return request({
+        url: '/cashierProcess/saveCashierData',
+        method: 'post',
+        data
+    })
+}
+
+/**
+ * 取消出纳处理
+ * @param data
+ * @returns {*}
+ */
+export function cancelCashierData(data) {
+    return request({
+        url: '/cashierProcess/cancelCashierData',
+        method: 'post',
+        data
+    })
+}
+
+/**
+ * 更新打印住院发票数据
+ * @param data
+ * @returns {*}
+ */
+export function updatePrintZyFpData(data) {
+    return request({
+        url: '/cashierProcess/updatePrintZyFpData',
+        method: 'post',
+        data
+    })
+}
+
+/**
+ * 查询需要打印的发票内容
+ * @param data
+ * @returns {*}
+ */
+export function queryPrintZyFpData(data) {
+    return request({
+        url: '/cashierProcess/queryPrintZyFpData',
+        method: 'post',
+        data
+    })
+}
+
+
+export function cashierDataTx(data) {
+    return request({
+        url: '/cashierProcess/cashierDataTx',
+        method: 'post',
+        data
+    })
+}
+
+export function queryZyActpatientFeeDetail(data) {
+    return request({
+        url: '/cashierProcess/queryZyActpatientFeeDetail',
+        method: 'post',
+        data
+    })
+}
+
+export function queryMaxAndMinLedgerSn(data) {
+    return request({
+        url: '/cashierProcess/queryMaxAndMinLedgerSn',
+        method: 'post',
+        data
+    })
+}
+
+
+
+
+
+
+
+
+

+ 108 - 0
src/api/zfsf/pos-transaction.js

@@ -0,0 +1,108 @@
+import request from '@/utils/request'
+
+
+/**
+ * pos 刷卡 /扫码
+ * @param data
+ * @returns {*}
+ */
+export function consume(data) {
+    return request({
+        url: '/transaction/consume',
+        method: 'post',
+        data
+    })
+}
+
+/**
+ * 财务工具刷卡
+ * @param data
+ * @returns {*}
+ */
+export function consumeCommon(data) {
+    return request({
+        url: '/transaction/consumeCommon',
+        method: 'post',
+        data
+    })
+}
+
+/**
+ * 财务工具退货
+ * @param data
+ * @returns {*}
+ */
+export function refund(data) {
+    return request({
+        url: '/transaction/refund',
+        method: 'post',
+        data
+    })
+}
+
+
+/**
+ * pos 签到
+ * @returns {*}
+ */
+export function sign() {
+    return request({
+        url: '/transaction/sign',
+        method: 'get',
+    })
+}
+
+/**
+ * 重印
+ * @returns {*}
+ */
+export function reprint(traceNo) {
+    return request({
+        url: '/transaction/reprint',
+        method: 'get',
+        params: {traceNo},
+    })
+}
+
+/**
+ * 查余
+ * @returns {*}
+ */
+export function balance() {
+    return request({
+        url: '/transaction/balance',
+        method: 'get',
+    })
+}
+
+/**
+ * 结算
+ * @returns {*}
+ */
+export function settle() {
+    return request({
+        url: '/transaction/settle',
+        method: 'get',
+    })
+}
+
+/**
+ * 交易查询
+ * @param plId 订单号
+ * @returns {*}
+ */
+export function query(plId) {
+    return request({
+        url: '/transaction/query',
+        method: 'get',
+        params: {plId},
+    })
+}
+
+
+
+
+
+
+
+

+ 24 - 0
src/api/zfsf/sfbillno.js

@@ -0,0 +1,24 @@
+import request from '@/utils/request'
+
+
+/**
+ * 登记住院收费发票
+ * @param data
+ * @returns {*}
+ */
+export function saveSfBillNo(data) {
+    return request({
+        url: '/mzsfBillnoRec/save',
+        method: 'post',
+        data
+    })
+}
+
+export function queryCurrentNo(data) {
+    return request({
+        url: '/mzsfBillnoRec/queryCurrentNo',
+        method: 'post',
+        data
+    })
+}
+

+ 199 - 0
src/components/zfsf/PatientInfoHead.vue

@@ -0,0 +1,199 @@
+<template>
+  <div>
+    <el-radio-group v-model="headParam.inOutFlag">
+      <el-radio :value="0" size="large">在院病人</el-radio>
+      <el-radio :value="1" size="large">出院病人</el-radio>
+    </el-radio-group>
+    <span style="display: inline-block;width: 100px" ></span>
+     <el-tag v-if="cashFlag" size="default" effect="dark"   type="danger" ><el-icon><Select /></el-icon>{{cashName}}</el-tag>
+  </div>
+  <el-descriptions :column="6" border style="width:100%;" >
+    <el-descriptions-item label="住院号">
+      <el-popover :visible="visible" :width="700" placement="right-end" trigger="click" @show="clearPatientTable">
+        <template #reference>
+          <el-input v-model="inpatientParam.inpatientNo"   @click="visible = true" style="width: 100px" @keyup.enter="queryChange" />
+        </template>
+        <div style="width: 670px;">
+          <el-input v-model="headParam.inpatientNo" placeholder="支持住院号/姓名/门诊号查询" clearable @keyup.enter="selectPatientPage" style="width: 170px"></el-input>
+          &nbsp;&nbsp;
+          <el-button icon="Search" type="primary" @click="selectPatientPage">查询</el-button>
+          <span style="display: inline-block;width: 350px" ></span>
+          <el-button title="关闭" icon="CloseBold"  @click="visible = false"></el-button>
+        </div>
+        <div style="width: 670px;">
+          <el-table :data="patientList" style="width: 100%" @row-click="fetchPatientData"  height="400">
+            <el-table-column  property="inpatientNo" label="住院号" />
+            <el-table-column  property="name" label="姓名" />
+            <el-table-column width="80" property="admissTimes" label="次数" />
+            <el-table-column width="150" property="admissDate"  label="入院日期" />
+            <el-table-column width="80" property="bedNo" label="床号" />
+            <el-table-column  property="wardName" label="病房" />
+            <el-table-column property="responceTypeName" label="身份" />
+            <el-table-column  property="balance" label="余额" />
+            <el-table-column v-if="headParam.inOutFlag ===1 " width="150" property="disDate" label="出院日期" />
+          </el-table>
+          <el-pagination
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="headParam.currentPage"
+              small="small"
+              :page-sizes="[15, 30, 45]"
+              :page-size="headParam.pageSize"
+              layout="total, sizes, prev, pager, next, jumper"
+              :total="totalSize"
+              style="margin-top: 5px;"
+          ></el-pagination>
+        </div>
+      </el-popover>
+    </el-descriptions-item>
+    <el-descriptions-item label="姓名">
+      {{ patientInfo.name }}
+    </el-descriptions-item>
+    <el-descriptions-item label="出生日期">
+      {{ patientInfo.birthDate }} {{ companyFunc(patientInfo.age, '岁') }}
+    </el-descriptions-item>
+    <el-descriptions-item label="性别">
+      {{ patientInfo.sexName }}
+    </el-descriptions-item>
+    <el-descriptions-item label="入院日期">
+      {{ patientInfo.admissDate }}
+    </el-descriptions-item>
+    <el-descriptions-item label="住院天数">
+      {{ companyFunc(patientInfo.actIptDays,'天') }}
+    </el-descriptions-item>
+    <el-descriptions-item label="管床医生">
+      {{ patientInfo.referPhysicianName }}
+    </el-descriptions-item>
+    <el-descriptions-item label="病区">
+      {{ patientInfo.admissWardName }}
+    </el-descriptions-item>
+    <el-descriptions-item label="小科室">
+      {{ patientInfo.zkWardName }}
+    </el-descriptions-item>
+    <el-descriptions-item label="身份">
+     <span style="color: red">{{ patientInfo.medTypeName }} </span>
+    </el-descriptions-item>
+    <el-descriptions-item label="总费用">
+      {{ patientInfo.totalCharge }}
+      &nbsp;&nbsp;&nbsp;
+      <span v-if="patientInfo.balance && patientInfo.balance < 0 " style="color: red"> {{ patientInfo.balance }}</span>
+      <span v-else > {{ patientInfo.balance }}</span>
+    </el-descriptions-item>
+  </el-descriptions>
+</template>
+<script setup >
+import {ref} from "vue";
+import {stringNotBlank} from "@/utils/blank-utils";
+import {queryCashFlag,queryPatientInfoPage} from '@/api/zfsf/cashier-process.js'
+import {getPatientBaseInfo} from "@/api/medical-advice/medical-advice-management";
+const emit = defineEmits(['selectPatientInfo']);
+
+const  cashFlag = ref(false)
+
+const  cashName = ref('已出纳')
+
+const patientInfo = ref({})
+const inpatientParam = ref({
+  inpatientNo : "",
+  admissTimes : null,
+  inOutStatusFlag : ""
+})
+
+const clearAllData = ()=>{
+  cashFlag.value = false
+  patientInfo.value = {}
+  inpatientParam.value.inpatientNo = ''
+  inpatientParam.value.admissTimes = null
+  inpatientParam.value.inOutStatusFlag = ''
+
+}
+
+
+const headParam = ref({
+  inpatientNo : "",
+  inOutFlag : 0,
+  currentPage:1,
+  pageSize:15
+})
+const totalSize = ref(0)
+
+const visible = ref(false)
+
+const clearPatientTable = ()=>{
+  patientList.value = []
+  headParam.value.inpatientNo = ""
+  headParam.value.currentPage = 1
+  headParam.value.pageSize = 15
+  totalSize.value = 0
+}
+
+const selectPatientPage = ()=>{
+  queryPatientInfoPage(headParam.value).then(res=>{
+      patientList.value = res.data
+      totalSize.value = res.total
+  })
+}
+
+const queryChange = ()=>{
+  headParam.value.inpatientNo =  inpatientParam.value.inpatientNo
+  selectPatientPage()
+}
+
+
+
+const fetchPatientData = (row)=>{
+     inpatientParam.value.inpatientNo = row.inpatientNo
+     inpatientParam.value.admissTimes = row.admissTimes
+     if(row.inOutStatusFlag){
+       headParam.value.inOutFlag = Number(row.inOutStatusFlag)
+       inpatientParam.value.inOutStatusFlag = row.inOutStatusFlag
+     }else {
+       inpatientParam.value.inOutStatusFlag = headParam.value.inOutFlag === 0 ? "0" : "1"
+     }
+     visible.value = false
+   getPatientBaseInfo(inpatientParam.value).then(res=>{
+     patientInfo.value = res
+   })
+  queryCashFlag(inpatientParam.value).then(res=>{
+    cashFlag.value = res.cashFlag === 1
+  })
+
+  emit('selectPatientInfo',inpatientParam.value)
+}
+
+const showCashName = (val)=>{
+  cashFlag.value = true
+  cashName.value = val
+}
+
+defineExpose({
+  fetchPatientData,
+  clearAllData,
+  showCashName
+})
+
+const handleSizeChange = (val) => {
+  headParam.value.pageSize = val
+  selectPatientPage()
+}
+const handleCurrentChange = (val) => {
+  headParam.value.currentPage = val
+  selectPatientPage()
+}
+
+const companyFunc = (val, company) => {
+  if (stringNotBlank(val)) {
+    return val + company
+  } else {
+    return ''
+  }
+}
+
+const patientList = ref([])
+
+</script>
+<style scoped >
+.el-checkbox__input.is-disabled + .el-checkbox__label {
+  color: red !important;
+}
+</style>

+ 200 - 0
src/components/zfsf/PosTransaction.vue

@@ -0,0 +1,200 @@
+<template>
+  <el-dialog v-model="outerVisible" title="智能POS辅助工具" width="600">
+    <el-row>
+      <el-col :span="6">   <el-button type="primary" @click="signClick">签到</el-button>  </el-col>
+      <el-col :span="6">   <el-button type="primary" @click="balanceClick" >查余</el-button>  </el-col>
+      <el-col :span="6">   <el-button type="primary" @click="consumeVisible=true">消费</el-button>  </el-col>
+      <el-col :span="6">   <el-button type="primary" @click="refundVisible=true">退费</el-button>  </el-col>
+    </el-row>
+    <el-row style="margin-top: 20px">
+      <el-col :span="6">   <el-button type="primary" @click="rePrintVisible=true">重印</el-button>  </el-col>
+      <el-col :span="6">   <el-button type="primary" @click="queryVisible=true">交易查询</el-button>  </el-col>
+      <el-col :span="6">   <el-button type="primary" @click="settleClick">结算</el-button>  </el-col>
+    </el-row>
+
+    <el-dialog
+        v-model="consumeVisible"
+        width="500"
+        title="消费"
+        append-to-body
+    >
+      <el-form>
+        <el-form-item label="交易类型" :label-width="140">
+          <el-select v-model="consumeForm.chequeType" placeholder="交易类型">
+            <el-option label="银联卡" value="3" />
+            <el-option label="聚合支付" value="O" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="交易金额" :label-width="140">
+          <el-input-number v-model="consumeForm.amt"  :controls="false" :precision="2" :min="0" size="small" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="consumeClick">刷卡/扫码</el-button>
+          <el-button @click="consumeVisible = false">取消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <el-dialog
+        v-model="refundVisible"
+        width="500"
+        title="退费"
+        append-to-body
+    >
+      <el-form>
+        <el-form-item label="交易类型" :label-width="140">
+          <el-select v-model="refundForm.chequeType"  placeholder="交易类型">
+            <el-option label="银联卡"  value="3"  />
+            <el-option label="聚合支付" value="O" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="退货金额" :label-width="140">
+          <el-input-number v-model="refundForm.amt"  :controls="false" :precision="2" :min="0" size="small" />元
+        </el-form-item>
+        <el-form-item v-if="refundForm.chequeType==='3'" label="原交易参考号" :label-width="140">
+          <el-input v-model="refundForm.psordnum" size="small" />
+        </el-form-item>
+        <el-form-item v-if="refundForm.chequeType==='3'" label="原交易日期MMDD" :label-width="140">
+          <el-input v-model="refundForm.transDate" size="small" />
+        </el-form-item>
+        <el-form-item v-if="refundForm.chequeType==='O'"  label="数字人民币"  :label-width="140">
+          <el-select v-model="refundForm.parChannel" placeholder="交易类型">
+            <el-option label="否"  value="0"  />
+            <el-option label="是" value="1" />
+          </el-select>
+        </el-form-item>
+        <el-form-item  v-if="refundForm.chequeType==='O'"  label="支付订单条形码" :label-width="140">
+          <el-input v-model="refundForm.agtordnum" size="small" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="refundClick">退费</el-button>
+          <el-button @click="refundVisible = false">取消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <el-dialog
+        v-model="rePrintVisible"
+        width="500"
+        title="重印"
+        append-to-body
+    >
+      <el-form>
+        <el-form-item label="交易凭证号" :label-width="140">
+          <el-input v-model="rePrintForm.traceNo"   size="small" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="rePrintClick">重印</el-button>
+          <el-button @click="rePrintVisible = false">取消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+    <el-dialog
+        v-model="queryVisible"
+        width="500"
+        title="交易查询"
+        append-to-body
+    >
+      <el-form>
+        <el-form-item label="交易订单号" :label-width="140">
+          <el-input v-model="plId"   size="small" />
+        </el-form-item>
+      </el-form>
+      <template #footer>
+        <div class="dialog-footer">
+          <el-button type="primary" @click="queryClick">交易查询</el-button>
+          <el-button @click="queryVisible = false">取消</el-button>
+        </div>
+      </template>
+    </el-dialog>
+
+
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button @click="outerVisible = false">取消</el-button>
+      </div>
+    </template>
+  </el-dialog>
+</template>
+<script setup >
+import {sign,balance,consumeCommon,refund,reprint,query,settle} from '@/api/zfsf/pos-transaction.js'
+const outerVisible = ref(false)
+const consumeVisible = ref(false)
+const refundVisible = ref(false)
+const rePrintVisible = ref(false)
+const queryVisible = ref(false)
+const consumeForm = ref({
+  chequeType : '3',
+  amt : null
+})
+
+const refundForm = ref({
+  chequeType : '3',
+  amt : null,
+  parChannel : '0',
+  psordnum : '',
+  transDate : '',
+  agtordnum : '',
+})
+
+const rePrintForm =ref({
+  traceNo : ''
+
+})
+
+const plId = ref('')
+
+const rePrintClick = () => {
+  reprint(rePrintForm.value.traceNo).then(res=>{})
+}
+
+const queryClick = () => {
+  query(plId.value).then(res=>{})
+}
+
+onMounted(()=>{
+
+})
+
+const openOuter = ()=>{
+  outerVisible.value = true
+}
+
+const consumeClick = ()=>{
+  consumeCommon(consumeForm.value).then(res=>{})
+}
+
+const chequeTypeChange = () => {
+
+}
+
+const refundClick = () => {
+  refund().then(res=>{})
+}
+
+const signClick =()=>{
+  sign().then(res=>{})
+}
+const settleClick = () => {
+  settle().then(res=>{})
+}
+
+const balanceClick = ()=>{
+  balance().then(res=>{})
+}
+
+defineExpose({
+  openOuter
+})
+
+</script>
+<style scoped >
+
+</style>

+ 29 - 11
src/views/clinic/chronicDisease/ChronicDiseaseRegister.vue

@@ -485,9 +485,7 @@
                                   filterable :options="empList" :remote-method="empMethod" placeholder="请选择主管医生">
                       <template #default="{ item }">
                         <span style="margin-right: 8px">{{ item.label }}</span>
-                        <span style="color: var(--el-text-color-secondary); font-size: 13px">
-                                                    {{ item.value }}
-                                                </span>
+                        <span style="color: var(--el-text-color-secondary); font-size: 13px">{{ item.value }}</span>
                       </template>
                     </el-select-v2>
                   </el-form-item>
@@ -499,9 +497,7 @@
                                   :remote-method="creatMethod" placeholder="请选择建档医生">
                       <template #default="{ item }">
                         <span style="margin-right: 8px">{{ item.name }}</span>
-                        <span style="color: var(--el-text-color-secondary); font-size: 13px">
-                                                      {{ item.code }}
-                                                  </span>
+                        <span style="color: var(--el-text-color-secondary); font-size: 13px">{{ item.code }}</span>
                       </template>
                     </el-select-v2>
                     <el-select-v2 v-else v-model="ruleForm.creatId" clearable remote style="width: 100%"
@@ -509,9 +505,7 @@
                                   placeholder="请选择建档医生">
                       <template #default="{ item }">
                         <span style="margin-right: 8px">{{ item.name }}</span>
-                        <span style="color: var(--el-text-color-secondary); font-size: 13px">
-                                                      {{ item.code }}
-                                                  </span>
+                        <span style="color: var(--el-text-color-secondary); font-size: 13px">{{ item.code }}</span>
                       </template>
                     </el-select-v2>
                   </el-form-item>
@@ -540,6 +534,19 @@
                     </el-form-item>
                 </el-col> -->
               </el-row>
+              <el-row>
+                <el-col :span="6">
+                  <el-form-item label="建档科室" prop="creatDept">
+                    <el-select-v2 v-model="ruleForm.creatDept" clearable remote style="width: 100%"
+                                  filterable :options="deptWardList" :remote-method="queryDept" placeholder="请选择建档科室">
+                      <template #default="{ item }">
+                        <span style="margin-right: 8px">{{ item.name }}</span>
+                        <span style="color: var(--el-text-color-secondary); font-size: 13px">{{ item.code }}</span>
+                      </template>
+                    </el-select-v2>
+                  </el-form-item>
+                </el-col>
+              </el-row>
             </el-collapse-item>
           </el-collapse>
         </el-form>
@@ -564,6 +571,7 @@ import {provinceList, cityList, countyList, cityFilter, countyFilter} from "@/da
 import router from '@/router'
 import sleep from "@/utils/sleep";
 import {useUserStore} from "@/pinia/user-store";
+import {queryDept} from "@/api/public-api";
 
 const activeName = ref(['1', '2', '3', '4', '5', '6', '7'])
 const userCode = useUserStore().userInfo.code
@@ -571,6 +579,7 @@ const userName = useUserStore().userInfo.name
 let dics: any = ref({})
 const empList = ref([])
 const creatList = ref([])
+const deptWardList = ref([])
 const provinceData = ref([{code: '', name: ''}])
 const cityData = ref([{code: '', name: ''}])
 const countyData = ref([{code: '', name: ''}])
@@ -581,8 +590,9 @@ onMounted(async () => {
     provinceData.value = provinceList
     cityData.value = cityList
     countyData.value = countyList
-    empMethod('')
-    creatMethod('')
+    await empMethod('')
+    await creatMethod('')
+    await deptMethod('')
     ruleForm.value.creatId = userCode
 
     const patNo = router.currentRoute.value.params.patNo
@@ -628,6 +638,12 @@ const creatMethod = async (val: string) => {
   })
 }
 
+const deptMethod = (val: string) => {
+  queryDept(val).then((res: any) => {
+    deptWardList.value = res
+  })
+}
+
 interface RuleForm {
   pId: string
   pName: string
@@ -692,6 +708,7 @@ interface RuleForm {
   heartRate: string
   bloodSugar: string
   bloodOxygen: string
+  creatDept: string
 }
 
 const keyCode = ref('')
@@ -764,6 +781,7 @@ const ruleForm = ref<RuleForm>({
   heartRate: '',
   bloodSugar: '',
   bloodOxygen: '',
+  creatDept: '',
 })
 
 const rulesAll = reactive<FormRules<RuleForm>>({

+ 25 - 3
src/views/clinic/chronicDisease/ChronicDiseaseSearch.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="layout_container">
     <header>
-      <el-input v-model="keyCode" class="w-50 m-2" style="width: 360px" placeholder="请输入姓名/证件号/门诊号/住院号" clearable>
+      <el-input v-model="keyCode" class="w-50 m-2" style="width: 300px" placeholder="请输入姓名/证件号/门诊号/住院号" clearable>
         <template #prepend>关键字</template>
       </el-input>
       <el-date-picker v-model="dateRange" type="daterange" range-separator="至" start-placeholder="开始日期"
@@ -12,6 +12,15 @@
       <el-select v-model="delFlag" placeholder="请选择是否有效" clearable style="width: 160px;margin-left: 3px">
         <el-option v-for="item in delFlagOptions" :key="item.code" :label="item.name" :value="item.code" />
       </el-select>
+<!--      <el-select v-model="creatDept" placeholder="请选择建档科室" clearable filterable :remote-method="queryUnitCode" style="width: 160px;margin-left: 3px">-->
+<!--        <el-option v-for="item in unitData" :key="item.code" :label="item.name" :value="item.code" />-->
+<!--      </el-select>-->
+      <el-select-v2 v-model="creatDept" clearable remote style="width: 200px;margin-left: 3px"
+                    filterable :options="unitData" :remote-method="queryUnitCode" placeholder="请选择建档科室">
+        <template #default="{ item }">
+          <span style="margin-right: 8px">{{ item.name }}</span>
+        </template>
+      </el-select-v2>
       <el-button type="primary" icon="Search" @click="queryChronicDisease" style="margin-left: 5px">查询</el-button>
       <el-button type="primary" icon="Download" @click="exportData" style="margin-left: 5px">导出</el-button>
     </header>
@@ -56,6 +65,7 @@
             <el-table-column prop="bloodOxygen" label="血氧" width="80" />
             <el-table-column prop="referPhysicianName" label="主管医生" width="100" />
             <el-table-column prop="userName" label="建档医生" width="100" />
+            <el-table-column prop="deptName" label="建档科室" width="140" />
             <el-table-column prop="createDate" label="建卡时间" width="140" />
             <el-table-column prop="visitDate" label="下次随访时间" width="100" />
             <el-table-column prop="delFlag" label="是否有效" width="80">
@@ -94,6 +104,7 @@ import { selectChronicDisease, getCrmDictionary, selectMbDelPermissions, delChro
 import { Export } from '@/utils/ExportExcel'
 import { clone } from '@/utils/clone'
 import router from "@/router";
+import {queryDept} from "@/api/public-api";
 
 const pageSize = ref(30)
 const currentPage = ref(1)
@@ -109,6 +120,8 @@ const diseaseType = ref('')
 let dics = ref({})
 const delUser = ref('')
 const delFlag = ref('')
+// 建档科室
+const creatDept = ref('')
 const start = formatDate(seltYearAndNowLast[1].value[0])
 const end = formatDate(seltYearAndNowLast[1].value[1])
 const dateRange = ref([])
@@ -118,6 +131,7 @@ const queryTerm = reactive({
   keyCode: '',
   diseaseType: '',
   delFlag: '',
+  deptCode: '',
 })
 
 const delFlagOptions = [{ code: '', name: '全部' }, { code: '0', name: '有效' }, { code: '1', name: '无效' }]
@@ -125,6 +139,7 @@ const delFlagOptions = [{ code: '', name: '全部' }, { code: '0', name: '有效
 onMounted(() => {
   nextTick(async () => {
     queryMbDelPermissions()
+    await queryUnitCode('')
     dics.value = await getCrmDictionary()
     queryTerm.startTime = start
     queryTerm.endTime = end + ' 23:59:59'
@@ -133,6 +148,13 @@ onMounted(() => {
   })
 })
 
+const unitData = ref([])
+const queryUnitCode = async (code) => {
+  await queryDept(code).then((res) => {
+    unitData.value = res
+  })
+}
+
 const queryMbDelPermissions = () => {
   selectMbDelPermissions()
     .then((res) => {
@@ -160,6 +182,7 @@ const queryChronicDisease = () => {
   queryTerm.keyCode = keyCode.value
   queryTerm.diseaseType = diseaseType.value
   queryTerm.delFlag = delFlag.value
+  queryTerm.deptCode = creatDept.value
   selectChronicDisease(queryTerm)
     .then((res) => {
       chronicDiseaseData.value = res
@@ -208,7 +231,6 @@ function delChronicDisease({ pId }) {
         duration: 2500,
         showClose: true,
       });
-      return
     })
   })
 }
@@ -229,7 +251,6 @@ function hfChronicDisease({ pId }) {
         duration: 2500,
         showClose: true,
       });
-      return
     })
   })
 }
@@ -273,6 +294,7 @@ const exportData = () => {
       bloodOxygen: "血氧",
       referPhysicianName: "主管医生",
       userName: "建档医生",
+      deptName: "建档科室",
       createDate: "建卡时间",
       visitDate: "下次随访时间",
       delFlag: "是否有效"

+ 240 - 0
src/views/dictionary/personnel/AddBedForDept.vue

@@ -0,0 +1,240 @@
+<template>
+  <div class="layout_container">
+    <div class="layout_main">
+      <div class="demo-collapse">
+        <el-form :model="form" label-width="80" class="demo-ruleForm">
+          <el-row>
+            <el-col :span="12">
+              <el-form-item prop="type" label="类别">
+                <el-select v-model="form.type" placeholder="请选择类别" clearable style="width: 100%">
+                  <el-option v-for="item in bedType" :key="item.value" :label="item.label" :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="bedStatus" label="状态">
+                <el-select v-model="form.bedStatus" placeholder="请选择状态" clearable style="width: 100%">
+                  <el-option v-for="item in bedStatusType" :key="item.value" :label="item.label" :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item prop="bedNo" label="床号">
+                <el-input v-model="form.bedNo" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="roomNo" label="房间号">
+                <el-input v-model="form.roomNo" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item prop="sex" label="房间属性">
+                <el-select v-model="form.sex" placeholder="请选择房间属性" clearable style="width: 100%">
+                  <el-option v-for="item in sexType" :key="item.value" :label="item.label" :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="roomRate1" label="床位费">
+                <el-input v-model="form.roomRate1" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="24">
+              <el-form-item prop="chargeCodeBed" label="床位费项目">
+                <CyComboGrid v-model="form" key-field="form.chargeCodeBed" value="chargeCodeBed" label="chargeCodeBedName" :collapse-tags="ff" clearable
+                             placement="bottom" :table-header="tableHeaderBed" :remote-method="selectAirItemInfo" style="width: 100%"/>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <el-form :model="form1" label-width="80" class="demo-ruleForm">
+          <el-row>
+            <el-col :span="12">
+              <el-form-item prop="heatingFee" label="取暖费">
+                <el-input v-model="form1.heatingFee" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="airConditionFee" label="空调费">
+                <el-input v-model="form1.airConditionFee" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="24">
+              <el-form-item prop="chargeCodeAir" label="空调费项目">
+                <CyComboGrid v-model="form1" key-field="form.chargeCodeAir" value="chargeCodeBed" label="chargeCodeBedName" :collapse-tags="ff" clearable
+                             placement="bottom" :table-header="tableHeaderBed" :remote-method="selectAirItemInfo" style="width: 100%"/>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item prop="specialCharge" label="特殊收费">
+                <el-input v-model="form1.specialCharge" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item prop="roomRate2" label="其他费">
+                <el-input v-model="form1.roomRate2" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="12">
+              <el-form-item prop="heatColdFlag" label="生效">
+                <el-select v-model="form1.heatColdFlag" placeholder="请选择生效" clearable style="width: 100%">
+                  <el-option v-for="item in heatColdType" :key="item.value" :label="item.label" :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit">保存</el-button>
+              <el-button @click="onCancelWin">取消</el-button>
+            </el-form-item>
+          </el-row>
+        </el-form>
+      </div>
+    </div>
+  </div>
+</template>
+<script setup name="AddBedForDept">
+import {nextTick, onMounted, ref} from 'vue'
+import {
+  bedStatusType,
+  bedType,
+  heatColdType,
+  saveBedForDept,
+  selectAirItemInfo,
+  sexType
+} from "@/api/dictionary/personnel/bed-dept-dict"
+import CyComboGrid from "@/components/cy/combo-grid/src/CyComboGrid.vue";
+import {ElMessage} from "element-plus";
+
+const ff = ref(true)
+const form = ref({
+  deptCode: '',
+  wardCode: '',
+  type: '',
+  bedStatus: '',
+  bedNo: '',
+  roomNo: '',
+  sex: '',
+  roomRate1: 0,
+  chargeCodeBed: '',
+})
+const form1 = ref({
+  heatingFee: 0,
+  airConditionFee: 0,
+  chargeCodeAir: '',
+  specialCharge: 0,
+  roomRate2: 0,
+  heatColdFlag: '',
+})
+
+const props = defineProps({
+  bedForDeptDetail: {
+    type: Object,
+    default: {}
+  }
+})
+
+// 清理原始数据
+const clearInfo = () => {
+  form.value = {
+    deptCode: '',
+    wardCode: '',
+    type: '',
+    bedStatus: '',
+    bedNo: '',
+    roomNo: '',
+    sex: '',
+    roomRate1: 0,
+    chargeCodeBed: '',
+  }
+  form1.value = {
+    heatingFee: 0,
+    airConditionFee: 0,
+    chargeCodeAir: '',
+    specialCharge: 0,
+    roomRate2: 0,
+    heatColdFlag: '',
+  }
+}
+
+onMounted(async () => {
+  await nextTick(() => {
+    clearInfo()
+    form.value = props.bedForDeptDetail
+    form.value.type = '1'
+    form.value.bedStatus = '1'
+    form.value.roomNo = ''
+    form.value.heatColdFlag = '1'
+    form.value.roomRate1 = 0
+    form.value.chargeCodeBed = ''
+    form1.value.heatingFee = 0
+    form1.value.airConditionFee = 0
+    form1.value.specialCharge = 0
+    form1.value.roomRate2 = 0
+    form1.value.chargeCodeAir = ''
+    form1.value.heatColdFlag = '1'
+  })
+})
+
+const tableHeaderBed = ref([
+    {name: '项目编码', code: 'value', width: 80,},
+    {name: '项目名称', code: 'label', width: 220},
+    {name: '单价', code: 'price', width: 100},
+    {name: '贵重', code: 'separateFlag', width: 50},
+    {name: '自费', code: 'selfFlag', width: 50},
+    {name: '执行科室', code: 'execName', width: 120},
+    {name: '拼音码', code: 'pyCode', width: 100},
+    {name: '五笔码', code: 'dCode', width: 100},
+    {name: '院内码', code: 'nCode', width: 80}
+  ]
+)
+
+const emit = defineEmits(['close', 'closeBedForDeptDetail'])
+const formData = ref({})
+const onSubmit = () => {
+  if(form.value.chargeCodeBed === '' || form.value.roomRate1 === 0){
+    ElMessage({
+      type: "error",
+      message: '床位费或床位费项目未填写,请检查!',
+      duration: 2500,
+      showClose: true,
+    });
+    return false
+  }
+  formData.value = Object.assign(form.value, form1.value)
+  saveBedForDept(formData.value).then((res) => {
+    if (res.cg) {
+      ElMessage({
+        type: "success",
+        message: res.cg,
+        duration: 2500,
+        showClose: true,
+      });
+
+      emit('closeBedForDeptDetail', true)
+    }
+  });
+}
+
+const onCancelWin = () => {
+  emit('closeBedForDeptDetail', true)
+}
+</script>

+ 46 - 38
src/views/dictionary/personnel/BedDeptDict.vue

@@ -11,13 +11,13 @@
             <vxe-table ref="gridRefDept" :data="deptInfo" border stripe highlight-current-row @cell-click="cellClickEvent"
               keep-source :edit-config="{mode: 'row', trigger: 'click', showStatus: true}">
               <vxe-column type="seq" width="50"></vxe-column>
-              <vxe-column field="wardName" title="科室名称" width="140" />
+              <vxe-column field="deptName" title="科室名称" width="140" />
               <vxe-column field="openBedNum" title="标准床位" width="100" :edit-render="{}">
                 <template #edit="{ row }">
                   <vxe-input v-model="row.openBedNum"></vxe-input>
                 </template>
               </vxe-column>
-              <vxe-column field="deptName" title="病房名称" width="140" />
+              <vxe-column field="wardName" title="病房名称" width="140" />
             </vxe-table>
           </div>
         </div>
@@ -25,6 +25,7 @@
       <div class="layout_container layout_overflow_auto">
         <header>
           <vxe-button status="primary" @click="saveBedInfoForDept">保存科室床位</vxe-button>
+          <vxe-button status="primary" @click="addBedInfoForDept">新增科室床位</vxe-button>
           <vxe-button status="primary" @click="refreshBedInfo">重置科室床位</vxe-button>
         </header>
         <div class="layout_main layout_card layout_el-table">
@@ -122,6 +123,10 @@
             </el-pagination>
           </div>
         </div>
+        <el-dialog v-model="showAddBedForDept" :close-on-click-modal="false" :close-on-press-escape="false"
+                   :title="'新增科室床位'" width="50%" destroy-on-close>
+          <AddBedForDept :bedForDeptDetail="bedForDeptDetail" @closeBedForDeptDetail="closeBedForDeptDetail" />
+        </el-dialog>
       </div>
     </div>
   </div>
@@ -129,6 +134,9 @@
 <script setup name="BedDeptDict">
 import {ref, onMounted, nextTick} from 'vue'
 import {
+  bedType, formatBedType,
+  heatColdType, formatHeatColdType,
+  sexType, formatSex,
   selectAirItemInfo,
   selectBedInfoForDept,
   selectDeptInfoForBed,
@@ -137,6 +145,7 @@ import {
 } from "@/api/dictionary/personnel/bed-dept-dict"
 import CyComboGrid from "@/components/cy/combo-grid/src/CyComboGrid.vue";
 import {ElMessage} from "element-plus";
+import AddBedForDept from "@/views/dictionary/personnel/AddBedForDept.vue";
 
 const pageSize = ref(30)
 const currentPage = ref(1)
@@ -152,39 +161,6 @@ const text = ref('')
 const deptInfo = ref([])
 // 床位信息
 const bedInfo = ref([])
-// 床位类别
-const bedType = ref([{ value: '1', label: '普通' }, { value: '2', label: '加床' }, { value: '4', label: '家庭病床' }, { value: '9', label: '临时' }])
-const formatBedType = (bedTypeList) => {
-  if (bedTypeList) {
-    return bedTypeList.map(type => {
-      const item = bedType.value.find(item => item.value === type)
-      return item ? item.label : type
-    }).join(',')
-  }
-  return ''
-}
-// 房间属性
-const sexType = ref([{ value: '1', label: '男' }, { value: '2', label: '女' }])
-const formatSex = (sexList) => {
-  if (sexList) {
-    return sexList.map(sex => {
-      const item = sexType.value.find(item => item.value === sex)
-      return item ? item.label : sex
-    }).join(',')
-  }
-  return ''
-}
-// 生效(空调状态)
-const heatColdType = ref([{ value: '1', label: '停止' }, { value: '2', label: '取暖' }, { value: '3', label: '空调' }])
-const formatHeatColdType = (heatColdList) => {
-  if (heatColdList) {
-    return heatColdList.map(heatCold => {
-      const item = heatColdType.value.find(item => item.value === heatCold)
-      return item ? item.label : heatCold
-    }).join(',')
-  }
-  return ''
-}
 
 onMounted(() => {
   nextTick(async () => {
@@ -202,18 +178,22 @@ const queryDeptInfoForBed = () => {
 }
 
 // 单选行事件
+// 病区
 const clickDept = ref('')
+// 科室
+const roomCode = ref('')
 const cellClickEvent = ({ row, column }) => {
   if(column.field === 'openBedNum'){
     return
   }
-  clickDept.value = row.deptCode
+  clickDept.value = row.wardCode
+  roomCode.value = row.deptCode
   queryBedInfoForDept(clickDept.value)
 }
 
 // 查询科室具体床位信息
-const queryBedInfoForDept = (deptCode) => {
-  selectBedInfoForDept(deptCode).then((res) => {
+const queryBedInfoForDept = (wardCode) => {
+  selectBedInfoForDept(wardCode).then((res) => {
     bedInfo.value = res
   })
 }
@@ -321,6 +301,34 @@ const saveBedInfoForDept = () => {
   }
 }
 
+// 新增科室床位信息
+const showAddBedForDept = ref(false)
+const bedForDeptDetail = ref({})
+const addBedInfoForDept = () => {
+  if(clickDept.value){
+    showAddBedForDept.value = true
+    // 病房
+    bedForDeptDetail.value.wardCode = clickDept.value
+    // 科室
+    bedForDeptDetail.value.deptCode = roomCode.value
+    // 下一个床位号
+    bedForDeptDetail.value.bedNo = bedInfo.value.length + 1
+  } else {
+    ElMessage({
+      type: "info",
+      message: "请选择一个科室再增加一个床位!",
+      duration: 2500,
+      showClose: true,
+    });
+  }
+}
+const closeBedForDeptDetail = (flag) => {
+  if(flag){
+    showAddBedForDept.value = false
+    queryBedInfoForDept(clickDept.value)
+  }
+}
+
 // 重置床位信息
 const refreshBedInfo = () => {
   if(clickDept.value){

+ 590 - 0
src/views/dictionary/personnel/DeptRoomDict.vue

@@ -0,0 +1,590 @@
+<template>
+  <div class="layout_display_flex_y">
+    <div style="margin-bottom: 6px; background-color: #fff;">
+      <el-input v-model="text" class="w-50 m-2" style="width: 300px" placeholder="请输入编码/名称" clearable>
+        <template #prepend>编码/名称 </template>
+      </el-input>
+      <el-button type="primary" icon="Search" @click="queryItem" style="margin-left: 5px">查询</el-button>
+      <el-button type="primary" icon="Plus" @click="onAddItem" style="margin-left: 5px">新增</el-button>
+      <!-- <el-button type="primary" icon="Download" @click="exportData" style="margin-left: 5px">导出</el-button> -->
+    </div>
+    <div class="layout_display_flex_y">
+      <el-tabs class="el-tabs__fill" v-model="editableTabsValue" type="border-card" @tab-click="handleClick">
+        <el-tab-pane key="roomDept" label="病房科室字典" name="roomDept">
+          <div class="layout_display_flex_y">
+            <div class="layout_flex_1-y">
+              <el-table
+                  :data="roomDeptData.slice(pageSizeRoom * (currentPageRoom - 1), pageSizeRoom * currentPageRoom)"
+                  border style="width: 100%" height="100%" stripe highlight-current-row
+                  class="roomDeptTable normal-size">
+                <el-table-column type="index" label="序号" width="80" />
+                <el-table-column prop="deptCode" label="科室编码" width="100"></el-table-column>
+                <el-table-column prop="deptName" label="科室名称" width="240">
+                  <template v-slot="scope">
+                    <div v-if="scope.row.isEdit">
+                      <el-select v-model="scope.row.deptName" placeholder="请选择科室" @change="deptChange(scope.row)">
+                        <el-option v-for="option in unitData" :key="option.code" :label="option.name"
+                                   :value="option.name"></el-option>
+                      </el-select>
+                    </div>
+                    <div v-else>
+                      <el-select v-model="scope.row.deptName" disabled placeholder="请选择科室">
+                        <el-option v-for="option in unitData" :key="option.code" :label="option.name"
+                                   :value="option.name"></el-option>
+                      </el-select>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="wardCode" label="病房编码" width="100"></el-table-column>
+                <el-table-column prop="wardName" label="病房名称" width="240"></el-table-column>
+                <el-table-column prop="openBedNum" label="开放床位数" width="100">
+                  <template v-slot="scope">
+                    <el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.openBedNum"></el-input>
+                    <span v-else>{{ scope.row.openBedNum }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="oweLimit" label="欠费底限" width="100">
+                  <template v-slot="scope">
+                    <el-input v-if="scope.row.isEdit" size="small" v-model="scope.row.oweLimit"></el-input>
+                    <span v-else>{{ scope.row.oweLimit }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="deptPyCode" label="科室拼音码" width="140" />
+                <el-table-column prop="deptDCode" label="科室五笔码" width="140" />
+                <el-table-column prop="wardPyCode" label="病房拼音码" width="140" />
+                <el-table-column prop="wardDCode" label="病房五笔码" width="140" />
+                <el-table-column fixed="right" label="操作" min-width="180" width="180" center>
+                  <template #default="scope">
+                    <el-button type="primary" size="small" v-if="!scope.row.isEdit"
+                               @click="editRoomDept(scope.row)">编辑</el-button>
+                    <el-button type="primary" size="small" v-if="scope.row.isEdit"
+                               @click="updateRoomDept(scope.row)">保存</el-button>
+                    <el-button type="primary" size="small" v-if="scope.row.isEdit"
+                               @click="cancelRoomDept(scope.row)">取消
+                    </el-button>
+                    <el-button type="danger" size="small"
+                               @click.prevent="deleteRoomDept(scope.row)">
+                      删除
+                    </el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+            <div>
+              <el-pagination :current-page="currentPageRoom" :page-size="pageSizeRoom"
+                             :page-sizes="[10, 15, 20, 25]" :total="roomDeptData.length"
+                             layout="total, sizes, prev, pager, next, jumper" style="margin-top: 5px"
+                             @size-change="handleSizeChangeRoom" @current-change="handleCurrentChangeRoom">
+              </el-pagination>
+            </div>
+          </div>
+        </el-tab-pane>
+        <el-tab-pane key="smallDept" label="小科室字典" name="smallDept">
+          <div class="layout_display_flex_y">
+            <div class="layout_flex_1-y">
+              <el-table
+                  :data="smallDeptData.slice(pageSizeSmall * (currentPageSmall - 1), pageSizeSmall * currentPageSmall)"
+                  border style="width: 100%" height="100%" stripe highlight-current-row
+                  class="smallDeptTable normal-size">
+                <el-table-column type="index" label="序号" width="70" />
+                <el-table-column prop="deptId" label="科室序列" width="100" />
+                <el-table-column prop="dept" label="大科室" width="120">
+                  <template v-slot="scope">
+                    <div v-if="scope.row.isEdit">
+                      <el-select v-model="scope.row.dept" placeholder="请选择大科室">
+                        <el-option v-for="option in unitData" :key="option.code" :label="option.name"
+                                   :value="option.code"></el-option>
+                      </el-select>
+                    </div>
+                    <div v-else>
+                      <el-select v-model="scope.row.dept" disabled placeholder="请选择大科室">
+                        <el-option v-for="option in unitData" :key="option.code" :label="option.name"
+                                   :value="option.code"></el-option>
+                      </el-select>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="smallDept" label="小科室" width="280">
+                  <template v-slot="scope">
+                    <div v-if="scope.row.isEdit">
+                      <el-select v-model="scope.row.smallDept" placeholder="请选择小科室">
+                        <el-option v-for="option in unitData" :key="option.code" :label="option.name"
+                                   :value="option.code"></el-option>
+                      </el-select>
+                    </div>
+                    <div v-else>
+                      <el-select v-model="scope.row.smallDept" disabled placeholder="请选择小科室">
+                        <el-option v-for="option in unitData" :key="option.code" :label="option.name"
+                                   :value="option.code"></el-option>
+                      </el-select>
+                    </div>
+                  </template>
+                </el-table-column>
+                <el-table-column prop="wardPyCode" label="病房拼音码" width="140" />
+                <el-table-column prop="wardDCode" label="病房五笔码" width="140" />
+                <el-table-column prop="deptPyCode" label="科室拼音码" width="140" />
+                <el-table-column prop="deptDCode" label="科室五笔码" width="140" />
+                <el-table-column fixed="right" label="操作" min-width="180" width="180" center>
+                  <template #default="scope">
+                    <el-button type="primary" size="small" v-if="!scope.row.isEdit"
+                               @click="editSmallDept(scope.row)">编辑</el-button>
+                    <el-button type="primary" size="small" v-if="scope.row.isEdit"
+                               @click="updateSmallDept(scope.row)">保存</el-button>
+                    <el-button type="primary" size="small" v-if="scope.row.isEdit"
+                               @click="cancelSmallDept(scope.row)">取消
+                    </el-button>
+                    <el-button type="danger" size="small"
+                               @click.prevent="deleteSmallDept(scope.row)">
+                      删除
+                    </el-button>
+                  </template>
+                </el-table-column>
+              </el-table>
+            </div>
+            <div>
+              <el-pagination :current-page="currentPageSmall" :page-size="pageSizeSmall" :page-sizes="[10, 15, 20, 25]"
+                             :total="smallDeptData.length" layout="total, sizes, prev, pager, next, jumper"
+                             style="margin-top: 5px" @size-change="handleSizeChangeSmall"
+                             @current-change="handleCurrentChangeSmall">
+              </el-pagination>
+            </div>
+          </div>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+  </div>
+</template>
+<script setup name="DeptRoomDict">
+import { ref, onMounted, nextTick } from 'vue'
+import { ElMessage, ElMessageBox } from 'element-plus'
+import {
+  selectRoomDept, saveRoomDept, delRoomDeptByCode,
+  selectSmallDept, saveSmallDept, delSmallDeptByCode, selectZdUnitCode,
+} from "@/api/dictionary/personnel/bed-dept-dict"
+
+const editableTabsValue = ref('roomDept')
+const msgTip = '编码(code)有变更,原始字典记录存在关联,请谨慎做更改,是否确认!!!'
+
+const pageSizeRoom = ref(20)
+const currentPageRoom = ref(1)
+const handleSizeChangeRoom = (val) => {
+  pageSizeRoom.value = val
+}
+const handleCurrentChangeRoom = (val) => {
+  currentPageRoom.value = val
+}
+
+const pageSizeSmall = ref(20)
+const currentPageSmall = ref(1)
+const handleSizeChangeSmall = (val) => {
+  pageSizeSmall.value = val
+}
+const handleCurrentChangeSmall = (val) => {
+  currentPageSmall.value = val
+}
+
+const roomDeptData = ref([])
+const smallDeptData = ref([])
+
+const text = ref('')
+onMounted(() => {
+  nextTick(() => {
+    queryUnitCode('')
+    queryRoomDept()
+  })
+})
+
+// 科室下拉数据
+const unitData = ref([])
+const queryUnitCode = (code) => {
+  selectZdUnitCode(code).then((res) => {
+    unitData.value = res
+  })
+}
+
+// 病房科室下拉选改变
+const deptChange = async (row) => {
+  await nextTick()
+  let dataF = unitData.value.filter((item) => {
+    return item.name === row.deptName
+  })
+  if (dataF) {
+    row.deptCode = dataF[0].code
+    row.wardCode = dataF[0].code
+    row.wardName = dataF[0].name
+  }
+}
+
+// 查询病房科室字典
+const queryRoomDept = () => {
+  selectRoomDept(text.value)
+      .then((res) => {
+        res.forEach(row => {
+          // 是否标记
+          row['isEdit'] = false
+          // 是否新增
+          row['isAdd'] = false
+        })
+        roomDeptData.value = res
+      })
+      .catch(() => {
+        roomDeptData.value = []
+      })
+}
+
+// 查询药品字典-药品分类字典
+const querySmallDept = () => {
+  selectSmallDept(text.value)
+      .then((res) => {
+        res.forEach(row => {
+          // 是否标记
+          row['isEdit'] = false
+          // 是否新增
+          row['isAdd'] = false
+        })
+        smallDeptData.value = res
+      })
+      .catch(() => {
+        smallDeptData.value = []
+      })
+}
+
+// 查询
+const queryItem = () => {
+  if (editableTabsValue.value === 'roomDept') {
+    queryRoomDept()
+  } else if (editableTabsValue.value === 'smallDept') {
+    querySmallDept()
+  }
+}
+
+// 新增行
+const onAddItem = () => {
+  if (editableTabsValue.value === 'roomDept') {
+    let count
+    if (roomDeptData.value.length % pageSizeRoom.value === 0) {
+      count = Math.ceil(roomDeptData.value.length / pageSizeRoom.value) + 1
+    } else {
+      count = Math.ceil(roomDeptData.value.length / pageSizeRoom.value)
+    }
+    currentPageRoom.value = count
+    roomDeptData.value.push({
+      deptCode: '',
+      deptName: '',
+      wardCode: '',
+      wardName: '',
+      deptPyCode: '',
+      deptDCode: '',
+      wardPyCode: '',
+      wardDCode: '',
+      openBedNum: 0,
+      oweLimit: 0.00,
+      isEdit: true,
+      isAdd: true,
+    })
+    const el = document.querySelector('.roomDeptTable .el-scrollbar__wrap')
+    const el2 = document.querySelector('.roomDeptTable .el-table__body tbody')
+    setTimeout(() => {
+      const height = el2.clientHeight - el.clientHeight
+      if (height > 0) {
+        el.scrollTop = height
+      }
+    }, 100)
+  } else if (editableTabsValue.value === 'smallDept') {
+    let count
+    if (smallDeptData.value.length % pageSizeSmall.value === 0) {
+      count = Math.ceil(smallDeptData.value.length / pageSizeSmall.value) + 1
+    } else {
+      count = Math.ceil(smallDeptData.value.length / pageSizeSmall.value)
+    }
+    currentPageSmall.value = count
+    smallDeptData.value.push({
+      dept: '',
+      smallDept: '',
+      isEdit: true,
+      isAdd: true,
+    })
+    const el = document.querySelector('.smallDeptTable .el-scrollbar__wrap')
+    const el2 = document.querySelector('.smallDeptTable .el-table__body tbody')
+    setTimeout(() => {
+      const height = el2.clientHeight - el.clientHeight
+      if (height > 0) {
+        el.scrollTop = height
+      }
+    }, 100)
+  }
+}
+
+// 病房科室字典增删改存开始
+// 编辑
+const editRoomDept = (row) => {
+  // 备份原始数据
+  row['oldRow'] = JSON.parse(JSON.stringify(row))
+  row.isEdit = true
+}
+// 取消
+const cancelRoomDept = (row) => {
+  // 如果是新增的数据
+  if (row.isAdd) {
+    roomDeptData.value.splice(roomDeptData.value.length - 1, 1)
+  } else {
+    // 不是新增的数据  还原数据
+    for (const i in row.oldRow) {
+      row[i] = row.oldRow[i]
+    }
+  }
+}
+// 保存
+const updateRoomDept = (row) => {
+  if (!row.wardCode || !row.deptCode) {
+    ElMessage({
+      type: "warning",
+      message: "病房编码或科室编码不存在,请检查!",
+      duration: 2500,
+      showClose: true,
+    });
+    return
+  }
+
+  if (row.isAdd) {
+    let fe = 0
+    for (let num in roomDeptData.value) {
+      if (roomDeptData.value[num].wardCode === row.wardCode && roomDeptData.value[num].deptCode === row.deptCode) {
+        fe++
+      }
+    }
+    if (fe === 2) {
+      ElMessage({
+        type: "warning",
+        message: "存在重复的病房科室,请核对!",
+        duration: 2500,
+        showClose: true,
+      });
+    } else {
+      callSaveRoomDept(row, null, null)
+    }
+
+  } else {
+    let oldWardCode = row.oldRow.wardCode
+    let oldDeptCode = row.oldRow.deptCode
+    if (oldWardCode !== row.wardCode && oldDeptCode !== row.deptCode) {
+      ElMessageBox.confirm(msgTip, {
+        cancelButtonText: '取消',
+        confirmButtonText: '确定',
+        type: 'warning',
+        distinguishCancelAndClose: true,
+        dangerouslyUseHTMLString: true
+      }).then(() => {
+        callSaveRoomDept(row, oldWardCode, oldDeptCode)
+      }).catch((action) => {
+        if (action === 'cancel') {
+          queryRoomDept()
+        }
+      })
+    } else {
+      callSaveRoomDept(row, oldWardCode, oldDeptCode)
+    }
+  }
+}
+
+const callSaveRoomDept = (row, oldWardCode, oldDeptCode) => {
+  let title = '请确认是否保存<span style="color:#d12020;">' + row.wardName + '</span>?'
+  ElMessageBox.confirm(title, {
+    cancelButtonText: '取消',
+    confirmButtonText: '确定',
+    type: 'warning',
+    distinguishCancelAndClose: true,
+    dangerouslyUseHTMLString: true
+  }).then(() => {
+    saveRoomDept(row).then((res) => {
+      ElMessage({
+        type: "success",
+        message: res.cg,
+        duration: 2500,
+        showClose: true,
+      });
+      if (oldWardCode !== null && oldDeptCode !== null && oldWardCode !== row.wardCode && oldDeptCode !== row.deptCode) {
+        // 删除原始数据
+        delRoomDeptByCode(oldWardCode, oldDeptCode).then((res) => {
+          queryRoomDept()
+        })
+      } else {
+        queryRoomDept()
+      }
+    })
+  }).catch((action) => {
+    if (action === 'cancel') {
+      queryRoomDept()
+    }
+  })
+}
+
+const deleteRoomDept = (row) => {
+  let title = '请确认是否删除<span style="color:#d12020;">' + row.wardName + '</span>?'
+  ElMessageBox.confirm(title, {
+    cancelButtonText: '取消',
+    confirmButtonText: '确定',
+    type: 'warning',
+    distinguishCancelAndClose: true,
+    dangerouslyUseHTMLString: true
+  }).then(() => {
+    delRoomDeptByCode(row.wardCode, row.deptCode).then((res) => {
+      ElMessage({
+        type: "success",
+        message: res.cg,
+        duration: 2500,
+        showClose: true,
+      });
+      queryRoomDept()
+    })
+  }).catch((action) => {
+    if (action === 'cancel') {
+      queryRoomDept()
+    }
+  })
+}
+// 病房科室字典增删改存结束
+
+// 药品字典-药品分类字典增删改存开始
+// 编辑
+const editSmallDept = (row) => {
+  // 备份原始数据
+  row['oldRow'] = JSON.parse(JSON.stringify(row))
+  row.isEdit = true
+}
+// 取消
+const cancelSmallDept = (row) => {
+  // 如果是新增的数据
+  if (row.isAdd) {
+    smallDeptData.value.splice(smallDeptData.value.length - 1, 1)
+  } else {
+    // 不是新增的数据  还原数据
+    for (const i in row.oldRow) {
+      row[i] = row.oldRow[i]
+    }
+  }
+}
+// 保存
+const updateSmallDept = (row) => {
+  if (!row.dept || !row.smallDept) {
+    ElMessage({
+      type: "warning",
+      message: "大科室编码或小科室编码不存在,请检查!",
+      duration: 2500,
+      showClose: true,
+    });
+    return
+  }
+
+  if (row.isAdd) {
+    callSaveSmallDept(row, null)
+  } else {
+    let oldDeptId = row.oldRow.deptId
+    callSaveSmallDept(row, oldDeptId)
+  }
+}
+
+const callSaveSmallDept = (row, oldDeptId) => {
+  let title = '请确认是否保存<span style="color:#d12020;">' + row.smallDept + '</span>?'
+  ElMessageBox.confirm(title, {
+    cancelButtonText: '取消',
+    confirmButtonText: '确定',
+    type: 'warning',
+    distinguishCancelAndClose: true,
+    dangerouslyUseHTMLString: true
+  }).then(() => {
+    saveSmallDept(row).then((res) => {
+      ElMessage({
+        type: "success",
+        message: res.cg,
+        duration: 2500,
+        showClose: true,
+      });
+      if (oldDeptId !== null && oldDeptId !== row.deptId) {
+        // 删除原始数据
+        delSmallDeptByCode(oldDeptId).then((res) => {
+          querySmallDept()
+        })
+      } else {
+        querySmallDept()
+      }
+    })
+  }).catch((action) => {
+    if (action === 'cancel') {
+      querySmallDept()
+    }
+  })
+}
+
+const deleteSmallDept = (row) => {
+  let title = '请确认是否删除<span style="color:#d12020;">' + row.smallDept + '</span>?'
+  ElMessageBox.confirm(title, {
+    cancelButtonText: '取消',
+    confirmButtonText: '确定',
+    type: 'warning',
+    distinguishCancelAndClose: true,
+    dangerouslyUseHTMLString: true
+  }).then(() => {
+    delSmallDeptByCode(row.deptId).then((res) => {
+      ElMessage({
+        type: "success",
+        message: res.cg,
+        duration: 2500,
+        showClose: true,
+      });
+      querySmallDept()
+    })
+  }).catch((action) => {
+    if (action === 'cancel') {
+      querySmallDept()
+    }
+  })
+}
+// 药品字典-药品分类字典增删改存结束
+
+const exportData = () => {
+  alert("功能建设中。。。")
+}
+
+const handleClick = (tab, event) => {
+  // 查询哪个tab页面
+  editableTabsValue.value = tab.props.name
+  if (editableTabsValue.value === 'roomDept') {
+    queryRoomDept()
+    currentPageRoom.value = 1
+  } else if (editableTabsValue.value === 'smallDept') {
+    querySmallDept()
+    currentPageSmall.value = 1
+  }
+}
+
+</script>
+<style lang="scss" scoped>
+:deep(.el-dialog__body) {
+  padding: 0 16px;
+  height: calc(100% - 25px);
+}
+
+:deep(.el-tabs) {
+  height: calc(100% - 27px);
+
+  .el-tabs__content {
+    padding: 5px;
+    height: calc(100% - 27px);
+  }
+
+  .el-tab-pane {
+    height: calc(100% - 27px);
+    overflow: auto;
+  }
+
+  .el-table__inner-wrapper {
+    height: calc(100% - 10px) !important;
+  }
+
+}
+
+:deep(.el-table .warning-row) {
+  --el-table-tr-bg-color: #dd7694;
+}
+</style>

+ 997 - 0
src/views/hospitalization/zfsf/CashierProcessInfo.vue

@@ -0,0 +1,997 @@
+<template>
+  <div class="layout_container">
+    <header>
+      <PatientBaseList ref="patientBaseListRef" @selectPatientInfo="selectPatient"></PatientBaseList>
+    </header>
+    <div class="layout_main">
+      <el-container>
+        <el-header style="height: 90px">
+          <div style="width: 100%" >
+          <el-form label-width="100px" size="large">
+            <el-row style="width: 100%">
+              <el-col  :span="4" >
+                <el-form-item v-show="setShowFlag" label="结算类型:">
+                  <el-input v-model="settData.settleTypeName" disabled style="width: 100px"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="4" >
+                <el-form-item v-show="setShowFlag" label="自付:">
+                  <el-input v-model="settData.zfJe" disabled style="width: 100px"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="4" >
+                <el-form-item v-show="setShowFlag" :label="settData.settleName">
+                  <el-input v-model="settData.settle" disabled style="width: 100px"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="4" >
+                <el-form-item v-show="setShowFlag" label="实收:">
+                  <el-input-number v-model="settData.ssJe" :controls="false" :precision="2" :min="0" />
+                </el-form-item>
+              </el-col>
+              <el-col :span="4" >
+                <el-form-item v-show="setShowFlag" label="找还:">
+                  <el-input v-model="settData.zhje" disabled style="width: 80px"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :span="4" >
+                <el-form-item label="当前发票号:">
+                  <span  style="display: inline-block;width: 110px;background-color: #0f5e0f;text-align: center;color: #2eff00;font-size: 18px">{{settData.currentNoStr}}</span>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </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  type="primary" icon="RefreshLeft"  @click="chongZhiData" >重置</el-button>
+              <el-button  type="primary" icon="Money"  @click="openPos" >智能POS工具包</el-button>
+            </div>
+          </div>
+        </el-header>
+        <el-container>
+          <el-aside style="width: 60%">
+              <div  style="height: 60%">
+                <div class="border_solid layout_overflow_auto" style="float: left;width: 40%;height: 100%">
+                  <el-divider border-style="dashed" content-position="left" >记账信息</el-divider>
+                    <el-table :data="jzInfoList" style="width: 100%"  height="200">
+                      <el-table-column  property="ybType" label="类型" />
+                      <el-table-column  property="ybJzJe" label="金额" />
+                    </el-table>
+                </div>
+
+                <div class="border_solid layout_overflow_auto" style="float: right;width: 58%;height: 100%">
+                  <el-divider border-style="dashed" content-position="left" >交款信息</el-divider>
+                    <el-table :data="jkInfoList" style="width: 100%"  height="180">
+                      <el-table-column width="80"  label="操作" >
+                        <template #default="scope">
+                          <el-button v-if="scope.row.settType ==='交纳' && (scope.row.depoType==='3' || scope.row.depoType==='O') "  type="primary" @click="shuaKa(scope.row,scope.$index)">刷卡/扫码</el-button>
+                        </template>
+                      </el-table-column>
+                      <el-table-column  property="settType" width="50" />
+                      <el-table-column  property="depoType" label="类型" >
+                        <template #default="scope">
+                          <el-select v-model="scope.row.depoType" style="width: 100px">
+                            <el-option v-for="item in zdChequeTypes" :key="item.code" :label="item.name" :value="item.code"></el-option>
+                          </el-select>
+                        </template>
+                      </el-table-column>
+                      <el-table-column  property="depoAmount" label="金额" width="120">
+                        <template #default="scope">
+                          <el-input-number v-model="scope.row.depoAmount" @blur="calcJkJe" :controls="false" :precision="2" :min="0" size="small" style="width: 100px"/>
+                        </template>
+                      </el-table-column>
+                      <el-table-column  property="chequeNo" label="凭证号" >
+                        <template #default="scope">
+                          <el-input v-model="scope.row.chequeNo"   size="small" style="width: 100px"/>
+                        </template>
+                      </el-table-column>
+                      <el-table-column  >
+                        <template #default="scope">
+                          <el-button icon="Plus" @click="addJkInfo"></el-button>
+                          <el-button icon="Minus"   @click="delJkInfo(scope.$index)" ></el-button>
+                        </template>
+                      </el-table-column>
+                    </el-table>
+                    <div v-if="jkInfoList.length > 0" style="width: 200px;margin-left: 100px" class="layout_overflow_auto">
+                      <el-descriptions size="large" :column="1" border  >
+                        <el-descriptions-item label="交纳:">
+                          <span class="f-size" style="color: blue" >{{jkHj.jnZj}} </span>
+                        </el-descriptions-item>
+                        <el-descriptions-item label="退款:">
+                          <span class="f-size" style="color: red">{{jkHj.tkZj}}  </span>
+                        </el-descriptions-item>
+                        <el-descriptions-item label="总计:">
+                          <span class="f-size">{{jkHj.zj}} </span>
+                        </el-descriptions-item>
+                      </el-descriptions>
+                    </div>
+                </div>
+              </div>
+              <div  style="height: 30%">
+                <el-divider border-style="dashed" content-position="left" >发票信息</el-divider>
+                <div class="border_solid layout_overflow_auto" style="float: left;width: 50%;height: 100%">
+                  <el-table :data="zyInfoList" style="width: 100%" highlight-current-row  @row-click="fetchZyData"  height="180">
+                    <el-table-column  property="ledgerSn" label="账页" />
+                    <el-table-column  property="accountDate" label="结算日期" />
+                    <el-table-column   label="类型" >
+                      <template #default="scope">
+                        {{getZySettType(scope.row)}}
+                      </template>
+                    </el-table-column>
+                    <el-table-column  property="cashDate" label="出纳日期" />
+                    <el-table-column  property="responceTypeName" label="结账身份" />
+                  </el-table>
+                </div>
+                <div class="border_solid layout_overflow_auto" style="float: right;width: 49%;height: 100%">
+                  <el-table :data="zyFpInfoList" style="width: 100%"  height="180">
+                    <el-table-column   label="操作" >
+                      <template #default="scope">
+                        <el-button v-if="scope.row.inpatientNo !=null" icon="Printer" type="success" @click="selectPrintZyFp(scope.row)">打印</el-button>
+                      </template>
+                    </el-table-column>
+                    <el-table-column  property="ledgerSn" label="账页" />
+                    <el-table-column  property="receiptNo" label="发票号" />
+                    <el-table-column  property="responceUnitName" label="类型" />
+                    <el-table-column  property="totalCharge" label="发票金额" />
+                  </el-table>
+                </div>
+              </div>
+          </el-aside>
+          <el-main  style="width: 40%">
+            <el-tabs v-model="activeName" @tab-change="tabClick">
+              <el-tab-pane label="已交押金" name="one">
+                <el-table :data="yjYjList" style="width: 100%;" :height="350">
+                  <el-table-column  property="ledgerSn" label="账页" />
+<!--                  <el-table-column   label="打印操作" >-->
+<!--                    <template #default="scope">-->
+<!--                      <el-button v-if="scope.row.status ==='1'"  icon="Printer" type="success" @click="printFp(scope.row)">打印</el-button>-->
+<!--                    </template>-->
+<!--                  </el-table-column>>-->
+                  <el-table-column  property="depoDate" label="日期" />
+                  <el-table-column  property="statusName" label="事务" />
+                  <el-table-column  property="depoAmount" label="金额" />
+                  <el-table-column  property="receiptNo" label="收据" />
+                  <el-table-column  property="depoTypeName" label="类型" />
+                  <el-table-column  property="chequeNo" label="支票号" />
+                  <el-table-column  property="opIdCodeName" label="操作员" />
+                </el-table>
+                <div>
+                  <el-descriptions size="large" :column="2" border style="width:100%;" >
+                    <el-descriptions-item label="预交张数:">
+                      <span class="f-size">{{yjHz.yjZs}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="预交合计:">
+                      <span class="f-size">{{yjHz.yjHj}} </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item >
+
+                    </el-descriptions-item>
+                    <el-descriptions-item label="直退合计:">
+                     <span class="f-size" style="color: red">
+                       {{yjHz.ztHj}}
+                     </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item >
+
+                    </el-descriptions-item>
+                    <el-descriptions-item label="实际预交:">
+                      <span class="f-size">{{yjHz.sjYj}} </span>
+                    </el-descriptions-item>
+                  </el-descriptions>
+                </div>
+              </el-tab-pane>
+              <el-tab-pane label="可出纳列表" name="two">
+                  <div class="layout_overflow_auto" style="width: 100%;height: 100%">
+                    <el-table :data="kcnList" highlight-current-row @row-click="fetchCnPatient" style="width: 100%;" :height="450">
+                      <el-table-column  property="actFlagName" label="在院/出院" />
+                      <el-table-column  property="inpatientNo" label="住院号" />
+                      <el-table-column  property="admissTimes" label="住院次数" />
+                      <el-table-column  property="name" label="姓名" />
+                      <el-table-column  property="bedNo" label="床号" />
+                      <el-table-column  property="settle" label="补/退" />
+                      <el-table-column  property="wardName" label="病房" />
+                      <el-table-column  property="accountDate" label="结算时间" />
+                      <el-table-column  property="admissDate" label="入院日期" />
+                    </el-table>
+                  </div>
+              </el-tab-pane>
+            </el-tabs>
+          </el-main>
+        </el-container>
+      </el-container>
+    </div>
+  </div>
+  <PosTransaction ref="posTransactionRef"></PosTransaction>
+  <el-dialog v-model="zyFpPrintVisible" title="发票打印" width="800" center>
+    <div style="width: 100%;height: 60px">
+      <el-row>
+        <el-col :span="12">
+          起始发票号:  <span  style="display: inline-block;width: 110px;background-color: #0f5e0f;text-align: center;color: #2eff00;font-size: 18px">{{settData.currentNoStr}}</span>
+        </el-col>
+        <el-col :span="6">
+          <el-checkbox v-model="printFlag">更新发票号</el-checkbox>
+        </el-col>
+        <el-col :span="6">
+         <el-button type="success" icon="Printer" @click="printZyFp">打印</el-button>
+        </el-col>
+      </el-row>
+    </div>
+    <div id="zyFpId"  style="width: 640px;">
+      <div style="width: 640px;border: 1px white solid">
+      <div id="headDiv">
+        <p  style="margin-left: 478px;margin-top: 40px">
+          {{settData.currentNoStr}}
+        </p>
+        <p  style="margin-left: 170px;margin-top: -10px;">
+          {{printZyFpInfo.responceTypeName}}
+        </p>
+        <p  style="margin-left: 165px;margin-top: -10px">
+            住院总费用:{{printZyFpInfo.totalCharge}},其中医保统筹支付:{{printZyFpInfo.ybTcZfJe}}元,
+        </p>
+        <p  style="margin-left: 165px;margin-top: -10px">
+          个人自付金额{{printZyFpInfo.grZfJe}},个人账户支付{{printZyFpInfo.grZhZfJe}}元
+        </p>
+      </div>
+      <div  style="height: 20px">
+        <div  style="margin-left: 40px">
+          {{printZyFpInfo.name}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+          {{printZyFpInfo.sexName}} <span style="display: inline-block;width: 270px"></span>
+          {{printZyFpInfo.wardName}} <span style="display: inline-block;width: 40px"></span>
+          {{printZyFpInfo.inpatientNo}}
+        </div>
+      </div>
+      <div  style="margin-left: 19px">
+        {{getYeay(printZyFpInfo.startDate)}} <span style="display: inline-block;width: 25px"></span>
+        {{getMoth(printZyFpInfo.startDate)}}<span style="display: inline-block;width: 29px"></span>
+        {{getDay(printZyFpInfo.startDate)}}<span style="display: inline-block;width: 70px"></span>
+        {{getYeay(printZyFpInfo.endDate)}}<span style="display: inline-block;width: 25px"></span>
+        {{getMoth(printZyFpInfo.endDate)}}<span style="display: inline-block;width: 29px"></span>
+        {{getDay(printZyFpInfo.endDate)}}<span style="display: inline-block;width: 65px"></span>
+        {{printZyFpInfo.zyTs}}<span style="display: inline-block;width: 65px"></span>
+        {{getYeay(getFormatDatetime(new Date()))}}<span style="display: inline-block;width: 25px"></span>
+        {{getMoth(getFormatDatetime(new Date()))}}<span style="display: inline-block;width: 29px"></span>
+        {{getDay(getFormatDatetime(new Date()))}}
+      </div>
+      <div class="comH"></div>
+      <div class=" comH comM">
+        <span class=" spanW " v-if="printZyFpInfo.charge1 !==0">{{printZyFpInfo.charge1}}</span>
+        <span v-else class="spanW"></span>
+        <span  class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge9 !==0">{{printZyFpInfo.charge9}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge17 !==0">{{printZyFpInfo.charge17}}</span>
+        <span v-else class="spanW"></span>
+        <span  class="comSpan"></span>
+        <span class="spanW"  v-if="printZyFpInfo.charge25 !==0">{{printZyFpInfo.charge25}}</span>
+        <span v-else class="spanW"></span>
+        <span  class="comSpan"></span>
+      </div>
+
+      <div class=" comH comM" >
+        <span class=" spanW" v-if="printZyFpInfo.charge2 !==0">{{printZyFpInfo.charge2}}</span>
+        <span v-else class="spanW"></span>
+        <span  class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge10 !==0">{{printZyFpInfo.charge10}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge18 !==0">{{printZyFpInfo.charge18}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan"  v-if="printZyFpInfo.charge26 !==0">其他</span>
+        <span v-else class="comSpan"></span>
+        <span class="spanW"  v-if="printZyFpInfo.charge26 !==0">{{printZyFpInfo.charge26}}</span>
+        <span v-else class="spanW"></span>
+        <span  class="comSpan"></span>
+        <span class="spanW"  v-if="printZyFpInfo.ysHjJe !==0">{{printZyFpInfo.ysHjJe}}</span>
+        <span v-else class="spanW"></span>
+      </div>
+
+      <div class=" comH comM" >
+        <span class=" spanW" v-if="printZyFpInfo.charge3 !==0">{{printZyFpInfo.charge3}}</span>
+        <span v-else class="spanW"></span>
+        <span  class="comSpan"></span>
+        <span class=" spanW" v-if="printZyFpInfo.charge11 !==0">{{printZyFpInfo.charge11}}</span>
+        <span v-else class="spanW"></span>
+        <span  class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge19 !==0">{{printZyFpInfo.charge19}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan "  v-if="printZyFpInfo.charge27 !==0">材料费</span>
+        <span v-else class="comSpan"></span>
+        <span class="spanW"  v-if="printZyFpInfo.charge27 !==0">{{printZyFpInfo.charge27}}</span>
+        <span v-else class="spanW"></span>
+      </div>
+
+      <div class=" comH comM" >
+        <span class=" spanW" v-if="printZyFpInfo.charge4 !==0">{{printZyFpInfo.charge4}}</span>
+        <span v-else class="spanW"></span>
+        <span  class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge12 !==0">{{printZyFpInfo.charge12}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge20 !==0">{{printZyFpInfo.charge20}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan"  v-if="printZyFpInfo.charge28 !==0">中成药</span>
+        <span v-else class="comSpan"></span>
+        <span class="spanW"  v-if="printZyFpInfo.charge28 !==0">{{printZyFpInfo.charge28}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan"></span>
+        <span class="spanW"  v-if="printZyFpInfo.bsHjJe !==0">{{printZyFpInfo.bsHjJe}}</span>
+        <span v-else class="spanW"></span>
+      </div>
+
+      <div class=" comH comM" >
+        <span class=" spanW" v-if="printZyFpInfo.charge5 !==0">{{printZyFpInfo.charge5}}</span>
+        <span v-else class="spanW"></span>
+        <span  class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge13 !==0">{{printZyFpInfo.charge13}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge21 !==0">{{printZyFpInfo.charge21}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan"  ></span>
+        <span class="spanW"  ></span>
+        <span class="comSpan"></span>
+        <span class="spanW"  ></span>
+      </div>
+
+      <div class=" comH comM" >
+        <span class=" spanW" v-if="printZyFpInfo.charge6 !==0">{{printZyFpInfo.charge6}}</span>
+        <span v-else class="spanW"></span>
+        <span  class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge14 !==0">{{printZyFpInfo.charge14}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge22 !==0">{{printZyFpInfo.charge22}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan"  ></span>
+        <span class="spanW"  ></span>
+        <span class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.tkHjJe !==0">{{printZyFpInfo.tkHjJe}}</span>
+        <span v-else class="spanW"></span>
+      </div>
+
+      <div class=" comH comM" >
+        <span class=" spanW" v-if="printZyFpInfo.charge7 !==0">{{printZyFpInfo.charge7}}</span>
+        <span v-else class="spanW"></span>
+        <span  class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge15 !==0">{{printZyFpInfo.charge15}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge23 !==0">{{printZyFpInfo.charge23}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan"  ></span>
+        <span class="spanW"  ></span>
+        <span class="comSpan"></span>
+        <span class="spanW"  ></span>
+      </div>
+
+      <div class=" comH comM" >
+        <span class=" spanW" v-if="printZyFpInfo.charge8 !==0">{{printZyFpInfo.charge8}}</span>
+        <span v-else class="spanW"></span>
+        <span  class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge16 !==0">{{printZyFpInfo.charge16}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan"></span>
+        <span class="spanW" v-if="printZyFpInfo.charge24 !==0">{{printZyFpInfo.charge24}}</span>
+        <span v-else class="spanW"></span>
+        <span class="comSpan"  ></span>
+        <span class="spanW"  ></span>
+        <span class="comSpan"></span>
+        <span class="spanW"  ></span>
+      </div>
+      <div style="margin-left: 100px">
+        个人支付合计:{{printZyFpInfo.grZfHjJe}}<br/>
+        {{printZyFpInfo.grZfHjJeChinese}}
+      </div>
+      </div>
+      </div>
+    <template #footer>
+      <div class="dialog-footer">
+        <el-button @click="zyFpPrintVisible = false">取消</el-button>
+      </div>
+    </template>
+  </el-dialog>
+</template>
+
+<script setup >
+import PatientBaseList from "@/components/zfsf/PatientInfoHead.vue"
+import PosTransaction from "@/components/zfsf/PosTransaction.vue"
+import {ref} from "vue";
+import {queryCurrentNo} from '@/api/zfsf/sfbillno.js'
+import {queryCashierProcessInfo,
+  queryPatientZyLedgerFile,
+  checkCashierProcess,
+  queryKyCashierList,
+  queryZyReceipt,
+  queryZyDepositFileList,
+  saveCashierData,
+  queryZdChequeType,
+  cancelCashierData,
+  queryPrintZyFpData,
+  updatePrintZyFpData
+} from '@/api/zfsf/cashier-process.js'
+import {getLodop, initLodop} from '@/utils/c-lodop'
+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 router from "@/router";
+
+
+const zyFpPrintVisible = ref(false)
+const saveFlag = ref(false)
+const qxFlag =ref(false)
+const activeName = ref('one')
+const patientInfo = ref({
+  inpatientNo : "",
+  admissTimes : null,
+  ledgerSn : null,
+  name : '',
+  wardName : ''
+}
+)
+const setShowFlag = ref(false)
+const patientBaseListRef = ref(null)
+const posTransactionRef = ref(null)
+// 支付方式字典集合
+const zdChequeTypes = ref([])
+// 结算数据
+const settData = ref({
+  settleTypeName:'',
+  zfJe:0,
+  settle:0,
+  settleName:'',
+  zhje:0,
+  ssJe:0,
+  currentNoStr:'',
+})
+
+const openPos = ()=>{
+  posTransactionRef.value.openOuter()
+}
+
+const chongZhiData = ()=>{
+  clearData(true)
+  patientBaseListRef.value.clearAllData()
+}
+
+//保存出纳操作
+const saveCashData = ()=>{
+  ElMessageBox.confirm('请确认是否要保存?', '提示', {
+    type: 'warning',
+    confirmButtonText: '是',
+    cancelButtonText: '否',
+  }).then(()=>{
+    console.log('patientInfo',patientInfo.value)
+    let param = {
+      inpatientNo : patientInfo.value.inpatientNo,
+      admissTimes : patientInfo.value.admissTimes,
+      ledgerSn : patientInfo.value.ledgerSn,
+      opId : userIdCode.value,
+      depositFileList :[]
+    }
+    if(jzInfoList.value.length > 0){
+      let ob = {
+        status : '4',
+        windowNo : '2',
+        depoAmount : jzInfoList.value[jzInfoList.value.length-1].ybJzJe,
+        depoType : '2',
+        chequeNo : '',
+        psordnum : '',
+        agtordnum : '',
+        transDate : '',
+        parChannel : '',
+        traceNo : '',
+        receiptNo : '',
+      }
+      param.depositFileList.push(ob);
+    }
+    for (let i = 0; i < jkInfoList.value.length; i++) {
+        let obj = {
+          status : jkInfoList.value[i].settType === '退款' ? '2' : '4',
+          windowNo : '2',
+          depoAmount : jkInfoList.value[i].depoAmount,
+          depoType : jkInfoList.value[i].depoType,
+          chequeNo : jkInfoList.value[i].chequeNo,
+          psordnum : '',
+          agtordnum : '',
+          transDate : '',
+          parChannel : '',
+          traceNo : '',
+          receiptNo : '',
+        }
+      param.depositFileList.push(obj)
+    }
+      saveCashierData(param).then(res=> {
+         queryFpAndYjj(param)
+        selectPrintZyFp(param)
+      })
+  })
+}
+// 取消出纳
+const cancelCash = ()=>{
+  ElMessageBox.confirm('请确认是否要取消出纳?', '提示', {
+    type: 'warning',
+    confirmButtonText: '是',
+    cancelButtonText: '否',
+  }).then(()=>{
+      cancelCashierData(patientInfo.value).then(res=>{
+         chongZhiData()
+      })
+  })
+
+}
+
+
+const getYeay = (val)=>{
+ return  val.substring(0,4)
+}
+
+const getMoth = (val)=>{
+  return val.substring(5,7)
+}
+
+const getDay = (val)=>{
+  return val.substring(8,10)
+}
+
+// 刷卡 支付
+const shuaKa = (row,index)=>{
+  let obj = {
+    chequeType : row.depoType,
+    amt : row.depoAmount,
+    type : 1
+  }
+  consume(obj).then(res=>{
+    jkInfoList.value[index].psordnum = res.refNo
+    jkInfoList.value[index].agtordnum = res.wxAliPayOrderNo
+    jkInfoList.value[index].transDate = res.transDate
+    jkInfoList.value[index].parChannel = res.payChannel
+    jkInfoList.value[index].traceNo = res.traceNo
+    jkInfoList.value[index].receiptNo = res.lsOrderNo
+  })
+}
+
+
+const selectPatient =(val)=>{
+  queryCurrentNo({cashId:userIdCode.value}).then(res=>{
+    settData.value.currentNoStr = res.currentNoStr
+  })
+  // 查询账页信息
+  queryPatientZyLedgerFile(val).then(res=>{
+    zyInfoList.value = res
+    if( res.length > 0){
+     let index = getSettInfoIndex(res)
+      if(index === -1){
+        dealSettData(res[res.length-1].inpatientNo,res[res.length-1].admissTimes,res[res.length-1].ledgerSn)
+      }else {
+        dealSettData(res[index].inpatientNo,res[index].admissTimes,res[index].ledgerSn)
+      }
+    }else {
+      ElMessage.error('没有结算账页信息!')
+    }
+  })
+
+}
+// 检查是否有结算信息 未出纳的 下标
+const getSettInfoIndex = (val)=>{
+  for (let i = 0; i < val.length; i++) {
+       if(!stringIsBlank(val[i].accountDate) && stringIsBlank(val[i].cashDate)){
+          return i
+       }
+  }
+  return -1;
+}
+
+const fetchZyData = (row)=>{
+  dealSettData(row.inpatientNo,row.admissTimes,row.ledgerSn)
+}
+
+// 选择出纳病人
+const fetchCnPatient = (row)=>{
+  ElMessageBox.confirm('是否要进行出纳操作?', '提示', {
+    type: 'warning',
+    confirmButtonText: '是',
+    cancelButtonText: '否',
+  }).then(()=>{
+    patientBaseListRef.value.fetchPatientData({inpatientNo:row.inpatientNo,admissTimes:row.admissTimes,inOutStatusFlag:row.actFlag})
+  })
+}
+
+const dealSettData = (inpatientNo,admissTimes,ledgerSn)=>{
+    let param = {
+      inpatientNo : inpatientNo,
+      admissTimes : admissTimes,
+      ledgerSn : ledgerSn
+    }
+    checkCashierProcess(param).then(res =>{
+      if(res.mzByJz != null){
+        ElMessageBox.confirm(`该病人存在门诊欠款${res.mzByJz}是否继续出纳`, {
+          distinguishCancelAndClose: true,
+          cancelButtonText: '否',
+          confirmButtonText: '是',
+        }).then(() => {
+          getCashierProcessInfo(param,res.zyLedgerFile,res)
+            })
+            .catch(action=>{
+              if(action === 'cancel'){
+                clearData(true)
+              }
+            })
+      }else {
+        getCashierProcessInfo(param,res.zyLedgerFile,res)
+      }
+    })
+}
+
+const getCashierProcessInfo = (param,zyLedgerFile,checkParam)=>{
+  if(zyLedgerFile && stringIsBlank(zyLedgerFile.accountDate)){
+    setShowFlag.value = false
+    clearData(false)
+    ElMessage.error('不存在病人已结算待出纳信息!')
+  }
+  patientBaseListRef.value.showCashName('已结算')
+  if(zyLedgerFile && !stringIsBlank(zyLedgerFile.cashDate)){
+    setShowFlag.value = false
+    clearData(false)
+    patientBaseListRef.value.showCashName('已出纳')
+    ElMessage.error(`该病人已经在${zyLedgerFile.cashDate}做过出纳处理`)
+  }
+  if(checkParam.zYTotalFee != null){
+    setShowFlag.value = false
+    clearData(true)
+    ElMessage.error(`该病人账页总费用${checkParam.zYTotalFee}和明细总费用${checkParam.mxTotalFee}不一致请重新结算再做出纳处理`)
+    return
+  }
+  patientInfo.value.inpatientNo = param.inpatientNo
+  patientInfo.value.admissTimes = param.admissTimes
+  patientInfo.value.ledgerSn = param.ledgerSn
+  queryFpAndYjj(param)
+  if(!stringIsBlank(zyLedgerFile.accountDate) &&  stringIsBlank(zyLedgerFile.cashDate)){
+    queryCashierProcessInfo(param).then(res=>{
+      setSettData(res.settData)
+      setJkInfoList(res.settData)
+      setJzInfo(res.settData.ybJzJe)
+      setShowFlag.value = true
+    })
+  }
+}
+
+const userIdCode = ref('')
+onMounted(()=>{
+  initLodop()
+  try {
+    let patInfo = JSON.parse(window.atob(router.currentRoute.value.params.patientInfo))
+    userIdCode.value = patInfo.userIdCode
+  }catch (e){
+
+  }
+  queryZdChequeType().then(res=>{
+    zdChequeTypes.value = res
+  })
+})
+
+
+// 查询发票和预交金
+const queryFpAndYjj = (param)=>{
+  queryZyReceipt(param).then(res=>{
+    zyFpInfoList.value =  res
+  })
+  queryZyDepositFileList(param).then(res=>{
+    yjYjList.value = res.yjYj
+    yjHz.value.sjYj = res.sjYj
+    yjHz.value.yjZs = res.yjZs
+    yjHz.value.ztHj = res.ztHj
+    yjHz.value.yjHj = res.yjHj
+    patientInfo.value.name = res.patInfo.name
+    patientInfo.value.wardName = res.patInfo.wardName
+  })
+}
+
+
+const clearData = (zyFlag)=>{
+  if(zyFlag){
+    zyInfoList.value = []
+  }
+  jkHj.value.zj = 0
+  jkHj.value.tkZj = 0
+  jkHj.value.jnZj = 0
+  jzInfoList.value = []
+  jkInfoList.value = []
+  zyFpInfoList.value = []
+  yjYjList.value = []
+
+  settData.value.settleTypeName = ''
+  settData.value.zfJe = 0
+  settData.value.settle = 0
+  settData.value.settleName = ''
+  settData.value.zhje = 0.00
+  settData.value.ssJe = 0.00
+
+  patientInfo.value.inpatientNo = ''
+  patientInfo.value.admissTimes = null
+  patientInfo.value.ledgerSn = null
+  patientInfo.value.name = ''
+  patientInfo.value.wardName = ''
+
+  yjHz.value.sjYj = 0
+  yjHz.value.yjHj = 0
+  yjHz.value.yjZs = 0
+  yjHz.value.ztHj = 0
+
+}
+
+
+
+const  setSettData = (val)=>{
+  settData.value.settleName = val.settleName
+  settData.value.settleTypeName = val.settleTypeName
+  settData.value.zhje = 0.00
+  settData.value.ssJe = 0.00
+  settData.value.settle = Math.abs(val.settle)
+  settData.value.zfJe = val.lastBalance
+
+}
+
+const setJzInfo = (ybJzJe)=>{
+  jzInfoList.value = []
+  if(ybJzJe && ybJzJe != 0){
+    jzInfoList.value.push({
+      ybType : '医保记账',
+      ybJzJe :ybJzJe
+    })
+    jzInfoList.value.push({
+      ybType : '记账总计',
+      ybJzJe :ybJzJe
+    })
+  }
+}
+
+// 新增交款信息
+const addJkInfo = ()=>{
+  let obj = {
+    settType : '',
+    depoType : 'A',
+    depoAmount : 0,
+    chequeNo : '',
+    psordnum : '',
+    agtordnum : '',
+    transDate : '',
+    parChannel : '',
+    traceNo : '',
+    receiptNo : '',
+  }
+
+  let tkZj= jkInfoList.value.filter(item=>item.settType === '退款').reduce((pre,cur)=>{
+    return pre + cur.depoAmount ;
+  },0)
+
+  let jnZj= jkInfoList.value.filter(item=>item.settType === '交纳').reduce((pre,cur)=>{
+    return pre + cur.depoAmount ;
+  },0)
+
+  if(settData.value.settleName === '补交:'){
+    if((jnZj - tkZj) <= Math.abs(settData.value.settle)){
+      obj.settType ='交纳'
+      obj.depoAmount = Math.abs(jnZj - tkZj -Math.abs(settData.value.settle))
+    }else {
+      obj.settType ='退款'
+      obj.depoAmount = Math.abs(jnZj - tkZj -Math.abs(settData.value.settle))
+    }
+  }else {
+     if((tkZj - jnZj) >= Math.abs(settData.value.settle)){
+       obj.settType ='交纳'
+       obj.depoAmount = Math.abs(tkZj - jnZj -Math.abs(settData.value.settle))
+     }else {
+       obj.settType ='退款'
+       obj.depoAmount = Math.abs(tkZj - jnZj -Math.abs(settData.value.settle))
+     }
+  }
+
+  jkInfoList.value.push(obj)
+  calcJkJe()
+}
+const delJkInfo = (index)=>{
+  if(jkInfoList.value.length === 1){
+    ElMessage.error("交款信息不能为空")
+    return
+  }
+  jkInfoList.value.splice(index, 1)
+  calcJkJe()
+}
+
+const jkHj = ref({
+  jnZj : 0,
+  tkZj : 0,
+  zj : 0
+})
+
+const calcJkJe = ()=>{
+  let tkZj= jkInfoList.value.filter(item=>item.settType === '退款').reduce((pre,cur)=>{
+    return pre + cur.depoAmount ;
+  },0)
+
+  let jnZj= jkInfoList.value.filter(item=>item.settType === '交纳').reduce((pre,cur)=>{
+    return pre + cur.depoAmount ;
+  },0)
+  jkHj.value.jnZj = parseFloat(Number(jnZj).toFixed(2))
+  jkHj.value.tkZj = parseFloat(Number(tkZj).toFixed(2))
+  jkHj.value.zj =  parseFloat(Number(Math.abs(jkHj.value.jnZj - jkHj.value.tkZj)).toFixed(2))
+
+}
+
+
+
+const setJkInfoList = (val)=>{
+  jkInfoList.value = []
+    let obj = {
+      settType : '',
+      depoType : 'A',
+      depoAmount : 0,
+      chequeNo : '',
+      psordnum : '',
+      agtordnum : '',
+      transDate : '',
+      parChannel : '',
+      traceNo : '',
+      receiptNo : '',
+    }
+  obj.settType = val.settle > 0 ? '退款' : '交纳'
+  obj.depoAmount = Math.abs(val.settle)
+  jkInfoList.value.push(obj)
+  calcJkJe()
+}
+
+// 记账信息数据
+const jzInfoList = ref([])
+// 交款信息
+const jkInfoList = ref([])
+// 账页信息
+const zyInfoList = ref([])
+// 账页发票信息
+const zyFpInfoList = ref([])
+// 已交押金
+const yjYjList = ref([])
+// 预交汇总
+const yjHz = ref({
+  yjZs : 0,
+  sjYj : 0,
+  yjHj : 0,
+  ztHj : 0,
+})
+// 可出纳数据
+const kcnList = ref([])
+
+const tabClick = ()=>{
+  if(activeName.value ==='two'){
+    let startDate = getDateTiffDays(1).substring(0,10) + ' 00:00:00'
+    let endDate = getDateTiffDays(1).substring(0,10) + ' 23:59:59'
+    queryKyCashierList({startDate:startDate,endDate:endDate}).then(res=>{
+      kcnList.value = res
+    })
+  }
+}
+
+
+//打印发票
+// const printFp = (row)=>{
+//
+//  let LODOP = getLodop();
+//   LODOP.PRINT_INIT('预交金')
+//   LODOP.SET_PRINT_PAGESIZE(2, 0, 0, '')
+//   LODOP.SET_PRINT_STYLE('FontSize', 9)
+//   LODOP.ADD_PRINT_TEXT('8mm', '50mm', '220mm', '7mm', patientInfo.value.wardName)
+//   LODOP.ADD_PRINT_TEXT('14mm', '50mm', '220mm', '7mm', patientInfo.value.name)
+//   LODOP.ADD_PRINT_TEXT('20mm', '50mm', '220mm', '7mm', '紧急联系人:13908453983')
+//   LODOP.ADD_PRINT_TEXT('30mm', '50mm', '220mm', '7mm', getYeay(row.depoDate)+'.'+getMoth(row.depoDate)+'.'+getDay(row.depoDate))
+//   LODOP.ADD_PRINT_TEXT('40mm', '50mm', '220mm', '7mm', row.opIdCodeName)
+//   LODOP.PREVIEW()
+//
+// }
+
+const zyFpCss = `
+#zyFpId{ width: 640px;}
+
+#headDiv  p {
+  line-height: 10px;
+}
+.comSpan{
+  display: inline-block;
+  width: 60px;
+}
+
+.spanW{
+  display: inline-block;
+  width: 60px;
+}
+
+.comH {
+  height: 24px;
+}
+
+.comM{
+  margin-left: 90px;
+}`
+
+const printZyFp = ()=>{
+  let param = {
+    inpatientNo :printZyFpInfo.value.inpatientNo,
+    admissTimes :printZyFpInfo.value.admissTimes,
+    ledgerSn :printZyFpInfo.value.ledgerSn,
+    printFlag :printFlag.value ? '1' : '0',
+    receiptNo : settData.value.currentNoStr,
+    opId : userIdCode.value
+  }
+  updatePrintZyFpData(param).then(res=>{
+    let LODOP = getLodop()
+    LODOP.PRINT_INIT('住院发票') // 初始化打印机 名字
+    LODOP.SET_PRINT_PAGESIZE(1, '256mm', '156mm', '') // 设置纸张大小
+    LODOP.SET_PRINT_MODE('FULL_WIDTH_FOR_OVERFLOW', true) // 整宽不变形
+    LODOP.ADD_PRINT_HTM('1mm', '3mm', '100%', '100%', '<style>' + zyFpCss + '</style>' + '<body>' + document.getElementById('zyFpId').innerHTML + '</body>') //要打印的内容
+    LODOP.PREVIEW() // 关闭
+  })
+}
+
+const printZyFpInfo = ref({})
+const selectPrintZyFp = (row)=>{
+  queryPrintZyFpData(row).then(res=>{
+    zyFpPrintVisible.value = true
+    printZyFpInfo.value = res
+  })
+}
+
+
+const printFlag = ref(true)
+
+
+
+
+
+const getZySettType= (row)=>{
+  console.log('row',row)
+  if(stringIsBlank(row.accountDate)){
+    return '未结算'
+  }else {
+     if(stringIsBlank(row.cashDate)){
+       return '未出纳'
+     }else {
+       return '已出纳'
+     }
+  }
+}
+
+
+</script>
+<style scoped >
+.border_solid{
+  border: 1px #808080  solid
+}
+
+.f-size{
+  font-size: 18px;
+}
+
+.comSpan{
+  display: inline-block;
+  width: 60px;
+}
+
+.spanW{
+  display: inline-block;
+  width: 60px;
+}
+
+.comH {
+  height: 24px;
+}
+
+.comM{
+  margin-left: 90px;
+}
+#zyFpId p {
+  line-height: 10px;
+}
+
+</style>

+ 39 - 0
src/views/hospitalization/zfsf/MzsfBillnoRec.vue

@@ -0,0 +1,39 @@
+<template>
+  <div class="layout_display_flex_y" style="text-align: center">
+    <el-row :gutter="4">
+    <el-col :span="4">起始号: <el-input  v-model="paramData.startNo"
+                                       clearable   style="width: 120px"></el-input></el-col>
+    <el-col :span="4" >结束号: <el-input  v-model="paramData.endNo"
+                                          clearable        style="width: 120px"></el-input></el-col>
+    </el-row>
+    <el-row :gutter="4"  style="margin-top: 20px">
+      <el-button style="margin-left: 250px"  type="success" icon="Check" @click="saveData" >保存</el-button>
+    </el-row>
+  </div>
+</template>
+
+<script setup >
+import {saveSfBillNo} from '@/api/zfsf/sfbillno.js'
+import {ElMessageBox} from "element-plus";
+
+const paramData = ref({
+  startNo : null,
+  endNo : null
+})
+
+const saveData = ()=>{
+  ElMessageBox.confirm('请确认起始号数据是否正确,是否进行保存', {
+    cancelButtonText: '取消',
+    confirmButtonText: '确定',
+  })
+      .then(() => {
+        saveSfBillNo(paramData.value).then((res)=>{
+        })
+      })
+
+}
+
+</script>
+<style scoped>
+
+</style>

+ 593 - 0
src/views/hospitalization/zfsf/RecourseRepresentation.vue

@@ -0,0 +1,593 @@
+<template>
+  <div class="layout_container">
+    <header>
+      <PatientBaseList ref="patientBaseListRef" @selectPatientInfo="selectPatient"></PatientBaseList>
+    </header>
+    <div class="layout_main">
+      <div style="height: 20px">
+        <el-button  icon="Check" type="success" @click="feeCX">费用冲销</el-button>
+      </div>
+      <el-tabs v-model="activeName" @tab-change="tabClick">
+        <el-tab-pane label="账页信息" name="one">
+            <div style="height: 30px">
+               <span style="color: #0a2fe7;font-weight: bolder">总账信息</span>
+                <span style="display: inline-block;width: 100px"></span>
+              <span style="color: #0a2fe7;font-weight: bolder">账页信息:</span>
+              <el-select v-model="queryParam.ledgerSn" style="width: 100px" @change="selectLedgerSn">
+                <el-option v-for="item in ledgerSnList" :key="item.code" :value="item.code" :label="item.name"> </el-option>
+              </el-select>
+            </div>
+            <div>
+              <div class="border_solid" style="float: left;width: 48%;height:600px;overflow-y: auto">
+                <el-row>
+                  <el-col :span="3"></el-col>
+                  <el-col :span="7">
+                    <span class="f-size">住院号:{{zyActPatient.inpatientNo}}</span>
+                  </el-col>
+                  <el-col :span="7">
+                    <span class="f-size">次数: {{zyActPatient.admissTimes}}</span>
+                  </el-col>
+                  <el-col :span="7">
+                    <span class="f-size">姓名: {{zyActPatient.name}}</span>
+                  </el-col>
+                </el-row>
+                <div >
+                  <el-descriptions size="large" :column="2" border style="width:100%;" >
+                    <el-descriptions-item label="西药费">
+                      <span class="f-size">{{zyActPatient.charge1}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="接生">
+                      <span class="f-size">{{zyActPatient.charge16}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="中草药费">
+                      <span class="f-size">{{zyActPatient.charge2}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="护婴">
+                      <span class="f-size">{{zyActPatient.charge17}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="床位费">
+                      <span class="f-size">{{zyActPatient.charge3}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="CT">
+                      <span class="f-size">{{zyActPatient.charge18}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="B超">
+                      <span class="f-size">{{zyActPatient.charge4}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="护理">
+                      <span class="f-size">{{zyActPatient.charge19}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="手术器械使用费">
+                      <span class="f-size">{{zyActPatient.charge5}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="陪护">
+                      <span class="f-size">{{zyActPatient.charge20}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="心电监护">
+                      <span class="f-size">{{zyActPatient.charge6}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="理疗费">
+                      <span class="f-size">{{zyActPatient.charge21}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="体外反博">
+                      <span class="f-size">{{zyActPatient.charge7}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="抢救">
+                      <span class="f-size">{{zyActPatient.charge22}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="电脑电图">
+                      <span class="f-size">{{zyActPatient.charge8}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="卫生处理">
+                      <span class="f-size">{{zyActPatient.charge23}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="心脑电图">
+                      <span class="f-size">{{zyActPatient.charge9}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="消毒">
+                      <span class="f-size">{{zyActPatient.charge24}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="麻醉费">
+                      <span class="f-size">{{zyActPatient.charge10}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="治疗费">
+                      <span class="f-size">{{zyActPatient.charge25}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="透视照片">
+                      <span class="f-size">{{zyActPatient.charge11}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="其他">
+                      <span class="f-size">{{zyActPatient.charge26}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="手术费">
+                      <span class="f-size">{{zyActPatient.charge12}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="材料费">
+                      <span class="f-size">{{zyActPatient.charge27}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="化验">
+                      <span class="f-size">{{zyActPatient.charge13}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="中成药费">
+                      <span class="f-size">{{zyActPatient.charge28}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="输血">
+                      <span class="f-size">{{zyActPatient.charge14}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item >
+                    </el-descriptions-item>
+                    <el-descriptions-item label="输氧">
+                      <span class="f-size">{{zyActPatient.charge15}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item >
+                    </el-descriptions-item>
+                    <el-descriptions-item label="当前账页">
+                      <span class="f-size">{{zyActPatient.timesBilled}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="合计">
+                      <span class="f-size">{{zyActPatient.totalCharge}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="账页数">
+                      <span class="f-size">{{zyActPatient.timesBilled}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="余额">
+                      <span class="f-size">{{zyActPatient.balance}}  </span>
+                    </el-descriptions-item>
+                  </el-descriptions>
+                </div>
+              </div>
+              <div class="border_solid" style="float: right;width: 48%">
+                <el-row>
+                  <el-col :span="3"></el-col>
+                  <el-col :span="4">
+                    <span class="f-size">{{zyLedFile.ledgerSn}}次结算 </span>
+                  </el-col>
+                  <el-col :span="8">
+                    <span class="f-size">结算日期: {{zyLedFile.accountDate}}</span>
+                  </el-col>
+                </el-row>
+                <el-row>
+                  <el-col :span="3"></el-col>
+                  <el-col :span="7">
+                    <span class="f-size">科室:{{zyLedFile.deptName}}</span>
+                  </el-col>
+                  <el-col :span="7">
+                    <span class="f-size">病房: {{zyLedFile.wardName}}</span>
+                  </el-col>
+                  <el-col :span="7">
+                    <span class="f-size">操作员: {{zyLedFile.opIdName}}</span>
+                  </el-col>
+                </el-row>
+                <div style="height: 550px;overflow-y: auto">
+                  <el-descriptions size="large" :column="2" border style="width:100%;" >
+                    <el-descriptions-item label="西药费">
+                      <span class="f-size">{{zyLedFile.charge1}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="接生">
+                      <span class="f-size">{{zyLedFile.charge16}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="中草药费">
+                      <span class="f-size">{{zyLedFile.charge2}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="护婴">
+                      <span class="f-size">{{zyLedFile.charge17}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="床位费">
+                      <span class="f-size">{{zyLedFile.charge3}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="CT">
+                      <span class="f-size">{{zyLedFile.charge18}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="B超">
+                      <span class="f-size">{{zyLedFile.charge4}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="护理">
+                      <span class="f-size">{{zyLedFile.charge19}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="手术器械使用费">
+                      <span class="f-size">{{zyLedFile.charge5}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="陪护">
+                      <span class="f-size">{{zyLedFile.charge20}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="心电监护">
+                      <span class="f-size">{{zyLedFile.charge6}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="理疗费">
+                      <span class="f-size">{{zyLedFile.charge21}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="体外反博">
+                      <span class="f-size">{{zyLedFile.charge7}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="抢救">
+                      <span class="f-size">{{zyLedFile.charge22}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="电脑电图">
+                      <span class="f-size">{{zyLedFile.charge8}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="卫生处理">
+                      <span class="f-size">{{zyLedFile.charge23}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="心脑电图">
+                      <span class="f-size">{{zyLedFile.charge9}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="消毒">
+                      <span class="f-size">{{zyLedFile.charge24}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="麻醉费">
+                      <span class="f-size">{{zyLedFile.charge10}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="治疗费">
+                      <span class="f-size">{{zyLedFile.charge25}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="透视照片">
+                      <span class="f-size">{{zyLedFile.charge11}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="其他">
+                      <span class="f-size">{{zyLedFile.charge26}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="手术费">
+                      <span class="f-size">{{zyLedFile.charge12}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="材料费">
+                      <span class="f-size">{{zyLedFile.charge27}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="化验">
+                      <span class="f-size">{{zyLedFile.charge13}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="中成药费">
+                      <span class="f-size">{{zyLedFile.charge28}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="输血">
+                      <span class="f-size">{{zyLedFile.charge14}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item >
+                    </el-descriptions-item>
+                    <el-descriptions-item label="输氧">
+                      <span class="f-size">{{zyLedFile.charge15}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item >
+                    </el-descriptions-item>
+                    <el-descriptions-item label="暂存款">
+                      <span class="f-size">{{zyLedFile.deposit}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="合计">
+                      <span class="f-size">{{zyLedFile.totalCharge}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="补交">
+                      <span class="f-size">{{zyLedFile.settle}}  </span>
+                    </el-descriptions-item>
+                    <el-descriptions-item label="余额">
+                      <span class="f-size">{{zyLedFile.balance}}  </span>
+                    </el-descriptions-item>
+                  </el-descriptions>
+                </div>
+
+              </div>
+            </div>
+        </el-tab-pane>
+        <el-tab-pane label="发票信息" name="two">
+          <el-container>
+            <el-aside width="350px">
+              <el-table :data="zyFpInfoList" style="width: 100%"  highlight-current-row @row-click="fetchZyFp"   height="300">
+                <el-table-column  property="ledgerSn" label="账页" />
+                <el-table-column  property="receiptNo" label="发票号" />
+                <el-table-column  property="responceUnitName" label="类型" />
+                <el-table-column  property="totalCharge" label="发票金额" />
+              </el-table>
+            </el-aside>
+            <el-main>
+              <el-row>
+                <el-col :span="3"></el-col>
+                <el-col :span="4">
+                  <span class="f-size">账页:{{zyReceipt.ledgerSn}} </span>
+                </el-col>
+                <el-col :span="8">
+                  <span class="f-size">收据号: {{zyReceipt.receiptNo}}</span>
+                </el-col>
+                <el-col :span="8">
+                  <span class="f-size">结算日期: {{zyReceipt.accountDate}}</span>
+                </el-col>
+              </el-row>
+              <el-row>
+                <el-col :span="3"></el-col>
+                <el-col :span="7">
+                  <span class="f-size">操作员:{{zyReceipt.opIdCode}}</span>
+                </el-col>
+                <el-col :span="7">
+                  <span class="f-size">总金额: {{zyReceipt.totalCharge}}</span>
+                </el-col>
+              </el-row>
+              <div style="height: 550px;overflow-y: auto">
+                <el-descriptions size="large" :column="2" border style="width:100%;" >
+                  <el-descriptions-item label="西药费">
+                    <span class="f-size">{{zyReceipt.charge1}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="接生">
+                    <span class="f-size">{{zyReceipt.charge16}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="中草药费">
+                    <span class="f-size">{{zyReceipt.charge2}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="护婴">
+                    <span class="f-size">{{zyReceipt.charge17}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="床位费">
+                    <span class="f-size">{{zyReceipt.charge3}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="CT">
+                    <span class="f-size">{{zyReceipt.charge18}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="B超">
+                    <span class="f-size">{{zyReceipt.charge4}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="护理">
+                    <span class="f-size">{{zyReceipt.charge19}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="手术器械使用费">
+                    <span class="f-size">{{zyReceipt.charge5}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="陪护">
+                    <span class="f-size">{{zyReceipt.charge20}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="心电监护">
+                    <span class="f-size">{{zyReceipt.charge6}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="理疗费">
+                    <span class="f-size">{{zyReceipt.charge21}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="体外反博">
+                    <span class="f-size">{{zyReceipt.charge7}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="抢救">
+                    <span class="f-size">{{zyReceipt.charge22}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="电脑电图">
+                    <span class="f-size">{{zyReceipt.charge8}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="卫生处理">
+                    <span class="f-size">{{zyReceipt.charge23}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="心脑电图">
+                    <span class="f-size">{{zyReceipt.charge9}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="消毒">
+                    <span class="f-size">{{zyReceipt.charge24}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="麻醉费">
+                    <span class="f-size">{{zyReceipt.charge10}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="治疗费">
+                    <span class="f-size">{{zyReceipt.charge25}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="透视照片">
+                    <span class="f-size">{{zyReceipt.charge11}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="其他">
+                    <span class="f-size">{{zyReceipt.charge26}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="手术费">
+                    <span class="f-size">{{zyReceipt.charge12}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="材料费">
+                    <span class="f-size">{{zyReceipt.charge27}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="化验">
+                    <span class="f-size">{{zyReceipt.charge13}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="中成药费">
+                    <span class="f-size">{{zyReceipt.charge28}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item label="输血">
+                    <span class="f-size">{{zyReceipt.charge14}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item >
+                  </el-descriptions-item>
+                  <el-descriptions-item label="输氧">
+                    <span class="f-size">{{zyReceipt.charge15}}  </span>
+                  </el-descriptions-item>
+                  <el-descriptions-item >
+                  </el-descriptions-item>
+                </el-descriptions>
+              </div>
+            </el-main>
+          </el-container>
+        </el-tab-pane>
+        <el-tab-pane label="预交金" name="three">
+          <el-table :data="yjYjList" style="width: 100%;" :height="400">
+            <el-table-column  property="ledgerSn" label="账页" />
+            <el-table-column  property="depoDate" label="日期" />
+            <el-table-column  property="statusName" label="事务" />
+            <el-table-column   label="金额" >
+              <template #default="scope">
+               <span v-if="scope.row.depoAmount < 0" style="color: red">{{scope.row.depoAmount}}</span>
+               <span v-else >{{scope.row.depoAmount}}</span>
+              </template>
+            </el-table-column>
+            <el-table-column  property="receiptNo" label="收据" />
+            <el-table-column  property="depoTypeName" label="类型" />
+            <el-table-column  property="chequeNo" label="支票号" />
+            <el-table-column  property="opIdCodeName" label="操作员" />
+          </el-table>
+          <div style="width: 250px;margin-left: 350px">
+            <el-descriptions size="large" :column="1" border style="width:100%;" >
+              <el-descriptions-item label="预交合计">
+                <span class="f-size">{{yjjInfo.yjHj}}</span>
+              </el-descriptions-item>
+              <el-descriptions-item label="直退押金合计">
+                <span class="f-size" style="color: red">{{yjjInfo.ztHj}}</span>
+              </el-descriptions-item>
+            </el-descriptions>
+          </div>
+        </el-tab-pane>
+      </el-tabs>
+    </div>
+  </div>
+</template>
+<script setup >
+import PatientBaseList from "@/components/zfsf/PatientInfoHead.vue"
+import {ref} from "vue";
+import {
+  queryPatientZyLedgerFile,
+  queryZyReceipt,
+  queryZyDepositFileList,
+  queryMaxAndMinLedgerSn,
+  cashierDataTx,
+  queryZyActpatientFeeDetail
+} from '@/api/zfsf/cashier-process.js'
+
+import { ElMessage, ElMessageBox } from 'element-plus'
+import router from "@/router";
+
+const activeName = ref('one')
+const ledgerSnList = ref([])
+const  queryParam = ref({
+  inpatientNo:'',
+  admissTimes:null,
+  ledgerSn:null,
+})
+const patientBaseListRef = ref(null)
+
+const feeCX = ()=>{
+  ElMessageBox.confirm('请确认是否要费用冲消?', '提示', {
+    type: 'warning',
+    confirmButtonText: '是',
+    cancelButtonText: '否',
+  }).then(()=>{
+    cashierDataTx(queryParam.value).then(res=>{
+      clearData()
+      patientBaseListRef.value.clearAllData()
+    })
+  })
+}
+
+const clearData = ()=>{
+  queryParam.value = {
+    inpatientNo:'',
+    admissTimes:null,
+    ledgerSn:null,
+  }
+  zyActPatient.value = {}
+  zyLedFile.value = {}
+  zyFpInfoList.value = []
+  zyReceipt.value = {}
+  yjYjList.value = []
+  yjjInfo.value = {
+    yjHj: 0,
+    ztHj: 0,
+  }
+}
+
+const selectPatient = (val)=>{
+  queryParam.value.inpatientNo = val.inpatientNo
+  queryParam.value.admissTimes = val.admissTimes
+
+
+  queryMaxAndMinLedgerSn(queryParam.value).then(res=>{
+    ledgerSnList.value = []
+    if(res.maxLedgerSn != null){
+      for (let i = res.minLedgerSn; i <= res.maxLedgerSn ; i++) {
+        ledgerSnList.value.push({code:i,name:'账页: '+i})
+      }
+
+      queryParam.value.ledgerSn = res.maxLedgerSn
+      queryOneTabData()
+
+    }
+  })
+}
+
+const zyActPatient = ref({})
+const zyLedFile = ref({})
+const zyFpInfoList = ref([])
+const zyReceipt = ref({})
+const yjYjList = ref([])
+const yjjInfo = ref({
+  yjHj: 0,
+  ztHj: 0,
+})
+
+
+const fetchZyFp = (row)=>{
+  queryZyReceipt({
+    inpatientNo:queryParam.value.inpatientNo,
+    admissTimes:queryParam.value.admissTimes,
+    ledgerSn : row.ledgerSn
+  }).then(res=>{
+    zyReceipt.value =  res[0]
+  })
+}
+
+const queryOneTabData = ()=>{
+  queryZyActpatientFeeDetail(queryParam.value).then(res=>{
+    zyActPatient.value = res
+  })
+  queryPatientZyLedgerFile(queryParam.value).then(res=>{
+    zyLedFile.value = {}
+    if(res.length > 0){
+      zyLedFile.value = res[0]
+      if(zyLedFile.value.cashDate !=null ){
+        patientBaseListRef.value.showCashName('已出纳')
+      }else if(zyLedFile.value.accountDate !=null){
+        patientBaseListRef.value.showCashName('已结算')
+      }
+    }
+  })
+}
+
+
+const selectLedgerSn = ()=>{
+  queryOneTabData()
+}
+
+const tabClick = ()=>{
+    if(activeName.value === 'one'){
+      queryOneTabData()
+    }
+    else if(activeName.value === 'two'){
+      queryZyReceipt({
+        inpatientNo:queryParam.value.inpatientNo,
+        admissTimes:queryParam.value.admissTimes
+      }).then(res=>{
+        zyFpInfoList.value =  []
+        for (let i = 0; i < res.length-1; i++) {
+          zyFpInfoList.value.push(res[i])
+        }
+        fetchZyFp({ledgerSn : zyFpInfoList.value[0].ledgerSn})
+      })
+    }else {
+      queryZyDepositFileList({
+        inpatientNo:queryParam.value.inpatientNo,
+        admissTimes:queryParam.value.admissTimes,
+        inOutFlag : 1
+      }).then(res=>{
+        yjYjList.value = res.yjYj
+        yjjInfo.value.yjHj = res.yjHj
+        yjjInfo.value.ztHj = res.ztHj
+      })
+    }
+}
+
+const userIdCode = ref('')
+onMounted(()=>{
+  try {
+    let patInfo = JSON.parse(window.atob(router.currentRoute.value.params.patientInfo))
+    userIdCode.value = patInfo.userIdCode
+  }catch (e){
+
+  }
+
+
+
+})
+
+</script>
+<style scoped >
+.f-size{
+  font-size: 18px;
+}
+
+.border_solid{
+  border: 1px #808080  solid
+}
+</style>

+ 2 - 2
src/views/technology-archives/TechnologyArchivesCore.vue

@@ -454,7 +454,7 @@ const onAddItem = () => {
       name: '',
       opName: '',
       opCode: '',
-      delFlag: '',
+      delFlag: '0',
       comment: '',
       isEdit: true,
       isAdd: true,
@@ -478,7 +478,7 @@ const onAddItem = () => {
       time: '',
       name: '',
       content: '',
-      delFlag: '',
+      delFlag: '0',
       comment: '',
       nameStr: '',
       contentStr: '',

+ 11 - 1
src/views/yp-dict/YpZdDict.vue

@@ -756,7 +756,7 @@
                 </el-col>
                 <el-col :span="6">
                   <el-form-item label="国家医保编码" prop="nationalCode">
-                    <el-input v-if="!isEdit" v-model="ypForm.nationalCode" placeholder="请填写国家医保编码"
+                    <el-input v-if="isEdit" v-model="ypForm.nationalCode" placeholder="请填写国家医保编码"
                               disabled />
                     <el-input v-else v-model="ypForm.nationalCode" placeholder="请填写国家医保编码" />
                   </el-form-item>
@@ -1050,6 +1050,16 @@ const ybxjPriceFormat = () => {
 const submitForm = async (formEl) => {
     if (!formEl) return
 
+    if((ypForm.value.ybFlagNew === 'a' || ypForm.value.ybFlagNew === 'b') && ypForm.value.selfFlagYb === '1'){
+      ElMessage({
+        type: "error",
+        message: '医保甲类/乙类药品不能勾选医保自费,请检查!',
+        duration: 2500,
+        showClose: true,
+      });
+      return
+    }
+
     await formEl.validate((valid, fields) => {
         if (valid) {
             ElMessageBox.confirm('请确认是否保存药品账页字典信息?', {