diff --git a/app.json b/app.json
index 5acb10e..9558f6c 100644
--- a/app.json
+++ b/app.json
@@ -48,6 +48,7 @@
"pages/user/cartlist/list",
"pages/user/couponCenter/index",
"pages/user/order/list",
+ "pages/user/order/team/list",
"pages/user/order/sceneOrderInfo/index",
"pages/user/order/foodOrderInfo/index",
"pages/user/order/lineOrderInfo/index",
diff --git a/pages/info/groupOrderInfo/index.js b/pages/info/groupOrderInfo/index.js
index 9c820ca..b4fe31a 100644
--- a/pages/info/groupOrderInfo/index.js
+++ b/pages/info/groupOrderInfo/index.js
@@ -79,7 +79,7 @@ Page({
if(res.code==1){
// todo
wx.navigateTo({
- url: '/pages/user/order/groupOrderInfo/index?id=',
+ url: '/pages/user/order/groupOrderInfo/index?id='+this.data.id,
})
}
})
diff --git a/pages/info/groupOrderInfo/index.wxml b/pages/info/groupOrderInfo/index.wxml
index d1832a0..1dd63d2 100644
--- a/pages/info/groupOrderInfo/index.wxml
+++ b/pages/info/groupOrderInfo/index.wxml
@@ -1,7 +1,8 @@
-
- 邀请码:{{info.list.id}}
+
+ {{info.list.state_text}}
+ {{info.list.team_name}}
预约人数:{{info.list.member_num}}
@@ -10,8 +11,14 @@
立即邀请
提交订单
+
+ {{info.list.state_text}}
+ 成功预约人数
+ {{info.list.members_count}}
+
- 已填写信息团员
+ 已填写信息团员
+ 预约成功团员
@@ -22,7 +29,7 @@
{{item.name}} {{item.mobile}}
{{item.id_number}}
-
+
修改
删除
diff --git a/pages/order/components/date/index.js b/pages/order/components/date/index.js
index 5adb63c..d5e9f41 100644
--- a/pages/order/components/date/index.js
+++ b/pages/order/components/date/index.js
@@ -56,6 +56,9 @@ Component({
// 如果之前已经在详情页面选择了日期的话 默认日期不能是第一个有库存的日期了
if(app.globalData.product.infoDate){
let dateIndex = res.data.slice(0,3).findIndex(item=>item.date==app.globalData.product.infoDate.date)
+ // if(!app.globalData.product.infoDate.short_date){
+ // app.globalData.product.infoDate.short_date = app.globalData.product.infoDate.date.split("-").splice(1,2).join("-")
+ // }
this.setData({
activeDate:app.globalData.product.infoDate,
moreFlag:dateIndex!=-1
@@ -66,6 +69,7 @@ Component({
else {
for(let i=0;i0){
+ res.data[i].short_date = res.data[i].date.split("-").splice(1,2).join("-")
this.setData({
activeDate:res.data[i]
})
@@ -89,6 +93,10 @@ Component({
this.setData({
threeDays:res.data.slice(0,3)
})
+ let index = this.data.threeDays.findIndex(item=>item.date==this.data.activeDate.date)
+ this.setData({
+ moreFlag:index!=-1
+ })
console.log(res)
})
}
@@ -135,7 +143,6 @@ Component({
},
// 修改日期
onTapDay:function(e){
- console.log(e)
let threeDays = this.data.threeDays,flag=false;
threeDays.map(item=>{
if(item.date==e.detail.date){
diff --git a/pages/user/order/team/list.js b/pages/user/order/team/list.js
new file mode 100644
index 0000000..e09e76d
--- /dev/null
+++ b/pages/user/order/team/list.js
@@ -0,0 +1,258 @@
+// pages/user/order/list.js
+import commonApi from "../../../../utils/https/common"
+import util from "../../../../utils/util"
+let app = getApp()
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ list:[],
+ keywords:"",
+ orderState:['组团中','等待确认','待出行','待出行','已完成','场馆拒接','已取消'],
+ type:-1,
+ lon:"",
+ lat:""
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ wx.getLocation({
+ type: 'gcj02',
+ success: (r)=>{
+ this.setData({
+ lon:r.longitude,
+ lat:r.latitude
+ })
+ this.getList();
+ }
+ })
+
+ },
+ gotoWeb:function(e){
+ let web = e.currentTarget.dataset.web;
+ app.globalData.weburl = web;
+ wx.navigateTo({
+ url: '/pages/pbService/web/index',
+ })
+ },
+ changeKeyword:function(e){
+ this.setData({
+ keywords:e.detail.value
+ })
+ },
+ refundInfo:function(e){
+ let id = e.currentTarget.dataset.id;
+ wx.navigateTo({
+ url: 'refundInfo/index?id='+id,
+ })
+ },
+ gotoComment:function(e){
+ let id = e.currentTarget.dataset.id;
+ wx.navigateTo({
+ url: '/pages/order/comment/index?id='+id,
+ })
+ },
+ // 再次预定
+ order:function(e){
+ let item = e.currentTarget.dataset.item;
+ console.log(item)
+ wx.navigateTo({
+ url: '/pages/info/museumInfo/index?isGroup=1&id='+item.order_product_list[0].scene_id
+ })
+ // util.orderMoreTime(item)
+ },
+ pay:function(e){
+ let id = e.currentTarget.dataset.id;
+ wx.navigateTo({
+ url: '/pages/order/pay/index?id='+id,
+ })
+ },
+ search:function(){
+ this.setData({
+ realKeyword:this.data.keywords,
+ list:[],
+ total:1
+ })
+ this.getList()
+ },
+ getList:function(){
+ let list = this.data.list;
+ if(list.length>=this.data.total) return;
+ commonApi.user_post("team_order/team_list",{
+ state:this.data.type>-1?this.data.type:null,
+ offset:this.data.list.length,
+ limit:10,
+ keywords:this.data.keywords
+ }).then(res=>{
+ let ajaxes = [],indexes=[]
+ res.data.list.map((item,index)=>{
+ let orderNum = 0;
+ item.order_product_list.map(order=>{
+ orderNum = orderNum + order.product_num;
+ // 景点线路场馆酒店四类产品的订单 如果是已支付未出票的显示出票中
+ if(order.state=='PAID' && (order.product_model=='venue' || order.product_model=='ticket' || order.product_model=='hotel' || order.product_model=='line')){
+ item.orderStateText="出票中"
+ }
+ })
+ if(item.order_product_list.length==1 && item.order_product_list[0].scene_id && item.state!='UNPAID' && item.state!='CLOSED' && item.state.indexOf("REFUND")==-1){
+ let ajax = commonApi.user_post("order/tripplan",{
+ point_type: "gd",
+ child_order_id:item.order_product_list[0].child_order_id,
+ lat:this.data.lat,
+ lon:this.data.lon
+ })
+ ajaxes.push(ajax);
+ indexes.push(index);
+ }
+ item.orderNum = orderNum;
+ })
+ console.log(ajaxes)
+ if(ajaxes.length==0){
+ this.setData({
+ total:res.data.total,
+ list:list.concat(res.data.list)
+ })
+ return;
+ }
+ Promise.all(ajaxes).then((r)=>{
+ r.map((item,index)=>{
+ if(item && item.data && item.data.url){
+ res.data.list[indexes[index]].guihuaUrl = item.data.url
+ }
+ })
+ this.setData({
+ total:res.data.total,
+ list:list.concat(res.data.list)
+ })
+ })
+
+ })
+ },
+ gotoDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ wx.navigateTo({
+ url: '/pages/info/groupOrderInfo/index?id='+item.order_id,
+ })
+ },
+ gotoProductDetail:function(e){
+ let item = e.currentTarget.dataset.item;
+ util.orderMoreTime({order_product_list:[item]})
+ },
+ changeType:function(e){
+ let type = e.currentTarget.dataset.type;
+ this.setData({
+ type:Number(type),
+ list:[],
+ total:1
+ })
+ this.getList()
+ },
+ refund:function(e){
+ let index = e.currentTarget.dataset.index,list = this.data.list,item = list[index],that = this;
+ wx.showModal({
+ title:"提示",
+ content:"确定取消吗?",
+ success:function(res){
+ if(res.confirm){
+ // 确定取消
+ commonApi.user_post("order/refund",{
+ order_id:item.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '已取消',
+ icon:'success'
+ })
+ if(that.data.type){
+ list.splice(index,1);
+ }
+ else {
+ list[index].state='WAIT_REFUND';
+ }
+ that.setData({
+ list:list
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+ cancel:function(e){
+ let index = e.currentTarget.dataset.index,list = this.data.list,item = list[index],that = this;
+ wx.showModal({
+ title:"提示",
+ content:"确定取消吗?",
+ success:function(res){
+ if(res.confirm){
+ // 确定取消
+ commonApi.user_post("order/close",{
+ order_id:item.order_id
+ }).then(res=>{
+ if(res.code==1){
+ wx.showToast({
+ title: '已取消',
+ icon:'success'
+ })
+ if(that.data.type){
+ list.splice(index,1);
+ }
+ else {
+ list[index].state='CLOSED';
+ }
+ that.setData({
+ list:list
+ })
+ }
+ })
+ }
+ }
+ })
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+ this.getList()
+ }
+})
\ No newline at end of file
diff --git a/pages/user/order/team/list.json b/pages/user/order/team/list.json
new file mode 100644
index 0000000..35cf02f
--- /dev/null
+++ b/pages/user/order/team/list.json
@@ -0,0 +1,5 @@
+{
+ "usingComponents": {
+ "title":"/pages/component/TitleHeader"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/order/team/list.wxml b/pages/user/order/team/list.wxml
new file mode 100644
index 0000000..99f3ece
--- /dev/null
+++ b/pages/user/order/team/list.wxml
@@ -0,0 +1,51 @@
+
+
+
+
+
+
+ 搜索
+
+
+ 全部
+ 组团中
+ 等待确认
+ 待出行
+ 已完成
+
+
+
+
+
+ 订单号:{{item.order_id}}
+ {{orderState[item.team_state]}}
+
+
+
+ {{item.product_model=='movie'?item.product_title:(item.product_title+item.sku_name)}}
+
+ ¥{{item.product_price/100}}
+ x{{item.product_num}}
+
+
+
+ 共{{item.orderNum}}件商品
+
+
+ 总价 ¥{{item.total_money/100}}需付款 ¥{{item.paid_money/100}}
+
+
+
+ 行程规划
+ 再次购买
+ 立即评价
+ 取消预订
+ 取消预订
+ 退款详情
+ 立即支付
+
+
+
+
+ 还没有订单,赶快去下单吧~
+
\ No newline at end of file
diff --git a/pages/user/order/team/list.wxss b/pages/user/order/team/list.wxss
new file mode 100644
index 0000000..2d1b215
--- /dev/null
+++ b/pages/user/order/team/list.wxss
@@ -0,0 +1,167 @@
+/* pages/user/order/list.wxss */
+page {
+ background: #f6f6f6;
+}
+.fixed-top {
+ position: fixed;
+ left: 0;
+ right: 0;
+ background: white;
+ padding: 0 30rpx;
+ padding-top: 20rpx;
+}
+.types {
+ display: flex;
+ align-items: center;
+ line-height: 50rpx;
+ height: 95rpx;
+ color: #333;
+ font-size: 26rpx;
+ overflow-x: auto;
+}
+.type-item {
+ position: relative;
+ margin-right: 60rpx;
+ flex-shrink: 0;
+}
+.type-item.active {
+ color: #0B898E;
+ font-weight: bold;
+}
+.type-item.active::after {
+ display: block;
+ font-size: 0;
+ content: "1";
+ width: 30rpx;
+ height: 4rpx;
+ background: #0B898E;
+ border-radius: 2rpx;
+ left: 50%;
+ position: absolute;
+ margin-left: -15rpx;
+ top: 100%;
+}
+.order-item {
+ margin: 20rpx 30rpx;
+ background: white;
+ border-radius: 20rpx;
+}
+.order-top {
+ display: flex;
+ padding: 0 20rpx;
+ height: 80rpx;
+ align-items: center;
+ border-bottom: 1rpx solid #d8d8d8;
+ font-size: 26rpx;
+ color: #888;
+ justify-content: space-between;
+}
+.order-top .status {
+ color: #D62828;
+}
+.order-info {
+ display: flex;
+ padding: 20rpx;
+ justify-content: space-between;
+ color: #333333;
+ font-size: 26rpx;
+}
+.order-info image {
+ flex-shrink: 0;
+ width: 140rpx;
+ height: 140rpx;
+ border-radius: 10rpx;
+}
+.order-info .sku-title {
+ flex: 1;
+ margin: 0 20rpx;
+ line-height: 40rpx;
+ height: 80rpx;
+}
+.sku-tips {
+ text-align: right;
+ flex-shrink: 0;
+ line-height: 40rpx;
+}
+.sku-tips .sku-price {
+ margin-bottom: 10rpx;
+}
+.total {
+ text-align: right;
+ margin-right: 20rpx;
+}
+.total .all-price {
+ font-size: 36rpx;
+ font-weight: bold;
+}
+.btns {
+ display: flex;
+ justify-content: flex-end;
+ padding: 20rpx;
+ align-items: center;
+}
+.btn {
+ width: 158rpx;
+ line-height: 58rpx;
+ background: #fff;
+ border: 1rpx solid #D8D8D8;
+ border-radius: 30rpx;
+ text-align: center;
+ font-size: 26rpx;
+ margin-left: 20rpx;
+ color: #333;
+}
+.active.btn {
+ background: #FC9132;
+ border-color: #FC9132;
+ color: #fff;
+}
+.search-box {
+ display: flex;
+ margin: 0 30rpx;
+ background: #EDEDED;
+ line-height: 60rpx;
+ border-radius: 30rpx;
+ padding-left: 20rpx;
+ font-size: 26rpx;
+ align-items: center;
+ justify-content: space-between;
+}
+.search-box .iconfont {
+ color: #999999;
+ font-size: 30rpx;
+ flex-shrink: 0;
+}
+.search-box input {
+ flex: 1;
+ margin: 0 15rpx;
+}
+.search-box .search-btn {
+ width: 110rpx;
+ text-align: center;
+ line-height: 40rpx;
+ color: #0B898E;
+ flex-shrink: 0;
+ font-size: 26rpx;
+ border-left: 1rpx solid #ccc;
+}
+.empty-box {
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 0;
+ bottom: 0;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ flex-direction: column;
+ font-size: 26rpx;
+ color: #888;
+ text-align: center;
+ z-index: -1;
+}
+.empty-box image {
+ width: 260rpx;
+ display: block;
+ margin-bottom: 20rpx;
+}
\ No newline at end of file
diff --git a/pages/user/user.wxml b/pages/user/user.wxml
index 2c4b16a..4383a28 100644
--- a/pages/user/user.wxml
+++ b/pages/user/user.wxml
@@ -60,6 +60,9 @@
实名认证
+
+ 团队订单
+