From 45a98ba63e6541a82416fde84aa5fa2efb9679bd Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期三, 20 五月 2026 17:01:02 +0800
Subject: [PATCH] Merge branch 'dev_NEW_pro' of http://114.132.189.42:9002/r/product-inventory-management into dev_NEW_pro
---
src/views/productionManagement/productionProcess/index.vue | 36 +++++++++++++++++++++++++++++++-----
1 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/src/views/productionManagement/productionProcess/index.vue b/src/views/productionManagement/productionProcess/index.vue
index 216e73b..ee49657 100644
--- a/src/views/productionManagement/productionProcess/index.vue
+++ b/src/views/productionManagement/productionProcess/index.vue
@@ -44,7 +44,7 @@
<div class="card-body">
<!-- <div class="process-name">{{ process.name }}</div> -->
<div class="process-desc">{{ process.remark || '鏆傛棤鎻忚堪' }}</div>
- <div class="process-device">鍏宠仈璁惧: {{ deviceOptions.find(item => item.id === Number(process.deviceLedgerId))?.deviceName|| '鏈叧鑱�' }}</div>
+ <div class="process-device">鍏宠仈璁惧: {{ (deviceOptions.find(item => item.id === Number(process.deviceLedgerId))?.deviceName) || '鏈叧鑱�' }}</div>
</div>
<div class="card-footer">
<div class="status-tag">
@@ -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();
}
},
@@ -548,7 +570,10 @@
processForm.isQuality = !!process.isQuality;
processForm.isProduction = !!process.isProduction;
processForm.remark = process.remark || "";
- processForm.deviceLedgerId = Number(process.deviceLedgerId);
+ // 濡傛灉璁惧 ID 涓� 0 鎴栬�呭湪璁惧鍒楄〃涓壘涓嶅埌锛屽垯鍥炴樉涓虹┖锛坣ull锛�
+ const deviceId = Number(process.deviceLedgerId);
+ const hasDevice = deviceOptions.value.some(item => item.id === deviceId);
+ processForm.deviceLedgerId = deviceId && hasDevice ? deviceId : null;
processForm.type = process.type;
processDialogVisible.value = true;
};
@@ -714,6 +739,7 @@
editParamForm.technologyParamId = row.technologyParamId;
editParamForm.paramName = row.paramName;
editParamForm.standardValue = row.standardValue;
+ editParamForm.paramType = row.paramType;
editParamDialogVisible.value = true;
};
--
Gitblit v1.9.3