Browse Source

no message

linwenxin 9 tháng trước cách đây
mục cha
commit
24e5e6cd0e

+ 16 - 0
src/views/auxiliaryFittings/AuxiliaryAccessoriesWarehouse/index.vue

@@ -207,6 +207,11 @@ export default {
             label: '调仓产品',
             prop: 'type',
             rules: [...required]
+          },
+          events: {
+            change: () => {
+              this.formData.items = []
+            }
           }
         },
         {
@@ -223,6 +228,11 @@ export default {
             label: '调出仓库',
             prop: 'outStorageId',
             rules: [...required]
+          },
+          events: {
+            change: () => {
+              this.formData.items = []
+            }
           }
         },
         {
@@ -239,6 +249,11 @@ export default {
             label: '调入仓库',
             prop: 'inStorageId',
             rules: [...required]
+          },
+          events: {
+            change: () => {
+              this.formData.items = []
+            }
           }
         },
         {
@@ -391,6 +406,7 @@ export default {
         this.websitSelectList = res1.data
         this.biyaowebsitId(this.formData.websitId)
         this.biyaooutStorageId(this.formData.outStorageId)
+        this.biyaooutwarehouseList()
       })
     },
     formSubmit(cancel) {

+ 27 - 17
src/views/auxiliaryFittings/AuxiliaryAccessoriesWarehouse/storage_table.js

@@ -488,33 +488,23 @@ export default {
   watch: {
     'formData.websitId'(newVal) {
       this.biyaowebsitId(newVal)
+      this.biyaooutwarehouseList()
+    },
+    'formData.type'(newVal) {
+      this.biyaooutwarehouseList()
     },
     'formData.outStorageId'(newValue) {
       this.biyaooutStorageId()
     }
   },
   methods: {
-    biyaooutStorageId() {
-      if (this.formData.outStorageId && this.formData.websitId) {
-        getGoods({
-          websitId: this.formData.websitId,
-          type: 'P',
-          saleType: '零售',
-          storageId: this.formData.outStorageId
-        }).then(res => {
-          this.peijianList = res.data
-        })
-      } else {
-        this.peijianList = []
-      }
-    },
-    biyaowebsitId(newVal) {
-      if (newVal) {
+    biyaooutwarehouseList() {
+      if (this.formData.type && this.formData.websitId) {
         storageListPageV2({
           pageNum: 1,
           pageSize: -1,
           params: [
-            { param: 'a.websit_id', compare: '=', value: newVal },
+            { param: 'a.websit_id', compare: '=', value: this.formData.websitId },
             { param: 'a.status', compare: '=', value: 'true' },
             {
               param: 'a.type',
@@ -532,6 +522,26 @@ export default {
         }).then(res => {
           this.warehouseList = res.data.records
         })
+      } else {
+        this.warehouseList = []
+      }
+    },
+    biyaooutStorageId() {
+      if (this.formData.outStorageId && this.formData.websitId) {
+        getGoods({
+          websitId: this.formData.websitId,
+          type: 'P',
+          saleType: '零售',
+          storageId: this.formData.outStorageId
+        }).then(res => {
+          this.peijianList = res.data
+        })
+      } else {
+        this.peijianList = []
+      }
+    },
+    biyaowebsitId(newVal) {
+      if (newVal) {
         getCategory({ websitId: newVal }).then(res => {
           this.mainList = res.data
         })