CheckStepFourForm.vue
17.4 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
<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="submitclick()">提 交</a-button>
</a-form-item>
<a-row>
<a-col :span="24">
<a-form-model-item label="sncode" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="snCode">
<a-input v-model="model.snCode" placeholder="请输入sncode" ></a-input>
</a-form-model-item>
</a-col>
</a-row>
<span style="font-size: 22px;">一(7)、一般外观检验</span>
<a-row>
<a-col :span="26">
<a-form-model-item label="1.铭牌内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg1">
<a-input style="width: 200px;" v-model="model.ybwg1" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg1v1">
<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="26">
<a-form-model-item label="2.贴纸内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg2">
<a-input style="width: 200px;" v-model="model.ybwg2" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg2v1">
<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 >
<a-form-model-item label="3.说明书内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg3">
<a-input style="width: 200px;" v-model="model.ybwg3" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg3v1">
<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 >
<a-form-model-item label="4.输入线连接标记" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg4">
<a-input style="width: 200px;" v-model="model.ybwg4" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg4v1">
<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 >
<a-form-model-item label="5.接地端标记" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg5">
<a-input style="width: 200px;" v-model="model.ybwg5" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg5v1">
<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 >
<a-form-model-item label="6.机箱外壳" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg6">
<a-input style="width: 200px;" v-model="model.ybwg6" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg6v1">
<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 >
<a-form-model-item label="7.机箱表面油漆" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg7">
<a-input style="width: 200px;" v-model="model.ybwg7" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg7v1">
<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 style="font-size: 16px;color: #00A0E9">8.机箱表面丝印</span>
<a-form-model-item label="位置正确,无偏移,倾斜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg8">
<a-input style="width: 200px;" v-model="model.ybwg8" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg8v1">
<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 >
<a-form-model-item label="图标字符清晰完整" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg9">
<a-input style="width: 200px;" v-model="model.ybwg9" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg9v1">
<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 style="font-size: 16px;color: #00A0E9">9.控制面板</span>
<a-form-model-item label="表面清洁,字迹清晰,按钮手感良好" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg10">
<a-input style="width: 200px;" v-model="model.ybwg10" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg10v1">
<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 >
<a-form-model-item label="面膜粘合牢固、平整" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg11">
<a-input style="width: 200px;" v-model="model.ybwg11" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg11v1">
<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 >
<a-form-model-item label="面膜安装位置无误与按键相对应" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg12">
<a-input style="width: 200px;" v-model="model.ybwg12" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg12v1">
<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 style="font-size: 16px;color: #00A0E9">10.铭牌</span>
<a-form-model-item label="型号正确" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg13">
<a-input style="width: 200px;" v-model="model.ybwg13" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg13v1">
<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 >
<a-form-model-item label="标识内容清晰,完整,正确" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg14">
<a-input style="width: 200px;" v-model="model.ybwg14" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg14v1">
<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>
<a-form-model-item label="位置正确,无偏移,倾斜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg15">
<a-input style="width: 200px;" v-model="model.ybwg15" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg15v1">
<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 style="font-size: 16px;color: #00A0E9">11.紧固件</span>
<a-form-model-item label="规格使用正确,安装牢固,无变形" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg16">
<a-input style="width: 200px;" v-model="model.ybwg16" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg16v1">
<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 >
<a-form-model-item label="表面处理层完好,无锈迹,无压痕" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg17">
<a-input style="width: 200px;" v-model="model.ybwg17" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg17v1">
<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 style="font-size: 16px;color: #00A0E9">12.连接件</span>
<a-form-model-item label="航插安装位置正确规范" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg18">
<a-input style="width: 200px;" v-model="model.ybwg18" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg18v1">
<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 >
<a-form-model-item label="航插安装牢固、固定螺丝无松动" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg19">
<a-input style="width: 200px;" v-model="model.ybwg19" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg19v1">
<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 >
<a-form-model-item label="航插针安装牢固、无松动" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg20">
<a-input style="width: 200px;" v-model="model.ybwg20" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg20v1">
<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 >
<a-form-model-item label="进/出气接头安装位置正确规范" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg21">
<a-input style="width: 200px;" v-model="model.ybwg21" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg21v1">
<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 >
<a-form-model-item label="进/出气接头安装牢固、无跟转" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="ybwg22">
<a-input style="width: 200px;" v-model="model.ybwg22" placeholder="请输入检验结果" ></a-input>
<a-select style="width: 200px;" placeholder="请选择判定结果" v-model="model.ybwg22v1">
<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>
</a-form-model>
</j-form-container>
</a-spin>
</template>
<script>
import { httpAction, getAction } from '@/api/manage'
import { validateDuplicateValue } from '@/utils/util'
export default {
name: 'CheckStepFourForm',
components: {
},
props: {
//表单禁用
disabled: {
type: Boolean,
default: false,
required: false
}
},
data () {
return {
model:{
},
labelCol: {
xs: { span: 24 },
sm: { span: 5 },
},
wrapperCol: {
xs: { span: 24 },
sm: { span: 16 },
},
confirmLoading: false,
validatorRules: {
snCode: [
{ required: true, message: '请输入sncode!'},
],
},
url: {
add: "/jianyan/checkStepFour/add",
edit: "/jianyan/checkStepFour/edit",
queryById: "/jianyan/checkStepFour/queryById"
}
}
},
computed: {
formDisabled(){
return this.disabled
},
},
created () {
this.modelDefault = JSON.parse(JSON.stringify(this.model));
},
methods: {
add () {
this.edit(this.modelDefault);
},
edit (record) {
record= {
ybwg1: '合格', ybwg1v1: 'Pass',
ybwg2: '合格', ybwg2v1: 'Pass',
ybwg3: '合格', ybwg3v1: 'Pass',
ybwg4: '合格', ybwg4v1: 'Pass',
ybwg5: '合格', ybwg5v1: 'Pass',
ybwg6: '合格', ybwg6v1: 'Pass',
ybwg7: '合格', ybwg7v1: 'Pass',
ybwg8: '合格', ybwg8v1: 'Pass',
ybwg9: '合格', ybwg9v1: 'Pass',
ybwg10: '合格', ybwg10v1: 'Pass',
ybwg11: '合格', ybwg11v1: 'Pass',
ybwg12: '合格', ybwg12v1: 'Pass',
ybwg13: '合格', ybwg13v1: 'Pass',
ybwg14: '合格', ybwg14v1: 'Pass',
ybwg15: '合格', ybwg15v1: 'Pass',
ybwg16: '合格', ybwg16v1: 'Pass',
ybwg17: '合格', ybwg17v1: 'Pass',
ybwg18: '合格', ybwg18v1: 'Pass',
ybwg19: '合格', ybwg19v1: 'Pass',
ybwg20: '合格', ybwg20v1: 'Pass',
ybwg21: '合格', ybwg21v1: 'Pass',
ybwg22: '合格', ybwg22v1: 'Pass',
}
this.model = Object.assign({}, record);
this.visible = true;
},
submitForm () {
const that = this;
if(this.model.snCode==undefined||this.model.snCode==''){
this.$message.warning('请先填写sn编码!');
return;
}
// 触发表单验证
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;
})
}
})
},
submitclick(){
this.submitForm();
}
}
}
</script>
<style>
.ant-col-sm-5 {
display: block;
box-sizing: border-box;
width: 30.833333%;
}
</style>