|
@@ -4,48 +4,51 @@
|
|
|
|
|
|
<view class="contacts">
|
|
<view class="contacts">
|
|
<view class="name">
|
|
<view class="name">
|
|
- 刘亦菲
|
|
|
|
|
|
+ {{order.poststation.contacts}}
|
|
</view>
|
|
</view>
|
|
<view class="phone">
|
|
<view class="phone">
|
|
- 86-18112512562
|
|
|
|
|
|
+ {{order.poststation.phone}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="address">
|
|
<view class="address">
|
|
- 广东省广州市花都区合成村2街5号
|
|
|
|
|
|
+ {{order.poststation.address}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="order">
|
|
<view class="order">
|
|
<view class="order-head">
|
|
<view class="order-head">
|
|
- <view class="factory-name">{{order.factory}}</view>
|
|
|
|
- <view v-if="order.status === 0" class="order-status">待付款</view>
|
|
|
|
- <view v-if="order.status === 2" class="order-status">待收货</view>
|
|
|
|
|
|
+ <view class="factory-name">{{order.seller.nickname?order.seller.nickname:'省心直供(该厂家暂未设置昵称)'}}</view>
|
|
|
|
+ <view v-if="order.status === 'wait_pay'" class="order-status">待付款</view>
|
|
|
|
+ <view v-if="order.status === 'wait_deliver'" class="order-status">待发货</view>
|
|
|
|
+ <view v-if="order.status === 'wait_sign'" class="order-status">待签收</view>
|
|
|
|
+ <view v-if="order.status === 'complete'" class="order-status">已完成</view>
|
|
|
|
+ <view v-if="order.status === 'invalid'" class="order-status">已失效</view>
|
|
</view>
|
|
</view>
|
|
<view class="order-info">
|
|
<view class="order-info">
|
|
- <view class="product-item" v-for="product in order.products">
|
|
|
|
|
|
+ <view class="product-item" v-for="product in order.products_json">
|
|
<view class="product-image">
|
|
<view class="product-image">
|
|
- <image class="image" :src="product.image" mode="scaleToFill"></image>
|
|
|
|
|
|
+ <image class="image" :src="product.spec_image" mode="scaleToFill"></image>
|
|
</view>
|
|
</view>
|
|
<view class="product-info">
|
|
<view class="product-info">
|
|
<view class="row">
|
|
<view class="row">
|
|
<view class="name">{{product.name}}</view>
|
|
<view class="name">{{product.name}}</view>
|
|
- <view class="price">¥{{product.price}}</view>
|
|
|
|
|
|
+ <view class="price">¥{{product.spec_price}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="row">
|
|
<view class="row">
|
|
- <view class="spec">{{product.specs_name}}</view>
|
|
|
|
- <view class="num">×{{product.specs_num}}</view>
|
|
|
|
|
|
+ <view class="spec">{{product.spec_name}}</view>
|
|
|
|
+ <view class="num">×{{product.num}}</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="total-price">
|
|
<view class="total-price">
|
|
- 总价 <text class="warning">¥{{order.total}}</text>
|
|
|
|
|
|
+ 总价 <text class="warning">¥{{order.total_amount}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="info">
|
|
<view class="info">
|
|
<view class="title">订单信息</view>
|
|
<view class="title">订单信息</view>
|
|
<view class="row">
|
|
<view class="row">
|
|
<view class="label">订单编号</view>
|
|
<view class="label">订单编号</view>
|
|
- <view>264545121255151212</view>
|
|
|
|
|
|
+ <view>{{order.order_no}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="row">
|
|
<view class="row">
|
|
<view class="label">支付宝交易号</view>
|
|
<view class="label">支付宝交易号</view>
|
|
@@ -53,15 +56,15 @@
|
|
</view>
|
|
</view>
|
|
<view class="row">
|
|
<view class="row">
|
|
<view class="label">创建时间</view>
|
|
<view class="label">创建时间</view>
|
|
- <view>2021-03-14 01:25:01</view>
|
|
|
|
|
|
+ <view>{{order.createtime|datetimeFilter}}</view>
|
|
</view>
|
|
</view>
|
|
- <view class="row">
|
|
|
|
|
|
+ <view class="row" v-if="order.paytime">
|
|
<view class="label">付款时间</view>
|
|
<view class="label">付款时间</view>
|
|
- <view>2021-03-14 01:25:01</view>
|
|
|
|
|
|
+ <view>{{order.paytime|datetimeFilter}}</view>
|
|
</view>
|
|
</view>
|
|
- <view class="row">
|
|
|
|
|
|
+ <view class="row" v-if="order.deliver_time">
|
|
<view class="label">发货时间</view>
|
|
<view class="label">发货时间</view>
|
|
- <view>2021-03-15 01:05:01</view>
|
|
|
|
|
|
+ <view>{{order.deliver_time|datetimeFilter}}</view>
|
|
</view>
|
|
</view>
|
|
<view v-if="false" class="option">
|
|
<view v-if="false" class="option">
|
|
<view class="option-item">
|
|
<view class="option-item">
|
|
@@ -77,8 +80,8 @@
|
|
|
|
|
|
<view class="footer">
|
|
<view class="footer">
|
|
<view class="option">
|
|
<view class="option">
|
|
- <button v-if="order.status === 0" class="pay-btn" type="default">立即支付</button>
|
|
|
|
- <button v-if="order.status === 2" class="confirm-btn" type="default">确认收货</button>
|
|
|
|
|
|
+ <button v-if="order.status === 'wait_pay'" class="pay-btn" type="default">立即支付</button>
|
|
|
|
+ <button v-if="order.status === 'wait_sign'" class="confirm-btn" type="default">确认收货</button>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
@@ -90,30 +93,29 @@
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
order: {
|
|
order: {
|
|
- factory: '省心二号工厂',
|
|
|
|
- products: [{
|
|
|
|
- name: '【三只松鼠】元宵送礼坚果礼盒1498g',
|
|
|
|
- image: 'https://img.alicdn.com/i4/880734502/O1CN01tA7hal1j7xjnwHQZC_!!880734502.jpg',
|
|
|
|
- price: 9.52,
|
|
|
|
- specs_name: "白色",
|
|
|
|
- specs_num: 5
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- name: '泰国Mistine小黄帽防晒霜',
|
|
|
|
- image: 'https://img.alicdn.com/i4/2929053804/O1CN01RSromv1dyHBcuS4I6_!!2929053804.jpg',
|
|
|
|
- price: 9.52,
|
|
|
|
- specs_name: "白色",
|
|
|
|
- specs_num: 5
|
|
|
|
- }
|
|
|
|
- ],
|
|
|
|
- status: 0,
|
|
|
|
- total: '58.51'
|
|
|
|
|
|
+ seller:{}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+ onLoad(option) {
|
|
|
|
+ this.order.id = option.id;
|
|
|
|
+ this.getOrderData();
|
|
|
|
+ },
|
|
methods: {
|
|
methods: {
|
|
|
|
+ getOrderData() {
|
|
|
|
+ this.$http.get({
|
|
|
|
+ url: "/order",
|
|
|
|
+ data: {
|
|
|
|
+ id: this.order.id
|
|
|
|
+ },
|
|
|
|
+ success: (res) => {
|
|
|
|
+ res.data.data.products_json = JSON.parse(res.data.data.products_snapshot)
|
|
|
|
+ this.order = res.data.data
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -220,7 +222,7 @@
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
margin-bottom: 10upx;
|
|
margin-bottom: 10upx;
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
.total-price {
|
|
.total-price {
|
|
@@ -257,7 +259,8 @@
|
|
width: 200upx;
|
|
width: 200upx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .option{
|
|
|
|
|
|
+
|
|
|
|
+ .option {
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-around;
|
|
justify-content: space-around;
|
|
text-align: center;
|
|
text-align: center;
|
|
@@ -265,13 +268,16 @@
|
|
border-top: 2upx solid #EEEEEE;
|
|
border-top: 2upx solid #EEEEEE;
|
|
color: #666666;
|
|
color: #666666;
|
|
margin-top: 40upx;
|
|
margin-top: 40upx;
|
|
- .icon{
|
|
|
|
|
|
+
|
|
|
|
+ .icon {
|
|
margin-right: 10upx;
|
|
margin-right: 10upx;
|
|
}
|
|
}
|
|
- .option-item{
|
|
|
|
|
|
+
|
|
|
|
+ .option-item {
|
|
flex: 1;
|
|
flex: 1;
|
|
}
|
|
}
|
|
- .option-item:first-child{
|
|
|
|
|
|
+
|
|
|
|
+ .option-item:first-child {
|
|
border-right: 2upx solid #EEEEEE;
|
|
border-right: 2upx solid #EEEEEE;
|
|
}
|
|
}
|
|
}
|
|
}
|