From 0c4429a719f5c95a7690fae51efaaa799ef4e77d Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期一, 25 五月 2026 10:02:48 +0800
Subject: [PATCH] fix: 投入重量改成投入重量/数量
---
src/views/productionManagement/workOrder/components/VoltageSortingForm.vue | 6 +-
src/views/productionManagement/workOrder/components/ProductionRecordForm.vue | 36 +++++++++++++-----
src/views/productionManagement/productionReporting/components/Detail.vue | 2
src/views/productionManagement/workOrder/components/CopperPrintingForm.vue | 6 +-
src/views/productionManagement/productionRecords/index.vue | 8 ++-
src/views/productionManagement/workOrder/components/GranulationForm.vue | 6 +-
6 files changed, 41 insertions(+), 23 deletions(-)
diff --git a/src/views/productionManagement/productionRecords/index.vue b/src/views/productionManagement/productionRecords/index.vue
index 13f5d13..a2536fe 100644
--- a/src/views/productionManagement/productionRecords/index.vue
+++ b/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" },
diff --git a/src/views/productionManagement/productionReporting/components/Detail.vue b/src/views/productionManagement/productionReporting/components/Detail.vue
index cd4f4a9..98a53f0 100644
--- a/src/views/productionManagement/productionReporting/components/Detail.vue
+++ b/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>
diff --git a/src/views/productionManagement/workOrder/components/CopperPrintingForm.vue b/src/views/productionManagement/workOrder/components/CopperPrintingForm.vue
index 7f8581a..e6e8ffb 100644
--- a/src/views/productionManagement/workOrder/components/CopperPrintingForm.vue
+++ b/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, // 閲嶉噺锛坘g/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"
diff --git a/src/views/productionManagement/workOrder/components/GranulationForm.vue b/src/views/productionManagement/workOrder/components/GranulationForm.vue
index de53579..cf18aea 100644
--- a/src/views/productionManagement/workOrder/components/GranulationForm.vue
+++ b/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"
diff --git a/src/views/productionManagement/workOrder/components/ProductionRecordForm.vue b/src/views/productionManagement/workOrder/components/ProductionRecordForm.vue
index 10bfc44..444e470 100644
--- a/src/views/productionManagement/workOrder/components/ProductionRecordForm.vue
+++ b/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);
diff --git a/src/views/productionManagement/workOrder/components/VoltageSortingForm.vue b/src/views/productionManagement/workOrder/components/VoltageSortingForm.vue
index 4a9b3f4..7ec888b 100644
--- a/src/views/productionManagement/workOrder/components/VoltageSortingForm.vue
+++ b/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"
--
Gitblit v1.9.3