zhangyuewww 1 năm trước cách đây
mục cha
commit
7a7745273c
1 tập tin đã thay đổi với 17 bổ sung8 xóa
  1. 17 8
      src/views/tradeServicesManagement/warehouseReceiptAdd.vue

+ 17 - 8
src/views/tradeServicesManagement/warehouseReceiptAdd.vue

@@ -121,8 +121,8 @@
   } from '@/model/tradeServicesManagement/index'
 
   import {
-    getwarehouse
-  } from '@/model/houseSelfCollect/index'
+    xiala
+  } from '@/model/warehouse/index'
   import {
     getcomp
   } from '@/model/indexRx'
@@ -246,10 +246,12 @@
       },
       getWarehouse() {
         //获取仓库
-        getwarehouse({
-            compId: this.compId
+        xiala({
+            compId: this.compId,
+            warehouseType:1
           }).toPromise()
           .then(response => {
+            console.log(response,76)
             this.warehouseList = response
             this.deptBudgetList.warehouseName = response[0].warehouseName
             this.deptBudgetList.warehouseType = response[0].warehouseType
@@ -323,7 +325,7 @@
       },
       //仓位号切换
       changeWarehouseNo(val) {
-        
+        debugger
         let _data = this.cwNumberList
         for (let i = 0; i < _data.length; i++) {
           if (_data[i].binNumber == val) {
@@ -362,12 +364,17 @@
         }
       },
       //仓库切换
-      changeWarehouse(val) {
-        console.log('切换后仓库数据', val)
+      async changeWarehouse(val) {
+        
         let _data = this.warehouseList
+        
         for (let i = 0; i < _data.length; i++) {
-          if (_data[i].warehouseName == val) {
+          if (_data[i].warehouseName == val) {          
+            var data=await global.default.getDataByKey(this.db,'signalChat',1)
+            if(data){
             global.default.deleteDB(this.db,'signalChat',1)
+            }
+            
             this.goodstext='已选0辆车'
             this.deptBudgetList.warehouseName = _data[i].warehouseName
             this.cwNumberList = _data[i].positionInfos.length != 0 ? _data[i].positionInfos : []
@@ -384,6 +391,8 @@
             this.deptBudgetList.baseId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].baseId : ''
           }
         }
+        console.log('切换后仓库数据', this.deptBudgetList.warehouseId)
+        
         this.changeWarehouseNo(this.deptBudgetList.warehouseId)
       },
       inoutput() {