提交 | 用户 | 时间
|
d9cf6b
|
1 |
<template> |
J |
2 |
<div class="app-container"> |
|
3 |
<el-card class="box-card"> |
|
4 |
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> |
|
5 |
<el-form-item label="订单编号" prop="orderNumber"> |
|
6 |
<el-input |
|
7 |
v-model="queryParams.orderNumber" |
|
8 |
placeholder="请输入订单编号" |
|
9 |
clearable |
|
10 |
@keyup.enter.native="handleQuery" |
|
11 |
/> |
|
12 |
</el-form-item> |
|
13 |
<el-form-item label="发动机号" prop="engineNo"> |
|
14 |
<el-input |
|
15 |
v-model="queryParams.engineNo" |
|
16 |
placeholder="请输入发动机号" |
|
17 |
clearable |
|
18 |
@keyup.enter.native="handleQuery" |
|
19 |
/> |
|
20 |
</el-form-item> |
|
21 |
<el-form-item label="机型" prop="model"> |
|
22 |
<el-input |
|
23 |
v-model="queryParams.model" |
|
24 |
placeholder="请输入机型" |
|
25 |
clearable |
|
26 |
@keyup.enter.native="handleQuery" |
|
27 |
/> |
|
28 |
</el-form-item> |
|
29 |
<el-form-item label="工时" prop="workingHours"> |
|
30 |
<el-input |
|
31 |
v-model="queryParams.workingHours" |
|
32 |
placeholder="请输入工时" |
|
33 |
clearable |
|
34 |
@keyup.enter.native="handleQuery" |
|
35 |
/> |
|
36 |
</el-form-item> |
|
37 |
<el-form-item label="当前工位" prop="currentWorkstation"> |
|
38 |
<el-input |
|
39 |
v-model="queryParams.currentWorkstation" |
|
40 |
placeholder="请输入当前工位" |
|
41 |
clearable |
|
42 |
@keyup.enter.native="handleQuery" |
|
43 |
/> |
|
44 |
</el-form-item> |
|
45 |
<el-form-item label="是否打印" prop="whetherOrPrint"> |
|
46 |
<el-input |
|
47 |
v-model="queryParams.whetherOrPrint" |
|
48 |
placeholder="请输入是否打印" |
|
49 |
clearable |
|
50 |
@keyup.enter.native="handleQuery" |
|
51 |
/> |
|
52 |
</el-form-item> |
|
53 |
<el-form-item label="10报工" prop="report10"> |
|
54 |
<el-input |
|
55 |
v-model="queryParams.report10" |
|
56 |
placeholder="请输入10报工" |
|
57 |
clearable |
|
58 |
@keyup.enter.native="handleQuery" |
|
59 |
/> |
|
60 |
</el-form-item> |
|
61 |
<el-form-item label="20报工" prop="report20"> |
|
62 |
<el-input |
|
63 |
v-model="queryParams.report20" |
|
64 |
placeholder="请输入20报工" |
|
65 |
clearable |
|
66 |
@keyup.enter.native="handleQuery" |
|
67 |
/> |
|
68 |
</el-form-item> |
|
69 |
<el-form-item label="操作人" prop="operator"> |
|
70 |
<el-input |
|
71 |
v-model="queryParams.operator" |
|
72 |
placeholder="请输入操作人" |
|
73 |
clearable |
|
74 |
@keyup.enter.native="handleQuery" |
|
75 |
/> |
|
76 |
</el-form-item> |
|
77 |
<el-form-item style="float: right"> |
|
78 |
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
|
79 |
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
|
80 |
</el-form-item> |
|
81 |
</el-form> |
|
82 |
</el-card> |
|
83 |
|
|
84 |
<el-card style="margin-top: 10px" class="box-card"> |
|
85 |
<el-row :gutter="10" class="mb8"> |
|
86 |
<el-col :span="1.5"> |
|
87 |
<el-button |
|
88 |
type="primary" |
|
89 |
plain |
|
90 |
icon="el-icon-plus" |
|
91 |
size="mini" |
|
92 |
@click="handleAdd" |
|
93 |
v-hasPermi="['bs:orderScheduling:add']" |
|
94 |
>新增</el-button> |
|
95 |
</el-col> |
|
96 |
<el-col :span="1.5"> |
|
97 |
<el-button |
|
98 |
type="success" |
|
99 |
plain |
|
100 |
icon="el-icon-edit" |
|
101 |
size="mini" |
|
102 |
:disabled="single" |
|
103 |
@click="handleUpdate" |
|
104 |
v-hasPermi="['bs:orderScheduling:edit']" |
|
105 |
>修改</el-button> |
|
106 |
</el-col> |
|
107 |
<el-col :span="1.5"> |
|
108 |
<el-button |
|
109 |
type="danger" |
|
110 |
plain |
|
111 |
icon="el-icon-delete" |
|
112 |
size="mini" |
|
113 |
:disabled="multiple" |
|
114 |
@click="handleDelete" |
|
115 |
v-hasPermi="['bs:orderScheduling:remove']" |
|
116 |
>删除</el-button> |
|
117 |
</el-col> |
|
118 |
<el-col :span="1.5"> |
|
119 |
<el-button |
|
120 |
type="warning" |
|
121 |
plain |
|
122 |
icon="el-icon-download" |
|
123 |
size="mini" |
|
124 |
@click="handleExport" |
|
125 |
v-hasPermi="['bs:orderScheduling:export']" |
|
126 |
>导出</el-button> |
|
127 |
</el-col> |
|
128 |
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|
129 |
</el-row> |
|
130 |
|
|
131 |
<el-table border v-loading="loading" :data="orderSchedulingList" @selection-change="handleSelectionChange"> |
|
132 |
<el-table-column type="selection" width="55" align="center" /> |
|
133 |
<el-table-column label="订单编号" align="center" prop="orderNumber"> |
|
134 |
</el-table-column> |
|
135 |
<el-table-column label="发动机号" align="center" prop="engineNo"> |
|
136 |
</el-table-column> |
|
137 |
<el-table-column label="产品类型" align="center" prop="productType"> |
|
138 |
<!-- <template slot-scope="scope">--> |
|
139 |
<!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.productType"/>--> |
|
140 |
<!-- </template>--> |
|
141 |
</el-table-column> |
|
142 |
<el-table-column label="机型" align="center" prop="model"> |
|
143 |
</el-table-column> |
|
144 |
<el-table-column label="生产状态" align="center" prop="productionStatus"> |
|
145 |
</el-table-column> |
|
146 |
<el-table-column label="工时" align="center" prop="workingHours"> |
|
147 |
</el-table-column> |
|
148 |
<el-table-column label="当前工位" align="center" prop="currentWorkstation"> |
|
149 |
</el-table-column> |
|
150 |
<el-table-column label="质量状态" align="center" prop="qualityStatus"> |
|
151 |
</el-table-column> |
|
152 |
<el-table-column label="是否打印" align="center" prop="whetherOrPrint"> |
|
153 |
</el-table-column> |
|
154 |
<el-table-column label="10报工" align="center" prop="report10"> |
|
155 |
</el-table-column> |
|
156 |
<el-table-column label="20报工" align="center" prop="report20"> |
|
157 |
|
|
158 |
</el-table-column> |
|
159 |
<el-table-column label="合箱上线" align="center" prop="combinedBoxLaunch"> |
|
160 |
|
|
161 |
</el-table-column> |
|
162 |
<el-table-column label="总装下线" align="center" prop="finalAssemblyOffline"> |
|
163 |
|
|
164 |
</el-table-column> |
|
165 |
<el-table-column label="操作人" align="center" prop="operator"> |
|
166 |
|
|
167 |
</el-table-column> |
|
168 |
<el-table-column label="操作时间" align="center" prop="operateTime"> |
|
169 |
|
|
170 |
</el-table-column> |
|
171 |
<el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width"> |
|
172 |
<template slot-scope="scope"> |
|
173 |
<el-button |
|
174 |
size="mini" |
|
175 |
type="success" |
|
176 |
plain |
|
177 |
style="width: 72px" |
|
178 |
icon="el-icon-edit" |
|
179 |
@click="handleUpdate(scope.row)" |
|
180 |
v-hasPermi="['bs:orderScheduling:edit']" |
|
181 |
>修改</el-button> |
|
182 |
<el-button |
|
183 |
size="mini" |
|
184 |
type="danger" |
|
185 |
plain |
|
186 |
style="width: 72px" |
|
187 |
icon="el-icon-delete" |
|
188 |
@click="handleDelete(scope.row)" |
|
189 |
v-hasPermi="['bs:orderScheduling:remove']" |
|
190 |
>删除</el-button> |
|
191 |
</template> |
|
192 |
</el-table-column> |
|
193 |
</el-table> |
|
194 |
</el-card> |
|
195 |
|
|
196 |
<pagination |
|
197 |
v-show="total>0" |
|
198 |
:total="total" |
|
199 |
:page.sync="queryParams.pageNum" |
|
200 |
:limit.sync="queryParams.pageSize" |
|
201 |
@pagination="getList" |
|
202 |
/> |
|
203 |
|
|
204 |
<!-- 添加或修改订单排产对话框 --> |
|
205 |
<el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> |
|
206 |
<span slot="title"> |
|
207 |
<i class="el-icon-s-order"></i> |
|
208 |
{{titleName}} |
|
209 |
</span> |
|
210 |
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
|
211 |
<el-form-item label="订单编号" prop="orderNumber"> |
|
212 |
<el-input v-model="form.orderNumber" placeholder="请输入订单编号" /> |
|
213 |
</el-form-item> |
|
214 |
<el-form-item label="发动机号" prop="engineNo"> |
|
215 |
<el-input v-model="form.engineNo" placeholder="请输入发动机号" /> |
|
216 |
</el-form-item> |
|
217 |
<el-form-item label="机型" prop="model"> |
|
218 |
<el-input v-model="form.model" placeholder="请输入机型" /> |
|
219 |
</el-form-item> |
|
220 |
<el-form-item label="工时" prop="workingHours"> |
|
221 |
<el-input v-model="form.workingHours" placeholder="请输入工时" /> |
|
222 |
</el-form-item> |
|
223 |
<el-form-item label="当前工位" prop="currentWorkstation"> |
|
224 |
<el-input v-model="form.currentWorkstation" placeholder="请输入当前工位" /> |
|
225 |
</el-form-item> |
|
226 |
<el-form-item label="是否打印" prop="whetherOrPrint"> |
|
227 |
<el-input v-model="form.whetherOrPrint" placeholder="请输入是否打印" /> |
|
228 |
</el-form-item> |
|
229 |
<el-form-item label="10报工" prop="report10"> |
|
230 |
<el-input v-model="form.report10" placeholder="请输入10报工" /> |
|
231 |
</el-form-item> |
|
232 |
<el-form-item label="20报工" prop="report20"> |
|
233 |
<el-input v-model="form.report20" placeholder="请输入20报工" /> |
|
234 |
</el-form-item> |
|
235 |
<el-form-item label="操作人" prop="operator"> |
|
236 |
<el-input v-model="form.operator" placeholder="请输入操作人" /> |
|
237 |
</el-form-item> |
|
238 |
</el-form> |
|
239 |
<div slot="footer" class="dialog-footer"> |
|
240 |
<el-button type="primary" @click="submitForm">确 定</el-button> |
|
241 |
<el-button @click="cancel">取 消</el-button> |
|
242 |
</div> |
|
243 |
</el-dialog> |
|
244 |
</div> |
|
245 |
</template> |
|
246 |
|
|
247 |
<script> |
|
248 |
import { listOrderScheduling, getOrderScheduling, delOrderScheduling, addOrderScheduling, updateOrderScheduling } from "@/api/main/bs/orderScheduling/orderScheduling"; |
|
249 |
|
|
250 |
export default { |
|
251 |
name: "OrderScheduling", |
|
252 |
data() { |
|
253 |
return { |
|
254 |
// 遮罩层 |
|
255 |
loading: true, |
|
256 |
titleName: "", |
|
257 |
// 选中数组 |
|
258 |
ids: [], |
|
259 |
// 非单个禁用 |
|
260 |
single: true, |
|
261 |
// 非多个禁用 |
|
262 |
multiple: true, |
|
263 |
// 显示搜索条件 |
|
264 |
showSearch: true, |
|
265 |
// 总条数 |
|
266 |
total: 0, |
|
267 |
// 订单排产表格数据 |
|
268 |
orderSchedulingList: [], |
|
269 |
// 弹出层标题 |
|
270 |
title: "", |
|
271 |
// 是否显示弹出层 |
|
272 |
open: false, |
|
273 |
// 查询参数 |
|
274 |
queryParams: { |
|
275 |
pageNum: 1, |
|
276 |
pageSize: 10, |
|
277 |
orderNumber: null, |
|
278 |
engineNo: null, |
|
279 |
productType: null, |
|
280 |
model: null, |
|
281 |
productionStatus: null, |
|
282 |
workingHours: null, |
|
283 |
currentWorkstation: null, |
|
284 |
qualityStatus: null, |
|
285 |
whetherOrPrint: null, |
|
286 |
report10: null, |
|
287 |
report20: null, |
|
288 |
combinedBoxLaunch: null, |
|
289 |
finalAssemblyOffline: null, |
|
290 |
operator: null, |
|
291 |
operateTime: null |
|
292 |
}, |
|
293 |
// 表单参数 |
|
294 |
form: {}, |
|
295 |
// 表单校验 |
|
296 |
rules: { |
|
297 |
} |
|
298 |
}; |
|
299 |
}, |
|
300 |
created() { |
|
301 |
this.getList(); |
|
302 |
}, |
|
303 |
methods: { |
|
304 |
/** 查询订单排产列表 */ |
|
305 |
getList() { |
|
306 |
this.loading = true; |
|
307 |
listOrderScheduling(this.queryParams).then(response => { |
|
308 |
this.orderSchedulingList = response.rows; |
|
309 |
this.total = response.total; |
|
310 |
this.loading = false; |
|
311 |
}); |
|
312 |
}, |
|
313 |
// 取消按钮 |
|
314 |
cancel() { |
|
315 |
this.open = false; |
|
316 |
this.reset(); |
|
317 |
}, |
|
318 |
// 表单重置 |
|
319 |
reset() { |
|
320 |
this.form = { |
|
321 |
orderNumber: null, |
|
322 |
engineNo: null, |
|
323 |
productType: null, |
|
324 |
model: null, |
|
325 |
productionStatus: null, |
|
326 |
workingHours: null, |
|
327 |
currentWorkstation: null, |
|
328 |
qualityStatus: null, |
|
329 |
whetherOrPrint: null, |
|
330 |
report10: null, |
|
331 |
report20: null, |
|
332 |
combinedBoxLaunch: null, |
|
333 |
finalAssemblyOffline: null, |
|
334 |
operator: null, |
|
335 |
operateTime: null |
|
336 |
}; |
|
337 |
this.resetForm("form"); |
|
338 |
}, |
|
339 |
/** 搜索按钮操作 */ |
|
340 |
handleQuery() { |
|
341 |
this.queryParams.pageNum = 1; |
|
342 |
this.getList(); |
|
343 |
}, |
|
344 |
/** 重置按钮操作 */ |
|
345 |
resetQuery() { |
|
346 |
this.resetForm("queryForm"); |
|
347 |
this.handleQuery(); |
|
348 |
}, |
|
349 |
// 多选框选中数据 |
|
350 |
handleSelectionChange(selection) { |
|
351 |
this.ids = selection.map(item => item.orderNumber) |
|
352 |
this.single = selection.length!==1 |
|
353 |
this.multiple = !selection.length |
|
354 |
}, |
|
355 |
/** 新增按钮操作 */ |
|
356 |
handleAdd() { |
|
357 |
this.reset(); |
|
358 |
this.open = true; |
|
359 |
this.titleName = "添加订单排产"; |
|
360 |
}, |
|
361 |
/** 修改按钮操作 */ |
|
362 |
handleUpdate(row) { |
|
363 |
this.reset(); |
|
364 |
const orderNumber = row.orderNumber || this.ids |
|
365 |
getOrderScheduling(orderNumber).then(response => { |
|
366 |
this.form = response.data; |
|
367 |
this.open = true; |
|
368 |
this.titleName = "修改订单排产"; |
|
369 |
}); |
|
370 |
}, |
|
371 |
/** 提交按钮 */ |
|
372 |
submitForm() { |
|
373 |
this.$refs["form"].validate(valid => { |
|
374 |
if (valid) { |
|
375 |
if (this.form.orderNumber != null) { |
|
376 |
updateOrderScheduling(this.form).then(response => { |
|
377 |
this.$modal.msgSuccess("修改成功"); |
|
378 |
this.open = false; |
|
379 |
this.getList(); |
|
380 |
}); |
|
381 |
} else { |
|
382 |
addOrderScheduling(this.form).then(response => { |
|
383 |
this.$modal.msgSuccess("新增成功"); |
|
384 |
this.open = false; |
|
385 |
this.getList(); |
|
386 |
}); |
|
387 |
} |
|
388 |
} |
|
389 |
}); |
|
390 |
}, |
|
391 |
/** 删除按钮操作 */ |
|
392 |
handleDelete(row) { |
|
393 |
const orderNumbers = row.orderNumber || this.ids; |
|
394 |
this.$modal.confirm('是否确认删除订单排产编号为"' + orderNumbers + '"的数据项?').then(function() { |
|
395 |
return delOrderScheduling(orderNumbers); |
|
396 |
}).then(() => { |
|
397 |
this.getList(); |
|
398 |
this.$modal.msgSuccess("删除成功"); |
|
399 |
}).catch(() => {}); |
|
400 |
}, |
|
401 |
/** 导出按钮操作 */ |
|
402 |
handleExport() { |
|
403 |
this.download('bs/orderScheduling/export', { |
|
404 |
...this.queryParams |
|
405 |
}, `orderScheduling_${new Date().getTime()}.xlsx`) |
|
406 |
} |
|
407 |
} |
|
408 |
}; |
|
409 |
</script> |