Commit 31a0852c by 高淑倩

物流_申请退货

parent 72f64804
......@@ -11,7 +11,10 @@ wxService.page({
*/
data: {
logisData:[],
orderId:''
orderId:'',
orderCode:'',
orderLogisticsNo: '',
params: null
},
/**
......@@ -25,16 +28,27 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
const { code, logisticsNo,id} = this.options
console.log('-----code----', code,id)
if(code){
const { params } = this.options
let detail = JSON.parse(params)
// supplierCode code
if(detail.id){
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() {
const { orderId } = this.data
......
<!--pages/logistics/logistics.wxml-->
<view class="page-logistics" wx:if="{{logisData.length}}">
<view class="page-logistics" wx:if="{{orderId}}">
<view class="header-wrap">
<image class="header-bg" src="/assets/imgs/7_1_0/logistics-bg.jpg" />
<view class="logistics-status">
......@@ -57,7 +57,7 @@
<view class="button-wrap">
<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 wx:else class="df no-logis">
......
......@@ -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) {
console.log('----', e)
......
<view class="page-order-detail">
<view class="header-wrap" style="background-image:url('/assets/imgs/7_1_0/rf_bgc.jpg')">
<view class="refund-status">
<view class="look-logistics" wx-if="{{detail.status == 'D'}}">
<navigator url="/pages/logistics/logistics?code={{detail.logistic.supplierCode}}&logisticsNo={{detail.logistic.code}}" hover-class="none">
<button class="btn btn-primary btn-outline">查看物流</button>
</navigator>
<view
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>
</view>
<!--订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货) -->
<view class="order-status" wx-if="{{detail.status == 'C'}}">
......
......@@ -39,7 +39,7 @@
"list": []
},
"miniprogram": {
"current": 44,
"current": 25,
"list": [
{
"id": -1,
......@@ -204,10 +204,10 @@
"scene": null
},
{
"id": -1,
"id": 25,
"name": "查看物流",
"pathName": "pages/logistics/logistics",
"query": "",
"query": "code=yd&logisticsNo=4300636183062&id=624597346797359104",
"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