提交 | 用户 | 时间
|
fd2207
|
1 |
<template> |
懒 |
2 |
<div class="app-container"> |
8aafc5
|
3 |
<el-card class="box-card"> |
W |
4 |
<div class="headClass"> |
|
5 |
<div style="display: flex;height: 20px"> |
|
6 |
<div> |
|
7 |
<span style="font-size: large; font-weight: bold; text-decoration: underline; margin-bottom: 10px">返修记录报表</span> |
|
8 |
</div> |
|
9 |
<div style="margin-left: 30%"> |
|
10 |
<el-form :inline="true" :model="queryParams" class="myFrom" size="mini"> |
8876c2
|
11 |
<!-- <el-form-item label="返修标识">--> |
W |
12 |
<!-- <el-input v-model="queryParams.repairIdentification" placeholder="返修标识"></el-input>--> |
|
13 |
<!-- </el-form-item>--> |
8aafc5
|
14 |
<el-form-item label="箱体编码"> |
W |
15 |
<el-input v-model="queryParams.boxCode" placeholder="箱体编码"> |
|
16 |
</el-input> |
|
17 |
</el-form-item> |
|
18 |
<el-form-item> |
|
19 |
<el-button type="primary" icon="el-icon-search" @click="getList">查询</el-button> |
|
20 |
</el-form-item> |
|
21 |
<el-form-item> |
|
22 |
<el-button type="primary" icon="el-icon-download" style="background-color: #6dbf6d" @click="exportReport">导出报表</el-button> |
|
23 |
</el-form-item> |
|
24 |
</el-form> |
|
25 |
</div> |
|
26 |
</div> |
|
27 |
<div style="margin-top: 10px"> |
|
28 |
<el-table |
|
29 |
style="width: 100%;" |
|
30 |
border height="190" |
|
31 |
v-loading="loading" |
|
32 |
highlight-current-row |
|
33 |
:data="orderSchedulingList" |
|
34 |
@selection-change="handleSelectionChange" |
|
35 |
@current-change="handleCurrentChange"> |
|
36 |
<el-table-column |
|
37 |
type="index" |
|
38 |
width="50"></el-table-column> |
|
39 |
<el-table-column type="selection" width="55" align="center" /> |
8876c2
|
40 |
<!-- <el-table-column label="返修标识" align="center" prop="repairIdentification" />--> |
8aafc5
|
41 |
<el-table-column label="箱体编码" align="center" prop="boxCode" /> |
8876c2
|
42 |
<el-table-column label="工位编号" align="center" prop="processesCode" /> |
8aafc5
|
43 |
<el-table-column label="原结果" align="center" prop="originalResult" /> |
W |
44 |
<el-table-column label="返修结果" align="center" prop="repairResults" /> |
|
45 |
<el-table-column label="创建用户" align="center" prop="createUser" /> |
|
46 |
</el-table> |
|
47 |
</div> |
|
48 |
</div> |
fd2207
|
49 |
<pagination |
懒 |
50 |
v-show="total>0" |
|
51 |
:total="total" |
|
52 |
:page.sync="queryParams.pageNum" |
|
53 |
:limit.sync="queryParams.pageSize" |
8aafc5
|
54 |
@pagination="getMainList" |
fd2207
|
55 |
/> |
懒 |
56 |
</el-card> |
|
57 |
|
8aafc5
|
58 |
<div> |
W |
59 |
<el-tabs type="border-card"> |
|
60 |
<el-tab-pane> |
|
61 |
<span slot="label"><i class="el-icon-date"></i>拧紧数据</span> |
|
62 |
<report1 :list1 = this.list1></report1> |
fd2207
|
63 |
</el-tab-pane> |
懒 |
64 |
<el-tab-pane> |
8aafc5
|
65 |
<span slot="label"><i class="el-icon-date"></i>相机检测</span> |
W |
66 |
<report2 :list2 = this.list2></report2> |
fd2207
|
67 |
</el-tab-pane> |
懒 |
68 |
<el-tab-pane> |
8aafc5
|
69 |
<span slot="label"><i class="el-icon-date"></i>外漏检测</span> |
W |
70 |
<report3 :list3 = this.list3></report3> |
fd2207
|
71 |
</el-tab-pane> |
懒 |
72 |
<el-tab-pane> |
8aafc5
|
73 |
<span slot="label"><i class="el-icon-date"></i>机油加注</span> |
W |
74 |
<report4 :list4 = this.list4></report4> |
fd2207
|
75 |
</el-tab-pane> |
懒 |
76 |
<el-tab-pane> |
8aafc5
|
77 |
<span slot="label"><i class="el-icon-date"></i>工位结果</span> |
W |
78 |
<report5 :list5 = this.list5></report5> |
fd2207
|
79 |
</el-tab-pane> |
懒 |
80 |
</el-tabs> |
8aafc5
|
81 |
</div> |
fd2207
|
82 |
</div> |
懒 |
83 |
</template> |
|
84 |
|
|
85 |
<script> |
8aafc5
|
86 |
import { listRepairRecord, getRepairData } from "@/api/main/rm/repairRecord/repairRecord"; |
W |
87 |
import {getFollowReport, listOrderScheduling} from "../../../../api/main/bs/orderScheduling/orderScheduling"; |
|
88 |
import report1 from "../../da/followReport/report1"; |
|
89 |
import report2 from "../../da/followReport/report2"; |
|
90 |
import report3 from "../../da/followReport/report3"; |
|
91 |
import report4 from "../../da/followReport/report4"; |
|
92 |
import report5 from "../../da/followReport/report5"; |
fd2207
|
93 |
|
懒 |
94 |
export default { |
|
95 |
name: "RepairData", |
|
96 |
dicts: ['qualified_status'], |
8aafc5
|
97 |
components: { report1, report2, report3, report4, report5,}, |
fd2207
|
98 |
data() { |
懒 |
99 |
return { |
8aafc5
|
100 |
loading: false, |
fd2207
|
101 |
total: 0, |
8aafc5
|
102 |
orderSchedulingList: [], |
W |
103 |
list1: [], |
|
104 |
list2: [], |
|
105 |
list3: [], |
|
106 |
list4: [], |
|
107 |
list5: [], |
fd2207
|
108 |
// 查询参数 |
懒 |
109 |
queryParams: { |
|
110 |
pageNum: 1, |
|
111 |
pageSize: 10, |
8aafc5
|
112 |
orderNo: null, |
fd2207
|
113 |
boxCode: null, |
8aafc5
|
114 |
repairIdentification: null, |
W |
115 |
engineNo: null, |
|
116 |
productType: null, |
|
117 |
model: null, |
|
118 |
productionStatus: null, |
|
119 |
workingHours: null, |
|
120 |
currentWorkstation: null, |
|
121 |
qualityStatus: null, |
|
122 |
whetherOrPrint: null, |
|
123 |
report10: null, |
|
124 |
report20: null, |
|
125 |
combinedBoxTime: null, |
|
126 |
finalAssemblyTime: null, |
|
127 |
operator: null, |
|
128 |
operateTime: null, |
|
129 |
status: null, |
|
130 |
spareField1: null, |
|
131 |
spareField2: null, |
|
132 |
spareField3: null, |
|
133 |
spareField4: null, |
fd2207
|
134 |
createUser: null, |
懒 |
135 |
updateUser: null, |
|
136 |
remarks: null, |
8aafc5
|
137 |
dateConditions: [], |
W |
138 |
engineNoList: [], |
|
139 |
engineNoListExcel: [] |
fd2207
|
140 |
}, |
8aafc5
|
141 |
multipleSelection: [], |
W |
142 |
multipleSelectionExcel: [], |
|
143 |
currentRow: null |
|
144 |
} |
fd2207
|
145 |
}, |
8aafc5
|
146 |
|
fd2207
|
147 |
created() { |
8aafc5
|
148 |
let workOrderNo = this.$route.query.workOrderNo; |
W |
149 |
this.queryParams.orderNo = workOrderNo |
|
150 |
this.getMainList(); |
8876c2
|
151 |
// this.getChildList(); |
fd2207
|
152 |
}, |
懒 |
153 |
methods: { |
8aafc5
|
154 |
toggleSelection(rows) { |
W |
155 |
if (rows) { |
|
156 |
rows.forEach(row => { |
|
157 |
this.$refs.multipleTable.toggleRowSelection(row); |
|
158 |
}); |
|
159 |
} else { |
|
160 |
this.$refs.multipleTable.clearSelection(); |
|
161 |
} |
|
162 |
}, |
|
163 |
handleSelectionChange(val) { |
|
164 |
this.multipleSelectionExcel = val; |
|
165 |
console.log('MMMMM--',this.multipleSelectionExcel) |
|
166 |
if (this.multipleSelectionExcel !== null && this.multipleSelectionExcel.length > 0){ |
|
167 |
this.queryParams.engineNoListExcel = [] |
|
168 |
this.multipleSelectionExcel.forEach(x => { |
|
169 |
this.queryParams.engineNoListExcel.push(x.boxCode) |
|
170 |
|
|
171 |
}) |
|
172 |
}else { |
|
173 |
this.queryParams.engineNoListExcel = [] |
|
174 |
} |
|
175 |
console.log('this.handleSelectionChange ',this.queryParams.engineNoListExcel ) |
|
176 |
}, |
|
177 |
handleCurrentChange(val) { |
|
178 |
this.currentRow = val; |
|
179 |
//查询选中行数据 |
|
180 |
this.queryParams.engineNoList = [] |
|
181 |
this.queryParams.engineNoList.push(this.currentRow.boxCode) |
|
182 |
this.getChildList() |
|
183 |
console.log('handleCurrentChange',this.queryParams.engineNoList) |
|
184 |
console.log('handleCurrentChange222',this.queryParams.engineNoListExcel) |
|
185 |
}, |
|
186 |
//导出 |
|
187 |
exportReport(){ |
|
188 |
if (this.queryParams.engineNoListExcel.length === 0){ |
8876c2
|
189 |
this.$message.info("请勾选需要导出的数据") |
8aafc5
|
190 |
}else { |
W |
191 |
this.queryParams.engineNoList = [] |
|
192 |
this.download('rm/repairRecord/exportRepair', { |
|
193 |
...this.queryParams |
|
194 |
}, `返修记录报表_${new Date().getTime()}.xlsx`) |
|
195 |
} |
|
196 |
|
|
197 |
}, |
|
198 |
/** 查询订单排产列表 */ |
|
199 |
getMainList() { |
fd2207
|
200 |
this.loading = true; |
8aafc5
|
201 |
console.log(this.queryParams) |
8876c2
|
202 |
let query = { |
W |
203 |
pageNum: this.queryParams.pageNum, |
|
204 |
pageSize: this.queryParams.pageSize, |
|
205 |
boxCode: this.queryParams.boxCode, |
|
206 |
engineNoList: [], |
|
207 |
} |
|
208 |
listRepairRecord(query).then(response => { |
8aafc5
|
209 |
this.orderSchedulingList = response.rows; |
fd2207
|
210 |
this.total = response.total; |
懒 |
211 |
this.loading = false; |
|
212 |
}); |
|
213 |
}, |
8aafc5
|
214 |
getChildList(){ |
W |
215 |
getRepairData(this.queryParams).then(response => { |
|
216 |
this.list1 = response.data.list1; |
|
217 |
console.log('list111111',this.list1) |
|
218 |
this.list2 = response.data.list2; |
|
219 |
this.list3 = response.data.list3; |
|
220 |
this.list4 = response.data.list4; |
|
221 |
this.list5 = response.data.list5; |
|
222 |
|
fd2207
|
223 |
}); |
懒 |
224 |
}, |
8aafc5
|
225 |
getList(){ |
W |
226 |
this.getMainList() |
8876c2
|
227 |
// this.getChildList() |
fd2207
|
228 |
} |
8aafc5
|
229 |
// handleCurrentChange(val) { |
W |
230 |
// this.multipleSelection = val; |
|
231 |
// console.log('this.multipleSelection ',this.multipleSelection ) |
|
232 |
// } |
fd2207
|
233 |
} |
懒 |
234 |
}; |
|
235 |
</script> |
8aafc5
|
236 |
<style scoped> |
W |
237 |
.headClass { |
|
238 |
height: 200px; |
|
239 |
} |
|
240 |
::v-deep .el-table--scrollable-x .el-table__body-wrapper { |
|
241 |
z-index: 3; |
|
242 |
} |
|
243 |
::v-deep .el-table__body-wrapper::-webkit-scrollbar { |
|
244 |
height: 6px; |
|
245 |
} |
|
246 |
::v-deep .el-form .myFrom .el-form--inline{ |
|
247 |
height: 20px; |
|
248 |
} |
|
249 |
::v-deep .el-card__body { |
|
250 |
padding: 10px 15px 10px 15px; |
|
251 |
} |
|
252 |
.app-container{ |
|
253 |
height: 625px; |
|
254 |
} |
|
255 |
</style> |