tianyi 1 month ago
parent
commit
70d3c89e47
  1. 70
      src/views/app/business/lineManage/addEdit.vue
  2. 26
      src/views/app/business/lineManage/lineManage.vue

70
src/views/app/business/lineManage/addEdit.vue

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

26
src/views/app/business/lineManage/lineManage.vue

@ -127,7 +127,7 @@
{
title: "商家主图",
key: "merchantImage",
minWidth: 250,
width: 150,
render: (h, params) => {
return h("img", {
@ -202,19 +202,19 @@
}
},
{
title: "广告关联商品列表",
title: "广告关联商品",
key: "productList",
width: 100,
// render: (h, params) => {
// let re = ""
// if(params.row.productList != ''){
// re = params.row.productList[0].productName
// }
// return h(
// "div",
// re
// );
// }
width: 150,
render: (h, params) => {
let re = ""
if(params.row.productList != ''){
re = params.row.productList[0].productName
}
return h(
"div",
re
);
}
},
{
title: "操作",

Loading…
Cancel
Save