Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
points-mall
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 32ef5a21
authored
Aug 27, 2025
by
wangzhihui
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
申请售后
1 parent
bc378208
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
509 additions
and
175 deletions
api/module/shopmall.js
components/TimeLine/TimeLine.js
components/TimeLine/TimeLine.scss
components/TimeLine/TimeLine.wxml
constants/mine.js
mixins/afterSaleMixin.js
packageMine/pages/order/afterSale_step_one/afterSale_step_one.js
packageMine/pages/order/afterSale_step_two/afterSale_step_two.js
packageMine/pages/order/afterSale_step_two/afterSale_step_two.wxml
packageMine/pages/order/afterSale_step_two/components/RefundInfoBox/RefundInfoBox.js
packageMine/pages/order/afterSale_step_two/components/RefundInfoBox/RefundInfoBox.wxml
packageMine/pages/order/components/Express/Express.js
packageMine/pages/order/components/Express/Express.wxml
packageMine/pages/order/components/Express/formatGoods.wxs
packageMine/pages/order/components/ExpressPop/ExpressPop.json
packageMine/pages/order/components/ExpressPop/ExpressPop.scss
packageMine/pages/order/components/ExpressPop/ExpressPop.wxml
packageMine/pages/order/components/Expressage/Expressage.js
packageMine/pages/order/components/Expressage/Expressage.json
packageMine/pages/order/components/Expressage/Expressage.scss
packageMine/pages/order/components/Expressage/Expressage.wxml
packageMine/pages/order/detail/components/DeliveryInfo/DeliveryInfo.wxml
packageMine/pages/order/detail/components/WaitDeliver/WaitDeliver.js
packageMine/pages/order/detail/components/WaitDeliver/WaitDeliver.json
packageMine/pages/order/detail/components/WaitDeliver/WaitDeliver.scss
packageMine/pages/order/detail/components/WaitDeliver/WaitDeliver.wxml
packageMine/pages/order/detail/detail.js
packageMine/pages/order/detail/detail.json
packageMine/pages/order/detail/detail.wxml
packageMine/pages/order/index/components/OrderActionButtons/OrderActionButtons.js
packageMine/pages/order/index/index.js
project.private.config.json
api/module/shopmall.js
View file @
32ef5a2
...
...
@@ -130,9 +130,13 @@ module.exports = {
orderCode
})
},
/** 申请售后 */
/** 申请售后
-自营商品
*/
afterSale
(
data
)
{
return
api
.
fetch
(
'scrm.api.shopmall.weapp.orderRefund.apply'
,
data
)
return
api
.
fetch
(
'scrm.api.shopmall.points.afterSales.add'
,
data
)
},
/** 申请售后-云中鹤申请售后 */
afterSalesPlatform
(
data
)
{
return
api
.
fetch
(
'scrm.api.shopmall.platform.afterSales.add'
,
data
)
},
//申请售后待审核的订单取消售后
cancelOrder
(
orderCode
)
{
...
...
components/TimeLine/TimeLine.js
View file @
32ef5a2
...
...
@@ -5,6 +5,10 @@ Component({
nodes
:
{
type
:
Array
,
value
:
[],
},
height
:{
type
:
String
,
value
:
'256rpx'
}
},
});
\ No newline at end of file
components/TimeLine/TimeLine.scss
View file @
32ef5a2
/* 时间轴容器 */
.timeline-container
{
padding
:
20rpx
0
;
overflow-y
:
auto
;
}
/* 时间轴节点 */
...
...
@@ -8,6 +9,7 @@
position
:
relative
;
padding-bottom
:
40rpx
;
display
:
flex
;
&
:last-child
{
padding-bottom
:
0
;
}
...
...
@@ -32,7 +34,8 @@
z-index
:
1
;
/* 激活状态的节点点 */
&
.timeline-node__dot--special-small-active
,
//
组合容错
&
.timeline-node__dot--special-small-active
,
//
组合容错
&
.timeline-node__dot--special-active-small
,
&
.timeline-node__dot--small-active-special
,
&
.timeline-node__dot--small-special-active
,
...
...
@@ -48,8 +51,10 @@
&
.timeline-node__dot--active
{
background-color
:
var
(
--
btnColor
);
}
/* 小型节点点 */
&
.timeline-node__dot--special-small-active
,
//
组合容错
&
.timeline-node__dot--special-small-active
,
//
组合容错
&
.timeline-node__dot--special-active-small
,
&
.timeline-node__dot--small-active-special
,
&
.timeline-node__dot--small-special-active
,
...
...
@@ -91,15 +96,18 @@
.timeline-node__content--special-small
,
.timeline-node__content--special-active
,
.timeline-node__content--special-small-active
,
.timeline-node__content--special-active-small
{
.timeline-node__content--special-active-small
{
.timeline-node__title
,
.timeline-node__tip
{
font-weight
:
400
;
font-size
:
24rpx
;
}
.timeline-node__title
{
color
:
#282829
;
}
.timeline-node__tip
{
color
:
#666666
;
}
...
...
@@ -142,10 +150,12 @@
.timeline-node__title
{
color
:
#282829
;
}
.timeline-node__time
{
color
:
#909399
;
}
.timeline-node__tip
{
color
:
#656566
;
}
}
}
\ No newline at end of file
components/TimeLine/TimeLine.wxml
View file @
32ef5a2
<!-- 时间轴组件 -->
<view class="timeline-container">
<view class="timeline-container"
style="height:{{height}}"
>
<view wx:for="{{nodes}}" wx:key="index" class="timeline-node">
<!-- 时间轴节点 -->
<view class="timeline-node__dot-wrapper">
...
...
@@ -11,11 +11,11 @@
<!-- 时间轴内容 -->
<view class="timeline-node__content timeline-node__content--{{item.type}} ">
<view class="timeline-node__header">
<view wx:if="{{item.
title}}" class="timeline-node__title">{{item.title
}}</view>
<view wx:if="{{item.
time}}" class="timeline-node__time">{{item.t
ime}}</view>
<view wx:if="{{item.
statusDesc}}" class="timeline-node__title">{{item.statusDesc
}}</view>
<view wx:if="{{item.
operateTime}}" class="timeline-node__time">{{item.operateT
ime}}</view>
</view>
<view
wx:for="{{item.tips}}" wx:key="index"
class="timeline-node__tip">
{{item}}
<view class="timeline-node__tip">
{{item
.content
}}
</view>
</view>
</view>
...
...
constants/mine.js
View file @
32ef5a2
...
...
@@ -16,7 +16,7 @@ export const OrderStatusEnum = {
AFTER_SALE_REJECTED
:
"10007"
,
//售后审核不通过
AFTER_SALE_REFUNDED
:
"10008"
,
//已退款
AFTER_SALE_REFUNDED_FAILED
:
"10009"
,
//退款失败
AFTER_SALE_REVEAL
:
"10010"
//所有其他状态
AFTER_SALE_REVEAL
:
"10010"
//所有其他状态
};
export
const
OrderStatusTypes
=
{
...
...
@@ -85,7 +85,11 @@ export const ORDER_STATUS = {
index
:
2
,
// 查询订单列表TAB高亮的索引
requestType
:
6
,
// 查询订单列表TAB查询参数
type
:
OrderStatusTypes
.
MY_ORDER
,
//我的 页面 我的订单 显示的项目
buttons
:
null
,
buttons
:
{
[
GoodsSource
.
SELF
]:
[
//自营商品 在商品列表对应的按钮
OrderActionButtons
.
CONFIRM_RECEIVE
],
},
},
[
OrderStatusEnum
.
WAIT_RECEIVE
]:
{
text
:
"待收货"
,
...
...
@@ -97,11 +101,11 @@ export const ORDER_STATUS = {
buttons
:
{
[
GoodsSource
.
SELF
]:
[
//自营商品 在商品列表对应的按钮
OrderActionButtons
.
CONFIRM_RECEIVE
,
OrderActionButtons
.
SHOW_EXPRESS
,
//
OrderActionButtons.SHOW_EXPRESS,
],
[
GoodsSource
.
YZH
]:
[
//云中鹤商品 在商品列表对应的按钮
OrderActionButtons
.
CONFIRM_RECEIVE
,
OrderActionButtons
.
SHOW_EXPRESS
,
//
OrderActionButtons.SHOW_EXPRESS,
],
},
},
...
...
@@ -113,11 +117,11 @@ export const ORDER_STATUS = {
type
:
OrderStatusTypes
.
QUERY_TAB
,
// 查询订单列表显示的TAB项
buttons
:
{
[
GoodsSource
.
SELF
]:
[
//自营商品 在商品列表对应的按钮
OrderActionButtons
.
SHOW_EXPRESS
,
//
OrderActionButtons.SHOW_EXPRESS,
OrderActionButtons
.
AFTER_SALE
,
],
[
GoodsSource
.
YZH
]:
[
//云中鹤商品 在商品列表对应的按钮
OrderActionButtons
.
SHOW_EXPRESS
,
//
OrderActionButtons.SHOW_EXPRESS,
OrderActionButtons
.
AFTER_SALE
,
],
},
...
...
@@ -196,51 +200,67 @@ export const ORDER_STATUS = {
export
const
RefundReason
=
[{
text
:
"商品无货"
,
value
:
1
,
value
:
1
001
,
},
{
text
:
"发货时间问题"
,
value
:
2
,
value
:
100
2
,
},
{
text
:
"不想要了/不喜欢"
,
value
:
3
,
value
:
100
3
,
},
{
text
:
"商品信息填写错误"
,
value
:
4
,
value
:
100
4
,
},
{
text
:
"地址信息填写错误"
,
value
:
5
,
value
:
100
5
,
},
{
text
:
"商品降价"
,
value
:
6
,
value
:
100
6
,
},
{
text
:
"其他"
,
value
:
7
,
value
:
100
7
,
},
{
text
:
"尺码不合适"
,
value
:
8
,
value
:
100
8
,
},
{
text
:
"无理由退货"
,
value
:
9
,
value
:
100
9
,
},
{
text
:
"发票问题"
,
value
:
10
,
value
:
10
10
,
},
{
text
:
"商品与页面描述不符"
,
value
:
11
,
value
:
1
01
1
,
},
{
text
:
"发错货"
,
value
:
12
,
value
:
1012
,
},
{
text
:
"质量问题"
,
value
:
1013
,
},
{
text
:
"买错尺码/颜色/型号"
,
value
:
1014
,
},
{
text
:
"商品缺少或破损"
,
value
:
1015
,
},
{
text
:
"买错了"
,
value
:
1016
,
},
];
...
...
mixins/afterSaleMixin.js
View file @
32ef5a2
...
...
@@ -2,8 +2,8 @@ module.exports = Behavior(
{
data
:
{
afterType
:{
1
:
'我要退款退货'
,
2
:
'我要退款(无需退货)'
1
001
:
'我要退款退货'
,
100
2
:
'我要退款(无需退货)'
}
}
})
\ No newline at end of file
packageMine/pages/order/afterSale_step_one/afterSale_step_one.js
View file @
32ef5a2
...
...
@@ -8,21 +8,25 @@ Page({
afterSaleList
:
[
{
active
:
true
,
value
:
2
value
:
1001
},
{
value
:
1
value
:
1
002
}
]
},
choose
(
e
)
{
console
.
log
(
e
)
let
{
index
}
=
e
.
currentTarget
.
dataset
let
{
afterSaleList
}
=
this
.
data
let
{
afterSaleList
}
=
this
.
data
,
returnType
;
afterSaleList
.
map
(
i
=>
(
i
.
active
=
false
))
afterSaleList
[
index
].
active
=
true
returnType
=
afterSaleList
[
index
].
value
this
.
setData
({
afterSaleList
})
this
.
triggerEvent
(
'returnType'
,{
returnType
})
},
click
()
{
let
{
...
...
packageMine/pages/order/afterSale_step_two/afterSale_step_two.js
View file @
32ef5a2
import
{
afterSaleMixin
}
from
"~/mixins/index"
;
import
{
RefundReason
}
from
"~/constants/mine.js"
;
import
{
afterSaleMixin
}
from
"~/mixins/index"
;
import
{
RefundReason
}
from
"~/constants/mine.js"
;
Page
({
behaviors
:
[
afterSaleMixin
],
...
...
@@ -18,7 +22,10 @@ Page({
wx
.
p
.
router
.
getRouterParams
(
options
).
then
((
params
)
=>
{
if
(
params
.
imgUrls
)
imgUrls
=
params
.
imgUrls
;
this
.
setData
({
orderObj
:
params
,
orderObj
:
{
...
params
,
returnType
:
1001
//数据初始化
},
imgUrls
,
maxRefundCount
:
params
.
refundCount
,
});
...
...
@@ -26,18 +33,25 @@ Page({
},
input
(
e
)
{
this
.
setData
({
"orderObj.re
mark
"
:
e
.
detail
.
value
,
"orderObj.re
turnContent
"
:
e
.
detail
.
value
,
});
},
changeRefundCount
(
e
)
{
this
.
setData
({
"orderObj.refundCount"
:
e
.
detail
.
value
"orderObj.applyQty"
:
e
.
detail
.
value
});
},
radioChange
(
e
)
{
console
.
log
(
e
)
const
value
=
e
.
detail
.
value
this
.
setData
({
"orderObj.returnReasonType"
:
value
,
});
},
radioChange
(
e
)
{
const
value
=
e
.
detail
.
item
.
valu
e
changeReturnType
(
e
)
{
const
returnType
=
e
.
detail
.
returnTyp
e
this
.
setData
({
"orderObj.re
ason"
:
valu
e
,
"orderObj.re
turnType"
:
returnTyp
e
,
});
},
showRefundCount
()
{
...
...
@@ -46,8 +60,12 @@ Page({
});
},
del
(
e
)
{
let
{
index
}
=
e
.
detail
;
let
{
imgUrls
}
=
this
.
data
;
let
{
index
}
=
e
.
detail
;
let
{
imgUrls
}
=
this
.
data
;
imgUrls
.
splice
(
index
,
1
);
this
.
setData
({
imgUrls
,
...
...
@@ -55,7 +73,9 @@ Page({
},
upLoad
()
{
let
_this
=
this
;
let
{
imgUrls
}
=
this
.
data
;
let
{
imgUrls
}
=
this
.
data
;
wx
.
chooseImage
({
count
:
1
,
}).
then
((
res
)
=>
{
...
...
@@ -77,21 +97,47 @@ Page({
imgUrls
.
push
(
img
);
_this
.
setData
({
imgUrls
,
'orderObj.imgUrls'
:
imgUrls
});
});
},
});
});
},
check
()
{
let
obj
=
{
returnReasonType
:
'请选择退款原因'
},
{
orderObj
}
=
this
.
data
;
Object
.
keys
(
obj
).
forEach
(
key
=>
{
if
(
!
orderObj
[
key
])
{
wx
.
p
.
wxApi
.
showToast
(
obj
[
key
])
return
}
})
},
submit
()
{
let
{
orderObj
,
imgUrls
}
=
this
.
data
;
orderObj
.
imgUrls
=
imgUrls
;
console
.
log
(
orderObj
);
wx
.
p
.
api
.
shopmallApi
.
afterSale
(
orderObj
).
then
(({
code
,
data
,
message
})
=>
{
let
{
orderObj
,
imgUrls
}
=
this
.
data
,
Methods
=
orderObj
.
goodsSource
==
2
?
'afterSale'
:
'afterSalesPlatform'
;
orderObj
.
imgUrls
=
imgUrls
,
// orderObj.subOrderCode='GLS960387803345330176'
this
.
check
()
wx
.
p
.
api
.
shopmallApi
[
Methods
](
orderObj
).
then
(({
code
,
data
,
message
})
=>
{
if
(
code
==
"0"
)
{
wx
.
p
.
wxApi
.
showToast
(
"申请成功!"
);
setTimeout
(()
=>
{
wx
.
p
.
router
.
back
((
prevPage
)
=>
{
console
.
log
(
prevPage
)
prevPage
.
clearData
&&
prevPage
.
clearData
();
},
2
);
},
1.5
*
1000
);
...
...
packageMine/pages/order/afterSale_step_two/afterSale_step_two.wxml
View file @
32ef5a2
<view class="layout isFullSucreen">
<!-- <view class="title">售后类型</view> -->
<!-- <view class="type text-center"> -->
<afterSale_step_one />
<afterSale_step_one
bindreturnType="changeReturnType"
/>
<!-- </view> -->
<view class="title">申请退货退款</view>
<!-- 退款信息组件 -->
<refund-info-box
refund-count="{{orderObj.refundCount}}"
orderObj="{{orderObj}}"
refund-count="{{orderObj.applyQty}}"
max-refund-count="{{maxRefundCount}}"
refund-price="{{orderObj.refundP
rice
}}"
refund-price="{{orderObj.refundP
oints
}}"
show-refund-count="{{showRefundCount}}"
bindconfirmpopup="confirmPopup"
bindchangerefundcount="changeRefundCount"
...
...
@@ -20,7 +21,7 @@
<!-- 描述信息组件 -->
<view class="description box">
<gl-textarea maxlength="230" placeholder="补充描述,有助于商家更好的处理售后问题" value="{{
remark
}}" bindinput="input" showWordLimit customMaxLength></gl-textarea>
<gl-textarea maxlength="230" placeholder="补充描述,有助于商家更好的处理售后问题" value="{{
orderObj.returnContent
}}" bindinput="input" showWordLimit customMaxLength></gl-textarea>
</view>
<view class="title">上传图片</view>
...
...
packageMine/pages/order/afterSale_step_two/components/RefundInfoBox/RefundInfoBox.js
View file @
32ef5a2
...
...
@@ -46,15 +46,18 @@ Component({
},
onChangeRefundCount
(
e
)
{
this
.
setData
({
refundCount
:
e
.
detail
})
this
.
triggerEvent
(
"changerefundcount"
,
{
value
:
e
.
detail
});
},
onRadioChange
(
e
)
{
const
item
=
e
.
currentTarget
.
dataset
.
item
;
const
{
value
}
=
e
.
currentTarget
.
dataset
.
item
;
this
.
setData
({
refundReason
:
RefundReason
.
find
((
item
)
=>
item
.
value
==
value
).
text
,
refundReason
:
this
.
data
.
RefundReasonList
.
find
((
item
)
=>
item
.
value
==
value
).
text
,
});
this
.
triggerEvent
(
"radiochange"
,
{
item
});
this
.
triggerEvent
(
"radiochange"
,
{
value
});
},
},
});
packageMine/pages/order/afterSale_step_two/components/RefundInfoBox/RefundInfoBox.wxml
View file @
32ef5a2
...
...
@@ -15,7 +15,7 @@
<view class="price">{{refundCount}}件</view>
修改数量
</view>
<Stepper wx:else count="{{refundCount}}" min="1" max="
{{maxRefundCount}}
" bindchange="onChangeRefundCount" data-index="{{index}}"></Stepper>
<Stepper wx:else count="{{refundCount}}" min="1" max="
10
" bindchange="onChangeRefundCount" data-index="{{index}}"></Stepper>
</view>
</view>
<view class="box-item">
...
...
packageMine/pages/order/components/Express/Express.js
View file @
32ef5a2
const
{
mockDeliveryInfoData
}
=
require
(
"./mock.js"
);
const
{
mockDeliveryInfoData
}
=
require
(
"./mock.js"
);
const
LOGISTICS_STATUS
=
{
1000
:
'待揽件'
,
1001
:
'已揽件'
,
1002
:
'运输中'
,
1003
:
'已签收'
,
1004
:
'拒收'
};
Component
({
properties
:
{
order
Info
:
{
express
Info
:
{
type
:
Object
,
value
:
{},
observer
:
function
(
val
)
{
this
.
setData
({
logisticsData
:
this
.
processExpressInfo
(
val
)
})
}
},
deliveryStatu
s
:
{
type
:
Object
,
value
:
{},
showExpres
s
:
{
type
:
Boolean
,
value
:
false
},
shipmentTrack
:
{
type
:
Array
,
value
:
[],
height
:
{
type
:
String
,
value
:
'256rpx'
}
},
data
:
{
timelineData
:
[
{
time
:
"2021-02-02 10:30:30"
,
tips
:
[
"这是主要内容部分"
],
title
:
"已发货"
,
type
:
'active'
,
// 高亮显示
},
{
time
:
"2021-02-02 10:30:30"
,
tips
:
[
"这是主要内容部分"
],
title
:
'运输中'
,
type
:
'small'
,
// 小点显示
},
{
time
:
"2021-02-02 10:30:30"
,
tips
:
[
"这是主要内容部分11111111111"
,
"这是主要内容部分11111111111"
,
"这是主要内容部分11111111111"
],
title
:
'运输中'
,
type
:
'normal'
,
},
{
title
:
'收货地址'
,
tips
:
[
"这是主要内容部分"
],
type
:
'special'
// 地址节点,使用专门的样式
}
],
logisticsData
:
{},
// timelineData: [
// {
// time: "2021-02-02 10:30:30",
// tips: ["这是主要内容部分"],
// title: "已发货",
// type: 'active',// 高亮显示
// },
// {
// time: "2021-02-02 10:30:30",
// tips: ["这是主要内容部分"],
// title:'运输中',
// type: 'small',// 小点显示
// },
// {
// time: "2021-02-02 10:30:30",
// tips: ["这是主要内容部分11111111111",
// "这是主要内容部分11111111111",
// "这是主要内容部分11111111111"
// ],
// title:'运输中',
// type: 'normal',
// },
// {
// title:'收货地址',
// tips: ["这是主要内容部分"],
// type: 'special' // 地址节点,使用专门的样式
// }
// ],
},
methods
:
{
processShipmentTrack
(
shipmentTrack
,
logisticsStatus
)
{
if
(
!
this
.
data
.
showExpress
)
{
shipmentTrack
=
shipmentTrack
?
shipmentTrack
.
slice
(
0
,
2
)
:
[]
}
return
shipmentTrack
.
map
((
track
,
index
)
=>
{
let
status
=
1000
;
let
statusDesc
=
'待揽件'
;
const
content
=
track
.
content
;
const
operateTime
=
track
.
operateTime
;
const
isLast
=
index
===
0
;
// 根据内容判断状态
if
(
content
.
includes
(
'已签收'
)
||
content
.
includes
(
'签收人'
))
{
status
=
1003
;
statusDesc
=
'已签收'
;
}
else
if
(
content
.
includes
(
'拒收'
)
||
content
.
includes
(
'退回'
))
{
status
=
1004
;
statusDesc
=
'拒收'
;
}
else
if
(
content
.
includes
(
'派件'
)
||
content
.
includes
(
'驿站'
)
||
content
.
includes
(
'暂存'
))
{
status
=
1002
;
statusDesc
=
'运输中'
;
}
else
if
(
content
.
includes
(
'转运中心'
)
||
content
.
includes
(
'发往'
)
||
content
.
includes
(
'到达'
))
{
status
=
1002
;
statusDesc
=
'运输中'
;
}
else
if
(
content
.
includes
(
'已收件'
)
||
content
.
includes
(
'揽收'
))
{
status
=
1001
;
statusDesc
=
'已揽件'
;
}
else
if
(
content
.
includes
(
'已发往'
))
{
status
=
1001
;
statusDesc
=
'已揽件'
;
}
// 根据整体物流状态进行最终调整
if
(
logisticsStatus
<
status
)
{
// 如果整体状态低于当前轨迹状态,说明该轨迹尚未完成
statusDesc
=
LOGISTICS_STATUS
[
logisticsStatus
]
+
'(进行中)'
;
}
return
{
...
track
,
type
:
isLast
?
'active'
:
'small'
,
status
,
statusDesc
};
}).
filter
(
track
=>
{
// 根据整体物流状态过滤轨迹
switch
(
logisticsStatus
)
{
case
1000
:
// 待揽件 - 只显示收件相关记录
return
track
.
status
===
1000
;
case
1001
:
// 已揽件 - 显示揽件和发往记录
return
track
.
status
<=
1001
;
case
1002
:
// 运输中 - 显示所有运输中的记录
return
track
.
status
<=
1002
;
case
1003
:
// 已签收 - 显示所有记录
return
track
.
status
<=
1003
;
case
1004
:
// 拒收 - 显示所有记录
return
track
.
status
<=
1004
;
default
:
return
true
;
}
});
},
processExpressInfo
(
expressInfo
)
{
const
{
logisticsStatus
,
shipmentTrack
,
...
rest
}
=
expressInfo
;
const
processedTrack
=
this
.
processShipmentTrack
(
shipmentTrack
,
logisticsStatus
);
return
{
...
rest
,
logisticsStatus
,
logisticsStatusDesc
:
LOGISTICS_STATUS
[
logisticsStatus
],
shipmentTrack
:
processedTrack
};
}
}
});
\ No newline at end of file
packageMine/pages/order/components/Express/Express.wxml
View file @
32ef5a2
<wxs module="goodItem" src="formatGoods.wxs"></wxs>
<view class="item">
<TimeLine nodes="{{
timelineData
}}"/>
<TimeLine nodes="{{
logisticsData.shipmentTrack}}" height="{{height
}}"/>
</view>
\ No newline at end of file
packageMine/pages/order/components/Express/formatGoods.wxs
deleted
100644 → 0
View file @
bc37820
function filterItem(arr,num) {
return arr.slice(0,num)
}
module.exports = {
filterItem:filterItem
}
\ No newline at end of file
packageMine/pages/order/components/ExpressPop/ExpressPop.json
View file @
32ef5a2
...
...
@@ -2,6 +2,7 @@
"component"
:
true
,
"usingComponents"
:
{
"Express"
:
"../Express/Express"
,
"Copy"
:
"../Copy/Copy"
"Expressage"
:
"../Expressage/Expressage"
}
}
\ No newline at end of file
packageMine/pages/order/components/ExpressPop/ExpressPop.scss
View file @
32ef5a2
.popup-content
{
padding
:
0
32rpx
;
.express-info
{
display
:
flex
;
justify-content
:
space-between
;
height
:
88rpx
;
border-bottom
:
1px
solid
#eff0f2
;
.express-info-item
{
display
:
flex
;
gap
:
6rpx
;
...
...
@@ -12,6 +14,7 @@
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#333435
;
.logo
{
width
:
32rpx
;
height
:
32rpx
;
...
...
@@ -21,4 +24,10 @@
}
}
}
}
.line
{
width
:
670rpx
;
height
:
2rpx
;
background
:
#EFF0F2
;
}
}
\ No newline at end of file
packageMine/pages/order/components/ExpressPop/ExpressPop.wxml
View file @
32ef5a2
<popup show="{{showExpress}}" show-close-button="{{true}}" showFooter="{{false}}" headerColor="#F7F7F7" title="物流详情" bindconfirm="onConfirmPopup">
<popup show="{{showExpress}}" show-close-button="{{true}}" showFooter="{{false}}"
headerColor="#F7F7F7" title="物流详情" bindconfirm="onConfirmPopup">
<view class="popup-content">
<view class="express-info">
<view class="express-info-item">
<view class="logo">
<glsx-image src="{{expressInfo.logo||'https://picsum.photos/200/200'}}" />
</view>
<text>{{expressInfo.expressName||"顺丰快递"}}</text>
<text>{{expressInfo.shipmentCode||'SF12222222222222'}}</text>
</view>
<view class="express-info-item">
<Copy />
</view>
</view>
<Express shipmentTrack="{{expressInfo.shipmentTrack}}" />
<Expressage expressInfo="{{expressInfo}}"></Expressage>
<view class="line"></view>
<Express expressInfo="{{expressInfo}}" showExpress="{{showExpress}} "height="980rpx" />
</view>
</popup>
\ No newline at end of file
packageMine/pages/order/components/Expressage/Expressage.js
0 → 100644
View file @
32ef5a2
// packageMine/pages/order/components/Expressage/Expressage.js
Component
({
/**
* 组件的属性列表
*/
properties
:
{
expressInfo
:{
type
:
Object
,
value
:
{}
}
},
/**
* 组件的初始数据
*/
data
:
{
},
/**
* 组件的方法列表
*/
methods
:
{
}
})
\ No newline at end of file
packageMine/pages/order/components/Expressage/Expressage.json
0 → 100644
View file @
32ef5a2
{
"component"
:
true
,
"usingComponents"
:
{
"Copy"
:
"../Copy/Copy"
}
}
\ No newline at end of file
packageMine/pages/order/components/Expressage/Expressage.scss
0 → 100644
View file @
32ef5a2
.express-info
{
display
:
flex
;
justify-content
:
space-between
;
height
:
88rpx
;
.express-info-item
{
display
:
flex
;
gap
:
6rpx
;
align-items
:
center
;
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#333435
;
.logo
{
width
:
32rpx
;
height
:
32rpx
;
border-radius
:
50%
;
overflow
:
hidden
;
transform
:
translateY
(
1rpx
);
}
}
}
\ No newline at end of file
packageMine/pages/order/components/Expressage/Expressage.wxml
0 → 100644
View file @
32ef5a2
<view class="express-info">
<view class="express-info-item">
<view class="logo">
<glsx-image src="{{expressInfo.logo||'https://picsum.photos/200/200'}}" />
</view>
<text>{{expressInfo.expressName||"顺丰快递"}}</text>
<text>{{expressInfo.shipmentCode||'SF12222222222222'}}</text>
</view>
<view class="express-info-item">
<Copy />
</view>
</view>
\ No newline at end of file
packageMine/pages/order/detail/components/DeliveryInfo/DeliveryInfo.wxml
View file @
32ef5a2
<view class="title">发货信息</view>
<view class="item">
<view class="label">收货地址:</view>
<view class="value">{{orderInfo.deliveryCompany || ''}}{{orderInfo.deliveryNumber || ''}}</view>
<view class="value">{{orderInfo.receiveAddress || ''}}
<view class="value">{{orderInfo.receviveInfo || ''}}</view>
</view>
</view>
\ No newline at end of file
packageMine/pages/order/detail/components/WaitDeliver/WaitDeliver.js
0 → 100644
View file @
32ef5a2
// packageMine/pages/order/detail/components/WaitDeliver/WaitDeliver.js
Component
({
/**
* 组件的属性列表
*/
properties
:
{
},
/**
* 组件的初始数据
*/
data
:
{
},
/**
* 组件的方法列表
*/
methods
:
{
}
})
\ No newline at end of file
packageMine/pages/order/detail/components/WaitDeliver/WaitDeliver.json
0 → 100644
View file @
32ef5a2
{
"component"
:
true
,
"usingComponents"
:
{}
}
\ No newline at end of file
packageMine/pages/order/detail/components/WaitDeliver/WaitDeliver.scss
0 → 100644
View file @
32ef5a2
.dispatched-box
{
display
:
flex
;
align-items
:
center
;
.wait-icon
{
width
:
32px
;
height
:
32px
;
margin-right
:
10rpx
;
}
.dispatched-txt
{
font-weight
:
500
;
font-size
:
36rpx
;
color
:
#282829
;
.info
{
font-weight
:
400
;
font-size
:
24rpx
;
color
:
#656566
;
margin-top
:
8rpx
;
}
}
}
\ No newline at end of file
packageMine/pages/order/detail/components/WaitDeliver/WaitDeliver.wxml
0 → 100644
View file @
32ef5a2
<!--packageMine/pages/order/detail/components/WaitDeliver/WaitDeliver.wxml-->
<view class="dispatched-box">
<glsx-image webp class="wait-icon" src="/status/loading.png"></glsx-image>
<view class="dispatched-txt">
待发货
<view class="info">等待商家发货</view>
</view>
</view>
\ No newline at end of file
packageMine/pages/order/detail/detail.js
View file @
32ef5a2
...
...
@@ -22,21 +22,18 @@ Page({
// 使用mock数据用于开发和测试
...
mockOrderDetailData
,
OrderStatus
,
expressInfo
:
{
expressInfo
:
{
"orderCode"
:
"295057717192728657"
,
"expressCode"
:
"yuantong"
,
"expressName"
:
"圆通速递"
,
"shipmentCode"
:
"1231231231dfsdgs"
,
"logisticsStatus"
:
1003
,
"shipmentItems"
:
[
{
"goodsSkuCode"
:
"1125899906842634"
,
"goodsSkuName"
:
"松下家用微电脑电饭煲SR-MGT108可预约1-4人多功能煮饭电饭锅3L SR-MGT108 银色 "
,
"qty"
:
1
}
],
"shipmentTrack"
:
[
{
"shipmentItems"
:
[{
"goodsSkuCode"
:
"1125899906842634"
,
"goodsSkuName"
:
"松下家用微电脑电饭煲SR-MGT108可预约1-4人多功能煮饭电饭锅3L SR-MGT108 银色 "
,
"qty"
:
1
}],
"shipmentTrack"
:
[{
"content"
:
"已签收,签收人凭取货码签收。"
,
"operateTime"
:
"2019-10-21 17:59:18"
,
"operator"
:
"Operator"
...
...
@@ -144,11 +141,14 @@ Page({
onLoad
:
function
(
options
)
{
wx
.
p
.
router
.
getRouterParams
(
options
).
then
(
params
=>
{
if
(
params
.
item
)
{
// 订单信息
this
.
setData
({
orderInfo
:
params
.
item
})
//物流信息
this
.
queryLogistics
()
// this.getOrderDetail(params.orderCode);
//用来获取发货信息
this
.
getOrderDetail
(
params
.
item
.
subOrderCode
);
}
this
.
setData
({
Status
:
OrderStatus
[
this
.
data
.
orderInfo
.
orderStatus
],
...
...
@@ -160,7 +160,7 @@ Page({
subOrderCode
}
=
this
.
data
.
orderInfo
let
params
=
{
subOrderCode
:
'GLS961872388671414272'
subOrderCode
,
}
wx
.
p
.
api
.
shopmallApi
.
queryLogistics
(
params
).
then
((
data
)
=>
{
console
.
log
(
data
,
'物流信息'
)
...
...
@@ -170,27 +170,33 @@ Page({
})
},
getOrderDetail
(
orderCode
)
{
console
.
log
(
orderCode
,
7777
)
let
{
order
Obj
order
Info
}
=
this
.
data
;
wx
.
p
.
wxApi
.
showLoading
(
"加载中..."
);
let
params
=
{
subOrderCode
:
orderCode
}
wx
.
p
.
api
.
shopmallApi
.
getOrderDetail
(
params
).
then
((
data
)
=>
{
console
.
log
(
data
,
999999999999999999999
)
wx
.
hideLoading
();
console
.
log
(
data
);
data
.
time
=
new
Date
(
iosTimeFormat
(
data
.
createdDate
)).
format
(
"yyyy.MM.dd hh:mm:ss"
);
let
{
provinceName
,
cityName
,
countyName
,
address
,
receiveName
,
receiveMobile
}
=
data
.
receiveAddress
this
.
setData
({
orderInfo
:
data
,
orderObj
,
orderInfo
:
{
...
orderInfo
,
receiveAddress
:
provinceName
+
cityName
+
countyName
+
address
,
receviveInfo
:
receiveName
+
receiveMobile
}
})
});
},
toDetail
()
{
...
...
packageMine/pages/order/detail/detail.json
View file @
32ef5a2
...
...
@@ -10,6 +10,8 @@
"OrderAmount"
:
"./components/OrderAmount/OrderAmount"
,
"content"
:
"/packageMine/pages/order/index/components/Content/Content"
,
"Express"
:
"../components/Express/Express"
,
"Expresspop"
:
"../components/ExpressPop/ExpressPop"
"Expresspop"
:
"../components/ExpressPop/ExpressPop"
,
"WaitDeliver"
:
"./components/WaitDeliver/WaitDeliver"
,
"Expressage"
:
"../components/Expressage/Expressage"
}
}
\ No newline at end of file
packageMine/pages/order/detail/detail.wxml
View file @
32ef5a2
<block wx:if="{{orderInfo}}">
<view class="layout">
<BlockBox>
<
!-- <
BlockBox>
<Status title="{{Status.title}}" image="{{Status.image}}" tips="{{Status.tips}}"></Status>
</BlockBox> -->
<!-- 云中鹤的有物流信息 -->
<BlockBox wx:if="{{orderInfo.goodsSource==1||!orderInfo.goodsSource}}">
<view class="express-box" bindtap="showExpressPop" wx:if="{{expressInfo}}">
<view class="express-detail">物流详情 <mp-icon icon="arrow" color="var(--btnColor)" size="{{11}}"></mp-icon>
</view>
<Express expressInfo="{{expressInfo}}" />
</view>
<WaitDeliver wx:else></WaitDeliver>
</BlockBox>
<BlockBox>
<DeliveryInfo orderInfo="{{orderInfo}}" deliveryStatus="{{deliveryStatus}}"></DeliveryInfo>
<!-- 自营商品展示快递信息 -->
<BlockBox wx:if="{{orderInfo.goodsSource==2}}">
<Expressage expressInfo="{{expressInfo}}" wx:if="{{expressInfo}}"></Expressage>
<WaitDeliver wx:else></WaitDeliver>
</BlockBox>
<BlockBox>
<view class="express-box" bindtap="showExpressPop">
<view class="express-detail" >物流详情 <mp-icon icon="arrow" color="var(--btnColor)" size="{{11}}"></mp-icon></view>
<Express shipmentTrack="{{expressInfo.shipmentTrack}}"/>
</view>
<DeliveryInfo orderInfo="{{orderInfo}}" deliveryStatus="{{deliveryStatus}}"></DeliveryInfo>
</BlockBox>
<BlockBox>
<OrderInfo orderInfo="{{orderInfo}}" orderObj="{{orderObj}}" statusEnum="{{statusEnum}}"></OrderInfo>
...
...
@@ -18,7 +26,7 @@
<!-- <BlockBox>
<content item="{{orderInfo}}" />
</BlockBox> -->
<Expresspop showExpress="{{isShowExpressPop}}" expressInfo="{{expressInfo}}"/>
<Expresspop showExpress="{{isShowExpressPop}}" expressInfo="{{expressInfo}}"
/>
</view>
</block>
\ No newline at end of file
packageMine/pages/order/index/components/OrderActionButtons/OrderActionButtons.js
View file @
32ef5a2
...
...
@@ -54,11 +54,11 @@ Component({
refundStatus
,
returnOrderStatus
}
=
this
.
data
.
item
if
([
1007
].
includes
(
orderStatus
)
&&
(
!
cancelStatus
||
cancelStatus
==
1010
))
{
// 按钮:售后(去掉)
return
OrderStatusEnum
.
WAIT_DELIVER
//待发货 order_status属于(1002,1006,1007)且cancel_status不存在或者审核中(1010)
}
else
if
([
1002
,
1006
,
1007
,
1008
].
includes
(
orderStatus
)
&&
(
!
cancelStatus
||
cancelStatus
==
1010
))
{
}
else
if
([
1002
,
1006
,
1007
,
1008
].
includes
(
orderStatus
)
&&
(
!
cancelStatus
||
cancelStatus
==
1010
))
{
// 确认收货,查看物流
return
OrderStatusEnum
.
WAIT_RECEIVE
//待收货 order_status属于(1008)且cancel_status不存在或者审核中(1010)
}
else
if
(
orderStatus
==
1009
&&
(
!
cancelStatus
||
cancelStatus
==
1010
))
{
...
...
@@ -77,23 +77,23 @@ Component({
return
OrderStatusEnum
.
AFTER_SALE_REFUNDED
// 已退款 退款退货的订单return_order_status:1003:已退款且return_status退换货状态(1002:已收货,1003:已退款),仅退款订单 return_order_status:1003:已退款且refund_status 退款状态1002:已退款,
}
else
if
((
returnOrderStatus
==
1003
&&
returnStatus
==
1006
)
||
(
returnOrderStatus
==
1003
&&
refundStatus
==
1004
))
{
return
OrderStatusEnum
.
AFTER_SALE_REFUNDED_FAILED
// 退款失败 退款退货的return_order_status:1003:已退款 return_status退换货状态(1006:退款异常 ,,仅退款的return_order_status:1003:已退款 且refund_status 退款状态,1004:退款异常
}
else
{
return
OrderStatusEnum
.
AFTER_SALE_REVEAL
//其他兜底的状态
}
else
{
return
OrderStatusEnum
.
AFTER_SALE_REVEAL
//其他兜底的状态
}
},
// 更新按钮
updateButtons
()
{
console
.
log
(
this
.
orderStatus
(),
this
.
data
.
item
,
99999888
)
console
.
log
(
this
.
orderStatus
(),
this
.
data
.
item
,
99999888
)
let
{
goodsSource
}
=
this
.
data
.
item
,
orderButtons
=
ORDER_STATUS
[
this
.
orderStatus
()].
buttons
;
// goodsSource ==null 默认云中鹤
this
.
setData
({
buttons
:
orderButtons
?
orderButtons
[
goodsSource
?
goodsSource
:
1
]
:
[],
buttons
:
orderButtons
?
orderButtons
[
goodsSource
?
goodsSource
:
1
]
:
[],
orderItem
:
this
.
data
.
item
,
});
},
...
...
@@ -104,8 +104,9 @@ Component({
index
}
=
e
.
currentTarget
.
dataset
;
const
button
=
this
.
data
.
buttons
[
index
];
console
.
log
(
button
)
if
(
button
&&
button
.
handler
)
{
button
.
handler
(
e
);
this
[
button
.
handler
]
(
e
);
}
},
...
...
@@ -197,18 +198,22 @@ Component({
// 售后
onAfterSale
(
e
)
{
console
.
log
(
e
)
let
{
item
:
{
orderCode
,
payPrice
,
goodsNumber
subOrderCode
,
redeemPoints
,
goodsSource
,
sellQty
,
applyQty
},
}
=
e
.
currentTarget
.
dataset
;
wx
.
p
.
router
.
go
(
"/packageMine/pages/order/afterSale_step_two/afterSale_step_two"
,
{
orderCode
,
refundPrice
:
payPrice
,
refundCount
:
goodsNumber
,
subOrderCode
,
refundPoints
:
redeemPoints
,
goodsSource
,
applyQty
:
sellQty
||
applyQty
,
}
);
},
...
...
packageMine/pages/order/index/index.js
View file @
32ef5a2
...
...
@@ -89,13 +89,13 @@ Page({
tabIndex
:
index
,
requestType
});
this
.
getOrderList
()
//
this.clearData(); // 注释掉实际的API调用,使用硬编码数据
//
this.getOrderList()
this
.
clearData
();
// 注释掉实际的API调用,使用硬编码数据
});
},
onShow
()
{
//
if (this.refresh) this.clearData();
if
(
this
.
refresh
)
this
.
getOrderList
();
if
(
this
.
refresh
)
this
.
clearData
();
//
if (this.refresh) this.getOrderList();
},
onHide
()
{
this
.
refresh
=
true
;
...
...
@@ -109,14 +109,14 @@ Page({
nothing
:
false
,
pageNum
:
1
,
});
//
this.getOrderList(); // 注释掉实际的API调用,使用硬编码数据
this
.
getOrderList
();
// 注释掉实际的API调用,使用硬编码数据
this
.
setData
({
listFlag
:
true
,
});
},
search
()
{
this
.
getOrderList
()
//
this.clearData();
//
this.getOrderList()
this
.
clearData
();
},
clear
()
{
this
.
setData
({
...
...
@@ -250,8 +250,8 @@ Page({
wx
.
p
.
api
.
equityApi
.
comfirmRevice
(
para
).
then
((
res
)
=>
{
wx
.
p
.
wxApi
.
showToast
(
"确认收货成功"
);
setTimeout
(()
=>
{
//
this.clearData();
this
.
getOrderList
()
this
.
clearData
();
//
this.getOrderList()
},
1.5e3
);
});
}
...
...
project.private.config.json
View file @
32ef5a2
...
...
@@ -16,6 +16,13 @@
"miniprogram"
:
{
"list"
:
[
{
"name"
:
"packageMine/pages/order/index/index"
,
"pathName"
:
"packageMine/pages/order/index/index"
,
"query"
:
""
,
"scene"
:
null
,
"launchMode"
:
"default"
},
{
"name"
:
"pages/Login/Login"
,
"pathName"
:
"pages/Login/Login"
,
"query"
:
""
,
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment