From d21c6354f310b9ab1b3c28c3edc511f73969b164 Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期五, 20 九月 2024 14:12:50 +0800
Subject: [PATCH] 1.递交

---
 src/views/kb/warehouse.vue |  225 +++++++++++++++++++-------------------------------------
 1 files changed, 77 insertions(+), 148 deletions(-)

diff --git a/src/views/kb/warehouse.vue b/src/views/kb/warehouse.vue
index eacd795..97d974e 100644
--- a/src/views/kb/warehouse.vue
+++ b/src/views/kb/warehouse.vue
@@ -5,7 +5,7 @@
       <div class="kb_backgroundCustom" />
       <div class="kb_header">
         <div class="kb_headTime" style="top: 35px;left:  20px">
-          <span>姘稿悍甯傚寳楦e伐璐告湁闄愬叕鍙�</span>
+          <span>姘稿悍甯傚閾伐璐告湁闄愬叕鍙�</span>
         </div>
 
         <div class="kb_headTime kb_header_text" style="top: 35px;left:  800px">
@@ -22,7 +22,7 @@
           <div style="height: 470px;">
             <div class="smallTitle">
               <svg-icon icon-class="cpdrk" class="svg_class" />
-              鐢熶骇寰呭叆搴�
+              閲囪喘寰呭叆搴�
             </div>
             <div class="lineContent horn" style="height: 410px">
               <el-table
@@ -37,7 +37,7 @@
                 <el-table-column
                   prop="voucherdate"
                   label="鍗曟嵁鏃ユ湡"
-                  width="131"
+                  width="161"
                 >
                   <template slot-scope="{row}">
                     <div v-if="row.voucherdate" class="ellipsis">{{ row.voucherdate.substring(0, 10) }}</div>
@@ -47,44 +47,36 @@
                 <el-table-column
                   prop="wo"
                   label="鍗曟嵁缂栧彿"
-                  width="189"
+                  width="209"
                 >
                   <template slot-scope="{row}">
                     <div class="ellipsis">{{ row.wo }}</div>
                   </template>
                 </el-table-column>
-                <el-table-column
-                  prop="wkshp_name"
-                  label="鐢熶骇杞﹂棿"
-                  width="105"
-                >
-                  <template slot-scope="{row}">
-                    <div class="ellipsis">{{ row.wkshp_name }}</div>
-                  </template>
-                </el-table-column>
-                <el-table-column
-                  prop="saleOrderCode"
-                  label="閿�鍞鍗曞彿"
-                  width="200"
-                >
-                  <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="materiel_code"-->
-                <!--                  label="浜у搧缂栧彿"-->
-                <!--                  width="136"-->
+                <!--                  prop="wkshp_name"-->
+                <!--                  label="鐢熶骇杞﹂棿"-->
+                <!--                  width="105"-->
                 <!--                >-->
                 <!--                  <template slot-scope="{row}">-->
-                <!--                    <div class="ellipsis">{{ row.materiel_code }}</div>-->
+                <!--                    <div class="ellipsis">{{ row.wkshp_name }}</div>-->
                 <!--                  </template>-->
                 <!--                </el-table-column>-->
+                <!--                <el-table-column-->
+                <!--                  prop="saleOrderCode"-->
+                <!--                  label="閿�鍞鍗曞彿"-->
+                <!--                  width="210"-->
+                <!--                >-->
+                <!--                  <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="materiel_name"
                   label="浜у搧鍚嶇О"
-                  width="180"
+                  width="390"
                 >
                   <template slot-scope="{row}">
                     <div class="ellipsis">{{ row.materiel_name }}</div>
@@ -93,7 +85,7 @@
                 <el-table-column
                   prop="specification"
                   label="瑙勬牸鍨嬪彿"
-                  width="136"
+                  width="146"
                 >
                   <template slot-scope="{row}">
                     <div v-if="row.specification" class="ellipsis">{{ row.specification }}</div>
@@ -103,7 +95,7 @@
                 <el-table-column
                   prop="stck_name"
                   label="棰勫叆浠撳簱"
-                  width="100"
+                  width="145"
                 >
                   <template slot-scope="{row}">
                     <div v-if="row.stck_name" class="ellipsis">{{ row.stck_name }}</div>
@@ -113,50 +105,26 @@
                 <el-table-column
                   prop="quantity"
                   label="鏁伴噺"
