fix:热压统计(毛)检测数据修正

This commit is contained in:
shijing 2026-03-23 14:47:49 +08:00
parent 29263a4f1b
commit afb86b1cec
1 changed files with 157 additions and 100 deletions

View File

@ -28,7 +28,21 @@
@click="handleQuery1" @click="handleQuery1"
></el-button> ></el-button>
</div> </div>
<div class="right-panel" v-if="activeName=='luhao'||activeName=='muju'"> <div class="right-panel" v-else>
<el-select
v-if="activeName=='gongxu'"
v-model="query2.process_name"
placeholder="选择工序"
clearable
filterable
>
<el-option
v-for="item in processList"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
<el-date-picker <el-date-picker
v-model="query.start_date" v-model="query.start_date"
type="date" type="date"
@ -46,27 +60,7 @@
<el-button <el-button
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
@click="handleQuery" @click="handleQuery2"
></el-button>
</div>
<div class="right-panel" v-if="activeName=='gongxu'">
<el-select
v-model="query2.process_name"
placeholder="选择工序"
clearable
filterable
>
<el-option
v-for="item in processList"
:key="item"
:label="item"
:value="item">
</el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button> ></el-button>
</div> </div>
</el-header> </el-header>
@ -82,12 +76,18 @@
:params="params1" :params="params1"
:query="params1" :query="params1"
row-key="id" row-key="id"
:default-sort="{ prop: 'date', order: 'descending' }"
stripe stripe
> >
<el-table-column type="index" width="50" fixed="left"/> <el-table-column type="index" width="50" fixed="left"/>
<el-table-column label="日期" fixed="left" width="100"> <el-table-column label="装模日期" fixed="left" width="100" sortable>
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_日期?scope.row.data.装炉压板出炉_日期:'' }}</span> <span>{{ scope.row.data.装模_日期?scope.row.data.装模_日期:'' }}</span>
</template>
</el-table-column>
<el-table-column label="装炉日期" fixed="left" width="100" sortable>
<template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_装炉_日期?scope.row.data.装炉压板出炉_装炉_日期:'' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="板号" prop="number" fixed="left"> <el-table-column label="板号" prop="number" fixed="left">
@ -182,8 +182,8 @@
<scTable <scTable
ref="table2" ref="table2"
:apiObj="apiObj1" :apiObj="apiObj1"
:params="params1" :params="params2"
:query="params1" :query="params2"
row-key="id" row-key="id"
stripe stripe
> >
@ -192,127 +192,149 @@
</el-table-column> </el-table-column>
<el-table-column label="炉号" fixed="left"> <el-table-column label="炉号" fixed="left">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_设备编号 }}</span> <span v-if="scope.row.data.装炉压板出炉_设备编号">{{ scope.row.data.装炉压板出炉_设备编号 }}</span>
<span v-else>{{ scope.row.wpr_from_.data.装炉压板出炉_设备编号 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="放大率¢16mm" align="center" class-name="colorheader1"> <el-table-column label="放大率¢2mm" align="center" class-name="colorheader1">
<el-table-column label="差值" class-name="colorheader1"> <el-table-column label="差值" class-name="colorheader1">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.毛坯检测_检测项_放大率16mm }}</span> <span v-if="scope.row.data.毛坯检测_检测项_放大率2mm">{{ scope.row.data.毛坯检测_检测项_放大率2mm }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="合格数" class-name="colorheader1"> <el-table-column label="合格数" class-name="colorheader1">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']?0:1 }}</span> <span v-if="scope.row.data['毛坯检测_缺陷项_放大率¢2mm不合格']">{{ scope.row.data['毛坯检测_缺陷项_放大率2mm不合格']==0?1:0 }}</span>
<span v-else>
<span v-if="scope.row.data.毛坯检测_检测项_放大率2mm">1</span>
</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="剪切¢18.3mm" align="center" class-name="colorheader2"> <el-table-column label="放大率¢16mm" align="center" class-name="colorheader2">
<el-table-column label="剪切" class-name="colorheader2"> <el-table-column label="差值" class-name="colorheader2">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.毛坯检测_检测项_剪切18mm }}</span> <span v-if="scope.row.data.毛坯检测_检测项_放大率16mm">{{ scope.row.data.毛坯检测_检测项_放大率16mm }}</span>
</template>
</el-table-column>
<el-table-column label="剪切值" class-name="colorheader2">
<template #default="scope">
<span>{{ scope.row.data.毛坯检测_检测项_剪切值18mm }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="合格数" class-name="colorheader2"> <el-table-column label="合格数" class-name="colorheader2">
<template #default="scope"> <template #default="scope">
<span>{{ !scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm不合格']&&!scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm可加工']?1:0 }}</span> <span v-if="scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']">{{ scope.row.data['毛坯检测_缺陷项_放大率16mm不合格']==0?1:0 }}</span>
</template> <span v-else>
</el-table-column> <span v-if="scope.row.data.毛坯检测_检测项_放大率16mm">1</span>
<el-table-column label="可加工" class-name="colorheader2"> </span>
<template #default="scope">
<span>{{ scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm可加工']?1:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="暗点" align="center" class-name="colorheader3"> <el-table-column label="剪切¢18.3mm" align="center" class-name="colorheader3">
<el-table-column label="内标合格" class-name="colorheader3"> <el-table-column label="剪切" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data.毛坯检测_检测项_剪切18mm">{{ scope.row.data.毛坯检测_检测项_剪切18mm }}</span>
</template>
</el-table-column>
<el-table-column label="剪切值" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data.毛坯检测_检测项_剪切值18mm">{{ scope.row.data.毛坯检测_检测项_剪切值18mm }}</span>
</template>
</el-table-column>
<el-table-column label="合格数" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data.毛坯检测_检测项_剪切值18mm||scope.row.data.毛坯检测_检测项_剪切18mm">{{ !scope.row.data['毛坯检测_缺陷项_剪切18.3mm不合格']&&!scope.row.data['毛坯检测_缺陷项_剪切18.3mm可加工']?1:0 }}</span>
</template>
</el-table-column>
<el-table-column label="可加工" class-name="colorheader3">
<template #default="scope">
<span v-if="scope.row.data.毛坯检测_检测项_剪切值18mm||scope.row.data.毛坯检测_检测项_剪切18mm">{{ scope.row.data['毛坯检测_缺陷项_剪切18.3mm可加工']?1:0 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="暗点" align="center" class-name="colorheader4">
<el-table-column label="内标合格" class-name="colorheader4">
<template #default="scope"> <template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_暗点合格?scope.row.data.毛坯检测_缺陷项_暗点合格:0 }}</span> <span>{{scope.row.data.毛坯检测_缺陷项_暗点合格?scope.row.data.毛坯检测_缺陷项_暗点合格:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="长点不合格" class-name="colorheader3"> <el-table-column label="长点不合格" class-name="colorheader4">
<template #default="scope"> <template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_暗点不合格?scope.row.data.毛坯检测_缺陷项_暗点不合格:0 }}</span> <span>{{scope.row.data.毛坯检测_缺陷项_暗点不合格?scope.row.data.毛坯检测_缺陷项_暗点不合格:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="可加工" class-name="colorheader4">
<template #default="scope">
<span>{{ scope.row.data.毛坯检测_缺陷项_暗点合格?0:scope.row.data.毛坯检测_缺陷项_暗点不合格?0:1 }}</span>
</template>
</el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="崩炸" align="center" class-name="colorheader4"> <el-table-column label="暗点重" align="center" class-name="colorheader5">
<el-table-column label="轻" align="center" class-name="colorheader4"> <template #default="scope">
<span>{{ scope.row.data.毛坯检测_缺陷项_暗点重?scope.row.data.毛坯检测_缺陷项_暗点重:0 }}</span>
</template>
</el-table-column>
<el-table-column label="花丝" align="center" class-name="colorheader6">
<template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_花丝?scope.row.data.毛坯检测_缺陷项_花丝:0 }}</span>
</template>
</el-table-column>
<el-table-column label="网格" align="center" class-name="colorheader7">
<template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_网格?scope.row.data.毛坯检测_缺陷项_网格:0 }}</span>
</template>
</el-table-column>
<el-table-column label="花朵" align="center" class-name="colorheader1">
<el-table-column label="轻" align="center" class-name="colorheader1">
<template #default="scope"> <template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_花朵?scope.row.data.毛坯检测_缺陷项_花朵:0 }}</span> <span>{{scope.row.data.毛坯检测_缺陷项_花朵?scope.row.data.毛坯检测_缺陷项_花朵:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="重" align="center" class-name="colorheader4"> <el-table-column label="重" align="center" class-name="colorheader1">
<template #default="scope"> <template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_花朵重?scope.row.data.毛坯检测_缺陷项_花朵重:0 }}</span> <span>{{scope.row.data.毛坯检测_缺陷项_花朵重?scope.row.data.毛坯检测_缺陷项_花朵重:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
<el-table-column label="扭后内质" align="center" class-name="colorheader5"> <el-table-column label="炸废" align="center" class-name="colorheader4">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.排板_检测项_对边==undefined?scope.row.data.排板_检测项_对边:'' }}</span> <span>{{ scope.row.data.毛坯检测_缺陷项_炸废?scope.row.data.毛坯检测_缺陷项_炸废:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="黑网" align="center" class-name="colorheader6">
<template #default="scope">
<span>{{ scope.row.data.装模_检测项_模具号==undefined?scope.row.data.装模_检测项_模具号:'' }}</span>
</template>
</el-table-column>
<el-table-column label="白网" align="center" class-name="colorheader7">
<template #default="scope">
<span>{{ scope.row.data.排板_检测项_丝高?scope.row.data.排板_检测项_丝高:0 }}</span>
</template>
</el-table-column>
<el-table-column label="板号" prop="number" class-name="colorheader1">
</el-table-column>
<el-table-column label="丝高" align="center" class-name="colorheader2"> <el-table-column label="丝高" align="center" class-name="colorheader2">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.排板_检测项_丝高?scope.row.data.排板_检测项_丝高:'' }}</span> <span>{{ scope.row.wpr_from_.data.排板_检测项_丝高?scope.row.wpr_from_.data.排板_检测项_丝高:'' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="丝长" align="center" class-name="colorheader3"> <!-- <el-table-column label="丝长" align="center" class-name="colorheader3">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.排板_检测项_丝高?scope.row.data.排板_检测项_丝高:'' }}</span> <span>{{ scope.row.data.排板_检测项_丝高?scope.row.data.排板_检测项_丝高:'' }}</span>
</template> </template>
</el-table-column> </el-table-column> -->
<el-table-column label="对模具人" align="center" class-name="colorheader4"> <el-table-column label="对模具人" align="center" class-name="colorheader4">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装模_操作人?scope.row.data.装模_操作人:'' }}</span> <span>{{ scope.row.wpr_from_.data.装模_操作人?scope.row.wpr_from_.data.装模_操作人:'' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="日期" align="center" class-name="colorheader5"> <el-table-column label="日期" align="center" class-name="colorheader5">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_压板出炉_日期?scope.row.data.装炉压板出炉_压板出炉_日期:'' }}</span> <span>{{ scope.row.wpr_from_.data.装炉压板出炉_压板出炉_日期?scope.row.wpr_from_.data.装炉压板出炉_压板出炉_日期:'' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="装炉人" align="center" class-name="colorheader6"> <el-table-column label="装炉人" align="center" class-name="colorheader6">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_装炉_操作人?scope.row.data.装炉压板出炉_装炉_操作人:'' }}</span> <span>{{ scope.row.wpr_from_.data.装炉压板出炉_装炉_操作人?scope.row.wpr_from_.data.装炉压板出炉_装炉_操作人:'' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="压板用时" align="center" class-name="colorheader7"> <el-table-column label="压板用时" align="center" class-name="colorheader7">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_操作项_压板用时?scope.row.data.装炉压板出炉_操作项_压板用时:0 }}</span> <span>{{ scope.row.wpr_from_.data.装炉压板出炉_操作项_压板用时?scope.row.wpr_from_.data.装炉压板出炉_操作项_压板用时:0 }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="压板人" align="center" class-name="colorheader1"> <el-table-column label="压板人" align="center" class-name="colorheader1">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_压板出炉_操作人?scope.row.data.装炉压板出炉_压板出炉_操作人:'' }}</span> <span>{{ scope.row.wpr_from_.data.装炉压板出炉_压板出炉_操作人?scope.row.wpr_from_.data.装炉压板出炉_压板出炉_操作人:'' }}</span>
</template>
</el-table-column>
<el-table-column label="炉号" align="center" class-name="colorheader2">
<template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_设备编号?scope.row.data.装炉压板出炉_设备编号:''}}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="模具号" align="center" class-name="colorheader3"> <el-table-column label="模具号" align="center" class-name="colorheader3">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.data.装模_检测项_模具号?scope.row.data.装模_检测项_模具号:'' }}</span> <span>{{ scope.row.wpr_from_.data.装模_检测项_模具号?scope.row.wpr_from_.data.装模_检测项_模具号:'' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="备注" align="center" class-name="colorheader4"> <el-table-column label="备注" align="center" class-name="colorheader4">
@ -534,8 +556,22 @@ export default {
userName:'', userName:'',
activeName: 'product', activeName: 'product',
params1: { params1: {
ordering:'data__装炉压板出炉_批次号', ordering:'-create_time',
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"装炉压板出炉_批次号"}]], // ordering:'-data___',
// querys:[[{field:"data__has_key",compare:"",value:"_"}]],
querys:[[
{field:"wpr_mlogbw__mlogb__mlog__mgroup__name",compare:"",value:"装炉压板出炉"},
{field:"wpr_mlogbw__mlogb__material_out",compare:"isnull",value:false}]
],
},
params2: {
ordering:'-create_time',
querys:[[
{field:"wpr_mlogbw__mlogb__mlog__mgroup__name",compare:"",value:"毛坯检测"},
{field:"wpr_mlogbw__mlogb__material_out",compare:"isnull",value:false},
{field:"data__毛坯检测_日期",compare:"isnull",value:false},
{field:"data__has_key",compare:"",value:"毛坯检测_批次号"}]
],
}, },
query1:{ query1:{
number_contains:'', number_contains:'',
@ -550,6 +586,8 @@ export default {
start_date:'', start_date:'',
select_cols: ",ls.板段编号列表,ls.切片编号列表" select_cols: ",ls.板段编号列表,ls.切片编号列表"
}, },
end_date:'',
start_date:'',
mgruops:[], mgruops:[],
tableData:[], tableData:[],
detailRow:[], detailRow:[],
@ -562,26 +600,37 @@ export default {
mounted() { mounted() {
let that = this; let that = this;
let date = new Date(); let date = new Date();
that.query.end_date = that.$TOOL.dateFormat2(date); that.end_date = that.query.end_date = that.$TOOL.dateFormat2(date);
that.query.start_date = that.query.end_date.split('-')[0] + '-' + that.query.end_date.split('-')[1] + '-01'; that.start_date = that.query.start_date = that.query.end_date.split('-')[0] + '-' + that.query.end_date.split('-')[1] + '-01';
}, },
methods: { methods: {
getData(){ getData(){
let that = this; let that = this;
let params = {}; let params = {},query ={},biStr = '';
let biStr = ''; if(that.query.start_date==''||that.query.start_date==null){
that.query.start_date = query.start_date = that.start_date;
}else{
query.start_date = that.query.start_date;
}
if(that.query.end_date==''||that.query.end_date==null){
that.query.end_date = query.end_date = that.end_date;
}else{
query.end_date = that.query.end_date;
}
if(that.activeName=='luhao'){ if(that.activeName=='luhao'){
params.query = that.query; query.select_cols = that.query.select_cols;
params.query = query;
biStr = 'product_defect_equip_bdgy'; biStr = 'product_defect_equip_bdgy';
params.query.select_cols = ",ls.板段编号列表,ls.切片编号列表";
}else if(that.activeName=='muju'){ }else if(that.activeName=='muju'){
params.query = that.query; query.select_cols = "";
params.query = query;
biStr = 'product_defect_model'; biStr = 'product_defect_model';
params.query.select_cols = "";
}else if(that.activeName=='gongxu'){ }else if(that.activeName=='gongxu'){
params.query = that.query2; query.process_name = that.query2.process_name;
params.query = query;
biStr = 'product_defect_reya'; biStr = 'product_defect_reya';
}else if(that.activeName=='total'){ }else if(that.activeName=='total'){
params.query = query;
biStr = 'product_defect_sg'; biStr = 'product_defect_sg';
} }
console.log('params',params); console.log('params',params);
@ -603,17 +652,24 @@ export default {
}, },
handleQuery1(){ handleQuery1(){
let that = this; let that = this;
let querys1 = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"装炉压板出炉_批次号"}]]; let querys1 = [[{field:"wpr_mlogbw__mlogb__mlog__mgroup__name",compare:"",value:"装炉压板出炉"},
{field:"wpr_mlogbw__mlogb__material_out",compare:"isnull",value:false}]];
if(that.activeName=='test'){
querys1 = [[{field:"wpr_mlogbw__mlogb__mlog__mgroup__name",compare:"",value:"毛坯检测"},
{field:"wpr_mlogbw__mlogb__material_out",compare:"isnull",value:false},
{field:"data__毛坯检测_日期",compare:"isnull",value:false},
{field:"data__has_key",compare:"",value:"毛坯检测_批次号"}]];
}
let obj = {},obj1 = {},obj2 = {}; let obj = {},obj1 = {},obj2 = {};
obj.field = 'data__装炉压板出炉_批次号'; obj.field = that.activeName=='product'?'data__装炉压板出炉_批次号':'data__毛坯检测_批次号';
obj.value = that.query1.number_contains; obj.value = that.query1.number_contains;
obj.compare = ''; obj.compare = '';
obj1.field = 'data__装炉压板出炉_日期'; obj1.field = that.activeName=='product'?'data__装炉压板出炉_日期':'data__毛坯检测_日期';
obj1.value = that.query1.time_gte; obj1.value = that.query1.time_gte;
obj1.compare = 'gte'; obj1.compare = 'gte';
obj2.field = 'data__装炉压板出炉_日期'; obj2.field = that.activeName=='product'?'data__装炉压板出炉_日期':'data__毛坯检测_日期';
obj2.value = that.query1.time_lte; obj2.value = that.query1.time_lte;
obj2.compare = 'lte'; obj2.compare = 'lte';
if(that.query1.number_contains!==''&&that.query1.number_contains!==null){ if(that.query1.number_contains!==''&&that.query1.number_contains!==null){
@ -625,28 +681,29 @@ export default {
if(that.query1.time_lte!==''&&that.query1.time_lte!==null){ if(that.query1.time_lte!==''&&that.query1.time_lte!==null){
querys1[0].push(obj2); querys1[0].push(obj2);
} }
that.params1.querys = querys1;
that.$nextTick(() => { that.$nextTick(() => {
if(that.activeName=='product'){ if(that.activeName=='product'){
that.params1.querys = querys1;
this.$refs.table1.queryData(that.params1); this.$refs.table1.queryData(that.params1);
}else if(that.activeName=='test'){ }else if(that.activeName=='test'){
this.$refs.table2.queryData(that.params1); that.params2.querys = querys1;
this.$refs.table2.queryData(that.params2);
} }
}); });
}, },
handleQuery(){ handleQuery2(){
let that = this; let that = this;
that.getData(); that.getData();
}, },
deptChange(){
this.getData();
},
filterName(value, row) { filterName(value, row) {
return row.物料名 == value; return row.物料名 == value;
}, },
handleClick(e){ handleClick(e){
console.log('e.props.name',e.props.name); let that = this;
that.query.end_date = that.end_date;
that.query.start_date = that.start_date;
this.activeName = e.props.name; this.activeName = e.props.name;
this.showTable=false; this.showTable=false;
if(e.props.name=='luhao'||e.props.name=='muju'||e.props.name=='gongxu'||e.props.name=='total'){ if(e.props.name=='luhao'||e.props.name=='muju'||e.props.name=='gongxu'||e.props.name=='total'){