From 1f28e1e94cfc92ae5ae225de68f27e2f31be9109 Mon Sep 17 00:00:00 2001
From: wuhui_zzw <1760308791@qq.com>
Date: Tue, 2 Jul 2024 17:00:09 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=EF=BC=9A=E9=85=92=E9=81=93?=
=?UTF-8?q?=E9=A6=86=E5=95=86=E5=93=81=E5=85=91=E6=8D=A2=E9=A1=B5=E9=9D=A2?=
=?UTF-8?q?=E5=8C=BA=E5=88=86=E9=85=92=E9=81=93=E9=A6=86=E5=85=91=E6=8D=A2?=
=?UTF-8?q?=E5=92=8C=E5=B0=8F=E9=85=92=E9=A6=86=E5=85=91=E6=8D=A2=20?=
=?UTF-8?q?=E5=A2=9E=E5=8A=A0=EF=BC=9A=E6=83=A0=E6=B0=91=E7=A7=AF=E5=88=86?=
=?UTF-8?q?=E6=8A=B5=E6=89=A3=E4=BF=A1=E6=81=AF=E6=98=BE=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/wine.js | 8 +--
pages.json | 7 ++
pages/agent/centerV2.vue | 33 +++------
pages/agent/contract/index.vue | 100 ++++++++++++++++++++++++++++
pages/users/order_confirm/index.vue | 54 +++++++++++----
pages/wine/goods_list.vue | 58 +++++++++++-----
6 files changed, 204 insertions(+), 56 deletions(-)
create mode 100644 pages/agent/contract/index.vue
diff --git a/api/wine.js b/api/wine.js
index e38a3eb..8301759 100644
--- a/api/wine.js
+++ b/api/wine.js
@@ -9,12 +9,12 @@ export function wineGoodsList(data) {
return request.get(`wine/goods_list`, data);
}
// 酒道馆商品兑换购物车 - 获取购物车列表
-export function wineWithGoodsCartList() {
- return request.get(`wine/cart_list`);
+export function wineWithGoodsCartList(data) {
+ return request.get(`wine/cart_list`, data);
}
// 酒道馆商品兑换购物车 - 获取购物车所有商品id
-export function wineWithGoodsCartIds() {
- return request.get(`wine/cart_ids`);
+export function wineWithGoodsCartIds(data) {
+ return request.get(`wine/cart_ids`, data);
}
// 酒道馆商品兑换购物车 - 添加商品
export function wineWithGoodsCartAdd(data) {
diff --git a/pages.json b/pages.json
index 32c748c..a98badb 100644
--- a/pages.json
+++ b/pages.json
@@ -1487,7 +1487,14 @@
"style": {
"navigationBarTitleText": "缴费记录"
}
+ },
+ {
+ "path": "contract/index",
+ "style": {
+ "navigationBarTitleText": "合同签约"
+ }
}
+
]
},
{
diff --git a/pages/agent/centerV2.vue b/pages/agent/centerV2.vue
index fdb181d..52fa2f3 100644
--- a/pages/agent/centerV2.vue
+++ b/pages/agent/centerV2.vue
@@ -126,7 +126,7 @@ export default {
title: '推广二维码',
type: 'invite_qr_code',
url: '',
- icon: 'icon-erweima1',
+ icon: 'icon-hexiaoma',
});
}
// 除内勤、餐厅、配送商外都有下级管理
@@ -135,7 +135,7 @@ export default {
title: '下级管理',
type: 'link',
url: '/pages/agent/user/list',
- icon: 'icon-yonghu1',
+ icon: 'icon-wutouxiang',
});
}
// 订单信息
@@ -171,7 +171,7 @@ export default {
title: '我的邀请',
type: 'link',
url: '/pages/agent/invite/my_invite',
- icon: 'icon-wodetuandui',
+ icon: 'icon-yaoqing1',
});
}
// 省公司发起人 管理省公司门店
@@ -180,30 +180,19 @@ export default {
title: '门店管理',
type: 'store_management',
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;
},
qrcode_list(){
diff --git a/pages/agent/contract/index.vue b/pages/agent/contract/index.vue
new file mode 100644
index 0000000..8ab6ad4
--- /dev/null
+++ b/pages/agent/contract/index.vue
@@ -0,0 +1,100 @@
+
+
+
+
+ 合同签约
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/pages/users/order_confirm/index.vue b/pages/users/order_confirm/index.vue
index 06d0080..31e736c 100644
--- a/pages/users/order_confirm/index.vue
+++ b/pages/users/order_confirm/index.vue
@@ -373,17 +373,35 @@
-->
-
- 酒水卡积分抵扣:
-
-
- 使用了{{orderTotalWineIntegral || 0 }}个酒水卡积分,抵扣{{orderTotalWineIntegralPrice || 0}}元
-
-
- 剩余差价{{ orderTotalWineDiffMoney || 0 }}元,实际应付{{orderTotalWineDiffMoneyPrice || 0}}元
+
+
+
+ 酒水卡积分抵扣:
+
+
+ 使用了{{orderTotalWineIntegral || 0 }}个酒水卡积分,抵扣{{orderTotalWineIntegralPrice || 0}}元
+
+
+ 剩余差价{{ orderTotalWineDiffMoney || 0 }}元,实际应付{{ orderTotalWineDiffMoneyPrice || 0}}元
+
-
+
+ 惠民积分抵扣:
+
+
+ 使用了{{ orderTotalQuotaIntegral || 0 }}惠民积分,抵扣{{ orderTotalQuotaIntegralPrice || 0}}元
+
+
+ 剩余差价{{ orderTotalQuotaDiff || 0 }}元,实际应付{{ orderTotalQuotaDiffMoney || 0}}元
+
+
+
+
+
+
+
+
随机立减:
-¥{{orderTotalRandomReduction}}
@@ -545,10 +563,17 @@
coupon_price: 0, //优惠券抵扣金额
useIntegral: false, //是否使用积分
integral_price: 0, //积分抵扣金额
+ // 酒水卡积分
orderTotalWineIntegralPrice: 0,
orderTotalWineIntegral: '',
orderTotalWineDiffMoney: 0,
orderTotalWineDiffMoneyPrice: 0,
+ // 惠民积分
+ orderTotalQuotaIntegral: 0,
+ orderTotalQuotaIntegralPrice: 0,
+ orderTotalQuotaDiff: 0,
+ orderTotalQuotaDiffMoney: 0,
+
integral: 0,
ChangePrice: 0, //使用积分抵扣变动后的金额
formIds: [], //收集formid
@@ -1052,17 +1077,22 @@
that.$set(that, 'coupon_price', res.data.order_coupon_price);
that.$set(that, 'integral_count', res.data.order_total_integral);
that.$set(that, 'integral_price', res.data.order_total_integral_price);
-
+ // 酒水卡积分
that.$set(that, 'orderTotalWineIntegral', res.data.orderTotalWineIntegral);
that.$set(that, 'orderTotalWineIntegralPrice', res.data.orderTotalWineIntegralPrice);
that.$set(that, 'orderTotalWineDiffMoney', res.data.orderTotalWineDiffMoney);
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, 'orderTotalMerTitleQuota', res.data.orderTotalMerTitleQuota);
that.$set(that, 'orderTotalMerOtherQuota', res.data.orderTotalMerOtherQuota);
-
that.$set(that, 'open_integral', res.data.openIntegral);
that.$set(that, 'use_integral', res.data.useIntegral);
// that.$set(that, 'use_mer_integral', res.data.useMerIntegral);
diff --git a/pages/wine/goods_list.vue b/pages/wine/goods_list.vue
index 05432c5..9419844 100644
--- a/pages/wine/goods_list.vue
+++ b/pages/wine/goods_list.vue
@@ -20,7 +20,7 @@
- {{ mer_name || '酒道馆' }}
+ {{ mer_name || (Number(quota_type) === 1 ? '酒道馆' : '小酒馆') }}
@@ -51,22 +51,32 @@
-
+
- 瓶装酒
- 封坛酒
+
+ 瓶装酒
+ 封坛酒
+
+
+
+
-
-
-
- 额度不足
+
+
+
+
+ 额度不足
+
+
+
+
+ 额度不足
+
-
-
-
- 额度不足
+
+
@@ -109,7 +119,7 @@
立即结算
-
+
可用瓶装酒额度:{{ surplus_available || 0 }}
可用封坛酒额度:{{ surplus_wine_available || 0 }}
@@ -258,8 +268,10 @@ export default {
lng: '',
// 商品列表相关
list: [],
+ total_page: 0,
search:{
page: 1,
+ limit: 20,
store_name: '',
brand_id: '',
store_category_id: '',
@@ -289,9 +301,13 @@ export default {
surplus_available: 0,
wine_available: 0,
surplus_wine_available: 0,
+ // 惠民积分
+ quota_type: 1,// 类型:1=酒道馆,2=小酒馆
+
}
},
onLoad(options) {
+ this.quota_type = options.quota_type || 1;
// 判断:是否登录
if (!this.isLogin) {
this.isAuto = true;
@@ -428,6 +444,7 @@ export default {
if(Number(page) > 0) params.page = page;
params.lat = _this.lat;
params.lng = _this.lng;
+ params.merchant_sub_type = _this.quota_type || 1;
// 数据查询
wineGoodsList(params).then(res => {
let oldList = Object.assign({}, _this.list);
@@ -436,6 +453,8 @@ export default {
// 数据合并
let list = res.data.list || {};
if (Object.values(list).length > 0) {
+ _this.total_page = Math.ceil(res.data.count / _this.search.limit);
+
oldList = _this.$util.SplitArray(list, oldList);
_this.search.page++;
}
@@ -573,10 +592,12 @@ export default {
},
// 购买流程 - 判断对应的额度是否充足
quotaIsAdequate(num, price){
+ // 判断:如果当前是小酒馆兑换则无需判断额度是否充足 如果是酒道馆则需要判断额度是否充足
+ if(Number(this.quota_type) === 2 ) return false;
+ // 酒类型:0=未知,1=瓶装酒,2=封坛酒
let wineType = this.currentGoods.wine_type || 0;
let surplus_available = 0;
let tips = '额度不足!';
- // 酒类型:0=未知,1=瓶装酒,2=封坛酒
if(Number(wineType) === 1) {
surplus_available = this.surplus_available || 0;
tips = '瓶装酒额度不足!'
@@ -642,6 +663,7 @@ export default {
},
// 购买流程 - 计算总价值和总数量
BuyFlowComputeTotal(){
+ // 初始化信息
let totalNum = 0;// 总数量
let totalPrice = 0.00;// 总价值
let needAvailable = 0;// 需要的瓶装酒额度
@@ -679,7 +701,7 @@ export default {
cartGetList(){
let _this = this;
// 数据查询
- wineWithGoodsCartList().then(res => {
+ wineWithGoodsCartList({ merchant_sub_type: _this.quota_type }).then(res => {
if(res.status == 200){
let data = res.data || {};
let buyList = {};
@@ -763,7 +785,7 @@ export default {
settlementCart(){
let _this = this;
// 数据查询
- wineWithGoodsCartIds().then(res => {
+ wineWithGoodsCartIds({ merchant_sub_type: _this.quota_type }).then(res => {
if(res.status == 200){
let data = res.data || {};
if(Object.values(data).length <= 0){
@@ -826,7 +848,7 @@ export default {
// 搜索 - 获取酒道馆列表
getMerWineList() {
let _this = this;
- wineList().then(res => {
+ wineList({ merchant_sub_type: _this.quota_type}).then(res => {
_this.mer_list = res.data || {};
})
},
@@ -871,7 +893,7 @@ export default {
},
// 滚动到底部
onReachBottom() {
- this.getGoodsList();
+ if(this.total_page > this.search.page) this.getGoodsList();
},
}