From 8293aa5351afca2e18331bd5ec7731a5bd3af082 Mon Sep 17 00:00:00 2001
From: zhangwencui <1064582902@qq.com>
Date: 星期一, 23 三月 2026 11:48:38 +0800
Subject: [PATCH] 工艺路线默认卡片视图
---
src/views/productionManagement/productStructure/Detail/index.vue | 34 +++++++++-------------------------
1 files changed, 9 insertions(+), 25 deletions(-)
diff --git a/src/views/productionManagement/productStructure/Detail/index.vue b/src/views/productionManagement/productStructure/Detail/index.vue
index 9cd0976..ae76ed4 100644
--- a/src/views/productionManagement/productStructure/Detail/index.vue
+++ b/src/views/productionManagement/productStructure/Detail/index.vue
@@ -38,11 +38,10 @@
label="瑙勬牸">
<template #default="{ row, $index }">
<el-form-item v-if="dataValue.isEdit"
- :rules="[{ required: true, message: '璇烽�夋嫨瑙勬牸', trigger: ['blur','change'] }]"
+ :rules="[{ required: false, message: '璇烽�夋嫨瑙勬牸', trigger: ['blur','change'] }]"
style="margin: 0">
<el-select v-model="row.model"
placeholder="璇烽�夋嫨瑙勬牸"
- clearable
:disabled="!dataValue.isEdit"
style="width: 100%"
@visible-change="(v) => { if (v) openDialog(row.tempId) }">
@@ -81,7 +80,6 @@
style="margin: 0">
<el-input-number v-model="row.unitQuantity"
:min="0"
- :precision="2"
:step="1"
controls-position="right"
style="width: 100%"
@@ -141,16 +139,12 @@
</el-table-column>
<el-table-column label="BOM缂栧彿"
prop="bomNo" />
- <el-table-column label="浜у搧缂栫爜"
- prop="productCode" />
- <el-table-column label="浜у搧鍚嶇О"
- prop="productName" />
- <el-table-column label="瑙勬牸鍨嬪彿"
- prop="model" />
+ <el-table-column label="浜у搧绫诲瀷"
+ prop="dictLabel" />
</el-table>
- <div v-if="dataValue.isEdit && dataValue.dataList.length == 0"
+ <div v-if="dataValue.isEdit"
style="text-align: center;border: 1px solid #e4e7ed;padding: 10px;transition: all 0.3s ease;cursor: pointer;"
- :class="{'hover-effect': dataValue.isEdit && dataValue.dataList.length == 0}">
+ :class="{'hover-effect': dataValue.isEdit}">
<el-button type="primary"
text
@click="addItem">
@@ -206,11 +200,8 @@
// 浠庤矾鐢卞弬鏁拌幏鍙栦骇鍝佷俊鎭�
const routeBomNo = computed(() => route.query.bomNo || "");
- const routeProductCode = computed(() => route.query.productCode || "");
- const routeProductName = computed(() => route.query.productName || "");
- const routeProductModelName = computed(
- () => route.query.productModelName || ""
- );
+ const routeDictLabel = computed(() => route.query.dictLabel || "");
+
const routeOrderId = computed(() => route.query.orderId);
const pageType = computed(() => route.query.type);
const isOrderPage = computed(
@@ -230,9 +221,8 @@
const tableData = reactive([
{
- productName: "",
- model: "",
bomNo: "",
+ dictLabel: "",
},
]);
@@ -344,11 +334,6 @@
const validateItem = (item: any, isTopLevel = false) => {
console.log(item, "item");
// 鏍¢獙褰撳墠椤圭殑蹇呭~瀛楁
- if (!item.model) {
- ElMessage.error("璇烽�夋嫨瑙勬牸");
- isValid = false;
- return;
- }
if (!item.processId) {
ElMessage.error("璇烽�夋嫨娑堣�楀伐搴�");
isValid = false;
@@ -539,9 +524,8 @@
onMounted(async () => {
// 浠庤矾鐢卞弬鏁板洖鏄炬暟鎹�
- tableData[0].productName = routeProductName.value as string;
- tableData[0].model = routeProductModelName.value as string;
tableData[0].bomNo = routeBomNo.value as string;
+ tableData[0].dictLabel = routeDictLabel.value as string;
// 璁㈠崟鎯呭喌涓嬬鐢ㄧ紪杈�
if (isOrderPage.value) {
--
Gitblit v1.9.3