更新
This commit is contained in:
@@ -158,7 +158,10 @@ export default {
|
||||
productRowData: {},
|
||||
configAutocomplete: {
|
||||
serveTarget: refineryInfoServe.findByEntity,
|
||||
autocompleteKey: "refineryName",
|
||||
autocompleteKey: {
|
||||
key: "refineryName",
|
||||
enableMark: "ENABLE",
|
||||
},
|
||||
labelKey: "refineryName",
|
||||
valueKey: "id",
|
||||
placeholder: "炼厂名称",
|
||||
@@ -188,6 +191,23 @@ export default {
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openDrawer() {
|
||||
this.form = {};
|
||||
let { id } = this.controlWindows.addInfo;
|
||||
if (id) {
|
||||
//回显
|
||||
this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
|
||||
this.configAutocomplete.echoId = id;
|
||||
this.configAutocomplete.echoName = this.form.refineryName;
|
||||
this.form.salePrice = this.form.salePrice2company;
|
||||
this.form.productId = this.form.id;
|
||||
// delete this.form.id;
|
||||
this.rowCreate = true;
|
||||
this.productChange();
|
||||
} else {
|
||||
this.rowCreate = false;
|
||||
}
|
||||
},
|
||||
productDataList(e) {
|
||||
this.productRowData = this.productNameList.filter((item) => item.id == e);
|
||||
this.form.salePrice = this.productRowData[0].salePrice2company;
|
||||
@@ -221,23 +241,7 @@ export default {
|
||||
});
|
||||
}
|
||||
},
|
||||
openDrawer() {
|
||||
this.form = {};
|
||||
let { id } = this.controlWindows.addInfo;
|
||||
if (id) {
|
||||
//回显
|
||||
this.form = JSON.parse(JSON.stringify(this.controlWindows.addInfo));
|
||||
this.configAutocomplete.echoId = id;
|
||||
this.configAutocomplete.echoName = this.form.refineryName;
|
||||
this.form.salePrice = this.form.salePrice2company;
|
||||
this.form.productId = this.form.id;
|
||||
delete this.form.id;
|
||||
this.rowCreate = true;
|
||||
this.productChange();
|
||||
} else {
|
||||
this.rowCreate = false;
|
||||
}
|
||||
},
|
||||
|
||||
submit() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
@@ -262,7 +266,7 @@ export default {
|
||||
this.form = {};
|
||||
this.customList = [];
|
||||
this.controlWindows.addInfo = {};
|
||||
this.configAutocomplete = {};
|
||||
// this.configAutocomplete = {};
|
||||
this.productNameList = [];
|
||||
this.$refs.form.clearValidate();
|
||||
this.controlWindows.create = false;
|
||||
|
||||
Reference in New Issue
Block a user