增加:酒道馆商品兑换页面区分酒道馆兑换和小酒馆兑换

增加:惠民积分抵扣信息显示
This commit is contained in:
wuhui_zzw 2024-07-02 17:00:09 +08:00
parent 9b0b933c08
commit 1f28e1e94c
6 changed files with 204 additions and 56 deletions

View File

@ -9,12 +9,12 @@ export function wineGoodsList(data) {
return request.get(`wine/goods_list`, data); return request.get(`wine/goods_list`, data);
} }
// 酒道馆商品兑换购物车 - 获取购物车列表 // 酒道馆商品兑换购物车 - 获取购物车列表
export function wineWithGoodsCartList() { export function wineWithGoodsCartList(data) {
return request.get(`wine/cart_list`); return request.get(`wine/cart_list`, data);
} }
// 酒道馆商品兑换购物车 - 获取购物车所有商品id // 酒道馆商品兑换购物车 - 获取购物车所有商品id
export function wineWithGoodsCartIds() { export function wineWithGoodsCartIds(data) {
return request.get(`wine/cart_ids`); return request.get(`wine/cart_ids`, data);
} }
// 酒道馆商品兑换购物车 - 添加商品 // 酒道馆商品兑换购物车 - 添加商品
export function wineWithGoodsCartAdd(data) { export function wineWithGoodsCartAdd(data) {

View File

@ -1487,7 +1487,14 @@
"style": { "style": {
"navigationBarTitleText": "缴费记录" "navigationBarTitleText": "缴费记录"
} }
},
{
"path": "contract/index",
"style": {
"navigationBarTitleText": "合同签约"
}
} }
] ]
}, },
{ {

View File

@ -126,7 +126,7 @@ export default {
title: '推广二维码', title: '推广二维码',
type: 'invite_qr_code', type: 'invite_qr_code',
url: '', url: '',
icon: 'icon-erweima1', icon: 'icon-hexiaoma',
}); });
} }
// //
@ -135,7 +135,7 @@ export default {
title: '下级管理', title: '下级管理',
type: 'link', type: 'link',
url: '/pages/agent/user/list', url: '/pages/agent/user/list',
icon: 'icon-yonghu1', icon: 'icon-wutouxiang',
}); });
} }
// //
@ -171,7 +171,7 @@ export default {
title: '我的邀请', title: '我的邀请',
type: 'link', type: 'link',
url: '/pages/agent/invite/my_invite', url: '/pages/agent/invite/my_invite',
icon: 'icon-wodetuandui', icon: 'icon-yaoqing1',
}); });
} }
// //
@ -180,30 +180,19 @@ export default {
title: '门店管理', title: '门店管理',
type: 'store_management', type: 'store_management',
url: '/pages/admin/business/index', url: '/pages/admin/business/index',
icon: 'icon-dianpu1', icon: 'icon-ziti',
}); });
} }
//
menuList.push({
title: '合同签约',
type: 'link',
url: '/pages/agent/contract/index',
icon: 'icon-bianji4',
});
//
// staging_list:[
// {title: '', icon: 'icon-dingdan1'},
// {title: '', icon: 'icon-daifahuo1'},
// {title: '', icon: 'icon-jinbi_o'},
// {title: '', icon: 'icon-dianpu1'},
// {title: '', icon: 'icon-jiaoyidingdan'},
// {title: '广', icon: 'icon-hexiaoma'},
// {title: '', icon: 'icon-fenxiaodingdan'},
// {title: '', icon: 'icon-gerentouxiang_o'},
// {title: '', icon: 'icon-baoguo_shouna_o'},
// {title: '', icon: 'icon-saoma'},
// {title: '', icon: 'icon-quanbudingdan-3'},
// {title: '', icon: 'icon-wodetuandui'},
// ],
//
return menuList; return menuList;
}, },
qrcode_list(){ qrcode_list(){

View File

@ -0,0 +1,100 @@
<template>
<view class="main-content">
合同签约
<!-- 授权登录 -->
<authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authClose"></authorize>
</view>
</template>
<script>
import {mapGetters} from "vuex";
import authorize from '@/components/Authorize';
export default {
name: 'business',
components: {
authorize
},
computed: {
...mapGetters(['isLogin', 'uid', 'userInfo', 'viewColor'])
},
data() {
return {
//
isAuto: false, //
isShowAuth: false,//
}
},
onLoad(options) {
//
if (!this.isLogin) {
//
this.isAuto = true;
this.isShowAuth = true
}else{
//
this.init();
}
},
methods: {
//
onLoadFun() {
if(this.isLogin){
this.isShowAuth = false;
this.init();
}
},
//
authClose(e) {
this.isShowAuth = e
},
//
init () {
},
}
}
</script>
<style scoped lang="scss">
.main-content{
width: 100vw!important;
min-height: 100vh!important;
background: orange;//#F6F6F6
padding: 0 20rpx 100rpx 20rpx;
}
</style>

View File

@ -373,17 +373,35 @@
</view> </view>
</view>--> </view>-->
<view class='item acea-row row-between-wrapper integral-switch-content' v-if="order_type == 36">
<view>酒水卡积分抵扣</view> <template v-if="order_type == 36">
<view class='money wine-money'> <view class='item acea-row row-between-wrapper integral-switch-content' v-if="orderTotalWineIntegral > 0 || orderTotalWineDiffMoney > 0">
<view class="wine-line"> <view>酒水卡积分抵扣</view>
使用了{{orderTotalWineIntegral || 0 }}个酒水卡积分抵扣<text class="pColor">{{orderTotalWineIntegralPrice || 0}}</text> <view class='money wine-money'>
</view> <view class="wine-line">
<view class="wine-line"> 使用了{{orderTotalWineIntegral || 0 }}个酒水卡积分抵扣<text class="pColor">{{orderTotalWineIntegralPrice || 0}}</text>
剩余差价{{ orderTotalWineDiffMoney || 0 }}实际应付<text class="pColor">{{orderTotalWineDiffMoneyPrice || 0}}</text> </view>
<view class="wine-line" v-if="orderTotalWineDiffMoneyPrice > 0">
剩余差价{{ orderTotalWineDiffMoney || 0 }}实际应付<text class="pColor">{{ orderTotalWineDiffMoneyPrice || 0}}</text>
</view>
</view> </view>
</view> </view>
</view> <view class='item acea-row row-between-wrapper integral-switch-content' v-if="orderTotalQuotaIntegral > 0 || orderTotalQuotaDiff > 0">
<view>惠民积分抵扣</view>
<view class='money wine-money'>
<view class="wine-line">
使用了{{ orderTotalQuotaIntegral || 0 }}惠民积分抵扣<text class="pColor">{{ orderTotalQuotaIntegralPrice || 0}}</text>
</view>
<view class="wine-line" v-if="orderTotalQuotaDiffMoney > 0">
剩余差价{{ orderTotalQuotaDiff || 0 }}实际应付<text class="pColor">{{ orderTotalQuotaDiffMoney || 0}}</text>
</view>
</view>
</view>
</template>
<view class='item acea-row row-between-wrapper' v-if="orderTotalRandomReduction > 0"> <view class='item acea-row row-between-wrapper' v-if="orderTotalRandomReduction > 0">
<view>随机立减</view> <view>随机立减</view>
<view class='money'>-{{orderTotalRandomReduction}}</view> <view class='money'>-{{orderTotalRandomReduction}}</view>
@ -545,10 +563,17 @@
coupon_price: 0, // coupon_price: 0, //
useIntegral: false, //使 useIntegral: false, //使
integral_price: 0, // integral_price: 0, //
//
orderTotalWineIntegralPrice: 0, orderTotalWineIntegralPrice: 0,
orderTotalWineIntegral: '', orderTotalWineIntegral: '',
orderTotalWineDiffMoney: 0, orderTotalWineDiffMoney: 0,
orderTotalWineDiffMoneyPrice: 0, orderTotalWineDiffMoneyPrice: 0,
//
orderTotalQuotaIntegral: 0,
orderTotalQuotaIntegralPrice: 0,
orderTotalQuotaDiff: 0,
orderTotalQuotaDiffMoney: 0,
integral: 0, integral: 0,
ChangePrice: 0, //使 ChangePrice: 0, //使
formIds: [], //formid formIds: [], //formid
@ -1052,17 +1077,22 @@
that.$set(that, 'coupon_price', res.data.order_coupon_price); that.$set(that, 'coupon_price', res.data.order_coupon_price);
that.$set(that, 'integral_count', res.data.order_total_integral); that.$set(that, 'integral_count', res.data.order_total_integral);
that.$set(that, 'integral_price', res.data.order_total_integral_price); that.$set(that, 'integral_price', res.data.order_total_integral_price);
//
that.$set(that, 'orderTotalWineIntegral', res.data.orderTotalWineIntegral); that.$set(that, 'orderTotalWineIntegral', res.data.orderTotalWineIntegral);
that.$set(that, 'orderTotalWineIntegralPrice', res.data.orderTotalWineIntegralPrice); that.$set(that, 'orderTotalWineIntegralPrice', res.data.orderTotalWineIntegralPrice);
that.$set(that, 'orderTotalWineDiffMoney', res.data.orderTotalWineDiffMoney); that.$set(that, 'orderTotalWineDiffMoney', res.data.orderTotalWineDiffMoney);
that.$set(that, 'orderTotalWineDiffMoneyPrice', res.data.orderTotalWineDiffMoneyPrice); that.$set(that, 'orderTotalWineDiffMoneyPrice', res.data.orderTotalWineDiffMoneyPrice);
//
that.$set(that, 'orderTotalQuotaIntegral', res.data.orderTotalQuotaIntegral);
that.$set(that, 'orderTotalQuotaIntegralPrice', res.data.orderTotalQuotaIntegralPrice);
that.$set(that, 'orderTotalQuotaDiff', res.data.orderTotalQuotaDiff);
that.$set(that, 'orderTotalQuotaDiffMoney', res.data.orderTotalQuotaDiffMoney);
//
that.$set(that, 'orderTotalRandomReduction', res.data.orderTotalRandomReduction); that.$set(that, 'orderTotalRandomReduction', res.data.orderTotalRandomReduction);
//
that.$set(that, 'orderTotalMerTitleQuota', res.data.orderTotalMerTitleQuota); that.$set(that, 'orderTotalMerTitleQuota', res.data.orderTotalMerTitleQuota);
that.$set(that, 'orderTotalMerOtherQuota', res.data.orderTotalMerOtherQuota); that.$set(that, 'orderTotalMerOtherQuota', res.data.orderTotalMerOtherQuota);
that.$set(that, 'open_integral', res.data.openIntegral); that.$set(that, 'open_integral', res.data.openIntegral);
that.$set(that, 'use_integral', res.data.useIntegral); that.$set(that, 'use_integral', res.data.useIntegral);
// that.$set(that, 'use_mer_integral', res.data.useMerIntegral); // that.$set(that, 'use_mer_integral', res.data.useMerIntegral);

View File

@ -20,7 +20,7 @@
<text class="iconfont icon-xiangxia"></text> <text class="iconfont icon-xiangxia"></text>
</view> </view>
<view class="block" @click="merSelectShowOrHide"> <view class="block" @click="merSelectShowOrHide">
<view class="title">{{ mer_name || '酒道馆' }}</view> <view class="title">{{ mer_name || (Number(quota_type) === 1 ? '酒道馆' : '小酒馆') }}</view>
<text class="iconfont icon-xiangxia"></text> <text class="iconfont icon-xiangxia"></text>
</view> </view>
</view> </view>
@ -51,22 +51,32 @@
</view> </view>
</view> </view>
<view class="buy"> <view class="buy">
<!--酒类型0=未知1=瓶装酒2=封坛酒--> <!-- 酒类型0=未知1=瓶装酒2=封坛酒-->
<view class="left"> <view class="left">
<view class="left-text wine-type-one" v-if="item.wine_type == 1">瓶装酒</view> <template v-if="Number(quota_type) === 1">
<view class="left-text wine-type-two" v-if="item.wine_type == 2">封坛酒</view> <view class="left-text wine-type-one" v-if="item.wine_type == 1">瓶装酒</view>
<view class="left-text wine-type-two" v-if="item.wine_type == 2">封坛酒</view>
</template>
<template v-else-if="Number(quota_type) === 2">
<!--小酒馆内容 暂无-->
</template>
</view> </view>
<view class="right"> <view class="right">
<template v-if="!buyList[item.product_id]"> <template v-if="!buyList[item.product_id]">
<!--瓶装酒--> <template v-if="Number(quota_type) === 1">
<template v-if="item.wine_type == 1"> <!--瓶装酒-->
<text v-if="Number(surplus_available) >= (Number(item.price) * (Number(item.once_min_count) || 1))" @click="buyFlowAddBuyNum('add', item)" class="iconfont icon-gengduozhankai1"></text> <template v-if="item.wine_type == 1">
<view v-else class="lack_available">额度不足</view> <text v-if="Number(surplus_available) >= (Number(item.price) * (Number(item.once_min_count) || 1))" @click="buyFlowAddBuyNum('add', item)" class="iconfont icon-gengduozhankai1"></text>
<view v-else class="lack_available">额度不足</view>
</template>
<!--封坛酒-->
<template v-if="item.wine_type == 2">
<text v-if="Number(surplus_wine_available) >= (Number(item.price) * (Number(item.once_min_count) || 1))" @click="buyFlowAddBuyNum('add', item)" class="iconfont icon-gengduozhankai1"></text>
<view v-else class="lack_available">额度不足</view>
</template>
</template> </template>
<!--封坛酒--> <template v-else-if="Number(quota_type) === 2">
<template v-if="item.wine_type == 2"> <text @click="buyFlowAddBuyNum('add', item)" class="iconfont icon-gengduozhankai1"></text>
<text v-if="Number(surplus_wine_available) >= (Number(item.price) * (Number(item.once_min_count) || 1))" @click="buyFlowAddBuyNum('add', item)" class="iconfont icon-gengduozhankai1"></text>
<view v-else class="lack_available">额度不足</view>
</template> </template>
</template> </template>
<template v-else> <template v-else>
@ -109,7 +119,7 @@
<view class="settlement-btn not-btn" v-else>立即结算</view> <view class="settlement-btn not-btn" v-else>立即结算</view>
</view> </view>
</view> </view>
<view class="quota-info"> <view class="quota-info" v-if="Number(quota_type) === 1">
<view class="available-line">可用瓶装酒额度:{{ surplus_available || 0 }}</view> <view class="available-line">可用瓶装酒额度:{{ surplus_available || 0 }}</view>
<view class="available-line">可用封坛酒额度:{{ surplus_wine_available || 0 }}</view> <view class="available-line">可用封坛酒额度:{{ surplus_wine_available || 0 }}</view>
</view> </view>
@ -258,8 +268,10 @@ export default {
lng: '', lng: '',
// //
list: [], list: [],
total_page: 0,
search:{ search:{
page: 1, page: 1,
limit: 20,
store_name: '', store_name: '',
brand_id: '', brand_id: '',
store_category_id: '', store_category_id: '',
@ -289,9 +301,13 @@ export default {
surplus_available: 0, surplus_available: 0,
wine_available: 0, wine_available: 0,
surplus_wine_available: 0, surplus_wine_available: 0,
//
quota_type: 1,// 1=2=
} }
}, },
onLoad(options) { onLoad(options) {
this.quota_type = options.quota_type || 1;
// //
if (!this.isLogin) { if (!this.isLogin) {
this.isAuto = true; this.isAuto = true;
@ -428,6 +444,7 @@ export default {
if(Number(page) > 0) params.page = page; if(Number(page) > 0) params.page = page;
params.lat = _this.lat; params.lat = _this.lat;
params.lng = _this.lng; params.lng = _this.lng;
params.merchant_sub_type = _this.quota_type || 1;
// //
wineGoodsList(params).then(res => { wineGoodsList(params).then(res => {
let oldList = Object.assign({}, _this.list); let oldList = Object.assign({}, _this.list);
@ -436,6 +453,8 @@ export default {
// //
let list = res.data.list || {}; let list = res.data.list || {};
if (Object.values(list).length > 0) { if (Object.values(list).length > 0) {
_this.total_page = Math.ceil(res.data.count / _this.search.limit);
oldList = _this.$util.SplitArray(list, oldList); oldList = _this.$util.SplitArray(list, oldList);
_this.search.page++; _this.search.page++;
} }
@ -573,10 +592,12 @@ export default {
}, },
// - // -
quotaIsAdequate(num, price){ quotaIsAdequate(num, price){
//
if(Number(this.quota_type) === 2 ) return false;
// 0=1=2=
let wineType = this.currentGoods.wine_type || 0; let wineType = this.currentGoods.wine_type || 0;
let surplus_available = 0; let surplus_available = 0;
let tips = '额度不足!'; let tips = '额度不足!';
// 0=1=2=
if(Number(wineType) === 1) { if(Number(wineType) === 1) {
surplus_available = this.surplus_available || 0; surplus_available = this.surplus_available || 0;
tips = '瓶装酒额度不足!' tips = '瓶装酒额度不足!'
@ -642,6 +663,7 @@ export default {
}, },
// - // -
BuyFlowComputeTotal(){ BuyFlowComputeTotal(){
//
let totalNum = 0;// let totalNum = 0;//
let totalPrice = 0.00;// let totalPrice = 0.00;//
let needAvailable = 0;// let needAvailable = 0;//
@ -679,7 +701,7 @@ export default {
cartGetList(){ cartGetList(){
let _this = this; let _this = this;
// //
wineWithGoodsCartList().then(res => { wineWithGoodsCartList({ merchant_sub_type: _this.quota_type }).then(res => {
if(res.status == 200){ if(res.status == 200){
let data = res.data || {}; let data = res.data || {};
let buyList = {}; let buyList = {};
@ -763,7 +785,7 @@ export default {
settlementCart(){ settlementCart(){
let _this = this; let _this = this;
// //
wineWithGoodsCartIds().then(res => { wineWithGoodsCartIds({ merchant_sub_type: _this.quota_type }).then(res => {
if(res.status == 200){ if(res.status == 200){
let data = res.data || {}; let data = res.data || {};
if(Object.values(data).length <= 0){ if(Object.values(data).length <= 0){
@ -826,7 +848,7 @@ export default {
// - // -
getMerWineList() { getMerWineList() {
let _this = this; let _this = this;
wineList().then(res => { wineList({ merchant_sub_type: _this.quota_type}).then(res => {
_this.mer_list = res.data || {}; _this.mer_list = res.data || {};
}) })
}, },
@ -871,7 +893,7 @@ export default {
}, },
// //
onReachBottom() { onReachBottom() {
this.getGoodsList(); if(this.total_page > this.search.page) this.getGoodsList();
}, },
} }
</script> </script>