From a2bce22a3a4df5f4662c373e57c07fa4268aeee1 Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期五, 13 六月 2025 09:02:52 +0800
Subject: [PATCH] 1.修改工单打印模板

---
 src/views/kanbanManager/cj.vue |  186 ++++++++++++++++++++--------------------------
 1 files changed, 82 insertions(+), 104 deletions(-)

diff --git a/src/views/kanbanManager/cj.vue b/src/views/kanbanManager/cj.vue
index afb3678..f761b2e 100644
--- a/src/views/kanbanManager/cj.vue
+++ b/src/views/kanbanManager/cj.vue
@@ -6,12 +6,11 @@
 
       <div class="kb_header">
         <div class="kb_headTime" style="top: 35px;left:  20px">
-          <span>姘稿悍甯傛ˉ涓嬪鏂欏巶</span>
+          <span>姘稿悍鍢夋寔鐢靛櫒鏈夐檺鍏徃</span>
         </div>
 
         <div class="kb_headTime kb_header_text" style="top: 35px;left:  800px">
-          <!--          <span>{{ title }}鏁板瓧鍖栫湅鏉�</span>-->
-          <span>鍙戞场鎸ゅ嚭鏁板瓧鍖栫湅鏉�</span>
+          <span>{{ title }}鏁板瓧鍖栫湅鏉�</span>
         </div>
 
         <div class="kb_headTime" style="top: 35px;right:  25px">
@@ -30,7 +29,7 @@
             </div>
             <div
               class="lineContent horn"
-              style="height: 870px;display: flex;flex-direction: column;justify-content: space-between"
+              style="height: 880px;display: flex;flex-direction: column;justify-content: space-between"
             >
               <el-table
                 ref="tableDataLeftCenterRef"
@@ -39,59 +38,48 @@
                 style="width: 100%;"
                 :header-cell-style="headerCellStyle"
                 :cell-style="cellStyle"
-                height="920"
+                height="930"
               >
 
                 <el-table-column
                   prop="wo_code"
                   label="宸ュ崟鍙�"
-                  width="270"
+                  width="220"
                 />
-                <!--                <el-table-column-->
-                <!--                  prop="saleOrderCode"-->
-                <!--                  label="鐢熶骇鍗曞彿"-->
-                <!--                  width="160"-->
-                <!--                />-->
-                <el-table-column
-                  prop="wkshp_name"
-                  label="鐢熶骇杞﹂棿"
-                  width="210"
-                />
-                <!--                600-->
                 <el-table-column
                   prop="partcode"
                   label="浜у搧缂栫爜"
-                  width="210"
+                  width="160"
                 />
                 <el-table-column
                   prop="partname"
                   label="浜у搧鍚嶇О"
-                  width="210"
+                  width="400"
                 />
-                <!--                <el-table-column-->
-                <!--                  prop="partspec"-->
-                <!--                  label="浜у搧瑙勬牸"-->
-                <!--                  width="160"-->
-                <!--                >-->
-                <!--                  <template slot-scope="{row}">-->
-                <!--                    {{ row.partspec ? row.partspec : '/' }}-->
-                <!--                  </template>-->
-                <!--                </el-table-column>-->
+                <el-table-column
+                  prop="partspec"
+                  label="浜у搧瑙勬牸"
+                  width="160"
+                >
+                  <template slot-scope="{row}">
+                    {{ row.partspec ? row.partspec : '/' }}
+                  </template>
+                </el-table-column>
                 <el-table-column
                   prop="plan_qty"
                   label="浠诲姟鏁伴噺"
-                  width="170"
+                  width="120"
                 />
                 <el-table-column
                   prop="good_qty"
                   label="鍚堟牸鏁伴噺"
-                  width="170"
+                  width="120"
                 />
-                <!--                <el-table-column-->
-                <!--                  prop="ng_qty"-->
-                <!--                  label="涓嶈壇鏁伴噺"-->
-                <!--                  width="120"-->
-                <!--                />-->
+                <el-table-column
+                  prop="ng_qty"
+                  label="涓嶈壇鏁伴噺"
+                  width="120"
+                />
                 <!--                <el-table-column-->
                 <!--                  prop="laborbad_qty"-->
                 <!--                  label="宸ュ簾鏁伴噺"-->
