CheckStepThreeDataForm.vue
24.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
<template>
<a-spin :spinning="confirmLoading">
<j-form-container :disabled="formDisabled">
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
<a-form-item :wrapperCol="{span: 19, offset: 5}">
<a-button type="primary" @click="prevStep()">上一步</a-button>
<a-button style="margin-left: 3px;" type="primary" @click="nextSteps()">下一步</a-button>
</a-form-item>
<a-row>
<a-col :span="24">
<a-form-model-item label="sn编码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="snCodes">
<a-input v-model="model.snCode" type="text" placeholder="请输入sn编码" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
<span style="font-size: 22px;">三(1)电流 (Q/320583 CJTL 002--2024),使用LST630弧焊电源测试台调试检验</span>
<a-row>
<a-col :span="24">
<a-form-model-item label="50.0" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dl1">
<a-input style="width: 100px;" v-model="model.dl1" type="text" placeholder="测量值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dl1v2" type="text" placeholder="显示值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dl1v3" type="text" placeholder="输出值误差" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dl1v4" type="text" placeholder="示值误差" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.dl1v5">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="Fail">Fail </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="100.0" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dl2">
<a-input style="width: 100px;" v-model="model.dl2" type="text" placeholder="测量值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dl2v2" type="text" placeholder="显示值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dl2v3" type="text" placeholder="输出值误差" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dl2v4" type="text" placeholder="示值误差" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.dl2v5">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="Fail">Fail </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="150.0" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dl3">
<a-input style="width: 100px;" v-model="model.dl3" type="text" placeholder="测量值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dl3v2" type="text" placeholder="显示值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dl3v3" type="text" placeholder="输出值误差" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dl3v4" type="text" placeholder="示值误差" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.dl3v5">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="Fail">Fail </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="200.0" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dl4">
<a-input style="width: 100px;" v-model="model.dl4" type="text" placeholder="测量值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dl4v2" type="text" placeholder="显示值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dl4v3" type="text" placeholder="输出值误差" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dl4v4" type="text" placeholder="示值误差" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.dl4v5">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="Fail">Fail </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<span style="font-size: 22px;">三(2)电压(JJF(机械)1025-2019)</span>
<span style="font-size: 22px;">a、实际电压和焊接电源显示电压调试检验</span>
<a-row>
<a-col :span="24">
<a-form-model-item label="9.0" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dy1">
<a-input style="width: 100px;" v-model="model.dy1" type="text" placeholder="测量值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy1v2" type="text" placeholder="显示值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy1v3" type="text" placeholder="输出值误差" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy1v4" type="text" placeholder="示值误差" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.dy1v5">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="Fail">Fail </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="10.2" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dy2">
<a-input style="width: 100px;" v-model="model.dy2" type="text" placeholder="测量值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy2v2" type="text" placeholder="显示值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy2v3" type="text" placeholder="输出值误差" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy2v4" type="text" placeholder="示值误差" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.dy2v5">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="Fail">Fail </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="11.0" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dy3">
<a-input style="width: 100px;" v-model="model.dy3" type="text" placeholder="测量值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy3v2" type="text" placeholder="显示值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy3v3" type="text" placeholder="输出值误差" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy3v4" type="text" placeholder="示值误差" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.dy3v5">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="Fail">Fail </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="26.0" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dy4">
<a-input style="width: 100px;" v-model="model.dy4" type="text" placeholder="测量值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy4v2" type="text" placeholder="显示值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy4v3" type="text" placeholder="输出值误差" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy4v4" type="text" placeholder="示值误差" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.dy4v5">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="Fail">Fail </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<span style="font-size: 22px;">b、自动弧压控制功能(AVC)检验,使用TOA130焊枪调试检验</span>
<a-row>
<a-col :span="24">
<a-form-model-item label="10.0" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dy5">
<a-input style="width: 100px;" v-model="model.dy5" type="text" placeholder="测量值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy5v2" type="text" placeholder="显示值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy5v3" type="text" placeholder="输出值误差" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy5v4" type="text" placeholder="示值误差" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.dy5v5">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="noPass">noPass </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="12.0" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dy6">
<a-input style="width: 100px;" v-model="model.dy6" type="text" placeholder="测量值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy6v2" type="text" placeholder="显示值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy6v3" type="text" placeholder="输出值误差" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.dy6v4" type="text" placeholder="示值误差" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.dy6v5">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="noPass">noPass </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<span style="font-size: 22px;">三(3)旋转速度(Q/320583 CJTL 002--2024)</span>
<span style="font-size: 22px;">a、码盘反馈频率检验</span>
<a-row>
<a-col :span="24">
<a-form-model-item label="设定最小速度55" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xzsudu1">
<a-input style="width: 100px;" v-model="model.xzsudu1" type="text" placeholder="实测码盘反馈频率值" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.xzsudu1v2">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="noPass">noPass </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="设定最大速度1100" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xzsudu2">
<a-input style="width: 100px;" v-model="model.xzsudu2" type="text" placeholder="实测码盘反馈频率值" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.xzsudu2v2">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="noPass">noPass </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<span style="font-size: 22px;">b、实际旋转速度检验</span>
<a-row>
<a-col :span="24">
<a-form-model-item label="100" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xzsudu3">
<a-input style="width: 100px;" v-model="model.xzsudu3" type="text" placeholder="测量值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.xzsudu3v2" type="text" placeholder="显示值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.xzsudu3v3" type="text" placeholder="输出值误差" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.xzsudu3v4" type="text" placeholder="示值误差" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.xzsudu3v5">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="noPass">noPass </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="200" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="xzsudu4">
<a-input style="width: 100px;" v-model="model.xzsudu4" type="text" placeholder="测量值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.xzsudu4v2" type="text" placeholder="显示值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.xzsudu4v3" type="text" placeholder="输出值误差" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.xzsudu4v4" type="text" placeholder="示值误差" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.xzsudu4v5">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="noPass">noPass </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<span style="font-size: 22px;">三(4)送丝速度(Q/320583 CJTL 002--2024)</span>
<span style="font-size: 22px;">a、码盘反馈频率检验</span>
<a-row>
<a-col :span="24">
<a-form-model-item label="设定最小速度55" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sssudu1">
<a-input style="width: 100px;" v-model="model.sssudu1" type="text" placeholder="实测码盘反馈频率值" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.sssudu1v2">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="noPass">noPass </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="设定最大速度1100" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sssudu2">
<a-input style="width: 100px;" v-model="model.sssudu2" type="text" placeholder="实测码盘反馈频率值" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.sssudu2v2">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="noPass">noPass </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<span style="font-size: 22px;">b、实际送丝速度检验</span>
<a-row>
<a-col :span="24">
<a-form-model-item label="100" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sssudu3">
<a-input style="width: 100px;" v-model="model.sssudu3" type="text" placeholder="测量值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.sssudu3v2" type="text" placeholder="显示值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.sssudu3v3" type="text" placeholder="输出值误差" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.sssudu3v4" type="text" placeholder="示值误差" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.sssudu3v5">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="noPass">noPass </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
<a-col :span="24">
<a-form-model-item label="200" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sssudu4">
<a-input style="width: 100px;" v-model="model.sssudu4" type="text" placeholder="测量值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.sssudu4v2" type="text" placeholder="显示值" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.sssudu4v3" type="text" placeholder="输出值误差" ></a-input>
<a-input style="width: 100px;margin-left: 3px;" v-model="model.sssudu4v4" type="text" placeholder="示值误差" ></a-input>
<a-select style="width: 150px;margin-left: 3px;" placeholder="请选择判定结果" v-model="model.sssudu4v5">
<a-select-option value="Pass">Pass</a-select-option>
<a-select-option value="noPass">noPass </a-select-option>
</a-select>
</a-form-model-item>
</a-col>
</a-row>
<span style="font-size: 22px;">四、 iOrbital 5000W数字化管焊电源抗干扰检验</span>
<a-row>
<a-col :span="24">
<span style="font-size: 16px;color: #00A0E9">1.高频起弧过程中的抗干扰性能。</span>
<a-form-model-item label="≥95%" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="kgr1">
<a-input style="width: 100px;" v-model="model.kgr1" type="text" placeholder="检验结果" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<span style="font-size: 16px;color: #00A0E9">2.高频起弧过程中的抗干扰性能。</span>
<a-form-model-item label="≤2%" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="kgr2">
<a-input style="width: 100px;" v-model="model.kgr2" type="text" placeholder="检验结果" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<span style="font-size: 16px;color: #00A0E9">3.高频起弧过程中的抗干扰性能。</span>
<a-form-model-item label="≤1%" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="kgr3">
<a-input style="width: 100px;" v-model="model.kgr3" type="text" placeholder="检验结果" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<span style="font-size: 16px;color: #00A0E9">4.焊接过程中的抗干扰性能。</span>
<a-form-model-item label="≤1次" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="kgr4">
<a-input style="width: 100px;" v-model="model.kgr4" type="text" placeholder="检验结果" ></a-input>
</a-form-model-item>
</a-col>
<a-col :span="24">
<span style="font-size: 16px;color: #00A0E9">5.待机时抗外界干扰性能。</span>
<a-form-model-item label="≤1%" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="kgr5">
<a-input style="width: 100px;" v-model="model.kgr5" type="text" placeholder="检验结果" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
<a-form-item :wrapperCol="{span: 19, offset: 5}">
<a-button type="primary" @click="prevStep()">上一步</a-button>
<a-button style="margin-left: 3px;" type="primary" @click="nextSteps()">下一步</a-button>
</a-form-item>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'CheckStepThreeDataForm',
components: {
},
props: {
// 添加 snCode 属性
snCode: {
type: String,
default: ''
},
// ... 其他已有的 props
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
snCode: [
{ required: true, message: '请输入sn编码!'},
],
},
url: {
add: "/jianyan/checkStepThreeData/add",
edit: "/jianyan/checkStepThreeData/edit",
queryById: "/jianyan/checkStepThreeData/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
let record={
dl1:'50.0', dl1v2:'50.0', dl1v3:'0.0',
dl1v4:'0', dl1v5:'Pass',
dl2:'100.0', dl2v2:'100.0', dl2v3:'0.0',
dl2v4:'0', dl2v5:'Pass',
dl3:'150.0', dl3v2:'150.0', dl3v3:'0.0',
dl3v4:'0', dl3v5:'Pass',
dl4:'200.0', dl4v2:'200.0', dl4v3:'0.0',
dl4v4:'0', dl4v5:'Pass',
dy1:'9.0', dy1v2:'9.0', dy1v3:'0.0',
dy1v4:'0', dy1v5:'Pass',
dy2:'10.2', dy2v2:'10.2', dy2v3:'0.0',
dy2v4:'0', dy2v5:'Pass',
dy3:'11.0', dy3v2:'11.0', dy3v3:'0.0',
dy3v4:'0', dy3v5:'Pass',
dy4:'26.0', dy4v2:'26.0', dy4v3:'0.0',
dy4v4:'0', dy4v5:'Pass',
dy5:'10.0', dy5v2:'10.0', dy5v3:'0.0',
dy5v4:'0', dy5v5:'Pass',
dy6:'12.0', dy6v2:'12.0', dy6v3:'0.0',
dy6v4:'0', dy6v5:'Pass',
xzsudu1:'55', xzsudu1v2:'Pass',
xzsudu2:'1100', xzsudu2v2:'Pass',
xzsudu3:'100', xzsudu3v2:'100', xzsudu3v3:'0',
xzsudu3v4:'0', xzsudu3v5:'Pass',
xzsudu4:'200', xzsudu4v2:'200', xzsudu4v3:'0',
xzsudu4v4:'0', xzsudu4v5:'Pass',
sssudu1:'55', sssudu1v2:'Pass',
sssudu2:'1100', sssudu2v2:'Pass',
sssudu3:'100', sssudu3v2:'100', sssudu3v3:'0',
sssudu3v4:'0', sssudu3v5:'Pass',
sssudu4:'200', sssudu4v2:'200', sssudu4v3:'0',
sssudu4v4:'0', sssudu4v5:'Pass',
kgr1:'100',
kgr2:'0',
kgr3:'0',
kgr4:'0',
kgr5:'0',
}
this.model = Object.assign({}, record);
this.model.snCode=this.snCode;
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
console.log(record)
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
// 触发表单验证
this.$refs.form.validate(valid => {
if (valid) {
that.confirmLoading = true;
let httpurl = '';
let method = '';
if(!this.model.id){
httpurl+=this.url.add;
method = 'post';
}else{
httpurl+=this.url.edit;
method = 'put';
}
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
that.$emit('ok');
}else{
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
nextSteps() {
this.submitForm ();
this.$emit('nextStep')
},
prevStep() {
if(this.model.snCode==undefined||this.model.snCode==''||this.model.snCode==null){
this.$message.warning('请先填写sn编码!');
return;
}
this.$emit('prevStep')
},
setSnCode(snCode){
console.log('2222===44=',snCode)
},
}
}
</script>