|
|
|
@ -19,7 +19,7 @@ |
|
|
|
<Row :gutter="32"> |
|
|
|
<Col span="12"> |
|
|
|
<FormItem label="商家名" prop="value"> |
|
|
|
<Select v-model="form.merchantId" filterable @on-change="checkShop" @on-query-change="sreachShop"> |
|
|
|
<Select v-model="form.merchantId" filterable @on-change="checkShop" :remote-method="sreachShop" :loading="loading1"> |
|
|
|
<Option v-for="item in shopList" v-model="item.value" :key="item.value">{{ item.label }}</Option> |
|
|
|
</Select> |
|
|
|
</FormItem> |
|
|
|
@ -118,6 +118,7 @@ |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
loading1:false, |
|
|
|
aaVisiable:false, |
|
|
|
shopList:[], |
|
|
|
roleList: [], |
|
|
|
@ -198,9 +199,31 @@ |
|
|
|
updateAD(this.form).then((res) => { |
|
|
|
this.submitLoading = false; |
|
|
|
if (res.success) { |
|
|
|
this.form = {} |
|
|
|
|
|
|
|
this.$Message.success("操作成功"); |
|
|
|
this.$emit("on-submit", true); |
|
|
|
this.form = { |
|
|
|
position: '', |
|
|
|
sortOrder:"", |
|
|
|
title:'', |
|
|
|
adImage:'', |
|
|
|
status:1, |
|
|
|
regionId:JSON.parse(this.getStore("user")).departmentId, |
|
|
|
merchantName:'', |
|
|
|
merchantId:'', |
|
|
|
merchantImage:'', |
|
|
|
linkUrl:'/package1/group/groupBuySingle?type=shop&item=', |
|
|
|
linkParams:'', |
|
|
|
productList1:{ |
|
|
|
adId: "", |
|
|
|
productImage: "", |
|
|
|
productName: "", |
|
|
|
originalPrice: "", |
|
|
|
groupPrice: "", |
|
|
|
groupMembers: "" |
|
|
|
}, |
|
|
|
productList:[] |
|
|
|
} |
|
|
|
this.visible = false; |
|
|
|
} |
|
|
|
}); |
|
|
|
@ -210,9 +233,31 @@ |
|
|
|
addAD(this.form).then((res) => { |
|
|
|
this.submitLoading = false; |
|
|
|
if (res.success) { |
|
|
|
this.form = {} |
|
|
|
|
|
|
|
this.$Message.success("操作成功"); |
|
|
|
this.$emit("on-submit", true); |
|
|
|
this.form = { |
|
|
|
position: '', |
|
|
|
sortOrder:"", |
|
|
|
title:'', |
|
|
|
adImage:'', |
|
|
|
status:1, |
|
|
|
regionId:JSON.parse(this.getStore("user")).departmentId, |
|
|
|
merchantName:'', |
|
|
|
merchantId:'', |
|
|
|
merchantImage:'', |
|
|
|
linkUrl:'/package1/group/groupBuySingle?type=shop&item=', |
|
|
|
linkParams:'', |
|
|
|
productList1:{ |
|
|
|
adId: "", |
|
|
|
productImage: "", |
|
|
|
productName: "", |
|
|
|
originalPrice: "", |
|
|
|
groupPrice: "", |
|
|
|
groupMembers: "" |
|
|
|
}, |
|
|
|
productList:[] |
|
|
|
} |
|
|
|
this.visible = false; |
|
|
|
} |
|
|
|
}); |
|
|
|
@ -276,6 +321,14 @@ |
|
|
|
this.form.merchantImage = this.shopList[i].shopIcon |
|
|
|
} |
|
|
|
} |
|
|
|
this.form.productList1 = { |
|
|
|
adId: this.form.productList1.adId, |
|
|
|
productImage: "", |
|
|
|
productName: "", |
|
|
|
originalPrice: "", |
|
|
|
groupPrice: "", |
|
|
|
groupMembers: "" |
|
|
|
} |
|
|
|
}, |
|
|
|
checkStatusLine(v){ |
|
|
|
this.form.position = v |
|
|
|
@ -308,6 +361,17 @@ |
|
|
|
console.log('回显数据',data) |
|
|
|
// 回显 |
|
|
|
this.form = data; |
|
|
|
|
|
|
|
getShopData(this.searchForm).then((res) => { |
|
|
|
this.loading = false; |
|
|
|
if (res.success) { |
|
|
|
this.shopList = res.result.content; |
|
|
|
for(let i=0;i<this.shopList.length;i++){ |
|
|
|
this.shopList[i].label = this.shopList[i].shopName |
|
|
|
this.shopList[i].value = this.shopList[i].id |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
if(data.productList.length>0){ |
|
|
|
this.form.productList1 = { |
|
|
|
adId: data.id, |
|
|
|
|