车间库存
- INVENTORY
@@ -175,6 +192,8 @@ export default {
rhgs: 0,
rbhgs: 0,
rhgl: 0,
+ rztls: 0,
+ rlzls: 0,
},
dayInterval: null,
chartInterval2: null,
@@ -190,6 +209,17 @@ export default {
data: [],
waitTime: 1500,
},
+ configDataProcess: {
+ headerBGC: 'rgba(0, 229, 255, 0.16)',
+ oddRowBGC: 'rgba(0, 229, 255, 0.04)',
+ evenRowBGC: 'rgba(0, 229, 255, 0.10)',
+ header: ['物料名', '数量(个)'],
+ headerHeight: 38,
+ rowNum: 8,
+ align: 'center',
+ columnWidth: [],
+ data: []
+ },
//设备
configDataEq: {
headerBGC: 'rgba(0, 229, 255, 0.16)',
@@ -232,6 +262,13 @@ export default {
that.configDataInm.data = [];
//表格table的高度
this.tableHeight = document.getElementById("scrollContainer").clientHeight;
+ this.$nextTick(() => {
+ const box = this.$refs.processBox;
+ if (box) {
+ const w = box.clientWidth - 16;
+ this.configDataProcess.columnWidth = [Math.max(50, w - 100), 100];
+ }
+ });
this.showTime();
this.dayInterval = setInterval(() => {
this.showTime();
@@ -272,6 +309,7 @@ export default {
this.getMaterials(that.page);
this.getProductLine();
this.getCountnotok();
+ this.getProcessLeft();
})
});
},
@@ -312,6 +350,23 @@ export default {
}, 500);
return myChart;
},
+ getProcessLeft() {
+ let that = this;
+ let obj = {
+ query: { mgroup_name: that.mgroupName },
+ };
+ that.$API.bi.dataset.exec.req("mgroup_yuliao", obj).then((res) => {
+ let list = res.data2.ds0;
+ if (list.length > 0) {
+ list.forEach((item) => {
+ let arr = [];
+ arr[0] = item.物料名+'('+item.状态+')';
+ arr[1] = item.数量;
+ that.configDataProcess.data.push(arr);
+ })
+ }
+ })
+ },
//生产统计
getProductLine() {
let that = this;
@@ -324,12 +379,10 @@ export default {
list.forEach((item) => {
let dateYes = that.yesterday.split('-')[2];
if (item.日 == dateYes) {
- that.sctj.rtcs = item.总重量;
- that.sctj.rjgs = item.生产数;
- that.sctj.rjgqbls = item.生产数 - item.不合格数 - item.合格数;
- that.sctj.rhgs = item.合格数;
- that.sctj.rbhgs = item.不合格数;
- that.sctj.rhgl = Number((item.合格率).toFixed(2));
+ that.sctj.rjgs += item.生产数;
+ that.sctj.rjgqbls += item.加工前不良;
+ that.sctj.rhgs += item.合格数;
+ that.sctj.rbhgs += item.不合格数;
}
let arr = [];
arr[0] = item.年 + '-' + item.月 + '-' + item.日;
@@ -340,6 +393,9 @@ export default {
arr[5] = item.交送数;
that.configDatas.data.push(arr);
});
+ that.sctj.rhgl = Number((that.sctj.rhgs / that.sctj.rjgs * 100).toFixed(2));
+ let total = that.sctj.rjgs+that.sctj.rjgqbls;
+ that.sctj.rztls = Number((that.sctj.rhgs / total * 100).toFixed(2));
}
});
},
@@ -600,7 +656,7 @@ export default {
/* ============= KPI Strip ============= */
.kpi-row {
display: grid;
- grid-template-columns: repeat(5, 1fr);
+ grid-template-columns: repeat(6, 1fr);
gap: 10px;
flex: 0 0 92px;
min-height: 0;