feat: 完善盘点出入库流程

This commit is contained in:
zgw
2026-06-25 18:31:17 +08:00
parent 4b8bc03343
commit c7c07c01cf
21 changed files with 1974 additions and 111 deletions

View File

@@ -377,14 +377,18 @@ export default {
if (!this.detailLines.some(l => l.detailId === s.detailId)) {
this.detailLines.push({
detailId: s.detailId,
stockDetailId: s.detailId,
stockId: s.stockId,
productId: s.productId,
productName: s.productName,
lotNo: s.lotNo || '',
cargoSpaceId: s.cargoSpaceId || '',
cargoSpaceName: s.cargoSpaceName || '',
trayCode: s.trayCode || '',
warehouseId: s.warehouseId || this.mainForm.warehouseId,
warehouseName: s.warehouseName || this.mainForm.warehouseName,
stockQuantity: Number(s.availableQuantity != null ? s.availableQuantity : s.quantity) || 0,
pdQuantity: 1, // 盘点数量默认1
pdQuantity: Number(s.availableQuantity != null ? s.availableQuantity : s.quantity) || 1,
remark: ''
})
}
@@ -424,14 +428,18 @@ export default {
const saveData = {
...this.mainForm,
details: this.detailLines.map(line => ({
stockId: line.stockId,
productId: line.productId,
productName: line.productName,
lotNo: line.lotNo || null,
cargoSpaceId: line.cargoSpaceId || null,
trayCode: line.trayCode || null,
quantity: line.pdQuantity, // 盘点数量
remark: line.remark || null
stockId: line.stockId,
stockDetailId: line.stockDetailId || line.detailId,
productId: line.productId,
productName: line.productName,
lotNo: line.lotNo || null,
cargoSpaceId: line.cargoSpaceId || null,
cargoSpaceName: line.cargoSpaceName || null,
warehouseId: line.warehouseId || this.mainForm.warehouseId,
warehouseName: line.warehouseName || this.mainForm.warehouseName,
trayCode: line.trayCode || null,
quantity: line.pdQuantity,
remark: line.remark || null
}))
}
const res = await saveWithDetails(saveData)