merge: pull remote master and keep local dispatch qty with refill support
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
commit
5357434d9d
@ -1336,12 +1336,13 @@ function disphand(process: ProcessPlanItemVO, order?: OrderProcessPlanVO) {
|
||||
|
||||
const planQty = Number(entity.quantity) || 0
|
||||
const completedQty = Number(process.completedQty) || 0
|
||||
// 与后端 checkOverProcessNum 一致:可派 = 计划 − 已派工数量(不是计划 − 已完成)
|
||||
// 与后端 checkOverProcessNum 一致:可派 = 计划 + 补料 − 已派工数量
|
||||
const assignedQty = (process.assignWorkList ?? []).reduce(
|
||||
(s, a) => s + (Number(a.quantity) || 0),
|
||||
0,
|
||||
)
|
||||
const remainQty = Math.max(0, planQty - assignedQty)
|
||||
const refillNum = Number(process.refillNum) || 0
|
||||
const remainQty = Math.max(0, planQty + refillNum - assignedQty)
|
||||
dispatchmodal.value = true
|
||||
dispatchformRef.value?.restoreValidation()
|
||||
dispatchform.id = entity.id
|
||||
|
||||
@ -353,7 +353,7 @@ const columns: DataTableColumns<StockIn> = [
|
||||
render(row) {
|
||||
return h('div', [
|
||||
h('div', row.updateTime || '-'),
|
||||
h('div', { class: 'muted' }, row.updateBy ? `更新人 ${row.updateBy}` : ''),
|
||||
h('div', { class: 'muted' }, row.userName ? `更新人 ${row.userName}` : ''),
|
||||
])
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user