Browse Source

分批发货

master
jiazhipeng 9 months ago
parent
commit
f6f481968a
  1. 78
      pages/order/orderList/index.wxml
  2. 43
      pages/order/orderList/index.wxss
  3. 28
      pages/order/postOrder/index.js
  4. 32
      pages/order/postOrder/index.wxml
  5. 29
      pages/order/postOrder/index.wxss
  6. 58
      pages/user/order/postOrderInfo/index.js
  7. 227
      pages/user/order/postOrderInfo/index.wxml
  8. 40
      pages/user/order/postOrderInfo/index.wxss
  9. 25
      pages/user/order/sceneOrderInfo/index.js
  10. 329
      pages/user/order/sceneOrderInfo/index.wxml
  11. 118
      pages/user/order/sceneOrderInfo/index.wxss

78
pages/order/orderList/index.wxml

@ -1,64 +1,48 @@
<title title="订单列表"></title>
<view class="box" wx:if="{{goodsList.length != 0}}">
<view wx:for="{{goodsList}}" wx:key="index">
<view class="item-box">
<view>
{{item.product.title}}
</view>
<view class="price">
¥{{item.sku.price/100}}
</view>
<view class="goods-item" wx:for="{{goodsList}}" wx:key="index">
<view class="item-box item-title">
<view>{{item.product.title}}</view>
<view class="price">¥{{item.sku.price/100}}</view>
</view>
<view class="item-box">
<view>
{{item.sku.sku_name}}
</view>
<view>
X{{item.productNum}}
</view>
<view>{{item.sku.sku_name}}</view>
<view>X{{item.productNum}}</view>
</view>
<view class="item-box">
<view>
运费
</view>
<view class="price">
¥{{item.postFee/100 || 0}}
</view>
<view>运费</view>
<view class="price">¥{{item.postFee/100 || 0}}</view>
</view>
<view wx:if="{{item.sku.is_batch_shipment==1}}">
<view class="item-box item-title">物流信息</view>
<view class="item-box">分批收货 (共{{item.sku.batch_count}}次)</view>
<view class="item-box">物流备注:{{item.sku.batch_remark}}</view>
</view>
</view>
</view>
<view class="box" wx:if="{{ticketList.length != 0}}">
<view wx:for="{{ticketList}}" wx:key="index">
<view class="item-box">
<view>
{{item.product.title}}
</view>
<view class="price">
¥{{item.sku.price/100}}
</view>
<view class="goods-item" wx:for="{{ticketList}}" wx:key="index">
<view class="item-box item-title">
<view>{{item.product.title}}</view>
<view class="price">¥{{item.sku.price/100}}</view>
</view>
<view class="item-box">
<view>
{{item.sku.sku_name}}
</view>
<view>
X{{item.num}}
<!-- X{{item.linkmanList.length}} -->
</view>
<view>{{item.sku.sku_name}}</view>
<view>X{{item.num}}</view>
</view>
<view style="padding-left: 10rpx;margin: 30rpx 0 22.67rpx;">出行人信息</view>
<view wx:if="{{item.sku.sku_model.is_authentication != 0}}">
<view wx:for="{{item.linkmanList}}" style="padding-left: 10rpx;" wx:for-item="items">
<view>
<view class="text"><view class="text-left">姓名:</view>{{items.name}}</view>
<view class="text"><view class="text-left">证件号:</view>{{items.id_number}}</view>
<view class="text"><view class="text-left">手机号:</view>{{items.tel}}</view>
<view class="item-box item-title" style="padding-top: 27rpx;">出行人信息</view>
<view wx:if="{{item.sku.sku_model.is_authentication != 0}}">
<view wx:for="{{item.linkmanList}}" style="padding-left: 10rpx;" wx:for-item="items">
<view>
<view class="text"><view class="text-left">姓名:</view>{{items.name}}</view>
<view class="text"><view class="text-left">证件号:</view>{{items.id_number}}</view>
<view class="text"><view class="text-left">手机号:</view>{{items.tel}}</view>
</view>
</view>
</view>
<view wx:else>
<view class="text"><view class="text-left">手机号:</view>{{item.phone}}</view>
</view>
</view>
</view>
<view wx:else>
<view class="text"><view class="text-left">手机号:</view>{{item.phone}}</view>
</view>
</view>
</view>

43
pages/order/orderList/index.wxss

