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