|
@@ -159,6 +159,7 @@ export default {
|
|
|
searchType: 0,
|
|
|
warehouseName: '',
|
|
|
inspect: [],
|
|
|
+ warehouseList1:[],
|
|
|
warehouseList: [],
|
|
|
cangid: '', //仓库id
|
|
|
warehouseCount: '',
|
|
@@ -215,6 +216,11 @@ export default {
|
|
|
this.WAREHOUSE[1].payname = this.warehouseList[i].value
|
|
|
}
|
|
|
}
|
|
|
+ for(let i = 0 ; i < this.warehouseList1.length; i++){
|
|
|
+ if(this.warehouseList1[i].warehouseName == e){
|
|
|
+ sessionStorage.setItem('houseSelfCollect_house',JSON.stringify(this.warehouseList[i]))
|
|
|
+ }
|
|
|
+ }
|
|
|
this.getList()
|
|
|
},
|
|
|
del(row) {
|
|
@@ -260,26 +266,36 @@ export default {
|
|
|
})
|
|
|
.toPromise()
|
|
|
.then((response) => {
|
|
|
+ this.warehouseList1=response
|
|
|
this.warehouseList = []
|
|
|
+ let _wareHouse = sessionStorage.getItem('houseSelfCollect_house')
|
|
|
+ _wareHouse = JSON.parse(_wareHouse)
|
|
|
for (let i = 0; i < response.length; i++) {
|
|
|
this.warehouseList.push({
|
|
|
value: response[i].warehouseName,
|
|
|
id: response[i].id,
|
|
|
count: response[i].count,
|
|
|
No:response[i].commonWarehouseNo
|
|
|
- })
|
|
|
+ })
|
|
|
+ if (_wareHouse) {
|
|
|
+ this.cangid = _wareHouse.id
|
|
|
+ this.warehouseName = _wareHouse.warehouseName
|
|
|
+ this.warehouseNo =_wareHouse.commonWarehouseNo
|
|
|
+ this.warehouseCount = _wareHouse.count
|
|
|
+ } else {
|
|
|
if (this.cangid&&this.cangid == response[i].id) {
|
|
|
this.warehouseName = response[i].warehouseName
|
|
|
this.warehouseCount = response[i].count
|
|
|
this.warehouseNo = response[i].commonWarehouseNo
|
|
|
}
|
|
|
+ if(this.warehouseList.length > 0 && !this.cangid){
|
|
|
+ this.warehouseName = this.warehouseList[0].value
|
|
|
+ this.warehouseCount = this.warehouseList[0].count
|
|
|
+ this.warehouseNo = this.warehouseList[0].No
|
|
|
+ this.cangid = this.warehouseList[0].id
|
|
|
+ this.WAREHOUSE[1].payname = this.warehouseList[0].value
|
|
|
+ }
|
|
|
}
|
|
|
- if(this.warehouseList.length > 0 && !this.cangid){
|
|
|
- this.warehouseName = this.warehouseList[0].value
|
|
|
- this.warehouseCount = this.warehouseList[0].count
|
|
|
- this.warehouseNo = this.warehouseList[0].No
|
|
|
- this.cangid = this.warehouseList[0].id
|
|
|
- this.WAREHOUSE[1].payname = this.warehouseList[0].value
|
|
|
}
|
|
|
this.getList()
|
|
|
})
|