From 926ecd2ca7e3f1e94507d7108d2bfa69eef8b97b Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Thu, 28 Mar 2024 13:34:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=EF=BC=9A=E9=85=92=E9=81=93?= =?UTF-8?q?=E9=A6=86=E3=80=81=E7=83=9F=E9=85=92=E9=A6=86=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=8F=90=E8=B4=A7=E5=88=B8=E6=A0=B8=E9=94=80=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=20=E6=B7=BB=E5=8A=A0=EF=BC=9A=E9=85=92=E9=81=93=E9=A6=86?= =?UTF-8?q?=E3=80=81=E7=83=9F=E9=85=92=E5=BA=97=E6=A0=B8=E9=94=80=E6=8F=90?= =?UTF-8?q?=E8=B4=A7=E5=88=B8=E6=97=B6=E8=AE=B0=E5=BD=95=E6=A0=B8=E9=94=80?= =?UTF-8?q?=E6=96=B9=E5=95=86=E6=88=B7=E4=BF=A1=E6=81=AF=20=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=EF=BC=9A=E6=8F=90=E8=B4=A7=E5=88=B8=E8=BF=87=E6=9C=9F?= =?UTF-8?q?=E5=90=8E=E4=BE=9D=E7=84=B6=E5=8F=AF=E4=BB=A5=E6=AD=A3=E5=B8=B8?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/user.js | 6 +- pages.json | 6 + pages/admin/business/index.vue | 81 +++++----- pages/users/write_off/index.vue | 61 +++----- pages/users/write_off/record.vue | 248 +++++++++++++++++++++++++++++++ 5 files changed, 313 insertions(+), 89 deletions(-) create mode 100644 pages/users/write_off/record.vue diff --git a/api/user.js b/api/user.js index d7942a0..809e5b1 100644 --- a/api/user.js +++ b/api/user.js @@ -707,10 +707,14 @@ export function convertMerchantIntegral(merId,data) { export function createQRcode(data) { return request.get("coupon/create_qrcode", data); } -// 完成核销操作 +// 提货券 - 核销 export function writeOff(data) { return request.post("coupon/write_off", data); } +// 提货券 - 核销记录 +export function writeOffRecord(data) { + return request.get("coupon/write_off_record", data); +} // 完成核销操作 export function vipExchangeCode(data) { return request.post("sVip/vipExchangeCode", data); diff --git a/pages.json b/pages.json index f21372c..23c51b6 100644 --- a/pages.json +++ b/pages.json @@ -592,6 +592,12 @@ "style": { "navigationBarTitleText": "提货券核销" } + }, + { + "path": "write_off/record", + "style": { + "navigationBarTitleText": "核销记录" + } } ] }, diff --git a/pages/admin/business/index.vue b/pages/admin/business/index.vue index c05f951..4e949f9 100644 --- a/pages/admin/business/index.vue +++ b/pages/admin/business/index.vue @@ -63,8 +63,9 @@ export default { if(!this.service) return []; const merId = this.service.mer_id; const list = []; + // 商户类别:0=普通商户,1=酒道馆,2=供应商,3=烟酒店 let merchantInfo = this.service.merchant || {}; - if(this.service.status){ + if(this.service.status && [0].includes(Number(merchantInfo.merchant_type))){ list.push({ type: 'customer', title: '客服记录', @@ -72,52 +73,54 @@ export default { icon: 'iconfont icon-kefujilu' }); } - if(this.service.is_verify){ - if(merchantInfo.merchant_type == 1 || merchantInfo.merchant_type == 3){ - // 酒道馆核销用户优惠券 - list.push({ - title: '提货券核销', - url: '/pages/users/write_off/index', - icon: 'iconfont icon-dingdanhexiao' - }); - }else{ - // 普通商户核销用户订单 - list.push({ - title: '订单核销', - url: '/pages/admin/order_cancellation/index?mer_id=' + merId, - icon: 'iconfont icon-dingdanhexiao' - }); - } + if(this.service.is_verify && [0].includes(Number(merchantInfo.merchant_type))){ + list.push({ + title: '订单核销', + url: '/pages/admin/order_cancellation/index?mer_id=' + merId, + icon: 'iconfont icon-dingdanhexiao' + }); } - if(this.service.customer){ + if(this.service.is_verify && [1,3].includes(Number(merchantInfo.merchant_type))){ + list.push({ + title: '提货券核销', + url: '/pages/users/write_off/index', + icon: 'iconfont icon-dingdanhexiao' + }); + list.push({ + title: '核销记录', + url: '/pages/users/write_off/record', + icon: 'iconfont icon-daihexiao' + }); + } + if(this.service.customer && [0].includes(Number(merchantInfo.merchant_type))){ list.push({ title: '订单管理', url: '/pages/admin/order/index?mer_id=' + merId, icon: 'iconfont icon-dingdanguanli' }); } - if(this.service.is_goods){ + if(this.service.is_goods && [0].includes(Number(merchantInfo.merchant_type))){ list.push({ title: '商品管理', url: '/pages/product/list/index?mer_id=' + merId, icon: 'iconfont icon-shangjiaguanli' }); } - if(this.service.is_user){ + if(this.service.is_user && [0].includes(Number(merchantInfo.merchant_type))){ list.push({ title: '顾客管理', url: '/pages/admin/custom/index?mer_id=' + merId, icon: 'iconfont icon-kehu-xuanzhong' }); } - if(this.service.staff_manage){ + if(this.service.staff_manage && [0].includes(Number(merchantInfo.merchant_type))){ list.push({ title: '客服经理', url: '/pages/admin/business/staff?mer_id=' + merId, icon: 'iconfont icon-kehu-xuanzhong' }); } - if(this.service.qr_code_show){ + if(this.service.qr_code_show && [0].includes(Number(merchantInfo.merchant_type))){ list.push({ type: 'qr_code', title: '推广码', @@ -125,7 +128,7 @@ export default { icon: 'iconfont icon-erweima1' }); } - if(this.service.online_payment){ + if(this.service.online_payment && [0].includes(Number(merchantInfo.merchant_type))){ list.push({ type: 'online_payment_qr_code', title: '买单码', @@ -133,26 +136,15 @@ export default { icon: 'iconfont icon-erweima1' }); } - if(this.service.product_exchange){ - if(merchantInfo.merchant_type == 1 || merchantInfo.merchant_type == 3){ - // 酒道馆核销用户优惠券 - // list.push({ - // type: 'exchange_qr_code', - // title: '特色酒兑换', - // url: '', - // icon: 'iconfont icon-erweima1' - // }); - }else{ - // 普通商户核销用户订单 - list.push({ - type: 'exchange_qr_code', - title: '特色菜兑换', - url: '', - icon: 'iconfont icon-erweima1' - }); - } + if(this.service.product_exchange && [0].includes(Number(merchantInfo.merchant_type))){ + list.push({ + type: 'exchange_qr_code', + title: '特色菜兑换', + url: '', + icon: 'iconfont icon-erweima1' + }); } - if(this.service.purchase_permission){ + if(this.service.purchase_permission && [1,3].includes(Number(merchantInfo.merchant_type))){ list.push({ title: '进货', url: '/pages/supplier/stock/with_goods', @@ -174,13 +166,10 @@ export default { return false; } // 设置页面标题 - this.pageTitle = '门店商家管理'; + this.pageTitle = '联盟商家管理'; if(this.is_sys == 1) this.pageTitle = '平台管理'; if(this.is_sys == 2) this.pageTitle = '酒道馆管理'; else if(this.is_sys == 3) this.pageTitle = '烟酒店管理'; - - - uni.setNavigationBarTitle({ title: this.pageTitle }) diff --git a/pages/users/write_off/index.vue b/pages/users/write_off/index.vue index 432cd2d..1f8cfb8 100644 --- a/pages/users/write_off/index.vue +++ b/pages/users/write_off/index.vue @@ -7,7 +7,7 @@ - 核销 @@ -29,14 +29,9 @@ +