Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-admin
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
project
jinfa-admin
Commits
9e88c187
Commit
9e88c187
authored
Nov 30, 2021
by
XieZhiXiong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of
http://10.0.0.22:3000/lingxi/lingxi-business-system
into v2
parents
31b7c6b4
62012bc7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
424 additions
and
10 deletions
+424
-10
systemManageRoute.ts
config/routes/refactorRoutes/systemManageRoute.ts
+23
-1
index.tsx
src/components/TableLayout/index.tsx
+18
-4
index.tsx
src/pages/pageCustomized/mobileClientEdit/index.tsx
+1
-1
preview.tsx
src/pages/pageCustomized/mobileClientEdit/preview.tsx
+1
-1
index.tsx
...ropsSettings/components/suggestProductCommodity/index.tsx
+1
-1
add.tsx
...es/systemManage/ruleSettingManage/merchantPayType/add.tsx
+0
-0
index.tsx
.../systemManage/ruleSettingManage/merchantPayType/index.tsx
+168
-0
parameter.tsx
...age/ruleSettingManage/paySetting/components/parameter.tsx
+189
-0
index.less
...ages/systemManage/ruleSettingManage/paySetting/index.less
+8
-0
index.tsx
...pages/systemManage/ruleSettingManage/paySetting/index.tsx
+0
-0
basicInfo.tsx
...Manage/payStrategy/paymentConfig/components/basicInfo.tsx
+2
-1
index.tsx
...leSettingManage/platformSettlementStrategy/info/index.tsx
+5
-1
schema.tsx
...eSettingManage/platformSettlementStrategy/info/schema.tsx
+8
-0
No files found.
config/routes/refactorRoutes/systemManageRoute.ts
View file @
9e88c187
...
...
@@ -48,6 +48,28 @@ const router = {
component
:
'@/pages/systemManage/ruleSettingManage/paySetting'
,
hidePageHeader
:
true
,
},
// 商户支付参数配置
{
path
:
'/system/ruleSettingManager/merchantPayType'
,
name
:
'商户支付参数配置'
,
component
:
'@/pages/systemManage/ruleSettingManage/merchantPayType'
,
// hidePageHeader: true,
},
// 参数配置
{
path
:
'/system/ruleSettingManager/merchantPayType/add'
,
name
:
'参数配置'
,
component
:
'@/pages/systemManage/ruleSettingManage/merchantPayType/add'
,
hideInMenu
:
true
// hidePageHeader: true,
},
// 查看参数配置
{
path
:
'/system/ruleSettingManager/merchantPayType/detail'
,
name
:
'查看参数配置'
,
component
:
'@/pages/systemManage/ruleSettingManage/merchantPayType/add'
,
hideInMenu
:
true
},
{
path
:
'/system/ruleSettingManager/transactionRules'
,
name
:
'平台交易规则'
,
...
...
@@ -183,7 +205,7 @@ const router = {
component
:
'@/pages/systemManage/ruleSettingManage/mallRules/detail'
,
hidePageHeader
:
true
,
hideInMenu
:
true
}
}
,
]
},
{
...
...
src/components/TableLayout/index.tsx
View file @
9e88c187
...
...
@@ -14,7 +14,8 @@ const { onFormMount$ } = FormEffectHooks
interface
Iprops
{
/** 列表接口 */
fetch
?:
()
=>
Promise
<
unknown
>
,
// fetch?: () => Promise<unknown>,
fetch
?:
any
,
/** 多选返回 */
fetchRowkeys
?(
e
:
any
),
/** 操作按钮 */
...
...
@@ -29,6 +30,8 @@ interface Iprops {
selectedRow
?:
boolean
,
/** 刷新 */
reload
?:
any
,
/** rowKey */
rowKey
?:
string
,
/** 外部状态数据 */
externalStatusFetch
?:
()
=>
Promise
<
unknown
>
,
/** 内部状态数据 */
...
...
@@ -46,6 +49,7 @@ const Table: React.FC<Iprops> = (props: any) => {
controllerBtns
,
selectedRow
,
reload
,
rowKey
,
fetchRowkeys
,
externalStatusFetch
,
interiorStatusFetch
,
...
...
@@ -57,9 +61,19 @@ const Table: React.FC<Iprops> = (props: any) => {
/** 列表数据 */
const
fetchData
=
(
params
?:
any
)
=>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
fetch
({
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
if
(
!
Array
.
isArray
(
fetch
))
{
fetch
({
...
params
}).
then
(
res
=>
{
resolve
(
res
.
data
)
}).
catch
(
error
=>
{
console
.
warn
(
error
)
})
return
}
resolve
({
code
:
1000
,
data
:
fetch
})
console
.
log
(
fetch
,
962039
)
})
}
...
...
@@ -106,7 +120,7 @@ const Table: React.FC<Iprops> = (props: any) => {
<
StandardTable
currentRef=
{
tableRef
}
columns=
{
columns
}
tableProps=
{
{
rowKe
w
:
'id'
}
}
tableProps=
{
{
rowKe
y
:
rowKey
?
rowKey
:
'id'
}
}
rowSelection=
{
selectedRow
&&
selectRow
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
controlRender=
{
...
...
src/pages/pageCustomized/mobileClientEdit/index.tsx
View file @
9e88c187
...
...
@@ -902,7 +902,7 @@ const mobileClientEdit: React.FC<ShopPreviewPropsType> = (props) => {
childNodes
:
[],
};
!
_suggestProductConfig
[
'10'
].
childNodes
.
includes
(
_newKey
)
&&
_suggestProductConfig
[
'10'
].
childNodes
.
push
(
_newKey
);
if
(
item
?.
customize
)
{
if
(
item
?.
customize
&&
item
.
type
===
3
)
{
const
_ids
=
item
.
customize
.
map
((
item
)
=>
item
.
id
).
join
(
','
);
const
_parmas
:
any
=
{
shopId
,
idInList
:
_ids
,
current
:
'1'
,
pageSize
:
'100'
};
const
_detailsData
=
await
getMarketingAdornGoodsListAdorn
(
_parmas
);
...
...
src/pages/pageCustomized/mobileClientEdit/preview.tsx
View file @
9e88c187
...
...
@@ -900,7 +900,7 @@ const mobileClientEdit: React.FC<ShopPreviewPropsType> = (props) => {
childNodes
:
[],
};
!
_suggestProductConfig
[
'10'
].
childNodes
.
includes
(
_newKey
)
&&
_suggestProductConfig
[
'10'
].
childNodes
.
push
(
_newKey
);
if
(
item
?.
customize
)
{
if
(
item
?.
customize
&&
item
.
type
===
3
)
{
const
_ids
=
item
.
customize
.
map
((
item
)
=>
item
.
id
).
join
(
','
);
const
_parmas
:
any
=
{
shopId
,
idInList
:
_ids
,
current
:
'1'
,
pageSize
:
'100'
};
const
_detailsData
=
await
getMarketingAdornGoodsListAdorn
(
_parmas
);
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/suggestProductCommodity/index.tsx
View file @
9e88c187
...
...
@@ -224,7 +224,7 @@ const SuggestProductCommodity: React.FC<SuggestProductCommodityProps> = (props:
onPressEnter=
{
_handleInputConfirm
}
/>
)
}
{
!
inputVisible
&&
(
{
!
inputVisible
&&
(
!
tags
||
tags
.
length
<=
2
)
&&
(
<
Tag
className=
{
styles
[
'site-tag-plus'
]
}
onClick=
{
_showInput
}
>
<
PlusOutlined
/>
新增标签
</
Tag
>
...
...
src/pages/systemManage/ruleSettingManage/merchantPayType/add.tsx
0 → 100644
View file @
9e88c187
This diff is collapsed.
Click to expand it.
src/pages/systemManage/ruleSettingManage/merchantPayType/index.tsx
0 → 100644
View file @
9e88c187
import
React
,
{
useRef
}
from
'react'
;
import
{
history
,
Link
}
from
'umi'
;
import
{
Button
,
Row
,
Col
,
Space
,
message
,
Popconfirm
,
Typography
}
from
'antd'
;
import
TableLayout
from
'@/components/TableLayout'
;
import
StatusSwitch
from
'@/components/StatusSwitch'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
getOrderPlatformPaymentMemberParameterPage
,
postOrderPlatformPaymentMemberParameterDelete
,
postOrderPlatformPaymentMemberParameterStatus
}
from
'@/services/OrderNewV2Api'
;
import
LevelBrand
from
'@/components/LevelBrand'
;
const
MerchantPayTypeLayout
=
()
=>
{
const
ref
=
useRef
<
any
>
({});
const
handleChangeStatus
=
(
record
)
=>
{
const
param
=
{
status
:
record
.
status
===
1
?
0
:
1
,
paymentId
:
record
.
paymentId
,
}
postOrderPlatformPaymentMemberParameterStatus
(
param
).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
message
.
error
(
res
.
message
);
return
}
ref
.
current
.
reload
()
})
}
const
handleDelete
=
(
record
)
=>
{
const
param
=
{
paymentId
:
record
.
paymentId
}
postOrderPlatformPaymentMemberParameterDelete
(
param
).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
message
.
error
(
res
.
message
)
return
}
ref
.
current
.
reload
()
})
}
const
columns
=
[
{
title
:
'ID'
,
key
:
'paymentId'
,
dataIndex
:
'paymentId'
,
},
{
title
:
'会员名称'
,
key
:
'name'
,
dataIndex
:
'name'
,
render
:
(
text
,
record
)
=>
<
Link
to=
{
{
pathname
:
'/system/ruleSettingManager/merchantPayType/detail'
,
state
:
{
record
},
}
}
>
{
text
}
</
Link
>
},
{
title
:
'会员类型'
,
key
:
'memberTypeName'
,
dataIndex
:
'memberTypeName'
,
},
{
title
:
'会员角色'
,
key
:
'roleName'
,
dataIndex
:
'roleName'
,
},
{
title
:
'会员等级'
,
key
:
'levelTag'
,
dataIndex
:
'levelTag'
,
// render: (_text, record: any) => <LevelBrand level={record.level} />
},
{
title
:
'支付方式'
,
key
:
'payTypeName'
,
dataIndex
:
'payTypeName'
,
},
{
title
:
'支付渠道'
,
key
:
'payChannelName'
,
dataIndex
:
'payChannelName'
,
},
{
title
:
'状态'
,
key
:
'status'
,
dataIndex
:
'status'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
StatusSwitch
fieldNames=
"status"
handleConfirm=
{
()
=>
handleChangeStatus
(
record
)
}
record=
{
record
}
/>
)
},
{
title
:
'操作'
,
key
:
'operate'
,
dataIndex
:
'operate'
,
render
:
(
text
:
any
,
record
:
any
)
=>
<>
{
record
.
status
!==
1
&&
(
<>
<
Popconfirm
title=
"确定要删除吗?"
okText=
"是"
cancelText=
"否"
onConfirm=
{
()
=>
handleDelete
(
record
)
}
>
<
Button
type=
'link'
>
删除
</
Button
>
</
Popconfirm
>
</>
)
}
</>
},
]
return
(
<>
<
TableLayout
reload=
{
ref
}
rowKey=
'paymentId'
fetch=
{
getOrderPlatformPaymentMemberParameterPage
}
columns=
{
columns
}
schema=
{
{
type
:
"object"
,
properties
:
{
megalayout
:
{
type
:
"object"
,
"x-component"
:
"mega-layout"
,
"x-component-props"
:
{
grid
:
true
},
properties
:
{
ctl
:
{
type
:
"object"
,
"x-component"
:
"controllerBtns"
,
},
search
:
{
type
:
'string'
,
'x-component'
:
'Search'
,
'x-component-props'
:
{
placeholder
:
'搜索'
,
advanced
:
false
,
},
},
}
}
}
}
}
controllerBtns=
{
<
Row
>
<
Col
span=
{
24
}
>
<
Space
direction=
"horizontal"
size=
{
16
}
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
'/system/ruleSettingManager/merchantPayType/add'
)
}
>
新增
</
Button
>
</
Space
>
</
Col
>
</
Row
>
}
/>
</>
)
}
export
default
MerchantPayTypeLayout
;
src/pages/systemManage/ruleSettingManage/paySetting/components/parameter.tsx
0 → 100644
View file @
9e88c187
import
React
,
{
useCallback
,
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Form
,
Select
,
Input
,
Typography
,
Upload
,
Button
,
message
}
from
'antd'
;
import
{
isEmpty
}
from
'@/components/NiceForm/components/AntUpload/shared'
;
import
style
from
'../index.less'
;
import
{
DeleteOutlined
,
UploadOutlined
}
from
'@ant-design/icons'
;
import
{
UPLOAD_TYPE
}
from
'@/constants'
import
{
getOrderPlatformPaymentMemberCommonParameterFind
}
from
'@/services/OrderNewV2Api'
;
const
{
Option
}
=
Select
;
const
{
TextArea
}
=
Input
;
const
layout
:
any
=
{
colon
:
false
,
labelCol
:
{
style
:
{
width
:
'100px'
}
},
labelAlign
:
"left"
};
interface
ModalProps
{
/** 支付渠道 */
payChannel
:
string
,
/** 显示隐藏 */
visible
?:
boolean
,
/** 编辑回显数据 */
value
?:
{
/** 支付参数枚举值 */
code
?:
number
,
/** 支付参数Key名称 */
key
?:
string
,
/** 支付参数内容 */
value
?:
string
,
/** 描述 */
remark
?:
String
},
/** 确定 */
onConfirm
:
(
e
)
=>
void
,
/** 取消 */
onCancel
:
()
=>
void
,
}
type
channel
=
{
/** 参数枚举值 */
code
?:
number
,
/** 参数Key名称 */
key
:
string
,
}[]
const
ParameterLayout
:
React
.
FC
<
ModalProps
>
=
({
payChannel
,
visible
,
value
,
onConfirm
,
onCancel
,
})
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
channel
,
setChannel
]
=
useState
<
channel
>
([]);
const
[
files
,
setFiles
]
=
useState
<
any
>
({});
const
[
loading
,
setloading
]
=
useState
(
false
);
const
handleChannelFind
=
useCallback
(
async
()
=>
{
await
getOrderPlatformPaymentMemberCommonParameterFind
({
payChannel
}).
then
(
res
=>
{
if
(
res
.
code
!==
1000
)
{
return
}
setChannel
(
res
.
data
);
})
},
[
payChannel
])
useEffect
(()
=>
{
if
(
payChannel
)
{
handleChannelFind
();
}
},
[
payChannel
])
const
handleCancel
=
()
=>
{
onCancel
()
form
.
resetFields
()
}
const
handleConfirm
=
()
=>
{
form
.
validateFields
().
then
(
res
=>
{
onConfirm
({
...
res
,
key
:
channel
.
filter
(
item
=>
item
.
code
===
res
.
code
)[
0
].
key
,
})
form
.
resetFields
();
})
}
useEffect
(()
=>
{
if
(
!
isEmpty
(
value
))
{
form
.
setFieldsValue
({
...
value
})
if
(
value
?.
code
===
14
)
{
setFiles
({
name
:
value
.
remark
,
url
:
value
.
value
})
}
}
},
[
visible
,
value
])
/**判断文件类型和大小 */
const
beforeDocUpload
=
(
file
:
any
)
=>
{
const
isLt20M
=
file
.
size
/
1024
/
1024
<
20
;
if
(
!
isLt20M
)
{
message
.
error
(
'上传文件大小不超过 20M!'
);
}
return
isLt20M
;
}
// 上传回调
const
handleChange
=
({
file
})
=>
{
setloading
(
true
);
if
(
file
.
response
)
{
if
(
file
.
response
.
code
===
1000
)
{
setFiles
({
name
:
file
.
name
,
url
:
file
.
response
.
data
})
form
.
setFieldsValue
({
value
:
file
.
response
.
data
})
setloading
(
false
);
}
}
}
const
handleDelete
=
()
=>
{
setFiles
({});
form
.
setFieldsValue
({
value
:
undefined
})
}
return
(
<
Modal
width=
{
576
}
title=
'新增参数配置'
visible=
{
visible
}
onOk=
{
handleConfirm
}
onCancel=
{
handleCancel
}
>
<
Form
form=
{
form
}
{
...
layout
}
>
<
Form
.
Item
name=
'code'
label=
'参数代码'
rules=
{
[{
required
:
true
,
message
:
'请选择参数代码'
}]
}
>
<
Select
>
{
channel
.
map
((
item
:
any
)
=>
(
<
Option
key=
{
item
.
code
}
value=
{
item
.
code
}
>
{
item
.
key
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
noStyle
shouldUpdate=
{
(
prevValues
,
curValues
)
=>
prevValues
.
code
!==
curValues
.
code
}
>
{
({
getFieldValue
})
=>
getFieldValue
(
'code'
)
===
14
?
(
<
Form
.
Item
name=
'value'
label=
'退款证书'
rules=
{
[{
required
:
true
,
message
:
'请上传退款证书'
}]
}
>
{
!
isEmpty
(
files
)
&&
(
<
div
className=
{
style
.
upload_fileList
}
>
<
Typography
.
Link
>
{
files
.
url
}
</
Typography
.
Link
>
<
DeleteOutlined
className=
{
style
.
delect_icon
}
style=
{
{
color
:
'#00B37A'
}
}
onClick=
{
()
=>
handleDelete
()
}
/>
</
div
>
)
}
{
isEmpty
(
files
)
&&
(
<
Upload
action=
"/api/file/file/upload"
data=
{
{
fileType
:
UPLOAD_TYPE
}
}
showUploadList=
{
false
}
beforeUpload=
{
beforeDocUpload
}
onChange=
{
handleChange
}
>
<
Button
loading=
{
loading
}
icon=
{
<
UploadOutlined
/>
}
>
上传文件
</
Button
>
</
Upload
>
)
}
</
Form
.
Item
>
)
:
<
Form
.
Item
name=
'value'
label=
'参数值'
rules=
{
[{
required
:
true
,
message
:
'请输入参数值'
}]
}
>
<
Input
/>
</
Form
.
Item
>
}
</
Form
.
Item
>
<
Form
.
Item
name=
'remark'
label=
'参数描述'
>
<
TextArea
maxLength=
{
200
}
rows=
{
4
}
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
)
}
export
default
ParameterLayout
;
src/pages/systemManage/ruleSettingManage/paySetting/index.less
View file @
9e88c187
...
...
@@ -51,6 +51,14 @@
transition: transform .15s cubic-bezier(.645,.045,.355,1),opacity .15s cubic-bezier(.645,.045,.355,1);
}
}
.tag {
margin-left: 14px;
padding: 4px;
font-size: 12px;
color: #5C626A;
background-color: #F4F5F7;
border-radius: 2px;
}
}
.upload_fileList {
...
...
src/pages/systemManage/ruleSettingManage/paySetting/index.tsx
View file @
9e88c187
This diff is collapsed.
Click to expand it.
src/pages/systemManage/ruleSettingManage/payStrategy/paymentConfig/components/basicInfo.tsx
View file @
9e88c187
...
...
@@ -70,12 +70,13 @@ const BasicInfo = () => {
{
!
isEmpty
(
item
)
&&
(
<>
<
div
className=
{
style
.
anchor
}
>
{
item
.
payTypeName
}
</
div
>
<
Form
.
Item
className=
{
style
.
spaceBox
}
label=
'资金
收
集模式'
required
>
<
Form
.
Item
className=
{
style
.
spaceBox
}
label=
'资金
归
集模式'
required
>
<
Space
direction=
'vertical'
>
<
Form
.
Item
{
...
restField
}
name=
{
[
name
,
'fundMode'
]
}
rules=
{
[{
required
:
true
,
message
:
'请选择'
}]
}
initialValue=
{
item
.
fundModes
[
0
].
fundMode
}
>
<
Select
style=
{
{
width
:
'100%'
}
}
>
{
item
.
fundModes
.
map
((
v
:
any
)
=>
(
...
...
src/pages/systemManage/ruleSettingManage/platformSettlementStrategy/info/index.tsx
View file @
9e88c187
...
...
@@ -285,7 +285,11 @@ const MemberSettleAdd: React.FC = () => {
// 获取单据类型
useAsyncSelect
(
"settlementOrderType"
,
fetchOptions
(
getSettleAccountsCommonGetPlatformStrategySettlementOrderType
)
fetchOptions
(
getSettleAccountsCommonGetPlatformStrategySettlementOrderType
),
)
useAsyncSelect
(
"_"
,
fetchOptions
(
getSettleAccountsCommonGetPlatformStrategySettlementOrderType
),
)
}
}
/>
...
...
src/pages/systemManage/ruleSettingManage/platformSettlementStrategy/info/schema.tsx
View file @
9e88c187
...
...
@@ -68,6 +68,14 @@ export const addSchema: ISchema = {
'x-rules'
:
[
{
required
:
true
,
message
:
'请填写策略名称'
},
]
},
_
:
{
type
:
'string'
,
enum
:
[],
title
:
'结算支付方式'
,
'x-rules'
:
[
{
required
:
true
,
message
:
'请填写策略名称'
},
]
}
},
}
...
...
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