Merge branch 'youmengting-dev' of http://gitea.dctpay.com/yangjie/high-mini into new-dev
@ -1,90 +0,0 @@ |
||||
{ |
||||
"data": { |
||||
"expressCode": "ZTO", |
||||
"expressCompanyName": "中通快递", |
||||
"number": "78672864399912", |
||||
"logisticsStatus": "DELIVERING", |
||||
"logisticsStatusDesc": "派件中", |
||||
"theLastMessage": "【重庆市】 快件已被【菜鸟】的【重庆九龙坡西城大院店】代收,请及时取件,如有疑问请联系(18598776063)。感谢使用中通快递,期待再次为您服务!", |
||||
"theLastTime": "2023-04-06 10:21:00", |
||||
"takeTime": "1天14小时43分", |
||||
"logisticsTraceDetails": [ |
||||
{ |
||||
"areaCode": "CN330700000000", |
||||
"areaName": "浙江省,金华市", |
||||
"subLogisticsStatus": "ACCEPT", |
||||
"time": 1680608263000, |
||||
"logisticsStatus": "ACCEPT", |
||||
"desc": "【金华市】 【义乌青口】(0579-85319001) 的 下骆宅仓(13335991154) 已揽收" |
||||
}, |
||||
{ |
||||
"areaCode": "CN330700000000", |
||||
"areaName": "浙江省,金华市", |
||||
"subLogisticsStatus": "TRANSPORT", |
||||
"time": 1680608415000, |
||||
"logisticsStatus": "TRANSPORT", |
||||
"desc": "【金华市】 快件离开 【义乌青口】 已发往 【重庆巴南转运中心】" |
||||
}, |
||||
{ |
||||
"areaCode": "CN330782000000", |
||||
"areaName": "浙江省,金华市,义乌市", |
||||
"subLogisticsStatus": "TRANSPORT", |
||||
"time": 1680616875000, |
||||
"logisticsStatus": "TRANSPORT", |
||||
"desc": "【金华市】 快件已经到达 【义乌中转部】" |
||||
}, |
||||
{ |
||||
"areaCode": "CN330782000000", |
||||
"areaName": "浙江省,金华市,义乌市", |
||||
"subLogisticsStatus": "TRANSPORT", |
||||
"time": 1680617054000, |
||||
"logisticsStatus": "TRANSPORT", |
||||
"desc": "【金华市】 快件离开 【义乌中转部】 已发往 【重庆巴南转运中心】" |
||||
}, |
||||
{ |
||||
"areaCode": "CN500113000000", |
||||
"areaName": "重庆,重庆市,巴南区", |
||||
"subLogisticsStatus": "TRANSPORT", |
||||
"time": 1680715359000, |
||||
"logisticsStatus": "TRANSPORT", |
||||
"desc": "【重庆市】 快件已经到达 【重庆巴南转运中心】" |
||||
}, |
||||
{ |
||||
"areaCode": "CN500113000000", |
||||
"areaName": "重庆,重庆市,巴南区", |
||||
"subLogisticsStatus": "TRANSPORT", |
||||
"time": 1680720424000, |
||||
"logisticsStatus": "TRANSPORT", |
||||
"desc": "【重庆市】 快件离开 【重庆巴南转运中心】 已发往 【九龙坡区】" |
||||
}, |
||||
{ |
||||
"areaCode": "CN500107000000", |
||||
"areaName": "重庆,重庆市,九龙坡区", |
||||
"subLogisticsStatus": "TRANSPORT", |
||||
"time": 1680730809000, |
||||
"logisticsStatus": "TRANSPORT", |
||||
"desc": "【重庆市】 快件已经到达 【九龙坡区】" |
||||
}, |
||||
{ |
||||
"areaCode": "CN500107000000", |
||||
"areaName": "重庆,重庆市,九龙坡区", |
||||
"subLogisticsStatus": "DELIVERING", |
||||
"time": 1680737638000, |
||||
"logisticsStatus": "DELIVERING", |
||||
"desc": "【重庆市】 【九龙坡区】 的王曾真(17783049582) 正在第1次派件, 请保持电话畅通,并耐心等待(95720为中通快递员外呼专属号码,请放心接听)" |
||||
}, |
||||
{ |
||||
"areaCode": "CN500107000000", |
||||
"areaName": "重庆,重庆市,九龙坡区", |
||||
"subLogisticsStatus": "STA_INBOUND", |
||||
"time": 1680747660000, |
||||
"logisticsStatus": "DELIVERING", |
||||
"desc": "【重庆市】 快件已被【菜鸟】的【重庆九龙坡西城大院店】代收,请及时取件,如有疑问请联系(18598776063)。感谢使用中通快递,期待再次为您服务!" |
||||
} |
||||
] |
||||
}, |
||||
"msg": "成功", |
||||
"success": true, |
||||
"code": 200, |
||||
"taskNo": "756902251154716910060287" |
||||
} |
@ -1,228 +0,0 @@ |
||||
<template> |
||||
<wybPopup ref="popup" type="bottom" width="500" scrollY="true" radius="0" :showCloseIcon="true"> |
||||
<view class="pd-main wuliupop backcor9"> |
||||
<view class="pop-title fontwig6"><text>详细信息</text></view> |
||||
<view class="pd-main backcolorfff border-8r font14"> |
||||
<view class="dis-flex flex-sp mart10 marb10 paddbotm10 border-b"> |
||||
<view class="dis-flex"> |
||||
<!-- <image class="wuliu-img" src="https://pic.616pic.com/ys_bnew_img/00/07/04/1ZtrvD1AMY.jpg" mode="aspectFill"></image> --> |
||||
<text class="paddleft5">{{tracesData.expressCompanyName}}</text> |
||||
<text class="paddleft5">{{tracesData.number}}</text> |
||||
</view> |
||||
<view class="dis-flex "> |
||||
<text @click="copyText(tracesData.number)">复制</text> |
||||
<text class="paddleft5 paddtright5 fcor666">|</text> |
||||
<text @click="callPhone">打电话</text> |
||||
</view> |
||||
</view> |
||||
|
||||
<block v-for="(item, index) in tracesData.logisticsTraceDetails" > |
||||
|
||||
|
||||
<trackNode :key="index" :is-first="index===tracesData.length-1" :is-newest="index===0" :is-main-node="item.logisticsStatus!='TRANSPORT'" :node-data="item"></trackNode> |
||||
</block> |
||||
</view> |
||||
|
||||
|
||||
</view> |
||||
</wybPopup> |
||||
</template> |
||||
|
||||
<script> |
||||
import wybPopup from '@/components/wyb-popup/wyb-popup.vue' |
||||
import trackNode from '@/components/trackNode/trackNode.vue' |
||||
|
||||
let dataList = require('./data.json') |
||||
export default { |
||||
data () { |
||||
return { |
||||
tracesData:null, |
||||
// [ |
||||
// { |
||||
// acceptStation: '包裹已被吴亦发同学签收', // 节点描述 |
||||
// createTime: '2019-10-24 15: 27: 16', |
||||
// status: 'COMPLETE', // 节点状态 |
||||
// phone: '', // 电话 |
||||
// statusName: '已签收', // 节点标题 |
||||
// isMainNode: true // 是否主节点,主节点前方展示icon |
||||
// }, |
||||
// { |
||||
// acceptStation: '由派送员蔡小坤同志配送,电话:', |
||||
// createTime: '2019-10-24 15: 26: 41', |
||||
// status: 'DELIVERING', |
||||
// phone: '16677778888', |
||||
// statusName: '运输中', |
||||
// isMainNode: true |
||||
// }, |
||||
// { |
||||
// acceptStation: '已到XXX小区快递点', |
||||
// createTime: '2019-10-24 15: 26: 41', |
||||
// status: 'DELIVERING', |
||||
// phone: '', |
||||
// statusName: '运输中', |
||||
// isMainNode: false |
||||
// }, |
||||
// { |
||||
// acceptStation: '已到海宁集散中心', |
||||
// createTime: '2019-10-24 15: 26: 18', |
||||
// status: 'DELIVERING', |
||||
// phone: '', |
||||
// statusName: '运输中', |
||||
// isMainNode: false |
||||
// }, |
||||
// { |
||||
// acceptStation: '已到杭州集散中心', |
||||
// createTime: '2019-10-24 15: 26: 07', |
||||
// status: 'DELIVERING', |
||||
// phone: '', |
||||
// statusName: '运输中', |
||||
// isMainNode: false |
||||
// }, |
||||
// { |
||||
// acceptStation: '包裹已到达余杭区集散中心', |
||||
// createTime: '2019-10-24 15: 25: 54', |
||||
// status: 'DELIVERING', |
||||
// phone: '', |
||||
// statusName: '运输中', |
||||
// isMainNode: false |
||||
// }, |
||||
// { |
||||
// acceptStation: '快递员已上门取件', |
||||
// createTime: '2019-10-24 15: 25: 17', |
||||
// status: 'DELIVERING', |
||||
// phone: '', |
||||
// statusName: '已揽收', |
||||
// isMainNode: false |
||||
// }, |
||||
// { |
||||
// acceptStation: '等待快递员上门揽件', |
||||
// createTime: '2019-10-24 15: 25: 00', |
||||
// status: 'WATTING_DELIVER', |
||||
// phone: '', |
||||
// statusName: '已发货', |
||||
// isMainNode: true |
||||
// }, |
||||
// { |
||||
// acceptStation: '您的包裹正在打包', |
||||
// createTime: '2019-10-24 15: 24: 00', |
||||
// status: 'WATTING_DELIVER', |
||||
// phone: '', |
||||
// statusName: '待发货', |
||||
// isMainNode: false |
||||
// }, |
||||
// { |
||||
// acceptStation: '订单支付成功,等待商家发货', |
||||
// createTime: '2019-10-24 15: 22: 30', |
||||
// status: 'PAYED', |
||||
// statusName: '已支付', |
||||
// isMainNode: true |
||||
// }, |
||||
// { |
||||
// acceptStation: '订单提交成功', |
||||
// createTime: '2019-10-24 15: 22: 00', |
||||
// status: 'WATTING_PAY', |
||||
// statusName: '已下单', |
||||
// isMainNode: true |
||||
// } |
||||
// ] |
||||
} |
||||
}, |
||||
components:{ |
||||
wybPopup, |
||||
trackNode |
||||
}, |
||||
created(){ |
||||
this.tracesData=dataList.data; |
||||
this.tracesData.logisticsTraceDetails=this.tracesData.logisticsTraceDetails.sort((item,item2)=>{ |
||||
|
||||
if(item.logisticsStatus == 'TRANSPORT'){ |
||||
item.isMainNode=false; |
||||
}else{ |
||||
item.isMainNode=true; |
||||
} |
||||
|
||||
return item2.time - item.time; |
||||
|
||||
}) |
||||
}, |
||||
methods:{ |
||||
show(){ |
||||
this.$refs.popup.show(); |
||||
}, |
||||
// 复制 |
||||
copyText(text){ |
||||
// #ifdef H5 |
||||
this.$copyText(text).then( |
||||
res => { |
||||
uni.showToast({ |
||||
title: '复制成功' |
||||
}) |
||||
} |
||||
) |
||||
// #endif |
||||
// #ifndef H5 |
||||
uni.setClipboardData({ |
||||
data: text, |
||||
success: () => { |
||||
uni.showToast({ |
||||
title: '复制成功' |
||||
}) |
||||
} |
||||
}) |
||||
// #endif |
||||
|
||||
|
||||
}, |
||||
// 打电话 |
||||
callPhone(){ |
||||
// uni.showModal({ |
||||
// title: '客服', |
||||
// content: '85655525652', |
||||
// success: function(res) { |
||||
// if (res.confirm) { |
||||
// uni.makePhoneCall({ |
||||
// phoneNumber: '85655525652', //电话号码 |
||||
// success: function(e) { |
||||
// console.log(e); |
||||
// }, |
||||
// fail: function(e) { |
||||
// console.log(e); |
||||
|
||||
// } |
||||
// }) |
||||
// } |
||||
// } |
||||
// }) |
||||
}, |
||||
|
||||
|
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.wuliu-img{ |
||||
width: 30px; |
||||
height: 30px; |
||||
border-radius: 50%; |
||||
} |
||||
|
||||
.border-b{ |
||||
border-bottom: 2px solid #f6f6f6; |
||||
} |
||||
|
||||
.wuliupop{ |
||||
padding: 50px 10px 10px; |
||||
} |
||||
.pop-title{ |
||||
text-align: center; |
||||
height: 50px; |
||||
line-height: 50px; |
||||
font-size: 18px; |
||||
position: fixed; |
||||
top:0; |
||||
left: 0; |
||||
right: 0; |
||||
background-color: #f6f6f6; |
||||
} |
||||
</style> |
@ -1,514 +0,0 @@ |
||||
<template> |
||||
<view class="backcor9 pd-main pdb50"> |
||||
<!-- 已送达 --> |
||||
<view v-if="status == 1" class="order-de-title pd-main"> |
||||
<view class="font22 fcor333"> |
||||
已送达 |
||||
</view> |
||||
<view class="font16 fcor666 mart10"> |
||||
感谢您的支持,如有问题可以联系我们 |
||||
</view> |
||||
</view> |
||||
|
||||
<!-- 待支付 --> |
||||
<view v-if="status == 0" class="order-de-title pd-main"> |
||||
<view class="font22 fcor333"> |
||||
待支付 |
||||
</view> |
||||
<view class="font16 fcor666 mart10"> |
||||
<text class="fcorred paddtright10" >{{countdownm}}:{{countdowns}}</text>后订单自动取消 |
||||
</view> |
||||
</view> |
||||
|
||||
<view v-if="status == 2" class="order-de-title pd-main"> |
||||
<view class="font22 fcor333"> |
||||
订单已取消 |
||||
</view> |
||||
<view class="font16 fcor666 mart10"> |
||||
您的订单已取消 |
||||
</view> |
||||
</view> |
||||
|
||||
|
||||
<!-- 待支付时支持修改地址 --> |
||||
<view v-if="status == 0" class="marb20 pd-main backcolorfff border-8r"> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class=""> |
||||
<view class="fontwig6 font18">金科才能收到你看得出纳思达</view> |
||||
<view class="mart5 fcor666">利<text class="paddleft10">15652365478</text></view> |
||||
</view> |
||||
<view class="align-fs edit-msg " @click="editOrder"> |
||||
修改 |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<view class="marb20 pd-main backcolorfff border-8r"> |
||||
<!-- 商品信息 --> |
||||
<view v-for="(item,index) in [1,2,3]" :key="index" class="marb10 flex-center-sp"> |
||||
<view class=""> |
||||
<image class="st-img" :src="images[0]" mode="aspectFill"></image> |
||||
</view> |
||||
<view class="flex-1 flex-center-sp"> |
||||
<view class="width60 paddleft10"> |
||||
<view class="marb10">单只甜玉米 单只/250-300g</view> |
||||
<view class="marb5">单价: ¥ 3.99/个</view> |
||||
<view class="fcor666">数量: 1个</view> |
||||
</view> |
||||
<view class="font16 tr align-fs"> |
||||
<view class="fontwig6">实付: ¥ 3.42</view> |
||||
<view class="fcor666">¥ 3.99</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<!-- 当商品超过3个的时候 --> |
||||
<view v-if="!moreThanThree" class="goodsMore flex-center" @click="checkMore"> |
||||
还有{{3}}种商品<text class="icon-ymt to-down"></text> |
||||
</view> |
||||
<block v-if="moreThanThree"> |
||||
<view v-for="(item,index) in [1,2,3]" :key="index" class="marb10 flex-center-sp"> |
||||
<view class=""> |
||||
<image class="st-img" :src="images[0]" mode="aspectFill"></image> |
||||
</view> |
||||
<view class="flex-1 flex-center-sp"> |
||||
<view class="width60 paddleft10"> |
||||
<view class="marb10">单只甜玉米 单只/250-300g</view> |
||||
<view class="marb5">单价: ¥ 3.99/个</view> |
||||
<view class="fcor666">数量: 1个</view> |
||||
</view> |
||||
<view class="font16 tr align-fs"> |
||||
<view class="fontwig6">实付: ¥ 3.42</view> |
||||
<view class="fcor666">¥ 3.99</view> |
||||
</view> |
||||
</view> |
||||
</view> |
||||
</block> |
||||
<view v-if="moreThanThree" class="goodsMore flex-center" @click="checkMore"> |
||||
共{{6}}种商品<text class="icon-ymt to-up"></text> |
||||
</view> |
||||
|
||||
<!-- 商品金额 --> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class="">商品金额</view> |
||||
<view class="fontwig6"><text class="paddtright5">¥</text>69.89</view> |
||||
</view> |
||||
<!-- 优惠券 --> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class="">优惠券</view> |
||||
<view class="fontwig6 fcorred">-<text class="paddtright5">¥</text>10</view> |
||||
</view> |
||||
|
||||
<!-- 运费 --> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class="">运费 |
||||
<!-- <text class="icon-ymt question fcor666 font16 paddleft5"></text> --> |
||||
</view> |
||||
<view class="fontwig6"> |
||||
<text class="fcor666 td-lt">¥6</text> |
||||
<text class="paddleft10"><text class="paddtright5">¥</text>0</text> |
||||
</view> |
||||
</view> |
||||
|
||||
<!-- 积分 --> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class="">积分</view> |
||||
<view class="fontwig6 fcorred">-<text class="paddtright5">¥</text>2</view> |
||||
</view> |
||||
<!--支付优惠 --> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class="">支付优惠</view> |
||||
<view class="fontwig6 fcorred">-<text class="paddtright5">¥</text>0.01</view> |
||||
</view> |
||||
<!-- 价格总额 --> |
||||
<view class="tr fontwig6 pd-tb10"> |
||||
<text class="paddtright10">已优惠<text class="fcorred">¥ 12.01</text></text> |
||||
<text>实付¥<text class="font20 paddleft5">58.88</text></text> |
||||
</view> |
||||
|
||||
<!-- 待支付时开始 --> |
||||
<!-- 订单编号 --> |
||||
<block v-if="status == 0"> |
||||
<view class="flex-center-sp pd-tb10 bordert"> |
||||
<view class="fcor666">订单编号</view> |
||||
<view class=" flex-center-sp"> |
||||
<text class="tr flex-1">1209 2418 0001 0039</text> |
||||
<text class=" margle10 font12 copy-num fcor666" @click="copyText('1209 2418 0001 0039')">复制</text> |
||||
</view> |
||||
</view> |
||||
<!-- 下单时间 --> |
||||
<view class="flex-center-sp pd-tb10 "> |
||||
<view class="fcor666">下单时间</view> |
||||
<view class=" "> |
||||
2023-03-04 17:05:27 |
||||
</view> |
||||
</view> |
||||
<!-- 待支付时结束 --> |
||||
</block> |
||||
</view> |
||||
|
||||
<!-- 物流信息 --> |
||||
<view v-if="status == 1 ||status == 2" class=" pd-main backcolorfff border-8r"> |
||||
<!-- 预约时间 --> |
||||
<!-- <view class="flex-center-sp pd-tb10"> |
||||
<view class="fcor666">预约时间</view> |
||||
<view class=" ">尽快送达(预计18:10前)</view> |
||||
</view> --> |
||||
<!-- 收货信息 --> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class="fcor666 align-fs">收货信息</view> |
||||
<view class=" tr"> |
||||
<view class=" ">重庆市出厂时都曾经常吃的后面2楼</view> |
||||
<view class=" ">陈女士 175896546526</view> |
||||
</view> |
||||
</view> |
||||
<!-- 物流信息 --> |
||||
<view class="flex-center-sp pd-tb10 "> |
||||
<view class="fcor666">物流信息</view> |
||||
<view class=" " @click="checkWuliu"> |
||||
查看物流信息<text class="icon-ymt to-right fcor666 font16 paddleft5"></text> |
||||
</view> |
||||
</view> |
||||
<!-- 订单编号 --> |
||||
<view class="flex-center-sp pd-tb10 bordert"> |
||||
<view class="fcor666">订单编号</view> |
||||
<view class=" flex-center-sp"> |
||||
<text class="tr flex-1">{{orderID}}</text> |
||||
<text class=" margle10 font12 copy-num fcor666" |
||||
@click="copyText(orderID)" |
||||
>复制</text> |
||||
</view> |
||||
</view> |
||||
<!-- 下单时间 --> |
||||
<view class="flex-center-sp pd-tb10 "> |
||||
<view class="fcor666">下单时间</view> |
||||
<view class=" "> |
||||
2023-03-04 17:05:27 |
||||
</view> |
||||
</view> |
||||
<!-- 支付方式 --> |
||||
<view class="flex-center-sp pd-tb10 "> |
||||
<view class="fcor666">支付方式</view> |
||||
<view class=" "> |
||||
微信支付 |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
|
||||
<!-- 待支付时底部的按钮 --> |
||||
<view v-if="status == 0" class="toPay font14 backcolorfff"> |
||||
<view class="btn" @click="cancelOrder">取消订单</view> |
||||
<view class="btn" @click="editOrder">修改订单</view> |
||||
<view class="btn bgred" @click="payOrder">立即支付{{countdownm}}:{{countdowns}}</view> |
||||
</view> |
||||
<!-- 订单取消时 --> |
||||
<view v-if="status == 2" class="toPay font14 backcolorfff"> |
||||
<view class="btn oneMore" @click="oneMoreOrder">再来一单</view> |
||||
<view class="btn" @click="deleteOrder">删除订单</view> |
||||
|
||||
</view> |
||||
|
||||
<wuliuPopup ref="wuliu"></wuliuPopup> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import wuliuPopup from '@/components/wuliuPupup/wuliuPupup.vue' |
||||
const app =getApp() |
||||
import {getDetailByOrderNo} from '@/Utils/Api.js' |
||||
export default { |
||||
data(){ |
||||
return{ |
||||
// 0:代表未支付,1代表已支付,2代表已取消 |
||||
status:0, |
||||
orderID:'1209 2418 0001 0039', |
||||
moreThanThree:false, |
||||
images: ["https://d1.shopxo.vip/static/upload/images/goods/2019/01/14/1547451274847894.jpg","https://d1.shopxo.vip/static/upload/images/goods/2019/01/14/1547451274847894.jpg","https://d1.shopxo.vip/static/upload/images/goods/2019/01/14/1547451274847894.jpg","https://d1.shopxo.vip/static/upload/images/goods/2019/01/14/1547451274847894.jpg","https://d1.shopxo.vip/static/upload/images/goods/2019/01/14/1547451274847894.jpg"], |
||||
countdownh: '', //倒计时时 |
||||
countdownm: '', // 倒计时分 |
||||
countdowns:'',//倒计时秒 |
||||
timers:null, |
||||
// recinfo:{ |
||||
// createTime:1680744355375, |
||||
// }, |
||||
// |
||||
orderId:'',//订单id |
||||
recinfo: [], |
||||
|
||||
} |
||||
}, |
||||
components:{ |
||||
wuliuPopup |
||||
}, |
||||
onLoad(option) { |
||||
this.orderId = option.id |
||||
}, |
||||
onUnload() { |
||||
clearInterval(this.timers); |
||||
}, |
||||
onShow(){ |
||||
// 待支付状态 |
||||
// if(this.status == 0){ |
||||
// this.timers = setInterval(() => { |
||||
// this.showtime() |
||||
// }, 1000) |
||||
// } |
||||
|
||||
//页面显示时,加载订单信息 |
||||
this.getDetailByOrderNo(); |
||||
|
||||
}, |
||||
methods:{ |
||||
//查询订单详情 |
||||
getDetailByOrderNo() { |
||||
uni.showLoading({ |
||||
title: '加载中...' |
||||
}) |
||||
let params = { |
||||
orderNo: this.orderId, |
||||
} |
||||
getDetailByOrderNo(params).then(res => { |
||||
uni.hideLoading(); |
||||
if (res.return_code == '000000') { |
||||
this.recinfo = res.return_data; |
||||
// if (res.return_data.productType == 6) { |
||||
// this.getOrderByOrderNo(); |
||||
// } |
||||
|
||||
if (res.return_data.orderStatus == 1) { |
||||
this.timers = setInterval(() => { |
||||
this.showtime() |
||||
}, 1000) |
||||
} |
||||
} |
||||
}) |
||||
}, |
||||
showtime() { |
||||
var nowtime = (new Date()).getTime();//获取当前时间 |
||||
var endtime = this.recinfo.createTime + 600000; //定义结束时间 600000是10分钟 |
||||
var lefttime = endtime - nowtime; //距离结束时间的毫秒数 |
||||
var leftd = Math.floor(lefttime / (1000 * 60 * 60 * 24)); //计算天数 |
||||
var lefth = Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd * 24) < 10 ? "0" + Math.floor((lefttime / |
||||
(1000 * 60 * 60) % 24) + leftd * 24) : Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd * |
||||
24); //计算小时数 |
||||
var leftm = Math.floor(lefttime / (1000 * 60) % 60) < 10 ? "0" + Math.floor(lefttime / (1000 * 60) % 60) : |
||||
Math.floor(lefttime / (1000 * 60) % 60); //计算分钟数 |
||||
var lefts = Math.floor(lefttime / 1000 % 60) < 10 ? "0" + Math.floor(lefttime / 1000 % 60) : Math.floor( |
||||
lefttime / 1000 % 60); //计算秒数 |
||||
this.countdownh = lefth; //返回倒计时的字符串 |
||||
this.countdownm = leftm; //返回倒计时的字符串 |
||||
this.countdowns = lefts; //返回倒计时的字符串 |
||||
// 倒计时结束时,显示00:00:00 |
||||
if (lefttime < 0) { |
||||
clearInterval(this.timers); |
||||
// this.getDetailByOrderNo(); |
||||
this.countdownh = this.countdownm = this.countdowns = "00"; |
||||
} |
||||
}, |
||||
// 查看更多商品 |
||||
checkMore(){ |
||||
this.moreThanThree = !this.moreThanThree |
||||
}, |
||||
// 查看物流 |
||||
checkWuliu(){ |
||||
this.$refs.wuliu.$refs.popup.show() |
||||
}, |
||||
|
||||
// 点击修改订单 |
||||
editOrder(){ |
||||
uni.navigateTo({ |
||||
url:'/pages/classify/order/editOrder' |
||||
}) |
||||
}, |
||||
// 取消订单 |
||||
cancelOrder(){ |
||||
|
||||
let that = this; |
||||
uni.showModal({ |
||||
title: '取消订单', |
||||
content: '确定取消此订单?', |
||||
success: (res) => { |
||||
// if (res.confirm) { |
||||
// uni.showLoading({ |
||||
// title: '加载中...' |
||||
// }) |
||||
// let params = { |
||||
// orderNo: this.recinfo.orderNo |
||||
// } |
||||
// cancel(params).then(res => { |
||||
// if (res.return_code == '000000') { |
||||
// uni.hideLoading(); |
||||
// uni.showToast({ |
||||
// title: res.return_data, |
||||
// icon: 'none', |
||||
// duration: 2000 |
||||
// }) |
||||
// let pages = getCurrentPages() //页面栈 |
||||
// let prePage = pages[pages.length - 2] //上一页 |
||||
// prePage.$vm.reFresh = Math.random() //触发上一页监听器 |
||||
// uni.navigateBack() //返回上一页 |
||||
// } else { |
||||
// uni.showToast({ |
||||
// title: res.return_msg, |
||||
// icon: 'none', |
||||
// duration: 2000 |
||||
// }) |
||||
// uni.hideLoading() |
||||
// } |
||||
// }) |
||||
// } else if (res.cancel) { |
||||
// console.log('用户点击取消'); |
||||
// } |
||||
} |
||||
}); |
||||
|
||||
}, |
||||
// 支付订单 |
||||
payOrder(){ |
||||
|
||||
}, |
||||
|
||||
// 订单取消时的再来一单 |
||||
oneMoreOrder(){ |
||||
|
||||
}, |
||||
// 订单取消时的删除订单 |
||||
deleteOrder(){ |
||||
|
||||
}, |
||||
// 复制的 |
||||
copyText(text){ |
||||
|
||||
|
||||
|
||||
// #ifdef H5 |
||||
this.$copyText(text).then( |
||||
res => { |
||||
uni.showToast({ |
||||
title: '复制成功' |
||||
}) |
||||
} |
||||
) |
||||
// #endif |
||||
// #ifndef H5 |
||||
uni.setClipboardData({ |
||||
data: text, |
||||
success: () => { |
||||
uni.showToast({ |
||||
title: '复制成功' |
||||
}) |
||||
} |
||||
}) |
||||
// #endif |
||||
|
||||
|
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
|
||||
.flex-center-sp{ |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
} |
||||
.flex-center{ |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
} |
||||
|
||||
.align-fs{ |
||||
align-self: flex-start; |
||||
} |
||||
.tr{ |
||||
text-align: right; |
||||
} |
||||
.flex-1{ |
||||
flex:1; |
||||
} |
||||
.st-img{ |
||||
width: 82px; |
||||
height: 82px; |
||||
} |
||||
|
||||
|
||||
.goodsMore{ |
||||
padding: 10px 0; |
||||
text-align: center; |
||||
border-top: 1px solid #f6f6f6; |
||||
border-bottom:1px solid #f6f6f6; |
||||
} |
||||
|
||||
// 商品金额 |
||||
.pd-tb10{ |
||||
padding: 10px 0; |
||||
} |
||||
|
||||
.td-lt{ |
||||
text-decoration: line-through; |
||||
} |
||||
|
||||
.bordert{ |
||||
border-top: 2px solid #f6f6f6; |
||||
} |
||||
|
||||
// 复制按钮 |
||||
.copy-num{ |
||||
padding: 0 5px; |
||||
border: 1px solid #666666; |
||||
border-radius: 5px; |
||||
display: inline-block; |
||||
vertical-align: middle; |
||||
|
||||
} |
||||
// 修改按钮 |
||||
.edit-msg{ |
||||
border: 1px solid #D7D3D0; |
||||
width: 50px; |
||||
height: 30px; |
||||
line-height: 30px; |
||||
text-align: center; |
||||
border-radius: 15px; |
||||
} |
||||
|
||||
.pdb50{ |
||||
padding-bottom: 50px; |
||||
} |
||||
|
||||
// 底部待支付按钮 |
||||
.toPay{ |
||||
height: 40px; |
||||
padding: 0 15px; |
||||
display: flex; |
||||
justify-content: flex-end; |
||||
align-items: center; |
||||
border-top: 1px solid #f6f6f6; |
||||
position: fixed; |
||||
bottom: 0; |
||||
right: 0; |
||||
left: 0; |
||||
.btn{ |
||||
// height: 20px; |
||||
padding:1px 5px; |
||||
border-radius: 10px; |
||||
margin-left: 15px; |
||||
border:1px solid #666666; |
||||
color: #666666; |
||||
&.bgred{ |
||||
color: #ffffff; |
||||
background-color: #FF2342; |
||||
border:1px solid #FF2342; |
||||
} |
||||
&.oneMore{ |
||||
color: #FF2342; |
||||
|
||||
border:1px solid #FF2342; |
||||
} |
||||
} |
||||
|
||||
} |
||||
</style> |
@ -0,0 +1,691 @@ |
||||
<template> |
||||
<view class="backcor9 pd-main pdb50 headsbg"> |
||||
|
||||
|
||||
<!-- 待支付 --> |
||||
<view v-if="recinfo.orderStatus == 1" class="order-de-title pd-main"> |
||||
<view class="font22 fcor333"> |
||||
待支付 |
||||
</view> |
||||
<view class="font16 fcor666 mart10"> |
||||
<text class="fcorred paddtright10">{{countdownm}}:{{countdowns}}</text>后订单自动取消 |
||||
</view> |
||||
</view> |
||||
<!-- 其他 --> |
||||
<view v-if="recinfo.orderStatus != 1" v-else class="order-de-title pd-main"> |
||||
<view class="font22 fcor333"> |
||||
{{typeText[recinfo.orderStatus]}} |
||||
</view> |
||||
<view class="font16 fcor666 mart10"> |
||||
您的订单{{typeText[recinfo.orderStatus]}} |
||||
</view> |
||||
</view> |
||||
|
||||
<view class=" marb10 backcorfff height50 fcor333 font15 border-8r"> |
||||
<view class="width94">感谢您信任嗨森逛,欢迎再次消费</view> |
||||
</view> |
||||
|
||||
<!-- 待支付时支持修改地址,暂时先不弄 --> |
||||
<!-- <view v-if="status == 0" class="marb20 pd-main backcolorfff border-8r"> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class=""> |
||||
<view class="fontwig6 font18">金科才能收到你看得出纳思达</view> |
||||
<view class="mart5 fcor666">利<text class="paddleft10">15652365478</text></view> |
||||
</view> |
||||
<view class="align-fs edit-msg " @click="editOrder"> |
||||
修改 |
||||
</view> |
||||
</view> |
||||
</view> --> |
||||
|
||||
<view class="marb20 pd-main backcolorfff border-8r"> |
||||
<!-- 商品信息 --> |
||||
<view v-for="(item,index) in goodsList" :key="index" class="marb10 flex-center-sp"> |
||||
<view class=""> |
||||
<image class="st-img" :src="imageUrl+item.goodsImg" mode="aspectFill"></image> |
||||
</view> |
||||
<view class="flex-1 flex-center-sp"> |
||||
<view class="width60 paddleft10"> |
||||
<view class="marb10 font18 fontwig6">{{item.goodsName}}</view> |
||||
<view class="marb5 font12 fcor666">规格: {{item.goodsSpecName}}</view> |
||||
<view class="fcor666 font12">数量: {{item.saleCount}}</view> |
||||
</view> |
||||
<view class="font16 tr align-fs"> |
||||
<view class="fontwig6" v-if="recinfo.memDiscountId">¥ {{item.goodsPrice}}</view> |
||||
<view class="fontwig6" v-if="!recinfo.memDiscountId">¥ {{item.goodsActualPrice}}</view> |
||||
|
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<!-- 当商品超过3个的时候 --> |
||||
<view v-if="!moreThanThree&&isShow" class="goodsMore flex-center" @click="checkMore"> |
||||
还有{{goodsList2.length}}种商品<text class="icon-ymt to-down"></text> |
||||
</view> |
||||
<block v-if="moreThanThree"> |
||||
<view v-for="(item,index) in goodsList2" :key="index" class="marb10 flex-center-sp"> |
||||
<view class=""> |
||||
<image class="st-img" :src="imageUrl+item.goodsImg" mode="aspectFill"></image> |
||||
</view> |
||||
<view class="flex-1 flex-center-sp"> |
||||
<view class="width60 paddleft10"> |
||||
<view class="marb10 font18 fontwig6">{{item.goodsName}}</view> |
||||
<view class="marb5 font12 fcor666">规格: {{item.goodsSpecName}}</view> |
||||
<view class="fcor666 font12">数量: {{item.saleCount}}</view> |
||||
</view> |
||||
<view class="font16 tr align-fs"> |
||||
<view class="fontwig6" v-if="recinfo.memDiscountId">¥ {{item.goodsPrice}}</view> |
||||
<view class="fontwig6" v-if="!recinfo.memDiscountId">¥ {{item.goodsActualPrice}}</view> |
||||
|
||||
</view> |
||||
</view> |
||||
</view> |
||||
</block> |
||||
<view v-if="moreThanThree" class="goodsMore flex-center" @click="checkMore"> |
||||
共{{recinfo.highChildOrderList.length}}种商品<text class="icon-ymt to-up"></text> |
||||
</view> |
||||
|
||||
<!-- 商品金额 --> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class="">商品金额</view> |
||||
<view class="fontwig6"><text class="paddtright5">¥</text>{{goodsPrice | numFormat}}</view> |
||||
</view> |
||||
<!-- 优惠券 --> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class="">优惠券</view> |
||||
<view class="fontwig6 fcorred">-<text class="paddtright5">¥</text>{{recinfo.deductionCouponPrice}} |
||||
</view> |
||||
</view> |
||||
|
||||
<!-- 运费 --> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class="">运费 |
||||
<!-- <text class="icon-ymt question fcor666 font16 paddleft5"></text> --> |
||||
</view> |
||||
<view class="fontwig6"> |
||||
<text class="fcor666 fcorred">¥{{recinfo.goodsOrder.freightPrice || 0}}</text> |
||||
|
||||
</view> |
||||
</view> |
||||
|
||||
<!-- 积分 --> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class="">积分</view> |
||||
<view class="fontwig6 fcorred">-<text class="paddtright5">¥</text>{{(recinfo.payGold / 100).toFixed(2)}} |
||||
</view> |
||||
</view> |
||||
<!--支付优惠 --> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class="">支付优惠</view> |
||||
<view class="fontwig6 fcorred">-<text class="paddtright5">¥</text>0</view> |
||||
</view> |
||||
<!-- 价格总额 --> |
||||
<view class="tr fontwig6 pd-tb10"> |
||||
<!-- <text class="paddtright10">已优惠<text class="fcorred">¥ 12.01</text></text> --> |
||||
<view v-if="recinfo.orderStatus == 1 ||recinfo.orderStatus == 5 " class="dis-flex flex-end">商品总金额<text class="margle10 font22">¥{{recinfo.payablePrice | numFormat}}</text> </view> |
||||
<view v-else class="dis-flex flex-end">实付 <text class="font22 margle10">¥{{recinfo.payRealPrice}}</text></view> |
||||
</view> |
||||
|
||||
<!-- 待支付时开始 --> |
||||
<!-- 订单编号 --> |
||||
<block v-if="recinfo.orderStatus == 1"> |
||||
<view class="flex-center-sp pd-tb10 bordert"> |
||||
<view class="fcor666 width80px">订单编号</view> |
||||
<view class=" flex-center-sp"> |
||||
<text class="tr flex-1">{{orderId}}</text> |
||||
<text class=" margle10 font12 copy-num fcor666" @click="copyText(orderId)">复制</text> |
||||
</view> |
||||
</view> |
||||
<!-- 下单时间 --> |
||||
<view class="flex-center-sp pd-tb10 "> |
||||
<view class="fcor666 width80px">下单时间</view> |
||||
<view class=" "> |
||||
{{recinfo.createTime | formatDate('-')}} |
||||
</view> |
||||
</view> |
||||
<!-- 待支付时结束 --> |
||||
</block> |
||||
</view> |
||||
|
||||
<!-- 物流信息 --> |
||||
<view v-if="recinfo.orderStatus != 1 && recinfo.orderStatus != 5" class=" pd-main backcolorfff border-8r"> |
||||
|
||||
<!-- 收货信息 --> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class="fcor666 align-fs width80px">收货信息</view> |
||||
<view class="flex-1 tr"> |
||||
<view class=" "> |
||||
{{recinfo.goodsDeliveryAddress.regionName +' '+recinfo.goodsDeliveryAddress.address}}</view> |
||||
<view class=" ">{{recinfo.goodsDeliveryAddress.consignee +' '+recinfo.goodsDeliveryAddress.phone}} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<!-- 物流信息 --> |
||||
<view class="flex-center-sp pd-tb10 "> |
||||
<view class="fcor666 width80px">物流信息</view> |
||||
<view class=" " @click="checkWuliu"> |
||||
查看物流信息<text class="icon-ymt to-right fcor666 font16 paddleft5"></text> |
||||
</view> |
||||
</view> |
||||
<!-- 订单编号 --> |
||||
<view class="flex-center-sp pd-tb10 bordert"> |
||||
<view class="fcor666 width80px">订单编号</view> |
||||
<view class=" flex-center-sp"> |
||||
<text class="tr flex-1">{{orderId}}</text> |
||||
<text class=" margle10 font12 copy-num fcor666" @click="copyText(orderId)">复制</text> |
||||
</view> |
||||
</view> |
||||
<!-- 下单时间 --> |
||||
<view class="flex-center-sp pd-tb10 "> |
||||
<view class="fcor666 width80px">下单时间</view> |
||||
<view class=" "> |
||||
{{recinfo.createTime | formatDate('-')}} |
||||
</view> |
||||
</view> |
||||
<!-- 支付方式 --> |
||||
<view class="flex-center-sp pd-tb10 "> |
||||
<view class="fcor666 width80px">支付方式</view> |
||||
<view class=" "> |
||||
<view class=" fotrt fcor333" v-if="recinfo.payType == 1">支付宝</view> |
||||
<view class=" fotrt fcor333" v-if="recinfo.payType == 2">微信支付</view> |
||||
<view class=" fotrt fcor333" v-if="recinfo.payType == 3">积分兑换</view> |
||||
<view class=" fotrt fcor333" v-if="recinfo.payType == 4">汇联通工会卡</view> |
||||
<view class=" fotrt fcor333" v-if="recinfo.payType == 5">银联</view> |
||||
</view> |
||||
</view> |
||||
<!-- 备注 --> |
||||
<view class="flex-center-sp pd-tb10 "> |
||||
<view class="fcor666 width80px">备注</view> |
||||
<view class="fcor666 font13 "> |
||||
{{recinfo.remarks || "暂无数据"}} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<view v-if="recinfo.orderStatus == 1 || recinfo.orderStatus == 5" class=" pd-main backcolorfff border-8r"> |
||||
|
||||
<!-- 收货信息 --> |
||||
<view class="flex-center-sp pd-tb10"> |
||||
<view class="fcor666 align-fs width80px">收货信息</view> |
||||
<view class="flex-1 tr"> |
||||
<view class=" "> |
||||
{{recinfo.goodsDeliveryAddress.regionName +' '+recinfo.goodsDeliveryAddress.address}}</view> |
||||
<view class=" ">{{recinfo.goodsDeliveryAddress.consignee +' '+recinfo.goodsDeliveryAddress.phone}} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
<!-- 订单编号 --> |
||||
<view class="flex-center-sp pd-tb10 bordert"> |
||||
<view class="fcor666 width80px">订单编号</view> |
||||
<view class=" flex-center-sp"> |
||||
<text class="tr flex-1">{{orderId}}</text> |
||||
<text class=" margle10 font12 copy-num fcor666" @click="copyText(orderId)">复制</text> |
||||
</view> |
||||
</view> |
||||
<!-- 下单时间 --> |
||||
<view class="flex-center-sp pd-tb10 "> |
||||
<view class="fcor666 width80px">下单时间</view> |
||||
<view class=" "> |
||||
{{recinfo.createTime | formatDate('-')}} |
||||
</view> |
||||
</view> |
||||
<!-- 备注 --> |
||||
<view class="flex-center-sp pd-tb10 "> |
||||
<view class="fcor666 width80px ">备注</view> |
||||
<view class="fcor666 font13 "> |
||||
{{recinfo.remarks || "暂无数据"}} |
||||
</view> |
||||
</view> |
||||
</view> |
||||
|
||||
<!-- 待支付时底部的按钮 --> |
||||
<view v-if="recinfo.orderStatus == 1" class="toPay font14 backcolorfff"> |
||||
<view class="btn" @click="cancelOrder">取消订单</view> |
||||
<!-- <view class="btn" @click="editOrder">修改订单</view> --> |
||||
<view class="btn bgred" @click="payOrder">立即支付{{countdownm}}:{{countdowns}}</view> |
||||
</view> |
||||
<!-- --> |
||||
<!-- <view v-if="recinfo.orderStatus != 1" class="toPay font14 backcolorfff"> |
||||
<view class="btn oneMore" @click="oneMoreOrder">再来一单</view> |
||||
<view class="btn" @click="deleteOrder">删除订单</view> |
||||
|
||||
</view> --> |
||||
<view v-if="recinfo.orderStatus != 1" class="toPay font14 backcolorfff"> |
||||
|
||||
<view class="btn" @click="playPhone">联系客服</view> |
||||
</view> |
||||
<wuliuPopup ref="wuliu"></wuliuPopup> |
||||
</view> |
||||
</template> |
||||
|
||||
<script> |
||||
import wuliuPopup from '@/physical-merchants/classify/order/wuliuPupup/wuliuPupup.vue' |
||||
|
||||
import { |
||||
getDetailByOrderNo, |
||||
cancel |
||||
} from '@/Utils/Api.js' |
||||
|
||||
const app = getApp() |
||||
export default { |
||||
data() { |
||||
return { |
||||
|
||||
countdownh: '', //倒计时时 |
||||
countdownm: '', // 倒计时分 |
||||
countdowns: '', //倒计时秒 |
||||
timers: null, |
||||
orderId: '', //订单id |
||||
recinfo: {}, |
||||
typeText: { |
||||
1: '待支付', |
||||
2: '已支付', |
||||
3: '已完成', |
||||
4: '已退款', |
||||
5: '已取消', |
||||
6: '退款中', |
||||
7: '退款失败' |
||||
}, |
||||
imageUrl: app.globalData.imgUrl, |
||||
goodsList: [], |
||||
goodsList2: [], |
||||
goodsListAll: [], |
||||
moreThanThree: false, |
||||
isShow: false, |
||||
|
||||
|
||||
} |
||||
}, |
||||
components: { |
||||
wuliuPopup |
||||
}, |
||||
computed: { |
||||
goodsPrice() { |
||||
if (this.recinfo.memDiscountId) { |
||||
var str = 0; |
||||
this.goodsListAll.map(item => { |
||||
str = parseFloat((str + (item.saleCount * item.goodsPrice)).toFixed(2)) |
||||
}) |
||||
|
||||
return str; |
||||
} else { |
||||
var str2 = 0; |
||||
this.goodsListAll.map(item => { |
||||
str2 = parseFloat((str2 + (item.saleCount * item.goodsActualPrice)).toFixed(2)) |
||||
}) |
||||
return str2; |
||||
} |
||||
|
||||
|
||||
} |
||||
}, |
||||
onLoad(option) { |
||||
this.orderId = option.id |
||||
// console.log(this.orderId, "this.orderId") |
||||
}, |
||||
onUnload() { |
||||
clearInterval(this.timers); |
||||
}, |
||||
onShow() { |
||||
//页面显示时,加载订单信息 |
||||
this.getDetailByOrder(); |
||||
}, |
||||
filters: { |
||||
//过滤器 用于格式化时间 |
||||
formatDate: function(value, spe = '/') { |
||||
let data = new Date(value); |
||||
let year = data.getFullYear(); |
||||
let month = data.getMonth() + 1; |
||||
let day = data.getDate(); |
||||
let h = data.getHours(); |
||||
let mm = data.getMinutes(); |
||||
let s = data.getSeconds(); |
||||
month = month >= 10 ? month : "0" + month; |
||||
day = day >= 10 ? day : "0" + day; |
||||
h = h >= 10 ? h : "0" + h; |
||||
mm = mm >= 10 ? mm : "0" + mm; |
||||
s = s >= 10 ? s : "0" + s; |
||||
return `${year}${spe}${month}${spe}${day} ${h}:${mm}:${s}`; |
||||
} |
||||
}, |
||||
methods: { |
||||
//查询订单详情 |
||||
getDetailByOrder() { |
||||
uni.showLoading({ |
||||
title: '加载中...' |
||||
}) |
||||
let params = { |
||||
orderNo: this.orderId, |
||||
} |
||||
getDetailByOrderNo(params).then(res => { |
||||
uni.hideLoading(); |
||||
if (res.return_code == '000000') { |
||||
this.recinfo = res.return_data; |
||||
// if (res.return_data.productType == 6) { |
||||
// this.getOrderByOrderNo(); |
||||
// } |
||||
|
||||
this.goodsListAll = this.recinfo.highChildOrderList; |
||||
|
||||
if (this.recinfo.highChildOrderList.length > 3) { |
||||
this.isShow = true; |
||||
this.goodsList = this.recinfo.highChildOrderList.slice(0, 3) |
||||
this.goodsList2 = this.recinfo.highChildOrderList.slice(3) |
||||
} else { |
||||
this.isShow = false; |
||||
this.goodsList = this.recinfo.highChildOrderList |
||||
} |
||||
|
||||
|
||||
|
||||
//待付款 |
||||
if (res.return_data.orderStatus == 1) { |
||||
this.timers = setInterval(() => { |
||||
this.showtime() |
||||
}, 1000) |
||||
} |
||||
} |
||||
}) |
||||
}, |
||||
showtime() { |
||||
var nowtime = (new Date()).getTime(); //获取当前时间 |
||||
var endtime = this.recinfo.createTime + 600000; //定义结束时间 600000是10分钟 |
||||
var lefttime = endtime - nowtime; //距离结束时间的毫秒数 |
||||
var leftd = Math.floor(lefttime / (1000 * 60 * 60 * 24)); //计算天数 |
||||
var lefth = Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd * 24) < 10 ? "0" + Math.floor((lefttime / |
||||
(1000 * 60 * 60) % 24) + leftd * 24) : Math.floor((lefttime / (1000 * 60 * 60) % 24) + leftd * |
||||
24); //计算小时数 |
||||
var leftm = Math.floor(lefttime / (1000 * 60) % 60) < 10 ? "0" + Math.floor(lefttime / (1000 * 60) % 60) : |
||||
Math.floor(lefttime / (1000 * 60) % 60); //计算分钟数 |
||||
var lefts = Math.floor(lefttime / 1000 % 60) < 10 ? "0" + Math.floor(lefttime / 1000 % 60) : Math.floor( |
||||
lefttime / 1000 % 60); //计算秒数 |
||||
this.countdownh = lefth; //返回倒计时的字符串 |
||||
this.countdownm = leftm; //返回倒计时的字符串 |
||||
this.countdowns = lefts; //返回倒计时的字符串 |
||||
// 倒计时结束时,显示00:00:00 |
||||
if (lefttime < 0) { |
||||
clearInterval(this.timers); |
||||
this.getDetailByOrder(); |
||||
this.countdownh = this.countdownm = this.countdowns = "00"; |
||||
} |
||||
}, |
||||
// 查看更多商品 |
||||
checkMore() { |
||||
this.moreThanThree = !this.moreThanThree |
||||
}, |
||||
// 查看物流 |
||||
checkWuliu() { |
||||
let logisticsNo = this.recinfo.goodsOrder.logisticsNo; |
||||
|
||||
if (!logisticsNo) { |
||||
uni.showToast({ |
||||
title: '暂无数据', |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
return |
||||
} |
||||
|
||||
this.$refs.wuliu.show(logisticsNo) |
||||
}, |
||||
|
||||
// 点击修改订单 |
||||
editOrder() { |
||||
// uni.navigateTo({ |
||||
// url:'/physical-merchants/classify/order/editOrder' |
||||
// }) |
||||
}, |
||||
// 取消订单 |
||||
cancelOrder() { |
||||
|
||||
|
||||
let that = this; |
||||
uni.showModal({ |
||||
title: '取消订单', |
||||
content: '确定取消此订单?', |
||||
success: (res) => { |
||||
if (res.confirm) { |
||||
uni.showLoading({ |
||||
title: '加载中...' |
||||
}) |
||||
let params = { |
||||
orderNo: this.recinfo.orderNo |
||||
} |
||||
cancel(params).then(res => { |
||||
if (res.return_code == '000000') { |
||||
uni.hideLoading(); |
||||
uni.showToast({ |
||||
title: res.return_data, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
let pages = getCurrentPages() //页面栈 |
||||
let prePage = pages[pages.length - 2] //上一页 |
||||
prePage.$vm.reFresh = Math.random() //触发上一页监听器 |
||||
uni.navigateBack() //返回上一页 |
||||
} else { |
||||
uni.showToast({ |
||||
title: res.return_msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
uni.hideLoading() |
||||
} |
||||
}) |
||||
} else if (res.cancel) { |
||||
console.log('用户点击取消'); |
||||
} |
||||
} |
||||
}); |
||||
|
||||
|
||||
}, |
||||
// 支付订单 |
||||
payOrder() { |
||||
let obj = { |
||||
orderNo : this.recinfo.orderNo, |
||||
createTime:this.recinfo.createTime, |
||||
payPrice:this.recinfo.payablePrice |
||||
} |
||||
obj = JSON.stringify(obj) |
||||
uni.navigateTo({ |
||||
url: '/physical-merchants/classify/order/pay?obj=' + obj |
||||
}) |
||||
}, |
||||
//拨打客服电话 |
||||
playPhone() { |
||||
uni.showModal({ |
||||
title: '客服', |
||||
content: '4006780738', |
||||
success: function(res) { |
||||
if (res.confirm) { |
||||
uni.makePhoneCall({ |
||||
phoneNumber: '4006780738', //电话号码 |
||||
success: function(e) { |
||||
console.log(e); |
||||
}, |
||||
fail: function(e) { |
||||
console.log(e); |
||||
|
||||
} |
||||
}) |
||||
} |
||||
} |
||||
}) |
||||
}, |
||||
|
||||
|
||||
// 订单取消时的再来一单 |
||||
oneMoreOrder() { |
||||
|
||||
}, |
||||
// 订单取消时的删除订单 |
||||
deleteOrder() { |
||||
|
||||
}, |
||||
// 复制的 |
||||
copyText(text) { |
||||
|
||||
|
||||
|
||||
// #ifdef H5 |
||||
this.$copyText(text).then( |
||||
res => { |
||||
uni.showToast({ |
||||
title: '复制成功' |
||||
}) |
||||
} |
||||
) |
||||
// #endif |
||||
// #ifndef H5 |
||||
uni.setClipboardData({ |
||||
data: text, |
||||
success: () => { |
||||
uni.showToast({ |
||||
title: '复制成功' |
||||
}) |
||||
} |
||||
}) |
||||
// #endif |
||||
|
||||
|
||||
} |
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.bottomstu { |
||||
position: fixed; |
||||
bottom: 0px; |
||||
border-top: 1px solid #cecdcd; |
||||
} |
||||
|
||||
.cusservice { |
||||
height: 30px; |
||||
width: 90px; |
||||
margin-right: 20px; |
||||
border: 1px solid #6c6c6c; |
||||
border-radius: 25px; |
||||
} |
||||
|
||||
.headsbg { |
||||
background: linear-gradient(to bottom, #3da7e7, #e8eff4) no-repeat; |
||||
background-size: 100% 200px; |
||||
|
||||
} |
||||
|
||||
.width80px { |
||||
width: 80px; |
||||
} |
||||
|
||||
.flex-center-sp { |
||||
display: flex; |
||||
justify-content: space-between; |
||||
align-items: center; |
||||
} |
||||
|
||||
.flex-center { |
||||
display: flex; |
||||
justify-content: center; |
||||
align-items: center; |
||||
} |
||||
|
||||
.align-fs { |
||||
align-self: flex-start; |
||||
} |
||||
|
||||
.tr { |
||||
text-align: right; |
||||
} |
||||
|
||||
.flex-1 { |
||||
flex: 1; |
||||
} |
||||
|
||||
.st-img { |
||||
width: 82px; |
||||
height: 82px; |
||||
} |
||||
|
||||
|
||||
.goodsMore { |
||||
padding: 10px 0; |
||||
text-align: center; |
||||
border-top: 1px solid #f6f6f6; |
||||
border-bottom: 1px solid #f6f6f6; |
||||
} |
||||
|
||||
// 商品金额 |
||||
.pd-tb10 { |
||||
padding: 10px 0; |
||||
} |
||||
|
||||
.td-lt { |
||||
text-decoration: line-through; |
||||
} |
||||
|
||||
.bordert { |
||||
border-top: 2px solid #f6f6f6; |
||||
} |
||||
|
||||
// 复制按钮 |
||||
.copy-num { |
||||
padding: 0 5px; |
||||
border: 1px solid #666666; |
||||
border-radius: 5px; |
||||
display: inline-block; |
||||
vertical-align: middle; |
||||
|
||||
} |
||||
|
||||
// 修改按钮 |
||||
.edit-msg { |
||||
border: 1px solid #D7D3D0; |
||||
width: 50px; |
||||
height: 30px; |
||||
line-height: 30px; |
||||
text-align: center; |
||||
border-radius: 15px; |
||||
} |
||||
|
||||
.pdb50 { |
||||
padding-bottom: 50px; |
||||
} |
||||
|
||||
// 底部待支付按钮 |
||||
.toPay { |
||||
height: 30px; |
||||
padding: 10px 15px; |
||||
display: flex; |
||||
justify-content: flex-end; |
||||
align-items: center; |
||||
border-top: 1px solid #f6f6f6; |
||||
position: fixed; |
||||
bottom: 0; |
||||
right: 0; |
||||
left: 0; |
||||
|
||||
.btn { |
||||
height: 20px; |
||||
padding: 5px; |
||||
border-radius: 15px; |
||||
margin-left: 15px; |
||||
border: 1px solid #666666; |
||||
color: #666666; |
||||
|
||||
&.bgred { |
||||
color: #ffffff; |
||||
background-color: #FF2342; |
||||
border: 1px solid #FF2342; |
||||
} |
||||
|
||||
&.oneMore { |
||||
color: #FF2342; |
||||
|
||||
border: 1px solid #FF2342; |
||||
} |
||||
} |
||||
|
||||
} |
||||
</style> |
@ -0,0 +1,261 @@ |
||||
<template> |
||||
<wybPopup ref="popup" type="bottom" width="500" scrollY="true" radius="0" :showCloseIcon="true"> |
||||
<view class="pd-main wuliupop backcor9"> |
||||
<view class="pop-title fontwig6"><text>物流信息</text></view> |
||||
<view class="pd-main backcolorfff border-8r font14"> |
||||
<view class="dis-flex flex-sp mart10 marb10 paddbotm10 border-b"> |
||||
<view class="dis-flex"> |
||||
<!-- <image class="wuliu-img" src="https://pic.616pic.com/ys_bnew_img/00/07/04/1ZtrvD1AMY.jpg" mode="aspectFill"></image> --> |
||||
<text class="paddleft5">{{tracesData.expressCompanyName}}</text> |
||||
<text class="paddleft5">{{tracesData.number}}</text> |
||||
</view> |
||||
<view class="dis-flex "> |
||||
<text @click="copyText(tracesData.number)">复制</text> |
||||
<text class="paddleft5 paddtright5 fcor666">|</text> |
||||
<text @click="callPhone">打电话</text> |
||||
</view> |
||||
</view> |
||||
|
||||
<block v-for="(item, index) in tracesData.logisticsTraceDetails" > |
||||
|
||||
|
||||
<trackNode :key="index" :is-first="index===tracesData.length-1" :is-newest="index===0" :is-main-node="item.logisticsStatus!='TRANSPORT'" :node-data="item"></trackNode> |
||||
</block> |
||||
</view> |
||||
|
||||
|
||||
</view> |
||||
</wybPopup> |
||||
</template> |
||||
|
||||
<script> |
||||
import wybPopup from '@/components/wyb-popup/wyb-popup.vue' |
||||
import trackNode from '../trackNode/trackNode.vue' |
||||
|
||||
import {getLogisticsMsg} from '@/Utils/physicalObject.js' |
||||
|
||||
|
||||
export default { |
||||
data () { |
||||
return { |
||||
tracesData:{}, |
||||
/* [ |
||||
{ |
||||
acceptStation: '包裹已被吴亦发同学签收', // 节点描述 |
||||
createTime: '2019-10-24 15: 27: 16', |
||||
status: 'COMPLETE', // 节点状态 |
||||
phone: '', // 电话 |
||||
statusName: '已签收', // 节点标题 |
||||
isMainNode: true // 是否主节点,主节点前方展示icon |
||||
}, |
||||
{ |
||||
acceptStation: '由派送员蔡小坤同志配送,电话:', |
||||
createTime: '2019-10-24 15: 26: 41', |
||||
status: 'DELIVERING', |
||||
phone: '16677778888', |
||||
statusName: '运输中', |
||||
isMainNode: true |
||||
}, |
||||
{ |
||||
acceptStation: '已到XXX小区快递点', |
||||
createTime: '2019-10-24 15: 26: 41', |
||||
status: 'DELIVERING', |
||||
phone: '', |
||||
statusName: '运输中', |
||||
isMainNode: false |
||||
}, |
||||
{ |
||||
acceptStation: '已到海宁集散中心', |
||||
createTime: '2019-10-24 15: 26: 18', |
||||
status: 'DELIVERING', |
||||
phone: '', |
||||
statusName: '运输中', |
||||
isMainNode: false |
||||
}, |
||||
{ |
||||
acceptStation: '已到杭州集散中心', |
||||
createTime: '2019-10-24 15: 26: 07', |
||||
status: 'DELIVERING', |
||||
phone: '', |
||||
statusName: '运输中', |
||||
isMainNode: false |
||||
}, |
||||
{ |
||||
acceptStation: '包裹已到达余杭区集散中心', |
||||
createTime: '2019-10-24 15: 25: 54', |
||||
status: 'DELIVERING', |
||||
phone: '', |
||||
statusName: '运输中', |
||||
isMainNode: false |
||||
}, |
||||
{ |
||||
acceptStation: '快递员已上门取件', |
||||
createTime: '2019-10-24 15: 25: 17', |
||||
status: 'DELIVERING', |
||||
phone: '', |
||||
statusName: '已揽收', |
||||
isMainNode: false |
||||
}, |
||||
{ |
||||
acceptStation: '等待快递员上门揽件', |
||||
createTime: '2019-10-24 15: 25: 00', |
||||
status: 'WATTING_DELIVER', |
||||
phone: '', |
||||
statusName: '已发货', |
||||
isMainNode: true |
||||
}, |
||||
{ |
||||
acceptStation: '您的包裹正在打包', |
||||
createTime: '2019-10-24 15: 24: 00', |
||||
status: 'WATTING_DELIVER', |
||||
phone: '', |
||||
statusName: '待发货', |
||||
isMainNode: false |
||||
}, |
||||
{ |
||||
acceptStation: '订单支付成功,等待商家发货', |
||||
createTime: '2019-10-24 15: 22: 30', |
||||
status: 'PAYED', |
||||
statusName: '已支付', |
||||
isMainNode: true |
||||
}, |
||||
{ |
||||
acceptStation: '订单提交成功', |
||||
createTime: '2019-10-24 15: 22: 00', |
||||
status: 'WATTING_PAY', |
||||
statusName: '已下单', |
||||
isMainNode: true |
||||
} |
||||
] */ |
||||
} |
||||
}, |
||||
components:{ |
||||
wybPopup, |
||||
trackNode |
||||
}, |
||||
created(){ |
||||
// this.tracesData=dataList.data; |
||||
// this.tracesData.logisticsTraceDetails=this.tracesData.logisticsTraceDetails.sort((item,item2)=>{ |
||||
|
||||
// if(item.logisticsStatus == 'TRANSPORT'){ |
||||
// item.isMainNode=false; |
||||
// }else{ |
||||
// item.isMainNode=true; |
||||
// } |
||||
|
||||
// return item2.time - item.time; |
||||
|
||||
// }) |
||||
}, |
||||
methods:{ |
||||
show(logisticsNo){ |
||||
console.log(logisticsNo) |
||||
this.$refs.popup.show(); |
||||
this.getLogisticsMsg(logisticsNo) |
||||
}, |
||||
//查询物流信息 |
||||
getLogisticsMsg(num){ |
||||
let params ={ |
||||
num:num |
||||
} |
||||
getLogisticsMsg(params).then(res=>{ |
||||
if (res.return_code == '000000') { |
||||
|
||||
this.tracesData=res.return_data; |
||||
this.tracesData.logisticsTraceDetails =JSON.parse(this.tracesData.logisticsTraceDetails) |
||||
|
||||
this.tracesData.logisticsTraceDetails=this.tracesData.logisticsTraceDetails.sort((item,item2)=>{ |
||||
|
||||
if(item.logisticsStatus == 'TRANSPORT'){ |
||||
item.isMainNode=false; |
||||
}else{ |
||||
item.isMainNode=true; |
||||
} |
||||
return item2.time - item.time; |
||||
}) |
||||
}else{ |
||||
uni.showToast({ |
||||
title: res.return_msg, |
||||
icon: 'none', |
||||
duration: 2000 |
||||
}) |
||||
} |
||||
}) |
||||
}, |
||||
// 复制 |
||||
copyText(text){ |
||||
// #ifdef H5 |
||||
this.$copyText(text).then( |
||||
res => { |
||||
uni.showToast({ |
||||
title: '复制成功' |
||||
}) |
||||
} |
||||
) |
||||
// #endif |
||||
// #ifndef H5 |
||||
uni.setClipboardData({ |
||||
data: text, |
||||
success: () => { |
||||
uni.showToast({ |
||||
title: '复制成功' |
||||
}) |
||||
} |
||||
}) |
||||
// #endif |
||||
|
||||
|
||||
}, |
||||
// 打电话 |
||||
callPhone(){ |
||||
uni.showModal({ |
||||
title: '客服', |
||||
content: '4006780738', |
||||
success: function(res) { |
||||
if (res.confirm) { |
||||
uni.makePhoneCall({ |
||||
phoneNumber: '4006780738', //电话号码 |
||||
success: function(e) { |
||||
console.log(e); |
||||
}, |
||||
fail: function(e) { |
||||
console.log(e); |
||||
|
||||
} |
||||
}) |
||||
} |
||||
} |
||||
}) |
||||
}, |
||||
|
||||
|
||||
} |
||||
} |
||||
</script> |
||||
|
||||
<style lang="scss" scoped> |
||||
.wuliu-img{ |
||||
width: 30px; |
||||
height: 30px; |
||||
border-radius: 50%; |
||||
} |
||||
|
||||
.border-b{ |
||||
border-bottom: 2px solid #f6f6f6; |
||||
} |
||||
|
||||
.wuliupop{ |
||||
padding: 50px 10px 10px; |
||||
} |
||||
.pop-title{ |
||||
text-align: center; |
||||
height: 50px; |
||||
line-height: 50px; |
||||
font-size: 18px; |
||||
position: fixed; |
||||
top:0; |
||||
left: 0; |
||||
right: 0; |
||||
background-color: #f6f6f6; |
||||
} |
||||
</style> |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 645 B After Width: | Height: | Size: 645 B |
Before Width: | Height: | Size: 862 B After Width: | Height: | Size: 862 B |
Before Width: | Height: | Size: 769 B After Width: | Height: | Size: 769 B |
Before Width: | Height: | Size: 519 B After Width: | Height: | Size: 519 B |
Before Width: | Height: | Size: 586 B After Width: | Height: | Size: 586 B |
Before Width: | Height: | Size: 815 B After Width: | Height: | Size: 815 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 433 B After Width: | Height: | Size: 433 B |
Before Width: | Height: | Size: 466 B After Width: | Height: | Size: 466 B |
Before Width: | Height: | Size: 574 B After Width: | Height: | Size: 574 B |
Before Width: | Height: | Size: 737 B After Width: | Height: | Size: 737 B |
After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 1.7 KiB |