From 889d80d88abd7b4a60846678624f4b976c15f820 Mon Sep 17 00:00:00 2001 From: 小小儁爺 <1694218219@qq.com> Date: 星期五, 13 六月 2025 09:07:36 +0800 Subject: [PATCH] 1.新增判断:当不良数量为零时,合格数量不能为零 --- src/views/kanbanManager/zhkb.vue | 116 ++++++---------------------------------------------------- 1 files changed, 12 insertions(+), 104 deletions(-) diff --git a/src/views/kanbanManager/zhkb.vue b/src/views/kanbanManager/zhkb.vue index 6563c7d..6f9041a 100644 --- a/src/views/kanbanManager/zhkb.vue +++ b/src/views/kanbanManager/zhkb.vue @@ -90,49 +90,13 @@ <div style="width: 925px;"> <div class="smallTitle"> <svg-icon icon-class="cxjg" class="svg_class" /> - 鐢熶骇璁㈠崟(褰撴湀) + 鍔犲伐宸ュ簭(杩�60澶�) </div> <div class="lineContent horn" style="height: 380px;display: flex;flex-direction: column;justify-content: space-between" > - <div style="height: 180px;padding: 10px;display: flex;justify-content: space-evenly"> - <div v-for="i in LeftBottomData01" :key="i.wkshp_code" class="flex_c_s"> - <div class="all_block01 flex_c_s" style="width: 275px;"> - <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: 180px;padding: 10px;display: flex;justify-content: space-evenly"> - <div v-for="i in LeftBottomData02" :key="i.wkshp_code" class="flex_c_s"> - <div class="all_block01 flex_c_s" style="width: 275px;"> - <div class="flex_c_c all_block02" style=" background: rgba(9, 216, 242, 0.2);">{{ i.wkshp_name }}</div> - <div class="" style="display: flex;justify-content:space-between"> - <div class="all_block02 flex_c_c" style="width: 49% ;background: rgba(9, 216, 242, 0.2)">浠诲姟鏁�</div> - <div class="all_block02 flex_c_c" style="width: 49% ;background: rgba(9, 216, 242, 0.2)">{{ i.plan_qty }}</div> - </div> - <div class="" style="display: flex;justify-content:space-between"> - <div class="all_block02 flex_c_c" style="width: 49% ;background: rgba(9, 216, 242, 0.2)">鍏ュ簱鏁�</div> - <div class="all_block02 flex_c_c" style="width: 49% ;background: rgba(9, 216, 242, 0.2)">{{ i.quantity }}</div> - </div> - </div> - </div> - - </div> - - <!-- <div style="height: 260px;">--> - <!-- <div id="all01" class="flex_c_c" style="width: 100%;height:100%;" />--> - <!-- </div>--> + <div id="bar3" class="flex_c_c" style="width: 100%;height:100%;" /> </div> </div> <div style="width: 925px;"> @@ -169,9 +133,13 @@ <script> import './kbCommon.css' -import { loadEcharts, all02, all03 } from '@/utils/myEcharts' +import { loadEcharts, all02, bar3 } from '@/utils/myEcharts' import { - WorkShopCompreLeftBottom, WorkShopCompreLeftTop, WorkShopCompreRightBottom, WorkShopCompreRightTop + WorkShopCompreLeftBottom, + WorkShopCompreLeftTop, + WorkShopCompreLeftTopCopy, + WorkShopCompreRightBottom, + WorkShopCompreRightTop } from '@/api/kanbanManager' export default { @@ -304,72 +272,12 @@ }, 1000 * 40) // 宸︿笅 鐢熶骇璁㈠崟 - const res4 = await WorkShopCompreLeftTop({ wkshopcode: temp.join(',') }) - for (const res4Key in res4.data.LeftTop) { - const data = { - good_qty: 0, - plan_qty: 0, - wkshp_code: '', - wkshp_name: '' - } - if (temp.includes(res4Key)) { - 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 = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name - this.LeftBottomData01.push(data) - } - } - for (const res4Key in res4.data.LeftBottom) { - const data = { - quantity: 0, - wkshp_code: '', - wkshp_name: '' - } - if (temp.includes(res4Key)) { - data.quantity = res4.data.LeftBottom[res4Key][0].quantity - data.plan_qty = res4.data.LeftBottom[res4Key][0].plan_qty - data.wkshp_code = res4.data.LeftBottom[res4Key][0].wkshp_code - data.wkshp_name = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name - this.LeftBottomData02.push(data) - } - } - // loadEcharts('all01', all03(this.legendData, this.LeftBottomData02)) + const res4 = await WorkShopCompreLeftTopCopy() + loadEcharts('bar3', bar3(res4.data)) setInterval(() => { - WorkShopCompreLeftTop({ wkshopcode: temp.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: '' - } - if (temp.includes(res4Key)) { - 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 = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name - this.LeftBottomData01.push(data) - } - } - for (const res4Key in res2.data.LeftBottom) { - const data = { - quantity: 0, - wkshp_code: '', - wkshp_name: '' - } - if (temp.includes(res4Key)) { - data.quantity = res2.data.LeftBottom[res4Key][0].quantity - data.plan_qty = res2.data.LeftBottom[res4Key][0].plan_qty - data.wkshp_code = res2.data.LeftBottom[res4Key][0].wkshp_code - data.wkshp_name = this.wkshopArr.find(i => i.org_code === data.wkshp_code).org_name - this.LeftBottomData02.push(data) - } - } - // loadEcharts('all01', all03(this.legendData, this.LeftBottomData02)) + WorkShopCompreLeftTopCopy().then(res4 => { + loadEcharts('bar3', bar3(res4.data)) }) }, 1000 * 30) -- Gitblit v1.9.3