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
240c84e8
Commit
240c84e8
authored
Aug 17, 2021
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v2' of 10.0.0.22:lingxi/lingxi-business-system into v2
parents
f161c026
72794fa7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
717 additions
and
641 deletions
+717
-641
index.ts
config/routes/index.ts
+2
-2
marketingRoutes.ts
config/routes/marketingRoutes.ts
+27
-0
ruleSettingRoutes.ts
config/routes/ruleSettingRoutes.ts
+3
-2
alipay_icon.png
src/asserts/icons/alipay_icon.png
+0
-0
balance_icon.png
src/asserts/icons/balance_icon.png
+0
-0
unionpay_icon.png
src/asserts/icons/unionpay_icon.png
+0
-0
wechat_icon.png
src/asserts/icons/wechat_icon.png
+0
-0
index.tsx
src/components/DetailLayout/components/basicLayout/index.tsx
+1
-1
index.tsx
src/components/DetailLayout/index.tsx
+4
-1
index.tsx
src/pages/demand/components/modalOperate/index.tsx
+46
-15
index.tsx
src/pages/marketing/detail/index.tsx
+31
-10
constants.ts
...ages/marketing/waitAddedMarketing/components/constants.ts
+6
-0
index.tsx
...eting/waitAddedMarketing/components/rulesLayout/index.tsx
+17
-11
index.tsx
src/pages/marketing/waitAddedMarketing/index.tsx
+1
-1
index.tsx
src/pages/marketing/waitAuditApply/index.tsx
+3
-2
returnSaveParams.ts
...ges/pageCustomized/components/toolBar/returnSaveParams.ts
+74
-0
MobileNavCard.ts
...omized/configs/componentConfigs/LingXiUI/MobileNavCard.ts
+32
-0
SuggestProduct.ts
...mized/configs/componentConfigs/LingXiUI/SuggestProduct.ts
+32
-0
index.ts
...pageCustomized/configs/componentConfigs/LingXiUI/index.ts
+5
-1
config.ts
src/pages/pageCustomized/mobileClientEdit/config.ts
+82
-42
index.tsx
src/pages/pageCustomized/mobileClientEdit/index.tsx
+25
-0
index.tsx
...propsSettings/components/bottomNavigationClient/index.tsx
+4
-4
index.less
...gPanel/propsSettings/components/suggestProduct/index.less
+13
-0
index.tsx
...ngPanel/propsSettings/components/suggestProduct/index.tsx
+86
-0
index.tsx
...pageCustomized/mobileSettingPanel/propsSettings/index.tsx
+3
-0
index.tsx
src/pages/pageCustomized/preview/mallPreview/index.tsx
+4
-1
index.tsx
src/pages/pageCustomized/preview/platformPreview/index.tsx
+24
-1
index.tsx
...bility/components/detail/components/basicLayout/index.tsx
+1
-1
index.tsx
...ty/components/detail/components/bidCommonLayout/index.tsx
+2
-3
index.tsx
...lity/components/detail/components/bidInfoLayout/index.tsx
+1
-1
index.tsx
...ty/components/detail/components/conditionLayout/index.tsx
+1
-1
index.tsx
...lity/components/detail/components/contrastLyout/index.tsx
+1
-1
index.tsx
...ity/components/detail/components/contrastLyout1/index.tsx
+1
-1
index.tsx
...ility/components/detail/components/demandLayout/index.tsx
+1
-1
index.tsx
...ity/components/detail/components/materialLayout/index.tsx
+1
-1
index.tsx
...bility/components/detail/components/otherLayout/index.tsx
+1
-1
index.tsx
...mponents/detail/components/progressCommonLayout/index.tsx
+1
-1
index.tsx
...ity/components/detail/components/progressLayout/index.tsx
+1
-1
index.tsx
...nents/detail/components/purchaseBidDemandLayout/index.tsx
+1
-1
index.tsx
...components/detail/components/recordCommonLayout/index.tsx
+1
-1
index.tsx
...bility/components/detail/components/recordLyout/index.tsx
+1
-1
modal.tsx
src/pages/ruleSettingManage/paySetting/components/modal.tsx
+123
-0
payWayRadio.tsx
...s/ruleSettingManage/paySetting/components/payWayRadio.tsx
+0
-43
payWayTable.tsx
...s/ruleSettingManage/paySetting/components/payWayTable.tsx
+0
-117
setUpModal.tsx
...es/ruleSettingManage/paySetting/components/setUpModal.tsx
+0
-102
usePayTypeEnum.ts
...ruleSettingManage/paySetting/components/usePayTypeEnum.ts
+0
-31
index.less
src/pages/ruleSettingManage/paySetting/index.less
+53
-4
index.tsx
src/pages/ruleSettingManage/paySetting/index.tsx
+0
-0
paySetting.tsx
src/pages/ruleSettingManage/paySetting/paySetting.tsx
+0
-0
settingIndex.tsx
src/pages/ruleSettingManage/paySetting/settingIndex.tsx
+0
-233
index.tsx
src/pages/ruleSettingManage/payStrategy/index.tsx
+1
-1
No files found.
config/routes/index.ts
View file @
240c84e8
...
...
@@ -16,7 +16,7 @@
// import demandQuoteOrderRoute from './demandQuoteOrderRoute' //需求报价单管理
// import logisticsRoutes from './logisticsRoutes'
// import memberAbility from './memberAbility'
import
ruleSettingRoutes
from
'./ruleSettingRoutes'
//
import ruleSettingRoutes from './ruleSettingRoutes'
// import authConfig from './authConfig'
// import rfqRoute from './rfqRoute' // 询价单路由
// import rfqOfferRoute from './rfqOfferRoute' // 询价单路由
...
...
@@ -109,7 +109,7 @@ const router = [
// ...routeList,
// merchantMarketingRoute,
// ruleSettingRoutes,
//
marketingRoutes,
marketingRoutes
,
// platformCouponManageRoute,
...
asyncRoutes
,
// purchaseBidRoute,
...
...
config/routes/marketingRoutes.ts
View file @
240c84e8
...
...
@@ -26,6 +26,15 @@ const marketingRoutes = {
component
:
'@/pages/marketing/waitAddedMarketing'
,
},
{
/** 待新增平台营销活动 - preview */
path
:
'/marketing/waitAddedMarketing/preview'
,
name
:
'待新增平台营销活动详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/marketing/detail'
,
},
{
/** 新增平台营销活动 - add */
path
:
'/marketing/waitAddedMarketing/add'
,
name
:
'新增平台营销活动'
,
...
...
@@ -49,6 +58,24 @@ const marketingRoutes = {
component
:
'@/pages/marketing/waitAuditApply'
,
},
{
/** 待审核报名 - preview */
path
:
'/marketing/waitAuditApply/preview'
,
name
:
'待审核报名详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/marketing/detail'
,
},
{
/** 待审核报名 - detail */
path
:
'/marketing/waitAuditApply/detail'
,
name
:
'待审核报名详情'
,
hidePageHeader
:
true
,
hideInMenu
:
true
,
noMargin
:
true
,
component
:
'@/pages/marketing/detail'
,
},
{
/** 待提交审核平台营销活动 - waitSubmitMarketing */
path
:
'/marketing/waitSubmitMarketing'
,
name
:
'待提交审核平台营销活动'
,
...
...
config/routes/ruleSettingRoutes.ts
View file @
240c84e8
...
...
@@ -39,8 +39,9 @@ const router = {
{
path
:
'/ruleSettingManager/paySetting'
,
name
:
'paySetting'
,
component
:
'@/pages/ruleSettingManage/paySetting/settingIndex'
,
hidePageHeader
:
true
component
:
'@/pages/ruleSettingManage/paySetting'
,
hidePageHeader
:
true
,
noMargin
:
true
,
},
{
path
:
'/ruleSettingManager/transactionRules'
,
...
...
src/asserts/icons/alipay_icon.png
0 → 100644
View file @
240c84e8
1.54 KB
src/asserts/icons/balance_icon.png
0 → 100644
View file @
240c84e8
1.12 KB
src/asserts/icons/unionpay_icon.png
0 → 100644
View file @
240c84e8
1.24 KB
src/asserts/icons/wechat_icon.png
0 → 100644
View file @
240c84e8
1.15 KB
src/components/DetailLayout/components/basicLayout/index.tsx
View file @
240c84e8
/** 详情通用 - 基本信息 */
import
React
from
'react'
;
import
{
Row
,
Col
}
from
'antd'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
import
style
from
'./index.less'
;
export
interface
BasicInfoProps
{
...
...
src/components/DetailLayout/index.tsx
View file @
240c84e8
...
...
@@ -13,6 +13,8 @@ export type tabLink = {
}
export
interface
IProps
{
/** 返回按钮 */
onBack
?:
boolean
,
/** 单号 */
no
?:
string
|
React
.
ReactNode
,
/** 详情描述 */
...
...
@@ -29,6 +31,7 @@ export interface IProps {
const
PeripheralLayout
:
React
.
FC
<
IProps
>
=
(
props
:
any
)
=>
{
const
{
onBack
,
no
,
detail
,
tabLink
,
...
...
@@ -71,7 +74,7 @@ const PeripheralLayout: React.FC<IProps> = (props: any) => {
<
div
style=
{
{
flex
:
1
}
}
>
<
div
className=
{
style
.
title
}
>
<
div
className=
{
style
.
titleBox
}
>
<
ArrowLeftOutlined
className=
{
style
.
goBack
}
onClick=
{
()
=>
history
.
goBack
()
}
/>
{
!
onBack
&&
<
ArrowLeftOutlined
className=
{
style
.
goBack
}
onClick=
{
()
=>
history
.
goBack
()
}
/>
}
<
span
className=
{
style
.
titleContext
}
>
{
detail
?
detail
:
dataSource
.
details
}
{
!
hideBreak
&&
'|'
}
...
...
src/pages/demand/components/modalOperate/index.tsx
View file @
240c84e8
...
...
@@ -14,7 +14,7 @@ export interface IProps {
title
:
string
,
visible
:
boolean
,
id
:
number
,
modalType
:
'audit'
|
'abandon'
,
modalType
:
'audit'
|
'abandon'
|
'merkeingAudit'
,
onCancel
?:
()
=>
void
,
onOk
?:
()
=>
void
,
fetch
?:
()
=>
Promise
<
unknown
>
,
...
...
@@ -44,6 +44,17 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
})
})
}
if
(
modalType
===
'merkeingAudit'
)
{
onFieldChange$
(
'isPass'
).
subscribe
(({
value
})
=>
{
setFieldState
(
'opinion'
,
state
=>
{
if
(
value
==
1
)
{
state
.
visible
=
false
}
else
{
state
.
visible
=
true
}
})
})
}
}
const
disabledDate
=
(
current
)
=>
{
...
...
@@ -62,29 +73,48 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
required
x
-
component=
"Radio"
x
-
component
-
props=
{
{}
}
/>
:
<
Field
title=
"作废时间"
name=
"reasonTime"
required
x
-
component=
"DatePicker"
x
-
component
-
props=
{
{
format
:
'YYYY-MM-DD HH:mm:ss'
,
disabledDate
,
}
}
/>
/>
:
modalType
===
'merkeingAudit'
?
<
Field
enum=
{
[
{
label
:
'审核通过'
,
value
:
1
},
{
label
:
'审核不通过'
,
value
:
0
}
]
}
name=
'isPass'
required
x
-
component=
"Radio"
x
-
component
-
props=
{
{}
}
/>
:
<
Field
title=
"作废时间"
name=
"reasonTime"
required
x
-
component=
"DatePicker"
x
-
component
-
props=
{
{
format
:
'YYYY-MM-DD HH:mm:ss'
,
disabledDate
,
}
}
/>
const
handleSubmit
=
(
val
:
any
)
=>
{
let
value
=
{
...
val
}
let
params
:
any
=
{}
if
(
modalType
===
'audit'
)
{
params
.
id
=
id
;
params
.
state
=
value
.
state
;
value
.
state
!==
1
&&
(
params
.
auditOpinion
=
value
.
auditOpinion
);
}
else
if
(
modalType
===
'merkeingAudit'
)
{
params
.
signUpId
=
id
,
params
.
isPass
=
value
.
isPass
;
params
.
opinion
=
value
.
opinion
;
}
else
{
params
.
id
=
id
;
params
.
reason
=
value
.
reason
params
.
reasonTime
=
new
Date
(
value
.
reasonTime
).
getTime
();
}
fetch
({
id
,
...
params
}).
then
(
res
=>
{
fetch
({
...
params
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
onOk
()
}
...
...
@@ -118,13 +148,14 @@ const ModalOperate: React.FC<IProps> = (props: any) => {
effects=
{
()
=>
useFormEffects
()
}
onSubmit=
{
(
values
)
=>
handleSubmit
(
values
)
}
initialValues=
{
{
state
:
1
state
:
1
,
isPass
:
1
,
}
}
>
{
modalNode
}
<
Field
title=
{
modalText
}
name=
{
modalType
===
'audit'
?
'auditOpinion'
:
'reason'
}
name=
{
modalType
===
'audit'
?
'auditOpinion'
:
modalType
===
'merkeingAudit'
?
'opinion'
:
'reason'
}
x
-
component=
"TextArea"
required
x
-
component
-
props=
{
{
...
...
src/pages/marketing/detail/index.tsx
View file @
240c84e8
import
React
,
{
Fragment
,
useCallback
,
useMemo
,
useState
}
from
'react'
;
import
{
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
{
Context
}
from
'@/components/
d
etailLayout/components/context'
;
import
PeripheralLayout
from
'@/components/
d
etailLayout'
;
import
{
Context
}
from
'@/components/
D
etailLayout/components/context'
;
import
PeripheralLayout
from
'@/components/
D
etailLayout'
;
import
{
_data
}
from
'./data'
;
import
ProgressLayout
from
'@/components/
d
etailLayout/components/progressLayout'
;
import
GeneralLayout
from
'@/components/
d
etailLayout/components/generalLayout'
;
import
RecordLyout
from
'@/components/
d
etailLayout/components/recordLyout'
;
import
BasicLayout
from
'@/components/
d
etailLayout/components/basicLayout'
;
import
ProgressLayout
from
'@/components/
D
etailLayout/components/progressLayout'
;
import
GeneralLayout
from
'@/components/
D
etailLayout/components/generalLayout'
;
import
RecordLyout
from
'@/components/
D
etailLayout/components/recordLyout'
;
import
BasicLayout
from
'@/components/
D
etailLayout/components/basicLayout'
;
import
moment
from
'moment'
;
import
{
useEffect
}
from
'react'
;
import
{
ACTIVITYTYPENAME
,
GeneralEffect
}
from
'./constants'
;
import
ActivityUserLayout
from
'../components/activityUserLayout'
;
import
DemandLayout
from
'../components/demandLayout'
;
import
ListLayout
from
'@/components/
d
etailLayout/components/listLayout'
;
import
ListLayout
from
'@/components/
D
etailLayout/components/listLayout'
;
import
{
Columns
}
from
'./columns'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
isEmpty
}
from
'lodash'
;
import
{
CheckCircleOutlined
}
from
'@ant-design/icons'
;
import
ModalOperate
from
'@/pages/demand/components/modalOperate'
;
const
TABLINK
=
[
{
id
:
'progressLayout'
,
title
:
'流转进度'
},
...
...
@@ -156,10 +157,20 @@ const DetialLayout = () => {
return
Columns
(
dataSource
.
activityType
||
1
)
},
[
dataSource
.
activityType
])
const
fetchLink
=
()
=>
{
let
fetchSoure
:
any
=
null
;
switch
(
pathPci
)
{
case
'waitAuditApply'
:
fetchSoure
=
PublicApi
.
postMarketingPlatformActivityExamineSignUp
break
;
}
return
fetchSoure
}
return
(
<
Context
.
Provider
value=
{
dataSource
}
>
<
PeripheralLayout
no=
{
dataSource
.
activityI
d
}
no=
{
dataSource
.
i
d
}
detail=
{
dataSource
.
activityName
}
tabLink=
{
TABLINK
}
effect=
{
...
...
@@ -188,8 +199,8 @@ const DetialLayout = () => {
/>
<
ListLayout
anchor=
"activityProductLayout"
done
data=
{
[]
}
fetch=
{
PublicApi
.
getMarketingPlatformActivityDetailGoodsPage
}
ids=
{
{
activityId
:
id
}
}
title=
"活动商品"
columns=
{
columns
}
/>
...
...
@@ -199,6 +210,16 @@ const DetialLayout = () => {
</
Fragment
>
}
/>
{
/* 审核 */
}
<
ModalOperate
id=
{
signUpId
}
title=
"单据审核"
modalType=
"merkeingAudit"
visible=
{
visible
}
fetch=
{
fetchLink
()
}
onCancel=
{
()
=>
setVisible
(
false
)
}
onOk=
{
()
=>
history
.
goBack
()
}
/>
</
Context
.
Provider
>
)
}
...
...
src/pages/marketing/waitAddedMarketing/components/constants.ts
View file @
240c84e8
...
...
@@ -143,12 +143,18 @@ export const LADDERBOLIST = (int, type=1) => {
tooltip
:
type
===
1
?
'优惠金额为最后订单总额减去的优惠金额'
:
'折扣为最后订单总额的折扣,输入数字,如85折,输入85,9折输入90'
,
label
:
`满量
${
type
===
1
?
'减'
:
'折'
}
`
,
message
:
`请新增满量
${
type
===
1
?
'减'
:
'折'
}
`
,
addon
:
'数量'
,
addonAfter
:
type
===
1
?
'减'
:
'打'
,
addonBefore
:
type
===
1
?
'元'
:
'折'
,
}
case
5
:
return
{
tooltip
:
type
===
1
?
'优惠金额为最后订单总额减去的优惠金额'
:
'折扣为最后订单总额的折扣,输入数字,如85折,输入85,9折输入90'
,
label
:
`满额
${
type
===
1
?
'减'
:
'折'
}
`
,
message
:
`请新增满额
${
type
===
1
?
'减'
:
'折'
}
`
,
addon
:
'元'
,
addonAfter
:
type
===
1
?
'减'
:
'打'
,
addonBefore
:
type
===
1
?
'元'
:
'折'
,
}
case
7
:
return
{
...
...
src/pages/marketing/waitAddedMarketing/components/rulesLayout/index.tsx
View file @
240c84e8
...
...
@@ -17,7 +17,13 @@ interface RulesLayoutProps {
const
RulesLayout
:
React
.
FC
<
RulesLayoutProps
>
=
(
props
:
any
)
=>
{
const
{
option
,
form
}
=
props
;
const
[
data
,
setData
]
=
useState
<
any
>
({});
console
.
log
(
data
)
const
[
ladderType
,
setLadderType
]
=
useState
<
number
>
(
1
)
const
handleActivityDefinedBO
=
(
e
)
=>
{
const
{
value
}
=
e
.
target
setLadderType
(
Number
(
value
));
}
/** 叠加活动类型 */
const
allowActivity
=
(
int
)
=>
{
switch
(
int
)
{
...
...
@@ -121,8 +127,9 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
label=
{
PROMOTIONTYPE
(
int
)?.
label
}
rules=
{
[{
required
:
true
,
message
:
PROMOTIONTYPE
(
int
)?.
message
}]
}
className=
{
style
.
rulesLayout
}
initialValue=
{
1
}
>
<
Radio
.
Group
>
<
Radio
.
Group
onChange=
{
handleActivityDefinedBO
}
>
{
PROMOTIONTYPE
(
int
)?.
radio
.
map
(
item
=>
(
<
Radio
.
Button
key=
{
item
.
value
}
value=
{
item
.
value
}
>
{
item
.
label
}
</
Radio
.
Button
>
))
}
...
...
@@ -191,7 +198,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
}
}
/** 满量/额减 */
const
ladderBOList
=
(
int
,
type
=
1
)
=>
{
const
ladderBOList
=
(
int
,
type
)
=>
{
switch
(
int
)
{
/** 满量促销 */
case
4
:
...
...
@@ -205,9 +212,8 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
rules=
{
[
{
validator
:
async
(
_
,
ladderBOList
)
=>
{
console
.
log
(
ladderBOList
,
10086
)
if
(
!
ladderBOList
||
isEmpty
(
ladderBOList
))
{
return
Promise
.
reject
(
new
Error
(
LADDERBOLIST
(
int
)?.
message
));
return
Promise
.
reject
(
new
Error
(
LADDERBOLIST
(
int
,
type
)?.
message
));
}
},
},
...
...
@@ -215,8 +221,8 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
>
{
(
fields
,
{
add
,
remove
},
{
errors
})
=>
(
<
Form
.
Item
tooltip=
{
LADDERBOLIST
(
int
)?.
tooltip
}
label=
{
LADDERBOLIST
(
int
)?.
label
}
tooltip=
{
LADDERBOLIST
(
int
,
type
)?.
tooltip
}
label=
{
LADDERBOLIST
(
int
,
type
)?.
label
}
required
>
{
fields
.
map
(({
key
,
name
,
fieldKey
,
...
restField
})
=>
(
...
...
@@ -229,9 +235,9 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
fieldKey=
{
[
fieldKey
,
`${int === 7 ? 'num' : 'key'}`
]
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
>
<
Input
addonAfter=
"个"
/>
<
Input
addonAfter=
{
LADDERBOLIST
(
int
,
type
)?.
addon
}
/>
</
Form
.
Item
>
减
{
LADDERBOLIST
(
int
,
type
)?.
addonAfter
}
<
Form
.
Item
{
...
restField
}
style=
{
{
margin
:
0
}
}
...
...
@@ -239,7 +245,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
fieldKey=
{
[
fieldKey
,
`${int === 7 ? 'discount' : 'value'}`
]
}
rules=
{
[{
required
:
true
,
message
:
'请输入'
}]
}
>
<
Input
addonAfter=
"个"
/>
<
Input
addonAfter=
{
LADDERBOLIST
(
int
,
type
)?.
addonBefore
}
/>
</
Form
.
Item
>
<
Button
icon=
{
<
MinusOutlined
/>
}
onClick=
{
()
=>
remove
(
name
)
}
/>
</
Space
>
...
...
@@ -480,7 +486,7 @@ const RulesLayout: React.FC<RulesLayoutProps> = (props: any) => {
>
{
type
(
Number
(
data
.
value
)
||
1
)
}
{
restrictNum
(
Number
(
data
.
value
)
||
1
)
}
{
ladderBOList
(
Number
(
data
.
value
)
||
1
)
}
{
ladderBOList
(
Number
(
data
.
value
)
||
1
,
ladderType
)
}
{
giftType
(
Number
(
data
.
value
)
||
1
)
}
{
swapType
(
Number
(
data
.
value
)
||
1
)
}
{
allowActivity
(
Number
(
data
.
value
)
||
1
)
}
...
...
src/pages/marketing/waitAddedMarketing/index.tsx
View file @
240c84e8
...
...
@@ -63,7 +63,7 @@ const WaitAddedMarketing = () => {
title
:
'活动名称'
,
key
:
'activityName'
,
dataIndex
:
'activityName'
,
render
:
(
text
,
record
)
=>
<
EyePreview
url=
{
`/m
emberCenter/marketingAbility/paltformSign/search/detail?activityId=${record.activityI
d}`
}
>
{
text
}
</
EyePreview
>
render
:
(
text
,
record
)
=>
<
EyePreview
url=
{
`/m
arketing/waitAddedMarketing/preview?id=${record.i
d}`
}
>
{
text
}
</
EyePreview
>
},
{
title
:
'活动类型'
,
...
...
src/pages/marketing/waitAuditApply/index.tsx
View file @
240c84e8
/** 待审核报名 */
import
React
from
'react'
;
import
{
Button
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
TableLayout
from
'@/components/TableLayout'
;
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
...
...
@@ -23,7 +24,7 @@ const WaitAuditApply = () => {
title
:
'活动名称'
,
key
:
'activityName'
,
dataIndex
:
'activityName'
,
render
:
(
text
,
record
)
=>
<
EyePreview
>
{
text
}
</
EyePreview
>
render
:
(
text
,
record
)
=>
<
EyePreview
url=
{
`/marketing/waitAuditApply/preview?id=${record.id}`
}
>
{
text
}
</
EyePreview
>
},
{
title
:
'活动类型'
,
...
...
@@ -74,7 +75,7 @@ const WaitAuditApply = () => {
title
:
'操作'
,
key
:
'state'
,
dataIndex
:
'state'
,
render
:
(
text
,
record
)
=>
<
Button
type=
'link'
>
审核报名
</
Button
>
render
:
(
text
,
record
)
=>
<
Button
type=
'link'
onClick=
{
()
=>
history
.
push
(
`/marketing/waitAuditApply/detail?id=${record.id}&signUpId=${record.signUpId}`
)
}
>
审核报名
</
Button
>
}
]
...
...
src/pages/pageCustomized/components/toolBar/returnSaveParams.ts
0 → 100644
View file @
240c84e8
import
{
PageConfigType
}
from
'@lingxi-disign/core'
;
export
const
paramsClient
=
(
templateId
:
number
,
pageConfig
:
PageConfigType
,
)
=>
{
let
_params
:
any
=
{
templateId
,
adornContent
:
{},
categoryAdornContent
:
{},
};
const
_root
:
any
=
pageConfig
[
'0'
].
childNodes
;
_root
?.
forEach
(
item
=>
{
if
(
item
!=
'1'
)
{
switch
(
item
)
{
case
'2'
:
_params
.
adornContent
.
advert
=
{
sort
:
1
,
style
:
0
,
status
:
true
,
details
:
[],
};
if
(
pageConfig
[
'2'
].
childNodes
?.
length
)
{
for
(
let
key
in
pageConfig
[
'2'
].
childNodes
)
{
_params
.
adornContent
.
advert
.
details
.
push
({
id
:
pageConfig
[
key
]?.
props
?.
id
,
img
:
pageConfig
[
key
]?.
props
?.
img
,
name
:
pageConfig
[
key
]?.
props
?.
name
,
type
:
pageConfig
[
key
]?.
props
?.
type
,
});
}
}
break
;
case
'12'
:
_params
.
adornContent
.
bottom
=
{
sort
:
1
,
style
:
0
,
status
:
true
,
details
:
[],
};
if
(
pageConfig
[
'12'
].
childNodes
?.
length
)
{
for
(
let
key
in
pageConfig
[
'12'
].
childNodes
)
{
_params
.
adornContent
.
bottom
.
details
.
push
({
defaultIcon
:
pageConfig
[
key
]?.
props
?.
defaultIcon
,
selectIcon
:
pageConfig
[
key
]?.
props
?.
selectIcon
,
name
:
pageConfig
[
key
]?.
props
?.
name
,
type
:
pageConfig
[
key
]?.
props
?.
type
,
});
}
}
break
;
case
'13'
:
_params
.
adornContent
.
coupon
=
{
sort
:
1
,
style
:
0
,
status
:
true
,
details
:
{
title
:
pageConfig
[
'13'
]?.
props
?.
title
,
id
:
[],
},
};
if
(
pageConfig
[
'13'
].
childNodes
?.
length
)
{
for
(
let
key
in
pageConfig
[
'13'
].
childNodes
)
{
_params
.
adornContent
.
coupon
.
details
.
id
.
push
(
pageConfig
[
key
]?.
props
?.
id
);
}
}
break
;
default
:
break
;
}
}
});
};
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/MobileNavCard.ts
0 → 100644
View file @
240c84e8
import
{
ComponentSchemaType
,
PROPS_SETTING_TYPES
,
PROPS_TYPES
,
}
from
'@lingxi-disign/core'
;
const
MobileNavCard
:
ComponentSchemaType
=
{
propsConfig
:
{
children
:
{
label
:
'内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
const
MobileNavCardNavItem
:
ComponentSchemaType
=
{
fatherNodesRule
:
[
'MobileNavCard.children'
],
propsConfig
:
{
children
:
{
label
:
'内容'
,
type
:
PROPS_TYPES
.
string
,
},
componentType
:
{
type
:
PROPS_SETTING_TYPES
.
mobileNavCardNavItem
,
},
},
};
export
default
{
MobileNavCard
,
'MobileNavCard.NavItem'
:
MobileNavCardNavItem
,
};
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/SuggestProduct.ts
0 → 100644
View file @
240c84e8
import
{
ComponentSchemaType
,
PROPS_SETTING_TYPES
,
PROPS_TYPES
,
}
from
'@lingxi-disign/core'
;
const
SuggestProduct
:
ComponentSchemaType
=
{
propsConfig
:
{
children
:
{
label
:
'内容'
,
type
:
PROPS_TYPES
.
string
,
},
},
};
const
SuggestProductItems
:
ComponentSchemaType
=
{
fatherNodesRule
:
[
'SuggestProduct.children'
],
propsConfig
:
{
children
:
{
label
:
'内容'
,
type
:
PROPS_TYPES
.
string
,
},
componentType
:
{
type
:
PROPS_SETTING_TYPES
.
suggestProductItems
,
},
},
};
export
default
{
SuggestProduct
,
'SuggestProduct.Items'
:
SuggestProductItems
,
};
src/pages/pageCustomized/configs/componentConfigs/LingXiUI/index.ts
View file @
240c84e8
...
...
@@ -45,6 +45,8 @@ import BottomNavigation from './BottomNavigation';
import
CouponsModal
from
'./CouponsModal'
;
import
Banner
from
'./Banner'
;
import
HeaderNav
from
'./HeaderNav'
;
import
MobileNavCard
from
'./MobileNavCard'
;
import
SuggestProduct
from
'./SuggestProduct'
;
export
default
{
View
,
...
...
@@ -93,5 +95,7 @@ export default {
...
BottomNavigation
,
...
CouponsModal
,
...
Banner
,
...
HeaderNav
...
HeaderNav
,
...
MobileNavCard
,
...
SuggestProduct
};
src/pages/pageCustomized/mobileClientEdit/config.ts
View file @
240c84e8
...
...
@@ -15,7 +15,7 @@ export const mallLayoutConfig = {
position
:
'relative'
,
},
},
childNodes
:
[
'1'
,
'2'
,
'12'
,
'13'
],
childNodes
:
[
'1'
,
'2'
,
'
3'
,
'10'
,
'
12'
,
'13'
],
},
};
...
...
@@ -26,7 +26,7 @@ export const headerConfig = {
canHide
:
true
,
componentName
:
'HeaderNav'
,
props
:
{},
childNodes
:
[
'1-1'
,
'1-2'
],
childNodes
:
[
'1-1'
,
'1-2'
],
childComponentName
:
'HeaderNav.ActionItem'
,
},
'1-1'
:
{
...
...
@@ -69,8 +69,8 @@ export const bannerConfig = {
componentName
:
'Banner'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[],
childComponentName
:
'Banner.Items'
,
...
...
@@ -78,6 +78,23 @@ export const bannerConfig = {
},
};
export
const
categoryGuidanceConfig
=
{
'3'
:
{
title
:
'品类导航'
,
canEdit
:
false
,
canHide
:
true
,
componentName
:
'MobileNavCard'
,
props
:
{
style
:
{
margin
:
'8px'
,
},
},
childNodes
:
[],
childComponentName
:
'MobileNavCard.NavItem'
,
addBtnText
:
'添加导航'
,
},
};
export
const
marketingConfig
=
{
'11'
:
{
title
:
'活动'
,
...
...
@@ -97,8 +114,8 @@ export const marketingConfig_1 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-1-1'
,
'11-1-2'
],
},
...
...
@@ -129,8 +146,8 @@ export const marketingConfig_2 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-2-1'
,
'11-2-2'
],
},
...
...
@@ -161,8 +178,8 @@ export const marketingConfig_3 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-3-1'
,
'11-3-2'
],
},
...
...
@@ -193,8 +210,8 @@ export const marketingConfig_4 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-4-1'
,
'11-4-2'
],
},
...
...
@@ -225,8 +242,8 @@ export const marketingConfig_5 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-5-1'
,
'11-5-2'
],
},
...
...
@@ -257,8 +274,8 @@ export const marketingConfig_6 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-6-1'
,
'11-6-2'
],
},
...
...
@@ -289,8 +306,8 @@ export const marketingConfig_7 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-7-1'
,
'11-7-2'
],
},
...
...
@@ -321,8 +338,8 @@ export const marketingConfig_8 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-8-1'
,
'11-8-2'
],
},
...
...
@@ -353,8 +370,8 @@ export const marketingConfig_9 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-9-1'
,
'11-9-2'
],
},
...
...
@@ -385,8 +402,8 @@ export const marketingConfig_10 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-10-1'
,
'11-10-2'
],
},
...
...
@@ -417,8 +434,8 @@ export const marketingConfig_11 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-11-1'
,
'11-11-2'
],
},
...
...
@@ -448,8 +465,8 @@ export const marketingConfig_12 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-12-1'
,
'11-12-2'
],
},
...
...
@@ -480,8 +497,8 @@ export const marketingConfig_13 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-13-1'
,
'11-13-2'
],
},
...
...
@@ -511,8 +528,8 @@ export const marketingConfig_14 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-14-1'
,
'11-14-2'
],
},
...
...
@@ -542,8 +559,8 @@ export const marketingConfig_15 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-15-1'
,
'11-15-2'
],
},
...
...
@@ -573,8 +590,8 @@ export const marketingConfig_16 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-16-1'
,
'11-16-2'
],
},
...
...
@@ -604,8 +621,8 @@ export const marketingConfig_17 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-17-1'
,
'11-17-2'
],
},
...
...
@@ -635,8 +652,8 @@ export const marketingConfig_18 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-18-1'
,
'11-18-2'
],
},
...
...
@@ -710,8 +727,8 @@ export const marketingConfig_19 = {
componentName
:
'MarketingCard'
,
props
:
{
style
:
{
margin
:
'8px'
}
margin
:
'8px'
,
}
,
},
childNodes
:
[
'11-19-1'
,
'11-19-2'
],
},
...
...
@@ -735,6 +752,29 @@ export const marketingConfig_19 = {
},
};
export
const
suggestProductConfig
=
{
'10'
:
{
title
:
'推荐商品'
,
componentName
:
'SuggestProduct'
,
props
:
{},
childNodes
:
[],
childComponentName
:
'SuggestProduct.Items'
,
addBtnText
:
'添加分类'
,
canEdit
:
false
,
canHide
:
true
,
childProps
:
{
title
:
'商品容器'
,
canEdit
:
false
,
canHide
:
true
,
componentName
:
'SuggestProduct.Items'
,
props
:
{},
childComponentName
:
'Commodity'
,
addBtnText
:
'添加商品'
,
childNodes
:
[],
},
},
}
export
const
bottomNavigationConfig
=
{
'12'
:
{
title
:
'底部标签'
,
...
...
src/pages/pageCustomized/mobileClientEdit/index.tsx
View file @
240c84e8
...
...
@@ -37,6 +37,8 @@ import {
marketingConfig_18
,
marketingConfig_19
,
bannerConfig
,
categoryGuidanceConfig
,
suggestProductConfig
,
bottomNavigationConfig
,
couponsModalConfig
}
from
'./config'
;
...
...
@@ -107,6 +109,7 @@ const mobileClientEdit: React.FC<ShopPreviewPropsType> = (props) => {
let
_bannerConfig
:
any
=
{
...
bannerConfig
};
let
_bottomNavigationConfig
:
any
=
{
...
bottomNavigationConfig
};
let
_couponsModalConfig
:
any
=
{
...
couponsModalConfig
};
let
_categoryGuidanceConfig
:
any
=
{
...
categoryGuidanceConfig
}
// 活动专区
let
_other
=
{};
let
_marketingConfig_1
:
any
=
{
...
marketingConfig_1
};
...
...
@@ -142,6 +145,20 @@ const mobileClientEdit: React.FC<ShopPreviewPropsType> = (props) => {
}
}
}
if
(
appConfig
?.
adornContent
?.
categoryGuidance
)
{
// 品类导航
const
_list
=
appConfig
?.
adornContent
?.
categoryGuidance
?.
details
;
for
(
let
key
in
_list
)
{
const
_childKey
:
any
=
`3-
${
Number
(
key
)
+
1
}
`
;
!
_categoryGuidanceConfig
[
'3'
].
childNodes
.
includes
(
_childKey
)
&&
_categoryGuidanceConfig
[
'3'
].
childNodes
.
push
(
_childKey
)
_categoryGuidanceConfig
[
_childKey
]
=
{
key
:
_childKey
,
title
:
_list
[
key
].
name
,
componentName
:
'MobileNavCard.NavItem'
,
props
:
{
...
_list
[
key
]
},
}
}
}
if
(
appConfig
?.
adornContent
?.
specialOffer
)
{
// 特价促销
const
_details
=
appConfig
?.
adornContent
?.
advert
?.
details
;
...
...
@@ -332,12 +349,20 @@ const mobileClientEdit: React.FC<ShopPreviewPropsType> = (props) => {
// 优惠券弹窗
const
_details
=
appConfig
?.
adornContent
?.
coupon
?.
details
;
_couponsModalConfig
[
'13'
].
props
.
title
=
_details
.
title
;
// if (_details.id.length > 0) {
// for (let key in _details.id) {
// const _childKey: any = `13-${Number(key) + 1}`;
// !_couponsModalConfig['13'].childNodes.includes(_childKey) && _couponsModalConfig['13'].childNodes.push(_childKey)
// }
// }
}
const
config
=
cloneDeep
({
...
_mallLayoutConfig
,
...
headerConfig
,
...
_bannerConfig
,
// ..._categoryGuidanceConfig,
...
suggestProductConfig
,
...
_other
,
...
_bottomNavigationConfig
,
...
_couponsModalConfig
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/bottomNavigationClient/index.tsx
View file @
240c84e8
...
...
@@ -82,25 +82,25 @@ const BottomNavigationClient: React.FC<BottomNavigationClientProps> = (props: Bo
const
_val
=
e
.
target
.
value
;
changeProps
({
title
:
_val
||
''
,
props
:
Object
.
assign
({
...
props
},
{
name
:
_val
,
is
N
ull
:
_isNull
([
defaultIcon
,
selectIcon
,
_val
,
type
])
})
props
:
Object
.
assign
({
...
props
},
{
name
:
_val
,
is
n
ull
:
_isNull
([
defaultIcon
,
selectIcon
,
_val
,
type
])
})
});
}
const
_onChangeType
=
(
value
:
any
)
=>
{
changeProps
({
props
:
Object
.
assign
({
...
props
},
{
type
:
value
,
is
N
ull
:
_isNull
([
defaultIcon
,
selectIcon
,
name
,
value
])
})
props
:
Object
.
assign
({
...
props
},
{
type
:
value
,
is
n
ull
:
_isNull
([
defaultIcon
,
selectIcon
,
name
,
value
])
})
});
}
const
_onChangeDefaultIcon
=
(
url
:
any
)
=>
{
changeProps
({
props
:
Object
.
assign
({
...
props
},
{
defaultIcon
:
url
,
is
N
ull
:
_isNull
([
url
,
selectIcon
,
name
,
type
])
})
props
:
Object
.
assign
({
...
props
},
{
defaultIcon
:
url
,
is
n
ull
:
_isNull
([
url
,
selectIcon
,
name
,
type
])
})
});
}
const
_onChangeSelectIcon
=
(
url
:
any
)
=>
{
changeProps
({
props
:
Object
.
assign
({
...
props
},
{
selectIcon
:
url
,
is
N
ull
:
_isNull
([
defaultIcon
,
url
,
name
,
type
])
})
props
:
Object
.
assign
({
...
props
},
{
selectIcon
:
url
,
is
n
ull
:
_isNull
([
defaultIcon
,
url
,
name
,
type
])
})
});
}
...
...
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/suggestProduct/index.less
0 → 100644
View file @
240c84e8
@import "../../common.less";
.suggestProduct {
&-box {
margin-bottom: 16px;
&-label {
font-size: 12px;
color: #91959B;
margin-bottom: 8px;
}
}
}
src/pages/pageCustomized/mobileSettingPanel/propsSettings/components/suggestProduct/index.tsx
0 → 100644
View file @
240c84e8
import
React
from
'react'
;
import
{
Input
,
Radio
,
Space
}
from
'antd'
;
import
{
changeProps
}
from
'@lingxi-disign/core'
;
import
styles
from
'./index.less'
;
interface
SuggestProductProps
{
title
?:
string
,
explain
?:
string
,
type
?:
number
,
num
?:
number
,
customize
?:
any
,
// 当前选中组件的key
selectedKey
?:
any
}
const
SuggestProduct
:
React
.
FC
<
SuggestProductProps
>
=
(
props
:
SuggestProductProps
)
=>
{
const
{
title
,
explain
,
type
,
num
,
customize
,
selectedKey
}
=
props
;
const
_isNull
=
(
list
)
=>
{
let
_flag
=
true
;
for
(
let
key
in
list
)
{
if
(
list
[
key
])
{
_flag
=
false
}
}
return
_flag
;
}
const
_onChangeTitle
=
(
e
:
any
)
=>
{
const
_val
=
e
.
target
.
value
;
changeProps
({
title
:
_val
||
''
,
props
:
Object
.
assign
({
...
props
},
{
title
:
_val
,
isnull
:
_isNull
([
_val
,
explain
,
type
])
})
});
}
const
_onChangeExplain
=
(
e
:
any
)
=>
{
const
_val
=
e
.
target
.
value
;
changeProps
({
props
:
Object
.
assign
({
...
props
},
{
explain
:
_val
,
isnull
:
_isNull
([
title
,
_val
,
type
])
})
});
}
const
_onChangeType
=
(
e
:
any
)
=>
{
const
_val
=
e
.
target
.
value
;
changeProps
({
props
:
Object
.
assign
({
...
props
},
{
type
:
_val
,
isnull
:
_isNull
([
title
,
explain
,
_val
])
})
});
}
const
_onChangeNum
=
(
e
:
any
)
=>
{
const
_val
=
e
.
target
.
value
.
replace
(
/
[^\d]
/g
,
''
);
changeProps
({
props
:
Object
.
assign
({
...
props
},
{
num
:
_val
,
isnull
:
_isNull
([
title
,
explain
,
_val
])
})
});
}
return
(
<
div
className=
{
styles
[
'suggestProduct'
]
}
>
<
div
className=
{
styles
[
'suggestProduct-box'
]
}
>
<
div
className=
{
styles
[
'suggestProduct-box-label'
]
}
>
标题
</
div
>
<
Input
key=
{
`${selectedKey}-title`
}
defaultValue=
{
title
}
onChange=
{
_onChangeTitle
}
maxLength=
{
8
}
/>
</
div
>
<
div
className=
{
styles
[
'suggestProduct-box'
]
}
>
<
div
className=
{
styles
[
'suggestProduct-box-label'
]
}
>
标题说明
</
div
>
<
Input
key=
{
`${selectedKey}-explain`
}
defaultValue=
{
explain
}
onChange=
{
_onChangeExplain
}
maxLength=
{
16
}
/>
</
div
>
<
div
className=
{
styles
[
'suggestProduct-box'
]
}
>
<
div
className=
{
styles
[
'suggestProduct-box-label'
]
}
>
商品展示
</
div
>
<
Radio
.
Group
key=
{
`${selectedKey}-type`
}
onChange=
{
_onChangeType
}
defaultValue=
{
type
}
>
<
Space
direction=
"vertical"
>
<
Radio
value=
{
1
}
>
自动按销量排行展示 (从高到低)
</
Radio
>
<
Radio
value=
{
2
}
>
自动按上架时间排序 (从新到旧)
</
Radio
>
<
Radio
value=
{
3
}
>
自定义商品
</
Radio
>
</
Space
>
</
Radio
.
Group
>
</
div
>
<
div
className=
{
styles
[
'suggestProduct-box'
]
}
>
<
div
className=
{
styles
[
'suggestProduct-box-label'
]
}
>
展示数量
</
div
>
<
Input
key=
{
`${selectedKey}-num`
}
defaultValue=
{
num
}
onChange=
{
_onChangeNum
}
/>
</
div
>
</
div
>
)
}
export
default
SuggestProduct
src/pages/pageCustomized/mobileSettingPanel/propsSettings/index.tsx
View file @
240c84e8
...
...
@@ -12,6 +12,7 @@ import MarketingCardCoupon from './components/marketingCardCoupon';
import
BottomNavigationClient
from
'./components/bottomNavigationClient'
;
import
CouponsModal
from
'./components/couponsModal'
;
import
BannerClient
from
'./components/bannerClient'
;
import
SuggestProduct
from
'./components/suggestProduct'
;
import
styles
from
'./index.less'
;
interface
PropsSettingsPropsType
{
...
...
@@ -51,6 +52,8 @@ const PropsSettings: React.FC<PropsSettingsPropsType> = (props) => {
return
<
CouponsModal
{
...
_props
}
/>
case
PROPS_SETTING_TYPES
.
bannerItems
:
return
<
BannerClient
{
...
_props
}
/>
case
PROPS_SETTING_TYPES
.
suggestProductItems
:
return
<
SuggestProduct
{
...
_props
}
/>
default
:
return
null
;
}
...
...
src/pages/pageCustomized/preview/mallPreview/index.tsx
View file @
240c84e8
...
...
@@ -123,7 +123,10 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
const
param
:
any
=
{
templateId
:
id
};
PublicApi
.
getTemplateWebCategoryWebFindEnterpriseCategoryTree
(
param
).
then
(
res
=>
{
const
headers
:
any
=
{
shopId
}
PublicApi
.
getTemplateWebCategoryWebFindEnterpriseCategoryTree
(
param
,
{
headers
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
}
...
...
src/pages/pageCustomized/preview/platformPreview/index.tsx
View file @
240c84e8
...
...
@@ -57,6 +57,24 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
getPlatformConfig
();
},
[]);
const
getDefaultEnterprise
=
()
=>
{
const
shopInfo
=
GlobalConfig
.
web
.
shopInfo
;
const
webMallList
=
shopInfo
.
filter
(
(
item
:
{
environment
:
number
;
type
:
number
})
=>
item
.
environment
===
1
&&
item
.
type
===
1
,
);
const
defaultMall
=
webMallList
.
filter
(
item
=>
item
.
isDefault
===
1
)[
0
];
let
result
:
any
=
undefined
;
if
(
defaultMall
)
{
result
=
defaultMall
;
}
else
{
if
(
webMallList
&&
webMallList
.
length
>
0
)
{
result
=
webMallList
[
0
];
}
}
return
result
;
};
/**
* 获取平台首页装修信息
*/
...
...
@@ -88,10 +106,15 @@ const MallEdit: React.FC<MallEditPropsType> = (props) => {
*/
const
getCategoryTree
=
()
=>
{
return
new
Promise
((
resolve
)
=>
{
const
defaultMallInfo
=
getDefaultEnterprise
()
const
param
:
any
=
{
templateId
:
id
};
PublicApi
.
getTemplateWebCategoryWebFindEnterpriseCategoryTree
(
param
).
then
(
res
=>
{
const
headers
:
any
=
{
shopId
:
defaultMallInfo
.
id
};
PublicApi
.
getTemplateWebCategoryWebFindEnterpriseCategoryTree
(
param
,
{
headers
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
);
}
else
{
...
...
src/pages/purchaseAbility/components/detail/components/basicLayout/index.tsx
View file @
240c84e8
/** 详情通用 - 基本信息 */
import
React
from
'react'
;
import
{
Row
,
Col
}
from
'antd'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
import
style
from
'./index.less'
;
export
interface
BasicInfoProps
{
...
...
src/pages/purchaseAbility/components/detail/components/bidCommonLayout/index.tsx
View file @
240c84e8
...
...
@@ -2,7 +2,7 @@ import React from 'react';
import
{
Row
,
Col
,
Divider
,
Tooltip
}
from
'antd'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
import
selfStyles
from
'./index.less'
;
...
...
@@ -140,4 +140,4 @@ const BidCommonLayout: React.FC<BidCommonLayoutProps> = (props: any) => {
)
}
export
default
BidCommonLayout
\ No newline at end of file
export
default
BidCommonLayout
src/pages/purchaseAbility/components/detail/components/bidInfoLayout/index.tsx
View file @
240c84e8
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
{
Tabs
,
Table
,
Row
,
Col
,
Space
,
Typography
,
Button
}
from
'antd'
;
import
{
Context
}
from
'../context'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
style
from
'./index.less'
;
import
{
CaretDownOutlined
,
CaretRightOutlined
}
from
'@ant-design/icons'
;
...
...
src/pages/purchaseAbility/components/detail/components/conditionLayout/index.tsx
View file @
240c84e8
/** 详情通用 - 交易条件 */
import
React
from
'react'
;
import
{
Row
,
Col
}
from
'antd'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
import
style
from
'./index.less'
;
export
interface
ConditionProps
{
...
...
src/pages/purchaseAbility/components/detail/components/contrastLyout/index.tsx
View file @
240c84e8
...
...
@@ -3,7 +3,7 @@ import { Space, Button, Tabs, Divider, Skeleton, Typography, message, Row, Col }
import
{
StandardTable
}
from
'god'
;
import
{
history
}
from
'umi'
;
import
moment
from
'moment'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
import
{
PRICECONTRAST_TYPE
}
from
'../../../../constants'
;
import
style
from
'./index.less'
;
import
EyePreview
from
'@/components/EyePreview'
;
...
...
src/pages/purchaseAbility/components/detail/components/contrastLyout1/index.tsx
View file @
240c84e8
import
React
,
{
useContext
,
useEffect
,
useState
}
from
'react'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
import
{
PRICECONTRAST_TYPE
}
from
'../../../../constants'
;
import
{
Tabs
,
message
,
Row
,
Col
,
Typography
,
Skeleton
,
Divider
,
Empty
,
Pagination
}
from
'antd'
;
import
{
FilePdfOutlined
}
from
'@ant-design/icons'
;
...
...
src/pages/purchaseAbility/components/detail/components/demandLayout/index.tsx
View file @
240c84e8
import
React
,
{
useContext
}
from
'react'
;
import
{
Row
,
Col
,
Image
,
Table
,
Tooltip
,
Switch
,
Typography
}
from
'antd'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
import
{
Context
}
from
'../context'
;
import
style
from
'./index.less'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
...
...
src/pages/purchaseAbility/components/detail/components/materialLayout/index.tsx
View file @
240c84e8
import
React
,
{
useRef
,
useState
}
from
'react'
;
import
{
StandardTable
}
from
'god'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
import
EyePreview
from
'@/components/EyePreview'
;
import
DetailDrawer
from
'../../../detailDrawer'
;
...
...
src/pages/purchaseAbility/components/detail/components/otherLayout/index.tsx
View file @
240c84e8
/** 详情通用 - 基本信息 */
import
React
from
'react'
;
import
{
Row
,
Col
}
from
'antd'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
import
style
from
'./index.less'
;
export
interface
OtherInfoProps
{
...
...
src/pages/purchaseAbility/components/detail/components/progressCommonLayout/index.tsx
View file @
240c84e8
/** 详情通用 - 流转进度 */
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Radio
,
Steps
}
from
'antd'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
export
interface
ProgressProps
{
...
...
src/pages/purchaseAbility/components/detail/components/progressLayout/index.tsx
View file @
240c84e8
...
...
@@ -2,7 +2,7 @@
import
React
,
{
useContext
,
useState
}
from
'react'
;
import
{
Radio
,
Steps
}
from
'antd'
;
import
{
Context
}
from
'../context'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
import
style
from
'./index.less'
;
const
LOGSTATESTYPE
=
{
...
...
src/pages/purchaseAbility/components/detail/components/purchaseBidDemandLayout/index.tsx
View file @
240c84e8
...
...
@@ -4,7 +4,7 @@ import { StandardTable } from 'god';
import
StatusTag
from
'@/components/StatusTag'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
import
{
Context
}
from
'../context'
;
import
style
from
'./index.less'
;
import
{
QuestionCircleOutlined
}
from
'@ant-design/icons'
;
...
...
src/pages/purchaseAbility/components/detail/components/recordCommonLayout/index.tsx
View file @
240c84e8
...
...
@@ -8,7 +8,7 @@ import { formatTimeString } from '@/utils'
import
{
Context
}
from
'../context'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
const
LOGSTATESTYPE
=
{
/** 外部流转 */
...
...
src/pages/purchaseAbility/components/detail/components/recordLyout/index.tsx
View file @
240c84e8
...
...
@@ -2,7 +2,7 @@
import
React
,
{
useContext
,
useState
}
from
'react'
;
import
{
Radio
,
Table
}
from
'antd'
;
import
{
Context
}
from
'../context'
;
import
Card
from
'../../../
c
ard'
;
import
Card
from
'../../../
C
ard'
;
import
{
EXTERNALLOGS
,
INTERNALLOGS
,
...
...
src/pages/ruleSettingManage/paySetting/components/modal.tsx
0 → 100644
View file @
240c84e8
import
React
,
{
useCallback
,
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Form
,
Select
,
Input
}
from
'antd'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
{
isEmpty
}
from
'@/components/NiceForm/components/AntUpload/shared'
;
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
ModalLayout
:
React
.
FC
<
ModalProps
>
=
({
payChannel
,
visible
,
value
,
onConfirm
,
onCancel
,
})
=>
{
const
[
form
]
=
Form
.
useForm
();
const
[
channel
,
setChannel
]
=
useState
<
channel
>
([]);
const
handleChannelFind
=
useCallback
(
async
()
=>
{
await
PublicApi
.
getOrderPlatformPaymentParameterChannelFind
({
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
))
{
console
.
log
(
value
)
form
.
setFieldsValue
({
...
value
})
}
},
[
value
])
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
name=
'value'
label=
'参数值'
rules=
{
[{
required
:
true
,
message
:
'请输入参数值'
}]
}
>
<
Input
maxLength=
{
200
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'remark'
label=
'参数描述'
>
<
TextArea
maxLength=
{
200
}
rows=
{
4
}
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
)
}
export
default
ModalLayout
;
src/pages/ruleSettingManage/paySetting/components/payWayRadio.tsx
deleted
100644 → 0
View file @
f161c026
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Space
,
Radio
,
Form
}
from
'antd'
;
import
"../index.less"
;
interface
params
{
name
:
string
,
value
:
number
,
selectId
:
number
,
onChange
:
Function
}
const
PayWayRadio
:
React
.
FC
<
params
>
=
(
props
)
=>
{
const
{
value
,
selectId
,
onChange
,
name
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
useEffect
(()
=>
{
form
.
resetFields
()
},
[
value
])
const
options
=
[{
label
:
'是'
,
value
:
1
},
{
label
:
'否'
,
value
:
0
}]
return
(
<
Space
size=
{
49
}
>
<
span
>
是否开启
{
name
}
</
span
>
<
Form
form=
{
form
}
>
<
Form
.
Item
name=
{
`radio-${selectId}`
}
noStyle
initialValue=
{
value
}
>
<
Radio
.
Group
options=
{
options
}
className=
'radio-group-box'
size=
"small"
buttonStyle=
"solid"
optionType=
"button"
onChange=
{
(
e
)
=>
onChange
(
e
)
}
/>
</
Form
.
Item
>
</
Form
>
</
Space
>
)
}
export
default
PayWayRadio
;
src/pages/ruleSettingManage/paySetting/components/payWayTable.tsx
deleted
100644 → 0
View file @
f161c026
import
React
,
{
useState
}
from
'react'
;
import
{
Table
,
Button
}
from
'antd'
;
import
{
ColumnType
}
from
'antd/lib/table/interface'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
SetUpModal
from
'./setUpModal'
;
interface
payWayTableParams
{
name
?:
string
,
payWayId
?:
number
,
payParametersList
?:
any
,
payParametersListResponses
?:
any
,
visible
?:
boolean
,
onGet
:
Function
,
onType
?:
number
,
onDel
:
Function
,
onEdit
:
Function
,
id
?:
number
}
const
PayWayTable
:
React
.
FC
<
payWayTableParams
>
=
(
props
)
=>
{
const
[
modalvisible
,
setmodalvisible
]
=
useState
<
boolean
>
(
false
);
const
[
type
,
setType
]
=
useState
<
any
>
();
// 1.
const
[
edit
,
setedit
]
=
useState
<
any
>
({});
const
[
modifyIndex
,
setModifyIndex
]
=
useState
<
any
>
(
0
)
const
[
modify
,
setmodify
]
=
useState
<
boolean
>
(
false
);
const
{
name
,
payParametersListResponses
,
payParametersList
,
visible
,
onType
,
onGet
,
onDel
,
onEdit
,
id
,
payWayId
}
=
props
;
const
columns
:
ColumnType
<
any
>
[]
=
[
{
title
:
'参数代码'
,
key
:
'code'
,
dataIndex
:
'code'
},
{
title
:
'参数值'
,
key
:
'value'
,
dataIndex
:
'value'
},
{
title
:
'参数描述'
,
key
:
'describe'
,
dataIndex
:
'describe'
},
{
title
:
'操作'
,
key
:
'options'
,
dataIndex
:
'options'
,
render
:
(
text
:
any
,
record
:
any
,
index
:
number
)
=>
<>
<
Button
type=
'link'
onClick=
{
()
=>
{
setedit
(
record
);
setmodalvisible
(
true
);
setModifyIndex
(
index
);
setmodify
(
true
)
}
}
>
编辑
</
Button
>
<
Button
type=
'link'
onClick=
{
()
=>
onDel
(
record
.
type
,
index
)
}
>
删除
</
Button
>
</>
}
]
const
handleOk
=
(
value
:
any
,
idx
:
number
)
=>
{
let
idType
:
number
=
1
;
switch
(
type
)
{
case
1
:
idType
=
1
break
;
case
2
:
idType
=
3
break
;
case
3
:
idType
=
2
break
;
}
if
(
!
modify
)
{
onGet
(
value
,
idType
)
}
else
{
onEdit
(
value
,
idType
,
modifyIndex
)
}
setedit
({});
setmodalvisible
(
false
);
}
return
(
<>
{
visible
&&
<>
<
div
style=
{
{
borderLeft
:
'2px solid #00B37A'
,
margin
:
'41px 0 8px'
,
padding
:
'1px 5px'
}
}
>
{
name
}
参数配置
</
div
>
<
Table
columns=
{
columns
}
dataSource=
{
payParametersListResponses
}
rowKey=
{
(
record
:
any
,
index
:
any
)
=>
index
}
pagination=
{
false
}
/>
<
Button
style=
{
{
marginBottom
:
16
,
marginTop
:
24
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
setmodalvisible
(
true
);
setType
(
id
);
setmodify
(
false
)
}
}
type=
'dashed'
>
新增参数配置
</
Button
>
{
payWayId
!==
2
&&
<>
<
div
style=
{
{
borderLeft
:
'2px solid #00B37A'
,
margin
:
'41px 0 8px'
,
padding
:
'1px 5px'
}
}
>
{
name
}
转账到银行卡参数配置
</
div
>
<
Table
columns=
{
columns
}
dataSource=
{
payParametersList
}
rowKey=
{
(
record
:
any
,
index
:
any
)
=>
index
}
pagination=
{
false
}
/>
<
Button
style=
{
{
marginBottom
:
16
,
marginTop
:
24
}
}
block
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
{
setmodalvisible
(
true
);
setType
(
3
);
setmodify
(
false
)
}
}
type=
'dashed'
>
新增参数配置
</
Button
>
</>
}
</>
}
<
SetUpModal
onType=
{
onType
}
type=
{
type
}
modalvisible=
{
modalvisible
}
edit=
{
edit
}
onOK=
{
(
value
)
=>
handleOk
(
value
,
type
)
}
onCancel=
{
()
=>
{
setmodalvisible
(
false
);
setedit
({})
}
}
/>
</>
)
}
export
default
PayWayTable
;
src/pages/ruleSettingManage/paySetting/components/setUpModal.tsx
deleted
100644 → 0
View file @
f161c026
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Modal
,
Form
,
Select
,
Input
}
from
'antd'
;
import
usePayTypeEnum
from
'./usePayTypeEnum'
;
const
{
Option
}
=
Select
;
const
{
TextArea
}
=
Input
;
interface
setUpModalParams
{
type
?:
number
,
modalvisible
?:
boolean
,
onOK
:
Function
,
onCancel
:
Function
,
onType
?:
number
,
edit
?:
any
}
const
layout
:
any
=
{
colon
:
false
,
labelCol
:
{
style
:
{
width
:
'100px'
}
},
labelAlign
:
"left"
};
const
SetUpModal
:
React
.
FC
<
setUpModalParams
>
=
(
props
)
=>
{
const
[
form
]
=
Form
.
useForm
();
const
{
payTypeEnum
}
=
usePayTypeEnum
();
const
{
modalvisible
,
onOK
,
onCancel
,
type
,
edit
}
=
props
;
const
[
option
,
setOption
]
=
useState
<
any
>
({})
const
handleOk
=
()
=>
{
form
.
validateFields
().
then
(
res
=>
{
console
.
log
(
type
)
let
idType
:
number
=
1
;
switch
(
type
)
{
case
1
:
idType
=
1
break
;
case
2
:
idType
=
3
break
;
case
3
:
idType
=
2
break
;
}
const
obj
=
{
id
:
edit
.
id
?
edit
.
id
:
undefined
,
code
:
option
.
children
?
option
.
children
:
edit
.
code
,
value
:
res
.
value
,
describe
:
res
.
describe
,
type
:
idType
,
payWayCodeTypeEnum
:
res
.
code
}
onOK
(
obj
)
form
.
resetFields
();
}).
catch
(
error
=>
{
console
.
log
(
error
)
})
}
const
handleChange
=
(
e
:
any
,
option
:
any
)
=>
{
setOption
(
option
)
}
useEffect
(()
=>
{
if
(
Object
.
keys
(
edit
).
length
>
0
)
{
console
.
log
(
edit
,
10086
)
form
.
setFieldsValue
({
code
:
edit
.
payWayCodeTypeEnum
,
value
:
edit
.
value
,
describe
:
edit
.
describe
})
}
},
[
edit
])
return
(
<
Modal
width=
{
576
}
title=
'新增参数配置'
visible=
{
modalvisible
}
onOk=
{
handleOk
}
onCancel=
{
()
=>
{
onCancel
();
form
.
resetFields
();
}
}
>
<
Form
form=
{
form
}
{
...
layout
}
>
<
Form
.
Item
name=
'code'
label=
'参数代码'
rules=
{
[{
required
:
true
,
message
:
'请选择参数代码'
}]
}
>
<
Select
onChange=
{
handleChange
}
>
{
payTypeEnum
.
map
(
item
=>
(
<
Option
key=
{
item
.
value
}
payWayCodeTypeEnum=
{
item
.
value
}
value=
{
item
.
value
}
>
{
item
.
label
}
</
Option
>
))
}
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
name=
'value'
label=
'参数值'
rules=
{
[{
required
:
true
,
message
:
'请输入参数值'
}]
}
>
<
Input
maxLength=
{
200
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
'describe'
label=
'参数描述'
>
<
TextArea
maxLength=
{
200
}
rows=
{
4
}
/>
</
Form
.
Item
>
</
Form
>
</
Modal
>
)
}
export
default
SetUpModal
;
src/pages/ruleSettingManage/paySetting/components/usePayTypeEnum.ts
deleted
100644 → 0
View file @
f161c026
import
{
PublicApi
}
from
'@/services/api'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
const
usePayTypeEnum
=
()
=>
{
const
[
payTypeEnum
,
setPayTypeEnum
]
=
useState
<
any
>
([])
const
ref
=
useRef
(
payTypeEnum
);
useEffect
(()
=>
{
const
getPayWayType
=
async
()
=>
{
await
PublicApi
.
getPayGetPayWayCodeTypeEnum
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
const
{
data
}
=
res
;
const
payWay
:
any
[]
=
[]
data
.
forEach
(
v
=>
{
payWay
.
push
({
label
:
v
.
name
,
value
:
v
.
type
})
})
ref
.
current
=
payWay
setPayTypeEnum
(
ref
.
current
)
}
})
}
getPayWayType
();
},[])
return
{
payTypeEnum
};
}
export
default
usePayTypeEnum
;
src/pages/ruleSettingManage/paySetting/index.less
View file @
240c84e8
.radio-group-box {
.ant-radio-button-wrapper {
width: 80px !important;
text-align: center;
.tabsLayout {
:global {
.ant-tabs-top > .ant-tabs-nav::before, .ant-tabs-top > div > .ant-tabs-nav::before {
border-bottom: none;
}
.ant-tabs-tab {
border-radius: 4px;
border: 1px solid #EDEEEF;
margin: 0px 16px 0px 0px;
padding: 6px 16px;
}
.ant-tabs-tab-btn {
height: 18px;
}
.ant-tabs-tab-active {
border-radius: 4px;
border: 1px solid #00B37A;
}
.ant-tabs-ink-bar {
display: none;
}
.ant-radio-group {
.ant-radio-button-wrapper {
width: 80px !important;
text-align: center;
}
}
.ant-space-item {
display: flex;
align-items: center;
}
}
.anchor {
color: #909399;
font-size: 14px;
position: relative;
padding-left: 6px;
margin-bottom: 16px;
&::after {
content: '';
height: 14px;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
margin: auto;
border-left: 2px solid @main-color;
transform: scaleY(1);
opacity: 1;
transition: transform .15s cubic-bezier(.645,.045,.355,1),opacity .15s cubic-bezier(.645,.045,.355,1);
}
}
}
src/pages/ruleSettingManage/paySetting/index.tsx
View file @
240c84e8
This diff is collapsed.
Click to expand it.
src/pages/ruleSettingManage/paySetting/paySetting.tsx
deleted
100644 → 0
View file @
f161c026
src/pages/ruleSettingManage/paySetting/settingIndex.tsx
deleted
100644 → 0
View file @
f161c026
/*
* @Author: HJX
* @Date: 2020-11-19 15:25:54
* @LastEditors: HJX
* @LastEditTime: 2020-11-19 15:25:54
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
history
}
from
'umi'
;
import
{
Button
,
Card
,
Tabs
,
Space
,
Input
,
InputNumber
,
message
}
from
'antd'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
PublicApi
}
from
'@/services/api'
;
import
PayWayRadio
from
'./components/payWayRadio'
;
import
PayWayTable
from
'./components/payWayTable'
;
const
{
TabPane
}
=
Tabs
const
PayWaySetTemplate
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
config
,
setconfig
]
=
useState
<
any
>
([]);
const
[
payItem
,
setPayItem
]
=
useState
<
any
>
([]);
// const [step, setStep] = useState<Array<number>>([]);
const
[
obj
,
setObj
]
=
useState
<
any
>
({});
const
payWayConfigInfo
=
()
=>
{
// 支付配置信息
return
new
Promise
(
resolve
=>
{
PublicApi
.
getPayQueryPlatformDetails
().
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
resolve
(
res
.
data
)
}
})
})
}
useEffect
(()
=>
{
// 支付配置信息
payWayConfigInfo
().
then
((
res
:
any
)
=>
{
const
arr
:
any
[]
=
[];
console
.
log
(
res
)
res
.
forEach
((
item
:
any
)
=>
{
arr
.
push
({
id
:
item
.
id
,
way
:
item
.
way
,
payWayId
:
item
.
payWayId
,
isPitchOn
:
item
.
isPitchOn
?
item
.
isPitchOn
:
0
,
payType
:
item
.
payType
,
payParametersList
:
item
.
payParametersList
?
item
.
payParametersList
:
[],
payParametersAddListRequests
:
item
.
payParametersListResponses
?
item
.
payParametersListResponses
:
[]
})
})
setconfig
([...
res
]);
setPayItem
([...
arr
]);
})
},
[])
const
onChangeRaido
=
(
e
:
any
,
index
:
number
)
=>
{
const
data
=
[...
payItem
];
payItem
[
index
].
isPitchOn
=
e
.
target
.
value
;
setPayItem
(
data
);
}
const
onGet
=
(
value
:
any
,
type
:
number
,
idx
:
number
)
=>
{
console
.
log
(
value
,
type
)
const
data
=
[...
payItem
];
if
(
type
===
2
)
{
data
[
idx
].
payParametersList
=
[...
data
[
idx
].
payParametersList
,
value
]
}
else
{
data
[
idx
].
payParametersAddListRequests
=
[...
data
[
idx
].
payParametersAddListRequests
,
value
]
}
setPayItem
(
data
);
}
/**删除 */
const
onDel
=
(
value
:
any
,
index
:
number
,
idx
:
number
)
=>
{
console
.
log
(
value
,
index
,
idx
,
10086
)
const
data
=
[...
payItem
];
if
(
Number
(
value
)
===
2
)
{
data
[
idx
].
payParametersList
.
splice
(
index
,
1
);
data
[
idx
].
payParametersList
=
[...
data
[
idx
].
payParametersList
]
}
else
{
data
[
idx
].
payParametersAddListRequests
.
splice
(
index
,
1
);
data
[
idx
].
payParametersAddListRequests
=
[...
data
[
idx
].
payParametersAddListRequests
]
}
setPayItem
([...
data
]);
}
/**编辑 */
const
onEdit
=
(
value
:
any
,
type
:
number
,
index
:
number
,
idx
:
number
)
=>
{
console
.
log
(
value
,
type
,
index
,
idx
)
const
data
=
[...
payItem
];
if
(
type
===
2
)
{
data
[
idx
].
payParametersList
[
index
]
=
{
...
value
};
data
[
idx
].
payParametersList
=
[...
data
[
idx
].
payParametersList
]
}
else
{
data
[
idx
].
payParametersAddListRequests
[
index
]
=
{
...
value
};
data
[
idx
].
payParametersAddListRequests
=
[...
data
[
idx
].
payParametersAddListRequests
]
}
console
.
log
(
data
,
10086
)
setPayItem
(
data
);
}
/**保存更新 */
const
onHnadleSubmit
=
()
=>
{
let
conditions
=
false
;
let
wayName
=
''
;
try
{
payItem
.
forEach
(
item
=>
{
if
(
item
.
payWayId
===
2
&&
item
.
isPitchOn
===
1
)
{
console
.
log
(
1
)
if
(
item
.
payParametersAddListRequests
.
length
>
0
)
{
conditions
=
true
}
else
{
conditions
=
false
wayName
=
`
${
item
.
way
}
缺少支付参数配置`
throw
new
Error
}
}
else
if
(
item
.
payWayId
===
1
&&
item
.
isPitchOn
===
1
)
{
if
(
item
.
payParametersAddListRequests
.
length
>
0
&&
item
.
payParametersList
.
length
>
0
)
{
conditions
=
true
}
else
{
conditions
=
false
wayName
=
`
${
item
.
way
}
缺少支付参数配置`
throw
new
Error
}
}
else
if
(
item
.
payWayId
===
6
&&
item
.
isPitchOn
===
1
)
{
if
(
item
.
payParametersAddListRequests
.
length
>
0
)
{
const
data
=
item
.
payParametersAddListRequests
[
0
]
if
(
data
.
code
&&
data
.
value
&&
data
.
describe
)
{
conditions
=
true
}
else
{
conditions
=
false
wayName
=
`请配置
${
item
.
way
}
的参数`
throw
new
Error
}
}
}
else
{
conditions
=
true
}
})
}
catch
{
message
.
error
(
wayName
)
}
if
(
conditions
)
{
PublicApi
.
postPayCollectionParametersAdd
({
platformPayWays
:
payItem
}).
then
(
res
=>
{
if
(
res
.
code
===
1000
)
{
history
.
push
(
'/ruleSettingManager/paySetting'
)
}
})
}
}
/** */
const
handleBlur
=
(
e
,
name
,
idx
)
=>
{
const
data
=
[...
payItem
]
const
payParametersAddListRequests
=
data
[
idx
].
payParametersAddListRequests
;
if
(
payParametersAddListRequests
.
length
===
0
)
{
payParametersAddListRequests
.
push
({
code
:
''
,
value
:
''
,
describe
:
''
})
}
payParametersAddListRequests
.
map
(
item
=>
{
for
(
let
key
in
item
)
{
if
(
key
===
name
)
{
if
(
name
===
'value'
)
{
item
[
key
]
=
e
}
else
{
item
[
key
]
=
e
.
target
.
value
}
}
else
{
if
(
name
===
'value'
)
{
item
[
name
]
=
e
}
else
{
item
[
name
]
=
e
.
target
.
value
}
}
}
item
.
type
=
6
;
})
data
[
idx
].
payParametersAddListRequests
=
[...
payParametersAddListRequests
]
console
.
log
(
payParametersAddListRequests
,
10086
)
setPayItem
(
data
)
}
return
(
<
PageHeaderWrapper
extra=
{
<
Button
type=
'primary'
onClick=
{
onHnadleSubmit
}
>
保存
</
Button
>
}
>
<
Card
>
<
Tabs
type=
"card"
>
{
config
.
map
((
item
:
any
,
idx
:
number
)
=>
<
TabPane
tab=
{
item
.
way
}
key=
{
item
.
id
}
forceRender
>
<>
{
payItem
.
length
>
0
&&
<>
<
PayWayRadio
name=
{
payItem
[
idx
].
way
}
value=
{
payItem
[
idx
].
isPitchOn
}
selectId=
{
payItem
[
idx
].
id
}
onChange=
{
(
value
)
=>
onChangeRaido
(
value
,
idx
)
}
/>
{
(
payItem
[
idx
].
payWayId
===
1
||
payItem
[
idx
].
payWayId
===
2
)
&&
<
PayWayTable
id=
{
payItem
[
idx
].
id
}
payWayId=
{
payItem
[
idx
].
payWayId
}
onType=
{
payItem
[
idx
].
payType
}
name=
{
payItem
[
idx
].
way
}
payParametersList=
{
payItem
[
idx
].
payParametersList
}
payParametersListResponses=
{
payItem
[
idx
].
payParametersAddListRequests
}
visible=
{
!!
payItem
[
idx
].
isPitchOn
}
onGet=
{
(
value
,
t
)
=>
onGet
(
value
,
t
,
idx
)
}
onDel=
{
(
value
,
index
)
=>
onDel
(
value
,
index
,
idx
)
}
onEdit=
{
(
value
,
type
,
index
)
=>
onEdit
(
value
,
type
,
index
,
idx
)
}
/>
}
{
(
payItem
[
idx
].
payWayId
===
6
&&
!!
payItem
[
idx
].
isPitchOn
)
&&
<
div
style=
{
{
marginTop
:
42
}
}
>
<
Space
direction=
"horizontal"
size=
{
16
}
>
初始申请额度不超过
<
Input
onChange=
{
(
e
)
=>
handleBlur
(
e
,
'code'
,
idx
)
}
value=
{
payItem
[
idx
].
payParametersAddListRequests
.
length
>
0
?
payItem
[
idx
].
payParametersAddListRequests
[
0
].
code
:
undefined
}
addonBefore=
"¥"
/>
允许满
<
InputNumber
min=
{
1
}
onChange=
{
(
e
)
=>
handleBlur
(
e
,
'value'
,
idx
)
}
value=
{
payItem
[
idx
].
payParametersAddListRequests
.
length
>
0
?
payItem
[
idx
].
payParametersAddListRequests
[
0
].
value
:
undefined
}
/>
天后申请上调
<
Input
onChange=
{
(
e
)
=>
handleBlur
(
e
,
'describe'
,
idx
)
}
value=
{
payItem
[
idx
].
payParametersAddListRequests
.
length
>
0
?
payItem
[
idx
].
payParametersAddListRequests
[
0
].
describe
:
undefined
}
addonAfter=
"%"
/>
</
Space
>
</
div
>
}
</>
}
</>
</
TabPane
>
)
}
</
Tabs
>
</
Card
>
</
PageHeaderWrapper
>
)
};
export
default
PayWaySetTemplate
;
src/pages/ruleSettingManage/payStrategy/index.tsx
View file @
240c84e8
...
...
@@ -88,7 +88,7 @@ const List: React.FC<{}> = () => {
<
Card
>
<
StandardTable
currentRef=
{
ref
}
tableProps=
{
{
rowKey
:
'
i
d'
}
}
tableProps=
{
{
rowKey
:
'
paymentI
d'
}
}
columns=
{
columns
}
fetchTableData=
{
(
params
:
any
)
=>
fetchData
(
params
)
}
formilyLayouts=
{
{
...
...
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