From 3115fcc80036ec4bfe3a2cd1128c5fdc82a01f42 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 28 四月 2026 16:38:27 +0800
Subject: [PATCH] limsTable表格自适应高度&手动下单调整

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

diff --git a/src/views/business/productOrder/components/addOrder.vue b/src/views/business/productOrder/components/addOrder.vue
index 5b9c516..e391217 100644
--- a/src/views/business/productOrder/components/addOrder.vue
+++ b/src/views/business/productOrder/components/addOrder.vue
@@ -14,9 +14,13 @@
           <el-select v-show="active==1" v-model="template" placeholder="涓嬪崟妯℃澘" size="small"
                      @change="selectInsOrderTemplateById">
             <el-option v-for="(a, ai) in templates" :key="ai" :label="a.name" :value="a.id">
-              <span style="float: left">{{ a.name }}</span>
-              <i class="el-icon-delete" style="float: right; color: #66b1ff; font-size: 16px"
-                 @click.stop="handleDelete(a)"></i>
+              <div style="display: flex; align-items: center; justify-content: space-between;">
+                <span>{{ a.name }}</span>
+                <i class="el-icon-delete"
+                   style="color: #66b1ff; font-size: 16px; cursor: pointer;"
+                   @click.stop="handleDelete(a)">
+                </i>
+              </div>
             </el-option>
           </el-select>
           <el-button v-show="active==1" size="small" @click="templateDia=true">
@@ -70,6 +74,40 @@
           </el-row>
           <el-row>
             <el-col :span="6">
+              <el-form-item label="IFS鍩�:" prop="contract">
+                <el-select v-model="addObj.contract" clearable placeholder="璇烽�夋嫨" size="small">
+                  <el-option label="ZTNS" value="ZTNS"/>
+                  <el-option label="KJNS" value="KJNS"/>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="鎵规鍙�:" prop="updateBatchNo">
+                <el-input v-model="addObj.updateBatchNo" clearable placeholder="璇疯緭鍏ユ壒娆″彿" size="small">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="闆朵欢鍙�" prop="partNo">
+                <el-input v-model="addObj.partNo" clearable placeholder="璇疯緭鍏ラ浂浠跺彿" size="small">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="闆朵欢鎻忚堪:" prop="partDesc">
+                <el-input v-model="addObj.partDesc" clearable placeholder="璇疯緭鍏ラ浂浠舵弿杩�" size="small">
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="渚涘簲鍟嗗悕绉�:" prop="supplierName">
+                <el-input v-model="addObj.supplierName" clearable placeholder="璇疯緭鍏ヤ緵搴斿晢鍚嶇О" size="small">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
               <el-form-item label="鑱旂郴鏂瑰紡:" prop="phone">
                 <el-input v-model="addObj.phone" :disabled="active>1&&tabIndex!=4" clearable placeholder="閫夋嫨濮旀墭瀹㈡埛" size="small"></el-input>
               </el-form-item>
@@ -89,14 +127,15 @@
                 </el-input>
               </el-form-item>
             </el-col>
+
+          </el-row>
+          <el-row>
             <el-col :span="6">
               <el-form-item label="鏍峰搧鏁伴噺:" prop="sampleNum" style="margin-right: 0">
                 <el-input-number v-model="addObj.sampleNum" :disabled="active>1" :max="100" :min="1" :precision="0"
                                  size="small" @change="addStandardTree"></el-input-number>
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="6">
               <el-form-item label="鏍峰搧鐘舵��:" prop="sampleStatus">
                 <el-select v-model="addObj.sampleStatus" :disabled="active>1&&tabIndex!=4" size="small">
@@ -116,6 +155,8 @@
                 </el-select>
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="6">
               <el-form-item label="鎶ュ憡鍙戦�佹柟寮�:" prop="send">
                 <el-radio-group v-model="addObj.send" :disabled="active>1&&tabIndex!=4" size="mini">
@@ -124,8 +165,6 @@
                 </el-radio-group>
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="6">
               <el-form-item label="鏍峰搧澶勭悊鏂瑰紡:" prop="processing">
                 <el-radio-group v-model="addObj.processing" :disabled="active>1&&tabIndex!=4" size="mini" style="display: flex; flex-direction: column;">
@@ -146,6 +185,8 @@
                           size="small"></el-input>
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="6">
               <el-form-item label="鏄惁鐣欐牱:" prop="isLeave">
                 <el-radio-group v-model="addObj.isLeave" border :disabled="active>1&&tabIndex!=4" size="mini">
