Commit fbdfd771 authored by 沈翠玲's avatar 沈翠玲

报表管理

parent fdfe300a
......@@ -87,10 +87,12 @@
</el-row> -->
<el-table v-loading="loading" :max-height="tableHeight" :data="tbodys" >
<el-table-column :label="item.label" align="center" :prop="item.value" :width="item.width" v-for="(item, index) in theaders" :key="index">
<!-- <template slot-scope="scope">
<dict-tag :options="dict.type.mes_workorder_type" :value="scope.row.workorderType" v-if="item.value==='workorderType'" />
<div v-else>{{ item.value === 'machineTime' ? scope.row[item.value] ? Number(scope.row[item.value]).toFixed(2) : scope.row[item.value] : scope.row[item.value] }}</div>
</template> -->
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_ipqc_type_pc" :value="scope.row.ipqcType" v-if="item.value==='ipqcType'" />
<dict-tag :options="dict.type.mes_qc_result" :value="scope.row.checkResult" v-else-if="item.value==='checkResult'" />
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" v-else-if="item.value==='status'" />
<div v-else>{{ scope.row[item.value] }}</div>
</template>
</el-table-column>
</el-table>
......@@ -124,15 +126,14 @@
</el-col>
<el-col :span="3">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" style="margin-left: 10px;">{{'查询'}}</el-button>
<el-button type="primary" size="mini" @click="handleExport">{{'导出'}}</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :max-height="tableHeight" :data="tbodys1" @sort-change="handleSortChange">
<el-table-column :label="item.label" align="center" :prop="item.value" v-for="(item, index) in theaders1" :key="index" :sortable="item.sort? 'custom':false">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_ipqc_type_pc" :value="scope.row.ipqcType" v-if="item.value==='ipqcType'" />
<dict-tag :options="dict.type.mes_qc_result" :value="scope.row.checkResult" v-if="item.value==='checkResult'" />
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" v-if="item.value==='status'" />
<dict-tag :options="dict.type.mes_qc_result" :value="scope.row.checkResult" v-else-if="item.value==='checkResult'" />
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" v-else-if="item.value==='status'" />
<div v-else>{{ scope.row[item.value] }}</div>
</template>
</el-table-column>
......
......@@ -60,10 +60,11 @@
</el-row> -->
<el-table v-loading="loading" :max-height="tableHeight" :data="tbodys" >
<el-table-column :label="item.label" align="center" :prop="item.value" :width="item.width" v-for="(item, index) in theaders" :key="index">
<!-- <template slot-scope="scope">
<dict-tag :options="dict.type.mes_workorder_type" :value="scope.row.workorderType" v-if="item.value==='workorderType'" />
<div v-else>{{ item.value === 'machineTime' ? scope.row[item.value] ? Number(scope.row[item.value]).toFixed(2) : scope.row[item.value] : scope.row[item.value] }}</div>
</template> -->
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_qc_result" :value="scope.row.checkResult" v-if="item.value==='checkResult'" key="checkResult"/>
<!-- <dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" v-if="item.value==='status'" key="status" /> -->
<div v-else>{{ scope.row[item.value] }}</div>
</template>
</el-table-column>
</el-table>
......@@ -97,15 +98,13 @@
</el-col>
<el-col :span="3">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" style="margin-left: 10px;">{{'查询'}}</el-button>
<el-button type="primary" size="mini" @click="handleExport">{{'导出'}}</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :max-height="tableHeight" :data="tbodys1" @sort-change="handleSortChange">
<el-table-column :label="item.label" align="center" :prop="item.value" v-for="(item, index) in theaders1" :key="index" :sortable="item.sort? 'custom':false">
<template slot-scope="scope">
<dict-tag :options="dict.type.mes_ipqc_type_pc" :value="scope.row.ipqcType" v-if="item.value==='ipqcType'" />
<dict-tag :options="dict.type.mes_qc_result" :value="scope.row.checkResult" v-if="item.value==='checkResult'" />
<dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" v-if="item.value==='status'" />
<dict-tag :options="dict.type.mes_qc_result" :value="scope.row.checkResult" v-if="item.value==='checkResult'" key="checkResult"/>
<!-- <dict-tag :options="dict.type.mes_order_status" :value="scope.row.status" v-if="item.value==='status'" key="status" /> -->
<div v-else>{{ scope.row[item.value] }}</div>
</template>
</el-table-column>
......@@ -140,7 +139,6 @@ export default {
name: "ScheduleSetupRule",
components: {Treeselect},
dicts: [
"mes_ipqc_type_pc",
"IQC_TYPE",
"mes_qc_result",
"mes_order_status"
......@@ -230,7 +228,7 @@ export default {
const height = arr[0].offsetHeight
const arr1 = document.getElementsByClassName('app-main')
const height1 = arr1[0].offsetHeight
this.tableHeight = height1 - height - (this.tabIndex ? 200 : 170)
this.tableHeight = height1 - height - (this.tabIndex ? 270 : 150)
}
window.addEventListener('resize', this._resizeHandler)
},
......@@ -272,6 +270,7 @@ export default {
},
'queryParams.itemTypeO' : {
handler(val){
console.log('val', val)
this.queryParams.itemTypeCode = val.itemTypeCode
}
}
......@@ -389,6 +388,7 @@ export default {
{label: '数量不合格率', value: 'totalNgPt'},
{label: '特采数量比率', value: 'totalNgPt'},
]
param['groupKey'] = ['itemTypeCode']
} else if (this.groupKey == '物料编码') {
this.theaders1 = [
{label: '物料编码', value: 'groupKey'},
......@@ -405,9 +405,9 @@ export default {
{label: '数量不合格率', value: 'totalNgPt'},
{label: '特采数量比率', value: 'totalNgPt'},
]
param['groupKey'] = ['sapItemCode']
}
api = getUnquanlify
param['groupKey'] = [this.groupKey]
} else if(this.statisisType === '批供应商合格率'){
this.theaders1 = [
{label: '供应商名称', value: 'vendorName'},
......
......@@ -142,7 +142,7 @@
<!-- <el-row style="margin-bottom: 10px;">
<el-button type="primary" size="mini" @click="handleExport">{{'导出'}}</el-button>
</el-row> -->
<el-table v-loading="loading" :max-height="tableHeight" :data="tbodys" >
<el-table v-loading="loading" :data="tbodys" >
<el-table-column :label="item.label" align="center" :prop="item.value" :width="item.width" v-for="(item, index) in theaders" :key="index">
<!-- <template slot-scope="scope">
<dict-tag :options="dict.type.mes_workorder_type" :value="scope.row.workorderType" v-if="item.value==='workorderType'" />
......@@ -181,10 +181,9 @@
</el-col>
<el-col :span="3">
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery" style="margin-left: 10px;">{{'查询'}}</el-button>
<el-button type="primary" size="mini" @click="handleExport">{{'导出'}}</el-button>
</el-col>
</el-row>
<el-table v-loading="loading" :max-height="tableHeight" :data="tbodys1" @sort-change="handleSortChange">
<el-table v-loading="loading" :data="tbodys1" @sort-change="handleSortChange">
<el-table-column :label="item.label" align="center" :prop="item.value" v-for="(item, index) in theaders1" :key="index" :sortable="item.sort? 'custom':false">
<!-- <template slot-scope="scope">
<dict-tag :options="dict.type.mes_workorder_type" :value="scope.row.workorderType" v-if="item.value==='workorderType'" />
......@@ -310,20 +309,20 @@ import FactorySelect from "@/components/FactorySelect/index.vue";
};
},
mounted(){
this.$nextTick(()=>{
this._resizeHandler()
})
this._resizeHandler = () => {
const arr = document.getElementsByClassName('el-form')
const height = arr[0].offsetHeight
const arr1 = document.getElementsByClassName('app-main')
const height1 = arr1[0].offsetHeight
this.tableHeight = height1 - height - (this.tabIndex ? 200 : 170)
}
window.addEventListener('resize', this._resizeHandler)
// this.$nextTick(()=>{
// this._resizeHandler()
// })
// this._resizeHandler = () => {
// const arr = document.getElementsByClassName('el-form')
// const height = arr[0].offsetHeight
// const arr1 = document.getElementsByClassName('app-main')
// const height1 = arr1[0].offsetHeight
// this.tableHeight = height1 - height - (this.tabIndex ? 200 : 170)
// }
// window.addEventListener('resize', this._resizeHandler)
},
beforeDestroy() {
window.removeEventListener('resize', this._resizeHandler)
// window.removeEventListener('resize', this._resizeHandler)
},
created() {
this.getList();
......
......@@ -253,9 +253,9 @@ import FactorySelect from "@/components/FactorySelect/index.vue";
handleSortChange(column) {
const p = {}
if (column.order === 'ascending') {
p['ascSort'] = [column.prop]
p['ascSort'] = [column.column.label]
} else if (column.order === 'descending'){
p['descSort'] = [column.prop]
p['descSort'] = [column.column.label]
}
this.getList(p);
},
......@@ -315,7 +315,7 @@ import FactorySelect from "@/components/FactorySelect/index.vue";
{label: '异常原因(分组)', value: 'expcetionReason'},
{label: '时间范围', value: 'timeRange'},
{label: '异常次数', value: 'expCount', sort: true},
{label: '合计延误工时', value: 'workTimeSumM', sort: true}
{label: '合计延误工时', value: 'lossTimeSumM', sort: true}
]
console.log('api1111', api, this.statisisType)
} else if(this.statisisType === '损失工时排行'){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment