<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.orderNo" placeholder="订单编号"></el-input>
|
</el-form-item>
|
<el-form-item label="箱体编码">
|
<el-input v-model="queryParams.engineNo" 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="orderNo" width="130">
|
|
</el-table-column>
|
<el-table-column label="箱体编码" align="center" prop="engineNo" width="150">
|
|
</el-table-column>
|
<el-table-column label="产品类型" align="center" prop="productType">
|
<template slot-scope="scope">
|
<dict-tag :options="dict.type.material_type" :value="scope.row.productType"/>
|
</template>
|
</el-table-column>
|
<el-table-column label="机型" align="center" prop="model">
|
|
</el-table-column>
|
<el-table-column label="生产状态" align="center" prop="productionStatus">
|
<template slot-scope="scope">
|
<dict-tag :options="dict.type.order_scheduling_produce_status" :value="scope.row.productionStatus"/>
|
</template>
|
</el-table-column>
|
<el-table-column label="工时" align="center" prop="workingHours">
|
|
</el-table-column>
|
<el-table-column label="当前工位" align="center" prop="currentWorkstation">
|
|
</el-table-column>
|
<el-table-column label="质量状态" align="center" prop="qualityStatus">
|
<template slot-scope="scope">
|
<dict-tag :options="dict.type.quality_status" :value="scope.row.qualityStatus"/>
|
</template>
|
</el-table-column>
|
<el-table-column label="合箱上线时间" align="center" prop="boxClosingOnlineTime" width="160">
|
</el-table-column>
|
<el-table-column label="合箱下线时间" align="center" prop="closingBoxOfflineTime" width="160">
|
</el-table-column>
|
<el-table-column label="总装上线时间" align="center" prop="finalAssemblyLaunchTime" width="160">
|
</el-table-column>
|
<el-table-column label="总装下线时间" align="center" prop="finalAssemblyOfflineTime" width="160">
|
</el-table-column>
|
<el-table-column label="CVT上线时间" align="center" prop="cvtLaunchTime" width="160">
|
</el-table-column>
|
<el-table-column label="CVT下线时间" align="center" prop="cvtOfflineTime" width="160">
|
</el-table-column>
|
<el-table-column label="操作人" align="center" prop="operator">
|
|
</el-table-column>
|
<el-table-column label="操作时间" align="center" prop="operateTime" width="160">
|
|
</el-table-column>
|
</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 report1 from "./report1";
|
import {listOrderScheduling, getFollowReport} from "../../../../api/main/bs/orderScheduling/orderScheduling";
|
import report2 from "./report2";
|
import report3 from "./report3";
|
import report4 from "./report4";
|
import report5 from "./report5";
|
export default {
|
name: "index",
|
components: { report1, report2, report3, report4, report5,},
|
dicts: ['order_scheduling_produce_status','quality_status','print_status','material_type'],
|
data() {
|
return {
|
loading: false,
|
total: 0,
|
orderSchedulingList: [],
|
list1: [],
|
list2: [],
|
list3: [],
|
list4: [],
|
list5: [],
|
// 查询参数
|
queryParams: {
|
pageNum: 1,
|
pageSize: 10,
|
orderNo: 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.engineNo)
|
|
})
|
}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.engineNo)
|
this.getChildList()
|
console.log('handleCurrentChange',this.queryParams.engineNoList)
|
console.log('handleCurrentChange222',this.queryParams.engineNoListExcel)
|
},
|
//导出
|
exportReport(){
|
if (this.queryParams.engineNoListExcel.length === 0){
|
this.$message.error("请勾选需要导出的数据")
|
}else {
|
this.queryParams.engineNoList = []
|
this.download('bs/orderScheduling/exportFollow', {
|
...this.queryParams
|
}, `追溯报表_${new Date().getTime()}.xlsx`)
|
}
|
|
},
|
/** 查询订单排产列表 */
|
getMainList() {
|
this.loading = true;
|
console.log(this.queryParams)
|
listOrderScheduling(this.queryParams).then(response => {
|
this.orderSchedulingList = response.rows;
|
this.total = response.total;
|
this.loading = false;
|
});
|
},
|
getChildList(){
|
getFollowReport(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>
|