From 113ca01ea4abdeee4e01695df973219ee4671ef0 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期二, 30 六月 2026 17:05:41 +0800
Subject: [PATCH] 新疆海川开心 1.质量管理、回款登记修改默认数据
---
src/views/qualityManagement/processInspection/components/formDia.vue | 49 +++++++++++++++++++++++++++++++++++++++++++++----
1 files changed, 45 insertions(+), 4 deletions(-)
diff --git a/src/views/qualityManagement/processInspection/components/formDia.vue b/src/views/qualityManagement/processInspection/components/formDia.vue
index e7ba6d7..9bf4e1d 100644
--- a/src/views/qualityManagement/processInspection/components/formDia.vue
+++ b/src/views/qualityManagement/processInspection/components/formDia.vue
@@ -4,13 +4,17 @@
v-model="dialogFormVisible"
:title="operationType === 'add' ? '鏂板杩囩▼妫�楠�' : '缂栬緫杩囩▼妫�楠�'"
width="70%"
+ draggable
@close="closeDia"
>
<el-form :model="form" label-width="140px" label-position="top" :rules="rules" ref="formRef">
<el-row :gutter="30">
<el-col :span="12">
<el-form-item label="宸ュ簭锛�" prop="process">
- <el-input v-model="form.process" placeholder="璇疯緭鍏�" clearable/>
+ <el-select v-model="form.process" placeholder="璇烽�夋嫨" clearable>
+ <el-option label="璇曞帇" value="璇曞帇" />
+ <el-option label="鎶芥" value="鎶芥" />
+ </el-select>
</el-form-item>
</el-col>
<el-col :span="12">
@@ -104,7 +108,7 @@
</template>
<script setup>
-import {ref, computed} from "vue";
+import {ref, computed, reactive, toRefs, getCurrentInstance} from "vue";
import {getOptions} from "@/api/procurementManagement/procurementLedger.js";
import {modelList, productTreeList} from "@/api/basicData/product.js";
import {qualityInspectAdd, qualityInspectUpdate} from "@/api/qualityManagement/rawMaterialInspection.js";
@@ -204,10 +208,47 @@
});
}
getQualityInspectParamList(row.id)
+ } else {
+ // 鏂板鏃惰缃粯璁ゅ��
+ form.value.process = "璇曞帇"; // 宸ュ簭榛樿涓鸿瘯鍘�
+ form.value.unit = "鍖�"; // 鍗曚綅榛樿涓哄寘
+ form.value.quantity = 3; // 鏁伴噺榛樿涓�3
+ form.value.checkResult = "鍚堟牸"; // 妫�楠岀粨鏋滈粯璁や负鍚堟牸
+ // 浜у搧鍚嶇О榛樿鍌昏�佸ぇ鍘熷懗鐡滃瓙锛堣川妫�璇曞帇锛�
+ productTreeList({productName: '璐ㄩ噺'}).then((res) => {
+ productOptions.value = convertIdToValue(res);
+ // 閫掑綊鏌ユ壘鐩爣鑺傜偣
+ const findTarget = (nodes) => {
+ for (const node of nodes) {
+ if (node.label === "鍌昏�佸ぇ鍘熷懗鐡滃瓙锛堣川妫�璇曞帇锛�") {
+ return node;
+ }
+ if (node.children && node.children.length > 0) {
+ const found = findTarget(node.children);
+ if (found) return found;
+ }
+ }
+ return null;
+ };
+ const target = findTarget(res);
+ if (target) {
+ form.value.productId = target.id;
+ form.value.productName = target.label;
+ currentProductId.value = target.id;
+ // 鍔犺浇瑙勬牸鍒楄〃
+ modelList({ id: target.id }).then((modelRes) => {
+ modelOptions.value = modelRes;
+ });
+ // 鍔犺浇妫�楠屽弬鏁�
+ qualityInspectDetailByProductId(target.id).then((paramRes) => {
+ tableData.value = paramRes.data;
+ });
+ }
+ });
}
// 榛樿妫�楠屽憳涓哄綋鍓嶇櫥褰曚汉锛屾娴嬫棩鏈熼粯璁や负褰撳ぉ锛堢┖鏃跺~鍏咃級
- if (currentUserName.value && !form.value.checkName) {
- form.value.checkName = currentUserName.value;
+ if (!form.value.checkName) {
+ form.value.checkName = "渚洓鏉�";
}
if (!form.value.checkTime) {
form.value.checkTime = getToday();
--
Gitblit v1.9.3