From 6208ba6872cc54ccbd2b2ff3b67a1a2f054af41d Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 19 九月 2023 14:52:15 +0800
Subject: [PATCH] 1.生产入库实现

---
 src/views/kb/zhkb.vue |  122 ++++++++++++++++++++++++----------------
 1 files changed, 74 insertions(+), 48 deletions(-)

diff --git a/src/views/kb/zhkb.vue b/src/views/kb/zhkb.vue
index 2bdb36a..cf1c827 100644
--- a/src/views/kb/zhkb.vue
+++ b/src/views/kb/zhkb.vue
@@ -31,7 +31,7 @@
               <div v-for="item in lineContent3" :key="item.workcode" class="kb_left_top_block">
                 <div class="kb_block02 kb_pd10">
                   <div>
-                    <div>閿�鍞崟鍙�:{{ item.saleordercode }}</div>
+                    <!--                    <div>閿�鍞崟鍙�:{{ item.saleordercode }}</div>-->
                     <div class="kb_mt5">
                       鍔犲伐鍗曞彿:{{ item.workcode }}
                     </div>
@@ -123,7 +123,7 @@
                   <el-table-column
                     prop="status"
                     label="鐘舵��"
-                    width="65"
+                    width="75"
                   >
                     <template slot-scope="{row}">
                       <div v-if="row.status==='ALLO'">宸叉淳鍙�</div>
@@ -134,26 +134,26 @@
                   <el-table-column
                     prop="lm_date"
                     label="娲惧彂鏃堕棿"
-                    width="115"
+                    width="125"
                   >
                     <template slot-scope="{row}">
                       <div>{{ row.lm_date.substring(0, 10) }}</div>
                     </template>
                   </el-table-column>
-                  <el-table-column
-                    prop="saleOrderCode"
-                    label="閿�鍞鍗曞彿"
-                    width="178"
-                  >
-                    <template slot-scope="{row}">
-                      <div v-if="row.saleOrderCode" class="ellipsis">{{ row.saleOrderCode }}</div>
-                      <div v-else>/</div>
-                    </template>
-                  </el-table-column>
+                  <!--                  <el-table-column-->
+                  <!--                    prop="saleOrderCode"-->
+                  <!--                    label="閿�鍞鍗曞彿"-->
+                  <!--                    width="178"-->
+                  <!--                  >-->
+                  <!--                    <template slot-scope="{row}">-->
+                  <!--                      <div v-if="row.saleOrderCode" class="ellipsis">{{ row.saleOrderCode }}</div>-->
+                  <!--                      <div v-else>/</div>-->
+                  <!--                    </template>-->
+                  <!--                  </el-table-column>-->
                   <el-table-column
                     prop="wo_code"
                     label="鍔犲伐鍗曞彿"
-                    width="205"
+                    width="225"
                   >
                     <template slot-scope="{row}">
                       <div v-if="row.wo_code" class="ellipsis">{{ row.wo_code }}</div>
@@ -163,7 +163,7 @@
                   <el-table-column
                     prop="partname"
                     label="浜у搧鍚嶇О"
-                    width="150"
+                    width="200"
                   >
                     <template slot-scope="{row}">
                       <div v-if="row.partname" class="ellipsis">{{ row.partname }}</div>
@@ -188,22 +188,22 @@
                   <el-table-column
                     prop="plan_qty"
                     label="浠诲姟鏁伴噺"
-                    width="85"
+                    width="95"
                   />
                   <el-table-column
                     prop="good_qty"
                     label="瀹屽伐鏁伴噺"
-                    width="85"
+                    width="95"
                   />
                   <el-table-column
                     prop="ng_qty"
                     label="涓嶈壇鏁伴噺"
-                    width="85"
+                    width="95"
                   />
                   <el-table-column
                     prop="wcl"
                     label="瀹屾垚鐜�"
-                    width="60"
+                    width="80"
                   >
                     <template slot-scope="{row}">
                       <div>{{ parseFloat((row.good_qty * 100 / row.plan_qty).toFixed(2)) }}%</div>
@@ -212,7 +212,7 @@
                   <el-table-column
                     prop="planstartdate"
                     label="棰勮寮�濮�"
-                    width="115"
+                    width="139"
                   >
                     <template slot-scope="{row}">
                       <div>{{ row.planstartdate.substring(0, 10) }}</div>
@@ -221,7 +221,7 @@
                   <el-table-column
                     prop="planenddate"
                     label="棰勮缁撴潫"
-                    width="125"
+                    width="139"
                   >
                     <template slot-scope="{row}">
                       <div>{{ row.planenddate.substring(0, 10) }}</div>
@@ -253,7 +253,7 @@
                   />
                   <el-table-column
                     prop="wkshname"
-                    label="杞﹂棿锛堜緵鏂癸級"
+                    label="杞﹂棿"
                     width="120"
                   >
                     <template slot-scope="{row}">
@@ -332,6 +332,7 @@
 
       leftTopData: [],
       tableData: [],
+      tableDataTemp: [],
       tableDataRank: [],
       lineCodeArr: [],
 
@@ -408,7 +409,6 @@
       await this.getEcharts()
       await this.getTableDataRoll()
       await this.getTableDataRankRoll()
-      await this.getMarqueeTipsContent()
       await this.getMarqueeTipsContent()
     },
     // 鑾峰彇鍏憡
