From 1a68697aaafe2a2368b5e6bf905af21f2a0353e6 Mon Sep 17 00:00:00 2001 From: liudan <18634735655@163.com> Date: Wed, 27 Mar 2024 00:07:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E6=83=A0=E5=88=B8=E5=95=86=E5=93=81?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../platformCoupon/couponList/index.vue | 75 ++++++++++++++++--- 1 file changed, 66 insertions(+), 9 deletions(-) diff --git a/view/admin/src/views/marketing/platformCoupon/couponList/index.vue b/view/admin/src/views/marketing/platformCoupon/couponList/index.vue index 18e16f5..b2aeec2 100644 --- a/view/admin/src/views/marketing/platformCoupon/couponList/index.vue +++ b/view/admin/src/views/marketing/platformCoupon/couponList/index.vue @@ -469,9 +469,9 @@ /> - - - + + + @@ -483,9 +483,20 @@ +
+ + +
取 消 - 确 定 + 确 定
@@ -568,7 +579,11 @@ export default { shopDialog:false, shopList:[], multipleSelection: [], - selectedCoupon:{} + selectedCoupon:{}, + handleName:'allshop', + shopPageIndex:1, + shopPageSize:10, + shopTotal:0 }; }, mounted() { @@ -592,9 +607,10 @@ export default { }); this.multipleSelection }, - + //当前商品 getCurrentProduct(row){ this.selectedCoupon = row; + this.handleName="curshop" couponShopping(row.coupon_id).then(res=>{ @@ -613,13 +629,22 @@ export default { this.shopDialog = true; }) }, - + shopHandleSizeChange(val) { + this.shopPageSize = val; + this.getShopListHandle() + }, + shopHandleCurrentChange(val) { + this.shopPageIndex = val; + this.getShopListHandle() + }, + //获取全部商品 getCouponShopping(row){ this.selectedCoupon = row; + this.handleName="allshop" var getData = { - page:1, - limit:100, + page:this.shopPageIndex, + limit:this.shopPageSize, type:1 } @@ -643,10 +668,42 @@ export default { shopList.push(obj) }) + this.shopTotal = res.data.count this.shopList = shopList; this.shopDialog = true; }) }, + getShopListHandle(){ + var getData = { + page:this.shopPageIndex, + limit:this.shopPageSize, + type:1 + } + + couponProductList(getData).then(res=>{ + + let shopList = [] + res.data.list.forEach(item=>{ + let obj = { + store_name:item.store_name, + image:item.image, + price:item.price, + stock:item.stock, + product_id:item.product_id, + } + // if(item.product){ + // Object.keys(item.product).forEach(p=>{ + // this.$set(obj,p,item.product[p]) + // }) + // shopList.push(obj) + // } + shopList.push(obj) + + }) + this.shopTotal = res.data.count + this.shopList = shopList; + }) + }, // 删除 handleDelete(id, idx) { this.$modalSureDelete(`删除优惠券将无法恢复,请谨慎操作!`).then(() => {