fix:加工统计
This commit is contained in:
parent
8cd885c641
commit
4fcf3cace9
|
|
@ -104,7 +104,9 @@ export default {
|
||||||
mounted() {
|
mounted() {
|
||||||
let that = this;
|
let that = this;
|
||||||
let date = new Date();
|
let date = new Date();
|
||||||
that.query.start_date = that.query.end_date = that.$TOOL.dateFormat2(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();
|
that.getData();
|
||||||
this.deptMgroup();
|
this.deptMgroup();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ export default {
|
||||||
that.lists = [];
|
that.lists = [];
|
||||||
let coefficient = [];
|
let coefficient = [];
|
||||||
data.forEach(item=>{
|
data.forEach(item=>{
|
||||||
let obj = JSON.parse(item.工段物料生产数);
|
let obj = item.工序物料生产数?JSON.parse(item.工序物料生产数):{};
|
||||||
for(let key in obj){
|
for(let key in obj){
|
||||||
if(coefficient.indexOf(key)<0){
|
if(coefficient.indexOf(key)<0){
|
||||||
coefficient.push(key);
|
coefficient.push(key);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,139 @@
|
||||||
|
<template>
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel"></div>
|
||||||
|
<div class="right-panel">
|
||||||
|
<xtSelect
|
||||||
|
:apiObj="apiObj"
|
||||||
|
v-model="query.process_name"
|
||||||
|
:valueField="'name'"
|
||||||
|
:labelField="'name'"
|
||||||
|
:params = "params"
|
||||||
|
v-model:label="query.process_name"
|
||||||
|
style="width:150px; margin-right: 5px;"
|
||||||
|
>
|
||||||
|
<el-table-column label="工序" prop="name"></el-table-column>
|
||||||
|
</xtSelect>
|
||||||
|
<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 label="员工" prop="员工" fixed="left">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="暗点" prop="暗点不合格">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="长点" prop="长点">
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="暗点合格率" prop="暗点合格率">
|
||||||
|
<!-- <template #default="scope">
|
||||||
|
{{ scope.row.暗点不合格/scope.row.总切片数 }}
|
||||||
|
</template> -->
|
||||||
|
</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 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>
|
||||||
|
</scTable>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: "workerTimesRY",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
query:{
|
||||||
|
end_date:'',
|
||||||
|
process_name:'',
|
||||||
|
start_date:'',
|
||||||
|
},
|
||||||
|
lists:[],
|
||||||
|
mgruops:[],
|
||||||
|
tableData:[],
|
||||||
|
params:{cate:'热压'},
|
||||||
|
apiObj: this.$API.mtm.process.list,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
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;
|
||||||
|
that.mgruops = [];
|
||||||
|
that.tableData = [];
|
||||||
|
let params = {};
|
||||||
|
params.query = that.query;
|
||||||
|
that.$API.bi.dataset.exec.req('prodect_defect_reya', params).then((res) => {
|
||||||
|
let data = res.data2.ds0;
|
||||||
|
that.lists = [];
|
||||||
|
let coefficient = [];
|
||||||
|
data.forEach(item=>{
|
||||||
|
let obj = JSON.parse(item.缺陷分布);
|
||||||
|
console.log('obj',obj);
|
||||||
|
for(let key in obj){
|
||||||
|
item[key]= obj[key].含;
|
||||||
|
}
|
||||||
|
if(item.暗点合格){
|
||||||
|
item.暗点合格率 = ((item.暗点合格/item.总切片数)*100).toFixed(2)+'%'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
console.log('data',data)
|
||||||
|
that.tableData = data;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
deptChange(){
|
||||||
|
this.getData();
|
||||||
|
},
|
||||||
|
handleQuery(){
|
||||||
|
let that = this;
|
||||||
|
that.getData();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
</style>
|
||||||
Loading…
Reference in New Issue