Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
高淑倩
7-Eleven
Commits
1a7ffa5d
Commit
1a7ffa5d
authored
Sep 21, 2019
by
高淑倩
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
订单列表查看物流
parent
6080b63d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
38 deletions
+53
-38
order.js
src/pages/order/order.js
+39
-32
order.wxml
src/pages/order/order.wxml
+14
-6
No files found.
src/pages/order/order.js
View file @
1a7ffa5d
...
@@ -61,23 +61,23 @@ wxService.page({
...
@@ -61,23 +61,23 @@ wxService.page({
*/
*/
onShow
:
function
()
{
onShow
:
function
()
{
console
.
log
(
'currentIndex'
,
this
.
data
.
currentIndex
)
console
.
log
(
'currentIndex'
,
this
.
data
.
currentIndex
)
const
{
currentIndex
}
=
this
.
data
const
{
currentIndex
}
=
this
.
data
if
(
currentIndex
==
5
)
{
if
(
currentIndex
==
5
)
{
this
.
getRefundList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
)
this
.
getRefundList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
)
}
else
{
}
else
{
this
.
setData
({
this
.
setData
({
pageNo
:
1
,
pageNo
:
1
,
pageSize
:
5
pageSize
:
5
},()
=>
{
},
()
=>
{
const
params
=
{
trade
:
this
.
data
.
trade
}
const
params
=
{
trade
:
this
.
data
.
trade
}
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
,
params
)
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
,
params
)
// this.initOrderList(this.data.pageNo, this.data.pageSize, this.data.trade)
// this.initOrderList(this.data.pageNo, this.data.pageSize, this.data.trade)
})
})
}
}
},
},
// 确认收货
// 确认收货
handelConfirmReceipt
(
e
)
{
handelConfirmReceipt
(
e
)
{
...
@@ -163,20 +163,27 @@ if(currentIndex == 5){
...
@@ -163,20 +163,27 @@ 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
const
{
id
}
=
e
.
currentTarget
.
dataset
wxService
.
router
(
`/pages/orderDetail/orderDetail?id=
${
id
}
`
)
wxService
.
router
(
`/pages/orderDetail/orderDetail?id=
${
id
}
`
)
},
},
// 退货寄回
// 退货寄回
handelCheckRfSend
(
e
){
handelCheckRfSend
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
const
{
id
}
=
e
.
currentTarget
.
dataset
console
.
log
(
'handelCheckRfSend'
,
id
)
console
.
log
(
'handelCheckRfSend'
,
id
)
},
},
// 取消退款
// 取消退款
handelCancelRefund
(
e
){
handelCancelRefund
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
const
{
id
}
=
e
.
currentTarget
.
dataset
console
.
log
(
'取消退款'
,
id
)
console
.
log
(
'取消退款'
,
id
)
this
.
handelRevokeRefund
(
id
)
this
.
handelRevokeRefund
(
id
)
},
},
handelRevokeRefund
(
id
)
{
handelRevokeRefund
(
id
)
{
...
@@ -184,8 +191,8 @@ if(currentIndex == 5){
...
@@ -184,8 +191,8 @@ if(currentIndex == 5){
title
:
'加载中'
,
title
:
'加载中'
,
mask
:
true
mask
:
true
})
})
const
params
=
{
id
}
const
params
=
{
id
}
wxService
.
post
(
`/sale/refund/buyer/cancel`
,
params
).
then
(
res
=>
{
wxService
.
post
(
`/sale/refund/buyer/cancel`
,
params
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
if
(
result
==
0
)
{
...
@@ -196,7 +203,7 @@ if(currentIndex == 5){
...
@@ -196,7 +203,7 @@ if(currentIndex == 5){
});
});
setTimeout
(()
=>
{
setTimeout
(()
=>
{
wxService
.
router
(
'/pages/order/order'
)
wxService
.
router
(
'/pages/order/order'
)
},
200
)
},
200
)
}
}
}
}
})
})
...
@@ -228,11 +235,11 @@ if(currentIndex == 5){
...
@@ -228,11 +235,11 @@ if(currentIndex == 5){
this
.
getRefundList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
)
this
.
getRefundList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
)
}
else
{
}
else
{
this
.
setData
({
this
.
setData
({
trade
:
status
trade
:
status
},
()
=>
{
},
()
=>
{
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
,
status
)
this
.
initOrderList
(
this
.
data
.
pageNo
,
this
.
data
.
pageSize
,
status
)
})
})
}
}
})
})
},
},
...
@@ -276,7 +283,7 @@ if(currentIndex == 5){
...
@@ -276,7 +283,7 @@ if(currentIndex == 5){
this
.
setData
({
this
.
setData
({
orderList
:
this
.
data
.
pageNo
==
1
?
[...
data
]
:
[...
this
.
data
.
orderList
,
...
data
],
orderList
:
this
.
data
.
pageNo
==
1
?
[...
data
]
:
[...
this
.
data
.
orderList
,
...
data
],
noMoreFlag
:
data
.
length
<
pageSize
?
true
:
false
noMoreFlag
:
data
.
length
<
pageSize
?
true
:
false
},
()
=>
{
},
()
=>
{
// this.data.orderList.forEach(item =>{
// this.data.orderList.forEach(item =>{
// console.log('item', item)
// console.log('item', item)
// // 退单列表
// // 退单列表
...
@@ -293,7 +300,7 @@ if(currentIndex == 5){
...
@@ -293,7 +300,7 @@ if(currentIndex == 5){
this
.
setData
({
this
.
setData
({
no_data
:
this
.
data
.
orderList
.
length
?
true
:
false
no_data
:
this
.
data
.
orderList
.
length
?
true
:
false
})
})
})
})
}
}
}
}
...
@@ -325,11 +332,11 @@ if(currentIndex == 5){
...
@@ -325,11 +332,11 @@ if(currentIndex == 5){
// })
// })
// }
// }
// })
// })
// }
// }
// }
// }
// })
// })
// },
// },
/**
/**
...
...
src/pages/order/order.wxml
View file @
1a7ffa5d
...
@@ -140,14 +140,22 @@
...
@@ -140,14 +140,22 @@
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelToPay">立即支付</button>
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelToPay">立即支付</button>
</view>
</view>
<view class="order-status" wx-if="{{item.status == 'P'}}">
<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
<button class="btn btn-sm btn-default" data-id="{{item.id}}">查看物流</button>
class="btn btn-sm btn-default"
</navigator>
data-id="{{item.id}}"
data-detail="{{item}}"
bindtap="checkLogistics"
>查看物流
</button>
</view>
</view>
<view class="order-status" wx-if="{{item.status == 'D'}}">
<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
<button class="btn btn-sm btn-default" data-id="{{item.id}}">查看物流</button>
class="btn btn-sm btn-default"
</navigator>
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>
<button class="btn btn-sm btn-primary btn-outline" data-id="{{item.id}}" bindtap="handelConfirmReceipt">确认收货</button>
</view>
</view>
<view class="order-status" wx-if="{{item.status == 'R'}}" />
<view class="order-status" wx-if="{{item.status == 'R'}}" />
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment