parent
9b0b933c08
commit
1f28e1e94c
|
|
@ -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) {
|
||||||
|
|
|
||||||
|
|
@ -1487,7 +1487,14 @@
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "缴费记录"
|
"navigationBarTitleText": "缴费记录"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "contract/index",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "合同签约"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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(){
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue