瀏覽代碼

修改下拉

mxx 3 年之前
父節點
當前提交
190ec86013

+ 4 - 2
src/common.js

@@ -1,4 +1,6 @@
-const Warehouse = {payname : ""}
+
+   const houseName= [{ payname: "" },{ payname: "" },{ payname: "" },{ payname: "" }]
+
 export default {
 export default {
-    Warehouse
+    houseName
 }
 }

+ 1 - 1
src/main.js

@@ -20,7 +20,7 @@ Vue.use(AMap);
 import $ from 'jquery'
 import $ from 'jquery'
 // import Warehouse from './common.js'
 // import Warehouse from './common.js'
 import Warehouse from './common.js'
 import Warehouse from './common.js'
-Vue.prototype.WAREHOUSE = Warehouse
+Vue.prototype.WAREHOUSE = Warehouse.houseName
 // 初始化vue-amap
 // 初始化vue-amap
 AMap.initAMapApiLoader({
 AMap.initAMapApiLoader({
   // 高德key
   // 高德key

+ 4 - 4
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -136,7 +136,7 @@
            for (let i = 0; i < this.warehouseList.length; i++) {
            for (let i = 0; i < this.warehouseList.length; i++) {
         if (this.warehouseList[i].id == this.selectVal) {
         if (this.warehouseList[i].id == this.selectVal) {
           this.warehouseName = this.warehouseList[i].warehouseName
           this.warehouseName = this.warehouseList[i].warehouseName
-          this.WAREHOUSE.payname = this.warehouseList[i].id
+          this.WAREHOUSE[0].payname = this.warehouseList[i].id
         }
         }
       }
       }
         let _obj = this.warehouseList.find((item) => {
         let _obj = this.warehouseList.find((item) => {
@@ -190,12 +190,12 @@
           // if(this.userJurisdiction){
           // if(this.userJurisdiction){
           //   this.warehouseList.unshift({warehouseName:response[0].flag})
           //   this.warehouseList.unshift({warehouseName:response[0].flag})
           // }
           // }
-                console.log(this.WAREHOUSE.payname)
+                console.log(this.WAREHOUSE[0].payname)
           this.selectVal = this.warehouseList[0].id
           this.selectVal = this.warehouseList[0].id
           if (this.warehouseName) {
           if (this.warehouseName) {
-            this.selectVal = this.WAREHOUSE.payname
+            this.selectVal = this.WAREHOUSE[0].payname
           } else {
           } else {
-            this.WAREHOUSE.payname = this.warehouseList[0].id
+            this.WAREHOUSE[0].payname = this.warehouseList[0].id
           }
           }
           this.warehouseName = this.warehouseList[0].warehouseName
           this.warehouseName = this.warehouseList[0].warehouseName
           if (this.warehouseList[0].allowEdit == 1) {
           if (this.warehouseList[0].allowEdit == 1) {

+ 5 - 4
src/views/houseSelfCollect/inspectionManagement.vue

@@ -189,7 +189,7 @@ export default {
           this.warehouseCount = this.warehouseList[i].count
           this.warehouseCount = this.warehouseList[i].count
           this.warehouseNo = this.warehouseList[i].No
           this.warehouseNo = this.warehouseList[i].No
           this.cangid = this.warehouseList[i].id
           this.cangid = this.warehouseList[i].id
-          this.WAREHOUSE.payname = this.warehouseList[i].value
+          this.WAREHOUSE[1].payname = this.warehouseList[i].value
           this.purchasePriceList = this.warehouseList[i].purchasePriceList
           this.purchasePriceList = this.warehouseList[i].purchasePriceList
         }
         }
       }
       }
@@ -251,9 +251,10 @@ export default {
           if(this.warehouseList.length > 0){
           if(this.warehouseList.length > 0){
             this.warehouseName =  this.warehouseList[0].value
             this.warehouseName =  this.warehouseList[0].value
              if (this.cangid) {
              if (this.cangid) {
-            this.warehouseName = this.WAREHOUSE.payname
-          } else {
-            this.WAREHOUSE.payname = this.warehouseList[0].value
+            this.warehouseName = this.WAREHOUSE[1].payname
+          } 
+          else {
+            this.WAREHOUSE[1].payname = this.warehouseList[0].value
           }
           }
             this.warehouseCount =  this.warehouseList[0].count
             this.warehouseCount =  this.warehouseList[0].count
             this.warehouseNo =  this.warehouseList[0].No
             this.warehouseNo =  this.warehouseList[0].No

+ 5 - 5
src/views/houseSelfCollect/paymentManagement.vue

@@ -233,7 +233,7 @@ export default {
     //     this.warehouseList = response
     //     this.warehouseList = response
     //     this.warehouseNameKey = this.warehouseList[0].id
     //     this.warehouseNameKey = this.warehouseList[0].id
     //     this.warehouseName = this.warehouseList[0].warehouseName
     //     this.warehouseName = this.warehouseList[0].warehouseName
-    //     this.WAREHOUSE.payname = this.warehouseList[0].warehouseName
+    //     this.WAREHOUSE[3].payname = this.warehouseList[0].warehouseName
     //     this.getList()
     //     this.getList()
     //   })
     //   })
     this.getWarehouse()
     this.getWarehouse()
@@ -247,12 +247,12 @@ export default {
         .toPromise()
         .toPromise()
         .then(response => {
         .then(response => {
           this.warehouseList = response
           this.warehouseList = response
-          console.log(this.WAREHOUSE.payname)
+          console.log(this.WAREHOUSE[3].payname)
           this.warehouseNameKey = this.warehouseList[0].id
           this.warehouseNameKey = this.warehouseList[0].id
           if (this.warehouseName) {
           if (this.warehouseName) {
-            this.warehouseNameKey = this.WAREHOUSE.payname
+            this.warehouseNameKey = this.WAREHOUSE[3].payname
           } else {
           } else {
-            this.WAREHOUSE.payname = this.warehouseList[0].id
+            this.WAREHOUSE[3].payname = this.warehouseList[0].id
           }
           }
 
 
           // this.getList()
           // this.getList()
@@ -560,7 +560,7 @@ export default {
       for (let i = 0; i < this.warehouseList.length; i++) {
       for (let i = 0; i < this.warehouseList.length; i++) {
         if (this.warehouseList[i].id == this.warehouseNameKey) {
         if (this.warehouseList[i].id == this.warehouseNameKey) {
           this.warehouseName = this.warehouseList[i].warehouseName
           this.warehouseName = this.warehouseList[i].warehouseName
-          this.WAREHOUSE.payname = this.warehouseList[i].id
+          this.WAREHOUSE[3].payname = this.warehouseList[i].id
         }
         }
       }
       }
       this.getList()
       this.getList()

+ 3 - 3
src/views/houseSelfCollect/weighingManagement.vue

@@ -198,7 +198,7 @@ export default {
           this.warehouseId = this.warehouseList[i].warehouseId
           this.warehouseId = this.warehouseList[i].warehouseId
          this.purchasePriceList = this.warehouseList[i].warehouseList
          this.purchasePriceList = this.warehouseList[i].warehouseList
           this.allowEdit = this.warehouseList[i].allowEdit
           this.allowEdit = this.warehouseList[i].allowEdit
-            this.WAREHOUSE.payname = this.warehouseList[i].value
+            this.WAREHOUSE[2].payname = this.warehouseList[i].value
         }
         }
       }
       }
       this.getList()
       this.getList()
@@ -255,9 +255,9 @@ export default {
           }
           }
                 this.warehouseName =  this.warehouseList[0].value
                 this.warehouseName =  this.warehouseList[0].value
              if (this.warehouseId) {
              if (this.warehouseId) {
-            this.warehouseName = this.WAREHOUSE.payname
+            this.warehouseName = this.WAREHOUSE[2].payname
           } else {
           } else {
-            this.WAREHOUSE.payname = this.warehouseList[0].value
+            this.WAREHOUSE[2].payname = this.warehouseList[0].value
           }
           }
           this.allowEdit = this.warehouseList[0].allowEdit
           this.allowEdit = this.warehouseList[0].allowEdit
           this.warehouseId = this.warehouseList[0].warehouseId
           this.warehouseId = this.warehouseList[0].warehouseId