完善订单详情
This commit is contained in:
parent
c873ca2739
commit
2125d4285b
|
@ -81,6 +81,28 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="detail-section">
|
||||||
|
<view class="section-title">取货地址</view>
|
||||||
|
<view class="address-box">
|
||||||
|
<text class="iconfont icon-dingwei"></text>
|
||||||
|
<view>
|
||||||
|
<view class="detail">
|
||||||
|
<text>{{ order.pickupAddress }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="detail-section">
|
||||||
|
<view class="section-title">卸货地址</view>
|
||||||
|
<view class="address-box">
|
||||||
|
<text class="iconfont icon-dingwei"></text>
|
||||||
|
<view>
|
||||||
|
<view class="detail">
|
||||||
|
<text>{{ order.unloadAddress }}</text>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<view class="detail-section">
|
<view class="detail-section">
|
||||||
<text class="price-box">¥ {{ utils.formatNumber(order.price, 2) }}</text>
|
<text class="price-box">¥ {{ utils.formatNumber(order.price, 2) }}</text>
|
||||||
|
@ -92,10 +114,14 @@
|
||||||
<text class="text">客服</text>
|
<text class="text">客服</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="action">
|
<view class="action">
|
||||||
<get-action :order="order" @postPrice="postPrice(order.id)" />
|
<get-action
|
||||||
|
:order="order"
|
||||||
|
@postPrice="postPrice(order.id)"
|
||||||
|
@getOrder="getOrder({ id: order.id, listType: order.listType })"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<get-post-price v-show="showPriceModal" @close="showPriceModal = false" @confirm="showPriceModal = false" />
|
<get-post-price v-show="showPriceModal" @close="showPriceModal = false" @post="rcvPostPrice" />
|
||||||
</app-layout>
|
</app-layout>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -154,10 +180,48 @@ export default {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 报价
|
||||||
|
*/
|
||||||
postPrice(id) {
|
postPrice(id) {
|
||||||
this.$store.commit("order/setPostId", id);
|
this.$store.commit("order/setPostId", id);
|
||||||
this.showPriceModal = true;
|
this.showPriceModal = true;
|
||||||
},
|
},
|
||||||
|
/**
|
||||||
|
* 确认价格
|
||||||
|
*/
|
||||||
|
rcvPostPrice(e) {
|
||||||
|
this.showPriceModal = false;
|
||||||
|
this.getOrder({
|
||||||
|
id: e.id,
|
||||||
|
listType: "t2",
|
||||||
|
price: e.price,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
/**
|
||||||
|
* 接单
|
||||||
|
*/
|
||||||
|
getOrder(order) {
|
||||||
|
let requestData = {
|
||||||
|
id: order.id,
|
||||||
|
};
|
||||||
|
if (order.price) {
|
||||||
|
requestData.money = order.price;
|
||||||
|
}
|
||||||
|
this.$models.get
|
||||||
|
.getOrder({
|
||||||
|
api: "get.getOrder." + order.listType,
|
||||||
|
data: requestData,
|
||||||
|
})
|
||||||
|
.then((message) => {
|
||||||
|
this.$utils.toast(message).then(() => {
|
||||||
|
this.switchTab(this.tabIndex);
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch((e) => {
|
||||||
|
this.$utils.toast(e);
|
||||||
|
});
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 获取详情
|
* 获取详情
|
||||||
*/
|
*/
|
||||||
|
@ -201,8 +265,10 @@ export default {
|
||||||
orderId: response.order,
|
orderId: response.order,
|
||||||
username: "用户名称",
|
username: "用户名称",
|
||||||
cate: "待返数据",
|
cate: "待返数据",
|
||||||
createTime: response.time,
|
createTime: response.times,
|
||||||
serviceTime: response.starttime,
|
serviceTime: response.starttime,
|
||||||
|
pickupAddress: response.address,
|
||||||
|
unloadAddress: response.addressb,
|
||||||
state: response.status,
|
state: response.status,
|
||||||
price: response.money,
|
price: response.money,
|
||||||
};
|
};
|
||||||
|
@ -342,11 +408,11 @@ export default {
|
||||||
.contact {
|
.contact {
|
||||||
color: #000000;
|
color: #000000;
|
||||||
line-height: 26rpx;
|
line-height: 26rpx;
|
||||||
|
margin-bottom: 16rpx;
|
||||||
}
|
}
|
||||||
.detail {
|
.detail {
|
||||||
color: #2d2d2d;
|
color: #2d2d2d;
|
||||||
line-height: 36rpx;
|
line-height: 36rpx;
|
||||||
margin-top: 16rpx;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.price-box {
|
.price-box {
|
||||||
|
|
Loading…
Reference in New Issue