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
c5aa9070
Commit
c5aa9070
authored
Sep 21, 2019
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退货发货
parent
046d9291
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
122 additions
and
16 deletions
+122
-16
applyRefund.js
src/component/applyRefund/applyRefund.js
+95
-1
applyRefund.wxml
src/component/applyRefund/applyRefund.wxml
+4
-5
order.js
src/pages/order/order.js
+10
-4
order.wxml
src/pages/order/order.wxml
+1
-1
refundDetail.js
src/pages/refundDetail/refundDetail.js
+9
-2
refundDetail.wxml
src/pages/refundDetail/refundDetail.wxml
+3
-3
No files found.
src/component/applyRefund/applyRefund.js
View file @
c5aa9070
// component/applyRefund/applyRefund.js
// component/applyRefund/applyRefund.js
const
app
=
getApp
()
const
wxService
=
require
(
'../../utils/wxService'
)
const
utils
=
require
(
'../../utils/util'
)
const
envInfo
=
require
(
'../../config/index'
).
envInfo
Component
({
Component
({
/**
/**
* 组件的属性列表
* 组件的属性列表
...
@@ -7,6 +13,10 @@ Component({
...
@@ -7,6 +13,10 @@ Component({
show
:
{
// 显示标识
show
:
{
// 显示标识
type
:
Boolean
,
type
:
Boolean
,
value
:
false
value
:
false
},
refundId
:
{
type
:
String
,
value
:
''
}
}
},
},
...
@@ -14,7 +24,16 @@ Component({
...
@@ -14,7 +24,16 @@ Component({
* 组件的初始数据
* 组件的初始数据
*/
*/
data
:
{
data
:
{
isSelect
:
false
isSelect
:
false
,
reasonList
:
[],
reasonIndex
:
''
,
code
:
''
},
lifetimes
:{
ready
(){
this
.
getLogisticCompanyList
();
}
},
},
/**
/**
...
@@ -31,9 +50,84 @@ Component({
...
@@ -31,9 +50,84 @@ Component({
show
:
false
show
:
false
})
})
},
},
//选择改变
bindSelectRefundReason
(
event
){
this
.
setData
({
reasonIndex
:
event
.
detail
.
value
})
},
//inpuChange
inpuChange
(
e
){
this
.
setData
({
code
:
e
.
detail
.
value
});
},
//确认发货
onTabSure
(){
let
param
=
{};
param
.
refundId
=
this
.
data
.
refundId
;
let
company
=
this
.
data
.
reasonList
[
this
.
data
.
reasonIndex
];
if
(
!
company
){
wx
.
showToast
({
title
:
'请选择物流公司'
,
icon
:
'none'
});
return
;
}
if
(
!
this
.
data
.
code
){
wx
.
showToast
({
title
:
'请输入物流单号'
,
icon
:
'none'
})
return
;
}
param
.
refundLogistic
=
{
"code"
:
this
.
data
.
code
,
"supplierCode"
:
company
.
companyCode
,
"supplierName"
:
company
.
company
,
};
wx
.
showLoading
({
title
:
'请求中'
,
});
wxService
.
post
(
`/sale/refund/buyer/deliver`
,
param
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
showToast
({
title
:
`发货成功`
,
icon
:
'none'
});
this
.
setData
({
show
:
false
,
code
:
''
,
reasonIndex
:
''
,
});
this
.
triggerEvent
(
'ok'
,
true
)
}
}).
finally
(()
=>
{
wx
.
hideLoading
()
})
},
},
//获取物流公司信息
getLogisticCompanyList
(){
wxService
.
get
(
`/sale/logistics/findLogisticsCompanyList`
).
then
(
res
=>
{
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
this
.
setData
({
reasonList
:
data
})
}
}).
finally
(()
=>
{
})
},
},
})
})
src/component/applyRefund/applyRefund.wxml
View file @
c5aa9070
...
@@ -4,22 +4,21 @@
...
@@ -4,22 +4,21 @@
<view class="modal-header">
<view class="modal-header">
<image class="modal-close" mode="widthFix" src="/assets/imgs/7_1_0/close.png" bindtap="hidePopup"></image>
<image class="modal-close" mode="widthFix" src="/assets/imgs/7_1_0/close.png" bindtap="hidePopup"></image>
</view>
</view>
<view class="modal-info">
<view class="modal-info">
<view class="modal-logistics">
<view class="modal-logistics">
<view>
<view>
<picker bindchange="bindSelectRefundReason" value="{{reasonIndex}}" range="{{reasonList}}" range-key="
name
" class="modal-picker">
<picker bindchange="bindSelectRefundReason" value="{{reasonIndex}}" range="{{reasonList}}" range-key="
company
" class="modal-picker">
<view class="picker">
<view class="picker">
当前选择:{{reasonList[reasonIndex].
name
}}
当前选择:{{reasonList[reasonIndex].
company
}}
</view>
</view>
</picker>
</picker>
</view>
</view>
<view class="modal-logis-number">
<view class="modal-logis-number">
<input placeholder-class="modal-placeholder" class="modal-input" placeholder="填写物流单号"></input>
<input placeholder-class="modal-placeholder"
value="{{code}}" bindinput='inpuChange'
class="modal-input" placeholder="填写物流单号"></input>
</view>
</view>
</view>
</view>
<view class="modal-confirm-btn">
<view class="modal-confirm-btn">
<button class="btn btn-primary btn-lg">确认</button>
<button class="btn btn-primary btn-lg"
bindtap='onTabSure'
>确认</button>
</view>
</view>
</view>
</view>
</view>
</view>
src/pages/order/order.js
View file @
c5aa9070
...
@@ -47,7 +47,8 @@ wxService.page({
...
@@ -47,7 +47,8 @@ wxService.page({
subImgs
:
[],
subImgs
:
[],
status
:
''
,
// 订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货)
status
:
''
,
// 订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货)
no_data
:
true
,
no_data
:
true
,
currentTradeId
:
''
currentTradeId
:
''
,
refundId
:
''
},
},
/**
/**
...
@@ -345,11 +346,16 @@ wxService.page({
...
@@ -345,11 +346,16 @@ wxService.page({
// },
// },
//发货之后回调
onDeliveryOk
(){
this
.
getRefundList
(
1
,
5
);
},
//填写物流信息
//填写物流信息
tapWriteLogis
()
{
tapWriteLogis
(
e
)
{
console
.
log
(
'222'
)
let
refundId
=
e
.
currentTarget
.
dataset
.
id
;
this
.
setData
({
this
.
setData
({
showApplyRefundModal
:
true
showApplyRefundModal
:
true
,
refundId
:
refundId
})
})
},
},
/**
/**
...
...
src/pages/order/order.wxml
View file @
c5aa9070
...
@@ -172,7 +172,7 @@
...
@@ -172,7 +172,7 @@
当前无数据
当前无数据
</view>
</view>
</view>
</view>
<apply-refund show="{{showApplyRefundModal}}" />
<apply-refund show="{{showApplyRefundModal}}"
refundId="{{refundId}}" bind:ok="onDeliveryOk"
/>
<!--goHome-->
<!--goHome-->
<go-home/>
<go-home/>
src/pages/refundDetail/refundDetail.js
View file @
c5aa9070
...
@@ -12,7 +12,8 @@ wxService.page({
...
@@ -12,7 +12,8 @@ wxService.page({
data
:
{
data
:
{
showApplyRefundModal
:
false
,
showApplyRefundModal
:
false
,
id
:
''
,
id
:
''
,
refundDetail
:
null
refundDetail
:
null
,
refundId
:
null
},
},
/**
/**
...
@@ -58,6 +59,10 @@ wxService.page({
...
@@ -58,6 +59,10 @@ wxService.page({
}
}
})
})
},
},
//填写物流信息之后回调
onDeliveryOk
(){
this
.
getRfDetail
(
this
.
data
.
id
);
},
getRfDetail
(
id
)
{
getRfDetail
(
id
)
{
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
,
title
:
'加载中'
,
...
@@ -92,7 +97,8 @@ wxService.page({
...
@@ -92,7 +97,8 @@ wxService.page({
tapWriteLogis
()
{
tapWriteLogis
()
{
console
.
log
(
'222'
)
console
.
log
(
'222'
)
this
.
setData
({
this
.
setData
({
showApplyRefundModal
:
true
showApplyRefundModal
:
true
,
refundId
:
this
.
data
.
id
})
})
}
}
})
})
\ No newline at end of file
src/pages/refundDetail/refundDetail.wxml
View file @
c5aa9070
...
@@ -31,13 +31,13 @@
...
@@ -31,13 +31,13 @@
<view class="logistics-info">
<view class="logistics-info">
<view class="logistics-item">
<view class="logistics-item">
<text>物流公司</text>
<text>物流公司</text>
<text class="company">{{refundDetail.refundLogistic.supplier
Cod
e}}</text>
<text class="company">{{refundDetail.refundLogistic.supplier
Nam
e}}</text>
</view>
</view>
<view class="logistics-item">
<view class="logistics-item">
<text>快递单号</text>
<text>快递单号</text>
<text class="company">{{refundDetail.refundLogistic.code}}</text>
<text class="company">{{refundDetail.refundLogistic.code}}</text>
</view>
</view>
<view class="write-logistics" bindtap="tapWriteLogis">
<view class="write-logistics" bindtap="tapWriteLogis"
wx:if="{{refundDetail.status == 'A'}}"
>
<button class="btn btn-primary btn-outline write-btn">填写物流信息</button>
<button class="btn btn-primary btn-outline write-btn">填写物流信息</button>
</view>
</view>
</view>
</view>
...
@@ -117,7 +117,7 @@
...
@@ -117,7 +117,7 @@
</view>
</view>
</view>
</view>
<apply-refund show="{{showApplyRefundModal}}" />
<apply-refund show="{{showApplyRefundModal}}"
refundId="{{refundId}}" bind:ok="onDeliveryOk"
/>
<!--goHome-->
<!--goHome-->
<go-home/>
<go-home/>
...
...
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