@ -7,11 +7,7 @@ page{
background: white;
padding: 20rpx;
}
.item-box{
display: flex;
justify-content: space-between;
padding: 10rpx;
}
.price{
color: #D62828;
}
@ -64,13 +60,38 @@ page{
}
.text {
margin-bottom: 22.67rpx;
color: #333;
font-size: 28rpx;
font-weight: 500;
margin-bottom: 20rpx;
display: flex;
font-weight: 500;
font-size: 27rpx;
color: #666666;
}
.text-left {
color: #999;
.goods-item{
border-bottom: 1px solid #D8D8D8;
padding-bottom: 17rpx;
margin-bottom: 17rpx;
}
.goods-item:last-of-type{
border-bottom: none;
margin-bottom:0;
padding-bottom: 0;
}
.item-box{
display: flex;
justify-content: space-between;
padding: 10rpx;
font-weight: 500;
font-size: 27rpx;
color: #666666;
}
.item-box.item-title{
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
.item-box.item-title .price{
color: #D62828;
font-weight: bold;
}

28
pages/order/postOrder/index.js

@ -47,6 +47,7 @@ Page({
else if (this.data.gp_id) {
price = price + item.sku.event_price * item.productNum;
}
item.sku.batch_shipment = item.sku.batch_shipment?item.sku.batch_shipment:0;
sku_id.push(item.sku.id)
})
this.setData({
@ -154,7 +155,8 @@ Page({
sku_id: item.sku.id,
post: this.data.address.id,
product_num: item.productNum,
remark: item.remark
remark: item.remark,
is_batch_shipment: item.sku.batch_shipment,
}
product_list.push(productItem)
})
@ -232,8 +234,15 @@ Page({
let postFee = 0, flag = true;
res.map((item, index) => {
if (item.data.price < 0) flag = false;
postFee = postFee + Number(item.data.price);
product[index].postFee = item.data.price;
// 累计总邮费
let postPrice = Number(item.data.price)
if(product[index].sku.batch_shipment == 1) {
postPrice = product[index].sku.batch_count * postPrice
}
postFee = postFee + postPrice;
})
if (!flag) {
wx.showToast({
@ -265,6 +274,21 @@ Page({
})
},
changeBatchShip (e) {
let product = this.data.product;
let value = e.currentTarget.dataset.value;
let index = e.currentTarget.dataset.index;
product[index].sku.batch_shipment = value;
console.log(index)
this.setData({
product: product
})
this.getPostFee()
this.changePrice()
},
/**
* 选择补贴
*/

32
pages/order/postOrder/index.wxml

@ -25,16 +25,44 @@
<view class="number-box">{{item.productNum}}</view>
<view wx:if="{{!kjId && !gp_id}}" class="iconfont icon-add-select" bindtap="add" data-index="{{index}}"></view>
</view>
<view class="box-title" style="height:auto;min-height:126rpx;position: relative;">
<view style="flex:1;white-space:nowrap;margin-right:20rpx;">收货方式</view>
<view class="batch-view">
<view class="flex" bind:tap="changeBatchShip" data-item="{{item}}" data-value="{{0}}" data-index="{{index}}">
<view class="no-select" wx:if="{{item.sku.batch_shipment==1}}"></view>
<image class="select-img" mode="aspectFill" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/show/dui.png" wx:else></image>
<text>一次性收货</text>
</view>
<view class="flex" bind:tap="changeBatchShip" data-item="{{item}}" data-value="{{1}}" data-index="{{index}}"
style="margin-left: 30rpx;" wx:if="{{item.sku.is_batch_shipment}}">
<view class="no-select" wx:if="{{item.sku.batch_shipment==0}}"></view>
<image class="select-img" mode="aspectFill" src="https://static.ticket.sz-trip.com/jundaosuzhou/images/show/dui.png" wx:else></image>
<text>分批收货<text style="font-size: 24rpx;">(共{{item.sku.batch_count}}次)</text></text>
</view>
<view class="batch-info-tip">{{item.sku.batch_remark}}</view>
</view>
</view>
<view class="box-title" style="height:auto;min-height:113rpx;">
<view style="flex:1;white-space:nowrap;margin-right:20rpx;">运费</view>
<text>{{item.postFee?(item.postFee==0?'包邮':(item.postFee/100)):item.sku.sku_model.post_template_name}}</text>
<view style="display: flex;">
<text>{{item.postFee?(item.postFee==0?'包邮':("¥"+(item.postFee/100))):item.sku.sku_model.post_template_name}}</text>
<view wx:if="{{item.postFee>0 && item.sku.batch_shipment==1}}">
<text style="padding-left: 10rpx;">x{{item.sku.batch_count}}</text>
<text style="padding-left: 40rpx;">¥{{(item.postFee/100)*item.sku.batch_count}}</text>
</view>
</view>
</view>
<view class="box-title" wx:if="{{flag!='mix'}}">
<view style="flex-shrink:0" >订单备注:</view>
<input type="text" bindinput="inputRemark" data-index="{{index}}" placeholder="选填"></input>
</view>
<view class="all-money-box" wx:if="{{from=='cart'}}">
小计:<text class="unit">¥</text><text class="s-price">{{(item.sku.price * item.productNum + item.postFee || 0) /100}}</text>
小计:<text class="unit">¥</text>
<text class="s-price" wx:if="{{item.sku.batch_shipment==1}}">{{(item.sku.price * item.productNum + item.postFee*item.sku.batch_count || 0) /100}}</text>
<text class="s-price" wx:else>{{(item.sku.price * item.productNum + item.postFee || 0) /100}}</text>
</view>
<!-- 补贴 -->
<view class="box-title allowance" wx:if="{{allowance_price}}">

29
pages/order/postOrder/index.wxss

@ -223,3 +223,32 @@ page {
text-align: center;
margin-bottom: 20rpx;
}
.batch-view{
display: flex;
}
.batch-view .flex{
display: flex;
align-items: center;
}
.batch-view .no-select{
width: 30rpx;
height: 30rpx;
background: #FFFFFF;
border-radius: 50%;
border: 1px solid #999999;
margin-right: 10rpx;
}
.batch-view .select-img{
width: 30rpx;
height: 30rpx;
margin-right: 10rpx;
}
.batch-view .batch-info-tip{
position: absolute;
right: 0;
bottom: 6rpx;
font-weight: 500;
font-size: 23rpx;
color: #D62828;
}

58
pages/user/order/postOrderInfo/index.js

@ -188,6 +188,51 @@ Page({
url: '/pages/order/comment/index?id='+id,
})
},
goDetail(e){
console.log(e.currentTarget.dataset);
let item = e.currentTarget.dataset.set
if (item.is_package == 1) {
wx.navigateTo({
url:"/pages/info/postProductInfo/index?id="+item.product_id
})
return
} else if (item.is_package==2) {
wx.navigateTo({
url: '/subPackages/goods/oneCardTour/info/index?id='+item.scene_id
});
return
}
if (item.product_model=='ticket') {
wx.navigateTo({
url:"/pages/info/sceneProductInfo/index?id="+item.scene_id
})
}else if (item.product_model=='post') {
wx.navigateTo({
url:"/pages/info/postProductInfo/index?id="+item.product_id
})
}
},
expandPost:function (e) {
let index = e.currentTarget.dataset.index
let productList = this.data.info.order_product_list
let item = productList[index]
item.showMore = !item.showMore
this.setData({
info: this.data.info
})
},
expandMsg: function(e) {
let index = e.currentTarget.dataset.index
let productList = this.data.info.order_product_list
let item = productList[index]
item.showMsg = !item.showMsg
this.setData({
info: this.data.info
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
@ -314,6 +359,19 @@ getInfo () {
state = state + order.state;
order.contacts_info = order.contacts_info?JSON.parse(order.contacts_info):[]
})
// 2025-7-21能否确认收货
res.data.is_all_confirm = true;
if (res.data.state=='PAID' && res.data.stateNums.WAIT_DELIVERY==res.data.order_product_list.length) {
res.data.order_product_list.forEach(v=>{
if (v.shipped_batch_count < v.batch_count ) {
res.data.is_all_confirm = false
}
})
} else {
res.data.is_all_confirm = true;
}
this.setData({
isRefund:state.indexOf("REFUND")!=-1,
info:res.data,

227
pages/user/order/postOrderInfo/index.wxml

@ -12,81 +12,176 @@
<view class="box-title" style="margin-top:15rpx"><text style="margin-right:20rpx">{{info.order_product_list[0].consignee_info.name}}</text><text>{{info.order_product_list[0].consignee_info.tel}}</text></view>
<view style="font-size:26rpx;color:#333;line-height:50rpx"><text style="color:#0B898E;margin-right:10rpx" class="iconfont icon-location"></text>{{info.order_product_list[0].consignee_info.address}}</view>
</view>
<sptj ids="{{ ids }}"></sptj>
<view class="box" wx:if="{{info}}" style="padding-bottom:0">
<view wx:if="{{info.order_product_list && info.order_product_list.length>0}}" class="product-info" wx:for="{{info.order_product_list}}">
<view class="product-info-top">
<image src="{{item.sku_headimg}}" mode="aspectFill"></image>
<view class="title-box textOver2">
<view class="title textOver2">{{item.product_title}}</view>
<view class="subtitle textOver2">{{item.sku_name}}</view>
</view>
<view class="price-box-tip">
<view style="margin-bottom:10rpx">¥ {{item.product_price/100}}</view>
<view>x{{item.product_num}}</view>
</view>
<view class="box" wx:if="{{info && info.order_product_list && info.order_product_list.length>0}}"
wx:for="{{info.order_product_list}}">
<view>
<view class="product-info" bindtap="goDetail" data-set='{{item}}'>
<view class="product-info-top">
<image src="{{item.sku_headimg}}" mode="aspectFill"></image>
<view class="title-box textOver2">
<view class="title textOver2">{{item.product_title}}</view>
<view class="subtitle textOver2">{{item.sku_name}}</view>
</view>
<view class="price-box-tip">
<view style="margin-bottom:10rpx">¥ {{item.product_price/100}}</view>
<view>x{{item.product_num}}</view>
</view>
</view>
<view class="product-state">{{item.state_text}}</view>
</view>
<view class="detail-item">
<text>收货方式:</text>
<text wx:if="{{item.is_batch_shipment==1}}">分批收货 (共{{item.batch_count}}次)</text>
<text wx:else>一次性收货</text>
</view>
<view class="detail-item">
<text>运费:</text>
<view>
<text style="padding-right: 56rpx;" wx:if="{{item.post_fee&&item.is_batch_shipment==1}}">¥{{item.post_fee/item.batch_count/100}} x{{info.order_product_list[0].batch_count}}</text>
<text>{{item.post_fee?("¥"+item.post_fee/100):"包邮"}}</text>
</view>
</view>
<view class="detail-item">
<text>小计:</text>
<text>¥{{item.paid_money/100}}</text>
</view>
<!-- <view wx:if="{{item.post_detail_list.length>0}}"> -->
<view style="border-top: 1px solid #ccc;margin-top: 12rpx;padding-top: 12rpx;"
wx:if="{{item.is_batch_shipment==1 || (item.is_batch_shipment==0&&item.post_detail_list.length>=1)}}">
<view class="box-title" style="position: relative;">
物流信息
<text bind:tap="expandPost" data-index="{{index}}" class="expand-tip" wx:if="{{item.is_batch_shipment==1}}">
{{item.showMore?"收起":"展开"}}
</text>
</view>
<!-- 多批次发货 -->
<view wx:if="{{item.is_batch_shipment==1}}">
<view class="detail-item post-line-info">
<text>当前已发:{{item.shipped_batch_count}}</text>
</view>
<view class="detail-item post-line-info">
<text>当前待发:{{item.batch_count - item.shipped_batch_count}}</text>
</view>
<view class="detail-item post-line-info">
<text>物流备注:{{item.batch_remark}}</text>
</view>
<view class="post-child" style="padding-top: 12rpx;" wx:if="{{item.showMore}}">
<view class="post-child-item" wx:for="{{item.post_detail_list}}" wx:for-item="shipment" wx:for-index="shipIndex">
<view class="detail-item">快递{{shipIndex+1}}</view>
<view class="detail-item post-line-info">
<text>快递公司:{{shipment.express_name}}</text>
</view>
<view class="detail-item post-line-info">
<text>快递单号:</text>
<view style="flex:1;width: 1rpx;">
{{shipment.courier_number}} <text data-num="{{shipment.courier_number}}" bindtap="copy" style="flex:1;color:#0B898E;margin-left:20rpx">复制</text>
</view>
</view>
<view class="detail-item post-line-info">
<text>发货时间:{{shipment.post_time}}</text>
</view>
</view>
</view>
<!-- <view class="post-child-btn" bind:tap="expandPost" data-index="{{index}}">{{item.showMore?"收起":"展开"}}</view> -->
</view>
<!-- 一次性发货 -->
<view wx:elif="{{item.post_detail_list.length>=1}}">
<view class="detail-item post-line-info">
<text>快递公司:{{item.post_detail_list[0].express_name}}</text>
</view>
<view class="detail-item post-line-info">
<text>快递单号:</text>
<view style="flex:1;width: 1rpx;">
{{item.post_detail_list[0].courier_number}} <text data-num="{{item.post_detail_list[0].courier_number}}" bindtap="copy" style="flex:1;color:#0B898E;margin-left:20rpx">复制</text>
</view>
</view>
<view class="detail-item post-line-info">
<text>发货时间:{{item.post_detail_list[0].post_time}} </text>
</view>
</view>
</view>
<view style="border-top: 1px solid #ccc;margin-top: 12rpx;padding-top: 12rpx;">
<view class="box-title" style="position: relative;">
使用说明
<text bind:tap="expandMsg" data-index="{{index}}" class="expand-tip">
{{item.showMsg?"收起":"展开"}}
</text>
</view>
<rich-text class="detail-item {{item.showMsg?'':'textOver2'}}" style="display:-webkit-box;padding-bottom: 0;height: auto;" nodes="{{tool.formateRichText(item.sku_model.bookinfo)}}"></rich-text>
</view>
</view>
<view class="product-price">邮费:{{item.post_fee==0?'包邮':('¥'+item.post_fee/100)}} 实付:¥{{item.paid_money/100}}</view>
<view class="product-state">{{item.state_text}}</view>
</view>
<view class="detail-item">
<text>商品总价</text>
<text>¥{{info.total_money/100}}</text>
</view>
<view class="detail-item">
<text>运费</text>
<text>{{info.total_post_fee?("¥"+info.total_post_fee/100):"包邮"}}</text>
</view>
<view class="detail-item" wx:if="{{info.preference_money}}">
<text>优惠券抵扣</text>
<text>-¥{{info.preference_money/100}}</text>
</view>
<view class="detail-item all-total-item" style="border-bottom:none">
<text>需付款</text>
<view class="price">{{info.paid_money/100}}</view>
</view>
<view class="btns" style="border-top:1rpx solid #ccc" wx:if="{{info.state!='CLOSED'}}">
<view class="scene-rest-time" wx:if="{{info.state=='UNPAID'}}">剩余时间:00:{{minute}}:{{second}}</view>
<navigator wx:if="{{info.state!='UNPAID'}}" url="/pages/info/postProductInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator>
<navigator url="../refundInfo/index?id={{info.order_id}}" class="btn" wx:if="{{isRefund}}">退款详情</navigator>
<view class="btn" wx:elif="{{info.stateNums.WAIT_DELIVERY==info.order_product_list.length}}" bind:tap="toConfirmPost">确认收货</view>
<view class="btn" wx:if="{{info.state=='PAID'}}" bindtap="refund">申请退款</view>
<view class="btn" wx:if="{{info.state=='UNPAID'}}" bindtap="close">取消订单</view>
<navigator url="/pages/order/comment/index?id={{info.order_id}}&proId={{info.order_product_list[0].product_id}}" class="btn active1" wx:if="{{info.state=='WAIT_COMMENT'}}">去评价</navigator>
<navigator url="/pages/order/pay/index?id={{id}}" class="btn active" wx:if="{{info.state=='UNPAID'}}">立即支付</navigator>
<navigator url="../expressInfo/index?id={{info.order_id}}" class="btn" wx:if="{{info.post_detail_list.length>0}}">查询快递</navigator>
</view>
</view>
<view class="box" wx:if="{{info}}">
<view class="box-title">订单信息</view>
<view class="detail-item">
<text>订单编号:{{info.order_id}}</text>
</view>
<view class="detail-item">
<text>下单时间:{{info.create_time}}</text>
</view>
<view class="detail-item" wx:if="{{info.pay_at}}">
<text>支付时间:{{info.pay_at}}</text>
</view>
<view class="detail-item" wx:if="{{info.pay_method}}">
<text>支付方式:{{pay_methods[info.pay_method]}}</text>
</view>
<view wx:if="{{info.post_detail_list.length>0}}" class="detail-item" style="height:auto;align-items:flex-start;line-height:45rpx;">
<text>快递公司:</text>
<view style="flex:1">
<view wx:for="{{info.post_detail_list}}">{{item.express_name}}</view>
<view class="box-title">订单信息</view>
<view class="detail-item">
<text>商品总价:</text>
<text>¥{{info.total_money/100}}</text>
</view>
</view>
<view wx:if="{{info.post_detail_list.length>0}}" class="detail-item" style="height:auto;align-items:flex-start;line-height:45rpx;">
<text>快递单号:</text>
<view style="flex:1">
<view wx:for="{{info.post_detail_list}}">{{item.courier_number}}<text data-num="{{item.courier_number}}" bindtap="copy" style="flex:1;color:#0B898E;margin-left:20rpx">复制</text></view>
<view class="detail-item">
<text>运费:</text>
<view>
<text style="padding-right: 56rpx;" wx:if="{{info.total_post_fee&&info.order_product_list[0].is_batch_shipment==1}}">
¥{{info.total_post_fee/info.order_product_list[0].batch_count/100}} x{{info.order_product_list[0].batch_count}}
</text>
<text>{{info.total_post_fee?("¥"+info.total_post_fee/100):"包邮"}}</text>
</view>
</view>
<view class="detail-item" wx:if="{{info.preference_money}}" >
<text>优惠券:</text>
<text>-¥{{info.preference_money/100}}</text>
</view>
<view class="detail-item">
<text>实付款</text>
<view class="price">¥{{info.paid_money/100}}</view>
</view>
<view style="border-top:1rpx solid #ccc;margin: 12rpx 0;"></view>
<view class="detail-item">
<text>订单编号:</text>
<view>{{info.order_id}} <text data-num="{{info.order_id}}" bindtap="copy" style="flex:1;color:#0B898E;margin-left:20rpx">复制</text></view>
</view>
<view class="detail-item">
<text>下单时间:</text>
<text>{{info.create_time}}</text>
</view>
<view class="detail-item" wx:if="{{info.pay_at}}">
<text>支付时间:</text>
<text>{{info.pay_at}}</text>
</view>
<view class="detail-item" wx:if="{{info.pay_method}}">
<text>支付方式:</text>
<text>{{pay_methods[info.pay_method]}}</text>
</view>
<view class="btns" style="border-top:1rpx solid #ccc;margin-top: 12rpx;" wx:if="{{info.state!='CLOSED'}}">
<!-- <view class="scene-rest-time" wx:if="{{info.state=='UNPAID'}}">剩余时间:00:{{minute}}:{{second}}</view> -->
<!-- <navigator wx:if="{{info.state!='UNPAID'}}" url="/pages/info/postProductInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator> -->
<navigator url="../refundInfo/index?id={{info.order_id}}" class="btn" wx:if="{{isRefund}}">退款详情</navigator>
<view class="btn" wx:if="{{info.is_all_confirm}}" bind:tap="toConfirmPost">确认收货</view>
<view class="btn" wx:if="{{info.state=='PAID'}}" bindtap="refund">申请退款</view>
<view class="btn" wx:if="{{info.state=='UNPAID'}}" bindtap="close">取消订单</view>
<navigator url="/pages/order/comment/index?id={{info.order_id}}&proId={{info.order_product_list[0].product_id}}" class="btn active1" wx:if="{{info.state=='WAIT_COMMENT'}}">去评价</navigator>
<navigator url="/pages/order/pay/index?id={{id}}" class="btn active" wx:if="{{info.state=='UNPAID'}}">立即支付</navigator>
<!-- <navigator url="../expressInfo/index?id={{info.order_id}}" class="btn" wx:if="{{info.post_detail_list.length>0}}">查询快递</navigator> -->
</view>
</view>
</view>
<sptj ids="{{ ids }}"></sptj>
<navigator url="/pages/user/service/index" class="bottom-btn">
<image src="https://static.ticket.sz-trip.com/xcxImages/index/service.png" mode="widthFix"></image>联系客服
</navigator>
<view style="height: 40rpx;"></view>
<view class="mask" wx:if="{{feeInfoFlag}}">
<view class="mask-bg" bindtap="showFeeInfo"></view>
<view class="mask-content">

40
pages/user/order/postOrderInfo/index.wxss

@ -38,7 +38,6 @@ page {
color: #666;
}
.product-state {
margin-top: 10rpx;
color: #0B898E;
}
.product-info image {
@ -67,8 +66,8 @@ page {
display: flex;
justify-content: space-between;
align-items: center;
height: 45rpx;
color: #333;
height: 50rpx;
color: #666;
font-size: 26rpx;
}
.all-total-item {
@ -345,3 +344,38 @@ color: #333333;
color: #999999;
font-size: 10px;
}
.post-line-info{
height: auto;
min-height: 48rpx;
}
.post-child-item{
background: #F5F5F5;
border-radius: 20rpx;
padding:10rpx 20rpx;
width: 100%;
box-sizing: border-box;
margin-bottom: 20rpx;
}
.post-child-item .detail-item{
color: #333;
}
.post-child-btn{
font-weight: 500;
font-size: 27rpx;
color: #0B898E;
background: #FFFFFF;
border-radius: 50rpx;
border: 1px solid #0B898E;
padding:4rpx 40rpx;
width: fit-content;
margin: 0 auto;
box-sizing: border-box;
margin-top: 20rpx;
}
.expand-tip{
position: absolute;
color: #0B898E;
right: 0;
bottom: 0;
}

25
pages/user/order/sceneOrderInfo/index.js

@ -49,9 +49,10 @@ Page({
})
})
},
copy:function(){
copy:function(e){
let code = e.currentTarget.dataset.num;
wx.setClipboardData({
data: this.data.codeImgs[this.data.codeIndex].code,
data: code,
success: function (res) {
wx.showToast({
title: '复制成功',
@ -351,6 +352,26 @@ Page({
})
},
expandPost:function (e) {
let index = e.currentTarget.dataset.index
let productList = this.data.info.order_product_list
let item = productList[index]
item.showMore = !item.showMore
this.setData({
info: this.data.info
})
},
expandMsg: function(e) {
let index = e.currentTarget.dataset.index
let productList = this.data.info.order_product_list
let item = productList[index]
item.showMsg = !item.showMsg
this.setData({
info: this.data.info
})
},
/**
* 生命周期函数--监听页面隐藏
*/

329
pages/user/order/sceneOrderInfo/index.wxml

@ -34,10 +34,10 @@
<advBox ids="{{ ids }}"></advBox>
</view>
<sptj ids="{{ ids }}"></sptj>
<!-- 景点订单详情需要这个 -->
<view class="box" wx:if='{{product_model=="ticket"}}'>
<!-- <view class="box" wx:if='{{product_model=="ticket"}}'>
<view class="scene-box">
<view class="scene-box-left">
<view wx:if="{{info.state=='UNPAID'}}">库存有限,请尽快完成付款</view>
@ -52,106 +52,267 @@
<view bindtap="showFeeInfo">费用明细</view>
</view>
</view>
<view class="scene-btns" wx:if="{{info.state!='CLOSED'}}">
<view class="scene-rest-time" wx:if="{{info.state=='UNPAID'}}">剩余时间:00:{{minute}}:{{second}}</view>
<view wx:if="{{info.state!='UNPAID'}}">
<navigator wx:if="{{info.order_product_list[0].is_package==1}}" url="/pages/info/postProductInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator>
<navigator wx:elif="{{info.order_product_list[0].is_package==2}}" url="/subPackages/goods/oneCardTour/info/index?id={{info.order_product_list[0].scene_id}}" class="btn">再次购买</navigator>
</view> -->
<!--景点订单详情需要这个 -->
<view class="box" wx:for="{{info.order_product_list}}" wx:for-index='index'>
<view wx:if="{{item.product_model!='post'}}">
<navigator wx:else url="/pages/info/sceneProductInfo/index?id={{info.order_product_list[0].scene_id}}" class="btn">再次购买</navigator>
</view>
<view class="box-title" bindtap="goDetail" data-set='{{item}}'>
<view style="display:flex;flex: 1;width: 1rpx;padding-right: 20rpx;align-items: center;">
<view class="title-content textOver" style="padding-right: 14rpx;">{{item.product_title}}</view>
<view class="iconfont icon-you" style="flex-shrink: 0;font-size: 13px;font-weight: normal;"></view>
</view>
<view class="child-status" style="flex-shrink: 0;">{{ item.state_text }}</view>
</view>
<view class="detail-item" wx:if="{{!item.order_advance.id}}">
<view style="display:flex;width: 100%;">
<text>出行日期:</text>
<view>
{{item.use_date}}<text style="padding-left: 20rpx;" wx:if="{{item.start_time && item.end_time}}">{{ item.start_time }}-{{ item.end_time }}</text>
</view>
</view>
</view>
<view class="detail-item" wx:else>
<view>使用日期:</view>
<view>{{ item.order_advance.start_time }}-{{ item.order_advance.end_time }}</view>
</view>
<view class="goods-line"></view>
<view class="detail-item">
<text>{{item.sku_name}}</text>
<view style="display: flex;">
<view style="padding-right: 40rpx;">¥ {{item.product_price/100}}</view>
<view >x{{item.product_num}}</view>
</view>
</view>
<view class="detail-item">
<text>小计:</text>
<text style="color: #DC2525;">¥{{item.paid_money/100}}</text>
</view>
<view class="goods-line"></view>
<!-- <view bindtap="leadRoad" data-url="{{info.order_product_list[0].btnUrl}}" class="btn" wx:if="{{info.state!='UNPAID' && !isRefund}}">行程规划</view> -->
<navigator url="../refundInfo/index?id={{info.order_id}}" class="scene-btn" wx:if="{{isRefund}}">退款详情</navigator>
<view class="scene-btn" wx:if="{{info.state=='PAID'}}" bindtap="refund">取消预订</view>
<view class="scene-btn" wx:if="{{info.state=='UNPAID'}}" bindtap="close">取消预订</view>
<navigator url="/pages/order/comment/index?id={{info.order_id}}&proId={{info.order_product_list[0].product_id}}" class="scene-btn active1" wx:if="{{info.state=='WAIT_COMMENT'}}">去评价</navigator>
<navigator url="/pages/order/pay/index?id={{id}}" class="btn active" wx:if="{{info.state=='UNPAID'}}">立即支付</navigator>
</view>
</view>
<!--景点订单详情需要这个 -->
<view url="/pages/info/sceneProductInfo/index?id={{item.scene_id}}" class="box" wx:if='{{product_model=="ticket"}}' wx:for="{{info.order_product_list}}" wx:for-index='index'>
<view class="scene-box" style="align-items:center">
<view class="scene-box-left" style="width:630rpx">
<view class="box-title" bindtap="goDetail" data-set='{{item}}'>
<view class="title-content">{{item.product_title}}</view>
<view class="iconfont icon-you"></view>
</view>
<view class="detail-item">
<text>{{item.sku_name}}</text>
<text>x{{item.product_num}}</text>
</view>
<view class="childStatus" style="text-align: left;font-size: 30rpx; font-weight:bold;padding-bottom: 30rpx;color: #0b898e">
{{ item.state_text }}
</view>
<view class="row" wx:if="{{item.product_model == 'ticket' && !item.order_advance.id}}">
<view>出行日期:</view>
<view>{{item.use_date}}<text style="padding-left: 20rpx;" wx:if="{{item.start_time && item.end_time}}">{{ item.start_time }}-{{ item.end_time }}</text> </view>
</view>
<view>
<view class="box-title" style="position: relative;">
出行人
<text wx:if="{{item.contacts_info.length>1}}" bind:tap="expandPost" data-index="{{index}}" class="expand-tip">
{{item.showMore?"收起":"展开"}}
</text>
</view>
<view class="post-child" style="padding-top: 12rpx;">
<view wx:if="{{item.sku_model.is_authentication == 0}}">
<view class="detail-item">
<text>手机号: {{item.phone}}</text>
</view>
</view>
<view wx:else style="overflow: hidden; max-height:{{item.showMore?'100vh':'180rpx'}};">
<view class="post-child-item" wx:for="{{item.contacts_info}}">
<view class="detail-item">
<text>姓名: {{item.name}}</text>
</view>
<view class="detail-item">
<text>手机号:{{item.tel}}</text>
</view>
<view class="detail-item">
<text>{{item.title}}:{{item.id_number}}</text>
</view>
</view>
</view>
</view>
</view>
<view class="row" wx:if="{{item.product_model == 'ticket' && item.order_advance.id}}">
<view>使用日期:</view>
<view>{{ item.order_advance.start_time }}-{{ item.order_advance.end_time }}</view>
</view>
<view wx:if="{{item.product_model == 'ticket'}}">
<view class="box-title tflex">
<view>出行人信息</view>
<view bindtap="showMsg" data-msg="cxr1" style="color: rgb(49, 154, 158);">{{cxr1Text}}</view>
<view class="goods-line"></view>
<view>
<view class="box-title" style="position: relative;">
使用说明
<text bind:tap="expandMsg" data-index="{{index}}" class="expand-tip">
{{item.showMsg?"收起":"展开"}}
</text>
</view>
<rich-text class="detail-item {{item.showMsg?'':'textOver2'}}" style="display:-webkit-box;padding-bottom: 0;height: auto;" nodes="{{tool.formateRichText(item.sku_model.bookinfo)}}"></rich-text>
</view>
<view wx:if="{{item.sku_model.is_authentication == 0}}">
<view class="detail-item">
<text>手机号: {{item.phone}}</text>
</view>
<view wx:else>
<view class="product-info" bindtap="goDetail" data-set='{{item}}'>
<view class="product-info-top">
<image src="{{item.sku_headimg}}" mode="aspectFill"></image>
<view class="title-box textOver2">
<view class="title textOver2">{{item.product_title}}</view>
<view class="subtitle textOver2">{{item.sku_name}}</view>
</view>
<view class="price-box-tip">
<view style="margin-bottom:10rpx">¥ {{item.product_price/100}}</view>
<view>x{{item.product_num}}</view>
</view>
</view>
<view class="product-state">{{item.state_text}}</view>
</view>
<view class="detail-item">
<text>收货方式:</text>
<text wx:if="{{item.is_batch_shipment==1}}">分批收货 (共{{item.batch_count}}次)</text>
<text wx:else>一次性收货</text>
</view>
<view wx:else>
<view wx:if="{{cxr1}}" wx:for="{{item.contacts_info}}">
<view class="line" wx:if="{{index!=0}}"></view>
<view class="detail-item">
<text>姓名: {{item.name}}</text>
<!-- <text>¥168</text> -->
<view class="detail-item">
<text>运费:</text>
<view>
<text style="padding-right: 56rpx;" wx:if="{{item.post_fee&&item.is_batch_shipment==1}}">¥{{item.post_fee/item.batch_count/100}} x{{info.order_product_list[0].batch_count}}</text>
<text>{{item.post_fee?("¥"+item.post_fee/100):"包邮"}}</text>
</view>
<view class="detail-item">
<!-- <text>{{cardTypes[item.idcard_type]}}:{{item.id_number}}</text> -->
<text>{{item.title}}:{{item.id_number}}</text>
<!-- <text>-¥10</te、xt> -->
</view>
<view class="detail-item">
<text>小计:</text>
<text>¥{{item.paid_money/100}}</text>
</view>
<!-- <view wx:if="{{item.post_detail_list.length>0}}"> -->
<view style="border-top: 1px solid #ccc;margin-top: 12rpx;padding-top: 12rpx;">
<!-- <view class="box-title">物流信息</view> -->
<view class="box-title" style="position: relative;">
物流信息
<text bind:tap="expandPost" data-index="{{index}}" class="expand-tip" wx:if="{{item.is_batch_shipment==1}}">
{{item.showMore?"收起":"展开"}}
</text>
</view>
<view class="detail-item">
<text>手机号: {{item.tel}}</text>
<!-- <text>-¥10</text> -->
<!-- 多批次发货 -->
<view wx:if="{{item.is_batch_shipment==1}}">
<view class="detail-item post-line-info">
<text>当前已发:{{item.shipped_batch_count}}</text>
</view>
<view class="detail-item post-line-info">
<text>当前待发:{{item.batch_count - item.shipped_batch_count}}</text>
</view>
<view class="detail-item post-line-info">
<text>物流备注:{{item.batch_remark}}</text>
</view>
<view class="post-child" style="padding-top: 12rpx;" wx:if="{{item.showMore}}">
<view class="post-child-item" wx:for="{{item.post_detail_list}}" wx:for-item="shipment" wx:for-index="shipIndex">
<view class="detail-item">快递{{shipIndex+1}}</view>
<view class="detail-item post-line-info">
<text>快递公司:{{shipment.express_name}}</text>
</view>
<view class="detail-item post-line-info">
<text>快递单号:</text>
<view style="flex:1;width: 1rpx;">
{{shipment.courier_number}} <text data-num="{{shipment.courier_number}}" bindtap="copy" style="flex:1;color:#0B898E;margin-left:20rpx">复制</text>
</view>
</view>
<view class="detail-item post-line-info">
<text>发货时间:{{shipment.post_time}}</text>
</view>
</view>
</view>
<!-- <view class="post-child-btn" bind:tap="expandPost" data-index="{{index}}">{{item.showMore?"收起":"展开"}}</view> -->
</view>
<!-- 一次性发货 -->
<view wx:elif="{{item.post_detail_list.length>=1}}">
<view class="detail-item post-line-info">
<text>快递公司:{{item.post_detail_list[0].express_name}}</text>
</view>
<view class="detail-item post-line-info">
<text>快递单号:</text>
<view style="flex:1;width: 1rpx;">
{{item.post_detail_list[0].courier_number}} <text data-num="{{item.post_detail_list[0].courier_number}}" bindtap="copy" style="flex:1;color:#0B898E;margin-left:20rpx">复制</text>
</view>
</view>
<view class="detail-item post-line-info">
<text>发货时间:{{item.post_detail_list[0].post_time}} </text>
</view>
</view>
</view>
<view class="goods-line"></view>
<view>
<view class="box-title" style="position: relative;">
使用说明
<text bind:tap="expandMsg" data-index="{{index}}" class="expand-tip">
{{item.showMsg?"收起":"展开"}}
</text>
</view>
<rich-text class="detail-item {{item.showMsg?'':'textOver2'}}" style="display:-webkit-box;padding-bottom: 0;height: auto;" nodes="{{tool.formateRichText(item.sku_model.bookinfo)}}"></rich-text>
</view>
</view>
<view wx:if="{{item.product_model=='ticket'}}">
<view class="box-title tflex">
<view>使用说明</view>
<view bindtap="showMsg" data-msg="sysm1" style="color: rgb(49, 154, 158);">{{sysmText}}</view>
</view>
</view>
<view class="box" wx:if="{{info}}">
<view class="box-title">订单信息</view>
<view class="detail-item">
<text>商品总价:</text>
<text>¥{{info.total_money/100}}</text>
</view>
<view class="detail-item">
<text>运费:</text>
<view>
<text style="padding-right: 56rpx;" wx:if="{{info.total_post_fee&&info.order_product_list[0].is_batch_shipment==1}}">
¥{{info.total_post_fee/info.order_product_list[0].batch_count/100}} x{{info.order_product_list[0].batch_count}}
</text>
<text>{{info.total_post_fee?("¥"+info.total_post_fee/100):"包邮"}}</text>
</view>
<rich-text class="detail-item {{sysm?'':'textOver2'}}" style="display:-webkit-box;padding-bottom: 0;" nodes="{{tool.formateRichText(item.sku_model.bookinfo)}}"></rich-text>
</view>
<view wx:if="{{item.product_model=='post'}}">
<view class="box-title tflex">
<view>使用说明</view>
<view bindtap="showMsg" data-msg="sysm2" style="color: rgb(49, 154, 158);">{{sysm2Text}}</view>
</view>
<view class="detail-item" wx:if="{{info.preference_money}}" >
<text>优惠券:</text>
<text>-¥{{info.preference_money/100}}</text>
</view>
<view class="detail-item">
<text>实付款</text>
<view class="price">¥{{info.paid_money/100}}</view>
</view>
<view style="border-top:1rpx solid #ccc;margin: 12rpx 0;"></view>
<view class="detail-item">
<text>订单编号:</text>
<view>{{info.order_id}} <text data-num="{{info.order_id}}" bindtap="copy" style="flex:1;color:#0B898E;margin-left:20rpx">复制</text></view>
</view>
<view class="detail-item">
<text>下单时间:</text>
<text>{{info.create_time}}</text>
</view>
<view class="detail-item" wx:if="{{info.pay_at}}">
<text>支付时间:</text>
<text>{{info.pay_at}}</text>
</view>
<view class="detail-item" wx:if="{{info.pay_method}}">
<text>支付方式:</text>
<text>{{pay_methods[info.pay_method]}}</text>
</view>
<view class="btns" style="border-top:1rpx solid #ccc;margin-top: 12rpx;" wx:if="{{info.state!='CLOSED'}}">
<view class="scene-btns" >
<view class="scene-rest-time" wx:if="{{info.state=='UNPAID'}}">剩余时间:00:{{minute}}:{{second}}</view>
<!-- <view wx:if="{{info.state!='UNPAID'}}">
<navigator wx:if="{{info.order_product_list[0].is_package==1}}" url="/pages/info/postProductInfo/index?id={{info.order_product_list[0].product_id}}" class="btn">再次购买</navigator>
<navigator wx:elif="{{info.order_product_list[0].is_package==2}}" url="/subPackages/goods/oneCardTour/info/index?id={{info.order_product_list[0].scene_id}}" class="btn">再次购买</navigator>
<navigator wx:else url="/pages/info/sceneProductInfo/index?id={{info.order_product_list[0].scene_id}}" class="btn">再次购买</navigator>
</view> -->
<!-- <view bindtap="leadRoad" data-url="{{info.order_product_list[0].btnUrl}}" class="btn" wx:if="{{info.state!='UNPAID' && !isRefund}}">行程规划</view> -->
<navigator url="../refundInfo/index?id={{info.order_id}}" class="scene-btn" wx:if="{{isRefund}}">退款详情</navigator>
<view class="scene-btn" wx:if="{{info.state=='PAID'}}" bindtap="refund">取消预订</view>
<view class="scene-btn" wx:if="{{info.state=='UNPAID'}}" bindtap="close">取消预订</view>
<navigator url="/pages/order/comment/index?id={{info.order_id}}&proId={{info.order_product_list[0].product_id}}" class="scene-btn active1" wx:if="{{info.state=='WAIT_COMMENT'}}">去评价</navigator>
<navigator url="/pages/order/pay/index?id={{id}}" class="btn active" wx:if="{{info.state=='UNPAID'}}">立即支付</navigator>
</view>
<rich-text class="detail-item {{sysm2?'':'textOver2'}}" style="display:-webkit-box;padding-bottom: 0;" nodes="{{tool.formateRichText(item.sku_model.bookinfo)}}"></rich-text>
</view>
<!-- <view bindtap="leadRoad" data-url="{{item.btnUrl}}" class="btn" wx:if="{{item.state!='UNPAID' && item.product_model=='ticket'}}">行程规划</view> -->
</view>
</view>
</view>
<!-- <view class="box" wx:if="{{product_model=='ticket'}}">
<view class="box-title">使用说明</view>
<rich-text class="detail-item" style="display:block" nodes="{{tool.formateRichText(info.order_product_list[0].sku_model.bookinfo)}}"></rich-text>
<view class="line"></view>
<view class="box-title">退款说明</view>
<view class="detail-item">
<text>退款条件:{{info.order_product_list[0].sku_model.refund_policy_text}}</text>
</view>
</view> -->
<sptj ids="{{ ids }}"></sptj>
<navigator wx:if="{{info && info.state!='CLOSED'}}" url="/pages/user/service/index" class="bottom-btn">
<image src="https://static.ticket.sz-trip.com/xcxImages/index/service.png" mode="widthFix"></image>联系客服
</navigator>
<view style="height: 40rpx;"></view>
<view class="mask" wx:if="{{feeInfoFlag}}">
<view class="mask-bg" bindtap="showFeeInfo"></view>
<view class="mask-content">

118
pages/user/order/sceneOrderInfo/index.wxss

@ -23,14 +23,23 @@ page {
margin: 20rpx 30rpx;
}
.product-info {
display: flex;
justify-content: space-between;
color: #333;
font-size: 24rpx;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #d8d8d8;
margin-bottom: 10rpx;
}
color: #333;
font-size: 24rpx;
padding-bottom: 20rpx;
border-bottom: 1rpx solid #d8d8d8;
margin-bottom: 20rpx;
}
.product-info-top {
display: flex;
justify-content: space-between;
}
.product-price,.product-state {
text-align: right;
color: #666;
}
.product-state {
color: #0B898E;
}
.product-info image {
width: 140rpx;
height: 140rpx;
@ -54,13 +63,12 @@ page {
text-align: right;
}
.detail-item {
display: flex;
justify-content: space-between;
align-items: center;
min-height: 45rpx;
color: #000;
font-size: 30rpx;
padding-bottom:30rpx ;
display: flex;
justify-content: space-between;
align-items: center;
height: 50rpx;
color: #666;
font-size: 26rpx;
}
.all-total-item {
font-weight: bold;
@ -106,37 +114,13 @@ page {
text-align: center;
justify-content: space-between;
}
.box-title.tflex{
display: flex;
align-items: center;
justify-content: space-between;
}
.title-content{
overflow-x: hidden;
overflow-y: inherit;
text-overflow: ellipsis;
white-space: nowrap;
}
.scene-box {
display: flex;
justify-content: space-between;
}
.scene-box-left {
width: 400rpx;
font-size: 26rpx;
color: #333;
}
.scene-box-right {
flex-shrink: 0;
font-size: 24rpx;
color: #999;
text-align: right;
}
.scene-box-right .price {
color: #D62828;
font-size: 36rpx;
font-weight: bold;
}
.scene-btns {
display: flex;
justify-content: flex-end;
@ -144,7 +128,7 @@ page {
font-size: 26rpx;
color: #333;
text-align: center;
margin-top: 50rpx;
margin-top: 20rpx;
}
.scene-btn {
width: 160rpx;
@ -304,12 +288,7 @@ page {
color: #999;
margin-top: 30rpx;
}
.row{
display: flex;
align-items: center;
justify-content:space-between;
padding-bottom: 30rpx;
}
.showmsg{
display: none;
}
@ -352,3 +331,48 @@ page {
font-size: 23rpx;
color: #0E8790;
}
.goods-line{
border-top: 1px solid #ccc;
margin: 12rpx 0;
}
.child-status{
font-weight: bold;
font-size: 31rpx;
color: #0B898E;
}
.post-line-info{
height: auto;
min-height: 48rpx;
}
.post-child-item{
background: #F5F5F5;
border-radius: 20rpx;
padding:10rpx 20rpx;
width: 100%;
box-sizing: border-box;
margin-bottom: 20rpx;
}
.post-child-item .detail-item{
color: #333;
}
.post-child-btn{
font-weight: 500;
font-size: 27rpx;
color: #0B898E;
background: #FFFFFF;
border-radius: 50rpx;
border: 1px solid #0B898E;
padding:4rpx 40rpx;
width: fit-content;
margin: 0 auto;
box-sizing: border-box;
margin-top: 20rpx;
}
.expand-tip{
position: absolute;
color: #0B898E;
right: 0;
bottom: 0;
}
Loading…
Cancel
Save