|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view>
|
|
|
- <view class="contentBox">
|
|
|
+ <view class="contentBox" @click="expressageClick(form)">
|
|
|
<view style="width: 100%;margin: 0 auto;">
|
|
|
<u-cell-group :border="false">
|
|
|
<u-cell :border="false" center title="快递信息" arrow-direction="down">
|
|
@@ -23,6 +23,10 @@
|
|
|
<view>收货地址:</view>
|
|
|
<view>{{form.recAddress || ''}}</view>
|
|
|
</view>
|
|
|
+ <view class="textBox">
|
|
|
+ <view>货运编号:</view>
|
|
|
+ <view>{{form.expressNo || ''}}</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="contentBox">
|
|
@@ -168,10 +172,10 @@
|
|
|
}).then(res => {
|
|
|
console.log(234324324);
|
|
|
this.form = res.data
|
|
|
- console.log(this.form);
|
|
|
- this.form.orderItemsList.map(item=>{
|
|
|
- item.totalAmount = item.price * item.goodsNum
|
|
|
- })
|
|
|
+ console.log(this.form);
|
|
|
+ this.form.orderItemsList.map(item=>{
|
|
|
+ item.totalAmount = item.price * item.goodsNum
|
|
|
+ })
|
|
|
|
|
|
if (this.form.status == '已发货' ) {
|
|
|
_this.isDisabled = true;
|
|
@@ -195,6 +199,59 @@
|
|
|
confirmReceipt() {
|
|
|
console.log(1);
|
|
|
},
|
|
|
+ // 快递信息点击事件
|
|
|
+ expressageClick(form) {
|
|
|
+ if (form.shipType === '快递') {
|
|
|
+ let reg = /.+?(省|市|自治区|自治州|县|区)/g; // 省市区的正则
|
|
|
+ let from = '';
|
|
|
+ let to = '';
|
|
|
+ // 出发城市
|
|
|
+ if (form.shippingAddress != null) {
|
|
|
+ let fromList = form.shippingAddress.match(reg);
|
|
|
+ for (var i = 0; i < fromList.length; i++) {
|
|
|
+ from += fromList[i]
|
|
|
+ if (fromList.length - 1 > i) {
|
|
|
+ from += '-'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 目的城市
|
|
|
+ if (form.recAddress != null) {
|
|
|
+ let toList = form.recAddress.match(reg);
|
|
|
+ for (var i = 0; i < toList.length; i++) {
|
|
|
+ to += toList[i]
|
|
|
+ if (toList.length - 1 > i) {
|
|
|
+ to += '-'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 地点
|
|
|
+ let city = '';
|
|
|
+ if (from != '') {
|
|
|
+ city += '&from=' + from;
|
|
|
+ }
|
|
|
+ if (to != '') {
|
|
|
+ city += '&to=' + to;
|
|
|
+ }
|
|
|
+ // com: '查询的快递公司的编码',
|
|
|
+ // num: '查询的快递单号',
|
|
|
+ // phone: '收件人或寄件人的手机号或固话',
|
|
|
+ // from: '出发地城市,省-市-区',
|
|
|
+ // to: '目的地城市,省-市-区'
|
|
|
+
|
|
|
+ // url: './transportation?id=' + form.id +'&com=' + form.courierCorporation + '&num=' + form.courierNumber +
|
|
|
+ // '&phone=' + form.corpTel + city
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url: './transportation?id=' + form.id +
|
|
|
+ // '&com=shentong&num=773236818683545&phone=15568850829&to=山东省-青岛市-李沧区'
|
|
|
+ // });
|
|
|
+
|
|
|
+ uni.navigateTo({
|
|
|
+ url: './transportation?id=' + form.id +'&com=' + form.logisticsCorpId + '&num=' + form.expressNo +
|
|
|
+ '&phone=' + form.phone + city
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
//申请退款按钮
|
|
|
requestRefund() {
|
|
|
let _this = this
|