lilei 1 anno fa
parent
commit
627c99f75f
1 ha cambiato i file con 10 aggiunte e 4 eliminazioni
  1. 10 4
      src/views/productManagement/shelfNoManage/editHwModal.vue

+ 10 - 4
src/views/productManagement/shelfNoManage/editHwModal.vue

@@ -33,6 +33,7 @@
               v-model="form.warehouseSn"
               isPermission
               placeholder="请选择仓库"
+              @load="warehouseLoad"
             />
           </a-form-model-item>
         </div>
@@ -126,6 +127,10 @@ export default {
         }
       })
     },
+    warehouseLoad (defSn, defObj) {
+      const def = this.$store.state.app.defWarehouse || defObj
+      this.form.warehouseSn = def && def.warehouseSn || undefined
+    },
     productCodeChange (val) {
       this.form.productSn = val.key || undefined
       this.form.productCode = val.row && val.row.code ? val.row.code : undefined
@@ -133,9 +138,9 @@ export default {
     },
     resetData () {
       this.productName = ''
-      if (this.type == 'add'){
-         this.$refs.productCodeList&&this.$refs.productCodeList.resetForm()
-         this.$refs.ruleForm.resetFields()
+      if (this.type == 'add') {
+        this.$refs.productCodeList && this.$refs.productCodeList.resetForm()
+        this.$refs.ruleForm.resetFields()
       }
       this.form.stackPlaceCode = ''
       this.form.stackPlaceSn = undefined
@@ -165,8 +170,9 @@ export default {
           this.form.productSn = this.nowData.productSn
           this.form.productCode = this.nowData.product.code
           this.form.warehouseSn = this.nowData.warehouseSn
-        }else{
+        } else {
           this.form.stackPlaceCode = ''
+          this.warehouseLoad()
         }
       }
     }