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