From e48fff7164866d4afb3ec54b587de2c8c25e48de Mon Sep 17 00:00:00 2001
From: zhang_12370 <z2864490065@outlook.com>
Date: 星期四, 26 六月 2025 11:35:53 +0800
Subject: [PATCH] 上传采购管理登记人修改为用户昵称并匹配字段

---
 src/views/procureMent/index.vue                       |    4 ++--
 src/views/procureMent/components/ProductionDialog.vue |    9 ++++++---
 src/views/production/index.vue                        |    2 +-
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/src/views/procureMent/components/ProductionDialog.vue b/src/views/procureMent/components/ProductionDialog.vue
index c8195ff..a8fbc9f 100644
--- a/src/views/procureMent/components/ProductionDialog.vue
+++ b/src/views/procureMent/components/ProductionDialog.vue
@@ -96,7 +96,7 @@
           </el-input>
         </el-form-item>
         <el-form-item label="鐧昏浜�" prop="registrantId">
-          <el-input v-model="form.registrantId" disabled placeholder="璇疯緭鍏�"/>
+          <el-input :value="match(form.registrantId)" v-model.number="form.registrantId" disabled placeholder="璇疯緭鍏�"/>
         </el-form-item>
         <el-form-item label="鐧昏鏃ユ湡" prop="registrationDate">
           <el-date-picker
@@ -243,7 +243,9 @@
 
 const userStore = useUserStore();
 const userInfo = ref({});
-
+const match = () => {
+  return userInfo.value.nickName || "鏈煡鐢ㄦ埛";
+};
 // 澶勭悊绋庣巼杈撳叆妗嗗け鐒︼紝纭繚绮惧害
 const handleTaxRateBlur = () => {
   if (
@@ -285,8 +287,9 @@
 
 onMounted(async () => {
   let res = await userStore.getInfo();
-  userInfo.value = res;
+  userInfo.value = res.user;
   getDropdownData()
+  
 });
 const rules = {
   supplierName: [
diff --git a/src/views/procureMent/index.vue b/src/views/procureMent/index.vue
index 5427783..7426d39 100644
--- a/src/views/procureMent/index.vue
+++ b/src/views/procureMent/index.vue
@@ -196,18 +196,18 @@
     // 瑙﹀彂ref閲岄潰鐨勬柟娉�
     return;
   }
+  console.log(userInfo.value)
   // 鏂板缓鏃跺垵濮嬪寲琛ㄥ崟
   form.value = {
     supplierName: "",
     coal: "",
-    unit: "鍚�",
     purchaseQuantity: "",
     priceExcludingTax: "",
     totalPriceExcludingTax: "",
     priceIncludingTax: "",
     totalPriceIncludingTax: "",
     taxRate: "",
-    registrantId: userInfo.value.userName,
+    registrantId: userInfo.value.userId,
     registrationDate: new Date().toISOString().split("T")[0],
   };
   // 鏂板缓鏃朵篃闇�瑕佽缃� copyForm 鐢ㄤ簬閲嶇疆鍔熻兘
diff --git a/src/views/production/index.vue b/src/views/production/index.vue
index 79c305b..0b74dc9 100644
--- a/src/views/production/index.vue
+++ b/src/views/production/index.vue
@@ -216,7 +216,7 @@
 
 .search-form {
   display: flex;
-  justify-content: space-between;
+  justify-content: flex-start;
   align-items: center;
   margin-bottom: 20px;
 

--
Gitblit v1.9.3