From 7421c4030ee8df1fc1780b3c5e0b1fcffb981445 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期六, 16 五月 2026 11:00:27 +0800
Subject: [PATCH] 销售台账新增产品大类时,只能选成品
---
src/views/productionManagement/workOrder/components/CopperPrintingForm.vue | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/src/views/productionManagement/workOrder/components/CopperPrintingForm.vue b/src/views/productionManagement/workOrder/components/CopperPrintingForm.vue
index 7a11105..28c7196 100644
--- a/src/views/productionManagement/workOrder/components/CopperPrintingForm.vue
+++ b/src/views/productionManagement/workOrder/components/CopperPrintingForm.vue
@@ -18,10 +18,6 @@
type: Boolean,
default: false
},
- detailData: {
- type: Object,
- default: () => ({}),
- },
row: {
type: Object,
default: () => ({}),
@@ -34,6 +30,21 @@
get: () => props.isShow,
set: (value: boolean) => emits("update:isShow", value),
});
+
+/** 宸ュ簭灞曠ず鍚嶏細宸ュ崟涓� processName锛屾姤宸ュ垪琛ㄤ负 process锛岀己鐪佷笌鏃х増涓�鑷翠负銆屽嵃閾溿�� */
+const processTitlePrefix = computed(() => {
+ const row = props.row as Record<string, unknown> | null | undefined;
+ if (!row) return "鍗伴摐";
+ const name = row.processName ?? row.process;
+ if (name != null && String(name).trim() !== "") {
+ return String(name).trim();
+ }
+ return "鍗伴摐";
+});
+
+const dialogTitle = computed(() =>
+ props.isEdit ? `${processTitlePrefix.value}鎶ュ伐` : `${processTitlePrefix.value}璇︽儏`
+);
const formData = reactive({
productProcessRouteItemId: undefined,
@@ -150,8 +161,8 @@
const initData = () => {
if (!props.isEdit) {
- formData.otherData = JSON.parse(props.detailData.otherData || '{}');
- formData.quantity = props.detailData.quantity;
+ formData.otherData = JSON.parse(props.row.otherData || '{}');
+ formData.quantity = props.row.quantity;
} else {
const row = props.row;
formData.planQuantity = row.planQuantity
@@ -174,7 +185,7 @@
<template>
<el-dialog v-model="visible"
- title="鍗伴摐鎶ュ伐"
+ :title="dialogTitle"
width="90%">
<el-form :model="formData">
<table class="report-table">
--
Gitblit v1.9.3