Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
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
Maple
TOSTUMI
Commits
de18cd4d
Commit
de18cd4d
authored
Oct 28, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
物业费管理模块优化处理以及bug修复
parent
20c8de57
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
105 additions
and
51 deletions
+105
-51
PropertyManagement.ts
src/models/PropertyManagement.ts
+11
-17
ChargeDetail.less
src/pages/PropertyManagement/ChargeDetail.less
+12
-0
ChargeDetail.tsx
src/pages/PropertyManagement/ChargeDetail.tsx
+8
-4
ChargeManager.tsx
src/pages/PropertyManagement/ChargeManager.tsx
+74
-30
No files found.
src/models/PropertyManagement.ts
View file @
de18cd4d
import
*
as
service
from
'../services/PropertyManagementServices'
;
import
{
message
}
from
'antd'
;
import
{
routerRedux
}
from
'dva/router'
export
default
{
namespace
:
'PropertyManagement'
,
state
:
{
Data
:
''
,
CurData
:
''
,
Data
:
null
,
CurData
:
''
,
},
reducers
:
{
returnData
(
state
,
{
Data
}
)
{
returnData
(
state
:
{},
{
Data
}:
any
)
{
return
{
...
state
,
Data
};
},
returnCurData
(
state
,
{
CurData
}
)
{
returnCurData
(
state
:
{},
{
CurData
}:
any
)
{
return
{
...
state
,
CurData
};
},
},
effects
:
{
//获取物业费列表
*
get
({
playload
}
,
{
call
,
put
}
)
{
console
.
log
(
playload
)
*
get
({
playload
}
:
any
,
{
call
,
put
}:
any
)
{
console
.
log
(
playload
)
;
const
resp
=
yield
call
(
service
.
get
,
playload
);
console
.
log
(
resp
)
let
Data
=
resp
.
data
.
rows
;
yield
put
({
type
:
'returnData'
,
Data
,
});
console
.
log
(
resp
)
;
let
Data
=
resp
.
data
;
yield
put
({
type
:
'returnData'
,
Data
});
},
*
getById
({
playload
}
,
{
call
,
put
}
)
{
*
getById
({
playload
}
:
any
,
{
call
,
put
}:
any
)
{
let
CurData
=
playload
;
yield
put
({
type
:
'returnCurData'
,
CurData
,
});
yield
put
({
type
:
'returnCurData'
,
CurData
});
},
},
};
src/pages/PropertyManagement/ChargeDetail.less
View file @
de18cd4d
...
...
@@ -139,3 +139,15 @@
.box4 {
padding-left: 200px;
}
.time1 {
position: absolute;
top: -60px;
left: 200px;
}
.time2 {
position: absolute;
top: -60px;
left: 285px;
}
src/pages/PropertyManagement/ChargeDetail.tsx
View file @
de18cd4d
...
...
@@ -53,6 +53,8 @@ const ChargeDetail = (props: any) => {
/>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
time1
}
>
uploadTime :
</
div
>
<
div
className=
{
styles
.
time2
}
>
01-01-2020
</
div
>
<
div
className=
{
styles
.
item21
}
>
Project (community)
</
div
>
<
div
className=
{
styles
.
item22
}
>
{
CurData
.
communityName
}
</
div
>
<
div
className=
{
styles
.
item23
}
>
Street name
</
div
>
...
...
@@ -63,17 +65,19 @@ const ChargeDetail = (props: any) => {
<
div
className=
{
styles
.
item26
}
>
{
CurData
.
roomNumber
}
</
div
>
<
div
className=
{
styles
.
item27
}
>
业主姓名
</
div
>
</
div
>
{
/* <>{stringSplit(CurData.billFileUrl, 'm/cash')}</> */
}
{
/*
<div className={styles.box4}>
<>
{
stringSplit
(
CurData
.
billFileUrl
,
'm/cash'
)
}
</>
<
div
className=
{
styles
.
box4
}
>
<
Pagination
simple
defaultCurrent=
{
curpage
}
total=
{
pages
*
10
}
onChange=
{
pageChange
}
/>
</div>
*/
}
</
div
>
<>
<
Tooltip
title=
{
scale
==
1.3
?
'点击放大查看'
:
'还原视图'
}
>
<
div
className=
{
scale
==
1.3
?
styles
.
box3out
:
null
}
>
<
div
className=
{
scale
==
1.3
?
styles
.
box3
:
styles
.
box3of
}
onClick=
{
lookup
}
>
<
PDF
key=
"pdfjs"
file=
{
stringSplit
(
CurData
.
billFileUrl
,
'm/cash'
)
}
file=
{
'data:application/pdf;base64,'
+
stringSplit
(
CurData
.
billFileUrl
,
'm/cash'
)
}
workerSrc=
"//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js"
scale=
{
scale
}
page=
{
curpage
}
...
...
src/pages/PropertyManagement/ChargeManager.tsx
View file @
de18cd4d
...
...
@@ -8,40 +8,28 @@ import { Link, useIntl, connect, Dispatch, history } from 'umi';
import
{
timestampToTime
}
from
'../../utils/time'
;
import
{
values
}
from
'lodash'
;
import
{
filterObj
,
urlEncode
}
from
'@/utils/method'
;
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
let
readyData
:
object
=
{
tosOwnerName
:
''
,
communityName
:
''
,
pageNum
:
1
,
};
const
ChargeManager
=
(
props
:
any
)
=>
{
const
{
formatMessage
}
=
useIntl
();
const
{
dispatch
,
location
,
Data
}
=
props
;
const
get
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/get'
,
playload
:
values
});
};
const
getById
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/getById'
,
playload
:
values
});
};
useEffect
(()
=>
{
get
(
null
);
},
[]);
const
nameofowner
=
formatMessage
({
id
:
'R.charge.input.nameofowner'
});
const
inputProject
=
formatMessage
({
id
:
'R.charge.input.project'
});
const
{
formatMessage
}
=
useIntl
();
const
username
=
formatMessage
({
id
:
'R.charge.username'
});
const
project
=
formatMessage
({
id
:
'R.charge.project'
});
const
unit
=
formatMessage
({
id
:
'R.charge.unit'
});
const
status
=
formatMessage
({
id
:
'R.charge.status'
});
const
submissionTime
=
formatMessage
({
id
:
'R.charge.submissionTime'
});
const
actions
=
formatMessage
({
id
:
'R.charge.actions'
});
const
search
=
formatMessage
({
id
:
'R.charge.search'
});
const
addaccount
=
formatMessage
({
id
:
'R.charge.addaccount'
});
const
paymentsetting
=
formatMessage
({
id
:
'R.charge.paymentsetting'
});
const
menuListNormal
=
[
'A'
,
'Accounting company'
];
const
[
display
,
setDisplay
]
=
useState
(
'A'
);
//小组件:线框
const
pagination
=
{
defaultCurrent
:
15
,
total
:
16
,
};
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
goToDetail
=
(
values
:
any
)
=>
{
getById
(
values
);
...
...
@@ -50,6 +38,55 @@ const ChargeManager = (props: any) => {
const
goToAddAccout
=
()
=>
{
history
.
push
(
location
.
pathname
+
'/AccoutingDetail'
);
};
const
getById
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/getById'
,
playload
:
values
});
};
const
get
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/get'
,
playload
:
values
});
};
useEffect
(()
=>
{
if
(
location
.
query
)
{
readyData
=
{
...
readyData
,
...
location
.
query
,
};
setLoading
(
true
);
get
({
...
readyData
,
});
}
},
[
location
]);
useEffect
(()
=>
{
if
(
Data
!=
null
)
{
console
.
log
(
Data
);
setLoading
(
false
);
}
},
[
Data
]);
const
TitleSearchContent
=
(
comment
:
any
)
=>
{
history
.
push
(
location
.
pathname
+
urlEncode
(
filterObj
({
...
comment
,
pageNum
:
1
,
}),
),
);
};
const
changePage
=
(
values
:
any
)
=>
{
let
tmp
=
{
...
location
.
query
,
pageNum
:
values
.
current
,
};
history
.
push
(
location
.
pathname
+
urlEncode
(
filterObj
(
tmp
)));
};
const
columns
=
[
{
title
:
username
,
dataIndex
:
'tosOwnerName'
},
{
title
:
project
,
dataIndex
:
'communityName'
},
...
...
@@ -69,20 +106,25 @@ const ChargeManager = (props: any) => {
),
},
];
const
TitleSearchContent
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
);
const
pagination
=
{
defaultPageSize
:
15
,
total
:
Data
&&
Data
.
page
.
totalRow
,
showSizeChanger
:
false
,
};
return
(
<
div
className=
{
styles
.
base
}
>
<
TitleSearch
listkey=
{
[
'tosOwnerName'
,
'communityName'
]
}
list=
{
[
'tosOwnerName'
,
'communityName'
]
}
onSubmit=
{
TitleSearchContent
}
defaultValue=
{
{
...
readyData
}
}
/>
{
/* 内容组件 */
}
<
div
className=
{
styles
.
box2
}
>
{
menuListNormal
.
map
((
item
,
index
)
=>
{
{
/* {
menuListNormal.map((item, index) => {
return (
<button
key={'bt' + index}
...
...
@@ -94,20 +136,22 @@ const ChargeManager = (props: any) => {
{item}
</button>
);
})
}
<
button
className=
{
styles
.
buttonAdd
2
}
onClick=
{
goToAddAccout
}
>
})}
*/
}
<
button
className=
{
styles
.
buttonAdd
}
onClick=
{
goToAddAccout
}
>
+
{
addaccount
}{
' '
}
</
button
>
<
button
className=
{
styles
.
buttonAdd
}
>
{
paymentsetting
}
</
button
>
{
/* <button className={styles.buttonAdd}>{paymentsetting}</button> */
}
</
div
>
{
/* 列表组件 */
}
<
Table
style=
{
{
marginTop
:
16
}
}
rowKey=
{
'id'
}
dataSource=
{
Data
}
loading=
{
loading
}
dataSource=
{
Data
!=
null
?
Data
.
list
:
[]
}
columns=
{
columns
}
pagination=
{
pagination
}
onChange=
{
changePage
}
/>
</
div
>
);
...
...
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