From e94805337e96e0092d7db6dd81dcdd0b0412cb02 Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期五, 09 一月 2026 15:32:53 +0800
Subject: [PATCH] 1.质检方案页面优化2.工序检验页面优化

---
 src/views/workOrder/workOrderList.vue |  154 +++++++++++++++++++++++++++++++--------------------
 1 files changed, 93 insertions(+), 61 deletions(-)

diff --git a/src/views/workOrder/workOrderList.vue b/src/views/workOrder/workOrderList.vue
index e00068f..88c5739 100644
--- a/src/views/workOrder/workOrderList.vue
+++ b/src/views/workOrder/workOrderList.vue
@@ -514,18 +514,18 @@
           :header-cell-style="this.$headerCellStyle"
           :cell-style="this.$cellStyle"
         >
-          <!--          <el-table-column-->
-          <!--            width="50"-->
-          <!--            type="index"-->
-          <!--            prop="搴忓彿"-->
-          <!--            fixed-->
-          <!--          />   -->
           <el-table-column
             width="50"
-            prop="seq"
-            label="搴忓彿"
+            type="index"
+            prop="搴忓彿"
             fixed
           />
+          <!--          <el-table-column-->
+          <!--            width="50"-->
+          <!--            prop="seq"-->
+          <!--            label="搴忓彿"-->
+          <!--            fixed-->
+          <!--          />-->
           <el-table-column
             prop="wo_code"
             show-tooltip-when-overflow
@@ -613,24 +613,6 @@
                     @click="pre(row,2)"
                   />
                 </el-tooltip>
-                <!--                          <el-tooltip class="item" effect="dark" content="鎵撳嵃宸ュ簭" placement="top">-->
-                <!--                            <i-->
-                <!--                              v-if="tableDataDetail.length!==row.seq"-->
-                <!--                              class="el-icon-printer"-->
-                <!--                              :style="{color:$store.state.settings.theme}"-->
-                <!--                              style="cursor: pointer;margin-right: 15px"-->
-                <!--                              @click="supplementSmallClick(row)"-->
-                <!--                            />-->
-                <!--                          </el-tooltip>-->
-                <!--                          <el-tooltip class="item" effect="dark" content="琛ユ墦鐢熶骇鍏ュ簱鏉$爜" placement="top">-->
-                <!--                            <i-->
-                <!--                              v-if="tableDataDetail.length===row.seq"-->
-                <!--                              class="  el-icon-camera"-->
-                <!--                              :style="{color:$store.state.settings.theme}"-->
-                <!--                              style="cursor: pointer;margin-right: 15px"-->
-                <!--                              @click="getProductInHouseLabCode(row.wo_code)"-->
-                <!--                            />-->
-                <!--                          </el-tooltip>-->
               </div>
             </template>
           </el-table-column>
@@ -1543,6 +1525,7 @@
             </div>
             <div
               id="qrCode0"
+              :key="formApprove.mesordercode"
               style="width: 22%;height:90px;
                         margin-top: 20px;
                         overflow-y: scroll;display: flex;
@@ -1573,22 +1556,29 @@
               width="70"
               align="center"
             />
+            <!--            <el-table-column-->
+            <!--              id="column1"-->
+            <!--              prop="stepqrcode"-->
+            <!--              label="宸ュ簭浜岀淮鐮�"-->
+            <!--              width="100"-->
+            <!--              align="center"-->
+            <!--            >-->
+            <!--              <template slot-scope="{row}">-->
+
+            <!--                <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />-->
+            <!--              </template>-->
+            <!--            </el-table-column>-->
             <el-table-column
               id="column1"
-              prop="stepqrcode"
-              label="宸ュ簭浜岀淮鐮�"
+              prop="stepcode"
+              label="宸ュ簭缂栫爜"
               width="100"
               align="center"
-            >
-              <template slot-scope="{row}">
-
-                <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />
-              </template>
-            </el-table-column>
+            />
             <el-table-column
               id="column2"
               prop="stepname"
