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
7cf88132
Commit
7cf88132
authored
Sep 16, 2020
by
maple
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix]业主模块
parent
c6162e80
Changes
28
Hide whitespace changes
Inline
Side-by-side
Showing
28 changed files
with
552 additions
and
132 deletions
+552
-132
config.ts
config/config.ts
+3
-3
BackButton.tsx
src/components/BackButton/BackButton.tsx
+16
-2
Relationship.tsx
src/components/Relationship/Relationship.tsx
+26
-0
index.jsx
src/components/SelectOptions/index.jsx
+1
-1
TableShow.tsx
src/components/TableShow/TableShow.tsx
+17
-5
TitleBack.tsx
src/components/TitleBack/TitleBack.tsx
+2
-1
index.tsx
src/components/Toast/index.tsx
+11
-0
TreeAction.tsx
src/components/TreeAction/TreeAction.tsx
+3
-1
History.ts
src/models/Common/History.ts
+42
-0
PageData.ts
src/models/Common/PageData.ts
+27
-0
CommunityService.ts
src/models/CommunityManagement/CommunityService.ts
+29
-4
User.ts
src/models/CommunityManagement/User.ts
+29
-4
init.ts
src/models/init.ts
+2
-3
AccountManagement.tsx
...AccountManagement/AccountManagement/AccountManagement.tsx
+42
-36
Card.tsx
src/pages/CommercialService/Card.tsx
+9
-0
CardAdd.tsx
src/pages/CommercialService/CardAdd.tsx
+120
-0
CardDetail.tsx
src/pages/CommercialService/CardDetail.tsx
+12
-5
RenovationDetail.tsx
src/pages/CommercialService/RenovationDetail.tsx
+9
-3
CommunityAnnouncement.tsx
...anagement/CommunityAnnouncement/CommunityAnnouncement.tsx
+10
-8
Users.tsx
src/pages/UserManagement/LIFEUserManagement/Users.tsx
+58
-20
UsersAdd.tsx
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
+44
-23
UsersDetail.tsx
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
+4
-3
Template.tsx
src/pages/runTest/Template.tsx
+1
-1
Init.ts
src/services/Init.ts
+0
-1
tos.ts
src/services/tos.ts
+16
-5
method.ts
src/utils/method.ts
+4
-0
params.ts
src/utils/params.ts
+2
-2
string.ts
src/utils/string.ts
+13
-1
No files found.
config/config.ts
View file @
7cf88132
...
...
@@ -157,7 +157,8 @@ export default defineConfig({
name
:
'accessCardapplication'
,
routes
:[
{
path
:
'./'
,
component
:
'./CommercialService/Card'
},
{
path
:
'./Detail'
,
component
:
'./CommercialService/CardDetail'
},
{
path
:
'./Detail'
,
component
:
'./CommercialService/CardDetail'
},
{
path
:
'./Add'
,
component
:
'./CommercialService/CardAdd'
},
]
},
{
...
...
@@ -173,8 +174,7 @@ export default defineConfig({
{
path
:
'./Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./Edit'
,
component
:
'./CommercialService/Detail'
},
]
},
{
path
:
'./AccessCardApplication/Request'
,
component
:
'./CommercialService/AccessCardApplication/Request'
},
},
{
path
:
'./OwnerComplaints/Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./OwnerComplaints/Edit'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./ProblemFeedback/Detail'
,
component
:
'./CommercialService/Detail'
},
...
...
src/components/BackButton/BackButton.tsx
View file @
7cf88132
...
...
@@ -4,11 +4,20 @@ import styles from './index.less';
import
{
Button
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
{
URL
}
from
'@/utils/method'
const
module2
=
"History"
const
BackButton
=
(
props
:
any
)
=>
{
const
{
history_url
,
dispatch
}
=
props
const
url
=
props
.
url
;
const
goToReturn
=
()
=>
{
// history.back()
URL
(
history
.
location
.
pathname
,
module2
,
dispatch
)
console
.
log
(
"这里的地址为"
)
console
.
log
(
history
.
location
.
pathname
)
history
.
go
(
-
1
)
}
const
goToReturnByParam
=
()
=>
{
...
...
@@ -29,5 +38,10 @@ const BackButton = (props:any) => {
)
};
export
default
BackButton
;
function
mapStateToProps
(
state
:
any
)
{
const
{
history_url
}
=
state
.
History
;
return
{
history_url
,
};
}
export
default
connect
(
mapStateToProps
)(
BackButton
);
src/components/Relationship/Relationship.tsx
0 → 100644
View file @
7cf88132
import
React
,{
useEffect
}
from
'react'
;
import
{
Select
}
from
'antd'
;
const
{
Option
}
=
Select
;
const
Relationship
=
(
props
:
any
)
=>
{
const
{
value
,
onChange
}
=
props
useEffect
(()
=>
{
onChange
(
"0"
)
},[])
const
handleChange
=
(
values
:
any
)
=>
{
onChange
(
values
)
}
return
(
<>
<
Select
defaultValue=
"0"
style=
{
{
width
:
120
}
}
onChange=
{
handleChange
}
allowClear
>
<
Option
value=
"0"
>
Oneself
</
Option
>
<
Option
value=
"1"
>
Family Members
</
Option
>
<
Option
value=
"2"
>
Tenant
</
Option
>
</
Select
>
</>
);
};
export
default
Relationship
;
src/components/SelectOptions/index.jsx
View file @
7cf88132
...
...
@@ -111,7 +111,7 @@ class SelectOptions extends React.Component {
componetVisible
:
'Put It Away'
,
})
}
console
.
log
(
"初始化2"
)
//
console.log("初始化2")
};
...
...
src/components/TableShow/TableShow.tsx
View file @
7cf88132
...
...
@@ -34,12 +34,16 @@ const TableShow = (props:any) => {
// ower_email: "535740436@qq.com"
// ower_name: "测试"
// ower_phone: "微微"
const
user_status
=
[[
1
,
"家属"
],[
2
,
"租户"
]]
const
user_status
=
[[
1
,
"家属"
],
[
2
,
"租户"
]]
const
user_type_status
=
[
"Registered"
,
"Unregistered"
,
"Cancellation"
]
const
user_code
=
[
"Used"
,
"Not Used"
]
const
key
=
objectColumns
([
[
"User Name"
,
"ower_name"
],
[
"Contact Details"
,
"ower_phone"
],
[
"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
>)],
[
"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
>)],
[
"Actions"
,
null
,
(
text
:
any
,
record
:
any
)
=>
(<
Space
size=
"middle"
>
<
a
onClick=
{
goTo
.
bind
(
this
,
record
)
}
>
Detail
</
a
></
Space
>)],
])
...
...
@@ -59,15 +63,23 @@ const TableShow = (props:any) => {
<
Row
gutter=
{
32
}
>
<
Col
span=
{
20
}
>
<
Table
title=
{
()
=>
{
return
(<
Row
gutter=
{
32
}
><
Col
>
Unit No:
</
Col
><
Col
>
{
unit
.
living
}
</
Col
><
Col
>
{
props
.
deleteDisable
?
<
Button
type=
"danger"
onClick=
{
deleteUnit
.
bind
(
this
,
unit
.
living
)
}
>
Delete
</
Button
>
:
null
}
</
Col
></
Row
>)
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
style=
{
{
position
:
"absolute"
,
right
:
0
,
bottom
:
16
}
}
>
{
props
.
deleteDisable
?
<
Button
type=
"danger"
onClick=
{
deleteUnit
.
bind
(
this
,
unit
.
living
)
}
>
Delete
</
Button
>
:
null
}
</
div
>
</
div
>
)
}
}
footer=
{
()
=>
''
}
rowKey=
{
"ower_name"
}
dataSource=
{
unit
.
member
}
columns=
{
key
}
pagination=
{
false
}
></
Table
>
</
Col
>
<
Col
>
<
Row
>
<
img
width=
{
80
}
src=
{
unit
.
imgUrl
}
/>
</
Row
>
<
Row
style=
{
{
marginTop
:
8
}
}
><
div
style=
{
{
width
:
80
,
textAlign
:
"center"
}
}
>
{
((
item
.
unit
)[
0
].
member
)[
0
].
cdk_code
}
</
div
></
Row
>
<
Row
style=
{
{
marginTop
:
8
}
}
><
div
style=
{
{
width
:
80
,
textAlign
:
"center"
}
}
>
{
((
item
.
unit
)[
0
].
member
)[
0
].
cdk_code
}
(
{
user_code
[((
item
.
unit
)[
0
].
member
)[
0
].
cdk_status
]
}
)
</
div
></
Row
>
</
Col
>
</
Row
>
...
...
src/components/TitleBack/TitleBack.tsx
View file @
7cf88132
...
...
@@ -6,6 +6,7 @@ import TitleGet from '../TitleGet/TitleGet';
const
TitleBack
=
(
props
:
any
)
=>
{
// <TitleBack sublist={['Handle Status : '+CurDataDetail.status,'Create Time : '+CurDataDetail.time]} title={headTitle} />
const
backData
=
(
values
:
any
)
=>
{
props
.
titleBack
(
values
)
}
...
...
@@ -15,7 +16,7 @@ const TitleBack = (props:any) => {
{
props
.
sublist
!=
null
?
(
props
.
sublist
).
map
(
(
item
:
any
,
index
:
any
)
=>
{
(
props
.
sublist
).
map
((
item
:
any
,
index
:
any
)
=>
{
return
(
<
div
key=
{
index
}
className=
{
styles
.
item1
}
>
{
item
}
</
div
>
)
...
...
src/components/Toast/index.tsx
0 → 100644
View file @
7cf88132
import
React
from
'react'
;
const
index
=
(
props
:
any
)
=>
{
return
(
<>
<
div
className=
{
styles
.
item
}
>
{
props
.
title
}
</
div
>
</>
);
};
export
default
index
;
src/components/TreeAction/TreeAction.tsx
View file @
7cf88132
...
...
@@ -91,6 +91,7 @@ const treeData = [
const
TreeAction
=
(
props
:
any
)
=>
{
const
{
value
,
onChange
}
=
props
const
onSelect
=
(
selectedKeys
:
any
,
info
:
any
)
=>
{
// console.log('selected', selectedKeys, info);
};
...
...
@@ -109,7 +110,8 @@ const TreeAction = (props:any) => {
array
.
push
(
items
)
}
})
props
.
onSubmit
(
array
)
// props.onSubmit(array)
onChange
(
array
)
};
return
(
...
...
src/models/Common/History.ts
0 → 100644
View file @
7cf88132
import
{
message
}
from
'antd'
;
import
{
routerRedux
}
from
'dva/router'
export
default
{
namespace
:
'History'
,
state
:
{
pageData
:
null
,
history_url
:
null
,
},
reducers
:
{
PageData
(
state
,
{
pageData
})
{
return
{
...
state
,
pageData
};
},
returnURL
(
state
,
{
history_url
})
{
return
{
...
state
,
history_url
};
},
},
effects
:
{
//页面处理
*
PAGE
({
playload
},
{
put
})
{
let
pageData
=
playload
;
yield
put
({
type
:
'PageData'
,
pageData
,
});
},
//链接
*
URL
({
playload
},
{
put
})
{
let
history_url
=
playload
;
console
.
log
(
"保存地址"
);
yield
put
({
type
:
'returnURL'
,
history_url
});
},
*
URLCLEAR
({
},
{
put
})
{
let
history_url
=
null
;
yield
put
({
type
:
'returnURL'
,
history_url
});
}
},
};
src/models/Common/PageData.ts
0 → 100644
View file @
7cf88132
import
{
message
}
from
'antd'
;
import
{
routerRedux
}
from
'dva/router'
export
default
{
namespace
:
'PageData'
,
state
:
{
pageData
:
null
,
},
reducers
:
{
returnPageData
(
state
,
{
pageData
})
{
return
{
...
state
,
pageData
};
},
},
effects
:
{
//页面处理
*
PAGE
({
playload
},
{
put
})
{
let
pageData
=
playload
;
console
.
log
(
"页面处理"
)
yield
put
({
type
:
'returnPageData'
,
pageData
,
});
},
},
};
src/models/CommunityManagement/CommunityService.ts
View file @
7cf88132
...
...
@@ -15,7 +15,9 @@ export default {
CurData
:
null
,
CurDataDetail
:
{},
Data7
:
null
,
Data8
:
null
,
Data8
:
null
,
Result
:
null
,
DataSaveDetail
:
null
,
},
reducers
:
{
...
...
@@ -37,6 +39,13 @@ export default {
returnPage8
(
state
,
{
Data8
})
{
return
{
...
state
,
Data8
};
},
returnResult
(
state
,
{
Result
})
{
return
{
...
state
,
Result
};
},
returnDataSaveDetail
(
state
,
{
DataSaveDetail
})
{
return
{
...
state
,
DataSaveDetail
};
},
},
effects
:
{
...
...
@@ -115,8 +124,17 @@ export default {
}
break
;
case
31
:
{
let
Data7
=
resp
;
yield
put
({
type
:
'returnPage7'
,
Data7
})
}
yield
put
({
type
:
'returnPage7'
,
Data7
})
}
break
;
case
35
:
{
let
Result
=
resp
;
yield
put
({
type
:
'returnResult'
,
Result
})
}
break
;
case
37
:
case
36
:
{
let
DataSaveDetail
=
resp
;
yield
put
({
type
:
'returnDataSaveDetail'
,
DataSaveDetail
,
});
}
break
;
}
...
...
@@ -160,7 +178,14 @@ export default {
*
setCurDataDetail
({
playload
},
{
call
,
put
})
{
var
CurDataDetail
=
{
community
:
''
,
address
:
''
,
home
:
''
,
name
:
''
,
phone
:
''
,
email
:
''
,
content
:
''
}
yield
put
({
type
:
'returnCurDataDetail'
,
CurDataDetail
,
});
}
},
*
ResultClear
({
},
{
put
})
{
var
Result
=
null
console
.
log
(
"清除"
)
yield
put
({
type
:
'returnResult'
,
Result
}
)
},
},
};
src/models/CommunityManagement/User.ts
View file @
7cf88132
...
...
@@ -14,7 +14,10 @@ export default {
DataSaveDetail
:
null
,
sourceData
:
null
,
curString
:{
subscribeDate
:
null
,
status
:
null
,
curPage
:
1
,
curPage2
:
1
}
curString
:
{
subscribeDate
:
null
,
status
:
null
,
curPage
:
1
,
curPage2
:
1
},
communityInfo
:
null
,
pageDate
:
null
,
},
reducers
:
{
...
...
@@ -38,8 +41,14 @@ export default {
},
returnResult
(
state
,
{
Result
})
{
return
{...
state
,
Result
}
}
},
returnCommunityInfo
(
state
,
{
communityInfo
})
{
return
{...
state
,
communityInfo
}
},
PageDate
(
state
,
{
pageDate
})
{
return
{...
state
,
pageDate
}
}
},
...
...
@@ -47,7 +56,14 @@ export default {
//预订设施查询
*
RA
({
playload
},
{
call
,
put
})
{
switch
(
playload
.
index
)
{
case
12
:
{
let
Data
=
null
;
yield
put
({
type
:
'returnPage'
,
Data
});
}
break
;
}
const
resp
=
yield
call
(
service
.
RA
,
playload
);
console
.
log
(
resp
)
if
(
resp
.
code
==
500
||
resp
.
error_code
!=
"0000"
)
{
...
...
@@ -90,6 +106,10 @@ export default {
case
16
:
{
console
.
log
(
"等待删除完成"
)
}
break
;
case
32
:
{
let
communityInfo
=
resp
;
yield
put
({
type
:
'returnCommunityInfo'
,
communityInfo
});
}
break
;
}
}
...
...
@@ -123,6 +143,11 @@ export default {
var
tmp
=
null
yield
put
({
type
:
'returnResult'
,
tmp
}
)
},
*
PAGE
({
playload
},
{
put
})
{
var
pageDate
=
playload
yield
put
({
type
:
'PageDate'
,
pageDate
})
},
},
};
src/models/init.ts
View file @
7cf88132
...
...
@@ -18,9 +18,8 @@ export default {
effects
:
{
//获取物业费列表
*
tosCommunityget
({
playload
},
{
call
,
put
})
{
console
.
log
(
playload
)
//获取
*
tosCommunityget
({
playload
},
{
call
,
put
})
{
const
resp
=
yield
call
(
service
.
tosCommunityget
,
playload
);
let
CommunityList
=
resp
.
data
.
communityList
;
yield
put
({
type
:
'returnCommunityList'
,
CommunityList
,
});
...
...
src/pages/AccountManagement/AccountManagement/AccountManagement.tsx
View file @
7cf88132
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./index.less'
;
import
{
Input
,
Button
,
Table
,
Space
,
Pagination
,
Tooltip
,
Radio
}
from
'antd'
;
import
{
Input
,
Button
,
Table
,
Space
,
Pagination
,
Form
,
Select
,
Layout
}
from
'antd'
;
const
{
Option
}
=
Select
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
...
...
@@ -8,6 +9,8 @@ import SelectOptions from '../../../components/SelectOptions/index';
import
TreeAction
from
'../../../components/TreeAction/TreeAction'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
SelectCommunity
from
'@/components/SelectCommunity'
;
import
Line
from
'@/components/Line/Line'
;
const
printContent
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
...
...
@@ -20,46 +23,49 @@ const getTreeActionValues = (comment: any)=>{
const
AccountManagement
=
()
=>
{
const
AccountManagement
=
(
props
:
any
)
=>
{
const
{
dispatch
}
=
props
;
const
formRef
=
useRef
(
null
)
const
onFinish
=
(
values
:
any
)
=>
{
console
.
log
(
values
)
}
return
(
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件v1.2 */
}
<
TitleBack
title=
"Admin Account Adding"
/>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1item1
}
>
Account ID
</
div
>
<
div
className=
{
styles
.
box1item2
}
><
Input
/></
div
>
</
div
>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2item1
}
>
Administrator Name
</
div
>
<
div
className=
{
styles
.
box2item2
}
><
Input
/></
div
>
<
div
className=
{
styles
.
box2item3
}
>
Contact Details
</
div
>
<
div
className=
{
styles
.
box2item4
}
><
Input
/></
div
>
</
div
>
<
SelectOptions
list=
{
[
"美国"
,
"美丽的"
,
"美好"
,
"加拿大"
,
"加油"
,
"XO"
].
sort
()
}
onSubmit=
{
printContent
}
/>
<
div
className=
{
styles
.
box3
}
>
<
div
className=
{
styles
.
box3item1
}
>
Permission Configuration
</
div
>
<
div
className=
{
styles
.
box3item2
}
>
<
div
className=
{
styles
.
box3item2R
}
><
Radio
>
Secondary Administrator
</
Radio
></
div
>
<
div
className=
{
styles
.
box3item2R
}
><
Radio
>
Three Level Administrator
</
Radio
></
div
>
<
div
className=
{
styles
.
box3item2R
}
><
Radio
>
Select All
</
Radio
></
div
>
</
div
>
<
div
className=
{
styles
.
box3item3
}
>
<
Input
/>
</
div
>
</
div
>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4item1
}
></
div
>
<
div
className=
{
styles
.
box4item2
}
>
<
TreeAction
onSubmit=
{
getTreeActionValues
}
/>
</
div
>
</
div
>
<
div
className=
{
styles
.
line
}
></
div
><
Button
type=
"primary"
style=
{
{
width
:
80
,
height
:
32
}
}
>
Submit
</
Button
>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
<
Form
.
Item
name=
"Account"
label=
"Account"
><
Input
placeholder=
"account Name"
style=
{
{
width
:
120
}
}
/></
Form
.
Item
>
<
Form
.
Item
name=
"Password"
label=
"Password"
><
Input
placeholder=
"password"
style=
{
{
width
:
120
}
}
/></
Form
.
Item
>
<
Form
.
Item
label=
"Contact Details"
>
<
Input
.
Group
compact
>
<
Form
.
Item
name=
"phone"
style=
{
{
marginRight
:
16
}
}
><
Input
placeholder=
"Phone number"
></
Input
></
Form
.
Item
>
<
Form
.
Item
name=
"email"
><
Input
placeholder=
"Email"
></
Input
></
Form
.
Item
>
</
Input
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
name=
"community"
label=
"Community"
><
SelectCommunity
></
SelectCommunity
></
Form
.
Item
>
<
Form
.
Item
label=
"Level"
name=
"tosuserLevel"
>
<
Select
placeholder=
"Level"
style=
{
{
width
:
120
}
}
>
<
Option
value=
"0"
>
Secondary Administrator
</
Option
>
<
Option
value=
"1"
>
Three Level Administrator
</
Option
>
<
Option
value=
"2"
>
Select All
</
Option
>
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
name=
"premission"
label=
"Permission"
>
<
TreeAction
onSubmit=
{
getTreeActionValues
}
/>
</
Form
.
Item
>
<
Line
></
Line
>
<
Form
.
Item
wrapperCol=
{
{
...
Layout
.
wrapperCol
,
offset
:
2
}
}
><
Button
type=
"primary"
htmlType=
"submit"
>
Submit
</
Button
></
Form
.
Item
>
</
Form
>
</
div
>
);
};
...
...
src/pages/CommercialService/Card.tsx
View file @
7cf88132
...
...
@@ -60,12 +60,21 @@ const Card = (props:any) => {
history
.
push
(
'./AccessCardApplication/Detail'
)
}
const
goToAdd
=
(
values
:
any
,
e
:
any
)
=>
{
history
.
push
(
'./AccessCardApplication/Add'
)
}
return
(
<
div
style=
{
{
width
:
"100%"
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
"#ffffff"
}
}
>
{
Data7
!=
null
?
<>
<
div
style=
{
{
height
:
80
,
position
:
"relative"
}
}
>
<
div
style=
{
{
position
:
"absolute"
,
right
:
0
}
}
>
<
Button
type=
"primary"
onClick=
{
goToAdd
}
>
Apply Card
</
Button
>
</
div
>
</
div
>
<
Table
loading=
{
false
}
rowKey=
"id"
style=
{
{
marginTop
:
16
}
}
dataSource=
{
Data7
.
data
.
rows
}
columns=
{
columns
}
...
...
src/pages/CommercialService/CardAdd.tsx
0 → 100644
View file @
7cf88132
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Input
,
Tabs
,
Table
,
Space
,
Button
,
Form
,
Row
,
Col
,
Layout
,
message
}
from
'antd'
;
const
{
TabPane
}
=
Tabs
;
import
{
connect
,
history
}
from
'umi'
;
import
{
RA
,
ResultClear
}
from
'@/utils/method'
;
import
TitleBack
from
'@/components/TitleBack/TitleBack'
;
import
SearchOptionsCommnity
from
'@/components/SearchOptions/SearchOptionsCommnity'
;
import
Line
from
'@/components/Line/Line'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
import
Relationship
from
'@/components/Relationship/Relationship'
;
const
module
=
"CommunityService"
const
CardAdd
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Result
}
=
props
;
const
formRef
=
useRef
(
null
)
useEffect
(()
=>
{
if
(
Result
!=
null
)
{
console
.
log
(
"初始化页面参数"
)
console
.
log
(
Result
)
if
(
Result
.
error_code
=
"0000"
)
{
message
.
success
(
"Operation Success!"
)
ResultClear
(
module
,
dispatch
)
}
else
{
message
.
error
(
"Operation Fail!"
)
ResultClear
(
module
,
dispatch
)
history
.
go
(
-
1
)
}
}
},
[
Result
])
useEffect
(()
=>
{
var
param
=
{
"communityName"
:
"A4"
,
"buildNumber"
:
"01"
,
"floorNumber"
:
"02"
,
"roomNumber"
:
"369"
,
"zipCode"
:
"510000"
,
"communityOwner"
:
"jack-小雄"
,
"communityOwnerPhone"
:
"18813757878"
,
"communityOwnerEmail"
:
"sale2huahuico.com"
,
"applyName"
:
"小李子"
,
"applyNamePhone"
:
"13436989568"
,
"applyNameEmail"
:
"xiaoli@huahuico.com"
,
"applyRelationOwner"
:
"2"
,
"applyReasonContent"
:
"租房"
,
"description"
:
"test"
}
formRef
.
current
.
setFieldsValue
(
param
)
},
[])
const
onFinish
=
(
values
:
any
)
=>
{
console
.
log
(
values
)
RA
(
35
,
values
,
module
,
dispatch
);
}
return
(
<
div
style=
{
{
width
:
"100%"
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
"#ffffff"
}
}
>
<
TitleBack
title=
{
"Apply Card"
}
></
TitleBack
>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
label=
"Community"
style=
{
{
marginBottom
:
0
}
}
>
<
Input
.
Group
compact
>
<
Form
.
Item
name=
"communityName"
style=
{
{
marginRight
:
20
}
}
><
SearchOptionsCommnity
/></
Form
.
Item
>
<
Form
.
Item
name=
"buildNumber"
style=
{
{
marginRight
:
16
}
}
><
Input
style=
{
{
width
:
80
}
}
placeholder=
{
"Building"
}
/></
Form
.
Item
>
<
div
style=
{
{
lineHeight
:
2
,
marginRight
:
16
}
}
>
#
</
div
>
<
Form
.
Item
name=
"floorNumber"
style=
{
{
marginRight
:
16
}
}
><
Input
style=
{
{
width
:
80
}
}
placeholder=
{
"Floor"
}
/></
Form
.
Item
>
<
div
style=
{
{
lineHeight
:
2
,
marginRight
:
16
}
}
>
-
</
div
>
<
Form
.
Item
name=
"roomNumber"
><
Input
style=
{
{
width
:
120
}
}
placeholder=
{
"Room"
}
/></
Form
.
Item
>
</
Input
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
name=
"zipCode"
wrapperCol=
{
{
...
Layout
.
wrapperCol
,
offset
:
3
}
}
><
Input
style=
{
{
width
:
400
}
}
></
Input
></
Form
.
Item
>
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
label=
"Owner Name"
style=
{
{
marginBottom
:
-
40
}
}
>
<
Input
.
Group
compact
>
<
Form
.
Item
name=
"communityOwner"
style=
{
{
marginRight
:
20
}
}
><
Input
placeholder=
{
"Name"
}
/></
Form
.
Item
>
<
Form
.
Item
style=
{
{
marginRight
:
20
}
}
label=
{
"Contact Information"
}
><
Input
hidden=
{
true
}
/></
Form
.
Item
>
<
Form
.
Item
name=
"communityOwnerPhone"
style=
{
{
marginRight
:
20
}
}
><
Input
placeholder=
{
"Phone number"
}
/></
Form
.
Item
>
<
Form
.
Item
name=
"communityOwnerEmail"
><
Input
placeholder=
{
"Email"
}
/></
Form
.
Item
>
</
Input
.
Group
>
</
Form
.
Item
>
<
Line
></
Line
>
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
label=
"Applicant"
style=
{
{
marginBottom
:
-
40
}
}
>
<
Input
.
Group
compact
>
<
Form
.
Item
name=
"applyName"
style=
{
{
marginRight
:
20
}
}
><
Input
placeholder=
{
"Name"
}
/></
Form
.
Item
>
<
Form
.
Item
style=
{
{
marginRight
:
20
}
}
label=
{
"Contact Information"
}
><
Input
placeholder=
{
"Phone number"
}
hidden=
{
true
}
/></
Form
.
Item
>
<
Form
.
Item
name=
"applyNamePhone"
style=
{
{
marginRight
:
20
}
}
><
Input
placeholder=
{
"Phone number"
}
/></
Form
.
Item
>
<
Form
.
Item
name=
"applyNameEmail"
><
Input
placeholder=
{
"Email"
}
/></
Form
.
Item
>
</
Input
.
Group
>
</
Form
.
Item
>
{
/* label={"Contact Information"} */
}
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
name=
"applyRelationOwner"
label=
{
"Relationship"
}
><
Relationship
/></
Form
.
Item
>
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
name=
"applyReasonContent"
label=
{
"Reason"
}
><
TextArea
style=
{
{
width
:
400
}
}
></
TextArea
></
Form
.
Item
>
<
Line
></
Line
>
<
Form
.
Item
wrapperCol=
{
{
...
Layout
.
wrapperCol
,
offset
:
3
}
}
><
Button
type=
"primary"
htmlType=
"submit"
>
Submit
</
Button
></
Form
.
Item
>
</
Form
>
</
div
>
);
};
function
map
(
state
:
any
)
{
const
{
Result
}
=
state
[
module
]
return
{
Result
}
}
export
default
connect
(
map
)(
CardAdd
);
\ No newline at end of file
src/pages/CommercialService/CardDetail.tsx
View file @
7cf88132
...
...
@@ -12,14 +12,21 @@ import TextArea from 'antd/lib/input/TextArea';
const
module
=
"CommunityService"
const
CardDetail
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data
,
DataSave
}
=
props
;
const
{
dispatch
,
Data
,
DataSave
,
DataSaveDetail
}
=
props
;
const
formRef
=
useRef
(
null
)
useEffect
(()
=>
{
if
(
DataSaveDetail
!=
null
)
{
console
.
log
(
DataSaveDetail
)
}
},
[
DataSaveDetail
])
useEffect
(()
=>
{
if
(
DataSave
!=
null
)
{
console
.
log
(
"初始化页面参数"
)
console
.
log
(
DataSave
);
RA
(
36
,
{
id
:
DataSave
.
id
},
module
,
dispatch
);
/* apply_name: "jack-小白白"
apply_reason_content: "H4sIAAAAAAAAAHuyo/fJnlkAljbS9QYAAAA="
apply_relation_owner: 0
...
...
@@ -99,7 +106,7 @@ const CardDetail = (props:any) => {
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Examine:
</
Col
>
<
Col
span=
{
4
}
><
Form
.
Item
name=
"applyStatus"
><
Radio
.
Group
><
Radio
.
Button
value=
{
"1"
}
>
Agree
</
Radio
.
Button
><
Radio
.
Button
style=
{
{
marginLeft
:
2
0
}
}
value=
{
"2"
}
>
Refuse
</
Radio
.
Button
></
Radio
.
Group
></
Form
.
Item
></
Col
>
<
Col
span=
{
4
}
><
Form
.
Item
name=
"applyStatus"
><
Radio
.
Group
><
Radio
.
Button
value=
{
"1"
}
>
Agree
</
Radio
.
Button
><
Radio
.
Button
style=
{
{
marginLeft
:
1
0
}
}
value=
{
"2"
}
>
Refuse
</
Radio
.
Button
></
Radio
.
Group
></
Form
.
Item
></
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
...
...
@@ -123,7 +130,7 @@ const CardDetail = (props:any) => {
};
function
map
(
state
:
any
)
{
const
{
Data
,
DataSave
}
=
state
[
module
]
return
{
Data
,
DataSave
}
const
{
Data
,
DataSave
,
DataSaveDetail
}
=
state
[
module
]
return
{
Data
,
DataSave
,
DataSaveDetail
}
}
export
default
connect
(
map
)(
CardDetail
);
\ No newline at end of file
src/pages/CommercialService/RenovationDetail.tsx
View file @
7cf88132
...
...
@@ -14,13 +14,19 @@ import { values } from 'lodash';
const
module
=
"CommunityService"
const
RenovationDetail
=
(
props
:
any
)
=>
{
const
{
dispatch
,
DataSave
}
=
props
;
const
{
dispatch
,
DataSave
,
DataSaveDetail
}
=
props
;
const
formRef
=
useRef
(
null
)
useEffect
(()
=>
{
if
(
DataSaveDetail
!=
null
)
{
console
.
log
(
DataSaveDetail
)
}
},[
DataSaveDetail
])
useEffect
(()
=>
{
if
(
DataSave
!=
null
)
{
console
.
log
(
"初始化页面参数"
)
console
.
log
(
DataSave
);
RA
(
37
,{
id
:
DataSave
.
id
},
module
,
dispatch
)
// applyfor_name: "jack-小白白"
// communityId: "7e5c6fd2f4ba497a90e64535df6e9088"
// community_build_decorate: "01"
...
...
@@ -118,7 +124,7 @@ const RenovationDetail = (props:any) => {
};
function
map
(
state
:
any
)
{
const
{
DataSave
}
=
state
[
module
]
return
{
DataSave
}
const
{
DataSave
,
DataSaveDetail
}
=
state
[
module
]
return
{
DataSave
,
DataSaveDetail
}
}
export
default
connect
(
map
)(
RenovationDetail
);
\ No newline at end of file
src/pages/CommunityManagement/CommunityAnnouncement/CommunityAnnouncement.tsx
View file @
7cf88132
...
...
@@ -4,7 +4,7 @@ import { Input ,Tabs,Table,Space, Button} from 'antd';
const
{
TabPane
}
=
Tabs
;
import
{
objectColumns
}
from
'@/utils/string'
;
import
{
timestampToTime3
}
from
'@/utils/time'
import
{
timestampToTime3
,
timestampToTime
}
from
'@/utils/time'
// communityNum: "A7"
// count: 0
// createTime: "Jul 8, 2020 7:38:37 PM"
...
...
@@ -19,13 +19,7 @@ import {timestampToTime3} from '@/utils/time'
// noticTitlel: "大家好,今年端午节不放假"
// updateTime: "Jun 28, 2020 7:38:39 PM"
const
columns
=
objectColumns
(
[
[
"community"
,
"communityNum"
],
[
"Title"
,
"noticTitlel"
],
[
"Publish Time"
,
null
,
(
text
:
any
,
record
:
any
)
=>
(<
Space
size=
"middle"
>
{
record
.
noticStartTime
.
time
}
</
Space
>)],
[
"noticScope"
,
"noticScope"
],
[
"Actions"
,
null
,
(
text
:
any
,
record
:
any
)
=>
(<
Space
size=
"middle"
>
<
a
>
Detail
</
a
></
Space
>)],
])
import
{
RA
}
from
'@/utils/method'
;
const
goToAdd
=
()
=>
{
...
...
@@ -34,6 +28,14 @@ const goToAdd = () => {
const
module
=
"CommunityAnnouncement"
const
CommunityAnnouncement
=
(
props
:
any
)
=>
{
const
columns
=
objectColumns
(
[
[
"community"
,
"communityNum"
],
[
"Title"
,
"noticTitlel"
],
[
"Publish Time"
,
"noticStartTime"
,
(
text
:
any
,
record
:
any
)
=>
(<
Space
size=
"middle"
>
{
text
!=
null
?
timestampToTime
(
text
.
time
):
null
}
</
Space
>)],
[
"noticScope"
,
"noticScope"
],
[
"Actions"
,
null
,
(
text
:
any
,
record
:
any
)
=>
(<
Space
size=
"middle"
>
<
a
>
Detail
</
a
></
Space
>)],
])
const
{
dispatch
,
Data
}
=
props
;
useEffect
(()
=>
{
RA
(
25
,{
communityNum
:
""
,
noticTitlel
:
""
},
module
,
dispatch
)
...
...
src/pages/UserManagement/LIFEUserManagement/Users.tsx
View file @
7cf88132
...
...
@@ -10,12 +10,16 @@ import TitleSearch from '../../../components/TitleSearch/TitleSearch';
import
{
timestampToTime
}
from
'../../../utils/time'
;
import
{
PAGE
,
RA
,
URLCLEAR
}
from
'@/utils/method'
;
import
PageData
from
'@/models/Common/PageData'
;
const
module
=
"User"
const
module2
=
"History"
const
module3
=
"PageData"
const
Users
=
(
props
:
any
)
=>
{
const
{
formatMessage
}
=
useIntl
();
const
{
dispatch
,
location
,
Data
,
CommunityList
}
=
props
;
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'User/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
})
};
const
{
dispatch
,
location
,
Data
,
CommunityList
,
pageData
,
history_url
}
=
props
;
const
SA
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'User/SA'
,
playload
:
values
})
};
const
nameofowner
=
formatMessage
({
id
:
'R.charge.input.nameofowner'
})
...
...
@@ -31,9 +35,9 @@ const Users = (props:any) => {
const
paymentsetting
=
formatMessage
({
id
:
'R.charge.paymentsetting'
})
// const string2mean = [[0, "未注册"], [1, "注册"], [2, "注销"]]
const
string2mean
=
[[
0
,
"Unregistered"
],[
1
,
"
registered"
],
[
2
,
"d
eregistered"
]]
const
string2mean
=
[[
0
,
"Unregistered"
],[
1
,
"
Registered"
],
[
2
,
"D
eregistered"
]]
const
[
curString
,
setCurString
]
=
useState
(
{
defaultCurrent
:
1
,
total
:
0
}
)
const
[
curString
,
setCurString
]
=
useState
(
null
)
const
[
fileUpload
,
setFileUpload
]
=
useState
(
false
);
const
[
fileUploading
,
setFileUploading
]
=
useState
(
false
)
...
...
@@ -80,25 +84,47 @@ const Users = (props:any) => {
}
useEffect
(()
=>
{
// console.log(CommunityList )
if
(
CommunityList
!=
null
)
{
RA
(
12
,
{
ownerName
:
null
,
communityArray
:
CommunityList
});
if
(
CommunityList
!=
null
)
{
console
.
log
(
"小组件开始请求"
)
RA
(
12
,
{
ownerName
:
null
,
communityArray
:
CommunityList
},
module
,
dispatch
);
}
},[
CommunityList
])
},
[
CommunityList
])
useEffect
(()
=>
{
if
(
Data
!=
null
)
{
var
tmp
=
curString
var
tmp
=
{
serach
:
{
name
:
null
,
cell
:
null
},
defaultCurrent
:
1
,
total
:
0
}
if
(
history_url
!=
null
&&
history
.
location
.
pathname
!=
history_url
)
{
console
.
log
(
"旧页面"
);
console
.
log
(
history_url
)
console
.
log
(
history
.
location
.
pathname
)
console
.
log
(
pageData
)
tmp
.
defaultCurrent
=
pageData
.
defaultCurrent
;
}
else
{
console
.
log
(
"新页面"
)
}
tmp
.
total
=
Data
.
total
// message.info("test", 5);
setCurString
(
tmp
)
console
.
log
(
tmp
)
URLCLEAR
(
module2
,
dispatch
)
}
},[
Data
])
},
[
Data
])
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
SA
(
values
)
console
.
log
(
"保存页面参数"
)
console
.
log
(
curString
)
PAGE
(
curString
,
module3
,
dispatch
)
history
.
push
(
location
.
pathname
+
'/Detail'
)
}
const
goToEdit
=
(
values
:
any
,
e
:
any
)
=>
{
...
...
@@ -119,7 +145,7 @@ const Users = (props:any) => {
{
title
:
actions
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
<
a
onClick=
{
goToEdit
.
bind
(
this
,
record
)
}
>
Edit
</
a
>
<
a
onClick=
{
goToEdit
.
bind
(
this
,
record
)
}
disabled=
{
record
.
enable
==
2
?
true
:
false
}
>
Edit
</
a
>
<
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Detail
</
a
>
</
Space
>
),
...
...
@@ -130,14 +156,22 @@ const Users = (props:any) => {
console
.
log
(
comment
)
var
tmp
=
curString
tmp
.
total
=
0
setCurString
(
tmp
)
tmp
.
serach
.
name
=
comment
.
OwnerName
tmp
.
serach
.
cell
=
comment
.
serviceCommunityList
setCurString
(
tmp
)
RA
(
12
,
{
ownerName
:
comment
.
OwnerName
,
communityArray
:
comment
.
serviceCommunityList
});
}
,
module
,
dispatch
);
}
const
pageChange
=
(
values
:
any
)
=>
{
var
tmp
=
curString
tmp
.
defaultCurrent
=
values
.
current
setCurString
(
tmp
)
}
return
(
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
...
...
@@ -163,7 +197,7 @@ const Users = (props:any) => {
{
/* 列表组件 */
}
{
Data
!=
null
?
<
Table
rowKey=
{
"id"
}
style=
{
{
marginTop
:
16
}
}
dataSource=
{
Data
.
rows
}
columns=
{
columns
}
pagination=
{
curString
}
/>
<
Table
rowKey=
{
"id"
}
style=
{
{
marginTop
:
16
}
}
dataSource=
{
Data
.
rows
}
columns=
{
columns
}
pagination=
{
curString
}
onChange=
{
pageChange
}
/>
:
null
}
</>
:
...
...
@@ -182,13 +216,17 @@ const Users = (props:any) => {
};
function
mapStateToProps
(
state
:
any
)
{
const
{
sourceData
,
DataSave
,
Data
}
=
state
.
User
;
const
{
sourceData
,
DataSave
,
Data
,
}
=
state
.
User
;
const
{
history_url
}
=
state
.
History
;
const
{
pageData
}
=
state
.
PageData
;
const
{
token
}
=
state
.
login
;
const
{
CommunityList
}
=
state
.
Init
;
return
{
Data
,
DataSave
,
sourceData
,
pageData
,
history_url
,
// token
CommunityList
,
};
...
...
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
View file @
7cf88132
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./UsersAdd.less'
;
import
{
Input
,
Menu
,
Table
,
Space
,
Pagination
,
Tooltip
,
Button
,
Form
,
Row
,
Col
,
message
}
from
'antd'
;
import
{
Input
,
Menu
,
Table
,
Space
,
Pagination
,
Spin
,
Button
,
Form
,
Row
,
Col
,
message
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
import
Line
from
'../../../components/Line/Line'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
SearchOptionsCommnity
from
'../../../components/SearchOptions/SearchOptionsCommnity'
;
import
{
checkParam
}
from
'../../../utils/method'
import
{
checkParam
,
RA
}
from
'../../../utils/method'
import
{
validateMessages
}
from
'@/utils/params'
;
const
module
=
"User"
const
UsersAdd
=
(
props
:
any
)
=>
{
const
{
dispatch
}
=
props
;
const
{
dispatch
,
communityInfo
}
=
props
;
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'User/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
})
};
// const [] = props;
const
[
postman
,
setPostman
]
=
useState
({
extend
:
null
})
const
formRef
=
useRef
(
null
);
const
[
loading
,
setLoading
]
=
useState
(
false
)
const
onFinish
=
(
values
:
any
)
=>
{
if
(
postman
.
extend
!=
null
)
{
...
...
@@ -28,44 +31,62 @@ const UsersAdd = (props:any) => {
console
.
log
(
"添加业主提交的参数:"
+
tmp
.
length
)
console
.
log
(
values
)
if
(
checkParam
(
values
))
{
RA
(
14
,
values
)
values
.
owerPhone
=
null
values
.
owerEmail
=
null
RA
(
14
,
values
,
module
,
dispatch
)
setLoading
(
true
)
}
else
{
setLoading
(
false
)
message
.
error
(
"Error,Please finish it,not empty!"
,
3
)
}
}
const
extendName
=
(
values
:
any
)
=>
{
var
tmp
=
postman
tmp
.
extend
=
values
tmp
.
extend
=
values
RA
(
32
,
{
communityName
:
values
},
module
,
dispatch
);
setPostman
(
tmp
)
}
const
checkInput
=
(
e
:
any
)
=>
{
console
.
log
(
e
)
if
(
e
.
target
.
value
.
length
==
1
)
{
message
.
error
(
"Ower Name Should be limit 2~30!"
,
3
)
useEffect
(()
=>
{
if
(
communityInfo
!=
null
)
{
console
.
log
(
communityInfo
)
if
(
postman
.
extend
!=
null
)
{
formRef
.
current
.
setFieldsValue
({
addressAndpostalCode
:
communityInfo
.
data
.
rows
[
0
].
residentialAddress
+
" "
+
communityInfo
.
data
.
rows
[
0
].
residentialZipCode
})
}
}
}
},[
communityInfo
])
const
checkData
=
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
if
(
value
)
{
if
(
/^
[
a-zA-Z0-9
]
+$/g
.
test
(
value
))
{
callback
();
}
else
{
callback
(
new
Error
(
'Only numbers and letters can be entered!'
));
}
}
callback
();
};
return
(
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
<
TitleBack
title=
{
"Create New Owner"
}
/>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
<
Spin
spinning=
{
loading
}
>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
validateMessages=
{
validateMessages
}
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1item1
}
>
Owner's Name
</
div
>
<
div
className=
{
styles
.
box1item2
}
><
Form
.
Item
name=
"owerName"
><
Input
placeholder=
"Ower Name"
onBlur=
{
checkInput
}
maxLength=
{
30
}
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box1item2
}
><
Form
.
Item
name=
"owerName"
rules=
{
[{
required
:
true
,
min
:
2
,
max
:
30
}]
}
><
Input
placeholder=
"Ower Name"
/></
Form
.
Item
></
div
>
</
div
>
<
div
className=
{
styles
.
box4
}
>
{
/*
<div className={styles.box4}>
<div className={styles.box4item0}>Contact Details</div>
<div className={styles.box4item1}><Form.Item name="owerPhone" ><Input placeholder="Phone Number" /></Form.Item></div>
<div className={styles.box4item2}><Form.Item name="owerEmail" ><Input placeholder="Email" /></Form.Item></div>
</
div
>
</div>
*/
}
<
div
className=
{
styles
.
box2
}
>
{
/* <div className={styles.box2item1}>Contact Details</div> */
}
<
div
className=
{
styles
.
box2item2
}
><
SearchOptionsCommnity
alone=
{
true
}
onSubmit=
{
extendName
}
/></
div
>
<
div
className=
{
styles
.
box2item3
}
><
Form
.
Item
name=
"buildingNumber"
><
Input
placeholder=
"Building"
style=
{
{
width
:
94
}
}
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box2item3
}
><
Form
.
Item
name=
"buildingNumber"
rules=
{
[{
validator
:
checkData
,
trigger
:
'blur'
}]
}
><
Input
placeholder=
"Building"
style=
{
{
width
:
94
}
}
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box2item4
}
>
#
</
div
>
<
div
className=
{
styles
.
box2item5
}
><
Form
.
Item
name=
"floorNumber"
><
Input
placeholder=
"Floor"
style=
{
{
width
:
80
}
}
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box2item6
}
>
——
</
div
>
...
...
@@ -80,18 +101,18 @@ const UsersAdd = (props:any) => {
<
Line
/>
<
Form
.
Item
><
Button
type=
"primary"
htmlType=
"submit"
>
Submit
</
Button
></
Form
.
Item
>
</
Form
>
</
Spin
>
</
div
>
);
};
function
mapStateToProps
(
state
:
any
)
{
const
{
DataSave
}
=
state
.
User
;
const
{
DataSave
,
communityInfo
}
=
state
.
User
;
return
{
DataSave
,
DataSave
,
communityInfo
,
};
}
export
default
connect
(
mapStateToProps
)(
UsersAdd
);
...
...
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
View file @
7cf88132
...
...
@@ -10,6 +10,7 @@ import SearchOptionsCommnity from '../../../components/SearchOptions/SearchOptio
import
{
checkParam
}
from
'../../../utils/method'
import
TableShow
from
'@/components/TableShow/TableShow'
;
import
{
values
,
fromPairs
}
from
'lodash'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
const
UsersDetail
=
(
props
:
any
)
=>
{
...
...
@@ -23,6 +24,7 @@ const UsersDetail = (props:any) => {
const
[
editFlag
,
setEditFlag
]
=
useState
(
false
)
const
user_status
=
[[
1
,
"家属"
],
[
2
,
"租户"
]]
const
user_type_status
=
[
"Registered"
,
"Unregistered"
,
"Cancellation"
]
const
formRef
=
useRef
(
null
);
const
onFinish
=
(
values
:
any
)
=>
{
...
...
@@ -122,7 +124,7 @@ const UsersDetail = (props:any) => {
{
memberDetail
==
false
?
<>
<
TitleBack
title=
{
editFlag
?
"Edit Owner Infomation"
:
"Owner Detail"
}
/>
<
TitleBack
sublist=
{
[
'Status : '
+
user_type_status
[
DataSave
.
enable
],
'Create Time : '
+
timestampToTime
(
DataSave
.
createTime
.
time
)]
}
title=
{
editFlag
?
"Edit Owner Infomation"
:
"Owner Detail"
}
/>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1item1
}
>
Owner's Name
</
div
>
...
...
@@ -134,10 +136,9 @@ const UsersDetail = (props:any) => {
<
div
className=
{
styles
.
box4item1
}
><
Form
.
Item
name=
"owerPhone"
><
Input
disabled=
{
!
editFlag
}
placeholder=
"Phone Number"
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box4item2
}
><
Form
.
Item
name=
"owerEmail"
><
Input
disabled=
{
!
editFlag
}
placeholder=
"Email"
/></
Form
.
Item
></
div
>
</
div
>
<
Line
/>
{
DataSaveDetail
!=
null
?
<
TableShow
data=
{
DataSaveDetail
}
onSubmit=
{
tableShowCallback
}
onChange=
{
deleteUnit
}
deleteDisable=
{
!
editFlag
}
/>
:
null
DataSaveDetail
!=
null
?
<
TableShow
data=
{
DataSaveDetail
}
onSubmit=
{
tableShowCallback
}
onChange=
{
deleteUnit
}
deleteDisable=
{
editFlag
}
/>
:
null
}
{
editFlag
?
<>
...
...
src/pages/runTest/Template.tsx
View file @
7cf88132
...
...
@@ -33,7 +33,7 @@ const Guard = (props:any) => {
return
(
<
div
className=
{
styles
.
base
}
>
<
TitleGet
title=
{
"Version 1.1.
1
"
}
/>
<
TitleGet
title=
{
"Version 1.1.
2
"
}
/>
<
p
>
token:
{
page
.
token
}
name:
{
getCookie
(
"name"
)
}
...
...
src/services/Init.ts
View file @
7cf88132
import
request
from
'@/utils/request'
;
export
function
tosCommunityget
(
values
:
any
)
{
console
.
log
(
values
)
return
request
(
'/tos/tosCommunity/get'
,{
method
:
'POST'
,
body
:
JSON
.
stringify
(
values
),
headers
:{
'Content-Type'
:
'application/json'
}})
}
\ No newline at end of file
src/services/tos.ts
View file @
7cf88132
...
...
@@ -95,9 +95,13 @@ const requestList = [
[
"/tos/tosManageCommunity/save"
,
"29 新建一个小区"
],
[
"/tos/tosOrder/get"
,
"30 获取订单详情"
],
[
"/tos/property/community/houseCard/query"
,
"31 获取住户卡列表"
],
[
"/tos/tos
Manage
Community/get/detail"
,
"32 获取小区详情"
],
[
"/tos/tosCommunity/get/detail"
,
"32 获取小区详情"
],
[
"/tos/property/decorate/record/reply"
,
"33 回复装修申请"
],
[
"/tos/property/community/houseCard/reply"
,
"34 回复住户卡申请"
],
[
"/tos/home/page/community/houseCard/add"
,
"35 申请住户卡"
],
[
"/tos/property/community/houseCard/query/detail"
,
"36 获取住户卡详情"
],
[
"/tos/property/decorate/record/get/detail"
,
"37 获取装修记录详情"
],
[
"/tos/users/save"
,
"38 新建后台信息"
],
]
const
params
=
[
...
...
@@ -108,14 +112,21 @@ const params = [
function
requestAuto
(
url
:
string
,
values
:
any
)
{
return
request
(
url
,
Body
(
values
))
}
//配置文件
// const yellowcolor ="\033[40;33m"
// // const bulecolor='\033[40;34m';
// const colorend = "\033[0m"
export
function
RA
(
playload
:
any
)
{
console
.
log
(
playload
)
console
.
log
(
playload
.
index
)
var
url
=
(
requestList
[
playload
.
index
])[
0
]
// console.log(playload)
// console.log(playload.index)
var
url
=
(
requestList
[
playload
.
index
])[
0
]
console
.
log
(
playload
.
index
+
"》【发送请求】"
+
url
+
" "
+
(
requestList
[
playload
.
index
])[
1
])
console
.
log
(
"参数如下:"
)
console
.
log
(
playload
.
body
)
console
.
log
(
JSON
.
stringify
(
playload
.
body
))
// console.log(JSON.stringify(playload.body))
return
requestAuto
(
url
,
playload
.
body
)
}
...
...
src/utils/method.ts
View file @
7cf88132
...
...
@@ -56,6 +56,10 @@ export const setCookie=(key:string,value: string)=>{
export
const
RA
=
(
index
:
any
,
values
:
any
,
module
:
string
,
dispatch
:
any
)
=>
{
dispatch
({
type
:
module
+
'/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
})
};
export
const
SA
=
(
values
:
any
,
module
:
string
,
dispatch
:
any
)
=>
{
dispatch
({
type
:
module
+
'/SA'
,
playload
:
values
})
};
export
const
PAGE
=
(
values
:
any
,
module
:
string
,
dispatch
:
any
)
=>
{
dispatch
({
type
:
module
+
'/PAGE'
,
playload
:
values
})
};
export
const
URL
=
(
values
:
any
,
module
:
string
,
dispatch
:
any
)
=>
{
dispatch
({
type
:
module
+
'/URL'
,
playload
:
values
})
};
export
const
URLCLEAR
=
(
module
:
string
,
dispatch
:
any
)
=>
{
dispatch
({
type
:
module
+
'/URLCLEAR'
})
};
export
const
ResultClear
=
(
module
:
any
,
dispatch
:
any
)
=>
{
dispatch
({
type
:
module
+
'/ResultClear'
})
};
// const reg = [["url", "categoriesImageUrl"], ["name", "categoriesName"]]
// const values = [{ categoriesImageUrl: "http://url", categoriesName: "A9" },{ categoriesImageUrl: "http://url...", categoriesName: "A8" }]
...
...
src/utils/params.ts
View file @
7cf88132
export
const
validateMessages
=
{
required
:
'
${label}
is required!'
,
required
:
'
please enter,it
is required!'
,
types
:
{
email
:
'${label} is not validate email!'
,
number
:
'${label} is not a validate number!'
,
string
:
'${label} is not a validate number!'
},
string
:
{
range
:
'
${label}
must be between ${min} and ${max}'
,
range
:
'
it
must be between ${min} and ${max}'
,
},
number
:
{
range
:
'${label} must be between ${min} and ${max}'
,
...
...
src/utils/string.ts
View file @
7cf88132
...
...
@@ -72,4 +72,16 @@ export const stringTab = (string:any) => {
return
string
.
slice
(
0
,
20
)
+
"..."
}
return
string
}
\ No newline at end of file
}
// if (/[\u4E00-\u9FA5]/g.test(value)||/^[0-9]+.?[0-9]*$/g.test(value)) {
// callback(new Error('只可输入字母、不能输入汉字!'));
// } else {
// callback();
// }
// const checkInput = (e: any) => {
// console.log(e)
// if (e.target.value.length == 1) {
// message.error("Ower Name Should be limit 2~30!",3)
// }
// }
\ No newline at end of file
MrShi
@Shi
mentioned in commit
b885a868
·
Sep 16, 2020
mentioned in commit
b885a868
mentioned in commit b885a8682820f7c459c9a1925bb2959bb420dd75
Toggle commit list
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