diff --git a/pages/admin/business/index.vue b/pages/admin/business/index.vue index 9fec027..4ce0212 100644 --- a/pages/admin/business/index.vue +++ b/pages/admin/business/index.vue @@ -57,6 +57,7 @@ export default { if(!this.service) return []; const merId = this.service.mer_id; const list = []; + let merchantInfo = this.service.merchant || {}; if(this.service.status){ list.push({ type: 'customer', @@ -66,11 +67,21 @@ export default { }); } if(this.service.is_verify){ - list.push({ - title: '订单核销', - url: '/pages/admin/order_cancellation/index?mer_id=' + merId, - icon: 'iconfont icon-dingdanhexiao' - }); + if(merchantInfo.merchant_type == 1){ + // 酒道馆核销用户优惠券 + 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.customer){ list.push({ @@ -108,27 +119,38 @@ export default { icon: 'iconfont icon-erweima1' }); } - list.push({ - type: 'online_payment_qr_code', - title: '买单码', - url: '', - icon: 'iconfont icon-erweima1' - }); - list.push({ - type: 'exchange_qr_code', - title: '商品兑换码', - url: '', - icon: 'iconfont icon-erweima1' - }); + if(this.service.online_payment){ + list.push({ + type: 'online_payment_qr_code', + title: '买单码', + url: '', + icon: 'iconfont icon-erweima1' + }); + } + if(this.service.product_exchange){ + list.push({ + type: 'exchange_qr_code', + title: '商品兑换码', + url: '', + icon: 'iconfont icon-erweima1' + }); + } + if(this.service.purchase_permission){ + list.push({ + title: '进货', + url: '/pages/admin/custom/index?mer_id=' + merId, + icon: 'iconfont icon-shangjiadingdan' + }); + } return list; } }, onLoad: function(options) { this.is_sys = options.is_sys; - this.getStoreList({is_sys:this.is_sys}); + this.getStoreList({is_sys: this.is_sys}); uni.setNavigationBarTitle({ - title: this.is_sys ? '平台管理' : '商家管理' + title: this.is_sys == 1 ? '平台管理' : (this.is_sys == 2 ? '酒道馆管理' : '商家管理') }) }, methods: { diff --git a/pages/user/index.vue b/pages/user/index.vue index 67b234e..b555fc6 100644 --- a/pages/user/index.vue +++ b/pages/user/index.vue @@ -167,16 +167,17 @@ - + + 商家管理 - 进入商户中心管理店铺 + 进入商家管理中心 - + 平台管理 @@ -185,7 +186,19 @@ - + + + + 酒道馆管理 + + 进入酒道馆管理中心 + + + + + + + diff --git a/pages/users/online_payment/exchange/vegetable.vue b/pages/users/online_payment/exchange/vegetable.vue index 5b15f82..63e4a70 100644 --- a/pages/users/online_payment/exchange/vegetable.vue +++ b/pages/users/online_payment/exchange/vegetable.vue @@ -5,7 +5,7 @@ - 商户:{{ service_info.mer_name || '' }} + {{ service_info.merchant_type == 1 ? '酒道馆' : '商户' }}:{{ service_info.mer_name || '' }} @@ -23,7 +23,7 @@ - 剩余菜卡额度 + 剩余{{ service_info.merchant_type == 1 ? '酒卡' : '菜卡' }}额度 {{ pointUserInfo.available }} @@ -186,11 +186,11 @@ export default { handler(val) { let totalMoney = this.pay_info.total_money.toFixed(2); // console.log('总价值', totalMoney) - // 判断菜卡额度是否足够 + // 判断额度是否足够 // console.log('总价值', [Number(totalMoney) , Number(this.pointUserInfo.available)]) if(Number(totalMoney) > Number(this.pointUserInfo.available)){ this.$util.Tips({ - title: '总价值不能超过剩余菜卡额度' + title: '总价值不能超过剩余额度' }); this.pay_info.total_money = 0; return false; @@ -227,9 +227,8 @@ export default { init () { let _this = this; // 获取持有信息 - this.getUserInfo(); this.getService(); - // 获取用户信息 + // 获取用户余额信息 getUserInfo().then(res => { _this.now_money = res.data.now_money }); @@ -238,7 +237,7 @@ export default { getUserInfo(){ let _this = this; let params = { - quota_type: 2 + quota_type: _this.service_info.merchant_type == 1 ? 1 : 2 }; pointUserInfo(params).then(res => { _this.pointUserInfo = res.data || {}; @@ -252,6 +251,7 @@ export default { let _this = this; getStaffInfo({ service_id: _this.service_id }).then(res => { _this.service_info = res.data || {}; + this.getUserInfo(); }).catch(err => { this.$util.Tips({title: err}); }); @@ -261,7 +261,7 @@ export default { let _this = this; let payInfo = Object.assign({},_this.pay_info); payInfo.service_id = _this.service_id; - payInfo.quota_type = 2; + payInfo.quota_type = 2;// 由于后台处理一下 这里固定为2 // 订单支付相关内容 console.log('支付类型',payInfo.pay_type) if (payInfo.pay_type == 'weixin') {