From eff6968666db6d5efb56135884c24d572d3b9b7c Mon Sep 17 00:00:00 2001
From: yuan <123@>
Date: 星期六, 08 八月 2026 16:17:56 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev_长治_祥雨远见科技' into dev_长治_祥雨远见科技
---
src/views/qualityManagement/processInspection/components/formDia.vue | 29 ++++++++++++++++++++++++++---
1 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/src/views/qualityManagement/processInspection/components/formDia.vue b/src/views/qualityManagement/processInspection/components/formDia.vue
index e0d226e..3bc94c0 100644
--- a/src/views/qualityManagement/processInspection/components/formDia.vue
+++ b/src/views/qualityManagement/processInspection/components/formDia.vue
@@ -10,7 +10,9 @@
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="宸ュ簭锛�" prop="process">
- <el-input v-model="form.process" placeholder="璇疯緭鍏ュ伐搴�" clearable :disabled="processQuantityDisabled" />
+ <el-select v-model="form.process" placeholder="璇烽�夋嫨宸ュ簭" clearable :disabled="processQuantityDisabled" style="width: 100%">
+ <el-option v-for="item in processList" :key="item.name" :label="item.name" :value="item.name"/>
+ </el-select>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -121,7 +123,7 @@
</PIMTable>
<template #footer>
<div class="dialog-footer">
- <el-button type="primary" @click="submitForm">纭</el-button>
+ <el-button type="primary" :loading="submitting" @click="submitForm">纭</el-button>
<el-button @click="closeDia">鍙栨秷</el-button>
</div>
</template>
@@ -137,10 +139,14 @@
import {qualityInspectDetailByProductId, getQualityTestStandardParamByTestStandardId} from "@/api/qualityManagement/metricMaintenance.js";
import {userListNoPage} from "@/api/system/user.js";
import {qualityInspectParamInfo} from "@/api/qualityManagement/qualityInspectParam.js";
+import { list } from "@/api/productionManagement/productionProcess";
const { proxy } = getCurrentInstance()
const emit = defineEmits(['close'])
+
+
const dialogFormVisible = ref(false);
+const submitting = ref(false);
const operationType = ref('')
const data = reactive({
form: {
@@ -159,7 +165,7 @@
},
rules: {
checkTime: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" },],
- process: [{ required: true, message: "璇疯緭鍏ュ伐搴�", trigger: "blur" }],
+ process: [{ required: true, message: "璇烽�夋嫨宸ュ簭", trigger: "change" }],
checkName: [{ required: false, message: "璇疯緭鍏�", trigger: "blur" }],
productId: [{ required: true, message: "璇疯緭鍏�", trigger: "blur" }],
productModelId: [{ required: true, message: "璇烽�夋嫨", trigger: "change" }],
@@ -177,6 +183,7 @@
const v = form.value || {};
return !!(v.productMainId != null || v.purchaseLedgerId != null);
});
+const processList = ref([]); // 宸ュ簭涓嬫媺鍒楄〃锛堝伐搴忓悕绉� name锛�
const supplierList = ref([]);
const productOptions = ref([]);
const tableColumn = ref([
@@ -215,6 +222,14 @@
getOptions().then((res) => {
supplierList.value = res.data;
});
+ // 鍔犺浇宸ュ簭涓嬫媺鍒楄〃
+ try {
+ const res = await list();
+ processList.value = res.data || [];
+ } catch (e) {
+ console.error("鍔犺浇宸ュ簭鍒楄〃澶辫触", e);
+ processList.value = [];
+ }
let userLists = await userListNoPage();
userList.value = userLists.data;
// 鍏堥噸缃〃鍗曟暟鎹紙淇濇寔瀛楁瀹屾暣锛岄伩鍏嶅脊绐楅娆℃覆鏌撴椂瑙﹀彂蹇呭~绾㈡鈥滈棯涓�涓嬧�濓級
@@ -359,6 +374,9 @@
// 宸ュ簭鍙樺寲澶勭悊
// 鎻愪氦浜у搧琛ㄥ崟
const submitForm = () => {
+ if (submitting.value) {
+ return;
+ }
proxy.$refs.formRef.validate(valid => {
if (valid) {
form.value.inspectType = 1
@@ -373,15 +391,20 @@
process: processName, // 淇濈暀 process 瀛楁浠ュ吋瀹瑰悗绔�
qualityInspectParams: tableData.value
}
+ submitting.value = true;
if (operationType.value === "add") {
qualityInspectAdd(data).then(res => {
proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
closeDia();
+ }).catch(() => {}).finally(() => {
+ submitting.value = false;
})
} else {
qualityInspectUpdate(data).then(res => {
proxy.$modal.msgSuccess("鎻愪氦鎴愬姛");
closeDia();
+ }).catch(() => {}).finally(() => {
+ submitting.value = false;
})
}
}
--
Gitblit v1.9.3