From c55f83b7af3edda89984979d9a24c4cd3a6f5205 Mon Sep 17 00:00:00 2001
From: wangting <675591594@qq.com>
Date: 星期三, 05 七月 2023 09:42:57 +0800
Subject: [PATCH] 主数据列表展示

---
 Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue |   45 ++++++++++++++++++++++++++++++++++++---------
 1 files changed, 36 insertions(+), 9 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
index e9fd52a..cb47ef6 100644
--- a/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
+++ b/Source/UBCS-WEB/src/components/Crud/VciMasterCrud.vue
@@ -8,9 +8,9 @@
         <el-button plain size="small" type="primary" @click="editHandler"
           >缂栬緫
         </el-button>
-        <el-button plain size="small" type="primary">鎵归噺瀵煎叆鐢宠</el-button>
-        <el-button plain size="small" type="primary">鍘嗗彶鏁版嵁瀵煎叆</el-button>
-        <el-button plain size="small" type="primary">鎵归噺鐢宠缂栫爜</el-button>
+        <el-button plain size="small" type="primary" @click="openBatchImport('batchImportApply')">鎵归噺瀵煎叆鐢宠</el-button>
+        <el-button plain size="small" type="primary" @click="openBatchImport('historyImport')">鍘嗗彶鏁版嵁瀵煎叆</el-button>
+        <el-button plain size="small" type="primary" @click="openBatchImport('batchApplyCode')">鎵归噺鐢宠缂栫爜</el-button>
         <el-button plain size="small" type="primary">鎵归噺鍙戝竷</el-button>
         <el-button plain size="small" type="primary">鏌ョ湅娴佺▼鍘嗗彶</el-button>
         <el-button plain size="small" type="primary">鍒犻櫎</el-button>
@@ -59,7 +59,7 @@
             :label="item.label"
             :prop="item.prop"
             :sortable="item.sortable"
-            :formatter="formatBoolean"
+            :formatter="item.formatter"
             :width="item.label.length >=4 ?'150':item.label.length==3 ?'120':'90'"
             :show-overflow-tooltip="true"
             align="center"
@@ -144,6 +144,7 @@
       >
       </el-pagination>
     </div>
+    <BatchImport v-if="batchImportData.visible" :visible.sync="batchImportData.visible" v-bind="batchImportData"></BatchImport>
   </basic-container>
 </template>
 <script>
@@ -152,11 +153,14 @@
 import integrationTransfer from "@/views/integration/integrationTransfer";
 import SetPersonnel from "@/components/template/SetPersonnel";
 import ResembleQueryDialog from "@/components/FormTemplate/ResembleQueryDialog.vue";
+import BatchImport from '@/components/BatchImport'
+import { validatenull } from "@/util/validate";
 export default {
   components: {
     integrationTransfer,
     SetPersonnel,
     ResembleQueryDialog,
+    BatchImport
   },
   name: "Crud.vue",
   props: {
@@ -243,6 +247,11 @@
       seniorQueryColumns: [],
       selectRow: [],
       userName: "",
+      batchImportData: {
+        visible: false,
+        type: '',
+        codeClassifyOid: ''
+      }
     };
   },
   computed: {},
@@ -270,6 +279,17 @@
     },
     tableHeadFindData: {
       handler(newval, oldval) {
+        newval.forEach((record,_index) =>{
+          if(record.field == 'id' && validatenull(record.templet)){
+            //浼佷笟缂栫爜鐨勯粯璁ゆ坊鍔犺秴閾炬帴,鏆傛湭瀹炵幇
+            record.formatter = '';
+          }else {
+            if (record.templet && typeof (record.templet) == 'string' && !validatenull(record.templet) && record.templet.indexOf("function(row,column)")>-1) {
+              record.formatter = eval("(" + record.templet + ")");
+              //function(row,column){return row[column.property]=='true'?'鏄�':'鍚�'}
+            }
+          }
+        })
         this.tableHeadFindDatas = newval;
       },
     },
@@ -288,11 +308,7 @@
   methods: {
     // 杞崲鏁版嵁true鍜宖alse
     formatBoolean(row, column) {
-      if (column.property === "xiaoshouwl"
-        ||column.property === "shifoupihaoguanli"
-        ||column.property === "caigouwl"
-        ||column.property === "kucunwl"
-        ||column.property === "passing") {
+      if (column.fieldType === "truefalse") {
         return row[column.property] =='true'? "鏄�" : "鍚�";
       }
       return row[column.property];
@@ -503,6 +519,11 @@
     EditSumbit(val) {
       this.editvisible = false;
     },
+    openBatchImport(type) {
+      this.batchImportData.visible = true
+      this.batchImportData.type = type
+      this.batchImportData.codeClassifyOid = this.codeClassifyOid
+    }
   },
 };
 </script>
@@ -517,4 +538,10 @@
     background-color: #f5f7fa !important;
   }
 }
+
+/deep/ .el-button {
+  margin: 0 10px 10px 0;
+}
+
+
 </style>

--
Gitblit v1.9.3