更新
This commit is contained in:
@@ -158,7 +158,10 @@ export default {
|
|||||||
productRowData: {},
|
productRowData: {},
|
||||||
configAutocomplete: {
|
configAutocomplete: {
|
||||||
serveTarget: refineryInfoServe.findByEntity,
|
serveTarget: refineryInfoServe.findByEntity,
|
||||||
autocompleteKey: "refineryName",
|
autocompleteKey: {
|
||||||
|
key: "refineryName",
|
||||||
|
enableMark: "ENABLE",
|
||||||
|
},
|
||||||
labelKey: "refineryName",
|
labelKey: "refineryName",
|
||||||
valueKey: "id",
|
valueKey: "id",
|
||||||
placeholder: "炼厂名称",
|
placeholder: "炼厂名称",
|
||||||
@@ -188,6 +191,23 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
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) {
|
productDataList(e) {
|
||||||
this.productRowData = this.productNameList.filter((item) => item.id == e);
|
this.productRowData = this.productNameList.filter((item) => item.id == e);
|
||||||
this.form.salePrice = this.productRowData[0].salePrice2company;
|
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() {
|
submit() {
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
@@ -262,7 +266,7 @@ export default {
|
|||||||
this.form = {};
|
this.form = {};
|
||||||
this.customList = [];
|
this.customList = [];
|
||||||
this.controlWindows.addInfo = {};
|
this.controlWindows.addInfo = {};
|
||||||
this.configAutocomplete = {};
|
// this.configAutocomplete = {};
|
||||||
this.productNameList = [];
|
this.productNameList = [];
|
||||||
this.$refs.form.clearValidate();
|
this.$refs.form.clearValidate();
|
||||||
this.controlWindows.create = false;
|
this.controlWindows.create = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user