@@ -102,25 +90,25 @@
                 <!--                  label="鏂欏簾鏁伴噺"-->
                 <!--                  width="120"-->
                 <!--                />-->
-                <!--                <el-table-column-->
-                <!--                  prop="seq"-->
-                <!--                  label="宸ュ簭椤哄簭"-->
-                <!--                  width="120"-->
-                <!--                />-->
-                <!--                <el-table-column-->
-                <!--                  prop="step_code"-->
-                <!--                  label="宸ュ簭缂栫爜"-->
-                <!--                  width="120"-->
-                <!--                />-->
+                <el-table-column
+                  prop="seq"
+                  label="宸ュ簭椤哄簭"
+                  width="120"
+                />
+                <el-table-column
+                  prop="step_code"
+                  label="宸ュ簭缂栫爜"
+                  width="120"
+                />
                 <el-table-column
                   prop="step_name"
                   label="宸ュ簭鍚嶇О"
-                  width="320"
+                  width="120"
                 />
                 <el-table-column
                   prop="schedule"
                   label="瀹屾垚杩涘害(%)"
-                  width="313"
+                  width="213"
                 />
               </el-table>
             </div>
@@ -189,10 +177,6 @@
 
     }
   },
-  activated() {
-    window.addEventListener('resize', this.getHeight)
-    this.getHeight()
-  },
   created() {
     setInterval(this.getNowTime, 1000)
 
@@ -202,13 +186,11 @@
     }, 1000 * 60 * 120)
   },
   mounted() {
-    // this.getAllApi()
-    this.getWorkShopProduceTopData()
+    this.getAllApi()
   },
   methods: {
     async getWorkShopProduceTopData() {
-      // WorkShopProduceTopData({ wkshopcode: this.wkshopcode.join(',') }).then(res => {
-      WorkShopProduceTopData({ wkshopcode: '101,102' }).then(res => {
+      WorkShopProduceTopData({ wkshopcode: this.wkshopcode.join(',') }).then(res => {
         this.tableDataCenterTop = res.data
 
         const divData = this.$refs.tableDataLeftCenterRef.bodyWrapper
@@ -220,13 +202,13 @@
             WorkShopProduceTopData({ wkshopcode: this.wkshopcode.join(',') }).then(res => {
               this.tableDataCenterTop = res.data
 
-              if (this.tableDataCenterTop.length > 11) {
+              if (this.tableDataCenterTop.length > 22) {
                 clearInterval(timer)
                 this.getWorkShopProduceTopData()
               }
             })
           }
-        }, this.tableDataCenterTop.length <= 22 ? 1000 * 30 : 200)
+        }, this.tableDataCenterTop.length <= 22 ? 1000 * 15 : 200)
       })
     },
 
@@ -240,49 +222,49 @@
         this.wkshopcode = [code]
       }
 
