发货+兼容苹果
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar title="订单详情"></z-nav-bar>
|
||||
<view class="adDefault" v-if="consigneeShow">
|
||||
<view class="adDefault" v-if="consigneeShow && orderContet.orderType == 'order'">
|
||||
<view class="defalTop">
|
||||
<text class="userName">
|
||||
{{orderContet.consignee.consigneeName}}
|
||||
@@ -21,7 +21,7 @@
|
||||
</view>
|
||||
|
||||
<view class="orderList" v-if="consigneeShow">
|
||||
<view class="" v-if="sheetList.length > 1" style="background-color: rgb(113, 213, 161); margin-bottom: 20rpx; border-radius: 20rpx; color: #fff; font-size: 28rpx; padding: 10rpx;">
|
||||
<view class="" v-if="sheetList.length > 1 && orderContet.orderStatus==2" style="background-color: rgb(113, 213, 161); margin-bottom: 20rpx; border-radius: 20rpx; color: #fff; font-size: 28rpx; padding: 10rpx;">
|
||||
订单已被拆分成 {{sheetList.length}} 个包裹
|
||||
</view>
|
||||
<view class="orderItem">
|
||||
@@ -74,7 +74,7 @@
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">商品总价 : </span>
|
||||
<span>¥</span>{{orderContet.orderPrice}}
|
||||
</view>
|
||||
<view class="orderReal">
|
||||
<view class="orderReal" v-if="orderContet.orderType == 'order'"">
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">运费 : </span>
|
||||
<span>¥</span>{{orderContet.shippingPrice}}
|
||||
</view>
|
||||
@@ -99,17 +99,17 @@
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">付款时间 : </span>
|
||||
<text style="font-size: 24rpx;color: #666;">{{orderContet.paymentDate}}</text>
|
||||
</view>
|
||||
<view class="orderReal" v-if="orderContet.orderStatus >= 2 && orderContet.orderStatus != 5">
|
||||
<!-- <view class="orderReal" v-if="orderContet.orderStatus >= 2 && orderContet.orderStatus != 5">
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">发货时间 : </span>
|
||||
<text style="font-size: 24rpx;color: #666;">{{orderContet.shippingTime}}</text>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="orderOper">
|
||||
<view style="width: 100%; text-align: right;">
|
||||
<!-- <u-button text="" type="success" plain ></u-button>
|
||||
<u-button text="" type="primary" plain >
|
||||
|
||||
</u-button> -->
|
||||
<view v-if="orderContet.orderStatus>=2 && sheetList.length > 0 && orderContet.orderStatus != 5" class="opFix" @click="seeExpressDetail(orderContet)">查看物流</view>
|
||||
<view v-if="orderContet.orderStatus==2 && sheetList.length > 0 && orderContet.orderStatus != 5" class="opFix" @click="seeExpressDetail(orderContet)">查看物流</view>
|
||||
<view v-if="orderContet.orderStatus==2" class="opCan" @click="OverOrder" >确认收货</view>
|
||||
|
||||
<view v-if="orderContet.orderStatus==0" class="opFix" @click="canceOrder">取消订单</view>
|
||||
@@ -175,9 +175,12 @@
|
||||
<view class="title">
|
||||
请选择要查看包裹
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="list">
|
||||
<view class="item" v-for="(item,index) in sheetList" @click="seeExpressDetails(item)">
|
||||
包裹 {{index+1}}
|
||||
<h4 style="margin-bottom: 10rpx;">包裹 {{index+1}}</h4>
|
||||
<view class="">运单号:{{item.expressOrderSn}}
|
||||
<u-tag @click="copyData(item.expressOrderSn)" size="mini" class="copyCode" text="复制单号" plain type="success" /></view>
|
||||
<view class="">发货时间:{{item.createTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -269,6 +272,15 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
// 复制到剪切板
|
||||
copyData(data){
|
||||
uni.setClipboardData({
|
||||
data,
|
||||
success: function () {
|
||||
console.log('success');
|
||||
}
|
||||
});
|
||||
},
|
||||
seeExpressDetails(item){
|
||||
console.log(item,'item')
|
||||
uni.navigateTo({
|
||||
@@ -516,7 +528,7 @@
|
||||
}else if(this.sheetList.length == 1){
|
||||
// 直接展示详情
|
||||
uni.navigateTo({
|
||||
url: "./deliverDetail?orderSn=" + item.orderSn + "&expressOrderSn=" + this.sheetList[0].expressOrderSn + "&expressCompanyCode="+this.sheetList[0].expressCompanyCode + "&expressCompanyName="+this.sheetList[0].expressCompanyName
|
||||
url: "./deliverDetail?orderSn=" + item.orderSn + "&expressOrderSn=" + this.sheetList[0].expressOrderSn
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -570,9 +582,9 @@
|
||||
.get(`/book/buyOrder/orderDetail?orderSn=${this.orderSn}`)
|
||||
.then(res => {
|
||||
console.log('订单详情',res)
|
||||
var seconds = res.result.timestamp + 30 * 60 + 2 // 过期时间
|
||||
var nowSeconds = Math.floor(new Date().getTime() / 1000);
|
||||
res.result.overTime = seconds - nowSeconds
|
||||
// var seconds = res.result.timestamp + 30 * 60 + 2 // 过期时间
|
||||
// var nowSeconds = Math.floor(new Date().getTime() / 1000);
|
||||
// res.result.overTime = seconds - nowSeconds
|
||||
|
||||
this.orderContet = res.result
|
||||
this.consigneeShow = true
|
||||
@@ -590,63 +602,15 @@
|
||||
} else if (this.orderContet.orderStatus == 3) {
|
||||
this.titleStat = '已完成'
|
||||
}
|
||||
|
||||
|
||||
if(parseInt(this.orderContet.orderStatus) >= 2){
|
||||
// 查询快递信息
|
||||
// this.getSheetInfo()
|
||||
if(this.orderContet.goodsList.length > 0){
|
||||
this.sheetList = []
|
||||
// console.log('存在商品数据', this.orderContet.goodsList.length)
|
||||
// var ids = []
|
||||
// ids.push(this.orderContet.goodsList[0].expressInfo.expressOrderSn)
|
||||
// this.sheetList.push(this.orderContet.goodsList[0].expressInfo)
|
||||
// for (let index = 1; index < this.orderContet.goodsList.length; index++) {
|
||||
// // if (!ids.includes(this.orderContet.goodsList[index].expressInfo.expressOrder)) {
|
||||
// ids.push(this.orderContet.goodsList[index].expressInfo.expressOrderSn)
|
||||
// this.sheetList.push(this.orderContet.goodsList[index].expressInfo)}
|
||||
// console.log(this.orderContet.goodsList[index].expressInfo.expressOrderSn,'expressOrderSn')
|
||||
// // }
|
||||
// console.log(ids,this.sheetList,'this.sheetList')
|
||||
}
|
||||
}
|
||||
if(this.orderContet.orderStatus >= 2 && this.orderContet.orderType == 'order'){
|
||||
this.sheetList = this.orderContet.expressOrders
|
||||
}else{
|
||||
this.sheetList = []
|
||||
}
|
||||
console.log(this.orderContet,'订单详情')
|
||||
})
|
||||
},
|
||||
// getSheetInfo(){
|
||||
// console.log('查询快递信息')
|
||||
// this.$http
|
||||
// .get(`express/getPrintTemplateList?expressOrderSn=${this.orderSn}`)
|
||||
// .then(res => {
|
||||
// if(res.code == 0){
|
||||
// this.sheetList = res.result.data
|
||||
// console.log(res,'面单信息')
|
||||
// }
|
||||
// }).catch(e => {
|
||||
// console.log('e',e)
|
||||
|
||||
// })
|
||||
// },
|
||||
// 获取物流
|
||||
// getdeliverDetails() {
|
||||
// this.$http
|
||||
// .post(`/book/buyOrder/queryFMS?orderId=${this.orderID}`)
|
||||
// .then(res => {
|
||||
// if (res && res.code === 0) {
|
||||
// console.log(res, '物流信息')
|
||||
// // if(res.msg.indexOf('暂未查到物流信息') == -1){
|
||||
// // this.
|
||||
// // }
|
||||
// res.rntStr.forEach(item => {
|
||||
// item.Traces = item.Traces.reverse()
|
||||
// })
|
||||
// this.deliverDetails = res.rntStr
|
||||
// this.deliverDetailsLength = this.deliverDetails[0].Traces.length
|
||||
// } else {
|
||||
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
},
|
||||
|
||||
// 取消订单
|
||||
canceOrder() {
|
||||
uni.showModal({
|
||||
@@ -1038,7 +1002,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.copyCode{display: inline-block; margin-left: 20rpx; }
|
||||
.deliverCntent {
|
||||
padding: 32rpx;
|
||||
position: relative;
|
||||
|
||||
Reference in New Issue
Block a user