qukaidi 4 years ago
parent
commit
90011e9713

+ 29 - 21
src/views/Warehousing/inStock/AddOrUpdate.vue

@@ -3023,6 +3023,10 @@ export default {
       type: Number,
       type: Number,
       required: null,
       required: null,
     },
     },
+    copyStatus: {
+      type: Number,
+      required: null,
+    },
   },
   },
   components: {
   components: {
     UploadFile,
     UploadFile,
@@ -3452,28 +3456,32 @@ export default {
         if (this.form.fStltypeid || this.form.fStltypeid == 0) {
         if (this.form.fStltypeid || this.form.fStltypeid == 0) {
           this.$set(this.form, "fStltypeid", this.form.fStltypeid.toString());
           this.$set(this.form, "fStltypeid", this.form.fStltypeid.toString());
         }
         }
-        this.detailList = response.data.warehouseBillsItem;
-        response.data.warehousebillsfeesCr.map((e) => {
-          if (e.fFeeunitid) {
-            e.fFeeunitid = e.fFeeunitid.toString();
-          }
-          if (e.fStltypeid||e.fStltypeid==0) {
-            e.fStltypeid = e.fStltypeid.toString();
-          }
-        });
-        this.warehouseCrList = response.data.warehousebillsfeesCr;
-        response.data.warehousebillsfeesDr.map((e) => {
-          if (e.fFeeunitid) {
-            e.fFeeunitid = e.fFeeunitid.toString();
-          }
-          if (e.fStltypeid||e.fStltypeid==0) {
-            e.fStltypeid = e.fStltypeid.toString();
+        if (!this.copyStatus) {
+          this.detailList = response.data.warehouseBillsItem;
+          response.data.warehousebillsfeesCr.map((e) => {
+            if (e.fFeeunitid) {
+              e.fFeeunitid = e.fFeeunitid.toString();
+            }
+            if (e.fStltypeid || e.fStltypeid == 0) {
+              e.fStltypeid = e.fStltypeid.toString();
+            }
+          });
+          this.warehouseCrList = response.data.warehousebillsfeesCr;
+          response.data.warehousebillsfeesDr.map((e) => {
+            if (e.fFeeunitid) {
+              e.fFeeunitid = e.fFeeunitid.toString();
+            }
+            if (e.fStltypeid || e.fStltypeid == 0) {
+              e.fStltypeid = e.fStltypeid.toString();
+            }
+          });
+          this.warehouseDrList = response.data.warehousebillsfeesDr;
+          this.CntrTable = response.data.tCntrList;
+          if (response.data.enclosures) {
+            this.relevantAttachments = response.data.enclosures;
           }
           }
-        });
-        this.warehouseDrList = response.data.warehousebillsfeesDr;
-        this.CntrTable = response.data.tCntrList;
-        if (response.data.enclosures) {
-          this.relevantAttachments = response.data.enclosures;
+        }else{ 
+          this.$set(this.form, "fMblno", null);
         }
         }
       });
       });
     },
     },

+ 15 - 1
src/views/Warehousing/inStock/index.vue

@@ -258,7 +258,7 @@
             icon="el-icon-download"
             icon="el-icon-download"
             size="mini"
             size="mini"
             :disabled="single"
             :disabled="single"
-            @click="handleUpdate(null, 2)"
+            @click="copyUpdate"
             v-hasPermi="['agreement:agreementStorage:export']"
             v-hasPermi="['agreement:agreementStorage:export']"
             >复制新增
             >复制新增
           </el-button>
           </el-button>
@@ -479,6 +479,7 @@
       @changeShow="showAddOrUpdate"
       @changeShow="showAddOrUpdate"
       ref="addOrUpdateRef"
       ref="addOrUpdateRef"
       :chiId="formId"
       :chiId="formId"
+      :copyStatus="copyStatus"
       :key="timer"
       :key="timer"
     ></add-or-update>
     ></add-or-update>
   </div>
   </div>
@@ -665,6 +666,7 @@ export default {
       multiple: true,
       multiple: true,
       formId: null,
       formId: null,
       ids: [],
       ids: [],
+      copyStatus:null,
     };
     };
   },
   },
   // 使用子组件
   // 使用子组件
@@ -825,6 +827,7 @@ export default {
     /** 修改按钮操作 */
     /** 修改按钮操作 */
     handleUpdate(row) {
     handleUpdate(row) {
       const fId = row.fId || this.ids[0];
       const fId = row.fId || this.ids[0];
+      this.copyStatus=null
       this.formId = fId;
       this.formId = fId;
       this.$nextTick(() => {
       this.$nextTick(() => {
         this.$refs.addOrUpdateRef.init();
         this.$refs.addOrUpdateRef.init();
@@ -834,6 +837,17 @@ export default {
         this.pageShow2 = true;
         this.pageShow2 = true;
       }, 200);
       }, 200);
     },
     },
+    copyUpdate() {
+      this.formId = this.ids[0];
+      this.copyStatus = 2;
+      this.$nextTick(() => {
+        this.$refs.addOrUpdateRef.init();
+      });
+      setTimeout(() => {
+        this.pageShow = false;
+        this.pageShow2 = true;
+      }, 200);
+    },
     /** 删除按钮操作 */
     /** 删除按钮操作 */
     handleDelete(row) {
     handleDelete(row) {
       const ids = row.id || this.ids;
       const ids = row.id || this.ids;