报废原因管理bug修复
This commit is contained in:
parent
9f98a65dea
commit
1afa702f6a
|
|
@ -251,7 +251,10 @@ export default {
|
|||
parentOption: [],
|
||||
typeOption: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
form: {
|
||||
parentId: undefined,
|
||||
typeId: undefined,
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
parentId: [
|
||||
|
|
@ -265,7 +268,7 @@ export default {
|
|||
{
|
||||
required: true,
|
||||
message: "名称不能为空",
|
||||
trigger: "change",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
reason: [
|
||||
|
|
@ -299,6 +302,7 @@ export default {
|
|||
/** 根据二级查三级类型下拉框 */
|
||||
handleChange() {
|
||||
this.typeOption = [];
|
||||
setTimeout(()=>{
|
||||
getTypeOptionInfoThree({parentId:this.form.parentId}).then((response) => {
|
||||
response.data.forEach((item) => {
|
||||
this.typeOption.push({
|
||||
|
|
@ -306,7 +310,9 @@ export default {
|
|||
typeName: item.typeName,
|
||||
});
|
||||
});
|
||||
this.form.typeId = null; // 清空名称输入框的值
|
||||
});
|
||||
},500)
|
||||
},
|
||||
|
||||
|
||||
|
|
@ -323,6 +329,7 @@ export default {
|
|||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
// this.form.typeId = undefined; // 重置名称输入框的值
|
||||
this.showDevice = true;
|
||||
this.title = "新增";
|
||||
},
|
||||
|
|
@ -347,7 +354,10 @@ export default {
|
|||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {};
|
||||
this.form = {
|
||||
parentId: undefined,
|
||||
typeId: undefined,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue