|
@@ -179,7 +179,7 @@
|
|
getbillno().toPromise().then((response) => {
|
|
getbillno().toPromise().then((response) => {
|
|
this.deptBudgetList.billNo = response
|
|
this.deptBudgetList.billNo = response
|
|
})
|
|
})
|
|
- this.getWarehouse()
|
|
|
|
|
|
+ // this.getWarehouse()
|
|
},
|
|
},
|
|
getcompList() {
|
|
getcompList() {
|
|
//获取公司名头
|
|
//获取公司名头
|
|
@@ -188,6 +188,7 @@
|
|
.then((res) => {
|
|
.then((res) => {
|
|
this.compOptionList = res
|
|
this.compOptionList = res
|
|
this.deptBudgetList.renown = res[0].compName
|
|
this.deptBudgetList.renown = res[0].compName
|
|
|
|
+ this.changeCompOptionList(res[0].compId)
|
|
})
|
|
})
|
|
.catch((err) => {})
|
|
.catch((err) => {})
|
|
},
|
|
},
|
|
@@ -199,21 +200,28 @@
|
|
.then(response => {
|
|
.then(response => {
|
|
this.warehouseList = response
|
|
this.warehouseList = response
|
|
this.deptBudgetList.warehouseName = response[0].warehouseName
|
|
this.deptBudgetList.warehouseName = response[0].warehouseName
|
|
- this.deptBudgetList.warehouseAddress = response[0].warehousePrivate + response[0].warehouseCity +
|
|
|
|
- response[0].warehouseArea + response[0].detailedAddress
|
|
|
|
- if(response[0].goodsNameInfos){
|
|
|
|
- this.goodsList = response[0].goodsNameInfos
|
|
|
|
- this.deptBudgetList.nowWeight = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].storage : ''
|
|
|
|
- this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useStorage
|
|
|
|
- this.deptBudgetList.goodsName = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].goodsName : ''
|
|
|
|
- this.deptBudgetList.goodsNameKey = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].goodsNameKey : ''
|
|
|
|
- }
|
|
|
|
|
|
+ this.deptBudgetList.warehouseAddress = response[0].warehousePrivate + response[0].warehouseCity + response[0].warehouseArea + response[0].detailedAddress
|
|
if(response[0].positionInfos){
|
|
if(response[0].positionInfos){
|
|
this.deptBudgetList.warehouseNoId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].id : ''
|
|
this.deptBudgetList.warehouseNoId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].id : ''
|
|
this.cwNumberList = response[0].positionInfos
|
|
this.cwNumberList = response[0].positionInfos
|
|
this.deptBudgetList.warehouseNo = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].binNumber : ''
|
|
this.deptBudgetList.warehouseNo = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].binNumber : ''
|
|
this.deptBudgetList.baseId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].baseId : ''
|
|
this.deptBudgetList.baseId = response[0].positionInfos.length != 0 ? response[0].positionInfos[0].baseId : ''
|
|
}
|
|
}
|
|
|
|
+ if(response[0].goodsNameInfos){
|
|
|
|
+ for(let i = 0 ; i < response[0].goodsNameInfos.length ; i++){
|
|
|
|
+ if(response[0].goodsNameInfos[i].binNumber == this.deptBudgetList.warehouseNo ){
|
|
|
|
+ this.goodsList.push(response[0].goodsNameInfos[i])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log(this.goodsList)
|
|
|
|
+ // this.goodsList = response[0].goodsNameInfos
|
|
|
|
+ this.deptBudgetList.nowWeight = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].storage : ''
|
|
|
|
+ this.deptBudgetList.useWeight = response[0].goodsNameInfos[0].useStorage
|
|
|
|
+ // this.deptBudgetList.goodsName = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].goodsName : ''
|
|
|
|
+ this.deptBudgetList.goodsName = this.goodsList[0].goodsName
|
|
|
|
+ this.deptBudgetList.goodsNameKey = response[0].goodsNameInfos.length != 0 ? response[0].goodsNameInfos[0].goodsNameKey : ''
|
|
|
|
+ }
|
|
|
|
+
|
|
this.deptBudgetList.warehouseId = response[0].id
|
|
this.deptBudgetList.warehouseId = response[0].id
|
|
if (!this.deptBudgetList.renown) this.deptBudgetList.renown = this.compOptionList[0].compName
|
|
if (!this.deptBudgetList.renown) this.deptBudgetList.renown = this.compOptionList[0].compName
|
|
if (!this.deptBudgetList.renownId) this.deptBudgetList.renownId = this.compOptionList[0].compId
|
|
if (!this.deptBudgetList.renownId) this.deptBudgetList.renownId = this.compOptionList[0].compId
|
|
@@ -226,6 +234,8 @@
|
|
if (_data[i].id == val) {
|
|
if (_data[i].id == val) {
|
|
this.deptBudgetList.goodsNameKey = _data[i].goodsNameKey
|
|
this.deptBudgetList.goodsNameKey = _data[i].goodsNameKey
|
|
this.deptBudgetList.goodsName = _data[i].goodsName
|
|
this.deptBudgetList.goodsName = _data[i].goodsName
|
|
|
|
+ this.deptBudgetList.nowWeight = _data[i].storage
|
|
|
|
+ this.deptBudgetList.useWeight = _data[i].useStorage
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -240,6 +250,7 @@
|
|
},
|
|
},
|
|
//仓位号切换
|
|
//仓位号切换
|
|
changeWarehouseNo(val) {
|
|
changeWarehouseNo(val) {
|
|
|
|
+
|
|
let _data = this.cwNumberList
|
|
let _data = this.cwNumberList
|
|
for (let i = 0; i < _data.length; i++) {
|
|
for (let i = 0; i < _data.length; i++) {
|
|
if (_data[i].id == val) {
|
|
if (_data[i].id == val) {
|
|
@@ -248,6 +259,21 @@
|
|
this.deptBudgetList.baseId = _data.baseId
|
|
this.deptBudgetList.baseId = _data.baseId
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ this.goodsList = []
|
|
|
|
+ for(let j = 0 ; j < this.warehouseList.length ; j++){
|
|
|
|
+ if(this.deptBudgetList.warehouseName == this.warehouseList[j].warehouseName){
|
|
|
|
+ for(let _num = 0 ; _num < this.warehouseList[j].goodsNameInfos.length; _num++ ){
|
|
|
|
+ if( this.deptBudgetList.warehouseNo == this.warehouseList[j].goodsNameInfos[_num].binNumber){
|
|
|
|
+ this.goodsList.push(this.warehouseList[j].goodsNameInfos[_num])
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if(this.goodsList.length == 0){
|
|
|
|
+ this.deptBudgetList.goodsName = ""
|
|
|
|
+ }else{
|
|
|
|
+ this.deptBudgetList.goodsName = this.goodsList[0].goodsName
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 名头切换
|
|
// 名头切换
|
|
changeCompOptionList(val) {
|
|
changeCompOptionList(val) {
|
|
@@ -271,7 +297,7 @@
|
|
this.cwNumberList = _data[i].positionInfos.length != 0 ? _data[i].positionInfos : []
|
|
this.cwNumberList = _data[i].positionInfos.length != 0 ? _data[i].positionInfos : []
|
|
this.deptBudgetList.warehouseNo = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].binNumber : ''
|
|
this.deptBudgetList.warehouseNo = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].binNumber : ''
|
|
this.deptBudgetList.warehouseAddress = _data[i].warehousePrivate + _data[i].warehouseCity + _data[i].warehouseArea + _data[i].detailedAddress
|
|
this.deptBudgetList.warehouseAddress = _data[i].warehousePrivate + _data[i].warehouseCity + _data[i].warehouseArea + _data[i].detailedAddress
|
|
- this.goodsList = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos : []
|
|
|
|
|
|
+ // this.goodsList = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos : []
|
|
this.deptBudgetList.nowWeight = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].storage : ''
|
|
this.deptBudgetList.nowWeight = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].storage : ''
|
|
this.deptBudgetList.useWeight =_data[i].goodsNameInfos.length!=0?_data[i].goodsNameInfos[0].useStorage:''
|
|
this.deptBudgetList.useWeight =_data[i].goodsNameInfos.length!=0?_data[i].goodsNameInfos[0].useStorage:''
|
|
this.deptBudgetList.goodsName = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].goodsName : ''
|
|
this.deptBudgetList.goodsName = _data[i].goodsNameInfos.length != 0 ? _data[i].goodsNameInfos[0].goodsName : ''
|
|
@@ -281,6 +307,7 @@
|
|
this.deptBudgetList.baseId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].baseId : ''
|
|
this.deptBudgetList.baseId = _data[i].positionInfos.length != 0 ? _data[i].positionInfos[0].baseId : ''
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ this.changeWarehouseNo(this.deptBudgetList.warehouseId)
|
|
},
|
|
},
|
|
inoutput() {
|
|
inoutput() {
|
|
this.$router.push({
|
|
this.$router.push({
|