From 4657ec005debd5333d5d9ca979566f0d006b1e67 Mon Sep 17 00:00:00 2001
From: 1019933623 <1019933623@qq.com>
Date: Tue, 2 Mar 2021 14:54:15 +0800
Subject: [PATCH 01/27] change style
---
.hbuilderx/launch.json | 11 +
.../reservation_order/reservation_order.vue | 104 ++--
src/components/timing_order/timing_order.vue | 134 +++++
src/pages.json | 14 +-
src/pages/index/index.vue | 53 +-
src/pages/order_list/order_list.vue | 13 +-
src/static/images/icon/x_close.png | Bin 0 -> 425 bytes
.../reservation_people/reservation_people.vue | 546 +++++++++++++++++++++
.../order/reservation_site/reservation_site.vue | 261 ++++++++++
.../reservation_details/reservation_details.vue | 32 ++
.../timing_details/timing_details.vue | 285 +++++++++++
.../device/pages/order_manage/order_manage.vue | 110 ++++-
.../device/static/images/order/tab_0_0.png | Bin 0 -> 878 bytes
.../device/static/images/order/tab_0_1.png | Bin 0 -> 1386 bytes
.../device/static/images/order/tab_0_10.png | Bin 0 -> 1790 bytes
.../device/static/images/order/tab_0_11.png | Bin 0 -> 1484 bytes
.../device/static/images/order/tab_0_2.png | Bin 0 -> 1833 bytes
.../device/static/images/order/tab_0_3.png | Bin 0 -> 1423 bytes
.../device/static/images/order/tab_0_4.png | Bin 0 -> 2743 bytes
.../device/static/images/order/tab_0_5.png | Bin 0 -> 856 bytes
.../device/static/images/order/tab_0_6.png | Bin 0 -> 1577 bytes
.../device/static/images/order/tab_0_7.png | Bin 0 -> 709 bytes
.../device/static/images/order/tab_0_8.png | Bin 0 -> 2319 bytes
.../device/static/images/order/tab_0_9.png | Bin 0 -> 1651 bytes
.../device/static/images/order/tab_1_0.png | Bin 0 -> 2296 bytes
src/subpackage/device/static/images/scan_code.png | Bin 0 -> 553 bytes
26 files changed, 1497 insertions(+), 66 deletions(-)
create mode 100644 .hbuilderx/launch.json
create mode 100644 src/components/timing_order/timing_order.vue
create mode 100644 src/static/images/icon/x_close.png
create mode 100644 src/subpackage/device/components/order/reservation_people/reservation_people.vue
create mode 100644 src/subpackage/device/components/order/reservation_site/reservation_site.vue
create mode 100644 src/subpackage/device/pages/order_details/reservation_details/reservation_details.vue
create mode 100644 src/subpackage/device/pages/order_details/timing_details/timing_details.vue
create mode 100644 src/subpackage/device/static/images/order/tab_0_0.png
create mode 100644 src/subpackage/device/static/images/order/tab_0_1.png
create mode 100644 src/subpackage/device/static/images/order/tab_0_10.png
create mode 100644 src/subpackage/device/static/images/order/tab_0_11.png
create mode 100644 src/subpackage/device/static/images/order/tab_0_2.png
create mode 100644 src/subpackage/device/static/images/order/tab_0_3.png
create mode 100644 src/subpackage/device/static/images/order/tab_0_4.png
create mode 100644 src/subpackage/device/static/images/order/tab_0_5.png
create mode 100644 src/subpackage/device/static/images/order/tab_0_6.png
create mode 100644 src/subpackage/device/static/images/order/tab_0_7.png
create mode 100644 src/subpackage/device/static/images/order/tab_0_8.png
create mode 100644 src/subpackage/device/static/images/order/tab_0_9.png
create mode 100644 src/subpackage/device/static/images/order/tab_1_0.png
create mode 100644 src/subpackage/device/static/images/scan_code.png
diff --git a/.hbuilderx/launch.json b/.hbuilderx/launch.json
new file mode 100644
index 0000000..501e01c
--- /dev/null
+++ b/.hbuilderx/launch.json
@@ -0,0 +1,11 @@
+{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
+ // launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数
+ "version": "0.0",
+ "configurations": [{
+ "type": "uniCloud",
+ "default": {
+ "launchtype": "remote"
+ }
+ }
+ ]
+}
diff --git a/src/components/reservation_order/reservation_order.vue b/src/components/reservation_order/reservation_order.vue
index 275b1bb..8fb776d 100644
--- a/src/components/reservation_order/reservation_order.vue
+++ b/src/components/reservation_order/reservation_order.vue
@@ -1,8 +1,8 @@
-
+
@@ -12,49 +12,77 @@
- 用户昵称:
+ 预订项目:
- {{orderInfo.nickname || '-'}}
-
-
-
- 支付时间:
-
- {{orderInfo.pay_time || '-'}}
-
-
-
- 预定日期:
-
- {{orderInfo.date || '-'}}
-
-
-
- 预定场次:
-
- {{e.venue_name}} {{e.duration}}
+ {{ orderInfo.venue_type_name || '-'}}
+
+
+
+ 预订场数:
+
+ {{ '-'}}
+
+
+
+
+ 预订时间:
+
+ {{orderInfo.date || '-'}}等
+
+
+
+
+
+
+ 数量:
+
+ {{ '-'}}
+
+
+
+ 类型:
+
+ {{ '-'}}
+
+
+
+
+ 有效期至:
+
+ {{ '-'}}
+
+
+
+
+ 使用日期:
+
+ {{ '-'}}
+
+
+
-
-
- 支付方式:{{zh_pay_type(orderInfo.pay_type)}}
- 共{{orderInfo.sessions.length || '-'}}场次 合计:¥{{orderInfo.amount || '0'}}
-
- 实付款 ¥{{orderInfo.pay_amount || '0'}}(折扣{{orderInfo.discount_amount || '0'}})
-
- 核销方式:{{zh_verify_type(orderInfo.verify_type)}} {{orderInfo.verify_time || '-'}}
- 退款时间:{{orderInfo.refund_time || '-'}}
+ 实付款 ¥{{orderInfo.pay_amount || '0'}}
+
+
@@ -127,6 +161,9 @@ export default {
.rh-active{
color: $themeColor;
}
+ .rh-red{
+ color: #EA5061;
+ }
}
.ro-section{
padding-bottom: 20upx;
@@ -179,6 +216,7 @@ export default {
color: #9c9c9f;
.rt-txt{
color: #1A1A1A;
+ margin-left: 10rpx;
}
}
}
diff --git a/src/components/timing_order/timing_order.vue b/src/components/timing_order/timing_order.vue
new file mode 100644
index 0000000..0fc55f0
--- /dev/null
+++ b/src/components/timing_order/timing_order.vue
@@ -0,0 +1,134 @@
+
+
+
+
+
+ 订单编号:
+
+ {{orderInfo.order_no || '-'}}
+
+
+
+
+
+ 项目:
+
+ {{'羽毛球(1号馆)' || '-'}}
+
+
+
+ 时长:
+
+ {{ '1小时58分46秒' || '-'}}
+
+
+
+
+ 实付款 ¥{{orderInfo.pay_amount || '0'}}
+
+
+
+
+
+
+
diff --git a/src/pages.json b/src/pages.json
index 47f829f..66ca532 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -184,7 +184,7 @@
}
}
- ],
+ ],
"subpackages": [
{
"root": "subpackage/device",
@@ -248,6 +248,18 @@
"style" : {
"navigationBarTitleText": "售货柜管理"
}
+ },
+ {
+ "path": "pages/order_details/reservation_details/reservation_details",
+ "style" : {
+ "navigationBarTitleText": "预约订单详情"
+ }
+ },
+ {
+ "path": "pages/order_details/timing_details/timing_details",
+ "style" : {
+ "navigationBarTitleText": "计时订单详情"
+ }
}
]
}
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index a72b954..b5cb39d 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -79,30 +79,36 @@
serverKey: 1002 // 后端对应权限编号
},
{
- id: 2,
- name: '经营分析',
- path: '',
- serverKey: 1003 // 后端对应权限编号
- },
- {
id: 3,
- name: '场馆订单',
- path: '/pages/order_list/order_list',
- serverKey: 1004 // 后端对应权限编号
- },
- {
- id: 4,
- name: '会员卡订单',
- path: '/pages/order_list/order_list',
- serverKey: 1005 // 后端对应权限编号
- },
- {
- id: 5,
- name: '积分订单',
- // path: '/pages/order_list/order_list',
- path: '',
- serverKey: 1006 // 后端对应权限编号
+ name: '订单管理',
+ path: '/subpackage/device/pages/order_manage/order_manage',
+ serverKey: 1011 // 后端对应权限编号
},
+ // {
+ // id: 2,
+ // name: '经营分析',
+ // path: '',
+ // serverKey: 1003 // 后端对应权限编号
+ // },
+ // {
+ // id: 3,
+ // name: '场馆订单',
+ // path: '/pages/order_list/order_list',
+ // serverKey: 1004 // 后端对应权限编号
+ // },
+ // {
+ // id: 4,
+ // name: '会员卡订单',
+ // path: '/pages/order_list/order_list',
+ // serverKey: 1005 // 后端对应权限编号
+ // },
+ // {
+ // id: 5,
+ // name: '积分订单',
+ // // path: '/pages/order_list/order_list',
+ // path: '',
+ // serverKey: 1006 // 后端对应权限编号
+ // },
{
id: 6,
name: '员工管理',
@@ -185,6 +191,7 @@
let _permission = indexData.permission || {};
if(!app.isLogin())return this.showAuthor();
if(!tabInfo.path)return util.showNone('暂未开放!');
+ if(tabInfo.id == 3)return util.routeTo(tabInfo.path,'nT');
if(!_permission[tabInfo.serverKey])return util.showNone('暂无权限,请联系管理员开启!')
if(this.isOrderTab(tabInfo.id))return util.routeTo(tabInfo.path + `?order_type=${tabInfo.id}`,'nT');
util.routeTo(tabInfo.path,'nT');
@@ -192,7 +199,7 @@
isOrderTab(ID){
return ID == 3 || ID == 4 || ID == 5
},
- getIndexInfo(){
+ getIndexInfo(){
servers.get({
url: API.calc,
data: {},
diff --git a/src/pages/order_list/order_list.vue b/src/pages/order_list/order_list.vue
index 6dfa18c..cc270f5 100644
--- a/src/pages/order_list/order_list.vue
+++ b/src/pages/order_list/order_list.vue
@@ -1,7 +1,7 @@
@@ -537,6 +537,7 @@ export default {
_this.goodsInfo[0].goodsData = [];
_this.goodsInfo[1].style = _this.categoryBtnStyle.click;
_this.goodsInfo[1].isShow = true;
+ _this.categoryGoTop(); // 分类列表需要滚动至顶部
},
// 店铺列表
diff --git a/src/subpackage/retail/pages/search/search.vue b/src/subpackage/retail/pages/search/search.vue
index f5df25e..273458c 100644
--- a/src/subpackage/retail/pages/search/search.vue
+++ b/src/subpackage/retail/pages/search/search.vue
@@ -11,7 +11,7 @@
/>
-
+
From 02c42722ae4f61dce652b82127bb0c214815eed4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=AE=B6=E5=8D=8E?= <3599164049@qq.com>
Date: Mon, 22 Mar 2021 15:34:54 +0800
Subject: [PATCH 05/27] update
---
src/subpackage/retail/pages/index/index.vue | 78 ++++++++++++++++++++---------
1 file changed, 53 insertions(+), 25 deletions(-)
diff --git a/src/subpackage/retail/pages/index/index.vue b/src/subpackage/retail/pages/index/index.vue
index 5affa54..ee99477 100644
--- a/src/subpackage/retail/pages/index/index.vue
+++ b/src/subpackage/retail/pages/index/index.vue
@@ -45,8 +45,8 @@
-
- {{ item.count }}
+
+ {{ item.count }}
@@ -235,20 +235,41 @@ export default {
// 购物车列表数量选项触发
cartCountClick(type, i) {
+ // 增减购物车对应的主页数量
+ let curId = this.cartList[i].id;
+ let mainItem = null;
+ for (let i = 0; i < this.goodsInfo.length; ++i) {
+ for (let j = 0; j < this.goodsInfo[i].goodsData.length; ++j) {
+ if (curId == this.goodsInfo[i].goodsData[j].id) {
+ mainItem = this.goodsInfo[i].goodsData[j];
+ }
+ }
+ }
+
switch (type) {
case "add": {
this.cartList[i].count += 1;
+ mainItem.count += 1;
} break;
case "sub": {
- if (this.cartList[i].count <= 0) {
- return;
+ if (this.cartList[i].count > 0) {
+ this.cartList[i].count -= 1;
}
- this.cartList[i].count -= 1;
+ if (mainItem.count > 0) {
+ mainItem.count -= 1;
+ }
} break;
}
+ // 没数量了就删掉
+ if (this.cartList[i].count <= 0) {
+ this.cartList.splice(i, 1);
+ }
+
this.calcCartTotalPriceAndCount(); // 计算购物车总价跟总量
+ this.calcTotalPriceAndCount(); // 计算总价跟总量
+ this.cartListStatusChange(); // 购物车列表状态变化
},
// 获取购物车列表的最终数据
@@ -301,6 +322,28 @@ export default {
}
},
+ // 购物车列表状态变化
+ cartListStatusChange() {
+ // 根据数量改变列表高度
+ let num = this.cartList.length;
+ this.cartListScroll = false;
+ if (this.cartList.length > 5) {
+ num = 5;
+ this.cartListScroll = true;
+ }
+
+ // 只有一条数据就不会显示border
+ if (this.cartList.length <= 1) {
+ this.cartListItemBorderBottom = "0rpx solid rgb(216,216,216)";
+ }
+ else {
+ this.cartListItemBorderBottom = "1rpx solid rgb(216,216,216)";
+ }
+
+ this.cartListHeight = `${151.6 * num}rpx`;
+ this.cartListDialogHeight = `${(878 - 758) + 151.6 * num}rpx`;
+ },
+
// 购物车点击
cartClick() {
if (this.isShowCartList) {
@@ -308,27 +351,8 @@ export default {
}
else {
this.addToCartList(); // 将主页数据加入到购物车列表
-
- // 根据数量改变列表高度
- let num = this.cartList.length;
- this.cartListScroll = false;
- if (this.cartList.length > 5) {
- num = 5;
- this.cartListScroll = true;
- }
-
- // 只有一条数据就不会显示border
- if (this.cartList.length <= 1) {
- this.cartListItemBorderBottom = "0rpx solid rgb(216,216,216)";
- }
- else {
- this.cartListItemBorderBottom = "1rpx solid rgb(216,216,216)";
- }
-
- this.cartListHeight = `${151.6 * num}rpx`;
- this.cartListDialogHeight = `${(878 - 758) + 151.6 * num}rpx`;
+ this.cartListStatusChange(); // 购物车列表状态变化
this.isShowCartList = true;
-
this.calcCartTotalPriceAndCount(); // 计算购物车总价跟总量
}
},
@@ -533,6 +557,8 @@ export default {
});
}
+ _this.totalCount = 0;
+ _this.totalPrice = 0;
_this.goodsInfo[0].isSearch = false;
_this.goodsInfo[0].goodsData = [];
_this.goodsInfo[1].style = _this.categoryBtnStyle.click;
@@ -724,6 +750,8 @@ export default {
padding-bottom: 24rpx;
>view {
+ padding-right: 24rpx;
+
&:first-child {
font-size: 28rpx;
}
From 171041ea3914b42d71bae4352c9b8cb7b8796144 Mon Sep 17 00:00:00 2001
From: 1019933623 <1019933623@qq.com>
Date: Mon, 22 Mar 2021 16:47:40 +0800
Subject: [PATCH 06/27] fix style
---
src/pages/index/index.vue | 97 +++++++++-------------
.../device/pages/order_manage/order_manage.vue | 2 +-
2 files changed, 40 insertions(+), 59 deletions(-)
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 77e4276..29474ae 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -33,11 +33,14 @@
-
-
+
+
+
+
{{e.name}}
+
@@ -79,62 +82,37 @@
serverKey: 1002 // 后端对应权限编号
},
{
- id: 3,
+ id: 2,
name: '订单管理',
path: '/subpackage/device/pages/order_manage/order_manage',
serverKey: 1011 // 后端对应权限编号
},
- // {
- // id: 2,
- // name: '经营分析',
- // path: '',
- // serverKey: 1003 // 后端对应权限编号
- // },
- // {
- // id: 3,
- // name: '场馆订单',
- // path: '/pages/order_list/order_list',
- // serverKey: 1004 // 后端对应权限编号
- // },
- // {
- // id: 4,
- // name: '会员卡订单',
- // path: '/pages/order_list/order_list',
- // serverKey: 1005 // 后端对应权限编号
- // },
- // {
- // id: 5,
- // name: '积分订单',
- // // path: '/pages/order_list/order_list',
- // path: '',
- // serverKey: 1006 // 后端对应权限编号
- // },
{
- id: 6,
+ id: 3,
name: '员工管理',
path: '/pages/employee/manage/manage',
serverKey: 1007 // 后端对应权限编号
},
{
- id: 7,
+ id: 4,
name: '核销查询',
path: '/pages/write_off/list/list',
serverKey: 1008 // 后端对应权限编号
},
{
- id: 8,
+ id: 5,
name: '场地管理',
path: '/pages/site/order_list/order_list',
serverKey: 1009 // 后端对应权限编号
},
{
- id: 9,
+ id: 6,
name: '设备管理',
path: '/subpackage/device/pages/index/index',
serverKey: 1010 // 后端对应权限编号
},
{
- id: 10,
+ id: 7,
name: '商品零售',
path: '/subpackage/retail/pages/index/index',
serverKey: 1010 // 后端对应权限编号
@@ -197,14 +175,11 @@
let _permission = indexData.permission || {};
if(!app.isLogin())return this.showAuthor();
if(!tabInfo.path)return util.showNone('暂未开放!');
- if(tabInfo.id == 3)return util.routeTo(tabInfo.path,'nT');
+ if(tabInfo.id == 2)return util.routeTo(tabInfo.path,'nT'); //测试
if(!_permission[tabInfo.serverKey])return util.showNone('暂无权限,请联系管理员开启!')
- if(this.isOrderTab(tabInfo.id))return util.routeTo(tabInfo.path + `?order_type=${tabInfo.id}`,'nT');
util.routeTo(tabInfo.path,'nT');
},
- isOrderTab(ID){
- return ID == 3 || ID == 4 || ID == 5
- },
+
getIndexInfo(){
servers.get({
url: API.calc,
@@ -348,7 +323,7 @@
.ic-header{
position: relative;
height: 476upx;
- margin-bottom: 48upx;
+ margin-bottom: 24upx;
padding: 38upx 24upx 0;
border-radius: 14upx;
background-color: $themeColor;
@@ -436,7 +411,6 @@
}
}
.ic-notice{
- margin-bottom: 24upx;
padding: 0 24upx;
height: 108upx;
border-radius: 10upx;
@@ -481,29 +455,36 @@
}
.ic-tabs{
display: flex;
- justify-content: space-between;
flex-wrap: wrap;
+ padding: 0upx 14upx 12upx;
+ margin-top: -12upx;
.it-item{
- padding-top: 54upx;
- margin-bottom: 24upx;
flex-shrink: 0;
- flex-grow: 0;
- width: 218upx;
- height: 218upx;
- border-radius: 10upx;
- background-color: #fff;
- >image{
- display: block;
- margin: 0 auto 20upx;
- width: 52upx;
- height: 52upx;
- }
+ flex-grow: 1;
+ max-width: 33.33%;
+ min-width: 33.33%;
+ padding: 12upx;
>view{
- text-align: center;
- line-height: 40upx;
- font-size: 28upx;
- color: #1a1a1a;
+ padding: 40upx 10upx 0;
+ height: 218upx;
+ border-radius: 10upx;
+ background-color: #fff;
+ >image{
+ display: block;
+ margin: 0 auto 20upx;
+ width: 52upx;
+ height: 52upx;
+ }
+ >view{
+ text-align: center;
+ line-height: 40upx;
+ font-size: 28upx;
+ color: #1a1a1a;
+ @include textHide(1);
+ }
+
}
+
}
}
.ic-author-modal{
diff --git a/src/subpackage/device/pages/order_manage/order_manage.vue b/src/subpackage/device/pages/order_manage/order_manage.vue
index a2ca0d7..264c49b 100644
--- a/src/subpackage/device/pages/order_manage/order_manage.vue
+++ b/src/subpackage/device/pages/order_manage/order_manage.vue
@@ -111,7 +111,7 @@ export default {
util.routeTo(tabInfo.path,'nT');
},
isOrderTab(ID){
- return ID == 3 || ID == 4 || ID == 5 || ID == 1
+ return ID == 0 || ID == 4 || ID == 5 || ID == 1
},
}
}
From bbbf2ff2452744c012cda7b217a2a6d01daeff35 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=AE=B6=E5=8D=8E?= <3599164049@qq.com>
Date: Mon, 22 Mar 2021 17:52:03 +0800
Subject: [PATCH 07/27] cart change
---
src/subpackage/retail/pages/index/index.vue | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/subpackage/retail/pages/index/index.vue b/src/subpackage/retail/pages/index/index.vue
index ee99477..8103b08 100644
--- a/src/subpackage/retail/pages/index/index.vue
+++ b/src/subpackage/retail/pages/index/index.vue
@@ -352,6 +352,9 @@ export default {
else {
this.addToCartList(); // 将主页数据加入到购物车列表
this.cartListStatusChange(); // 购物车列表状态变化
+
+ this.cartTotalPrice = this.totalPrice;
+ this.cartTotalCount = this.totalCount;
this.isShowCartList = true;
this.calcCartTotalPriceAndCount(); // 计算购物车总价跟总量
}
@@ -393,8 +396,6 @@ export default {
this.totalPrice = price.toFixed(2);
this.totalCount = count;
- this.cartTotalPrice = this.totalPrice;
- this.cartTotalCount = this.totalCount;
},
// 主页数量选项触发
From f670ba4947b7076c3bd3c7f4cfa8509f1cb746d8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=AE=B6=E5=8D=8E?= <3599164049@qq.com>
Date: Thu, 25 Mar 2021 09:36:55 +0800
Subject: [PATCH 08/27] index header z-index
---
src/subpackage/retail/pages/index/index.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/subpackage/retail/pages/index/index.vue b/src/subpackage/retail/pages/index/index.vue
index 8103b08..a527035 100644
--- a/src/subpackage/retail/pages/index/index.vue
+++ b/src/subpackage/retail/pages/index/index.vue
@@ -618,6 +618,7 @@ export default {
display: flex;
flex-direction: column;
background-color: rgb(237,237,245);
+ z-index: 0;
.header-store-selecter {
display: flex;
From 484b2ae3ce7449dfc7540db9eba93dd5ef82a52f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=AE=B6=E5=8D=8E?= <3599164049@qq.com>
Date: Thu, 25 Mar 2021 13:27:43 +0800
Subject: [PATCH 09/27] cart price check
---
src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue | 4 +++-
src/subpackage/retail/pages/confirm_goods/confirm_goods.vue | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue b/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue
index e1949ec..ebee5d6 100644
--- a/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue
+++ b/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue
@@ -52,7 +52,9 @@
// 购物车输入确认
cartInputConfirm(event, id) {
// 修改购物车列表对应的价格
- let value = parseFloat(event.detail.value).toFixed(2);
+ // console.log(event.detail.value.match(/(([0-9]+\.[0-9]+)|([0-9]+))/g)); // 取正浮点数 跟 正整数
+
+ let value = parseFloat(event.detail.value ? event.detail.value : 0).toFixed(2);
for (let i = 0; i < this.cartList.length; ++i) {
if (this.cartList[i].id == id) {
this.$emit("update:cartInputConfirm", value, i);
diff --git a/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue b/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue
index d9cb4aa..011f7a1 100644
--- a/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue
+++ b/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue
@@ -100,7 +100,7 @@
// 购物车输入确认
cartInputConfirm(event, id) {
// 修改购物车列表对应的价格
- let value = parseFloat(event.detail.value).toFixed(2);
+ let value = parseFloat(event.detail.value ? event.detail.value : 0).toFixed(2);
for (let i = 0; i < this.cartListFinal.length; ++i) {
if (this.cartListFinal[i].id == id) {
this.cartListFinal[i].price = value;
From 2b9347e6bf0d71b236959cc2f5f59d547c1c401d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=AE=B6=E5=8D=8E?= <3599164049@qq.com>
Date: Wed, 14 Apr 2021 13:30:18 +0800
Subject: [PATCH 10/27] =?UTF-8?q?=E9=9B=B6=E5=94=AE=E6=8E=A5=E5=8F=A3?=
=?UTF-8?q?=E5=AF=B9=E6=8E=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../components/hover_cart_list/hover_cart_list.vue | 8 +-
src/subpackage/retail/js/retail_api.js | 6 +-
.../retail/pages/confirm_goods/confirm_goods.vue | 60 +++-
src/subpackage/retail/pages/index/index.vue | 359 +++++++++++----------
src/subpackage/retail/pages/search/search.vue | 105 ++++--
5 files changed, 332 insertions(+), 206 deletions(-)
diff --git a/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue b/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue
index ebee5d6..202e2ac 100644
--- a/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue
+++ b/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue
@@ -10,16 +10,16 @@
- {{ item.name }}
- {{ item.spec }}
+ {{ item.erp_goods_name }}
+ {{ item.erp_goods_specs }}
-
+
元
- {{ item.count }}
+ {{ item.erp_goods_sale_total }}
diff --git a/src/subpackage/retail/js/retail_api.js b/src/subpackage/retail/js/retail_api.js
index b672450..846c7fc 100644
--- a/src/subpackage/retail/js/retail_api.js
+++ b/src/subpackage/retail/js/retail_api.js
@@ -1,7 +1,11 @@
import { ORIGIN } from '../../../js/api';
export const RETAIL_API = {
- stadiumList:`${ORIGIN}/stadium/list`, // 店铺列表
+ assistantRetail:`${ORIGIN}/admin/assistant/retail`, // 收款出库
+ assistantListErpGoods:`${ORIGIN}/admin/assistant/listErpGoods`, // 物品管理
+ assistantListErpGoodsCate:`${ORIGIN}/admin/assistant/listErpGoodsCate`, // 物品分类管理
+ assistantGetAssistantStadiums:`${ORIGIN}/admin/assistant/getAssistantStadiums`, // 店铺列表
+ assistantListErpGoodsCateAndGoods:`${ORIGIN}/admin/assistant/listErpGoodsCateAndGoods`, // 物品分类物品列表
}
export default RETAIL_API;
\ No newline at end of file
diff --git a/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue b/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue
index 011f7a1..f83eca3 100644
--- a/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue
+++ b/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue
@@ -9,17 +9,17 @@
- {{ item.name }}
- {{ item.spec }}
+ {{ item.erp_goods_name }}
+ {{ item.erp_goods_specs }}
-
- {{item.price}}
+
+ {{item.erp_goods_price}}
元
- {{ item.count }}
+ {{ item.erp_goods_sale_total }}
@@ -52,6 +52,7 @@
data() {
return {
isEdited: false, // 是否处于编辑模式
+ curStore: null, // 当前店铺信息
cartListFinal: [], // 购物车最终列表数据
totalPrice: 0, // 最终价格
cartConfirmText: "收款出库", // 收款出库 || 确认
@@ -63,6 +64,7 @@
onLoad(option) {
let data = JSON.parse(decodeURIComponent(option.data));
+ this.curStore = data.curStore;
this.cartListFinal = [];
for (let i = 0; i < data.cartListFinal.length; ++i) {
this.cartListFinal.push(tools.getNewObj(data.cartListFinal[i]));
@@ -92,8 +94,42 @@
return;
}
- uni.navigateBack({
- delta: 1
+ let _this = this;
+ let data = [];
+ for (let i = 0; i < this.cartListFinal.length; ++i) {
+ if (this.cartListFinal[i].erp_goods_sale_total) {
+ data.push({
+ id: this.cartListFinal[i].id,
+ name: this.cartListFinal[i].erp_goods_name,
+ price: this.cartListFinal[i].erp_goods_price,
+ nums: this.cartListFinal[i].erp_goods_sale_total,
+ unit: this.cartListFinal[i].erp_goods_unit,
+ });
+ }
+ }
+
+ if (!data.length) {
+ uni.showToast({
+ title: "暂无商品数量!",
+ icon: "none"
+ });
+
+ return;
+ }
+
+ util.showLoad();
+ retailServer.get({
+ url: retailApi.assistantRetail,
+ data: {
+ store_id: _this.curStore.id,
+ goods_data: data,
+ },
+ failMsg: '出库失败!'
+ }).then(res => {
+ util.hideLoad();
+ uni.navigateBack({
+ delta: 1
+ });
});
},
@@ -103,7 +139,7 @@
let value = parseFloat(event.detail.value ? event.detail.value : 0).toFixed(2);
for (let i = 0; i < this.cartListFinal.length; ++i) {
if (this.cartListFinal[i].id == id) {
- this.cartListFinal[i].price = value;
+ this.cartListFinal[i].erp_goods_price = value;
}
}
@@ -124,14 +160,14 @@
if (item) {
switch (type) {
case "add": {
- item.count += 1;
+ item.erp_goods_sale_total += 1;
} break;
case "sub": {
- if (item.count <= 0) {
+ if (item.erp_goods_sale_total <= 0) {
return;
}
- item.count -= 1;
+ item.erp_goods_sale_total -= 1;
} break;
}
@@ -144,7 +180,7 @@
let price = 0.0;
for (let i = 0; i < this.cartListFinal.length; ++i) {
- price += (this.cartListFinal[i].count * this.cartListFinal[i].price);
+ price += (this.cartListFinal[i].erp_goods_sale_total * this.cartListFinal[i].erp_goods_price);
}
this.totalPrice = price.toFixed(2);
diff --git a/src/subpackage/retail/pages/index/index.vue b/src/subpackage/retail/pages/index/index.vue
index a527035..4be3b3b 100644
--- a/src/subpackage/retail/pages/index/index.vue
+++ b/src/subpackage/retail/pages/index/index.vue
@@ -30,24 +30,24 @@
-
-
+
+
-
-
- {{ item.name }}
- {{ item.spec }}
+
+
+ {{ item.erp_goods_name }}
+ {{ item.erp_goods_specs }}
- ¥{{ item.price }}
+ ¥{{ item.erp_goods_price }}
-
- {{ item.count }}
-
+
+ {{ item.erp_goods_sale_total }}
+
@@ -100,9 +100,11 @@ export default {
},
categoryScrollTop: 0, // 分类滚动值
categoryOldScrollTop: 0, // 分类滚动旧值
- categoryIndex: 1, // 分类索引值,默认第一项是搜索,过滤掉,直接从第二项开始计算
+ // 分类索引值,默认第一项是搜索,第二项可能是热销,会在获取接口数据时判断,然后过滤掉
+ categoryIndex: 1,
// curStoreList: [{ id: '', name: '请选择门店'}], // 当前门店列表
+ indexData: {}, // 首页 统计数据
curStoreList: [], // 当前门店列表
curStore: {}, // 当前门店
goodsInfo: [], // 商品信息
@@ -122,13 +124,12 @@ export default {
}
},
onLoad() {
- this.deleteSearchLocal(); // 删除本地的历史搜索
+ this.deleteSearchLocal(); // 删除本地的搜索记录
this.getStoreList(); // 获取店铺列表
- this.getGoodsInfo(); // 获取商品信息
this.fixMainHeight(); // 适配主内容高度
},
onShow() {
- this.getSearchLocal(); // 获取本地的历史搜索
+ this.getSearchLocal(); // 获取本地的搜索记录
},
methods: {
// 分类列表滚动监听
@@ -149,31 +150,41 @@ export default {
util.showLoad();
setTimeout(util.hideLoad, 1000);
- this.goodsInfo[0].goodsData = [];
- let random = Math.floor(Math.random() * 5 + 1);
- console.log(random);
+ this.goodsInfo[0].goods_list = [];
- let tempData = [];
- for (let i = 0; i < this.goodsInfo[random].goodsData.length; ++i) {
- tempData.push(tools.getNewObj(this.goodsInfo[random].goodsData[i]));
+ // 剔除相同的商品
+ let tempData = {};
+ for (let i = 0; i < data.length; ++i) {
+ if (data[i].goods_list) {
+ for (let j = 0; j < data[i].goods_list.length; ++j) {
+ tempData["" + data[i].goods_list[j].id] = data[i].goods_list[j];
+ }
+ }
}
- let conectData = []
- for (let i = 1; i < this.goodsInfo.length; ++i) {
- conectData = [ ...conectData, ...this.goodsInfo[i].goodsData ];
+ for (let key in tempData) {
+ this.goodsInfo[0].goods_list.push(tempData[key]);
}
- for (let i = 0; i < tempData.length; ++i) {
- for (let j = 0; j < conectData.length; ++j) {
- if (tempData[i].id == conectData[j].id) {
- this.goodsInfo[0].goodsData.push(conectData[j]);
+ // 同步一下数据,因为有可能搜索的数据 在其他分类出现过
+ let otherData = [];
+ for (let i = this.categoryIndex; i < this.goodsInfo.length; ++i) {
+ for (let j = 0; j < this.goodsInfo[i].goods_list.length; ++j) {
+ otherData.push(this.goodsInfo[i].goods_list[j]);
+ }
+ }
+ for (let i = 0; i < this.goodsInfo[0].goods_list.length; ++i) {
+ for (let j = 0; j < otherData.length; ++j) {
+ if (this.goodsInfo[0].goods_list[i].id == otherData[j].id) {
+ this.goodsInfo[0].goods_list[i].erp_goods_sale_total = otherData[j].erp_goods_sale_total;
}
}
}
+ // end
this.categoryGoTop(); // 每次搜索后,分类列表都要滚动到顶部
- this.goodsInfo[0].isSearch = true;
- this.mainCategoryClick(this.goodsInfo[0].id);
+ this.goodsInfo[0].isCateShow = true;
+ this.mainCategoryClick(this.goodsInfo[0].cate.id);
},
// 获取本地的历史搜索
@@ -183,7 +194,6 @@ export default {
uni.getStorage({
key: 'searchData',
success: function (res) {
- console.log(res.data);
_this.setSearchData(res.data); // 设置搜索数据
_this.deleteSearchLocal(); // 删除本地的历史搜索
},
@@ -215,7 +225,7 @@ export default {
// 购物车输入确认
cartInputConfirm(value, i) {
- this.cartList[i].price = value;
+ this.cartList[i].erp_goods_price = value;
this.calcCartTotalPriceAndCount(); // 计算购物车总价跟总量
},
@@ -225,8 +235,8 @@ export default {
let count = 0;
for (let i = 0; i < this.cartList.length; ++i) {
- price += (this.cartList[i].count * this.cartList[i].price);
- count += this.cartList[i].count;
+ price += (this.cartList[i].erp_goods_sale_total * this.cartList[i].erp_goods_price);
+ count += this.cartList[i].erp_goods_sale_total;
}
this.cartTotalPrice = price.toFixed(2);
@@ -237,33 +247,38 @@ export default {
cartCountClick(type, i) {
// 增减购物车对应的主页数量
let curId = this.cartList[i].id;
- let mainItem = null;
+ let mainItems = []; // 可能不止一个
for (let i = 0; i < this.goodsInfo.length; ++i) {
- for (let j = 0; j < this.goodsInfo[i].goodsData.length; ++j) {
- if (curId == this.goodsInfo[i].goodsData[j].id) {
- mainItem = this.goodsInfo[i].goodsData[j];
+ for (let j = 0; j < this.goodsInfo[i].goods_list.length; ++j) {
+ if (curId == this.goodsInfo[i].goods_list[j].id) {
+ mainItems.push(this.goodsInfo[i].goods_list[j]);
}
}
}
switch (type) {
case "add": {
- this.cartList[i].count += 1;
- mainItem.count += 1;
+ this.cartList[i].erp_goods_sale_total += 1;
+ for (let i = 0; i < mainItems.length; ++i) {
+ mainItems[i].erp_goods_sale_total += 1;
+ }
} break;
case "sub": {
- if (this.cartList[i].count > 0) {
- this.cartList[i].count -= 1;
+ if (this.cartList[i].erp_goods_sale_total > 0) {
+ this.cartList[i].erp_goods_sale_total -= 1;
}
- if (mainItem.count > 0) {
- mainItem.count -= 1;
+ for (let i = 0; i < mainItems.length; ++i) {
+ if (mainItems[i].erp_goods_sale_total > 0) {
+ mainItems[i].erp_goods_sale_total -= 1;
+ }
}
+
} break;
}
// 没数量了就删掉
- if (this.cartList[i].count <= 0) {
+ if (this.cartList[i].erp_goods_sale_total <= 0) {
this.cartList.splice(i, 1);
}
@@ -277,7 +292,7 @@ export default {
let arr = [];
for (let i = 0; i < this.cartList.length; ++i) {
- if (this.cartList[i].count) {
+ if (this.cartList[i].erp_goods_sale_total) {
arr.push(tools.getNewObj(this.cartList[i]));
}
}
@@ -295,6 +310,7 @@ export default {
let data = {
cartListFinal: this.cartListFinal,
+ curStore: this.curStore,
};
uni.navigateTo({
url: `/subpackage/retail/pages/confirm_goods/confirm_goods?data=${encodeURIComponent(JSON.stringify(data))}`
@@ -314,12 +330,18 @@ export default {
// 计算购物车列表
for (let i = this.categoryIndex; i < this.goodsInfo.length; ++i) {
- for (let j = 0; j < this.goodsInfo[i].goodsData.length; ++j) {
- if (this.goodsInfo[i].goodsData[j].count) {
- this.cartList.push(tools.getNewObj(this.goodsInfo[i].goodsData[j]));
+ for (let j = 0; j < this.goodsInfo[i].goods_list.length; ++j) {
+ if (this.goodsInfo[i].goods_list[j].erp_goods_sale_total) {
+ this.cartList.push(tools.getNewObj(this.goodsInfo[i].goods_list[j]));
}
}
}
+
+ // 再把搜索跟热销的 不在其他分类里的数据找出来也加上
+ let tempData = this.findDifferentData(); // 找不同
+ for (let i = 0; i < tempData.length; ++i) {
+ this.cartList.push(tools.getNewObj(tempData[i]));
+ }
},
// 购物车列表状态变化
@@ -382,15 +404,61 @@ export default {
});
},
+ // 找搜索跟热销 不同于其他分类的数据
+ findDifferentData() {
+ let searchAndHotData = [];
+ for (let i = 0; i < this.categoryIndex; ++i) {
+ for (let j = 0; j < this.goodsInfo[i].goods_list.length; ++j) {
+ searchAndHotData.push(this.goodsInfo[i].goods_list[j]);
+ }
+ }
+
+ let otherData = [];
+ for (let i = this.categoryIndex; i < this.goodsInfo.length; ++i) {
+ for (let j = 0; j < this.goodsInfo[i].goods_list.length; ++j) {
+ otherData.push(this.goodsInfo[i].goods_list[j]);
+ }
+ }
+
+ let mark = false;
+ let tempData = [];
+ for (let i = 0; i < searchAndHotData.length; ++i) {
+ mark = false; // 表示不在其他分类里面
+
+ for (let j = 0; j < otherData .length; ++j) {
+ if (searchAndHotData[i].id == otherData [j].id) {
+ mark = true;
+ }
+ }
+
+ // 如果不在 并且有数量,那么加进列表
+ if (!mark && searchAndHotData[i].erp_goods_sale_total) {
+ tempData.push(searchAndHotData[i]);
+ }
+ }
+
+ return tempData;
+ },
+
// 计算总价跟总量
calcTotalPriceAndCount() {
let price = 0.0;
let count = 0;
+ // 先计算搜索、热销后面的价格跟数量
for (let i = this.categoryIndex; i < this.goodsInfo.length; ++i) {
- for (let j = 0; j < this.goodsInfo[i].goodsData.length; ++j) {
- price += (this.goodsInfo[i].goodsData[j].count * this.goodsInfo[i].goodsData[j].price);
- count += this.goodsInfo[i].goodsData[j].count;
+ for (let j = 0; j < this.goodsInfo[i].goods_list.length; ++j) {
+ price += (this.goodsInfo[i].goods_list[j].erp_goods_sale_total * this.goodsInfo[i].goods_list[j].erp_goods_price);
+ count += this.goodsInfo[i].goods_list[j].erp_goods_sale_total;
+ }
+ }
+
+ // 再回过头来计算搜索跟热销的,计算热销物品不在 其他分类里的价格跟数量
+ let tempData = this.findDifferentData(); // 找不同
+ if (tempData.length) {
+ for (let i = 0; i < tempData.length; ++i) {
+ price += (tempData[i].erp_goods_sale_total * tempData[i].erp_goods_price);
+ count += tempData[i].erp_goods_sale_total;
}
}
@@ -399,11 +467,11 @@ export default {
},
// 主页数量选项触发
- mainCountClick(type, id, goodsId) {
+ mainCountClick(type, id, cateName, goodsId) {
// 找点击的对应分类
let item = null;
for (let i = 0; i < this.goodsInfo.length; ++i) {
- if (this.goodsInfo[i].id == id) {
+ if (this.goodsInfo[i].cate.id == id) {
item = this.goodsInfo[i];
break;
}
@@ -412,9 +480,9 @@ export default {
// 分类有了,继续找该分类下的商品id
let goodsItem = null;
if (item) {
- for (let i = 0; i < item.goodsData.length; ++i) {
- if (item.goodsData[i].id == goodsId) {
- goodsItem = item.goodsData[i];
+ for (let i = 0; i < item.goods_list.length; ++i) {
+ if (item.goods_list[i].id == goodsId) {
+ goodsItem = item.goods_list[i];
break;
}
}
@@ -423,20 +491,29 @@ export default {
if (goodsItem) {
switch (type) {
case "add": {
- goodsItem.count += 1;
+ goodsItem.erp_goods_sale_total += 1;
} break;
case "sub": {
- if (goodsItem.count <= 0) {
+ if (goodsItem.erp_goods_sale_total <= 0) {
return;
}
- goodsItem.count -= 1;
+ goodsItem.erp_goods_sale_total -= 1;
} break;
}
-
- this.calcTotalPriceAndCount(); // 计算总价跟总量
- this.addToCartList(); // 将主页数据加入到购物车列表
}
+
+ // 遍历物品列表,把相同物品的数量 设置成当前点击物品的数量
+ for (let i = 0; i < this.goodsInfo.length; ++i) {
+ for (let j = 0; j < this.goodsInfo[i].goods_list.length; ++j) {
+ if (this.goodsInfo[i].goods_list[j].id == goodsItem.id) {
+ this.goodsInfo[i].goods_list[j].erp_goods_sale_total = goodsItem.erp_goods_sale_total;
+ }
+ }
+ }
+
+ this.calcTotalPriceAndCount(); // 计算总价跟总量
+ this.addToCartList(); // 将主页数据加入到购物车列表
},
// 主页分类选项触发
@@ -447,7 +524,7 @@ export default {
this.goodsInfo[i].style = this.categoryBtnStyle.default;
this.goodsInfo[i].isShow = false;
- if (this.goodsInfo[i].id == id) {
+ if (this.goodsInfo[i].cate.id == id) {
item = this.goodsInfo[i];
}
}
@@ -462,122 +539,72 @@ export default {
getGoodsInfo() {
let _this = this;
- util.showLoad();
- setTimeout(util.hideLoad, 1000);
-
_this.goodsInfo = [];
- let categoryName = "";
- for (let i = 0; i < 20; ++i) {
- categoryName = i <= 0 ? "搜索" : "分类";
-
+ // let categoryName = "";
+
+ retailServer.get({
+ url: retailApi.assistantListErpGoodsCateAndGoods,
+ data: {
+ // brand_id: _this.indexData.brand.id,
+ },
+ failMsg: '加载物品数据失败!'
+ }).then(res => {
_this.goodsInfo.push({
- id: i + 1,
- isSearch: true,
+ isCateShow: false,
isShow: false,
- categoryName: `${categoryName}${i + 1}`,
style: _this.categoryBtnStyle.default,
- goodsData: [
- {
- id: 1 + Math.random(),
- name: `柠檬味维他奶原味豆奶${Math.floor(Math.random() * 20)}`,
- spec: "250ml 300ml 350ml",
- price: 3.5,
- count: 0,
- },
- {
- id: 2 + Math.random(),
- name: `原味豆奶${Math.floor(Math.random() * 20)}`,
- spec: "150ml 200ml 100ml",
- price: 300.2,
- count: 0,
- },
- {
- id: 3 + Math.random(),
- name: `豆奶${Math.floor(Math.random() * 20)}`,
- spec: "50ml 100ml 150ml",
- price: 18,
- count: 0,
- },
- {
- id: 4 + Math.random(),
- name: `原味豆奶${Math.floor(Math.random() * 20)}`,
- spec: "150ml 200ml 100ml",
- price: 300.2,
- count: 0,
- },
- {
- id: 5 + Math.random(),
- name: `豆奶${Math.floor(Math.random() * 20)}`,
- spec: "50ml 100ml 150ml",
- price: 18,
- count: 0,
- },
- {
- id: 6 + Math.random(),
- name: `原味豆奶${Math.floor(Math.random() * 20)}`,
- spec: "150ml 200ml 100ml",
- price: 300.2,
- count: 0,
- },
- {
- id: 7 + Math.random(),
- name: `豆奶${Math.floor(Math.random() * 20)}`,
- spec: "50ml 100ml 150ml",
- price: 18,
- count: 0,
- },
- {
- id: 8 + Math.random(),
- name: `原味豆奶${Math.floor(Math.random() * 20)}`,
- spec: "150ml 200ml 100ml",
- price: 300.2,
- count: 0,
- },
- {
- id: 9 + Math.random(),
- name: `豆奶${Math.floor(Math.random() * 20)}`,
- spec: "50ml 100ml 150ml",
- price: 18,
- count: 0,
- },
- {
- id: 10 + Math.random(),
- name: `原味豆奶${Math.floor(Math.random() * 20)}`,
- spec: "150ml 200ml 100ml",
- price: 300.2,
- count: 0,
- },
- {
- id: 11 + Math.random(),
- name: `豆奶${Math.floor(Math.random() * 20)}`,
- spec: "50ml 100ml 150ml",
- price: 18,
- count: 0,
- }
- ]
+ cate: {
+ created_at: "",
+ erp_goods_cate_brandid: -1,
+ erp_goods_cate_name: "搜索",
+ id: -1,
+ update_at: "",
+ },
+ goods_list: [],
});
- }
-
- _this.totalCount = 0;
- _this.totalPrice = 0;
- _this.goodsInfo[0].isSearch = false;
- _this.goodsInfo[0].goodsData = [];
- _this.goodsInfo[1].style = _this.categoryBtnStyle.click;
- _this.goodsInfo[1].isShow = true;
- _this.categoryGoTop(); // 分类列表需要滚动至顶部
+
+ console.log(res);
+ for (let i = 0; i < res.list.length; ++i) {
+ if (res.list[i].cate.erp_goods_cate_name == "热销") {
+ _this.categoryIndex = 2; // 如果有热销,那么分类索引值从2开始,前面两项过滤掉(搜索、热销)
+ }
+
+ if (!res.list[i].goods_list) {
+ res.list[i].goods_list = [];
+ }
+
+ res.list[i].isCateShow = true;
+ res.list[i].isShow = false;
+ res.list[i].style = _this.categoryBtnStyle.default;
+ _this.goodsInfo.push(res.list[i]);
+ }
+
+ _this.totalCount = 0;
+ _this.totalPrice = 0;
+ _this.goodsInfo[1].style = _this.categoryBtnStyle.click;
+ _this.goodsInfo[1].isShow = true;
+ _this.categoryGoTop(); // 分类列表需要滚动至顶部
+
+ util.hideLoad();
+ });
},
// 店铺列表
getStoreList() {
+ util.showLoad();
+
let _this = this;
return retailServer.get({
- url: retailApi.stadiumList,
- data: {},
+ url: retailApi.assistantGetAssistantStadiums,
+ data: {
+ // brand_id: _this.indexData.brand.id
+ },
failMsg: '加载店铺失败!'
}).then(res => {
let _list = res.list || [];
_this.curStoreList = [..._this.curStoreList, ..._list];
_this.curStore = _this.curStoreList[0] || {};
+ _this.getGoodsInfo(); // 获取商品信息
});
},
@@ -586,9 +613,9 @@ export default {
let _this = this;
let curStoreList = _this.curStoreList;
_this.curStore = curStoreList[e.detail.value] || {};
- _this.$nextTick(function() {
- _this.getGoodsInfo(); // 获取商品信息
- });
+ // _this.$nextTick(function() {
+ // _this.getGoodsInfo(); // 获取商品信息
+ // });
},
}
}
diff --git a/src/subpackage/retail/pages/search/search.vue b/src/subpackage/retail/pages/search/search.vue
index 273458c..fee4490 100644
--- a/src/subpackage/retail/pages/search/search.vue
+++ b/src/subpackage/retail/pages/search/search.vue
@@ -11,7 +11,7 @@
/>
-
+
@@ -20,13 +20,17 @@
- {{ item.text }}
+ {{ item }}
diff --git a/src/subpackage/device/components/order/reservation_people/reservation_people.vue b/src/subpackage/device/components/order/reservation_people/reservation_people.vue
deleted file mode 100644
index 4114f91..0000000
--- a/src/subpackage/device/components/order/reservation_people/reservation_people.vue
+++ /dev/null
@@ -1,546 +0,0 @@
-
-
-
-
-
- 欧轩智能场馆(羽毛球永泰店)
-
-
- 订单编号:2352534645764747
- 待使用
-
-
- 创建时间:2019-06-06 12:00:06
-
-
- 用户昵称:i术生
-
-
- 创建时间:2019-06-06 12:00:06
-
-
-
-
- 已绑定IC卡:000000000213
-
-
- 绑定时间:2019-07-06 12:06:03
-
-
-
-
- {{ false?'解绑IC卡':'绑定IC卡' }}
-
-
- 验证信息(1张可用)
-
-
- 有效期至:
- 2019年6月18日 10:30:40
-
-
-
- 使用日期:
- 2020-12-25(周五) 上午场
-
-
-
- 验证码{{i+1}}:
-
- 1223 5512 4534 (已使用)
- 核销方式:扫码核销
- 核销时间:2019-06-01 13:20
-
-
-
-
-
- 预订信息
-
- 单人羽毛球次卡(可随时使用)
-
-
- 数量:3
-
-
- 类型:平日+上午场
-
-
-
- 金额小计
- ¥6
-
-
- 积分抵扣
- -¥6
-
-
- 折扣金额
- -¥0
-
-
- 优惠券优惠
- -¥1
-
-
-
- 合计支付:¥5
-
-
-
- 支付信息
-
- 支付方式:微信支付
-
-
- 支付时间:2019年6月18日 10:30:40
-
-
- 微信交易号:424736746998493847989434
-
-
-
-
-
-
-
-
-
- 绑定IC卡
-
- *
- 仓
-
-
-
- 可直接输入卡号、扫描条码或在已选择仓库下选择卡号
-
-
-
-
-
-
-
-
-
- 确认
-
-
-
-
-
-
-
-
- 筛选卡号
-
-
-
-
-
-
-
- 确认
-
-
-
-
-
- 绑定成功
-
- 卡号:0000023
- 关联订单号:yy202101294566
- 门店名称:广州欧轩智能场馆(永泰店)
-
-
- 订单类型:预约订单
- 项目名称:开业优惠卡(10次)
- 购买者昵称:yiming
-
- 好的
-
-
-
-
-
-
-
-
diff --git a/src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue b/src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue
new file mode 100644
index 0000000..446a124
--- /dev/null
+++ b/src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue
@@ -0,0 +1,828 @@
+
+
+
+
+
+ {{orderInfo.stadium_name || '-'}}
+
+
+ 订单编号:{{orderInfo.order_no || ''}}
+ {{zh_pay_status(orderInfo.pay_status)}}
+
+
+ 创建时间:{{orderInfo.created_at || '-'}}
+
+
+ 用户昵称:{{orderInfo.nickname || '-'}}
+
+
+
+
+
+
+ 已绑定IC卡:{{orderInfo.bind_iccard_info.erp_iccard_no || '-'}}
+
+
+ 绑定时间:{{orderInfo.bind_iccard_info.bind_order_at || '-'}}
+
+
+
+ 0?bindICCardChange(1):bindICCardChange(2)">{{ orderInfo.bind_iccard_info.id > 0?'解绑IC卡':'绑定IC卡' }}
+
+
+
+ 验证信息({{orderInfo.available_num || 0}}张可用)
+
+
+ 有效期至:
+ {{orderInfo.end_time || '-'}}
+
+
+
+ 使用日期:
+ {{orderInfo.date || '-'}}
+
+
+
+ 验证码{{i+1}}:
+
+ {{e.verify_code || '-'}} ({{zh_verify_status(e.status)}})
+
+ 核销方式:{{zh_verify_type(e.verify_type)}}
+ 核销时间:{{e.verify_time || '-'}}
+
+
+
+
+
+
+ 预订信息
+
+ {{orderInfo.person_number_rule_name || ''}} {{orderInfo.person_number_rule.order_method==1?'(可随时使用)':'(固定日期)'}}
+
+
+ 数量:{{orderInfo.number || 0}}
+
+
+ 类型:{{ zh_spec_names }}
+
+
+
+ 金额小计
+ ¥{{orderInfo.amount || 0}}
+
+
+ 积分抵扣
+ -¥{{orderInfo.deduction_amount || 0}}
+
+
+ 折扣金额
+ -¥{{orderInfo.deduction_amount || 0}}
+
+
+ 优惠券优惠
+ -¥{{orderInfo.coupons_amount || 0}}
+
+
+
+ 合计支付:¥{{orderInfo.pay_amount || 0}}
+
+
+
+ 支付信息
+
+ 支付方式:{{zh_pay_type(orderInfo.pay_type)}}
+
+
+ 支付时间:{{orderInfo.pay_time || '-'}}
+
+
+ 微信交易号:{{orderInfo.trade_no || ''}}
+
+
+
+
+
+
+
+
+
+ 绑定IC卡
+
+ *
+ 仓
+
+
+
+ 可直接输入卡号、扫描条码或在已选择仓库下选择卡号
+
+
+
+
+
+
+
+
+
+ 确认
+
+
+
+
+
+
+
+
+ 筛选卡号
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询卡号
+
+ 确认
+
+
+
+
+
+
+ 绑定成功
+
+ 卡号:{{sucInfo.iccard.erp_iccard_no || '-'}}
+ 关联订单号:{{sucInfo.order_no || ''}}
+ 门店名称:{{sucInfo.stadium_name || '-'}}
+
+
+ 订单类型:{{zh_order_type(sucInfo.order_type)}}
+ 项目名称:{{sucInfo.project || '-'}}
+ 购买者昵称:{{sucInfo.nickname || '-'}}
+
+ 好的
+
+
+
+
+
+
+
+
diff --git a/src/subpackage/device/components/order/reservation_site/reservation_site.vue b/src/subpackage/device/components/order/reservation_site/reservation_site.vue
deleted file mode 100644
index 8c5b495..0000000
--- a/src/subpackage/device/components/order/reservation_site/reservation_site.vue
+++ /dev/null
@@ -1,261 +0,0 @@
-
-
-
-
-
- 欧轩智能场馆(羽毛球永泰店)
-
-
- 订单编号:2352534645764747
- 待使用
-
-
- 创建时间:2019-06-06 12:00:06
-
-
- 用户昵称:i术生
-
-
-
- 验证信息
-
- 验证码:
- 1233 5512 4565(待使用)
-
-
-
-
- 核销方式:
- 扫码核销
-
-
- 核销时间:
- 2019-05-17 11:12:58
-
-
-
-
- 预订信息
-
- 预订项目:
- 羽毛球次卡
-
-
- 预订日期:
- 2019-05-18(周五)
-
-
- 预订场次:
- 1号馆 10:00-12:00(¥80)\n3号馆 11:00-12:00(¥80)
-
-
-
- 金额小计
- ¥6
-
-
- 积分抵扣
- -¥6
-
-
- 折扣金额
- -¥0
-
-
- 优惠券优惠
- -¥1
-
-
-
- 合计支付:¥5
-
-
-
- 支付信息
-
- 支付方式:
- 微信支付
-
-
- 支付时间:
- 2019年6月18日 10:30:40
-
-
- 微信交易号:
- 424736746998493847989434
-
-
-
-
- 退款时间:
- 2019年6月18日 10:30:40
-
-
- 退款单号:
- 424736746998493847989434
-
-
-
-
- 失效时间:
- 2019年6月18日 10:30:40
-
-
-
-
-
-
-
-
diff --git a/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue b/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue
new file mode 100644
index 0000000..5bf219f
--- /dev/null
+++ b/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue
@@ -0,0 +1,308 @@
+
+
+
+
+
+ {{orderInfo.stadium_name || '-'}}
+
+
+ 订单编号:{{orderInfo.order_no || ''}}
+ {{zh_pay_status(orderInfo.pay_status)}}
+
+
+ 创建时间:{{orderInfo.created_at || '-'}}
+
+
+ 用户昵称:{{orderInfo.nickname || '-'}}
+
+
+
+ 验证信息
+
+ 验证码:
+ {{orderInfo.verify_code || '-'}}({{zh_pay_status(orderInfo.pay_status)}})
+
+
+
+
+ 核销方式:
+ {{zh_verify_type(orderInfo.verify_type)}}
+
+
+ 核销时间:
+ {{orderInfo.verify_time || '-'}}
+
+
+
+
+ 预订信息
+
+ 预订项目:
+ {{orderInfo.venue_type_name || '-'}}
+
+
+ 预订日期:
+ {{orderInfo.date || '-'}}
+
+
+ 预订场次:
+
+ {{e.venue_name||'-'}} {{e.duration||'-'}}(¥{{e.price||0}})
+
+
+
+
+ 金额小计
+ ¥{{orderInfo.amount || 0}}
+
+
+ 积分抵扣
+ -¥{{orderInfo.deduction_amount || 0}}
+
+
+ 折扣金额
+ -¥{{orderInfo.deduction_amount || 0}}
+
+
+ 优惠券优惠
+ -¥{{orderInfo.coupons_amount || 0}}
+
+
+
+ 合计支付:¥{{orderInfo.pay_amount || 0}}
+
+
+
+ 支付信息
+
+ 支付方式:
+ {{zh_pay_type(orderInfo.pay_type)}}
+
+
+ 支付时间:
+ {{orderInfo.pay_time || '-'}}
+
+
+ 微信交易号:
+ {{orderInfo.trade_no || ''}}
+
+
+
+
+ 退款时间:
+ {{orderInfo.refund_time || '-'}}
+
+
+ 退款单号:
+ {{orderInfo.refund_no || '-'}}
+
+
+
+
+ 失效时间:
+ {{orderInfo.end_time || '-'}}
+
+
+
+
+
+
+
+
diff --git a/src/subpackage/device/components/order/timing_detail/timing_detail.vue b/src/subpackage/device/components/order/timing_detail/timing_detail.vue
new file mode 100644
index 0000000..823a1a1
--- /dev/null
+++ b/src/subpackage/device/components/order/timing_detail/timing_detail.vue
@@ -0,0 +1,339 @@
+
+
+
+
+
+ {{orderInfo.stadium_name || '-'}}
+
+
+ 订单编号:{{orderInfo.order_no || '-'}}
+ {{zh_order_status(orderInfo.pay_status)}}
+
+
+ 创建时间:{{orderInfo.model.created_at || '-'}}
+
+
+ 用户昵称:{{orderInfo.nickname || '-'}}
+
+
+
+ 计时信息
+
+
+ 项目:{{orderInfo.project_name || '-'}}({{orderInfo.venue_name || '-'}})
+ 进场时间:{{orderInfo.start_time || '-'}}
+
+ 离场时间:{{orderInfo.end_time || '-'}}
+ 时长合计:{{orderInfo.extension.duration || '-'}}
+
+
+
+ 金额小计
+ ¥{{orderInfo.amount || 0}}
+
+
+ 积分抵扣
+ -¥{{orderInfo.deduction_amount ||0}}
+
+
+ 折扣金额
+ -¥{{orderInfo.discount_amount||0}}
+
+
+ 优惠券优惠
+ -¥{{orderInfo.coupons_amount || 0}}
+
+
+ 合计支付:¥{{orderInfo.pay_amount ||0}}
+
+
+
+
+ 支付信息
+
+ 支付方式:{{zh_pay_type(orderInfo.pay_type)}}
+ 支付时间:{{orderInfo.pay_time || '-'}}
+ 微信交易号:{{orderInfo.trade_no || ''}}
+
+
+ 结束计费
+
+
+
+
+
+
+
+ 结束计费
+ 操作人:{{orderInfo.end_bill_operator_name || '-'}}
+ 时长合计:{{orderInfo.extension.duration || '-'}}
+ 金额合计:¥{{orderInfo.extension.refundable_amount || '-'}}
+ *请输入金额
+
+ 确认
+
+
+
+
+
+
+
+
diff --git a/src/subpackage/device/js/device_api.js b/src/subpackage/device/js/device_api.js
index fed9954..103a00d 100644
--- a/src/subpackage/device/js/device_api.js
+++ b/src/subpackage/device/js/device_api.js
@@ -17,9 +17,6 @@ export const DEVICE_API = {
leaseTest:`${ORIGIN}/admin/stadium/lease/cabinet/test`, // 储物柜打开
leaseReset:`${ORIGIN}/admin/stadium/lease/cabinet/reset`, // 储物柜补货
-
-
-
hardwareInfo:`${ORIGIN}/admin/stadium/hardware/get/`, // 设备信息
@@ -27,7 +24,16 @@ export const DEVICE_API = {
ouxuanac:`${ORIGIN}/ouxuanac/sendPacket`, // 中控控制
// ouxuanac--> http://api.ouxuan.net/project/233/interface/api/10012 接口文档
// ouxuanac--> http://git.ouxuan.net/ouxuanac/ouxuanac-common/src/branch/master/cmd.ts // 接口参数结构 || ouxuanac.md
-
+
+ // PM:2021/4/19
+ reservationDetail:`${ORIGIN}/admin/assistant/stadiumOrder/detail`, //k-订单管理-场馆预约订单-预约场馆订单详情
+ unbindIccard:`${ORIGIN}/admin/assistant/unbindIccard`, //k-订单管理-解绑订单的ic卡
+ bindIcCard:`${ORIGIN}/admin/assiatant/bindIcCard`, //k-订单管理-绑定ic卡
+ checkIccard:`${ORIGIN}/admin/assistant/checkIccard`, //k-订单管理-校验ic卡
+ storeHouseList:`${ORIGIN}/admin/assistant/storeHouse/list`, //k-仓库列表
+ iccardList:`${ORIGIN}/admin/assistant/iccard/list`, //k-ic卡列表
+ timeOrderDetail:`${ORIGIN}/admin/assistant/timeOrder/detail`, //k-订单管理-计时订单详情
+ timeOrderEnd:`${ORIGIN}/admin/assistant/timeOrder/end`, //k-订单管理-订单计时结束
}
export default DEVICE_API;
\ No newline at end of file
diff --git a/src/subpackage/device/pages/order_details/order_details.vue b/src/subpackage/device/pages/order_details/order_details.vue
new file mode 100644
index 0000000..af7458e
--- /dev/null
+++ b/src/subpackage/device/pages/order_details/order_details.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/subpackage/device/pages/order_details/reservation_details/reservation_details.vue b/src/subpackage/device/pages/order_details/reservation_details/reservation_details.vue
deleted file mode 100644
index 7d00750..0000000
--- a/src/subpackage/device/pages/order_details/reservation_details/reservation_details.vue
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
-
-
-
-
-
-
diff --git a/src/subpackage/device/pages/order_details/timing_details/timing_details.vue b/src/subpackage/device/pages/order_details/timing_details/timing_details.vue
deleted file mode 100644
index d78fcbf..0000000
--- a/src/subpackage/device/pages/order_details/timing_details/timing_details.vue
+++ /dev/null
@@ -1,285 +0,0 @@
-
-
-
-
-
- 欧轩智能场馆(羽毛球永泰店)
-
-
- 订单编号:2352534645764747
- 计费中
-
-
- 创建时间:2019-06-06 12:00:06
-
-
- 用户昵称:i术生
-
-
-
- 计时信息
-
-
- 项目:羽毛球(1号馆)
- 进场时间:2020-01-10 15:02:24
-
- 离场时间:2020-01-10 17:20:24
- 时长合计:1小时35分9秒
-
-
-
- 金额小计
- ¥6
-
-
- 积分抵扣
- -¥0
-
-
- 折扣金额
- -¥0
-
-
- 优惠券优惠
- -¥1
-
-
- 合计支付:¥5
-
-
-
-
- 支付信息
-
- 支付方式:微信支付
- 支付时间:2019年6月18日 10:30:40
- 微信交易号:424736746998493847989434
-
-
- 结束计费
-
-
-
-
-
-
-
- 结束计费
- 操作人:张三
- 时长合计:1小时25分9秒
- 金额合计:¥100.2
- *请输入金额
-
- 确认
-
-
-
-
-
-
-
-
From 5b0f63063f8c2c74419591f000cd1bc31242c865 Mon Sep 17 00:00:00 2001
From: 1019933623 <1019933623@qq.com>
Date: Tue, 20 Apr 2021 16:57:42 +0800
Subject: [PATCH 18/27] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=A2=E5=8D=95?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E6=9D=83=E9=99=90?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/index/index.vue | 2 +-
src/store/index.js | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index ede5387..314ff13 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -175,7 +175,7 @@
let _permission = indexData.permission || {};
if(!app.isLogin())return this.showAuthor();
if(!tabInfo.path)return util.showNone('暂未开放!');
- if(tabInfo.id == 2)return util.routeTo(tabInfo.path,'nT'); //测试
+ //if(tabInfo.id == 2)return util.routeTo(tabInfo.path,'nT'); //测试
if(!_permission[tabInfo.serverKey])return util.showNone('暂无权限,请联系管理员开启!')
util.routeTo(tabInfo.path,'nT');
},
diff --git a/src/store/index.js b/src/store/index.js
index d4b562f..a97ca4c 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -28,6 +28,7 @@ export default new Vuex.Store({
'1009': '场地管理',
'1010': '设备管理',
'1011': '商品零售',
+ '1012': '订单管理',
},
// 场地占用提交页面信息
From e1a3f55696fad268e5e6872fadf011e6fd300cf2 Mon Sep 17 00:00:00 2001
From: 1019933623 <1019933623@qq.com>
Date: Tue, 20 Apr 2021 18:06:22 +0800
Subject: [PATCH 19/27] fix order status
---
src/components/timing_order/timing_order.vue | 1 +
src/pages/order_list/order_list.vue | 5 +++--
.../device/components/order/timing_detail/timing_detail.vue | 7 ++++---
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/src/components/timing_order/timing_order.vue b/src/components/timing_order/timing_order.vue
index f47c241..1b6d1c1 100644
--- a/src/components/timing_order/timing_order.vue
+++ b/src/components/timing_order/timing_order.vue
@@ -48,6 +48,7 @@ export default {
const _obj = {
'0': '计费中',
'1': '已完成',
+ '4': '已退款',
}
return _obj[`${status}`] || '-'
}
diff --git a/src/pages/order_list/order_list.vue b/src/pages/order_list/order_list.vue
index 929d985..843ef90 100644
--- a/src/pages/order_list/order_list.vue
+++ b/src/pages/order_list/order_list.vue
@@ -114,6 +114,7 @@
{id:'', name:'全部'},
{id:0, name:'计费中'},
{id:1, name:'已完成'},
+ {id:4, name:'已退款'},
]
export default {
components: {
@@ -215,8 +216,8 @@
start: '',
end: ''
}
- if(type == 3 || type == 1)_obj['start']=util.formatDate({}),_obj['end'] = util.formatDate({date: _afterSeven});
- if(type == 4)_obj['start']=util.formatDate({date: _beforeSeven}),_obj['end'] = util.formatDate({});
+ if(type == 3 )_obj['start']=util.formatDate({}),_obj['end'] = util.formatDate({date: _afterSeven});
+ if(type == 4 || type == 1)_obj['start']=util.formatDate({date: _beforeSeven}),_obj['end'] = util.formatDate({});
console.log(_obj)
return _obj;
},
diff --git a/src/subpackage/device/components/order/timing_detail/timing_detail.vue b/src/subpackage/device/components/order/timing_detail/timing_detail.vue
index 823a1a1..b888d63 100644
--- a/src/subpackage/device/components/order/timing_detail/timing_detail.vue
+++ b/src/subpackage/device/components/order/timing_detail/timing_detail.vue
@@ -23,10 +23,10 @@
项目:{{orderInfo.project_name || '-'}}({{orderInfo.venue_name || '-'}})
进场时间:{{orderInfo.start_time || '-'}}
- 离场时间:{{orderInfo.end_time || '-'}}
+ 离场时间:{{orderInfo.end_time || '-'}}
时长合计:{{orderInfo.extension.duration || '-'}}
-
+
金额小计
¥{{orderInfo.amount || 0}}
@@ -48,7 +48,7 @@
-
+
支付信息
支付方式:{{zh_pay_type(orderInfo.pay_type)}}
@@ -96,6 +96,7 @@ export default {
const _obj = {
'0': '计费中',
'1': '已完成',
+ '4': '已退款',
}
return _obj[`${status}`] || '-'
}
From 6d8d46763b95d2feec512390b4c56f326f9f4eee Mon Sep 17 00:00:00 2001
From: 1019933623 <1019933623@qq.com>
Date: Wed, 21 Apr 2021 15:49:06 +0800
Subject: [PATCH 20/27] fix bug
---
src/components/timing_order/timing_order.vue | 2 +-
src/pages/order_search/order_search.vue | 5 ++++-
.../reservation_people_detail.vue | 22 +++++++++++++++-------
.../reservation_site_detail.vue | 2 +-
.../device/pages/order_manage/order_manage.vue | 3 ++-
5 files changed, 23 insertions(+), 11 deletions(-)
diff --git a/src/components/timing_order/timing_order.vue b/src/components/timing_order/timing_order.vue
index 1b6d1c1..7d1b965 100644
--- a/src/components/timing_order/timing_order.vue
+++ b/src/components/timing_order/timing_order.vue
@@ -26,7 +26,7 @@
-
+
实付款 ¥{{orderInfo.pay_amount || 0}}
diff --git a/src/pages/order_search/order_search.vue b/src/pages/order_search/order_search.vue
index 05fae3b..9b651c7 100644
--- a/src/pages/order_search/order_search.vue
+++ b/src/pages/order_search/order_search.vue
@@ -17,6 +17,7 @@
+
@@ -27,7 +28,7 @@
import reservation_order from '../../components/reservation_order/reservation_order';
import integral_order from '../../components/integral_order/integral_order';
import membership_order from '../../components/membership_order/membership_order';
-
+import timing_order from '../../components/timing_order/timing_order.vue'
import { API } from '../../js/api';
import { servers } from '../../js/server';
import util from '../../utils/util';
@@ -38,6 +39,7 @@ export default {
'reservation-order': reservation_order,
'membership-order': membership_order,
'integral-order': integral_order,
+ 'timing-order': timing_order,
},
computed: {
...mapState(['brandInfo']),
@@ -88,6 +90,7 @@ export default {
if(type == 3)return API.reservationOrder;
if(type == 4)return API.membershipOrder;
if(type == 5)return API.integralOrder;
+ if(type == 1)return API.timeOrder;
},
getOrderList({
key = "",
diff --git a/src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue b/src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue
index 446a124..e521190 100644
--- a/src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue
+++ b/src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue
@@ -46,7 +46,7 @@
验证码{{i+1}}:
- {{e.verify_code || '-'}} ({{zh_verify_status(e.status)}})
+ {{e.verify_code || '-'}} ({{zh_verify_status(e.status)}})
核销方式:{{zh_verify_type(e.verify_type)}}
核销时间:{{e.verify_time || '-'}}
@@ -64,7 +64,7 @@
数量:{{orderInfo.number || 0}}
- 类型:{{ zh_spec_names }}
+ 类型:{{ zh_spec_names || '-'}}
@@ -77,7 +77,7 @@
折扣金额
- -¥{{orderInfo.deduction_amount || 0}}
+ -¥{{orderInfo.discount_amount || 0}}
优惠券优惠
@@ -136,13 +136,13 @@
筛选卡号
-
+
-
+
@@ -240,7 +240,7 @@ export default {
let { orderInfo } = this
if(!orderInfo.person_number_spec_names)return '';
let spec = orderInfo.person_number_spec_names.join('+')
- return spec;
+ return spec || '';
},
zh_order_type(){
//订单类型 0预约订单 1课程订单
@@ -345,6 +345,7 @@ export default {
// ic卡列表
getICCardList({key=''}){
let { brandInfo, curIdx, storehouseList } = this
+ this.iccardList.splice(0)
util.showLoad();
deviceServer.get({
url: deviceApi.iccardList,
@@ -358,7 +359,10 @@ export default {
})
.then(res=>{
util.hideLoad()
- this.iccardList = res.list || []
+ let _list = res.list || []
+ for(var i in _list){
+ this.iccardList.push(_list[i].erp_iccard_no)
+ }
})
},
// 校验ic卡
@@ -424,6 +428,7 @@ export default {
.then(res=>{
util.hideLoad()
util.showNone('操作成功!');
+ this.$emit('okChange');
})
}
}
@@ -570,6 +575,9 @@ export default {
font-size: 28rpx;
line-height: 46rpx;
}
+ .rs-active{
+ color: #009874;
+ }
}
}
}
diff --git a/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue b/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue
index 5bf219f..7cdda00 100644
--- a/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue
+++ b/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue
@@ -61,7 +61,7 @@
折扣金额
- -¥{{orderInfo.deduction_amount || 0}}
+ -¥{{orderInfo.discount_amount || 0}}
优惠券优惠
diff --git a/src/subpackage/device/pages/order_manage/order_manage.vue b/src/subpackage/device/pages/order_manage/order_manage.vue
index a2ca0d7..a56b9e0 100644
--- a/src/subpackage/device/pages/order_manage/order_manage.vue
+++ b/src/subpackage/device/pages/order_manage/order_manage.vue
@@ -49,7 +49,8 @@ const tabList = [
{
id: 4,
name: "储值卡订单",
- path: '/pages/order_list/order_list',
+ // path: '/pages/order_list/order_list',
+ path: '',
},
{
id: 6,
From 99e0e3db634ce4598c57e15c877adc1f78b24b47 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=AE=B6=E5=8D=8E?= <3599164049@qq.com>
Date: Fri, 23 Apr 2021 15:28:40 +0800
Subject: [PATCH 21/27] retail fix
---
.../components/hover_cart_list/hover_cart_list.vue | 2 +-
.../retail/pages/confirm_goods/confirm_goods.vue | 36 ++++++---
src/subpackage/retail/pages/index/index.vue | 91 +++++++++++++++-------
3 files changed, 89 insertions(+), 40 deletions(-)
diff --git a/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue b/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue
index 202e2ac..bd864ae 100644
--- a/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue
+++ b/src/subpackage/retail/components/hover_cart_list/hover_cart_list.vue
@@ -19,7 +19,7 @@
- {{ item.erp_goods_sale_total }}
+ {{ item.count }}
diff --git a/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue b/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue
index df337f2..28f69a9 100644
--- a/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue
+++ b/src/subpackage/retail/pages/confirm_goods/confirm_goods.vue
@@ -19,7 +19,7 @@
- {{ item.erp_goods_sale_total }}
+ {{ item.count }}
@@ -97,12 +97,12 @@
let _this = this;
let data = [];
for (let i = 0; i < this.cartListFinal.length; ++i) {
- if (this.cartListFinal[i].erp_goods_sale_total) {
+ if (this.cartListFinal[i].count) {
data.push({
id: this.cartListFinal[i].id,
name: this.cartListFinal[i].erp_goods_name,
price: this.cartListFinal[i].erp_goods_price,
- nums: this.cartListFinal[i].erp_goods_sale_total,
+ nums: this.cartListFinal[i].count,
unit: this.cartListFinal[i].erp_goods_unit,
});
}
@@ -114,7 +114,7 @@
}
util.showLoad();
- retailServer.get({
+ retailServer.post({
url: retailApi.assistantRetail,
data: {
store_id: _this.curStore.id,
@@ -124,9 +124,21 @@
failMsg: '出库失败!'
}).then(res => {
if (res.data.code == 0) {
- util.hideLoad();
- uni.navigateBack({
- delta: 1
+ uni.setStorage({
+ key: "retailStatus",
+ data: "true",
+ success: function() {
+ util.hideLoad();
+ uni.navigateBack({
+ delta: 1
+ });;
+ },
+ fail: function(err) {
+ util.hideLoad();
+ uni.navigateBack({
+ delta: 1
+ });
+ },
});
}
else {
@@ -163,18 +175,18 @@
switch (type) {
case "add": {
// 判断库存
- if (item.erp_goods_sale_total + 1 > item.stock_num) {
+ if (item.count + 1 > item.stock_num) {
util.showNone("库存就这么多了!");
return;
}
- item.erp_goods_sale_total += 1;
+ item.count += 1;
} break;
case "sub": {
- if (item.erp_goods_sale_total <= 0) {
+ if (item.count <= 0) {
return;
}
- item.erp_goods_sale_total -= 1;
+ item.count -= 1;
} break;
}
@@ -187,7 +199,7 @@
let price = 0.0;
for (let i = 0; i < this.cartListFinal.length; ++i) {
- price += (this.cartListFinal[i].erp_goods_sale_total * this.cartListFinal[i].erp_goods_price);
+ price += (this.cartListFinal[i].count * this.cartListFinal[i].erp_goods_price);
}
this.totalPrice = price.toFixed(2);
diff --git a/src/subpackage/retail/pages/index/index.vue b/src/subpackage/retail/pages/index/index.vue
index 39f2e38..9ee3aaa 100644
--- a/src/subpackage/retail/pages/index/index.vue
+++ b/src/subpackage/retail/pages/index/index.vue
@@ -46,8 +46,8 @@
-
- {{ item.erp_goods_sale_total }}
+
+ {{ item.count }}
@@ -132,8 +132,38 @@ export default {
},
onShow() {
this.getSearchLocal(); // 获取本地的搜索记录
+ this.getRetailStatus(); // 获取收款出库状态
},
methods: {
+ // 获取收款出库状态
+ getRetailStatus() {
+ let _this = this;
+
+ uni.getStorage({
+ key: 'retailStatus',
+ success: function (res) {
+ _this.getGoodsInfo(); // 重新获取 刷新商品数据,把出库的数据清了
+ _this.deleteRetailLocal(); // 删除收款出库状态
+ },
+ fail: function(err) {
+ console.log(err);
+ _this.deleteRetailLocal(); // 删除收款出库状态
+ },
+ });
+ },
+
+ // 删除收款出库状态
+ deleteRetailLocal() {
+ this.searchData = null;
+
+ uni.removeStorage({
+ key: 'retailStatus',
+ success: function (res) {
+ console.log('success');
+ }
+ });
+ },
+
// 分类列表滚动监听
categoryOnScroll(e) {
this.categoryOldScrollTop = e.detail.scrollTop;
@@ -159,6 +189,7 @@ export default {
for (let i = 0; i < data.length; ++i) {
if (data[i].goods_list) {
for (let j = 0; j < data[i].goods_list.length; ++j) {
+ data[i].goods_list[j].count = 0; // 用来计数
tempData["" + data[i].goods_list[j].id] = data[i].goods_list[j];
}
}
@@ -178,7 +209,7 @@ export default {
for (let i = 0; i < this.goodsInfo[0].goods_list.length; ++i) {
for (let j = 0; j < otherData.length; ++j) {
if (this.goodsInfo[0].goods_list[i].id == otherData[j].id) {
- this.goodsInfo[0].goods_list[i].erp_goods_sale_total = otherData[j].erp_goods_sale_total;
+ this.goodsInfo[0].goods_list[i].count = otherData[j].count;
}
}
}
@@ -241,8 +272,8 @@ export default {
let count = 0;
for (let i = 0; i < this.cartList.length; ++i) {
- price += (this.cartList[i].erp_goods_sale_total * this.cartList[i].erp_goods_price);
- count += this.cartList[i].erp_goods_sale_total;
+ price += (this.cartList[i].count * this.cartList[i].erp_goods_price);
+ count += this.cartList[i].count;
}
this.cartTotalPrice = price.toFixed(2);
@@ -265,24 +296,24 @@ export default {
switch (type) {
case "add": {
// 判断库存
- if (this.cartList[i].erp_goods_sale_total + 1 > this.cartList[i].stock_num) {
+ if (this.cartList[i].count + 1 > this.cartList[i].stock_num) {
util.showNone("库存就这么多了!");
return;
}
- this.cartList[i].erp_goods_sale_total += 1;
+ this.cartList[i].count += 1;
for (let i = 0; i < mainItems.length; ++i) {
- mainItems[i].erp_goods_sale_total += 1;
+ mainItems[i].count += 1;
}
} break;
case "sub": {
- if (this.cartList[i].erp_goods_sale_total > 0) {
- this.cartList[i].erp_goods_sale_total -= 1;
+ if (this.cartList[i].count > 0) {
+ this.cartList[i].count -= 1;
}
for (let i = 0; i < mainItems.length; ++i) {
- if (mainItems[i].erp_goods_sale_total > 0) {
- mainItems[i].erp_goods_sale_total -= 1;
+ if (mainItems[i].count > 0) {
+ mainItems[i].count -= 1;
}
}
@@ -290,7 +321,7 @@ export default {
}
// 没数量了就删掉
- if (this.cartList[i].erp_goods_sale_total <= 0) {
+ if (this.cartList[i].count <= 0) {
this.cartList.splice(i, 1);
}
@@ -304,7 +335,7 @@ export default {
let arr = [];
for (let i = 0; i < this.cartList.length; ++i) {
- if (this.cartList[i].erp_goods_sale_total) {
+ if (this.cartList[i].count) {
arr.push(tools.getNewObj(this.cartList[i]));
}
}
@@ -340,7 +371,7 @@ export default {
// 计算购物车列表
for (let i = this.categoryIndex; i < this.goodsInfo.length; ++i) {
for (let j = 0; j < this.goodsInfo[i].goods_list.length; ++j) {
- if (this.goodsInfo[i].goods_list[j].erp_goods_sale_total) {
+ if (this.goodsInfo[i].goods_list[j].count) {
this.cartList.push(tools.getNewObj(this.goodsInfo[i].goods_list[j]));
}
}
@@ -441,7 +472,7 @@ export default {
}
// 如果不在 并且有数量,那么加进列表
- if (!mark && searchAndHotData[i].erp_goods_sale_total) {
+ if (!mark && searchAndHotData[i].count) {
tempData.push(searchAndHotData[i]);
}
}
@@ -457,8 +488,8 @@ export default {
// 先计算搜索、热销后面的价格跟数量
for (let i = this.categoryIndex; i < this.goodsInfo.length; ++i) {
for (let j = 0; j < this.goodsInfo[i].goods_list.length; ++j) {
- price += (this.goodsInfo[i].goods_list[j].erp_goods_sale_total * this.goodsInfo[i].goods_list[j].erp_goods_price);
- count += this.goodsInfo[i].goods_list[j].erp_goods_sale_total;
+ price += (this.goodsInfo[i].goods_list[j].count * this.goodsInfo[i].goods_list[j].erp_goods_price);
+ count += this.goodsInfo[i].goods_list[j].count;
}
}
@@ -466,8 +497,8 @@ export default {
let tempData = this.findDifferentData(); // 找不同
if (tempData.length) {
for (let i = 0; i < tempData.length; ++i) {
- price += (tempData[i].erp_goods_sale_total * tempData[i].erp_goods_price);
- count += tempData[i].erp_goods_sale_total;
+ price += (tempData[i].count * tempData[i].erp_goods_price);
+ count += tempData[i].count;
}
}
@@ -501,18 +532,18 @@ export default {
switch (type) {
case "add": {
// 判断库存
- if (goodsItem.erp_goods_sale_total + 1 > goodsItem.stock_num) {
+ if (goodsItem.count + 1 > goodsItem.stock_num) {
util.showNone("库存就这么多了!");
return;
}
- goodsItem.erp_goods_sale_total += 1;
+ goodsItem.count += 1;
} break;
case "sub": {
- if (goodsItem.erp_goods_sale_total <= 0) {
+ if (goodsItem.count <= 0) {
return;
}
- goodsItem.erp_goods_sale_total -= 1;
+ goodsItem.count -= 1;
} break;
}
}
@@ -521,7 +552,7 @@ export default {
for (let i = 0; i < this.goodsInfo.length; ++i) {
for (let j = 0; j < this.goodsInfo[i].goods_list.length; ++j) {
if (this.goodsInfo[i].goods_list[j].id == goodsItem.id) {
- this.goodsInfo[i].goods_list[j].erp_goods_sale_total = goodsItem.erp_goods_sale_total;
+ this.goodsInfo[i].goods_list[j].count = goodsItem.count;
}
}
}
@@ -579,12 +610,18 @@ export default {
});
for (let i = 0; i < res.data.data.list.length; ++i) {
+ // 过滤没有商品数据的分类
+ if (!res.data.data.list[i].goods_list) {
+ // res.data.data.list[i].goods_list = [];
+ continue;
+ }
+
if (res.data.data.list[i].cate.erp_goods_cate_name == "热销") {
_this.categoryIndex = 2; // 如果有热销,那么分类索引值从2开始,前面两项过滤掉(搜索、热销)
}
- if (!res.data.data.list[i].goods_list) {
- res.data.data.list[i].goods_list = [];
+ for (let j = 0; j < res.data.data.list[i].goods_list.length; ++j) {
+ res.data.data.list[i].goods_list[j].count = 0; // 用来计数
}
res.data.data.list[i].isCateShow = true;
From 29348570267546c4861bf1525bdc1fb94258a1d3 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=BC=A0=E5=AE=B6=E5=8D=8E?= <3599164049@qq.com>
Date: Fri, 23 Apr 2021 15:45:43 +0800
Subject: [PATCH 22/27] retail update
---
src/subpackage/retail/pages/index/index.vue | 8 +++++---
src/subpackage/retail/pages/search/search.vue | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/subpackage/retail/pages/index/index.vue b/src/subpackage/retail/pages/index/index.vue
index 9ee3aaa..13e358e 100644
--- a/src/subpackage/retail/pages/index/index.vue
+++ b/src/subpackage/retail/pages/index/index.vue
@@ -611,7 +611,7 @@ export default {
for (let i = 0; i < res.data.data.list.length; ++i) {
// 过滤没有商品数据的分类
- if (!res.data.data.list[i].goods_list) {
+ if (!res.data.data.list[i].goods_list || !res.data.data.list[i].goods_list.length) {
// res.data.data.list[i].goods_list = [];
continue;
}
@@ -633,8 +633,10 @@ export default {
_this.cartList = []; // 购物车的数据清空,每次切换门店都执行
_this.totalCount = 0;
_this.totalPrice = 0;
- _this.goodsInfo[1].style = _this.categoryBtnStyle.click;
- _this.goodsInfo[1].isShow = true;
+ if (_this.goodsInfo.length > 1) {
+ _this.goodsInfo[1].style = _this.categoryBtnStyle.click;
+ _this.goodsInfo[1].isShow = true;
+ }
_this.categoryGoTop(); // 分类列表需要滚动至顶部
util.hideLoad();
diff --git a/src/subpackage/retail/pages/search/search.vue b/src/subpackage/retail/pages/search/search.vue
index 49a0094..d9ec3cc 100644
--- a/src/subpackage/retail/pages/search/search.vue
+++ b/src/subpackage/retail/pages/search/search.vue
@@ -116,7 +116,7 @@
if (res.data.code == 0) {
let mark = false;
for (let i = 0; i < res.data.data.list.length; ++i) {
- if (res.data.data.list[i].goods_list) {
+ if (res.data.data.list[i].goods_list && res.data.data.list[i].goods_list.length) {
mark = true;
}
}
From 475846cf16ec64ff48eb427186278b93c24eaeee Mon Sep 17 00:00:00 2001
From: 1019933623 <1019933623@qq.com>
Date: Tue, 27 Apr 2021 10:29:49 +0800
Subject: [PATCH 23/27] fix bug
---
.../order/reservation_people_detail/reservation_people_detail.vue | 3 ++-
src/subpackage/device/components/order/timing_detail/timing_detail.vue | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue b/src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue
index e521190..31588ad 100644
--- a/src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue
+++ b/src/subpackage/device/components/order/reservation_people_detail/reservation_people_detail.vue
@@ -213,9 +213,10 @@ export default {
}
},
zh_verify_status(){
- // 核销状态 0/1/2/3/4 无效/待使用/已核销/已失效/已退款
+ // 核销状态 -1/0/1/2/3/4 已分享/无效/待使用/已核销/已失效/已退款
return status =>{
const _obj = {
+ '-1': '已分享',
'0': '无效',
'1': '待使用',
'2': '已使用',
diff --git a/src/subpackage/device/components/order/timing_detail/timing_detail.vue b/src/subpackage/device/components/order/timing_detail/timing_detail.vue
index b888d63..2365f4d 100644
--- a/src/subpackage/device/components/order/timing_detail/timing_detail.vue
+++ b/src/subpackage/device/components/order/timing_detail/timing_detail.vue
@@ -67,7 +67,7 @@
结束计费
操作人:{{orderInfo.end_bill_operator_name || '-'}}
时长合计:{{orderInfo.extension.duration || '-'}}
- 金额合计:¥{{orderInfo.extension.refundable_amount || '-'}}
+ 金额合计:¥{{orderInfo.extension.amount || '-'}}
*请输入金额
确认
From cdd0cc4b49433a38c7ba97f8086d5a7342e38332 Mon Sep 17 00:00:00 2001
From: 1019933623 <1019933623@qq.com>
Date: Tue, 27 Apr 2021 10:46:56 +0800
Subject: [PATCH 24/27] fix field
---
src/subpackage/device/components/order/timing_detail/timing_detail.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/subpackage/device/components/order/timing_detail/timing_detail.vue b/src/subpackage/device/components/order/timing_detail/timing_detail.vue
index 2365f4d..88f4809 100644
--- a/src/subpackage/device/components/order/timing_detail/timing_detail.vue
+++ b/src/subpackage/device/components/order/timing_detail/timing_detail.vue
@@ -67,7 +67,7 @@
结束计费
操作人:{{orderInfo.end_bill_operator_name || '-'}}
时长合计:{{orderInfo.extension.duration || '-'}}
- 金额合计:¥{{orderInfo.extension.amount || '-'}}
+ 金额合计:¥{{orderInfo.amount || '-'}}
*请输入金额
确认
From c2211f3dae335d06aee9b3b223f02ffc857d5ec7 Mon Sep 17 00:00:00 2001
From: 1019933623 <1019933623@qq.com>
Date: Thu, 29 Apr 2021 13:54:31 +0800
Subject: [PATCH 25/27] fix bug
---
.../order/reservation_site_detail/reservation_site_detail.vue | 10 +++++++---
.../device/components/order/timing_detail/timing_detail.vue | 3 ++-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue b/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue
index 7cdda00..c1f990f 100644
--- a/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue
+++ b/src/subpackage/device/components/order/reservation_site_detail/reservation_site_detail.vue
@@ -46,9 +46,12 @@
预订场次:
-
- {{e.venue_name||'-'}} {{e.duration||'-'}}(¥{{e.price||0}})
-
+
+
+ {{e.venue_name||'-'}} {{e.duration||'-'}}(¥{{e.price||0}})
+
+
+
@@ -234,6 +237,7 @@ export default {
.rl-view{
color: #9A9A9D;
font-size: 28rpx;
+ flex-shrink: 0;
}
.rl-text{
color: #333333;
diff --git a/src/subpackage/device/components/order/timing_detail/timing_detail.vue b/src/subpackage/device/components/order/timing_detail/timing_detail.vue
index 88f4809..a8136f4 100644
--- a/src/subpackage/device/components/order/timing_detail/timing_detail.vue
+++ b/src/subpackage/device/components/order/timing_detail/timing_detail.vue
@@ -19,7 +19,7 @@
计时信息
-
+
项目:{{orderInfo.project_name || '-'}}({{orderInfo.venue_name || '-'}})
进场时间:{{orderInfo.start_time || '-'}}
@@ -108,6 +108,7 @@ export default {
'0': '微信支付',
'1': '支付宝支付',
'2': '储值卡支付',
+ '3': '商家主动结束计费',
}
return _obj[`${status}`] || '-'
}
From 4fb46208a800b6f99631d589debd354d8da905cc Mon Sep 17 00:00:00 2001
From: zmt
Date: Fri, 30 Apr 2021 11:40:19 +0800
Subject: [PATCH 26/27] =?UTF-8?q?=E5=95=86=E5=AE=B6=E5=8A=A9=E6=89=8B?=
=?UTF-8?q?=E7=BA=A6=E7=8E=A9=E8=AE=A2=E5=8D=95=E7=AE=80=E7=BA=A6=E7=89=88?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/organize_order/organize_order.vue | 218 +++++++++++++++++++++
src/js/api.js | 3 +
src/pages/order_list/order_list.vue | 39 +++-
src/pages/order_search/order_search.vue | 5 +
.../order/organize_detail/organize_detail.vue | 0
.../device/pages/order_details/order_details.vue | 1 +
.../device/pages/order_manage/order_manage.vue | 5 +-
7 files changed, 259 insertions(+), 12 deletions(-)
create mode 100644 src/components/organize_order/organize_order.vue
create mode 100644 src/subpackage/device/components/order/organize_detail/organize_detail.vue
diff --git a/src/components/organize_order/organize_order.vue b/src/components/organize_order/organize_order.vue
new file mode 100644
index 0000000..e112bb8
--- /dev/null
+++ b/src/components/organize_order/organize_order.vue
@@ -0,0 +1,218 @@
+
+
+
+
+
+ 订单编号:
+
+ {{orderInfo.order_no || '-'}}
+
+
+
+
+ 约玩主题:
+
+ {{orderInfo.theme || '-'}}
+
+
+
+ 约玩人数:
+
+ {{orderInfo.person_applicants || '-'}}
+
+
+
+ 约玩时间:
+
+ {{orderInfo.label.Date+" "+ orderInfo.label.StartTime+" "+orderInfo.label.EndTime || '-'}}
+
+
+
+ 未发放:
+
+ {{orderInfo.un_amount_already_amount || '-'}}
+
+
+
+
+
+
+ 发放金额
+ 实付款 ¥{{orderInfo.original_order.pay_amount || 0}}
+
+
+
+
+
+
+
diff --git a/src/js/api.js b/src/js/api.js
index a4ee16d..0041706 100644
--- a/src/js/api.js
+++ b/src/js/api.js
@@ -27,6 +27,9 @@ export const API = {
integralOrder: `${ORIGIN}/admin/shop/order/list`, // 积分商城订单
integralOrderSend: `${ORIGIN}/admin/shop/order/ship`, // 积分商城订单-发货
+ organizeOrderList: `${ORIGIN}/assistant/gaPlayTogetherOrder/list`, // 约玩订单列表
+ amountIssued: `${ORIGIN}/assistant/gaPlayTogetherOrder/amountIssued`, // 发放金额
+
// 营业额统计
turnoverBrand: `${ORIGIN}/admin/assistant/turnover/brand/calc`, // 营业额记录-品牌
diff --git a/src/pages/order_list/order_list.vue b/src/pages/order_list/order_list.vue
index 843ef90..210ac63 100644
--- a/src/pages/order_list/order_list.vue
+++ b/src/pages/order_list/order_list.vue
@@ -36,6 +36,7 @@
+
@@ -88,6 +89,8 @@
import integral_order from '../../components/integral_order/integral_order';
import membership_order from '../../components/membership_order/membership_order';
import timing_order from '../../components/timing_order/timing_order.vue'
+ import organize_order from '../../components/organize_order/organize_order.vue'
+
import util from '../../utils/util';
import { servers } from '../../js/server';
import { API } from '../../js/api';
@@ -116,6 +119,13 @@
{id:1, name:'已完成'},
{id:4, name:'已退款'},
]
+ const orgClassify = [ // 约玩tab 全部/计费中/已完成/已退款 [空字符/0/1/4]
+ {id:'', name:'全部'},
+ // {id:0, name:'待使用'},
+ // {id:1, name:'已使用'},
+ // {id:2, name:'已失效'},
+ // {id:3, name:'已退款'},
+ ]
export default {
components: {
// 'reservation-order': order.reservation,
@@ -123,6 +133,7 @@
'membership-order': membership_order,
'integral-order': integral_order,
'timing-order': timing_order,
+ 'organize-order': organize_order,
},
computed:{
classifyArr(){
@@ -131,6 +142,7 @@
if(orderType == 4)return memClassify;
if(orderType == 5)return intClassify;
if(orderType == 1)return timClassify;
+ if(orderType == 10)return orgClassify;
return [];
},
titleName(){
@@ -139,6 +151,7 @@
if(orderType == 4)return '会员卡订单';
if(orderType == 5)return '积分商城订单';
if(orderType == 1)return '计时订单';
+ if(orderType == 10)return '约玩订单';
return '订单'
},
...mapState(['brandInfo']),
@@ -202,7 +215,10 @@
end: defaultTime.end,
orderType: _type
})
+
},
+ onUnload() {
+ },
methods: {
// 获取默认时间
// 3->预约,4->会员,5->积分,1->计时
@@ -310,6 +326,7 @@
if(type == 4)return API.membershipOrder;
if(type == 5)return API.integralOrder;
if(type == 1)return API.timeOrder;
+ if(type == 10)return API.organizeOrderList;
},
getOrderList({
begin='',
@@ -327,18 +344,20 @@
}){
let { brandInfo } = this;
util.showLoad();
+ let postData = {
+ begin,
+ end,
+ status,
+ brand_id: brandInfo.brand.id,
+ stadium_id,
+ page,
+ page_size,
+ order_type,
+ }
+ if(this.orderType == "10")postData['type'] = "Main"
servers.get({
url: this.getApiUrl(orderType),
- data: {
- begin,
- end,
- status,
- brand_id: brandInfo.brand.id,
- stadium_id,
- page,
- page_size,
- order_type,
- },
+ data: postData,
failMsg: '加载失败!'
})
.then(res=>{
diff --git a/src/pages/order_search/order_search.vue b/src/pages/order_search/order_search.vue
index 9b651c7..0ff3e3a 100644
--- a/src/pages/order_search/order_search.vue
+++ b/src/pages/order_search/order_search.vue
@@ -18,6 +18,7 @@
+
@@ -29,6 +30,8 @@ import reservation_order from '../../components/reservation_order/reservation_or
import integral_order from '../../components/integral_order/integral_order';
import membership_order from '../../components/membership_order/membership_order';
import timing_order from '../../components/timing_order/timing_order.vue'
+import organize_order from '../../components/organize_order/organize_order.vue'
+
import { API } from '../../js/api';
import { servers } from '../../js/server';
import util from '../../utils/util';
@@ -40,6 +43,7 @@ export default {
'membership-order': membership_order,
'integral-order': integral_order,
'timing-order': timing_order,
+ 'organize-order': organize_order,
},
computed: {
...mapState(['brandInfo']),
@@ -91,6 +95,7 @@ export default {
if(type == 4)return API.membershipOrder;
if(type == 5)return API.integralOrder;
if(type == 1)return API.timeOrder;
+ if(type == 10)return API.organizeOrderList;
},
getOrderList({
key = "",
diff --git a/src/subpackage/device/components/order/organize_detail/organize_detail.vue b/src/subpackage/device/components/order/organize_detail/organize_detail.vue
new file mode 100644
index 0000000..e69de29
diff --git a/src/subpackage/device/pages/order_details/order_details.vue b/src/subpackage/device/pages/order_details/order_details.vue
index af7458e..d9fed51 100644
--- a/src/subpackage/device/pages/order_details/order_details.vue
+++ b/src/subpackage/device/pages/order_details/order_details.vue
@@ -29,6 +29,7 @@
if(optionsQuery.order_type == 3)return '预约订单详情'; //PM: 2021/4/19 已做
if(optionsQuery.order_type == 4)return '储值卡订单详情';
if(optionsQuery.order_type == 5)return '积分商城订单详情';
+ if(optionsQuery.order_type == 10)return '约玩订单详情';
return '订单详情'
},
...mapState(['brandInfo']),
diff --git a/src/subpackage/device/pages/order_manage/order_manage.vue b/src/subpackage/device/pages/order_manage/order_manage.vue
index a56b9e0..7d933ec 100644
--- a/src/subpackage/device/pages/order_manage/order_manage.vue
+++ b/src/subpackage/device/pages/order_manage/order_manage.vue
@@ -44,7 +44,8 @@ const tabList = [
{
id: 10,
name: "约玩订单",
- path: '',
+ path: '/pages/order_list/order_list',
+ // path: '',
},
{
id: 4,
@@ -112,7 +113,7 @@ export default {
util.routeTo(tabInfo.path,'nT');
},
isOrderTab(ID){
- return ID == 3 || ID == 4 || ID == 5 || ID == 1
+ return ID == 3 || ID == 4 || ID == 5 || ID == 1 || ID == 10
},
}
}
From 73b3fc8758c20214c8f03ec9f018325955778a0d Mon Sep 17 00:00:00 2001
From: zmt
Date: Thu, 6 May 2021 11:36:15 +0800
Subject: [PATCH 27/27] =?UTF-8?q?vtest=201.0.8=20-=20=E5=95=86=E5=93=81?=
=?UTF-8?q?=EF=BC=8C=E4=BF=AE=E5=A4=8D=EF=BC=8C=E7=BA=A6=E7=8E=A9=E7=AE=80?=
=?UTF-8?q?=E7=BA=A6=E7=89=88=E6=B5=8B=E8=AF=95?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages/order_list/order_list.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/pages/order_list/order_list.vue b/src/pages/order_list/order_list.vue
index 210ac63..33cd4f7 100644
--- a/src/pages/order_list/order_list.vue
+++ b/src/pages/order_list/order_list.vue
@@ -328,6 +328,7 @@
if(type == 1)return API.timeOrder;
if(type == 10)return API.organizeOrderList;
},
+
getOrderList({
begin='',
end='',