From 38b988786c085310aa08eb95536212ee8d1cf816 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 09 三月 2026 10:47:56 +0800
Subject: [PATCH] 新疆海川开心 1.默认值修改

---
 src/views/qualityManagement/rawMaterialInspection/components/formDia.vue |   21 +++++++++++++--------
 1 files changed, 13 insertions(+), 8 deletions(-)

diff --git a/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
index d26eaf2..f32ac7c 100644
--- a/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
+++ b/src/views/qualityManagement/rawMaterialInspection/components/formDia.vue
@@ -4,6 +4,7 @@
         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">
@@ -212,7 +213,13 @@
 	userListNoPageByTenantId().then((res) => {
 		userList.value = res.data;
 	});
-	form.value = {}
+	// 鍒濆鍖栬〃鍗曪紙鏂板缁欓粯璁ゅ�硷級
+	form.value = {
+		checkTime: getToday(),
+		unit: "g",
+		quantity: 1000,
+		checkName: "寮犲煿",
+	}
   getProductOptions();
   if (operationType.value === 'edit' && row) {
     form.value = {...row}
@@ -229,13 +236,11 @@
     }
     getQualityInspectParamList(row.id)
   }
-  // 榛樿妫�楠屽憳涓哄綋鍓嶇櫥褰曚汉锛屾娴嬫棩鏈熼粯璁や负褰撳ぉ锛堢┖鏃跺~鍏咃級
-  if (currentUserName.value && !form.value.checkName) {
-    form.value.checkName = currentUserName.value;
-  }
-  if (!form.value.checkTime) {
-    form.value.checkTime = getToday();
-  }
+  // 鏂板锛氶粯璁ゅ崟浣� g銆侀粯璁ゆ楠屽憳寮犲煿銆侀粯璁ゆ暟閲� 1000锛堜负绌烘椂鎵嶅~鍏咃紝閬垮厤瑕嗙洊缂栬緫鍥炴樉锛�
+  if (!form.value.unit) form.value.unit = "g";
+  if (form.value.quantity === "" || form.value.quantity == null) form.value.quantity = 1000;
+  if (!form.value.checkName) form.value.checkName = "寮犲煿";
+  if (!form.value.checkTime) form.value.checkTime = getToday();
 }
 const getProductOptions = () => {
   productTreeList({productName: '璐ㄩ噺'}).then((res) => {

--
Gitblit v1.9.3