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