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
bd2ab9ff
Commit
bd2ab9ff
authored
Dec 24, 2020
by
Bill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改结算搜索bug, 以及消息列表页
parent
2c8bdd37
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
116 additions
and
49 deletions
+116
-49
ruleSettingRoutes.ts
config/routes/ruleSettingRoutes.ts
+8
-0
menu.ts
src/locales/zh-CN/menu.ts
+1
-0
index.less
src/pages/message/index.less
+17
-0
index.tsx
src/pages/message/index.tsx
+44
-29
index.tsx
src/pages/platformSettlement/accountPayable/index.tsx
+0
-2
schema.tsx
src/pages/platformSettlement/accountPayable/schema.tsx
+4
-2
index.tsx
.../platformSettlement/components/UploadPayVoucher/index.tsx
+0
-0
index.tsx
src/pages/platformSettlement/score/info/index.tsx
+1
-0
index.tsx
src/pages/platformSettlement/score/list/index.tsx
+1
-2
schema.tsx
src/pages/platformSettlement/score/list/schema.tsx
+5
-2
index.tsx
...pages/ruleSettingManage/components/SettleMethod/index.tsx
+7
-7
index.tsx
...leSettingManage/platformSettlementStrategy/info/index.tsx
+16
-4
index.tsx
...leSettingManage/platformSettlementStrategy/list/index.tsx
+12
-1
No files found.
config/routes/ruleSettingRoutes.ts
View file @
bd2ab9ff
...
...
@@ -91,6 +91,14 @@ const router = {
component
:
'@/pages/ruleSettingManage/platformSettlementStrategy/info'
,
hidePageHeader
:
true
,
hideInMenu
:
true
},
// 平台结算策略配置, 平台策略配置编辑
{
path
:
'/ruleSettingManager/platformSettlementStrategy/edit'
,
name
:
'platformSettlementStrategyDetailEdit'
,
component
:
'@/pages/ruleSettingManage/platformSettlementStrategy/info'
,
hidePageHeader
:
true
,
hideInMenu
:
true
}
]
}
...
...
src/locales/zh-CN/menu.ts
View file @
bd2ab9ff
...
...
@@ -112,6 +112,7 @@ export default {
'menu.ruleSettingManager.platformSettlementStrategy'
:
'平台结算策略配置'
,
'menu.ruleSettingManager.addplatformSettlementStrategy'
:
'新增平台结算策略'
,
'menu.ruleSettingManager.platformSettlementStrategyDetail'
:
'平台结算策略详情'
,
'menu.ruleSettingManager.platformSettlementStrategyDetailEdit'
:
'编辑平台结算策略'
,
// 品类和属性
'menu.classAndProperty'
:
'平台品类及属性'
,
...
...
src/pages/message/index.less
View file @
bd2ab9ff
...
...
@@ -15,4 +15,21 @@
font-weight: 500;
color: #303133;
}
.header {
display: flex;
flex-direction: row;
justify-content: space-between;
}
.time {
margin-left: 20px;
}
.section {
margin-left: 20px;
display: flex;
flex-direction: row;
align-items: center;
}
}
src/pages/message/index.tsx
View file @
bd2ab9ff
...
...
@@ -9,50 +9,55 @@ import msg_system from '@/asserts/msg_system.png'
import
msg_platform
from
'@/asserts/msg_platform.png'
import
moment
from
'moment'
;
import
{
PublicApi
}
from
'@/services/api'
import
{
BookOutlined
,
ReadOutlined
}
from
'@ant-design/icons'
;
const
Message
:
React
.
FC
<
{}
>
=
()
=>
{
const
[
dataSource
,
setDataSource
]
=
useState
<
any
>
([])
const
[
pag
ation
,
setPag
ation
]
=
useState
({
const
[
pag
ination
,
setPagin
ation
]
=
useState
({
current
:
1
,
pageSize
:
10
,
})
useEffect
(()
=>
{
// @ts-ignore
async
function
init
()
{
const
data
=
await
getList
(
pagation
);
setDataSource
(
data
);
}
init
()
getList
(
pagination
)
},
[])
const
getList
=
async
(
params
)
=>
{
const
res
=
await
PublicApi
.
getReportMessagePlatformPage
(
params
);
if
(
res
.
code
===
1000
)
{
return
res
.
data
const
getList
=
(
params
)
=>
{
PublicApi
.
getReportMessagePlatformPage
(
params
).
then
(({
data
,
code
})
=>
{
if
(
code
===
1000
)
{
setDataSource
(
data
)
}
return
{
totalCount
:
0
,
data
:
[]
})
}
const
handlePaginationChange
=
(
page
,
pageSize
)
=>
{
setPagination
((
state
)
=>
({...
state
,
current
:
page
,
pageSize
:
pageSize
}))
getList
({
current
:
page
,
pageSize
})
}
const
handlePaginationChange
=
(
page
:
number
,
pageSize
:
number
|
undefined
)
=>
{
//@ts-ignore
setPagation
((
state
)
=>
({...
state
,
current
:
page
,
pageSize
:
pageSize
}))
getList
({
page
,
pageSize
})
.
then
((
data
)
=>
{
setDataSource
(
data
);
})
const
handleRead
=
(
id
,
url
:
string
)
=>
{
console
.
log
(
"当前功能还未开发"
)
// PublicApi.getReportMessageMemberRead({id: id})
// .then((data) => {
// if(url) {
// if(/http/.test(url)) {
// location.href = url
// } else {
// history.push(url);
// }
// } else {
// getList(pagination);
// }
// })
}
const
renderMessage
=
(
data
)
=>
{
return
(
<>
<
div
onClick=
{
()
=>
handleRead
(
data
.
id
,
data
.
url
)
}
>
<
StatusTag
type=
{
data
.
type
==
1
?
'primary'
:
'success'
}
title=
{
data
.
type
===
1
?
'系统消息'
:
'平台消息'
}
/>
<
span
className=
{
styles
.
messageTitle
}
>
{
data
.
title
||
''
}
</
span
>
<
span
className=
{
styles
.
messageText
}
>
{
data
.
content
||
''
}
</
span
>
</>
</
div
>
)
}
...
...
@@ -62,17 +67,18 @@ const Message: React.FC<{}> = () => {
return
(
<
PageHeaderWrapper
>
<
Card
>
<
p
>
<
div
className=
{
styles
.
header
}
>
<
Button
type=
"primary"
icon=
{
<
PlusOutlined
/>
}
onClick=
{
()
=>
history
.
push
(
'/message/messageList/add'
)
}
>
新建
</
Button
>
</
p
>
<
Button
type=
"link"
>
全部已读
</
Button
>
</
div
>
<
List
itemLayout=
"horizontal"
dataSource=
{
dataSource
.
data
}
className=
{
styles
.
customList
}
pagination=
{
{
onChange
:
handlePaginationChange
,
current
:
pagation
.
current
,
pageSize
:
pagation
.
pageSize
,
current
:
pag
in
ation
.
current
,
pageSize
:
pag
in
ation
.
pageSize
,
size
:
"small"
,
showQuickJumper
:
true
,
total
:
dataSource
?.
totalCount
||
0
,
...
...
@@ -84,7 +90,16 @@ const Message: React.FC<{}> = () => {
avatar=
{
<
Avatar
src=
{
item
.
type
==
1
?
msg_system
:
msg_platform
}
/>
}
title=
{
renderMessage
(
item
)
}
/>
<
div
>
{
moment
(
item
.
sendTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
</
div
>
<
div
className=
{
styles
.
section
}
>
{
item
.
status
===
1
?
<
ReadOutlined
style=
{
{
fontSize
:
'24px'
,
color
:
'#909090'
}
}
/>
:
<
BookOutlined
style=
{
{
fontSize
:
'20px'
,
color
:
'#909090'
}
}
/>
}
<
span
className=
{
styles
.
time
}
>
{
moment
(
item
.
sendTime
).
format
(
'YYYY-MM-DD HH:mm:ss'
)
}
</
span
>
</
div
>
</
List
.
Item
>
)
}
/>
...
...
src/pages/platformSettlement/accountPayable/index.tsx
View file @
bd2ab9ff
...
...
@@ -43,7 +43,6 @@ const SettlementList = () => {
...
params
,
status
:
typeof
params
.
status
==
'undefined'
?
0
:
params
.
status
,
}
console
.
log
(
searchData
);
const
res
=
await
PublicApi
.
getSettleAccountsPlatformSettlementPagePayableSettlement
(
searchData
)
return
res
.
data
;
}
...
...
@@ -106,7 +105,6 @@ const SettlementList = () => {
* @param params
*/
const
handleUploadVoucher
=
(
params
:
any
)
=>
{
console
.
log
(
params
);
PublicApi
.
postSettleAccountsPlatformSettlementPay
({
id
:
params
.
id
,
proveList
:
params
.
fileList
})
.
then
((
data
)
=>
{
if
(
data
.
code
===
1000
)
{
...
...
src/pages/platformSettlement/accountPayable/schema.tsx
View file @
bd2ab9ff
...
...
@@ -40,14 +40,16 @@ export const schema: ISchema = {
type
:
'string'
,
'x-component'
:
'DatePicker'
,
'x-component-props'
:
{
allowClear
:
true
allowClear
:
true
,
placeholder
:
'结算日期(开始时间)'
}
},
endTime
:
{
type
:
'string'
,
'x-component'
:
'DatePicker'
,
'x-component-props'
:
{
allowClear
:
true
allowClear
:
true
,
placeholder
:
'结算日期(结束时间)'
}
},
status
:
{
...
...
src/pages/platformSettlement/components/UploadPayVoucher/index.tsx
View file @
bd2ab9ff
src/pages/platformSettlement/score/info/index.tsx
View file @
bd2ab9ff
...
...
@@ -93,6 +93,7 @@ const ScoreInfo: React.FC = () => {
return
(
<
PageHeaderWrapper
onBack=
{
()
=>
history
.
goBack
()
}
title=
{
<>
<
PageHeader
...
...
src/pages/platformSettlement/score/list/index.tsx
View file @
bd2ab9ff
...
...
@@ -44,7 +44,6 @@ const SettlementList = () => {
...
params
,
status
:
typeof
params
.
status
==
'undefined'
?
0
:
params
.
status
,
}
console
.
log
(
searchData
);
///settle/accounts/platform/score/settlement/pagePayableSettlement
const
res
=
await
PublicApi
.
getSettleAccountsPlatformScoreSettlementPagePayableSettlement
(
searchData
)
return
res
.
data
;
...
...
@@ -83,7 +82,7 @@ const SettlementList = () => {
{
text
:
'待对账'
,
value
:
1
},
{
text
:
'待付款'
,
value
:
2
},
{
text
:
'待收款'
,
value
:
3
},
{
text
:
'
以
完成'
,
value
:
4
},
{
text
:
'
已
完成'
,
value
:
4
},
],
onFilter
:
(
value
,
record
:
any
)
=>
record
.
status
==
value
,
render
:
(
text
,
record
:
any
)
=>
{
...
...
src/pages/platformSettlement/score/list/schema.tsx
View file @
bd2ab9ff
...
...
@@ -40,14 +40,17 @@ export const schema: ISchema = {
type
:
'string'
,
'x-component'
:
'DatePicker'
,
'x-component-props'
:
{
allowClear
:
true
allowClear
:
true
,
placeholder
:
'结算日期(开始时间)'
}
},
endTime
:
{
type
:
'string'
,
'x-component'
:
'DatePicker'
,
'x-component-props'
:
{
allowClear
:
true
allowClear
:
true
,
placeholder
:
'结算日期(结束时间)'
}
},
status
:
{
...
...
src/pages/ruleSettingManage/components/SettleMethod/index.tsx
View file @
bd2ab9ff
...
...
@@ -51,6 +51,9 @@ const SettleMethod = (props) => {
otherValues
:
temp
})
}
if
(
!
monthVisible
&&
!
daysVisible
)
{
return
null
}
return
(
<
div
>
...
...
@@ -96,19 +99,13 @@ const SettleMethod = (props) => {
</
div
>
}
</
div
>
<
div
>
{
!
monthVisible
&&
!
daysVisible
?
<
div
>
请在pass平台配置结算方式,否则无法创建会员策略
</
div
>
:
null
}
</
div
>
</
div
>
)
}
const
Index
=
(
props
)
=>
{
const
editable
=
props
.
editable
;
const
value
=
props
.
value
||
{
active
:
0
,
otherValues
:
[
30
,
1
]};
const
componentProps
=
props
.
props
[
'x-component-props'
]
||
{};
const
options
=
componentProps
.
options
||
{};
...
...
@@ -129,6 +126,9 @@ const Index = (props) => {
const
onChange
=
(
value
)
=>
{
props
.
mutators
.
change
(
value
);
}
if
(
!
editable
)
{
return
value
.
active
==
1
?
`账期(默认), 账期天数
${
value
.
otherValues
[
0
]}
天 `
:
`月结: 每月
${
value
.
otherValues
[
1
]}
号`
}
return
(
<
SettleMethod
...
...
src/pages/ruleSettingManage/platformSettlementStrategy/info/index.tsx
View file @
bd2ab9ff
...
...
@@ -66,9 +66,13 @@ const MemberSettleAdd: React.FC = () => {
const
[
submitLoading
,
setSubmitLoading
]
=
useState
(
false
);
const
[
unsaved
,
setUnsaved
]
=
useState
(
true
);
const
isAdd
=
!
id
&&
!
preview
;
const
isEdit
=
history
.
location
.
pathname
.
includes
(
"edit"
);
const
tableAddButton
=
()
=>
{
return
(
<
div
>
{
isAdd
||
isEdit
?
(
<
Button
onClick=
{
()
=>
setVisible
(
true
)
}
style=
{
{
marginBottom
:
16
}
}
...
...
@@ -78,21 +82,26 @@ const MemberSettleAdd: React.FC = () => {
>
选择适用会员
</
Button
>
)
:
null
}
</
div
>
)
}
const
columns
=
common_columns
.
concat
(
[
isAdd
||
isEdit
?
[
{
title
:
'操作'
,
render
:
(
text
,
record
)
=>
{
return
(
<
a
onClick=
{
()
=>
handleRemove
(
record
.
uniqueId
)
}
>
删除
</
a
>
<
div
onClick=
{
()
=>
handleRemove
(
record
.
uniqueId
)
}
>
删除
</
div
>
)
}
}
]
:
[]
);
const
handleCancelAddMember
=
()
=>
{
...
...
@@ -240,13 +249,16 @@ const MemberSettleAdd: React.FC = () => {
<
PageHeaderWrapper
onBack=
{
()
=>
window
.
history
.
back
()
}
extra=
{
[
<
Button
loading=
{
submitLoading
}
key=
"1"
type=
"primary"
onClick=
{
handleClick
}
>
(
<
Button
loading=
{
submitLoading
}
key=
"1"
type=
"primary"
onClick=
{
handleClick
}
style=
{
{
display
:
isAdd
||
isEdit
?
'block'
:
'none'
}
}
>
保存
</
Button
>,
</
Button
>
)
]
}
>
<
Card
>
<
NiceForm
editable=
{
isAdd
||
isEdit
}
actions=
{
formActions
}
initialValues=
{
initialValue
}
expressionScope=
{
{
...
...
src/pages/ruleSettingManage/platformSettlementStrategy/list/index.tsx
View file @
bd2ab9ff
...
...
@@ -13,7 +13,7 @@ import StatusSwitch from '@/components/StatusSwitch';
import
{
createFormActions
}
from
'@formily/antd'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
ColumnsType
}
from
'antd/es/table'
;
import
{
history
}
from
'umi'
;
import
{
history
,
Link
}
from
'umi'
;
import
schema
from
'./schema'
const
formActions
=
createFormActions
();
...
...
@@ -68,6 +68,17 @@ const MemberSettle: React.FC<{}> = () => {
)
}
},
{
title
:
'操作'
,
render
:
(
text
,
record
)
=>
{
if
(
record
.
status
==
1
)
{
return
null
}
return
(
<
Link
to=
{
`/ruleSettingManager/platformSettlementStrategy/edit?id=${record.id}`
}
>
修改
</
Link
>
)
}
},
]
const
goToCreate
=
()
=>
{
...
...
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