pull/9/head
xiaozhiyong 2 years ago
parent 5f73c912e1
commit 704f3f56d9
  1. 42
      src/views/product/components/create.vue

@ -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;

Loading…
Cancel
Save