首页库存、生产进度更改

This commit is contained in:
shijing 2024-02-22 09:10:00 +08:00
parent 5401d07003
commit 688b3b82fe
1 changed files with 215 additions and 193 deletions

View File

@ -99,7 +99,8 @@
</div>
</div>
<div class="middleItem" style="display: flex;">
<el-progress type="circle" :stroke-width="15" :show-text="false" :percentage="monthPassRate10" />
<el-progress type="circle" :stroke-width="15" :show-text="false"
:percentage="monthPassRate10" />
<div style="margin-left: 20px;">
<div class="countname">预制管合格率</div>
<p class="countnum" style="line-height: 82px">{{ monthPassRate10 }}%</p>
@ -135,7 +136,7 @@
<div style="padding: 20px 24px 0 24px;background: #ffffff;">
<div class="bottomItem">
<div class="countname">本月计划完成度</div>
<p class="countnum">99%</p>
<p class="countnum">{{ hgNumber }}%</p>
<!-- <p class="countrate">同比上周<span class="redColor"> 8.63%</span> 月同比6.47%</p> -->
<div id="barCharts" style="width: 100%;height: 218px;"></div>
</div>
@ -149,6 +150,13 @@
<div style="display: flex;justify-content: space-between;padding: 0 24px;">
<div style="color: rgb(30, 30, 30);font-size: 16px;font-weight: 400;line-height: 24px;">库存情况
</div>
<div
style="color: rgb(122, 121, 121);size: 12px;font-weight: 290;line-height: 22px;height:23px">
<el-radio-group v-model="materialType" @change="materialTypeChange">
<el-radio label="20">半成品</el-radio>
<el-radio label="10">成品</el-radio>
</el-radio-group>
</div>
</div>
<div style="padding: 20px 24px 24px 24px;">
<el-table :data="tableData" style="width: 100%;height: 293px;">
@ -215,10 +223,14 @@
<el-table-column prop="belong_dept_name" label="所在车间" />
<el-table-column prop="state" label="设备状态">
<template #default="scope">
<el-tag class="ml-2" type="success" v-if="scope.row.state==10">{{ eqState_[scope.row.state] }}</el-tag>
<el-tag class="ml-2" type="warning" v-if="scope.row.state==20">{{ eqState_[scope.row.state] }}</el-tag>
<el-tag class="ml-2" type="info" v-if="scope.row.state==30">{{ eqState_[scope.row.state] }}</el-tag>
<el-tag class="ml-2" type="danger" v-if="scope.row.state==40">{{ eqState_[scope.row.state] }}</el-tag>
<el-tag class="ml-2" type="success" v-if="scope.row.state == 10">{{
eqState_[scope.row.state] }}</el-tag>
<el-tag class="ml-2" type="warning" v-if="scope.row.state == 20">{{
eqState_[scope.row.state] }}</el-tag>
<el-tag class="ml-2" type="info" v-if="scope.row.state == 30">{{
eqState_[scope.row.state] }}</el-tag>
<el-tag class="ml-2" type="danger" v-if="scope.row.state == 40">{{
eqState_[scope.row.state] }}</el-tag>
</template>
</el-table-column>
@ -255,6 +267,7 @@ export default {
day_s: '',
month_s: '',
deptName: '10车间',
materialType: '20',
yesterday: '',
yesterdayBefore: '',
yearData: [],
@ -289,7 +302,7 @@ export default {
AVGDelivertongbi: 0,
monthRateAVG: 0,
monthPayNumAVG: 0,
hgNumber: 0,
option: {
tooltip: {
trigger: 'axis',
@ -381,9 +394,14 @@ export default {
this.equipList = res
})
},
materialTypeChange() {
this.getMaterialList();
},
//
getMaterialList() {
this.$API.mtm.material.list.req({ page: 0, type: 10 }).then(res => {
this.tableData = res.filter(item=>{
let that = this;
that.$API.mtm.material.list.req({ page: 0, type: that.materialType }).then(res => {
that.tableData = res.filter(item => {
return item.count > 0;
});
console.log('getMaterialList', res)
@ -588,16 +606,20 @@ export default {
that.$API.bi.dataset.exec.req('productStatistic', obj).then((res) => {
console.log('productStatistic:', res);
let list = res.data2.ds0;
let chartData = [],xAxisData=[];
let chartData = [], xAxisData = [], hgNumber = 0;
for (let i = 0; i < that.day_s; i++) {
let dindex = i + 1;
xAxisData.push(dindex + '日')
for (let j = 0; j < list.length; j++) {
if (list[j]. == i) {
chartData[i]=Math.round((list[j].合格数/list[j].任务数)*100) ;
chartData[i] = list[j].合格数;
if (list[j].合格数 >= list[j].任务数) {
hgNumber++;
}
}
}
}
this.hgNumber = ((hgNumber / xAxisData.length) * 100).toFixed(2);
this.chartData = chartData;
this.option.xAxis.data = xAxisData;
this.option.series.data = chartData;