|
@@ -254,6 +254,7 @@
|
|
|
<el-table-column
|
|
<el-table-column
|
|
|
label="计量数量"
|
|
label="计量数量"
|
|
|
prop="measureQuantity"
|
|
prop="measureQuantity"
|
|
|
|
|
+ :formatter="formatAvailableQuantity"
|
|
|
:show-overflow-tooltip="true"
|
|
:show-overflow-tooltip="true"
|
|
|
></el-table-column>
|
|
></el-table-column>
|
|
|
<el-table-column
|
|
<el-table-column
|
|
@@ -500,6 +501,12 @@
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ formatAvailableQuantity(row) {
|
|
|
|
|
+ // 盘点计划表格展示当前可用数量,而不是库存累计计量数量
|
|
|
|
|
+ const availableCountBase = Number(row.availableCountBase) || 0;
|
|
|
|
|
+ const lockQuantity = Number(row.lockQuantity) || 0;
|
|
|
|
|
+ return Math.round((availableCountBase - lockQuantity) * 100) / 100;
|
|
|
|
|
+ },
|
|
|
// 添加物品明细
|
|
// 添加物品明细
|
|
|
async addGoods(data) {
|
|
async addGoods(data) {
|
|
|
console.log(data);
|
|
console.log(data);
|
|
@@ -647,11 +654,16 @@
|
|
|
let params = {
|
|
let params = {
|
|
|
...this.addForm,
|
|
...this.addForm,
|
|
|
planDetailAddPOList: this.productList.map((item) => {
|
|
planDetailAddPOList: this.productList.map((item) => {
|
|
|
|
|
+ // 盘点计划保存当前可用数量,需扣除已锁库数量,避免与选择弹窗显示不一致
|
|
|
|
|
+ const availableCountBase = Number(item.availableCountBase) || 0;
|
|
|
|
|
+ const lockQuantity = Number(item.lockQuantity) || 0;
|
|
|
|
|
+ const measureQuantity = Math.round((availableCountBase - lockQuantity) * 100) / 100;
|
|
|
return {
|
|
return {
|
|
|
batchNo: item.batchNo,
|
|
batchNo: item.batchNo,
|
|
|
|
|
+ systemBatchNo: item.systemBatchNo,
|
|
|
categoryId: item.categoryId,
|
|
categoryId: item.categoryId,
|
|
|
categoryName: item.categoryName,
|
|
categoryName: item.categoryName,
|
|
|
- info: item
|
|
|
|
|
|
|
+ info: { ...item, measureQuantity }
|
|
|
};
|
|
};
|
|
|
})
|
|
})
|
|
|
};
|
|
};
|