@@ -489,31 +489,54 @@
 
     // 浜х嚎鍔犲伐浠诲姟
     getTableDataRoll() {
-      LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
-        this.tableData = res.data
-        this.number2 = this.tableData.length
+      let startValue = 0 // 鍒濆鍊�
+      const scale = 10// 鍒诲害
 
-        const divData = this.$refs.tableData.bodyWrapper
-        // 鎷垮埌鍏冪礌鍚庯紝瀵瑰厓绱犺繘琛屽畾鏃跺鍔犺窛绂婚《閮ㄨ窛绂伙紝瀹炵幇婊氬姩鏁堟灉(姝ら厤缃负姣�100姣绉诲姩1鍍忕礌)
+      LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
+        this.tableDataTemp = res.data
+        this.number2 = res.data.length
+
+        this.tableData = this.tableDataTemp.slice(startValue, startValue + scale)
+
+        const loop = Math.floor(this.tableDataTemp.length / scale)// 闇�瑕佸惊鐜殑娆℃暟
+        let nowLoop = 0// 褰撳墠寰幆鐨勬鏁�
+
         this.TableDataRollTask = setInterval(() => {
-          // 鍏冪礌鑷璺濈椤堕儴1鍍忕礌
-          divData.scrollTop += 1
-          // divData.scrollTop += divData.scrollHeight / this.tableData.length
-          // 鍒ゆ柇鍏冪礌鏄惁婊氬姩鍒板簳閮�(鍙楂樺害+璺濈椤堕儴=鏁翠釜楂樺害)
-          if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
-            // 閲嶇疆table璺濈椤堕儴璺濈
-            divData.scrollTop = 0
-            LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
-              this.tableData = res.data
-              this.number2 = this.tableData.length
-              if (this.tableData.length > 10) {
-                clearInterval(this.TableDataRollTask)
-                this.getTableDataRoll()
-              }
-            })
+          startValue = startValue + scale
+          this.tableData = this.tableDataTemp.slice(startValue, startValue + scale)
+          if (nowLoop === loop) {
+            clearInterval(this.TableDataRollTask)
+            this.getTableDataRoll()
           }
-        }, this.tableData.length <= 10 ? 1000 * 3 : 100)
+          nowLoop++
+        }, 1000 * 10)
       })
+
+      // LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
+      //   this.tableData = res.data
+      //   this.number2 = this.tableData.length
+      //
+      //   const divData = this.$refs.tableData.bodyWrapper
+      //   // 鎷垮埌鍏冪礌鍚庯紝瀵瑰厓绱犺繘琛屽畾鏃跺鍔犺窛绂婚《閮ㄨ窛绂伙紝瀹炵幇婊氬姩鏁堟灉(姝ら厤缃负姣�100姣绉诲姩1鍍忕礌)
+      //   this.TableDataRollTask = setInterval(() => {
+      //     // 鍏冪礌鑷璺濈椤堕儴1鍍忕礌
+      //     divData.scrollTop += 1
+      //     // divData.scrollTop += divData.scrollHeight / this.tableData.length
+      //     // 鍒ゆ柇鍏冪礌鏄惁婊氬姩鍒板簳閮�(鍙楂樺害+璺濈椤堕儴=鏁翠釜楂樺害)
+      //     if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
+      //       // 閲嶇疆table璺濈椤堕儴璺濈
+      //       divData.scrollTop = 0
+      //       LineSearchBottomLeftData({ shopcode: this.ShopArr.join(',') }).then(res => {
+      //         this.tableData = res.data
+      //         this.number2 = this.tableData.length
+      //         if (this.tableData.length > 10) {
+      //           clearInterval(this.TableDataRollTask)
+      //           this.getTableDataRoll()
+      //         }
+      //       })
+      //     }
+      //   }, this.tableData.length <= 10 ? 1000 * 3 : 100)
+      // })
     },
     // 褰撴棩瀹屽伐浜у搧鏁伴噺鎺掕
     getTableDataRankRoll() {
@@ -651,14 +674,14 @@
           justify-content: flex-start;
 
           .kb_block02 {
-            width: 304px;
+            width: 344px;
             display: flex;
             align-items: center;
             border-right: 1px solid $kbBorderColor;
           }
 
           .kb_block03 {
-            width: 1020px;
+            width: 980px;
             font-size: 17px;
             display: flex;
             flex-direction: column;
@@ -680,6 +703,7 @@
                 display: flex;
                 align-items: center;
                 justify-content: center;
+                font-size: 20px;
               }
 
               .content02Parent {
@@ -688,6 +712,7 @@
                 .content02 {
                   width: 60px;
                   border-right: 1px solid $kbBorderColor;
+                  font-size: 20px;
 
                   .content02_1 {
                     display: flex;
@@ -695,6 +720,7 @@
                     justify-content: center;
                     //height: 50%;
                     height: 25px;
+
                   }
 
                   .content02_2 {
@@ -802,7 +828,7 @@
       .kb_right_bottom_content_title {
         color: #00ffff;
         margin-bottom: 5px;
-        margin-top: -12px;
+        margin-top: -16px;
       }
 
       .kb_right_bottom_content {
@@ -831,7 +857,7 @@
 
 ::v-deep .cell {
   padding: 0 !important;
-  font-size: 18px;
+  font-size: 20px;
 }
 
 .circleYellow {

--
Gitblit v1.9.3