-              label="宸ュ簭"
+              label="宸ュ簭鍚嶇О"
               width="120"
               align="center"
             />
@@ -1672,6 +1662,7 @@
             </div>
             <div
               id="qrCode1"
+              :key="formApprove.mesordercode"
               style="width: 22%;height:90px;
                         margin-top: 20px;
                         overflow-y: scroll;display: flex;
@@ -1702,18 +1693,25 @@
               width="70"
               align="center"
             />
+            <!--            <el-table-column-->
+            <!--              id="column1"-->
+            <!--              prop="stepqrcode"-->
+            <!--              label="宸ュ簭浜岀淮鐮�"-->
+            <!--              width="100"-->
+            <!--              align="center"-->
+            <!--            >-->
+            <!--              <template slot-scope="{row}">-->
+
+            <!--                <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />-->
+            <!--              </template>-->
+            <!--            </el-table-column>-->
             <el-table-column
               id="column1"
-              prop="stepqrcode"
-              label="宸ュ簭浜岀淮鐮�"
+              prop="stepcode"
+              label="宸ュ簭缂栫爜"
               width="100"
               align="center"
-            >
-              <template slot-scope="{row}">
-
-                <div :id="'qrCode'+row.seq" :ref="'qrCodeDiv'+row.seq" :key="'qrCodeDiv'+row.seq" class="tableColumn" />
-              </template>
-            </el-table-column>
+            />
             <el-table-column
               id="column2"
               prop="stepname"