@@ -154,8 +195,6 @@
                 </el-radio-group>
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="6">
               <el-form-item label="濮旀墭浜�:" prop="prepareUser">
                 <el-input v-model="addObj.prepareUser" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable size="small"></el-input>
@@ -172,14 +211,14 @@
                           size="small" style="width: 100%" type="textarea"></el-input>
               </el-form-item>
             </el-col>
+          </el-row>
+          <el-row>
             <el-col :span="6">
               <el-form-item label="澶囨敞鑻辨枃:" prop="remarkEn">
                 <el-input v-model="addObj.remarkEn" :autosize="{ minRows: 2, maxRows: 2}" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
                           size="small" type="textarea"></el-input>
               </el-form-item>
             </el-col>
-          </el-row>
-          <el-row>
             <el-col :span="6">
               <el-form-item label="鏍峰搧鍚嶇О:" prop="sampleView">
                 <el-input v-model="addObj.sampleView" :disabled="active>1&&tabIndex!=4" :placeholder="active>1 ? '' : '璇疯緭鍏�'" clearable
@@ -229,6 +268,8 @@
             <el-input v-model="specialStandardMethod" :disabled="!isSpecial" clearable size="small"></el-input>
             <el-button v-show="active==1" size="small" style="margin-left: 10px"
                        type="primary" @click="editSpecial">缂栬緫</el-button>
+            <el-button v-show="active==1" size="small" type="primary" @click="handleSplitCountNum">鎷嗗垎</el-button>
+            <el-button v-show="active==1" :disabled="sampleList.length<=1" size="small" type="danger" @click="handleDeleteSplitCountNum">鍒犻櫎鎷嗗垎</el-button>
           </div>
         </div>
         <el-table ref="sampleTable" :data="sampleList" border class="el-table sampleTable" highlight-current-row
@@ -238,18 +279,18 @@
           <el-table-column align="center" label="搴忓彿" type="index" width="65"></el-table-column>
           <el-table-column align="center" label="鏍峰搧鍚嶇О" min-width="100" prop="sample">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.sample" :disabled="active>1" clearable size="small"></el-input>
+              <el-input v-model="scope.row.sample" :disabled="active>1 || scope.$index !== 0" clearable size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column align="center" label="鏍峰搧缂栧彿" min-width="100" prop="sampleCode">
             <template slot-scope="scope">
-              <el-input v-model="scope.row.sampleCode" :disabled="active>1" clearable placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚"
+              <el-input v-model="scope.row.sampleCode" :disabled="active>1 || scope.$index !== 0" clearable placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚"
                 size="small"></el-input>
             </template>
           </el-table-column>
           <el-table-column align="center" label="鏍峰搧鍨嬪彿" min-width="60" prop="model">
             <template slot-scope="scope">
-              <el-select v-model="scope.row.model" :disabled="active>1" allow-create default-first-option filterable
+              <el-select v-model="scope.row.model" :disabled="active>1 || scope.$index !== 0" allow-create default-first-option filterable
                 placeholder="鏍峰搧鍨嬪彿" size="small" style="width: 100%;" @change="handleChangeModel">
                 <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
@@ -276,7 +317,7 @@
           <el-table-column align="center" label="妫�楠屾爣鍑�" min-width="100" prop="standardMethodListId">
             <template slot-scope="scope">
               <el-select v-model="scope.row.standardMethodListId" :disabled="scope.row.model==null||active>1"
-                :loading="methodLoad" :readonly="active>1" clearable placeholder="妫�楠屾爣鍑�"
+                :loading="methodLoad" :readonly="active>1 || scope.$index !== 0" clearable placeholder="妫�楠屾爣鍑�"
                 size="small" style="width: 100%;" @change="(value)=>methodChange(value, scope.row)" @clear="productList = []" @focus="methodFocus">
                 <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id">
                 </el-option>
@@ -377,12 +418,12 @@
           <el-table-column label="鍖洪棿" min-width="120" prop="section" show-overflow-tooltip></el-table-column>
           <el-table-column :filter-method="filterHandler" :filters="filters" label="瀛愬疄楠屽" min-width="130" prop="sonLaboratory"
             show-overflow-tooltip></el-table-column>
-            <el-table-column v-if="isSpecial&&active==1" label="鎿嶄綔" width="100">
-            <template slot-scope="scope">
-              <el-button v-if="!scope.row.repetitionTag" size="small" type="text" @click="addProductList(productList,scope.row,scope.$index)">鎻掑叆琛�</el-button>
-              <el-button v-if="!!scope.row.repetitionTag&&scope.row.delete" size="small" type="text" @click="deleteProductList(scope.$index,productList)">鍒犻櫎</el-button>
-            </template>
-          </el-table-column>
+<!--            <el-table-column v-if="isSpecial&&active==1" label="鎿嶄綔" width="100">-->
+<!--            <template slot-scope="scope">-->
+<!--              <el-button v-if="!scope.row.repetitionTag" size="small" type="text" @click="addProductList(productList,scope.row,scope.$index)">鎻掑叆琛�</el-button>-->
+<!--              <el-button v-if="!!scope.row.repetitionTag&&scope.row.delete" size="small" type="text" @click="deleteProductList(scope.$index,productList)">鍒犻櫎</el-button>-->
+<!--            </template>-->
+<!--          </el-table-column>-->
         </el-table>
       </div>
     </div>
@@ -390,7 +431,7 @@
       <div v-if="selectUserDia" class="body">
         <lims-table :tableData="tableData1" :column="column1"
                     :isSelection="true" :handleSelectionChange="selectMethod"
-                    @pagination="pagination1" height="400px" key="tableData1"
+                    @pagination="pagination1" :height="400" key="tableData1"
                     :page="page1" :tableLoading="tableLoading1"></lims-table>
       </div>
       <span slot="footer" class="dialog-footer">
