Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄庭坚
jinfa-platform
Commits
753056c2
Commit
753056c2
authored
Jan 14, 2022
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改结算bug 以及装修列表筛选条件bug
parent
6ed8575b
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
71 additions
and
26 deletions
+71
-26
index.tsx
src/pages/balance/components/SettleMethod/index.tsx
+6
-2
index.tsx
...es/balance/platformSettlement/accountReceivable/index.tsx
+9
-2
index.less
src/pages/balance/settleRules/memberSettle/index.less
+8
-0
index.tsx
src/pages/balance/settleRules/memberSettle/index.tsx
+3
-6
info.tsx
src/pages/balance/settleRules/memberSettle/info.tsx
+10
-7
index.tsx
...anagement/activePage/components/FormilyCheckBox/index.tsx
+19
-2
index.tsx
...esManagement/activePage/components/SearchPannel/index.tsx
+2
-2
schema.tsx
...sManagement/activePage/components/SearchPannel/schema.tsx
+8
-2
index.tsx
...bility/marketingActivitiesManagement/activePage/index.tsx
+5
-2
request.ts
src/utils/request.ts
+1
-1
No files found.
src/pages/balance/components/SettleMethod/index.tsx
View file @
753056c2
...
...
@@ -19,10 +19,14 @@ registerValidationRules({
const
pattern
=
/
[
0-9
]
+
\.[
0-9
]
*/
;
if
(
active
==
MONTH
)
{
return
!
isNumber
.
test
(
otherValues
[
1
])
||
((
otherValues
[
1
]
<
0
||
otherValues
[
1
]
>
31
)
||
pattern
.
test
(
otherValues
[
1
]))
?
getIntl
().
formatMessage
({
id
:
'balance.components.settleMethod.registerValidationRules.1'
})
:
''
return
!
isNumber
.
test
(
otherValues
[
1
])
||
((
otherValues
[
1
]
<
0
||
otherValues
[
1
]
>
31
)
||
pattern
.
test
(
otherValues
[
1
]))
?
getIntl
().
formatMessage
({
id
:
'balance.components.settleMethod.registerValidationRules.1'
})
:
''
}
return
!
isNumber
.
test
(
otherValues
[
0
])
||
pattern
.
test
(
otherValues
[
0
])
?
getIntl
().
formatMessage
({
id
:
'balance.components.settleMethod.registerValidationRules.2'
})
:
""
return
!
isNumber
.
test
(
otherValues
[
0
])
||
pattern
.
test
(
otherValues
[
0
])
?
getIntl
().
formatMessage
({
id
:
'balance.components.settleMethod.registerValidationRules.2'
})
:
""
}
})
...
...
src/pages/balance/platformSettlement/accountReceivable/index.tsx
View file @
753056c2
...
...
@@ -33,6 +33,12 @@ const { RangePicker } = DatePicker;
// 平台代收账款结算 - 收款方查看凭证 能力中心
const
PLATFORM_BENEFICIARY
=
3
;
/** 保留三位小数,然后丢弃最后一位小数,因为 priceFormat 保留两位小数会直接进位*/
const
fomatNumber
=
(
number
)
=>
{
const
string
=
priceFormat
(
number
,
3
);
return
string
.
substring
(
0
,
string
.
length
-
1
);
}
const
AccountReceivable
=
()
=>
{
const
intl
=
useIntl
();
const
ref
=
useRef
<
any
>
({})
...
...
@@ -57,9 +63,10 @@ const AccountReceivable = () => {
{
title
:
intl
.
formatMessage
({
id
:
'balance.platformSettlement.accountReceivable.columns.settlementDate'
}),
dataIndex
:
'settlementDate'
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.platformSettlement.accountReceivable.columns.settlementWayName'
}),
dataIndex
:
'settlementWayName'
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.platformSettlement.accountReceivable.columns.totalCount'
}),
dataIndex
:
'totalCount'
,
render
:
(
text
)
=>
numFormat
(
text
)},
{
title
:
intl
.
formatMessage
({
id
:
'balance.platformSettlement.accountReceivable.columns.collectAmount'
}),
dataIndex
:
'collectAmount'
,
render
:
(
text
)
=>
`¥
${
priceFormat
(
text
)}
`
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.platformSettlement.accountReceivable.columns.collectAmount'
}),
dataIndex
:
'collectAmount'
,
render
:
(
text
)
=>
`¥
${
fomatNumber
(
text
)}
`
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.platformSettlement.accountReceivable.columns.brokerage'
}),
dataIndex
:
'brokerage'
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.platformSettlement.accountReceivable.columns.amount'
}),
dataIndex
:
'amount'
,
render
:
(
text
)
=>
`¥
${
priceFormat
(
text
)}
`
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.platformSettlement.accountReceivable.columns.amount'
}),
dataIndex
:
'amount'
,
render
:
(
text
)
=>
`¥
${
fomatNumber
(
text
)}
`
},
// {title: intl.formatMessage({id: 'balance.platformSettlement.accountReceivable.columns.settlementTime'}), dataIndex: 'settlementDate'},
{
title
:
intl
.
formatMessage
({
id
:
'balance.platformSettlement.accountReceivable.columns.settlementTime'
}),
dataIndex
:
'settlementTime'
},
{
title
:
intl
.
formatMessage
({
id
:
'balance.platformSettlement.accountReceivable.columns.payWayName'
}),
dataIndex
:
'payWayName'
},
{
...
...
src/pages/balance/settleRules/memberSettle/index.less
0 → 100644
View file @
753056c2
.status {
:global {
.ant-btn {
padding: 0px;
}
}
}
\ No newline at end of file
src/pages/balance/settleRules/memberSettle/index.tsx
View file @
753056c2
/*
* @Author: Bill
* @Date: 2020-10-19 14:46:33
* @desc: 会员结算策略列表页
*/
import
React
,
{
useRef
}
from
'react'
;
import
{
PageHeaderWrapper
}
from
'@ant-design/pro-layout'
;
import
{
Card
,
Space
,
Button
,
Input
}
from
'antd'
;
...
...
@@ -21,6 +15,7 @@ import {
postSettleAccountsPlatformConfigDeleteMemberSettlementStrategy
,
postSettleAccountsPlatformConfigSetMemberSettlementStrategyStatus
}
from
'@/services/SettleV2Api'
;
import
styles
from
'./index.less'
;
const
formActions
=
createFormActions
();
...
...
@@ -67,11 +62,13 @@ const MemberSettle: React.FC<{}> = () => {
dataIndex
:
'status'
,
render
:
(
text
,
record
)
=>
{
return
(
<
div
className=
{
styles
.
status
}
>
<
StatusSwitch
handleConfirm=
{
()
=>
handleModify
(
record
)
}
record=
{
record
}
fieldNames=
"status"
/>
</
div
>
)
}
},
...
...
src/pages/balance/settleRules/memberSettle/info.tsx
View file @
753056c2
...
...
@@ -156,7 +156,7 @@ const MemberSettleAdd: React.FC = () => {
}
// 提交
const
handleSubmit
=
(
value
)
=>
{
const
handleSubmit
=
async
(
value
)
=>
{
const
memberList
=
value
.
someLists
.
map
((
item
)
=>
(
{
memberId
:
item
.
memberId
,
...
...
@@ -184,16 +184,19 @@ const MemberSettleAdd: React.FC = () => {
if
(
!
isAdd
)
{
postData
=
{
...
postData
,
id
:
id
};
}
// return;
try
{
setSubmitLoading
(
true
);
setUnsaved
(
false
);
serviceActions
(
postData
).
then
((
data
)
=>
{
setSubmitLoading
(
false
);
if
(
data
.
code
===
1000
)
{
history
.
push
(
'/memberCenter/balance/settleRules/memberSettleList'
)
const
{
data
,
code
,
message
:
msg
}
=
await
serviceActions
(
postData
,
{
ctlType
:
'none'
});
if
(
code
!==
1000
)
{
message
.
error
(
msg
);
return
;
}
}
)
history
.
push
(
'/memberCenter/balance/settleRules/memberSettleList'
)
}
finally
{
setSubmitLoading
(
false
);
}
}
// 提交
const
handleClick
=
()
=>
{
...
...
src/pages/transaction/marketingAbility/marketingActivitiesManagement/activePage/components/FormilyCheckBox/index.tsx
View file @
753056c2
...
...
@@ -8,9 +8,15 @@ type CheckboxType = {
extra
?:
number
|
string
}
type
XcomponentProps
=
{
/** 是否是单选按钮 */
isRadio
:
boolean
}
interface
Iprops
{
props
:
{
enum
:
CheckboxType
[]
enum
:
CheckboxType
[],
'x-component-props'
:
XcomponentProps
},
mutators
:
{
change
:
(
params
:
number
[]
|
string
[])
=>
void
...
...
@@ -21,10 +27,21 @@ interface Iprops {
const
FormilyCheckBox
:
React
.
FC
<
Iprops
>
&
{
isFieldComponent
:
boolean
}
=
(
props
:
Iprops
)
=>
{
const
{
value
=
[],
mutators
}
=
props
;
const
componentProps
=
props
.
props
||
{};
const
xComponentProps
=
componentProps
[
'x-component-props'
]
||
{}
as
XcomponentProps
;
const
isRadio
=
xComponentProps
?.
isRadio
||
false
;
const
enumsMap
:
CheckboxType
[]
=
componentProps
?.
enum
||
[];
const
handleChange
=
(
isChecked
:
boolean
,
_item
:
CheckboxType
)
=>
{
let
newList
:
string
[]
|
number
[]
=
[]
let
newList
:
string
[]
|
number
[]
=
[];
console
.
log
(
isChecked
)
if
(
isRadio
)
{
if
(
isChecked
)
{
newList
=
[
_item
.
value
as
string
];
}
mutators
.
change
(
newList
)
return
;
}
if
(
isChecked
)
{
newList
=
(
value
as
string
[]).
concat
(
_item
.
value
as
string
);
}
else
{
...
...
src/pages/transaction/marketingAbility/marketingActivitiesManagement/activePage/components/SearchPannel/index.tsx
View file @
753056c2
...
...
@@ -4,7 +4,7 @@ import { DatePicker } from '@formily/antd-components';
import
schema
from
'./schema'
;
import
VerticalLayout
from
'./layout'
;
import
FormilyCheckBox
from
'../FormilyCheckBox'
;
import
FormilyRadio
from
'@/pages/mobileTemplate/categoryNavigation/components/FormilyRadio'
;
//
import FormilyRadio from '@/pages/mobileTemplate/categoryNavigation/components/FormilyRadio';
const
actions
=
createFormActions
();
...
...
@@ -20,7 +20,7 @@ const SearchPannel: React.FC<Iprops> = (props: Iprops) => {
};
return
(
<
SchemaForm
components=
{
{
VerticalLayout
,
FormilyCheckBox
,
DatePicker
,
FormilyRadio
}
}
components=
{
{
VerticalLayout
,
FormilyCheckBox
,
DatePicker
}
}
actions=
{
actions
}
schema=
{
schema
}
onSubmit=
{
handleSubmit
}
...
...
src/pages/transaction/marketingAbility/marketingActivitiesManagement/activePage/components/SearchPannel/schema.tsx
View file @
753056c2
...
...
@@ -23,7 +23,10 @@ const schema: ISchema = {
status
:
{
type
:
'string'
,
title
:
''
,
"x-component"
:
'FormilyRadio'
,
"x-component"
:
'FormilyCheckBox'
,
"x-component-props"
:
{
isRadio
:
true
,
},
enum
:
[
{
label
:
`
${
intl
.
formatMessage
({
id
:
'activePage.readyOnline'
})}
`
,
...
...
@@ -86,7 +89,10 @@ const schema: ISchema = {
environment
:
{
type
:
'string'
,
title
:
''
,
"x-component"
:
'FormilyRadio'
,
"x-component"
:
'FormilyCheckBox'
,
"x-component-props"
:
{
isRadio
:
true
,
},
enum
:
[
{
label
:
'WEB'
,
...
...
src/pages/transaction/marketingAbility/marketingActivitiesManagement/activePage/index.tsx
View file @
753056c2
...
...
@@ -44,10 +44,13 @@ const ActivePage = () => {
};
const
onSearchChange
=
(
values
:
SearchParamsType
)
=>
{
const
{
startTime
,
endTime
,
...
rest
}
=
values
;
const
{
startTime
,
endTime
,
status
,
environment
,
...
rest
}
=
values
;
console
.
log
(
values
,
"values"
);
const
postData
=
{
startTime
:
startTime
&&
moment
(
startTime
,
'YYYY-MM-DD HH:mm:ss'
).
valueOf
()
||
null
,
endTime
:
endTime
&&
moment
(
endTime
,
'YYYY-MM-DD HH:mm:ss'
).
valueOf
()
||
null
,
status
:
status
?.
join
(
""
),
environment
:
environment
?.
join
(
""
),
...
rest
,
};
setSearchParams
(
postData
as
any
);
...
...
@@ -56,7 +59,7 @@ const ActivePage = () => {
const
getData
=
async
(
params
:
GetTemplateWebActivityPagePageRequest
)
=>
{
setLoading
(
true
);
/** 这里type = 2 是能力中心, 因为平台后台跟能力中心用的是同一个接口 */
const
{
data
,
code
}
=
await
getTemplateWebActivityPagePage
({
...
params
,
type
:
2
});
const
{
data
,
code
}
=
await
getTemplateWebActivityPagePage
({
...
params
,
type
:
'2'
});
setLoading
(
false
);
if
(
code
===
1000
)
{
setTotal
(
data
.
totalCount
);
...
...
src/utils/request.ts
View file @
753056c2
...
...
@@ -144,7 +144,7 @@ class ApiRequest {
if
(
url
!=
'/member/loginInfo'
)
{
// 这是展示接口错误信息,任何 ctlType 都可以,不然一些 get 请求出错了
// 错误信息无法展示给用户
res
.
message
&&
message
.
info
(
intl
.
formatMessage
({
id
:
res
.
code
,
defaultMessage
:
res
.
message
}))
res
.
message
&&
options
.
ctlType
===
'message'
&&
message
.
info
(
intl
.
formatMessage
({
id
:
res
.
code
,
defaultMessage
:
res
.
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