From 7465eb431e134576b4c9c43103c9fc6f918d1696 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期三, 20 五月 2026 17:37:21 +0800
Subject: [PATCH] fix: 每个工序添加投入重量字段
---
src/views/productionManagement/workOrder/index.vue | 28 +++++++++++++++++++++++++++-
1 files changed, 27 insertions(+), 1 deletions(-)
diff --git a/src/views/productionManagement/workOrder/index.vue b/src/views/productionManagement/workOrder/index.vue
index 1592ffd..af2c030 100644
--- a/src/views/productionManagement/workOrder/index.vue
+++ b/src/views/productionManagement/workOrder/index.vue
@@ -297,6 +297,9 @@
<ProductionRecordForm
ref="productionRecordFormRef"
:list="processParamList"
+ :quantity="reportForm.quantity"
+ :is-forming-process="isFormingProcess"
+ :bom-input-qty="reportBomInputQty"
/>
</el-form>
<template #footer>
@@ -312,6 +315,7 @@
v-model:isShow="copperPrintingFormVisible"
:isEdit="true"
:row="currentReportRowData"
+ :bom-input-qty="reportBomInputQty"
@refreshData="getList"
/>
<VoltageSortingForm
@@ -319,6 +323,7 @@
v-model:isShow="voltageSortingFormVisible"
:isEdit="true"
:row="currentReportRowData"
+ :bom-input-qty="reportBomInputQty"
@refreshData="getList"
/>
<GranulationForm
@@ -326,13 +331,14 @@
v-model:isShow="granulationFormVisible"
:isEdit="true"
:row="currentReportRowData"
+ :bom-input-qty="reportBomInputQty"
@refreshData="getList"
/>
</div>
</template>
<script setup>
-import { onMounted, ref, nextTick } from "vue";
+import { onMounted, ref, nextTick, computed } from "vue";
import { ElMessageBox } from "element-plus";
import dayjs from "dayjs";
import {
@@ -592,6 +598,9 @@
return;
}
reportForm.quantity = num;
+ nextTick(() => {
+ productionRecordFormRef.value?.syncInputWeight?.();
+ });
};
// 澶勭悊鎶ュ簾鏁伴噺
@@ -619,6 +628,20 @@
reportForm.scrapQty = num;
};
const currentReportRowData = ref(null);
+
+const isFormingProcess = computed(
+ () => currentReportRowData.value?.processName === "鎴愬瀷"
+);
+
+const reportBomInputQty = computed(() => {
+ const bom = currentReportRowData.value?.bomInputQty;
+ if (bom === null || bom === undefined || bom === "") {
+ return null;
+ }
+ const n = Number(bom);
+ return Number.isFinite(n) ? n : null;
+});
+
const page = reactive({
current: 1,
size: 100,
@@ -812,6 +835,9 @@
});
reportDialogVisible.value = true;
+ nextTick(() => {
+ productionRecordFormRef.value?.syncInputWeight?.();
+ });
};
const openWorkOrderFiles = (row) => {
--
Gitblit v1.9.3