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
db6ece49
Commit
db6ece49
authored
Apr 08, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
C端订单拆单实现
parent
2d129b1f
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
483 additions
and
380 deletions
+483
-380
confirmOrder.js
src/pages/confirmOrder/confirmOrder.js
+15
-2
logistics.js
src/pages/logistics/logistics.js
+12
-70
logistics.wxml
src/pages/logistics/logistics.wxml
+1
-6
order.js
src/pages/order/order.js
+195
-26
order.wxml
src/pages/order/order.wxml
+60
-30
order.wxss
src/pages/order/order.wxss
+8
-2
orderDetail.js
src/pages/orderDetail/orderDetail.js
+129
-64
orderDetail.wxml
src/pages/orderDetail/orderDetail.wxml
+60
-179
orderDetail.wxss
src/pages/orderDetail/orderDetail.wxss
+2
-0
project.config.json
src/project.config.json
+1
-1
No files found.
src/pages/confirmOrder/confirmOrder.js
View file @
db6ece49
...
@@ -790,7 +790,6 @@ wxService.page({
...
@@ -790,7 +790,6 @@ wxService.page({
},
},
//下单
//下单
order
(
isSelect
,
params
)
{
order
(
isSelect
,
params
)
{
if
(
this
.
data
.
orderStoreInfo
)
{
if
(
this
.
data
.
orderStoreInfo
)
{
if
(
this
.
data
.
orderStoreInfo
.
storeId
)
{
if
(
this
.
data
.
orderStoreInfo
.
storeId
)
{
params
.
storeId
=
this
.
data
.
orderStoreInfo
.
storeId
;
params
.
storeId
=
this
.
data
.
orderStoreInfo
.
storeId
;
...
@@ -810,7 +809,8 @@ wxService.page({
...
@@ -810,7 +809,8 @@ wxService.page({
wx
.
removeStorageSync
(
'orderRemark'
);
wx
.
removeStorageSync
(
'orderRemark'
);
if
(
result
==
0
)
{
if
(
result
==
0
)
{
delete
data
.
appId
delete
data
.
appId
let
amount
=
data
.
amount
||
0
let
amount
=
data
.
amount
||
0
;
if
(
amount
>
0
){
wx
.
requestPayment
(
Object
.
assign
({
wx
.
requestPayment
(
Object
.
assign
({
success
(
res
)
{
success
(
res
)
{
wx
.
hideLoading
()
wx
.
hideLoading
()
...
@@ -879,6 +879,19 @@ wxService.page({
...
@@ -879,6 +879,19 @@ wxService.page({
}
}
},
data
.
wxParams
));
},
data
.
wxParams
));
}
}
else
{
if
(
_this
.
data
.
currentType
==
'delivery'
)
{
wx
.
redirectTo
({
url
:
'/pages/order/order'
,
});
}
else
{
wx
.
redirectTo
({
url
:
'/subPackage/page/pages/selfPickUpOrderList/selfPickUpOrderList'
,
});
}
}
}
}
}
});
});
},
},
...
...
src/pages/logistics/logistics.js
View file @
db6ece49
...
@@ -25,22 +25,12 @@ wxService.page({
...
@@ -25,22 +25,12 @@ wxService.page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
let
detail
=
options
.
params
?
JSON
.
parse
(
options
.
params
)
:
null
;
wx
.
hideShareMenu
()
if
(
detail
){
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
const
{
params
}
=
this
.
options
let
detail
=
JSON
.
parse
(
params
)
// supplierCode code
if
(
detail
.
id
){
this
.
data
.
logisticCompanyName
=
detail
.
logistic
.
supplierName
?
detail
.
logistic
.
supplierName
:
'暂无'
;
this
.
data
.
logisticCompanyName
=
detail
.
logistic
.
supplierName
?
detail
.
logistic
.
supplierName
:
'暂无'
;
this
.
data
.
logisticNo
=
detail
.
logistic
.
code
?
detail
.
logistic
.
code
:
'暂无'
;
this
.
data
.
logisticNo
=
detail
.
logistic
.
code
?
detail
.
logistic
.
code
:
'暂无'
;
this
.
setData
({
this
.
setData
({
params
,
detail
,
orderId
:
detail
.
id
,
orderId
:
detail
.
id
,
status
:
detail
.
status
,
status
:
detail
.
status
,
orderCode
:
detail
.
logistic
.
supplierCode
,
orderCode
:
detail
.
logistic
.
supplierCode
,
...
@@ -51,39 +41,17 @@ wxService.page({
...
@@ -51,39 +41,17 @@ wxService.page({
const
{
orderCode
,
orderLogisticsNo
}
=
this
.
data
const
{
orderCode
,
orderLogisticsNo
}
=
this
.
data
this
.
getLogisticsInfo
(
orderCode
,
orderLogisticsNo
)
this
.
getLogisticsInfo
(
orderCode
,
orderLogisticsNo
)
})
})
}
};
},
//申请退货
wx
.
hideShareMenu
()
handelReturnGood
()
{
const
{
params
}
=
this
.
data
// 退款申请
wxService
.
router
(
`/pages/refund/refund`
).
search
({
params
})
},
},
// 确认收货
handelConfirmReceipt
()
{
/**
const
{
orderId
}
=
this
.
data
* 生命周期函数--监听页面显示
wx
.
showLoading
({
*/
title
:
'加载中'
,
onShow
:
function
()
{
mask
:
true
})
wxService
.
post
(
`/sale/trade/buyer/confirm/
${
orderId
}
`
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
`您已确认收货!`
,
icon
:
'none'
})
}
else
{
wx
.
showToast
({
title
:
`确认收货失败!`
,
icon
:
'none'
})
}
}
})
},
},
// 获取物流信息
// 获取物流信息
getLogisticsInfo
(
code
,
num
){
getLogisticsInfo
(
code
,
num
){
wxService
.
get
(
`/sale/logistics/getLogisticsDetail?companyCode=
${
code
}
&logisticsNo=
${
num
}
`
).
then
(
res
=>
{
wxService
.
get
(
`/sale/logistics/getLogisticsDetail?companyCode=
${
code
}
&logisticsNo=
${
num
}
`
).
then
(
res
=>
{
...
@@ -126,12 +94,6 @@ wxService.page({
...
@@ -126,12 +94,6 @@ wxService.page({
});
});
},
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
...
@@ -140,24 +102,5 @@ wxService.page({
...
@@ -140,24 +102,5 @@ wxService.page({
},
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
}
})
})
\ No newline at end of file
src/pages/logistics/logistics.wxml
View file @
db6ece49
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
<view class="logistics-status">
<view class="logistics-status">
<view class="status">物流公司:{{logisticCompanyName}}</view>
<view class="status">物流公司:{{logisticCompanyName}}</view>
<view class="desc">物流单号:{{logisticNo}}</view>
<view class="desc">物流单号:{{logisticNo}}</view>
<view class="copy" bindtap="copy" data-content="
89687687687687786
">复制</view>
<view class="copy" bindtap="copy" data-content="
{{logisticNo}}
">复制</view>
</view>
</view>
</view>
</view>
...
@@ -38,13 +38,8 @@
...
@@ -38,13 +38,8 @@
</view>
</view>
</view>
</view>
<!-- <view class="button-wrap" wx:if="{{status == 'D'}}">
<button class="btn btn-primary btn-lg" bindtap="handelConfirmReceipt">确认收货</button>
</view> -->
</view>
</view>
<!-- <view wx:if="{{!orderId || !hasLogisticInfo}}" class="df no-logis">
</view> -->
<!-- 空 -->
<!-- 空 -->
<empty text="当前暂无快递物流信息,请耐心等待~" wx:if="{{!orderId || !hasLogisticInfo}}"/>
<empty text="当前暂无快递物流信息,请耐心等待~" wx:if="{{!orderId || !hasLogisticInfo}}"/>
...
...
src/pages/order/order.js
View file @
db6ece49
...
@@ -3,6 +3,25 @@ const app = getApp()
...
@@ -3,6 +3,25 @@ const app = getApp()
const
wxService
=
require
(
'../../utils/wxService'
)
const
wxService
=
require
(
'../../utils/wxService'
)
const
utils
=
require
(
'../../utils/util'
)
const
utils
=
require
(
'../../utils/util'
)
const
envInfo
=
require
(
'../../config/index'
).
envInfo
const
envInfo
=
require
(
'../../config/index'
).
envInfo
const
ORDER_STATUS_TEXT
=
{
N
:
"待付款"
,
P
:
"已支付待发货"
,
D
:
"已发货"
,
R
:
"已完成"
,
C
:
"已关闭"
,
PR
:
"退货中"
,
RE
:
"退货完成"
,
};
const
STATUS_CLASS
=
{
N
:
"package-status-color-N"
,
P
:
"package-status-color-P"
,
D
:
"package-status-color-D"
,
R
:
"package-status-color-R"
,
C
:
"package-status-color-C"
,
PR
:
"package-status-color-C"
,
RE
:
"package-status-color-C"
,
}
wxService
.
page
({
wxService
.
page
({
/**
/**
...
@@ -112,12 +131,16 @@ wxService.page({
...
@@ -112,12 +131,16 @@ wxService.page({
},
},
// 确认收货
// 确认收货
handelConfirmReceipt
(
e
)
{
handelConfirmReceipt
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
,
title
:
'加载中'
,
mask
:
true
mask
:
true
})
})
wxService
.
post
(
`/sale/trade/buyer/confirm/
${
id
}
`
).
then
(
res
=>
{
let
id
=
e
.
currentTarget
.
dataset
.
id
;
let
packageInfo
=
e
.
currentTarget
.
dataset
.
package
;
let
parcelId
=
packageInfo
.
id
;
wxService
.
post
(
`/sale/trade/buyer/parcelConfirm?findId=
${
id
}
&parcelId=
${
parcelId
}
`
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
if
(
result
==
0
)
{
...
@@ -141,6 +164,72 @@ wxService.page({
...
@@ -141,6 +164,72 @@ wxService.page({
}
}
})
})
},
},
// 取消订单
handelCancelOrder
(
e
)
{
let
_this
=
this
;
wx
.
showModal
({
title
:
'订单取消提示'
,
content
:
'确认取消此订单?'
,
showCancel
:
true
,
cancelText
:
'再想想'
,
confirmText
:
'取消订单'
,
confirmColor
:
'#cb3c3c'
,
success
:
function
(
modalRes
)
{
if
(
modalRes
.
confirm
)
{
//跳去开卡
const
{
id
}
=
e
.
currentTarget
.
dataset
wx
.
showLoading
({
title
:
'订单取消中..'
,
mask
:
true
});
wxService
.
post
(
`/sale/trade/buyer/cancel/
${
id
}
`
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
showToast
({
title
:
`取消成功!`
,
icon
:
'none'
})
setTimeout
(()
=>
{
_this
.
initOrderList
(
_this
.
data
.
pageNo
,
_this
.
data
.
pageSize
,
_this
.
data
.
status
)
},
200
)
}
else
{
wx
.
showToast
({
title
:
`取消失败!`
,
icon
:
'none'
})
}
}
})
}
}
});
},
// 申请退款
handelRequestRefund
(
e
)
{
let
orderId
=
e
.
currentTarget
.
dataset
.
id
;
let
packageInfo
=
e
.
currentTarget
.
dataset
.
package
;
let
detail
=
{
id
:
orderId
,
skuVOList
:
packageInfo
.
sendOutList
,
}
let
copyOrderInfo
=
JSON
.
parse
(
JSON
.
stringify
(
detail
));
//过滤掉已经退货完的商品
copyOrderInfo
.
skuVOList
=
copyOrderInfo
.
skuVOList
.
filter
(
item
=>
item
.
canRefundNum
>
0
);
//更新可退货数量
copyOrderInfo
.
skuVOList
.
forEach
(
item
=>
{
item
.
totalCount
=
item
.
count
;
item
.
count
=
item
.
canRefundNum
;
});
let
params
=
JSON
.
stringify
(
copyOrderInfo
);
// 退款申请
wxService
.
router
(
`/pages/refund/refund`
).
search
({
params
})
},
// 删除订单
// 删除订单
handelDelOrder
(
e
)
{
handelDelOrder
(
e
)
{
let
_this
=
this
;
let
_this
=
this
;
...
@@ -184,6 +273,7 @@ wxService.page({
...
@@ -184,6 +273,7 @@ wxService.page({
},
},
// 立即支付
// 立即支付
handelToPay
(
e
)
{
handelToPay
(
e
)
{
let
_this
=
this
;
const
{
id
,
merged
}
=
e
.
currentTarget
.
dataset
const
{
id
,
merged
}
=
e
.
currentTarget
.
dataset
let
url
=
merged
?
`/sale/payment/merged/buyer/wxprepay/
${
id
}
`
:
`/sale/trade/buyer/wxprepay/
${
id
}
`
let
url
=
merged
?
`/sale/payment/merged/buyer/wxprepay/
${
id
}
`
:
`/sale/trade/buyer/wxprepay/
${
id
}
`
wx
.
showLoading
({
wx
.
showLoading
({
...
@@ -201,11 +291,17 @@ wxService.page({
...
@@ -201,11 +291,17 @@ wxService.page({
success
(
res
)
{
success
(
res
)
{
wx
.
hideLoading
()
wx
.
hideLoading
()
// 支付成功页面
// 支付成功页面
wxService
.
router
(
`/subPackage/page/pages/paymentStatus/paymentStatus?status=S&amount=
${
amount
}
`
)
wx
.
showToast
({
title
:
'支付成功'
,
});
_this
.
initOrderList
(
_this
.
data
.
pageNo
,
_this
.
data
.
pageSize
,
_this
.
data
.
status
)
},
},
fail
(
res
)
{
fail
(
res
)
{
wx
.
hideLoading
()
wx
.
hideLoading
()
wxService
.
router
(
'/subPackage/page/pages/paymentStatus/paymentStatus?status=F'
)
wx
.
showToast
({
title
:
'支付失败'
,
});
}
}
},
data
))
},
data
))
...
@@ -215,26 +311,20 @@ wxService.page({
...
@@ -215,26 +311,20 @@ wxService.page({
},
},
// 查看物流
// 查看物流
checkLogistics
(
e
)
{
checkLogistics
(
e
)
{
let
{
detail
}
=
e
.
currentTarget
.
dataset
let
{
detail
}
=
e
.
currentTarget
.
dataset
;
let
copyOrderInfo
=
JSON
.
parse
(
JSON
.
stringify
(
detail
));
//过滤掉已经退货完的商品
copyOrderInfo
.
skuVOList
=
copyOrderInfo
.
skuVOList
.
filter
(
item
=>
item
.
canRefundNum
>
0
);
//更新可退货数量
copyOrderInfo
.
skuVOList
.
forEach
(
item
=>
{
item
.
totalCount
=
item
.
count
;
item
.
count
=
item
.
canRefundNum
;
});
let
obj
=
{
let
obj
=
{
id
:
copyOrderInfo
.
id
,
id
:
this
.
data
.
id
,
logistic
:
copyOrderInfo
.
logistic
,
logistic
:
{
status
:
copyOrderInfo
.
status
,
supplierName
:
detail
.
supplierName
,
code
:
detail
.
code
,
supplierCode
:
detail
.
supplierCode
,
},
status
:
detail
.
status
,
}
}
let
params
=
JSON
.
stringify
(
obj
);
let
params
=
JSON
.
stringify
(
obj
);
// 退款申请
//
//
退款申请
wxService
.
router
(
`/pages/logistics/logistics`
).
search
({
params
})
wxService
.
router
(
`/pages/logistics/logistics`
).
search
({
params
});
},
},
// 查看详情
// 查看详情
handelCheckRfDetail
(
e
)
{
handelCheckRfDetail
(
e
)
{
...
@@ -257,6 +347,7 @@ wxService.page({
...
@@ -257,6 +347,7 @@ wxService.page({
const
{
id
}
=
e
.
currentTarget
.
dataset
const
{
id
}
=
e
.
currentTarget
.
dataset
this
.
handelRevokeRefund
(
id
)
this
.
handelRevokeRefund
(
id
)
},
},
handelRevokeRefund
(
id
)
{
handelRevokeRefund
(
id
)
{
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
,
title
:
'加载中'
,
...
@@ -314,16 +405,94 @@ wxService.page({
...
@@ -314,16 +405,94 @@ wxService.page({
if
(
res
)
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
hideLoading
();
let
orderList
=
data
?
data
:
[];
// 处理包裹数据信息
orderList
.
forEach
(
item
=>
{
item
.
statusText
=
ORDER_STATUS_TEXT
[
item
.
status
];
let
parcelList
=
item
.
parcelList
?
item
.
parcelList
:
[];
if
(
parcelList
.
length
==
0
){
let
skuVOList
=
item
.
skuVOList
?
item
.
skuVOList
:
[];
skuVOList
.
forEach
(
sku
=>
{
sku
.
refundCount
=
sku
.
refundCount
?
sku
.
refundCount
:
0
;
sku
.
canRefundNum
=
(
sku
.
count
-
sku
.
refundCount
)
>=
0
?
(
sku
.
count
-
sku
.
refundCount
)
:
0
;
});
if
(
item
.
status
==
'N'
||
item
.
status
==
'C'
){
parcelList
=
[{
code
:
''
,
supplierCode
:
''
,
supplierName
:
''
,
status
:
item
.
status
,
statusText
:
item
.
statusText
,
statusClass
:
STATUS_CLASS
[
item
.
status
],
orderCanRefund
:
false
,
sendOutList
:
item
.
skuVOList
}];
}
else
{
parcelList
=
[{
code
:
''
,
supplierCode
:
''
,
supplierName
:
''
,
status
:
item
.
status
,
statusText
:
item
.
statusText
,
statusClass
:
STATUS_CLASS
[
item
.
status
],
orderCanRefund
:
true
,
sendOutList
:
item
.
skuVOList
}];
}
}
else
{
parcelList
.
forEach
(
p
=>
{
p
.
deliverTime
=
p
.
deliverTime
?
p
.
deliverTime
:
''
;
//计算一下包裹能不能退货
let
deliverTime
=
p
.
deliverTime
?
p
.
deliverTime
:
null
;
p
.
statusText
=
ORDER_STATUS_TEXT
[
p
.
status
];
p
.
statusClass
=
STATUS_CLASS
[
p
.
status
];
if
(
deliverTime
){
let
diffObj
=
utils
.
getDateDiff
(
deliverTime
);
if
(
diffObj
.
days
<=
this
.
data
.
canRefundDaysAfterDelivery
){
p
.
orderCanRefund
=
true
;
}
else
{
p
.
orderCanRefund
=
false
;
}
}
else
{
p
.
orderCanRefund
=
true
;
}
//找商品填充
let
sendOutList
=
[];
p
.
sendOutList
.
forEach
(
s
=>
{
let
filter
=
item
.
skuVOList
.
filter
(
f
=>
f
.
skuId
==
s
.
skuId
);
if
(
filter
.
length
>
0
){
sendOutList
.
push
(
filter
[
0
]);
}
});
p
.
sendOutList
=
sendOutList
;
});
}
item
.
parcelList
=
parcelList
;
})
console
.
log
(
orderList
)
if
(
this
.
data
.
pageNo
==
1
){
this
.
data
.
orderList
=
orderList
;
}
else
{
this
.
data
.
orderList
=
[...
this
.
data
.
orderList
,...
orderList
];
}
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
.
setData
({
no_data
:
this
.
data
.
orderList
.
length
?
true
:
false
no_data
:
this
.
data
.
orderList
.
length
?
true
:
false
})
});
// wx.setStorageSync('orderList', this.data.orderList)
})
}
}
}
}
})
})
...
...
src/pages/order/order.wxml
View file @
db6ece49
...
@@ -16,55 +16,85 @@
...
@@ -16,55 +16,85 @@
<!-- 订单布局 -->
<!-- 订单布局 -->
<view class="order-content order-list-new clear-box" wx:if="{{currentIndex != 5}}">
<view class="order-content order-list-new clear-box" wx:if="{{currentIndex != 5}}">
<!-- 这里订单布局 -->
<!-- 这里订单布局 -->
<view class="order-item-new">
<view class="order-item-new"
<view class="order-new-no">
wx:for="{{orderList}}"
wx:for-item="item"
wx:for-index="idx"
wx:key="*this">
<view class="order-new-no" bindtap="handelDetail" data-id="{{item.id}}">
<view class="order-new-no-lf">
<view class="order-new-no-lf">
订单编号:
102024525214152524
订单编号:
{{item.id}}
<view class="copy" data-no="{{
87878978}}" bind
tap="onTapCopy">复制</view>
<view class="copy" data-no="{{
item.id}}" catch
tap="onTapCopy">复制</view>
</view>
</view>
<image src="/assets/imgs/arrow-right.png" mode="aspectFit"></image>
<image src="/assets/imgs/arrow-right.png" mode="aspectFit"></image>
</view>
</view>
<!-- 包裹 -->
<!-- 包裹 -->
<view class="order-package clear-box">
<view class="order-package clear-box"
wx:for="{{item.parcelList}}"
wx:for-item="packageInfo"
wx:for-index="cIndex"
wx:key="*this">
<view class="package-titile">
<view class="package-titile">
<view class="package-name">包裹
1
</view>
<view class="package-name">包裹
{{cIndex+1}}
</view>
<view class="
package-status-color-P">待发货
</view>
<view class="
{{packageInfo.statusClass}}">{{packageInfo.statusText}}
</view>
</view>
</view>
<!-- 商品数据 -->
<!-- 商品数据 -->
<view class="package-products clear-box">
<view class="package-products clear-box" data-id="{{item.id}}" bindtap="handelDetail">
<view class="product-item">
<view class="product-item"
<image src="https://img3.bigaka.com/test/1002/202003/20200302/1002c503d764-c600-4efb-a02b-339ed03b7e9b.jpg" class="lf-product-img" mode="aspectFit"></image>
wx:for="{{packageInfo.sendOutList}}"
wx:for-item="sku"
wx:for-index="sIndex"
wx:key="*this">
<image src="{{sku.skuImgUrl ? sku.skuImgUrl : sku.mainImgUrl}}" class="lf-product-img" mode="aspectFit"></image>
<view class="rg-product-info">
<view class="rg-product-info">
<view class="pro-name">
这个是商品的名称
</view>
<view class="pro-name">
{{sku.productName}}
</view>
<view class="pro-spec">
这个是商品规格
</view>
<view class="pro-spec">
{{sku.skuSpec}}
</view>
<view class="pro-count">
<view class="pro-count">
<text>数量</text>
<text>数量</text>
<label>x
2
</label>
<label>x
{{sku.count}}
</label>
</view>
</view>
<view class="refund-count">
<view class="refund-count"
wx:if="{{sku.refundCount > 0}}"
>
<text>退单</text>
<text>退单</text>
<label>x1</label>
<label>x{{sku.refundCount}}</label>
</view>
</view>
</view>
<view class="product-item">
<image src="https://img3.bigaka.com/test/1002/202003/20200302/1002c503d764-c600-4efb-a02b-339ed03b7e9b.jpg" class="lf-product-img" mode="aspectFit"></image>
<view class="rg-product-info">
<view class="pro-name">这个是商品的名称</view>
<view class="pro-spec">这个是商品规格</view>
<view class="pro-count">
<text>数量</text>
<label>x2</label>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 按钮 -->
<!-- 按钮 -->
<view class="package-btns">
<view class="package-btns">
<view class="btns normal-btn">取消订单</view>
<view class="btns normal-btn"
<view class="btns pay-now">立即支付</view>
wx:if="{{packageInfo.status == 'N'}}"
<view class="btns sure-get-goods">确认收货</view>
data-id="{{item.id}}" bindtap="handelCancelOrder">取消订单</view>
<view class="btns normal-btn">申请退款</view>
<view class="btns pay-now"
wx:if="{{packageInfo.status == 'N'}}"
data-merged="{{item.mergedAmount}}"
data-id="{{item.id}}"
bindtap="handelToPay">立即支付</view>
<view class="btns normal-btn"
wx:if="{{packageInfo.status == 'C' || packageInfo.status == 'RE'}}"
data-id="{{item.id}}" bindtap="handelDelOrder">删除订单</view>
<view class="btns normal-btn"
wx:if="{{packageInfo.status == 'D' || packageInfo.status == 'R'}}"
data-id="{{item.id}}"
data-detail="{{packageInfo}}"
data-code="{{packageInfo.supplierCode}}"
data-logisticsNo="{{packageInfo.code}}"
bindtap="checkLogistics">查看物流</view>
<view class="btns sure-get-goods"
wx:if="{{packageInfo.status == 'D'}}"
data-id="{{item.id}}"
data-package="{{packageInfo}}"
bindtap="handelConfirmReceipt">确认收货</view>
<view class="btns normal-btn"
wx:if="{{packageInfo.orderCanRefund}}"
data-id="{{item.id}}"
data-package="{{packageInfo}}"
bindtap="handelRequestRefund">申请退款</view>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
src/pages/order/order.wxss
View file @
db6ece49
...
@@ -20,6 +20,7 @@ scroll-view{
...
@@ -20,6 +20,7 @@ scroll-view{
padding: 24rpx 40rpx 0;
padding: 24rpx 40rpx 0;
box-sizing: border-box;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-webkit-box-sizing: border-box;
border-bottom: solid 1rpx #dddddd;
}
}
.swiper-tab-item{
.swiper-tab-item{
padding: 14rpx 10rpx;
padding: 14rpx 10rpx;
...
@@ -237,12 +238,17 @@ scroll-view{
...
@@ -237,12 +238,17 @@ scroll-view{
align-items: center;
align-items: center;
justify-content: space-between;
justify-content: space-between;
font-size: 24rpx;
font-size: 24rpx;
color: #
666666
;
color: #
333333
;
padding-bottom: 20rpx;
padding-bottom: 20rpx;
font-weight: bold;
}
.package-status-color-N{
color: red;
}
}
.package-status-color-P{
.package-status-color-P{
color: #
409EFF
;
color: #
67C23A
;
}
}
.package-status-color-D{
.package-status-color-D{
...
...
src/pages/orderDetail/orderDetail.js
View file @
db6ece49
...
@@ -59,50 +59,33 @@ wxService.page({
...
@@ -59,50 +59,33 @@ wxService.page({
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
,
title
:
'加载中'
,
mask
:
true
mask
:
true
})
});
wxService
.
get
(
`/sale/trade/seller/
${
id
}
`
).
then
(
res
=>
{
wxService
.
get
(
`/sale/trade/seller/
${
id
}
`
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
hideLoading
();
const
{
localNowTime
}
=
this
.
data
//处理总数
data
.
localNowTime
=
localNowTime
?
localNowTime
:
new
Date
().
getTime
();
let
skuVOList
=
data
.
skuVOList
?
data
.
skuVOList
:
[];
data
.
createOrderTime
=
new
Date
(
data
.
createTime
.
replace
(
/-/g
,
'/'
)).
getTime
()
||
[];
let
sum
=
0
;
data
.
countDownOrderTime
=
7200000
;
// 2时(h)=7200000毫秒(ms)
skuVOList
.
forEach
(
item
=>
{
// 订单倒计时 超多两小时 刷新当前页
item
.
refundCount
=
item
.
refundCount
?
item
.
refundCount
:
0
;
data
.
orderCanRefund
=
true
;
item
.
canRefundNum
=
(
item
.
count
-
item
.
refundCount
)
>=
0
?
(
item
.
count
-
item
.
refundCount
)
:
0
;
// 本地时间 - 创建时间 > 2小时 刷新当前页
sum
=
sum
+
item
.
price
*
item
.
count
;
});
//处理收货地址
if
(
data
.
logistic
){
if
(
data
.
logistic
){
let
receiverInfoArr
=
data
.
logistic
.
receiverInfo
.
split
(
','
).
reverse
().
filter
(
item
=>
item
);
let
receiverInfoArr
=
data
.
logistic
.
receiverInfo
.
split
(
','
).
reverse
().
filter
(
item
=>
item
);
data
.
logistic
.
receiverName
=
receiverInfoArr
[
1
];
data
.
logistic
.
receiverName
=
receiverInfoArr
[
1
];
data
.
logistic
.
receiverMobile
=
receiverInfoArr
[
0
];
data
.
logistic
.
receiverMobile
=
receiverInfoArr
[
0
];
data
.
logistic
.
receiverAddress
=
receiverInfoArr
[
2
]
+
receiverInfoArr
[
3
];
data
.
logistic
.
receiverAddress
=
receiverInfoArr
[
2
]
+
receiverInfoArr
[
3
];
let
deliverTime
=
data
.
logistic
.
deliverTime
?
data
.
logistic
.
deliverTime
:
null
;
if
(
deliverTime
){
let
diffObj
=
utils
.
getDateDiff
(
deliverTime
);
if
(
diffObj
.
days
<=
this
.
data
.
canRefundDaysAfterDelivery
){
data
.
orderCanRefund
=
true
;
}
else
{
data
.
orderCanRefund
=
false
;
}
}
else
{
data
.
orderCanRefund
=
true
;
}
}
}
else
{
else
{
data
.
logistic
=
null
;
data
.
logistic
=
null
;
}
}
let
skuVOList
=
data
.
skuVOList
?
data
.
skuVOList
:
[];
let
sum
=
0
;
skuVOList
.
forEach
(
item
=>
{
item
.
refundCount
=
item
.
refundCount
?
item
.
refundCount
:
0
;
item
.
canRefundNum
=
(
item
.
count
-
item
.
refundCount
)
>=
0
?
(
item
.
count
-
item
.
refundCount
)
:
0
;
sum
=
sum
+
item
.
price
*
item
.
count
;
});
//处理能不能退款
//处理能不能退款
let
canApplyRefund
=
true
;
let
canApplyRefund
=
true
;
let
filter
=
skuVOList
.
filter
(
c
=>
c
.
canRefundNum
>
0
);
let
filter
=
skuVOList
.
filter
(
c
=>
c
.
canRefundNum
>
0
);
...
@@ -113,6 +96,26 @@ wxService.page({
...
@@ -113,6 +96,26 @@ wxService.page({
canApplyRefund
=
false
;
canApplyRefund
=
false
;
}
}
if
(
data
.
status
==
'N'
||
data
.
status
==
'C'
){
const
{
localNowTime
}
=
this
.
data
data
.
localNowTime
=
localNowTime
?
localNowTime
:
new
Date
().
getTime
();
data
.
createOrderTime
=
new
Date
(
data
.
createTime
.
replace
(
/-/g
,
'/'
)).
getTime
()
||
[];
data
.
countDownOrderTime
=
7200000
;
// 2时(h)=7200000毫秒(ms)
// 订单倒计时 超多两小时 刷新当前页
data
.
orderCanRefund
=
true
;
data
.
skuVOList
.
forEach
(
item
=>
{
item
.
status
=
data
.
status
;
});
data
.
parcelList
=
[{
code
:
''
,
supplierCode
:
''
,
supplierName
:
''
,
status
:
data
.
status
,
sendOutList
:
data
.
skuVOList
,
}];
this
.
data
.
totalGoodsPrice
=
parseFloat
(
sum
).
toFixed
(
2
);
this
.
data
.
totalGoodsPrice
=
parseFloat
(
sum
).
toFixed
(
2
);
this
.
setData
({
this
.
setData
({
detail
:
data
,
detail
:
data
,
...
@@ -121,7 +124,68 @@ wxService.page({
...
@@ -121,7 +124,68 @@ wxService.page({
canApplyRefund
:
canApplyRefund
canApplyRefund
:
canApplyRefund
},
()
=>
{
},
()
=>
{
this
.
initCountDown
(
data
.
countDownOrderTime
,
data
.
createOrderTime
,
data
.
localNowTime
)
this
.
initCountDown
(
data
.
countDownOrderTime
,
data
.
createOrderTime
,
data
.
localNowTime
)
})
});
}
else
{
let
parcelList
=
data
.
parcelList
?
data
.
parcelList
:
[];
if
(
parcelList
.
length
==
0
){
parcelList
=
[{
code
:
'--'
,
supplierCode
:
'--'
,
supplierName
:
'--'
,
status
:
data
.
status
,
orderCanRefund
:
true
,
deliverTime
:
'--'
,
sendOutList
:
data
.
skuVOList
,
}]
data
.
parcelList
=
parcelList
;
}
else
{
parcelList
.
forEach
(
item
=>
{
item
.
code
=
item
.
code
?
item
.
code
:
'--'
;
item
.
supplierCode
=
item
.
supplierCode
?
item
.
supplierCode
:
'--'
;
item
.
supplierName
=
item
.
supplierName
?
item
.
supplierName
:
'--'
;
item
.
status
=
item
.
status
;
item
.
deliverTime
=
item
.
deliverTime
?
item
.
deliverTime
:
''
;
//计算一下包裹能不能退货
let
deliverTime
=
item
.
deliverTime
?
item
.
deliverTime
:
null
;
if
(
deliverTime
){
let
diffObj
=
utils
.
getDateDiff
(
deliverTime
);
if
(
diffObj
.
days
<=
this
.
data
.
canRefundDaysAfterDelivery
){
item
.
orderCanRefund
=
true
;
}
else
{
item
.
orderCanRefund
=
false
;
}
}
else
{
item
.
orderCanRefund
=
true
;
}
//找商品填充
let
sendOutList
=
[];
item
.
sendOutList
.
forEach
(
s
=>
{
let
filter
=
data
.
skuVOList
.
filter
(
f
=>
f
.
skuId
==
s
.
skuId
);
if
(
filter
.
length
>
0
){
sendOutList
.
push
(
filter
[
0
]);
}
});
item
.
sendOutList
=
sendOutList
;
});
}
console
.
log
(
data
)
this
.
data
.
totalGoodsPrice
=
parseFloat
(
sum
).
toFixed
(
2
);
this
.
setData
({
detail
:
data
,
totalGoodsPrice
:
this
.
data
.
totalGoodsPrice
,
mergedAmount
:
data
.
mergedAmount
||
0
,
canApplyRefund
:
canApplyRefund
});
}
}
}
}
}
})
})
...
@@ -247,11 +311,18 @@ wxService.page({
...
@@ -247,11 +311,18 @@ wxService.page({
success
(
res
)
{
success
(
res
)
{
wx
.
hideLoading
()
wx
.
hideLoading
()
// 支付成功页面
// 支付成功页面
wxService
.
router
(
`/subPackage/page/pages/paymentStatus/paymentStatus?status=S&amount=
${
amount
}
`
)
// wxService.router(`/subPackage/page/pages/paymentStatus/paymentStatus?status=S&amount=${amount}`)
wx
.
showToast
({
title
:
'支付成功'
,
});
this
.
getOrderDetail
(
this
.
data
.
id
);
},
},
fail
(
res
)
{
fail
(
res
)
{
wx
.
hideLoading
()
wx
.
hideLoading
()
wxService
.
router
(
'/subPackage/page/pages/paymentStatus/paymentStatus?status=F'
)
wx
.
showToast
({
title
:
'支付失败'
,
});
}
}
},
data
))
},
data
))
...
@@ -304,32 +375,32 @@ wxService.page({
...
@@ -304,32 +375,32 @@ wxService.page({
},
},
// 查看物流
// 查看物流
checkLogistics
(
e
)
{
checkLogistics
(
e
)
{
let
{
detail
}
=
e
.
currentTarget
.
dataset
let
{
detail
}
=
e
.
currentTarget
.
dataset
;
detail
.
id
=
this
.
data
.
id
;
let
copyOrderInfo
=
JSON
.
parse
(
JSON
.
stringify
(
detail
));
//过滤掉已经退货完的商品
copyOrderInfo
.
skuVOList
=
copyOrderInfo
.
skuVOList
.
filter
(
item
=>
item
.
canRefundNum
>
0
);
//更新可退货数量
copyOrderInfo
.
skuVOList
.
forEach
(
item
=>
{
item
.
totalCount
=
item
.
count
;
item
.
count
=
item
.
canRefundNum
;
});
let
obj
=
{
let
obj
=
{
id
:
copyOrderInfo
.
id
,
id
:
this
.
data
.
id
,
logistic
:
copyOrderInfo
.
logistic
,
logistic
:
{
status
:
copyOrderInfo
.
status
,
supplierName
:
detail
.
supplierName
,
code
:
detail
.
code
,
supplierCode
:
detail
.
supplierCode
,
},
status
:
detail
.
status
,
}
}
let
params
=
JSON
.
stringify
(
obj
);
let
params
=
JSON
.
stringify
(
obj
);
// 退款申请
//
//
退款申请
wxService
.
router
(
`/pages/logistics/logistics`
).
search
({
params
})
wxService
.
router
(
`/pages/logistics/logistics`
).
search
({
params
})
;
},
},
// 申请退款
// 申请退款
handelRequestRefund
(
e
)
{
handelRequestRefund
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
console
.
log
(
e
)
const
{
detail
}
=
e
.
currentTarget
.
dataset
let
orderId
=
e
.
currentTarget
.
dataset
.
id
;
detail
.
id
=
this
.
data
.
id
;
let
packageInfo
=
e
.
currentTarget
.
dataset
.
package
;
let
detail
=
{
id
:
orderId
,
skuVOList
:
packageInfo
.
sendOutList
,
}
let
copyOrderInfo
=
JSON
.
parse
(
JSON
.
stringify
(
detail
));
let
copyOrderInfo
=
JSON
.
parse
(
JSON
.
stringify
(
detail
));
//过滤掉已经退货完的商品
//过滤掉已经退货完的商品
copyOrderInfo
.
skuVOList
=
copyOrderInfo
.
skuVOList
.
filter
(
item
=>
item
.
canRefundNum
>
0
);
copyOrderInfo
.
skuVOList
=
copyOrderInfo
.
skuVOList
.
filter
(
item
=>
item
.
canRefundNum
>
0
);
...
@@ -339,28 +410,22 @@ wxService.page({
...
@@ -339,28 +410,22 @@ wxService.page({
item
.
count
=
item
.
canRefundNum
;
item
.
count
=
item
.
canRefundNum
;
});
});
delete
copyOrderInfo
.
store
;
delete
copyOrderInfo
.
storeAddress
;
delete
copyOrderInfo
.
storeCode
;
delete
copyOrderInfo
.
storeId
;
delete
copyOrderInfo
.
storeName
;
delete
copyOrderInfo
.
latitude
;
delete
copyOrderInfo
.
longitude
;
delete
copyOrderInfo
.
orderStore
;
let
params
=
JSON
.
stringify
(
copyOrderInfo
);
let
params
=
JSON
.
stringify
(
copyOrderInfo
);
// 退款申请
// 退款申请
wxService
.
router
(
`/pages/refund/refund`
).
search
({
params
})
wxService
.
router
(
`/pages/refund/refund`
).
search
({
params
})
},
},
// 确认收货
// 确认收货
handelConfirmReceipt
(
e
)
{
handelConfirmReceipt
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
let
id
=
e
.
currentTarget
.
dataset
.
id
;
let
packageInfo
=
e
.
currentTarget
.
dataset
.
package
;
let
parcelId
=
packageInfo
.
id
;
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
,
title
:
'加载中'
,
mask
:
true
mask
:
true
});
});
wxService
.
post
(
`/sale/trade/buyer/
confirm/
${
i
d
}
`
).
then
(
res
=>
{
wxService
.
post
(
`/sale/trade/buyer/
parcelConfirm?findId=
${
id
}
&parcelId=
${
parcelI
d
}
`
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
if
(
result
==
0
)
{
...
@@ -371,7 +436,7 @@ wxService.page({
...
@@ -371,7 +436,7 @@ wxService.page({
})
})
setTimeout
(()
=>
{
setTimeout
(()
=>
{
this
.
getOrderDetail
(
this
.
data
.
id
);
this
.
getOrderDetail
(
this
.
data
.
id
);
},
200
)
},
100
);
}
else
{
}
else
{
wx
.
showToast
({
wx
.
showToast
({
title
:
`确认收货失败!`
,
title
:
`确认收货失败!`
,
...
...
src/pages/orderDetail/orderDetail.wxml
View file @
db6ece49
...
@@ -12,212 +12,117 @@
...
@@ -12,212 +12,117 @@
<!-- 包裹信息 -->
<!-- 包裹信息 -->
<view class="package-container">
<view class="package-container">
<!-- 包裹 -->
<!-- 包裹 -->
<view class="order-package clear-box">
<view class="order-package clear-box"
wx:for="{{detail.parcelList}}" wx:for-item="item" wx:for-index="idx" wx:key="*this">
<view class="header-wrap clear-box"
<view class="header-wrap clear-box"
style="background-image:url({{orderTopBg}})">
style="background-image:url({{orderTopBg}})">
<view class="refund-status">
<view class="refund-status">
<!--订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货) -->
<!--订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货) -->
<view class="order-status" >
<view class="order-status" >
<view class="status" wx-if="{{
detail
.status == 'C'}}">
<view class="status" wx-if="{{
item
.status == 'C'}}">
<text>交易关闭</text>
<text>交易关闭</text>
<label>包裹
1
</label>
<label>包裹
{{idx + 1}}
</label>
</view>
</view>
<view class="desc" wx-if="{{
detail
.status == 'C'}}">订单已取消</view>
<view class="desc" wx-if="{{
item
.status == 'C'}}">订单已取消</view>
<view class="status" wx-if="{{
detail
.status == 'PR'}}">
<view class="status" wx-if="{{
item
.status == 'PR'}}">
<text>退货中</text>
<text>退货中</text>
<label>包裹
1
</label>
<label>包裹
{{idx + 1}}
</label>
</view>
</view>
<view class="desc" wx-if="{{
detail
.status == 'PR'}}">订单申请退货中,请耐心等待...</view>
<view class="desc" wx-if="{{
item
.status == 'PR'}}">订单申请退货中,请耐心等待...</view>
<view class="status" wx-if="{{
detail
.status == 'RE'}}">
<view class="status" wx-if="{{
item
.status == 'RE'}}">
<text>已退款</text>
<text>已退款</text>
<label>包裹
1
</label>
<label>包裹
{{idx + 1}}
</label>
</view>
</view>
<view class="desc" wx-if="{{
detail
.status == 'RE'}}">您的订单已退款完成</view>
<view class="desc" wx-if="{{
item
.status == 'RE'}}">您的订单已退款完成</view>
<view class="status" wx-if="{{
detail
.status == 'N'}}">
<view class="status" wx-if="{{
item
.status == 'N'}}">
<text>待付款</text>
<text>待付款</text>
<label>包裹
1
</label>
<label>包裹
{{idx + 1}}
</label>
</view>
</view>
<view class="desc" wx-if="{{
detail
.status == 'N'}}">支付时间仅剩:{{hour}}小时{{min}}分钟{{sec}}秒,超时将自动关闭</view>
<view class="desc" wx-if="{{
item
.status == 'N'}}">支付时间仅剩:{{hour}}小时{{min}}分钟{{sec}}秒,超时将自动关闭</view>
<view class="status" wx-if="{{
detail
.status == 'P'}}">
<view class="status" wx-if="{{
item
.status == 'P'}}">
<text>待发货</text>
<text>待发货</text>
<label>包裹
1
</label>
<label>包裹
{{idx + 1}}
</label>
</view>
</view>
<view class="desc" wx-if="{{
detail
.status == 'P'}}">商家安排发货中,请稍后</view>
<view class="desc" wx-if="{{
item
.status == 'P'}}">商家安排发货中,请稍后</view>
<view class="status" wx-if="{{
detail
.status == 'D'}}">
<view class="status" wx-if="{{
item
.status == 'D'}}">
<text>已发货</text>
<text>已发货</text>
<label>包裹1</label>
<label>包裹{{idx + 1}}</label>
</view>
<view class="desc" wx-if="{{item.status == 'D'}}">
{{item.supplierName}}: {{item.code}}
</view>
</view>
<view class="desc" wx-if="{{detail.status == 'D'}}">{{detail.logistic.supplierName}}: {{detail.logistic.code}}</view>
<view class="status" wx-if="{{
detail
.status == 'R'}}">
<view class="status" wx-if="{{
item
.status == 'R'}}">
<text>已完成</text>
<text>已完成</text>
<label>包裹1</label>
<label>包裹{{idx + 1}}</label>
</view>
<view class="desc" wx-if="{{item.status == 'R'}}">
{{item.supplierName}}: {{item.code}}
</view>
</view>
<view class="desc" wx-if="{{detail.status == 'R'}}">{{detail.logistic.supplierName}}: {{detail.logistic.code}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="package-products-container">
<view class="package-products-container">
<!-- 商品数据 -->
<!-- 商品数据 -->
<view class="package-products clear-box">
<view class="package-products clear-box">
<view class="product-item">
<view class="product-item"
<image src="https://img3.bigaka.com/test/1002/202003/20200302/1002c503d764-c600-4efb-a02b-339ed03b7e9b.jpg" class="lf-product-img" mode="aspectFit"></image>
wx:for="{{item.sendOutList}}"
wx:for-item="skuInfo"
wx:for-index="cIndex"
wx:key="*this">
<image src="{{skuInfo.skuImgUrl ? skuInfo.skuImgUrl : skuInfo.mainImgUrl}}" class="lf-product-img" mode="aspectFit"></image>
<view class="rg-product-info">
<view class="rg-product-info">
<view class="pro-name">
这个是商品的名称
</view>
<view class="pro-name">
{{skuInfo.productName}}
</view>
<view class="pro-spec">
这个是商品规格
</view>
<view class="pro-spec">
{{skuInfo.skuSpec}}
</view>
<view class="pro-count">
<view class="pro-count">
<text>数量</text>
<text>数量</text>
<label>x2</label>
<label>x{{skuInfo.count}}</label>
</view>
</view>
</view>
</view>
<view class="product-item">
<view class="refund-count" wx:if="{{skuInfo.refundCount > 0}}">
<image src="https://img3.bigaka.com/test/1002/202003/20200302/1002c503d764-c600-4efb-a02b-339ed03b7e9b.jpg" class="lf-product-img" mode="aspectFit"></image>
<text>退单</text>
<view class="rg-product-info">
<label>x{{skuInfo.refundCount}}</label>
<view class="pro-name">这个是商品的名称</view>
<view class="pro-spec">这个是商品规格</view>
<view class="pro-count">
<text>数量</text>
<label>x2</label>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 按钮 -->
<!-- 按钮 -->
<view class="package-btns">
<view class="package-btns">
<!-- <view class="btns normal-btn">取消订单</view>
<view class="btns normal-btn" wx:if="{{item.status == 'N'}}"
<view class="btns pay-now">立即支付</view> -->
data-id="{{detail.id}}" bindtap="handelCancelOrder">取消订单</view>
<view class="btns normal-btn">申请退款</view>
<view class="btns sure-get-goods">查看物流</view>
<view class="btns pay-now">确认收货</view>
</view>
</view>
</view>
<view class="order-package clear-box">
<view class="header-wrap clear-box"
style="background-image:url({{orderTopBg}})">
<view class="refund-status">
<!--订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货) -->
<view class="order-status" >
<view class="status" wx-if="{{detail.status == 'C'}}">
<text>交易关闭</text>
<label>包裹1</label>
</view>
<view class="desc" wx-if="{{detail.status == 'C'}}">订单已取消</view>
<view class="status" wx-if="{{detail.status == 'PR'}}">
<text>退货中</text>
<label>包裹1</label>
</view>
<view class="desc" wx-if="{{detail.status == 'PR'}}">订单申请退货中,请耐心等待...</view>
<view class="status" wx-if="{{detail.status == 'RE'}}">
<view class="btns normal-btn" wx:if="{{item.status == 'C' || item.status == 'RE'}}"
<text>已退款</text>
data-id="{{detail.id}}" bindtap="handelDelOrder">删除订单</view>
<label>包裹1</label>
</view>
<view class="desc" wx-if="{{detail.status == 'RE'}}">您的订单已退款完成</view>
<view class="status" wx-if="{{detail.status == 'N'}}">
<view class="btns pay-now" wx:if="{{item.status == 'N'}}"
<text>待付款</text>
data-id="{{detail.id}}" bindtap="handelToPay">立即支付</view>
<label>包裹1</label>
</view>
<view class="desc" wx-if="{{detail.status == 'N'}}">支付时间仅剩:{{hour}}小时{{min}}分钟{{sec}}秒,超时将自动关闭</view>
<view class="status" wx-if="{{detail.status == 'P'}}">
<view class="btns normal-btn"
<text>待发货</text>
wx:if="{{item.orderCanRefund}}"
<label>包裹1</label>
data-id="{{detail.id}}"
</view>
data-package="{{item}}"
<view class="desc" wx-if="{{detail.status == 'P'}}">商家安排发货中,请稍后
</view>
bindtap="handelRequestRefund">申请退款
</view>
<view class="status" wx-if="{{detail.status == 'D'}}">
<view class="btns sure-get-goods"
<text>已发货</text>
wx:if="{{item.status == 'D' || item.status == 'R'}}"
<label>包裹1</label>
data-id="{{detail.id}}" data-code="{{detail.logistic.supplierCode}}"
</view>
data-logisticsNo="{{detail.logistic.code}}"
<view class="desc" wx-if="{{detail.status == 'D'}}">{{detail.logistic.supplierName}}: {{detail.logistic.code}}
</view>
data-detail="{{item}}" bindtap="checkLogistics">查看物流
</view>
<view class="status" wx-if="{{detail.status == 'R'}}">
<view class="btns pay-now" wx:if="{{item.status == 'D'}}"
<text>已完成</text>
data-id="{{detail.id}}"
<label>包裹1</label>
data-package="{{item}}"
</view>
bindtap="handelConfirmReceipt">确认收货</view>
<view class="desc" wx-if="{{detail.status == 'R'}}">{{detail.logistic.supplierName}}: {{detail.logistic.code}}</view>
</view>
</view>
</view>
</view>
</view>
</view>
<view class="package-products-container">
<!-- 商品数据 -->
<view class="package-products clear-box">
<view class="product-item">
<image src="https://img3.bigaka.com/test/1002/202003/20200302/1002c503d764-c600-4efb-a02b-339ed03b7e9b.jpg" class="lf-product-img" mode="aspectFit"></image>
<view class="rg-product-info">
<view class="pro-name">这个是商品的名称</view>
<view class="pro-spec">这个是商品规格</view>
<view class="pro-count">
<text>数量</text>
<label>x2</label>
</view>
</view>
</view>
<view class="product-item">
<image src="https://img3.bigaka.com/test/1002/202003/20200302/1002c503d764-c600-4efb-a02b-339ed03b7e9b.jpg" class="lf-product-img" mode="aspectFit"></image>
<view class="rg-product-info">
<view class="pro-name">这个是商品的名称</view>
<view class="pro-spec">这个是商品规格</view>
<view class="pro-count">
<text>数量</text>
<label>x2</label>
</view>
<view class="refund-count">
<text>退单</text>
<label>x1</label>
</view>
</view>
</view>
</view>
</view>
<!-- 订单其他信息 -->
<!-- 按钮 -->
<view class="package-btns">
<!-- <view class="btns normal-btn">取消订单</view>
<view class="btns pay-now">立即支付</view> -->
<view class="btns normal-btn">申请退款</view>
<view class="btns sure-get-goods">查看物流</view>
<view class="btns pay-now">确认收货</view>
</view>
</view>
</view>
</view>
<!-- 原商品信息 改成包裹信息 -->
<!-- <view class="pro-wrap">
<block wx:for="{{detail.skuVOList}}" wx:for-item="item" wx:key="">
<view class="pro-list">
<image
data-img="{{item.skuImgUrl ? item.skuImgUrl : item.mainImgUrl}}"
bindtap='onTapShowImg'
class="pro-img"
src="{{item.skuImgUrl ? item.skuImgUrl : item.mainImgUrl}}"
mode='aspectFit'/>
<view class="pro-info">
<view class="pro-name">{{item.productName}}</view>
<view class="pro-desc">{{item.skuSpec}}</view>
<view class="pro-price">
<text class="price">¥{{item.price}}</text>
<text class="number">x {{item.count}}</text>
</view>
<view class="refund-info" wx:if="{{item.refundCount != 0}}">
<text class='refund-name'>退款</text>
<text>x {{item.refundCount}}</text>
</view>
</view>
</view>
</block>
</view> -->
<view class="order-detail-info">
<view class="order-detail-info">
<view class="order-pro-info">
<view class="order-pro-info">
<view class="order-pro-list">
<view class="order-pro-list">
...
@@ -264,30 +169,6 @@
...
@@ -264,30 +169,6 @@
<text>{{detail.logistic.receiverAddress}}</text>
<text>{{detail.logistic.receiverAddress}}</text>
</view>
</view>
</view>
</view>
<!-- 底部按钮 -->
<!-- <view class="button-wrap" wx-if="{{detail.status == 'C'}}">
<button class="btn btn-primary btn-lg" data-id="{{detail.id}}" bindtap="handelDelOrder">删除订单</button>
</view>
<view class="button-wrap" wx-if="{{detail.status == 'N'}}">
<button class="btn btn-primary btn-lg" data-id="{{detail.id}}" bindtap="handelToPay">立即支付</button>
<button class="btn btn-lg btn-gray" data-id="{{detail.id}}" bindtap="handelCancelOrder">取消订单</button>
</view>
<view class="button-wrap" wx:if="{{detail.orderCanRefund && (detail.status != 'N' && detail.status != 'C')}}">
<button
class="btn btn-gray btn-lg"
data-id="{{detail.id}}"
wx:if="{{detail.orderCanRefund}}"
data-detail="{{detail}}"
bindtap="handelRequestRefund"
>申请退款
</button>
<button
wx:if="{{detail.status == 'D'}}"
class="btn btn-lg btn-primary "
data-id="{{detail.id}}"
bindtap="handelConfirmReceipt">确认收货</button>
</view> -->
</view>
</view>
<go-home/>
<go-home/>
...
...
src/pages/orderDetail/orderDetail.wxss
View file @
db6ece49
...
@@ -399,6 +399,8 @@ page{
...
@@ -399,6 +399,8 @@ page{
opacity: 0.7;
opacity: 0.7;
}
}
/* .order-status- */
.header-wrap{
.header-wrap{
position: relative;
position: relative;
height: 160rpx;
height: 160rpx;
...
...
src/project.config.json
View file @
db6ece49
...
@@ -205,7 +205,7 @@
...
@@ -205,7 +205,7 @@
"id"
:
24
,
"id"
:
24
,
"name"
:
"订单详情"
,
"name"
:
"订单详情"
,
"pathName"
:
"pages/orderDetail/orderDetail"
,
"pathName"
:
"pages/orderDetail/orderDetail"
,
"query"
:
"id=695
665398192017408
"
,
"query"
:
"id=695
598415471579136
"
,
"scene"
:
null
"scene"
:
null
},
},
{
{
...
...
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