解决bug:单据录入的时候批次商品批号修改导致数量变化的bug
This commit is contained in:
@@ -533,32 +533,35 @@ export const BillModalMixin = {
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "batchNumber":
|
case "batchNumber":
|
||||||
batchNumber = value
|
//只针对销售出库、采购退货、其它出库
|
||||||
let depotItemId = ''
|
if(this.prefixNo === 'XSCK' || this.prefixNo === 'CGTH' || this.prefixNo === 'QTCK') {
|
||||||
if(this.model.id) {
|
batchNumber = value
|
||||||
//只有在保存之后的编辑页面下才获取明细id
|
let depotItemId = ''
|
||||||
let rowId = row.id
|
if(this.model.id) {
|
||||||
if(rowId.length<=19) {
|
//只有在保存之后的编辑页面下才获取明细id
|
||||||
depotItemId = rowId-0
|
let rowId = row.id
|
||||||
}
|
if(rowId.length<=19) {
|
||||||
}
|
depotItemId = rowId-0
|
||||||
getBatchNumberList({name:'', depotItemId: depotItemId, depotId: row.depotId, barCode: row.barCode, batchNumber: batchNumber}).then((res) => {
|
|
||||||
if (res && res.code === 200) {
|
|
||||||
if(res.data && res.data.rows) {
|
|
||||||
let info = res.data.rows[0]
|
|
||||||
operNumber = info.totalNum
|
|
||||||
taxRate = row.taxRate-0 //税率
|
|
||||||
unitPrice = row.unitPrice-0 //单价
|
|
||||||
allPrice = (unitPrice*operNumber).toFixed(2)-0
|
|
||||||
taxMoney =((taxRate*0.01)*allPrice).toFixed(2)-0
|
|
||||||
taxLastMoney = (allPrice + taxMoney).toFixed(2)-0
|
|
||||||
target.setValues([{rowKey: row.id, values: {expirationDate: info.expirationDateStr, operNumber: operNumber,
|
|
||||||
allPrice: allPrice, taxMoney: taxMoney, taxLastMoney: taxLastMoney}}])
|
|
||||||
target.recalcAllStatisticsColumns()
|
|
||||||
that.autoChangePrice(target)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
getBatchNumberList({name:'', depotItemId: depotItemId, depotId: row.depotId, barCode: row.barCode, batchNumber: batchNumber}).then((res) => {
|
||||||
|
if (res && res.code === 200) {
|
||||||
|
if(res.data && res.data.rows) {
|
||||||
|
let info = res.data.rows[0]
|
||||||
|
operNumber = info.totalNum
|
||||||
|
taxRate = row.taxRate-0 //税率
|
||||||
|
unitPrice = row.unitPrice-0 //单价
|
||||||
|
allPrice = (unitPrice*operNumber).toFixed(2)-0
|
||||||
|
taxMoney =((taxRate*0.01)*allPrice).toFixed(2)-0
|
||||||
|
taxLastMoney = (allPrice + taxMoney).toFixed(2)-0
|
||||||
|
target.setValues([{rowKey: row.id, values: {expirationDate: info.expirationDateStr, operNumber: operNumber,
|
||||||
|
allPrice: allPrice, taxMoney: taxMoney, taxLastMoney: taxLastMoney}}])
|
||||||
|
target.recalcAllStatisticsColumns()
|
||||||
|
that.autoChangePrice(target)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case "operNumber":
|
case "operNumber":
|
||||||
operNumber = value-0
|
operNumber = value-0
|
||||||
|
|||||||
Reference in New Issue
Block a user