From efca35e837a01df3f44755d8f9918b407e2cf0b7 Mon Sep 17 00:00:00 2001
From: loulijun2021 <1694218219@qq.com>
Date: 星期五, 24 十一月 2023 11:08:19 +0800
Subject: [PATCH] 1.仓库、采购看板 基本已实现
---
src/views/kb/warehouse.vue | 173 ++++++++++++++++-----------------------------------------
1 files changed, 49 insertions(+), 124 deletions(-)
diff --git a/src/views/kb/warehouse.vue b/src/views/kb/warehouse.vue
index eacd795..6211cca 100644
--- a/src/views/kb/warehouse.vue
+++ b/src/views/kb/warehouse.vue
@@ -37,7 +37,7 @@
<el-table-column
prop="voucherdate"
label="鍗曟嵁鏃ユ湡"
- width="131"
+ width="151"
>
<template slot-scope="{row}">
<div v-if="row.voucherdate" class="ellipsis">{{ row.voucherdate.substring(0, 10) }}</div>
@@ -72,19 +72,11 @@
<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="180"
+ width="260"
>
<template slot-scope="{row}">
<div class="ellipsis">{{ row.materiel_name }}</div>
@@ -93,7 +85,7 @@
<el-table-column
prop="specification"
label="瑙勬牸鍨嬪彿"
- width="136"
+ width="116"
>
<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="110"
>
<template slot-scope="{row}">
<div v-if="row.stck_name" class="ellipsis">{{ row.stck_name }}</div>
@@ -113,43 +105,19 @@
<el-table-column
prop="quantity"
label="鏁伴噺"
- width="63"
+ width="73"
/>
<el-table-column
prop="totalStockInQuantity"
label="宸插叆搴撴暟閲�"
- width="100"
+ 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>
@@ -187,45 +155,11 @@
<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"
+ width="258"
>
<template slot-scope="{row}">
<div v-if="row.materiel_name" class="ellipsis">{{ row.materiel_name }}</div>
@@ -234,7 +168,7 @@
<el-table-column
prop="specification"
label="瑙勬牸鍨嬪彿"
- width="300"
+ width="200"
>
<template slot-scope="{row}">
<div v-if="row.specification" class="ellipsis">{{ row.specification }}</div>
@@ -260,26 +194,7 @@
<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="棰勮浜よ揣鏃ユ湡"
@@ -287,6 +202,17 @@
>
<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-column
+ prop="warning"
+ label="寤舵湡澶╂暟"
+ width="130"
+ >
+ <template slot-scope="{row}">
+ <div v-if="row.warning">{{ row.warning }}</div>
<div v-else>/</div>
</template>
</el-table-column>
@@ -326,12 +252,12 @@
<script>
import './kbCommon.css'
import { bar02, kbTop, loadEcharts } from '@/utils/myEcharts'
-// import {
-// WareHouseRightBottomData,
-// WareHouseRightTopData,
-// WareHouseTopBottomData,
-// WareHouseTopLeftData
-// } from '@/api/kanbanManager'
+import {
+ ProductionStockedInLeftTop,
+ ProductConsignmentLeftBottom,
+ ProductionStockedInRightTop,
+ ProductionStockedInRightBottom
+} from '@/api/kanbanManager'
export default {
name: 'Index2',
@@ -371,10 +297,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.getProductionStockedInLeftTop()
+ this.getProductConsignmentLeftBottom()
+ this.getEcharts()
},
beforeDestroy() {
window.removeEventListener('online', this.updateOnlineStatus)
@@ -403,10 +329,9 @@
}
}
},
-
// 鑾峰彇宸︿笂table鏁版嵁
- getWareHouseTopLeftData() {
- WareHouseTopLeftData().then(res => {
+ getProductionStockedInLeftTop() {
+ ProductionStockedInLeftTop().then(res => {
this.tableDataTop = res.data
// this.number1 = this.tableDataTop.length
const divData = this.$refs.tableDataTopRef.bodyWrapper
@@ -419,12 +344,12 @@
if (divData.clientHeight + divData.scrollTop === divData.scrollHeight) {
// 閲嶇疆table璺濈椤堕儴璺濈
divData.scrollTop = 0
- WareHouseTopLeftData().then(res => {
+ ProductionStockedInLeftTop().then(res => {
this.tableDataTop = res.data
// this.number1 = this.tableDataTop.length
if (this.tableDataTop.length > 10) {
clearInterval(this.tableTopTask)
- this.getWareHouseTopLeftData()
+ this.getProductionStockedInLeftTop()
}
})
}
@@ -432,8 +357,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 +372,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 +387,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)))
+ 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)))
})
- 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)))
+ 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)
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