优化
This commit is contained in:
@@ -284,9 +284,9 @@ function matchingDimensionRule(row: Record<string, unknown>): CustomerDimensionR
|
|||||||
))
|
))
|
||||||
if (!rules.length) return null
|
if (!rules.length) return null
|
||||||
return rules.find((rule) => {
|
return rules.find((rule) => {
|
||||||
const inner = [rule.innerLengthCm, rule.innerWidthCm, rule.innerHeightCm].sort((left, right) => right - left)
|
const inner = [rule.innerLengthCm, rule.innerWidthCm, rule.innerHeightCm].sort((left, right) => right - left)
|
||||||
return measured.every((value, index) => value <= inner[index])
|
return measured.every((value, index) => value <= inner[index])
|
||||||
}) || rules[rules.length - 1]
|
}) || rules[rules.length - 1]
|
||||||
}
|
}
|
||||||
|
|
||||||
function addCoefficientLabel(row?: Record<string, unknown>) {
|
function addCoefficientLabel(row?: Record<string, unknown>) {
|
||||||
|
|||||||
Reference in New Issue
Block a user