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