From 70d3c89e47b01c562da94417ac764273c0c098db Mon Sep 17 00:00:00 2001 From: tianyi <13521030702@163.com> Date: Thu, 30 Apr 2026 14:09:03 +0800 Subject: [PATCH] 1 --- src/views/app/business/lineManage/addEdit.vue | 70 ++++++++++++++++++- .../app/business/lineManage/lineManage.vue | 26 +++---- 2 files changed, 80 insertions(+), 16 deletions(-) diff --git a/src/views/app/business/lineManage/addEdit.vue b/src/views/app/business/lineManage/addEdit.vue index ee42dc2..b18982f 100644 --- a/src/views/app/business/lineManage/addEdit.vue +++ b/src/views/app/business/lineManage/addEdit.vue @@ -19,7 +19,7 @@ - @@ -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;i0){ this.form.productList1 = { adId: data.id, diff --git a/src/views/app/business/lineManage/lineManage.vue b/src/views/app/business/lineManage/lineManage.vue index a7c752b..97da042 100644 --- a/src/views/app/business/lineManage/lineManage.vue +++ b/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: "操作",