From a4e4026aee8c5e6d12c1065ce71efee81a2b5518 Mon Sep 17 00:00:00 2001
From: fujunling <2984387807@qq.com>
Date: 星期一, 26 六月 2023 18:17:05 +0800
Subject: [PATCH] 批量导入申请

---
 Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue |   72 ++++++++++++++++++++++-------------
 1 files changed, 45 insertions(+), 27 deletions(-)

diff --git a/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue b/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
index 6bfd88d..cd1bd20 100644
--- a/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
+++ b/Source/UBCS-WEB/src/components/BatchImport/ShowImportData.vue
@@ -6,6 +6,17 @@
     append-to-body
     top="5vh"
   >
+    <div>
+      <FormTemplate
+        v-if="type === 'batchApplyCode'"
+        type="add"
+        :selfColumnType="selfColumnType"
+        :selfColumnConfig="selfColumnConfig"
+        ref="CodeApply"
+        @getFormData="getCodeApplyFormData"
+        @referConfigDataUpdate="referConfigDataUpdate"
+      ></FormTemplate>
+    </div>
     <div class="flex_box">
       <div class="left" :style="{ width: leftWidth }">
         <div class="isExpand_box">
@@ -117,7 +128,9 @@
     </div>
     <template #footer>
       <div>
-        <el-button size="small" type="primary" @click="submit">纭畾瀵煎叆</el-button>
+        <el-button size="small" type="primary" @click="submit"
+          >纭畾瀵煎叆</el-button
+        >
         <el-button size="small">鍙栨秷</el-button>
       </div>
     </template>
@@ -137,12 +150,16 @@
   getHistoryResembleTable,
   getFormTemplate,
   getCurretnSelectedRowResemble,
-  submitHistoryimport
+  submitHistoryimport,
 } from "../../api/batchImport/index";
 import ResembleQuery from "../FormTemplate/ResembleQuery.vue";
+import FormTemplate from "../FormTemplate/FormTemplate.vue";
+import codeApply from '@/mixins/codeApply.js'
+
 export default {
   name: "ShowImportData",
-  components: { ResembleQuery },
+  components: { ResembleQuery, FormTemplate },
+  mixins: [ codeApply ],
   props: {
     title: {
       type: String,
@@ -159,12 +176,12 @@
     },
     classifyAttr: {
       type: String,
-      default: 'id'
+      default: "id",
     },
     codeClassifyOid: {
       type: String,
-      default: ''
-    }
+      default: "",
+    },
   },
   computed: {
     dialogVisible: {
@@ -182,15 +199,15 @@
       filterText: "",
       leftWidth: "200px",
       templateOid: null,
-      tab1Name: '鐩镐技椤�',
-      tab2Name: '姝g‘鏁版嵁',
+      tab1Name: "鐩镐技椤�",
+      tab2Name: "姝g‘鏁版嵁",
       tab1Table: [],
       selectedTab1Table: [],
       tab2Table: [],
       activeTab: "tab1",
-      cloNamesList: [],
+      cloNamesList: [], //鍒楄〃澶撮儴瀛楁
       localCodeClassifyOid: "",
-      resembleColumList: [],
+      resembleColumList: [], //鐩镐技椤规煡鍑烘潵鐨勫垪琛ㄥ瓧娈�
       currentSelectedResemble: [],
       currentSelectedResembleRow: {
         templateOid: "",
@@ -198,6 +215,7 @@
         rowOid: "",
         formTemplateVisible: false,
       },
+      secVOList: [],
     };
   },
 
@@ -217,15 +235,15 @@
     treeNodeClick(data) {
       this.localCodeClassifyOid = data.codeclassifyoid;
       this.cloNamesList = data.cloNamesList;
-      this.templateOid = data.codeClassifyTemplateVO.oid
+      this.templateOid = data.codeClassifyTemplateVO.oid;
       getHistorySuccessTable(this.redisOid).then((res) => {
-        this.tab2Table = res.data
+        this.tab2Table = res.data;
       });
       getHistoryResembleTable({
         codeClassifyOid: data.codeClassifyOid,
         redisOid: this.redisOid + "-resemble",
       }).then((res) => {
-        this.tab1Table = res.data
+        this.tab1Table = res.data;
       });
       getFormTemplate({
         templateOid: data.oid,
@@ -235,14 +253,14 @@
       });
     },
     tab1TableSelectChange(selection) {
-      this.selectedTab1Table = selection
+      this.selectedTab1Table = selection;
     },
     resembleRowChange(row) {
       getCurretnSelectedRowResemble({
         redisOid: this.redisOid + "-resemble-data",
         dataOid: row.oid,
       }).then((res) => {
-        this.currentSelectedResemble = res.data
+        this.currentSelectedResemble = res.data;
       });
     },
     openFormTemlpate(row) {
@@ -251,7 +269,7 @@
         templateOid: row.codetemplateoid,
         codeClassifyOid: this.localCodeClassifyOid,
         rowOid: row.rowOid,
-      }
+      };
     },
     submit() {
       const params = {
@@ -259,24 +277,24 @@
         isImprot: true,
         codeImprotSaveDatVOList: [
           {
-            Clos: this.cloNamesList.map(item => item.title),
+            Clos: this.cloNamesList.map((item) => item.title),
             dataList: this.tab2Table.concat(this.selectedTab1Table),
             orderDTO: {
               codeClassifyOid: this.codeClassifyOid,
               templateOid: this.templateOid,
-              secDTOList: []
-            }
-          }
-        ]
-      }
-      submitHistoryimport(params).then(res => {
+              secDTOList: [],
+            },
+          },
+        ],
+      };
+      submitHistoryimport(params).then((res) => {
         if (res.code === 200) {
-          this.$message.success(res.obj)
+          this.$message.success(res.obj);
         } else {
-          this.$message.error(res.obj)
+          this.$message.error(res.obj);
         }
-      })
-    }
+      });
+    },
   },
   watch: {
     filterText(val) {

--
Gitblit v1.9.3