-                  width="63"
+                  width="113"
                 />
                 <el-table-column
                   prop="totalStockInQuantity"
                   label="宸插叆搴撴暟閲�"
-                  width="100"
+                  width="160"
                 >
                   <template slot-scope="{row}">
-                    <div v-if="row.totalStockInQuantity">{{ row.totalStockInQuantity }}</div>
+                    <div v-if="row.countInQuantity">{{ row.countInQuantity }}</div>
                     <div v-else>0</div>
                   </template>
                 </el-table-column>
-                <!--                  <el-table-column-->
-                <!--                    prop="uomname"-->
-                <!--                    label="鍗曚綅"-->
-                <!--                    width="50"-->
-                <!--                  />-->
-                <!--                  <el-table-column-->
-                <!--                    prop="preStartDate"-->
-                <!--                    label="棰勮寮�宸�"-->
-                <!--                    width="100"-->
-                <!--                  >-->
-                <!--                    <template slot-scope="{row}">-->
-                <!--                      <div v-if="row.preStartDate">{{ row.preStartDate.substring(0, 10) }}</div>-->
-                <!--                      <div v-else />-->
-                <!--                    </template>-->
-                <!--                  </el-table-column>-->
-                <el-table-column
-                  prop="preFinishDate"
-                  label="棰勮鍏ュ簱"
-                  width="140"
-                >
-                  <template slot-scope="{row}">
-                    <div v-if="row.preFinishDate">{{ row.preFinishDate.substring(0, 10) }}</div>
-                    <div v-else />
-                  </template>
-                </el-table-column>
+
               </el-table>
             </div>
           </div>
           <div style="height: 470px;margin-top: 30px;">
             <div class="smallTitle">
               <svg-icon icon-class="cpdfh" class="svg_class" />
-              浜у搧寰呭彂璐�
+              閿�鍞緟鍙戣揣
             </div>
             <div class="lineContent horn" style="height: 410px">
               <el-table
@@ -187,64 +155,34 @@
                     <div class="ellipsis">{{ row.wo }}</div>
                   </template>
                 </el-table-column>
+
+                <el-table-column
+                  prop="customecode"
+                  label="瀹㈡埛缂栫爜"
+                  width="300"
+                />
                 <!--                <el-table-column-->
                 <!--                  prop="customename"-->
-                <!--                  label="瀹㈡埛"-->
-                <!--                  width="288"-->
+                <!--                  label="瀹㈡埛鍚嶇О"-->
+                <!--                  width="330"-->
                 <!--                >-->
                 <!--                  <template slot-scope="{row}">-->
-                <!--                    <div v-if="row.customename" class="ellipsis">{{ row.customename }}</div>-->
-                <!--                    <div v-else>/</div>-->
+                <!--                    <div class="ellipsis">{{ row.customename }}</div>-->
                 <!--                  </template>-->
                 <!--                </el-table-column>-->
-                <!--                  <el-table-column-->
-                <!--                    prop="username"-->
-                <!--                    label="涓氬姟鍛�"-->
-                <!--                    width="65"-->
-                <!--                  >-->
-                <!--                    <template slot-scope="{row}">-->
-                <!--                      <div v-if="row.username" class="ellipsis">{{ row.username }}</div>-->
-                <!--                      <div v-else>/</div>-->
-                <!--                    </template>-->
-                <!--                  </el-table-column>-->
-                <!--                <el-table-column-->
-                <!--                  prop="SourceVoucherCode"-->
-                <!--                  label="鏉ユ簮鍗曞彿"-->
-                <!--                  width="185"-->
-                <!--                >-->
-                <!--                  <template slot-scope="{row}">-->
-                <!--                    <div v-if="row.SourceVoucherCode" class="ellipsis">{{ row.SourceVoucherCode }}</div>-->
-                <!--                    <div v-else>/</div>-->
-                <!--                  </template>-->
-                <!--                </el-table-column>-->
-                <!--                  <el-table-column-->
-                <!--                    prop="materiel_code"-->
-                <!--                    label="浜у搧缂栧彿"-->
-                <!--                    width="96"-->
-                <!--                  />-->
                 <el-table-column
                   prop="materiel_name"
                   label="浜у搧鍚嶇О"
-                  width="288"
+                  width="358"
                 >
                   <template slot-scope="{row}">
                     <div v-if="row.materiel_name" class="ellipsis">{{ row.materiel_name }}</div>
                   </template>
                 </el-table-column>
                 <el-table-column
