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

View File

@ -1,98 +1,139 @@
<template>
<el-container>
<el-header>
<div class="left-panel">
</div>
<div class="right-panel">
<el-date-picker 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>
</div>
</el-header>
<el-main class="nopadding">
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="params" :query="query">
<el-table-column type="index" width="50" />
<el-table-column label="物料名称" prop="material_name" show-overflow-tooltip min-width="100">
</el-table-column>
<el-table-column label="编号" prop="batch" show-overflow-tooltip min-width="100">
</el-table-column>
<el-table-column label="抽样数量" prop="count">
</el-table-column>
<el-table-column label="合格数">
<template #default="scope">
{{ scope.row.count - scope.row.count_notok }}
</template>
</el-table-column>
<el-table-column label="不合格数" prop="count_notok">
</el-table-column>
<el-table-column label="不合格原因" align="center">
<el-table-column label="炸纹" prop="count_n_zw">
</el-table-column>
<el-table-column label="条纹" prop="count_n_tw">
</el-table-column>
<el-table-column label="气泡" prop="count_n_qp">
</el-table-column>
<el-table-column label="弯曲" prop="count_n_wq">
</el-table-column>
<el-table-column label="断裂" prop="count_n_dl">
</el-table-column>
<el-table-column label="偏壁" prop="count_n_pb">
</el-table-column>
<el-table-column label="大小头" prop="count_n_dxt">
</el-table-column>
<el-table-column label="气线" prop="count_n_qx">
</el-table-column>
<el-table-column label="结石" prop="count_n_js">
</el-table-column>
<el-table-column label="其他" prop="count_n_qt">
</el-table-column>
</el-table-column>
<el-table-column label="检测结果" prop="is_testok">
<template #default="scope">
<el-tag type="success" v-if="scope.row.is_testok">合格</el-tag>
<el-tag type="danger" v-else>不合格</el-tag>
</template>
</el-table-column>
<el-table-column label="检测时间" prop="test_date">
</el-table-column>
<el-table-column label="检测人" prop="test_user_name">
</el-table-column>
</scTable>
</el-main>
</el-container>
<el-container>
<el-header>
<div class="left-panel"></div>
<div class="right-panel">
<el-date-picker
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>
</el-header>
<el-main class="nopadding">
<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
label="物料名称"
prop="material_name"
show-overflow-tooltip
min-width="100"
>
</el-table-column>
<el-table-column
label="编号"
prop="batch"
show-overflow-tooltip
min-width="100"
>
</el-table-column>
<el-table-column label="抽样数量" prop="count">
</el-table-column>
<el-table-column label="合格数">
<template #default="scope">
{{ scope.row.count - scope.row.count_notok }}
</template>
</el-table-column>
<el-table-column label="不合格数" prop="count_notok">
</el-table-column>
<el-table-column label="不合格原因" align="center">
<el-table-column label="炸纹" prop="count_n_zw">
</el-table-column>
<el-table-column label="条纹" prop="count_n_tw">
</el-table-column>
<el-table-column label="气泡" prop="count_n_qp">
</el-table-column>
<el-table-column label="弯曲" prop="count_n_wq">
</el-table-column>
<el-table-column label="断裂" prop="count_n_dl">
</el-table-column>
<el-table-column label="偏壁" prop="count_n_pb">
</el-table-column>
<el-table-column label="大小头" prop="count_n_dxt">
</el-table-column>
<el-table-column label="气线" prop="count_n_qx">
</el-table-column>
<el-table-column label="结石" prop="count_n_js">
</el-table-column>
<el-table-column label="其他" prop="count_n_qt">
</el-table-column>
</el-table-column>
<el-table-column label="检测结果" prop="is_testok">
<template #default="scope">
<el-tag type="success" v-if="scope.row.is_testok"
>合格</el-tag
>
<el-tag type="danger" v-else>不合格</el-tag>
</template>
</el-table-column>
<el-table-column label="检测时间" prop="test_date">
</el-table-column>
<el-table-column label="检测人" prop="test_user_name">
</el-table-column>
</scTable>
</el-main>
</el-container>
</template>
<script>
export default {
name: "rparty",
data() {
return {
apiObj: this.$API.inm.mioitem.list,
query: {
page: 1,
page_size: 20
},
params: {
page: 1,
page_size: 20,
mio__state: 20,
mio__type: 'do_in',
test_date__isnull:0
},
selection: [],
state_: {
10: '',
20: '',
},
};
},
mounted() {
},
methods: {
handleQuery() {
this.$refs.table.queryData(this.query)
},
resetQuery() {
this.query = {};
},
},
name: "rparty",
data() {
return {
apiObj: this.$API.inm.mioitem.list,
query: {
page: 1,
page_size: 20,
},
params: {
page: 1,
page_size: 20,
mio__state: 20,
mio__type: "do_in",
test_date__isnull: 0,
},
selection: [],
state_: {
10: "",
20: "",
},
exportLoading: false,
};
},
mounted() {},
methods: {
handleQuery() {
this.$refs.table.queryData(this.query);
},
resetQuery() {
this.query = {};
},
tableExport() {
this.exportLoading = true;
this.$XLSX("#myTable", "库存检验记录");
this.exportLoading = false;
},
},
};
</script>
</script>

View File

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