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
78b644a4
Commit
78b644a4
authored
Aug 07, 2020
by
maple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[new]物业费详情接口
parent
259fd4a3
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
88 additions
and
31 deletions
+88
-31
TitleBack.tsx
src/components/TitleBack/TitleBack.tsx
+12
-1
index.less
src/components/TitleBack/index.less
+5
-1
PropertyManagement.ts
src/models/PropertyManagement.ts
+8
-0
ChargeDetail.less
src/pages/PropertyManagement/ChargeDetail.less
+1
-0
ChargeDetail.tsx
src/pages/PropertyManagement/ChargeDetail.tsx
+23
-15
ChargeManager.tsx
src/pages/PropertyManagement/ChargeManager.tsx
+17
-13
Guard.tsx
src/pages/UserManagement/ServiceProviderManagement/Guard.tsx
+3
-1
string.ts
src/utils/string.ts
+7
-0
time.ts
src/utils/time.ts
+12
-0
No files found.
src/components/TitleBack/TitleBack.tsx
View file @
78b644a4
...
...
@@ -8,7 +8,18 @@ const TitleBack = (props:any) => {
return
(
<>
<
div
className=
{
styles
.
item0
}
><
TitleGet
title=
{
props
.
title
}
/></
div
>
<
div
className=
{
styles
.
item0
}
><
TitleGet
title=
{
props
.
title
}
/></
div
>
{
props
.
sublist
!=
null
?
(
props
.
sublist
).
map
(
(
item
:
any
)
=>
{
return
(
<
div
className=
{
styles
.
item1
}
>
{
item
}
</
div
>
)
})
:
<>
</>
}
<
div
className=
{
styles
.
item2
}
><
BackButton
/></
div
>
<
div
className=
{
styles
.
clear0
}
></
div
>
</>
...
...
src/components/TitleBack/index.less
View file @
78b644a4
...
...
@@ -3,7 +3,11 @@
float: left;
}
.item1{
float: left;
margin-left: 16px;
line-height: 34px;
}
.item2{
float: right;
}
...
...
src/models/PropertyManagement.ts
View file @
78b644a4
...
...
@@ -7,12 +7,16 @@ export default {
namespace
:
'PropertyManagement'
,
state
:
{
Data
:
''
,
CurData
:
''
,
},
reducers
:
{
returnData
(
state
,
{
Data
})
{
return
{
...
state
,
Data
};
},
returnCurData
(
state
,
{
CurData
})
{
return
{
...
state
,
CurData
};
},
},
effects
:
{
...
...
@@ -25,6 +29,10 @@ export default {
let
Data
=
resp
.
data
.
rows
;
yield
put
({
type
:
'returnData'
,
Data
,
});
},
*
getById
({
playload
},
{
call
,
put
})
{
let
CurData
=
playload
;
yield
put
({
type
:
'returnCurData'
,
CurData
,
});
},
},
...
...
src/pages/PropertyManagement/ChargeDetail.less
View file @
78b644a4
...
...
@@ -6,6 +6,7 @@
background-color: #ffffff;
padding: 34px;
min-width: 1020px;
overflow-x:auto
}
//边栏1
.box{
...
...
src/pages/PropertyManagement/ChargeDetail.tsx
View file @
78b644a4
...
...
@@ -10,7 +10,14 @@ import { render } from 'react-dom';
import
{
Document
}
from
'react-pdf/dist/entry.webpack'
;
const
ChargeDetail
=
()
=>
{
import
{
stringSplit
}
from
'../../utils/string'
;
import
{
timestampToTime2
}
from
'../../utils/time'
;
import
TitleBack
from
'../../components/TitleBack/TitleBack'
;
const
ChargeDetail
=
(
props
:
any
)
=>
{
const
{
CurData
}
=
props
;
const
{
formatMessage
}
=
useIntl
();
...
...
@@ -42,21 +49,17 @@ const ChargeDetail = () => {
return
(
<
div
className=
{
styles
.
base
}
>
{
/* 组件 */
}
<
div
className=
{
styles
.
box
}
>
<
div
className=
{
styles
.
item1
}
>
Payment Settings
</
div
>
<
div
className=
{
styles
.
item2
}
>
Upload Time 2020/7/14/18:09:00
</
div
>
<
button
className=
{
styles
.
item3
}
onClick=
{
goToReturn
}
>
返回
</
button
>
</
div
>
<
TitleBack
title=
"Payment Settings"
sublist=
{
[
'Upload Time '
+
timestampToTime2
(
CurData
.
updateTime
.
time
)]
}
/>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
item21
}
>
Project
</
div
>
<
div
className=
{
styles
.
item22
}
>
Project Name
</
div
>
<
div
className=
{
styles
.
item23
}
>
Building No
</
div
>
<
div
className=
{
styles
.
item22
}
>
{
CurData
.
billName
}
</
div
>
<
div
className=
{
styles
.
item23
}
>
{
CurData
.
communityName
}
</
div
>
<
div
className=
{
styles
.
item234
}
>
#
</
div
>
<
div
className=
{
styles
.
item24
}
>
Floor
</
div
>
<
div
className=
{
styles
.
item24
}
>
{
CurData
.
floorNumber
}
</
div
>
<
div
className=
{
styles
.
item245
}
>
——
</
div
>
<
div
className=
{
styles
.
item25
}
>
Room Number
</
div
>
<
div
className=
{
styles
.
item26
}
>
Owner's Name
</
div
>
<
div
className=
{
styles
.
item25
}
>
{
CurData
.
roomNumber
}
</
div
>
<
div
className=
{
styles
.
item26
}
>
{
CurData
.
tosOwnerName
}
</
div
>
</
div
>
<
div
className=
{
styles
.
box4
}
>
<
Pagination
simple
defaultCurrent=
{
curpage
}
total=
{
pages
*
10
}
onChange=
{
pageChange
}
/>
...
...
@@ -66,7 +69,7 @@ const ChargeDetail = () => {
<><
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=
"/cash/tos-manager/bill/B1-21-1002.pdf?Expires=1911893716&OSSAccessKeyId=LTAI4FxB6SgPMtnJ7UpcATA6&Signature=c72T%2B6BrcHcqXeXdMY%2BuBNZmgCw%3D"
workerSrc
=
"
//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js" scale={scale} page={curpage} onDocumentComplete={pdfpages} />
<
PDF
key=
"pdfjs"
file=
{
stringSplit
(
CurData
.
billFileUrl
,
"m/cash"
)
}
workerSrc
=
"
//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js" scale={scale} page={curpage} onDocumentComplete={pdfpages} />
</
div
>
</
div
>
</
Tooltip
></>
...
...
@@ -77,5 +80,10 @@ const ChargeDetail = () => {
);
};
export default ChargeDetail;
function mapStateToProps(state:any)
{
const
{
CurData
}
=
state
.
PropertyManagement
;
return
{
CurData
};
}
export default connect(mapStateToProps)(ChargeDetail);
src/pages/PropertyManagement/ChargeManager.tsx
View file @
78b644a4
...
...
@@ -5,20 +5,16 @@ import { Input ,Menu,Table,Space} from 'antd';
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
const
dataSource
=
[
{
key
:
'1'
,
name
:
'胡彦斌'
,
age
:
32
,
address
:
'西湖区湖底公园1号'
,
},
];
import
{
timestampToTime
}
from
'../../utils/time'
;
import
{
values
}
from
'lodash'
;
const
ChargeManager
=
(
props
:
any
)
=>
{
const
{
formatMessage
}
=
useIntl
();
const
{
dispatch
,
location
,
Data
}
=
props
;
const
get
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/get'
,
playload
:
values
})};
const
get
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/get'
,
playload
:
values
})
};
const
getById
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/getById'
,
playload
:
values
})};
useEffect
(()
=>
{
get
(
null
)
},
[]);
...
...
@@ -41,8 +37,9 @@ const ChargeManager = (props:any) => {
const
pagination
=
{
defaultCurrent
:
1
,
total
:
16
}
const
goToDetail
=
()
=>
{
history
.
push
(
'/PropertyManagementDetail?id=123'
)
const
goToDetail
=
(
values
:
any
)
=>
{
getById
(
values
)
history
.
push
(
'/PropertyManagementDetail?'
)
}
const
goToAddAccout
=
()
=>
{
history
.
push
(
location
.
pathname
+
'/AccoutingDetail'
)
...
...
@@ -52,11 +49,18 @@ const ChargeManager = (props:any) => {
{
title
:
project
,
dataIndex
:
'communityName'
},
{
title
:
unit
,
dataIndex
:
'buildingNumber'
},
{
title
:
status
,
dataIndex
:
'enable'
},
{
title
:
submissionTime
,
dataIndex
:
'updateTime'
},
{
title
:
submissionTime
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
{
timestampToTime
(
record
.
createTime
.
time
)
}
</
Space
>
),
},
{
title
:
actions
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
<
a
onClick=
{
goToDetail
}
>
Detail
</
a
>
<
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Detail
</
a
>
</
Space
>
),
},
...
...
src/pages/UserManagement/ServiceProviderManagement/Guard.tsx
View file @
78b644a4
...
...
@@ -8,6 +8,8 @@ import Line from '../../../components/Line/Line';
import
BackButton
from
'../../../components/BackButton/BackButton'
;
import
TitleGet
from
'../../../components/TitleGet/TitleGet'
;
import
{
timestampToTime
}
from
'../../../utils/time'
;
const
Guard
=
(
props
:
any
)
=>
{
const
{
CurDataFollowDetail
}
=
props
;
...
...
@@ -18,7 +20,7 @@ const Guard = (props:any) => {
<
div
className=
{
styles
.
item0
}
><
TitleGet
title=
{
"Edit Security Guard Account"
}
/></
div
>
<
div
className=
{
styles
.
item0_1
}
>
Status:Normal
</
div
>
<
div
className=
{
styles
.
item0_1
}
>
Registration Date:
23-03-2020
</
div
>
<
div
className=
{
styles
.
item0_1
}
>
Registration Date:
{
timestampToTime
(
CurDataFollowDetail
.
createTime
.
time
)
}
</
div
>
<
div
className=
{
styles
.
item2
}
><
BackButton
/></
div
>
<
div
className=
{
styles
.
clear0
}
></
div
>
...
...
src/utils/string.ts
0 → 100644
View file @
78b644a4
export
const
stringSplit
=
(
string
:
any
,
rex
:
any
)
=>
{
var
index
=
string
.
lastIndexOf
(
rex
);
string
=
string
.
substring
(
index
+
1
,
string
.
length
);
return
string
;
}
\ No newline at end of file
src/utils/time.ts
0 → 100644
View file @
78b644a4
export
const
timestampToTime
=
(
timestamp
:
any
)
=>
{
var
date
=
new
Date
(
timestamp
);
//*1000//getHours getMinutes getSeconds
return
date
.
getDate
()
+
'-'
+
(
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
'-'
+
date
.
getFullYear
();
}
//2020/7/14/18:09:00
export
const
timestampToTime2
=
(
timestamp
:
any
)
=>
{
var
date
=
new
Date
(
timestamp
);
//*1000//getHours getMinutes getSeconds
return
date
.
getFullYear
()
+
'/'
+
(
date
.
getMonth
()
+
1
<
10
?
'0'
+
(
date
.
getMonth
()
+
1
)
:
date
.
getMonth
()
+
1
)
+
' '
+
date
.
getDate
()
+
' '
+
date
.
getHours
()
+
':'
+
date
.
getMinutes
()
+
':'
+
date
.
getSeconds
()
}
\ No newline at end of file
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