fix:光子库存检验导出

This commit is contained in:
shijing 2024-07-18 16:40:08 +08:00
parent ca7a62fbbc
commit d524063ea1
3 changed files with 168 additions and 133 deletions

View File

@ -2,7 +2,7 @@
<div class="container"> <div class="container">
<header class="pageHeader"> <header class="pageHeader">
<span class="top-line top-line-left"></span> <span class="top-line top-line-left"></span>
凌源特种水泥数智化管控平台 {{ bigScreenName }}
<span class="top-line top-line-right"></span> <span class="top-line top-line-right"></span>
</header> </header>
<div id="model" class="model"> <div id="model" class="model">
@ -19,7 +19,7 @@
<div class="totalNumContnier"> <div class="totalNumContnier">
<div class="totalNumWrap totalNum_orange"> <div class="totalNumWrap totalNum_orange">
<img class="" src="img/number_bg_orange.png" /> <img class="" src="img/number_bg_orange.png" />
<span class="totalNumText">熟料产量</span> <span class="totalNumText">产量</span>
<div class="totalNumber"> <div class="totalNumber">
{{ totalData.total_production }} {{ totalData.total_production }}
</div> </div>
@ -33,7 +33,7 @@
</div> </div>
<div class="totalNumWrap totalNum_blue"> <div class="totalNumWrap totalNum_blue">
<img src="img/number_bg_blue.png" /> <img src="img/number_bg_blue.png" />
<span class="totalNumText">吨熟料综合电耗</span> <span class="totalNumText">综合电耗</span>
<div class="totalNumber"> <div class="totalNumber">
{{ totalData.celec_consume_unit }} {{ totalData.celec_consume_unit }}
</div> </div>
@ -75,7 +75,7 @@
<div class="flexItem"> <div class="flexItem">
<div class="itemTitle"> <div class="itemTitle">
<div class="itemTitleIcon"></div> <div class="itemTitleIcon"></div>
<div>熟料产量</div> <div>产量</div>
</div> </div>
<div class="itemBody" id="line1"></div> <div class="itemBody" id="line1"></div>
</div> </div>
@ -215,14 +215,14 @@
<div class="itemTitle"> <div class="itemTitle">
<div class="itemTitleIcon"></div> <div class="itemTitleIcon"></div>
<div>质量分析</div> <div>质量分析</div>
<el-radio-group v-model="deptName"> <!-- <el-radio-group v-model="deptName">
<el-radio label="入窑生料" class="elRadio" <el-radio label="入窑生料" class="elRadio"
>入窑生料</el-radio >入窑生料</el-radio
> >
<el-radio label="出磨熟料" class="elRadio" <el-radio label="出磨熟料" class="elRadio"
>出磨熟料</el-radio >出磨熟料</el-radio
> >
</el-radio-group> </el-radio-group> -->
</div> </div>
<div class="itemBody" id="line3"></div> <div class="itemBody" id="line3"></div>
</div> </div>
@ -252,7 +252,7 @@
</div> </div>
<div class="elecItem"> <div class="elecItem">
<div class="elecItem_wrap"> <div class="elecItem_wrap">
<span>吨熟料发电量</span> <span>发电量</span>
<p class="elec_number"> <p class="elec_number">
{{ hotData.production_elec_unit }} {{ hotData.production_elec_unit }}
<span class="elec_unit">kwh</span> <span class="elec_unit">kwh</span>
@ -630,7 +630,8 @@ export default {
}, },
mounted() { mounted() {
let that = this; let that = this;
that.factoryName = that.$TOOL.data.get("BASE_INFO").base.base_name; that.bigScreenName =
that.$TOOL.data.get("BASE_INFO").base.bigScreen_name;
that.showTime(); that.showTime();
that.addListener(); that.addListener();
// //
@ -744,30 +745,30 @@ export default {
let chartDom = document.getElementById("line1"); let chartDom = document.getElementById("line1");
let myChart = echarts.init(chartDom); let myChart = echarts.init(chartDom);
option1.legend.data = [ option1.legend.data = [
{ // {
name: "熟料", // name: "",
textStyle: { // textStyle: {
color: "#fff", // color: "#fff",
}, // },
borderRadius: 2, // borderRadius: 2,
itemStyle: { // itemStyle: {
color: that.linearGradientColors[0], // color: that.linearGradientColors[0],
}, // },
}, // },
{ // {
name: "特种熟料", // name: "",
textStyle: { // textStyle: {
color: "#fff", // color: "#fff",
}, // },
borderRadius: 2, // borderRadius: 2,
itemStyle: { // itemStyle: {
color: that.linearGradientColors[1], // color: that.linearGradientColors[1],
}, // },
}, // },
]; ];
option1.series = [ option1.series = [
{ {
name: "熟料", name: "",
type: "line", type: "line",
stack: "Total", stack: "Total",
smooth: true, smooth: true,
@ -785,7 +786,7 @@ export default {
data: seriesData, data: seriesData,
}, },
{ {
name: "特种熟料", name: "",
type: "line", type: "line",
stack: "Total", stack: "Total",
smooth: true, smooth: true,
@ -1484,7 +1485,7 @@ export default {
value: res[0].run_rate, value: res[0].run_rate,
}, },
{ {
label: "吨熟料发电量(kwh/t)", label: "发电量(kwh/t)",
field: "production_elec_unit", field: "production_elec_unit",
value: res[0].production_elec_unit value: res[0].production_elec_unit
? res[0].production_elec_unit ? res[0].production_elec_unit

View File

@ -1,19 +1,53 @@
<template> <template>
<el-container> <el-container>
<el-header> <el-header>
<div class="left-panel"> <div class="left-panel"></div>
</div>
<div class="right-panel"> <div class="right-panel">
<el-date-picker v-model="query.test_date" type="date" placeholder="选择日期" value-format="YYYY-MM-DD" /> <el-date-picker
<el-button type="primary" icon="el-icon-search" @click="handleQuery">查询</el-button> v-model="query.test_date"
type="date"
placeholder="选择日期"
value-format="YYYY-MM-DD"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
>查询</el-button
>
<el-button
type="primary"
icon="el-icon-download"
@click="tableExport"
v-loading="exportLoading"
>导出</el-button
>
</div> </div>
</el-header> </el-header>
<el-main class="nopadding"> <el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="params" :query="query"> <scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
:params="params"
:query="query"
id="myTable"
>
<el-table-column type="index" width="50" /> <el-table-column type="index" width="50" />
<el-table-column label="物料名称" prop="material_name" show-overflow-tooltip min-width="100"> <el-table-column
label="物料名称"
prop="material_name"
show-overflow-tooltip
min-width="100"
>
</el-table-column> </el-table-column>
<el-table-column label="编号" prop="batch" show-overflow-tooltip min-width="100"> <el-table-column
label="编号"
prop="batch"
show-overflow-tooltip
min-width="100"
>
</el-table-column> </el-table-column>
<el-table-column label="抽样数量" prop="count"> <el-table-column label="抽样数量" prop="count">
</el-table-column> </el-table-column>
@ -48,7 +82,9 @@
</el-table-column> </el-table-column>
<el-table-column label="检测结果" prop="is_testok"> <el-table-column label="检测结果" prop="is_testok">
<template #default="scope"> <template #default="scope">
<el-tag type="success" v-if="scope.row.is_testok">合格</el-tag> <el-tag type="success" v-if="scope.row.is_testok"
>合格</el-tag
>
<el-tag type="danger" v-else>不合格</el-tag> <el-tag type="danger" v-else>不合格</el-tag>
</template> </template>
</el-table-column> </el-table-column>
@ -68,31 +104,36 @@ export default {
apiObj: this.$API.inm.mioitem.list, apiObj: this.$API.inm.mioitem.list,
query: { query: {
page: 1, page: 1,
page_size: 20 page_size: 20,
}, },
params: { params: {
page: 1, page: 1,
page_size: 20, page_size: 20,
mio__state: 20, mio__state: 20,
mio__type: 'do_in', mio__type: "do_in",
test_date__isnull:0 test_date__isnull: 0,
}, },
selection: [], selection: [],
state_: { state_: {
10: '', 10: "",
20: '', 20: "",
}, },
exportLoading: false,
}; };
}, },
mounted() { mounted() {},
},
methods: { methods: {
handleQuery() { handleQuery() {
this.$refs.table.queryData(this.query) this.$refs.table.queryData(this.query);
}, },
resetQuery() { resetQuery() {
this.query = {}; this.query = {};
}, },
tableExport() {
this.exportLoading = true;
this.$XLSX("#myTable", "库存检验记录");
this.exportLoading = false;
},
}, },
}; };
</script> </script>

View File

@ -83,11 +83,6 @@
prop="仓库库存" prop="仓库库存"
> >
</el-table-column> </el-table-column>
<el-table-column
label="未退火"
prop="未退火"
>
</el-table-column>
<el-table-column label="退火" prop="退火"> <el-table-column label="退火" prop="退火">
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
@ -287,7 +282,6 @@ export default {
规格: "", 规格: "",
合格数: 0, 合格数: 0,
仓库库存: 0, 仓库库存: 0,
未退火: 0,
退火: 0, 退火: 0,
库存: 0, 库存: 0,
开槽: 0, 开槽: 0,
@ -311,7 +305,7 @@ export default {
item5.车间 == "8车间" && item5.车间 == "8车间" &&
item5.工序 == "管料成型" item5.工序 == "管料成型"
) { ) {
key = "未退火"; key = "仓库库存";
} else if ( } else if (
item5.车间 == "8车间" && item5.车间 == "8车间" &&
item5.工序 == "管料退火" item5.工序 == "管料退火"
@ -338,12 +332,11 @@ export default {
) { ) {
key = "配棒"; key = "配棒";
} }
obj[key] = item5.数量; obj[key] = obj[key] + item5.数量;
}); });
obj.合计 = obj.合计 =
obj.合格数 + obj.合格数 +
obj.仓库库存 + obj.仓库库存 +
obj.未退火 +
obj.退火 + obj.退火 +
obj.库存 + obj.库存 +
obj.开槽 + obj.开槽 +