zxz há 3 anos atrás
pai
commit
88e4bdf05d
1 ficheiros alterados com 14 adições e 18 exclusões
  1. 14 18
      src/views/outboundManagement/qualityInspectionManagement.vue

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

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