Parcourir la source

病案提交批量签收

‘chenzhilei’ il y a 1 semaine
Parent
commit
97922e394f

+ 8 - 0
src/api/case-front-sheet/index.js

@@ -61,6 +61,14 @@ export function executeSaveVerify(data) {
     })
 }
 
+export function executeSaveVerifyList(data) {
+    return request({
+        url: '/caseFrontSheet/saveVerifyList',
+        method: 'post',
+        data: data,
+    })
+}
+
 export function executePrintVerify(data) {
     return request({
         url: '/caseFrontSheet/printVerify',

+ 1 - 1
src/utils/ExportCVS.js

@@ -86,7 +86,7 @@ export function exportCharCSV(data, field,charField, fileName, separator,encodin
     if(encoding === null || encoding === undefined){
         encoding = 'GBK'
     }
-    console.log("出院时间",csvContent)
+    // console.log("出院时间",csvContent)
     const arrBuffer = new Int8Array(encode(csvContent, encoding))
     const blob = new Blob([arrBuffer], {
         type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset='+encoding

+ 62 - 0
src/views/hospitalization/case-front-sheet/AllCaseFrontSheet.vue

@@ -118,6 +118,14 @@
         >
           查看操作日志
         </el-button>
+        <el-button
+          icon="View"
+          type="primary"
+          @click="archiveBaList"
+          style="margin-left: 12px"
+        >
+          批量签收
+        </el-button>
       </header>
       <div class="layout_main layout_container layout-horizontal">
         <aside
@@ -129,7 +137,12 @@
             highlight-current-row
             :row-class-name="differSignedRows"
             @row-click="fetchSheetInfo"
+            @selection-change="handleSelectionChange"
           >
+          <el-table-column
+            type="selection"
+            width="55">
+          </el-table-column>
             <el-table-column label="姓名" width="70">
               <template #default="scope">
                 <img
@@ -734,6 +747,7 @@ import {
   executeAdvanceSearch,
   executePrintVerify,
   executeSaveVerify,
+  executeSaveVerifyList,
   executeUnArchiveBa,
   getAllDictionary,
   getAllWards,
@@ -838,6 +852,11 @@ const searchPatient = () => {
   });
 };
 
+const multipleSelection = ref(null);
+const handleSelectionChange = (val) => {
+  multipleSelection.value = val;
+};
+
 const dateRange = ref([]);
 const currentSideRow = ref({});
 const fetchSheetInfo = row => {
@@ -1335,6 +1354,49 @@ const archiveBa = () => {
     });
 };
 
+const archiveBaList = () => {
+  
+  if (multipleSelection.value.length == 0) {
+    return;
+  }
+  console.log("optionList",multipleSelection.value)
+  let optionList = multipleSelection.value.map(element => {
+    // let val = deepClone(element.value,true)
+    // initSheetLineData(val)
+    console.log("option",{
+      bah: element.bah,
+      admissTimes: element.times,
+    })
+    return {
+      bah: element.bah,
+      admissTimes: element.times,
+    };
+  });
+  
+  console.log("optionList",optionList)
+  executeSaveVerifyList(optionList)
+    .then(() => {
+      // currentSideRow.value.fileStatus = 1;
+      ElMessage({
+        message: "操作成功。",
+        type: "success",
+        duration: 2500,
+        showClose: true,
+      });
+      searchPatient()
+    })
+    .catch(e => {
+      ElMessage({
+        message: "操作失败,请稍后重试。",
+        type: "error",
+        duration: 2500,
+        showClose: true,
+      });
+      // forceVerifies.value = e.data;
+      // showMessageDrawer.value = true;
+    });
+};
+
 const unArchiveBa = () => {
   let val = deepClone(sheet.value,true)
   initSheetLineData(val)