提交 | 用户 | 时间
|
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"> |
|
11 |
<el-form-item label="返修标识"> |
|
12 |
<el-input v-model="queryParams.repairIdentification" placeholder="返修标识"></el-input> |
|
13 |
</el-form-item> |
|
14 |
<el-form-item label="箱体编码"> |
|
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" /> |
|
40 |
<el-table-column label="返修标识" align="center" prop="repairIdentification" /> |
|
41 |
<el-table-column label="箱体编码" align="center" prop="boxCode" /> |
|
42 |
<el-table-column label="工序编码" align="center" prop="processesCode" /> |
|
43 |
<el-table-column label="原结果" align="center" prop="originalResult" /> |
|
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(); |
|
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){ |
|
189 |
this.$message.error("请勾选需要导出的数据") |
|
190 |
}else { |
|
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) |
fd2207
|
202 |
listRepairRecord(this.queryParams).then(response => { |
8aafc5
|
203 |
this.orderSchedulingList = response.rows; |
fd2207
|
204 |
this.total = response.total; |
懒 |
205 |
this.loading = false; |
|
206 |
}); |
|
207 |
}, |
8aafc5
|
208 |
getChildList(){ |
W |
209 |
getRepairData(this.queryParams).then(response => { |
|
210 |
this.list1 = response.data.list1; |
|
211 |
console.log('list111111',this.list1) |
|
212 |
this.list2 = response.data.list2; |
|
213 |
this.list3 = response.data.list3; |
|
214 |
this.list4 = response.data.list4; |
|
215 |
this.list5 = response.data.list5; |
|
216 |
|
fd2207
|
217 |
}); |
懒 |
218 |
}, |
8aafc5
|
219 |
getList(){ |
W |
220 |
this.getMainList() |
|
221 |
this.getChildList() |
fd2207
|
222 |
} |
8aafc5
|
223 |
// handleCurrentChange(val) { |
W |
224 |
// this.multipleSelection = val; |
|
225 |
// console.log('this.multipleSelection ',this.multipleSelection ) |
|
226 |
// } |
fd2207
|
227 |
} |
懒 |
228 |
}; |
|
229 |
</script> |
8aafc5
|
230 |
<style scoped> |
W |
231 |
.headClass { |
|
232 |
height: 200px; |
|
233 |
} |
|
234 |
::v-deep .el-table--scrollable-x .el-table__body-wrapper { |
|
235 |
z-index: 3; |
|
236 |
} |
|
237 |
::v-deep .el-table__body-wrapper::-webkit-scrollbar { |
|
238 |
height: 6px; |
|
239 |
} |
|
240 |
::v-deep .el-form .myFrom .el-form--inline{ |
|
241 |
height: 20px; |
|
242 |
} |
|
243 |
::v-deep .el-card__body { |
|
244 |
padding: 10px 15px 10px 15px; |
|
245 |
} |
|
246 |
.app-container{ |
|
247 |
height: 625px; |
|
248 |
} |
|
249 |
</style> |