feat:工时统计新增页面(禅道301初步页面,待完善)

This commit is contained in:
shijing 2026-01-14 16:04:34 +08:00
parent 1c927d1ba8
commit 35b7186f5c
7 changed files with 964 additions and 0 deletions

View File

@ -0,0 +1,195 @@
<template>
<el-container>
<el-header>
<div class="left-panel"></div>
<div class="right-panel">
<el-date-picker
v-model="query.start_date"
type="date"
value-format="YYYY-MM-DD"
placeholder="开始时间"
style="width: 150px"
/>
<el-date-picker
v-model="query.end_date"
type="date"
value-format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 150px"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:data="tableData"
id="exportDiv"
row-key="id"
hidePagination
hideDo
stripe
>
<el-table-column type="index" width="50" fixed="left"/>
<el-table-column label="员工" prop="员工">
</el-table-column>
<el-table-column label="物料名" prop="物料名" :filters="nameFilters" :filter-method="filterName" filter-placement="bottom-end">
</el-table-column>
<el-table-column label="总数">
<template #default="scope">
<span v-if="scope.row.总切片数" @click="handleClick(scope.row)" style="color:#0052d9;">{{ scope.row.总切片数 }}</span>
<span v-else @click="handleClick(scope.row)" style="color:#0052d9;">{{ scope.row.总生产数 }}</span>
</template>
</el-table-column>
<el-table-column label="剪切">
<template #default="scope">
<span v-if="scope.row.剪切合格">{{((scope.row.剪切合格/scope.row.总切片数)*100).toFixed(2) }}%</span>
</template>
</el-table-column>
<el-table-column label="剪切加工率">
<template #default="scope">
<span v-if="scope.row['剪切¢18.3mm不合格']">{{ (((scope.row.总切片数-scope.row['剪切18.3mm不合格'].含)/scope.row.总切片数)*100).toFixed(2) }}%</span>
<span v-else>100%</span>
</template>
</el-table-column>
<el-table-column label="暗点">
<template #default="scope">
<span v-if="scope.row.暗点合格">{{((scope.row.暗点合格.含/scope.row.总切片数)*100).toFixed(2) }}%</span>
<span v-else>0%</span>
</template>
</el-table-column>
<el-table-column label="长点率">
<template #default="scope">
<span>{{((scope.row.长点数/scope.row.总切片数)*100).toFixed(2) }}%</span>
</template>
</el-table-column>
<el-table-column label="加工率">
<template #default="scope">
<span>{{((scope.row.加工率数/scope.row.总切片数)*100).toFixed(2) }}%</span>
</template>
</el-table-column>
<el-table-column label="合格率" prop="合格率">
<!-- 暗点合格并且剪切合格的板段数在暗点合格含里刨除剪切可加工和剪切不合格 -->
<template #default="scope">
<span>{{((scope.row.合格率数/scope.row.总切片数)*100).toFixed(2) }}%</span>
</template>
</el-table-column>
</scTable>
<el-drawer v-model="visible" :title="userName+'板段列表'" size="50%" direction="rtl" append-to-body destroy-on-close>
<el-card shadow="never">
<div v-for="(item,index) in detailRow" :key="item" style="height:22px;border-bottom: 1px solid #efefef;">
<span style="margin-right:10px;width: 18px;display: inline-block;">{{ index+1 }} </span>
{{ item }}
</div>
</el-card>
</el-drawer>
</el-main>
</el-container>
</template>
<script>
export default {
name: "workerTimes",
data() {
return {
visible:false,
userName:'',
query:{
end_date:'',
mgroup_name:'排板',
start_date:'',
select_cols: ", ls.产品编号列表, ls.切片编号列表"
},
mgroups: [],
tableData:[],
detailRow:[],
nameFilters:[],
};
},
mounted() {
let that = this;
let date = new 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.getData();
this.deptMgroup();
},
methods: {
deptMgroup() {
this.$API.mtm.mgroup.list.req({ page: 0,belong_dept__name:'拉丝排板班组' }).then(res => {
this.mgroups = res;
});
},
getData(){
let that = this;
let nameList = [],names = [];
let params = {};
params.query = that.query;
that.$API.bi.dataset.exec.req('prodect_defect_pb1', params).then((res) => {
let data = res.data2.ds0;
data.forEach(item=>{
if(names.indexOf(item.物料名)>-1){}else{
names.push(item.物料名);
nameList.push({text:item.物料名,value:item.物料名})
}
if(item.缺陷分布!==null){
let defect = JSON.parse(item.缺陷分布);
for(let key in defect){
item[key]=defect[key];
}
}
item.长点数 = item.暗点不合格?item.暗点重?item.暗点不合格. + item.暗点重.:item.暗点不合格.:item.暗点重?item.暗点重.:0;
item.剪切合格 = item['剪切¢18.3mm不合格']?item['剪切¢18.3mm可加工']?item.总切片数 - item['剪切¢18.3mm可加工'].- item['剪切¢18.3mm不合格'].:item.总切片数 - item['剪切¢18.3mm不合格'].:item['剪切¢18.3mm可加工']?item.总切片数 - item['剪切¢18.3mm可加工'].:item.总切片数;
let count_hgls = item.暗点合格?item.暗点合格.:0;
let count1 = item['剪切¢18.3mm不合格']?item.总切片数 - item.长点数 - item['剪切¢18.3mm不合格'].:item.总切片数 - item.长点数;
if(item['剪切¢18.3mm不合格']&&item['剪切¢18.3mm不合格'].!==null){
if(item['剪切¢18.3mm不合格'].['剪切¢18.3mm不合格+暗点不合格']){
count1 = count1 + item['剪切¢18.3mm不合格+暗点不合格'];
}
if(item['剪切¢18.3mm不合格'].['剪切¢18.3mm不合格+暗点重']){
count1 = count1 + item['剪切¢18.3mm不合格+暗点重'];
}
if(item['剪切¢18.3mm可加工'].['剪切¢18.3mm可加工+暗点合格']){
count_hgls = count_hgls - item['剪切¢18.3mm可加工'].['剪切¢18.3mm可加工+暗点合格'];
}
if(item['剪切¢18.3mm可加工'].['剪切¢18.3mm不合格+暗点合格']){
count_hgls = count_hgls - item['剪切¢18.3mm不合格+暗点合格'];
}
}
item.加工率数 = count1;//-.-.-.+
item.合格率数 = count_hgls;//
})
that.$nextTick(() => {
that.nameFilters = nameList;
that.tableData = data;
})
});
},
deptChange(){
this.getData();
},
filterName(value, row) {
return row.物料名 == value;
},
handleClick(row){
let that = this;
that.userName = row.员工;
that.visible = true;
that.detailRow = row.切片编号列表;
},
handleQuery(){
let that = this;
console.log('that.query',that.query)
that.getData();
},
},
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,223 @@
<template>
<el-container>
<el-header>
<div class="left-panel"></div>
<div class="right-panel">
<el-date-picker
v-model="query.start_date"
type="date"
value-format="YYYY-MM-DD"
placeholder="开始时间"
style="width: 150px"
/>
<el-date-picker
v-model="query.end_date"
type="date"
value-format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 150px"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:data="tableData"
id="exportDiv"
row-key="id"
hidePagination
hideDo
stripe
>
<el-table-column type="index" width="50" fixed="left"/>
<el-table-column label="员工" prop="员工" :filters="userFilters" :filter-method="filterUser" filter-placement="bottom-end" >
</el-table-column>
<el-table-column label="物料名" prop="物料名" :filters="nameFilters" :filter-method="filterName" filter-placement="bottom-end">
</el-table-column>
<el-table-column label="切片后缀" prop="切片后缀" :filters="houzhuiFilters" :filter-method="filterHouzhui" filter-placement="bottom-end">
</el-table-column>
<el-table-column label="总数">
<template #default="scope">
<span v-if="scope.row.总切片数" @click="handleClick(scope.row)" style="color:#0052d9;">{{ scope.row.总切片数 }}</span>
<span v-else @click="handleClick(scope.row)" style="color:#0052d9;">{{ scope.row.总生产数 }}</span>
</template>
</el-table-column>
<el-table-column label="剪切">
<template #default="scope">
<span v-if="scope.row.剪切合格">{{((scope.row.剪切合格/scope.row.总切片数)*100).toFixed(2) }}%</span>
</template>
</el-table-column>
<el-table-column label="剪切加工率">
<template #default="scope">
<span v-if="scope.row['剪切¢18.3mm不合格']">{{ (((scope.row.总切片数-scope.row['剪切18.3mm不合格'].含)/scope.row.总切片数)*100).toFixed(2) }}%</span>
<span v-else>100%</span>
</template>
</el-table-column>
<el-table-column label="暗点">
<template #default="scope">
<span v-if="scope.row.暗点合格">{{((scope.row.暗点合格.含/scope.row.总切片数)*100).toFixed(2) }}%</span>
<span v-else>0%</span>
</template>
</el-table-column>
<el-table-column label="长点率">
<template #default="scope">
<span>{{((scope.row.长点数/scope.row.总切片数)*100).toFixed(2) }}%</span>
</template>
</el-table-column>
<el-table-column label="加工率">
<template #default="scope">
<span>{{((scope.row.加工率数/scope.row.总切片数)*100).toFixed(2) }}%</span>
</template>
</el-table-column>
<el-table-column label="合格率" prop="合格率">
<!-- 暗点合格并且剪切合格的板段数在暗点合格含里刨除剪切可加工和剪切不合格 -->
<template #default="scope">
<span>{{((scope.row.合格率数/scope.row.总切片数)*100).toFixed(2) }}%</span>
</template>
</el-table-column>
</scTable>
</el-main>
<el-container v-if="visible" style="height:100%;overflow-y: scroll;">
<el-main class="nopadding">
<div style="padding: 10px;">
<div style="height: 35px;font-size: 18px;">
<span>{{ userName }}-{{ banduanNum }}板段列表 </span>
<el-button type="primary" style="position: absolute;right: 20px;" @click="listClose">关闭</el-button>
</div>
<div v-for="(item,index) in detailRow" :key="item" style="display: inline-block;width:150px;margin-bottom: 5px;">
<span style="margin-right:10px;display: inline-block;">{{ index+1 }}{{ item }} </span>
</div>
</div>
</el-main>
</el-container>
</el-container>
</template>
<script>
export default {
name: "workerTimes",
data() {
return {
visible:false,
userName:'',
banduanNum:'',
query:{
end_date:'',
mgroup_name:'排板',
start_date:'',
select_cols: ", ls.产品编号列表, ls.切片编号列表"
},
users:[],
detailRow:[],
userFilters:[],
nameFilters:[],
houzhuiFilters:[],
tableData:[],
};
},
mounted() {
let that = this;
let date = new 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.getData();
},
methods: {
getData(){
let that = this;
let params = {};
let userList = [],users = [];
let nameList = [],names = [];
let houzhuiList = [],houzhuis=[];
params.query = that.query;
that.$API.bi.dataset.exec.req('product_defect_pb_hz1', params).then((res) => {
let data = res.data2.ds0;
data.forEach(item=>{
if(users.indexOf(item.员工)>-1){}else{
users.push(item.员工);
userList.push({text:item.员工,value:item.员工})
}
if(names.indexOf(item.物料名)>-1){}else{
names.push(item.物料名);
nameList.push({text:item.物料名,value:item.物料名})
}
if(houzhuis.indexOf(item.切片后缀)>-1){}else{
houzhuis.push(item.切片后缀);
houzhuiList.push({text:item.切片后缀,value:item.切片后缀})
}
if(item.缺陷分布!==null){
let defect = JSON.parse(item.缺陷分布);
for(let key in defect){
item[key]=defect[key];
}
}
item.长点数 = item.暗点不合格?item.暗点重?item.暗点不合格. + item.暗点重.:item.暗点不合格.:item.暗点重?item.暗点重.:0;
item.剪切合格 = item['剪切¢18.3mm不合格']?item['剪切¢18.3mm可加工']?item.总切片数 - item['剪切¢18.3mm可加工'].- item['剪切¢18.3mm不合格'].:item.总切片数 - item['剪切¢18.3mm不合格'].:item['剪切¢18.3mm可加工']?item.总切片数 - item['剪切¢18.3mm可加工'].:item.总切片数;
let count_hgls = item.暗点合格?item.暗点合格.:0;
let count1 = item['剪切¢18.3mm不合格']?item.总切片数 - item.长点数 - item['剪切¢18.3mm不合格'].:item.总切片数 - item.长点数;
if(item['剪切¢18.3mm不合格']&&item['剪切¢18.3mm不合格'].!==null){
if(item['剪切¢18.3mm不合格'].['剪切¢18.3mm不合格+暗点不合格']){
count1 = count1 + item['剪切¢18.3mm不合格+暗点不合格'];
}
if(item['剪切¢18.3mm不合格'].['剪切¢18.3mm不合格+暗点重']){
count1 = count1 + item['剪切¢18.3mm不合格+暗点重'];
}
if(item['剪切¢18.3mm可加工'].['剪切¢18.3mm可加工+暗点合格']){
count_hgls = count_hgls - item['剪切¢18.3mm可加工'].['剪切¢18.3mm可加工+暗点合格'];
}
if(item['剪切¢18.3mm可加工'].['剪切¢18.3mm不合格+暗点合格']){
count_hgls = count_hgls - item['剪切¢18.3mm不合格+暗点合格'];
}
}
item.加工率数 = count1;//-.-.-.+
item.合格率数 = count_hgls;//
})
that.$nextTick(() => {
that.userFilters = userList;
that.nameFilters = nameList;
that.houzhuiFilters = houzhuiList;
that.tableData = data;
})
});
},
filterName(value, row) {
return row.物料名 == value;
},
filterUser(value, row) {
return row.员工 == value;
},
filterHouzhui(value, row) {
return row.切片后缀 == value;
},
handleClick(row){
let that = this;
that.detailRow = [];
that.userName = row.员工;
that.banduanNum = row.切片后缀;
that.detailRow = row.切片编号列表;
that.visible = true;
},
listClose(){
let that = this;
that.visible = false;
that.detailRow = [];
},
deptChange(){
this.getData();
},
handleQuery(){
let that = this;
console.log('that.query',that.query)
that.getData();
},
},
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,106 @@
<template>
<el-container>
<el-header>
<div class="left-panel"></div>
<div class="right-panel">
<el-date-picker
v-model="query.start_date"
type="date"
value-format="YYYY-MM-DD"
placeholder="开始时间"
style="width: 150px"
/>
<el-date-picker
v-model="query.end_date"
type="date"
value-format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 150px"
/>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:data="tableData"
id="exportDiv"
row-key="id"
hidePagination
hideDo
stripe
>
<el-table-column type="index" width="50" fixed="left"/>
<el-table-column label="工段名" prop="工段名">
</el-table-column>
<el-table-column label="生产数" prop="生产数">
</el-table-column>
<el-table-column label="合格数" prop="合格数">
</el-table-column>
<el-table-column label="完全合格数" prop="完全合格数">
</el-table-column>
<el-table-column v-for="item in lists" :key="item" :label="item" :prop="item">
<template #default="scope">
{{ scope.row[item] }}
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
</template>
<script>
export default {
name: "workerTimes",
data() {
return {
query:{
end_date:'',
start_date:'2025-11-01',
},
lists:[],
tableData:[],
};
},
mounted() {
let that = this;
let date = new 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.getData();
},
methods: {
getData(){
let that = this;
let params = {};
params.query = that.query;
that.$API.bi.dataset.exec.req('mg_pro_dis', params).then((res) => {
let data = res.data2.ds0;
that.lists = [];
data.forEach(item=>{
let obj = JSON.parse(item.缺陷分布);
for(let key in obj){
if(that.lists.indexOf(key)>-1){}else{that.lists.push(key)}
item[key]= obj[key].;
}
})
that.tableData = data;
});
},
deptChange(){
this.getData();
},
handleQuery(){
let that = this;
that.getData();
},
},
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,200 @@
<template>
<el-container>
<el-header>
<div class="right-panel">
<el-date-picker
v-model="query.time_gte"
type="date"
value-format="YYYY-MM-DD"
placeholder="开始时间"
style="width: 150px"
/>
<el-date-picker
v-model="query.time_lte"
type="date"
value-format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 150px"
/>
<el-input v-model="query.number_contains"
placeholder="板号"
clearable
style="width: 200px;"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
:params="params"
:query="params"
id="exportDiv"
row-key="id"
stripe
>
<el-table-column type="index" width="50" fixed="left"/>
<el-table-column label="日期" fixed="left" prop="date" width="90">
</el-table-column>
<el-table-column label="板号" prop="number" fixed="left">
</el-table-column>
<el-table-column label="压前对边" align="center" class-name="colorheader1">
<template #default="scope">
<span>{{ scope.row.data.排板_检测项_对边==undefined?scope.row.data.排板_检测项_对边:'' }}</span>
</template>
</el-table-column>
<el-table-column label="模具号" align="center" class-name="colorheader2">
<template #default="scope">
<span>{{ scope.row.data.装模_检测项_模具号==undefined?scope.row.data.装模_检测项_模具号:'' }}</span>
</template>
</el-table-column>
<el-table-column label="对模具" align="center" class-name="colorheader3">
<template #default="scope">
<span>{{ scope.row.data.排板_检测项_丝高?scope.row.data.排板_检测项_丝高:0 }}</span>
</template>
</el-table-column>
<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="colorheader5">
<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="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="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="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="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="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="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="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="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">
<template #default="scope">
<span>{{ 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>
</scTable>
</el-main>
</el-container>
</template>
<script>
export default {
name: "statistics_guan",
data() {
return {
params: {
ordering:'data__成品尺寸检测_批次号',
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品尺寸检测_批次号"}]],
},
query:{
number_contains:'',
time_gte:'',
time_lte:'',
},
apiObj: this.$API.wpm.wpr.query,
options:[],
tableData:[],
};
},
methods: {
handleQuery(){
let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品尺寸检测_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {};
obj.field = 'data__成品尺寸检测_批次号';
obj.value = that.query.batch__contains;
obj.compare = '';
obj1.field = 'data__成品尺寸检测_日期';
obj1.value = that.query.last_time__gte;
obj1.compare = 'gte';
obj2.field = 'data__成品尺寸检测_日期';
obj2.value = that.query.last_time__lte;
obj2.compare = 'lte';
obj3.field = 'material__name';
obj3.value = that.query.name__contains;
obj3.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj);
}
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
querys[0].push(obj1);
}
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
querys[0].push(obj2);
}
if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3);
}
that.params.querys = querys;
this.$refs.table.queryData(that.params);
},
getCountQt(data,type){
let count_qt = 0,count = 0;
}
},
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,240 @@
<template>
<el-container>
<el-header>
<div class="right-panel">
<el-date-picker
v-model="query.time_gte"
type="date"
value-format="YYYY-MM-DD"
placeholder="开始时间"
style="width: 150px"
/>
<el-date-picker
v-model="query.time_lte"
type="date"
value-format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 150px"
/>
<el-input v-model="query.number_contains"
placeholder="板号"
clearable
style="width: 200px;"
></el-input>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
:params="params"
:query="params"
id="exportDiv"
row-key="id"
stripe
>
<el-table-column label="序号" type="index" width="50" fixed="left"/>
<el-table-column label="板号" prop="number" fixed="left">
</el-table-column>
<el-table-column label="炉号" prop="number" fixed="left">
</el-table-column>
<el-table-column label="放大率¢16mm" align="center" class-name="colorheader4">
<el-table-column label="差值" class-name="colorheader2">
<template #default="scope">
<span>{{ scope.row.data.毛坯检测_检测项_放大率16mm }}</span>
</template>
</el-table-column>
<el-table-column label="合格数" class-name="colorheader2">
<template #default="scope">
<span>{{ scope.row.data['毛坯检测_缺陷项_放大率¢16mm不合格']?0:1 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="剪切¢18.3mm" align="center" class-name="colorheader5">
<el-table-column label="剪切" class-name="colorheader3">
<template #default="scope">
<span>{{ scope.row.data.毛坯检测_检测项_剪切18mm }}</span>
</template>
</el-table-column>
<el-table-column label="剪切值" class-name="colorheader3">
<template #default="scope">
<span>{{ scope.row.data.毛坯检测_检测项_剪切值18mm }}</span>
</template>
</el-table-column>
<el-table-column label="合格数" class-name="colorheader3">
<template #default="scope">
<span>{{ !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>{{ scope.row.data['毛坯检测_缺陷项_剪切¢18.3mm可加工']?1:0 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="暗点" align="center" class-name="colorheader6">
<el-table-column label="内标合格" class-name="colorheader4">
<template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_暗点合格?scope.row.data.毛坯检测_缺陷项_暗点合格:0 }}</span>
</template>
</el-table-column>
<el-table-column label="长点不合格" class-name="colorheader4">
<template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_暗点不合格?scope.row.data.毛坯检测_缺陷项_暗点不合格:0 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="崩炸" align="center" class-name="colorheader7">
<el-table-column label="轻" align="center" class-name="colorheader1">
<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">
<template #default="scope">
<span>{{scope.row.data.毛坯检测_缺陷项_花朵重?scope.row.data.毛坯检测_缺陷项_花朵重:0 }}</span>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="扭后内质" align="center" class-name="colorheader1">
<template #default="scope">
<span>{{ scope.row.data.排板_检测项_对边==undefined?scope.row.data.排板_检测项_对边:'' }}</span>
</template>
</el-table-column>
<el-table-column label="黑网" align="center" class-name="colorheader2">
<template #default="scope">
<span>{{ scope.row.data.装模_检测项_模具号==undefined?scope.row.data.装模_检测项_模具号:'' }}</span>
</template>
</el-table-column>
<el-table-column label="白网" align="center" class-name="colorheader3">
<template #default="scope">
<span>{{ scope.row.data.排板_检测项_丝高?scope.row.data.排板_检测项_丝高:0 }}</span>
</template>
</el-table-column>
<el-table-column label="板号" prop="number" fixed="left">
</el-table-column>
<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="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="colorheader3">
<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="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="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="colorheader5">
<template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_设备编号?scope.row.data.装炉压板出炉_设备编号:0 }}</span>
</template>
</el-table-column>
<el-table-column label="模具号" align="center" class-name="colorheader2">
<template #default="scope">
<span>{{ scope.row.data.装模_检测项_模具号==undefined?scope.row.data.装模_检测项_模具号:'' }}</span>
</template>
</el-table-column>
<el-table-column label="备注" align="center" class-name="colorheader1">
<template #default="scope">
<span>{{ scope.row.data.装炉压板出炉_备注 }}</span>
</template>
</el-table-column>
</scTable>
</el-main>
</el-container>
</template>
<script>
export default {
name: "statistics_guan",
data() {
return {
params: {
ordering:'data__成品尺寸检测_批次号',
querys:[[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品尺寸检测_批次号"}]],
},
query:{
number_contains:'',
time_gte:'',
time_lte:'',
},
apiObj: this.$API.wpm.wpr.query,
options:[],
tableData:[],
};
},
methods: {
handleQuery(){
let that = this;
let querys = [[{field:"wm",value:false,compare:"isnull"},{field:"data__has_key",compare:"",value:"成品尺寸检测_批次号"}]];
let obj = {},obj1 = {},obj2 = {},obj3 = {};
obj.field = 'data__成品尺寸检测_批次号';
obj.value = that.query.batch__contains;
obj.compare = '';
obj1.field = 'data__成品尺寸检测_日期';
obj1.value = that.query.last_time__gte;
obj1.compare = 'gte';
obj2.field = 'data__成品尺寸检测_日期';
obj2.value = that.query.last_time__lte;
obj2.compare = 'lte';
obj3.field = 'material__name';
obj3.value = that.query.name__contains;
obj3.compare = 'contains';
if(that.query.batch__contains!==''&&that.query.batch__contains!==null){
querys[0].push(obj);
}
if(that.query.last_time__gte!==''&&that.query.last_time__gte!==null){
querys[0].push(obj1);
}
if(that.query.last_time__lte!==''&&that.query.last_time__lte!==null){
querys[0].push(obj2);
}
if(that.query.name__contains!==''&&that.query.name__contains!==null){
querys[0].push(obj3);
}
that.params.querys = querys;
this.$refs.table.queryData(that.params);
},
getCountQt(data,type){
let count_qt = 0,count = 0;
}
},
};
</script>
<style scoped>
</style>