<template>
|
<div class="app-container">
|
<el-card class="box-card">
|
<div class="headClass">
|
<div style="display: flex;height: 20px">
|
<div>
|
<span style="font-size: large; font-weight: bold; text-decoration: underline; margin-bottom: 10px">返修记录报表</span>
|
</div>
|
<div style="margin-left: 30%">
|
<el-form :inline="true" :model="queryParams" class="myFrom" size="mini">
|
<!-- <el-form-item label="返修标识">-->
|
<!-- <el-input v-model="queryParams.repairIdentification" placeholder="返修标识"></el-input>-->
|
<!-- </el-form-item>-->
|
<el-form-item label="箱体编码">
|
<el-input v-model="queryParams.boxCode" placeholder="箱体编码">
|
</el-input>
|
</el-form-item>
|
<el-form-item>
|
<el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button>
|
</el-form-item>
|
<el-form-item>
|
<el-button type="primary" icon="el-icon-download" style="background-color: #6dbf6d" @click="exportReport">导出报表</el-button>
|
</el-form-item>
|
</el-form>
|
</div>
|
</div>
|
<div style="margin-top: 10px">
|
<el-table
|
style="width: 100%;"
|
border height="190"
|
v-loading="loading"
|
highlight-current-row
|
:data="orderSchedulingList"
|
@selection-change="handleSelectionChange"
|
@current-change="handleCurrentChange">
|
<el-table-column
|
type="index"
|
width="50"></el-table-column>
|
<el-table-column type="selection" width="55" align="center" />
|
<!-- <el-table-column label="返修标识" align="center" prop="repairIdentification" />-->
|
<el-table-column label="箱体编码" align="center" prop="boxCode" />
|
<el-table-column label="工位编号" align="center" prop="processesCode" />
|
<el-table-column label="原结果" align="center" prop="originalResult" />
|
<el-table-column label="返修结果" align="center" prop="repairResults" />
|
<el-table-column label="创建用户" align="center" prop="createUser" />
|
</el-table>
|
</div>
|
</div>
|
<pagination
|
v-show="total>0"
|
:total="total"
|
:page.sync="queryParams.pageNum"
|
:limit.sync="queryParams.pageSize"
|
@pagination="getMainList"
|
/>
|
</el-card>
|
|
<div>
|
<el-tabs type="border-card">
|
<el-tab-pane>
|
<span slot="label"><i class="el-icon-date"></i>拧紧数据</span>
|
<report1 :list1 = this.list1></report1>
|
</el-tab-pane>
|
<el-tab-pane>
|
<span slot="label"><i class="el-icon-date"></i>相机检测</span>
|
<report2 :list2 = this.list2></report2>
|
</el-tab-pane>
|
<el-tab-pane>
|
<span slot="label"><i class="el-icon-date"></i>外漏检测</span>
|
<report3 :list3 = this.list3></report3>
|
</el-tab-pane>
|
<el-tab-pane>
|
<span slot="label"><i class="el-icon-date"></i>机油加注</span>
|
<report4 :list4 = this.list4></report4>
|
</el-tab-pane>
|
<el-tab-pane>
|
<span slot="label"><i class="el-icon-date"></i>工位结果</span>
|
<report5 :list5 = this.list5></report5>
|
</el-tab-pane>
|
</el-tabs>
|
</div>
|
</div>
|
</template>
|
|
<script>
|
import { listRepairRecord, getRepairData } from "@/api/main/rm/repairRecord/repairRecord";
|
import {getFollowReport, listOrderScheduling} from "../../../../api/main/bs/orderScheduling/orderScheduling";
|
import report1 from "../../da/followReport/report1";
|
import report2 from "../../da/followReport/report2";
|
import report3 from "../../da/followReport/report3";
|
import report4 from "../../da/followReport/report4";
|
import report5 from "../../da/followReport/report5";
|
|
export default {
|
name: "RepairData",
|
dicts: ['qualified_status'],
|
components: { report1, report2, report3, report4, report5,},
|
data() {
|
return {
|
loading: false,
|
total: 0,
|
orderSchedulingList: [],
|
list1: [],
|
list2: [],
|
list3: [],
|
list4: [],
|
list5: [],
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
orderNo: null,
|
boxCode: null,
|
repairIdentification: null,
|
engineNo: null,
|
productType: null,
|
model: null,
|
productionStatus: null,
|
workingHours: null,
|
currentWorkstation: null,
|
qualityStatus: null,
|
whetherOrPrint: null,
|
report10: null,
|
report20: null,
|
combinedBoxTime: null,
|
finalAssemblyTime: null,
|
operator: null,
|
operateTime: null,
|
status: null,
|
spareField1: null,
|
spareField2: null,
|
spareField3: null,
|
spareField4: null,
|
createUser: null,
|
updateUser: null,
|
remarks: null,
|
dateConditions: [],
|
engineNoList: [],
|
engineNoListExcel: []
|
},
|
multipleSelection: [],
|
multipleSelectionExcel: [],
|
currentRow: null
|
}
|
},
|
|
created() {
|
let workOrderNo = this.$route.query.workOrderNo;
|
this.queryParams.orderNo = workOrderNo
|
this.getMainList();
|
// this.getChildList();
|
},
|
methods: {
|
toggleSelection(rows) {
|
if (rows) {
|
rows.forEach(row => {
|
this.$refs.multipleTable.toggleRowSelection(row);
|
});
|
} else {
|
this.$refs.multipleTable.clearSelection();
|
}
|
},
|
handleSelectionChange(val) {
|
this.multipleSelectionExcel = val;
|
console.log('MMMMM--',this.multipleSelectionExcel)
|
if (this.multipleSelectionExcel !== null && this.multipleSelectionExcel.length > 0){
|
this.queryParams.engineNoListExcel = []
|
this.multipleSelectionExcel.forEach(x => {
|
this.queryParams.engineNoListExcel.push(x.boxCode)
|
|
})
|
}else {
|
this.queryParams.engineNoListExcel = []
|
}
|
console.log('this.handleSelectionChange ',this.queryParams.engineNoListExcel )
|
},
|
handleCurrentChange(val) {
|
this.currentRow = val;
|
//查询选中行数据
|
this.queryParams.engineNoList = []
|
this.queryParams.engineNoList.push(this.currentRow.boxCode)
|
this.getChildList()
|
console.log('handleCurrentChange',this.queryParams.engineNoList)
|
console.log('handleCurrentChange222',this.queryParams.engineNoListExcel)
|
},
|
//导出
|
exportReport(){
|
if (this.queryParams.engineNoListExcel.length === 0){
|
this.$message.info("请勾选需要导出的数据")
|
}else {
|
this.queryParams.engineNoList = []
|
this.download('rm/repairRecord/exportRepair', {
|
...this.queryParams
|
}, `返修记录报表_${new Date().getTime()}.xlsx`)
|
}
|
|
},
|
/** 查询订单排产列表 */
|
getMainList() {
|
this.loading = true;
|
console.log(this.queryParams)
|
let query = {
|
pageNum: this.queryParams.pageNum,
|
pageSize: this.queryParams.pageSize,
|
boxCode: this.queryParams.boxCode,
|
engineNoList: [],
|
}
|
listRepairRecord(query).then(response => {
|
this.orderSchedulingList = response.rows;
|
this.total = response.total;
|
this.loading = false;
|
});
|
},
|
getChildList(){
|
getRepairData(this.queryParams).then(response => {
|
this.list1 = response.data.list1;
|
console.log('list111111',this.list1)
|
this.list2 = response.data.list2;
|
this.list3 = response.data.list3;
|
this.list4 = response.data.list4;
|
this.list5 = response.data.list5;
|
|
});
|
},
|
getList(){
|
this.getMainList()
|
// this.getChildList()
|
}
|
// handleCurrentChange(val) {
|
// this.multipleSelection = val;
|
// console.log('this.multipleSelection ',this.multipleSelection )
|
// }
|
}
|
};
|
</script>
|
<style scoped>
|
.headClass {
|
height: 200px;
|
}
|
::v-deep .el-table--scrollable-x .el-table__body-wrapper {
|
z-index: 3;
|
}
|
::v-deep .el-table__body-wrapper::-webkit-scrollbar {
|
height: 6px;
|
}
|
::v-deep .el-form .myFrom .el-form--inline{
|
height: 20px;
|
}
|
::v-deep .el-card__body {
|
padding: 10px 15px 10px 15px;
|
}
|
.app-container{
|
height: 625px;
|
}
|
</style>
|