订单发货相关调整
This commit is contained in:
@@ -2,46 +2,39 @@
|
||||
<view class="">
|
||||
<!-- 公共组件-每个页面必须引入 -->
|
||||
<public-module></public-module>
|
||||
<z-nav-bar :title="titleStat"></z-nav-bar>
|
||||
<!-- <view class="deliverCntent" v-if="orderType == 2">
|
||||
<view v-if="deliverDetails">
|
||||
<view v-for="(item, index) in deliverDetails[0].Traces">
|
||||
<view class="flexbox" v-if="index == 0">
|
||||
<view class="img_icon "><img width="20px" src="../../static/icon/icon-truck.svg" alt=""></view>
|
||||
<view class="wuliu">
|
||||
<view class="content">{{item.AcceptStation}}</view>
|
||||
<view class="time">{{item.AcceptTime}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
<view class="adDefault" v-if="orderContet.products!=''">
|
||||
<z-nav-bar title="订单详情"></z-nav-bar>
|
||||
<view class="adDefault" v-if="consigneeShow">
|
||||
<view class="defalTop">
|
||||
<text class="userName">
|
||||
{{orderContet.shippingUser}}
|
||||
{{orderContet.consignee.consigneeName}}
|
||||
</text>
|
||||
<text class="userTel">
|
||||
{{orderContet.userPhone}}
|
||||
{{orderContet.consignee.consigneeMobile}}
|
||||
</text>
|
||||
</view>
|
||||
<view class="defalBottom">
|
||||
<text class="userAddress">
|
||||
{{orderContet.province}} {{orderContet.city}} {{orderContet.district}} {{orderContet.address}}
|
||||
{{orderContet.consignee.province}} {{orderContet.consignee.city}} {{orderContet.consignee.county}} {{orderContet.consignee.address}}
|
||||
</text>
|
||||
</view>
|
||||
<u-icon name="map" color="#aaa" size="25" class="defalLeft"></u-icon>
|
||||
</view>
|
||||
|
||||
<view class="orderList">
|
||||
<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;">
|
||||
订单已被拆分成 {{sheetList.length}} 个包裹
|
||||
</view>
|
||||
<view class="orderItem">
|
||||
<!-- <view class="guoqi flexbox" v-if="orderContet.orderStatus==0 && orderContet.overTime > 0">
|
||||
<text>剩余支付时间:</text>
|
||||
<uni-countdown background-color="#ff5500" color="#ffffff" :font-size="14" :show-day="false" :hour="0" :minute="0" :second="orderContet.overTime" @timeup="countDown"></uni-countdown>
|
||||
</view> -->
|
||||
<view class="orderContent" v-for="(item,index) in orderContet.products" :key="index"
|
||||
@click="goDetail(item.productId)" v-if="orderContet.products!=''">
|
||||
<image :src="item.image" mode=""></image>
|
||||
<view class="" style="position: relative; height: 120rpx;">
|
||||
<text class="orderState orderState0" v-if="orderContet.orderStatus==0">待支付</text>
|
||||
<text class="orderState orderState1" v-if="orderContet.orderStatus==1">待发货</text>
|
||||
<text class="orderState orderState2" v-if="orderContet.orderStatus==2">待收货</text>
|
||||
<text class="orderState orderState3" v-if="orderContet.orderStatus==3">已完成</text>
|
||||
<text class="orderState orderState5" v-if="orderContet.orderStatus==5">已超时</text>
|
||||
</view>
|
||||
<view class="orderContent" v-for="(item,index) in orderContet.goodsList" :key="index"
|
||||
@click="goDetail(item.productId)" v-if="orderContet.goodsList.length > 0">
|
||||
<image :src="item.productImage" mode=""></image>
|
||||
<view class="itemJian">
|
||||
<view class="orderTitle">
|
||||
<text>{{item.productName}}</text>
|
||||
@@ -53,6 +46,7 @@
|
||||
</view>
|
||||
<br clear="both">
|
||||
</view>
|
||||
|
||||
<!-- <view class="orderOper" v-if="orderContet.orderStatus=='3'"> -->
|
||||
<view class="orderOper" v-if="item.orderStatus == 3">
|
||||
<view style="width: 100%; text-align: right;">
|
||||
@@ -78,19 +72,20 @@
|
||||
</view>
|
||||
<view class="orderallpri">
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">商品总价 : </span>
|
||||
<span>¥</span>{{orderContet.orderMoney}}
|
||||
<span>¥</span>{{orderContet.orderPrice}}
|
||||
</view>
|
||||
<view class="orderReal">
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">运费 : </span>
|
||||
<span>¥</span>{{orderContet.shippingMoney}}
|
||||
<span>¥</span>{{orderContet.shippingPrice}}
|
||||
</view>
|
||||
<view class="orderReal">
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">优惠券 : </span>
|
||||
<b style="color: #dd3c0c;"><span>-¥</span>{{orderContet.districtMoney}}</b>
|
||||
<b v-if="orderContet.coupon.couponAmount" style="color: #dd3c0c;"><span>-¥</span>{{orderContet.coupon.couponAmount}}</b>
|
||||
<b v-else style="color: #dd3c0c;"><span>-¥</span>0</b>
|
||||
</view>
|
||||
<view class="orderReal">
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">实付款 : </span>
|
||||
<b style="color: #dd3c0c;"><span>¥</span>{{orderContet.realMoney}}</b>
|
||||
<b style="color: #dd3c0c;"><span>¥</span>{{orderContet.realPrice}}</b>
|
||||
</view>
|
||||
<view class="orderYunf">
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">订单编号 : </span>
|
||||
@@ -100,19 +95,26 @@
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">创建时间 : </span>
|
||||
<text style="font-size: 24rpx;color: #666;">{{orderContet.createTime}}</text>
|
||||
</view>
|
||||
<view class="orderReal" v-if="orderContet.orderStatus >= 1 && orderContet.orderStatus != 5">
|
||||
<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">
|
||||
<span style="color: #666;margin-right: 10rpx;float: left;">发货时间 : </span>
|
||||
<text style="font-size: 24rpx;color: #666;">{{orderContet.shippingTime}}</text>
|
||||
</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" class="opFix" @click="onPageJump(orderID)">查看物流</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>
|
||||
<view v-if="orderContet.orderStatus==0" class="opCan" @click="goPay(orderContet)">去支付</view>
|
||||
|
||||
|
||||
|
||||
<view class="opCan" @click="kefu">联系客服</view>
|
||||
</view>
|
||||
|
||||
@@ -121,7 +123,7 @@
|
||||
</view>
|
||||
<!-- 对话框 -->
|
||||
<u-popup :show="pingjiaShow" :round="10" @close="closePingjia">
|
||||
<view class="tanchu">
|
||||
<view class="tanchu" >
|
||||
<view class="dp_title" v-if="pjType != 'zhuiping'">添加评价</view>
|
||||
<view class="dp_title" v-else>添加追评</view>
|
||||
|
||||
@@ -168,6 +170,19 @@
|
||||
</view>
|
||||
</view>
|
||||
</u-popup>
|
||||
<u-popup mode="bottom" :show="sheetListShow" :round="10" @close="sheetListShow=false">
|
||||
<view class="tanchu expresslist" style="height: 500rpx; overflow-y: scroll;">
|
||||
<view class="title">
|
||||
请选择要查看包裹
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item" v-for="(item,index) in sheetList" @click="seeExpressDetails(item)">
|
||||
包裹 {{index+1}}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u-popup>
|
||||
<music-play :playData="playData"></music-play>
|
||||
</view>
|
||||
</template>
|
||||
@@ -217,7 +232,7 @@
|
||||
logisticsData: [], // 快递信息列表
|
||||
titleStat: '',
|
||||
orderID: 0,
|
||||
orderSn:null,
|
||||
orderSn:'',
|
||||
orderType: '',
|
||||
orderContet: {},
|
||||
deliverDetails: [{
|
||||
@@ -227,7 +242,9 @@
|
||||
emoji:[],
|
||||
Files:[],
|
||||
pjType:'',
|
||||
|
||||
sheetList: [], // 面单数据
|
||||
consigneeShow: false,
|
||||
sheetListShow:false,
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
@@ -237,9 +254,11 @@
|
||||
this.orderSn = e.orderSn
|
||||
console.log(this.orderID,'this.orderID')
|
||||
},
|
||||
|
||||
onHide() {
|
||||
this.sheetList= []
|
||||
},
|
||||
onShow() {
|
||||
this.getOrderList()
|
||||
this.getOrderList()
|
||||
},
|
||||
components:{
|
||||
emotion,
|
||||
@@ -250,6 +269,12 @@
|
||||
},
|
||||
|
||||
methods: {
|
||||
seeExpressDetails(item){
|
||||
console.log(item,'item')
|
||||
uni.navigateTo({
|
||||
url: "./deliverDetail?orderSn=" + this.orderContet.orderSn + "&expressOrderSn=" + item.expressOrderSn + "&expressCompanyCode="+item.expressCompanyCode + "&expressCompanyName="+item.expressCompanyName
|
||||
})
|
||||
},
|
||||
// 倒计时回调
|
||||
countDown(){
|
||||
console.log('重新刷新订单')
|
||||
@@ -483,6 +508,18 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
// 查看物流
|
||||
seeExpressDetail(item){
|
||||
console.log(item, this.sheetList.length)
|
||||
if(this.sheetList.length > 1){
|
||||
this.sheetListShow = true
|
||||
}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
|
||||
})
|
||||
}
|
||||
},
|
||||
onPageJump(item) {
|
||||
uni.navigateTo({
|
||||
url: "./deliverDetail?objId=" + item
|
||||
@@ -529,17 +566,19 @@
|
||||
getOrderList() {
|
||||
console.log('this.orderType',this.orderType)
|
||||
this.$http
|
||||
.get(`book/buyOrder/getOrderInfo?orderId=${this.orderID}`)
|
||||
// .get(`book/buyOrder/getOrderInfo?orderId=${this.orderID}`)
|
||||
.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
|
||||
|
||||
this.orderContet = res.result
|
||||
this.userRecordid = res.userRecordid
|
||||
this.productIDs = res.result.products.map(item => {
|
||||
return item.productId
|
||||
this.orderContet = res.result
|
||||
this.consigneeShow = true
|
||||
//this.userRecordid = res.userRecordid
|
||||
this.productIDs = res.result.goodsList.map(item => {
|
||||
return item.buyOrderProductId
|
||||
})
|
||||
// console.log(this.orderContet,'this.orderContet')
|
||||
if (this.orderContet.orderStatus == 0) {
|
||||
@@ -552,29 +591,62 @@
|
||||
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')
|
||||
}
|
||||
}
|
||||
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 {
|
||||
// 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({
|
||||
@@ -695,6 +767,23 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.expresslist{font-size: 28rpx; color: #666;
|
||||
.title{text-align: center;}
|
||||
.item{padding: 30rpx; border-bottom: 1px solid #eee;}
|
||||
}
|
||||
.orderState { color: #fff;
|
||||
|
||||
position: absolute; left: 0; top: 20rpx;
|
||||
padding:10rpx; border-radius: 0 24rpx 24rpx 0;
|
||||
font-size: 26rpx;
|
||||
// font-weight: bold;
|
||||
color: #fff;
|
||||
}
|
||||
.orderState0{background-color: #e6a23c;}
|
||||
.orderState1{background-color: #409eff;}
|
||||
.orderState2{background-color: #f56c6c;}
|
||||
.orderState3{background-color: #67c23a;}
|
||||
.orderState5{background-color: #787878;}
|
||||
.guoqi{ font-size: 28rpx; align-items: center; color: red; float: right; line-height: 40rpx;}
|
||||
.star{display: inline-block; width: 20px; height: 20px; margin-right: 10rpx;}
|
||||
.starGray{ background : url(../../static/icon/star_greey.png) no-repeat; background-size: contain; }
|
||||
|
||||
Reference in New Issue
Block a user