-                  prop="specification"
-                  label="瑙勬牸鍨嬪彿"
-                  width="300"
-                >
-                  <template slot-scope="{row}">
-                    <div v-if="row.specification" class="ellipsis">{{ row.specification }}</div>
-                    <div v-else>/</div>
-                  </template>
-                </el-table-column>
-                <el-table-column
                   prop="quantity"
                   label="鏁伴噺"
-                  width="100"
+                  width="130"
                 >
                   <template slot-scope="{row}">
                     <div class="ellipsis">{{ row.quantity }}</div>
@@ -253,43 +191,35 @@
                 <el-table-column
                   prop="saleOutQuantity"
                   label="宸插彂璐ф暟閲�"
-                  width="120"
+                  width="220"
                 >
                   <template slot-scope="{row}">
                     <div v-if="row.saleOutQuantity" class="ellipsis">{{ row.saleOutQuantity }}</div>
                     <div v-else>0</div>
                   </template>
                 </el-table-column>
+
                 <!--                <el-table-column-->
-                <!--                  prop="priuserdefnvc1"-->
-                <!--                  label="妫�楠屾柟寮�"-->
-                <!--                  width="110"-->
+                <!--                  prop="deliveryDate"-->
+                <!--                  label="棰勮浜や粯鏃ユ湡"-->
+                <!--                  width="200"-->
                 <!--                >-->
                 <!--                  <template slot-scope="{row}">-->
-                <!--                    <div v-if="row.priuserdefnvc1">{{ row.priuserdefnvc1 }}</div>-->
+                <!--                    <div v-if="row.deliveryDate">{{ row.deliveryDate.substring(0,10) }}</div>-->
                 <!--                    <div v-else>/</div>-->
                 <!--                  </template>-->
                 <!--                </el-table-column>-->
+
                 <!--                <el-table-column-->
-                <!--                  prop="priuserdefnvc2"-->
-                <!--                  label="妫�楠屼汉鍛�"-->
-                <!--                  width="110"-->
+                <!--                  prop="warning"-->
+                <!--                  label="寤舵湡澶╂暟"-->
+                <!--                  width="130"-->
                 <!--                >-->
                 <!--                  <template slot-scope="{row}">-->
-                <!--                    <div v-if="row.priuserdefnvc2">{{ row.priuserdefnvc2 }}</div>-->
+                <!--                    <div v-if="row.warning">{{ row.warning }}</div>-->
                 <!--                    <div v-else>/</div>-->
                 <!--                  </template>-->
                 <!--                </el-table-column>-->
-                <el-table-column
-                  prop="deliveryDate"
-                  label="棰勮浜よ揣鏃ユ湡"
-                  width="200"
-                >
-                  <template slot-scope="{row}">
-                    <div v-if="row.deliveryDate">{{ row.deliveryDate.substring(0,10) }}</div>
-                    <div v-else>/</div>
-                  </template>
-                </el-table-column>
               </el-table>
             </div>
           </div>
@@ -299,7 +229,7 @@
           <div style="height: 470px;">
             <div class="smallTitle">
               <svg-icon icon-class="ph" class="svg_class" />
-              杩戜竴鍛ㄧ敓浜у緟鍏ュ簱浜у搧鎺掕Top5
+              杩戜竴鍛ㄩ噰璐緟鍏ュ簱鐗╂枡鎺掕Top5
             </div>
             <div class="lineContent horn" style="height: 410px">
               <div id="bar03" style="width: 100%;height:100%; " />
@@ -309,7 +239,7 @@
           <div style="height: 470px;margin-top: 30px;">
             <div class="smallTitle">
               <svg-icon icon-class="ph" class="svg_class" />
-              杩戜竴鍛ㄩ攢鍞緟鍙戣揣浜у搧鎺掕Top5
+              杩戜竴鍛ㄩ攢鍞凡鍙戣揣浜у搧鎺掕Top5
             </div>
             <div class="lineContent horn" style="height: 410px">
               <div id="bar04" style="width: 100%;height:100%;" />
@@ -326,12 +256,12 @@
 <script>
 import './kbCommon.css'
 import { bar02, kbTop, loadEcharts } from '@/utils/myEcharts'
