| | |
| | | |
| | | const INPUT_WEIGHT_PARAM_ITEM = "投入重量/数量"; |
| | | |
| | | /** 参数项展示名(兼容库内旧名「投入重量」) */ |
| | | /** 参数项展示名 */ |
| | | const displayParameterItem = (name) => { |
| | | const trimmed = String(name ?? "").trim(); |
| | | if (trimmed === "投入重量") return INPUT_WEIGHT_PARAM_ITEM; |
| | | if (trimmed === "投入重量/数量") return INPUT_WEIGHT_PARAM_ITEM; |
| | | return trimmed; |
| | | }; |
| | | |
| | |
| | | |
| | | const isInputWeightItem = (item) => { |
| | | const name = String(item?.parameterItem ?? "").trim(); |
| | | return (name === "投入重量" || name.includes(INPUT_WEIGHT_PARAM_ITEM)) && |
| | | normalizeUnit(item?.unit) === "kg"; |
| | | const unit = normalizeUnit(item?.unit); |
| | | return name.includes(INPUT_WEIGHT_PARAM_ITEM) && |
| | | (unit === "kg" || unit.startsWith("kg/")); |
| | | }; |
| | | |
| | | const isBlankCoeffItem = (item) => |
| | | String(item?.parameterItem ?? "").includes("生坯系数") && |
| | | normalizeUnit(item?.unit) === "g"; |
| | | const isBlankCoeffItem = (item) => { |
| | | const unit = normalizeUnit(item?.unit); |
| | | return String(item?.parameterItem ?? "").includes("生坯系数") && |
| | | (unit === "g" || unit.startsWith("g/")); |
| | | }; |
| | | |
| | | /** 投入重量/数量(KG) = 本次生产数量 × 生坯系数(g) / 1000 */ |
| | | const syncFormingInputWeight = () => { |