-      this.wkshopcode.forEach(i => {
-        const aa = this.wkshopArr.find(j => j.torg_code === i).torg_name
-        this.legendData.push(aa)
-      })
-
-      const res4 = await WorkShopProduceBottomLeftData({ wkshopcode: this.wkshopcode.join(',') })
-      this.cjzl03_xData = res4.data[this.wkshopcode[0]].map(i => i.click_date)
-      for (const res4Key in res4.data) {
-        if (this.wkshopcode.includes(res4Key)) {
-          const bb = res4.data[res4Key].map(i => i.count)
-          this.cjzl03_yData.push(bb)
-        }
-      }
-      loadEcharts('cjzl03', cjzl03_2(this.cjzl03_xData, this.legendData, this.cjzl03_yData, true))
-      setInterval(() => {
-        WorkShopProduceBottomLeftData({ wkshopcode: this.wkshopcode.join(',') }).then(res4 => {
-          this.cjzl03_yData = []
-
-          this.cjzl03_xData = res4.data[this.wkshopcode[0]].map(i => i.click_date)
-          for (const res4Key in res4.data) {
-            if (this.wkshopcode.includes(res4Key)) {
-              const bb = res4.data[res4Key].map(i => i.count)
-              this.cjzl03_yData.push(bb)
-            }
-          }
-          loadEcharts('cjzl03', cjzl03_2(this.cjzl03_xData, this.legendData, this.cjzl03_yData, true))
-        })
-      }, 1000 * 50)
-
-      const res5 = await WorkShopProduceBottomRightData({ wkshopcode: this.wkshopcode[0] })
-      this.RightBottom = res5.data
-      if (this.RightBottom.length > 0) {
-        loadEcharts('cjzl04', cjzl04(this.RightBottom.map(i => i.name), this.RightBottom.map(i => i.cont)))
-      }
-
-      setInterval(() => {
-        WorkShopProduceBottomRightData({ wkshopcode: this.wkshopcode[0] }).then(res5 => {
-          this.RightBottom = res5.data
-          if (this.RightBottom.length > 0) {
-            loadEcharts('cjzl04', cjzl04(this.RightBottom.map(i => i.name), this.RightBottom.map(i => i.cont)))
-          }
-        })
-      }, 1000 * 60)
+      // this.wkshopcode.forEach(i => {
+      //   const aa = this.wkshopArr.find(j => j.torg_code === i).torg_name
+      //   this.legendData.push(aa)
+      // })
+      //
+      // const res4 = await WorkShopProduceBottomLeftData({ wkshopcode: this.wkshopcode.join(',') })
+      // this.cjzl03_xData = res4.data[this.wkshopcode[0]].map(i => i.click_date)
+      // for (const res4Key in res4.data) {
+      //   if (this.wkshopcode.includes(res4Key)) {
+      //     const bb = res4.data[res4Key].map(i => i.count)
+      //     this.cjzl03_yData.push(bb)
+      //   }
+      // }
+      // loadEcharts('cjzl03', cjzl03_2(this.cjzl03_xData, this.legendData, this.cjzl03_yData, true))
+      // setInterval(() => {
+      //   WorkShopProduceBottomLeftData({ wkshopcode: this.wkshopcode.join(',') }).then(res4 => {
+      //     this.cjzl03_yData = []
+      //
+      //     this.cjzl03_xData = res4.data[this.wkshopcode[0]].map(i => i.click_date)
+      //     for (const res4Key in res4.data) {
+      //       if (this.wkshopcode.includes(res4Key)) {
+      //         const bb = res4.data[res4Key].map(i => i.count)
+      //         this.cjzl03_yData.push(bb)
+      //       }
+      //     }
+      //     loadEcharts('cjzl03', cjzl03_2(this.cjzl03_xData, this.legendData, this.cjzl03_yData, true))
+      //   })
+      // }, 1000 * 50)
+      //
+      // const res5 = await WorkShopProduceBottomRightData({ wkshopcode: this.wkshopcode.join(',') })
+      // this.RightBottom = res5.data
+      // if (this.RightBottom.length > 0) {
+      //   loadEcharts('cjzl04', cjzl04(this.RightBottom.map(i => i.name), this.RightBottom.map(i => i.cont)))
+      // }
+      //
+      // setInterval(() => {
+      //   WorkShopProduceBottomRightData({ wkshopcode: this.wkshopcode.join(',') }).then(res5 => {
+      //     this.RightBottom = res5.data
+      //     if (this.RightBottom.length > 0) {
+      //       loadEcharts('cjzl04', cjzl04(this.RightBottom.map(i => i.name), this.RightBottom.map(i => i.cont)))
+      //     }
+      //   })
+      // }, 1000 * 60)
 
       await this.getWorkShopProduceTopData()
     },
@@ -364,10 +346,6 @@
 ::v-deep .el-table tr,
 ::v-deep .el-table td {
   background-color: transparent;
-}
-
-::v-deep .gutter {
-  display: none;
 }
 
 .all_block01 {

--
Gitblit v1.9.3