-// import {
-//   WareHouseRightBottomData,
-//   WareHouseRightTopData,
-//   WareHouseTopBottomData,
-//   WareHouseTopLeftData
-// } from '@/api/kanbanManager'
+import {
+  ProcureOutsourcLeftTop,
+  ProductConsignmentLeftBottom,
+  ProcureOutsourcRightTop,
+  ProductionStockedInRightBottom
+} from '@/api/kanbanManager'
 
 export default {
   name: 'Index2',
@@ -371,10 +301,10 @@
     window.addEventListener('online', this.updateOnlineStatus)
     window.addEventListener('offline', this.updateOnlineStatus)
     this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })
-    //
-    // this.getWareHouseTopLeftData()
-    // this.getWareHouseTopBottomData()
-    // this.getEcharts()
+
+    this.getProcureOutsourcLeftTop()
+    this.getProductConsignmentLeftBottom()
+    this.getEcharts()
   },
   beforeDestroy() {
     window.removeEventListener('online', this.updateOnlineStatus)
@@ -403,10 +333,9 @@
         }
       }
     },
-
     // 鑾峰彇宸︿笂table鏁版嵁
-    getWareHouseTopLeftData() {
-      WareHouseTopLeftData().then(res => {
+    getProcureOutsourcLeftTop() {
+      ProcureOutsourcLeftTop().then(res => {
         this.tableDataTop = res.data
         // this.number1 = this.tableDataTop.length
         const divData = this.$refs.tableDataTopRef.bodyWrapper
@@ -419,12 +348,12 @@
           if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
             // 閲嶇疆table璺濈椤堕儴璺濈
             divData.scrollTop = 0
-            WareHouseTopLeftData().then(res => {
+            ProcureOutsourcLeftTop().then(res => {
               this.tableDataTop = res.data
               // this.number1 = this.tableDataTop.length
               if (this.tableDataTop.length > 10) {
                 clearInterval(this.tableTopTask)
-                this.getWareHouseTopLeftData()
+                this.getProcureOutsourcLeftTop()
               }
             })
           }
@@ -432,8 +361,8 @@
       })
     },
     // 鑾峰彇宸︿笅table鏁版嵁
-    getWareHouseTopBottomData() {
-      WareHouseTopBottomData().then(res => {
+    getProductConsignmentLeftBottom() {
+      ProductConsignmentLeftBottom().then(res => {
         this.tableDataBottom = res.data
         this.number2 = this.tableDataBottom.length
         const divData = this.$refs.tableDataBottomRef.bodyWrapper
@@ -447,12 +376,12 @@
           if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
             // 閲嶇疆table璺濈椤堕儴璺濈
             divData.scrollTop = 0
-            WareHouseTopBottomData().then(res => {
+            ProductConsignmentLeftBottom().then(res => {
               this.tableDataBottom = res.data
               this.number2 = this.tableDataBottom.length
               if (this.tableDataBottom.length > 10) {
                 clearInterval(this.tableBottomTask)
-                this.getWareHouseTopBottomData()
+                this.getProductConsignmentLeftBottom()
               }
             })
           }
@@ -462,23 +391,23 @@
 
     // 鑾峰彇echarts
     getEcharts() {
-      WareHouseRightTopData().then(res => {
-        loadEcharts('bar03', bar02(res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.CanuseBaseQuantity), res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.materiel_name)))
+      ProcureOutsourcRightTop().then(res => {
+        loadEcharts('bar03', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
       })
 
-      WareHouseRightBottomData().then(res => {
-        loadEcharts('bar04', bar02(res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.CanuseBaseQuantity), res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.materiel_name)))
+      ProductionStockedInRightBottom().then(res => {
+        loadEcharts('bar04', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
       })
 
       this.echartsRightTop = setInterval(() => {
-        WareHouseRightTopData().then(res => {
-          loadEcharts('bar03', bar02(res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.CanuseBaseQuantity), res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.materiel_name)))
+        ProcureOutsourcRightTop().then(res => {
+          loadEcharts('bar03', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
         })
       }, 1000 * 15)
 
       this.echartsRightBottom = setInterval(() => {
-        WareHouseRightBottomData().then(res => {
-          loadEcharts('bar04', bar02(res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.CanuseBaseQuantity), res.data.filter(i => i.CanuseBaseQuantity > 0).map(i => i.materiel_name)))
+        ProductionStockedInRightBottom().then(res => {
+          loadEcharts('bar04', bar02(res.data.filter(i => i.qty > 0).map(i => i.qty), res.data.filter(i => i.qty > 0).map(i => i.materiel_name)))
         })
       }, 1000 * 15)
     },

--
Gitblit v1.9.3