fix:工装类具类型新增中的保养周期增加校验-必须为数字
This commit is contained in:
parent
f09dc5ad83
commit
b726af2e5d
@ -268,6 +268,9 @@ export default {
|
|||||||
],
|
],
|
||||||
remark: [
|
remark: [
|
||||||
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
{ max: 250, message: '长度必须小于250个字符', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
maintenPeriod: [
|
||||||
|
{ pattern: /^-?\d+(\.\d+)?$/, message: '输入必须为数字类型', trigger: 'blur' }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -357,19 +360,19 @@ export default {
|
|||||||
submitForm() {
|
submitForm() {
|
||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.toolTypeId != null) {
|
// if (this.form.toolTypeId != null) {
|
||||||
updateTooltype(this.form).then(response => {
|
// updateTooltype(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
// this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
// this.open = false;
|
||||||
this.getList();
|
// this.getList();
|
||||||
});
|
// });
|
||||||
} else {
|
// } else {
|
||||||
addTooltype(this.form).then(response => {
|
// addTooltype(this.form).then(response => {
|
||||||
this.$modal.msgSuccess("新增成功");
|
// this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
// this.open = false;
|
||||||
this.getList();
|
// this.getList();
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user