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
d8a40b9f
Commit
d8a40b9f
authored
Nov 06, 2020
by
cellee
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'final' of
http://120.77.240.215:9701/Maple/tostumi.git
into final
parents
e9315581
d16f6558
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
154 additions
and
85 deletions
+154
-85
TableShow.tsx
src/components/TableShow/TableShow.tsx
+117
-70
TitleBack.tsx
src/components/TitleBack/TitleBack.tsx
+1
-1
CardAdd.tsx
src/pages/CommercialService/CardAdd.tsx
+4
-2
CardDetail.tsx
src/pages/CommercialService/CardDetail.tsx
+9
-4
ChargeDetail.tsx
src/pages/PropertyManagement/ChargeDetail.tsx
+0
-2
UsersAdd.tsx
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
+21
-4
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+2
-2
No files found.
src/components/TableShow/TableShow.tsx
View file @
d8a40b9f
import
React
,
{
useEffect
}
from
'react'
;
import
React
,
{
useEffect
}
from
'react'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
import
{
Row
,
Col
,
Table
,
Space
,
Tabs
,
Button
}
from
'antd'
;
import
{
Row
,
Col
,
Table
,
Space
,
Tabs
,
Button
}
from
'antd'
;
const
{
TabPane
}
=
Tabs
const
{
TabPane
}
=
Tabs
;
import
{
objectColumns
}
from
'@/utils/string'
;
import
{
objectColumns
}
from
'@/utils/string'
;
import
{
size
}
from
'lodash'
;
import
{
size
}
from
'lodash'
;
import
Toast
from
'../Toast/Toast'
;
import
Toast
from
'../Toast/Toast'
;
const
TableShow
=
(
props
:
any
)
=>
{
const
TableShow
=
(
props
:
any
)
=>
{
const
{
data
}
=
props
;
const
{
data
}
=
props
;
const
dataRow
=
data
.
rows
;
const
dataRow
=
data
.
rows
;
const
goTo
=
(
values
:
any
,
e
:
any
)
=>
{
const
goTo
=
(
values
:
any
,
e
:
any
)
=>
{
console
.
log
(
values
)
console
.
log
(
values
)
;
props
.
onSubmit
(
values
)
props
.
onSubmit
(
values
)
;
}
}
;
const
deleteUnit
=
(
values
:
any
,
e
:
any
)
=>
{
const
deleteUnit
=
(
values
:
any
,
e
:
any
)
=>
{
props
.
onChange
(
values
)
props
.
onChange
(
values
)
;
}
}
;
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
"组件入参"
)
console
.
log
(
'组件入参'
);
console
.
log
(
dataRow
)
console
.
log
(
dataRow
)
;
},
[])
},
[])
;
//
//
// Contact Details
// Contact Details
// Email
// Email
// cdk_code
// cdk_code
// Account Type
// Account Type
// User Status
// User Status
// ower_email: "535740436@qq.com"
// ower_email: "535740436@qq.com"
...
@@ -38,69 +35,117 @@ const TableShow = (props: any) => {
...
@@ -38,69 +35,117 @@ const TableShow = (props: any) => {
// Owner/Family Member/Tenant
// Owner/Family Member/Tenant
// const user_status = [[1, "家属"], [2, "租户"]]
// const user_status = [[1, "家属"], [2, "租户"]]
const
user_status
=
[[
1
,
"Family Member"
],
[
2
,
"Tenant"
]]
const
user_status
=
[
[
1
,
'Family Member'
],
[
2
,
'Tenant'
],
];
// const user_type_status = ["Registered", "Unregistered", "Cancellation"]
// const user_type_status = ["Registered", "Unregistered", "Cancellation"]
const
user_type_status
=
[
"Normal"
,
"Normal"
,
"Cancellation"
]
const
user_type_status
=
[
'Normal'
,
'Normal'
,
'Cancellation'
];
const
user_code
=
[
"Not Used"
,
"Used"
]
const
user_code
=
[
'Not Used'
,
'Used'
];
const
key
=
objectColumns
([
const
key
=
objectColumns
([
[
"User Name"
,
"ower_name"
],
[
'User Name'
,
'ower_name'
],
[
"Contact Details"
,
"ower_phone"
],
[
'Contact Details'
,
'ower_phone'
],
[
"Email"
,
"ower_email"
],
[
'Email'
,
'ower_email'
],
[
"RelationShip"
,
null
,
(
text
:
any
,
record
:
any
)
=>
(<
Space
size=
"middle"
>
{
record
.
owner_relationship
!=
null
?
user_status
[(
record
.
owner_relationship
)
-
1
][
1
]
:
null
}
</
Space
>)],
[
[
"status"
,
null
,
(
text
:
any
,
record
:
any
)
=>
(<
Space
size=
"middle"
>
{
user_type_status
[
record
.
enable
]
}
</
Space
>)],
'RelationShip'
,
[
"Actions"
,
null
,
(
text
:
any
,
record
:
any
)
=>
(<
Space
size=
"middle"
>
<
a
onClick=
{
goTo
.
bind
(
this
,
record
)
}
>
Detail
</
a
></
Space
>)],
null
,
])
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
{
record
.
owner_relationship
!=
null
?
user_status
[
record
.
owner_relationship
-
1
][
1
]
:
null
}
</
Space
>
),
],
[
'status'
,
null
,
(
text
:
any
,
record
:
any
)
=>
<
Space
size=
"middle"
>
{
user_type_status
[
record
.
enable
]
}
</
Space
>,
],
[
'Actions'
,
null
,
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
{
' '
}
<
a
onClick=
{
goTo
.
bind
(
this
,
record
)
}
>
Detail
</
a
>
</
Space
>
),
],
]);
return
(
return
(
<>
<>
<
Tabs
defaultActiveKey=
"0"
>
<
Tabs
defaultActiveKey=
"0"
>
{
{
dataRow
.
map
((
item
,
index
)
=>
{
dataRow
.
map
((
item
,
index
)
=>
{
return
(
return
(
<
TabPane
tab=
{
item
.
name
}
key=
{
index
}
>
<
TabPane
tab=
{
item
.
name
}
key=
{
index
}
>
<
Row
gutter=
{
16
}
>
<
Row
gutter=
{
16
}
><
Col
>
Address:
</
Col
><
Col
>
{
((
item
).
owner
).
addressAndpostalCode
+
" "
+
((
item
).
owner
).
buildingNumber
+
"#"
+
((
item
).
owner
).
floorNumber
+
"-"
+
((
item
).
owner
).
roomNumber
}
</
Col
></
Row
>
<
Col
>
Address:
</
Col
>
{
<
Col
>
(
item
.
unit
).
map
((
unit
:
any
,
uindex
:
any
)
=>
{
{
item
.
owner
.
buildingNumber
+
return
(
'#'
+
<
div
key=
{
unit
.
living
}
>
item
.
owner
.
floorNumber
+
<
Row
gutter=
{
32
}
>
'-'
+
<
Col
span=
{
20
}
>
item
.
owner
.
roomNumber
+
<
Table
title=
{
()
=>
{
','
+
return
(
item
.
owner
.
addressAndpostalCode
}
<
div
style=
{
{
height
:
80
,
position
:
"relative"
}
}
>
</
Col
>
<
div
style=
{
{
position
:
"absolute"
,
left
:
0
,
bottom
:
16
}
}
>
</
Row
>
<
Row
gutter=
{
32
}
><
Col
>
Unit No:
</
Col
><
Col
>
{
unit
.
living
}
</
Col
></
Row
>
{
item
.
unit
.
map
((
unit
:
any
,
uindex
:
any
)
=>
{
</
div
>
return
(
<
div
style=
{
{
position
:
"absolute"
,
right
:
0
,
bottom
:
16
}
}
>
<
div
key=
{
unit
.
living
}
>
{
props
.
deleteDisable
?
null
:
<
Button
type=
"primary"
danger
onClick=
{
deleteUnit
.
bind
(
this
,
unit
.
living
)
}
>
Delete
</
Button
>
}
<
Row
gutter=
{
32
}
>
</
div
>
<
Col
span=
{
20
}
>
<
Table
title=
{
()
=>
{
return
(
<
div
style=
{
{
height
:
80
,
position
:
'relative'
}
}
>
<
div
style=
{
{
position
:
'absolute'
,
left
:
0
,
bottom
:
16
}
}
>
<
Row
gutter=
{
32
}
>
<
Col
>
Unit No:
</
Col
>
<
Col
>
{
unit
.
living
}
</
Col
>
</
Row
>
</
div
>
</
div
>
)
<
div
style=
{
{
position
:
'absolute'
,
right
:
0
,
bottom
:
16
}
}
>
}
}
footer=
{
()
=>
''
}
rowKey=
{
"ower_name"
}
dataSource=
{
unit
.
member
}
columns=
{
key
}
pagination=
{
false
}
></
Table
>
{
props
.
deleteDisable
?
null
:
(
</
Col
>
<
Button
<
Col
>
type=
"primary"
<
Row
>
danger
<
img
width=
{
80
}
src=
{
unit
.
imgUrl
}
/>
onClick=
{
deleteUnit
.
bind
(
this
,
unit
.
living
)
}
</
Row
>
>
<
Row
style=
{
{
marginTop
:
8
}
}
><
div
style=
{
{
width
:
80
,
textAlign
:
"center"
}
}
>
{
item
.
owner
.
cdkCode
}
(
{
user_code
[
item
.
owner
.
cdkStatus
]
}
)
</
div
></
Row
>
Delete
</
Col
>
</
Button
>
)
}
</
div
>
</
div
>
);
}
}
footer=
{
()
=>
''
}
rowKey=
{
'ower_name'
}
dataSource=
{
unit
.
member
}
columns=
{
key
}
pagination=
{
false
}
></
Table
>
</
Col
>
<
Col
>
<
Row
>
<
img
width=
{
80
}
height=
{
80
}
src=
{
unit
.
imgUrl
}
/>
</
Row
>
</
Row
>
<
Row
style=
{
{
marginTop
:
8
}
}
>
</
div
>
<
div
style=
{
{
width
:
80
,
textAlign
:
'center'
}
}
>
)
{
item
.
owner
.
cdkCode
}
(
{
user_code
[
item
.
owner
.
cdkStatus
]
}
)
})
</
div
>
}
</
Row
>
</
TabPane
>
</
Col
>
)
</
Row
>
})
</
div
>
}
);
})
}
</
TabPane
>
);
})
}
</
Tabs
>
</
Tabs
>
</>
</>
);
);
};
};
...
@@ -110,7 +155,7 @@ export default TableShow;
...
@@ -110,7 +155,7 @@ export default TableShow;
// Contact Details
// Contact Details
// Email
// Email
// cdk_code
// cdk_code
// Account Type
// Account Type
// User Status
// User Status
// Actions
// Actions
...
@@ -125,6 +170,8 @@ export default TableShow;
...
@@ -125,6 +170,8 @@ export default TableShow;
// ower_phone: "微微"
// ower_phone: "微微"
// room_number: "399"
// room_number: "399"
{
/* <div style={{ width: 80, height: 80, border: "1px solid #cccccc",padding:8,lineHeight:1,textAlign:"center",fontSize:12}}>
{
/* <div style={{ width: 80, height: 80, border: "1px solid #cccccc",padding:8,lineHeight:1,textAlign:"center",fontSize:12}}>
Activation Code Has Been Used/Is Inactive
Activation Code Has Been Used/Is Inactive
</div> */
}
</div> */
\ No newline at end of file
}
src/components/TitleBack/TitleBack.tsx
View file @
d8a40b9f
...
@@ -14,7 +14,7 @@ const TitleBack = (props: any) => {
...
@@ -14,7 +14,7 @@ const TitleBack = (props: any) => {
<
div
className=
{
styles
.
item0
}
>
<
div
className=
{
styles
.
item0
}
>
<
TitleGet
title=
{
props
.
title
}
/>
<
TitleGet
title=
{
props
.
title
}
/>
</
div
>
</
div
>
{
props
.
sublist
!=
null
&&
props
.
title
==
'Edit Owner Infomation'
?
(
{
props
.
sublist
!=
null
?
(
props
.
sublist
.
map
((
item
:
any
,
index
:
any
)
=>
{
props
.
sublist
.
map
((
item
:
any
,
index
:
any
)
=>
{
return
(
return
(
<
div
key=
{
index
}
className=
{
styles
.
item1
}
>
<
div
key=
{
index
}
className=
{
styles
.
item1
}
>
...
...
src/pages/CommercialService/CardAdd.tsx
View file @
d8a40b9f
...
@@ -28,7 +28,7 @@ const CardAdd = (props: any) => {
...
@@ -28,7 +28,7 @@ const CardAdd = (props: any) => {
message
.
success
(
'Operation Success!'
);
message
.
success
(
'Operation Success!'
);
setLoading
(
false
);
setLoading
(
false
);
ResultClear
(
module
,
dispatch
);
ResultClear
(
module
,
dispatch
);
history
.
go
(
-
1
);
history
.
push
(
'/CommercialService/AccessCardApplication'
);
}
else
{
}
else
{
message
.
error
(
'Operation Fail!'
);
message
.
error
(
'Operation Fail!'
);
setLoading
(
false
);
setLoading
(
false
);
...
@@ -58,7 +58,9 @@ const CardAdd = (props: any) => {
...
@@ -58,7 +58,9 @@ const CardAdd = (props: any) => {
if
(
communityInfo
!=
null
)
{
if
(
communityInfo
!=
null
)
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
zipCode
:
zipCode
:
communityInfo
.
data
.
rows
.
residentialAddress
+
communityInfo
.
data
.
rows
.
residentialZipCode
,
communityInfo
.
data
.
rows
.
residentialAddress
+
' '
+
communityInfo
.
data
.
rows
.
residentialZipCode
,
});
});
}
}
},
[
communityInfo
]);
},
[
communityInfo
]);
...
...
src/pages/CommercialService/CardDetail.tsx
View file @
d8a40b9f
...
@@ -72,20 +72,25 @@ const CardDetail = (props: any) => {
...
@@ -72,20 +72,25 @@ const CardDetail = (props: any) => {
]
}
]
}
title=
"Apply Card Detail"
title=
"Apply Card Detail"
></
TitleBack
>
></
TitleBack
>
<
Row
gutter=
{
8
}
>
<
Row
gutter=
{
8
}
>
<
Col
>
Community:
</
Col
>
<
Col
>
Community:
</
Col
>
<
Col
span=
{
3
}
>
{
DataSave
.
community_name
}
</
Col
>
<
Col
span=
{
3
}
>
{
DataSave
.
community_name
}
</
Col
>
<
Col
>
u
nit:
</
Col
>
<
Col
>
U
nit:
</
Col
>
<
Col
>
<
Col
>
{
DataSave
.
build_number
}
#
{
DataSave
.
floor_number
}
-
{
DataSave
.
room_number
}
{
'BLK '
+
DataSave
.
build_number
+
'#'
+
DataSave
.
floor_number
+
'-'
+
DataSave
.
room_number
}
</
Col
>
</
Col
>
</
Row
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
>
Address:
</
Col
>
<
Col
>
Address:
</
Col
>
<
Col
>
<
Col
>
{
DataSave
.
zip_address
}
{
DataSave
.
build_number
}
#
{
DataSave
.
floor_number
}
-
{
DataSave
.
zip_address
}
{
DataSave
.
zip_code
}
{
DataSave
.
room_number
}
{
DataSave
.
zip_code
}
</
Col
>
</
Col
>
</
Row
>
</
Row
>
...
...
src/pages/PropertyManagement/ChargeDetail.tsx
View file @
d8a40b9f
...
@@ -51,8 +51,6 @@ const ChargeDetail = (props: any) => {
...
@@ -51,8 +51,6 @@ const ChargeDetail = (props: any) => {
/>
/>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
time1
}
>
UploadTime :
</
div
>
<
div
className=
{
styles
.
time2
}
>
{
timestampToTime
(
CurData
.
createTime
.
time
)
}
</
div
>
<
div
className=
{
styles
.
item21
}
>
Project (community)
</
div
>
<
div
className=
{
styles
.
item21
}
>
Project (community)
</
div
>
<
div
className=
{
styles
.
item22
}
>
{
CurData
.
communityName
}
</
div
>
<
div
className=
{
styles
.
item22
}
>
{
CurData
.
communityName
}
</
div
>
<
div
className=
{
styles
.
item23
}
>
{
CurData
.
streetName
}
</
div
>
<
div
className=
{
styles
.
item23
}
>
{
CurData
.
streetName
}
</
div
>
...
...
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
View file @
d8a40b9f
...
@@ -28,6 +28,7 @@ const UsersAdd = (props: any) => {
...
@@ -28,6 +28,7 @@ const UsersAdd = (props: any) => {
if
(
checkParam
(
values
))
{
if
(
checkParam
(
values
))
{
values
.
owerPhone
=
null
;
values
.
owerPhone
=
null
;
values
.
owerEmail
=
null
;
values
.
owerEmail
=
null
;
values
.
buildingNumber
=
'BLK '
+
values
.
buildingNumber
+
' '
;
RA
(
14
,
values
,
module
,
dispatch
);
RA
(
14
,
values
,
module
,
dispatch
);
setLoading
(
true
);
setLoading
(
true
);
}
else
{
}
else
{
...
@@ -64,6 +65,18 @@ const UsersAdd = (props: any) => {
...
@@ -64,6 +65,18 @@ const UsersAdd = (props: any) => {
}
}
callback
();
callback
();
};
};
const
checkData1
=
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
if
(
value
)
{
if
(
/^
[
0-9
]
+$/g
.
test
(
value
))
{
callback
();
}
else
{
callback
(
new
Error
(
'Only numbers!'
));
}
}
callback
();
};
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
{
/* 头部组件 */
}
...
@@ -94,19 +107,23 @@ const UsersAdd = (props: any) => {
...
@@ -94,19 +107,23 @@ const UsersAdd = (props: any) => {
<
Form
.
Item
>
<
Form
.
Item
>
<
Input
.
Group
>
<
Input
.
Group
>
<
div
className=
{
styles
.
box2item3
}
>
<
div
className=
{
styles
.
box2item3
}
>
<
Form
.
Item
name=
"buildingNumber"
noStyle
rules=
{
[{
validator
:
checkData
}]
}
>
<
Form
.
Item
name=
"buildingNumber"
rules=
{
[{
validator
:
checkData1
}]
}
>
<
Input
placeholder=
"B
uilding
"
style=
{
{
width
:
94
}
}
/>
<
Input
placeholder=
"B
LK
"
style=
{
{
width
:
94
}
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
<
div
className=
{
styles
.
box2item4
}
>
#
</
div
>
<
div
className=
{
styles
.
box2item4
}
>
#
</
div
>
<
div
className=
{
styles
.
box2item5
}
>
<
div
className=
{
styles
.
box2item5
}
>
<
Form
.
Item
name=
"floorNumber"
noStyle
rules=
{
[{
validator
:
checkData
}]
}
>
<
Form
.
Item
name=
"floorNumber"
rules=
{
[{
validator
:
checkData1
}]
}
>
<
Input
placeholder=
"Floor"
style=
{
{
width
:
80
}
}
/>
<
Input
placeholder=
"Floor"
style=
{
{
width
:
80
}
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
<
div
className=
{
styles
.
box2item6
}
>
——
</
div
>
<
div
className=
{
styles
.
box2item6
}
>
——
</
div
>
<
div
className=
{
styles
.
box2item7
}
>
<
div
className=
{
styles
.
box2item7
}
>
<
Form
.
Item
name=
"roomNumber"
noStyle
rules=
{
[{
validator
:
checkData
}]
}
>
<
Form
.
Item
name=
"roomNumber"
rules=
{
[{
validator
:
checkData
}]
}
style=
{
{
width
:
260
}
}
>
<
Input
placeholder=
"Room"
style=
{
{
width
:
112
}
}
/>
<
Input
placeholder=
"Room"
style=
{
{
width
:
112
}
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
d8a40b9f
...
@@ -90,7 +90,7 @@ const ServiceProviderManagement = (props: any) => {
...
@@ -90,7 +90,7 @@ const ServiceProviderManagement = (props: any) => {
disabled=
{
record
.
enable
==
'Deregistered'
?
true
:
false
}
disabled=
{
record
.
enable
==
'Deregistered'
?
true
:
false
}
onClick=
{
goToEdit
.
bind
(
this
,
record
)
}
onClick=
{
goToEdit
.
bind
(
this
,
record
)
}
>
>
e
dit
E
dit
</
a
>
</
a
>
</
Space
>
</
Space
>
),
),
...
@@ -192,7 +192,7 @@ const ServiceProviderManagement = (props: any) => {
...
@@ -192,7 +192,7 @@ const ServiceProviderManagement = (props: any) => {
for
(
let
items
in
tmp
)
{
for
(
let
items
in
tmp
)
{
switch
(
tmp
[
items
].
enable
)
{
switch
(
tmp
[
items
].
enable
)
{
case
0
:
case
0
:
tmp
[
items
].
enable
=
'
n
ormal'
;
tmp
[
items
].
enable
=
'
N
ormal'
;
break
;
break
;
case
1
:
case
1
:
tmp
[
items
].
enable
=
'Deregistered'
;
tmp
[
items
].
enable
=
'Deregistered'
;
...
...
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