39 changed files with 718 additions and 98 deletions
@ -0,0 +1,109 @@ |
|||
// pages/order/joinOrder/history/index.js
|
|||
import commonApi from "../../../../utils/https/common" |
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
oid:null, |
|||
id:null, |
|||
info:null, |
|||
user_id:null |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
commonApi.user_post("team_order/get_team_detail",{ |
|||
order_id:options.oid |
|||
}).then(res=>{ |
|||
res.data.list.members.reverse() |
|||
res.data.list.members.map(item=>{ |
|||
item.idNew = item.id_number.replace(/^(.{6})(?:\d+)(.{4})$/,"\$1********\$2"); |
|||
}) |
|||
this.setData({ |
|||
info:res.data, |
|||
id:options.id, |
|||
oid:options.oid, |
|||
user_id:wx.getStorageSync('jstrip_userid') |
|||
}) |
|||
}) |
|||
}, |
|||
delItem(e){ |
|||
let item = e.currentTarget.dataset.item,index = e.currentTarget.dataset.index,info = this.data.info,that = this |
|||
wx.showModal({ |
|||
title:"提示", |
|||
content:"确定删除该团员吗?", |
|||
success:function(res){ |
|||
if(res.confirm){ |
|||
commonApi.user_post("team_order/del",{ |
|||
team_id:item.team_id, |
|||
member_id:item.id |
|||
}).then(res=>{ |
|||
if(res.code==1){ |
|||
wx.showToast({ |
|||
title: '删除成功', |
|||
icon:'success' |
|||
}) |
|||
info.list.members.splice(index,1) |
|||
that.setData({ |
|||
info:info |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
} |
|||
} |
|||
@ -0,0 +1,21 @@ |
|||
<!--pages/order/joinOrder/history/index.wxml--> |
|||
<title title="预约记录"></title> |
|||
<view class="box" wx:if="{{info}}"> |
|||
<view class="item" wx:for="{{info.list.members}}"> |
|||
<view class="item-top{{item.user_id==info.list.user_id?' active':''}}"> |
|||
<view class="name">{{item.name}}</view> |
|||
<view class="tel">{{item.mobile}}</view> |
|||
<view class="name" wx:if="{{item.user_id==user_id}}">{{item.id_number}}</view> |
|||
<view class="name" wx:else>{{item.idNew}}</view> |
|||
</view> |
|||
<view class="tags"> |
|||
<view class="tag" wx:if="{{item.user_id==info.list.user_id}}">发起人</view> |
|||
<view class="tag" wx:elif="{{item.user_id==user_id}}">自己</view> |
|||
<view style="flex:1"></view> |
|||
<navigator url="../index?id={{id}}&oid={{oid}}&mid={{item.id}}" wx:if="{{item.user_id==user_id || user_id==info.list.user_id}}">修改</navigator> |
|||
<view bindtap="delItem" data-item="{{item}}" data-index="{{index}}" wx:if="{{item.user_id==user_id || user_id==info.list.user_id}}">删除</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view style="height:120rpx"></view> |
|||
<navigator url="../index?id={{id}}&oid={{oid}}" class="btn">添加</navigator> |
|||
@ -0,0 +1,67 @@ |
|||
/* pages/order/joinOrder/history/index.wxss */ |
|||
.box { |
|||
width: 690rpx; |
|||
background: #FFFFFF; |
|||
border-radius: 20rpx; |
|||
margin: 0 auto; |
|||
} |
|||
page { |
|||
background: #F2F2F2; |
|||
} |
|||
.item { |
|||
margin: 0 30rpx; |
|||
height: 105rpx; |
|||
border-bottom: 1rpx solid #d8d8d8; |
|||
font-size: 30rpx; |
|||
color: #333333; |
|||
padding: 20rpx 0; |
|||
} |
|||
.box .item:last-child { |
|||
border-bottom: none; |
|||
} |
|||
.box .item .name { |
|||
flex-shrink: 0; |
|||
} |
|||
.item-top,.tags { |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: space-between; |
|||
} |
|||
.item-top { |
|||
margin-bottom: 20rpx; |
|||
} |
|||
.item-top .tel { |
|||
flex: 1; |
|||
margin: 0 30rpx; |
|||
} |
|||
.tags { |
|||
font-size: 26rpx; |
|||
color: #0B898E; |
|||
} |
|||
.item-top.active { |
|||
color: #0B898E; |
|||
font-weight: bold; |
|||
} |
|||
.tag { |
|||
width: 120rpx; |
|||
line-height: 40rpx; |
|||
color: #0B898E; |
|||
background: rgba(11, 137, 142, .1); |
|||
border-radius: 10rpx; |
|||
text-align: center; |
|||
} |
|||
.tags view:last-child { |
|||
margin-left: 30rpx; |
|||
} |
|||
.btn { |
|||
width: 632rpx; |
|||
line-height: 70rpx; |
|||
background: #0B898E; |
|||
border-radius: 20rpx; |
|||
text-align: center; |
|||
position: fixed; |
|||
font-size: 30rpx; |
|||
color: #FFFFFF; |
|||
bottom: 30rpx; |
|||
left: 59rpx; |
|||
} |
|||
@ -0,0 +1,70 @@ |
|||
// pages/order/joinOrder/success/index.js
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
id:null, |
|||
oid:null |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad: function (options) { |
|||
this.setData({ |
|||
id:options.id, |
|||
oid:options.oid |
|||
}) |
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom: function () { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage: function () { |
|||
|
|||
} |
|||
}) |
|||
@ -0,0 +1,5 @@ |
|||
{ |
|||
"usingComponents": { |
|||
"title":"/pages/component/TitleHeader" |
|||
} |
|||
} |
|||
@ -0,0 +1,8 @@ |
|||
<!--pages/order/joinOrder/success/index.wxml--> |
|||
<title title="添加成功"></title> |
|||
<image class="successimg" src="https://static.ticket.sz-trip.com/uploads/20211108/b11f361c5785a20fddf138a523d8ad71.png" mode="widthFix"></image> |
|||
<view class="submit-success">提交成功</view> |
|||
<view>团长确认后请前往公众号</view> |
|||
<view>君到苏州-个人中心 凭码入园</view> |
|||
<navigator url="../index?id={{id}}&oid={{oid}}" class="btn full">继续提交</navigator> |
|||
<navigator url="../history/index?id={{id}}&oid={{oid}}" class="btn">查看提交记录</navigator> |
|||
@ -0,0 +1,33 @@ |
|||
/* pages/order/joinOrder/success/index.wxss */ |
|||
.successimg { |
|||
display: block; |
|||
margin: 0 auto; |
|||
width: 180rpx; |
|||
margin-top: 176rpx; |
|||
margin-bottom: 40rpx; |
|||
} |
|||
.submit-success { |
|||
color: #0B898E; |
|||
font-size: 36rpx; |
|||
margin-bottom: 30rpx; |
|||
} |
|||
page { |
|||
text-align: center; |
|||
font-size: 26rpx; |
|||
color: #999; |
|||
} |
|||
.btn { |
|||
margin: 30rpx auto; |
|||
color: #0B898E; |
|||
border: 2rpx solid; |
|||
border-radius: 20rpx; |
|||
line-height: 70rpx; |
|||
background: white; |
|||
font-size: 30rpx; |
|||
width: 632rpx; |
|||
} |
|||
.btn.full { |
|||
background: #0B898E; |
|||
color: #fff; |
|||
margin-top: 110rpx; |
|||
} |
|||
@ -1,39 +1,42 @@ |
|||
<!--pages/order/scene/index.wxml--> |
|||
<title title="提交订单"></title> |
|||
<view class="product-info" wx:if="{{product}}"> |
|||
<view class="product-title">{{product.product.title + product.sku.sku_name}}</view> |
|||
<view class="product-price" wx:if="{{type=='museum' || type=='activity'}}">免费</view> |
|||
</view> |
|||
<date wx:if="{{isLogin && type!='activity'}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime" product="{{product}}"></date> |
|||
<view class="box"> |
|||
<view class="box-title"> |
|||
<view style="flex:1">购票数量</view> |
|||
<view class="iconfont icon-sami-select" wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="minus"></view> |
|||
<view class="number-box">{{productNum}}</view> |
|||
<view class="iconfont icon-add-select" wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="add"></view> |
|||
<view class="{{product && product.isGroup==1?'group-order':''}}"> |
|||
<title title="订单填写"></title> |
|||
<view class="product-info" wx:if="{{product}}"> |
|||
<view class="product-title">{{product.product.title + product.isGroup==1?'(团体预约)':product.sku.sku_name}}</view> |
|||
<view class="product-price" wx:if="{{type=='museum' || type=='activity'}}">免费</view> |
|||
</view> |
|||
</view> |
|||
<contact wx:if="{{isLogin}}" type="{{type}}" bind:setLinkman="setLinkman"></contact> |
|||
<coupon wx:if="{{!kjId && !gp_id && type!='activity' && product && product.isGroup!=1}}" id="coupon" money="{{singlePrice * productNum}}" sku="{{product.sku.id}}"></coupon> |
|||
<view class="box" wx:if="{{type!='activity' && product && product.isGroup!=1}}"> |
|||
<view class="box-title"> |
|||
<view style="flex-shrink:0">订单备注</view> |
|||
<input type="text" bindinput="changeRemark" placeholder="选填"></input> |
|||
<date wx:if="{{isLogin && type!='activity'}}" bind:onChangeDate="changeDate" bind:onChangeTime="changeTime" product="{{product}}"></date> |
|||
<view class="box" wx:if="{{product && product.isGroup==1}}"> |
|||
<view class="box-title"> |
|||
<view style="flex-shrink:0">团体主体名称:</view> |
|||
<input type="text" placeholder="请输入名称" bindinput="changeGroupName"></input> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view class="box" wx:if="{{product && product.isGroup==1}}"> |
|||
<view class="box-title"> |
|||
<view style="flex-shrink:0">团队主体名称:</view> |
|||
<input type="text" bindinput="changeGroupName"></input> |
|||
<view class="box"> |
|||
<view class="box-title"> |
|||
<view style="flex:1">{{product && product.isGroup!=1?'购票数量':'预约人数'}}</view> |
|||
<view class="iconfont icon-sami-select" wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="minus"></view> |
|||
<view class="number-box">{{productNum}}</view> |
|||
<view class="iconfont icon-add-select" wx:if="{{!kjId && !gp_id && type!='activity'}}" bindtap="add"></view> |
|||
</view> |
|||
</view> |
|||
<contact wx:if="{{isLogin}}" type="{{type}}" bind:setLinkman="setLinkman"></contact> |
|||
<coupon wx:if="{{!kjId && !gp_id && type!='activity' && product && product.isGroup!=1}}" id="coupon" money="{{singlePrice * productNum}}" sku="{{product.sku.id}}"></coupon> |
|||
<view class="box" wx:if="{{type!='activity' && product && product.isGroup!=1}}"> |
|||
<view class="box-title"> |
|||
<view style="flex-shrink:0">订单备注</view> |
|||
<input type="text" bindinput="changeRemark" placeholder="选填"></input> |
|||
</view> |
|||
</view> |
|||
|
|||
<view style="{{type=='museum' || type=='activity'?'height:138rpx':'height:113rpx'}}"></view> |
|||
<view class="fixed-bottom" wx:if="{{type!='museum' && type!='activity'}}"> |
|||
<view class="fixed-price-box" wx:if="{{kjId}}"><text>合计:</text><text class="price">¥0</text></view> |
|||
<view class="fixed-price-box" wx:else><text>合计:</text><text class="price">¥{{((singlePrice * productNum - (coupon?coupon.activity.money:0))>0?(singlePrice * productNum - (coupon?coupon.activity.money:0)):0)/ 100}}</text></view> |
|||
<view class="fixed-btn" bindtap="order">提交订单</view> |
|||
</view> |
|||
<view class="fixed-bottom yuyue-box" wx:else> |
|||
<view class="fixed-btn yuyue-btn" bindtap="order" wx:if="{{type=='museum'}}">立即预约</view> |
|||
<view class="fixed-btn yuyue-btn" bindtap="activityOrder" wx:else>立即预约</view> |
|||
</view> |
|||
</view> |
|||
<view style="{{type=='museum' || type=='activity'?'height:138rpx':'height:113rpx'}}"></view> |
|||
<view class="fixed-bottom" wx:if="{{type!='museum' && type!='activity'}}"> |
|||
<view class="fixed-price-box" wx:if="{{kjId}}"><text>合计:</text><text class="price">¥0</text></view> |
|||
<view class="fixed-price-box" wx:else><text>合计:</text><text class="price">¥{{((singlePrice * productNum - (coupon?coupon.activity.money:0))>0?(singlePrice * productNum - (coupon?coupon.activity.money:0)):0)/ 100}}</text></view> |
|||
<view class="fixed-btn" bindtap="order">提交订单</view> |
|||
</view> |
|||
<view class="fixed-bottom yuyue-box" wx:else> |
|||
<view class="fixed-btn yuyue-btn" bindtap="order" wx:if="{{type=='museum'}}">立即预约</view> |
|||
<view class="fixed-btn yuyue-btn" bindtap="activityOrder" wx:else>立即预约</view> |
|||
</view> |
|||
Loading…
Reference in new issue