@@ -587,7 +628,7 @@
 } from "@/api/business/rawMaterialOrder";
 import {
   addInsOrder, addInsOrderTemplate, delInsOrderTemplate,
-  getQuarterOnOrder, selectInsOrderTemplateById,
+  getQuarterOnOrder, judgeNotSpotCheckOrder, selectInsOrderTemplateById,
   selectOrderManDay,
   updateInsOrder,
   upInsOrder,
@@ -597,7 +638,9 @@
 import {selectsStandardMethodByFLSSM} from "@/api/standard/standardLibrary";
 import limsTable from "@/components/Table/lims-table.vue";
 import {selectCustomPageList} from "@/api/system/customer";
+import { bigEval } from "@/utils/bigEval";
 import {mapGetters} from "vuex";
+import {addQuarter, updateQuarterOnOrder} from "@/api/business/finishedProductSampling";
 
 export default {
   name: 'AddOrder',
@@ -607,7 +650,7 @@
     AuxiliaryWireCore
   },
   computed:{
-  ...mapGetters(["nickName"]),
+    ...mapGetters(["nickName", 'nameEn', 'userName']),
   },
   dicts: ['check_type1', 'urgency_level', 'form_type', 'sample_status_list'],
   data() {
@@ -621,6 +664,11 @@
       templates: [],
       addObj: {
         entrustCode: null,
+        contract:null,
+        updateBatchNo: null,
+        partDesc: null,
+        partNo: null,
+        supplierName: null,
         custom: null,
         company: null,
         userId: null,
@@ -656,6 +704,9 @@
         sampleViewEn: '', // 鏍峰搧鍚嶇О鑻辨枃锛堟姤鍛婂睍绀哄瓧娈碉級
       },
       addObjRules: { // 琛ㄥ崟鏍¢獙瑙勫垯
+        contract: [
+          { required: true, message: '璇烽�夋嫨IFS鍩�', trigger: 'change' }
+        ],
         orderType: [
           { required: true, message: '璇烽�夋嫨妫�楠岀被鍒�', trigger: 'change' }
         ],
@@ -793,10 +844,10 @@
     }
   },
   watch: {
-    sampleList() {
-      this.addObj.method = null
-      this.productList = []
-    },
+    // sampleList() {
+    //   this.addObj.method = null
+    //   this.productList = []
+    // },
     productList: {
       deep: true,
       handler(val) {
@@ -842,6 +893,11 @@
     this.currentId = this.$route.query.currentId
     this.getUserNowData()
     this.getInfo()
+    if(this.tabIndex==4&&this.active==2){
+      this.isSpecial = true
+    }else{
+      this.isSpecial = false
+    }
   },
   activated() {
     this.active = this.$route.query.active
@@ -850,11 +906,41 @@
     this.getInfo();
   },
   methods: {
+    // 鎷嗗垎
+    handleSplitCountNum () {
+      if(!this.sampleList || this.sampleList.length===0){
+        this.$message.error("璇峰厛閫夋嫨鏍峰搧")
+        return
+      }
+      this.sample.joinName = null
+      this.sample.joinModel = null
+      this.sample.joinNum = 1
+      // 涓ゆ潯鏁版嵁淇濇寔涓�鑷�
+      this.sample.sample = this.sampleList[0].sample
+      this.sample.model = this.sampleList[0].model
+      this.sample.unit = this.sampleList[0].unit
+      this.sample.modelNum = this.sampleList[0].modelNum
+      this.sample.standardMethodListId = this.sampleList[0].standardMethodListId
+      this.sample.insProduct = this.sampleList[0].insProduct
+      this.sample.id = this.count
+      this.sample.childSampleList = this.sampleList[0].childSampleList
+      this.sample.insulating = null
+      this.sample.sheath = null
+      this.sampleList.push(this.HaveJson(this.sample))
+      this.sampleList.forEach(item => {
+        item.quantity = 1
+      })
+      this.count++
+    },
+    //鍒犻櫎鎷嗗垎琛�
+    handleDeleteSplitCountNum(){
+      this.count--;
+      this.sampleList.pop()
+    },
     getInfo() {
       this.selectStandardTreeList()
       this.getAuthorizedPerson();
       this.selectStandardMethods()
-      this.getPrepareUser() // 澶嶅埗褰撳墠璐﹀彿浜轰负濮旀墭浜�
       if (this.active != 1) {
         // 鏌ョ湅/瀹℃牳娴佺▼
         // 璇锋眰鎺ュ彛锛屽洖鏄炬暟鎹�
@@ -878,16 +964,7 @@
           })
         })
       }
-      if(this.tabIndex==4&&this.active==2){
-        this.isSpecial = true
-      }else{
-        this.isSpecial = false
-      }
-    },
-    getPrepareUser () {
-        // this.addObj.prepareUser = JSON.parse(localStorage.getItem("user")).name;
-        // this.addObj.prepareUserEn = JSON.parse(localStorage.getItem("user")).nameEn
-        // this.addObj.prepareCode = JSON.parse(localStorage.getItem("user")).account
+
     },
       // 缂栬緫瑕佹眰鍊艰〃鏍�
       editSpecial () {
@@ -917,14 +994,14 @@
       },
       changeProductList0(){
         this.productList0.forEach(a=>{
-          let obj = this.productList.find(m => {
-            if(a.repetitionTag){
-              return m.id === a.id&&m.repetitionTag == a.repetitionTag
-            }else{
-              return m.id === a.id&&!m.repetitionTag
-            }
-          })
-
+        //   let obj = this.productList.find(m => {
+        //     if(a.repetitionTag){
+        //       return m.id === a.id&&m.repetitionTag == a.repetitionTag
+        //     }else{
+        //       return m.id === a.id&&!m.repetitionTag
+        //     }
+        //   })
+          let obj = this.productList.find(m => m.id == a.id)
           if(obj){
             a.state = obj.state
             a.section = obj.section
@@ -1033,6 +1110,37 @@
           return symbolItem
         }
       },
+    /**
+     * 鑾峰彇灏忔暟鐨勬渶澶т綅鏁�
+     * @param number  鍨嬪彿鍙傛暟
+     * @param ask     瑕佹眰鍊�
+     * @param calcNum 璁$畻鍊�
+     */
+    getDecimalPlaces(number, ask, calcNum) {
+      console.log("璁$畻灏忔暟鐐�-->", number, ask, calcNum);
+      let count1 = 0;
+      let count2 = 0;
+      const reg = /(\d+\.)(\d+)/g;
+      let matches = [];
+      if (ask) {
+        matches = ask.match(reg);
+      }
+      if (
+        matches &&
+        matches.length > 0 &&
+        matches[0].toString().indexOf(".") > -1
+      ) {
+        count1 = matches[0].toString().split(".")[1].length;
+      }
+      if (number.toString().indexOf(".") > -1) {
+        count2 = number.toString().split(".")[1].length;
+      }
+      if (calcNum.toString().indexOf(".") > -1) {
+        const pointLength2 = calcNum.toString().split(".")[1].length;
+        count2 = count2 > pointLength2 ? count2 : pointLength2;
+      }
+      return count1 > count2 ? count1 : count2;
+    },
       handleAsk(ask,symbolItem, value) {
         try{
           let code = [">", "<", "=", "锛�", "锛�", "鈮�", "鈮�", "卤"];
@@ -1045,7 +1153,13 @@
               let index = code.findIndex(b => m.includes(b))
               if (index > -1) {
                 let arr = m.split(code[index]).filter(b => !!b)
-                let num = eval(this.replaceAll(arr[0], symbolItem, value))
+                let calcNum = this.$Big(
+                  bigEval(this.replaceAll(arr[0], symbolItem, value))
+                );
+                let num = calcNum.toFixed(
+                  this.getDecimalPlaces(value, ask, calcNum)
+                );
+                // let num = eval(this.replaceAll(arr[0], symbolItem, value))
                 m = code[index] + '' + num
                 arr1.push(m)
               }
@@ -1074,7 +1188,13 @@
             let index = code.findIndex(b => ask.includes(b))
             if (index > -1) {
               let arr = ask.split(code[index]).filter(b => !!b)
-              let num = eval(this.replaceAll(arr[0], symbolItem, value))
+              let calcNum = this.$Big(
+                bigEval(this.replaceAll(arr[0], symbolItem, value))
+              );
+              let num = calcNum.toFixed(
+                this.getDecimalPlaces(value, ask, calcNum)
+              );
+              // let num = eval(this.replaceAll(arr[0], symbolItem, value))
               return code[index] + '' + num
             }
           }
@@ -1260,36 +1380,62 @@
         }
       },
       saveMethod(sampleList){
-        this.saveLoad = true
         if (this.addObj.quarterItemId) {
           this.addObj.quarterItemId = this.addObj.quarterItemId[1]
         }
-        if(this.tabIndex==4&&this.active==2){
-          if (this.addObj.createTime) {
-            delete this.addObj.createTime
-          }
-          // 閫�鍥炲悗鎻愪氦
-          updateInsOrder({insOrder: this.addObj, sampleProduct: sampleList}).then(res => {
-            this.saveLoad = false
-            this.$message.success('宸叉彁浜�')
-            this.bsm3Dia = false;
-            this.closeOpenPage()
-          }).catch(e=>{
-            this.saveLoad = false
-          })
-        }else{
-          // 甯歌鎻愪氦
-          addInsOrder({insOrder: this.addObj, sampleList: sampleList}).then(res => {
-            this.saveLoad = false
-            this.$message.success('宸叉彁浜�')
-            this.bsm3Dia = false;
-            this.closeOpenPage()
-          }).catch(e=>{
-            this.saveLoad = false
-          })
+        if (this.addObj.createTime) {
+          delete this.addObj.createTime
         }
-
+        if (this.addObj.orderType === '鎶芥') {
+          judgeNotSpotCheckOrder({ insOrder: this.addObj, sampleList: sampleList }).then(res => {
+            if (res.data === true) {
+              this.saveData(sampleList);
+            } else {
+              // const message = res.message.replace(/\n/g, '<br>');
+              this.$confirm(res.message, '鎻愮ず', {
+                confirmButtonText: '纭畾',
+                cancelButtonText: '鍙栨秷',
+                type: 'warning',
+                dangerouslyUseHTMLString: true, // 馃憟 鍏抽敭鐐癸細鍏佽 HTML
+                message: res.message // 杩欓噷涔熷彲浠ョ渷鐣ワ紝鍥犱负绗簩涓弬鏁版槸 title锛岀涓変釜鏄� options
+              }).then(() => {
+                this.saveData(sampleList);
+              }).catch(() => {
+                this.$message({
+                  type: 'info',
+                  message: '宸插彇娑�'
+                });
+              });
+            }
+          });
+        } else {
+          this.saveData(sampleList)
+        }
       },
+    saveData(sampleList) {
+      this.saveLoad = true
+      if(this.tabIndex==4&&this.active==2){
+        // 閫�鍥炲悗鎻愪氦
+        updateInsOrder({insOrder: this.addObj, sampleProduct: sampleList}).then(res => {
+          this.saveLoad = false
+          this.$message.success('宸叉彁浜�')
+          this.bsm3Dia = false;
+          this.closeOpenPage()
+        }).catch(e=>{
+          this.saveLoad = false
+        })
+      }else{
+        // 甯歌鎻愪氦
+        addInsOrder({insOrder: {...this.addObj,typeSource:-1}, sampleList: sampleList}).then(res => {
+          this.saveLoad = false
+          this.$message.success('宸叉彁浜�')
+          this.bsm3Dia = false;
+          this.closeOpenPage()
+        }).catch(e=>{
+          this.saveLoad = false
+        })
+      }
+    },
       upInsOrderOfState(state) {
         if (state == 1) {
           this.saveLoad = true
@@ -1348,6 +1494,9 @@
         })
       },
       getUserNowData() {
+      this.addObj.prepareUser = this.nickName
+      this.addObj.prepareUserEn = this.nameEn
+      this.addObj.prepareCode = this.userName
         getUserNow().then(res => {
           let selects = res.data
           if (selects == null) return
@@ -1357,8 +1506,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 = 'Zhongtian Naisi Co., Ltd.'
           if(this.active==1){
             this.selectInsOrderTemplate()
           }
@@ -1579,10 +1728,10 @@
             this.$set(row, 'sectionCopy', row.section)
           }
         }
-        if (row.ask.includes('[')) {
+        if (row.ask && row.ask.includes('[')) {
           this.$set(row, 'askCopy', row.ask)
         }
-        if (row.tell.includes('[')) {
+        if (row.tell && row.tell.includes('[')) {
           this.$set(row, 'tellCopy', row.tell)
         }
         let arr = this.productList.filter(m=>m.state==1&&row.sectionCopy&&row.sectionCopy.includes(m.sectionCopy)&&m.ask&&m.sectionCopy.indexOf('[')==-1)
@@ -1853,24 +2002,35 @@
       },
       // 瑕佹眰鍊煎彉鍖栨椂
       requestChange(e, row,type) {
-        //this.currentMethod 褰撳墠鏍峰搧id
-        this.sampleList.forEach(item=>{
-          if(item.id == this.currentMethod.id){
-            item.insProduct.forEach(i=>{
-              if(i.id == row.id){
-                if(row.repetitionTag){
-                  if(row.repetitionTag==i.repetitionTag){
-                    i[type] = e
-                  }
-                }else{
-                  if(!i.repetitionTag){
-                    i[type] = e
-                  }
-                }
+        this.sampleList.map(item => {
+          if (this.sampleIds.indexOf(item.id) > -1) {
+            item.insProduct.map(m => {
+              if (m.id == row.id) {
+                m[type] = e;
               }
+              return m;
             })
           }
+          return item
         })
+        //this.currentMethod 褰撳墠鏍峰搧id
+        // this.sampleList.forEach(item=>{
+        //   if(item.id == this.currentMethod.id){
+        //     item.insProduct.forEach(i=>{
+        //       if(i.id == row.id){
+        //         if(row.repetitionTag){
+        //           if(row.repetitionTag==i.repetitionTag){
+        //             i[type] = e
+        //           }
+        //         }else{
+        //           if(!i.repetitionTag){
+        //             i[type] = e
+        //           }
+        //         }
+        //       }
+        //     })
+        //   }
+        // })
       },
       selectStandardMethods() {
         selectStandardMethodEnum().then(res => {
@@ -1885,7 +2045,12 @@
         }
       },
       selectable0(row,index) {
-        if (this.active > 1||row.repetitionTag) {
+        // if (this.active > 1||row.repetitionTag) {
+        //   return false
+        // } else {
+        //   return true
+        // }
+        if (this.active > 1) {
           return false
         } else {
           return true
@@ -1912,18 +2077,12 @@
               this.$set(p, 'sectionCopy', p.section)
             }
           }
-          if (p.ask.includes('[')) {
+          if (p.ask && p.ask.includes('[')) {
             this.$set(p, 'askCopy', p.ask)
           }
-          if (p.tell.includes('[')) {
+          if (p.tell && p.tell.includes('[')) {
             this.$set(p, 'tellCopy', p.tell)
           }
-          // if (p.manHour.includes('[')) {
-          //   this.$set(p, 'manHourCopy', p.manHour)
-          // }
-          // if (p.price.includes('[')) {
-          //   this.$set(p, 'priceCopy', p.price)
-          // }
           if (p.bsm === '1' && p.sectionCopy !== '' && p.sectionCopy !== null && p.sectionCopy !== undefined && p.state === 1) {
             if (p.sectionCopy.indexOf('[') > -1) {
               p.bsmRow = this.HaveJson(p)
@@ -1956,11 +2115,6 @@
             return item
           })
         }
-        this.productList.forEach(item => {
-          if (item.id == row.id) {
-            item.state = row.state;
-          }
-        })
         this.changeProductList0()
         this.currentMethod.insProduct = this.productList0
         this.getProNum()

--
Gitblit v1.9.3