提交 | 用户 | 时间
|
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"> |
2aea64
|
5 |
<el-form-item label="订单编号" prop="orderNo"> |
d9cf6b
|
6 |
<el-input |
2aea64
|
7 |
v-model="queryParams.orderNo" |
d9cf6b
|
8 |
placeholder="请输入订单编号" |
J |
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> |
2aea64
|
21 |
|
d9cf6b
|
22 |
<el-form-item label="机型" prop="model"> |
J |
23 |
<el-input |
|
24 |
v-model="queryParams.model" |
|
25 |
placeholder="请输入机型" |
|
26 |
clearable |
|
27 |
@keyup.enter.native="handleQuery" |
|
28 |
/> |
|
29 |
</el-form-item> |
2aea64
|
30 |
|
d9cf6b
|
31 |
<el-form-item label="工时" prop="workingHours"> |
J |
32 |
<el-input |
|
33 |
v-model="queryParams.workingHours" |
|
34 |
placeholder="请输入工时" |
|
35 |
clearable |
|
36 |
@keyup.enter.native="handleQuery" |
|
37 |
/> |
|
38 |
</el-form-item> |
|
39 |
<el-form-item label="当前工位" prop="currentWorkstation"> |
|
40 |
<el-input |
|
41 |
v-model="queryParams.currentWorkstation" |
|
42 |
placeholder="请输入当前工位" |
|
43 |
clearable |
|
44 |
@keyup.enter.native="handleQuery" |
|
45 |
/> |
|
46 |
</el-form-item> |
2aea64
|
47 |
|
d9cf6b
|
48 |
<el-form-item label="是否打印" prop="whetherOrPrint"> |
J |
49 |
<el-input |
|
50 |
v-model="queryParams.whetherOrPrint" |
|
51 |
placeholder="请输入是否打印" |
|
52 |
clearable |
|
53 |
@keyup.enter.native="handleQuery" |
|
54 |
/> |
|
55 |
</el-form-item> |
|
56 |
<el-form-item label="10报工" prop="report10"> |
|
57 |
<el-input |
|
58 |
v-model="queryParams.report10" |
|
59 |
placeholder="请输入10报工" |
|
60 |
clearable |
|
61 |
@keyup.enter.native="handleQuery" |
|
62 |
/> |
|
63 |
</el-form-item> |
|
64 |
<el-form-item label="20报工" prop="report20"> |
|
65 |
<el-input |
|
66 |
v-model="queryParams.report20" |
|
67 |
placeholder="请输入20报工" |
|
68 |
clearable |
|
69 |
@keyup.enter.native="handleQuery" |
|
70 |
/> |
|
71 |
</el-form-item> |
|
72 |
<el-form-item label="操作人" prop="operator"> |
|
73 |
<el-input |
|
74 |
v-model="queryParams.operator" |
|
75 |
placeholder="请输入操作人" |
2aea64
|
76 |
clearable |
J |
77 |
@keyup.enter.native="handleQuery" |
|
78 |
/> |
|
79 |
</el-form-item> |
|
80 |
|
82939b
|
81 |
<!-- <el-form-item label="预留字段1" prop="spareField1">--> |
J |
82 |
<!-- <el-input--> |
|
83 |
<!-- v-model="queryParams.spareField1"--> |
|
84 |
<!-- placeholder="请输入预留字段1"--> |
|
85 |
<!-- clearable--> |
|
86 |
<!-- @keyup.enter.native="handleQuery"--> |
|
87 |
<!-- />--> |
|
88 |
<!-- </el-form-item>--> |
|
89 |
<!-- <el-form-item label="预留字段2" prop="spareField2">--> |
|
90 |
<!-- <el-input--> |
|
91 |
<!-- v-model="queryParams.spareField2"--> |
|
92 |
<!-- placeholder="请输入预留字段2"--> |
|
93 |
<!-- clearable--> |
|
94 |
<!-- @keyup.enter.native="handleQuery"--> |
|
95 |
<!-- />--> |
|
96 |
<!-- </el-form-item>--> |
|
97 |
<!-- <el-form-item label="预留字段3" prop="spareField3">--> |
|
98 |
<!-- <el-input--> |
|
99 |
<!-- v-model="queryParams.spareField3"--> |
|
100 |
<!-- placeholder="请输入预留字段3"--> |
|
101 |
<!-- clearable--> |
|
102 |
<!-- @keyup.enter.native="handleQuery"--> |
|
103 |
<!-- />--> |
|
104 |
<!-- </el-form-item>--> |
|
105 |
<!-- <el-form-item label="预留字段4" prop="spareField4">--> |
|
106 |
<!-- <el-input--> |
|
107 |
<!-- v-model="queryParams.spareField4"--> |
|
108 |
<!-- placeholder="请输入预留字段4"--> |
|
109 |
<!-- clearable--> |
|
110 |
<!-- @keyup.enter.native="handleQuery"--> |
|
111 |
<!-- />--> |
|
112 |
<!-- </el-form-item>--> |
|
113 |
<!-- <el-form-item label="创建用户" prop="createUser">--> |
|
114 |
<!-- <el-input--> |
|
115 |
<!-- v-model="queryParams.createUser"--> |
|
116 |
<!-- placeholder="请输入创建用户"--> |
|
117 |
<!-- clearable--> |
|
118 |
<!-- @keyup.enter.native="handleQuery"--> |
|
119 |
<!-- />--> |
|
120 |
<!-- </el-form-item>--> |
|
121 |
<!-- <el-form-item label="更改用户" prop="updateUser">--> |
|
122 |
<!-- <el-input--> |
|
123 |
<!-- v-model="queryParams.updateUser"--> |
|
124 |
<!-- placeholder="请输入更改用户"--> |
|
125 |
<!-- clearable--> |
|
126 |
<!-- @keyup.enter.native="handleQuery"--> |
|
127 |
<!-- />--> |
|
128 |
<!-- </el-form-item>--> |
|
129 |
<!-- <el-form-item label="备注" prop="remarks">--> |
|
130 |
<!-- <el-input--> |
|
131 |
<!-- v-model="queryParams.remarks"--> |
|
132 |
<!-- placeholder="请输入备注"--> |
|
133 |
<!-- clearable--> |
|
134 |
<!-- @keyup.enter.native="handleQuery"--> |
|
135 |
<!-- />--> |
|
136 |
<!-- </el-form-item>--> |
d9cf6b
|
137 |
<el-form-item style="float: right"> |
J |
138 |
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button> |
82939b
|
139 |
<el-button type="warning" icon="el-icon-copy-document" size="mini" @click="advancedQuery">高级查询</el-button> |
d9cf6b
|
140 |
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button> |
J |
141 |
</el-form-item> |
|
142 |
</el-form> |
|
143 |
</el-card> |
|
144 |
|
|
145 |
<el-card style="margin-top: 10px" class="box-card"> |
|
146 |
<el-row :gutter="10" class="mb8"> |
|
147 |
<el-col :span="1.5"> |
|
148 |
<el-button |
|
149 |
type="primary" |
|
150 |
plain |
|
151 |
icon="el-icon-plus" |
|
152 |
size="mini" |
|
153 |
@click="handleAdd" |
|
154 |
v-hasPermi="['bs:orderScheduling:add']" |
|
155 |
>新增</el-button> |
|
156 |
</el-col> |
|
157 |
<el-col :span="1.5"> |
|
158 |
<el-button |
|
159 |
type="success" |
|
160 |
plain |
|
161 |
icon="el-icon-edit" |
|
162 |
size="mini" |
|
163 |
:disabled="single" |
|
164 |
@click="handleUpdate" |
|
165 |
v-hasPermi="['bs:orderScheduling:edit']" |
|
166 |
>修改</el-button> |
|
167 |
</el-col> |
|
168 |
<el-col :span="1.5"> |
|
169 |
<el-button |
|
170 |
type="danger" |
|
171 |
plain |
|
172 |
icon="el-icon-delete" |
|
173 |
size="mini" |
|
174 |
:disabled="multiple" |
|
175 |
@click="handleDelete" |
|
176 |
v-hasPermi="['bs:orderScheduling:remove']" |
|
177 |
>删除</el-button> |
|
178 |
</el-col> |
|
179 |
<el-col :span="1.5"> |
|
180 |
<el-button |
|
181 |
type="warning" |
|
182 |
plain |
|
183 |
icon="el-icon-download" |
|
184 |
size="mini" |
|
185 |
@click="handleExport" |
|
186 |
v-hasPermi="['bs:orderScheduling:export']" |
|
187 |
>导出</el-button> |
|
188 |
</el-col> |
|
189 |
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> |
|
190 |
</el-row> |
|
191 |
|
|
192 |
<el-table border v-loading="loading" :data="orderSchedulingList" @selection-change="handleSelectionChange"> |
|
193 |
<el-table-column type="selection" width="55" align="center" /> |
2aea64
|
194 |
<el-table-column label="ID" align="center" prop="id" /> |
J |
195 |
<el-table-column label="订单编号" align="center" prop="orderNo"> |
|
196 |
|
d9cf6b
|
197 |
</el-table-column> |
J |
198 |
<el-table-column label="发动机号" align="center" prop="engineNo"> |
2aea64
|
199 |
|
d9cf6b
|
200 |
</el-table-column> |
J |
201 |
<el-table-column label="产品类型" align="center" prop="productType"> |
2aea64
|
202 |
|
d9cf6b
|
203 |
</el-table-column> |
J |
204 |
<el-table-column label="机型" align="center" prop="model"> |
2aea64
|
205 |
|
d9cf6b
|
206 |
</el-table-column> |
J |
207 |
<el-table-column label="生产状态" align="center" prop="productionStatus"> |
2aea64
|
208 |
|
d9cf6b
|
209 |
</el-table-column> |
J |
210 |
<el-table-column label="工时" align="center" prop="workingHours"> |
2aea64
|
211 |
|
d9cf6b
|
212 |
</el-table-column> |
J |
213 |
<el-table-column label="当前工位" align="center" prop="currentWorkstation"> |
2aea64
|
214 |
|
d9cf6b
|
215 |
</el-table-column> |
J |
216 |
<el-table-column label="质量状态" align="center" prop="qualityStatus"> |
2aea64
|
217 |
|
d9cf6b
|
218 |
</el-table-column> |
J |
219 |
<el-table-column label="是否打印" align="center" prop="whetherOrPrint"> |
2aea64
|
220 |
|
d9cf6b
|
221 |
</el-table-column> |
J |
222 |
<el-table-column label="10报工" align="center" prop="report10"> |
2aea64
|
223 |
|
d9cf6b
|
224 |
</el-table-column> |
J |
225 |
<el-table-column label="20报工" align="center" prop="report20"> |
|
226 |
|
|
227 |
</el-table-column> |
2aea64
|
228 |
<el-table-column label="合箱上线" align="center" prop="combinedBoxTime"> |
d9cf6b
|
229 |
|
J |
230 |
</el-table-column> |
2aea64
|
231 |
<el-table-column label="总装下线" align="center" prop="finalAssemblyTime"> |
d9cf6b
|
232 |
|
J |
233 |
</el-table-column> |
|
234 |
<el-table-column label="操作人" align="center" prop="operator"> |
|
235 |
|
|
236 |
</el-table-column> |
|
237 |
<el-table-column label="操作时间" align="center" prop="operateTime"> |
2aea64
|
238 |
|
J |
239 |
</el-table-column> |
82939b
|
240 |
<!-- <el-table-column label="状态" align="center" prop="status">--> |
2aea64
|
241 |
|
82939b
|
242 |
<!-- </el-table-column>--> |
J |
243 |
<!-- <el-table-column label="预留字段1" align="center" prop="spareField1">--> |
2aea64
|
244 |
|
82939b
|
245 |
<!-- </el-table-column>--> |
J |
246 |
<!-- <el-table-column label="预留字段2" align="center" prop="spareField2">--> |
2aea64
|
247 |
|
82939b
|
248 |
<!-- </el-table-column>--> |
J |
249 |
<!-- <el-table-column label="预留字段3" align="center" prop="spareField3">--> |
2aea64
|
250 |
|
82939b
|
251 |
<!-- </el-table-column>--> |
J |
252 |
<!-- <el-table-column label="预留字段4" align="center" prop="spareField4">--> |
2aea64
|
253 |
|
82939b
|
254 |
<!-- </el-table-column>--> |
J |
255 |
<!-- <el-table-column label="创建用户" align="center" prop="createUser">--> |
2aea64
|
256 |
|
82939b
|
257 |
<!-- </el-table-column>--> |
J |
258 |
<!-- <el-table-column label="更改用户" align="center" prop="updateUser">--> |
2aea64
|
259 |
|
82939b
|
260 |
<!-- </el-table-column>--> |
J |
261 |
<!-- <el-table-column label="备注" align="center" prop="remarks">--> |
d9cf6b
|
262 |
|
82939b
|
263 |
<!-- </el-table-column>--> |
d9cf6b
|
264 |
<el-table-column fixed="right" width="200" label="操作" align="center" class-name="small-padding fixed-width"> |
J |
265 |
<template slot-scope="scope"> |
|
266 |
<el-button |
|
267 |
size="mini" |
|
268 |
type="success" |
|
269 |
plain |
|
270 |
style="width: 72px" |
|
271 |
icon="el-icon-edit" |
|
272 |
@click="handleUpdate(scope.row)" |
|
273 |
v-hasPermi="['bs:orderScheduling:edit']" |
|
274 |
>修改</el-button> |
|
275 |
<el-button |
|
276 |
size="mini" |
|
277 |
type="danger" |
|
278 |
plain |
|
279 |
style="width: 72px" |
|
280 |
icon="el-icon-delete" |
|
281 |
@click="handleDelete(scope.row)" |
|
282 |
v-hasPermi="['bs:orderScheduling:remove']" |
|
283 |
>删除</el-button> |
|
284 |
</template> |
|
285 |
</el-table-column> |
|
286 |
</el-table> |
|
287 |
</el-card> |
|
288 |
|
|
289 |
<pagination |
|
290 |
v-show="total>0" |
|
291 |
:total="total" |
|
292 |
:page.sync="queryParams.pageNum" |
|
293 |
:limit.sync="queryParams.pageSize" |
|
294 |
@pagination="getList" |
|
295 |
/> |
|
296 |
|
|
297 |
<!-- 添加或修改订单排产对话框 --> |
|
298 |
<el-dialog v-dialogpop-up :title="title" :visible.sync="open" width="500px" append-to-body> |
|
299 |
<span slot="title"> |
|
300 |
<i class="el-icon-s-order"></i> |
|
301 |
{{titleName}} |
|
302 |
</span> |
|
303 |
<el-form ref="form" :model="form" :rules="rules" label-width="80px"> |
2aea64
|
304 |
<el-form-item label="订单编号" prop="orderNo"> |
J |
305 |
<el-input v-model="form.orderNo" placeholder="请输入订单编号" /> |
d9cf6b
|
306 |
</el-form-item> |
J |
307 |
<el-form-item label="发动机号" prop="engineNo"> |
|
308 |
<el-input v-model="form.engineNo" placeholder="请输入发动机号" /> |
|
309 |
</el-form-item> |
2aea64
|
310 |
<el-form-item label="产品类型" prop="productType"> |
J |
311 |
<el-select v-model="form.productType" placeholder="请选择产品类型"> |
|
312 |
<!-- <el-option--> |
|
313 |
<!-- v-for="dict in dict.type.${dictType}"--> |
|
314 |
<!-- :key="dict.value"--> |
|
315 |
<!-- :label="dict.label"--> |
|
316 |
<!-- :value="dict.value"--> |
|
317 |
<!-- ></el-option>--> |
|
318 |
</el-select> |
|
319 |
</el-form-item> |
d9cf6b
|
320 |
<el-form-item label="机型" prop="model"> |
J |
321 |
<el-input v-model="form.model" placeholder="请输入机型" /> |
2aea64
|
322 |
</el-form-item> |
J |
323 |
<el-form-item label="生产状态" prop="productionStatus"> |
|
324 |
<el-radio-group v-model="form.productionStatus"> |
|
325 |
<!-- <el-radio--> |
|
326 |
<!-- v-for="dict in dict.type.${dictType}"--> |
|
327 |
<!-- :key="dict.value"--> |
|
328 |
<!-- :label="dict.value"--> |
|
329 |
<!-- >{{dict.label}}</el-radio>--> |
|
330 |
</el-radio-group> |
d9cf6b
|
331 |
</el-form-item> |
J |
332 |
<el-form-item label="工时" prop="workingHours"> |
|
333 |
<el-input v-model="form.workingHours" placeholder="请输入工时" /> |
|
334 |
</el-form-item> |
|
335 |
<el-form-item label="当前工位" prop="currentWorkstation"> |
|
336 |
<el-input v-model="form.currentWorkstation" placeholder="请输入当前工位" /> |
2aea64
|
337 |
</el-form-item> |
J |
338 |
<el-form-item label="质量状态" prop="qualityStatus"> |
|
339 |
<el-radio-group v-model="form.qualityStatus"> |
|
340 |
<!-- <el-radio--> |
|
341 |
<!-- v-for="dict in dict.type.${dictType}"--> |
|
342 |
<!-- :key="dict.value"--> |
|
343 |
<!-- :label="dict.value"--> |
|
344 |
<!-- >{{dict.label}}</el-radio>--> |
|
345 |
</el-radio-group> |
d9cf6b
|
346 |
</el-form-item> |
J |
347 |
<el-form-item label="是否打印" prop="whetherOrPrint"> |
|
348 |
<el-input v-model="form.whetherOrPrint" placeholder="请输入是否打印" /> |
|
349 |
</el-form-item> |
|
350 |
<el-form-item label="10报工" prop="report10"> |
|
351 |
<el-input v-model="form.report10" placeholder="请输入10报工" /> |
|
352 |
</el-form-item> |
|
353 |
<el-form-item label="20报工" prop="report20"> |
|
354 |
<el-input v-model="form.report20" placeholder="请输入20报工" /> |
|
355 |
</el-form-item> |
|
356 |
<el-form-item label="操作人" prop="operator"> |
|
357 |
<el-input v-model="form.operator" placeholder="请输入操作人" /> |
2aea64
|
358 |
</el-form-item> |
J |
359 |
<el-form-item label="状态" prop="status"> |
|
360 |
<el-radio-group v-model="form.status"> |
|
361 |
<!-- <el-radio--> |
|
362 |
<!-- v-for="dict in dict.type.${dictType}"--> |
|
363 |
<!-- :key="dict.value"--> |
|
364 |
<!-- :label="dict.value"--> |
|
365 |
<!-- >{{dict.label}}</el-radio>--> |
|
366 |
</el-radio-group> |
|
367 |
</el-form-item> |
82939b
|
368 |
<!-- <el-form-item label="预留字段1" prop="spareField1">--> |
J |
369 |
<!-- <el-input v-model="form.spareField1" placeholder="请输入预留字段1" />--> |
|
370 |
<!-- </el-form-item>--> |
|
371 |
<!-- <el-form-item label="预留字段2" prop="spareField2">--> |
|
372 |
<!-- <el-input v-model="form.spareField2" placeholder="请输入预留字段2" />--> |
|
373 |
<!-- </el-form-item>--> |
|
374 |
<!-- <el-form-item label="预留字段3" prop="spareField3">--> |
|
375 |
<!-- <el-input v-model="form.spareField3" placeholder="请输入预留字段3" />--> |
|
376 |
<!-- </el-form-item>--> |
|
377 |
<!-- <el-form-item label="预留字段4" prop="spareField4">--> |
|
378 |
<!-- <el-input v-model="form.spareField4" placeholder="请输入预留字段4" />--> |
|
379 |
<!-- </el-form-item>--> |
|
380 |
<!-- <el-form-item label="创建用户" prop="createUser">--> |
|
381 |
<!-- <el-input v-model="form.createUser" placeholder="请输入创建用户" />--> |
|
382 |
<!-- </el-form-item>--> |
|
383 |
<!-- <el-form-item label="更改用户" prop="updateUser">--> |
|
384 |
<!-- <el-input v-model="form.updateUser" placeholder="请输入更改用户" />--> |
|
385 |
<!-- </el-form-item>--> |
|
386 |
<!-- <el-form-item label="备注" prop="remarks">--> |
|
387 |
<!-- <el-input v-model="form.remarks" placeholder="请输入备注" />--> |
|
388 |
<!-- </el-form-item>--> |
d9cf6b
|
389 |
</el-form> |
J |
390 |
<div slot="footer" class="dialog-footer"> |
|
391 |
<el-button type="primary" @click="submitForm">确 定</el-button> |
|
392 |
<el-button @click="cancel">取 消</el-button> |
|
393 |
</div> |
|
394 |
</el-dialog> |
|
395 |
</div> |
|
396 |
</template> |
|
397 |
|
|
398 |
<script> |
|
399 |
import { listOrderScheduling, getOrderScheduling, delOrderScheduling, addOrderScheduling, updateOrderScheduling } from "@/api/main/bs/orderScheduling/orderScheduling"; |
|
400 |
|
|
401 |
export default { |
|
402 |
name: "OrderScheduling", |
|
403 |
data() { |
|
404 |
return { |
|
405 |
// 遮罩层 |
|
406 |
loading: true, |
|
407 |
titleName: "", |
|
408 |
// 选中数组 |
|
409 |
ids: [], |
|
410 |
// 非单个禁用 |
|
411 |
single: true, |
|
412 |
// 非多个禁用 |
|
413 |
multiple: true, |
|
414 |
// 显示搜索条件 |
|
415 |
showSearch: true, |
|
416 |
// 总条数 |
|
417 |
total: 0, |
|
418 |
// 订单排产表格数据 |
|
419 |
orderSchedulingList: [], |
|
420 |
// 弹出层标题 |
|
421 |
title: "", |
|
422 |
// 是否显示弹出层 |
|
423 |
open: false, |
|
424 |
// 查询参数 |
|
425 |
queryParams: { |
|
426 |
pageNum: 1, |
|
427 |
pageSize: 10, |
2aea64
|
428 |
orderNo: null, |
d9cf6b
|
429 |
engineNo: null, |
J |
430 |
productType: null, |
|
431 |
model: null, |
|
432 |
productionStatus: null, |
|
433 |
workingHours: null, |
|
434 |
currentWorkstation: null, |
|
435 |
qualityStatus: null, |
|
436 |
whetherOrPrint: null, |
|
437 |
report10: null, |
|
438 |
report20: null, |
2aea64
|
439 |
combinedBoxTime: null, |
J |
440 |
finalAssemblyTime: null, |
d9cf6b
|
441 |
operator: null, |
2aea64
|
442 |
operateTime: null, |
J |
443 |
status: null, |
|
444 |
spareField1: null, |
|
445 |
spareField2: null, |
|
446 |
spareField3: null, |
|
447 |
spareField4: null, |
|
448 |
createUser: null, |
|
449 |
updateUser: null, |
|
450 |
remarks: null |
d9cf6b
|
451 |
}, |
J |
452 |
// 表单参数 |
|
453 |
form: {}, |
|
454 |
// 表单校验 |
|
455 |
rules: { |
2aea64
|
456 |
id: [ |
J |
457 |
{ required: true, message: "ID不能为空", trigger: "blur" } |
|
458 |
], |
d9cf6b
|
459 |
} |
J |
460 |
}; |
|
461 |
}, |
|
462 |
created() { |
|
463 |
this.getList(); |
|
464 |
}, |
|
465 |
methods: { |
|
466 |
/** 查询订单排产列表 */ |
|
467 |
getList() { |
|
468 |
this.loading = true; |
|
469 |
listOrderScheduling(this.queryParams).then(response => { |
|
470 |
this.orderSchedulingList = response.rows; |
|
471 |
this.total = response.total; |
|
472 |
this.loading = false; |
|
473 |
}); |
|
474 |
}, |
|
475 |
// 取消按钮 |
|
476 |
cancel() { |
|
477 |
this.open = false; |
|
478 |
this.reset(); |
|
479 |
}, |
|
480 |
// 表单重置 |
|
481 |
reset() { |
|
482 |
this.form = { |
2aea64
|
483 |
id: null, |
J |
484 |
orderNo: null, |
d9cf6b
|
485 |
engineNo: null, |
J |
486 |
productType: null, |
|
487 |
model: null, |
|
488 |
productionStatus: null, |
|
489 |
workingHours: null, |
|
490 |
currentWorkstation: null, |
|
491 |
qualityStatus: null, |
|
492 |
whetherOrPrint: null, |
|
493 |
report10: null, |
|
494 |
report20: null, |
2aea64
|
495 |
combinedBoxTime: null, |
J |
496 |
finalAssemblyTime: null, |
d9cf6b
|
497 |
operator: null, |
2aea64
|
498 |
operateTime: null, |
J |
499 |
status: null, |
|
500 |
spareField1: null, |
|
501 |
spareField2: null, |
|
502 |
spareField3: null, |
|
503 |
spareField4: null, |
|
504 |
createUser: null, |
|
505 |
createTime: null, |
|
506 |
updateUser: null, |
|
507 |
updateTime: null, |
|
508 |
remarks: null |
d9cf6b
|
509 |
}; |
J |
510 |
this.resetForm("form"); |
|
511 |
}, |
|
512 |
/** 搜索按钮操作 */ |
|
513 |
handleQuery() { |
|
514 |
this.queryParams.pageNum = 1; |
|
515 |
this.getList(); |
|
516 |
}, |
|
517 |
/** 重置按钮操作 */ |
|
518 |
resetQuery() { |
|
519 |
this.resetForm("queryForm"); |
|
520 |
this.handleQuery(); |
|
521 |
}, |
|
522 |
// 多选框选中数据 |
|
523 |
handleSelectionChange(selection) { |
2aea64
|
524 |
this.ids = selection.map(item => item.id) |
d9cf6b
|
525 |
this.single = selection.length!==1 |
J |
526 |
this.multiple = !selection.length |
|
527 |
}, |
|
528 |
/** 新增按钮操作 */ |
|
529 |
handleAdd() { |
|
530 |
this.reset(); |
|
531 |
this.open = true; |
|
532 |
this.titleName = "添加订单排产"; |
|
533 |
}, |
|
534 |
/** 修改按钮操作 */ |
|
535 |
handleUpdate(row) { |
|
536 |
this.reset(); |
2aea64
|
537 |
const id = row.id || this.ids |
J |
538 |
getOrderScheduling(id).then(response => { |
d9cf6b
|
539 |
this.form = response.data; |
J |
540 |
this.open = true; |
|
541 |
this.titleName = "修改订单排产"; |
|
542 |
}); |
|
543 |
}, |
|
544 |
/** 提交按钮 */ |
|
545 |
submitForm() { |
|
546 |
this.$refs["form"].validate(valid => { |
|
547 |
if (valid) { |
2aea64
|
548 |
if (this.form.id != null) { |
d9cf6b
|
549 |
updateOrderScheduling(this.form).then(response => { |
J |
550 |
this.$modal.msgSuccess("修改成功"); |
|
551 |
this.open = false; |
|
552 |
this.getList(); |
|
553 |
}); |
|
554 |
} else { |
|
555 |
addOrderScheduling(this.form).then(response => { |
|
556 |
this.$modal.msgSuccess("新增成功"); |
|
557 |
this.open = false; |
|
558 |
this.getList(); |
|
559 |
}); |
|
560 |
} |
|
561 |
} |
|
562 |
}); |
|
563 |
}, |
|
564 |
/** 删除按钮操作 */ |
|
565 |
handleDelete(row) { |
2aea64
|
566 |
const ids = row.id || this.ids; |
J |
567 |
this.$modal.confirm('是否确认删除订单排产编号为"' + ids + '"的数据项?').then(function() { |
|
568 |
return delOrderScheduling(ids); |
d9cf6b
|
569 |
}).then(() => { |
J |
570 |
this.getList(); |
|
571 |
this.$modal.msgSuccess("删除成功"); |
|
572 |
}).catch(() => {}); |
|
573 |
}, |
|
574 |
/** 导出按钮操作 */ |
|
575 |
handleExport() { |
|
576 |
this.download('bs/orderScheduling/export', { |
|
577 |
...this.queryParams |
|
578 |
}, `orderScheduling_${new Date().getTime()}.xlsx`) |
|
579 |
} |
|
580 |
} |
|
581 |
}; |
|
582 |
</script> |