yeguodong 2 weeks ago
parent
commit
00840caf58

+ 22 - 7
src/views/hospitalization/zhu-yuan-yi-sheng/PatientInfoDip.vue

@@ -96,10 +96,14 @@
         :dics="dics"/>
 
     <CyVxeTable @checkbox-change="handleCheckboxChange">
-        <vxe-column
-            type="checkbox"
-            width="60"
-        ></vxe-column>
+        <vxe-column type="checkbox" width="60">
+            <template #header="{ checked, indeterminate }">
+                <span @click="handelCheckboxAll">
+                  <i style="color:#409eff;font-size: 16px;" class="vxe-icon-square-checked-fill" v-if="checked && !indeterminate"></i>
+                  <i style="color:#409eff;font-size: 16px;" class="vxe-icon-checkbox-unchecked" v-else></i>
+                </span>
+            </template>
+        </vxe-column>
 
       <vxe-column title="住院号" field="inpatientNo" min-width="70"/>
       <vxe-column title="次数" field="admissTimes" min-width="56"/>
@@ -170,9 +174,11 @@ const empList = ref([]);
 
 const checkboxSelect = ref({});
 
-const handleCheckboxChange = ({ checked, records, row, rowKey }) => {
+const handleCheckboxChange = ({ checked, records }: { checked: boolean; records: any[] }) => {
+    // records 会返回当前所有选中的行(包括全选时的所有行)
     checkboxSelect.value = records;
-}
+    console.log('checkboxSelect.value', checkboxSelect.value)
+};
 
 
 const {CyVxeTable, querySearch, exportExcel, tableRef} = UseVxeTable({
@@ -220,7 +226,6 @@ const upload = () => {
     });
 
     upldSetlListAList(params).then(res => {
-        console.log('res', res);
         let errorInpatient = "";
         res.data.forEach(d => {
             if(d.errorMsg) {
@@ -249,6 +254,16 @@ const upload = () => {
     });
 }
 
+const handelCheckboxAll = async () => {
+    // 1. 触发表格全选/取消全选
+    await tableRef.value?.toggleAllCheckboxRow();
+    // 2. 获取当前所有选中项
+    const checkedRecords = tableRef.value?.getCheckboxRecords() || [];
+    // 3. 同步更新 checkboxSelect
+    checkboxSelect.value = checkedRecords;
+    console.log('checkboxSelect.value', checkboxSelect.value)
+};
+
 const details = async (row) => {
   rowData.value = row
   dialog.value = true

+ 4 - 4
src/views/medical-insurance/allpatient/SetllistReconciliation.vue

@@ -78,7 +78,7 @@
   </div>
 
   <el-dialog v-model="showSetlDtlCheckRslt" title="明细对账结果" :close-on-click-modal="false"
-             :close-on-press-escape="false">
+             :close-on-press-escape="false" width="80%" destroy-on-close fullscreen>
     <el-table :data="setlDtlCheckRslt" stripe :height="300" highlight-current-row>
       <el-table-column type="index" label="序号"></el-table-column>
         <el-table-column prop="patNo" label="住院号"></el-table-column>
@@ -108,10 +108,10 @@
       </el-table-column>
     </el-table>
   </el-dialog>
-  <el-dialog v-model="showSetlinfo" title="结算信息" :close-on-click-modal="false" width="70%">
+  <el-dialog v-model="showSetlinfo" title="结算信息" :close-on-click-modal="false" width="80%" destroy-on-close fullscreen>
     <Setlinfo :setlinfo="setlinfo" />
   </el-dialog>
-  <el-dialog v-model="showSetlPrescription" title="结算详情" :close-on-click-modal="false" width="82%">
+  <el-dialog v-model="showSetlPrescription" title="结算详情" :close-on-click-modal="false" width="80%" destroy-on-close fullscreen>
     <el-table :data="setlDetails" stripe :height="500" highlight-current-row>
       <el-table-column type="index" label="序号"></el-table-column>
       <el-table-column prop="mdtrtId" label="就诊ID"></el-table-column>
@@ -143,7 +143,7 @@
       <EmployeeOutpatientSetlList v-if="settleType === '11' && isEmployeeOutpatient" :setlinfo="setlListDetail" />
     </div>
   </el-dialog>
-  <el-dialog v-model="showBl" title="病历详情" :close-on-click-modal="false" width="70%">
+  <el-dialog v-model="showBl" title="病历详情" :close-on-click-modal="false" width="80%" destroy-on-close fullscreen>
     <div id="reportDetail" style="width: 100%; height: 100%; padding: 0 2px">
       <el-row :gutter="6">
         <el-col :span="6">门诊号:{{ blInfoList.patientId }}</el-col>