fix: 多件档口入库码逐件回写 (#250)
This commit is contained in:
@@ -49,6 +49,8 @@ type InnerCodeRowView struct {
|
||||
CanMatch bool
|
||||
CanApply bool
|
||||
HasRemoteOldCode bool
|
||||
CodeCount int
|
||||
ExpectedAddCount int
|
||||
CanRecheck bool
|
||||
}
|
||||
|
||||
@@ -133,6 +135,10 @@ func innerCodeRowView(record model.InnerCodeRecord) InnerCodeRowView {
|
||||
record.Status == model.InnerCodeSkipped ||
|
||||
record.Status == model.InnerCodeFailed
|
||||
canApply := record.Status == model.InnerCodeReady
|
||||
codeCount := record.SourceDuplicateCount
|
||||
if codeCount < 1 {
|
||||
codeCount = 1
|
||||
}
|
||||
return InnerCodeRowView{
|
||||
ID: record.ID, BusinessDate: record.BusinessDate, OrderNumber: record.OrderNumber,
|
||||
Stall: displayInnerCodeValue(record.Stall), SpecRaw: displayInnerCodeValue(record.SpecRaw),
|
||||
@@ -143,6 +149,8 @@ func innerCodeRowView(record model.InnerCodeRecord) InnerCodeRowView {
|
||||
CanMatch: canMatch,
|
||||
CanApply: canApply,
|
||||
HasRemoteOldCode: canApply && record.RemoteInnerCode != "",
|
||||
CodeCount: codeCount,
|
||||
ExpectedAddCount: max(codeCount-1, 0),
|
||||
CanRecheck: record.Status == model.InnerCodeNeedsCheck,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user