From ea2b6775c278d8990e858a309a966b82b36f4d40 Mon Sep 17 00:00:00 2001
From: Crunchy <3114200645@qq.com>
Date: 星期六, 13 七月 2024 15:11:25 +0800
Subject: [PATCH] 设备数采配置提交

---
 src/components/do/b1-ins-order/add.vue |   41 +++++++++++++++++++++++++++++++----------
 1 files changed, 31 insertions(+), 10 deletions(-)

diff --git a/src/components/do/b1-ins-order/add.vue b/src/components/do/b1-ins-order/add.vue
index 38d8c5f..bae9b02 100644
--- a/src/components/do/b1-ins-order/add.vue
+++ b/src/components/do/b1-ins-order/add.vue
@@ -458,6 +458,8 @@
             </div>
           </template>
         </el-table-column>
+        <el-table-column prop="inspectionItemClass" v-if="PROJECT === '瑁呭鐢电紗'" label="妫�楠岄」鍒嗙被" min-width="140" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="inspectionItemClassEn" v-if="PROJECT === '瑁呭鐢电紗'" label="妫�楠岄」鍒嗙被(EN)" min-width="140" show-overflow-tooltip></el-table-column>
         <el-table-column prop="sonLaboratory" label="瀛愬疄楠屽" min-width="130" show-overflow-tooltip :filters="filters"
           :filter-method="filterHandler"></el-table-column>
         <el-table-column prop="methodS" label="璇曢獙鏂规硶" min-width="120" show-overflow-tooltip>
@@ -834,6 +836,7 @@
         </div>
       </div>
       <span slot="footer" class="dialog-footer">
+        <el-button @click="cleanSpliceData">鍙栨秷</el-button>
         <el-button type="primary" @click="spliceData">淇濆瓨</el-button>
       </span>
     </el-dialog>
@@ -1170,17 +1173,33 @@
         console.log('tell---', tell)
         this.circulateShow = false
       },
+      cleanSpliceData () {
+        this.circulateForm.entrustNum = null
+        this.circulateForm.entrustTime = null
+        this.circulateForm.entrustPoint = null
+        this.opticalProjectList = []
+        this.$refs.multipleTable.clearSelection()
+        this.temperatureData = []
+        this.circulateShow = false
+      },
       beforeCirculateShowClose () {
-        if (!this.circulateForm.entrustNum || !this.circulateForm.entrustTime || !this.circulateForm.entrustPoint || this.opticalProjectList.length === 0 || this.temperatureData.length === 0) {
-          this.$message.error('璇峰~鍐欏畬鏁存暟鎹�')
-          return
-        }
-        let temperaturePoint1 = JSON.parse(JSON.stringify(this.temperatureData))
-        temperaturePoint1.forEach(t => {
-          if (!t.temperaturePoint || !t.askSymbol || !t.askNum) {
-            throw this.$message.error('璇峰~鍐欏畬鏁存暟鎹�')
+          if (!this.circulateForm.entrustNum || !this.circulateForm.entrustTime || !this.circulateForm.entrustPoint || this.opticalProjectList.length === 0 || this.temperatureData.length === 0) {
+            this.$message.error('璇峰~鍐欏畬鏁存暟鎹�')
+            return
           }
-        })
+          // 鎷兼帴瑕佹眰鍊糰sk
+          const opticalProjectList = JSON.parse(JSON.stringify(this.opticalProjectList))
+          opticalProjectList.forEach(o => {
+            o.temperatureData.forEach(t => {
+              if (!t.temperaturePoint || !t.askSymbol || !t.askNum) {
+                throw this.$message.error('璇峰~鍐欏畬鏁存暟鎹�')
+              }
+            })
+            if (!o.temperatureData.some(item => item.temperaturePoint == '20')) {
+              throw this.$message.error(`${o.value + '娉㈤暱娌℃湁閰嶇疆20鈩冩俯搴︾偣'}`)
+            }
+          })
+          this.spliceData()
       },
       handleSelectionChange(val) {
         this.opticalProjectList = val;
@@ -2202,7 +2221,9 @@
       handleAll(e) {
         if (e.length > 0) {
           this.productList.map(m => {
-            m.state = 1
+            if(e.find(a=>a.id == m.id)){
+              m.state = 1
+            }
             return m
           })
         } else {

--
Gitblit v1.9.3