From 2dfd9ea256919594e200c337da3ca771f3db04be Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期二, 26 十二月 2023 10:17:02 +0800
Subject: [PATCH] 1.仓库看板 、 生产看板 100%
---
src/permission.js | 2
/dev/null | 556 -----------------------------
src/api/kanbanManager.js | 108 +++--
src/views/kb/produce.vue | 367 +++++++++++++++++++
src/router/index.js | 4
src/views/kb/warehouse.vue | 62 +-
6 files changed, 471 insertions(+), 628 deletions(-)
diff --git a/src/api/kanbanManager.js b/src/api/kanbanManager.js
index 6ac05d1..3d860f5 100644
--- a/src/api/kanbanManager.js
+++ b/src/api/kanbanManager.js
@@ -1,38 +1,6 @@
import request from '@/utils/request'
-// 鍖楅福浠撳簱鐪嬫澘宸︿笂,鐢熶骇寰呭叆搴�
-export function ProductionStockedInLeftTop() {
- return request({
- url: 'KanBanManagerent/ProductionStockedInLeftTop',
- method: 'get'
- })
-}
-
-// 鍖楅福浠撳簱鐪嬫澘宸︿笅,浜у搧寰呭彂璐�
-export function ProductConsignmentLeftBottom() {
- return request({
- url: 'KanBanManagerent/ProductConsignmentLeftBottom',
- method: 'get'
- })
-}
-
-// 鍖楅福浠撳簱鐪嬫澘鍙充笂,杩戜竴鍛ㄧ敓浜у緟鍏ュ簱浜у搧鎺掕TOP5
-export function ProductionStockedInRightTop() {
- return request({
- url: 'KanBanManagerent/ProductionStockedInRightTop',
- method: 'get'
- })
-}
-
-// 鍖楅福浠撳簱鐪嬫澘鍙充笅,杩戜竴鍛ㄩ攢鍞緟鍙戣揣浜у搧鎺掕TOP5
-export function ProductionStockedInRightBottom() {
- return request({
- url: 'KanBanManagerent/ProductionStockedInRightBottom',
- method: 'get'
- })
-}
-
-// 鍖楅福閲囪喘濮斿鐪嬫澘宸︿笂,閲囪喘寰呭叆搴�
+// 瀛i摥浠撳簱鐪嬫澘宸︿笂,閲囪喘寰呭叆搴�
export function ProcureOutsourcLeftTop() {
return request({
url: 'KanBanManagerent/ProcureOutsourcLeftTop',
@@ -40,15 +8,15 @@
})
}
-// 鍖楅福閲囪喘濮斿鐪嬫澘宸︿笂,濮斿寰呭叆搴�
-export function ProcureOutsourcLeftBottom() {
+// 瀛i摥浠撳簱鐪嬫澘宸︿笅,閿�鍞緟鍙戣揣
+export function ProductConsignmentLeftBottom() {
return request({
- url: 'KanBanManagerent/ProcureOutsourcLeftBottom',
+ url: 'KanBanManagerent/ProductConsignmentLeftBottom',
method: 'get'
})
}
-// 鍖楅福閲囪喘濮斿鐪嬫澘鍙充笂,杩戜竴鍛ㄩ噰璐緟鍏ュ簱鐗╂枡鎺掕TOP5
+// 瀛i摥浠撳簱鐪嬫澘鍙充笂,杩戜竴鍛ㄩ噰璐緟鍏ュ簱鐗╂枡鎺掕TOP5
export function ProcureOutsourcRightTop() {
return request({
url: 'KanBanManagerent/ProcureOutsourcRightTop',
@@ -56,7 +24,39 @@
})
}
-// 鍖楅福閲囪喘濮斿鐪嬫澘鍙充笅,杩戜竴鍛ㄥ澶栧緟鍏ュ簱浜у搧鎺掕TOP5
+// 瀛i摥浠撳簱鐪嬫澘宸︿笂,鐢熶骇寰呭叆搴�
+export function ProductionStockedInLeftTop() {
+ return request({
+ url: 'KanBanManagerent/ProductionStockedInLeftTop',
+ method: 'get'
+ })
+}
+
+// 瀛i摥鐢熶骇鐪嬫澘鍙充笂,杩戜竴鍛ㄧ敓浜у緟鍏ュ簱浜у搧鎺掕TOP10
+export function ProductionStockedInRightTop() {
+ return request({
+ url: 'KanBanManagerent/ProductionStockedInRightTop',
+ method: 'get'
+ })
+}
+
+// 瀛i摥浠撳簱鐪嬫澘鍙充笅,杩戜竴鍛ㄩ攢鍞緟鍙戣揣浜у搧鎺掕TOP5
+export function ProductionStockedInRightBottom() {
+ return request({
+ url: 'KanBanManagerent/ProductionStockedInRightBottom',
+ method: 'get'
+ })
+}
+
+// 瀛i摥閲囪喘濮斿鐪嬫澘宸︿笂,濮斿寰呭叆搴�
+export function ProcureOutsourcLeftBottom() {
+ return request({
+ url: 'KanBanManagerent/ProcureOutsourcLeftBottom',
+ method: 'get'
+ })
+}
+
+// 瀛i摥閲囪喘濮斿鐪嬫澘鍙充笅,杩戜竴鍛ㄥ澶栧緟鍏ュ簱浜у搧鎺掕TOP5
export function ProcureOutsourcRightBottom() {
return request({
url: 'KanBanManagerent/ProcureOutsourcRightBottom',
@@ -64,3 +64,35 @@
})
}
+// 瀛i摥杞﹂棿缁煎悎鐪嬫澘,宸︿笂鐢熶骇璁㈠崟
+export function WorkShopCompreLeftTop(data) {
+ return request({
+ url: 'KanBanManagerent/WorkShopCompreLeftTop',
+ method: 'get',
+ params: data
+ })
+}
+
+// 瀛i摥杞﹂棿缁煎悎鐪嬫澘,鍙充笂閿�鍞鍗�
+export function WorkShopCompreRightTop() {
+ return request({
+ url: 'KanBanManagerent/WorkShopCompreRightTop',
+ method: 'get'
+ })
+}
+
+// 瀛i摥杞﹂棿缁煎悎鐪嬫澘,宸︿笅閲囪喘璁㈠崟
+export function WorkShopCompreLeftBottom() {
+ return request({
+ url: 'KanBanManagerent/WorkShopCompreLeftBottom',
+ method: 'get'
+ })
+}
+
+// 瀛i摥杞﹂棿缁煎悎鐪嬫澘,鍙充笅搴撳瓨
+export function WorkShopCompreRightBottom() {
+ return request({
+ url: 'KanBanManagerent/WorkShopCompreRightBottom',
+ method: 'get'
+ })
+}
diff --git a/src/permission.js b/src/permission.js
index 5acb26a..46276cd 100644
--- a/src/permission.js
+++ b/src/permission.js
@@ -8,7 +8,7 @@
NProgress.configure({ showSpinner: false }) // NProgress Configuration
-const whiteList = ['/login', '/warehouse', '/procure'] // no redirect whitelist
+const whiteList = ['/login', '/warehouse', '/produce'] // no redirect whitelist
router.beforeEach(async(to, from, next) => {
// start progress bar
diff --git a/src/router/index.js b/src/router/index.js
index 700bc89..87e3527 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -37,8 +37,8 @@
hidden: true
},
{
- path: '/procure',
- component: () => import('@/views/kb/procure'),
+ path: '/produce',
+ component: () => import('@/views/kb/produce'),
hidden: true
},
{
diff --git a/src/views/kb/procure.vue b/src/views/kb/procure.vue
deleted file mode 100644
index 18800f1..0000000
--- a/src/views/kb/procure.vue
+++ /dev/null
@@ -1,556 +0,0 @@
-<template>
- <div>
- <div class="kb_dashboard">
-
- <div class="kb_backgroundCustom" />
- <div class="kb_header">
- <div class="kb_headTime" style="top: 35px;left: 20px">
- <span>姘稿悍甯傚寳楦e伐璐告湁闄愬叕鍙�</span>
- </div>
-
- <div class="kb_headTime kb_header_text" style="top: 35px;left: 800px">
- <span>閲囪喘濮斿鏁板瓧鍖栫湅鏉�</span>
- </div>
-
- <div class="kb_headTime" style="top: 35px;right: 25px">
- <span>{{ headTime }}</span>
- </div>
- </div>
-
- <div style="display: flex;justify-content: space-between;padding:0 20px 20px 20px;height: 950px">
- <div style="width: 1350px;z-index: 2;margin-top: 50px;" class="flex_c_b">
- <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
- ref="tableDataTopRef"
- :data="tableDataTop"
- style="width: 100%;"
- class="tableData"
- :header-cell-style="headerCellStyleCenter"
- :cell-style="cellStyleCenter"
- height="405"
- >
- <el-table-column
- prop="voucherdate"
- label="鍗曟嵁鏃ユ湡"
- width="131"
- >
- <template slot-scope="{row}">
- <div v-if="row.voucherdate" class="ellipsis">{{ row.voucherdate.substring(0, 10) }}</div>
- <div v-else />
- </template>
- </el-table-column>
- <el-table-column
- prop="wo"
- label="鍗曟嵁缂栧彿"
- width="189"
- >
- <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"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div class="ellipsis">{{ row.materiel_code }}</div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <el-table-column
- prop="materiel_name"
- label="浜у搧鍚嶇О"
- width="285"
- >
- <template slot-scope="{row}">
- <div class="ellipsis">{{ row.materiel_name }}</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="specification"
- label="瑙勬牸鍨嬪彿"
- width="216"
- >
- <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="stck_name"
- label="棰勫叆浠撳簱"
- width="120"
- >
- <template slot-scope="{row}">
- <div v-if="row.stck_name" class="ellipsis">{{ row.stck_name }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="quantity"
- label="鏁伴噺"
- width="83"
- />
- <el-table-column
- prop="totalStockInQuantity"
- label="宸插叆搴撴暟閲�"
- width="120"
- >
- <template slot-scope="{row}">
- <div v-if="row.totalStockInQuantity">{{ row.totalStockInQuantity }}</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
- ref="tableDataBottomRef"
- :data="tableDataBottom"
- style="width: 100%;"
- class="tableData"
- :header-cell-style="headerCellStyleCenter"
- :cell-style="cellStyleCenter"
- height="405"
- >
- <el-table-column
- prop="voucherdate"
- label="鍗曟嵁鏃ユ湡"
- width="131"
- >
- <template slot-scope="{row}">
- <div v-if="row.voucherdate" class="ellipsis">{{ row.voucherdate.substring(0, 10) }}</div>
- <div v-else>/</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="wo"
- label="鍗曟嵁缂栧彿"
- width="205"
- >
- <template slot-scope="{row}">
- <div class="ellipsis">{{ row.wo }}</div>
- </template>
- </el-table-column>
- <!-- <el-table-column-->
- <!-- prop="customename"-->
- <!-- label="瀹㈡埛"-->
- <!-- width="288"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.customename" class="ellipsis">{{ row.customename }}</div>-->
- <!-- <div v-else>/</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"
- >
- <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"
- >
- <template slot-scope="{row}">
- <div class="ellipsis">{{ row.quantity }}</div>
- </template>
- </el-table-column>
- <el-table-column
- prop="saleOutQuantity"
- label="宸插彂璐ф暟閲�"
- width="120"
- >
- <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"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.priuserdefnvc1">{{ row.priuserdefnvc1 }}</div>-->
- <!-- <div v-else>/</div>-->
- <!-- </template>-->
- <!-- </el-table-column>-->
- <!-- <el-table-column-->
- <!-- prop="priuserdefnvc2"-->
- <!-- label="妫�楠屼汉鍛�"-->
- <!-- width="110"-->
- <!-- >-->
- <!-- <template slot-scope="{row}">-->
- <!-- <div v-if="row.priuserdefnvc2">{{ row.priuserdefnvc2 }}</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>
-
- </div>
- <div style="width: 500px;z-index: 2;margin-top: 50px;" class="flex_c_b">
- <div style="height: 470px;">
- <div class="smallTitle">
- <svg-icon icon-class="ph" class="svg_class" />
- 杩戜竴鍛ㄧ敓閲囪喘鍏ュ簱鐗╂枡鎺掕Top5
- </div>
- <div class="lineContent horn" style="height: 410px">
- <div id="bar03" style="width: 100%;height:100%; " />
- <!--/* <div id="bar03" style="width: 100%;height:100%;margin-left: -25px;margin-top: -10px" />*/-->
- </div>
- </div>
- <div style="height: 470px;margin-top: 30px;">
- <div class="smallTitle">
- <svg-icon icon-class="ph" class="svg_class" />
- 杩戜竴鍛ㄥ澶栧緟鍏ュ簱浜у搧鎺掕Top5
- </div>
- <div class="lineContent horn" style="height: 410px">
- <div id="bar04" style="width: 100%;height:100%;" />
- <!-- <div id="bar04" style="width: 100%;height:100%;margin-left: -25px;margin-top: -10px" />-->
- </div>
- </div>
- </div>
- </div>
-
- </div>
- </div>
-</template>
-
-<script>
-import './kbCommon.css'
-import { bar02, kbTop, loadEcharts } from '@/utils/myEcharts'
-import {
- ProcureOutsourcLeftTop,
- ProcureOutsourcLeftBottom,
- ProcureOutsourcRightTop,
- ProcureOutsourcRightBottom
-} from '@/api/kanbanManager'
-
-export default {
- name: 'Index2',
-
- data() {
- return {
- onLine: navigator.onLine, // 鐩戝惉缃戠粶鏄惁鍦ㄧ嚎
-
- headTime: '',
- tableDataTop: [],
- tableDataBottom: [],
-
- MarqueeTipsContent: '', // 鍏憡
- speed: 100, // 鍏憡鎾斁鐨勯�熷害
-
- tableTopTask: null,
- tableBottomTask: null,
- echartsRightTop: null,
- echartsRightBottom: null,
-
- starsCount: 800, // 鏄熸槦鏁伴噺
- distance: 900 // 闂磋窛
-
- }
- },
-
- created() {
- setInterval(this.getNowTime, 1000)
-
- // 涓ゅ皬鏃剁湅鏉垮埛鏂颁竴娆�
- setInterval(() => {
- window.location.reload()
- }, 1000 * 60 * 120)
- },
- mounted() {
- // 鐩戝惉缃戠粶鏄惁鍦ㄧ嚎
- window.addEventListener('online', this.updateOnlineStatus)
- window.addEventListener('offline', this.updateOnlineStatus)
- this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })
-
- this.getProcureOutsourcLeftTop()
- this.getProcureOutsourcLeftBottom()
- this.getEcharts()
- },
- beforeDestroy() {
- window.removeEventListener('online', this.updateOnlineStatus)
- window.removeEventListener('offline', this.updateOnlineStatus)
- },
- methods: {
- // 鏇存柊缃戠粶鐘舵��
- updateOnlineStatus(e) {
- if (e.isFirst) {
- // console.log('x')
- } else {
- const loading = this.$loading({
- lock: true,
- text: '鏂綉浜嗭紝姝e湪鎷煎懡鑱旂綉涓紝璇锋鏌ョ綉缁滄槸鍚︽甯�...',
- spinner: 'el-icon-loading',
- customClass: 'osloading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- const { type } = e
- this.onLine = type === 'online'
- if (this.onLine) {
- loading.close()
- this.$message.success('缃戠粶杩炴帴鎴愬姛锛�')
- } else {
- this.$message.error('缃戠粶鎺夌嚎锛岃鍏虫敞缃戠粶鐘舵�侊紒')
- }
- }
- },
-
- // 鑾峰彇宸︿笂table鏁版嵁
- getProcureOutsourcLeftTop() {
- ProcureOutsourcLeftTop().then(res => {
- this.tableDataTop = res.data
- // this.number1 = this.tableDataTop.length
- const divData = this.$refs.tableDataTopRef.bodyWrapper
- // 鎷垮埌鍏冪礌鍚庯紝瀵瑰厓绱犺繘琛屽畾鏃跺鍔犺窛绂婚《閮ㄨ窛绂伙紝瀹炵幇婊氬姩鏁堟灉(姝ら厤缃负姣�100姣绉诲姩1鍍忕礌)
- this.tableTopTask = setInterval(() => {
- // 鍏冪礌鑷璺濈椤堕儴1鍍忕礌
- divData.scrollTop += 1
- // divData.scrollTop += divData.scrollHeight / this.tableData.length
- // 鍒ゆ柇鍏冪礌鏄惁婊氬姩鍒板簳閮�(鍙楂樺害+璺濈椤堕儴=鏁翠釜楂樺害)
- if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
- // 閲嶇疆table璺濈椤堕儴璺濈
- divData.scrollTop = 0
- ProcureOutsourcLeftTop().then(res => {
- this.tableDataTop = res.data
- // this.number1 = this.tableDataTop.length
- if (this.tableDataTop.length > 10) {
- clearInterval(this.tableTopTask)
- this.getProcureOutsourcLeftTop()
- }
- })
- }
- }, this.tableDataTop.length <= 10 ? 1000 * 3 : 100)
- })
- },
- // 鑾峰彇宸︿笅table鏁版嵁
- getProcureOutsourcLeftBottom() {
- ProcureOutsourcLeftBottom().then(res => {
- this.tableDataBottom = res.data
- this.number2 = this.tableDataBottom.length
- const divData = this.$refs.tableDataBottomRef.bodyWrapper
- // 鎷垮埌鍏冪礌鍚庯紝瀵瑰厓绱犺繘琛屽畾鏃跺鍔犺窛绂婚《閮ㄨ窛绂伙紝瀹炵幇婊氬姩鏁堟灉(姝ら厤缃负姣�100姣绉诲姩1鍍忕礌)
- // const task = setInterval(() => {
- this.tableBottomTask = setInterval(() => {
- // 鍏冪礌鑷璺濈椤堕儴1鍍忕礌
- divData.scrollTop += 1
- // divData.scrollTop += divData.scrollHeight / this.tableData.length
- // 鍒ゆ柇鍏冪礌鏄惁婊氬姩鍒板簳閮�(鍙楂樺害+璺濈椤堕儴=鏁翠釜楂樺害)
- if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
- // 閲嶇疆table璺濈椤堕儴璺濈
- divData.scrollTop = 0
- ProcureOutsourcLeftBottom().then(res => {
- this.tableDataBottom = res.data
- this.number2 = this.tableDataBottom.length
- if (this.tableDataBottom.length > 10) {
- clearInterval(this.tableBottomTask)
- this.getProcureOutsourcLeftBottom()
- }
- })
- }
- }, this.tableDataBottom.length <= 10 ? 1000 * 3 : 100)
- })
- },
-
- // 鑾峰彇echarts
- getEcharts() {
- 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)))
- })
-
- ProcureOutsourcRightBottom().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(() => {
- 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(() => {
- ProcureOutsourcRightBottom().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)
- },
- // 鑾峰彇褰撳墠鏃堕棿
- getNowTime() {
- const dt = new Date()
- const wk = dt.getDay()
- const y = dt.getFullYear()
- const m = (dt.getMonth() + 1 + '').padStart(2, '0')
- const d = (dt.getDate() + '').padStart(2, '0')
-
- const hh = (dt.getHours() + '').padStart(2, '0')
- const mm = (dt.getMinutes() + '').padStart(2, '0')
- const ss = (dt.getSeconds() + '').padStart(2, '0')
- const weeks = ['鏄熸湡鏃�', '鏄熸湡涓�', '鏄熸湡浜�', '鏄熸湡涓�', '鏄熸湡鍥�', '鏄熸湡浜�', '鏄熸湡鍏�']
- const week = weeks[wk]
-
- this.headTime = `${y}-${m}-${d} ${hh}:${mm}:${ss} ${week}`
- },
- headerCellStyleCenter() {
- return {
- backgroundColor: 'transparent ',
- padding: '10px 0',
- textAlign: 'center',
- color: '#07acc2',
- border: 'none',
- fontSize: '18px'
- }
- },
- cellStyleCenter() {
- return {
- padding: '7.5px 0',
- textAlign: 'center',
- backgroundColor: 'transparent ',
- color: '#c7e7ff',
- border: 'none',
- fontSize: '18px'
- }
- }
- }
-}
-</script>
-
-<style scoped lang="scss">
-
-$main_color:#09d8f2;
-$color01: #00FFFF;
-.tableData{
- background: transparent;
-}
-::v-deep .el-table th,
-::v-deep .el-table tr,
-::v-deep .el-table td {
- background-color: transparent;
-}
-.el-table__empty-text{
- color: $main_color;
-}
-
-::v-deep .el-table__body-wrapper::-webkit-scrollbar {
- /* width: 0;瀹藉害涓�0鏆楄棌 */
- width: 0;
-}
-
-::v-deep .el-table::before {
- height: 0;
-}
-
-::v-deep .cell {
- padding: 0 !important;
- //font-size: 16px;
- font-size: 18px;
-}
-</style>
-
diff --git a/src/views/kb/produce.vue b/src/views/kb/produce.vue
new file mode 100644
index 0000000..5271079
--- /dev/null
+++ b/src/views/kb/produce.vue
@@ -0,0 +1,367 @@
+<template>
+ <div>
+ <div class="kb_dashboard">
+
+ <div class="kb_backgroundCustom" />
+ <div class="kb_header">
+ <div class="kb_headTime" style="top: 35px;left: 20px">
+ <span>姘稿悍甯傚閾伐璐告湁闄愬叕鍙�</span>
+ </div>
+
+ <div class="kb_headTime kb_header_text" style="top: 35px;left: 800px">
+ <span>杞﹂棿鐢熶骇鏁板瓧鍖栫湅鏉�</span>
+ </div>
+
+ <div class="kb_headTime" style="top: 35px;right: 25px">
+ <span>{{ headTime }}</span>
+ </div>
+ </div>
+
+ <div style="display: flex;justify-content: space-between;padding:0 20px 20px 20px;height: 950px">
+ <div style="width: 1350px;z-index: 2;margin-top: 50px;" class="flex_c_b">
+ <div style="height: 970px;">
+ <div class="smallTitle">
+ <svg-icon icon-class="cpdrk" class="svg_class" />
+ 鐢熶骇寰呭叆搴�
+ </div>
+ <div class="lineContent horn" style="height: 890px">
+ <el-table
+ ref="tableDataTopRef"
+ :data="tableDataTop"
+ style="width: 100%;"
+ class="tableData"
+ :header-cell-style="headerCellStyleCenter"
+ :cell-style="cellStyleCenter"
+ height="885"
+ >
+ <el-table-column
+ prop="voucherdate"
+ label="鍗曟嵁鏃ユ湡"
+ width="131"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.voucherdate" class="ellipsis">{{ row.voucherdate.substring(0, 10) }}</div>
+ <div v-else />
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="wo"
+ label="鍗曟嵁缂栧彿"
+ width="189"
+ >
+ <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"-->
+ <!-- >-->
+ <!-- <template slot-scope="{row}">-->
+ <!-- <div class="ellipsis">{{ row.materiel_code }}</div>-->
+ <!-- </template>-->
+ <!-- </el-table-column>-->
+ <el-table-column
+ prop="materiel_name"
+ label="浜у搧鍚嶇О"
+ width="200"
+ >
+ <template slot-scope="{row}">
+ <div class="ellipsis">{{ row.materiel_name }}</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="specification"
+ label="瑙勬牸鍨嬪彿"
+ width="196"
+ >
+ <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="stck_name"
+ label="棰勫叆浠撳簱"
+ width="120"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.stck_name" class="ellipsis">{{ row.stck_name }}</div>
+ <div v-else>/</div>
+ </template>
+ </el-table-column>
+ <el-table-column
+ prop="quantity"
+ label="鏁伴噺"
+ width="83"
+ />
+ <el-table-column
+ prop="totalStockInQuantity"
+ label="宸插叆搴撴暟閲�"
+ width="120"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.totalStockInQuantity">{{ row.totalStockInQuantity }}</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>
+ <div style="width: 500px;z-index: 2;margin-top: 50px;" class="flex_c_b">
+ <div style="height:970px;">
+ <div class="smallTitle">
+ <svg-icon icon-class="ph" class="svg_class" />
+ 杩戜竴鍛ㄧ敓浜у緟鍏ュ簱浜у搧鎺掕Top10
+ </div>
+ <div class="lineContent horn" style="height: 890px">
+ <div id="bar03" style="width: 100%;height:100%; " />
+ <!--/* <div id="bar03" style="width: 100%;height:100%;margin-left: -25px;margin-top: -10px" />*/-->
+ </div>
+ </div>
+
+ </div>
+ </div>
+
+ </div>
+ </div>
+</template>
+
+<script>
+import './kbCommon.css'
+import { bar02, loadEcharts } from '@/utils/myEcharts'
+import {
+ ProductionStockedInLeftTop,
+ ProductionStockedInRightTop
+} from '@/api/kanbanManager'
+
+export default {
+ name: 'Index2',
+
+ data() {
+ return {
+ onLine: navigator.onLine, // 鐩戝惉缃戠粶鏄惁鍦ㄧ嚎
+
+ headTime: '',
+ tableDataTop: [],
+ tableDataBottom: [],
+
+ MarqueeTipsContent: '', // 鍏憡
+ speed: 100, // 鍏憡鎾斁鐨勯�熷害
+
+ tableTopTask: null,
+ tableBottomTask: null,
+ echartsRightTop: null,
+ echartsRightBottom: null,
+
+ starsCount: 800, // 鏄熸槦鏁伴噺
+ distance: 900 // 闂磋窛
+
+ }
+ },
+
+ created() {
+ setInterval(this.getNowTime, 1000)
+
+ // 涓ゅ皬鏃剁湅鏉垮埛鏂颁竴娆�
+ setInterval(() => {
+ window.location.reload()
+ }, 1000 * 60 * 120)
+ },
+ mounted() {
+ // 鐩戝惉缃戠粶鏄惁鍦ㄧ嚎
+ window.addEventListener('online', this.updateOnlineStatus)
+ window.addEventListener('offline', this.updateOnlineStatus)
+ this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })
+
+ this.getProductionStockedInLeftTop()
+ // this.getProcureOutsourcLeftBottom()
+ this.getEcharts()
+ },
+ beforeDestroy() {
+ window.removeEventListener('online', this.updateOnlineStatus)
+ window.removeEventListener('offline', this.updateOnlineStatus)
+ },
+ methods: {
+ // 鏇存柊缃戠粶鐘舵��
+ updateOnlineStatus(e) {
+ if (e.isFirst) {
+ // console.log('x')
+ } else {
+ const loading = this.$loading({
+ lock: true,
+ text: '鏂綉浜嗭紝姝e湪鎷煎懡鑱旂綉涓紝璇锋鏌ョ綉缁滄槸鍚︽甯�...',
+ spinner: 'el-icon-loading',
+ customClass: 'osloading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ })
+ const { type } = e
+ this.onLine = type === 'online'
+ if (this.onLine) {
+ loading.close()
+ this.$message.success('缃戠粶杩炴帴鎴愬姛锛�')
+ } else {
+ this.$message.error('缃戠粶鎺夌嚎锛岃鍏虫敞缃戠粶鐘舵�侊紒')
+ }
+ }
+ },
+
+ // 鑾峰彇宸︿笂table鏁版嵁
+ getProductionStockedInLeftTop() {
+ ProductionStockedInLeftTop().then(res => {
+ this.tableDataTop = res.data
+ // this.number1 = this.tableDataTop.length
+ const divData = this.$refs.tableDataTopRef.bodyWrapper
+ // 鎷垮埌鍏冪礌鍚庯紝瀵瑰厓绱犺繘琛屽畾鏃跺鍔犺窛绂婚《閮ㄨ窛绂伙紝瀹炵幇婊氬姩鏁堟灉(姝ら厤缃负姣�100姣绉诲姩1鍍忕礌)
+ this.tableTopTask = setInterval(() => {
+ // 鍏冪礌鑷璺濈椤堕儴1鍍忕礌
+ divData.scrollTop += 1
+ // divData.scrollTop += divData.scrollHeight / this.tableData.length
+ // 鍒ゆ柇鍏冪礌鏄惁婊氬姩鍒板簳閮�(鍙楂樺害+璺濈椤堕儴=鏁翠釜楂樺害)
+ if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
+ // 閲嶇疆table璺濈椤堕儴璺濈
+ divData.scrollTop = 0
+ ProductionStockedInLeftTop().then(res => {
+ this.tableDataTop = res.data
+ // this.number1 = this.tableDataTop.length
+ if (this.tableDataTop.length > 10) {
+ clearInterval(this.tableTopTask)
+ this.getProductionStockedInLeftTop()
+ }
+ })
+ }
+ }, this.tableDataTop.length <= 10 ? 1000 * 3 : 100)
+ })
+ },
+
+ // 鑾峰彇echarts
+ getEcharts() {
+ ProductionStockedInRightTop().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)))
+ })
+
+ this.echartsRightTop = setInterval(() => {
+ ProductionStockedInRightTop().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)
+ },
+ // 鑾峰彇褰撳墠鏃堕棿
+ getNowTime() {
+ const dt = new Date()
+ const wk = dt.getDay()
+ const y = dt.getFullYear()
+ const m = (dt.getMonth() + 1 + '').padStart(2, '0')
+ const d = (dt.getDate() + '').padStart(2, '0')
+
+ const hh = (dt.getHours() + '').padStart(2, '0')
+ const mm = (dt.getMinutes() + '').padStart(2, '0')
+ const ss = (dt.getSeconds() + '').padStart(2, '0')
+ const weeks = ['鏄熸湡鏃�', '鏄熸湡涓�', '鏄熸湡浜�', '鏄熸湡涓�', '鏄熸湡鍥�', '鏄熸湡浜�', '鏄熸湡鍏�']
+ const week = weeks[wk]
+
+ this.headTime = `${y}-${m}-${d} ${hh}:${mm}:${ss} ${week}`
+ },
+ headerCellStyleCenter() {
+ return {
+ backgroundColor: 'transparent ',
+ padding: '10px 0',
+ textAlign: 'center',
+ color: '#07acc2',
+ border: 'none',
+ fontSize: '18px'
+ }
+ },
+ cellStyleCenter() {
+ return {
+ padding: '7.5px 0',
+ textAlign: 'center',
+ backgroundColor: 'transparent ',
+ color: '#c7e7ff',
+ border: 'none',
+ fontSize: '18px'
+ }
+ }
+ }
+}
+</script>
+
+<style scoped lang="scss">
+
+$main_color:#09d8f2;
+$color01: #00FFFF;
+.tableData{
+ background: transparent;
+}
+::v-deep .el-table th,
+::v-deep .el-table tr,
+::v-deep .el-table td {
+ background-color: transparent;
+}
+.el-table__empty-text{
+ color: $main_color;
+}
+
+::v-deep .el-table__body-wrapper::-webkit-scrollbar {
+ /* width: 0;瀹藉害涓�0鏆楄棌 */
+ width: 0;
+}
+
+::v-deep .el-table::before {
+ height: 0;
+}
+
+::v-deep .cell {
+ padding: 0 !important;
+ //font-size: 16px;
+ font-size: 18px;
+}
+</style>
+
diff --git a/src/views/kb/warehouse.vue b/src/views/kb/warehouse.vue
index 6211cca..b6fe3ff 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="151"
+ width="161"
>
<template slot-scope="{row}">
<div v-if="row.voucherdate" class="ellipsis">{{ row.voucherdate.substring(0, 10) }}</div>
@@ -47,25 +47,25 @@
<el-table-column
prop="wo"
label="鍗曟嵁缂栧彿"
- width="189"
+ width="199"
>
<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="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"
+ width="210"
>
<template slot-scope="{row}">
<div v-if="row.saleOrderCode" class="ellipsis">{{ row.saleOrderCode }}</div>
@@ -76,7 +76,7 @@
<el-table-column
prop="materiel_name"
label="浜у搧鍚嶇О"
- width="260"
+ width="270"
>
<template slot-scope="{row}">
<div class="ellipsis">{{ row.materiel_name }}</div>
@@ -85,7 +85,7 @@
<el-table-column
prop="specification"
label="瑙勬牸鍨嬪彿"
- width="116"
+ width="126"
>
<template slot-scope="{row}">
<div v-if="row.specification" class="ellipsis">{{ row.specification }}</div>
@@ -95,7 +95,7 @@
<el-table-column
prop="stck_name"
label="棰勫叆浠撳簱"
- width="110"
+ width="125"
>
<template slot-scope="{row}">
<div v-if="row.stck_name" class="ellipsis">{{ row.stck_name }}</div>
@@ -105,12 +105,12 @@
<el-table-column
prop="quantity"
label="鏁伴噺"
- width="73"
+ width="93"
/>
<el-table-column
prop="totalStockInQuantity"
label="宸插叆搴撴暟閲�"
- width="120"
+ width="140"
>
<template slot-scope="{row}">
<div v-if="row.totalStockInQuantity">{{ row.totalStockInQuantity }}</div>
@@ -124,7 +124,7 @@
<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
@@ -197,7 +197,7 @@
<el-table-column
prop="deliveryDate"
- label="棰勮浜よ揣鏃ユ湡"
+ label="棰勮浜や粯鏃ユ湡"
width="200"
>
<template slot-scope="{row}">
@@ -225,7 +225,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%; " />
@@ -253,9 +253,9 @@
import './kbCommon.css'
import { bar02, kbTop, loadEcharts } from '@/utils/myEcharts'
import {
- ProductionStockedInLeftTop,
+ ProcureOutsourcLeftTop,
ProductConsignmentLeftBottom,
- ProductionStockedInRightTop,
+ ProcureOutsourcRightTop,
ProductionStockedInRightBottom
} from '@/api/kanbanManager'
@@ -298,7 +298,7 @@
window.addEventListener('offline', this.updateOnlineStatus)
this.updateOnlineStatus({ type: this.onLine ? 'online' : 'offline', isFirst: true })
- this.getProductionStockedInLeftTop()
+ this.getProcureOutsourcLeftTop()
this.getProductConsignmentLeftBottom()
this.getEcharts()
},
@@ -330,8 +330,8 @@
}
},
// 鑾峰彇宸︿笂table鏁版嵁
- getProductionStockedInLeftTop() {
- ProductionStockedInLeftTop().then(res => {
+ getProcureOutsourcLeftTop() {
+ ProcureOutsourcLeftTop().then(res => {
this.tableDataTop = res.data
// this.number1 = this.tableDataTop.length
const divData = this.$refs.tableDataTopRef.bodyWrapper
@@ -344,12 +344,12 @@
if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
// 閲嶇疆table璺濈椤堕儴璺濈
divData.scrollTop = 0
- ProductionStockedInLeftTop().then(res => {
+ ProcureOutsourcLeftTop().then(res => {
this.tableDataTop = res.data
// this.number1 = this.tableDataTop.length
if (this.tableDataTop.length > 10) {
clearInterval(this.tableTopTask)
- this.getProductionStockedInLeftTop()
+ this.getProcureOutsourcLeftTop()
}
})
}
@@ -387,7 +387,7 @@
// 鑾峰彇echarts
getEcharts() {
- ProductionStockedInRightTop().then(res => {
+ 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)))
})
@@ -396,7 +396,7 @@
})
this.echartsRightTop = setInterval(() => {
- ProductionStockedInRightTop().then(res => {
+ 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)
--
Gitblit v1.9.3