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 | 149 +++++++++---------------------------------------- 1 files changed, 29 insertions(+), 120 deletions(-) diff --git a/src/views/kanbanManager/zhkb.vue b/src/views/kanbanManager/zhkb.vue index cf34a0f..6f9041a 100644 --- a/src/views/kanbanManager/zhkb.vue +++ b/src/views/kanbanManager/zhkb.vue @@ -6,11 +6,11 @@ <div class="kb_header"> <div class="kb_headTime" style="top: 35px;left: 20px"> - <span>姘稿悍甯傛ˉ涓嬪鏂欏巶</span> + <span>姘稿悍甯傛柊鍏夌伅鍏锋湁闄愬叕鍙�</span> </div> <div class="kb_headTime kb_header_text" style="top: 35px;left: 800px"> - <span>妗ヤ笅缁煎悎鏁板瓧鍖栫湅鏉�</span> + <span>杞﹂棿缁煎悎鏁板瓧鍖栫湅鏉�</span> </div> <div class="kb_headTime" style="top: 35px;right: 25px"> @@ -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;"> @@ -147,11 +111,11 @@ <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_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" /> @@ -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 { @@ -211,8 +179,9 @@ async getAllApi() { // const { data: res } = await ShopSearch() const res = [ - { org_code: '101', org_name: '鍙戞场杞﹂棿' }, - { org_code: '102', org_name: '鎸ゅ嚭杞﹂棿' } + { org_code: '1501', org_name: '鏈ㄦ枡杞﹂棿' }, + { org_code: '1502', org_name: '瑁呴厤杞﹂棿' }, + { org_code: '1503', org_name: '鍘嬮摳杞﹂棿' } ] this.wkshopArr = res @@ -303,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) @@ -518,19 +427,19 @@ .all_block05 { position: absolute; animation: upDown 3s ease-in-out infinite; - left: 140px; + left: 60px; } -//.all_block06 { -// position: absolute; -// animation: upDown2 3s ease-in-out infinite; -// left: 320px; -//} +.all_block06 { + position: absolute; + animation: upDown2 3s ease-in-out infinite; + left: 290px; +} .all_block07 { position: absolute; animation: upDown 3s ease-in-out infinite; - left: 500px; + left: 520px; } @keyframes upDown { -- Gitblit v1.9.3