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
shenshaokai
jinfa-platform
Commits
d4b0b7e2
Commit
d4b0b7e2
authored
Mar 10, 2022
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改翻译以及修改首页启动多用户时隐藏平台结算、积分结算
parent
8a9e9841
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
59 additions
and
212 deletions
+59
-212
balance.ts
src/locales/en-US/balance.ts
+8
-1
balance.ts
src/locales/ko-KR/balance.ts
+7
-2
balance.ts
src/locales/zh-CN/balance.ts
+7
-1
index.tsx
src/pages/balance/components/SettleMethod/index.tsx
+4
-18
settleMethod.tsx
src/pages/balance/components/SettleMethod/settleMethod.tsx
+1
-60
info.tsx
src/pages/balance/settleRules/memberSettle/info.tsx
+17
-7
index.tsx
src/pages/balance/settleRules/memberSettle/schema/index.tsx
+2
-115
SettlementCenter.tsx
src/pages/home/components/Centers/SettlementCenter.tsx
+11
-6
auth.ts
src/utils/auth.ts
+2
-2
No files found.
src/locales/en-US/balance.ts
View file @
d4b0b7e2
...
...
@@ -873,5 +873,12 @@ export default {
'balance.businessRequestFundsCollaboration.detail.columns.writeOffAmount'
:
'Write off amount'
,
'balance.businessRequestFundsCollaboration.detail.columns.canWriteOffAmount'
:
'Write off amount'
,
'balance.shouldUploadPaymentFile'
:
'Please upload payment voucher'
,
'balance.business.shouldConfigAccount'
:
'The payment voucher shall be submitted after the merchant completes the configuration of corporate account'
'balance.business.shouldConfigAccount'
:
'The payment voucher shall be submitted after the merchant completes the configuration of corporate account'
,
'balance.memberSettle.add'
:
'add member strategy'
,
'balance.memberSettle.edit'
:
'edit member strategy'
,
'balance.memberSettle.view'
:
'view member strategy'
,
'balance.memberSettle.settleMethod.payDayValidate'
:
'Payment date must be numeric and must be between 1-31'
,
'balance.memberSettle.settleMethod.payDay'
:
'payDay / Mon'
,
'balance.memberSettle.settleMethod.payDay.info'
:
'Payment date: monthly {data}'
,
}
src/locales/ko-KR/balance.ts
View file @
d4b0b7e2
...
...
@@ -873,6 +873,11 @@ export default {
'balance.businessRequestFundsCollaboration.detail.columns.writeOffAmount'
:
'금액을 심사하여 결산하다.'
,
'balance.businessRequestFundsCollaboration.detail.columns.canWriteOffAmount'
:
'청구 가능 금액'
,
'balance.shouldUploadPaymentFile'
:
'지불 증명서를 업로드해 주십시오'
,
'balance.business.shouldConfigAccount'
:
'상인이 공계정 설정을 완성한 후에 지불 증명서를 제출한다'
'balance.business.shouldConfigAccount'
:
'상인이 공계정 설정을 완성한 후에 지불 증명서를 제출한다'
,
'balance.memberSettle.add'
:
'신규 회원 전략'
,
'balance.memberSettle.edit'
:
'회원 정책 편집'
,
'balance.memberSettle.view'
:
'회원 정책 보기'
,
'balance.memberSettle.settleMethod.payDayValidate'
:
'결제일은 숫자여야 하며 1-31 사이여야 합니다.'
,
'balance.memberSettle.settleMethod.payDay'
:
'매월 지불일'
,
'balance.memberSettle.settleMethod.payDay.info'
:
'지불일: 매월 {data}번'
,
}
src/locales/zh-CN/balance.ts
View file @
d4b0b7e2
...
...
@@ -875,5 +875,11 @@ export default {
'balance.accountsReceivable.settlementList.schema.schema.payStartTime'
:
'实付开始时间'
,
'balance.accountsReceivable.settlementList.schema.schema.payEndTime'
:
'实付结束时间'
,
'balance.shouldUploadPaymentFile'
:
'请上传付款凭证'
,
'balance.business.shouldConfigAccount'
:
'待商家完成对公账号配置,再提交付款凭证'
'balance.business.shouldConfigAccount'
:
'待商家完成对公账号配置,再提交付款凭证'
,
'balance.memberSettle.add'
:
'新增会员策略'
,
'balance.memberSettle.edit'
:
'编辑会员策略'
,
'balance.memberSettle.view'
:
'查看会员策略'
,
'balance.memberSettle.settleMethod.payDayValidate'
:
'付款日必须为数字且必须在1-31之间'
,
'balance.memberSettle.settleMethod.payDay'
:
'每月付款日'
,
'balance.memberSettle.settleMethod.payDay.info'
:
'付款日:每月{data}号'
}
src/pages/balance/components/SettleMethod/index.tsx
View file @
d4b0b7e2
...
...
@@ -23,8 +23,8 @@ registerValidationRules({
?
getIntl
().
formatMessage
({
id
:
'balance.components.settleMethod.registerValidationRules.1'
})
:
''
}
if
(
!
isNumber
.
test
(
payDay
)
||
((
payDay
<
0
||
payDay
>
31
)
||
pattern
.
test
(
payDay
)))
{
return
"付款日必须为数字且必须在1-31之间"
if
(
payDay
&&
(
!
isNumber
.
test
(
payDay
)
||
((
payDay
<
0
||
payDay
>
31
)
||
pattern
.
test
(
payDay
)
)))
{
return
getIntl
().
formatMessage
({
id
:
'balance.memberSettle.settleMethod.payDayValidate'
,
defaultMessage
:
'付款日必须为数字且必须在1-31之间'
})
}
return
!
isNumber
.
test
(
otherValues
[
0
])
||
pattern
.
test
(
otherValues
[
0
])
...
...
@@ -64,21 +64,6 @@ const Index: React.FC<Iprops> & { isFieldComponent: boolean } = (props: Iprops)
const
intl
=
useIntl
();
// // 默认选择
// useEffect(() => {
// // const componentProps = props.props['x-component-props'] || {};
// const defaultValue = componentProps.default || {};
// console.log("hhahah")
// if (!options?.days && !options?.month) {
// return
// }
// if (typeof props.initialValue == 'undefined' || props.initialValue === null) {
// props.mutators.change(defaultValue)
// } else {
// props.mutators.change(props.initialValue)
// }
// }, [props.initialValue, options])
const
onChange
=
(
value
)
=>
{
props
.
mutators
.
change
(
value
);
}
...
...
@@ -91,7 +76,8 @@ const Index: React.FC<Iprops> & { isFieldComponent: boolean } = (props: Iprops)
?
intl
.
formatMessage
({
id
:
'balance.components.settleMethod.index.1'
},
{
data
:
value
.
otherValues
[
0
]
})
:
intl
.
formatMessage
({
id
:
'balance.components.settleMethod.index.2'
},
{
data
:
value
.
otherValues
[
1
]
})
}
<
p
>
付款日: 每月
{
value
.
payDay
}
号
</
p
>
<
p
>
{
intl
.
formatMessage
({
id
:
'balance.memberSettle.settleMethod.payDay.info'
,
defaultMessage
:
`付款日: 每月${value.payDay}号`
},
{
data
:
value
.
payDay
})
}
</
p
>
</
div
>
)
}
...
...
src/pages/balance/components/SettleMethod/settleMethod.tsx
View file @
d4b0b7e2
...
...
@@ -124,7 +124,7 @@ const SettleMethod: React.FC<Iprops> = (props: Iprops) => {
</
div
>
<
div
className=
{
styles
.
sectionItem
}
>
<
div
className=
{
styles
.
label
}
>
每月付款日:
{
intl
.
formatMessage
({
id
:
'balance.memberSettle.settleMethod.payDay'
,
defaultMessage
:
'每月付款日'
})
}
</
div
>
<
div
className=
{
styles
.
input
}
>
<
Input
addonAfter=
{
intl
.
formatMessage
({
id
:
'balance.components.settleMethod.days.2.addonAfter'
})
}
value=
{
payDay
}
onChange=
{
handlePayDayChange
}
/>
...
...
@@ -140,64 +140,6 @@ const SettleMethod: React.FC<Iprops> = (props: Iprops) => {
</
div
>
</
div
>
)
// return (
// <div>
// <div>
// <div className={styles.radiosContainer}>
// {
// daysVisible && (
// <div className={styles.dayRadio}>
// <Radio name="method" checked={active == DAY} onChange={(e) => handleChange(e, DAY)}>{intl.formatMessage({ id: 'balance.components.settleMethod.method.1' })}</Radio>
// <Tooltip title={intl.formatMessage({ id: 'balance.components.settleMethod.method.1.tooltip' })}>
// <QuestionCircleOutlined />
// </Tooltip>
// </div>
// ) || null
// }
// {
// monthVisible && (
// <div>
// <Radio name="method" checked={active == MONTH} onChange={(e) => handleChange(e, MONTH)}>{intl.formatMessage({ id: 'balance.components.settleMethod.method.2' })}</Radio>
// <Tooltip title={intl.formatMessage({ id: 'balance.components.settleMethod.method.2.tooltip' })}>
// <QuestionCircleOutlined />
// </Tooltip>
// </div>
// ) || null
// }
// </div>
// <div className={styles.values}>
// {
// active === DAY
// ? <div className={styles.days}>
// <div style={{margin: '0 20px 0 0px'}}>{intl.formatMessage({ id: 'balance.components.settleMethod.days.1' })}</div>
// <div>
// <Input
// addonAfter={intl.formatMessage({ id: 'balance.components.settleMethod.days.1.addonAfter' })}
// value={otherValues[0]}
// onChange={(e) => handleInputChange(e.target.value, DAY)}
// disabled={active !== DAY}
// style={{width: '160px'}}
// /></div>
// </div>
// : <div className={styles.days}>
// <div style={{marginRight: '20px'}}>{intl.formatMessage({ id: 'balance.components.settleMethod.days.2' })}</div>
// <div>
// <Input
// // addonAfter={"号"}
// addonAfter={intl.formatMessage({ id: 'balance.components.settleMethod.days.2.addonAfter' })}
// style={{width: '160px'}}
// value={otherValues[1]}
// onChange={(e) => handleInputChange(e.target.value, MONTH)}
// disabled={active !== MONTH}
// />
// </div>
// </div>
// }
// </div>
// </div>
// </div>
// )
}
export
default
SettleMethod
\ No newline at end of file
src/pages/balance/settleRules/memberSettle/info.tsx
View file @
d4b0b7e2
...
...
@@ -22,15 +22,15 @@ import { useStateFilterSearchLinkageEffect } from '@/formSchema/effects/useFilte
import
{
FORM_FILTER_PATH
}
from
'@/formSchema/const'
;
import
{
getOrderPlatformSettlementCategoryList
}
from
'@/services/OrderNewV2Api'
;
const
intl
=
getIntl
();
//
const intl = getIntl();
const
anchorColumn
=
[
{
key
:
'basicInfo'
,
name
:
'基本信息'
,
name
:
getIntl
().
formatMessage
({
id
:
'balance.settleRules.memberSettle.info.schema.addSchema.basicTab'
,
defaultMessage
:
'基本信息'
})
,
},
{
key
:
'member'
,
name
:
'适用会员'
,
name
:
getIntl
().
formatMessage
({
id
:
'balance.settleRules.memberSettle.info.schema.addSchema.memberTab'
,
defaultMessage
:
'适用会员'
})
,
}
]
...
...
@@ -252,12 +252,13 @@ const Info = () => {
const
renderTitle
=
()
=>
{
if
(
isAdd
)
{
return
"新增会员策略"
return
intl
.
formatMessage
({
id
:
'balance.memberSettle.add'
,
defaultMessage
:
'新增会员策略'
})
}
if
(
isEdit
)
{
return
"编辑会员策略"
return
intl
.
formatMessage
({
id
:
'balance.memberSettle.edit'
,
defaultMessage
:
'编辑会员策略'
})
}
return
"查看会员策略"
return
intl
.
formatMessage
({
id
:
'balance.memberSettle.view'
,
defaultMessage
:
'查看会员策略'
})
}
return
(
...
...
@@ -278,7 +279,16 @@ const Info = () => {
<
NiceForm
editable=
{
isAdd
||
isEdit
}
actions=
{
formActions
}
initialValues=
{
initialValue
}
initialValues=
{
isAdd
?
{
settlementWay
:
{
active
:
1
,
otherValues
:
[
30
,
1
],
payDay
:
null
}
}
:
initialValue
}
expressionScope=
{
{
tableAddButton
:
tableAddButton
(),
tableColumns
:
columns
...
...
src/pages/balance/settleRules/memberSettle/schema/index.tsx
View file @
d4b0b7e2
...
...
@@ -52,119 +52,6 @@ export const indexSchema = {
*
*/
export
const
addSchema
=
{
type
:
'object'
,
properties
:
{
'Tabs'
:
{
type
:
'object'
,
'x-component'
:
'tab'
,
'x-component-props'
:
{
type
:
'card'
},
properties
:
{
basicTab
:
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component-props'
:
{
tab
:
intl
.
formatMessage
({
id
:
'balance.settleRules.memberSettle.info.schema.addSchema.basicTab'
})
},
properties
:
{
layout
:
{
type
:
'object'
,
'x-component'
:
'mega-layout'
,
'x-component-props'
:
{
labelCol
:
4
,
wrapperCol
:
9
,
labelAlign
:
'left'
},
properties
:
{
name
:
{
title
:
intl
.
formatMessage
({
id
:
'balance.settleRules.memberSettle.info.schema.addSchema.basicTab.name'
}),
type
:
'string'
,
'x-rules'
:
[
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'balance.settleRules.memberSettle.info.schema.addSchema.basicTab.name.message'
})
},
{
limitByte
:
true
,
maxByte
:
48
,
}
]
},
settlementWay
:
{
title
:
intl
.
formatMessage
({
id
:
'balance.settleRules.memberSettle.info.schema.addSchema.basicTab.settlementWay'
}),
'x-component'
:
'SettleMethod'
,
'x-rules'
:
[
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'balance.settleRules.memberSettle.info.schema.addSchema.basicTab.settlementWay.message'
})
},
{
settleMethodRule
:
true
}
],
'x-component-props'
:
{
// options: {
// days: true,
// month: false
// },
default
:
{
active
:
1
,
otherValues
:
[
30
,
1
]
}
}
},
settlementOrderType
:
{
type
:
'string'
,
enum
:
[],
title
:
intl
.
formatMessage
({
id
:
'balance.settleRules.memberSettle.info.schema.addSchema.basicTab.settlementOrderType'
}),
'x-rules'
:
[
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'balance.settleRules.memberSettle.info.schema.addSchema.basicTab.settlementOrderType.message'
})
},
]
},
settlementPaymentType
:
{
type
:
'string'
,
enum
:
[],
title
:
intl
.
formatMessage
({
id
:
'balance.jiesuanzhifufangshi'
}),
'x-rules'
:
[
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'balance.qingtianxiejiesuanzhifufang'
})},
]
}
},
}
}
},
memberTab
:
{
type
:
'object'
,
'x-component'
:
'tabpane'
,
'x-component-props'
:
{
tab
:
intl
.
formatMessage
({
id
:
'balance.settleRules.memberSettle.info.schema.addSchema.memberTab'
})
},
properties
:
{
someLists
:
{
type
:
'array:number'
,
'x-mega-props'
:
{
wrapperCol
:
24
,
},
'x-component'
:
'MultTable'
,
'x-component-props'
:
{
rowKey
:
'uniqueId'
,
prefix
:
"{{tableAddButton}}"
,
columns
:
"{{tableColumns}}"
// columns: "{{tableColumns}}",
},
'x-rules'
:
[
{
required
:
true
,
message
:
intl
.
formatMessage
({
id
:
'balance.settleRules.memberSettle.info.schema.addSchema.memberTab.someLists'
})
}
]
}
}
}
}
}
}
}
export
const
memberSchema
=
{
type
:
'object'
,
properties
:
{
...
...
@@ -221,7 +108,7 @@ export const infoSchema: ISchema = {
type
:
'object'
,
'x-component'
:
'MellowCardBox'
,
'x-component-props'
:
{
title
:
'基本信息'
,
title
:
intl
.
formatMessage
({
id
:
'balance.settleRules.memberSettle.info.schema.addSchema.basicTab'
,
defaultMessage
:
'基本信息'
})
,
},
properties
:
{
layout
:
{
...
...
@@ -322,7 +209,7 @@ export const infoSchema: ISchema = {
type
:
'object'
,
'x-component'
:
'MellowCardBox'
,
'x-component-props'
:
{
title
:
'适用会员'
,
title
:
intl
.
formatMessage
({
id
:
'balance.settleRules.memberSettle.info.schema.addSchema.memberTab'
,
defaultMessage
:
'适用会员'
})
,
style
:
{
marginTop
:
'12px'
,
}
...
...
src/pages/home/components/Centers/SettlementCenter.tsx
View file @
d4b0b7e2
...
...
@@ -32,21 +32,22 @@ const SettlementCenter: React.FC<Iprops> = () => {
const
intl
=
useIntl
();
const
{
hasAbilityFunc
,
userAuth
}
=
useGetAuth
();
const
hasAbility
=
hasAbilityFunc
(
'balance'
);
const
enableMultiTenancy
=
getEnableMultiTenancy
(
)
const
enableMultiTenancy
=
useMemo
(()
=>
getEnableMultiTenancy
(),
[]
)
/** 如果开启了多用户, 那么过滤掉平台积分结算, 平台代收账款结算 */
const
tagsList
=
useMemo
(()
=>
{
return
[
{
icon
:
settlement_platformCollection
,
title
:
intl
.
formatMessage
({
id
:
'home.settlementCenter.title1'
}),
url
:
'/memberCenter/balance/platformSettlement/accountReceivable'
,
enableMulti
:
enableMultiTenancy
enableMulti
:
enableMultiTenancy
??
false
},
{
icon
:
settlement_integrate
,
title
:
intl
.
formatMessage
({
id
:
'home.settlementCenter.title2'
}),
url
:
'/memberCenter/balance/platformSettlement/integral'
,
enableMulti
:
enableMultiTenancy
enableMulti
:
enableMultiTenancy
??
false
},
{
icon
:
settlement_accountReceive
,
...
...
@@ -67,10 +68,10 @@ const SettlementCenter: React.FC<Iprops> = () => {
enableMulti
:
false
}
].
filter
((
_item
)
=>
userAuth
.
urls
?.
includes
(
_item
.
url
))
].
filter
((
_item
)
=>
userAuth
.
urls
?.
includes
(
_item
.
url
)
&&
!
_item
.
enableMulti
)
},
[
userAuth
])
/** @review
就离谱,
搜索状态值拼接到链接上,后端不做交给了前端。坑啊 */
/** @review 搜索状态值拼接到链接上,后端不做交给了前端。坑啊 */
const
withParamsList
=
useMemo
(()
=>
{
const
status
=
{
"待对账"
:
"status=1"
,
...
...
@@ -90,6 +91,10 @@ const SettlementCenter: React.FC<Iprops> = () => {
},
[])
const
withSearchStatusData
=
useMemo
(()
=>
withQueryParams
(
withParamsList
),
[
withQueryParams
,
withParamsList
]);
/** 如果开启了多用户, 那么过滤掉平台积分结算, 平台代收账款结算 */
const
filterMultiTenancy
=
enableMultiTenancy
?
{
payableList
:
withSearchStatusData
[
'payableList'
],
receivableList
:
withSearchStatusData
[
'receivableList'
]
}
:
withSearchStatusData
return
(
<
Layout
hasAuth=
{
hasAbility
}
...
...
@@ -101,7 +106,7 @@ const SettlementCenter: React.FC<Iprops> = () => {
>
<>
<
Layout
.
Tag
tagList=
{
tagsList
}
/>
<
Layout
.
StaticsDataList
title=
{
KEY_TITLE
}
dataSource=
{
withSearchStatusData
}
/>
<
Layout
.
StaticsDataList
title=
{
KEY_TITLE
}
dataSource=
{
filterMultiTenancy
}
/>
</>
</
Layout
>
)
...
...
src/utils/auth.ts
View file @
d4b0b7e2
...
...
@@ -107,9 +107,9 @@ export const removeEnableMultiTenancy = () => {
export
const
getEnableMultiTenancy
=
()
=>
{
try
{
const
enableMultiTenancy
=
JSON
.
parse
(
window
.
localStorage
.
getItem
(
"SITE"
))
return
(
enableMultiTenancy
||
{}
)
as
boolean
return
(
enableMultiTenancy
??
false
)
as
boolean
}
catch
(
error
)
{
return
null
as
boolean
return
false
as
boolean
}
}
...
...
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