This commit is contained in:
lixuan
2023-02-27 09:20:14 +08:00
parent 920a9c3d28
commit cba8576e30
4 changed files with 37 additions and 11 deletions

View File

@@ -37,6 +37,7 @@
<autocomplete :params="form" :config="configAutocomplete" />
</el-form-item>
<el-form-item label="产品类型" prop="productType">
<!-- <autocomplete :params="form" :config="configAutocompleteCp" /> -->
<el-select v-model="form.productType" @change="productChange" placeholder="请选择产品类型">
<el-option
v-for="(item, index) in productTypeList"
@@ -47,7 +48,7 @@
</el-select>
</el-form-item>
<el-form-item label="产品名称" prop="productId">
<el-select v-model="form.productId" @change="productDataList" placeholder="请选择产品类型">
<el-select :disabled="rowCreate" v-model="form.productId" @change="productDataList" placeholder="请选择产品类型">
<el-option
v-for="(item, index) in productNameList"
:key="index"
@@ -147,6 +148,7 @@ export default {
echoId: "",
echoName: "",
},
rowCreate:false,
productTypeList: [
{
label: "0#柴",
@@ -186,6 +188,7 @@ export default {
},
methods: {
productDataList(e){
console.log(e,'ppppppppppppppp')
this.productRowData = this.productNameList.filter(
(item) => item.id == e
);
@@ -206,16 +209,17 @@ export default {
}
},
//搜索产品
productData(){
async productData(){
let data = {
refineryId:this.form.refineryId,
productType:this.form.productType,
enableMark:'ENABLE'
}
serve.getRefineryProductList(data).then((res) => {
await serve.getRefineryProductList(data).then((res) => {
this.productNameList = res.data;
})
console.log(this.productRowData,'aaaaaaaaaa')
// this.form.productId = this.productNameList[0].productId
console.log(this.productRowData,this.productNameList,'aaaaaaaaaa')
},
//搜索客户
customData(value){
@@ -234,9 +238,14 @@ export default {
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()
console.log("this.form", this.form);
}else{
this.rowCreate = false
}
},
submit() {
@@ -261,7 +270,10 @@ export default {
closeWindow() {
this.$emit("closeWindow");
this.form = {};
this.customList = []
this.controlWindows.addInfo = {};
this.configAutocomplete = {}
this.productNameList = []
this.$refs.form.clearValidate();
this.controlWindows.create = false;
},