修改:酒水卡额度兑换商品流程修改
This commit is contained in:
parent
a4e6c44506
commit
20997cac4f
|
|
@ -57,6 +57,7 @@ export default {
|
||||||
if(!this.service) return [];
|
if(!this.service) return [];
|
||||||
const merId = this.service.mer_id;
|
const merId = this.service.mer_id;
|
||||||
const list = [];
|
const list = [];
|
||||||
|
let merchantInfo = this.service.merchant || {};
|
||||||
if(this.service.status){
|
if(this.service.status){
|
||||||
list.push({
|
list.push({
|
||||||
type: 'customer',
|
type: 'customer',
|
||||||
|
|
@ -66,11 +67,21 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
if(this.service.is_verify){
|
if(this.service.is_verify){
|
||||||
list.push({
|
if(merchantInfo.merchant_type == 1){
|
||||||
title: '订单核销',
|
// 酒道馆核销用户优惠券
|
||||||
url: '/pages/admin/order_cancellation/index?mer_id=' + merId,
|
list.push({
|
||||||
icon: 'iconfont icon-dingdanhexiao'
|
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){
|
if(this.service.customer){
|
||||||
list.push({
|
list.push({
|
||||||
|
|
@ -108,27 +119,38 @@ export default {
|
||||||
icon: 'iconfont icon-erweima1'
|
icon: 'iconfont icon-erweima1'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
list.push({
|
if(this.service.online_payment){
|
||||||
type: 'online_payment_qr_code',
|
list.push({
|
||||||
title: '买单码',
|
type: 'online_payment_qr_code',
|
||||||
url: '',
|
title: '买单码',
|
||||||
icon: 'iconfont icon-erweima1'
|
url: '',
|
||||||
});
|
icon: 'iconfont icon-erweima1'
|
||||||
list.push({
|
});
|
||||||
type: 'exchange_qr_code',
|
}
|
||||||
title: '商品兑换码',
|
if(this.service.product_exchange){
|
||||||
url: '',
|
list.push({
|
||||||
icon: 'iconfont icon-erweima1'
|
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;
|
return list;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
this.is_sys = options.is_sys;
|
this.is_sys = options.is_sys;
|
||||||
this.getStoreList({is_sys:this.is_sys});
|
this.getStoreList({is_sys: this.is_sys});
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: this.is_sys ? '平台管理' : '商家管理'
|
title: this.is_sys == 1 ? '平台管理' : (this.is_sys == 2 ? '酒道馆管理' : '商家管理')
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
||||||
|
|
@ -167,16 +167,17 @@
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="menus-list-item" v-if="!userInfo.topService && userInfo.service" @click="toService(0)">
|
<!--商户员工端、平台客服端、酒道馆员工端入口-->
|
||||||
|
<view class="menus-list-item" v-if="userInfo.service" @click="toService(0)">
|
||||||
<view class="item-text">
|
<view class="item-text">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<text class="merchant">商家</text>管理
|
<text class="merchant">商家</text>管理
|
||||||
</view>
|
</view>
|
||||||
<view class="info">进入商户中心管理店铺</view>
|
<view class="info">进入商家管理中心</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="image merchant-image"></view>
|
<view class="image merchant-image"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="menus-list-item" v-if="!userInfo.service && userInfo.topService" @click="toService(1)">
|
<view class="menus-list-item" v-if="userInfo.topService" @click="toService(1)">
|
||||||
<view class="item-text">
|
<view class="item-text">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<text class="plantform">平台</text>管理
|
<text class="plantform">平台</text>管理
|
||||||
|
|
@ -185,7 +186,19 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="image plantform-image"></view>
|
<view class="image plantform-image"></view>
|
||||||
</view>
|
</view>
|
||||||
<view class="menu-list-count" v-if="userInfo.topService && userInfo.service">
|
<view class="menus-list-item" v-if="userInfo.topService" @click="toService(2)">
|
||||||
|
<view class="item-text">
|
||||||
|
<view class="title">
|
||||||
|
<text class="plantform">酒道馆</text>管理
|
||||||
|
</view>
|
||||||
|
<view class="info">进入酒道馆管理中心</view>
|
||||||
|
</view>
|
||||||
|
<view class="image plantform-image"></view>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--<view class="menu-list-count" v-if="userInfo.topService && userInfo.service">
|
||||||
<view class="menu-item" @click="toService(0)">
|
<view class="menu-item" @click="toService(0)">
|
||||||
<view class="image merchant-image"></view>
|
<view class="image merchant-image"></view>
|
||||||
<view class="menu-text">
|
<view class="menu-text">
|
||||||
|
|
@ -204,7 +217,7 @@
|
||||||
</view>
|
</view>
|
||||||
<view class="image plantform-image"></view>
|
<view class="image plantform-image"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>-->
|
||||||
</view>
|
</view>
|
||||||
<view v-if="copyright.status !== -1" class="copy-right">
|
<view v-if="copyright.status !== -1" class="copy-right">
|
||||||
<image class="img-copyright" :src="copyright.image" mode="widthFix"></image>
|
<image class="img-copyright" :src="copyright.image" mode="widthFix"></image>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<!-- 顶部内容 -->
|
<!-- 顶部内容 -->
|
||||||
<view class="top">
|
<view class="top">
|
||||||
<view class="left">
|
<view class="left">
|
||||||
<view class="name">商户:{{ service_info.mer_name || '' }}</view>
|
<view class="name">{{ service_info.merchant_type == 1 ? '酒道馆' : '商户' }}:{{ service_info.mer_name || '' }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="top">
|
<view class="top">
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
<input class="money-input" :value="pay_info.total_money" readonly disabled type='number' />
|
<input class="money-input" :value="pay_info.total_money" readonly disabled type='number' />
|
||||||
</view>
|
</view>
|
||||||
<view class="info-box">
|
<view class="info-box">
|
||||||
<view class="info-title">剩余菜卡额度</view>
|
<view class="info-title">剩余{{ service_info.merchant_type == 1 ? '酒卡' : '菜卡' }}额度</view>
|
||||||
<view class="info-value">{{ pointUserInfo.available }}</view>
|
<view class="info-value">{{ pointUserInfo.available }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="info-box">
|
<view class="info-box">
|
||||||
|
|
@ -186,11 +186,11 @@ export default {
|
||||||
handler(val) {
|
handler(val) {
|
||||||
let totalMoney = this.pay_info.total_money.toFixed(2);
|
let totalMoney = this.pay_info.total_money.toFixed(2);
|
||||||
// console.log('总价值', totalMoney)
|
// console.log('总价值', totalMoney)
|
||||||
// 判断菜卡额度是否足够
|
// 判断额度是否足够
|
||||||
// console.log('总价值', [Number(totalMoney) , Number(this.pointUserInfo.available)])
|
// console.log('总价值', [Number(totalMoney) , Number(this.pointUserInfo.available)])
|
||||||
if(Number(totalMoney) > Number(this.pointUserInfo.available)){
|
if(Number(totalMoney) > Number(this.pointUserInfo.available)){
|
||||||
this.$util.Tips({
|
this.$util.Tips({
|
||||||
title: '总价值不能超过剩余菜卡额度'
|
title: '总价值不能超过剩余额度'
|
||||||
});
|
});
|
||||||
this.pay_info.total_money = 0;
|
this.pay_info.total_money = 0;
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -227,9 +227,8 @@ export default {
|
||||||
init () {
|
init () {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
// 获取持有信息
|
// 获取持有信息
|
||||||
this.getUserInfo();
|
|
||||||
this.getService();
|
this.getService();
|
||||||
// 获取用户信息
|
// 获取用户余额信息
|
||||||
getUserInfo().then(res => {
|
getUserInfo().then(res => {
|
||||||
_this.now_money = res.data.now_money
|
_this.now_money = res.data.now_money
|
||||||
});
|
});
|
||||||
|
|
@ -238,7 +237,7 @@ export default {
|
||||||
getUserInfo(){
|
getUserInfo(){
|
||||||
let _this = this;
|
let _this = this;
|
||||||
let params = {
|
let params = {
|
||||||
quota_type: 2
|
quota_type: _this.service_info.merchant_type == 1 ? 1 : 2
|
||||||
};
|
};
|
||||||
pointUserInfo(params).then(res => {
|
pointUserInfo(params).then(res => {
|
||||||
_this.pointUserInfo = res.data || {};
|
_this.pointUserInfo = res.data || {};
|
||||||
|
|
@ -252,6 +251,7 @@ export default {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
getStaffInfo({ service_id: _this.service_id }).then(res => {
|
getStaffInfo({ service_id: _this.service_id }).then(res => {
|
||||||
_this.service_info = res.data || {};
|
_this.service_info = res.data || {};
|
||||||
|
this.getUserInfo();
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.$util.Tips({title: err});
|
this.$util.Tips({title: err});
|
||||||
});
|
});
|
||||||
|
|
@ -261,7 +261,7 @@ export default {
|
||||||
let _this = this;
|
let _this = this;
|
||||||
let payInfo = Object.assign({},_this.pay_info);
|
let payInfo = Object.assign({},_this.pay_info);
|
||||||
payInfo.service_id = _this.service_id;
|
payInfo.service_id = _this.service_id;
|
||||||
payInfo.quota_type = 2;
|
payInfo.quota_type = 2;// 由于后台处理一下 这里固定为2
|
||||||
// 订单支付相关内容
|
// 订单支付相关内容
|
||||||
console.log('支付类型',payInfo.pay_type)
|
console.log('支付类型',payInfo.pay_type)
|
||||||
if (payInfo.pay_type == 'weixin') {
|
if (payInfo.pay_type == 'weixin') {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue