feat:修改 能源统计表
This commit is contained in:
parent
a831c17838
commit
5911d1f13b
|
@ -376,6 +376,7 @@ export default {
|
|||
dataLoop() {
|
||||
let that = this;
|
||||
that.tableDatas = [];
|
||||
that.tableDatas2 = [];
|
||||
let _mgroup = [],
|
||||
_nameLength = [],
|
||||
indexList = [];
|
||||
|
@ -414,6 +415,7 @@ export default {
|
|||
? item.nickname
|
||||
: item.name;
|
||||
obj.unit = item.unit;
|
||||
|
||||
that.tableDatas2.push(obj);
|
||||
that.getData(item.id, index);
|
||||
});
|
||||
|
|
|
@ -404,6 +404,7 @@ export default {
|
|||
dataLoop() {
|
||||
let that = this;
|
||||
that.tableDatas = [];
|
||||
that.tableDatas2 = [];
|
||||
let _mgroup = [],
|
||||
_nameLength = [],
|
||||
indexList = [];
|
||||
|
|
|
@ -357,6 +357,7 @@ export default {
|
|||
dataLoop() {
|
||||
let that = this;
|
||||
that.tableDatas = [];
|
||||
that.tableDatas2 = [];
|
||||
let _mgroup = [],
|
||||
_nameLength = [],
|
||||
indexList = [];
|
||||
|
|
|
@ -160,9 +160,9 @@ export default {
|
|||
}
|
||||
if (tValue6 !== "/" && tValue6 !== 0 && wrapArr2[i].en_consume_unit !== 0) {
|
||||
tPercent6 =
|
||||
((wrapArr2[i].en_consume_unit - tValue6) /
|
||||
(((wrapArr2[i].en_consume_unit - tValue6) /
|
||||
tValue6) *
|
||||
100;
|
||||
100).toFixed(2);
|
||||
} else {
|
||||
tPercent6 = "/";
|
||||
}
|
||||
|
@ -174,9 +174,8 @@ export default {
|
|||
: "/";
|
||||
if (hValue6 !== "/" && hValue6 !== 0) {
|
||||
hPercent6 =
|
||||
((wrapArr2[i].en_consume_unit - hValue6) /
|
||||
hValue6) *
|
||||
100;
|
||||
(((wrapArr2[i].en_consume_unit - hValue6) /
|
||||
hValue6) * 100).toFixed(2);
|
||||
} else {
|
||||
hPercent6 = "/";
|
||||
}
|
||||
|
@ -202,10 +201,10 @@ export default {
|
|||
};
|
||||
if (tValue9 !== "/" && tValue9 !== 0) {
|
||||
tPercent9 =
|
||||
((wrapArr2[i].en_add_consume_unit -
|
||||
(((wrapArr2[i].en_add_consume_unit -
|
||||
tValue9) /
|
||||
tValue9) *
|
||||
100;
|
||||
100).toFixed(2);
|
||||
} else {
|
||||
tPercent9 = "/";
|
||||
};
|
||||
|
@ -217,10 +216,10 @@ export default {
|
|||
: "/";
|
||||
if (hValue9 !== "/" && hValue9 !== 0) {
|
||||
hPercent9 =
|
||||
((wrapArr2[i].en_add_consume_unit -
|
||||
(((wrapArr2[i].en_add_consume_unit -
|
||||
hValue9) /
|
||||
hValue9) *
|
||||
100;
|
||||
100).toFixed(2);
|
||||
} else {
|
||||
hPercent9 = "/";
|
||||
};
|
||||
|
|
|
@ -345,7 +345,7 @@ export default {
|
|||
: "/";
|
||||
}
|
||||
if (arrs[1] !== "/" && lastNum !== "/") {
|
||||
lastDiff = arrs[1] - lastNum;
|
||||
lastDiff = (arrs[1] - lastNum).toFixed(2);
|
||||
} else {
|
||||
lastDiff = "/";
|
||||
}
|
||||
|
@ -357,7 +357,7 @@ export default {
|
|||
lastNum !== "/" &&
|
||||
lastNum !== 0
|
||||
) {
|
||||
lastRate = (lastDiff / lastNum) * 100;
|
||||
lastRate = ((lastDiff / lastNum) * 100).toFixed(2);
|
||||
} else {
|
||||
lastRate = "/";
|
||||
}
|
||||
|
@ -419,7 +419,7 @@ export default {
|
|||
lastNum2 !== "/" &&
|
||||
lastNum2 !== 0
|
||||
) {
|
||||
lastRate2 = (lastDiff2 / lastNum2) * 100;
|
||||
lastRate2 = ((lastDiff2 / lastNum2) * 100).toFixed(2);
|
||||
} else {
|
||||
lastRate2 = "/";
|
||||
}
|
||||
|
|
|
@ -77,7 +77,7 @@
|
|||
min-width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="单位成本"
|
||||
label="单位成本(元/吨)"
|
||||
prop="cost_unit"
|
||||
min-width="150"
|
||||
></el-table-column>
|
||||
|
|
|
@ -256,7 +256,7 @@ export default {
|
|||
let lastDiff = 0;
|
||||
|
||||
if (arrs[1] !== "/" && arrs[4] !== "/") {
|
||||
lastDiff = arrs[1] - arrs[4];
|
||||
lastDiff = (arrs[1] - arrs[4]).toFixed(2);
|
||||
} else {
|
||||
lastDiff = "/";
|
||||
}
|
||||
|
|
|
@ -41,22 +41,22 @@
|
|||
<!-- <th rowspan="3">总成本(元)</th> -->
|
||||
<th rowspan="3">单位成本(元/吨)</th>
|
||||
<th :colspan="materialList.length">直接材料</th>
|
||||
<th colspan="2">直接人工</th>
|
||||
<th colspan="8">制造费用</th>
|
||||
<th colspan="10">制造费用</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th v-if="data1 > 0" :colspan="data1">原材料</th>
|
||||
<th v-if="data3 > 0" :colspan="data3">辅助材料</th>
|
||||
<th v-if="data2 > 0" :colspan="data2">电/水</th>
|
||||
<th>车间人员工资</th>
|
||||
<th>劳务工资</th>
|
||||
<th>倒运费用</th>
|
||||
<th>材料出库</th>
|
||||
<th colspan="2">维修费用</th>
|
||||
<th>装卸费</th>
|
||||
<th>差旅费</th>
|
||||
<th>折旧</th>
|
||||
<th>摊销</th>
|
||||
<th>职工薪酬</th>
|
||||
<th>其他费用</th>
|
||||
<th>折旧</th>
|
||||
<th>差旅费</th>
|
||||
<th>装卸费</th>
|
||||
<th>修理费</th>
|
||||
<th>材料出库</th>
|
||||
<th>倒运费用</th>
|
||||
<th>直接人工</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th v-for="(item, index) in materialList" :key="index">{{ item }}</th>
|
||||
|
@ -64,12 +64,12 @@
|
|||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>检修单位成本(元/吨)</th>
|
||||
<th>外协施工费用单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>无形资产摊销单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item, index) in tableData1" :key="index">
|
||||
|
@ -209,16 +209,20 @@ export default {
|
|||
// Skip adding item details to arr for "湿电石渣进厂"
|
||||
return;
|
||||
}
|
||||
if (item.material_name === "入磨原煤" || item.material_name === "蒸汽" ) {
|
||||
return;
|
||||
}
|
||||
if (item.material_type == 30 || item.material_type == 20) {//原材料
|
||||
that.data1 = that.data1 + 4;
|
||||
} else if (item.material_type == 40) {//辅助材料
|
||||
that.data3 = that.data3 + 4;
|
||||
}
|
||||
let materialName = item.material_name
|
||||
|
||||
if (materialName === "入窑生料") {
|
||||
materialName = "生料";
|
||||
} else if (materialName === "入窑煤粉") {
|
||||
materialName = "原煤";
|
||||
materialName = "入磨原煤";
|
||||
}
|
||||
arr.push(materialName)
|
||||
arr.push('单价(元/吨)')
|
||||
|
@ -267,12 +271,16 @@ export default {
|
|||
for (let i = 0; i < sub1data.length; i++) {
|
||||
if (sub1data[i].material_name === '湿电石渣进厂'|| sub1data[i].material_name === '动力电'|| sub1data[i].material_name === '工业水'){
|
||||
continue;
|
||||
}
|
||||
} else if (sub1data[i].material_name === '入磨原煤'|| sub1data[i].material_name === '蒸汽'){
|
||||
continue;
|
||||
};
|
||||
|
||||
dataArr.push((sub1data[i].amount_consume).toFixed(2))
|
||||
dataArr.push((sub1data[i].price_unit).toFixed(2))
|
||||
dataArr.push((sub1data[i].cost).toFixed(2))
|
||||
dataArr.push((sub1data[i].cost_unit).toFixed(2))
|
||||
}
|
||||
|
||||
for (let i = 0; i < sub1data.length; i++) {
|
||||
if (sub1data[i].material_name == '动力电') {
|
||||
dataArr.push((sub1data[i].amount_consume).toFixed(2));
|
||||
|
|
|
@ -68,7 +68,6 @@
|
|||
></el-table-column>
|
||||
<el-table-column
|
||||
label="异常类别"
|
||||
prop="duration"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.is_shutdown"
|
||||
|
@ -102,9 +101,12 @@
|
|||
prop="measure"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="停机时长"
|
||||
prop="duration"
|
||||
></el-table-column>
|
||||
label="停机时长(h)"
|
||||
>
|
||||
<template #default="scope">
|
||||
<span>{{Number((scope.row.duration_sec/3600).toFixed(2))}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<el-aside width="600px">
|
||||
|
|
|
@ -461,9 +461,11 @@
|
|||
prop="measure"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
label="停机时长(s)"
|
||||
prop="duration_sec"
|
||||
></el-table-column>
|
||||
label="停机时长(h)">
|
||||
<template #default="scope">
|
||||
<span>{{Number((scope.row.duration_sec/3600).toFixed(2))}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
fixed="right"
|
||||
|
|
Loading…
Reference in New Issue