Ver código fonte

出纳和申述重算

lihong 1 ano atrás
pai
commit
1e712d9f8e

+ 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>

+ 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>