From 984b1ad87807a7053638e50d5f0b905b400077ca Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期三, 22 四月 2026 11:32:08 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_天津_阳光印刷' into dev_天津_阳光印刷
---
src/views/qualityManagement/metricMaintenance/index.vue | 28 ++++++++++++++++++++++------
1 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/src/views/qualityManagement/metricMaintenance/index.vue b/src/views/qualityManagement/metricMaintenance/index.vue
index ee17428..6ea4afd 100644
--- a/src/views/qualityManagement/metricMaintenance/index.vue
+++ b/src/views/qualityManagement/metricMaintenance/index.vue
@@ -137,6 +137,7 @@
:operation-type="standardOperationType"
:form="standardForm"
:rules="standardRules"
+ :inspect-type="activeTab"
:process-options="processOptions"
@confirm="submitStandardForm"
@close="closeStandardDialog"
@@ -147,6 +148,7 @@
ref="paramFormDialogRef"
v-model="paramDialogVisible"
:operation-type="paramOperationType"
+ :inspectType="activeTab.value"
:form="paramForm"
@confirm="submitParamForm"
@close="closeParamDialog"
@@ -211,8 +213,17 @@
standardRules: {
standardNo: [{ required: true, message: '璇疯緭鍏ユ爣鍑嗙紪鍙�', trigger: 'blur' }],
standardName: [{ required: true, message: '璇疯緭鍏ユ爣鍑嗗悕绉�', trigger: 'blur' }],
- inspectType: [{ required: true, message: '璇烽�夋嫨妫�娴嬬被鍨�', trigger: 'change' }],
- processId: [{ required: false, message: '璇烽�夋嫨宸ュ簭', trigger: 'change' }]
+ processId: [{
+ validator: (_rule, value, callback) => {
+ const inspectType = String(standardForm.value.inspectType ?? activeTab.value ?? '')
+ if (inspectType === '1' && (value === '' || value === null || value === undefined)) {
+ callback(new Error('璇烽�夋嫨宸ュ簭'))
+ return
+ }
+ callback()
+ },
+ trigger: 'change'
+ }]
}
})
@@ -588,8 +599,8 @@
standardName: '',
remark: '',
state: '0',
- inspectType: '',
- processId: ''
+ inspectType: activeTab.value,
+ processId: activeTab.value === '1' ? '' : null
})
} else if (type === 'edit' && row) {
Object.assign(standardForm.value, {
@@ -598,7 +609,7 @@
inspectType: row.inspectType !== null && row.inspectType !== undefined ? String(row.inspectType) : '',
state: row.state !== null && row.state !== undefined ? String(row.state) : '0',
// 纭繚 processId 杞崲涓哄瓧绗︿覆鎴栨暟瀛楋紙鏍规嵁瀹為檯闇�瑕侊級
- processId: row.processId !== null && row.processId !== undefined ? row.processId : ''
+ processId: String(row.inspectType) === '1' && row.processId !== null && row.processId !== undefined ? row.processId : null
})
} else if (type === 'copy' && row) {
const { id, ...rest } = row
@@ -608,7 +619,8 @@
standardNo: '',
state: '0',
// 纭繚 inspectType 杞崲涓哄瓧绗︿覆
- inspectType: rest.inspectType !== null && rest.inspectType !== undefined ? String(rest.inspectType) : ''
+ inspectType: activeTab.value,
+ processId: activeTab.value === '1' ? (rest.processId ?? '') : null
})
}
standardDialogVisible.value = true
@@ -621,6 +633,10 @@
const submitStandardForm = () => {
const payload = { ...standardForm.value }
+ payload.inspectType = activeTab.value
+ if (String(payload.inspectType) !== '1') {
+ payload.processId = null
+ }
const isEdit = standardOperationType.value === 'edit'
if (isEdit) {
qualityTestStandardUpdate(payload).then(() => {
--
Gitblit v1.9.3