fix:排版统计展示板段列表
This commit is contained in:
parent
e744274f08
commit
c84ad40c00
|
|
@ -3,9 +3,6 @@
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel"></div>
|
<div class="left-panel"></div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<el-select v-model="query.mgroup_name" placeholder="工段" clearable style="width: 150px">
|
|
||||||
<el-option v-for="item in mgroups" :key="item.id" :label="item.name" :value="item.name"></el-option>
|
|
||||||
</el-select>
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.start_date"
|
v-model="query.start_date"
|
||||||
type="date"
|
type="date"
|
||||||
|
|
@ -44,8 +41,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="总数">
|
<el-table-column label="总数">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.总切片数">{{ scope.row.总切片数 }}</span>
|
<span v-if="scope.row.总切片数" @click="handleClick(scope.row)" style="color:#0052d9;">{{ scope.row.总切片数 }}</span>
|
||||||
<span v-else>{{ scope.row.总生产数 }}</span>
|
<span v-else @click="handleClick(scope.row)" style="color:#0052d9;">{{ scope.row.总生产数 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="剪切">
|
<el-table-column label="剪切">
|
||||||
|
|
@ -83,6 +80,14 @@
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</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-main>
|
||||||
</el-container>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -92,13 +97,17 @@ export default {
|
||||||
name: "workerTimes",
|
name: "workerTimes",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
visible:false,
|
||||||
|
userName:'',
|
||||||
query:{
|
query:{
|
||||||
end_date:'',
|
end_date:'',
|
||||||
mgroup_name:'排板',
|
mgroup_name:'排板',
|
||||||
start_date:'',
|
start_date:'',
|
||||||
|
select_cols: ", ls.产品编号列表, ls.切片编号列表"
|
||||||
},
|
},
|
||||||
mgroups: [],
|
mgroups: [],
|
||||||
tableData:[],
|
tableData:[],
|
||||||
|
detailRow:[],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
|
@ -120,7 +129,7 @@ export default {
|
||||||
let that = this;
|
let that = this;
|
||||||
let params = {};
|
let params = {};
|
||||||
params.query = that.query;
|
params.query = that.query;
|
||||||
that.$API.bi.dataset.exec.req('product_defect_paiban', params).then((res) => {
|
that.$API.bi.dataset.exec.req('product_defect_pb', params).then((res) => {
|
||||||
let data = res.data2.ds0;
|
let data = res.data2.ds0;
|
||||||
data.forEach(item=>{
|
data.forEach(item=>{
|
||||||
if(item.缺陷分布!==null){
|
if(item.缺陷分布!==null){
|
||||||
|
|
@ -129,19 +138,26 @@ export default {
|
||||||
item[key]=defect[key];
|
item[key]=defect[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let count_cds = item.暗点不合格?item.暗点重?item.暗点不合格.含 + item.暗点重.含:item.暗点不合格.含:item.暗点重?item.暗点重.含:0;
|
item.长点数 = item.暗点不合格?item.暗点重?item.暗点不合格.含 + item.暗点重.含:item.暗点不合格.含:item.暗点重?item.暗点重.含:0;
|
||||||
item.长点数 = count_cds;
|
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.长点数;
|
let count1 = item['剪切¢18.3mm不合格']?item.总切片数 - item.长点数 - item['剪切¢18.3mm不合格'].含:item.总切片数 - item.长点数;
|
||||||
if(item['剪切¢18.3mm不合格+暗点不合格']){
|
if(item['剪切¢18.3mm不合格']&&item['剪切¢18.3mm不合格'].组!==null){
|
||||||
count1 = count1 + item['剪切¢18.3mm不合格+暗点不合格'].含;
|
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不合格+暗点合格'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(item['剪切¢18.3mm不合格+暗点重']){
|
item.加工率数 = count1;//总数-暗点不合格.含-暗点重.含-剪切不合格.含+两个组合数;
|
||||||
count1 = count1 + item['剪切¢18.3mm不合格+暗点重'].含;
|
item.合格率数 = count_hgls;//:在暗点合格含里刨除剪切可加工和剪切不合格
|
||||||
}
|
|
||||||
item.加工率数 = count1;//总数-暗点不合格含-暗点重含-剪切不合格含+两个组合数;
|
|
||||||
let count_jqhg = 0;
|
|
||||||
count_jqhg = 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.总切片数;
|
|
||||||
item.剪切合格 = count_jqhg;
|
|
||||||
})
|
})
|
||||||
that.tableData = data;
|
that.tableData = data;
|
||||||
});
|
});
|
||||||
|
|
@ -149,6 +165,12 @@ export default {
|
||||||
deptChange(){
|
deptChange(){
|
||||||
this.getData();
|
this.getData();
|
||||||
},
|
},
|
||||||
|
handleClick(row){
|
||||||
|
let that = this;
|
||||||
|
that.userName = row.员工;
|
||||||
|
that.visible = true;
|
||||||
|
that.detailRow = row.切片编号列表;
|
||||||
|
},
|
||||||
handleQuery(){
|
handleQuery(){
|
||||||
let that = this;
|
let that = this;
|
||||||
console.log('that.query',that.query)
|
console.log('that.query',that.query)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,197 @@
|
||||||
|
<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="总数">
|
||||||
|
<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:[],
|
||||||
|
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: {
|
||||||
|
getUsers() {
|
||||||
|
let that = this;
|
||||||
|
this.$API.system.user.list.req({ page: 0,belong_dept__name:'拉丝排板班组',query:'{id,name}' }).then(res => {
|
||||||
|
that.users = res;
|
||||||
|
that.query.user_name = res[0].name;
|
||||||
|
|
||||||
|
});
|
||||||
|
},
|
||||||
|
getData(){
|
||||||
|
let that = this;
|
||||||
|
let params = {};
|
||||||
|
params.query = that.query;
|
||||||
|
that.$API.bi.dataset.exec.req('product_defect_pb_hz', params).then((res) => {
|
||||||
|
let data = res.data2.ds0;
|
||||||
|
data.forEach(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.tableData = data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
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>
|
||||||
Loading…
Reference in New Issue