qukaidi 4 年之前
父節點
當前提交
48932e2fe8

+ 5 - 3
src/views/warehouseBusiness/goodsTransfer/index.vue

@@ -3426,6 +3426,10 @@ export default {
 
     /** 修改按钮操作 */
     handleUpdate(row, status) {
+      if (!this.dataList.length) {
+          this.form.fProductName = "";
+          this.form.fMarks = "";
+      }
       if (status === 2) {
         this.goodsRemoteMethod();
         getGoodsTransfer(this.idCopy).then((response) => {
@@ -3433,6 +3437,7 @@ export default {
             this.form = response.data.warehousebills;
              this.form.fProductName = "";
             this.form.fMarks = "";
+            this.form.fMblno=""
             queryUserVal().then((response) => {
               this.Lander = response.user.userName;
               this.form.fStorekeeper = response.user.nickName;
@@ -3455,9 +3460,6 @@ export default {
           this.KHblnoOptions = response.data.corps;
           this.fWbuOptions = response.data.feesList;
           this.warehouseOptions = response.data.warehouse;
-               if(response.data.warehouseBillsItem.length>0){
-              this.form.fMblno=""
-            }
             this.dataList = [];
           for (let list in this.dataList) {
             // if (this.dataList[list].fBillstatus && this.dataList[list].fBillstatus === 6) {

+ 11 - 3
src/views/warehouseBusiness/inStock/index.vue

@@ -5999,6 +5999,7 @@ export default {
             this.form = response.data.warehousebills;
             this.form.fProductName = "";
             this.form.fMarks = "";
+            this.form.fMblno = "";
             queryUserVal().then((response) => {
               this.userVal = response.user;
               this.current = response.user.userName;
@@ -6037,9 +6038,6 @@ export default {
             );
           }
           if (response.data.warehouseBillsItem) {
-            if (response.data.warehouseBillsItem.length > 0) {
-              this.form.fMblno = "";
-            }
             this.dataList = [];
             for (let list in this.dataList) {
               this.$set(this.dataList[list], "fBillstatus", 10);
@@ -6163,6 +6161,10 @@ export default {
           }
           if (response.data.warehouseBillsItem) {
             this.dataList = response.data.warehouseBillsItem;
+            if (!this.dataList.length) {
+              this.form.fProductName = "";
+              this.form.fMarks = "";
+            }
             for (let list in this.dataList) {
               this.$set(
                 this.dataList[list],
@@ -6200,6 +6202,10 @@ export default {
           }
           if (response.data.warehouseBillsItem) {
             this.dataList = response.data.warehouseBillsItem;
+               if (!this.dataList.length) {
+          this.form.fProductName = "";
+          this.form.fMarks = "";
+      }
             for (let list in this.dataList) {
               if (this.dataList[list].fBillstatus > 10) {
                 this.formBrowseStatus = true;
@@ -7164,6 +7170,8 @@ export default {
       this.$refs["form"].validate((valid) => {
         if (valid) {
           if (!this.dataList.length) {
+            this.form.fProductName = "";
+            this.form.fMarks = "";
             // this.form.fBillstatus = status
             this.form.fNetweight = this.fNetweight;
             this.form.fPlanvolumn = this.fPlanvolumn;

+ 16 - 13
src/views/warehouseBusiness/outStock/index.vue

@@ -898,8 +898,8 @@
               </el-col>
             </el-row>
           </el-col>
-          <el-col :span="8"> 
-               <el-form-item>
+          <el-col :span="8">
+            <el-form-item>
               <el-table
                 :data="CntrTable"
                 style="width: 80%"
@@ -949,8 +949,7 @@
                       type="text"
                       @click.native.prevent="deleteRow(scope.$index, CntrTable)"
                       icon="el-icon-delete"
-                      ></el-button
-                    >
+                    ></el-button>
                   </template>
                 </el-table-column>
               </el-table>
@@ -4326,7 +4325,7 @@ export default {
     }
   },
   methods: {
-      addRow() {
+    addRow() {
       var obj = {};
       this.CntrTable.push(obj);
     },
@@ -4482,7 +4481,7 @@ export default {
                 return prev;
               }
             }, 0);
-            if (index === 13 ||index===14) {
+            if (index === 13 || index === 14) {
               sums[index] = (sums[index] / 1000).toFixed(2) + "(吨)";
             }
             if (index === 12) {
@@ -5765,6 +5764,7 @@ export default {
             this.form = response.data.warehousebills;
             this.form.fProductName = "";
             this.form.fMarks = "";
+            this.form.fMblno = "";
             queryUserVal().then((response) => {
               this.current = response.user.userName;
               this.form.fStorekeeper = response.user.nickName;
@@ -5790,9 +5790,6 @@ export default {
             this.$set(this.form, "fBillno", null);
           }
           if (response.data.warehouseBillsItem) {
-            if(response.data.warehouseBillsItem.length>0){
-              this.form.fMblno=""
-            }
             this.dataList = [];
             for (let list in this.dataList) {
               this.$set(this.dataList[list], "fBillstatus", 10);
@@ -5909,6 +5906,10 @@ export default {
           }
           if (response.data.warehouseBillsItem) {
             this.dataList = response.data.warehouseBillsItem;
+            if (!this.dataList.length) {
+              this.form.fProductName = "";
+              this.form.fMarks = "";
+            }
             for (let list in this.dataList) {
               this.$set(
                 this.dataList[list],
@@ -6814,6 +6815,10 @@ export default {
         //   }
         // }
         if (valid) {
+          if (!this.dataList.length) {
+            this.form.fProductName = "";
+            this.form.fMarks = "";
+          }
           this.form.fNetweight = this.fNetweight;
           this.form.fGrossweight = this.fGrossweight;
           this.form.fQty = this.fQty;
@@ -7173,6 +7178,8 @@ export default {
     deleteRow(index, rows) {
       rows.splice(index, 1);
       if (this.dataList.length === 0) {
+        this.form.fProductName = "";
+        this.form.fMarks= "";
         this.formBrowseStatus = false;
         this.contrOl = false;
         return false;
@@ -7183,10 +7190,6 @@ export default {
           return false;
         }
       }
-      if(this.dataList.length==0){
-        this.form.fProductName = "";
-        this.form.fMarks = "";
-      }
     },
     /* 远程模糊查询用户 */
     corpsRemoteMethod(name) {

+ 6 - 4
src/views/warehouseBusiness/stockTransfer/index.vue

@@ -5369,6 +5369,10 @@ export default {
       listFees(query).then((response) => {
         this.fDNameOptions = response.rows;
       });
+      if (!this.dataList.length) {
+          this.form.fProductName = "";
+          this.form.fMarks = "";
+      }
       if (status === 2) {
         this.goodsRemoteMethod();
         getStockTransfer(this.idCopy).then((response) => {
@@ -5376,6 +5380,7 @@ export default {
             this.form = response.data.warehousebills;
             this.form.fProductName = "";
             this.form.fMarks = "";
+            this.form.fMblno=""
             queryUserVal().then((response) => {
               this.Lander = response.user.userName;
               this.form.fStorekeeper = response.user.nickName;
@@ -5412,9 +5417,6 @@ export default {
           }
 
           if (response.data.warehouseBillsItem) {
-            if(response.data.warehouseBillsItem.length>0){
-              this.form.fMblno=""
-            }
             this.dataList = [];
             for (let list in this.dataList) {
               if (!this.form.fMblno) {
@@ -6713,7 +6715,7 @@ export default {
     deleteRow(index, rows) {
       rows.splice(index, 1);
       if (this.dataList.length === 0) {
-         this.form.fProductName = "";
+        this.form.fProductName = "";
         this.form.fMarks = "";
         this.form.fMblno = "";
         this.formBrowseStatus = false;