修改:酒水卡额度兑换商品流程修改

This commit is contained in:
wuhui_zzw 2024-02-05 17:37:18 +08:00
parent a4e6c44506
commit 20997cac4f
3 changed files with 67 additions and 32 deletions

View File

@ -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: {

View File

@ -167,16 +167,17 @@
</block>
</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="title">
<text class="merchant">商家</text>管理
</view>
<view class="info">进入商户中心管理店铺</view>
<view class="info">进入商家管理中心</view>
</view>
<view class="image merchant-image"></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="title">
<text class="plantform">平台</text>管理
@ -185,7 +186,19 @@
</view>
<view class="image plantform-image"></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="image merchant-image"></view>
<view class="menu-text">
@ -204,7 +217,7 @@
</view>
<view class="image plantform-image"></view>
</view>
</view>
</view>-->
</view>
<view v-if="copyright.status !== -1" class="copy-right">
<image class="img-copyright" :src="copyright.image" mode="widthFix"></image>

View File

@ -5,7 +5,7 @@
<!-- 顶部内容 -->
<view class="top">
<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 class="top">
@ -23,7 +23,7 @@
<input class="money-input" :value="pay_info.total_money" readonly disabled type='number' />
</view>
<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>
<view class="info-box">
@ -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') {