From 2146654ce466348808bd11218d5a71756d03abc4 Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期四, 13 三月 2025 16:46:05 +0800
Subject: [PATCH] 1.打印模板修改2.新增打印次数字段

---
 src/views/workOrder/workOrderList.vue |  115 +++++++++++++++++++++++++++++++++------------------------
 1 files changed, 67 insertions(+), 48 deletions(-)

diff --git a/src/views/workOrder/workOrderList.vue b/src/views/workOrder/workOrderList.vue
index 1427b1b..4481ce8 100644
--- a/src/views/workOrder/workOrderList.vue
+++ b/src/views/workOrder/workOrderList.vue
@@ -286,6 +286,13 @@
             width="100"
           />
           <el-table-column
+            prop="printcount"
+            label="鎵撳嵃娆℃暟"
+            sortable="custom"
+            show-tooltip-when-overflow
+            width="110"
+          />
+          <el-table-column
             prop="priuserdefnvc1"
             label="瀹㈡埛鍚嶇О"
             width="110"
@@ -463,7 +470,7 @@
                     :style="{color:$store.state.settings.theme}"
                     class="el-icon-printer"
                     style="cursor: pointer;margin-right: 15px"
-                    @click="handlePrint(row.wo_code,row.saleOrderCod,row)"
+                    @click="handlePrint(row.wo_code,row.saleOrderCode,row)"
                   />
                 </el-tooltip>
 
@@ -1418,14 +1425,14 @@
       <div id="printMe" style="padding: 30px">
         <!--        <div v-for="(item,index) in tableDataPrint" :key="index">-->
         <div>
-          <div style="font-size: 26px; text-align: center">娴佺▼鍗�</div>
+          <div style="font-size: 32px; text-align: center;font-weight:bolder;">娴佺▼鍗�</div>
 
           <div style="display: flex;justify-content: space-around;margin-top: 20px; position: relative;">
-            <div style="width: 78%">
+            <div style="width: 200%">
               <el-form
                 ref="formApprove"
                 :model="formApprove"
-                label-width="80px"
+                label-width="100px"
                 inline
                 style="display: flex;justify-content: space-between"
               >
@@ -1484,20 +1491,20 @@
                 </div>
               </el-form>
             </div>
-            <div
-              id="qrCode0"
-              style="width: 22%;height:90px;
-                        margin-top: 20px;
-                        overflow-y: scroll;display: flex;
-                        justify-content: center;
-                        position: relative;"
-            >
-              <div id="qrCode00" ref="qrCodeDiv00" />
-            </div>
-            <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />
-            <div
-              style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"
-            />
+            <!--            <div-->
+            <!--              id="qrCode0"-->
+            <!--              style="width: 22%;height:90px;-->
+            <!--                        margin-top: 20px;-->
+            <!--                        overflow-y: scroll;display: flex;-->
+            <!--                        justify-content: center;-->
+            <!--                        position: relative;"-->
+            <!--            >-->
+            <!--              <div id="qrCode00" ref="qrCodeDiv00" />-->
+            <!--            </div>-->
+            <!--            <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />-->
+            <!--            <div-->
+            <!--              style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"-->
+            <!--            />-->
           </div>
 
           <el-table
@@ -1505,21 +1512,21 @@
             :data="tableDataPrint[0]"
             border
             class="tableDataPrint"
-            :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000'}"
-            :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000'}"
+            :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000',fontSize:'18px'}"
+            :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000',fontSize:'18px'}"
             style="width: 100%;margin-top: 20px;text-align: center;border-color: #000"
           >
             <el-table-column
               id="column0"
               prop="seq"
-              label="宸ュ簭鍙�"
+              label="搴忓彿"
               width="70"
               align="center"
             />
             <el-table-column
               id="column1"
               prop="stepqrcode"
-              label="宸ュ簭浜岀淮鐮�"
+              label="浜岀淮鐮�"
               width="100"
               align="center"
             >
@@ -1570,11 +1577,11 @@
           <div style="font-size: 26px; text-align: center">娴佺▼鍗�</div>
 
           <div style="display: flex;justify-content: space-around;margin-top: 20px; position: relative;">
-            <div style="width: 78%">
+            <div style="width: 200%">
               <el-form
                 ref="formApprove"
                 :model="formApprove"
-                label-width="80px"
+                label-width="100px"
                 inline
                 style="display: flex;justify-content: space-between"
               >
@@ -1613,20 +1620,20 @@
                 </div>
               </el-form>
             </div>
-            <div
-              id="qrCode1"
-              style="width: 22%;height:90px;
-                        margin-top: 20px;
-                        overflow-y: scroll;display: flex;
-                        justify-content: center;
-                        position: relative;"
-            >
-              <div id="qrCode01" ref="qrCodeDiv01" />
-            </div>
-            <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />
-            <div
-              style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"
-            />
+            <!--            <div-->
+            <!--              id="qrCode1"-->
+            <!--              style="width: 22%;height:90px;-->
+            <!--                        margin-top: 20px;-->
+            <!--                        overflow-y: scroll;display: flex;-->
+            <!--                        justify-content: center;-->
+            <!--                        position: relative;"-->
+            <!--            >-->
+            <!--              <div id="qrCode01" ref="qrCodeDiv01" />-->
+            <!--            </div>-->
+            <!--            <div style="background-color: #fff;width: 20px;height:120px; position: absolute;right: 0" />-->
+            <!--            <div-->
+            <!--              style="z-index: 10;background-color:transparent;width: 120px;height:120px; position: absolute;right: 21px"-->
+            <!--            />-->
           </div>
 
           <el-table
@@ -1634,21 +1641,21 @@
             :data="tableDataPrint[1]"
             border
             class="tableDataPrint"
-            :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000'}"
-            :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000'}"
+            :header-cell-style="{ background: '#c0c0c0',textAlign:'center',color:'#000',borderColor:'#000',fontSize:'18px'}"
+            :cell-style="{textAlign: 'center',color:'#000',borderColor:'#000',fontSize:'18px'}"
             style="width: 100%;margin-top: 20px;text-align: center;border-color: #000"
           >
             <el-table-column
               id="column0"
               prop="seq"
-              label="宸ュ簭鍙�"
+              label="搴忓彿"
               width="70"
               align="center"
             />
             <el-table-column
               id="column1"
               prop="stepqrcode"
-              label="宸ュ簭浜岀淮鐮�"
+              label="浜岀淮鐮�"
               width="100"
               align="center"
             >
@@ -1701,7 +1708,7 @@
           <el-button v-waves @click="dialogVisibleBackPreview">杩� 鍥�</el-button>
           <!--            <el-button v-waves v-if="operation==='add'" type="primary" @click="dialogVisibleConfirm">纭� 瀹�</el-button>-->
           <!--            <el-button v-waves type="primary" @click="dialogVisibleConfirm">纭� 瀹�/鎵� 鍗�</el-button>-->
-          <el-button v-waves v-print="printObj" type="primary">鎵� 鍗�</el-button>
+          <el-button v-waves v-print="printObj" type="primary" @click="printObjGetApi">鎵� 鍗�</el-button>
         </div>
       </span>
     </el-dialog>
@@ -2618,7 +2625,7 @@
   AddMesOrderCodeSearch,
   AddUpdateMesOrder, AddUpdateMesOrderList, DeleteMesOrder,
   MesBadOrderSearch, MesOrderDistribution, MesOrderNewStepContent, MesOrderProcessSopSearch,
-  MesOrderSearch, MesOrderSopSearch, UpdateMesOrderStepListSearch,
+  MesOrderSearch, MesOrderSopSearch, UpdateMesOrderPrintCount, UpdateMesOrderStepListSearch,
   UpdateMesOrderStepSearch
 } from '@/api/WorkOrder'
 import { PartSelect } from '@/api/ProductModel'
@@ -3881,9 +3888,9 @@
               item.forEach(i => {
                 this.bindQRCode(i.seq, i.stepqrcode, 'small')
               })
-              this.bindQRCode(index, this.formApprove.mesordercode, 'big')
-              const div = document.getElementById('qrCode' + index)
-              div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
+              // this.bindQRCode(index, this.formApprove.mesordercode, 'big')
+              // const div = document.getElementById('qrCode' + index)
+              // div.scrollTop = div.scrollHeight // 婊氬姩鏉′綅浜庢渶搴曢儴
             })
 
             // const div = document.getElementById('qrCode')
@@ -4370,6 +4377,12 @@
         this.$refs.tableDataRef.doLayout()
       })
       return sums
+    },
+    async printObjGetApi() {
+      const res = await UpdateMesOrderPrintCount({ wo_code: this.formApprove.mesordercode })
+      if (res.code === '200') {
+        await this.getMesOrderSearch()
+      }
     }
   }
 }
@@ -4531,7 +4544,7 @@
 }
 
 .formContent {
-  width: 240px;
+  width: 300px;
 }
 
 </style>
@@ -4547,6 +4560,12 @@
 <style>
 .formContent .el-form-item__label {
   color: #000 !important;
+  font-size: 20px;
+}
+
+.formContent .el-form-item__content {
+  color: #000 !important;
+  font-size: 20px;
 }
 </style>
 <!--鍏叡椤甸潰鏍峰紡-->

--
Gitblit v1.9.3