feat(wms/report): 添加差值计算和异常信息展示功能
refactor(wms/report): 替换合计信息为差值显示 feat(wms/coil): 增加创建时间和创建人字段 feat(crm/contract): 添加合同导出按钮
This commit is contained in:
@@ -13,6 +13,11 @@ const calcSummary = (list, lossList) => {
|
||||
const totalWeight = parseFloat((outTotalWeight + lossTotalWeight).toFixed(2))
|
||||
const totalAvgWeight = totalCount > 0 ? (totalWeight / totalCount)?.toFixed(2) : 0
|
||||
|
||||
// 计算数量、总重、均重的插值
|
||||
const countDiff = Math.abs(outCount - lossCount)
|
||||
const weightDiff = Math.abs(parseFloat((outTotalWeight - lossTotalWeight).toFixed(2)))
|
||||
const avgWeightDiff = Math.abs(parseFloat((outAvgWeight - lossAvgWeight).toFixed(2)))
|
||||
|
||||
// 成品比率
|
||||
const passRate = outCount > 0 && lossTotalWeight > 0 ? (outTotalWeight / lossTotalWeight) : 0
|
||||
// 损失比率
|
||||
@@ -38,6 +43,9 @@ const calcSummary = (list, lossList) => {
|
||||
totalCount,
|
||||
totalWeight: totalWeight.toFixed(2),
|
||||
totalAvgWeight,
|
||||
countDiff,
|
||||
weightDiff,
|
||||
avgWeightDiff,
|
||||
passRate: (passRate * 100)?.toFixed(2) + '%',
|
||||
lossRate: (lossRate * 100)?.toFixed(2) + '%',
|
||||
abRate: (abRate * 100)?.toFixed(2) || 0,
|
||||
@@ -163,6 +171,13 @@ const calcMSummary = (list, lossList) => {
|
||||
const totalWeight = parseFloat((outTotalWeight + lossTotalWeight).toFixed(2))
|
||||
const totalAvgWeight = totalCount > 0 ? (totalWeight / totalCount)?.toFixed(2) : 0
|
||||
|
||||
// 数量差值
|
||||
const countDiff = Math.abs(outCount - lossCount)
|
||||
// 总重差值
|
||||
const weightDiff = Math.abs(parseFloat((outTotalWeight - lossTotalWeight).toFixed(2)))
|
||||
// 均重差值
|
||||
const avgWeightDiff = Math.abs(parseFloat((outAvgWeight - lossAvgWeight).toFixed(2)))
|
||||
|
||||
// 成品比率
|
||||
const passRate = outCount > 0 && lossTotalWeight > 0 ? (outTotalWeight / lossTotalWeight) : 0
|
||||
// 损失比率
|
||||
@@ -189,6 +204,9 @@ const calcMSummary = (list, lossList) => {
|
||||
totalCount,
|
||||
totalWeight: totalWeight.toFixed(2),
|
||||
totalAvgWeight,
|
||||
countDiff,
|
||||
weightDiff: weightDiff.toFixed(2),
|
||||
avgWeightDiff,
|
||||
passRate: (passRate * 100)?.toFixed(2) + '%',
|
||||
lossRate: (lossRate * 100)?.toFixed(2) + '%',
|
||||
abRate: (abRate * 100)?.toFixed(2) || 0,
|
||||
|
||||
Reference in New Issue
Block a user