Commit abb5b0e1 by 赵雅纹

Merge branch 'dev_7.1.0' into fixbug-ZYW

parents 365ae6b8 acba3e72
/* component/tabSort/tabSort.wxss */
/* @import '/base/base.wxss'; */
.tab-sort {
display: flex;
white-space: nowrap;
......@@ -40,14 +41,3 @@
display: flex;
align-items: center;
}
button {
background-color: transparent;
border-radius:0;
padding: 0;
}
button::after{
border:none;
}
.button-hover, .button-active{
background-color:transparent;
}
\ No newline at end of file
......@@ -3,7 +3,6 @@ const app = getApp()
const wxService = require('../../utils/wxService')
const utils = require('../../utils/util')
const envInfo = require('../../config/index').envInfo
const { memberId } = wx.getStorageSync('_baseUserInfo')
wxService.page({
......@@ -44,12 +43,13 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
const { memberId, member } = wx.getStorageSync('_baseUserInfo')
this.getAddressList()
},
// 获取地址列表
getAddressList(){
const { memberId } = wx.getStorageSync('_baseUserInfo')
wxService.post(`/member/addressManage/getall`,{
userId: memberId
}).then(res => {
......@@ -90,6 +90,7 @@ wxService.page({
//设置默认地址
settingDefalutAddress(e){
const { memberId } = wx.getStorageSync('_baseUserInfo')
console.log(e)
let params = {
userId: memberId,
......
......@@ -61,23 +61,23 @@ wxService.page({
*/
onShow: function () {
console.log('currentIndex', this.data.currentIndex)
const {currentIndex} = this.data
if(currentIndex == 5){
this.getRefundList(this.data.pageNo, this.data.pageSize)
} else {
this.setData({
pageNo: 1,
pageSize: 5
},()=>{
const params = { trade: this.data.trade }
this.initOrderList(this.data.pageNo, this.data.pageSize, params)
// this.initOrderList(this.data.pageNo, this.data.pageSize, this.data.trade)
})
}
const { currentIndex } = this.data
if (currentIndex == 5) {
this.getRefundList(this.data.pageNo, this.data.pageSize)
} else {
this.setData({
pageNo: 1,
pageSize: 5
}, () => {
const params = { trade: this.data.trade }
this.initOrderList(this.data.pageNo, this.data.pageSize, params)
// this.initOrderList(this.data.pageNo, this.data.pageSize, this.data.trade)
})
}
},
// 确认收货
handelConfirmReceipt(e) {
......@@ -163,20 +163,38 @@ if(currentIndex == 5){
}
})
},
// 查看物流
checkLogistics(e) {
const { detail } = e.currentTarget.dataset
let params = JSON.stringify(detail)
// 退款申请
wxService.router(`/pages/logistics/logistics`).search({ params })
},
// 查看详情
handelCheckRfDetail(e){
handelCheckRfDetail(e) {
const { id } = e.currentTarget.dataset
wxService.router(`/pages/orderDetail/orderDetail?id=${id}`)
},
// 订单详情
handelDetail(e) {
// const {detail} = e.currentTarget.dataset
const { id } = e.currentTarget.dataset
wxService.router(`/pages/orderDetail/orderDetail?id=${id}`)
},
// 退单详情
handelDetailRf(e) {
const { id } = e.currentTarget.dataset
wxService.router(`/pages/refundDetail/refundDetail?id=${id}`)
},
// 退货寄回
handelCheckRfSend(e){
handelCheckRfSend(e) {
const { id } = e.currentTarget.dataset
console.log('handelCheckRfSend', id )
console.log('handelCheckRfSend', id)
},
// 取消退款
handelCancelRefund(e){
handelCancelRefund(e) {
const { id } = e.currentTarget.dataset
console.log('取消退款', id )
console.log('取消退款', id)
this.handelRevokeRefund(id)
},
handelRevokeRefund(id) {
......@@ -184,8 +202,8 @@ if(currentIndex == 5){
title: '加载中',
mask: true
})
const params = {id}
wxService.post(`/sale/refund/buyer/cancel`,params).then(res => {
const params = { id }
wxService.post(`/sale/refund/buyer/cancel`, params).then(res => {
if (res) {
const { result, data } = res.data
if (result == 0) {
......@@ -196,22 +214,12 @@ if(currentIndex == 5){
});
setTimeout(() => {
wxService.router('/pages/order/order')
},200)
}, 200)
}
}
})
},
// 订单详情
handelDetail(e) {
// const {detail} = e.currentTarget.dataset
const { id } = e.currentTarget.dataset
wxService.router(`/pages/orderDetail/orderDetail?id=${id}`)
},
// 退单详情
handelDetailRf(e) {
const { id } = e.currentTarget.dataset
wxService.router(`/pages/refundDetail/refundDetail?id=${id}`)
},
//点击切换tab
switchTab(e) {
const { type, status } = e.currentTarget.dataset
......@@ -228,11 +236,11 @@ if(currentIndex == 5){
this.getRefundList(this.data.pageNo, this.data.pageSize)
} else {
this.setData({
trade:status
},()=>{
trade: status
}, () => {
this.initOrderList(this.data.pageNo, this.data.pageSize, status)
})
}
})
},
......@@ -276,7 +284,7 @@ if(currentIndex == 5){
this.setData({
orderList: this.data.pageNo == 1 ? [...data] : [...this.data.orderList, ...data],
noMoreFlag: data.length < pageSize ? true : false
},()=>{
}, () => {
// this.data.orderList.forEach(item =>{
// console.log('item', item)
// // 退单列表
......@@ -293,7 +301,7 @@ if(currentIndex == 5){
this.setData({
no_data: this.data.orderList.length ? true : false
})
})
}
}
......@@ -325,11 +333,11 @@ if(currentIndex == 5){
// })
// }
// })
// }
// }
// })
// },
/**
......
......@@ -109,25 +109,25 @@
<view wx:if="{{currentIndex == 5}}">
<view class="btn-group">
<view class="order-status-rf" wx-if="{{item.status == 'C'}}">
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfDetail">查看详情</button>
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelDetailRf">查看详情</button>
</view>
<view class="order-status-rf" wx-if="{{item.status == 'N'}}">
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfDetail">查看详情</button>
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelDetailRf">查看详情</button>
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelCancelRefund">取消退款</button>
</view>
<view class="order-status-rf" wx-if="{{item.status == 'A'}}">
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfDetail">查看详情</button>
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelDetailRf">查看详情</button>
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfSend">退货寄回</button>
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelCancelRefund">取消退款</button>
</view>
<view class="order-status-rf" wx-if="{{item.status == 'R'}}">
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfDetail">查看详情</button>
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelDetailRf">查看详情</button>
</view>
<view class="order-status-rf" wx-if="{{item.status == 'RJ'}}">
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfDetail">查看详情</button>
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelDetailRf">查看详情</button>
</view>
<view class="order-status-rf" wx-if="{{item.status == 'D'}}">
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelCheckRfDetail">查看详情</button>
<button class="btn btn-sm btn-default" data-id="{{item.id}}" bindtap="handelDetailRf">查看详情</button>
</view>
</view>
</view>
......@@ -140,14 +140,22 @@
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelToPay">立即支付</button>
</view>
<view class="order-status" wx-if="{{item.status == 'P'}}">
<navigator url="/pages/logistics/logistics?code={{item.logistic.supplierCode}}&logisticsNo={{item.logistic.code}}&id={{item.id}}" hover-class="none">
<button class="btn btn-sm btn-default" data-id="{{item.id}}">查看物流</button>
</navigator>
<button
class="btn btn-sm btn-default"
data-id="{{item.id}}"
data-detail="{{item}}"
bindtap="checkLogistics"
>查看物流
</button>
</view>
<view class="order-status" wx-if="{{item.status == 'D'}}">
<navigator url="/pages/logistics/logistics?code={{item.logistic.supplierCode}}&logisticsNo={{item.logistic.code}}&id={{item.id}}" hover-class="none">
<button class="btn btn-sm btn-default" data-id="{{item.id}}">查看物流</button>
</navigator>
<button
class="btn btn-sm btn-default"
data-id="{{item.id}}"
data-detail="{{item}}"
bindtap="checkLogistics"
>查看物流
</button>
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelConfirmReceipt">确认收货</button>
</view>
<view class="order-status" wx-if="{{item.status == 'R'}}" />
......
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