|
@@ -1211,19 +1211,25 @@
|
|
if(this.totalReserves[j].cost && this.totalReserves[j].stockNum){
|
|
if(this.totalReserves[j].cost && this.totalReserves[j].stockNum){
|
|
this.totalReserves[j].totalMoney = (Number(this.totalReserves[j].cost) * Number(this.totalReserves[j].stockNum)).toFixed(3)
|
|
this.totalReserves[j].totalMoney = (Number(this.totalReserves[j].cost) * Number(this.totalReserves[j].stockNum)).toFixed(3)
|
|
this.totalMoney = (Number(this.totalMoney) + Number(this.totalReserves[j].totalMoney)).toFixed(3)
|
|
this.totalMoney = (Number(this.totalMoney) + Number(this.totalReserves[j].totalMoney)).toFixed(3)
|
|
|
|
+ for(let r = 0;r<response.warehouseNumViewList.length;r++){
|
|
|
|
+ if(this.totalReserves[j].goodsName == response.warehouseNumViewList[r].goodsName){
|
|
|
|
+ this.$message.error('当前仓库无潮粮库存,无需折算!')
|
|
|
|
+ this.value = '0'
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // debugger
|
|
|
|
if(response.warehouseNumViewList.length != 0){
|
|
if(response.warehouseNumViewList.length != 0){
|
|
var result = []
|
|
var result = []
|
|
- for(let i = 0; i < response.warehouseNumViewList.length ; i++){
|
|
|
|
- let param ={}
|
|
|
|
- if (response.warehouseNumViewList[i].pureWeight) {
|
|
|
|
- param.goodsName =response.warehouseNumViewList[i].goodsName
|
|
|
|
- param.stockNum = Number(response.warehouseNumViewList[i].pureWeight).toFixed(3)
|
|
|
|
- param.conversionCost = (Number(this.totalMoney) / Number(param.stockNum)).toFixed(3)
|
|
|
|
- result.push(param)
|
|
|
|
- }
|
|
|
|
|
|
+ for(let i = 0; i < response.warehouseNumViewList.length ; i++){
|
|
|
|
+ let param ={}
|
|
|
|
+ if (response.warehouseNumViewList[i].pureWeight) {
|
|
|
|
+ param.goodsName =response.warehouseNumViewList[i].goodsName
|
|
|
|
+ param.stockNum = Number(response.warehouseNumViewList[i].pureWeight).toFixed(3)
|
|
|
|
+ param.conversionCost = (Number(this.totalMoney) / Number(param.stockNum)).toFixed(3)
|
|
|
|
+ result.push(param)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
console.log(result)
|
|
console.log(result)
|
|
this.totalReserves = result
|
|
this.totalReserves = result
|