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
6e123393
Commit
6e123393
authored
Feb 01, 2021
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试问题修复
parent
3bfc14e6
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
517 additions
and
567 deletions
+517
-567
config.ts
config/config.ts
+12
-19
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
PropertyManagement.ts
src/models/PropertyManagement.ts
+3
-4
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
+30
-25
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
+28
-21
ChargeManager.tsx
src/pages/PropertyManagement/ChargeManager.tsx
+15
-36
Users.tsx
src/pages/UserManagement/LIFEUserManagement/Users.tsx
+18
-14
UsersDetail.tsx
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
+4
-4
index.less
src/pages/UserManagement/LIFEUserManagement/index.less
+102
-102
Edit.tsx
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
+11
-6
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+31
-30
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 @
6e123393
...
@@ -183,12 +183,9 @@ export default defineConfig({
...
@@ -183,12 +183,9 @@ export default defineConfig({
{
{
path
:
'./CommunityMaintenance'
,
path
:
'./CommunityMaintenance'
,
name
:
'communitymaintenance'
,
name
:
'communitymaintenance'
,
routes
:
[
component
:
'./CommercialService/PropertyServices'
{
path
:
'./'
,
component
:
'./CommercialService/PropertyServices'
},
{
path
:
'./Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./Edit'
,
component
:
'./CommercialService/Detail'
},
],
},
},
{
{
path
:
'./OwnerComplaints'
,
path
:
'./OwnerComplaints'
,
// name: 'ownercomplaints',
// name: 'ownercomplaints',
...
@@ -202,20 +199,16 @@ export default defineConfig({
...
@@ -202,20 +199,16 @@ export default defineConfig({
{
{
path
:
'./RenovationApplication'
,
path
:
'./RenovationApplication'
,
name
:
'renovationapplication'
,
name
:
'renovationapplication'
,
routes
:
[
component
:
'./CommercialService/Renovation'
,
{
path
:
'./'
,
component
:
'./CommercialService/Renovation'
},
{
path
:
'./Detail'
,
component
:
'./CommercialService/RenovationDetail'
},
],
},
},
{
path
:
'./RenovationApplication/Detail'
,
component
:
'./CommercialService/RenovationDetail'
},
{
{
path
:
'./AccessCardApplication'
,
path
:
'./AccessCardApplication'
,
name
:
'accessCardapplication'
,
name
:
'accessCardapplication'
,
routes
:
[
component
:
'./CommercialService/Card'
{
path
:
'./'
,
component
:
'./CommercialService/Card'
},
{
path
:
'./Detail'
,
component
:
'./CommercialService/CardDetail'
},
{
path
:
'./Add'
,
component
:
'./CommercialService/CardAdd'
},
],
},
},
{
path
:
'./AccessCardApplication/Detail'
,
component
:
'./CommercialService/CardDetail'
},
{
path
:
'./AccessCardApplication/Add'
,
component
:
'./CommercialService/CardAdd'
},
{
{
path
:
'./ReportOnline'
,
path
:
'./ReportOnline'
,
name
:
'reportonline'
,
name
:
'reportonline'
,
...
@@ -224,12 +217,10 @@ export default defineConfig({
...
@@ -224,12 +217,10 @@ export default defineConfig({
{
{
path
:
'./ShelfLifeService'
,
path
:
'./ShelfLifeService'
,
name
:
'shelflifeservice'
,
name
:
'shelflifeservice'
,
routes
:
[
component
:
'./CommercialService/PropertyServices'
{
path
:
'./'
,
component
:
'./CommercialService/PropertyServices'
},
{
path
:
'./Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./Edit'
,
component
:
'./CommercialService/Detail'
},
],
},
},
{
path
:
'./ShelfLifeService/Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./ShelfLifeService/Edit'
,
component
:
'./CommercialService/Detail'
},
{
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/Detail'
,
component
:
'./CommercialService/Detail'
},
...
@@ -238,6 +229,8 @@ export default defineConfig({
...
@@ -238,6 +229,8 @@ export default defineConfig({
{
path
:
'./RenovationApplication/Edit'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./RenovationApplication/Edit'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./ReportOnline/Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./ReportOnline/Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./ReportOnline/Edit'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./ReportOnline/Edit'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./CommunityMaintenance/Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./CommunityMaintenance/Edit'
,
component
:
'./CommercialService/Detail'
},
],
],
},
},
{
{
...
...
src/components/SearchOptions/SearchOptionsCommnity.tsx
View file @
6e123393
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 @
6e123393
...
@@ -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 @
6e123393
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 @
6e123393
...
@@ -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 @
6e123393
...
@@ -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
;
const
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 @
6e123393
...
@@ -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 @
6e123393
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/PropertyManagement.ts
View file @
6e123393
...
@@ -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/pages/CommercialService/Card.tsx
View file @
6e123393
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 @
6e123393
...
@@ -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 @
6e123393
...
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef } from 'react';
...
@@ -2,7 +2,7 @@ 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'
;
...
@@ -42,7 +42,6 @@ const CardDetail = (props: any) => {
...
@@ -42,7 +42,6 @@ const CardDetail = (props: any) => {
},
[]);
},
[]);
useEffect
(()
=>
{
useEffect
(()
=>
{
console
.
log
(
DataSaveDetail
);
if
(
DataSaveDetail
)
{
if
(
DataSaveDetail
)
{
setListData
(
DataSaveDetail
.
data
.
rows
.
list
[
0
]);
setListData
(
DataSaveDetail
.
data
.
rows
.
list
[
0
]);
setOnwerDetail
(
DataSaveDetail
.
data
.
rows
.
onwerDetail
);
setOnwerDetail
(
DataSaveDetail
.
data
.
rows
.
onwerDetail
);
...
@@ -57,15 +56,10 @@ const CardDetail = (props: any) => {
...
@@ -57,15 +56,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
,
...
@@ -81,7 +75,6 @@ const CardDetail = (props: any) => {
...
@@ -81,7 +75,6 @@ const CardDetail = (props: any) => {
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
}
>
...
@@ -94,7 +87,7 @@ const CardDetail = (props: any) => {
...
@@ -94,7 +87,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 +112,7 @@ const CardDetail = (props: any) => {
...
@@ -119,7 +112,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 +131,10 @@ const CardDetail = (props: any) => {
...
@@ -138,10 +131,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
}
>
...
@@ -158,8 +151,8 @@ const CardDetail = (props: any) => {
...
@@ -158,8 +151,8 @@ const CardDetail = (props: any) => {
]
}
]
}
>
>
<
Radio
.
Group
>
<
Radio
.
Group
>
<
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 +163,11 @@ const CardDetail = (props: any) => {
...
@@ -170,8 +163,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
:
true
,
max
:
300
,
message
:
'*it is required!'
}]
}
>
<
TextArea
style=
{
{
width
:
300
,
height
:
100
,
padding
:
8
}
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
...
@@ -183,7 +179,7 @@ const CardDetail = (props: any) => {
...
@@ -183,7 +179,7 @@ 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
>
...
@@ -206,8 +202,14 @@ const CardDetail = (props: any) => {
...
@@ -206,8 +202,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
>
...
@@ -221,7 +223,7 @@ const CardDetail = (props: any) => {
...
@@ -221,7 +223,7 @@ const CardDetail = (props: any) => {
disabled
disabled
value=
{
listData
.
reply_content
}
value=
{
listData
.
reply_content
}
style=
{
{
width
:
300
,
height
:
100
,
padding
:
8
}
}
style=
{
{
width
:
300
,
height
:
100
,
padding
:
8
}
}
></
TextArea
>
/
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
...
@@ -234,7 +236,7 @@ const CardDetail = (props: any) => {
...
@@ -234,7 +236,7 @@ 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
>
...
@@ -251,8 +253,11 @@ const CardDetail = (props: any) => {
...
@@ -251,8 +253,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 @
6e123393
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 @
6e123393
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 @
6e123393
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 @
6e123393
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'
;
...
@@ -16,6 +8,12 @@ import TextArea from 'antd/lib/input/TextArea';
...
@@ -16,6 +8,12 @@ import TextArea from 'antd/lib/input/TextArea';
import
{
timestampToTime
}
from
'@/utils/time'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
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
);
...
@@ -54,13 +52,13 @@ const RenovationDetail = (props: any) => {
...
@@ -54,13 +52,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 +84,7 @@ const RenovationDetail = (props: any) => {
...
@@ -86,7 +84,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 +110,7 @@ const RenovationDetail = (props: any) => {
...
@@ -112,7 +110,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 +131,10 @@ const RenovationDetail = (props: any) => {
...
@@ -133,10 +131,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'
?
(
<>
<>
...
@@ -154,8 +152,8 @@ const RenovationDetail = (props: any) => {
...
@@ -154,8 +152,8 @@ const RenovationDetail = (props: any) => {
]
}
]
}
>
>
<
Radio
.
Group
>
<
Radio
.
Group
>
<
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,8 +164,11 @@ const RenovationDetail = (props: any) => {
...
@@ -166,8 +164,11 @@ 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
:
true
,
max
:
300
,
message
:
'*it is required!'
}]
}
>
<
TextArea
style=
{
{
width
:
300
,
height
:
100
,
padding
:
8
}
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
...
@@ -191,8 +192,14 @@ const RenovationDetail = (props: any) => {
...
@@ -191,8 +192,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
>
...
@@ -206,7 +213,7 @@ const RenovationDetail = (props: any) => {
...
@@ -206,7 +213,7 @@ const RenovationDetail = (props: any) => {
style=
{
{
width
:
300
,
minHeight
:
100
,
padding
:
8
,
resize
:
'none'
}
}
style=
{
{
width
:
300
,
minHeight
:
100
,
padding
:
8
,
resize
:
'none'
}
}
disabled
disabled
value=
{
listData
.
replyView
}
value=
{
listData
.
replyView
}
></
TextArea
>
/
>
</
Col
>
</
Col
>
</
Row
>
</
Row
>
</>
</>
...
...
src/pages/PropertyManagement/ChargeManager.tsx
View file @
6e123393
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 @
6e123393
...
@@ -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/UsersDetail.tsx
View file @
6e123393
...
@@ -74,7 +74,7 @@ const UsersDetail = (props: any) => {
...
@@ -74,7 +74,7 @@ const UsersDetail = (props: any) => {
if
(
Result
.
error_code
!==
'0000'
)
{
if
(
Result
.
error_code
!==
'0000'
)
{
message
.
error
(
Result
.
error_msg
);
message
.
error
(
Result
.
error_msg
);
ResultClear
();
ResultClear
();
history
.
b
ack
();
history
.
goB
ack
();
}
}
}
}
},
[
Result
]);
},
[
Result
]);
...
@@ -88,7 +88,7 @@ const UsersDetail = (props: any) => {
...
@@ -88,7 +88,7 @@ const UsersDetail = (props: any) => {
playload
:
{},
playload
:
{},
});
});
history
.
b
ack
();
history
.
goB
ack
();
}
else
{
}
else
{
message
.
error
(
returnValue
.
error_msg
,
3
);
message
.
error
(
returnValue
.
error_msg
,
3
);
}
}
...
@@ -113,7 +113,7 @@ const UsersDetail = (props: any) => {
...
@@ -113,7 +113,7 @@ const UsersDetail = (props: any) => {
roomNumber
:
DataSave
.
roomNumber
,
roomNumber
:
DataSave
.
roomNumber
,
});
});
}
else
{
}
else
{
history
.
b
ack
();
history
.
goB
ack
();
}
}
},
[
DataSave
]);
},
[
DataSave
]);
...
@@ -306,7 +306,7 @@ const UsersDetail = (props: any) => {
...
@@ -306,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
>
...
...
src/pages/UserManagement/LIFEUserManagement/index.less
View file @
6e123393
...
@@ -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 @
6e123393
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
);
};
};
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
6e123393
...
@@ -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/index.less
View file @
6e123393
...
@@ -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 @
6e123393
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