AdvancePaymentDeal.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  1. <template>
  2. <div class="layout_container">
  3. <header>
  4. <el-button type="success" icon="Plus" @click="openShouFee" >收费</el-button>
  5. <el-button type="primary" icon="Delete" @click="clearData" >清空</el-button>
  6. <el-button type="success" icon="Plus" @click="openSjh" >设置收据号</el-button>
  7. <el-button type="danger" icon="Money" @click="openPos" >智能POS工具包</el-button>
  8. </header>
  9. <div class="layout_main">
  10. <div class="demo-collapse">
  11. <el-form ref="ruleFormRef" label-width="127px" :model="formData" class="demo-ruleForm"
  12. :size="formSize">
  13. <el-collapse v-model="activeName">
  14. <el-collapse-item title="基本信息" name="1" disabled>
  15. <el-row>
  16. <el-col :span="6">
  17. <el-form-item label="住院号" prop="inpatientNo">
  18. <el-input v-model="formData.inpatientNo" clearable @keyup.enter="queryPatientList(formData.inpatientNo)">
  19. <template #append>
  20. <el-button icon="Search" @click="queryPatientList(formData.inpatientNo)"/>
  21. </template>
  22. </el-input>
  23. </el-form-item>
  24. </el-col>
  25. <el-col :span="6">
  26. <el-form-item label="门诊号" prop="patientId">
  27. <el-input v-model="formData.patientId" clearable @keyup.enter="queryPatientList(formData.patientId)">
  28. <template #append>
  29. <el-button icon="Search" @click="queryPatientList(formData.patientId)"/>
  30. </template>
  31. </el-input>
  32. </el-form-item>
  33. </el-col>
  34. <el-col :span="6">
  35. <el-form-item label="姓名" prop="name">
  36. <el-input v-model="formData.name" disabled />
  37. </el-form-item>
  38. </el-col>
  39. <el-col :span="6">
  40. <el-form-item label="性别" prop="sexName">
  41. <el-input v-model="formData.sexName" disabled />
  42. </el-form-item>
  43. </el-col>
  44. </el-row>
  45. <el-row>
  46. <el-col :span="6">
  47. <el-form-item label="床号" prop="bedNo">
  48. <el-input v-model="formData.bedNo" disabled />
  49. </el-form-item>
  50. </el-col>
  51. <el-col :span="6">
  52. <el-form-item label="病房" prop="wardName">
  53. <el-input v-model="formData.wardName" disabled />
  54. </el-form-item>
  55. </el-col>
  56. <el-col :span="6">
  57. <el-form-item label="入院日期" prop="admissDate">
  58. <el-input v-model="formData.admissDate" disabled />
  59. </el-form-item>
  60. </el-col>
  61. <el-col :span="6">
  62. <el-form-item label="身份" prop="responceTypeName">
  63. <el-input v-model="formData.responceTypeName" disabled />
  64. </el-form-item>
  65. </el-col>
  66. </el-row>
  67. <el-row>
  68. <el-col :span="6">
  69. <el-form-item label="总费用" prop="totalAmount">
  70. <el-input v-model="formData.totalCharge" disabled />
  71. </el-form-item>
  72. </el-col>
  73. <el-col :span="6">
  74. <el-form-item label="余额" prop="wardName">
  75. <el-input v-model="formData.balance" disabled />
  76. </el-form-item>
  77. </el-col>
  78. <el-col :span="12">
  79. <el-form-item label="" prop="inpatientNoType">
  80. <el-radio-group v-model="formData.inOutFlag" >
  81. <el-radio-button label="在院病人" value="0" />
  82. <el-radio-button label="出院病人" value="1" />
  83. </el-radio-group>
  84. </el-form-item>
  85. </el-col>
  86. </el-row>
  87. </el-collapse-item>
  88. </el-collapse>
  89. </el-form>
  90. </div>
  91. <div class="layout_el-table">
  92. <el-table :data="tableData" stripe style="width: 100%">
  93. <el-table-column align="center" property="admissTimes" label="住院次数" />
  94. <el-table-column align="center" property="ledgerSn" label="账页号" />
  95. <el-table-column align="center" width="150" property="depoDate" label="时间" />
  96. <el-table-column align="center" property="statusName" label="事务" />
  97. <el-table-column align="center" property="depoAmount" label="金额" />
  98. <el-table-column align="center" property="receiptNo" label="收据号" />
  99. <el-table-column align="center" property="depoTypeName" label="收费方式" >
  100. </el-table-column>
  101. <el-table-column align="center" property="chequeNo" label="凭证号" />
  102. <el-table-column align="center" property="opIdName" label="操作员" />
  103. <el-table-column label="操作" width="200">
  104. <template #default="scope" >
  105. <el-button v-if="formData.inOutFlag ===0 && scope.row.settleType === '0' && scope.row.status === '1' && scope.row.reportFlag !== '1'" size="small" type="danger" icon="Back" @click="openRefund(scope.row)" >退费</el-button>
  106. <el-button v-if="formData.inOutFlag ===0 && scope.row.printed !==1 && scope.row.status ==='1' && scope.row.reportFlag !=='1' " size="small" type="primary" icon="Printer" @click="printShouJu(scope.row.inpatientNo,scope.row.receiptNo,false)">打印收据</el-button>
  107. <el-button v-if="formData.inOutFlag ===0 && scope.row.status ==='1' && scope.row.printed === 1 && scope.row.reportFlag !=='1' " size="small" type="primary" icon="Printer" @click="printShouJu(scope.row.inpatientNo,scope.row.receiptNo,true)" >重打收据</el-button>
  108. </template>
  109. </el-table-column>
  110. </el-table>
  111. <div style="width: 100%;height: 50px;margin-top: 10px;margin-left: 20px;font-size: 18px">
  112. <el-row>
  113. <el-col :span="12">预交金合计: {{formData.yjjHj}}</el-col>
  114. <el-col :span="12">直退押金合计: {{formData.ztYjjHj}}</el-col>
  115. </el-row>
  116. </div>
  117. </div>
  118. </div>
  119. </div>
  120. <el-dialog v-model="patientVisible" title="病人信息" width="500" draggable>
  121. <el-table :data="patientTableData" style="width: 100%" height="300" stripe border @row-click="fetchPatient" >
  122. <el-table-column align="center" prop="name" label="姓名" />
  123. <el-table-column align="center" prop="inpatientNo" label="住院号" />
  124. <el-table-column align="center" prop="admissTimes" label="住院次数" />
  125. <el-table-column align="center" prop="sexName" label="性别" />
  126. </el-table>
  127. <template #footer>
  128. <div class="dialog-footer">
  129. <el-button @click="patientVisible = false">关闭</el-button>
  130. </div>
  131. </template>
  132. </el-dialog>
  133. <el-dialog v-model="shouFeeVisible" title="缴费" width="400" @closed="clearShouFeeForm" draggable>
  134. <el-form class="demo-ruleForm" label-width="127px"
  135. :size="formSize" >
  136. <el-row>
  137. <el-col :span="24">
  138. <el-form-item label="收费方式*">
  139. <el-select v-model="shouFeeForm.depoType">
  140. <el-option v-for="item in zdChequeTypes" :key="item.code" :label="item.name" :value="item.code"></el-option>
  141. </el-select>
  142. </el-form-item>
  143. </el-col>
  144. </el-row>
  145. <el-row>
  146. <el-col :span="24">
  147. <el-form-item label="金额">
  148. <el-input-number v-model="shouFeeForm.depoAmount" :controls="false" :precision="2" :min="0"/>
  149. </el-form-item>
  150. </el-col>
  151. </el-row>
  152. <el-row>
  153. <el-col :span="24">
  154. <el-form-item label="凭证号">
  155. <el-input v-model="shouFeeForm.chequeNo" />
  156. </el-form-item>
  157. </el-col>
  158. </el-row>
  159. </el-form>
  160. <template #footer>
  161. <div class="dialog-footer">
  162. <el-button type="primary" @click="shuaKa">刷卡/扫码</el-button>
  163. <el-button type="success" icon="Check" @click="saveShouFee">保存</el-button>
  164. <el-button @click="shouFeeVisible = false">关闭</el-button>
  165. </div>
  166. </template>
  167. </el-dialog>
  168. <el-dialog v-model="refundVisible" title="退费" width="400" draggable>
  169. <el-form class="demo-ruleForm" label-width="127px"
  170. >
  171. <el-row>
  172. <el-col :span="24">
  173. <el-form-item label="支付方式*">
  174. <el-select v-model="refundForm.depoType">
  175. <el-option v-for="item in zdChequeTypes" :key="item.code" :label="item.name" :value="item.code"></el-option>
  176. </el-select>
  177. </el-form-item>
  178. </el-col>
  179. </el-row>
  180. <el-row>
  181. <el-col :span="24">
  182. <el-form-item label="金额">
  183. <el-input v-model="refundForm.depoAmount" disabled/>
  184. </el-form-item>
  185. </el-col>
  186. </el-row>
  187. <el-row>
  188. <el-col :span="24">
  189. <el-form-item label="收据号">
  190. <el-input v-model="refundForm.receiptNo" disabled/>
  191. </el-form-item>
  192. </el-col>
  193. </el-row>
  194. </el-form>
  195. <template #footer>
  196. <div class="dialog-footer">
  197. <el-button type="primary" @click="refundYjj(0)">普通退费</el-button>
  198. <el-button type="success" @click="refundYjj(1)">原路退费</el-button>
  199. <el-button @click="refundVisible = false">关闭</el-button>
  200. </div>
  201. </template>
  202. </el-dialog>
  203. <el-dialog v-model="sjhVisible" title="设置收据号" width="400" draggable>
  204. <el-form class="demo-ruleForm" label-width="127px"
  205. >
  206. <el-row>
  207. <el-col :span="24">
  208. <el-form-item label="当前收据号:">
  209. <el-input-number v-model="currentNo" :min="1"/>
  210. </el-form-item>
  211. </el-col>
  212. </el-row>
  213. </el-form>
  214. <template #footer>
  215. <div class="dialog-footer">
  216. <el-button type="primary" @click="saveSjh">保存</el-button>
  217. <el-button @click="sjhVisible = false">关闭</el-button>
  218. </div>
  219. </template>
  220. </el-dialog>
  221. <div id="report_table" v-show="false"
  222. style="width:192mm;height:97mm;margin:0 auto;border: 1px solid #337ab7;font-size: 10px;padding-top: 5mm;overflow-y: auto; overflow-x:hidden;">
  223. <div id="report_table_1">
  224. <div style="text-align:center;font-weight: 700;padding-top: -8mm">{{hospitalName}}</div>
  225. <div style="text-align:center;font-weight: 700;margin-top: 5px;">预交金收据</div>
  226. <div>
  227. <span>收据日期:</span><span style="margin-left: 7mm;" id="printDate">{{getFormatDatetime(new Date(),'YYYY-MM-DD')}}</span>
  228. <span style="margin-left: 54mm;">收据号:</span><span style="margin-left: 4mm;">{{printData.receiptNo}}</span><span
  229. style="margin-left: 2mm;">{{printData.cdFlag}}</span>
  230. </div>
  231. <table class="pageTable" style="width: 170mm;">
  232. <tbody>
  233. <tr>
  234. <td style="width: 15mm;">病人ID</td>
  235. <td style="width: 20mm;" >{{printData.patientId}}</td>
  236. <td>住院号</td>
  237. <td style="width: 20mm;" >{{printData.inpatientNo}}</td>
  238. <td colspan="3">姓名</td>
  239. <td colspan="2">{{printData.name}}</td>
  240. </tr>
  241. <tr>
  242. <td>住院科室</td>
  243. <td colspan="2">{{printData.admissDeptName}}</td>
  244. <td>支付方式</td>
  245. <td colspan="2" >{{printData.depoTypeName}}</td>
  246. <td colspan="2">操作类型</td>
  247. <td>交款</td>
  248. </tr>
  249. <tr>
  250. <td>金额</td>
  251. <td >{{printData.depoAmount}}</td>
  252. <td>支票号</td>
  253. <td colspan="6">{{printData.chequeNo}}</td>
  254. </tr>
  255. <tr>
  256. <td>大写金额</td>
  257. <td colspan="5">{{printData.depoAmountDx}}</td>
  258. <td colspan="2">收费员</td>
  259. <td >{{printData.opIdCodeName}}</td>
  260. </tr>
  261. <tr>
  262. <td colspan="9" rowspan="3" style="height: 26mm">
  263. 1、此系临时收据,请妥善保管。出院时凭此收据按实用医疗费用换取住院发票。<br/>
  264. 2、此收据遗失,请及时携带病人身份证和挂失人身份证到出院结算处办理挂失手续。如存在第三方肇事者预缴医疗费用,挂失时另需公安机关出示证明。<br/>
  265. 3、如果您的缴费方式为银行卡支付,请您妥善保管好缴费的刷卡单,并于办理出院退费时带上缴费时所用银行卡。
  266. </td>
  267. </tr>
  268. </tbody>
  269. </table>
  270. </div>
  271. </div>
  272. <PosTransaction ref="posTransactionRef"></PosTransaction>
  273. </template>
  274. <script setup>
  275. import {onMounted, ref} from "vue";
  276. import router from "@/router";
  277. import sleep from "@/utils/sleep";
  278. import {
  279. queryAdvancePayment,
  280. saveAdvancePayment,
  281. printZyDepositFile,
  282. queryPrintAdvancePayment,
  283. queryAdvancePaymentPatientList
  284. } from '@/api/zy-gl/advance-paymentDeal'
  285. import {
  286. queryHospitalName
  287. } from '@/api/zy-gl/zy-daily'
  288. import {getLodop,initLodop} from "@/utils/c-lodop.js";
  289. import {ElMessage, ElMessageBox} from "element-plus";
  290. import PosTransaction from "@/components/zfsf/PosTransaction.vue"
  291. import {queryZdChequeType} from "@/api/zfsf/cashier-process.js";
  292. import {stringIsBlank, stringNotBlank} from "@/utils/blank-utils.js";
  293. import {consume} from "@/api/zfsf/pos-transaction.js";
  294. import {getFormatDatetime} from "../../../utils/date.js";
  295. import {saveYjjSjh,queryYjjSjh} from '@/api/zfsf/sfbillno'
  296. const sjhVisible = ref(false)
  297. const currentNo = ref(null)
  298. const openSjh = ()=>{
  299. sjhVisible.value = true
  300. queryYjjSjh({}).then(res=>{
  301. currentNo.value = res.currentNo
  302. })
  303. }
  304. const saveSjh =()=>{
  305. saveYjjSjh({
  306. currentNo :currentNo.value
  307. }).then(res=>{
  308. sjhVisible.value = false
  309. })
  310. }
  311. const hospitalName = ref('')
  312. const posTransactionRef = ref(null)
  313. const printData = ref({
  314. patientId:'',
  315. receiptNo:'',
  316. inpatientNo:'',
  317. name:'',
  318. admissDeptName:'',
  319. depoTypeName:'',
  320. depoAmount:'',
  321. depoAmountDx:'',
  322. opIdCodeName:'',
  323. cdFlag:'',
  324. depoDate:'',
  325. })
  326. onActivated(async ()=>{
  327. const params = router.currentRoute.value.query;
  328. if(params && params.patNo){
  329. await sleep(300);
  330. queryPatientList(params.patNo)
  331. }
  332. })
  333. const clearPrintData=()=>{
  334. printData.value = {
  335. patientId:'',
  336. inpatientNo:'',
  337. name:'',
  338. admissDeptName:'',
  339. depoTypeName:'',
  340. depoAmount:'',
  341. depoAmountDx:'',
  342. opIdCodeName:'',
  343. cdFlag:'',
  344. }
  345. }
  346. const formData = ref({
  347. inpatientNo:'',
  348. patientId:'',
  349. name:'',
  350. sexName:'',
  351. bedNo:'',
  352. wardName:'',
  353. admissDate:'',
  354. responceTypeName:'',
  355. totalCharge:null,
  356. balance:null,
  357. inOutFlag:0,
  358. yjjHj:0,
  359. ztYjjHj:0,
  360. })
  361. const shouFeeVisible = ref(false)
  362. const shouFeeForm = ref({
  363. depoType : 'O',
  364. status : '',
  365. autoFlag : 0,
  366. inpatientNo : '',
  367. depoAmount : null,
  368. chequeNo : '',
  369. psordnum : '',
  370. agtordnum : '',
  371. transDate : '',
  372. parChannel : '',
  373. traceNo : '',
  374. receiptNo : '',
  375. })
  376. // 保存收费
  377. const saveShouFee =()=>{
  378. shouFeeForm.value.inpatientNo = formData.value.inpatientNo
  379. shouFeeForm.value.status = "1"
  380. saveAdvancePayment(shouFeeForm.value).then(res=>{
  381. shouFeeVisible.value = false
  382. ElMessage.success('收费成功')
  383. ElMessageBox.confirm('请确认是否打印收据?', {
  384. cancelButtonText: '取消',
  385. confirmButtonText: '确定',
  386. })
  387. .then(() => {
  388. printShouJu(res.inpatientNo,res.receiptNo,false)
  389. })
  390. })
  391. }
  392. const refundVisible = ref(false)
  393. const openRefund = (row)=>{
  394. refundForm.value.inpatientNo = row.inpatientNo
  395. refundForm.value.receiptNo = row.receiptNo
  396. refundForm.value.depoType = row.depoType
  397. refundForm.value.status = 2
  398. refundForm.value.depoAmount = row.depoAmount
  399. refundVisible.value = true
  400. }
  401. const refundForm =ref({
  402. depoType:'',
  403. inpatientNo:'',
  404. depoAmount:'',
  405. receiptNo:'',
  406. status:2,
  407. refundType:0,
  408. })
  409. // 退费
  410. const refundYjj = (refundType)=>{
  411. refundForm.value.refundType = refundType
  412. saveAdvancePayment(refundForm.value).then(res=>{
  413. ElMessage.success('退费成功')
  414. if(stringNotBlank(res.warMessage)){
  415. ElMessage.warning(warMessage)
  416. }
  417. refundVisible.value = false
  418. queryPatientList(res.inpatientNo)
  419. })
  420. }
  421. // 打印收据 flag true 重打 false 首次打印
  422. const printShouJu = (inpatientNo,receiptNo,flag)=>{
  423. // 重打
  424. if(flag){
  425. printReal(inpatientNo,receiptNo,flag)
  426. }else {
  427. printZyDepositFile(receiptNo).then(res=>{
  428. printReal(inpatientNo,receiptNo,flag)
  429. queryPatientList(inpatientNo)
  430. })
  431. }
  432. }
  433. const printReal =(inpatientNo,receiptNo,flag)=>{
  434. queryPrintAdvancePayment({
  435. inpatientNo:inpatientNo,
  436. receiptNo:receiptNo,
  437. }).then(res=>{
  438. printData.value.inpatientNo =res.inpatientNo
  439. printData.value.patientId = res.patientId
  440. printData.value.name = res.name
  441. printData.value.admissDeptName = res.admissDeptName
  442. printData.value.depoAmount = res.depoAmount
  443. printData.value.depoTypeName = res.depoTypeName
  444. printData.value.depoAmountDx = res.depoAmountDx
  445. printData.value.opIdCodeName = res.opIdCodeName
  446. printData.value.receiptNo = res.receiptNo
  447. printData.value.depoDate = getFormatDatetime(res.depoDate,'YYYY年MM月DD日')
  448. if(flag){
  449. printData.value.cdFlag = '(重打)'
  450. }else {
  451. printData.value.cdFlag = ''
  452. }
  453. setTimeout(printSjNew,1000)
  454. })
  455. }
  456. function printSjNew(){
  457. let LODOP = getLodop();
  458. //设置默认打印机
  459. LODOP.SET_PRINTER_INDEX(-1);
  460. LODOP.SET_PRINT_STYLE("FontSize", 9); //字体大小
  461. LODOP.SET_SHOW_MODE("BKIMG_WIDTH", "80mm");
  462. LODOP.SET_SHOW_MODE("BKIMG_HEIGHT", "108mm");
  463. LODOP.SET_PRINT_PAGESIZE(1, "80mm", "108mm", "CreateCustomPage");
  464. LODOP.SET_PRINT_MODE("CREATE_CUSTOM_PAGE_NAME", "住院预交金");//对新建的纸张重命名
  465. LODOP.SET_PRINT_STYLE("FontSize", 11); //字体大小
  466. LODOP.ADD_PRINT_TEXT("1mm", "6mm", "75mm", "3mm", hospitalName.value+"预交金缴费凭证"+printData.value.cdFlag);
  467. LODOP.ADD_PRINT_TEXT("6mm", "2mm", "30mm", "3mm", "姓名:"+printData.value.name);
  468. LODOP.ADD_PRINT_TEXT("6mm", "32mm", "40mm", "3mm", "住院号:"+printData.value.inpatientNo);
  469. LODOP.ADD_PRINT_TEXT("11mm", "2mm", "75mm", "3mm", "住院科室:"+printData.value.admissDeptName);
  470. LODOP.ADD_PRINT_TEXT("16mm", "2mm", "75mm", "3mm", "收据号:"+printData.value.receiptNo);
  471. LODOP.ADD_PRINT_TEXT("21mm", "2mm", "75mm", "3mm", "支付方式:"+printData.value.depoTypeName);
  472. LODOP.ADD_PRINT_TEXT("27mm", "2mm", "80mm", "3mm", "-------------------------------------");
  473. LODOP.ADD_PRINT_TEXT("32mm", "2mm", "35mm", "3mm", "金额:"+printData.value.depoAmount);
  474. LODOP.ADD_PRINT_TEXT("32mm", "37mm", "45mm", "3mm", "大写金额:"+printData.value.depoAmountDx);
  475. LODOP.ADD_PRINT_TEXT("38mm", "2mm", "75mm", "3mm", "收费员:"+printData.value.opIdCodeName);
  476. LODOP.ADD_PRINT_TEXT("44mm", "2mm", "80mm", "3mm", "收费日期:"+printData.value.depoDate);
  477. LODOP.ADD_PRINT_TEXT("50mm", "2mm", "80mm", "3mm", "-------------------------------------");
  478. LODOP.ADD_PRINT_TEXT("56mm", "2mm", "80mm", "3mm", "1、此系临时收据,请妥善保管。出院时凭此");
  479. LODOP.ADD_PRINT_TEXT("62mm", "2mm", "80mm", "3mm", "收据按实用医疗费用换取住院发票。");
  480. LODOP.ADD_PRINT_TEXT("68mm", "2mm", "80mm", "3mm", "2、此收据遗失,请及时携带病人身份证和挂");
  481. LODOP.ADD_PRINT_TEXT("72mm", "2mm", "80mm", "3mm", "失人身份证到出院结算处办理挂失手续。");
  482. LODOP.ADD_PRINT_TEXT("78mm", "2mm", "80mm", "3mm", "如存在第三方肇事者预缴医疗费用,挂失时");
  483. LODOP.ADD_PRINT_TEXT("84mm", "2mm", "80mm", "3mm", "另需公安机关出示证明。");
  484. LODOP.ADD_PRINT_TEXT("90mm", "2mm", "80mm", "3mm", "3、如果您的缴费方式为银行卡支付,请您妥");
  485. LODOP.ADD_PRINT_TEXT("96mm", "2mm", "80mm", "3mm", "善保管好缴费的刷卡单,并于办理出院退费");
  486. LODOP.ADD_PRINT_TEXT("102mm", "2mm", "80mm", "3mm", "时带上缴费时所用银行卡。");
  487. if(printData.value.cdFlag ===''){
  488. LODOP.NewPageA();
  489. LODOP.ADD_PRINT_TEXT("1mm", "6mm", "75mm", "3mm", hospitalName.value+"预交金缴费凭证"+printData.value.cdFlag);
  490. LODOP.ADD_PRINT_TEXT("6mm", "2mm", "30mm", "3mm", "姓名:"+printData.value.name);
  491. LODOP.ADD_PRINT_TEXT("6mm", "32mm", "40mm", "3mm", "住院号:"+printData.value.inpatientNo);
  492. LODOP.ADD_PRINT_TEXT("11mm", "2mm", "75mm", "3mm", "住院科室:"+printData.value.admissDeptName);
  493. LODOP.ADD_PRINT_TEXT("16mm", "2mm", "75mm", "3mm", "收据号:"+printData.value.receiptNo);
  494. LODOP.ADD_PRINT_TEXT("21mm", "2mm", "75mm", "3mm", "支付方式:"+printData.value.depoTypeName);
  495. LODOP.ADD_PRINT_TEXT("27mm", "2mm", "80mm", "3mm", "-------------------------------------");
  496. LODOP.ADD_PRINT_TEXT("32mm", "2mm", "35mm", "3mm", "金额:"+printData.value.depoAmount);
  497. LODOP.ADD_PRINT_TEXT("32mm", "37mm", "45mm", "3mm", "大写金额:"+printData.value.depoAmountDx);
  498. LODOP.ADD_PRINT_TEXT("38mm", "2mm", "75mm", "3mm", "收费员:"+printData.value.opIdCodeName);
  499. LODOP.ADD_PRINT_TEXT("44mm", "2mm", "80mm", "3mm", "收费日期:"+printData.value.depoDate);
  500. LODOP.ADD_PRINT_TEXT("50mm", "2mm", "80mm", "3mm", "-------------------------------------");
  501. LODOP.ADD_PRINT_TEXT("56mm", "2mm", "80mm", "3mm", "1、此系临时收据,请妥善保管。出院时凭此");
  502. LODOP.ADD_PRINT_TEXT("62mm", "2mm", "80mm", "3mm", "收据按实用医疗费用换取住院发票。");
  503. LODOP.ADD_PRINT_TEXT("68mm", "2mm", "80mm", "3mm", "2、此收据遗失,请及时携带病人身份证和挂");
  504. LODOP.ADD_PRINT_TEXT("72mm", "2mm", "80mm", "3mm", "失人身份证到出院结算处办理挂失手续。");
  505. LODOP.ADD_PRINT_TEXT("78mm", "2mm", "80mm", "3mm", "如存在第三方肇事者预缴医疗费用,挂失时");
  506. LODOP.ADD_PRINT_TEXT("84mm", "2mm", "80mm", "3mm", "另需公安机关出示证明。");
  507. LODOP.ADD_PRINT_TEXT("90mm", "2mm", "80mm", "3mm", "3、如果您的缴费方式为银行卡支付,请您妥");
  508. LODOP.ADD_PRINT_TEXT("96mm", "2mm", "80mm", "3mm", "善保管好缴费的刷卡单,并于办理出院退费");
  509. LODOP.ADD_PRINT_TEXT("102mm", "2mm", "80mm", "3mm", "时带上缴费时所用银行卡。");
  510. }
  511. LODOP.PREVIEW();
  512. // LODOP.PRINT();;
  513. clearPrintData()
  514. }
  515. const clearShouFeeForm =()=>{
  516. shouFeeForm.value = {
  517. depoType : 'O',
  518. status : '',
  519. autoFlag : 0,
  520. inpatientNo : '',
  521. depoAmount : '',
  522. chequeNo : '',
  523. psordnum : '',
  524. agtordnum : '',
  525. transDate : '',
  526. parChannel : '',
  527. traceNo : '',
  528. receiptNo : '',
  529. }
  530. }
  531. // 刷卡
  532. const shuaKa =()=>{
  533. if(stringIsBlank(shouFeeForm.value.depoAmount)){
  534. ElMessage.error('输入收费金额')
  535. return
  536. }
  537. let obj = {
  538. chequeType : shouFeeForm.value.depoType,
  539. amt : shouFeeForm.value.depoAmount,
  540. type : 1
  541. }
  542. consume(obj).then(res=>{
  543. // 1 联机刷卡 0 不联机 直接输凭证号
  544. shouFeeForm.value.autoFlag = 1
  545. shouFeeForm.value.psordnum = res.refNo
  546. shouFeeForm.value.agtordnum = res.wxAliPayOrderNo
  547. shouFeeForm.value.transDate = res.transDate
  548. shouFeeForm.value.parChannel = res.payChannel
  549. shouFeeForm.value.traceNo = res.traceNo
  550. shouFeeForm.value.receiptNo = res.lsOrderNo
  551. })
  552. }
  553. const openShouFee = ()=>{
  554. if(stringIsBlank(formData.value.name)){
  555. ElMessage.error('请先查询出要缴费的病人信息')
  556. return
  557. }
  558. shouFeeVisible.value = true
  559. }
  560. const zdChequeTypes = ref([])
  561. const openPos = ()=>{
  562. posTransactionRef.value.openOuter()
  563. }
  564. const patientVisible = ref(false)
  565. const patientTableData = ref([])
  566. const clearData = ()=>{
  567. formData.value = {
  568. inpatientNo:'',
  569. patientId:'',
  570. name:'',
  571. sexName:'',
  572. bedNo:'',
  573. wardName:'',
  574. admissDate:'',
  575. responceTypeName:'',
  576. totalCharge:null,
  577. balance:null,
  578. inOutFlag:0,
  579. yjjHj:0,
  580. ztYjjHj:0,
  581. }
  582. tableData.value = []
  583. }
  584. function setformData(data){
  585. formData.value.inpatientNo = data.inpatientNo
  586. formData.value.patientId = data.patientId
  587. formData.value.name = data.name
  588. formData.value.sexName = data.sexName
  589. formData.value.bedNo = data.bedNo
  590. formData.value.wardName = data.wardName
  591. formData.value.admissDate = data.admissDate
  592. formData.value.responceTypeName = data.responceTypeName
  593. formData.value.totalCharge = data.totalCharge
  594. formData.value.balance = data.balance
  595. formData.value.yjjHj = data.yjjHj
  596. formData.value.ztYjjHj = data.ztYjjHj
  597. }
  598. onMounted(()=>{
  599. initLodop()
  600. queryZdChequeType().then(res=>{
  601. zdChequeTypes.value = res
  602. })
  603. queryHospitalName().then(res=>hospitalName.value = res)
  604. })
  605. const fetchPatient =(row)=>{
  606. queryAdvancePayment({
  607. inpatientNo:row.inpatientNo,
  608. inOutFlag:formData.value.inOutFlag,
  609. admissTimes:row.admissTimes,
  610. }).then(res=>{
  611. patientVisible.value = false
  612. if(res == null || res.length === 0){
  613. ElMessage.error('没有查询到数据')
  614. clearData()
  615. }else {
  616. setformData(res)
  617. tableData.value = res.zyDepositFiles
  618. }
  619. })
  620. }
  621. const queryPatientList = (code)=>{
  622. queryAdvancePaymentPatientList({
  623. inpatientNo : code,
  624. inOutFlag : formData.value.inOutFlag
  625. }).then(res=>{
  626. if(res == null || res.length === 0){
  627. ElMessage.error('没有查询到数据')
  628. clearData()
  629. }
  630. else if(res.length ===1){
  631. let row = {
  632. inpatientNo:res[0].inpatientNo,
  633. admissTimes:res[0].admissTimes,
  634. }
  635. fetchPatient(row)
  636. }
  637. else if(res.length > 1){
  638. patientVisible.value = true
  639. patientTableData.value = res
  640. }
  641. })
  642. }
  643. const tableData = ref([])
  644. const activeName = ref(['1', '2'])
  645. const formSize = ref('default')
  646. </script>
  647. <style scoped lang="scss">
  648. .pageTable tr td, .pageTable tr th {
  649. border: 1px solid black;
  650. text-align: center;
  651. font-size: 12px;
  652. padding: 0 0;
  653. }
  654. .pageTable {
  655. border-collapse: collapse;
  656. }
  657. </style>