| | |
| | | <a-input |
| | | placeholder="将由系统生成" |
| | | v-decorator="['num', validatorRules.num]" |
| | | disabled |
| | | /> |
| | | </a-form-item> |
| | | </a-col> |
| | |
| | | validatorRules: { |
| | | num: { |
| | | rules: [ |
| | | { required: true, message: '请输入设备分类编号!' }, |
| | | // { required: true, message: '请输入设备分类编号!' }, |
| | | { min: 2, max: 30, message: '长度在 2 到 30 个字符', trigger: 'blur' }, |
| | | // { validator: this.validateNum }, |
| | | ] |
| | |
| | | let formData = Object.assign(this.model, values); |
| | | let obj; |
| | | if (!this.model.id) { |
| | | // if(!formData.num){ |
| | | // await getAction(this.url.getNum, { type: 'SparePart', length: '4' }).then((res) => { |
| | | // if (res.success) { |
| | | // formData.num = res.message; |
| | | // } |
| | | // }); |
| | | // } |
| | | formData.sparePartCategoryId = this.sparePartCategoryId |
| | | obj = postAction(this.url.add, formData); |
| | | } else { |