From ea7c19b7bfd7a5260fa321579e6941f28ef2eb46 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期四, 27 八月 2026 11:36:30 +0800
Subject: [PATCH] fix(order): 解决实验室字段必填验证和数据源问题

---
 src/views/business/productOrder/components/addOrder.vue |   22 +++++++++++-----------
 1 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/views/business/productOrder/components/addOrder.vue b/src/views/business/productOrder/components/addOrder.vue
index 91eb5b9..67b582d 100644
--- a/src/views/business/productOrder/components/addOrder.vue
+++ b/src/views/business/productOrder/components/addOrder.vue
@@ -463,10 +463,10 @@
             </div>
           </el-col>
           <el-col v-if="distributeData.userId" :span="22" class="search_thing">
-            <div class="search_label"><span class="required-span">* </span>璇曢獙瀹わ細</div>
+            <div class="search_label">璇曢獙瀹わ細</div>
             <div class="search_input">
               <el-select v-model="distributeData.sonLaboratory" filterable placeholder="璇烽�夋嫨" size="small" style="width: 100%;">
-                <el-option v-for="item in sonLaboratoryList" :key="item.value" :label="item.label" :value="item.value">
+                <el-option v-for="item in newJuLaboratoryList" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
               </el-select>
             </div>
@@ -614,8 +614,11 @@
   },
   computed:{
     ...mapGetters(["nickName", 'nameEn', 'userName']),
+    newJuLaboratoryList() {
+      return (this.dict.type.sys_sub_lab || []).filter(item => item.label === '鏂拌仛')
+    },
   },
-  dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list'],
+  dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list', 'sys_sub_lab'],
   data() {
     return {
       active: '',
@@ -1379,6 +1382,7 @@
               this.distributeData.appointed = ress.data
             })
             setTimeout(() => {
+              this.distributeData.sonLaboratory = this.newJuLaboratoryList.length > 0 ? this.newJuLaboratoryList[0].value : ''
               this.issuedDialogVisible = true;
             }, 1000)
           })
@@ -1395,10 +1399,6 @@
         }
         if (this.distributeData.userId == null || this.distributeData.userId == '') {
           this.$message.error('鎸囨淳浜哄憳鏈~鍐�')
-          return
-        }
-        if (this.distributeData.userId&&(this.distributeData.sonLaboratory== null ||this.distributeData.sonLaboratory== '')) {
-          this.$message.error('璇曢獙瀹ゆ湭濉啓')
           return
         }
         this.upLoad = true;
@@ -1430,8 +1430,8 @@
           this.addObj.code = selects.code
           this.addObj.phone = selects.phone
           this.addObj.companyId = selects.departId
-          this.addObj.production = '涓ぉ绉戞妧瑁呭鐢电紗鏈夐檺鍏徃'
-          this.addObj.productionEn = 'Zhongtian Technology Industrial Wire&Cable System CO.,LTD'
+          this.addObj.production = ''
+          this.addObj.productionEn = ''
           if(this.active==1){
             this.selectInsOrderTemplate()
           }
@@ -2224,8 +2224,8 @@
         })
       },
       changeUser(){
-        if(this.sonLaboratoryList.length>0){
-          this.distributeData.sonLaboratory = this.sonLaboratoryList[0].value
+        if(this.newJuLaboratoryList.length>0){
+          this.distributeData.sonLaboratory = this.newJuLaboratoryList[0].value
         }
       },
       addProductList(productList,row,index){

--
Gitblit v1.9.3