qukaidi 4 gadi atpakaļ
vecāks
revīzija
e27cb90b17

+ 1 - 1
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -5700,7 +5700,7 @@ export default {
     },
     openUploadExcel() {
       this.uploadExcel =! this.uploadExcel;
-      this.$refs.upexcel.init(this.form.fWarehouseid,this.detailList);
+      this.$refs.upexcel.init(this.form,this.detailList);
     },
     // 监听 子组件弹窗关闭后触发,有子组件调用
     showAddOrUpdate(data) {

+ 14 - 5
src/views/Warehousing/inStock/uploadExcel.vue

@@ -384,6 +384,7 @@ export default {
       },
       choiceWarehouse: false,
       oldList: [],
+      form: {},
     };
   },
   created() {
@@ -398,16 +399,24 @@ export default {
     this.getRow();
   },
   methods: {
-    init(fWarehouseid, rows) {
+    init(row, list) {
       this.oldList = [];
+      this.form = null;
       this.excelList = [];
-      this.oldList = rows;
-      treeselect(fWarehouseid).then((response) => {
+      this.oldList = list;
+      this.form = row;
+      treeselect(row.fWarehouseid).then((response) => {
         this.fWarehouseidOptions = response.data;
       });
     },
     handleSucces(res) {
       if (res.code) {
+        if (res.data.length) {
+          res.data.map((e) => {
+            e.fBsdate = this.form.fBsdate;
+            e.fGoodsid = this.form.fGoodsid;
+          });
+        }
         this.excelList = res.data;
       }
     },
@@ -549,8 +558,8 @@ export default {
           );
         }
       }
-      this.$emit("adddetailList", this.excelList)
-      this.uploadVisible=false
+      this.$emit("adddetailList", this.excelList);
+      this.uploadVisible = false;
     },
     unRepeat(row, index) {
       this.oldList.map((e) => {