浏览代码

添加自费患者费用上传操作按钮

lighter 2 年之前
父节点
当前提交
5370942e9f
共有 2 个文件被更改,包括 39 次插入2 次删除
  1. 8 0
      src/api/inpatient/charge-list.js
  2. 31 2
      src/components/medical-insurance/charge-list/Index.vue

+ 8 - 0
src/api/inpatient/charge-list.js

@@ -22,4 +22,12 @@ export function selectChargeList(data) {
         method: 'post',
         data,
     })
+}
+
+export function executeSelfpayUpload(data) {
+    return request({
+        url: '/chargeList/executeSelfpayUpload',
+        method: 'post',
+        data,
+    })
 }

+ 31 - 2
src/components/medical-insurance/charge-list/Index.vue

@@ -22,6 +22,7 @@
         </div>
       </div>
       <div style="position: fixed; right: 16px; top: 16px">
+        <el-button type="success" plain circle icon="Upload" title="自费上传" @click="selfpayUpload"></el-button>
         <el-button type="primary" plain circle icon="Printer" title="打印" @click="execPrint"></el-button>
         <el-button type="danger" plain circle icon="Close" @click="closeTablet" title="关闭"></el-button>
       </div>
@@ -99,8 +100,8 @@
 
 <script>
 import WindowSize from "@/components/window-size/Index.vue";
-import {selectPatOverviews, selectBriefPatInfo, selectChargeList} from "@/api/inpatient/charge-list";
-import {ElMessage} from "element-plus";
+import {selectPatOverviews, selectBriefPatInfo, selectChargeList, executeSelfpayUpload} from "@/api/inpatient/charge-list";
+import {ElMessage, ElMessageBox} from "element-plus";
 import {getLodop, initLodop} from '@/utils/c-lodop'
 
 export default {
@@ -160,7 +161,34 @@ export default {
       })
     }
 
+    const selfpayUpload = () => {
+      if (!briefPatInfo.value.patNo) {
+        ElMessage({
+          message: '请先选择住院历史记录。',
+          type: 'warning',
+          duration: 2500,
+          showClose: true
+        })
+        return
+      }
+      executeSelfpayUpload(briefPatInfo.value).then(res => {
+        ElMessageBox.alert(res, '上传完成', {
+          type: 'info',
+          showCancelButton: false,
+        })
+      })
+    }
+
     const execPrint = () => {
+      if (!briefPatInfo.value.patNo) {
+        ElMessage({
+          message: '请先选择住院历史记录。',
+          type: 'warning',
+          duration: 2500,
+          showClose: true
+        })
+        return
+      }
       let LODOP = getLodop();
       const prntStyle = `<style>table, table * {margin: 0;padding: 0;border-collapse: collapse;font-size: 12px}</style>`
       const prntContent = document.getElementById('printArea').innerHTML
@@ -196,6 +224,7 @@ export default {
       ajustDisdate,
       fetchBriefPatInfo,
       closeTablet,
+      selfpayUpload,
       execPrint,
     }
   },