Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
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
黄庭坚
jinfa-platform
Commits
05e1698f
Commit
05e1698f
authored
Nov 06, 2020
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
78e52352
041a6a3d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
55 changed files
with
2299 additions
and
166 deletions
+2299
-166
repairRoute.ts
config/routes/afterServiceRoute/repairRoute.ts
+10
-1
returnRoute.ts
config/routes/afterServiceRoute/returnRoute.ts
+31
-5
RightContent.tsx
src/layouts/components/RightContent.tsx
+23
-23
menu.ts
src/locales/zh-CN/menu.ts
+6
-2
index.tsx
src/pages/afterService/components/AddressFormItem/index.tsx
+8
-9
index.tsx
src/pages/afterService/components/FileList/index.tsx
+1
-1
index.tsx
src/pages/afterService/components/IntroduceRow/index.tsx
+0
-35
index.less
...ages/afterService/components/RepairAddressInfo/index.less
+0
-0
index.tsx
...pages/afterService/components/RepairAddressInfo/index.tsx
+4
-4
index.less
...ages/afterService/components/ReturnAddressInfo/index.less
+0
-0
index.tsx
...pages/afterService/components/ReturnAddressInfo/index.tsx
+36
-0
index.tsx
src/pages/afterService/components/ReturnInfoDrawer/index.tsx
+51
-59
index.ts
.../afterService/components/ReturnInfoDrawer/schema/index.ts
+221
-0
index.tsx
src/pages/afterService/components/Score/index.tsx
+2
-1
index.less
src/pages/afterService/components/Stamp/index.less
+1
-0
index.tsx
src/pages/afterService/components/Stamp/index.tsx
+3
-1
index.tsx
...Service/repairApplication/components/DetailInfo/index.tsx
+24
-2
detail.less
...afterService/repairApplication/repairPrSubmit/detail.less
+0
-0
detail.tsx
.../afterService/repairApplication/repairPrSubmit/detail.tsx
+14
-0
editRepair.less
...rService/repairApplication/repairPrSubmit/editRepair.less
+0
-0
editRepair.tsx
...erService/repairApplication/repairPrSubmit/editRepair.tsx
+14
-0
index.tsx
...s/afterService/repairApplication/repairPrSubmit/index.tsx
+3
-3
index.tsx
...afterService/repairManage/components/DetailInfo/index.tsx
+24
-2
index.tsx
...Service/returnApplication/components/DetailInfo/index.tsx
+24
-4
index.less
...erService/returnApplication/returnPrAddDeliver/index.less
+0
-0
index.tsx
...terService/returnApplication/returnPrAddDeliver/index.tsx
+230
-0
index.ts
...vice/returnApplication/returnPrAddDeliver/schema/index.ts
+96
-0
index.less
...terService/returnApplication/returnPrLogistics/index.less
+0
-0
index.tsx
...fterService/returnApplication/returnPrLogistics/index.tsx
+230
-0
index.ts
...rvice/returnApplication/returnPrLogistics/schema/index.ts
+96
-0
addReturn.less
...erService/returnApplication/returnPrSubmit/addReturn.less
+0
-0
addReturn.tsx
...terService/returnApplication/returnPrSubmit/addReturn.tsx
+11
-0
index.less
...lication/returnPrSubmit/components/GoodsDrawer/index.less
+14
-0
index.tsx
...plication/returnPrSubmit/components/GoodsDrawer/index.tsx
+352
-0
index.ts
...ion/returnPrSubmit/components/GoodsDrawer/schema/index.ts
+78
-0
index.ts
...ion/returnPrSubmit/components/ReturnForm/effects/index.ts
+31
-0
useBusinessEffects.ts
...ubmit/components/ReturnForm/effects/useBusinessEffects.ts
+43
-0
index.less
...plication/returnPrSubmit/components/ReturnForm/index.less
+0
-0
index.tsx
...pplication/returnPrSubmit/components/ReturnForm/index.tsx
+188
-0
index.ts
...tion/returnPrSubmit/components/ReturnForm/schema/index.ts
+0
-0
detail.less
...afterService/returnApplication/returnPrSubmit/detail.less
+0
-0
detail.tsx
.../afterService/returnApplication/returnPrSubmit/detail.tsx
+14
-0
editReturn.less
...rService/returnApplication/returnPrSubmit/editReturn.less
+0
-0
editReturn.tsx
...erService/returnApplication/returnPrSubmit/editReturn.tsx
+14
-0
index.less
.../afterService/returnApplication/returnPrSubmit/index.less
+0
-0
index.tsx
...s/afterService/returnApplication/returnPrSubmit/index.tsx
+257
-0
index.ts
...rService/returnApplication/returnPrSubmit/schema/index.ts
+90
-0
index.tsx
...ages/afterService/returnApplication/returnQuery/index.tsx
+12
-0
index.tsx
src/pages/lxMall/commodityDetail/index.tsx
+2
-1
index.tsx
src/pages/lxMall/order/index.tsx
+4
-5
index.tsx
src/pages/lxMall/order/payway/index.tsx
+11
-2
index.tsx
src/pages/lxMall/pay/components/credit/index.tsx
+8
-3
index.tsx
src/pages/lxMall/pay/index.tsx
+15
-2
index.tsx
...dSettle/creditApplication/components/DetailInfo/index.tsx
+1
-1
index.tsx
...editApplication/components/QuotaApplicationInfo/index.tsx
+2
-0
No files found.
config/routes/afterServiceRoute/repairRoute.ts
View file @
05e1698f
...
...
@@ -36,17 +36,26 @@ const route: RouterChild = {
{
path
:
'/memberCenter/afterService/repairApplication/repairPrSubmit/detail'
,
name
:
'repairPrSubmitDetail'
,
component
:
'@/pages/afterService/repairApplication/repairPrSubmit/detail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待提交维修申请单-新增
{
path
:
'/memberCenter/afterService/repairApplication/repairPrSubmit/add
Repair
'
,
path
:
'/memberCenter/afterService/repairApplication/repairPrSubmit/add'
,
name
:
'addRepair'
,
component
:
'@/pages/afterService/repairApplication/repairPrSubmit/addRepair'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待提交维修申请单-编辑
{
path
:
'/memberCenter/afterService/repairApplication/repairPrSubmit/edit'
,
name
:
'editRepair'
,
component
:
'@/pages/afterService/repairApplication/repairPrSubmit/editRepair'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待确认售后完成
{
path
:
'/memberCenter/afterService/repairApplication/repairPrFinished'
,
...
...
config/routes/afterServiceRoute/returnRoute.ts
View file @
05e1698f
...
...
@@ -28,13 +28,39 @@ const route: RouterChild = {
},
// 待提交退货申请单
{
path
:
'/memberCenter/afterService/return/waitSubmitOrder'
,
name
:
'waitSubmitOrder'
,
path
:
'/memberCenter/afterService/returnApplication/returnPrSubmit'
,
name
:
'returnPrSubmit'
,
component
:
'@/pages/afterService/returnApplication/returnPrSubmit/index'
,
},
// 待
退货发货
// 待
提交退货申请单-详情
{
path
:
'/memberCenter/afterService/return/waitReturnAndSendOut'
,
name
:
'waitReturnAndSendOut'
,
path
:
'/memberCenter/afterService/returnApplication/returnPrSubmit/detail'
,
name
:
'returnPrSubmitDetail'
,
component
:
'@/pages/afterService/returnApplication/returnPrSubmit/detail'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待提交退货申请单-新增
{
path
:
'/memberCenter/afterService/returnApplication/returnPrSubmit/add'
,
name
:
'addReturnPrSubmit'
,
component
:
'@/pages/afterService/returnApplication/returnPrSubmit/addReturn'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待提交退货申请单-编辑
{
path
:
'/memberCenter/afterService/returnApplication/returnPrSubmit/edit'
,
name
:
'editReturnPrSubmit'
,
component
:
'@/pages/afterService/returnApplication/returnPrSubmit/editReturn'
,
hideInMenu
:
true
,
noMargin
:
true
,
},
// 待新增退货发货单
{
path
:
'/memberCenter/afterService/returnApplication/returnPrAddDeliver'
,
name
:
'returnPrAddDeliver'
,
component
:
'@/pages/afterService/returnApplication/returnPrAddDeliver/index'
,
},
// 待确认退货回单
{
...
...
src/layouts/components/RightContent.tsx
View file @
05e1698f
...
...
@@ -28,29 +28,29 @@ const GlobalHeaderRight: React.SFC<{}> = (props) => {
return
(
<
div
className=
{
className
}
>
<
Link
to=
'/'
style=
{
{
color
:
'rgba(0, 0, 0, 0.85)'
}
}
>
返回商城
</
Link
>
<
Roles
/>
<
Location
/>
<
SelectLang
/>
<
Tooltip
title=
"消息"
>
<
a
target=
"_blank"
href=
""
rel=
"noopener noreferrer"
className=
{
styles
.
action
}
>
<
BellOutlined
/>
</
a
>
</
Tooltip
>
<
Tooltip
title=
"服务"
>
<
a
target=
"_blank"
href=
""
rel=
"noopener noreferrer"
className=
{
styles
.
action
}
>
<
CustomerServiceOutlined
/>
</
a
>
</
Tooltip
>
<
Roles
/>
<
Location
/>
<
SelectLang
/>
<
Tooltip
title=
"消息"
>
<
a
target=
"_blank"
href=
""
rel=
"noopener noreferrer"
className=
{
styles
.
action
}
>
<
BellOutlined
/>
</
a
>
</
Tooltip
>
<
Tooltip
title=
"服务"
>
<
a
target=
"_blank"
href=
""
rel=
"noopener noreferrer"
className=
{
styles
.
action
}
>
<
CustomerServiceOutlined
/>
</
a
>
</
Tooltip
>
<
Avatar
/>
</
div
>
);
...
...
src/locales/zh-CN/menu.ts
View file @
05e1698f
...
...
@@ -515,8 +515,11 @@ export default {
'menu.afterService.returnApplication'
:
'退货申请'
,
'menu.afterService.returnApplication.returnQuery'
:
'退申请单查询'
,
'menu.afterService.returnApplication.returnQueryDetail'
:
'查看退申请单'
,
'menu.afterService.returnApplication.waitSubmitOrder'
:
'待提交退货申请单'
,
'menu.afterService.returnApplication.waitReturnAndSendOut'
:
'待退货发货'
,
'menu.afterService.returnApplication.returnPrSubmit'
:
'待提交退货申请单'
,
'menu.afterService.returnApplication.returnPrSubmitDetail'
:
'查看退申请单'
,
'menu.afterService.returnApplication.addReturnPrSubmit'
:
'新建退申请单'
,
'menu.afterService.returnApplication.editReturnPrSubmit'
:
'编辑退申请单'
,
'menu.afterService.returnApplication.returnPrAddDeliver'
:
'待新增退货发货单'
,
'menu.afterService.returnApplication.waitConfirmOrder'
:
'待确认退货回单'
,
'menu.afterService.returnApplication.waitConfirmRefundResult'
:
'待确认退款结果'
,
'menu.afterService.returnApplication.waitConfirmFinsh'
:
'待确认售后完成'
,
...
...
@@ -536,6 +539,7 @@ export default {
'menu.afterService.repairApplication.repairPrSubmit'
:
'待提交维修申请单'
,
'menu.afterService.repairApplication.repairPrSubmitDetail'
:
'查看维修申请单'
,
'menu.afterService.repairApplication.addRepair'
:
'新建维修申请单'
,
'menu.afterService.repairApplication.editRepair'
:
'编辑维修申请单'
,
'menu.afterService.repairApplication.repairPrFinished'
:
'待确认售后完成'
,
'menu.afterService.repairApplication.repairPrFinishedDetail'
:
'查看维修申请单'
,
'menu.afterService.repairApplication.verifyRepairPrFinished'
:
'确认售后完成'
,
...
...
src/pages/afterService/components/AddressFormItem/index.tsx
View file @
05e1698f
...
...
@@ -29,14 +29,12 @@ interface AddressFormItemProps {
onChange
:
(
id
:
string
)
=>
{};
};
const
AddressFormItem
=
(
props
:
AddressFormItemProps
)
=>
{
const
{
value
,
showCount
=
3
,
dataSource
=
[],
onChange
,
}
=
props
;
const
AddressFormItem
:
React
.
FC
<
AddressFormItemProps
>
&
{
isFieldComponent
:
boolean
}
=
({
value
,
showCount
=
3
,
dataSource
=
[],
onChange
,
})
=>
{
const
[
showMore
,
setShowMore
]
=
useState
(
false
);
useEffect
(()
=>
{
...
...
@@ -96,6 +94,6 @@ const AddressFormItem = (props: AddressFormItemProps) => {
AddressFormItem
.
defaultProps
=
{};
//
AddressFormItem.isFieldComponent = true;
AddressFormItem
.
isFieldComponent
=
true
;
export
default
AddressFormItem
;
\ No newline at end of file
src/pages/afterService/components/FileList/index.tsx
View file @
05e1698f
...
...
@@ -2,7 +2,7 @@
* @Author: XieZhiXiong
* @Date: 2020-11-03 11:49:34
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-0
3 14:11:09
* @LastEditTime: 2020-11-0
6 10:02:30
* @Description: 附件列表
*/
import
React
from
'react'
;
...
...
src/pages/afterService/components/IntroduceRow/index.tsx
deleted
100644 → 0
View file @
78e52352
import
React
,
{
Suspense
}
from
'react'
;
import
{
Row
,
Col
}
from
'antd'
;
const
FileList
=
React
.
lazy
(()
=>
import
(
'../FileList'
));
const
AddressInfo
=
React
.
lazy
(()
=>
import
(
'../AddressInfo'
));
const
Score
=
React
.
lazy
(()
=>
import
(
'../Score'
));
const
IntroduceRow
:
React
.
FC
=
()
=>
{
return
(
<
Row
gutter=
{
24
}
>
<
Col
span=
{
6
}
>
<
Suspense
fallback=
{
null
}
>
<
FileList
/>
</
Suspense
>
</
Col
>
<
Col
span=
{
12
}
>
<
Suspense
fallback=
{
null
}
>
<
AddressInfo
/>
</
Suspense
>
</
Col
>
<
Col
span=
{
6
}
>
<
Suspense
fallback=
{
null
}
>
<
Score
/>
</
Suspense
>
</
Col
>
</
Row
>
);
};
export
default
IntroduceRow
;
\ No newline at end of file
src/pages/afterService/components/AddressInfo/index.less
→
src/pages/afterService/components/
Repair
AddressInfo/index.less
View file @
05e1698f
File moved
src/pages/afterService/components/AddressInfo/index.tsx
→
src/pages/afterService/components/
Repair
AddressInfo/index.tsx
View file @
05e1698f
...
...
@@ -3,14 +3,14 @@
* @Date: 2020-11-03 13:53:58
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-03 14:11:57
* @Description:
地址信息
* @Description:
维修地址
*/
import
React
from
'react'
;
import
{
Descriptions
}
from
'antd'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
styles
from
'./index.less'
;
const
AddressInfo
:
React
.
FC
=
()
=>
{
const
Repair
AddressInfo
:
React
.
FC
=
()
=>
{
return
(
<
MellowCard
title=
"维修地址"
...
...
@@ -26,4 +26,4 @@ const AddressInfo: React.FC = () => {
);
};
export
default
AddressInfo
;
\ No newline at end of file
export
default
RepairAddressInfo
;
\ No newline at end of file
src/pages/afterService/components/
IntroduceRow
/index.less
→
src/pages/afterService/components/
ReturnAddressInfo
/index.less
View file @
05e1698f
File moved
src/pages/afterService/components/ReturnAddressInfo/index.tsx
0 → 100644
View file @
05e1698f
/*
* @Author: XieZhiXiong
* @Date: 2020-11-06 09:54:04
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-06 09:54:16
* @Description: 退货地址信息
*/
import
React
from
'react'
;
import
{
Descriptions
}
from
'antd'
;
import
MellowCard
from
'@/components/MellowCard'
;
import
styles
from
'./index.less'
;
const
ReturnAddressInfo
:
React
.
FC
=
()
=>
{
return
(
<
MellowCard
title=
"收货地址"
fullHeight
>
<
Descriptions
column=
{
1
}
className=
{
styles
.
desc
}
>
<
Descriptions
.
Item
label=
"配送方式"
>
物流
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"退货收货地址"
>
<
p
>
张三 / 185 2929 6475
</
p
>
<
p
>
广东省广州市海珠区新港东路1068号中洲中心北塔6楼
</
p
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"退货发货地址"
>
<
p
>
张三 / 185 2929 6475
</
p
>
<
p
>
广东省广州市海珠区新港东路1068号中洲中心北塔6楼
</
p
>
</
Descriptions
.
Item
>
</
Descriptions
>
</
MellowCard
>
);
};
export
default
ReturnAddressInfo
;
src/pages/afterService/components/ReturnInfoDrawer/index.tsx
View file @
05e1698f
...
...
@@ -2,25 +2,32 @@
* @Author: XieZhiXiong
* @Date: 2020-11-05 17:36:45
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-0
5 18:02:00
* @LastEditTime: 2020-11-0
6 15:45:19
* @Description: 查看退货数量与退款金额 抽屉
*/
import
React
from
'react'
;
import
{
Drawer
,
Tabs
}
from
'antd'
;
import
DescribeLine
from
'../DescribeLine'
;
import
{
Drawer
,
Button
}
from
'antd'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
schema
from
'./schema'
;
import
Stamp
from
'../Stamp'
;
import
styles
from
'./index.less'
;
const
{
TabPane
}
=
Tabs
;
const
schemaAction
=
createFormActions
()
;
interface
ReturnInfoDrawerProps
{
visible
:
boolean
;
onClose
:
()
=>
void
;
onSubmit
?:
(
values
:
{
[
key
:
string
]:
any
})
=>
void
;
// 是否是编辑的
isEdit
?:
boolean
;
};
const
ReturnInfoDrawer
:
React
.
FC
<
ReturnInfoDrawerProps
>
=
({
visible
=
false
,
onClose
,
onSubmit
,
isEdit
=
false
,
})
=>
{
const
handleClose
=
()
=>
{
...
...
@@ -28,71 +35,56 @@ const ReturnInfoDrawer: React.FC<ReturnInfoDrawerProps> = ({
onClose
();
}
};
const
handleSubmit
=
values
=>
{
console
.
log
(
'values'
,
values
)
if
(
onSubmit
)
{
onSubmit
(
values
);
}
};
return
(
<
Drawer
title=
"查看退货数量与退款金额"
placement=
"right"
width=
{
1120
}
onClose=
{
()
=>
handleClose
()
}
onClose=
{
handleClose
}
visible=
{
visible
}
closable=
{
false
}
footer=
{
<
div
style=
{
{
textAlign
:
'right'
,
}
}
>
<
Button
onClick=
{
handleClose
}
style=
{
{
marginRight
:
8
}
}
>
取消
</
Button
>
<
Button
onClick=
{
()
=>
schemaAction
.
submit
()
}
type=
"primary"
>
确定
</
Button
>
</
div
>
}
>
<
Tabs
defaultActiveKey=
"1"
tabPosition=
"left"
>
<
TabPane
tab=
"订单信息"
key=
"1"
>
<
h2
className=
{
styles
.
paneTitle
}
>
订单信息
</
h2
>
<
DescribeLine
column=
{
2
}
>
<
DescribeLine
.
Item
title=
"订单号"
titleWidth=
"102px"
>
SPTY12
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"商品名称"
titleWidth=
"102px"
>
进口头层牛皮荔枝纹/红色/XL
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"品类"
titleWidth=
"102px"
>
牛皮
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"品牌"
titleWidth=
"102px"
>
PELLE
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"单位"
titleWidth=
"102px"
>
尺
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"采购数量"
titleWidth=
"102px"
>
2,000
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"采购单价"
titleWidth=
"102px"
>
¥ 20.00
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"采购金额"
titleWidth=
"102px"
>
¥ 40,000.00
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"退货数量"
titleWidth=
"102px"
>
1,000
</
DescribeLine
.
Item
>
</
DescribeLine
>
</
TabPane
>
<
TabPane
tab=
"支付信息"
key=
"2"
>
<
h2
className=
{
styles
.
paneTitle
}
>
支付信息
</
h2
>
<
div
className=
{
styles
.
payInfo
}
>
<
div
className=
{
styles
[
'payInfo-item'
]
}
>
<
Stamp
imprinted
>
<
DescribeLine
column=
{
2
}
>
<
DescribeLine
.
Item
title=
"支付次数"
>
1
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"支付环节"
>
订单确认后支付
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"支付方式"
>
授信额度支付方式
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"支付金额(元)"
>
12,000
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"支付渠道"
>
授信额度支付
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"支付时间"
>
2020-05-20 10:00
</
DescribeLine
.
Item
>
</
DescribeLine
>
</
Stamp
>
</
div
>
<
div
className=
{
styles
[
'payInfo-item'
]
}
>
<
Stamp
imprinted
>
<
DescribeLine
column=
{
2
}
>
<
DescribeLine
.
Item
title=
"支付次数"
>
1
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"支付环节"
>
订单确认后支付
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"支付方式"
>
授信额度支付方式
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"支付金额(元)"
>
12,000
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"支付渠道"
>
授信额度支付
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"支付时间"
>
2020-05-20 10:00
</
DescribeLine
.
Item
>
</
DescribeLine
>
</
Stamp
>
</
div
>
</
div
>
<
NiceForm
initialValues=
{
{}
}
components=
{
{
Stamp
,
}
}
editable=
{
isEdit
}
effects=
{
(
$
,
actions
)
=>
{
</
TabPane
>
<
TabPane
tab=
"退款信息"
key=
"3"
>
<
h2
className=
{
styles
.
paneTitle
}
>
退款信息
</
h2
>
<
DescribeLine
column=
{
1
}
>
<
DescribeLine
.
Item
title=
"退款金额(元)"
titleWidth=
"102px"
>
20,000.00
</
DescribeLine
.
Item
>
<
DescribeLine
.
Item
title=
"退货原因"
titleWidth=
"102px"
>
质量缺陷L
</
DescribeLine
.
Item
>
</
DescribeLine
>
</
TabPane
>
</
Tabs
>
}
}
onSubmit=
{
handleSubmit
}
actions=
{
schemaAction
}
schema=
{
schema
}
/>
</
Drawer
>
);
};
...
...
src/pages/afterService/components/ReturnInfoDrawer/schema/index.ts
0 → 100644
View file @
05e1698f
/*
* @Author: XieZhiXiong
* @Date: 2020-11-06 14:20:17
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-06 15:40:09
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
PATTERN_MAPS
}
from
'@/constants/regExp'
;
const
schema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
REPOSIT_TABS
:
{
type
:
'object'
,
'x-component'
:
'tab'
,
'x-component-props'
:
{
tabPosition
:
'left'
,
},
properties
:
{
'tab-1'
:
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component-props'
:
{
tab
:
'订单信息'
,
},
properties
:
{
MEGA_LAYOUT_1
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
labelCol
:
4
,
wrapperCol
:
20
,
},
properties
:
{
orderNo
:
{
type
:
'string'
,
title
:
'订单号'
,
default
:
'SPTY12'
,
'x-component'
:
'Text'
,
},
productName
:
{
type
:
'string'
,
title
:
'商品名称'
,
default
:
'进口头层牛皮荔枝纹/红色/XL'
,
'x-component'
:
'Text'
,
},
category
:
{
type
:
'string'
,
title
:
'品类'
,
default
:
'牛皮'
,
'x-component'
:
'Text'
,
},
brand
:
{
type
:
'string'
,
title
:
'品牌'
,
default
:
'阿比巴斯'
,
'x-component'
:
'Text'
,
},
unit
:
{
type
:
'string'
,
title
:
'单位'
,
default
:
'尺'
,
'x-component'
:
'Text'
,
},
quantity
:
{
type
:
'string'
,
title
:
'采购数量'
,
default
:
'2,000'
,
'x-component'
:
'Text'
,
},
price
:
{
type
:
'string'
,
title
:
'采购单价'
,
default
:
'¥ 20.00'
,
'x-component'
:
'Text'
,
},
amount
:
{
type
:
'string'
,
title
:
'采购金额'
,
default
:
'¥ 40,000.00'
,
'x-component'
:
'Text'
,
},
returnNum
:
{
type
:
'string'
,
title
:
'退货数量'
,
'x-rules'
:
[
{
required
:
true
,
message
:
'请填写退货数量'
,
},
{
pattern
:
PATTERN_MAPS
.
quantity
,
message
:
'请填写大于等于1的正整数'
,
},
],
},
},
},
},
},
'tab-2'
:
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component-props'
:
{
tab
:
'支付信息'
,
},
properties
:
{
STAMP_1
:
{
type
:
'object'
,
'x-component'
:
'Stamp'
,
'x-component-props'
:
{
imprinted
:
true
,
},
properties
:
{
MEGA_LAYOUT_1
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
labelCol
:
6
,
wrapperCol
:
18
,
grid
:
true
,
columns
:
2
,
autoRow
:
true
,
},
properties
:
{
payCount
:
{
type
:
'string'
,
title
:
'支付次数'
,
default
:
'1'
,
'x-component'
:
'Text'
,
},
payLink
:
{
type
:
'string'
,
title
:
'支付环节'
,
default
:
'1'
,
'x-component'
:
'Text'
,
},
payProportion
:
{
type
:
'string'
,
title
:
'支付比例'
,
default
:
'1'
,
'x-component'
:
'Text'
,
},
payWay
:
{
type
:
'string'
,
title
:
'支付方式'
,
default
:
'1'
,
'x-component'
:
'Text'
,
},
payReturnAmount
:
{
type
:
'string'
,
title
:
'退款金额(元)'
,
},
payChannel
:
{
type
:
'string'
,
title
:
'支付渠道'
,
default
:
'授信额度支付'
,
'x-component'
:
'Text'
,
},
payTime
:
{
type
:
'string'
,
title
:
'支付时间'
,
default
:
'2020-05-20 10:00'
,
'x-component'
:
'Text'
,
},
},
}
},
},
},
},
'tab-3'
:
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component-props'
:
{
tab
:
'退款信息'
,
},
properties
:
{
MEGA_LAYOUT_3
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
4
,
},
properties
:
{
returnAmount
:
{
type
:
'string'
,
title
:
'退款金额(元)'
,
default
:
'20,000.00'
,
'x-component'
:
'Text'
,
},
reason
:
{
type
:
'string'
,
title
:
'退货原因'
,
'x-component'
:
'textarea'
,
'x-component-props'
:
{
rows
:
4
,
},
'x-rules'
:
[
{
required
:
true
,
message
:
'请填写退货原因'
,
},
{
limitByte
:
true
,
// 自定义校验规则
maxByte
:
60
,
}
],
},
},
},
},
},
},
},
},
};
export
default
schema
;
\ No newline at end of file
src/pages/afterService/components/Score/index.tsx
View file @
05e1698f
...
...
@@ -12,7 +12,8 @@ import { Gauge } from '@/components/Charts';
const
Score
:
React
.
FC
=
()
=>
{
return
(
<
MellowCard
title=
"售后评价"
title=
"售后评价"
fullHeight
>
<
Gauge
title=
"5分"
...
...
src/pages/afterService/components/Stamp/index.less
View file @
05e1698f
.stamp {
padding: 16px;
margin: 10px;
background: #FFFFFF;
box-shadow: 0px 4px 6px 0px rgba(23, 43, 77, 0.08), 0px 0px 1px 0px rgba(23, 43, 77, 0.12);
border-radius: 4px;
...
...
src/pages/afterService/components/Stamp/index.tsx
View file @
05e1698f
...
...
@@ -13,7 +13,7 @@ interface StampProps {
imprinted
?:
boolean
;
};
const
Stamp
:
React
.
FC
<
StampProps
>
=
({
const
Stamp
:
React
.
FC
<
StampProps
>
&
{
isVirtualFieldComponent
:
boolean
}
=
({
imprinted
=
false
,
children
,
})
=>
{
...
...
@@ -28,4 +28,6 @@ const Stamp: React.FC<StampProps> = ({
);
};
Stamp
.
isVirtualFieldComponent
=
true
;
export
default
Stamp
;
src/pages/afterService/repairApplication/components/DetailInfo/index.tsx
View file @
05e1698f
...
...
@@ -25,7 +25,9 @@ import { } from '../../../constants';
const
OuterCirculation
=
React
.
lazy
(()
=>
import
(
'../../../components/OuterCirculation'
));
const
ProductList
=
React
.
lazy
(()
=>
import
(
'../../../components/ProductList'
));
const
IntroduceRow
=
React
.
lazy
(()
=>
import
(
'../../../components/IntroduceRow'
));
const
FileList
=
React
.
lazy
(()
=>
import
(
'../../../components/FileList'
));
const
RepairAddressInfo
=
React
.
lazy
(()
=>
import
(
'../../../components/RepairAddressInfo'
));
const
Score
=
React
.
lazy
(()
=>
import
(
'../../../components/Score'
));
const
OuterCirculationRecord
=
React
.
lazy
(()
=>
import
(
'../../../components/OuterCirculationRecord'
));
interface
DetailInfoProps
{
...
...
@@ -210,7 +212,27 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<
Col
span=
{
24
}
>
<
Suspense
fallback=
{
null
}
>
<
IntroduceRow
/>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
6
}
>
<
Suspense
fallback=
{
null
}
>
<
FileList
/>
</
Suspense
>
</
Col
>
<
Col
span=
{
12
}
>
<
Suspense
fallback=
{
null
}
>
<
RepairAddressInfo
/>
</
Suspense
>
</
Col
>
<
Col
span=
{
6
}
>
<
Suspense
fallback=
{
null
}
>
<
Score
/>
</
Suspense
>
</
Col
>
</
Row
>
</
Suspense
>
</
Col
>
...
...
src/pages/afterService/repairApplication/repairPrSubmit/detail.less
0 → 100644
View file @
05e1698f
src/pages/afterService/repairApplication/repairPrSubmit/detail.tsx
0 → 100644
View file @
05e1698f
import
React
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
RepairForm
from
'./components/RepairForm'
;
const
RepairDetail
:
React
.
FC
=
()
=>
{
const
{
id
,
creditId
}
=
usePageStatus
();
return
(
<
RepairForm
id=
{
id
}
/>
);
};
export
default
RepairDetail
;
\ No newline at end of file
src/pages/afterService/repairApplication/repairPrSubmit/editRepair.less
0 → 100644
View file @
05e1698f
src/pages/afterService/repairApplication/repairPrSubmit/editRepair.tsx
0 → 100644
View file @
05e1698f
import
React
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
RepairForm
from
'./components/RepairForm'
;
const
EditRepair
:
React
.
FC
=
()
=>
{
const
{
id
,
creditId
}
=
usePageStatus
();
return
(
<
RepairForm
id=
{
id
}
isEdit
/>
);
};
export
default
EditRepair
;
\ No newline at end of file
src/pages/afterService/repairApplication/repairPrSubmit/index.tsx
View file @
05e1698f
...
...
@@ -112,7 +112,7 @@ const RepairPrSubmit: React.FC = () => {
</
Popconfirm
>
<
Button
type=
"link"
onClick=
{
()
=>
{}
}
onClick=
{
()
=>
history
.
push
(
`/memberCenter/afterService/repairApplication/repairPrSubmit/edit?id=${record.id}`
)
}
>
编辑
</
Button
>
...
...
@@ -195,14 +195,14 @@ const RepairPrSubmit: React.FC = () => {
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/afterService/repairApplication/repairPrSubmit/add
Repair
`
)
history
.
push
(
`/memberCenter/afterService/repairApplication/repairPrSubmit/add`
)
}
>
<
PlusOutlined
/>
新建
</
Button
>
</
Space
>
</>
</>
);
return
(
...
...
src/pages/afterService/repairManage/components/DetailInfo/index.tsx
View file @
05e1698f
...
...
@@ -25,7 +25,9 @@ import { EditableColumns } from '@/components/PolymericTable/interface';
import
{
}
from
'../../../constants'
;
const
ProductList
=
React
.
lazy
(()
=>
import
(
'../../../components/ProductList'
));
const
IntroduceRow
=
React
.
lazy
(()
=>
import
(
'../../../components/IntroduceRow'
));
const
FileList
=
React
.
lazy
(()
=>
import
(
'../../../components/FileList'
));
const
RepairAddressInfo
=
React
.
lazy
(()
=>
import
(
'../../../components/RepairAddressInfo'
));
const
Score
=
React
.
lazy
(()
=>
import
(
'../../../components/Score'
));
const
FlowRecords
=
React
.
lazy
(()
=>
import
(
'../FlowRecords'
));
interface
DetailInfoProps
{
...
...
@@ -226,7 +228,27 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
<
Col
span=
{
24
}
>
<
Suspense
fallback=
{
null
}
>
<
IntroduceRow
/>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
6
}
>
<
Suspense
fallback=
{
null
}
>
<
FileList
/>
</
Suspense
>
</
Col
>
<
Col
span=
{
12
}
>
<
Suspense
fallback=
{
null
}
>
<
RepairAddressInfo
/>
</
Suspense
>
</
Col
>
<
Col
span=
{
6
}
>
<
Suspense
fallback=
{
null
}
>
<
Score
/>
</
Suspense
>
</
Col
>
</
Row
>
</
Suspense
>
</
Col
>
...
...
src/pages/afterService/returnApplication/components/DetailInfo/index.tsx
View file @
05e1698f
...
...
@@ -28,7 +28,9 @@ const OuterCirculation = React.lazy(() => import('../../../components/OuterCircu
const
ProductList
=
React
.
lazy
(()
=>
import
(
'../../../components/ProductList'
));
const
ReturnInfo
=
React
.
lazy
(()
=>
import
(
'../../../components/ReturnInfo'
));
const
ReturnDetailInfo
=
React
.
lazy
(()
=>
import
(
'../../../components/ReturnDetailInfo'
));
const
IntroduceRow
=
React
.
lazy
(()
=>
import
(
'../../../components/IntroduceRow'
));
const
FileList
=
React
.
lazy
(()
=>
import
(
'../../../components/FileList'
));
const
ReturnAddressInfo
=
React
.
lazy
(()
=>
import
(
'../../../components/ReturnAddressInfo'
));
const
Score
=
React
.
lazy
(()
=>
import
(
'../../../components/Score'
));
const
OuterCirculationRecord
=
React
.
lazy
(()
=>
import
(
'../../../components/OuterCirculationRecord'
));
interface
DetailInfoProps
{
...
...
@@ -286,9 +288,27 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
</
Col
>
<
Col
span=
{
24
}
>
<
Suspense
fallback=
{
null
}
>
<
IntroduceRow
/>
</
Suspense
>
<
Row
gutter=
{
24
}
>
<
Col
span=
{
6
}
>
<
Suspense
fallback=
{
null
}
>
<
FileList
/>
</
Suspense
>
</
Col
>
<
Col
span=
{
12
}
>
<
Suspense
fallback=
{
null
}
>
<
ReturnAddressInfo
/>
</
Suspense
>
</
Col
>
<
Col
span=
{
6
}
>
<
Suspense
fallback=
{
null
}
>
<
Score
/>
</
Suspense
>
</
Col
>
</
Row
>
</
Col
>
<
Col
span=
{
24
}
>
...
...
src/pages/afterService/returnApplication/returnPrAddDeliver/index.less
0 → 100644
View file @
05e1698f
src/pages/afterService/returnApplication/returnPrAddDeliver/index.tsx
0 → 100644
View file @
05e1698f
/*
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-06 16:49:12
* @Description: 待新增退货发货单
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
{
Card
,
Badge
,
Progress
,
Button
}
from
'antd'
;
import
{
ClockCircleOutlined
,
}
from
'@ant-design/icons'
;
import
{
history
}
from
'umi'
;
import
{
StandardTable
}
from
'god'
;
import
moment
from
'moment'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
coverColFiltersItem
}
from
'@/utils'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
listSearchSchema
}
from
'./schema'
;
import
{
CREDIT_OUTER_STATUS_TAG_MAP
,
CREDIT_INNER_STATUS_BADGE_MAP
,
}
from
'../../contants'
;
import
styles
from
'./index.less'
;
const
formActions
=
createFormActions
();
const
ReturnPrAddDeliver
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
defaultColumns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'申请单号'
,
dataIndex
:
'applyNo'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
<
EyePreview
url=
{
`/memberCenter/afterService/returnApplication/returnQuery/detail?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
</>
),
},
{
title
:
'申请单摘要'
,
dataIndex
:
'parentMemberName'
,
align
:
'center'
,
},
{
title
:
'供应会员'
,
dataIndex
:
'supplier'
,
align
:
'center'
,
},
{
title
:
'退款金额'
,
dataIndex
:
'returnAmount'
,
align
:
'center'
,
},
{
title
:
'单据时间'
,
dataIndex
:
'created'
,
align
:
'center'
,
},
{
title
:
'退货批次'
,
dataIndex
:
'batch'
,
align
:
'center'
,
},
{
title
:
'退货发货单号'
,
dataIndex
:
'deliverNo'
,
align
:
'center'
,
render
:
text
=>
<
a
>
{
text
}
</
a
>,
},
{
title
:
'外部状态'
,
dataIndex
:
'outerStatusName'
,
align
:
'center'
,
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
outerStatus
===
value
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"success"
title=
"售后完成"
/>
),
},
{
title
:
'内部状态'
,
dataIndex
:
'innerStatusName'
,
align
:
'center'
,
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
innerStatus
===
value
,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
'#6C9CEB'
}
text=
"待确认售后完成"
/>,
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
<
Button
type=
"link"
onClick=
{
()
=>
()
=>
history
.
push
(
``
)
}
>
新增
</
Button
>
<
Button
type=
"link"
onClick=
{
()
=>
{}
}
>
查看物流单
</
Button
>
</>
),
},
];
const
[
columns
,
setColumns
]
=
useState
<
any
[]
>
(
defaultColumns
);
const
fetchListData
=
(
params
:
any
)
=>
{
const
{
startTime
,
endTime
,
...
rest
}
=
params
;
// return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({
// startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return
Promise
.
resolve
({
data
:
[
{
id
:
1
,
applyNo
:
'123'
,
parentMemberName
:
'申请单摘要'
,
created
:
'2020-11-03 11:46:00'
,
},
],
total
:
10
,
});
};
// 初始化高级筛选选项
const
fetchSearchItems
=
async
()
=>
{
// const res = await PublicApi.getPayCreditApplyPageItemsByConsumer();
// if (res.code === 1000) {
// const { data } = res;
// const {
// outerStatusList = [],
// innerStatusList = [],
// } = data;
// const newColumns = columns.slice();
// // filter 0 过滤掉全部选项
// coverColFiltersItem(
// newColumns,
// 'outerStatusName',
// outerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
// );
// coverColFiltersItem(
// newColumns,
// 'innerStatusName',
// innerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
// );
// setColumns(newColumns);
// return {
// outerStatus: outerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
// innerStatus: innerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
// };
// }
return
{};
};
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchListData
(
params
)
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'applyNo'
,
FORM_FILTER_PATH
,
);
useAsyncInitSelect
(
[
'innerStatus'
,
'outerStatus'
],
fetchSearchItems
,
);
}
}
schema=
{
listSearchSchema
}
/>
}
/>
</
Card
>
</
PageHeaderWrapper
>
);
};
export
default
ReturnPrDeliver
;
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrAddDeliver/schema/index.ts
0 → 100644
View file @
05e1698f
/*
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-05 14:28:08
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
export
const
listSearchSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
applyNo
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
align
:
'flex-left'
,
tip
:
'输入 申请单号 进行搜索'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
6
,
},
properties
:
{
abstract
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'申请单摘要'
,
allowClear
:
true
,
},
},
'[startTime, endTime]'
:
{
type
:
'string'
,
default
:
''
,
'x-component'
:
'dateSelect'
,
'x-component-props'
:
{
placeholder
:
'单据时间(全部)'
,
allowClear
:
true
,
},
},
supplier
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'供应会员(全部)'
,
allowClear
:
true
,
},
},
outerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'外部状态(全部)'
,
allowClear
:
true
,
},
},
innerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'内部状态(全部)'
,
allowClear
:
true
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
};
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrLogistics/index.less
0 → 100644
View file @
05e1698f
src/pages/afterService/returnApplication/returnPrLogistics/index.tsx
0 → 100644
View file @
05e1698f
/*
* @Author: XieZhiXiong
* @Date: 2020-11-06 16:30:44
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-06 16:41:12
* @Description: 待新增退货发货单
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
{
Card
,
Badge
,
Progress
,
Button
}
from
'antd'
;
import
{
ClockCircleOutlined
,
}
from
'@ant-design/icons'
;
import
{
history
}
from
'umi'
;
import
{
StandardTable
}
from
'god'
;
import
moment
from
'moment'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
coverColFiltersItem
}
from
'@/utils'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
listSearchSchema
}
from
'./schema'
;
import
{
CREDIT_OUTER_STATUS_TAG_MAP
,
CREDIT_INNER_STATUS_BADGE_MAP
,
}
from
'../../contants'
;
import
styles
from
'./index.less'
;
const
formActions
=
createFormActions
();
const
ReturnPrLogistics
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
defaultColumns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'申请单号'
,
dataIndex
:
'applyNo'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
<
EyePreview
url=
{
`/memberCenter/afterService/returnApplication/returnQuery/detail?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
</>
),
},
{
title
:
'申请单摘要'
,
dataIndex
:
'parentMemberName'
,
align
:
'center'
,
},
{
title
:
'供应会员'
,
dataIndex
:
'supplier'
,
align
:
'center'
,
},
{
title
:
'退款金额'
,
dataIndex
:
'returnAmount'
,
align
:
'center'
,
},
{
title
:
'单据时间'
,
dataIndex
:
'created'
,
align
:
'center'
,
},
{
title
:
'退货批次'
,
dataIndex
:
'batch'
,
align
:
'center'
,
},
{
title
:
'退货发货单号'
,
dataIndex
:
'deliverNo'
,
align
:
'center'
,
render
:
text
=>
<
a
>
{
text
}
</
a
>,
},
{
title
:
'外部状态'
,
dataIndex
:
'outerStatusName'
,
align
:
'center'
,
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
outerStatus
===
value
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"success"
title=
"售后完成"
/>
),
},
{
title
:
'内部状态'
,
dataIndex
:
'innerStatusName'
,
align
:
'center'
,
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
innerStatus
===
value
,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
'#6C9CEB'
}
text=
"待确认售后完成"
/>,
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
<
Button
type=
"link"
onClick=
{
()
=>
()
=>
history
.
push
(
``
)
}
>
新增
</
Button
>
<
Button
type=
"link"
onClick=
{
()
=>
{}
}
>
审核
</
Button
>
</>
),
},
];
const
[
columns
,
setColumns
]
=
useState
<
any
[]
>
(
defaultColumns
);
const
fetchListData
=
(
params
:
any
)
=>
{
const
{
startTime
,
endTime
,
...
rest
}
=
params
;
// return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({
// startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return
Promise
.
resolve
({
data
:
[
{
id
:
1
,
applyNo
:
'123'
,
parentMemberName
:
'申请单摘要'
,
created
:
'2020-11-03 11:46:00'
,
},
],
total
:
10
,
});
};
// 初始化高级筛选选项
const
fetchSearchItems
=
async
()
=>
{
// const res = await PublicApi.getPayCreditApplyPageItemsByConsumer();
// if (res.code === 1000) {
// const { data } = res;
// const {
// outerStatusList = [],
// innerStatusList = [],
// } = data;
// const newColumns = columns.slice();
// // filter 0 过滤掉全部选项
// coverColFiltersItem(
// newColumns,
// 'outerStatusName',
// outerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
// );
// coverColFiltersItem(
// newColumns,
// 'innerStatusName',
// innerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
// );
// setColumns(newColumns);
// return {
// outerStatus: outerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
// innerStatus: innerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
// };
// }
return
{};
};
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchListData
(
params
)
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'applyNo'
,
FORM_FILTER_PATH
,
);
useAsyncInitSelect
(
[
'innerStatus'
,
'outerStatus'
],
fetchSearchItems
,
);
}
}
schema=
{
listSearchSchema
}
/>
}
/>
</
Card
>
</
PageHeaderWrapper
>
);
};
export
default
ReturnPrLogistics
;
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrLogistics/schema/index.ts
0 → 100644
View file @
05e1698f
/*
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-05 14:28:08
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
export
const
listSearchSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
applyNo
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
align
:
'flex-left'
,
tip
:
'输入 申请单号 进行搜索'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
6
,
},
properties
:
{
abstract
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'申请单摘要'
,
allowClear
:
true
,
},
},
'[startTime, endTime]'
:
{
type
:
'string'
,
default
:
''
,
'x-component'
:
'dateSelect'
,
'x-component-props'
:
{
placeholder
:
'单据时间(全部)'
,
allowClear
:
true
,
},
},
supplier
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'供应会员(全部)'
,
allowClear
:
true
,
},
},
outerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'外部状态(全部)'
,
allowClear
:
true
,
},
},
innerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'内部状态(全部)'
,
allowClear
:
true
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
};
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrSubmit/addReturn.less
0 → 100644
View file @
05e1698f
src/pages/afterService/returnApplication/returnPrSubmit/addReturn.tsx
0 → 100644
View file @
05e1698f
import
React
from
'react'
;
import
ReturnForm
from
'./components/ReturnForm'
;
const
AddReturn
:
React
.
FC
=
()
=>
{
return
(
<
ReturnForm
isEdit
/>
);
};
export
default
AddReturn
;
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrSubmit/components/GoodsDrawer/index.less
0 → 100644
View file @
05e1698f
.goods {
&-head {
}
&-body {
}
&-foot {
}
}
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrSubmit/components/GoodsDrawer/index.tsx
0 → 100644
View file @
05e1698f
/*
* @Author: XieZhiXiong
* @Date: 2020-11-04 15:09:09
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-06 11:49:59
* @Description: 维修商品抽屉组件
*/
import
React
,
{
useState
}
from
'react'
;
import
{
Drawer
,
Button
}
from
'antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
NestTable
from
'@/components/NestTable'
;
import
{
listSearchSchema
}
from
'./schema'
;
import
styles
from
'./index.less'
;
const
formActions
=
createFormActions
();
const
mockData
=
[
{
id
:
1
,
orderNo
:
'SPTY12'
,
applyAbstract
:
'进口头层黄牛皮荔枝纹'
,
supplierName
:
'广州白马皮具交易中心'
,
createTime
:
'2020-05-12 08:08'
,
orderStatus
:
'已完成'
,
orderType
:
'询价采购'
,
childData
:
[
{
id
:
11
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
},
{
id
:
12
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
}
]
},
{
id
:
2
,
orderNo
:
'SPTY12'
,
applyAbstract
:
'进口头层黄牛皮荔枝纹'
,
supplierName
:
'广州白马皮具交易中心'
,
createTime
:
'2020-05-12 08:08'
,
orderStatus
:
'已完成'
,
orderType
:
'询价采购'
,
childData
:
[
{
id
:
23
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
},
{
id
:
24
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
}
]
},
{
id
:
3
,
orderNo
:
'SPTY12'
,
applyAbstract
:
'进口头层黄牛皮荔枝纹'
,
supplierName
:
'广州白马皮具交易中心'
,
createTime
:
'2020-05-12 08:08'
,
orderStatus
:
'已完成'
,
orderType
:
'询价采购'
,
childData
:
[
{
id
:
35
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
},
{
id
:
36
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
}
]
},
{
id
:
4
,
orderNo
:
'SPTY12'
,
applyAbstract
:
'进口头层黄牛皮荔枝纹'
,
supplierName
:
'广州白马皮具交易中心'
,
createTime
:
'2020-05-12 08:08'
,
orderStatus
:
'已完成'
,
orderType
:
'询价采购'
,
childData
:
[
{
id
:
47
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
},
{
id
:
48
,
productId
:
1110
,
productName
:
'进口头层黄牛皮荔枝纹/红色'
,
category
:
'牛皮'
,
brand
:
'PELLE'
,
unit
:
'尺'
,
purchaseCount
:
2000
,
purchasePrice
:
20
,
purchaseAmount
:
4000
,
replaceCount
:
1000
,
}
]
},
]
interface
GoodsDrawer
{
// 是否可见的
visible
:
boolean
;
// 关闭事件
onClose
:
()
=>
void
;
};
const
GoodsDrawer
:
React
.
FC
<
GoodsDrawer
>
=
({
visible
=
false
,
onClose
,
})
=>
{
const
[
selectedRowKeys
,
setSelectedRowKeys
]
=
useState
<
any
>
([])
const
[
childSelectedRowKeys
,
setChildSelectedRowKeys
]
=
useState
<
any
>
([])
const
tableColumn
:
ColumnType
<
any
>
[]
=
[
{
title
:
'订单号'
,
dataIndex
:
'orderNo'
,
align
:
'center'
,
},
{
title
:
'订单摘要'
,
dataIndex
:
'applyAbstract'
,
align
:
'center'
,
},
{
title
:
'供应会员'
,
dataIndex
:
'supplierName'
,
align
:
'center'
,
},
{
title
:
'下单时间'
,
dataIndex
:
'createTime'
,
align
:
'center'
,
},
{
title
:
'订单状态'
,
dataIndex
:
'orderStatus'
,
align
:
'center'
,
},
{
title
:
'订单类型'
,
dataIndex
:
'orderType'
,
align
:
'center'
,
},
]
const
childTableColumn
:
ColumnType
<
any
>
[]
=
[
{
title
:
'ID'
,
dataIndex
:
'productId'
,
align
:
'center'
,
},
{
title
:
'商品名称'
,
dataIndex
:
'productName'
,
align
:
'center'
,
},
{
title
:
'品类'
,
dataIndex
:
'category'
,
align
:
'center'
,
},
{
title
:
'品牌'
,
dataIndex
:
'brand'
,
align
:
'center'
,
},
{
title
:
'单位'
,
dataIndex
:
'unit'
,
align
:
'center'
,
},
{
title
:
'单价'
,
dataIndex
:
'price'
,
align
:
'center'
,
},
{
title
:
'金额'
,
dataIndex
:
'amount'
,
align
:
'center'
,
},
{
title
:
'已退货数量'
,
dataIndex
:
'returnNum'
,
align
:
'center'
,
},
{
title
:
'已退款金额'
,
dataIndex
:
'returnAmount'
,
align
:
'center'
,
},
]
const
handleClose
=
()
=>
{
if
(
onClose
)
{
onClose
();
}
};
// 子表格选中行
const
handleChildSelectChange
=
()
=>
{
};
// 子表格选中所有行
const
handleChildSelectAll
=
()
=>
{
};
// 表格选中行
const
handleParentSelectChange
=
()
=>
{
};
// 表格选中所有行
const
hanldeParentSelectAll
=
()
=>
{
};
return
(
<
Drawer
title=
"选择维修商品"
width=
{
1200
}
onClose=
{
handleClose
}
visible=
{
visible
}
bodyStyle=
{
{
paddingBottom
:
80
}
}
footer=
{
<
div
style=
{
{
textAlign
:
'right'
,
}
}
>
<
Button
onClick=
{
onClose
}
style=
{
{
marginRight
:
8
}
}
>
取消
</
Button
>
<
Button
onClick=
{
handleClose
}
type=
"primary"
>
确定
</
Button
>
</
div
>
}
>
<
div
className=
{
styles
.
goods
}
>
<
div
className=
{
styles
[
'goods-head'
]
}
>
<
NiceForm
actions=
{
formActions
}
onSubmit=
{
values
=>
{}
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'applyNo'
,
FORM_FILTER_PATH
,
);
}
}
schema=
{
listSearchSchema
}
/>
</
div
>
<
div
>
<
NestTable
NestColumns=
{
[
tableColumn
,
childTableColumn
]
}
className=
"common_tb"
rowClassName=
{
(
_
,
index
)
=>
(
index
%
2
)
===
0
&&
'tb_bg'
}
rowKey=
"id"
childrenDataKey=
"childData"
dataSource=
{
mockData
}
childRowSelection=
{
{
selectedRowKeys
:
childSelectedRowKeys
,
onSelect
:
handleChildSelectChange
,
onSelectAll
:
handleChildSelectAll
,
}
}
rowSelection=
{
{
selectedRowKeys
:
selectedRowKeys
,
onSelect
:
handleParentSelectChange
,
onSelectAll
:
hanldeParentSelectAll
,
}
}
/>
</
div
>
</
div
>
</
Drawer
>
);
};
export
default
GoodsDrawer
;
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrSubmit/components/GoodsDrawer/schema/index.ts
0 → 100644
View file @
05e1698f
/*
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-06 11:48:45
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
export
const
listSearchSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
applyNo
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
align
:
'flex-left'
,
tip
:
'输入 申请单号 进行搜索'
,
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
grid
:
true
,
full
:
true
,
autoRow
:
true
,
columns
:
6
,
},
properties
:
{
abstract
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'申请单摘要'
,
allowClear
:
true
,
},
},
'[startTime, endTime]'
:
{
type
:
'string'
,
default
:
''
,
'x-component'
:
'dateSelect'
,
'x-component-props'
:
{
placeholder
:
'单据时间(全部)'
,
allowClear
:
true
,
},
},
outerStatus
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'订单类型(全部)'
,
allowClear
:
true
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
};
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/effects/index.ts
0 → 100644
View file @
05e1698f
/*
* @Author: XieZhiXiong
* @Date: 2020-11-03 18:19:51
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-03 18:32:29
* @Description:
*/
import
{
useBusinessEffects
}
from
'./useBusinessEffects'
;
import
{
useAsyncSelect
}
from
'@/formSchema/effects/useAsyncSelect'
;
import
{
PublicApi
}
from
'@/services/api'
;
// 获取单据类型
const
fetchInvoicesType
=
():
Promise
<
any
[]
>
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
PublicApi
.
getWarehouseInvoicesTypeAll
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
}
reject
();
}).
catch
(()
=>
{
reject
();
});
});
};
export
const
createEffects
=
(
context
,
actions
)
=>
{
useBusinessEffects
(
context
,
actions
);
// useAsyncSelect('invoicesTypeId', fetchInvoicesType, ['name', 'id']);
};
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/effects/useBusinessEffects.ts
0 → 100644
View file @
05e1698f
/*
* @Author: XieZhiXiong
* @Date: 2020-11-03 18:30:47
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-03 18:50:28
* @Description: 联动逻辑相关
*/
import
{
Modal
}
from
'antd'
;
import
{
FormEffectHooks
,
FormPath
}
from
'@formily/antd'
;
import
{
useLinkageUtils
}
from
'@/utils/formEffectUtils'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
}
from
'@/constants'
;
import
{
PublicApi
}
from
'@/services/api'
;
const
{
onFieldInputChange$
,
onFieldValueChange$
,
}
=
FormEffectHooks
;
// 获取采购入库单相关数据
const
fetchOrderPurchaseReceiptAddList
=
async
(
params
:
any
)
=>
{
const
res
=
await
PublicApi
.
getOrderPurchaseReceiptAddList
({
...
params
,
})
if
(
res
.
code
===
1000
)
{
return
res
.
data
;
}
return
[];
};
export
const
useBusinessEffects
=
(
context
,
actions
)
=>
{
const
{
getFieldValue
,
setFieldValue
,
getFieldState
,
setFieldState
,
}
=
actions
;
const
linkage
=
useLinkageUtils
();
}
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.less
0 → 100644
View file @
05e1698f
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/index.tsx
0 → 100644
View file @
05e1698f
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Button
,
Card
,
Spin
,
message
}
from
'antd'
;
import
{
DeleteOutlined
}
from
'@ant-design/icons'
;
import
{
Radio
,
ArrayTable
}
from
'@formily/antd-components'
;
import
{
history
,
Prompt
}
from
'umi'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
SaveOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
createFormActions
,
FormEffectHooks
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
ReutrnEle
from
'@/components/ReturnEle'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
GoodsDrawer
from
'../GoodsDrawer'
;
import
AddressFormItem
from
'../../../../components/AddressFormItem'
;
import
ReturnInfoDrawer
from
'../../../../components/ReturnInfoDrawer'
;
import
{
addBillSchema
}
from
'./schema'
;
import
{
createEffects
}
from
'./effects'
;
const
addSchemaAction
=
createFormActions
();
const
{
onFormInputChange$
,
}
=
FormEffectHooks
;
interface
BillsFormProps
{
id
?:
string
;
// 是否是编辑的
isEdit
?:
boolean
;
};
const
RepairForm
:
React
.
FC
<
BillsFormProps
>
=
({
id
,
isEdit
=
false
,
})
=>
{
const
[
visible
,
setVisible
]
=
useState
(
false
);
const
[
unsaved
,
setUnsaved
]
=
useState
(
false
);
const
[
infoLoading
,
setInfoLoading
]
=
useState
(
false
);
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
visibleGoodsDrawer
,
setVisibleGoodsDrawer
]
=
useState
(
false
);
const
[
visibleReturnInfoDrawer
,
setVisibleReturnInfoDrawer
]
=
useState
(
false
);
useEffect
(()
=>
{
},
[]);
// 弹出单据明细
const
handleAdd
=
()
=>
{
// do something
};
const
TableAddButton
=
isEdit
||
!
id
?
(
<
Button
style=
{
{
marginBottom
:
16
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
setVisibleGoodsDrawer
(
true
)
}
type=
"dashed"
>
选择退货商品
</
Button
>
)
:
null
;
const
handleSubmit
=
value
=>
{
const
{
}
=
value
;
console
.
log
(
'value'
,
value
)
};
const
handleRemoveItem
=
(
index
:
number
)
=>
{
// do something
// const newSelectRow = [...productRowCtl.selectRow];
// const newSelectedRowKeys = [...productRowCtl.selectedRowKeys];
// const newValue = [...addSchemaAction.getFieldValue('invoicesDetailsRequests')];
// newSelectRow.splice(index, 1);
// newSelectedRowKeys.splice(index, 1);
// productRowCtl.setSelectRow(newSelectRow);
// productRowCtl.setSelectedRowKeys(newSelectedRowKeys);
// newValue.splice(index, 1);
// addSchemaAction.setFieldValue('invoicesDetailsRequests', newValue);
};
// ArrayTable自定义渲染
const
renderListTableRemove
=
(
index
:
number
)
=>
(
<>
<
a
onClick=
{
()
=>
setVisibleReturnInfoDrawer
(
true
)
}
style=
{
{
marginRight
:
20
,
}
}
>
编辑
</
a
>
<
a
onClick=
{
()
=>
handleRemoveItem
(
index
)
}
style=
{
{
color
:
'#ff4d4f'
,
}
}
>
删除
</
a
>
</>
);
const
beforeUpload
=
file
=>
{
if
(
file
.
size
/
1024
<
20
)
{
message
.
warning
(
'图片大小超过20M'
);
return
Promise
.
reject
();
}
};
return
(
<
Spin
spinning=
{
infoLoading
}
>
<
PageHeaderWrapper
style=
{
{
padding
:
24
,
}
}
onBack=
{
()
=>
history
.
goBack
()
}
backIcon=
{
<
ReutrnEle
description=
"返回"
/>
}
title=
{
!
id
?
'新建单据'
:
isEdit
?
'编辑单据'
:
'查看单据'
}
extra=
{
(
isEdit
||
!
id
)
?
[
<
Button
key=
"1"
type=
"primary"
icon=
{
<
SaveOutlined
/>
}
loading=
{
submitLoading
}
onClick=
{
()
=>
addSchemaAction
.
submit
()
}
>
保存
</
Button
>,
]
:
[]
}
>
<
Card
>
<
NiceForm
initialValues=
{
{}
}
expressionScope=
{
{
TableAddButton
,
renderListTableRemove
,
beforeUpload
,
}
}
components=
{
{
ArrayTable
,
AddressFormItem
,
}
}
editable=
{
isEdit
||
!
id
}
effects=
{
(
$
,
actions
)
=>
{
createEffects
(
$
,
actions
)
onFormInputChange$
().
subscribe
(()
=>
{
if
(
!
unsaved
)
{
setUnsaved
(
true
);
}
});
}
}
onSubmit=
{
handleSubmit
}
actions=
{
addSchemaAction
}
schema=
{
addBillSchema
}
/>
</
Card
>
<
GoodsDrawer
visible=
{
visibleGoodsDrawer
}
onClose=
{
()
=>
setVisibleGoodsDrawer
(
false
)
}
/>
<
ReturnInfoDrawer
visible=
{
visibleReturnInfoDrawer
}
onClose=
{
()
=>
setVisibleReturnInfoDrawer
(
false
)
}
isEdit
/>
<
Prompt
when=
{
unsaved
}
message=
"您还有未保存的内容,是否确定要离开?"
/>
</
PageHeaderWrapper
>
</
Spin
>
);
};
export
default
RepairForm
;
src/pages/afterService/returnApplication/returnPrSubmit/components/ReturnForm/schema/index.ts
0 → 100644
View file @
05e1698f
This diff is collapsed.
Click to expand it.
src/pages/afterService/returnApplication/returnPrSubmit/detail.less
0 → 100644
View file @
05e1698f
src/pages/afterService/returnApplication/returnPrSubmit/detail.tsx
0 → 100644
View file @
05e1698f
import
React
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
ReturnForm
from
'./components/ReturnForm'
;
const
EditReturn
:
React
.
FC
=
()
=>
{
const
{
id
}
=
usePageStatus
();
return
(
<
ReturnForm
id=
{
id
}
/>
);
};
export
default
EditReturn
;
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrSubmit/editReturn.less
0 → 100644
View file @
05e1698f
src/pages/afterService/returnApplication/returnPrSubmit/editReturn.tsx
0 → 100644
View file @
05e1698f
import
React
from
'react'
;
import
{
usePageStatus
}
from
'@/hooks/usePageStatus'
;
import
ReturnForm
from
'./components/ReturnForm'
;
const
EditReturn
:
React
.
FC
=
()
=>
{
const
{
id
,
creditId
}
=
usePageStatus
();
return
(
<
ReturnForm
id=
{
id
}
isEdit
/>
);
};
export
default
EditReturn
;
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrSubmit/index.less
0 → 100644
View file @
05e1698f
src/pages/afterService/returnApplication/returnPrSubmit/index.tsx
0 → 100644
View file @
05e1698f
/*
* @Author: XieZhiXiong
* @Date: 2020-11-06 10:13:18
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-06 16:41:29
* @Description: 待提交退货申请单
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
{
Card
,
Badge
,
Progress
,
Button
,
Popconfirm
,
Space
,
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
ClockCircleOutlined
,
PlusOutlined
,
}
from
'@ant-design/icons'
;
import
{
StandardTable
}
from
'god'
;
import
moment
from
'moment'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
useStateFilterSearchLinkageEffect
}
from
'@/formSchema/effects/useFilterSearch'
;
import
{
useAsyncInitSelect
}
from
'@/formSchema/effects/useAsyncInitSelect'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
coverColFiltersItem
}
from
'@/utils'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
NiceForm
from
'@/components/NiceForm'
;
import
StatusTag
from
'@/components/StatusTag'
;
import
{
listSearchSchema
}
from
'./schema'
;
import
{
CREDIT_OUTER_STATUS_TAG_MAP
,
CREDIT_INNER_STATUS_BADGE_MAP
,
}
from
'../../contants'
;
import
styles
from
'./index.less'
;
const
formActions
=
createFormActions
();
const
ReturnPrSubmit
:
React
.
FC
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
handleDelete
=
()
=>
{
};
const
defaultColumns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'申请单号'
,
dataIndex
:
'applyNo'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
<
EyePreview
url=
{
`/memberCenter/afterService/returnApplication/returnPrSubmit/detail?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
</>
),
},
{
title
:
'申请单摘要'
,
dataIndex
:
'parentMemberName'
,
align
:
'center'
,
},
{
title
:
'供应会员'
,
dataIndex
:
'supplier'
,
align
:
'center'
,
},
{
title
:
'退款金额'
,
dataIndex
:
'returnAmount'
,
align
:
'center'
,
},
{
title
:
'单据时间'
,
dataIndex
:
'created'
,
align
:
'center'
,
},
{
title
:
'外部状态'
,
dataIndex
:
'outerStatusName'
,
align
:
'center'
,
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
outerStatus
===
value
,
render
:
(
text
,
record
)
=>
(
<
StatusTag
type=
"success"
title=
"售后完成"
/>
),
},
{
title
:
'内部状态'
,
dataIndex
:
'innerStatusName'
,
align
:
'center'
,
filters
:
[],
onFilter
:
(
value
,
record
)
=>
record
.
innerStatus
===
value
,
render
:
(
text
,
record
)
=>
<
Badge
color=
{
'#6C9CEB'
}
text=
"待确认售后完成"
/>,
},
{
title
:
'操作'
,
dataIndex
:
'option'
,
align
:
'center'
,
render
:
(
text
,
record
)
=>
(
<>
<
Button
type=
"link"
onClick=
{
()
=>
{}
}
>
提交
</
Button
>
<
Button
type=
"link"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/afterService/returnApplication/returnPrSubmit/edit`
)
}
>
编辑
</
Button
>
<
Button
type=
"link"
onClick=
{
()
=>
handleDelete
()
}
danger
>
删除
</
Button
>
</>
),
},
];
const
[
columns
,
setColumns
]
=
useState
<
any
[]
>
(
defaultColumns
);
const
fetchListData
=
(
params
:
any
)
=>
{
const
{
startTime
,
endTime
,
...
rest
}
=
params
;
// return new Promise((resolve, reject) => {
// PublicApi.getPayCreditApplyPageCreditApply({
// startTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// endTime: startTime ? moment(startTime).format('YYYY-MM-DD') : null,
// ...rest,
// })
// .then(res => {
// if (res.code === 1000) {
// resolve(res.data);
// }
// reject();
// })
// .catch(() => {
// reject();
// });
// });
return
Promise
.
resolve
({
data
:
[
{
id
:
1
,
applyNo
:
'123'
,
parentMemberName
:
'申请单摘要'
,
created
:
'2020-11-03 11:46:00'
,
},
],
total
:
10
,
});
};
// 初始化高级筛选选项
const
fetchSearchItems
=
async
()
=>
{
// const res = await PublicApi.getPayCreditApplyPageItemsByConsumer();
// if (res.code === 1000) {
// const { data } = res;
// const {
// outerStatusList = [],
// innerStatusList = [],
// } = data;
// const newColumns = columns.slice();
// // filter 0 过滤掉全部选项
// coverColFiltersItem(
// newColumns,
// 'outerStatusName',
// outerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
// );
// coverColFiltersItem(
// newColumns,
// 'innerStatusName',
// innerStatusList.map(item => ({ text: item.name, value: item.status })).filter(item => item.value),
// );
// setColumns(newColumns);
// return {
// outerStatus: outerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
// innerStatus: innerStatusList.map(item => ({ label: item.name, value: item.status })).filter(item => item.value),
// };
// }
return
{};
};
const
controllerBtns
=
(
<>
<
Space
>
<
Button
type=
"primary"
onClick=
{
()
=>
history
.
push
(
`/memberCenter/afterService/returnApplication/returnPrSubmit/add`
)
}
>
<
PlusOutlined
/>
新建
</
Button
>
</
Space
>
</>
);
return
(
<
PageHeaderWrapper
>
<
Card
>
<
StandardTable
tableProps=
{
{
rowKey
:
'id'
,
}
}
columns=
{
columns
}
currentRef=
{
ref
}
fetchTableData=
{
(
params
:
any
)
=>
fetchListData
(
params
)
}
controlRender=
{
<
NiceForm
actions=
{
formActions
}
expressionScope=
{
{
controllerBtns
,
}
}
onSubmit=
{
values
=>
ref
.
current
.
reload
(
values
)
}
effects=
{
(
$
,
actions
)
=>
{
useStateFilterSearchLinkageEffect
(
$
,
actions
,
'cond'
,
FORM_FILTER_PATH
,
);
useAsyncInitSelect
(
[
'innerStatus'
,
'outerStatus'
],
fetchSearchItems
,
);
}
}
schema=
{
listSearchSchema
}
/>
}
/>
</
Card
>
</
PageHeaderWrapper
>
);
};
export
default
ReturnPrSubmit
;
\ No newline at end of file
src/pages/afterService/returnApplication/returnPrSubmit/schema/index.ts
0 → 100644
View file @
05e1698f
/*
* @Author: XieZhiXiong
* @Date: 2020-09-29 10:03:06
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-05 14:34:48
* @Description:
*/
import
{
ISchema
}
from
'@formily/antd'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
;
export
const
listSearchSchema
:
ISchema
=
{
type
:
'object'
,
properties
:
{
megaLayout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
properties
:
{
topLayout
:
{
type
:
'object'
,
'x-component'
:
'Mega-Layout'
,
'x-component-props'
:
{
grid
:
true
,
},
properties
:
{
ctl
:
{
type
:
'object'
,
'x-component'
:
'Children'
,
'x-component-props'
:
{
children
:
'{{controllerBtns}}'
,
},
},
cond
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
},
},
},
},
[
FORM_FILTER_PATH
]:
{
type
:
'object'
,
'x-component'
:
'Flex-Layout'
,
'x-component-props'
:
{
colStyle
:
{
marginLeft
:
20
,
},
},
properties
:
{
abstract
:
{
type
:
'string'
,
'x-component-props'
:
{
placeholder
:
'申请单摘要'
,
allowClear
:
true
,
},
},
'[startTime, endTime]'
:
{
type
:
'string'
,
'x-component'
:
'dateSelect'
,
'x-component-props'
:
{
placeholder
:
'单据时间(全部)'
,
allowClear
:
true
,
},
},
supplier
:
{
type
:
'string'
,
default
:
undefined
,
enum
:
[],
'x-component-props'
:
{
placeholder
:
'供应会员(全部)'
,
allowClear
:
true
,
},
},
submit
:
{
'x-component'
:
'Submit'
,
'x-mega-props'
:
{
span
:
1
,
},
'x-component-props'
:
{
children
:
'查询'
,
},
},
},
},
},
},
},
};
\ No newline at end of file
src/pages/afterService/returnApplication/returnQuery/index.tsx
View file @
05e1698f
/*
* @Author: XieZhiXiong
* @Date: 2020-11-05 14:25:41
* @LastEditors: XieZhiXiong
* @LastEditTime: 2020-11-06 16:41:39
* @Description: 退货申请单查询
*/
import
React
,
{
useState
,
useRef
}
from
'react'
;
import
{
Card
,
Badge
,
Progress
,
Button
}
from
'antd'
;
import
{
...
...
@@ -54,6 +61,11 @@ const ReturnQuery: React.FC = () => {
align
:
'center'
,
},
{
title
:
'退款金额'
,
dataIndex
:
'returnAmount'
,
align
:
'center'
,
},
{
title
:
'单据时间'
,
dataIndex
:
'created'
,
align
:
'center'
,
...
...
src/pages/lxMall/commodityDetail/index.tsx
View file @
05e1698f
...
...
@@ -451,7 +451,8 @@ const CommodityDetail = (props) => {
if
(
clickFlag
)
{
clickFlag
=
false
PublicApi
.
postOrderDirectPayment
({
productId
:
selectCommodityId
}).
then
(
res
=>
{
//@ts-ignore
PublicApi
.
postOrderDirectPayment
({
productId
:
selectCommodityId
,
memberId
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
message
.
destroy
()
let
buyCommodityInfo
=
{
...
...
src/pages/lxMall/order/index.tsx
View file @
05e1698f
...
...
@@ -13,7 +13,6 @@ import Contract from './contract'
import
Invoice
from
'./invoice'
import
styles
from
'./index.less'
import
{
PublicApi
}
from
'@/services/api'
import
{
GetLogisticsReceiverAddressGetResponse
}
from
'@/services/LogisticsApi'
import
SignModal
from
'@/components/SignModal'
import
{
isEmpty
}
from
'lodash'
import
{
getAuth
}
from
'@/utils/auth'
...
...
@@ -34,7 +33,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
const
[
signModalVisible
,
setSignModalVisible
]
=
useState
<
boolean
>
(
false
)
const
{
spam_id
}
=
props
.
location
.
query
const
OrderStore
=
useLocalStore
(()
=>
store
.
OrderStore
)
const
{
clearOrderInfo
,
getOrderInfo
}
=
OrderStore
const
{
getOrderInfo
}
=
OrderStore
const
[
orderInfo
,
setOrderInfo
]
=
useState
<
any
>
()
const
[
confirmLoading
,
setConfirmLoading
]
=
useState
(
false
)
const
[
selectPayWay
,
setSelectPayWay
]
=
useState
<
any
>
({})
...
...
@@ -113,9 +112,9 @@ const Order: React.FC<OrderPropsType> = (props) => {
}
//@ts-ignore
const
signRes
=
await
PublicApi
.
postOrderSignatureSignContractCreate
(
param
)
message
.
destroy
()
const
signData
:
any
=
signRes
.
data
if
(
signRes
.
code
===
1000
)
{
message
.
destroy
()
setContractInfo
(
signData
)
sessionStorage
.
setItem
(
"contractInfo"
,
JSON
.
stringify
(
signData
))
setIsElectronicContract
(
true
)
...
...
@@ -310,7 +309,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
if
(
selectPayWay
.
payType
===
4
)
{
history
.
push
(
`/pay/result?orderId=
${
data
.
orderId
}
`
)
}
else
{
history
.
push
(
`/pay?orderId=
${
data
.
orderId
}
`
)
history
.
push
(
`/pay?orderId=
${
data
.
orderId
}
&spam_id=
${
spam_id
}
`
)
}
}
setConfirmLoading
(
false
)
...
...
@@ -419,7 +418,7 @@ const Order: React.FC<OrderPropsType> = (props) => {
}
}
/>
)
}
<
PayWay
selectItem=
{
selectPayWay
}
payWayList=
{
orderInfo
.
payWayList
}
onChange=
{
(
val
)
=>
setSelectPayWay
(
val
)
}
/>
<
PayWay
s
upplyMembersId=
{
orderInfo
.
supplyMembersId
}
supplyMembersRoleId=
{
orderInfo
.
supplyMembersRoleId
}
s
electItem=
{
selectPayWay
}
payWayList=
{
orderInfo
.
payWayList
}
onChange=
{
(
val
)
=>
setSelectPayWay
(
val
)
}
/>
{
/* <Delivery /> */
}
<
Invoice
state=
{
needTheInvoice
}
onChange=
{
(
val
)
=>
setNeedTheInvoice
(
val
)
}
onSelect=
{
(
val
)
=>
setSelectInvoiceInfo
(
val
)
}
/>
{
...
...
src/pages/lxMall/order/payway/index.tsx
View file @
05e1698f
...
...
@@ -12,10 +12,12 @@ interface PayWayProps {
payWayList
:
any
;
onChange
:
Function
;
selectItem
:
any
;
supplyMembersId
:
number
;
supplyMembersRoleId
:
number
;
}
const
PayWay
:
React
.
FC
<
PayWayProps
>
=
(
props
)
=>
{
const
{
payWayList
=
[],
onChange
,
selectItem
=
{}
}
=
props
const
{
payWayList
=
[],
onChange
,
selectItem
=
{}
,
supplyMembersId
,
supplyMembersRoleId
}
=
props
const
[
expand
,
setExpand
]
=
useState
<
boolean
>
(
false
)
const
[
creditInfo
,
setCreditInfo
]
=
useState
<
GetPayCreditGetCreditResponse
>
()
...
...
@@ -39,7 +41,12 @@ const PayWay: React.FC<PayWayProps> = (props) => {
},
[
payWayList
])
const
fetchCreditInfo
=
()
=>
{
PublicApi
.
getPayCreditGetCredit
().
then
(
res
=>
{
let
param
=
{
parentMemberId
:
supplyMembersId
,
parentMemberRoleId
:
supplyMembersRoleId
}
//@ts-ignore
PublicApi
.
getPayCreditGetCredit
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setCreditInfo
(
res
.
data
)
}
...
...
@@ -52,6 +59,8 @@ const PayWay: React.FC<PayWayProps> = (props) => {
if
(
info
.
payType
===
3
)
{
if
(
!
creditInfo
)
{
result
=
false
}
else
if
(
creditInfo
.
isUsable
===
0
)
{
result
=
false
}
}
return
result
...
...
src/pages/lxMall/pay/components/credit/index.tsx
View file @
05e1698f
...
...
@@ -11,13 +11,14 @@ import styles from './index.less'
import
{
message
,
Button
,
Spin
}
from
'antd'
interface
CreditPayWayPropsType
{
payInfo
:
GetOrderOrderPayDetailsResponse
payInfo
:
GetOrderOrderPayDetailsResponse
,
orderInfo
:
any
,
orderId
:
number
,
onChange
:
Function
}
const
CreditPayWay
:
React
.
FC
<
CreditPayWayPropsType
>
=
(
props
)
=>
{
const
{
payInfo
,
orderId
,
o
nChange
}
=
props
const
{
payInfo
,
orderId
,
o
rderInfo
}
=
props
const
[
payPassword
,
setPayPassword
]
=
useState
<
string
>
(
''
)
const
[
type
,
setType
]
=
useState
<
string
>
(
'normal'
)
// normal: 普通;member:会员
const
[
creditInfo
,
setCreditInfo
]
=
useState
<
GetPayCreditGetCreditResponse
>
()
...
...
@@ -48,7 +49,11 @@ const CreditPayWay: React.FC<CreditPayWayPropsType> = (props) => {
}
const
fetchSecurity
=
()
=>
{
PublicApi
.
getMemberSecurityGet
().
then
(
res
=>
{
let
param
=
{
parentMemberId
:
orderInfo
.
supplyMembersId
,
parentMemberRoleId
:
orderInfo
.
supplyMembersRoleId
}
PublicApi
.
getMemberSecurityGet
(
param
).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
setSecurityInfo
(
res
.
data
)
}
...
...
src/pages/lxMall/pay/index.tsx
View file @
05e1698f
...
...
@@ -8,6 +8,8 @@ import BankPayWay from './components/bank'
import
TransferPayWay
from
'./components/transfer'
import
{
PublicApi
}
from
'@/services/api'
import
{
GetOrderOrderPayDetailsResponse
}
from
'@/services/OrderApi'
import
{
useLocalStore
,
observer
}
from
'mobx-react'
import
{
store
}
from
'@/store'
import
{
LAYOUT_TYPE
}
from
'@/constants'
import
styles
from
'./index.less'
import
{
message
,
Button
}
from
'antd'
...
...
@@ -49,18 +51,29 @@ const getPayTypeTitle = (type) => {
const
PayPage
:
React
.
FC
<
PayPagePropsType
>
=
(
props
)
=>
{
const
{
shopInfo
,
mallInfo
,
layoutType
,
}
=
props
const
[
payState
,
setPayState
]
=
useState
<
boolean
>
(
false
)
const
{
orderId
}
=
props
.
location
.
query
const
{
orderId
,
spam_id
}
=
props
.
location
.
query
const
[
pageTitle
,
setPageTitle
]
=
useState
<
string
>
()
const
[
payType
]
=
useState
<
string
|
number
>
(
PayWayType
.
bank
)
const
[
payInfo
,
setPayInfo
]
=
useState
<
GetOrderOrderPayDetailsResponse
>
()
const
[
errMsg
,
setErrMsg
]
=
useState
<
string
>
(
''
)
const
OrderStore
=
useLocalStore
(()
=>
store
.
OrderStore
)
const
[
orderInfo
,
setOrderInfo
]
=
useState
<
any
>
({})
const
{
getOrderInfo
}
=
OrderStore
useEffect
(()
=>
{
initOrderInfo
()
if
(
orderId
)
{
fetchOrderInfo
()
}
},
[])
const
initOrderInfo
=
async
()
=>
{
if
(
spam_id
)
{
const
sessionOrderInfo
:
any
=
await
getOrderInfo
(
spam_id
)
setOrderInfo
(
sessionOrderInfo
)
}
}
const
fetchOrderInfo
=
()
=>
{
PublicApi
.
getOrderOrderPayDetails
({
id
:
orderId
}).
then
(
res
=>
{
message
.
destroy
()
...
...
@@ -88,7 +101,7 @@ const PayPage: React.FC<PayPagePropsType> = (props) => {
case
PayWayType
.
balance
:
return
<
BablancePayWay
/>
case
PayWayType
.
credit
:
return
<
CreditPayWay
payInfo=
{
payInfo
}
orderId=
{
orderId
}
onChange=
{
(
state
)
=>
handlePayChangge
(
state
)
}
/>
return
<
CreditPayWay
payInfo=
{
payInfo
}
orderI
nfo=
{
orderInfo
}
orderI
d=
{
orderId
}
onChange=
{
(
state
)
=>
handlePayChangge
(
state
)
}
/>
case
PayWayType
.
wechat
:
return
<
WechatPayWay
/>
case
PayWayType
.
bank
:
...
...
src/pages/payandSettle/creditApplication/components/DetailInfo/index.tsx
View file @
05e1698f
...
...
@@ -103,7 +103,7 @@ const DetailInfo: React.FC<DetailInfoProps> = ({
PublicApi
.
postPayCreditApplyAddCreditApply
({
applyId
:
+
id
,
creditId
:
creditId
?
+
creditId
:
0
,
fileList
:
fileList
.
map
(
item
=>
({
name
:
item
.
name
,
fileUrl
:
item
.
url
})),
fileList
:
fileList
.
map
(
(
item
:
any
)
=>
({
name
:
item
.
name
,
fileUrl
:
item
.
data
})),
...
rest
,
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
...
...
src/pages/payandSettle/creditApplication/components/QuotaApplicationInfo/index.tsx
View file @
05e1698f
...
...
@@ -73,12 +73,14 @@ const QuotaApplicationInfo: React.FC<QuotaApplicationInfo> = ({
billDay
,
repayPeriod
,
quotaSlide
,
fileList
,
...
rest
}
=
values
;
onSubmit
({
applyQuota
:
+
applyQuota
,
billDay
:
+
billDay
,
repayPeriod
:
+
repayPeriod
,
fileList
:
fileList
.
filter
(
item
=>
item
.
status
===
'done'
),
...
rest
,
});
setModalVisible
(
false
);
...
...
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