From 0f2acb4f868056eb7257ff8c6daee8a56849f95a Mon Sep 17 00:00:00 2001
From: 小小儁爺 <1694218219@qq.com>
Date: 星期三, 22 四月 2026 17:24:20 +0800
Subject: [PATCH] 1.入库标识卡功能开发
---
src/views/kanbanManager/jghjcj.vue | 564 ++++++++++++++++++++++++++++++++++++++------------------
1 files changed, 381 insertions(+), 183 deletions(-)
diff --git a/src/views/kanbanManager/jghjcj.vue b/src/views/kanbanManager/jghjcj.vue
index 6f48418..773f02a 100644
--- a/src/views/kanbanManager/jghjcj.vue
+++ b/src/views/kanbanManager/jghjcj.vue
@@ -9,7 +9,7 @@
<span>娴欐睙闃块瞾鍏嬪仴韬櫒鏉愭湁闄愬叕鍙�</span>
</div>
- <div class="kb_headTime kb_header_text" style="top: 35px;left: 772px">
+ <div class="kb_headTime kb_header_text" style="top: 35px;left: 768px">
<span>閲戝伐鐒婃帴杞﹂棿鏁板瓧鍖栫湅鏉�</span>
</div>
@@ -17,55 +17,134 @@
<span>{{ headTime }}</span>
</div>
</div>
-
<div
style=" padding:5px 20px 20px 20px;z-index:2;height: 940px;flex-direction: column;justify-content: space-between;"
>
<!-- 涓婅竟-->
<div style="display: flex;justify-content: space-between">
- <div style="width:100%">
- <div class="smallTitle">
- <svg-icon icon-class="cxjg" class="svg_class" />
- 鐢熶骇淇℃伅
- </div>
-
- <div style="height: 450px">
- <dv-border-box-12>
- <dv-scroll-board
- ref="scrollBoardTop"
- :config="configTableTop"
- style="width: 99%;height: 430px;margin:0 auto;padding-top: 13px;"
- />
- </dv-border-box-12>
- </div>
-
- </div>
- </div>
-
- <!-- 涓嬭竟-->
- <div style="display: flex;justify-content: space-between;margin-top: 15px;">
- <div style="width: 1000px;">
+ <div style="width: 925px;">
<div class="smallTitle">
<svg-icon icon-class="blcs" class="svg_class" />
- 璐ㄩ噺涓嶈壇(杩戜竴鍛�)
+ 閲囪喘璁㈠崟(鏈�/瀛�)
</div>
+ <div
+ class="lineContent horn"
+ style="height: 450px;display: flex;flex-direction: column;justify-content: space-between"
+ >
+ <div style="height: 180px;padding: 10px;display: flex;justify-content: space-between">
- <div style="height: 380px;">
- <dv-border-box-12>
- <div id="cjzl03" class="flex_c_c" style="width: 100%;height:100%" />
- </dv-border-box-12>
+ <div v-for="i in LeftTopData01" :key="i.Quarter" class="flex_c_s">
+ <div class="all_block03 flex_c_s">
+ <div class="flex_c_c all_block04">{{ i.Quarter }}</div>
+ <div class="" style="display: flex;justify-content:space-between">
+ <div class="all_block04 flex_c_c" style="width: 49% ">浠诲姟鏁�</div>
+ <div class="all_block04 flex_c_c" style="width: 49% ">{{ i.quantity }}</div>
+ </div>
+ <div class="" style="display: flex;justify-content:space-between">
+ <div class="all_block04 flex_c_c" style="width: 49% ">鍏ュ簱鏁�</div>
+ <div class="all_block04 flex_c_c" style="width: 49% ">{{ i.ouquantity }}</div>
+ </div>
+ </div>
+ </div>
+
+ </div>
+ <div style="height: 260px;">
+ <div id="all02_1" class="flex_c_c" style="width: 100%;height:100%;" />
+ </div>
</div>
-
</div>
- <div style="width: 850px;">
+ <div style="width: 925px;">
+ <div class="smallTitle">
+ <svg-icon icon-class="cggz" class="svg_class" />
+ 閿�鍞鍗�(鏈�/瀛�)
+ </div>
+ <div
+ class="lineContent horn"
+ style="height: 450px;display: flex;flex-direction: column;justify-content: space-between"
+ >
+ <div style="height: 180px;padding: 10px;display: flex;justify-content: space-between">
+
+ <div v-for="i in RightTopData01" :key="i.Quarter" class="flex_c_s">
+ <div class="all_block03 flex_c_s">
+ <div class="flex_c_c all_block04">{{ i.Quarter }}</div>
+ <div class="" style="display: flex;justify-content:space-between">
+ <div class="all_block04 flex_c_c" style="width: 49% ">浠诲姟鏁�</div>
+ <div class="all_block04 flex_c_c" style="width: 49% ">{{ i.quantity }}</div>
+ </div>
+ <div class="" style="display: flex;justify-content:space-between">
+ <div class="all_block04 flex_c_c" style="width: 49% ">鍑哄簱鏁�</div>
+ <div class="all_block04 flex_c_c" style="width: 49% ">{{ i.ouquantity }}</div>
+ </div>
+ </div>
+ </div>
+
+ </div>
+ <div style="height: 260px;">
+ <div id="all02" class="flex_c_c" style="width: 100%;height:100%;" />
+ </div>
+ </div>
+ </div>
+ </div>
+ <!-- 涓嬭竟-->
+ <div style="display: flex;justify-content: space-between;margin-top: 15px;">
+ <div style="width: 925px;">
+ <div class="smallTitle">
+ <svg-icon icon-class="cxjg" class="svg_class" />
+ 鐢熶骇瀹屽伐(褰撴湀)
+ </div>
+ <div
+ class="lineContent horn"
+ style="height: 380px;display: flex;flex-direction: column;justify-content: space-between"
+ >
+ <div
+ style="padding: 10px;
+ display: flex;justify-content: flex-start;
+ flex-wrap: wrap;"
+ >
+ <div v-for="i in LeftBottomData01" :key="i.wkshp_code" style="margin:0 18px" class="flex_c_s">
+ <div class="all_block01 flex_c_s">
+ <div class="flex_c_c all_block02" style="">{{ i.wkshp_name }}</div>
+ <div class="" style="display: flex;justify-content:space-between">
+ <div class="all_block02 flex_c_c" style="width: 49% ">浠诲姟鏁�</div>
+ <div class="all_block02 flex_c_c" style="width: 49% ">{{ i.plan_qty }}</div>
+ </div>
+ <div class="" style="display: flex;justify-content:space-between">
+ <div class="all_block02 flex_c_c" style="width: 49% ">瀹屽伐鏁�</div>
+ <div class="all_block02 flex_c_c" style="width: 49% ">{{ i.good_qty }}</div>
+ </div>
+ </div>
+ </div>
+
+ </div>
+ <!-- <div style="height: 260px;">-->
+ <!-- <div id="all01" class="flex_c_c" style="width: 100%;height:100%;" />-->
+ <!-- </div>-->
+ </div>
+ </div>
+ <div style="width: 925px;">
<div class="smallTitle">
<svg-icon icon-class="ckkc" class="svg_class" />
- 涓嶈壇缁熻(杩戜竴鏈�)
+ 浠撳簱搴撳瓨
</div>
- <div style="height: 380px;">
- <dv-border-box-12>
- <div id="cjzl04" class="flex_c_c" style="width: 100%;height:100%" />
- </dv-border-box-12>
+ <div class="lineContent horn" style="height: 380px;display: flex;justify-content: space-between">
+ <div style="display: flex;justify-content: center;position: relative">
+ <div class="kb_center_block_children all_block05">
+ <div style="font-size: 24px;">{{ parseFloat(RightBottom.Y) }}</div>
+ <div class="box02" />
+ <div>鍘熸潗鏂�</div>
+ </div>
+ <!-- <div class="kb_center_block_children all_block06">-->
+ <!-- <div style="font-size: 24px;">{{ parseFloat(RightBottom.B) }}</div>-->
+ <!-- <div class="box02" />-->
+ <!-- <div>鍗婃垚鍝�</div>-->
+ <!-- </div>-->
+ <div class="kb_center_block_children all_block07">
+ <div style="font-size: 24px;">{{ parseFloat(RightBottom.C) }}</div>
+ <div class="box02" />
+ <div>浜ф垚鍝�</div>
+ </div>
+
+ </div>
</div>
</div>
</div>
@@ -76,11 +155,9 @@
<script>
import './kbCommon.css'
-import { loadEcharts, cjzl04, cjzl03_2, cjzl03 } from '@/utils/myEcharts'
+import { loadEcharts, all02, all03 } from '@/utils/myEcharts'
import {
- WorkShopProduceBottomLeftData,
- WorkShopProduceBottomRightData,
- WorkShopProduceTopData
+ WorkShopCompreLeftBottom, WorkShopCompreLeftTop, WorkShopCompreRightBottom, WorkShopCompreRightTop
} from '@/api/kanbanManager'
export default {
@@ -88,152 +165,164 @@
data() {
return {
headTime: '',
+ tableDataRightTop: [],
- cjzl03_xData: [],
- cjzl03_yData: [],
- RightBottom: [],
+ LeftTopData01: [],
+ LeftTopData02: [],
- configTableTop: {
- headerBGC: 'rgba(38, 68 ,139, 0.2)', // 琛ㄥご鑳屾櫙鑹�
- oddRowBGC: 'transparent', // 濂囨暟琛岃儗鏅壊
- evenRowBGC: 'transparent', // 鍋舵暟琛岃儗鏅壊
- headerHeight: 45,
- waitTime: 3000,
- rowNum: 8,
+ RightTopData01: [],
+ RightTopData02: [],
- header: [
- '<span style="color:#09d8f2;">宸ュ崟鍙�</span>',
- '<span style="color:#09d8f2;">浜у搧缂栫爜</span>',
- '<span style="color:#09d8f2;">浜у搧鍚嶇О</span>',
- '<span style="color:#09d8f2;">浜у搧瑙勬牸</span>',
- '<span style="color:#09d8f2;">浠诲姟鏁伴噺</span>',
- '<span style="color:#09d8f2;">鍚堟牸鏁伴噺</span>',
- '<span style="color:#09d8f2;">涓嶈壇鏁伴噺</span>',
+ LeftBottomData01: [],
+ LeftBottomData02: [],
- '<span style="color:#09d8f2;">宸ュ簭椤哄簭</span>',
- '<span style="color:#09d8f2;">宸ュ簭缂栫爜</span>',
- '<span style="color:#09d8f2;">宸ュ簭鍚嶇О</span>',
- '<span style="color:#09d8f2;">瀹屾垚杩涘害(%)</span>'
- ],
- // '<span style="color:#09d8f2;">宸ュ簾鏁伴噺</span>',
- // '<span style="color:#09d8f2;">鏂欏簾鏁伴噺</span>',
- data: [
- // ['<span style="color:#37a2da;">琛�1鍒�1</span>', '琛�1鍒�2', '琛�1鍒�3'],
- ],
- // index: true, , 130, 130
- columnWidth: [200, 140, 350, 350, 130, 130, 130, 130, 130, 130, 130],
- align: ['center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center', 'center']
- // carousel: 'page'
- }
+ RightBottom: {}
}
},
created() {
setInterval(this.getNowTime, 1000)
- // 涓ゅ皬鏃剁湅鏉垮埛鏂颁竴娆�
+ // // 涓ゅ皬鏃剁湅鏉垮埛鏂颁竴娆�
setInterval(() => {
window.location.reload()
}, 1000 * 60 * 120)
},
- async mounted() {
- await this.getWorkShopProduceTopData()
- setInterval(() => {
- this.getWorkShopProduceTopData()
- }, 10 * 1000)
- await this.getWorkShopProduceBottomLeftData()
- setInterval(() => {
- this.getWorkShopProduceBottomLeftData()
- }, 20 * 1000)
- await this.getWorkShopProduceBottomRightData()
- setInterval(() => {
- this.getWorkShopProduceBottomRightData()
- }, 30 * 1000)
+ mounted() {
+ this.getAllApi()
},
methods: {
- async getWorkShopProduceTopData() {
- WorkShopProduceTopData({ wkshopcode: '02,03' }).then(res => {
- const flag = this.compareArrays(this.configTableTop.data, res.data)
- if (!flag) {
- this.configTableTop.data = res.data.map(i =>
- [
- i.wo_code,
- i.partcode,
- i.partname,
- i.partspec ? i.partspec : '/',
- i.plan_qty,
- i.good_qty,
- `<span style="color: red;">${i.ng_qty}</span>`,
- i.seq,
- i.step_code,
- i.step_name,
- parseFloat(i.schedule.toFixed(2))
- ]
- )
- // `<span style="color: red;">${i.laborbad_qty}</span>`,
- // `<span style="color: red;">${i.materielbad_qty}</span>`,
- this.$refs['scrollBoardTop'].updateRows(this.configTableTop.data)
- }
+ async getAllApi() {
+ // 宸︿笂 閲囪喘璁㈠崟
+ const res2 = await WorkShopCompreLeftBottom()
+ res2.data.BottomLeftTop.forEach(i => {
+ this.LeftTopData01.push({
+ Quarter: i.Quarter,
+ quantity: i.quantity,
+ ouquantity: i.ouquantity
+ })
})
- },
- async getWorkShopProduceBottomLeftData() {
- const temp = [
- // { code: '101', name: '鍙戞场杞﹂棿' },
- // { code: '102', name: '鎸ゅ嚭杞﹂棿' },
- // { code: '103', name: '鍖呰杞﹂棿' },
- // { code: '001', name: '娴嬭瘯杞﹂棿' }
+ res2.data.BottomLeftBottom.forEach(i => {
+ this.LeftTopData02.push({
+ Month: i.Month + '鏈�',
+ quantity: i.quantity,
+ ouquantity: i.ouquantity
+ })
+ })
+ loadEcharts('all02_1', all02(this.LeftTopData02, '姣忔湀閲囪喘鏁伴噺/鍏ュ簱鏁伴噺'))
+ setInterval(() => {
+ this.LeftTopData01 = []
+ this.LeftTopData02 = []
+ WorkShopCompreLeftBottom().then(res2 => {
+ res2.data.BottomLeftTop.forEach(i => {
+ this.LeftTopData01.push({
+ Quarter: i.Quarter,
+ quantity: i.quantity,
+ ouquantity: i.ouquantity
+ })
+ })
+ res2.data.BottomLeftBottom.forEach(i => {
+ this.LeftTopData02.push({
+ Month: i.Month + '鏈�',
+ quantity: i.quantity,
+ ouquantity: i.ouquantity
+ })
+ })
+ loadEcharts('all02_1', all02(this.LeftTopData02, '姣忔湀閲囪喘鏁伴噺/鍏ュ簱鏁伴噺'))
+ })
+ }, 1000 * 35)
- // { code: '01', name: '閲戝伐杞﹂棿' },
- // { code: '02', name: '閾濅慨' },
- // { code: '03', name: '鍙伴捇' },
- // { code: '04', name: '鍠锋紗' },
- // { code: '05', name: '缁勮鎴愬搧' }
+ // 鍙充笂 閿�鍞鍗�
+ const res3 = await WorkShopCompreRightTop()
+ res3.data.RightTop.forEach(i => {
+ this.RightTopData01.push({
+ Quarter: i.Quarter,
+ quantity: i.quantity,
+ ouquantity: i.ouquantity
+ })
+ })
+ res3.data.RightBottom.forEach(i => {
+ this.RightTopData02.push({
+ Month: i.Month + '鏈�',
+ quantity: i.quantity,
+ ouquantity: i.ouquantity
+ })
+ })
+ loadEcharts('all02', all02(this.RightTopData02, '姣忔湀璁㈠崟鏁伴噺/鍑哄簱鏁伴噺'))
+ setInterval(() => {
+ WorkShopCompreRightTop().then(res3 => {
+ this.RightTopData01 = []
+ this.RightTopData02 = []
+ res3.data.RightTop.forEach(i => {
+ this.RightTopData01.push({
+ Quarter: i.Quarter,
+ quantity: i.quantity,
+ ouquantity: i.ouquantity
+ })
+ })
+ res3.data.RightBottom.forEach(i => {
+ this.RightTopData02.push({
+ Month: i.Month + '鏈�',
+ quantity: i.quantity,
+ ouquantity: i.ouquantity
+ })
+ })
+ loadEcharts('all02', all02(this.RightTopData02, '姣忔湀璁㈠崟鏁伴噺/鍑哄簱鏁伴噺'))
+ })
+ }, 1000 * 40)
- { code: '02', name: '閲戝伐杞﹂棿' },
- { code: '03', name: '鐒婃帴杞﹂棿' }
+ const temp2 = [
+ { wkshp_code: '02', wkshp_name: '閲戝伐杞﹂棿' },
+ { wkshp_code: '03', wkshp_name: '鐒婃帴杞﹂棿' }
]
- const res4 = await WorkShopProduceBottomLeftData({ wkshopcode: temp.map(i => i.code).join(',') })
- // this.cjzl03_xData = res4.data['101,001'].map(i => i.click_date)
- // this.cjzl03_yData = res4.data['101,001'].map(i => i.count)
-
- const a = res4.data['004'].map(i => i.click_date) // echarts妯潗鏍�
- const b = temp.map(i => i.name)// legendData鍊�
- const c = [
- // res4.data['01'].map(i => i.count),
- // res4.data['02'].map(i => i.count),
- // res4.data['03'].map(i => i.count),
- // res4.data['04'].map(i => i.count),
- // res4.data['05'].map(i => i.count)
- res4.data['004'].map(i => i.count)
- ]// 绾靛潗鏍囧��
-
- loadEcharts('cjzl03', cjzl03(a, b, c))
- },
-
- async getWorkShopProduceBottomRightData() {
- const temp = [
- // { code: '101', name: '鍙戞场杞﹂棿' },
- // { code: '102', name: '鎸ゅ嚭杞﹂棿' },
- // { code: '103', name: '鍖呰杞﹂棿' },
- // { code: '001', name: '娴嬭瘯杞﹂棿' }
-
- // { code: '01', name: '閲戝伐杞﹂棿' },
- // { code: '02', name: '閾濅慨' },
- // { code: '03', name: '鍙伴捇' },
- // { code: '04', name: '鍠锋紗' },
- // { code: '05', name: '缁勮鎴愬搧' }
-
- { code: '02', name: '閲戝伐杞﹂棿' },
- { code: '03', name: '鐒婃帴杞﹂棿' }
- ]
- const res5 = await WorkShopProduceBottomRightData({ wkshopcode: temp.map(i => i.code).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)))
+ // 宸︿笅 鐢熶骇璁㈠崟
+ const res4 = await WorkShopCompreLeftTop({ wkshopcode: temp2.map(i => i.wkshp_code).join(',') })
+ for (const res4Key in res4.data.LeftTop) {
+ const data = {
+ good_qty: 0,
+ plan_qty: 0,
+ wkshp_code: '',
+ wkshp_name: ''
+ }
+ data.good_qty = res4.data.LeftTop[res4Key][0].good_qty
+ data.plan_qty = res4.data.LeftTop[res4Key][0].plan_qty
+ data.wkshp_code = res4.data.LeftTop[res4Key][0].wkshp_code
+ data.wkshp_name = temp2.find(i => i.wkshp_code === data.wkshp_code).wkshp_name
+ this.LeftBottomData01.push(data)
}
- },
+ setInterval(() => {
+ WorkShopCompreLeftTop({ wkshopcode: temp2.map(i => i.wkshp_code).join(',') }).then(res2 => {
+ this.LeftBottomData01 = []
+ this.LeftBottomData02 = []
+ for (const res4Key in res4.data.LeftTop) {
+ const data = {
+ good_qty: 0,
+ plan_qty: 0,
+ wkshp_code: '',
+ wkshp_name: ''
+ }
+
+ data.good_qty = res2.data.LeftTop[res4Key][0].good_qty
+ data.plan_qty = res2.data.LeftTop[res4Key][0].plan_qty
+ data.wkshp_code = res2.data.LeftTop[res4Key][0].wkshp_code
+ data.wkshp_name = temp2.find(i => i.wkshp_code === data.wkshp_code).wkshp_name
+ this.LeftBottomData01.push(data)
+ }
+ })
+ }, 1000 * 30)
+
+ // 鍙充笅 浠撳簱搴撳瓨
+ const res5 = await WorkShopCompreRightBottom()
+ this.RightBottom = res5.data
+
+ setInterval(() => {
+ WorkShopCompreRightBottom().then(res5 => {
+ this.RightBottom = res5.data
+ })
+ }, 1000 * 60)
+ },
// 鑾峰彇褰撳墠鏃堕棿
getNowTime() {
const dt = new Date()
@@ -250,23 +339,25 @@
this.headTime = `${y}-${m}-${d} ${hh}:${mm}:${ss} ${week}`
},
-
- // 涓や釜鏁扮粍鍋氬姣�
- compareArrays(arr1, arr2) {
- const set1 = new Set(arr1)
- const set2 = new Set(arr2)
-
- if (set1.size !== set2.size) {
- return false
+ headerCellStyle() {
+ return {
+ backgroundColor: 'transparent ',
+ padding: '10px 0',
+ textAlign: 'center',
+ color: '#07acc2',
+ border: 'none',
+ fontSize: '20px'
}
-
- for (const value of set1) {
- if (!set2.has(value)) {
- return false
- }
+ },
+ cellStyle() {
+ return {
+ padding: '7px 0',
+ textAlign: 'center',
+ backgroundColor: 'transparent ',
+ color: '#c7e7ff',
+ border: 'none',
+ fontSize: '20px'
}
-
- return true
}
}
@@ -275,13 +366,120 @@
</script>
<style lang="scss" scoped>
-
-::v-deep .header-item {
- font-size: 16px !important;
+$main_color: #09d8f2;
+$color01: #00FFFF;
+.tableData {
+ background: transparent;
}
-::v-deep .row-item {
- font-size: 16px !important;
+.el-table::before {
+ height: 0;
}
+.el-table__empty-text {
+ color: $main_color;
+}
+
+.tableDataCell {
+ ::v-deep .cell {
+ padding: 0 2px;
+ }
+}
+
+::v-deep .el-table__body-wrapper::-webkit-scrollbar {
+ /* width: 0;瀹藉害涓�0鏆楄棌 */
+ width: 0;
+ background: transparent;
+}
+
+::v-deep .el-table th,
+::v-deep .el-table tr,
+::v-deep .el-table td {
+ background-color: transparent;
+}
+
+.all_block01 {
+ width: 187px;
+ height: 180px;
+}
+
+.all_block02 {
+ width: 100%;
+ height: 49px;
+ background: rgba(9, 216, 242, 0.1);
+}
+
+.all_block03 {
+ width: 199px;
+ height: 180px;
+}
+
+.all_block04 {
+ width: 100%;
+ height: 49px;
+ background: rgba(9, 216, 242, 0.1);
+}
+
+.kb_center_block_children {
+ height: 180px;
+ //border: 1px solid $kbBorderColor;
+ width: 240px;
+ display: flex;
+ z-index: 2;
+ justify-content: space-around;
+ align-items: center;
+ flex-direction: column;
+ margin: 10px;
+ font-size: 22px;
+
+ .box02 {
+ background: url("../../assets/images/box02.png") no-repeat;
+ transform: scale(1.5);
+ width: 145px;
+ height: 84px;
+
+ }
+}
+
+.all_block05 {
+ position: absolute;
+ animation: upDown 3s ease-in-out infinite;
+ left: 170px;
+}
+
+//.all_block06 {
+// position: absolute;
+// animation: upDown2 3s ease-in-out infinite;
+// left: 320px;
+//}
+
+.all_block07 {
+ position: absolute;
+ animation: upDown2 3s ease-in-out infinite;
+ left: 470px;
+}
+
+@keyframes upDown {
+ 0% {
+ top: 50px;
+ }
+ 50% {
+ top: 100px;
+ }
+ 100% {
+ top: 50px;
+ }
+}
+
+@keyframes upDown2 {
+ 0% {
+ top: 100px;
+ }
+ 50% {
+ top: 50px;
+ }
+ 100% {
+ top: 100px;
+ }
+}
</style>
--
Gitblit v1.9.3