From 4f94a66bc8ad9a57295f161de9195d5528b1d181 Mon Sep 17 00:00:00 2001
From: spring <2396852758@qq.com>
Date: 星期二, 08 四月 2025 11:55:16 +0800
Subject: [PATCH] 基础数据维护+原辅材下单修改

---
 src/views/business/productOrder/components/add.vue |   49 ++++++++++++++++++++++++++++++-------------------
 1 files changed, 30 insertions(+), 19 deletions(-)

diff --git a/src/views/business/productOrder/components/add.vue b/src/views/business/productOrder/components/add.vue
index d8edd51..cc5da0b 100644
--- a/src/views/business/productOrder/components/add.vue
+++ b/src/views/business/productOrder/components/add.vue
@@ -20,10 +20,10 @@
           <el-button
             v-if="active == 1 && addObj.sampleType != undefined && (addObj.sampleType.indexOf('鐢电紗') > -1 || addObj.sampleType.indexOf('缁煎悎') > -1)"
             size="small" type="primary" @click="openCableConfig">鐢电紗閰嶇疆</el-button>
-          <el-button v-if="active == 1 && addObj.sampleType != undefined && addObj.sampleType.indexOf('鐢电紗') > -1" size="small"
-            type="primary" @click="openAuxiliaryCore">杈呭姪绾胯姱閰嶇疆</el-button>
-          <el-button v-show="active == 1 || (tabIndex == 4 && active == 2)" :loading="saveLoad" size="small" type="primary"
-            @click="save">鎻愪氦</el-button>
+          <el-button v-if="active == 1 && addObj.sampleType != undefined && addObj.sampleType.indexOf('鐢电紗') > -1"
+            size="small" type="primary" @click="openAuxiliaryCore">杈呭姪绾胯姱閰嶇疆</el-button>
+          <el-button v-show="active == 1 || (tabIndex == 4 && active == 2)" :loading="saveLoad" size="small"
+            type="primary" @click="save">鎻愪氦</el-button>
           <!-- 瀹℃牳 -->
           <el-button v-show="active == 3" :disabled="saveLoad" :loading="saveLoad" size="small"
             @click="upInsOrderOfState(2)">涓嶉�氳繃</el-button>
@@ -144,14 +144,14 @@
             </el-col>
             <el-col :span="6">
               <el-form-item label="鐢熶骇鍗曚綅:" prop="production">
-                <el-input v-model="addObj.production" :disabled="active > 1 && tabIndex != 4" clearable placeholder="璇疯緭鍏�"
-                  size="small"></el-input>
+                <el-input v-model="addObj.production" :disabled="active > 1 && tabIndex != 4" clearable
+                  placeholder="璇疯緭鍏�" size="small"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
               <el-form-item label="鐢熶骇鍗曚綅EN:" prop="productionEn">
-                <el-input v-model="addObj.productionEn" :disabled="active > 1 && tabIndex != 4" clearable placeholder="璇疯緭鍏�"
-                  size="small"></el-input>
+                <el-input v-model="addObj.productionEn" :disabled="active > 1 && tabIndex != 4" clearable
+                  placeholder="璇疯緭鍏�" size="small"></el-input>
               </el-form-item>
             </el-col>
             <el-col :span="6">
@@ -365,7 +365,8 @@
             <template slot="header" slot-scope="scope">
               <div style="display: flex;align-items: center;flex-direction: column;font-size: 14px">
                 <span>璇曢獙鏂规硶</span>
-                <el-input v-if="active == 1" v-model="methodS" placeholder="璇疯緭鍏�" size="mini" @input="searchFilterList" />
+                <el-input v-if="active == 1" v-model="methodS" placeholder="璇疯緭鍏�" size="mini"
+                  @input="searchFilterList" />
               </div>
             </template>
           </el-table-column>
@@ -522,8 +523,8 @@
             <div class="search_label" style="width: 80px;">瑕佹眰鍊硷細</div>
             <div class="search_input">
               <el-radio-group v-model="item.bsm1Val" v-removeAriaHidden @input="upBsmAll(item)">
-                <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.sectionCopy)" :key="ai"
-                  :label="a">{{ JSON.parse(item.bsmRow.askCopy)[ai] }}</el-radio>
+                <el-radio v-for="(a, ai) in JSON.parse(item.bsmRow.sectionCopy)" :key="ai" :label="a">{{
+                  JSON.parse(item.bsmRow.askCopy)[ai] }}</el-radio>
               </el-radio-group>
             </div>
           </el-col>
@@ -776,7 +777,7 @@
       temId: '',
       sonLaboratoryList: [],
       selectiveEcho: [], // 妫�楠屼笅鍗曠殑鏃跺�欏嬀閫夋楠岄」鐩�,濡傛灉浣跨敤绛涢�夋彁浜ゆ樉绀烘楠岄」鐩负绌� 鍥炴樉鍒楄〃
-      quarterItemOptions: [], // 鏌ヨ瀛e害淇℃伅
+      quarterItemOptions: [], // 鏌ヨ鍙潬鎬т俊鎭�
       specialStandardMethod: '',
       isSpecial: false,
     }
@@ -1376,7 +1377,7 @@
     handleNodeClick(val, node, el) {
       this.selectTree = ''
       this.models = val.children
-      this.selectTree = getReversedTreePath(node)
+      this.selectTree = this.getReversedTreePath(node)
     },
     /**
    * 鑾峰彇鍙嶅悜鎷兼帴鐨勬爲璺緞瀛楃涓�
@@ -1417,21 +1418,31 @@
     },
     activeStandardTree() {
       let trees = this.selectTree.split(" - ")
-      if (trees.length < 3) {
+      if (trees.length < 4) {
         this.$message.error('鏈�夋嫨瀵硅薄')
         return
       }
       this.addObj.factory = trees[0]
       this.addObj.laboratory = trees[1]
-      this.addObj.sampleType = trees[2]
-      if (trees[3] === undefined || trees[3] === '' || trees[3] === '- ') {
-        this.addObj.sample = trees[2]
+      if (trees[2] == '鍖呮潗' || trees[2] == '鍘熻緟鏉�') {
+        this.addObj.sampleType = trees[4]
+        if (trees[5] === undefined || trees[5] === '' || trees[5] === '- ') {
+          this.addObj.sample = trees[4]
+        } else {
+          this.addObj.sample = trees[5]
+        }
+        this.addObj.model = (trees[6] == undefined ? null : trees[6])
       } else {
-        this.addObj.sample = trees[3]
+        this.addObj.sampleType = trees[3]
+        if (trees[4] === undefined || trees[4] === '' || trees[4] === '- ') {
+          this.addObj.sample = trees[3]
+        } else {
+          this.addObj.sample = trees[4]
+        }
+        this.addObj.model = (trees[5] == undefined ? null : trees[5])
       }
       this.addObj.sampleView = this.addObj.sample
       this.addObj.sampleViewEn = this.sampleViewEn
-      this.addObj.model = (trees[4] == undefined ? null : trees[4])
       this.selectStandardTree = false
       this.sampleList = []
       for (var i = 0; i < this.addObj.sampleNum; i++) {

--
Gitblit v1.9.3