Browse Source

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

zhongtianhaoyuan 3 years ago
parent
commit
cdd5c058da
1 changed files with 14 additions and 18 deletions
  1. 14 18
      src/views/outboundManagement/qualityInspectionManagement.vue

+ 14 - 18
src/views/outboundManagement/qualityInspectionManagement.vue

@@ -110,7 +110,8 @@ export default {
     }
     }
   },
   },
   activated() {
   activated() {
-    this.getList()
+    this.selectWarehouse()
+		this.showType = this.isShow
   },
   },
   methods: {
   methods: {
     find(){
     find(){
@@ -127,7 +128,12 @@ export default {
       })
       })
     },
     },
     selecttaskType(e) {
     selecttaskType(e) {
-      console.log(e)
+      for (let i = 0; i < this.warehouseList.length; i++) {
+					if (this.warehouseList[i].value == e) {
+						this.cangid = this.warehouseList[i].cangid
+					}
+				}
+				this.getList()
     },
     },
     handleSizeChange(val) {
     handleSizeChange(val) {
       console.log(`每页 ${val} 条`)
       console.log(`每页 ${val} 条`)
@@ -139,8 +145,8 @@ export default {
       console.log(`当前页: ${val}`)
       console.log(`当前页: ${val}`)
       this.getList()
       this.getList()
     },
     },
-    getList() {
-      selectWarehouseSelf({
+  selectWarehouse(){
+    selectWarehouseSelf({
         compId: sessionStorage.getItem('ws-pf_compId'),
         compId: sessionStorage.getItem('ws-pf_compId'),
       })
       })
         .toPromise()
         .toPromise()
@@ -148,15 +154,16 @@ export default {
           this.warehouseList = []
           this.warehouseList = []
           for (let i = 0; i < response.length; i++) {
           for (let i = 0; i < response.length; i++) {
             this.warehouseList.push({
             this.warehouseList.push({
-              // valueKey: i,
               value: response[i].warehouseName,
               value: response[i].warehouseName,
-              id: response[i].id,
+              warehouseId: response[i].id,
             })
             })
           }
           }
           this.warehouseName = response[0].warehouseName
           this.warehouseName = response[0].warehouseName
           this.cangid = response[0].id
           this.cangid = response[0].id
+          this.getList()
         })
         })
-
+    },
+    getList() {
       getinspectList({
       getinspectList({
         compId: sessionStorage.getItem('ws-pf_compId'),
         compId: sessionStorage.getItem('ws-pf_compId'),
         currentPage: this.currentPage,
         currentPage: this.currentPage,
@@ -167,18 +174,7 @@ export default {
       })
       })
         .toPromise()
         .toPromise()
         .then((response) => {
         .then((response) => {
-          // for (let i = 0; i < response.length; i++) {
-          //   this.warehouseList.push({
-          //     valueKey: i,
-          //     value: response[i].warehouseName,
-          //     id:response[i].id
-          //   })
-          // }
-          // this.searchTypeText = response[0].warehouseName
-          // this.id = response[0].id
-          // console.log(response)
           this.inspect = response.records
           this.inspect = response.records
-          console.log(this.inspect,'容重')
           this.deptBudgetTotal = response.total
           this.deptBudgetTotal = response.total
         })
         })
     },
     },