Commit 31a0852c by 高淑倩

物流_申请退货

parent 72f64804
...@@ -11,7 +11,10 @@ wxService.page({ ...@@ -11,7 +11,10 @@ wxService.page({
*/ */
data: { data: {
logisData:[], logisData:[],
orderId:'' orderId:'',
orderCode:'',
orderLogisticsNo: '',
params: null
}, },
/** /**
...@@ -25,16 +28,27 @@ wxService.page({ ...@@ -25,16 +28,27 @@ wxService.page({
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function () { onShow: function () {
const { code, logisticsNo,id} = this.options const { params } = this.options
console.log('-----code----', code,id) let detail = JSON.parse(params)
if(code){
// supplierCode code
if(detail.id){
this.setData({ this.setData({
orderId: id params,
orderId: detail.id,
orderCode: detail.logistic.supplierCode,
orderLogisticsNo: detail.logistic.code
},()=>{ },()=>{
this.getLogisticsInfo(code, logisticsNo) const {orderCode, orderLogisticsNo} = this.data
this.getLogisticsInfo(orderCode, orderLogisticsNo)
}) })
} }
}, },
handelReturnGood() {
const {params} = this.data
// 退款申请
wxService.router(`/pages/refund/refund`).search({params})
},
// 确认收货 // 确认收货
handelConfirmReceipt() { handelConfirmReceipt() {
const { orderId } = this.data const { orderId } = this.data
......
<!--pages/logistics/logistics.wxml--> <!--pages/logistics/logistics.wxml-->
<view class="page-logistics" wx:if="{{logisData.length}}"> <view class="page-logistics" wx:if="{{orderId}}">
<view class="header-wrap"> <view class="header-wrap">
<image class="header-bg" src="/assets/imgs/7_1_0/logistics-bg.jpg" /> <image class="header-bg" src="/assets/imgs/7_1_0/logistics-bg.jpg" />
<view class="logistics-status"> <view class="logistics-status">
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
<view class="button-wrap"> <view class="button-wrap">
<button class="btn btn-primary btn-lg" bindtap="handelConfirmReceipt">确认收货</button> <button class="btn btn-primary btn-lg" bindtap="handelConfirmReceipt">确认收货</button>
<button class="btn btn-lg btn-gray">申请退货</button> <button class="btn btn-lg btn-gray" bindtap="handelReturnGood">申请退货</button>
</view> </view>
</view> </view>
<view wx:else class="df no-logis"> <view wx:else class="df no-logis">
......
...@@ -142,6 +142,15 @@ wxService.page({ ...@@ -142,6 +142,15 @@ wxService.page({
}) })
}, },
// 查看物流
checkLogistics(e) {
console.log('----', e)
const { detail } = e.currentTarget.dataset
let params = JSON.stringify(detail)
console.log("params", params)
// 退款申请
wxService.router(`/pages/logistics/logistics`).search({params})
},
// 申请退款 // 申请退款
handelRequestRefund(e) { handelRequestRefund(e) {
console.log('----', e) console.log('----', e)
......
<view class="page-order-detail"> <view class="page-order-detail">
<view class="header-wrap" style="background-image:url('/assets/imgs/7_1_0/rf_bgc.jpg')"> <view class="header-wrap" style="background-image:url('/assets/imgs/7_1_0/rf_bgc.jpg')">
<view class="refund-status"> <view class="refund-status">
<view class="look-logistics" wx-if="{{detail.status == 'D'}}"> <view
<navigator url="/pages/logistics/logistics?code={{detail.logistic.supplierCode}}&logisticsNo={{detail.logistic.code}}" hover-class="none"> class="look-logistics"
wx-if="{{detail.status == 'D'}}"
data-id="{{detail.id}}"
data-code="{{detail.logistic.supplierCode}}"
data-logisticsNo="{{detail.logistic.code}}"
data-detail="{{detail}}"
bindtap="checkLogistics"
>
<button class="btn btn-primary btn-outline">查看物流</button> <button class="btn btn-primary btn-outline">查看物流</button>
</navigator>
</view> </view>
<!--订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货) --> <!--订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货) -->
<view class="order-status" wx-if="{{detail.status == 'C'}}"> <view class="order-status" wx-if="{{detail.status == 'C'}}">
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
"list": [] "list": []
}, },
"miniprogram": { "miniprogram": {
"current": 44, "current": 25,
"list": [ "list": [
{ {
"id": -1, "id": -1,
...@@ -204,10 +204,10 @@ ...@@ -204,10 +204,10 @@
"scene": null "scene": null
}, },
{ {
"id": -1, "id": 25,
"name": "查看物流", "name": "查看物流",
"pathName": "pages/logistics/logistics", "pathName": "pages/logistics/logistics",
"query": "", "query": "code=yd&logisticsNo=4300636183062&id=624597346797359104",
"scene": null "scene": null
}, },
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment