qukaidi 4 роки тому
батько
коміт
184c64be98
1 змінених файлів з 33 додано та 19 видалено
  1. 33 19
      src/views/basicdata/corps/index.vue

+ 33 - 19
src/views/basicdata/corps/index.vue

@@ -16,8 +16,8 @@
           size="small"
         >
           <el-option
-            v-for="dict in fTypeidOptions"
-            :key="dict.dictValue"
+            v-for="(dict,index) in fTypeidOptions"
+            :key="index.dictValue"
             :label="dict.dictLabel"
             :value="dict.dictValue"
           />
@@ -62,8 +62,8 @@
           style="width: 250px"
         >
           <el-option
-            v-for="dict in statusOptions"
-            :key="dict.dictValue"
+            v-for="(dict,index) in statusOptions"
+            :key="index.dictValue"
             :label="dict.dictLabel"
             :value="dict.dictValue"
           />
@@ -167,9 +167,9 @@
           handle=".indraggable"
         >
           <transition-group>
-            <div
-              v-for="item in setRowList"
-              :key="item.surface"
+            <divindex
+              v-for="(item,index) in setRowList"
+              :key="index.surface"
               class="listStyle"
             >
               <div style="width: 500px" class="indraggable">
@@ -190,7 +190,7 @@
                 :max="500"
                 size="mini"
               ></el-input-number>
-            </div>
+            </divindex>
           </transition-group>
         </draggable>
       </div>
@@ -379,8 +379,8 @@
                 :disabled="disCorps"
               >
                 <el-option
-                  v-for="dict in fTypeidOptions"
-                  :key="dict.dictValue"
+                  v-for="(dict,index) in fTypeidOptions"
+                  :key="index.dictValue"
                   :label="dict.dictLabel"
                   :value="dict.dictValue"
                 ></el-option>
@@ -547,8 +547,8 @@
                   placeholder="请选择结算表票结、月结"
                 >
                   <el-option
-                    v-for="dict in fStltypeidOptions"
-                    :key="dict.dictValue"
+                    v-for="(dict,index) in fStltypeidOptions"
+                    :key="index.dictValue"
                     :label="dict.dictLabel"
                     :value="parseInt(dict.dictValue)"
                   ></el-option>
@@ -684,8 +684,8 @@
               </el-radio-group>-->
                 <el-radio-group v-model="form.fStatus">
                   <el-radio
-                    v-for="dict in statusOptions"
-                    :key="dict.dictValue"
+                    v-for="(dict,index) in statusOptions"
+                    :key="index.dictValue"
                     :label="dict.dictValue"
                     >{{ dict.dictLabel }}</el-radio
                   >
@@ -754,8 +754,8 @@
               size="small"
             >
               <el-option
-                v-for="dict in statusOptions"
-                :key="dict.dictValue"
+                v-for="(dict,index) in statusOptions"
+                :key="index.dictValue"
                 :label="dict.dictLabel"
                 :value="dict.dictValue"
               />
@@ -786,7 +786,10 @@
           </template>
         </el-table-column>
       </el-table>
-
+      <up-load
+        :relevantAttachments="relevantAttachments"
+        :createBy="username"
+      ></up-load>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
@@ -811,6 +814,7 @@ import { addSet, select, resetModule } from "@/api/system/set";
 import Cookies from "js-cookie";
 import draggable from "vuedraggable";
 import { treeselect } from "@/api/system/dept";
+import upLoad from "@/views/Warehousing/components/upLoad";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import Vue from "vue";
@@ -873,7 +877,7 @@ Vue.directive("dialogDrag", {
 
 export default {
   name: "Corps",
-  components: { draggable, Treeselect },
+  components: { draggable, Treeselect, upLoad },
   data() {
     return {
       treevalue: null,
@@ -1043,6 +1047,8 @@ export default {
       ],
       allCheck: false,
       showForm: false,
+      relevantAttachments: [],
+      username:null,
     };
   },
   created() {
@@ -1063,6 +1069,7 @@ export default {
     });
     this.getRow();
     this.getTreeselect();
+    this.username = Cookies.get("userName");
   },
   methods: {
     getTreeselect() {
@@ -1338,6 +1345,10 @@ export default {
               "customerContacts",
               JSON.stringify(this.contactList)
             );
+              formDate.append(
+              "attach",
+              JSON.stringify(this.relevantAttachments)
+            );
             addCorps(formDate).then((response) => {
               console.log("111");
               this.msgSuccess("修改成功");
@@ -1369,8 +1380,11 @@ export default {
               "customerContacts",
               JSON.stringify(this.contactList)
             );
+            formDate.append(
+              "attach",
+              JSON.stringify(this.relevantAttachments)
+            );
             addCorps(formDate).then((response) => {
-              console.log("222");
               this.msgSuccess("新增成功");
               this.open = false;
               this.getList();