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
7611da70
Commit
7611da70
authored
Feb 01, 2021
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
59f00b7a
e1d97977
Changes
30
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
709 additions
and
773 deletions
+709
-773
config.ts
config/config.ts
+12
-8
SearchOptionsCommnity.tsx
src/components/SearchOptions/SearchOptionsCommnity.tsx
+1
-2
SearchOptionsTow.tsx
src/components/SearchOptions/SearchOptionsTow.tsx
+16
-5
TitleSearch.tsx
src/components/TitleSearch/TitleSearch.tsx
+9
-14
BasicLayout.tsx
src/layouts/BasicLayout.tsx
+1
-1
SecurityLayout.tsx
src/layouts/SecurityLayout.tsx
+5
-6
UserLayout.tsx
src/layouts/UserLayout.tsx
+16
-16
CommunityService.ts
src/models/CommunityManagement/CommunityService.ts
+30
-35
User.ts
src/models/CommunityManagement/User.ts
+65
-78
PropertyManagement.ts
src/models/PropertyManagement.ts
+3
-4
ServiceProvider.ts
src/models/ServiceProvider.ts
+22
-36
login.ts
src/models/login.ts
+3
-5
user.ts
src/models/user.ts
+5
-7
Card.tsx
src/pages/CommercialService/Card.tsx
+11
-17
CardAdd.tsx
src/pages/CommercialService/CardAdd.tsx
+23
-35
CardDetail.tsx
src/pages/CommercialService/CardDetail.tsx
+67
-39
Detail.tsx
src/pages/CommercialService/Detail.tsx
+11
-16
PropertyServices.tsx
src/pages/CommercialService/PropertyServices.tsx
+36
-47
Renovation.tsx
src/pages/CommercialService/Renovation.tsx
+21
-27
RenovationDetail.tsx
src/pages/CommercialService/RenovationDetail.tsx
+57
-28
ChargeManager.tsx
src/pages/PropertyManagement/ChargeManager.tsx
+15
-36
Users.tsx
src/pages/UserManagement/LIFEUserManagement/Users.tsx
+18
-14
UsersAdd.tsx
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
+12
-14
UsersDetail.tsx
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
+22
-54
index.less
src/pages/UserManagement/LIFEUserManagement/index.less
+102
-102
Edit.tsx
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
+12
-7
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+31
-30
Services.tsx
...ges/UserManagement/ServiceProviderManagement/Services.tsx
+0
-5
index.less
...pages/UserManagement/ServiceProviderManagement/index.less
+82
-83
PropertyManagementServices.ts
src/services/PropertyManagementServices.ts
+1
-2
No files found.
config/config.ts
View file @
7611da70
...
@@ -197,7 +197,11 @@ export default defineConfig({
...
@@ -197,7 +197,11 @@ export default defineConfig({
{
{
path
:
'./ProblemFeedback'
,
path
:
'./ProblemFeedback'
,
name
:
'problemfeedback'
,
name
:
'problemfeedback'
,
component
:
'./CommercialService/PropertyServices'
,
routes
:
[
{
path
:
'./'
,
component
:
'./CommercialService/PropertyServices'
},
{
path
:
'./Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./Edit'
,
component
:
'./CommercialService/Detail'
},
]
},
},
{
{
path
:
'./RenovationApplication'
,
path
:
'./RenovationApplication'
,
...
@@ -205,6 +209,8 @@ export default defineConfig({
...
@@ -205,6 +209,8 @@ export default defineConfig({
routes
:
[
routes
:
[
{
path
:
'./'
,
component
:
'./CommercialService/Renovation'
},
{
path
:
'./'
,
component
:
'./CommercialService/Renovation'
},
{
path
:
'./Detail'
,
component
:
'./CommercialService/RenovationDetail'
},
{
path
:
'./Detail'
,
component
:
'./CommercialService/RenovationDetail'
},
{
path
:
'./Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./Edit'
,
component
:
'./CommercialService/Detail'
},
],
],
},
},
{
{
...
@@ -219,7 +225,11 @@ export default defineConfig({
...
@@ -219,7 +225,11 @@ export default defineConfig({
{
{
path
:
'./ReportOnline'
,
path
:
'./ReportOnline'
,
name
:
'reportonline'
,
name
:
'reportonline'
,
component
:
'./CommercialService/PropertyServices'
,
routes
:
[
{
path
:
"./"
,
component
:
'./CommercialService/PropertyServices'
},
{
path
:
'./Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./Edit'
,
component
:
'./CommercialService/Detail'
},
]
},
},
{
{
path
:
'./ShelfLifeService'
,
path
:
'./ShelfLifeService'
,
...
@@ -232,12 +242,6 @@ export default defineConfig({
...
@@ -232,12 +242,6 @@ export default defineConfig({
},
},
{
path
:
'./OwnerComplaints/Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./OwnerComplaints/Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./OwnerComplaints/Edit'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./OwnerComplaints/Edit'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./ProblemFeedback/Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./ProblemFeedback/Edit'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./RenovationApplication/Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./RenovationApplication/Edit'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./ReportOnline/Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./ReportOnline/Edit'
,
component
:
'./CommercialService/Detail'
},
],
],
},
},
{
{
...
...
src/components/SearchOptions/SearchOptionsCommnity.tsx
View file @
7611da70
import
React
,
{
useEffect
}
from
'react'
;
import
React
,
{
useEffect
}
from
'react'
;
import
{
connect
}
from
'umi'
;
import
{
connect
}
from
'umi'
;
import
SearchOptions
from
'./SearchOptions'
;
import
SearchOptionsTow
from
'./SearchOptionsTow'
;
import
SearchOptionsTow
from
'./SearchOptionsTow'
;
const
SearchOptionsCommnity
=
(
props
:
any
)
=>
{
const
SearchOptionsCommnity
=
(
props
:
any
)
=>
{
...
@@ -37,7 +36,7 @@ const SearchOptionsCommnity = (props: any) => {
...
@@ -37,7 +36,7 @@ const SearchOptionsCommnity = (props: any) => {
extendName
=
{
extendName
}
extendName
=
{
extendName
}
def
=
{
defaultName
}
def
=
{
defaultName
}
type
=
{
type
}
type
=
{
type
}
>
<
/
SearchOptionsTow
>
/
>
)
:
null
}
)
:
null
}
</>
</>
);
);
...
...
src/components/SearchOptions/SearchOptionsTow.tsx
View file @
7611da70
...
@@ -6,25 +6,36 @@
...
@@ -6,25 +6,36 @@
* @Description: In User Settings Edit
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\SearchOptions\SearchOptionsTow.tsx
* @FilePath: \tostumi\src\components\SearchOptions\SearchOptionsTow.tsx
*/
*/
import
React
from
'react'
;
import
React
,
{
useEffect
,
useState
}
from
'react'
;
import
{
Select
}
from
'antd'
;
import
{
Select
}
from
'antd'
;
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
const
SearchOptionsTow
=
(
porps
:
any
)
=>
{
const
SearchOptionsTow
=
(
porps
:
any
)
=>
{
const
{
list
,
extendName
,
def
,
type
,
disabled
}
=
porps
;
const
{
list
,
extendName
,
def
,
type
,
disabled
}
=
porps
;
const
[
value
,
setValue
]
=
useState
(
undefined
);
const
options
=
list
.
map
((
d
:
any
,
index
:
number
)
=>
(
const
options
=
list
.
map
((
d
:
any
,
index
:
number
)
=>
(
<
Option
value=
{
d
}
key=
{
index
}
>
<
Option
value=
{
d
}
key=
{
index
}
>
{
d
}
{
d
}
</
Option
>
</
Option
>
));
));
function
onChange
(
value
:
any
)
{
function
onChange
(
value
:
any
)
{
// console.log(`selected ${value}`);
if
(
!
value
)
{
if
(
!
value
)
{
value
=
''
;
value
=
''
;
}
else
{
setValue
(
value
);
}
}
extendName
(
value
);
extendName
(
value
);
}
}
useEffect
(()
=>
{
if
(
def
)
{
setValue
(
def
);
}
else
{
setValue
(
undefined
);
}
},
[
def
]);
return
(
return
(
<
div
>
<
div
>
{
type
?
(
{
type
?
(
...
@@ -37,7 +48,7 @@ const SearchOptionsTow = (porps: any) => {
...
@@ -37,7 +48,7 @@ const SearchOptionsTow = (porps: any) => {
placeholder=
"Community Name"
placeholder=
"Community Name"
optionFilterProp=
"children"
optionFilterProp=
"children"
onChange=
{
onChange
}
onChange=
{
onChange
}
defaultValue=
{
def
?
def
:
null
}
value=
{
value
}
disabled=
{
disabled
}
disabled=
{
disabled
}
>
>
{
options
}
{
options
}
...
@@ -50,7 +61,7 @@ const SearchOptionsTow = (porps: any) => {
...
@@ -50,7 +61,7 @@ const SearchOptionsTow = (porps: any) => {
placeholder=
"Community Name"
placeholder=
"Community Name"
optionFilterProp=
"children"
optionFilterProp=
"children"
onChange=
{
onChange
}
onChange=
{
onChange
}
defaultValue=
{
def
?
def
:
null
}
value=
{
value
}
disabled=
{
disabled
}
disabled=
{
disabled
}
>
>
{
options
}
{
options
}
...
...
src/components/TitleSearch/TitleSearch.tsx
View file @
7611da70
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
connect
}
from
'umi'
;
import
{
connect
}
from
'umi'
;
import
{
Input
,
Row
,
Col
,
Form
,
Select
,
Button
,
DatePicker
}
from
'antd'
;
import
{
SearchOutlined
}
from
'@ant-design/icons'
;
import
{
SearchOutlined
}
from
'@ant-design/icons'
;
import
SearchOptionsCommnity
from
'../SearchOptions/SearchOptionsCommnity'
;
import
SelectOptions
from
'../SelectOptions/index'
;
import
{
Input
,
Row
,
Col
,
Form
,
Select
,
Button
,
DatePicker
}
from
'antd'
;
const
{
Option
}
=
Select
;
const
{
Option
}
=
Select
;
import
SelectOptions
from
'../../components/SelectOptions/index'
;
import
SearchOptionsCommnity
from
'../SearchOptions/SearchOptionsCommnity'
;
const
TitleSearch
=
(
props
:
any
)
=>
{
const
TitleSearch
=
(
props
:
any
)
=>
{
const
{
const
{
dispatch
,
dispatch
,
...
@@ -58,7 +56,7 @@ const TitleSearch = (props: any) => {
...
@@ -58,7 +56,7 @@ const TitleSearch = (props: any) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
CommunityList
!=
null
)
{
if
(
CommunityList
!=
null
)
{
var
tmp
=
{};
const
tmp
=
{};
tmp
[
community
]
=
CommunityList
;
tmp
[
community
]
=
CommunityList
;
// props.onSubmit(tmp) 禁用 改用组件初始化
// props.onSubmit(tmp) 禁用 改用组件初始化
setCommunitys
(
CommunityList
);
setCommunitys
(
CommunityList
);
...
@@ -73,13 +71,10 @@ const TitleSearch = (props: any) => {
...
@@ -73,13 +71,10 @@ const TitleSearch = (props: any) => {
if
(
community
)
{
if
(
community
)
{
values
[
community
]
=
communitys
;
values
[
community
]
=
communitys
;
}
}
console
.
log
(
'Success:'
,
values
);
props
.
onSubmit
(
values
);
props
.
onSubmit
(
values
);
};
};
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
const
onFinishFailed
=
()
=>
{};
console
.
log
(
'Failed:'
,
errorInfo
);
};
const
onChange
=
(
date
:
any
,
dateString
:
string
)
=>
{
const
onChange
=
(
date
:
any
,
dateString
:
string
)
=>
{
setDate
(
dateString
);
setDate
(
dateString
);
...
@@ -110,8 +105,8 @@ const TitleSearch = (props: any) => {
...
@@ -110,8 +105,8 @@ const TitleSearch = (props: any) => {
<
Form
form=
{
form
}
name=
"basic"
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Form
form=
{
form
}
name=
"basic"
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Row
gutter=
{
32
}
>
<
Row
gutter=
{
32
}
>
{
communitySelect
!=
null
?
(
{
communitySelect
!=
null
?
(
<
Col
key=
{
'communitySelect_'
}
>
<
Col
key=
"communitySelect_"
>
<
Form
.
Item
name=
{
'communityName'
}
>
<
Form
.
Item
name=
"communityName"
>
<
SearchOptionsCommnity
<
SearchOptionsCommnity
defaultName=
{
defalueName
}
defaultName=
{
defalueName
}
titleSearch=
{
true
}
titleSearch=
{
true
}
...
@@ -149,7 +144,7 @@ const TitleSearch = (props: any) => {
...
@@ -149,7 +144,7 @@ const TitleSearch = (props: any) => {
<
Select
<
Select
style=
{
{
width
:
160
}
}
style=
{
{
width
:
160
}
}
placeholder=
{
item
.
name
[
1
]
}
placeholder=
{
item
.
name
[
1
]
}
allowClear
=
{
true
}
allowClear
defaultValue=
{
item
.
default
}
defaultValue=
{
item
.
default
}
>
>
{
item
.
data
.
map
((
word
)
=>
{
{
item
.
data
.
map
((
word
)
=>
{
...
@@ -166,7 +161,7 @@ const TitleSearch = (props: any) => {
...
@@ -166,7 +161,7 @@ const TitleSearch = (props: any) => {
})
})
:
null
}
:
null
}
{
time
!=
null
?
(
{
time
!=
null
?
(
<
Col
key=
{
'datePicker_'
}
>
<
Col
key=
"datePicker_"
>
{
' '
}
{
' '
}
<
DatePicker
placeholder=
{
time
[
1
]
}
onChange=
{
onChange
}
/>
<
DatePicker
placeholder=
{
time
[
1
]
}
onChange=
{
onChange
}
/>
</
Col
>
</
Col
>
...
...
src/layouts/BasicLayout.tsx
View file @
7611da70
...
@@ -150,7 +150,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
...
@@ -150,7 +150,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
<
span
>
{
route
.
breadcrumbName
}
</
span
>
<
span
>
{
route
.
breadcrumbName
}
</
span
>
);
);
}
}
}
}
//footerRender={() => defaultFooterDom}
//
footerRender={() => defaultFooterDom}
menuDataRender=
{
menuDataRender
}
menuDataRender=
{
menuDataRender
}
rightContentRender=
{
()
=>
<
RightContent
/>
}
rightContentRender=
{
()
=>
<
RightContent
/>
}
{
...
props
}
{
...
props
}
...
...
src/layouts/SecurityLayout.tsx
View file @
7611da70
...
@@ -83,15 +83,14 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
...
@@ -83,15 +83,14 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
];
];
// 用户重新打开需要重新登录
// 用户重新打开需要重新登录
le
t
time
=
localStorage
.
getItem
(
'loginTime'
);
cons
t
time
=
localStorage
.
getItem
(
'loginTime'
);
const
tokenLogin
=
time
?
JSON
.
parse
(
time
)
:
false
;
const
tokenLogin
=
time
?
JSON
.
parse
(
time
)
:
false
;
// 登录
// 登录
if
(
history
.
location
.
pathname
==
'/'
)
{
if
(
history
.
location
.
pathname
==
'/'
)
{
var
isLogin
=
false
;
let
isLogin
=
false
;
console
.
log
(
getCookie
(
'token'
));
if
(
getCookie
(
'token'
).
length
!==
0
)
{
if
(
getCookie
(
'token'
).
length
!=
0
)
{
isLogin
=
true
;
isLogin
=
true
;
}
}
const
queryString
=
stringify
({
const
queryString
=
stringify
({
...
@@ -107,7 +106,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
...
@@ -107,7 +106,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
// 在判断权限
// 在判断权限
const
permission
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
'[]'
);
const
permission
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
'[]'
);
le
t
perObj
=
perList
.
filter
((
obj
)
=>
{
cons
t
perObj
=
perList
.
filter
((
obj
)
=>
{
return
obj
.
path
===
location
.
pathname
;
return
obj
.
path
===
location
.
pathname
;
});
});
...
@@ -123,7 +122,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
...
@@ -123,7 +122,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
// 退出登录
// 退出登录
const
key
=
'outLogin'
;
const
key
=
'outLogin'
;
message
.
warning
({
content
:
'Expired login !'
,
key
});
message
.
warning
({
content
:
'Expired login !'
,
key
});
setTimeout
(
function
()
{
setTimeout
(
()
=>
{
logOut
();
logOut
();
},
1000
);
},
1000
);
...
...
src/layouts/UserLayout.tsx
View file @
7611da70
...
@@ -15,25 +15,25 @@ export interface UserLayoutProps extends Partial<ConnectProps> {
...
@@ -15,25 +15,25 @@ export interface UserLayoutProps extends Partial<ConnectProps> {
const
UserLayout
:
React
.
FC
<
UserLayoutProps
>
=
(
props
)
=>
{
const
UserLayout
:
React
.
FC
<
UserLayoutProps
>
=
(
props
)
=>
{
const
{
const
{
route
=
{
//
route = {
routes
:
[],
//
routes: [],
},
//
},
children
,
children
,
location
=
{
//
location = {
pathname
:
''
,
//
pathname: '',
},
//
},
result
,
result
,
dispatch
,
//
dispatch,
}
=
props
;
}
=
props
;
const
{
routes
=
[]
}
=
route
;
//
const { routes = [] } = route;
const
{
formatMessage
}
=
useIntl
();
//
const { formatMessage } = useIntl();
const
{
breadcrumb
}
=
getMenuData
(
routes
);
//
const { breadcrumb } = getMenuData(routes);
const
title
=
getPageTitle
({
//
const title = getPageTitle({
pathname
:
location
.
pathname
,
//
pathname: location.pathname,
formatMessage
,
//
formatMessage,
breadcrumb
,
//
breadcrumb,
...
props
,
//
...props,
});
//
});
return
(
return
(
<
div
className=
{
styles
.
container
+
' '
+
(
result
?
styles
.
active
:
''
)
}
>
<
div
className=
{
styles
.
container
+
' '
+
(
result
?
styles
.
active
:
''
)
}
>
...
...
src/models/CommunityManagement/CommunityService.ts
View file @
7611da70
import
*
as
service
from
'@/services/tos'
;
import
*
as
service
from
'@/services/tos'
;
import
{
message
}
from
'antd'
;
import
{
message
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
{
history
}
from
'umi'
;
import
{
timestampToTime4
}
from
'@/utils/time'
;
import
{
routerRedux
}
from
'dva/router'
;
import
{
timestampToTime
,
timestampToTime4
}
from
'@/utils/time'
;
import
{
picFromate
,
Fromate
}
from
'@/utils/method'
;
import
{
picFromate
,
Fromate
}
from
'@/utils/method'
;
export
default
{
export
default
{
...
@@ -52,37 +49,37 @@ export default {
...
@@ -52,37 +49,37 @@ export default {
},
},
effects
:
{
effects
:
{
//预订设施查询
//
预订设施查询
*
RA
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
RA
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
switch
(
playload
.
index
)
{
switch
(
playload
.
index
)
{
case
40
:
case
40
:
{
{
var
Data
=
null
;
const
Data
=
null
;
yield
put
({
type
:
'returnPage'
,
Data
});
yield
put
({
type
:
'returnPage'
,
Data
});
}
}
break
;
break
;
default
:
break
;
}
}
const
resp
=
yield
call
(
service
.
RA
,
playload
);
const
resp
=
yield
call
(
service
.
RA
,
playload
);
console
.
log
(
resp
);
if
(
resp
.
code
===
500
||
resp
.
error_code
!==
'0000'
)
{
if
(
resp
.
code
==
500
||
resp
.
error_code
!=
'0000'
)
{
// window.location.href = '/500';
// window.location.href = '/500';
message
.
error
(
`
${
resp
.
error_code
}
:
${
resp
.
error_msg
}
`
);
message
.
error
(
`
${
resp
.
error_code
}
:
${
resp
.
error_msg
}
`
);
}
}
if
(
resp
.
error_code
!=
'0000'
)
{
if
(
resp
.
error_code
!=
=
'0000'
)
{
message
.
error
(
`
${
resp
.
error_code
}
:
${
resp
.
error_msg
}
`
);
message
.
error
(
`
${
resp
.
error_code
}
:
${
resp
.
error_msg
}
`
);
}
else
{
}
else
{
switch
(
playload
.
index
)
{
switch
(
playload
.
index
)
{
case
21
:
case
21
:
{
{
var
tmp
=
resp
.
data
.
tosOwerModel
||
resp
.
data
.
tosOwnerRelationModel
;
const
tmp
=
resp
.
data
.
tosOwerModel
||
resp
.
data
.
tosOwnerRelationModel
;
var
tmp2
=
resp
.
data
;
const
tmp2
=
resp
.
data
;
console
.
log
(
resp
);
if
(
!
tmp
)
{
if
(
!
tmp
)
{
message
.
error
(
'Data loading error!'
);
message
.
error
(
'Data loading error!'
);
history
.
go
(
-
1
);
history
.
go
Back
(
);
return
;
return
;
}
}
var
CurDataDetail
:
{
const
CurDataDetail
:
{
community
:
string
;
community
:
string
;
address
:
string
;
address
:
string
;
home
:
string
;
home
:
string
;
...
@@ -121,86 +118,84 @@ export default {
...
@@ -121,86 +118,84 @@ export default {
case
33
:
case
33
:
case
34
:
case
34
:
case
22
:
case
22
:
{
// message.success('Success Operation!', 3);
message
.
success
(
'Success Operation!'
,
3
);
history
.
go
(
-
1
);
history
.
go
(
-
1
);
// history.push("/CommercialService/CommunityMaintenance")
// history.push("/CommercialService/CommunityMaintenance")
}
break
;
break
;
case
23
:
case
23
:
{
{
le
t
Data8
=
resp
;
cons
t
Data8
=
resp
;
yield
put
({
type
:
'returnPage8'
,
Data8
});
yield
put
({
type
:
'returnPage8'
,
Data8
});
}
}
break
;
break
;
case
31
:
case
31
:
{
{
le
t
Data7
=
resp
;
cons
t
Data7
=
resp
;
yield
put
({
type
:
'returnPage7'
,
Data7
});
yield
put
({
type
:
'returnPage7'
,
Data7
});
}
}
break
;
break
;
case
35
:
case
35
:
{
{
le
t
Result
=
resp
;
cons
t
Result
=
resp
;
yield
put
({
type
:
'returnResult'
,
Result
});
yield
put
({
type
:
'returnResult'
,
Result
});
}
}
break
;
break
;
case
37
:
case
37
:
{
{
le
t
DataSaveDetail
=
resp
;
cons
t
DataSaveDetail
=
resp
;
yield
put
({
type
:
'returnDataSaveDetail'
,
DataSaveDetail
});
yield
put
({
type
:
'returnDataSaveDetail'
,
DataSaveDetail
});
}
}
break
;
break
;
case
36
:
case
36
:
{
{
le
t
DataSaveDetail
=
resp
;
cons
t
DataSaveDetail
=
resp
;
yield
put
({
type
:
'returnDataSaveDetail'
,
DataSaveDetail
});
yield
put
({
type
:
'returnDataSaveDetail'
,
DataSaveDetail
});
}
}
break
;
break
;
case
40
:
case
40
:
{
{
le
t
Data
=
resp
;
cons
t
Data
=
resp
;
yield
put
({
type
:
'returnPage'
,
Data
});
yield
put
({
type
:
'returnPage'
,
Data
});
}
}
break
;
break
;
default
:
break
;
}
}
}
}
},
},
*
SA
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
SA
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
var
DataSave
=
playload
;
const
DataSave
=
playload
;
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
},
},
*
setCurData
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
setCurData
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
var
CurData
=
playload
;
const
CurData
=
playload
;
yield
put
({
type
:
'returnCurData'
,
CurData
});
yield
put
({
type
:
'returnCurData'
,
CurData
});
},
},
*
setCurDataDetail
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
setCurDataDetail
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
var
CurDataDetail
=
null
;
const
CurDataDetail
=
null
;
yield
put
({
type
:
'returnCurDataDetail'
,
CurDataDetail
});
yield
put
({
type
:
'returnCurDataDetail'
,
CurDataDetail
});
},
},
*
ResultClear
({
},
{
put
}:
any
)
{
*
ResultClear
({
},
{
put
}:
any
)
{
var
Result
=
null
;
const
Result
=
null
;
console
.
log
(
'清除'
);
yield
put
({
type
:
'returnResult'
,
Result
});
yield
put
({
type
:
'returnResult'
,
Result
});
},
},
*
DataSaveDetailClear
({
},
{
put
}:
any
)
{
*
DataSaveDetailClear
({
},
{
put
}:
any
)
{
console
.
log
(
'清楚数据'
);
const
DataSaveDetail
=
null
;
let
DataSaveDetail
=
null
;
yield
put
({
type
:
'returnDataSaveDetail'
,
DataSaveDetail
});
yield
put
({
type
:
'returnDataSaveDetail'
,
DataSaveDetail
});
},
},
*
DataSaveClear
({
},
{
put
}:
any
)
{
*
DataSaveClear
({
},
{
put
}:
any
)
{
le
t
DataSave
=
null
;
cons
t
DataSave
=
null
;
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
},
},
*
Data7Clear
({
},
{
put
}:
any
)
{
*
Data7Clear
({
},
{
put
}:
any
)
{
le
t
Data7
=
null
;
cons
t
Data7
=
null
;
yield
put
({
type
:
'returnPage7'
,
Data7
});
yield
put
({
type
:
'returnPage7'
,
Data7
});
},
},
...
...
src/models/CommunityManagement/User.ts
View file @
7611da70
import
*
as
service
from
'../../services/tos
'
;
import
{
history
}
from
'umi
'
;
import
{
message
}
from
'antd'
;
import
{
message
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
*
as
service
from
'../../services/tos'
;
import
{
routerRedux
}
from
'dva/router'
;
export
default
{
export
default
{
namespace
:
'User'
,
namespace
:
'User'
,
...
@@ -24,7 +22,7 @@ export default {
...
@@ -24,7 +22,7 @@ export default {
DataServices
:
null
,
DataServices
:
null
,
Data4Error
:
null
,
Data4Error
:
false
,
},
},
reducers
:
{
reducers
:
{
...
@@ -74,186 +72,175 @@ export default {
...
@@ -74,186 +72,175 @@ export default {
switch
(
playload
.
index
)
{
switch
(
playload
.
index
)
{
case
12
:
case
12
:
{
{
le
t
Data
=
null
;
cons
t
Data
=
null
;
yield
put
({
type
:
'returnPage'
,
Data
});
yield
put
({
type
:
'returnPage'
,
Data
});
}
}
break
;
break
;
case
13
:
case
13
:
{
{
le
t
DataSaveDetail
=
null
;
cons
t
DataSaveDetail
=
null
;
le
t
returnValue
=
null
;
cons
t
returnValue
=
null
;
yield
put
({
type
:
'DataSaveDetail'
,
DataSaveDetail
,
returnValue
});
yield
put
({
type
:
'DataSaveDetail'
,
DataSaveDetail
,
returnValue
});
}
}
break
;
break
;
case
43
:
case
43
:
{
{
le
t
DataServices
=
null
;
cons
t
DataServices
=
null
;
yield
put
({
type
:
'returnDataServices'
,
DataServices
});
yield
put
({
type
:
'returnDataServices'
,
DataServices
});
}
}
break
;
break
;
default
:
break
;
}
}
const
resp
=
yield
call
(
service
.
RA
,
playload
);
const
resp
=
yield
call
(
service
.
RA
,
playload
);
console
.
log
(
'resp'
,
resp
);
if
(
resp
.
code
==
500
||
resp
.
error_code
!=
'0000'
)
{
// message.error('Server Error,try again,error code:500', 3);
// window.location.href = '/500';
// message.error(resp.msg);
}
if
(
resp
.
error_code
!=
'0000'
)
{
if
(
resp
.
error_code
!=
=
'0000'
)
{
if
(
playload
.
index
!==
53
)
{
if
(
playload
.
index
!==
53
)
{
message
.
error
(
`
${
resp
.
error_
code
}
:
${
resp
.
error_
msg
}
`
);
message
.
error
(
`
${
resp
.
error_msg
}
`
);
}
}
var
Data3Error
=
null
;
let
Data3Error
=
null
;
var
Result
=
null
;
let
Result
=
null
;
let
Data4Error
=
null
;
switch
(
playload
.
index
)
{
switch
(
playload
.
index
)
{
case
11
:
case
11
:
{
Data3Error
=
{
msg
:
'Information Wrong!'
};
Data3Error
=
{
msg
:
'Information Wrong!'
};
yield
put
({
type
:
'returnData3Error'
,
Data3Error
});
yield
put
({
type
:
'returnData3Error'
,
Data3Error
});
}
break
;
break
;
case
13
:
case
13
:
{
// message.error('Request exception please retry!!!');
// message.error('Request exception please retry!!!');
history
.
push
(
'/UserManagement/LIFEUserManagement'
);
history
.
push
(
'/UserManagement/LIFEUserManagement'
);
}
break
;
break
;
// 删除失败的案例
// 删除失败的案例
case
16
:
case
16
:
{
Result
=
resp
;
Result
=
resp
;
yield
put
({
type
:
'returnResult'
,
Result
});
yield
put
({
type
:
'returnResult'
,
Result
});
}
break
;
break
;
case
14
:
case
14
:
{
{
Data4Error
=
{
msg
:
'The community or unit is already registered!'
};
const
Data4Error
=
true
;
yield
put
({
type
:
'returnData4Error'
,
Data4Error
});
}
}
yield
put
({
type
:
'returnData4Error'
,
Data4Error
});
break
;
break
;
case
18
:
case
18
:
case
53
:
case
53
:
{
Result
=
resp
;
Result
=
resp
;
yield
put
({
type
:
'returnResult'
,
Result
})
;
yield
put
({
type
:
'returnResult'
,
Result
})
;
break
;
}
default
:
break
;
break
;
}
}
}
else
{
}
else
{
switch
(
playload
.
index
)
{
switch
(
playload
.
index
)
{
case
12
:
case
12
:
{
{
le
t
Data
=
resp
;
cons
t
Data
=
resp
;
yield
put
({
type
:
'returnPage'
,
Data
});
yield
put
({
type
:
'returnPage'
,
Data
});
}
}
break
;
break
;
case
18
:
case
18
:
case
14
:
case
14
:
{
// window.location.href = '/CommunityManagement/FacilityBookings';
message
.
success
(
'Success Operation!'
);
history
.
push
(
'/UserManagement/LIFEUserManagement'
);
// window.location.href = '/CommunityManagement/FacilityBookings';
history
.
push
(
'/UserManagement/LIFEUserManagement'
);
}
break
;
break
;
case
13
:
case
13
:
{
{
le
t
DataSaveDetail
=
resp
.
data
;
cons
t
DataSaveDetail
=
resp
.
data
;
yield
put
({
type
:
'DataSaveDetail'
,
DataSaveDetail
});
yield
put
({
type
:
'DataSaveDetail'
,
DataSaveDetail
});
}
}
break
;
break
;
case
16
:
case
16
:
{
{
console
.
log
(
'等待删除完成'
);
const
returnValue
=
resp
;
var
returnValue
=
resp
;
yield
put
({
type
:
'ReturnValue'
,
returnValue
});
yield
put
({
type
:
'ReturnValue'
,
returnValue
});
}
}
break
;
break
;
case
32
:
case
32
:
{
{
le
t
communityInfo
=
resp
;
cons
t
communityInfo
=
resp
;
yield
put
({
type
:
'returnCommunityInfo'
,
communityInfo
});
yield
put
({
type
:
'returnCommunityInfo'
,
communityInfo
});
}
}
break
;
break
;
case
39
:
case
39
:
{
{
le
t
memberResult
=
resp
;
cons
t
memberResult
=
resp
;
yield
put
({
type
:
'returnMemberResult'
,
memberResult
});
yield
put
({
type
:
'returnMemberResult'
,
memberResult
});
}
}
break
;
break
;
case
43
:
case
43
:
{
{
le
t
DataServices
=
resp
;
cons
t
DataServices
=
resp
;
yield
put
({
type
:
'returnDataServices'
,
DataServices
});
yield
put
({
type
:
'returnDataServices'
,
DataServices
});
}
}
break
;
break
;
case
44
:
{
case
44
:
let
Result
=
resp
;
{
yield
put
({
type
:
'returnResult'
,
Result
});
const
Result
=
resp
;
}
yield
put
({
type
:
'returnResult'
,
Result
});
}
break
;
default
:
break
;
}
}
}
}
},
},
*
IA
({
},
{
put
}:
any
)
{
*
IA
({
},
{
call
,
put
}:
any
)
{
var
Data3
=
null
;
const
Data3
=
null
;
yield
put
({
type
:
'returnPage3'
,
Data3
});
yield
put
({
type
:
'returnPage3'
,
Data3
});
},
},
*
IA2
({
},
{
put
}:
any
)
{
*
IA2
({
},
{
call
,
put
}:
any
)
{
var
Data3Error
=
null
;
const
Data3Error
=
null
;
yield
put
({
type
:
'returnData3Error'
,
Data3Error
});
yield
put
({
type
:
'returnData3Error'
,
Data3Error
});
},
},
*
SA
({
playload
}:
any
,
{
put
}:
any
)
{
*
SA
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
var
DataSave
=
playload
;
const
DataSave
=
playload
;
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
},
},
*
CA
({
playload
}:
any
,
{
put
}:
any
)
{
*
CA
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
var
sourceData
=
playload
;
const
sourceData
=
playload
;
yield
put
({
type
:
'returnSource'
,
sourceData
});
yield
put
({
type
:
'returnSource'
,
sourceData
});
},
},
*
QA
({
playload
}:
any
,
{
put
}:
any
)
{
*
QA
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
var
curString
=
playload
;
const
curString
=
playload
;
yield
put
({
type
:
'returnCurString'
,
curString
});
yield
put
({
type
:
'returnCurString'
,
curString
});
},
},
*
ResultClear
({
}
,
{
put
}:
any
)
{
*
ResultClear
({
}
:
any
,
{
call
,
put
}:
any
)
{
var
tmp
=
null
;
const
tmp
=
null
;
yield
put
({
type
:
'returnResult'
,
tmp
});
yield
put
({
type
:
'returnResult'
,
tmp
});
},
},
*
PAGE
({
playload
}:
any
,
{
put
}:
any
)
{
*
PAGE
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
var
pageDate
=
playload
;
const
pageDate
=
playload
;
yield
put
({
type
:
'PageDate'
,
pageDate
});
yield
put
({
type
:
'PageDate'
,
pageDate
});
},
},
*
DataClear
({
}
,
{
put
}:
any
)
{
*
DataClear
({
}
:
any
,
{
call
,
put
}:
any
)
{
var
pageDate
=
null
;
const
pageDate
=
null
;
yield
put
({
type
:
'returnPage'
,
pageDate
});
yield
put
({
type
:
'returnPage'
,
pageDate
});
},
},
*
MemberResultClear
({
}
,
{
put
}:
any
)
{
*
MemberResultClear
({
}
:
any
,
{
call
,
put
}:
any
)
{
le
t
memberResult
=
null
;
cons
t
memberResult
=
null
;
yield
put
({
type
:
'returnMemberResult'
,
memberResult
});
yield
put
({
type
:
'returnMemberResult'
,
memberResult
});
},
},
*
Data4ErrorClear
({
}
,
{
put
}:
any
)
{
*
Data4ErrorClear
({
}
:
any
,
{
call
,
put
}:
any
)
{
let
Data4Error
=
null
;
const
Data4Error
=
false
;
yield
put
({
type
:
'returnData4Error'
,
Data4Error
});
yield
put
({
type
:
'returnData4Error'
,
Data4Error
});
},
},
*
ClearResult
({
}
,
{
put
}:
any
)
{
*
ClearResult
({
}
:
any
,
{
call
,
put
}:
any
)
{
le
t
Result
=
null
;
cons
t
Result
=
null
;
yield
put
({
type
:
'returnResult'
,
Result
});
yield
put
({
type
:
'returnResult'
,
Result
});
},
},
*
ClearReturnValue
({
}
,
{
put
}:
any
)
{
*
ClearReturnValue
({
}
:
any
,
{
call
,
put
}:
any
)
{
le
t
returnValue
=
null
;
cons
t
returnValue
=
null
;
yield
put
({
type
:
"ReturnValue"
,
returnValue
})
yield
put
({
type
:
"ReturnValue"
,
returnValue
})
}
}
},
},
...
...
src/models/PropertyManagement.ts
View file @
7611da70
...
@@ -17,15 +17,14 @@ export default {
...
@@ -17,15 +17,14 @@ export default {
},
},
effects
:
{
effects
:
{
//获取物业费列表
//
获取物业费列表
*
get
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
get
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
const
resp
=
yield
call
(
service
.
get
,
playload
);
const
resp
=
yield
call
(
service
.
get
,
playload
);
console
.
log
(
resp
);
const
Data
=
resp
.
data
;
let
Data
=
resp
.
data
;
yield
put
({
type
:
'returnData'
,
Data
});
yield
put
({
type
:
'returnData'
,
Data
});
},
},
*
getById
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
getById
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
le
t
CurData
=
playload
;
cons
t
CurData
=
playload
;
yield
put
({
type
:
'returnCurData'
,
CurData
});
yield
put
({
type
:
'returnCurData'
,
CurData
});
},
},
},
},
...
...
src/models/ServiceProvider.ts
View file @
7611da70
import
*
as
service
from
'../services/tos'
;
import
{
message
,
Modal
}
from
'antd'
;
import
{
message
,
Modal
}
from
'antd'
;
import
{
history
}
from
'umi'
;
import
*
as
service
from
'../services/tos'
;
export
default
{
export
default
{
namespace
:
'ServiceProvider'
,
namespace
:
'ServiceProvider'
,
...
@@ -27,7 +28,6 @@ export default {
...
@@ -27,7 +28,6 @@ export default {
return
{
...
state
,
SaveChooseData
};
return
{
...
state
,
SaveChooseData
};
},
},
returnCurData
(
state
:
object
,
{
CurData
}:
any
)
{
returnCurData
(
state
:
object
,
{
CurData
}:
any
)
{
console
.
log
(
CurData
)
return
{
...
state
,
CurData
};
return
{
...
state
,
CurData
};
},
},
returnResult
(
state
:
object
,
{
Result
}:
any
)
{
returnResult
(
state
:
object
,
{
Result
}:
any
)
{
...
@@ -39,28 +39,22 @@ export default {
...
@@ -39,28 +39,22 @@ export default {
// 获取服务商
// 获取服务商
*
TosTosServiceProviderGet
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
TosTosServiceProviderGet
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
const
resp
=
yield
call
(
service
.
TosTosServiceProviderGet
,
playload
);
const
resp
=
yield
call
(
service
.
TosTosServiceProviderGet
,
playload
);
console
.
log
(
resp
);
if
(
resp
.
error_code
===
'0000'
)
{
if
(
resp
.
error_code
==
'0000'
)
{
const
Data
=
resp
.
data
;
let
Data
=
resp
.
data
;
yield
put
({
type
:
'returnPage'
,
Data
});
yield
put
({
type
:
'returnPage'
,
Data
});
}
else
{
}
else
{
console
.
log
(
resp
);
console
.
log
(
'请求错误码:'
+
resp
.
error_code
);
message
.
error
(
resp
.
error_msg
);
message
.
error
(
resp
.
error_msg
);
let
Data
=
undefined
;
const
Data
=
undefined
;
console
.
log
(
playload
);
yield
put
({
type
:
'returnPage'
,
Data
});
yield
put
({
type
:
'returnPage'
,
Data
});
}
}
},
},
// 新建服务商
// 新建服务商
*
TosTosServiceProviderSave
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
TosTosServiceProviderSave
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
console
.
log
(
playload
);
const
resp
=
yield
call
(
service
.
TosTosServiceProviderSave
,
playload
);
const
resp
=
yield
call
(
service
.
TosTosServiceProviderSave
,
playload
);
console
.
log
(
resp
);
// 服务范围选择错误
// 服务范围选择错误
if
(
resp
.
error_code
===
"0002"
)
{
if
(
resp
.
error_code
===
"0002"
)
{
le
t
CurData
:
Boolean
=
false
;
cons
t
CurData
:
Boolean
=
false
;
yield
put
({
type
:
"returnCurData"
,
CurData
});
yield
put
({
type
:
"returnCurData"
,
CurData
});
// message.error("Service scope selection error!!!")
// message.error("Service scope selection error!!!")
Modal
.
error
({
Modal
.
error
({
...
@@ -72,7 +66,7 @@ export default {
...
@@ -72,7 +66,7 @@ export default {
// 小区选择错误
// 小区选择错误
if
(
resp
.
error_code
===
"0003"
)
{
if
(
resp
.
error_code
===
"0003"
)
{
le
t
CurData
:
Boolean
=
false
;
cons
t
CurData
:
Boolean
=
false
;
yield
put
({
type
:
"returnCurData"
,
CurData
});
yield
put
({
type
:
"returnCurData"
,
CurData
});
Modal
.
error
({
Modal
.
error
({
title
:
'Service selection error'
,
title
:
'Service selection error'
,
...
@@ -83,7 +77,7 @@ export default {
...
@@ -83,7 +77,7 @@ export default {
// 提交失败
// 提交失败
if
(
resp
.
error_code
===
"0001"
)
{
if
(
resp
.
error_code
===
"0001"
)
{
le
t
CurData
:
Boolean
=
false
;
cons
t
CurData
:
Boolean
=
false
;
yield
put
({
type
:
'returnCurData'
,
CurData
});
yield
put
({
type
:
'returnCurData'
,
CurData
});
message
.
error
(
'Creation failed. Please try again!'
);
message
.
error
(
'Creation failed. Please try again!'
);
return
;
return
;
...
@@ -93,38 +87,35 @@ export default {
...
@@ -93,38 +87,35 @@ export default {
if
(
resp
.
error_code
===
"0000"
)
{
if
(
resp
.
error_code
===
"0000"
)
{
// message.success('Operator Success!', 1.5, () => {
// message.success('Operator Success!', 1.5, () => {
// });
// });
window
.
location
.
href
=
'/UserManagement/ServiceProviderManagement'
;
const
CurData
:
Boolean
=
true
;
let
CurData
:
Boolean
=
true
;
yield
put
({
type
:
'returnCurData'
,
CurData
});
yield
put
({
type
:
'returnCurData'
,
CurData
});
window
.
location
.
href
=
'/UserManagement/ServiceProviderManagement'
;
return
;
return
;
}
}
// 小区选择错误
// 小区选择错误
if
(
resp
.
error_code
===
"0004"
)
{
if
(
resp
.
error_code
===
"0004"
)
{
le
t
CurData
:
Boolean
=
false
;
cons
t
CurData
:
Boolean
=
false
;
yield
put
({
type
:
"returnCurData"
,
CurData
});
yield
put
({
type
:
"returnCurData"
,
CurData
});
message
.
error
(
"Company name already exists!"
)
message
.
error
(
"Company name already exists!"
);
return
;
}
}
},
},
//获取服务商保安根据服务商名
//
获取服务商保安根据服务商名
*
TosSecurityGuarderGet
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
TosSecurityGuarderGet
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
console
.
log
(
playload
);
const
resp
=
yield
call
(
service
.
TosSecurityGuarderGet
,
playload
);
const
resp
=
yield
call
(
service
.
TosSecurityGuarderGet
,
playload
);
console
.
log
(
resp
);
const
CurDataFollow
=
resp
.
data
.
rows
;
let
CurDataFollow
=
resp
.
data
.
rows
;
yield
put
({
type
:
'returnCurDataFollow'
,
CurDataFollow
});
yield
put
({
type
:
'returnCurDataFollow'
,
CurDataFollow
});
},
},
//获取服务商保安详情根据服务商名
//
获取服务商保安详情根据服务商名
*
GuarderById
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
GuarderById
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
le
t
CurDataFollowDetail
=
playload
;
cons
t
CurDataFollowDetail
=
playload
;
yield
put
({
type
:
'returnCurDataFollowDetail'
,
CurDataFollowDetail
});
yield
put
({
type
:
'returnCurDataFollowDetail'
,
CurDataFollowDetail
});
},
},
*
SaveChooseData
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
SaveChooseData
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
le
t
SaveChooseData
=
playload
;
cons
t
SaveChooseData
=
playload
;
yield
put
({
type
:
'returnSaveChooseData'
,
SaveChooseData
});
yield
put
({
type
:
'returnSaveChooseData'
,
SaveChooseData
});
},
},
...
@@ -132,36 +123,31 @@ export default {
...
@@ -132,36 +123,31 @@ export default {
*
DelServiceProvider
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
DelServiceProvider
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
const
resp
=
yield
call
(
service
.
TosTosServiceProviderDel
,
playload
);
const
resp
=
yield
call
(
service
.
TosTosServiceProviderDel
,
playload
);
if
(
resp
.
error_code
===
'0000'
)
{
if
(
resp
.
error_code
===
'0000'
)
{
le
t
Result
=
true
;
cons
t
Result
=
true
;
yield
put
({
type
:
'returnResult'
,
Result
});
yield
put
({
type
:
'returnResult'
,
Result
});
}
else
{
}
else
{
le
t
Result
=
false
;
cons
t
Result
=
false
;
yield
put
({
type
:
'returnResult'
,
Result
});
yield
put
({
type
:
'returnResult'
,
Result
});
}
}
},
},
*
ResultClear
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
ResultClear
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
console
.
log
(
'清除数据'
);
const
Result
=
null
;
let
Result
=
null
;
yield
put
({
type
:
'returnResult'
,
Result
});
yield
put
({
type
:
'returnResult'
,
Result
});
},
},
*
DelGuarder
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
DelGuarder
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
console
.
log
(
'删除保安'
);
console
.
log
(
playload
);
const
res
=
yield
call
(
service
.
TosGuarderDel
,
playload
);
const
res
=
yield
call
(
service
.
TosGuarderDel
,
playload
);
console
.
log
(
res
);
if
(
res
.
error_code
===
'0000'
)
{
if
(
res
.
error_code
===
'0000'
)
{
message
.
success
(
'Safer information deleted successfully!!!'
);
message
.
success
(
'Safer information deleted successfully!!!'
);
history
.
go
(
-
1
);
history
.
go
Back
(
);
}
else
{
}
else
{
message
.
error
(
'Deletion failed,Please try again'
);
message
.
error
(
'Deletion failed,Please try again'
);
}
}
},
},
*
CurDataClear
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
*
CurDataClear
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
console
.
log
(
'清除数据'
);
const
CurData
=
null
;
let
CurData
=
null
;
yield
put
({
type
:
'returnCurData'
,
CurData
});
yield
put
({
type
:
'returnCurData'
,
CurData
});
},
},
},
},
...
...
src/models/login.ts
View file @
7611da70
...
@@ -109,9 +109,7 @@ const Model: LoginModelType = {
...
@@ -109,9 +109,7 @@ const Model: LoginModelType = {
setCookie
(
"remenberUserName"
,
""
,
-
1
)
setCookie
(
"remenberUserName"
,
""
,
-
1
)
setCookie
(
"remenberPwd"
,
""
,
-
1
)
setCookie
(
"remenberPwd"
,
""
,
-
1
)
}
}
// Login successfully response.status === 'ok'
const
userMessage
=
yield
call
(
AccountCheckLogin
,
payload
.
values
);
// 请求时间网络
message
.
success
(
'Login Successfully!'
,
3
);
const
userMessage
=
yield
call
(
AccountCheckLogin
,
payload
.
values
);
//请求时间网络
setCookie
(
'token'
,
userMessage
.
token
);
setCookie
(
'token'
,
userMessage
.
token
);
setCookie
(
'id'
,
userMessage
.
userModel
.
id
);
setCookie
(
'id'
,
userMessage
.
userModel
.
id
);
...
@@ -199,7 +197,7 @@ const Model: LoginModelType = {
...
@@ -199,7 +197,7 @@ const Model: LoginModelType = {
}
}
},
},
*
goResetPwd
({
payload
},
{
call
,
put
})
{
*
goResetPwd
({
payload
},
{
put
})
{
yield
put
({
yield
put
({
type
:
'resetPwd'
,
type
:
'resetPwd'
,
result
:
true
,
result
:
true
,
...
@@ -209,7 +207,7 @@ const Model: LoginModelType = {
...
@@ -209,7 +207,7 @@ const Model: LoginModelType = {
history
.
push
(
'login2'
);
history
.
push
(
'login2'
);
},
},
*
setResult
({
payload
},
{
call
,
put
})
{
*
setResult
({
payload
},
{
put
})
{
yield
put
({
yield
put
({
type
:
"setResultLogin"
,
type
:
"setResultLogin"
,
resultLogin
:
payload
.
resultLogin
||
false
,
resultLogin
:
payload
.
resultLogin
||
false
,
...
...
src/models/user.ts
View file @
7611da70
...
@@ -37,8 +37,7 @@ const UserModel: UserModelType = {
...
@@ -37,8 +37,7 @@ const UserModel: UserModelType = {
},
},
effects
:
{
effects
:
{
*
fetch
(
_
,
{
call
,
put
})
{
*
fetch
()
{
console
.
log
(
call
);
// const response = yield call(queryUsers);
// const response = yield call(queryUsers);
// console.error(response)
// console.error(response)
// yield put({
// yield put({
...
@@ -49,11 +48,10 @@ const UserModel: UserModelType = {
...
@@ -49,11 +48,10 @@ const UserModel: UserModelType = {
*
fetchCurrent
({
playload
},
{
call
,
put
})
{
*
fetchCurrent
({
playload
},
{
call
,
put
})
{
// console.log("response")
// console.log("response")
const
userInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'userInfo'
)
||
'null'
);
const
userInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'userInfo'
)
||
'null'
);
console
.
log
(
'存储用户信息'
);
console
.
log
(
userInfo
);
if
(
!
userInfo
)
{
if
(
!
userInfo
)
{
const
response
=
yield
call
(
queryCurrent
,
playload
);
const
response
=
yield
call
(
queryCurrent
,
playload
);
console
.
log
(
response
);
localStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
response
));
localStorage
.
setItem
(
'userInfo'
,
JSON
.
stringify
(
response
));
yield
put
({
yield
put
({
type
:
'saveCurrentUser'
,
type
:
'saveCurrentUser'
,
...
@@ -67,7 +65,7 @@ const UserModel: UserModelType = {
...
@@ -67,7 +65,7 @@ const UserModel: UserModelType = {
}
}
},
},
*
deleteCurrent
({
p
layload
},
{
call
,
p
ut
})
{
*
deleteCurrent
({
put
})
{
yield
put
({
yield
put
({
type
:
'deleteCurrentUser'
,
type
:
'deleteCurrentUser'
,
});
});
...
@@ -81,7 +79,7 @@ const UserModel: UserModelType = {
...
@@ -81,7 +79,7 @@ const UserModel: UserModelType = {
currentUser
:
action
.
payload
||
{},
currentUser
:
action
.
payload
||
{},
};
};
},
},
deleteCurrentUser
(
state
,
action
)
{
deleteCurrentUser
(
state
)
{
return
{
return
{
...
state
,
...
state
,
currentUser
:
{},
currentUser
:
{},
...
...
src/pages/CommercialService/Card.tsx
View file @
7611da70
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Input
,
Tabs
,
Table
,
Space
,
Button
,
message
}
from
'antd'
;
import
{
Table
,
Space
,
Button
,
message
}
from
'antd'
;
const
{
TabPane
}
=
Tabs
;
import
{
connect
,
history
}
from
'umi'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
RA
,
urlEncode
,
filterObjbyTg
,
Clear
}
from
'@/utils/method'
;
import
{
objectColumns
}
from
'@/utils/string'
;
import
{
objectColumns
}
from
'@/utils/string'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
import
Login
from
'../user/login/components/Login'
;
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
import
{
RA
,
SA
,
urlEncode
,
filterObj
,
filterObjbyTg
,
Clear
}
from
'@/utils/method'
;
let
readyData
:
any
=
{
let
readyData
:
any
=
{
communityName
:
''
,
communityName
:
''
,
ownerName
:
''
,
ownerName
:
''
,
...
@@ -61,7 +55,7 @@ const Card = (props: any) => {
...
@@ -61,7 +55,7 @@ const Card = (props: any) => {
[
[
'Account Type'
,
'Account Type'
,
'apply_relation_owner'
,
'apply_relation_owner'
,
(
text
:
string
,
record
:
any
)
=>
<
div
>
{
apply_relation
[
text
][
1
]
}
</
div
>,
(
text
:
string
)
=>
<
div
>
{
apply_relation
[
text
][
1
]
}
</
div
>,
],
],
[
[
'Application Time'
,
'Application Time'
,
...
@@ -73,7 +67,7 @@ const Card = (props: any) => {
...
@@ -73,7 +67,7 @@ const Card = (props: any) => {
[
[
'Status'
,
'Status'
,
'apply_status'
,
'apply_status'
,
(
text
:
any
,
record
:
any
)
=>
<
Space
size=
"middle"
>
{
apply_status
[
parseInt
(
text
)][
1
]
}
</
Space
>,
(
text
:
any
)
=>
<
Space
size=
"middle"
>
{
apply_status
[
parseInt
(
text
)][
1
]
}
</
Space
>,
],
],
[
[
'Actions'
,
'Actions'
,
...
@@ -87,13 +81,13 @@ const Card = (props: any) => {
...
@@ -87,13 +81,13 @@ const Card = (props: any) => {
]);
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
//前置数据
//
前置数据
readyData
=
{
readyData
=
{
...
location
.
query
,
...
location
.
query
,
pageNum
:
location
.
query
.
pageNum
?
parseInt
(
location
.
query
.
pageNum
)
:
1
,
pageNum
:
location
.
query
.
pageNum
?
parseInt
(
location
.
query
.
pageNum
)
:
1
,
};
};
//获取数据
//
获取数据
setLoading
(
true
);
setLoading
(
true
);
RA
(
RA
(
31
,
31
,
...
@@ -120,7 +114,7 @@ const Card = (props: any) => {
...
@@ -120,7 +114,7 @@ const Card = (props: any) => {
}
}
},
[
Data7
]);
},
[
Data7
]);
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
const
goToDetail
=
(
values
:
any
)
=>
{
if
(
permissionArr
.
indexOf
(
'30'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'30'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
return
;
...
@@ -136,19 +130,19 @@ const Card = (props: any) => {
...
@@ -136,19 +130,19 @@ const Card = (props: any) => {
history
.
push
(
'./AccessCardApplication/Add'
);
history
.
push
(
'./AccessCardApplication/Add'
);
};
};
//页面搜索
//
页面搜索
const
ClickTitleSearch
=
(
comment
:
any
)
=>
{
const
ClickTitleSearch
=
(
comment
:
any
)
=>
{
if
(
comment
.
handleStatus
instanceof
Array
)
{
if
(
comment
.
handleStatus
instanceof
Array
)
{
comment
.
handleStatus
=
comment
.
handleStatus
[
0
];
comment
.
handleStatus
=
comment
.
handleStatus
[
0
];
}
}
le
t
tmp
=
filterObjbyTg
(
comment
,
[
'handleStatus'
,
'ownerName'
,
'communityName'
]);
cons
t
tmp
=
filterObjbyTg
(
comment
,
[
'handleStatus'
,
'ownerName'
,
'communityName'
]);
tmp
[
'pageNum'
]
=
1
;
tmp
[
'pageNum'
]
=
1
;
history
.
push
(
location
.
pathname
+
urlEncode
(
tmp
));
history
.
push
(
location
.
pathname
+
urlEncode
(
tmp
));
};
};
// 切换页码
// 切换页码
const
changePage
=
(
values
:
any
)
=>
{
const
changePage
=
(
values
:
any
)
=>
{
le
t
tmp
=
{
cons
t
tmp
=
{
...
location
.
query
,
...
location
.
query
,
pageNum
:
values
.
current
,
pageNum
:
values
.
current
,
};
};
...
...
src/pages/CommercialService/CardAdd.tsx
View file @
7611da70
...
@@ -22,8 +22,8 @@ const CardAdd = (props: any) => {
...
@@ -22,8 +22,8 @@ const CardAdd = (props: any) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Result
!=
null
)
{
if
(
Result
!=
null
)
{
if
(
(
Result
.
error_code
=
'0000'
)
)
{
if
(
Result
.
error_code
===
'0000'
)
{
message
.
success
(
'Operation Success!'
);
//
message.success('Operation Success!');
setLoading
(
false
);
setLoading
(
false
);
ResultClear
(
module
,
dispatch
);
ResultClear
(
module
,
dispatch
);
history
.
push
(
'/CommercialService/AccessCardApplication'
);
history
.
push
(
'/CommercialService/AccessCardApplication'
);
...
@@ -69,17 +69,6 @@ const CardAdd = (props: any) => {
...
@@ -69,17 +69,6 @@ const CardAdd = (props: any) => {
form
.
resetFields
();
form
.
resetFields
();
},
[]);
},
[]);
const
checkData2
:
(
rule
:
any
,
value
:
string
,
cb
:
any
)
=>
void
=
(
rule
,
value
,
cb
)
=>
{
if
(
value
)
{
if
(
/^
[
a-zA-Z0-9
]
+$/g
.
test
(
value
))
{
cb
();
}
else
{
cb
(
new
Error
(
'Only numbers and letters can be entered!'
));
}
}
cb
();
};
// 手机号码验证
// 手机号码验证
const
phoneNumber
:
(
rule
:
any
,
value
:
string
,
cb
:
any
)
=>
void
=
(
rule
,
value
,
cb
)
=>
{
const
phoneNumber
:
(
rule
:
any
,
value
:
string
,
cb
:
any
)
=>
void
=
(
rule
,
value
,
cb
)
=>
{
if
(
value
)
{
if
(
value
)
{
...
@@ -94,8 +83,7 @@ const CardAdd = (props: any) => {
...
@@ -94,8 +83,7 @@ const CardAdd = (props: any) => {
return
(
return
(
<
div
style=
{
{
width
:
'100%'
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
'#ffffff'
}
}
>
<
div
style=
{
{
width
:
'100%'
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
'#ffffff'
}
}
>
<
TitleBack
title=
{
'New Application For Access Card'
}
></
TitleBack
>
<
TitleBack
title=
"New Application For Access Card"
/>
<
Form
form=
{
form
}
name=
"basic"
onFinish=
{
onFinish
}
validateMessages=
{
validateMessages
}
>
<
Form
form=
{
form
}
name=
"basic"
onFinish=
{
onFinish
}
validateMessages=
{
validateMessages
}
>
<
Spin
spinning=
{
loading
}
>
<
Spin
spinning=
{
loading
}
>
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
label=
"Community"
style=
{
{
marginBottom
:
0
}
}
>
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
label=
"Community"
style=
{
{
marginBottom
:
0
}
}
>
...
@@ -115,7 +103,7 @@ const CardAdd = (props: any) => {
...
@@ -115,7 +103,7 @@ const CardAdd = (props: any) => {
},
},
]
}
]
}
>
>
<
Input
style=
{
{
width
:
80
}
}
placeholder=
{
'BLK'
}
/>
<
Input
style=
{
{
width
:
80
}
}
placeholder=
"BLK"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
div
style=
{
{
lineHeight
:
2
,
marginRight
:
16
}
}
>
#
</
div
>
<
div
style=
{
{
lineHeight
:
2
,
marginRight
:
16
}
}
>
#
</
div
>
<
Form
.
Item
<
Form
.
Item
...
@@ -130,7 +118,7 @@ const CardAdd = (props: any) => {
...
@@ -130,7 +118,7 @@ const CardAdd = (props: any) => {
},
},
]
}
]
}
>
>
<
Input
style=
{
{
width
:
80
}
}
placeholder=
{
'Floor'
}
/>
<
Input
style=
{
{
width
:
80
}
}
placeholder=
"Floor"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
div
style=
{
{
lineHeight
:
2
,
marginRight
:
16
}
}
>
-
</
div
>
<
div
style=
{
{
lineHeight
:
2
,
marginRight
:
16
}
}
>
-
</
div
>
<
Form
.
Item
<
Form
.
Item
...
@@ -144,7 +132,7 @@ const CardAdd = (props: any) => {
...
@@ -144,7 +132,7 @@ const CardAdd = (props: any) => {
},
},
]
}
]
}
>
>
<
Input
style=
{
{
width
:
120
}
}
placeholder=
{
'Room'
}
/>
<
Input
style=
{
{
width
:
120
}
}
placeholder=
"Room"
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Input
.
Group
>
</
Input
.
Group
>
</
Form
.
Item
>
</
Form
.
Item
>
...
@@ -152,9 +140,9 @@ const CardAdd = (props: any) => {
...
@@ -152,9 +140,9 @@ const CardAdd = (props: any) => {
<
Form
.
Item
name=
"zipCode"
wrapperCol=
{
{
offset
:
3
}
}
rules=
{
[{
required
:
true
}]
}
>
<
Form
.
Item
name=
"zipCode"
wrapperCol=
{
{
offset
:
3
}
}
rules=
{
[{
required
:
true
}]
}
>
<
Input
<
Input
style=
{
{
width
:
580
}
}
style=
{
{
width
:
580
}
}
placeholder=
{
'Display the address and postcode automatically according to the'
}
placeholder=
"Display the address and postcode automatically according to the"
disabled
disabled
></
Input
>
/
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
label=
"Owner"
style=
{
{
marginBottom
:
-
40
}
}
>
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
label=
"Owner"
style=
{
{
marginBottom
:
-
40
}
}
>
...
@@ -164,25 +152,25 @@ const CardAdd = (props: any) => {
...
@@ -164,25 +152,25 @@ const CardAdd = (props: any) => {
style=
{
{
marginRight
:
20
}
}
style=
{
{
marginRight
:
20
}
}
rules=
{
[{
required
:
true
,
max
:
30
,
min
:
2
}]
}
rules=
{
[{
required
:
true
,
max
:
30
,
min
:
2
}]
}
>
>
<
Input
placeholder=
{
'Name'
}
/>
<
Input
placeholder=
"Name"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
style=
{
{
marginRight
:
20
}
}
label=
{
'Contact Details'
}
>
<
Form
.
Item
style=
{
{
marginRight
:
20
}
}
label=
"Contact Details"
>
<
Input
hidden
=
{
true
}
/>
<
Input
hidden
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
name=
"communityOwnerPhone"
name=
"communityOwnerPhone"
style=
{
{
marginRight
:
20
}
}
style=
{
{
marginRight
:
20
}
}
rules=
{
[{
validator
:
phoneNumber
}]
}
rules=
{
[{
validator
:
phoneNumber
}]
}
>
>
<
Input
placeholder=
{
'Phone number'
}
/>
<
Input
placeholder=
"Phone number"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
name=
"communityOwnerEmail"
rules=
{
[{
required
:
true
,
type
:
'email'
}]
}
>
<
Form
.
Item
name=
"communityOwnerEmail"
rules=
{
[{
required
:
true
,
type
:
'email'
}]
}
>
<
Input
placeholder=
{
'Email'
}
/>
<
Input
placeholder=
"Email"
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Input
.
Group
>
</
Input
.
Group
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Line
></
Line
>
<
Line
/
>
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
label=
"Applicant"
style=
{
{
marginBottom
:
-
40
}
}
>
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
label=
"Applicant"
style=
{
{
marginBottom
:
-
40
}
}
>
<
Input
.
Group
compact
>
<
Input
.
Group
compact
>
...
@@ -191,37 +179,37 @@ const CardAdd = (props: any) => {
...
@@ -191,37 +179,37 @@ const CardAdd = (props: any) => {
style=
{
{
marginRight
:
20
}
}
style=
{
{
marginRight
:
20
}
}
rules=
{
[{
required
:
true
,
max
:
30
,
min
:
2
}]
}
rules=
{
[{
required
:
true
,
max
:
30
,
min
:
2
}]
}
>
>
<
Input
placeholder=
{
'Name'
}
/>
<
Input
placeholder=
"Name"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
style=
{
{
marginRight
:
20
}
}
label=
{
'Contact Details'
}
>
<
Form
.
Item
style=
{
{
marginRight
:
20
}
}
label=
"Contact Details"
>
<
Input
hidden
=
{
true
}
/>
<
Input
hidden
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
name=
"applyNamePhone"
name=
"applyNamePhone"
style=
{
{
marginRight
:
20
}
}
style=
{
{
marginRight
:
20
}
}
rules=
{
[{
validator
:
phoneNumber
}]
}
rules=
{
[{
validator
:
phoneNumber
}]
}
>
>
<
Input
placeholder=
{
'Phone number'
}
/>
<
Input
placeholder=
"Phone number"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
name=
"applyNameEmail"
rules=
{
[{
required
:
true
,
type
:
'email'
}]
}
>
<
Form
.
Item
name=
"applyNameEmail"
rules=
{
[{
required
:
true
,
type
:
'email'
}]
}
>
<
Input
placeholder=
{
'Email'
}
/>
<
Input
placeholder=
"Email"
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Input
.
Group
>
</
Input
.
Group
>
</
Form
.
Item
>
</
Form
.
Item
>
{
/* label={"Contact Information"} */
}
{
/* label={"Contact Information"} */
}
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
name=
"applyRelationOwner"
label=
{
'Relationship'
}
>
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
name=
"applyRelationOwner"
label=
"Relationship"
>
<
Relationship
/>
<
Relationship
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
labelCol=
{
{
span
:
3
}
}
name=
"applyReasonContent"
name=
"applyReasonContent"
label=
{
'Reason'
}
label=
"Reason"
rules=
{
[{
required
:
true
,
max
:
500
}]
}
rules=
{
[{
required
:
true
,
max
:
500
}]
}
>
>
<
TextArea
style=
{
{
width
:
400
}
}
></
TextArea
>
<
TextArea
style=
{
{
width
:
400
}
}
/
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Line
></
Line
>
<
Line
/
>
<
Form
.
Item
wrapperCol=
{
{
offset
:
3
}
}
>
<
Form
.
Item
wrapperCol=
{
{
offset
:
3
}
}
>
<
Button
type=
"primary"
htmlType=
"submit"
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Submit
Submit
...
...
src/pages/CommercialService/CardDetail.tsx
View file @
7611da70
...
@@ -2,11 +2,12 @@ import React, { useState, useEffect, useRef } from 'react';
...
@@ -2,11 +2,12 @@ import React, { useState, useEffect, useRef } from 'react';
import
{
Spin
,
Row
,
Col
,
Button
,
Form
,
Radio
,
message
}
from
'antd'
;
import
{
Spin
,
Row
,
Col
,
Button
,
Form
,
Radio
,
message
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
RA
,
getCookie
,
Clear
}
from
'@/utils/method'
;
import
{
RA
,
Clear
}
from
'@/utils/method'
;
import
TitleBack
from
'@/components/TitleBack/TitleBack'
;
import
TitleBack
from
'@/components/TitleBack/TitleBack'
;
import
Line
from
'@/components/Line/Line'
;
import
Line
from
'@/components/Line/Line'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
import
*
as
moment
from
'moment'
;
import
*
as
moment
from
'moment'
;
import
{
RadioChangeEvent
}
from
'antd/lib/radio'
;
const
module
=
'CommunityService'
;
const
module
=
'CommunityService'
;
...
@@ -26,7 +27,15 @@ const CardDetail = (props: any) => {
...
@@ -26,7 +27,15 @@ const CardDetail = (props: any) => {
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
listData
,
setListData
]
=
useState
(
null
)
as
any
;
const
[
listData
,
setListData
]
=
useState
(
null
)
as
any
;
const
[
onwerDetail
,
setOnwerDetail
]
=
useState
(
null
)
as
any
;
const
[
onwerDetail
,
setOnwerDetail
]
=
useState
(
null
)
as
any
;
const
[
isShowText
,
setIsShowText
]
=
useState
(
false
);
const
onRadioChange
=
(
e
:
RadioChangeEvent
)
=>
{
if
(
e
.
target
.
value
===
'2'
)
{
setIsShowText
(
true
);
}
else
{
setIsShowText
(
false
);
}
};
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
location
.
query
)
{
if
(
location
.
query
)
{
setLoading
(
true
);
setLoading
(
true
);
...
@@ -42,8 +51,8 @@ const CardDetail = (props: any) => {
...
@@ -42,8 +51,8 @@ const CardDetail = (props: any) => {
},
[]);
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
DataSaveDetail
);
if
(
DataSaveDetail
)
{
if
(
DataSaveDetail
)
{
console
.
log
(
DataSaveDetail
);
setListData
(
DataSaveDetail
.
data
.
rows
.
list
[
0
]);
setListData
(
DataSaveDetail
.
data
.
rows
.
list
[
0
]);
setOnwerDetail
(
DataSaveDetail
.
data
.
rows
.
onwerDetail
);
setOnwerDetail
(
DataSaveDetail
.
data
.
rows
.
onwerDetail
);
setLoading
(
false
);
setLoading
(
false
);
...
@@ -57,15 +66,10 @@ const CardDetail = (props: any) => {
...
@@ -57,15 +66,10 @@ const CardDetail = (props: any) => {
return
;
return
;
}
}
if
(
values
.
applyStatus
===
'2'
&&
!
values
.
replyContent
)
{
message
.
error
(
'Replies must be filled in!'
,
3
);
return
;
}
const
userInfo
=
localStorage
.
getItem
(
'userInfo'
)
||
''
;
const
userInfo
=
localStorage
.
getItem
(
'userInfo'
)
||
''
;
const
id
=
JSON
.
parse
(
userInfo
).
userModel
.
id
;
const
{
id
}
=
JSON
.
parse
(
userInfo
).
userModel
;
le
t
tmp
=
{
cons
t
tmp
=
{
communityId
:
listData
.
communityId
,
communityId
:
listData
.
communityId
,
id
:
listData
.
id
,
id
:
listData
.
id
,
ownerId
:
listData
.
ownerId
,
ownerId
:
listData
.
ownerId
,
...
@@ -77,12 +81,9 @@ const CardDetail = (props: any) => {
...
@@ -77,12 +81,9 @@ const CardDetail = (props: any) => {
:
values
.
replyContent
,
:
values
.
replyContent
,
type
:
'7'
,
type
:
'7'
,
};
};
RA
(
34
,
tmp
,
module
,
dispatch
);
RA
(
34
,
tmp
,
module
,
dispatch
);
setLoading
(
true
);
setLoading
(
true
);
};
};
console
.
log
(
listData
);
return
(
return
(
<
Spin
size=
"large"
spinning=
{
loading
}
>
<
Spin
size=
"large"
spinning=
{
loading
}
>
<
div
style=
{
{
width
:
'100%'
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
'#ffffff'
}
}
>
<
div
style=
{
{
width
:
'100%'
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
'#ffffff'
}
}
>
...
@@ -94,7 +95,7 @@ const CardDetail = (props: any) => {
...
@@ -94,7 +95,7 @@ const CardDetail = (props: any) => {
'Time : '
+
moment
(
listData
.
create_time
.
time
).
format
(
'DD-MM-YYYY'
),
'Time : '
+
moment
(
listData
.
create_time
.
time
).
format
(
'DD-MM-YYYY'
),
]
}
]
}
title=
"Access Card Application Details"
title=
"Access Card Application Details"
></
TitleBack
>
/
>
<
Row
gutter=
{
8
}
>
<
Row
gutter=
{
8
}
>
<
Col
>
Community:
</
Col
>
<
Col
>
Community:
</
Col
>
...
@@ -119,7 +120,7 @@ const CardDetail = (props: any) => {
...
@@ -119,7 +120,7 @@ const CardDetail = (props: any) => {
<
Col
span=
{
2
}
>
{
onwerDetail
.
owerPhone
}
</
Col
>
<
Col
span=
{
2
}
>
{
onwerDetail
.
owerPhone
}
</
Col
>
<
Col
>
{
onwerDetail
.
owerEmail
}
</
Col
>
<
Col
>
{
onwerDetail
.
owerEmail
}
</
Col
>
</
Row
>
</
Row
>
<
Line
></
Line
>
<
Line
/
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Applicant:
</
Col
>
<
Col
span=
{
3
}
>
Applicant:
</
Col
>
<
Col
span=
{
3
}
>
{
listData
.
apply_name
}
</
Col
>
<
Col
span=
{
3
}
>
{
listData
.
apply_name
}
</
Col
>
...
@@ -138,10 +139,10 @@ const CardDetail = (props: any) => {
...
@@ -138,10 +139,10 @@ const CardDetail = (props: any) => {
disabled
disabled
value=
{
listData
.
apply_reason_content
}
value=
{
listData
.
apply_reason_content
}
style=
{
{
width
:
300
,
height
:
100
,
padding
:
8
}
}
style=
{
{
width
:
300
,
height
:
100
,
padding
:
8
}
}
></
TextArea
>
/
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
<
Line
></
Line
>
<
Line
/
>
{
listData
.
apply_status
===
0
?
(
{
listData
.
apply_status
===
0
?
(
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
...
@@ -157,9 +158,9 @@ const CardDetail = (props: any) => {
...
@@ -157,9 +158,9 @@ const CardDetail = (props: any) => {
},
},
]
}
]
}
>
>
<
Radio
.
Group
>
<
Radio
.
Group
onChange=
{
onRadioChange
}
>
<
Radio
.
Button
value=
{
'1'
}
>
Approve
</
Radio
.
Button
>
<
Radio
.
Button
value=
"1"
>
Approve
</
Radio
.
Button
>
<
Radio
.
Button
style=
{
{
marginLeft
:
10
}
}
value=
{
'2'
}
>
<
Radio
.
Button
style=
{
{
marginLeft
:
10
}
}
value=
"2"
>
Reject
Reject
</
Radio
.
Button
>
</
Radio
.
Button
>
</
Radio
.
Group
>
</
Radio
.
Group
>
...
@@ -170,8 +171,11 @@ const CardDetail = (props: any) => {
...
@@ -170,8 +171,11 @@ const CardDetail = (props: any) => {
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Reply:
</
Col
>
<
Col
span=
{
3
}
>
Reply:
</
Col
>
<
Col
>
<
Col
>
<
Form
.
Item
name=
"replyContent"
>
<
Form
.
Item
<
TextArea
style=
{
{
width
:
300
,
height
:
100
,
padding
:
8
}
}
></
TextArea
>
name=
"replyContent"
rules=
{
[{
required
:
isShowText
,
max
:
300
,
message
:
'*it is required!'
}]
}
>
<
TextArea
style=
{
{
width
:
300
,
height
:
100
,
padding
:
8
}
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
...
@@ -183,16 +187,21 @@ const CardDetail = (props: any) => {
...
@@ -183,16 +187,21 @@ const CardDetail = (props: any) => {
<
Col
span=
{
4
}
>
<
Col
span=
{
4
}
>
<
Form
.
Item
name=
"applyStatus"
>
<
Form
.
Item
name=
"applyStatus"
>
<
Radio
.
Group
>
<
Radio
.
Group
>
<
Radio
value=
{
'3'
}
>
Receive
</
Radio
>
<
Radio
value=
"3"
>
Receive
</
Radio
>
</
Radio
.
Group
>
</
Radio
.
Group
>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
<
Form
.
Item
>
<
Row
>
<
Button
type=
"primary"
htmlType=
"submit"
>
<
Col
span=
{
3
}
/>
Submit
<
Col
>
</
Button
>
<
Form
.
Item
>
</
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Submit
</
Button
>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
>
</
Form
>
)
:
(
)
:
(
<>
<>
...
@@ -206,8 +215,14 @@ const CardDetail = (props: any) => {
...
@@ -206,8 +215,14 @@ const CardDetail = (props: any) => {
<
Col
span=
{
3
}
>
Examine:
</
Col
>
<
Col
span=
{
3
}
>
Examine:
</
Col
>
<
Col
span=
{
5
}
>
<
Col
span=
{
5
}
>
<
Radio
.
Group
value=
{
listData
.
apply_status
===
2
?
'2'
:
'1'
}
>
<
Radio
.
Group
value=
{
listData
.
apply_status
===
2
?
'2'
:
'1'
}
>
<
Radio
.
Button
value=
{
'1'
}
>
Approve
</
Radio
.
Button
>
<
Radio
.
Button
value=
"1"
disabled=
{
listData
.
apply_status
===
2
}
>
<
Radio
.
Button
style=
{
{
marginLeft
:
10
}
}
value=
{
'2'
}
>
Approve
</
Radio
.
Button
>
<
Radio
.
Button
style=
{
{
marginLeft
:
10
}
}
value=
"2"
disabled=
{
listData
.
apply_status
!==
2
}
>
Reject
Reject
</
Radio
.
Button
>
</
Radio
.
Button
>
</
Radio
.
Group
>
</
Radio
.
Group
>
...
@@ -220,8 +235,13 @@ const CardDetail = (props: any) => {
...
@@ -220,8 +235,13 @@ const CardDetail = (props: any) => {
<
TextArea
<
TextArea
disabled
disabled
value=
{
listData
.
reply_content
}
value=
{
listData
.
reply_content
}
style=
{
{
width
:
300
,
height
:
100
,
padding
:
8
}
}
style=
{
{
></
TextArea
>
width
:
300
,
height
:
100
,
padding
:
8
,
color
:
listData
.
apply_status
===
2
?
'red'
:
''
,
}
}
/>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
...
@@ -234,16 +254,21 @@ const CardDetail = (props: any) => {
...
@@ -234,16 +254,21 @@ const CardDetail = (props: any) => {
<
Col
span=
{
4
}
>
<
Col
span=
{
4
}
>
<
Form
.
Item
name=
"applyStatus"
>
<
Form
.
Item
name=
"applyStatus"
>
<
Radio
.
Group
>
<
Radio
.
Group
>
<
Radio
value=
{
'3'
}
>
Receive
</
Radio
>
<
Radio
value=
"3"
>
Receive
</
Radio
>
</
Radio
.
Group
>
</
Radio
.
Group
>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
<
Form
.
Item
>
<
Row
>
<
Button
type=
"primary"
htmlType=
"submit"
>
<
Col
span=
{
3
}
/>
Submit
<
Col
>
</
Button
>
<
Form
.
Item
>
</
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Submit
</
Button
>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
>
</
Form
>
)
:
(
)
:
(
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
...
@@ -251,8 +276,11 @@ const CardDetail = (props: any) => {
...
@@ -251,8 +276,11 @@ const CardDetail = (props: any) => {
Card Received:
Card Received:
</
Col
>
</
Col
>
<
Col
span=
{
4
}
>
<
Col
span=
{
4
}
>
<
Radio
.
Group
value=
{
listData
.
apply_status
===
3
?
'3'
:
''
}
>
<
Radio
.
Group
<
Radio
value=
{
'3'
}
>
Receive
</
Radio
>
value=
{
listData
.
apply_status
===
3
?
'3'
:
''
}
disabled=
{
listData
.
apply_status
!==
3
}
>
<
Radio
value=
"3"
>
Receive
</
Radio
>
</
Radio
.
Group
>
</
Radio
.
Group
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
...
...
src/pages/CommercialService/Detail.tsx
View file @
7611da70
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./css/Detail.less'
;
import
{
Form
,
Row
,
Col
,
Spin
,
Button
,
Descriptions
,
message
}
from
'antd'
;
import
{
Form
,
Row
,
Col
,
Spin
,
Button
,
Descriptions
,
message
}
from
'antd'
;
import
{
connect
}
from
'umi'
;
import
{
connect
}
from
'umi'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
import
{
getCookie
}
from
'@/utils/method'
;
import
{
validateMessages
}
from
'@/utils/params'
;
import
Line
from
'../../components/Line/Line'
;
import
Line
from
'../../components/Line/Line'
;
import
TitleBack
from
'../../components/TitleBack/TitleBack'
;
import
TitleBack
from
'../../components/TitleBack/TitleBack'
;
import
PictureOptionsRow
from
'../../components/PictureOptions/PictureOptionsRow'
;
import
PictureOptionsRow
from
'../../components/PictureOptions/PictureOptionsRow'
;
import
{
getCookie
}
from
'@/utils/method'
;
import
styles
from
'./css/Detail.less'
;
import
{
validateMessages
}
from
'@/utils/params'
;
const
treatStatus
=
[
'Pending'
,
'Processed'
];
const
treatStatus
=
[
'Pending'
,
'Processed'
];
...
@@ -19,7 +17,7 @@ const Detail = (props: any) => {
...
@@ -19,7 +17,7 @@ const Detail = (props: any) => {
const
{
dispatch
,
location
,
CurDataDetail
,
loadding
}
=
props
;
const
{
dispatch
,
location
,
CurDataDetail
,
loadding
}
=
props
;
const
fromRef
=
useRef
(
null
)
as
any
;
const
fromRef
=
useRef
(
null
)
as
any
;
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'CommunityService/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
});
dispatch
({
type
:
'CommunityService/RA'
,
playload
:
{
index
,
body
:
values
}
});
};
};
const
[
curString
,
setCurString
]
=
useState
({
readyState
:
false
});
const
[
curString
,
setCurString
]
=
useState
({
readyState
:
false
});
...
@@ -61,17 +59,15 @@ const Detail = (props: any) => {
...
@@ -61,17 +59,15 @@ const Detail = (props: any) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
setCurString
({
readyState
:
true
});
setCurString
({
readyState
:
true
});
console
.
log
(
'页面准备好了'
);
},
[]);
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
CurDataDetail
!=
null
&&
curString
.
readyState
==
true
)
{
if
(
CurDataDetail
!=
null
&&
curString
.
readyState
==
=
true
)
{
if
(
!
editorFlag
)
{
if
(
!
editorFlag
)
{
var
tmp
=
{
replyContent
:
CurDataDetail
.
replyContent
,
file
:
CurDataDetail
.
replyImgUrl
};
const
tmp
=
{
replyContent
:
CurDataDetail
.
replyContent
,
file
:
CurDataDetail
.
replyImgUrl
};
fromRef
.
current
.
setFieldsValue
(
tmp
);
fromRef
.
current
.
setFieldsValue
(
tmp
);
}
}
setLoading
(
false
);
setLoading
(
false
);
console
.
log
(
CurDataDetail
);
}
}
},
[
CurDataDetail
]);
},
[
CurDataDetail
]);
...
@@ -105,16 +101,15 @@ const Detail = (props: any) => {
...
@@ -105,16 +101,15 @@ const Detail = (props: any) => {
}
}
}
}
var
val
=
values
;
const
val
=
values
;
val
.
handleName
=
getCookie
(
'name'
);
val
.
handleName
=
getCookie
(
'name'
);
val
.
handleContacts
=
getCookie
(
'phone'
);
val
.
handleContacts
=
getCookie
(
'phone'
);
val
.
type
=
''
+
location
.
query
.
serviceType
;
val
.
type
=
`
${
location
.
query
.
serviceType
}
`
;
val
.
id
=
location
.
query
.
id
;
val
.
id
=
location
.
query
.
id
;
val
.
userId
=
location
.
query
.
user_id
;
val
.
userId
=
location
.
query
.
user_id
;
val
.
communityId
=
location
.
query
.
community_id
;
val
.
communityId
=
location
.
query
.
community_id
;
val
.
handleStatus
=
'1'
;
val
.
handleStatus
=
'1'
;
// val.file=fileList
// val.file=fileList
console
.
log
(
'Success:'
,
val
);
RA
(
22
,
val
);
RA
(
22
,
val
);
setLoading
(
true
);
setLoading
(
true
);
};
};
...
@@ -208,7 +203,7 @@ const Detail = (props: any) => {
...
@@ -208,7 +203,7 @@ const Detail = (props: any) => {
</
Col
>
</
Col
>
</
Row
>
</
Row
>
<
Row
gutter=
{
16
}
>
<
Row
gutter=
{
16
}
>
<
Col
span=
{
3
}
></
Col
>
<
Col
span=
{
3
}
/
>
<
Col
>
<
Col
>
{
/* putSubmit={PictureOptionsRowRef} */
}
{
/* putSubmit={PictureOptionsRowRef} */
}
<
Form
.
Item
name=
"file"
>
<
Form
.
Item
name=
"file"
>
...
@@ -220,7 +215,7 @@ const Detail = (props: any) => {
...
@@ -220,7 +215,7 @@ const Detail = (props: any) => {
imageType
:
'tosCommunityImageReply'
,
imageType
:
'tosCommunityImageReply'
,
extends
:
''
,
extends
:
''
,
}
}
}
}
over=
{
CurDataDetail
.
replyImgUrl
.
length
>
0
?
true
:
false
}
over=
{
CurDataDetail
.
replyImgUrl
.
length
>
0
}
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
...
@@ -229,7 +224,7 @@ const Detail = (props: any) => {
...
@@ -229,7 +224,7 @@ const Detail = (props: any) => {
<>
<>
<
Line
/>
<
Line
/>
<
Row
>
<
Row
>
<
Col
span=
{
3
}
></
Col
>
<
Col
span=
{
3
}
/
>
<
Col
>
<
Col
>
<
Form
.
Item
>
<
Form
.
Item
>
<
Button
disabled=
{
loadding
}
type=
"primary"
htmlType=
"submit"
>
<
Button
disabled=
{
loadding
}
type=
"primary"
htmlType=
"submit"
>
...
...
src/pages/CommercialService/PropertyServices.tsx
View file @
7611da70
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
Table
,
Space
,
message
}
from
'antd'
;
import
{
RA
,
urlEncode
,
filterObj
,
filterObjbyTg
}
from
'@/utils/method'
;
import
styles
from
'./css/index.less'
;
import
styles
from
'./css/index.less'
;
import
{
Input
,
Menu
,
Table
,
Space
,
Upload
,
message
,
Pagination
,
Button
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
{
timestampToTime3
}
from
'../../utils/time'
;
import
{
timestampToTime3
}
from
'../../utils/time'
;
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
import
{
RA
,
urlEncode
,
filterObj
,
filterObjbyTg
}
from
'@/utils/method'
;
const
pathname
=
[
const
pathname
=
[
'CommunityMaintenance'
,
// 小区保养
'CommunityMaintenance'
,
// 小区保养
...
@@ -17,10 +14,10 @@ const pathname = [
...
@@ -17,10 +14,10 @@ const pathname = [
'ProblemFeedback'
,
// 问题反馈
'ProblemFeedback'
,
// 问题反馈
];
];
const
handle
_
Status
=
[
const
handleStatus
=
[
[
0
,
'Pending'
],
[
0
,
'Pending'
],
[
1
,
'Processed'
],
[
1
,
'Processed'
],
];
//["未处理","处理","拒绝"] , [2,"Rejected"]
];
//
["未处理","处理","拒绝"] , [2,"Rejected"]
const
goToName
=
[
'Reply'
,
'Detail'
];
const
goToName
=
[
'Reply'
,
'Detail'
];
const
module
=
'CommunityService'
;
const
module
=
'CommunityService'
;
...
@@ -73,15 +70,13 @@ const PropertyServices = (props: any) => {
...
@@ -73,15 +70,13 @@ const PropertyServices = (props: any) => {
{
{
title
:
'Submission Time'
,
title
:
'Submission Time'
,
dataIndex
:
'create_time'
,
dataIndex
:
'create_time'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
:
any
)
=>
<
Space
size=
"middle"
>
{
timestampToTime3
(
text
.
time
)
}
</
Space
>,
<
Space
size=
"middle"
>
{
timestampToTime3
(
text
.
time
)
}
</
Space
>
),
},
},
{
{
title
:
'Status'
,
title
:
'Status'
,
dataIndex
:
'id'
,
dataIndex
:
'id'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
{
handle
_
Status
[
record
.
handle_status
][
1
]
}
</
Space
>
<
Space
size=
"middle"
>
{
handleStatus
[
record
.
handle_status
][
1
]
}
</
Space
>
),
),
},
},
{
{
...
@@ -95,9 +90,7 @@ const PropertyServices = (props: any) => {
...
@@ -95,9 +90,7 @@ const PropertyServices = (props: any) => {
},
},
];
];
const
goToDetail
=
(
value
:
any
,
record
:
any
,
e
:
any
)
=>
{
const
goToDetail
=
(
value
:
any
,
record
:
any
)
=>
{
console
.
log
(
serviceTypeGobal
);
if
(
serviceTypeGobal
===
'1'
)
{
if
(
serviceTypeGobal
===
'1'
)
{
if
(
permissionArr
.
indexOf
(
'18'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'18'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
...
@@ -125,10 +118,10 @@ const PropertyServices = (props: any) => {
...
@@ -125,10 +118,10 @@ const PropertyServices = (props: any) => {
}
}
}
}
//页面递进
//
页面递进
history
.
push
(
history
.
push
(
location
.
pathname
+
location
.
pathname
+
(
value
==
0
?
'/Edit'
:
'/Detail'
)
+
(
value
==
=
0
?
'/Edit'
:
'/Detail'
)
+
urlEncode
({
urlEncode
({
serviceType
:
serviceTypeGobal
,
serviceType
:
serviceTypeGobal
,
id
:
record
.
id
,
id
:
record
.
id
,
...
@@ -145,73 +138,69 @@ const PropertyServices = (props: any) => {
...
@@ -145,73 +138,69 @@ const PropertyServices = (props: any) => {
},
[
Data
]);
},
[
Data
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
readyData
);
// 重置数据
if
(
location
!=
null
)
{
readyData
=
{
//细分类:页面指令
handleStatus
:
''
,
var
serviceType
=
''
;
ownerName
:
''
,
pathname
.
map
((
item
,
index
)
=>
{
communityName
:
''
,
};
if
(
location
!==
null
)
{
// 细分类:页面指令
let
serviceType
=
''
;
pathname
.
forEach
((
item
,
index
)
=>
{
if
(
location
.
pathname
.
indexOf
(
item
)
>
-
1
)
{
if
(
location
.
pathname
.
indexOf
(
item
)
>
-
1
)
{
serviceType
=
''
+
(
index
+
1
)
;
serviceType
=
`
${
index
+
1
}
`
;
setServiceType
(
serviceType
);
setServiceType
(
serviceType
);
}
}
});
});
//分页设置
//
分页设置
if
(
location
.
query
.
pageNum
!=
null
)
{
if
(
location
.
query
.
pageNum
!=
null
)
{
pageNum
=
parseInt
(
location
.
query
.
pageNum
);
pageNum
=
parseInt
(
location
.
query
.
pageNum
);
}
else
{
}
else
{
pageNum
=
1
;
pageNum
=
1
;
}
}
//前置数据
//
前置数据
var
tmp
:
DataType
=
filterObjbyTg
(
location
.
query
,
[
const
tmp
:
DataType
=
filterObjbyTg
(
location
.
query
,
[
'handleStatus'
,
'handleStatus'
,
'ownerName'
,
'ownerName'
,
'communityName'
,
'communityName'
,
]);
]);
console
.
log
(
tmp
);
tmp
.
ownerName
=
tmp
.
ownerName
||
''
;
tmp
.
ownerName
=
tmp
.
ownerName
||
''
;
tmp
.
communityName
=
tmp
.
communityName
||
''
;
tmp
.
communityName
=
tmp
.
communityName
||
''
;
tmp
.
handleStatus
=
handle_Status
[
parseInt
(
tmp
.
handleStatus
as
string
)]
as
Array
<
string
>
;
//特殊处理
tmp
.
handleStatus
=
handleStatus
[
parseInt
(
tmp
.
handleStatus
as
string
)]
as
Array
<
string
>
;
//特殊处理
console
.
log
(
tmp
);
// setReadyData(tmp);
readyData
=
{
readyData
=
{
...
tmp
,
...
tmp
,
};
};
//获取数据
//
获取数据
setLoading
(
true
);
setLoading
(
true
);
RA
(
RA
(
40
,
40
,
{
{
serviceType
:
serviceType
,
serviceType
,
...
tmp
,
...
tmp
,
handleStatus
:
handleStatus
:
location
.
query
.
handleStatus
!=
undefined
?
parseInt
(
location
.
query
.
handleStatus
)
:
null
,
location
.
query
.
handleStatus
!==
undefined
?
parseInt
(
location
.
query
.
handleStatus
)
:
null
,
pageNum
,
pageNum
,
},
},
module
,
module
,
dispatch
,
dispatch
,
);
);
}
}
return
()
=>
{
readyData
=
{
...
readyData
,
handleStatus
:
''
,
ownerName
:
''
,
communityName
:
''
,
};
};
},
[
location
]);
},
[
location
]);
const
PageChange
=
(
values
:
any
)
=>
{
const
PageChange
=
(
values
:
any
)
=>
{
//页面跳转参数
//
页面跳转参数
var
tmp
=
filterObjbyTg
(
location
.
query
,
[
'handleStatus'
,
'ownerName'
,
'communityName'
]);
const
tmp
=
filterObjbyTg
(
location
.
query
,
[
'handleStatus'
,
'ownerName'
,
'communityName'
]);
tmp
[
'pageNum'
]
=
values
.
current
;
tmp
[
'pageNum'
]
=
values
.
current
;
history
.
push
(
location
.
pathname
+
urlEncode
(
tmp
));
history
.
push
(
location
.
pathname
+
urlEncode
(
tmp
));
};
};
const
ClickTitleSearch
=
(
comment
:
any
)
=>
{
const
ClickTitleSearch
=
(
comment
:
any
)
=>
{
//页面搜索
//
页面搜索
// comment.serviceType = serviceTypeGobal;
// comment.serviceType = serviceTypeGobal;
comment
.
pageNum
=
1
;
comment
.
pageNum
=
1
;
history
.
push
(
location
.
pathname
+
urlEncode
(
filterObj
(
comment
)));
history
.
push
(
location
.
pathname
+
urlEncode
(
filterObj
(
comment
)));
...
@@ -223,12 +212,12 @@ const PropertyServices = (props: any) => {
...
@@ -223,12 +212,12 @@ const PropertyServices = (props: any) => {
communitySelect=
{
true
}
communitySelect=
{
true
}
listkey=
{
[
'ownerName'
]
}
listkey=
{
[
'ownerName'
]
}
list=
{
[
'Owner Name'
]
}
list=
{
[
'Owner Name'
]
}
status=
{
[{
name
:
[
'handleStatus'
,
'Status'
],
data
:
handle
_
Status
}]
}
status=
{
[{
name
:
[
'handleStatus'
,
'Status'
],
data
:
handleStatus
}]
}
defaultValue=
{
readyData
}
defaultValue=
{
readyData
}
onSubmit=
{
ClickTitleSearch
}
onSubmit=
{
ClickTitleSearch
}
/>
/>
<
Table
<
Table
rowKey=
{
'id'
}
rowKey=
"id"
style=
{
{
marginTop
:
16
}
}
style=
{
{
marginTop
:
16
}
}
loading=
{
loading
}
loading=
{
loading
}
columns=
{
columns
}
columns=
{
columns
}
...
...
src/pages/CommercialService/Renovation.tsx
View file @
7611da70
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Table
,
Space
,
message
}
from
'antd'
;
import
{
Table
,
Space
,
message
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
connect
,
history
}
from
'umi'
;
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
import
{
RA
,
urlEncode
,
filterObjbyTg
}
from
'@/utils/method'
;
import
{
RA
,
urlEncode
,
filterObjbyTg
}
from
'@/utils/method'
;
import
{
objectColumns
,
stringTab
}
from
'@/utils/string'
;
import
{
objectColumns
,
stringTab
}
from
'@/utils/string'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
const
module
=
'CommunityService'
;
const
module
=
'CommunityService'
;
let
pageNum
:
any
=
1
;
let
pageNum
:
any
=
1
;
const
Renovation
=
(
props
:
any
)
=>
{
const
Renovation
=
(
props
:
any
)
=>
{
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
// const decoration
_s
tatus = [[0, "待处理"], [1, "已批准"], [2, "已拒绝"]]
// const decoration
S
tatus = [[0, "待处理"], [1, "已批准"], [2, "已拒绝"]]
const
decoration
_s
tatus
=
[
const
decoration
S
tatus
=
[
[
0
,
'Pending'
],
[
0
,
'Pending'
],
[
1
,
'Approved'
],
[
1
,
'Approved'
],
[
2
,
'Rejected'
],
[
2
,
'Rejected'
],
...
@@ -25,8 +22,6 @@ const Renovation = (props: any) => {
...
@@ -25,8 +22,6 @@ const Renovation = (props: any) => {
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
readyData
,
setReadyData
]
=
useState
(
null
);
const
[
readyData
,
setReadyData
]
=
useState
(
null
);
console
.
log
(
Data8
);
const
columns
=
objectColumns
([
const
columns
=
objectColumns
([
[
'Community'
,
'communityName'
],
[
'Community'
,
'communityName'
],
[
[
...
@@ -50,11 +45,7 @@ const Renovation = (props: any) => {
...
@@ -50,11 +45,7 @@ const Renovation = (props: any) => {
],
],
[
'Content'
,
'decorationContent'
,
(
text
:
any
)
=>
<
div
>
{
stringTab
(
text
)
}
</
div
>],
[
'Content'
,
'decorationContent'
,
(
text
:
any
)
=>
<
div
>
{
stringTab
(
text
)
}
</
div
>],
[
'Application Time'
,
'createTime'
,
(
text
:
any
)
=>
<
div
>
{
timestampToTime
(
text
.
time
)
}
</
div
>],
[
'Application Time'
,
'createTime'
,
(
text
:
any
)
=>
<
div
>
{
timestampToTime
(
text
.
time
)
}
</
div
>],
[
[
'status'
,
'decorationStatus'
,
(
text
:
any
)
=>
<
div
>
{
decorationStatus
[
parseInt
(
text
)][
1
]
}
</
div
>],
'status'
,
'decorationStatus'
,
(
text
:
any
)
=>
<
div
>
{
decoration_status
[
parseInt
(
text
)][
1
]
}
</
div
>,
],
[
[
'Actions'
,
'Actions'
,
'decorationStatus'
,
'decorationStatus'
,
...
@@ -68,27 +59,30 @@ const Renovation = (props: any) => {
...
@@ -68,27 +59,30 @@ const Renovation = (props: any) => {
]);
]);
useEffect
(()
=>
{
useEffect
(()
=>
{
pageNum
=
1
;
pageNum
=
1
;
//分页设置
//
分页设置
if
(
location
.
query
.
pageNum
!=
null
)
{
if
(
location
.
query
.
pageNum
!=
null
)
{
pageNum
=
location
.
query
.
pageNum
;
pageNum
=
location
.
query
.
pageNum
;
}
else
{
}
else
{
pageNum
=
1
;
pageNum
=
1
;
}
}
//前置数据
// 前置数据
console
.
log
(
'前置数据'
);
const
tmp
:
any
=
filterObjbyTg
(
location
.
query
,
[
let
tmp
:
any
=
filterObjbyTg
(
location
.
query
,
[
'handleStatus'
,
'applyforName'
,
'communityName'
]);
'handleStatus'
,
tmp
.
handleStatus
=
decoration_status
[
parseInt
(
tmp
.
handleStatus
)];
//特殊处理
'applyforName'
,
'communityName'
,
]);
tmp
.
handleStatus
=
decorationStatus
[
parseInt
(
tmp
.
handleStatus
)];
// 特殊处理
setReadyData
(
tmp
);
setReadyData
(
tmp
);
//获取数据
//
获取数据
setLoading
(
true
);
setLoading
(
true
);
RA
(
RA
(
23
,
23
,
{
{
...
tmp
,
...
tmp
,
handleStatus
:
handleStatus
:
location
.
query
.
handleStatus
!=
undefined
?
parseInt
(
location
.
query
.
handleStatus
)
:
null
,
location
.
query
.
handleStatus
!=
=
undefined
?
parseInt
(
location
.
query
.
handleStatus
)
:
null
,
pageNum
,
pageNum
,
},
},
module
,
module
,
...
@@ -102,14 +96,14 @@ const Renovation = (props: any) => {
...
@@ -102,14 +96,14 @@ const Renovation = (props: any) => {
}
}
},
[
Data8
]);
},
[
Data8
]);
//页面搜索
//
页面搜索
const
ClickTitleSearch
=
(
comment
:
any
)
=>
{
const
ClickTitleSearch
=
(
comment
:
any
)
=>
{
le
t
tmp
=
filterObjbyTg
(
comment
,
[
'handleStatus'
,
'applyforName'
,
'communityName'
]);
cons
t
tmp
=
filterObjbyTg
(
comment
,
[
'handleStatus'
,
'applyforName'
,
'communityName'
]);
pageNum
=
1
;
pageNum
=
1
;
history
.
push
(
location
.
pathname
+
urlEncode
(
tmp
));
history
.
push
(
location
.
pathname
+
urlEncode
(
tmp
));
};
};
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
const
goToDetail
=
(
values
:
any
)
=>
{
if
(
permissionArr
.
indexOf
(
'27'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'27'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
return
;
...
@@ -118,8 +112,8 @@ const Renovation = (props: any) => {
...
@@ -118,8 +112,8 @@ const Renovation = (props: any) => {
};
};
const
PageChange
=
(
values
:
any
)
=>
{
const
PageChange
=
(
values
:
any
)
=>
{
//页面跳转参数
//
页面跳转参数
var
tmp
=
filterObjbyTg
(
location
.
query
,
[
'handleStatus'
,
'ownerName'
,
'communityName'
]);
const
tmp
=
filterObjbyTg
(
location
.
query
,
[
'handleStatus'
,
'ownerName'
,
'communityName'
]);
tmp
[
'pageNum'
]
=
values
.
current
;
tmp
[
'pageNum'
]
=
values
.
current
;
history
.
push
(
location
.
pathname
+
urlEncode
(
tmp
));
history
.
push
(
location
.
pathname
+
urlEncode
(
tmp
));
};
};
...
@@ -131,7 +125,7 @@ const Renovation = (props: any) => {
...
@@ -131,7 +125,7 @@ const Renovation = (props: any) => {
communitySelect=
{
true
}
communitySelect=
{
true
}
listkey=
{
[
'applyforName'
]
}
listkey=
{
[
'applyforName'
]
}
list=
{
[
'Owner Name'
]
}
list=
{
[
'Owner Name'
]
}
status=
{
[{
name
:
[
'handleStatus'
,
'Status'
],
data
:
decoration
_s
tatus
}]
}
status=
{
[{
name
:
[
'handleStatus'
,
'Status'
],
data
:
decoration
S
tatus
}]
}
defaultValue=
{
readyData
}
defaultValue=
{
readyData
}
onSubmit=
{
ClickTitleSearch
}
onSubmit=
{
ClickTitleSearch
}
/>
/>
...
...
src/pages/CommercialService/RenovationDetail.tsx
View file @
7611da70
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Row
,
Col
,
Button
,
Form
,
Radio
,
message
,
Spin
}
from
'antd'
;
import
{
Row
,
Col
,
Button
,
Form
,
Radio
,
message
,
Spin
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
connect
,
history
}
from
'umi'
;
const
decoration_status
=
[
[
0
,
'Pending'
],
[
1
,
'Approved'
],
[
2
,
'Rejected'
],
];
import
{
RA
,
getCookie
,
Clear
}
from
'@/utils/method'
;
import
{
RA
,
getCookie
,
Clear
}
from
'@/utils/method'
;
import
TitleBack
from
'@/components/TitleBack/TitleBack'
;
import
TitleBack
from
'@/components/TitleBack/TitleBack'
;
import
Line
from
'@/components/Line/Line'
;
import
Line
from
'@/components/Line/Line'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
import
{
RadioChangeEvent
}
from
'antd/lib/radio'
;
const
module
=
'CommunityService'
;
const
module
=
'CommunityService'
;
const
decoration_status
=
[
[
0
,
'Pending'
],
[
1
,
'Approved'
],
[
2
,
'Rejected'
],
];
const
RenovationDetail
=
(
props
:
any
)
=>
{
const
RenovationDetail
=
(
props
:
any
)
=>
{
const
{
dispatch
,
DataSaveDetail
,
location
}
=
props
;
const
{
dispatch
,
DataSaveDetail
,
location
}
=
props
;
const
formRef
=
useRef
(
null
);
const
formRef
=
useRef
(
null
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
listData
,
setListData
]
=
useState
(
null
)
as
any
;
const
[
listData
,
setListData
]
=
useState
(
null
)
as
any
;
const
[
onwerDetail
,
setOnwerDetail
]
=
useState
(
null
)
as
any
;
const
[
onwerDetail
,
setOnwerDetail
]
=
useState
(
null
)
as
any
;
const
[
isShowText
,
setIsShowText
]
=
useState
(
false
);
const
onRadioChange
=
(
e
:
RadioChangeEvent
)
=>
{
if
(
e
.
target
.
value
===
'2'
)
{
setIsShowText
(
true
);
}
else
{
setIsShowText
(
false
);
}
};
useEffect
(()
=>
{
useEffect
(()
=>
{
// 发起请求拿取数据
// 发起请求拿取数据
...
@@ -54,13 +62,13 @@ const RenovationDetail = (props: any) => {
...
@@ -54,13 +62,13 @@ const RenovationDetail = (props: any) => {
if
(
if
(
values
.
decorationStatus
===
'2'
&&
values
.
decorationStatus
===
'2'
&&
(
values
.
replyView
==
undefined
||
values
.
replyView
.
trim
()
===
''
)
(
values
.
replyView
==
=
undefined
||
values
.
replyView
.
trim
()
===
''
)
)
{
)
{
message
.
warning
(
'Replies must be entered!'
);
message
.
warning
(
'Replies must be entered!'
);
return
;
return
;
}
}
var
tmp
=
{
const
tmp
=
{
communityId
:
listData
.
communityId
,
communityId
:
listData
.
communityId
,
id
:
listData
.
id
,
id
:
listData
.
id
,
ownerId
:
listData
.
ownerId
,
ownerId
:
listData
.
ownerId
,
...
@@ -86,7 +94,7 @@ const RenovationDetail = (props: any) => {
...
@@ -86,7 +94,7 @@ const RenovationDetail = (props: any) => {
'Time : '
+
timestampToTime
(
listData
.
createTime
.
time
),
'Time : '
+
timestampToTime
(
listData
.
createTime
.
time
),
]
}
]
}
title=
{
listData
.
decorationStatus
===
0
?
'Renovation Reply'
:
'Renovation Detail'
}
title=
{
listData
.
decorationStatus
===
0
?
'Renovation Reply'
:
'Renovation Detail'
}
></
TitleBack
>
/
>
<
Row
gutter=
{
8
}
>
<
Row
gutter=
{
8
}
>
<
Col
>
Community:
</
Col
>
<
Col
>
Community:
</
Col
>
...
@@ -112,7 +120,7 @@ const RenovationDetail = (props: any) => {
...
@@ -112,7 +120,7 @@ const RenovationDetail = (props: any) => {
<
Col
>
{
onwerDetail
.
owerEmail
}
</
Col
>
<
Col
>
{
onwerDetail
.
owerEmail
}
</
Col
>
</
Row
>
</
Row
>
<
Line
></
Line
>
<
Line
/
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Applicant:
</
Col
>
<
Col
span=
{
3
}
>
Applicant:
</
Col
>
<
Col
span=
{
3
}
>
{
listData
.
contactName
}
</
Col
>
<
Col
span=
{
3
}
>
{
listData
.
contactName
}
</
Col
>
...
@@ -133,10 +141,10 @@ const RenovationDetail = (props: any) => {
...
@@ -133,10 +141,10 @@ const RenovationDetail = (props: any) => {
disabled
disabled
value=
{
listData
.
decorationContent
}
value=
{
listData
.
decorationContent
}
style=
{
{
width
:
300
,
minHeight
:
100
,
padding
:
8
,
resize
:
'none'
}
}
style=
{
{
width
:
300
,
minHeight
:
100
,
padding
:
8
,
resize
:
'none'
}
}
></
TextArea
>
/
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
<
Line
></
Line
>
<
Line
/
>
{
listData
.
decorationStatus
===
'0'
?
(
{
listData
.
decorationStatus
===
'0'
?
(
<>
<>
...
@@ -153,9 +161,9 @@ const RenovationDetail = (props: any) => {
...
@@ -153,9 +161,9 @@ const RenovationDetail = (props: any) => {
},
},
]
}
]
}
>
>
<
Radio
.
Group
>
<
Radio
.
Group
onChange=
{
onRadioChange
}
>
<
Radio
.
Button
value=
{
'1'
}
>
Approve
</
Radio
.
Button
>
{
' '
}
<
Radio
.
Button
value=
"1"
>
Approve
</
Radio
.
Button
>
{
' '
}
<
Radio
.
Button
style=
{
{
marginLeft
:
10
}
}
value=
{
'2'
}
>
<
Radio
.
Button
style=
{
{
marginLeft
:
10
}
}
value=
"2"
>
Reject
Reject
</
Radio
.
Button
>
</
Radio
.
Button
>
</
Radio
.
Group
>
</
Radio
.
Group
>
...
@@ -166,16 +174,25 @@ const RenovationDetail = (props: any) => {
...
@@ -166,16 +174,25 @@ const RenovationDetail = (props: any) => {
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Reply:
</
Col
>
<
Col
span=
{
3
}
>
Reply:
</
Col
>
<
Col
>
<
Col
>
<
Form
.
Item
name=
"replyView"
>
<
Form
.
Item
<
TextArea
style=
{
{
width
:
300
,
height
:
100
,
padding
:
8
}
}
></
TextArea
>
name=
"replyView"
rules=
{
[{
required
:
isShowText
,
max
:
300
,
message
:
'*it is required!'
}]
}
>
<
TextArea
style=
{
{
width
:
300
,
height
:
100
,
padding
:
8
}
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Row
>
<
Col
span=
{
3
}
/>
<
Col
>
<
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Submit
</
Button
>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
<
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Submit
</
Button
>
</
Form
.
Item
>
</
Form
>
</
Form
>
</>
</>
)
:
(
)
:
(
...
@@ -191,8 +208,14 @@ const RenovationDetail = (props: any) => {
...
@@ -191,8 +208,14 @@ const RenovationDetail = (props: any) => {
<
Col
span=
{
3
}
>
Approval For Application:
</
Col
>
<
Col
span=
{
3
}
>
Approval For Application:
</
Col
>
<
Col
>
<
Col
>
<
Radio
.
Group
value=
{
listData
.
decorationStatus
}
>
<
Radio
.
Group
value=
{
listData
.
decorationStatus
}
>
<
Radio
.
Button
value=
{
'1'
}
>
Approve
</
Radio
.
Button
>
{
' '
}
<
Radio
.
Button
value=
"1"
disabled=
{
listData
.
decorationStatus
!==
'1'
}
>
<
Radio
.
Button
style=
{
{
marginLeft
:
10
}
}
value=
{
'2'
}
>
Approve
</
Radio
.
Button
>
{
' '
}
<
Radio
.
Button
style=
{
{
marginLeft
:
10
}
}
value=
"2"
disabled=
{
listData
.
decorationStatus
!==
'2'
}
>
Reject
Reject
</
Radio
.
Button
>
</
Radio
.
Button
>
</
Radio
.
Group
>
</
Radio
.
Group
>
...
@@ -203,10 +226,16 @@ const RenovationDetail = (props: any) => {
...
@@ -203,10 +226,16 @@ const RenovationDetail = (props: any) => {
<
Col
span=
{
3
}
>
Reply:
</
Col
>
<
Col
span=
{
3
}
>
Reply:
</
Col
>
<
Col
>
<
Col
>
<
TextArea
<
TextArea
style=
{
{
width
:
300
,
minHeight
:
100
,
padding
:
8
,
resize
:
'none'
}
}
style=
{
{
width
:
300
,
minHeight
:
100
,
padding
:
8
,
resize
:
'none'
,
color
:
listData
.
decorationStatus
===
'2'
?
'red'
:
''
,
}
}
disabled
disabled
value=
{
listData
.
replyView
}
value=
{
listData
.
replyView
}
></
TextArea
>
/
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
</>
</>
...
...
src/pages/PropertyManagement/ChargeManager.tsx
View file @
7611da70
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
connect
,
history
}
from
'umi'
;
import
styles
from
'./index.less'
;
import
{
message
}
from
'antd'
;
import
{
filterObj
,
urlEncode
}
from
'@/utils/method'
;
import
{
useIntl
,
connect
,
history
}
from
'umi'
;
import
ProTable
,
{
ProColumns
}
from
'@ant-design/pro-table'
;
import
{
Button
,
Tag
,
Table
,
Space
,
message
}
from
'antd'
;
import
{
timestampToTime
}
from
'../../utils/time'
;
import
{
timestampToTime
}
from
'../../utils/time'
;
import
{
filterObj
,
urlEncode
,
filterObjbyTg
}
from
'@/utils/method'
;
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
import
styles
from
'./index.less'
;
import
ProTable
,
{
ProColumns
}
from
'@ant-design/pro-table'
;
interface
readyData
{
interface
readyData
{
[
key
:
string
]:
any
;
[
key
:
string
]:
any
;
}
}
...
@@ -42,6 +37,11 @@ const ChargeManager = (props: any) => {
...
@@ -42,6 +37,11 @@ const ChargeManager = (props: any) => {
const
{
dispatch
,
location
,
Data
}
=
props
;
const
{
dispatch
,
location
,
Data
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
// 存储详情页数据
const
getById
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/getById'
,
playload
:
values
});
};
// 详情页
// 详情页
const
goToDetail
=
(
values
:
any
)
=>
{
const
goToDetail
=
(
values
:
any
)
=>
{
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
...
@@ -53,10 +53,6 @@ const ChargeManager = (props: any) => {
...
@@ -53,10 +53,6 @@ const ChargeManager = (props: any) => {
history
.
push
(
'/PropertyManagementDetail'
);
history
.
push
(
'/PropertyManagementDetail'
);
};
};
// 存储详情页数据
const
getById
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/getById'
,
playload
:
values
});
};
// 获取数据
// 获取数据
const
get
=
(
values
:
any
)
=>
{
const
get
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/get'
,
playload
:
values
});
dispatch
({
type
:
'PropertyManagement/get'
,
playload
:
values
});
...
@@ -90,7 +86,6 @@ const ChargeManager = (props: any) => {
...
@@ -90,7 +86,6 @@ const ChargeManager = (props: any) => {
// 搜索按钮
// 搜索按钮
const
TitleSearchContent
=
(
comment
:
any
)
=>
{
const
TitleSearchContent
=
(
comment
:
any
)
=>
{
setLoading
(
true
);
setLoading
(
true
);
console
.
log
(
comment
);
history
.
push
(
history
.
push
(
location
.
pathname
+
location
.
pathname
+
urlEncode
(
urlEncode
(
...
@@ -133,17 +128,6 @@ const ChargeManager = (props: any) => {
...
@@ -133,17 +128,6 @@ const ChargeManager = (props: any) => {
},
},
];
];
// 重置表单触发
const
resetHandler
=
()
=>
{
setLoading
(
true
);
readyData
=
{
communityName
:
''
,
pageNum
:
1
,
tosOwnerName
:
''
,
};
history
.
push
(
location
.
pathname
+
urlEncode
(
filterObj
(
readyData
)));
};
// 切换页码
// 切换页码
const
changePage
=
(
value
:
any
)
=>
{
const
changePage
=
(
value
:
any
)
=>
{
setLoading
(
true
);
setLoading
(
true
);
...
@@ -157,13 +141,13 @@ const ChargeManager = (props: any) => {
...
@@ -157,13 +141,13 @@ const ChargeManager = (props: any) => {
),
),
);
);
};
};
console
.
log
(
Data
);
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
<
TitleSearch
<
TitleSearch
listkey=
{
[
'tosOwnerName'
]
}
listkey=
{
[
'tosOwnerName'
]
}
list=
{
[
'Name Of Owner'
]
}
list=
{
[
'Name Of Owner'
]
}
communitySelect
=
{
true
}
communitySelect
onSubmit=
{
TitleSearchContent
}
onSubmit=
{
TitleSearchContent
}
defaultValue=
{
readyData
}
defaultValue=
{
readyData
}
/>
/>
...
@@ -173,7 +157,7 @@ const ChargeManager = (props: any) => {
...
@@ -173,7 +157,7 @@ const ChargeManager = (props: any) => {
columnEmptyText=
{
false
}
columnEmptyText=
{
false
}
columns=
{
columns
}
columns=
{
columns
}
dataSource=
{
Data
.
list
}
dataSource=
{
Data
.
list
}
rowKey=
{
'id'
}
rowKey=
"id"
search=
{
false
}
search=
{
false
}
loading=
{
loading
}
loading=
{
loading
}
onChange=
{
changePage
}
onChange=
{
changePage
}
...
@@ -183,12 +167,7 @@ const ChargeManager = (props: any) => {
...
@@ -183,12 +167,7 @@ const ChargeManager = (props: any) => {
total
:
Data
.
page
.
totalRow
,
total
:
Data
.
page
.
totalRow
,
current
:
+
readyData
.
pageNum
,
current
:
+
readyData
.
pageNum
,
}
}
}
}
options=
{
{
options=
{
false
}
density
:
true
,
fullScreen
:
true
,
reload
:
false
,
setting
:
false
,
}
}
/
>
/
>
) : (
) : (
<></>
<></>
...
...
src/pages/UserManagement/LIFEUserManagement/Users.tsx
View file @
7611da70
...
@@ -104,20 +104,19 @@ const Users = (props: any) => {
...
@@ -104,20 +104,19 @@ const Users = (props: any) => {
if
(
file
.
name
.
indexOf
(
'.xlsx'
)
===
-
1
&&
file
.
name
.
indexOf
(
'.xls'
)
===
-
1
)
{
if
(
file
.
name
.
indexOf
(
'.xlsx'
)
===
-
1
&&
file
.
name
.
indexOf
(
'.xls'
)
===
-
1
)
{
message
.
error
(
`
${
file
.
name
}
file format is incorrect!`
);
message
.
error
(
`
${
file
.
name
}
file format is incorrect!`
);
return
false
;
return
false
;
}
else
{
return
true
;
}
}
return
true
;
},
},
onChange
(
info
:
any
)
{
onChange
(
info
:
any
)
{
if
(
info
.
file
.
status
==
'uploading'
)
{
if
(
info
.
file
.
status
==
=
'uploading'
)
{
setFileUploading
(
true
);
setFileUploading
(
true
);
}
}
if
(
info
.
file
.
status
===
'done'
)
{
if
(
info
.
file
.
status
===
'done'
)
{
if
(
info
.
file
.
response
.
error_code
==
'0000'
)
{
if
(
info
.
file
.
response
.
error_code
==
=
'0000'
)
{
history
.
push
(
location
.
pathname
+
'/Result'
);
history
.
push
(
location
.
pathname
+
'/Result'
);
}
else
if
(
info
.
file
.
response
.
error_code
==
'0002'
)
{
}
else
if
(
info
.
file
.
response
.
error_code
==
=
'0002'
)
{
message
.
error
(
info
.
file
.
response
.
error_msg
);
message
.
error
(
info
.
file
.
response
.
error_msg
);
}
else
if
(
info
.
file
.
response
.
error_code
==
'0001'
)
{
}
else
if
(
info
.
file
.
response
.
error_code
==
=
'0001'
)
{
history
.
push
(
location
.
pathname
+
'/ResultFailed'
);
history
.
push
(
location
.
pathname
+
'/ResultFailed'
);
message
.
error
(
message
.
error
(
`
${
info
.
file
.
name
}
file upload failed.`
+
`
${
info
.
file
.
name
}
file upload failed.`
+
...
@@ -139,7 +138,13 @@ const Users = (props: any) => {
...
@@ -139,7 +138,13 @@ const Users = (props: any) => {
// 监听路由变化更新数据
// 监听路由变化更新数据
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
readyData
);
// 重置数据
readyData
=
{
pageNum
:
1
,
owerName
:
''
,
communityArray
:
[],
};
if
(
location
.
query
)
{
if
(
location
.
query
)
{
readyData
=
{
readyData
=
{
...
readyData
,
...
readyData
,
...
@@ -168,7 +173,7 @@ const Users = (props: any) => {
...
@@ -168,7 +173,7 @@ const Users = (props: any) => {
readyData
.
communityArray
=
CommunityList
;
readyData
.
communityArray
=
CommunityList
;
}
}
setLoading
(
true
);
setLoading
(
true
);
//获取数据
//
获取数据
RA
(
RA
(
12
,
12
,
{
{
...
@@ -187,7 +192,7 @@ const Users = (props: any) => {
...
@@ -187,7 +192,7 @@ const Users = (props: any) => {
}
}
},
[
Data
]);
},
[
Data
]);
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
const
goToDetail
=
(
values
:
any
)
=>
{
if
(
permissionArr
.
indexOf
(
'2'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'2'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
return
;
...
@@ -196,7 +201,7 @@ const Users = (props: any) => {
...
@@ -196,7 +201,7 @@ const Users = (props: any) => {
history
.
push
(
location
.
pathname
+
'/Detail'
);
history
.
push
(
location
.
pathname
+
'/Detail'
);
};
};
const
goToEdit
=
(
values
:
any
,
e
:
any
)
=>
{
const
goToEdit
=
(
values
:
any
)
=>
{
if
(
permissionArr
.
indexOf
(
'3'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'3'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
return
;
...
@@ -217,10 +222,9 @@ const Users = (props: any) => {
...
@@ -217,10 +222,9 @@ const Users = (props: any) => {
// LIFE用户管理页面的搜索按钮
// LIFE用户管理页面的搜索按钮
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
);
readyData
.
communityArray
=
comment
.
serviceCommunityList
;
readyData
.
communityArray
=
comment
.
serviceCommunityList
;
/
*页面跳转*/
/
/ 页面跳转
history
.
push
(
history
.
push
(
location
.
pathname
+
location
.
pathname
+
urlEncode
(
urlEncode
(
...
@@ -246,7 +250,7 @@ const Users = (props: any) => {
...
@@ -246,7 +250,7 @@ const Users = (props: any) => {
<
TitleSearch
<
TitleSearch
listkey=
{
[
'OwnerName'
]
}
listkey=
{
[
'OwnerName'
]
}
list=
{
[
'Owner Name'
]
}
list=
{
[
'Owner Name'
]
}
community=
{
'serviceCommunityList'
}
community=
"serviceCommunityList"
onSubmit=
{
CallBackTitleSearch
}
onSubmit=
{
CallBackTitleSearch
}
defaultValue=
{
{
OwnerName
:
readyData
.
owerName
}
}
defaultValue=
{
{
OwnerName
:
readyData
.
owerName
}
}
checklist=
{
readyData
.
communityArray
.
length
!==
0
?
readyData
.
communityArray
:
null
}
checklist=
{
readyData
.
communityArray
.
length
!==
0
?
readyData
.
communityArray
:
null
}
...
@@ -277,7 +281,7 @@ const Users = (props: any) => {
...
@@ -277,7 +281,7 @@ const Users = (props: any) => {
{
/* 列表组件 */
}
{
/* 列表组件 */
}
<
Table
<
Table
rowKey=
{
'id'
}
rowKey=
"id"
loading=
{
loading
}
loading=
{
loading
}
style=
{
{
marginTop
:
16
}
}
style=
{
{
marginTop
:
16
}
}
dataSource=
{
Data
!=
null
?
Data
.
data
.
list
:
[]
}
dataSource=
{
Data
!=
null
?
Data
.
data
.
list
:
[]
}
...
...
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
View file @
7611da70
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Input
,
Spin
,
Button
,
Form
,
message
}
from
'antd'
;
import
{
Input
,
Spin
,
Button
,
Form
,
message
}
from
'antd'
;
import
{
connect
}
from
'umi'
;
import
{
connect
}
from
'umi'
;
import
{
validateMessages
}
from
'@/utils/params'
;
import
styles
from
'./UsersAdd.less'
;
import
styles
from
'./UsersAdd.less'
;
import
Line
from
'../../../components/Line/Line'
;
import
Line
from
'../../../components/Line/Line'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
SearchOptionsCommnity
from
'../../../components/SearchOptions/SearchOptionsCommnity'
;
import
SearchOptionsCommnity
from
'../../../components/SearchOptions/SearchOptionsCommnity'
;
import
{
checkParam
,
RA
,
Clear
}
from
'../../../utils/method'
;
import
{
checkParam
,
RA
}
from
'../../../utils/method'
;
import
{
validateMessages
}
from
'@/utils/params'
;
const
module
=
'User'
;
const
module
=
'User'
;
const
UsersAdd
=
(
props
:
any
)
=>
{
const
UsersAdd
=
(
props
:
any
)
=>
{
...
@@ -21,11 +19,11 @@ const UsersAdd = (props: any) => {
...
@@ -21,11 +19,11 @@ const UsersAdd = (props: any) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Data4Error
)
{
if
(
Data4Error
)
{
if
(
Data4Error
.
msg
)
{
setLoading
(
false
);
setLoading
(
false
);
dispatch
({
message
.
error
(
Data4Error
.
msg
,
3
);
type
:
`
${
module
}
/Data4ErrorClear`
,
Clear
(
module
+
'/Data4ErrorClear'
,
dispatch
);
payload
:
{},
}
}
);
}
}
},
[
Data4Error
]);
},
[
Data4Error
]);
...
@@ -39,17 +37,16 @@ const UsersAdd = (props: any) => {
...
@@ -39,17 +37,16 @@ const UsersAdd = (props: any) => {
values
.
owerPhone
=
null
;
values
.
owerPhone
=
null
;
values
.
owerEmail
=
null
;
values
.
owerEmail
=
null
;
values
.
buildingNumber
=
'BLK '
+
values
.
buildingNumber
;
values
.
buildingNumber
=
'BLK '
+
values
.
buildingNumber
;
console
.
log
(
values
);
RA
(
14
,
values
,
module
,
dispatch
);
RA
(
14
,
values
,
module
,
dispatch
);
setLoading
(
true
);
setLoading
(
true
);
}
else
{
}
else
{
setLoading
(
false
);
setLoading
(
false
);
message
.
error
(
'Error,Please finish it,not empty!'
,
3
);
message
.
error
(
'Error,Please finish it,not empty!'
);
}
}
};
};
const
extendName
=
(
values
:
any
)
=>
{
const
extendName
=
(
values
:
any
)
=>
{
var
tmp
=
postman
;
const
tmp
=
postman
;
tmp
.
extend
=
values
;
tmp
.
extend
=
values
;
RA
(
32
,
{
communityName
:
values
},
module
,
dispatch
);
RA
(
32
,
{
communityName
:
values
},
module
,
dispatch
);
setPostman
(
tmp
);
setPostman
(
tmp
);
...
@@ -82,7 +79,7 @@ const UsersAdd = (props: any) => {
...
@@ -82,7 +79,7 @@ const UsersAdd = (props: any) => {
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
{
/* 头部组件 */
}
<
TitleBack
title=
{
'Create New Owner'
}
/>
<
TitleBack
title=
"Create New Owner"
/>
<
Spin
spinning=
{
loading
}
>
<
Spin
spinning=
{
loading
}
>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
validateMessages=
{
validateMessages
}
>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
validateMessages=
{
validateMessages
}
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1
}
>
...
@@ -149,7 +146,8 @@ const UsersAdd = (props: any) => {
...
@@ -149,7 +146,8 @@ const UsersAdd = (props: any) => {
</
div
>
</
div
>
</
div
>
</
div
>
<
Line
/>
<
Line
/>
<
Form
.
Item
>
<
Form
.
Item
style=
{
{
marginLeft
:
146
}
}
>
<
Button
type=
"primary"
htmlType=
"submit"
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Submit
Submit
</
Button
>
</
Button
>
...
...
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
View file @
7611da70
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Input
,
Modal
,
Button
,
Form
,
Row
,
Col
,
message
,
Spin
}
from
'antd'
;
import
{
Input
,
Modal
,
Button
,
Form
,
Row
,
Col
,
message
,
Spin
}
from
'antd'
;
const
{
confirm
}
=
Modal
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
connect
}
from
'umi'
;
import
{
connect
,
history
}
from
'umi'
;
import
styles
from
'./UsersAdd.less'
;
import
Line
from
'../../../components/Line/Line'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
{
checkParam
}
from
'../../../utils/method'
;
import
TableShow
from
'@/components/TableShow/TableShow'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
import
{
validateMessages
}
from
'@/utils/params'
;
import
{
validateMessages
}
from
'@/utils/params'
;
import
TableShow
from
'@/components/TableShow/TableShow'
;
import
{
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
import
{
checkParam
}
from
'../../../utils/method'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
Line
from
'../../../components/Line/Line'
;
import
styles
from
'./UsersAdd.less'
;
const
{
confirm
}
=
Modal
;
const
UsersDetail
=
(
props
:
any
)
=>
{
const
UsersDetail
=
(
props
:
any
)
=>
{
const
{
dispatch
,
DataSave
,
DataSaveDetail
,
Result
,
returnValue
,
memberResult
}
=
props
;
const
{
dispatch
,
DataSave
,
DataSaveDetail
,
Result
,
returnValue
,
memberResult
,
location
}
=
props
;
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
dispatch
({
type
:
'User/RA'
,
type
:
'User/RA'
,
playload
:
{
playload
:
{
index
:
index
,
index
,
body
:
values
,
body
:
values
,
},
},
});
});
...
@@ -61,11 +60,6 @@ const UsersDetail = (props: any) => {
...
@@ -61,11 +60,6 @@ const UsersDetail = (props: any) => {
}
else
{
}
else
{
values
.
id
=
null
;
values
.
id
=
null
;
}
}
var
tmp
=
Object
.
keys
(
values
);
console
.
log
(
'添加业主提交的参数:'
+
tmp
.
length
);
console
.
log
(
values
);
if
(
checkParam
(
values
))
{
if
(
checkParam
(
values
))
{
setVisible
(
true
);
setVisible
(
true
);
RA
(
18
,
values
);
RA
(
18
,
values
);
...
@@ -77,36 +71,24 @@ const UsersDetail = (props: any) => {
...
@@ -77,36 +71,24 @@ const UsersDetail = (props: any) => {
// 监听删除结果
// 监听删除结果
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Result
!=
null
)
{
if
(
Result
!=
null
)
{
console
.
log
(
Result
);
if
(
Result
.
error_code
!==
'0000'
)
{
if
(
Result
.
error_code
!==
'0000'
)
{
message
.
error
(
Result
.
error_msg
);
message
.
error
(
Result
.
error_msg
);
ResultClear
();
ResultClear
();
history
.
go
(
0
);
history
.
go
Back
(
);
}
}
}
}
},
[
Result
]);
},
[
Result
]);
// 监听返回内容
// 监听返回内容
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
returnValue
);
if
(
returnValue
!=
null
)
{
if
(
returnValue
!=
null
)
{
if
(
returnValue
.
error_code
!==
'0001'
)
{
if
(
returnValue
.
error_code
!==
'0001'
)
{
message
.
success
(
'Delete Successfully!'
,
3
);
// RA(13, {
// id: DataSave.id,
// owerName: DataSave.owerName,
// enable: DataSave.enable,
// buildingNumber: DataSave.buildingNumber,
// floorNumber: DataSave.floorNumber,
// roomNumber: DataSave.roomNumber,
// });
dispatch
({
dispatch
({
type
:
'User/ClearReturnValue'
,
type
:
'User/ClearReturnValue'
,
playload
:
{},
playload
:
{},
});
});
history
.
b
ack
();
history
.
goB
ack
();
}
else
{
}
else
{
message
.
error
(
returnValue
.
error_msg
,
3
);
message
.
error
(
returnValue
.
error_msg
,
3
);
}
}
...
@@ -116,9 +98,7 @@ const UsersDetail = (props: any) => {
...
@@ -116,9 +98,7 @@ const UsersDetail = (props: any) => {
// 监听数据返回
// 监听数据返回
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
DataSave
!=
null
)
{
if
(
DataSave
!=
null
)
{
console
.
log
(
'给予页面数据'
);
const
tmp
=
{
console
.
log
(
DataSave
);
var
tmp
=
{
owerName
:
DataSave
.
owerName
,
owerName
:
DataSave
.
owerName
,
owerPhone
:
DataSave
.
owerPhone
,
owerPhone
:
DataSave
.
owerPhone
,
owerEmail
:
DataSave
.
owerEmail
,
owerEmail
:
DataSave
.
owerEmail
,
...
@@ -133,25 +113,22 @@ const UsersDetail = (props: any) => {
...
@@ -133,25 +113,22 @@ const UsersDetail = (props: any) => {
roomNumber
:
DataSave
.
roomNumber
,
roomNumber
:
DataSave
.
roomNumber
,
});
});
}
else
{
}
else
{
history
.
go
(
-
1
);
history
.
go
Back
(
);
}
}
},
[
DataSave
]);
},
[
DataSave
]);
// 监听数据返回
// 监听数据返回
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
DataSaveDetail
!=
null
)
{
if
(
DataSaveDetail
!=
null
)
{
console
.
log
(
'页面数据副歌'
);
console
.
log
(
DataSaveDetail
);
setDataSaveLoading
(
false
);
setDataSaveLoading
(
false
);
}
}
},
[
DataSaveDetail
]);
},
[
DataSaveDetail
]);
// 存储住户详情页的数据
// 存储住户详情页的数据
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
memberDetail
);
if
(
DataSave
)
{
if
(
DataSave
)
{
if
(
!
memberDetail
)
{
if
(
!
memberDetail
)
{
var
tmp
=
{
const
tmp
=
{
owerName
:
DataSave
.
owerName
,
owerName
:
DataSave
.
owerName
,
owerPhone
:
DataSave
.
owerPhone
,
owerPhone
:
DataSave
.
owerPhone
,
owerEmail
:
DataSave
.
owerEmail
,
owerEmail
:
DataSave
.
owerEmail
,
...
@@ -170,8 +147,6 @@ const UsersDetail = (props: any) => {
...
@@ -170,8 +147,6 @@ const UsersDetail = (props: any) => {
// 住户详情页
// 住户详情页
const
tableShowCallback
=
(
values
:
any
)
=>
{
const
tableShowCallback
=
(
values
:
any
)
=>
{
console
.
log
(
'成员信息'
);
console
.
log
(
values
);
setMemberData
(
values
);
setMemberData
(
values
);
setMemberDetail
(
true
);
setMemberDetail
(
true
);
...
@@ -193,8 +168,7 @@ const UsersDetail = (props: any) => {
...
@@ -193,8 +168,7 @@ const UsersDetail = (props: any) => {
onCancel
()
{},
onCancel
()
{},
onOk
()
{
onOk
()
{
if
(
DataSave
!=
null
)
{
if
(
DataSave
!=
null
)
{
// console.log(DataSave);
const
tmp
=
{
var
tmp
=
{
owerName
:
DataSave
.
owerName
,
owerName
:
DataSave
.
owerName
,
communityName
:
DataSave
.
communityName
,
communityName
:
DataSave
.
communityName
,
unit
:
values
,
unit
:
values
,
...
@@ -206,8 +180,7 @@ const UsersDetail = (props: any) => {
...
@@ -206,8 +180,7 @@ const UsersDetail = (props: any) => {
};
};
// 删除住户
// 删除住户
const
DeleteMember
=
(
values
:
any
,
e
:
any
)
=>
{
const
DeleteMember
=
(
values
:
any
)
=>
{
console
.
log
(
values
);
if
(
permissionArr
.
indexOf
(
'7'
)
<
0
)
{
if
(
permissionArr
.
indexOf
(
'7'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
return
;
...
@@ -237,7 +210,6 @@ const UsersDetail = (props: any) => {
...
@@ -237,7 +210,6 @@ const UsersDetail = (props: any) => {
if
(
memberResult
!=
null
)
{
if
(
memberResult
!=
null
)
{
setMemberDetail
(
false
);
setMemberDetail
(
false
);
setLoadding
(
false
);
setLoadding
(
false
);
message
.
success
(
'Successfully delete!!!'
);
RA
(
13
,
{
RA
(
13
,
{
id
:
DataSave
.
id
,
id
:
DataSave
.
id
,
owerName
:
DataSave
.
owerName
,
owerName
:
DataSave
.
owerName
,
...
@@ -265,7 +237,7 @@ const UsersDetail = (props: any) => {
...
@@ -265,7 +237,7 @@ const UsersDetail = (props: any) => {
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
<
Spin
spinning=
{
visible
}
tip=
"Loading Submit"
>
<
Spin
spinning=
{
visible
}
tip=
"Loading Submit"
>
{
memberDetail
==
false
?
(
{
memberDetail
==
=
false
?
(
<>
<>
{
DataSave
!=
null
?
(
{
DataSave
!=
null
?
(
<>
<>
...
@@ -290,7 +262,7 @@ const UsersDetail = (props: any) => {
...
@@ -290,7 +262,7 @@ const UsersDetail = (props: any) => {
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
</
div
>
</
div
>
{
DataSave
.
enable
==
1
?
(
{
DataSave
.
enable
==
=
1
?
(
<>
<>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4item0
}
>
Contact Details
</
div
>
<
div
className=
{
styles
.
box4item0
}
>
Contact Details
</
div
>
...
@@ -334,7 +306,7 @@ const UsersDetail = (props: any) => {
...
@@ -334,7 +306,7 @@ const UsersDetail = (props: any) => {
{
editFlag
&&
DataSaveDetail
.
rows
[
0
].
owner
.
deleted
!==
1
?
(
{
editFlag
&&
DataSaveDetail
.
rows
[
0
].
owner
.
deleted
!==
1
?
(
<>
<>
<
Line
/>
<
Line
/>
<
Form
.
Item
>
<
Form
.
Item
style=
{
{
textAlign
:
'left'
}
}
>
<
Button
type=
"primary"
htmlType=
"submit"
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Submit
Submit
</
Button
>
</
Button
>
...
@@ -353,11 +325,7 @@ const UsersDetail = (props: any) => {
...
@@ -353,11 +325,7 @@ const UsersDetail = (props: any) => {
<>
<>
<
Spin
spinning=
{
loadding
}
>
<
Spin
spinning=
{
loadding
}
>
<
div
>
<
div
>
<
TitleBack
<
TitleBack
title=
"Family/Tenant Details"
url=
"none"
titleBack=
{
titleBackCallBack
}
/>
title=
{
'Family/Tenant Details'
}
url=
"none"
titleBack=
{
titleBackCallBack
}
></
TitleBack
>
<
Row
>
<
Row
>
<
Col
span=
{
4
}
>
User Type:
</
Col
>
<
Col
span=
{
4
}
>
User Type:
</
Col
>
<
Col
span=
{
4
}
>
<
Col
span=
{
4
}
>
...
@@ -375,7 +343,7 @@ const UsersDetail = (props: any) => {
...
@@ -375,7 +343,7 @@ const UsersDetail = (props: any) => {
<
Col
span=
{
4
}
>
{
memberData
.
owner_family_phone
}
</
Col
>
<
Col
span=
{
4
}
>
{
memberData
.
owner_family_phone
}
</
Col
>
<
Col
span=
{
4
}
>
{
memberData
.
owner_family_email
}
</
Col
>
<
Col
span=
{
4
}
>
{
memberData
.
owner_family_email
}
</
Col
>
</
Row
>
</
Row
>
<
Line
></
Line
>
<
Line
/
>
<
Button
danger
onClick=
{
DeleteMember
.
bind
(
this
,
memberData
)
}
>
<
Button
danger
onClick=
{
DeleteMember
.
bind
(
this
,
memberData
)
}
>
Delete
Delete
...
...
src/pages/UserManagement/LIFEUserManagement/index.less
View file @
7611da70
...
@@ -2,130 +2,130 @@
...
@@ -2,130 +2,130 @@
//基石
//基石
.base {
.base {
width: 100%;
width: 100%;
background-color: #ffffff;
background-color: #ffffff;
padding: 34px;
padding: 34px;
}
}
//边栏1
//边栏1
//头部组件
//头部组件
.box{
.box
{
width: 100%;
width: 100%;
height: 34px;
height: 34px;
position: relative;
position: relative;
margin-bottom: 16px;
margin-bottom: 16px;
}
}
.input{
.input
{
width:
200px;
width:
200px;
height:
32px;
height:
32px;
background:
none;
background:
none;
outline: none;
outline: none;
border:1px solid rgba(217,217,217,
1);
border: 1px solid rgba(217, 217, 217,
1);
border-radius:
2px;
border-radius:
2px;
font-size:
14px;
font-size:
14px;
font-weight:
400;
font-weight:
400;
line-height:
30px;
line-height:
30px;
text-indent: 19px;
text-indent: 19px;
}
}
.item1{
.item1
{
.input();
.input();
}
}
.item2{
.item2
{
.input();
.input();
margin-left: 20px;
margin-left: 20px;
}
}
.item3{
.item3
{
width:
80px;
width:
80px;
height:
32px;
height:
32px;
border:1px solid rgba(24,144,255,
1);
border: 1px solid rgba(24, 144, 255,
1);
border-radius:
2px;
border-radius:
2px;
background-color:
#e7f4ff;
background-color:
#e7f4ff;
outline: none;
outline: none;
font-size:
14px;
font-size:
14px;
font-weight:
400;
font-weight:
400;
color:rgba(24,144,255,
1);
color: rgba(24, 144, 255,
1);
line-height:
30px;
line-height:
30px;
cursor: pointer;
cursor: pointer;
margin-top: 16px;
margin-top: 16px;
}
}
.item3:active{
.item3:active
{
background-color:
#ffffff;
background-color:
#ffffff;
}
}
//边栏2
//边栏2
.box2{
.box2 {
width: 100%;
width: 90%;
height: 40px;
height: 40px;
margin-top: 0px;
margin-top: -35px;
position: relative;
margin-left: 150/1920 * 100vw;
position: relative;
}
}
//小组件1
//小组件1
.buttonLine{
.buttonLine
{
width:
240px;
width:
240px;
height:
32px;
height:
32px;
border:
none;
border:
none;
background:
none;
background:
none;
outline: none;
outline: none;
font-size:
14px;
font-size:
14px;
font-weight:400;
font-weight: 400;
line-height:
30px;
line-height:
30px;
cursor: pointer;
cursor: pointer;
}
}
.fontgz(){
.fontgz()
{
font-size:
16px;
font-size:
16px;
font-family:
'Source Han Sans CN;';
font-family:
'Source Han Sans CN;';
font-weight:
800;
font-weight:
800;
}
}
.buttonWait{
.buttonWait
{
.buttonLine();
.buttonLine();
border-bottom:
2px solid#dedede;
border-bottom:
2px solid#dedede;
color:
#454545;
color:
#454545;
.fontgz();
.fontgz();
}
}
.buttonWait:hover{
.buttonWait:hover
{
border-bottom:3px solid rgba(24,144,255,
1);
border-bottom: 3px solid rgba(24, 144, 255,
1);
color:rgba(24,144,255,1);
color: rgba(24, 144, 255, 1);
.fontgz();
.fontgz();
}
}
.buttonChoose{
.buttonChoose
{
.buttonLine();
.buttonLine();
border-bottom:3px solid rgba(24,144,255,
1);
border-bottom: 3px solid rgba(24, 144, 255,
1);
color:rgba(24,144,255,
1);
color: rgba(24, 144, 255,
1);
.fontgz();
.fontgz();
}
}
.butttonAdd0{
.butttonAdd0
{
border:1px solid rgba(24,144,255,
1);
border: 1px solid rgba(24, 144, 255,
1);
color:rgba(24,144,255,
1);
color: rgba(24, 144, 255,
1);
border-radius:
2px;
border-radius:
2px;
}
}
.buttonAdd{
.buttonAdd
{
// .butttonAdd0();
// .butttonAdd0();
background:
none;
background:
none;
outline: none;
outline: none;
cursor: pointer;
cursor: pointer;
// width:170px;
// width:170px;
// height:32px;
// height:32px;
position: absolute;
position: absolute;
right: 0;
right: 0;
}
}
.buttonAdd2{
.buttonAdd2
{
background:
none;
background:
none;
outline: none;
outline: none;
cursor: pointer;
cursor: pointer;
width:
170px;
width:
170px;
height:
32px;
height:
32px;
border:1px solid rgba(24,144,255,
1);
border: 1px solid rgba(24, 144, 255,
1);
color:rgba(24,144,255,
1);
color: rgba(24, 144, 255,
1);
border-radius:
2px;
border-radius:
2px;
position: absolute;
position: absolute;
right: 180px;
right: 180px;
}
}
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
View file @
7611da70
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Input
,
Button
,
Form
,
Spin
,
message
,
Checkbox
}
from
'antd'
;
import
{
Input
,
Button
,
Form
,
Spin
,
Modal
,
Checkbox
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
connect
,
history
}
from
'umi'
;
...
@@ -18,14 +18,15 @@ let optionsList: {
...
@@ -18,14 +18,15 @@ let optionsList: {
const
Edit
=
(
props
:
any
)
=>
{
const
Edit
=
(
props
:
any
)
=>
{
const
{
dispatch
,
CurData
,
SaveChooseData
,
CommunityList
,
DataServices
}
=
props
;
const
{
dispatch
,
CurData
,
SaveChooseData
,
CommunityList
,
DataServices
}
=
props
;
const
TosTosServiceProviderSave
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/TosTosServiceProviderSave'
,
playload
:
values
});
};
const
[
CList
,
setCList
]
=
useState
(
CommunityList
);
const
[
CList
,
setCList
]
=
useState
(
CommunityList
);
const
[
load
,
setload
]
=
useState
(
false
);
const
[
load
,
setload
]
=
useState
(
false
);
const
TosTosServiceProviderSave
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/TosTosServiceProviderSave'
,
playload
:
values
});
};
const
printContent
=
(
List
:
any
)
=>
{
const
printContent
=
(
List
:
any
)
=>
{
setCList
(
List
);
setCList
(
List
);
};
};
...
@@ -33,7 +34,12 @@ const Edit = (props: any) => {
...
@@ -33,7 +34,12 @@ const Edit = (props: any) => {
// 选择服务商事件
// 选择服务商事件
const
onSelectCheckBox
=
(
checkedValue
:
CheckboxValueType
[])
=>
{
const
onSelectCheckBox
=
(
checkedValue
:
CheckboxValueType
[])
=>
{
console
.
log
(
checkedValue
);
if
(
checkedValue
.
indexOf
(
'0'
)
>
-
1
&&
checkedValue
.
indexOf
(
'1'
)
>
-
1
)
{
Modal
.
error
({
title
:
'Error'
,
content
:
<
div
>
Accountant and security can only choose one!!!
</
div
>,
});
}
};
};
// 拿取服务范围数据
// 拿取服务范围数据
...
@@ -107,7 +113,6 @@ const Edit = (props: any) => {
...
@@ -107,7 +113,6 @@ const Edit = (props: any) => {
if
(
SaveChooseData
)
{
if
(
SaveChooseData
)
{
val
.
id
=
SaveChooseData
.
id
;
val
.
id
=
SaveChooseData
.
id
;
}
}
setload
(
true
);
setload
(
true
);
TosTosServiceProviderSave
(
val
);
TosTosServiceProviderSave
(
val
);
};
};
...
@@ -233,7 +238,7 @@ const Edit = (props: any) => {
...
@@ -233,7 +238,7 @@ const Edit = (props: any) => {
</
div
>
</
div
>
<
div
className=
{
styles
.
line
}
/>
<
div
className=
{
styles
.
line
}
/>
<
Form
.
Item
>
<
Form
.
Item
style=
{
{
marginLeft
:
190
}
}
>
<
Button
type=
"primary"
htmlType=
"submit"
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Submit
Submit
</
Button
>
</
Button
>
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
7611da70
...
@@ -152,7 +152,6 @@ const ServiceProviderManagement = (props: propsType) => {
...
@@ -152,7 +152,6 @@ const ServiceProviderManagement = (props: propsType) => {
// 处理服务商数据
// 处理服务商数据
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
DataServices
)
{
if
(
DataServices
)
{
console
.
log
(
DataServices
);
options
=
DataServices
.
data
.
rows
.
map
((
v
:
any
)
=>
{
options
=
DataServices
.
data
.
rows
.
map
((
v
:
any
)
=>
{
return
[
v
.
serviceCode
,
v
.
serviceName
];
return
[
v
.
serviceCode
,
v
.
serviceName
];
});
});
...
@@ -161,14 +160,20 @@ const ServiceProviderManagement = (props: propsType) => {
...
@@ -161,14 +160,20 @@ const ServiceProviderManagement = (props: propsType) => {
// 监听路由url
// 监听路由url
useEffect
(()
=>
{
useEffect
(()
=>
{
// 重置数据
readyData
=
{
pageNum
:
1
,
serviceCommunityList
:
[],
serviceScope
:
''
,
providerName
:
''
,
};
if
(
location
.
query
)
{
if
(
location
.
query
)
{
readyData
=
{
readyData
=
{
...
readyData
,
...
readyData
,
...
location
.
query
,
...
location
.
query
,
};
};
}
}
console
.
log
(
location
.
query
);
console
.
log
(
readyData
);
if
(
CommunityList
&&
flag
===
false
)
{
if
(
CommunityList
&&
flag
===
false
)
{
flag
=
true
;
flag
=
true
;
setLoading
(
true
);
setLoading
(
true
);
...
@@ -194,14 +199,12 @@ const ServiceProviderManagement = (props: propsType) => {
...
@@ -194,14 +199,12 @@ const ServiceProviderManagement = (props: propsType) => {
}
}
},
[
Data
]);
},
[
Data
]);
//页面搜索
//
页面搜索
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
);
readyData
.
serviceCommunityList
=
comment
.
serviceCommunityList
;
readyData
.
serviceCommunityList
=
comment
.
serviceCommunityList
;
if
(
comment
.
status
==
undefined
)
{
if
(
comment
.
status
==
=
undefined
)
{
comment
.
status
=
''
;
comment
.
status
=
''
;
}
}
console
.
log
(
comment
);
history
.
push
(
history
.
push
(
location
.
pathname
+
location
.
pathname
+
...
@@ -217,7 +220,7 @@ const ServiceProviderManagement = (props: propsType) => {
...
@@ -217,7 +220,7 @@ const ServiceProviderManagement = (props: propsType) => {
// 切换页码
// 切换页码
const
pageChange
=
(
values
:
any
)
=>
{
const
pageChange
=
(
values
:
any
)
=>
{
le
t
tmp
=
filterObjbyTg
(
location
.
query
,
[
'providerName'
,
'serviceScope'
]);
cons
t
tmp
=
filterObjbyTg
(
location
.
query
,
[
'providerName'
,
'serviceScope'
]);
tmp
[
'pageNum'
]
=
values
.
current
;
tmp
[
'pageNum'
]
=
values
.
current
;
history
.
push
(
location
.
pathname
+
urlEncode
(
tmp
));
history
.
push
(
location
.
pathname
+
urlEncode
(
tmp
));
};
};
...
@@ -233,7 +236,7 @@ const ServiceProviderManagement = (props: propsType) => {
...
@@ -233,7 +236,7 @@ const ServiceProviderManagement = (props: propsType) => {
case
1
:
case
1
:
tmp
[
items
].
enable
=
'Deregistered'
;
tmp
[
items
].
enable
=
'Deregistered'
;
break
;
break
;
case
2
:
default
:
break
;
break
;
}
}
}
}
...
@@ -252,7 +255,7 @@ const ServiceProviderManagement = (props: propsType) => {
...
@@ -252,7 +255,7 @@ const ServiceProviderManagement = (props: propsType) => {
data
:
[...
options
],
data
:
[...
options
],
},
},
]
}
]
}
community=
{
'serviceCommunityList'
}
community=
"serviceCommunityList"
onSubmit=
{
CallBackTitleSearch
}
onSubmit=
{
CallBackTitleSearch
}
defaultValue=
{
{
defaultValue=
{
{
providerName
:
readyData
.
providerName
,
providerName
:
readyData
.
providerName
,
...
@@ -274,26 +277,24 @@ const ServiceProviderManagement = (props: propsType) => {
...
@@ -274,26 +277,24 @@ const ServiceProviderManagement = (props: propsType) => {
</
div
>
</
div
>
{
/* 列表组件 */
}
{
/* 列表组件 */
}
{
<
Table
<
Table
rowKey=
{
'id'
}
rowKey=
{
'id'
}
style=
{
{
marginTop
:
16
}
}
style=
{
{
marginTop
:
16
}
}
loading=
{
loading
}
loading=
{
loading
}
columns=
{
columns
}
columns=
{
columns
}
dataSource=
{
Data
?
dataSource
(
Data
.
rows
)
:
[]
}
dataSource=
{
Data
?
dataSource
(
Data
.
rows
)
:
[]
}
pagination=
{
pagination=
{
Data
Data
?
{
?
{
current
:
+
readyData
.
pageNum
,
current
:
+
readyData
.
pageNum
,
total
:
Data
.
page
.
totalRow
,
total
:
Data
.
page
.
totalRow
,
showSizeChanger
:
false
,
showSizeChanger
:
false
,
pageSize
:
Data
.
page
.
curPageSize
,
pageSize
:
Data
.
page
.
curPageSize
,
}
}
:
{}
:
{}
}
}
onChange=
{
pageChange
}
onChange=
{
pageChange
}
/>
/>
}
</
div
>
</
div
>
);
);
};
};
...
...
src/pages/UserManagement/ServiceProviderManagement/Services.tsx
View file @
7611da70
...
@@ -24,14 +24,12 @@ const Services = (props: any) => {
...
@@ -24,14 +24,12 @@ const Services = (props: any) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
DataServices
!=
null
)
{
if
(
DataServices
!=
null
)
{
console
.
log
(
DataServices
);
setDataList
(
DataServices
.
data
.
rows
);
setDataList
(
DataServices
.
data
.
rows
);
let
tmp
=
DataServices
.
data
.
rows
.
map
(
let
tmp
=
DataServices
.
data
.
rows
.
map
(
(
v
:
{
serviceName
:
string
;
deleted
:
number
},
i
:
number
)
=>
{
(
v
:
{
serviceName
:
string
;
deleted
:
number
},
i
:
number
)
=>
{
return
v
.
deleted
!==
1
&&
v
.
serviceName
;
return
v
.
deleted
!==
1
&&
v
.
serviceName
;
},
},
);
);
console
.
log
(
tmp
);
formRef
.
current
[
'setFieldsValue'
]({
serviceName
:
tmp
});
formRef
.
current
[
'setFieldsValue'
]({
serviceName
:
tmp
});
}
}
},
[
DataServices
]);
},
[
DataServices
]);
...
@@ -66,12 +64,9 @@ const Services = (props: any) => {
...
@@ -66,12 +64,9 @@ const Services = (props: any) => {
};
};
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
Result
);
if
(
Result
)
{
if
(
Result
)
{
if
(
Result
.
error_code
!==
'0000'
)
{
if
(
Result
.
error_code
!==
'0000'
)
{
message
.
error
(
'Failed: binding service provider!!!'
);
message
.
error
(
'Failed: binding service provider!!!'
);
}
else
{
message
.
success
(
'Operate Success!!!'
);
}
}
Clear
(
module
+
'/ClearResult'
,
dispatch
);
Clear
(
module
+
'/ClearResult'
,
dispatch
);
RA
(
43
,
{},
module
,
dispatch
);
RA
(
43
,
{},
module
,
dispatch
);
...
...
src/pages/UserManagement/ServiceProviderManagement/index.less
View file @
7611da70
...
@@ -2,108 +2,107 @@
...
@@ -2,108 +2,107 @@
//基石
//基石
.base {
.base {
width: 100%;
width: 100%;
min-width: 980px;
min-width: 980px;
background-color: #ffffff;
background-color: #ffffff;
padding: 34px;
padding: 34px;
overflow: auto;
overflow: auto;
}
}
//边栏1
//边栏1
//头部组件
//头部组件
.box{
.box
{
width: 100%;
width: 100%;
height: 64px;
height: 64px;
position: relative;
position: relative;
}
}
.input{
.input
{
width:
200px;
width:
200px;
height:
32px;
height:
32px;
background:
none;
background:
none;
outline: none;
outline: none;
border:1px solid rgba(217,217,217,
1);
border: 1px solid rgba(217, 217, 217,
1);
border-radius:
2px;
border-radius:
2px;
font-size:
14px;
font-size:
14px;
font-weight:
400;
font-weight:
400;
line-height:
30px;
line-height:
30px;
text-indent: 19px;
text-indent: 19px;
}
}
.item1{
.item1
{
.input();
.input();
}
}
.item2{
.item2
{
.input();
.input();
margin-left: 20px;
margin-left: 20px;
}
}
.item3{
.item3
{
width:
80px;
width:
80px;
height:
32px;
height:
32px;
border:1px solid rgba(24,144,255,
1);
border: 1px solid rgba(24, 144, 255,
1);
border-radius:
2px;
border-radius:
2px;
background-color:
#e7f4ff;
background-color:
#e7f4ff;
outline: none;
outline: none;
font-size:
14px;
font-size:
14px;
font-weight:
400;
font-weight:
400;
color:rgba(24,144,255,
1);
color: rgba(24, 144, 255,
1);
line-height:
30px;
line-height:
30px;
cursor: pointer;
cursor: pointer;
margin-top: 16px;
margin-top: 16px;
}
}
.item3:active{
.item3:active
{
background-color:
#ffffff;
background-color:
#ffffff;
}
}
//边栏2
//边栏2
.box2{
.box2 {
width: 100%;
width: 90%;
height: 40px;
height: 40px;
margin-top: 0px;
margin-top: -35px;
position: relative;
margin-left: 150/1920 * 100vw;
position: relative;
}
}
//小组件1
//小组件1
.buttonLine{
.buttonLine
{
width:
200px;
width:
200px;
height:
32px;
height:
32px;
border:
none;
border:
none;
background:
none;
background:
none;
outline: none;
outline: none;
font-size:
14px;
font-size:
14px;
font-weight:400;
font-weight: 400;
line-height:
30px;
line-height:
30px;
cursor: pointer;
cursor: pointer;
}
}
.buttonWait{
.buttonWait
{
.buttonLine();
.buttonLine();
border-bottom:
2px solid#dedede;
border-bottom:
2px solid#dedede;
color:
#454545;
color:
#454545;
}
}
.buttonWait:hover{
.buttonWait:hover
{
border-bottom:3px solid rgba(24,144,255,
1);
border-bottom: 3px solid rgba(24, 144, 255,
1);
color:rgba(24,144,255,1);
color: rgba(24, 144, 255, 1);
}
}
.buttonChoose{
.buttonChoose
{
.buttonLine();
.buttonLine();
border-bottom:3px solid rgba(24,144,255,
1);
border-bottom: 3px solid rgba(24, 144, 255,
1);
color:rgba(24,144,255,
1);
color: rgba(24, 144, 255,
1);
}
}
.buttonAdd {
.buttonAdd{
background: none;
background:none;
outline: none;
outline: none;
cursor: pointer;
cursor: pointer;
font-size: 14px;
font-size:14px;
width: 154px;
width:154px;
height: 32px;
height:32px;
border: 1px solid rgba(24, 144, 255, 1);
border:1px solid rgba(24,144,255,1);
color: rgba(24, 144, 255, 1);
color:rgba(24,144,255,1);
border-radius: 2px;
border-radius:2px;
position: absolute;
position: absolute;
right: 0;
right: 0;
}
}
.buttonAdd2{
.buttonAdd2
{
.buttonAdd();
.buttonAdd();
right: 168px;
right: 168px;
}
}
src/services/PropertyManagementServices.ts
View file @
7611da70
import
request
from
'@/utils/request'
;
import
request
from
'@/utils/request'
;
export
function
get
(
values
:
any
)
{
export
function
get
(
values
:
any
)
{
console
.
log
(
values
)
const
userInfo
=
localStorage
.
getItem
(
'userInfo'
)
||
''
;
const
userInfo
=
localStorage
.
getItem
(
'userInfo'
)
||
''
;
const
id
=
JSON
.
parse
(
userInfo
).
userModel
.
id
;
const
{
id
}
=
JSON
.
parse
(
userInfo
).
userModel
;
return
request
(
'/tos/tosPropertyFee/get'
,
{
return
request
(
'/tos/tosPropertyFee/get'
,
{
method
:
'POST'
,
method
:
'POST'
,
body
:
JSON
.
stringify
({
body
:
JSON
.
stringify
({
...
...
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