From caee39efae91ad0bd5b9e3ee829602fecc1c8044 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期五, 15 五月 2026 15:06:07 +0800
Subject: [PATCH] 修改供应商档案黑名单附件上传
---
src/views/productionManagement/productionProcess/index.vue | 29 ++++++++++++++++++++++++++---
1 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/src/views/productionManagement/productionProcess/index.vue b/src/views/productionManagement/productionProcess/index.vue
index 216e73b..747b8de 100644
--- a/src/views/productionManagement/productionProcess/index.vue
+++ b/src/views/productionManagement/productionProcess/index.vue
@@ -162,7 +162,8 @@
</el-form>
<template #footer>
<span class="dialog-footer">
- <el-button type="primary" @click="handleProcessSubmit">纭畾</el-button>
+ <el-button type="primary"
+ @click="handleProcessSubmit">纭畾</el-button>
<el-button @click="processDialogVisible = false">鍙栨秷</el-button>
</span>
</template>
@@ -242,6 +243,7 @@
</el-form-item>
<el-form-item label="鏍囧噯鍊�">
<el-input v-model="selectedParam.standardValue"
+ @input="val => onStandardValueInput(val, selectedParam)"
placeholder="璇疯緭鍏ラ粯璁ゅ��" />
</el-form-item>
</el-form>
@@ -251,7 +253,9 @@
</div>
<template #footer>
<span class="dialog-footer">
- <el-button type="primary" :disabled="!selectedParam" @click="handleParamSubmit">纭畾</el-button>
+ <el-button type="primary"
+ :disabled="!selectedParam"
+ @click="handleParamSubmit">纭畾</el-button>
<el-button @click="paramDialogVisible = false">鍙栨秷</el-button>
</span>
</template>
@@ -270,14 +274,15 @@
<el-form-item label="鏍囧噯鍊�"
prop="standardValue">
<el-input v-model="editParamForm.standardValue"
+ @input="val => onStandardValueInput(val, editParamForm)"
placeholder="璇疯緭鍏ユ爣鍑嗗��" />
</el-form-item>
</el-form>
<template #footer>
<span class="dialog-footer">
- <el-button @click="editParamDialogVisible = false">鍙栨秷</el-button>
<el-button type="primary"
@click="handleEditParamSubmit">纭畾</el-button>
+ <el-button @click="editParamDialogVisible = false">鍙栨秷</el-button>
</span>
</template>
</el-dialog>
@@ -389,7 +394,18 @@
technologyParamId: null,
paramName: "",
standardValue: null,
+ paramType: null,
});
+
+ const onStandardValueInput = (val, target) => {
+ const data = target.value || target;
+ const type = data.paramType;
+ if (type === 1) {
+ // 鏁板�兼牸寮忥細涓嶈兘杈撳叆涓枃鎴栬嫳鏂囧瓧绗�
+ data.standardValue = val.replace(/[a-zA-Z\u4e00-\u9fa5]/g, "");
+ }
+ };
+
const editParamRules = {
standardValue: [
{
@@ -400,6 +416,12 @@
if (value === null || value === undefined || value === "") {
callback(new Error("璇疯緭鍏ユ爣鍑嗗��"));
} else {
+ const type = editParamForm.paramType;
+ if (type === 1 && value) {
+ if (/[a-zA-Z\u4e00-\u9fa5]/.test(value)) {
+ return callback(new Error("鏁板�兼牸寮忎笉鑳藉寘鍚腑鑻辨枃瀛楃"));
+ }
+ }
callback();
}
},
@@ -714,6 +736,7 @@
editParamForm.technologyParamId = row.technologyParamId;
editParamForm.paramName = row.paramName;
editParamForm.standardValue = row.standardValue;
+ editParamForm.paramType = row.paramType;
editParamDialogVisible.value = true;
};
--
Gitblit v1.9.3