src/views/productionManagement/productionRecords/index.vue
@@ -83,9 +83,11 @@ const { proxy } = getCurrentInstance(); const { parameter_tyep } = proxy.useDict("parameter_tyep"); /** 系统内置参数「投入重量」,不可编辑、删除 */ const isLockedParam = (row) => String(row?.parameterItem ?? "").trim() === "投入重量"; /** 系统内置参数「投入重量/数量」,不可编辑、删除(兼容旧名「投入重量」) */ const isLockedParam = (row) => { const name = String(row?.parameterItem ?? "").trim(); return name === "投入重量/数量" || name === "投入重量"; }; const tableColumn = ref([ { label: "参数编码", prop: "code" }, src/views/productionManagement/productionReporting/components/Detail.vue
@@ -71,7 +71,7 @@ <el-descriptions-item v-for="item in (otherData.rows || [])" :key="item.parameterItem" :label="`${item.parameterItem}`" :label="item.parameterItem === '投入重量' ? '投入重量/数量' : item.parameterItem" > {{ item.value || '-' }} </el-descriptions-item> src/views/productionManagement/workOrder/components/CopperPrintingForm.vue
@@ -23,7 +23,7 @@ type: Object, default: () => ({}), }, /** 工单 BOM 投入重量,回显到「投入重量」 */ /** 工单 BOM 投入重量,回显到「投入重量/数量」 */ bomInputQty: { type: Number, default: null, @@ -88,7 +88,7 @@ copperFiringTime: undefined, // 烧铜进炉时间 steelFiringTime: undefined, // 烧钢出炉时间 weight: undefined, // 重量(kg/pos) inputWeight: undefined, // 投入重量(KG) inputWeight: undefined, // 投入重量/数量(KG) copperSmeltingTemperatureProfile: undefined, // 烧铜温度曲线 remark: undefined, // 备注 } @@ -496,7 +496,7 @@ </td> </tr> <tr class="report-row report-row--double"> <td class="label" colspan="2">投入重量(KG)</td> <td class="label" colspan="2">投入重量(KG)/数量</td> <td colspan="19" class="cell-field"> <el-input-number v-if="props.isEdit" src/views/productionManagement/workOrder/components/GranulationForm.vue
@@ -21,7 +21,7 @@ type: Object, default: () => ({}), }, /** 工单 BOM 投入重量,回显到「投入重量」 */ /** 工单 BOM 投入重量,回显到「投入重量/数量」 */ bomInputQty: { type: Number, default: null, @@ -126,7 +126,7 @@ confirmName: undefined, }, remark: undefined, // 备注 inputWeight: undefined, // 投入重量(KG) inputWeight: undefined, // 投入重量/数量(KG) } }) @@ -886,7 +886,7 @@ </tr> <tr> <td colspan="12"> <span>投入重量(KG):</span> <span>投入重量(KG)/数量:</span> <el-input-number v-if="props.isEdit" v-model="formData.otherData.inputWeight" src/views/productionManagement/workOrder/components/ProductionRecordForm.vue
@@ -17,7 +17,7 @@ type: Number, default: 120 }, /** 本次生产数量(成型工序用于计算投入重量) */ /** 本次生产数量(成型工序用于计算投入重量/数量) */ quantity: { type: Number, default: null @@ -27,7 +27,7 @@ type: Boolean, default: false }, /** 工单 BOM 投入重量,非成型工序回显到「投入重量」 */ /** 工单 BOM 投入重量,非成型工序回显到「投入重量/数量」 */ bomInputQty: { type: Number, default: null @@ -39,11 +39,21 @@ list: [] as any[], }); const INPUT_WEIGHT_PARAM_ITEM = "投入重量/数量"; /** 参数项展示名(兼容库内旧名「投入重量」) */ const displayParameterItem = (name) => { const trimmed = String(name ?? "").trim(); if (trimmed === "投入重量") return INPUT_WEIGHT_PARAM_ITEM; return trimmed; }; const fieldLabel = (item: any) => { const parameterItem = displayParameterItem(item.parameterItem); if (!item.unit || item.unit === "/") { return item.parameterItem; return parameterItem; } return `${item.parameterItem}(${item.unit})`; return `${parameterItem}(${item.unit})`; }; const getType = (item: any) => item.type || "文本格式"; @@ -52,7 +62,11 @@ const result: Record<string, any[]> = {}; formData.list.forEach((item, index) => { if (String(item.isRequired) === "1") { result[`list.${index}.value`] = [{required: true, message: `请输入${item.parameterItem}`, trigger: "blur"}]; result[`list.${index}.value`] = [{ required: true, message: `请输入${displayParameterItem(item.parameterItem)}`, trigger: "blur" }]; } }); return result; @@ -66,15 +80,17 @@ const normalizeUnit = (unit) => String(unit ?? "").trim().toLowerCase(); const isInputWeightItem = (item) => String(item?.parameterItem ?? "").includes("投入重量") && normalizeUnit(item?.unit) === "kg"; const isInputWeightItem = (item) => { const name = String(item?.parameterItem ?? "").trim(); return (name === "投入重量" || name.includes(INPUT_WEIGHT_PARAM_ITEM)) && normalizeUnit(item?.unit) === "kg"; }; const isBlankCoeffItem = (item) => String(item?.parameterItem ?? "").includes("生坯系数") && normalizeUnit(item?.unit) === "g"; /** 投入重量(KG) = 本次生产数量 × 生坯系数(g) / 1000 */ /** 投入重量/数量(KG) = 本次生产数量 × 生坯系数(g) / 1000 */ const syncFormingInputWeight = () => { if (!props.isFormingProcess) return; const weightItem = formData.list.find(isInputWeightItem); @@ -93,7 +109,7 @@ weightItem.value = Number(((qty * coeff) / 1000).toFixed(4)); }; /** 非成型:投入重量取工单 bomInputQty(仅回显,不覆盖用户已编辑的值) */ /** 非成型:投入重量/数量取工单 bomInputQty(仅回显,不覆盖用户已编辑的值) */ const syncBomInputWeight = (force = false) => { if (props.isFormingProcess) return; const weightItem = formData.list.find(isInputWeightItem); src/views/productionManagement/workOrder/components/VoltageSortingForm.vue
@@ -23,7 +23,7 @@ type: Object, default: () => ({}), }, /** 工单 BOM 投入重量,回显到「投入重量」 */ /** 工单 BOM 投入重量,回显到「投入重量/数量」 */ bomInputQty: { type: Number, default: null, @@ -61,7 +61,7 @@ userId: undefined, // 作业员 userName: undefined, // 作业员 exceptionDealResult: undefined, // 异常处理结果 inputWeight: undefined, // 投入重量(KG) inputWeight: undefined, // 投入重量/数量(KG) } }) @@ -425,7 +425,7 @@ </td> </tr> <tr> <td class="label" colspan="2">投入重量(KG)</td> <td class="label" colspan="2">投入重量(KG)/数量</td> <td colspan="16" class="cell-field"> <el-input-number v-if="props.isEdit"