@@ -3184,6 +3182,7 @@
       const flag2 = []
       const data = []
       this.formData3.forEach((i, index) => {
+        const islastreport = this.wkshopcodeArr.find(j => j.torg_code === i.wkshopcode).islastreport
         const workListSub = []
         if (i.stepTableData.length > 0) {
           i.stepTableData.forEach((it, j) => {
@@ -3195,10 +3194,12 @@
                 isbott: j === 0 ? 'Y' : 'N',
                 isend: j === i.stepTableData.length - 1 ? 'Y' : 'N',
                 ratio: it.ratio,
-                sumqty: it.sumqty
+                sumqty: it.sumqty,
+                isShow: islastreport === 'N' ? 'Y' : (j === i.stepTableData.length - 1 ? 'Y' : 'N')
               }
             )
           })
+          console.log(JSON.parse(JSON.stringify(workListSub)))
 
           if (this.mesSetting.isOrder) {
             const f = workListSub.every((item, index, array) => {
@@ -3923,6 +3924,10 @@
           if (this.mesSetting.route && !this.dialogForm.routecode) {
             return this.$message.error('璇烽�夋嫨宸ヨ壓璺嚎锛�')
           }
+
+          const islastreport = this.wkshopcodeArr.find(i => i.torg_code === this.dialogForm.wkshopcode).islastreport
+
+          // console.log(islastreport === 'N', islastreport)
           const workListSub = []
           this.stepTableData.forEach((i, j) => {
             workListSub.push(
@@ -3933,7 +3938,8 @@
                 isbott: j === 0 ? 'Y' : 'N',
                 isend: j === this.stepTableData.length - 1 ? 'Y' : 'N',
                 ratio: i.ratio,
-                sumqty: i.sumqty
+                sumqty: i.sumqty,
+                isShow: islastreport === 'N' ? 'Y' : (j === this.stepTableData.length - 1 ? 'Y' : 'N')
               }
             )
           })
@@ -3950,7 +3956,7 @@
               return this.$message.error('鏈夊簭鎶ュ伐鎯呭喌涓嬶紝瓒呮姤姣斾緥鍚庨亾宸ュ簭涓嶈兘澶т簬鍓嶉亾宸ュ簭锛�')
             }
           }
-          console.log(isNaN(this.dialogForm.mesqty - this.dialogForm.mesqtyinit))
+          // console.log(isNaN(this.dialogForm.mesqty - this.dialogForm.mesqtyinit))
           const data = {
             wostatus: this.dialogForm.mesorderstus, // 宸ュ崟鐘舵��
             wocode: this.dialogForm.mesordercode, // 宸ュ崟鍙�
@@ -3969,6 +3975,8 @@
             routecode: this.dialogForm.routecode,
             workListSub
           }
+
+          // console.log(JSON.parse(JSON.stringify(data)))
 
           this.$store.state.app.buttonIsDisabled = true
           AddUpdateMesOrder(data, this.operation === 'add' ? 'Add' : 'Update').then(res => {
@@ -4052,10 +4060,17 @@
       MesOrderPrintSearch(data2).then(res2 => {
         if (res2.code === '200') {
           this.dialogVisibleApprove = true
+          let res3 = []
+          if (row.islastreport === 'Y') {
+            res3 = res2.data.recordset.filter(i => i.isshow === 'Y')
+          } else {
+            res3 = res2.data.recordset
+          }
 
-          const res3 = res2.data.recordset
+          console.log(JSON.parse(JSON.stringify(res2.data.recordset)))
+
           // this.tableDataPrint = res3
-          this.tableDataPrint = this.chunkArray(res3, 8)
+          this.tableDataPrint = this.chunkArray(res3, 15)
 
           this.formApprove.mesordercode = res3[0].wo_code
           this.formApprove.m_po = res3[0].m_po || '/'
@@ -4132,15 +4147,15 @@
           correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
         })
       } else {
-        new QRCode(this.$refs['qrCodeDiv' + seq], {
-          text: text,
-          width: size === 'big' ? 90 : 60,
-          height: size === 'big' ? 90 : 60,
-          // colorDark: '#333333', // 浜岀淮鐮侀鑹�
-          colorDark: '#000', // 浜岀淮鐮侀鑹�
-          colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
-          correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
-        })
+        // new QRCode(this.$refs['qrCodeDiv' + seq], {
+        //   text: text,
+        //   width: size === 'big' ? 90 : 60,
+        //   height: size === 'big' ? 90 : 60,
+        //   // colorDark: '#333333', // 浜岀淮鐮侀鑹�
+        //   colorDark: '#000', // 浜岀淮鐮侀鑹�
+        //   colorLight: '#ffffff', // 浜岀淮鐮佽儗鏅壊
+        //   correctLevel: QRCode.CorrectLevel.L// 瀹归敊鐜囷紝L/M/H
+        // })
       }
     },
 
@@ -4464,6 +4479,11 @@
       }
       const { data: res } = await UpdateMesOrderStepSearch(data)
       this.tableDataDetail = res.stepdata
+      // if (row.islastreport === 'Y') {
+      //   this.tableDataDetail = res.stepdata.filter(i => i.isend === 'Y')
+      // } else {
+      //   this.tableDataDetail = res.stepdata
+      // }
     },
     // 宸ュ簭鍒犻櫎
     stepDel(row) {
@@ -4539,7 +4559,7 @@
     getSummaries(param) {
       const { columns, data } = param
       const sums = []
-      const i = 9
+      const i = 11
       columns.forEach((column, index) => {
         if (index === i) {
           sums[index] = '鎬绘暟'
@@ -4579,10 +4599,22 @@
 $main_color: #42b983;
 
 .stepSelectedValueClass {
-  ::v-deep input {
-    //min-height: 34px !important;
-    height: 68px !important;
+  //::v-deep input {
+  //  //min-height: 34px !important;
+  //  height: 98px !important;
+  //}
+
+  ::v-deep .el-input__inner{
+    height: 120px!important;
   }
+
+  ::v-deep .el-select__tags>span{
+    display: flex ;
+    align-items: center;
+    justify-content: flex-start;
+    flex-wrap: wrap;
+  }
+
 }
 
 .dialogVisibleRoute {

--
Gitblit v1.9.3