From b8db59d4774ce0134f06500400a3723962a1c4b6 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 29 四月 2026 16:19:38 +0800
Subject: [PATCH] 委托下单:支持检验项重复检验功能

---
 src/views/business/productOrder/components/addOrder.vue           |  114 ++++++++++---------------------------
 src/views/business/unpass/index-manage.vue                        |    2 
 src/views/structural/capabilityAndLaboratory/capability/index.vue |    6 +-
 3 files changed, 36 insertions(+), 86 deletions(-)

diff --git a/src/views/business/productOrder/components/addOrder.vue b/src/views/business/productOrder/components/addOrder.vue
index e391217..0993355 100644
--- a/src/views/business/productOrder/components/addOrder.vue
+++ b/src/views/business/productOrder/components/addOrder.vue
@@ -268,8 +268,6 @@
             <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
@@ -279,18 +277,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 || scope.$index !== 0" clearable size="small"></el-input>
+              <el-input v-model="scope.row.sample" :disabled="active>1" 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 || scope.$index !== 0" clearable placeholder="涓嶅~鍐欏垯绯荤粺鑷姩鐢熸垚"
+              <el-input v-model="scope.row.sampleCode" :disabled="active>1" 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 || scope.$index !== 0" allow-create default-first-option filterable
+              <el-select v-model="scope.row.model" :disabled="active>1" 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>
@@ -317,7 +315,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 || scope.$index !== 0" clearable placeholder="妫�楠屾爣鍑�"
+                :loading="methodLoad" :readonly="active>1" 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>
@@ -418,12 +416,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 style="color:#ff4949" 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>
@@ -906,37 +904,6 @@
     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();
@@ -994,14 +961,13 @@
       },
       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 => m.id == a.id)
+          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
+            }
+          })
           if(obj){
             a.state = obj.state
             a.section = obj.section
@@ -2002,35 +1968,24 @@
       },
       // 瑕佹眰鍊煎彉鍖栨椂
       requestChange(e, row,type) {
-        this.sampleList.map(item => {
-          if (this.sampleIds.indexOf(item.id) > -1) {
-            item.insProduct.map(m => {
-              if (m.id == row.id) {
-                m[type] = e;
+        //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
+                  }
+                }
               }
-              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 => {
@@ -2045,12 +2000,7 @@
         }
       },
       selectable0(row,index) {
-        // if (this.active > 1||row.repetitionTag) {
-        //   return false
-        // } else {
-        //   return true
-        // }
-        if (this.active > 1) {
+        if (this.active > 1||row.repetitionTag) {
           return false
         } else {
           return true
diff --git a/src/views/business/unpass/index-manage.vue b/src/views/business/unpass/index-manage.vue
index 6b08928..1ed6b55 100644
--- a/src/views/business/unpass/index-manage.vue
+++ b/src/views/business/unpass/index-manage.vue
@@ -119,7 +119,7 @@
                   :handleSelectionChange="selectMethod"
                   :rowClassName="insOrderRowClassName"
                   @pagination="insOrderPageination"
-                  height="400px"
+                  :height="500"
                   :page="insOrderPage"
                   :tableLoading="insOrderTableLoading">
       </lims-table>
diff --git a/src/views/structural/capabilityAndLaboratory/capability/index.vue b/src/views/structural/capabilityAndLaboratory/capability/index.vue
index b64df31..cdeaa99 100644
--- a/src/views/structural/capabilityAndLaboratory/capability/index.vue
+++ b/src/views/structural/capabilityAndLaboratory/capability/index.vue
@@ -189,7 +189,7 @@
       ],
       page: {
         total:0,
-        size:10,
+        size:20,
         current:1
       },
       testObjectTableData: [],
@@ -299,7 +299,7 @@
       ],
       testObjectPage: {
         total:0,
-        size:10,
+        size:20,
         current:0
       },
       addOrUpdate: '',
@@ -356,7 +356,7 @@
       productData: [],
       productPage: {
         total:0,
-        size:10,
+        size:20,
         current:1,
         partNo: null,
         layout: 'total, prev, pager, next'

--
Gitblit v1.9.3