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
1c2ac72c
Commit
1c2ac72c
authored
Nov 05, 2020
by
cellee
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'final' of
http://120.77.240.215:9701/Maple/tostumi.git
into final
parents
f208c44a
32a906a3
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
394 additions
and
240 deletions
+394
-240
config.ts
config/config.ts
+18
-6
ServiceProvider.ts
src/models/ServiceProvider.ts
+33
-15
AccoutingContent.less
src/pages/PropertyManagement/AccoutingContent.less
+0
-93
AccoutingContent.tsx
src/pages/PropertyManagement/AccoutingContent.tsx
+0
-82
UsersAdd.tsx
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
+3
-1
AccoutingContent.less
...anagement/ServiceProviderManagement/AccoutingContent.less
+105
-0
AccoutingContent.tsx
...Management/ServiceProviderManagement/AccoutingContent.tsx
+125
-0
Detail.tsx
...pages/UserManagement/ServiceProviderManagement/Detail.tsx
+49
-12
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+37
-12
Services.tsx
...ges/UserManagement/ServiceProviderManagement/Services.tsx
+16
-17
index.tsx
src/pages/user/login/index.tsx
+1
-1
tos.ts
src/services/tos.ts
+7
-1
No files found.
config/config.ts
View file @
1c2ac72c
...
...
@@ -2,8 +2,6 @@
import
{
defineConfig
}
from
'umi'
;
import
defaultSettings
from
'./defaultSettings'
;
import
proxy
from
'./proxy'
;
import
component
from
'@/locales/en-US/component'
;
import
route
from
'mock/route'
;
const
{
REACT_APP_ENV
}
=
process
.
env
;
...
...
@@ -138,6 +136,14 @@ export default defineConfig({
path
:
'./Services'
,
component
:
'./UserManagement/ServiceProviderManagement/Services'
,
},
{
path
:
'./AccoutingDetail'
,
component
:
'./UserManagement/ServiceProviderManagement/AccoutingContent'
,
},
// {
// path: './AccoutingEdit',
// component: './UserManagement/ServiceProviderManagement/AccoutingContent',
// },
],
},
],
...
...
@@ -148,8 +154,8 @@ export default defineConfig({
icon
:
'ReconciliationOutlined'
,
routes
:
[
{
path
:
'./'
,
component
:
'./PropertyManagement/ChargeManager'
},
{
path
:
'./AccoutingDetail'
,
component
:
'./PropertyManagement/AccoutingContent'
},
{
path
:
'./AccoutingEdit'
,
component
:
'./PropertyManagement/AccoutingContent'
},
//
{ path: './AccoutingDetail', component: './PropertyManagement/AccoutingContent' },
//
{ path: './AccoutingEdit', component: './PropertyManagement/AccoutingContent' },
],
},
{
path
:
'/PropertyManagementDetail'
,
component
:
'./PropertyManagement/ChargeDetail'
},
...
...
@@ -260,8 +266,14 @@ export default defineConfig({
'./CommunityManagement/CommunityAnnouncement/CommunityAnnouncement'
,
},
{
path
:
'./Add'
,
component
:
'./CommunityManagement/CommunityAnnouncement/Add'
},
{
path
:
'./Edit'
,
component
:
'./CommunityManagement/CommunityAnnouncement/Add'
},
{
path
:
'./Detail'
,
component
:
'./CommunityManagement/CommunityAnnouncement/Detail'
},
{
path
:
'./Edit'
,
component
:
'./CommunityManagement/CommunityAnnouncement/Add'
,
},
{
path
:
'./Detail'
,
component
:
'./CommunityManagement/CommunityAnnouncement/Detail'
,
},
],
},
{
...
...
src/models/ServiceProvider.ts
View file @
1c2ac72c
import
*
as
service
from
'../services/tos'
;
import
{
message
}
from
'antd'
;
import
{
routerRedux
}
from
'dva/router'
;
export
default
{
namespace
:
'ServiceProvider'
,
state
:
{
...
...
@@ -10,34 +8,35 @@ export default {
CurDataFollow
:
null
,
SaveChooseData
:
null
,
CurData
:
null
,
Result
:
null
,
},
reducers
:
{
returnPage
(
state
,
{
Data
})
{
console
.
log
(
state
);
console
.
log
(
Data
);
returnPage
(
state
:
object
,
{
Data
}:
any
)
{
return
{
...
state
,
Data
};
},
returnCurDataFollow
(
state
,
{
CurDataFollow
}
)
{
returnCurDataFollow
(
state
:
object
,
{
CurDataFollow
}:
any
)
{
return
{
...
state
,
CurDataFollow
};
},
returnCurDataFollowDetail
(
state
,
{
CurDataFollowDetail
}
)
{
returnCurDataFollowDetail
(
state
:
object
,
{
CurDataFollowDetail
}:
any
)
{
return
{
...
state
,
CurDataFollowDetail
};
},
returnSaveChooseData
(
state
,
{
SaveChooseData
}
)
{
returnSaveChooseData
(
state
:
object
,
{
SaveChooseData
}:
any
)
{
return
{
...
state
,
SaveChooseData
};
},
returnCurData
(
state
,
CurData
)
{
console
.
log
(
CurData
);
returnCurData
(
state
:
object
,
{
CurData
}:
any
)
{
return
{
...
state
,
CurData
};
},
returnResult
(
state
:
object
,
{
Result
}:
any
)
{
return
{
...
state
,
Result
};
},
},
effects
:
{
// 获取服务商
*
TosTosServiceProviderGet
({
playload
}
,
{
call
,
put
}
)
{
*
TosTosServiceProviderGet
({
playload
}
:
any
,
{
call
,
put
}:
any
)
{
const
resp
=
yield
call
(
service
.
TosTosServiceProviderGet
,
playload
);
console
.
log
(
resp
);
if
(
resp
.
error_code
==
'0000'
)
{
...
...
@@ -51,7 +50,7 @@ export default {
}
},
// 新建服务商
*
TosTosServiceProviderSave
({
playload
}
,
{
call
,
put
}
)
{
*
TosTosServiceProviderSave
({
playload
}
:
any
,
{
call
,
put
}:
any
)
{
console
.
log
(
playload
);
const
resp
=
yield
call
(
service
.
TosTosServiceProviderSave
,
playload
);
console
.
log
(
resp
);
...
...
@@ -70,7 +69,7 @@ export default {
},
//获取服务商保安根据服务商名
*
TosSecurityGuarderGet
({
playload
}
,
{
call
,
put
}
)
{
*
TosSecurityGuarderGet
({
playload
}
:
any
,
{
call
,
put
}:
any
)
{
console
.
log
(
playload
);
const
resp
=
yield
call
(
service
.
TosSecurityGuarderGet
,
playload
);
console
.
log
(
resp
);
...
...
@@ -79,13 +78,32 @@ export default {
},
//获取服务商保安详情根据服务商名
*
GuarderById
({
playload
}
,
{
call
,
put
}
)
{
*
GuarderById
({
playload
}
:
any
,
{
call
,
put
}:
any
)
{
let
CurDataFollowDetail
=
playload
;
yield
put
({
type
:
'returnCurDataFollowDetail'
,
CurDataFollowDetail
});
},
*
SaveChooseData
({
playload
},
{
call
,
put
})
{
*
SaveChooseData
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
let
SaveChooseData
=
playload
;
yield
put
({
type
:
'returnSaveChooseData'
,
SaveChooseData
});
},
// 注销服务商
*
DelServiceProvider
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
const
resp
=
yield
call
(
service
.
TosTosServiceProviderDel
,
playload
);
if
(
resp
.
error_code
===
'0000'
)
{
let
Result
=
true
;
yield
put
({
type
:
'returnResult'
,
Result
});
}
else
{
let
Result
=
false
;
yield
put
({
type
:
'returnResult'
,
Result
});
}
},
*
ResultClear
({
playload
}:
any
,
{
call
,
put
}:
any
)
{
console
.
log
(
'清除数据'
);
let
Result
=
null
;
yield
put
({
type
:
'returnResult'
,
Result
});
},
},
};
src/pages/PropertyManagement/AccoutingContent.less
deleted
100644 → 0
View file @
f208c44a
@import '~antd/lib/style/themes/default.less';
//基石
.base {
width: 100%;
background-color: #ffffff;
padding: 34px;
min-width: 1020px;
}
//头部组件
.box{
width: 100%;
height: 64px;
position: relative;
}
.item1{
position: absolute;
width: 320px;
text-indent: 15px;
border-left: 5px solid rgba(24,144,255,1);
font-family:'Source Han Sans CN';
font-size: 18px;
font-weight: 600;
color: #000000;
}
.item3{
width:80px;
height: 32px;
position: absolute;
right: 0;
outline: none;
background:none;
cursor: pointer;
border:1px solid rgba(217,217,217,1);
border-radius:2px;
}
.box1{
width: 100%;
height: 34px;
position: relative;
}
.box1item1{
position: absolute;
}
.box1item2{
position: absolute;
left: 154px;
}
.box1item3{
position: absolute;
left: 499px;
}
.box1item4{
position: absolute;
left: 648px;
}
.box2{
width: 100%;
height: 34px;
position: relative;
margin-top: 28px;
}
.box2item1{
position: absolute;
}
.box2item2{
position: absolute;
left: 189px;
}
.box3{
width: 100%;
height: 34px;
position: relative;
margin-top: 28px;
}
.box3item1{
position: absolute;
}
.box3item2{
position: absolute;
left: 189px;
}
.box3item3{
position: absolute;
left: 405px;
}
\ No newline at end of file
src/pages/PropertyManagement/AccoutingContent.tsx
deleted
100644 → 0
View file @
f208c44a
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./AccoutingContent.less'
;
import
{
Input
,
Button
,
Table
,
Space
,
Pagination
,
Tooltip
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
import
Line
from
'../../components/Line/Line'
;
import
SelectOptions
from
'../../components/SelectOptions/index'
;
import
{
indexOf
}
from
'lodash'
;
const
AccoutingContent
=
(
props
:
{
location
:
any
;
})
=>
{
const
{
location
}
=
props
;
const
goToReturn
=
()
=>
{
history
.
back
()
};
const
[
editFlag
,
setEditFlag
]
=
useState
(
false
);
useEffect
(()
=>
{
if
((
location
.
pathname
).
indexOf
(
"/AccoutingDetail"
)
>
-
1
)
{
setEditFlag
(
true
)
}
else
{
setEditFlag
(
false
)
}
},
[
location
.
pathname
]);
const
printContent
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
}
return
(
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
<
div
className=
{
styles
.
box
}
>
<
div
className=
{
styles
.
item1
}
>
Add Accounting
</
div
>
<
button
className=
{
styles
.
item3
}
onClick=
{
goToReturn
}
>
Return
</
button
>
</
div
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1item1
}
>
Company Name
</
div
>
<
div
className=
{
styles
.
box1item2
}
>
{
editFlag
?
(<
Input
style=
{
{
width
:
260
}
}
placeholder=
"Please enter company name"
/>)
:
(
"123"
)
}
</
div
>
<
div
className=
{
styles
.
box1item3
}
>
Office Address
</
div
>
<
div
className=
{
styles
.
box1item4
}
>
{
editFlag
?
(<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Single Line Input"
/>)
:
(
"123"
)
}
</
div
>
</
div
>
<
Line
/>
<
div
style=
{
{
marginBottom
:
28
}
}
>
Service Community
</
div
>
<
SelectOptions
list=
{
[
"美国"
,
"美丽的"
,
"美好"
,
"加拿大"
,
"加油"
,
"XO"
].
sort
()
}
onSubmit=
{
printContent
}
/>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2item1
}
>
Services Available
</
div
>
<
div
className=
{
styles
.
box2item2
}
>
Accounting
</
div
>
</
div
>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2item1
}
>
Person In Charge
</
div
>
<
div
className=
{
styles
.
box2item2
}
>
{
editFlag
?
(<
Input
placeholder=
"Please enter a name"
style=
{
{
width
:
200
}
}
/>)
:
(
"123"
)
}
</
div
>
</
div
>
<
div
className=
{
styles
.
box3
}
>
<
div
className=
{
styles
.
box3item1
}
>
Contact Details
</
div
>
<
div
className=
{
styles
.
box3item2
}
>
{
editFlag
?
(<
Input
placeholder=
"Telephone"
style=
{
{
width
:
200
}
}
/>)
:
(
"123"
)
}
</
div
>
<
div
className=
{
styles
.
box3item3
}
>
{
editFlag
?
(<
Input
placeholder=
"E-mail"
style=
{
{
width
:
200
}
}
/>)
:
(
"123"
)
}
</
div
>
</
div
>
{
editFlag
?
(
<
div
>
<
Line
/>
<
Button
type=
"primary"
size=
"large"
>
submit
</
Button
>
</
div
>
)
:
(<
div
/>)
}
</
div
>
);
};
export
default
AccoutingContent
;
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
View file @
1c2ac72c
...
...
@@ -46,7 +46,9 @@ const UsersAdd = (props: any) => {
if
(
postman
.
extend
!=
null
)
{
formRef
.
current
.
setFieldsValue
({
addressAndpostalCode
:
communityInfo
.
data
.
rows
.
residentialAddress
+
communityInfo
.
data
.
rows
.
residentialZipCode
,
communityInfo
.
data
.
rows
.
residentialAddress
+
' '
+
communityInfo
.
data
.
rows
.
residentialZipCode
,
});
}
}
...
...
src/pages/UserManagement/ServiceProviderManagement/AccoutingContent.less
0 → 100644
View file @
1c2ac72c
@import '~antd/lib/style/themes/default.less';
//基石
.base {
width: 100%;
background-color: #ffffff;
padding: 34px;
min-width: 1020px;
}
//头部组件
.box {
width: 100%;
height: 64px;
position: relative;
}
.item1 {
position: absolute;
width: 320px;
text-indent: 15px;
border-left: 5px solid rgba(24, 144, 255, 1);
font-family: 'Source Han Sans CN';
font-size: 18px;
font-weight: 600;
color: #000000;
}
.item3 {
width: 80px;
height: 32px;
position: absolute;
right: 0;
outline: none;
background: none;
cursor: pointer;
border: 1px solid rgba(217, 217, 217, 1);
border-radius: 2px;
}
.box1 {
width: 100%;
height: 34px;
position: relative;
}
.box1item1 {
position: absolute;
}
.box1item2 {
position: absolute;
left: 154px;
}
.box1item3 {
position: absolute;
left: 499px;
}
.box1item4 {
position: absolute;
left: 648px;
}
.box2 {
width: 100%;
height: 34px;
position: relative;
margin-top: 28px;
}
.box2item1 {
position: absolute;
}
.box2item2 {
position: absolute;
left: 189px;
}
.box3 {
width: 100%;
height: 34px;
position: relative;
margin-top: 28px;
}
.box3item1 {
position: absolute;
}
.box3item2 {
position: absolute;
left: 189px;
}
.box3item3 {
position: absolute;
left: 405px;
}
.box4 {
width: 100%;
height: 34px;
position: relative;
margin-top: 28px;
}
.writeOff {
position: absolute;
top: 34px;
right: 150px;
}
src/pages/UserManagement/ServiceProviderManagement/AccoutingContent.tsx
0 → 100644
View file @
1c2ac72c
import
React
,
{
useEffect
}
from
'react'
;
import
styles
from
'./AccoutingContent.less'
;
import
{
Button
,
Modal
,
message
}
from
'antd'
;
import
{
connect
}
from
'umi'
;
import
Line
from
'@/components/Line/Line'
;
import
ShowOptions
from
'@/components/ShowOptions/index'
;
import
{
PoweroffOutlined
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
const
{
confirm
}
=
Modal
;
const
AccoutingContent
=
(
props
:
{
SaveChooseData
:
any
;
dispatch
:
any
;
Result
:
Boolean
;
history
:
any
;
})
=>
{
const
{
SaveChooseData
,
dispatch
,
Result
,
history
}
=
props
;
const
goToReturn
=
()
=>
{
history
.
goBack
();
};
useEffect
(()
=>
{
console
.
log
(
SaveChooseData
);
if
(
!
SaveChooseData
)
{
goToReturn
();
}
},
[]);
const
handleClick
=
(
id
:
string
)
=>
{
confirm
({
title
:
'Warning'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
'Are you sure want to write off?'
,
onOk
()
{
dispatch
({
type
:
'ServiceProvider/DelServiceProvider'
,
playload
:
{
id
}
});
},
onCancel
()
{
console
.
log
(
'Cancel'
);
},
});
};
useEffect
(()
=>
{
console
.
log
(
Result
);
if
(
Result
!==
null
)
{
if
(
Result
)
{
dispatch
({
type
:
'ServiceProvider/ResultClear'
});
message
.
success
(
'Logout successful!'
,
3
,
()
=>
{
history
.
goBack
();
});
}
else
{
message
.
error
(
'Logout failed. Please try again!'
,
3
);
dispatch
({
type
:
'ServiceProvider/ResultClear'
,
playload
:
''
});
}
}
},
[
Result
]);
return
(
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
<
div
className=
{
styles
.
box
}
>
<
div
className=
{
styles
.
item1
}
>
Accounting information
</
div
>
<
button
className=
{
styles
.
item3
}
onClick=
{
goToReturn
}
>
Back
</
button
>
</
div
>
{
SaveChooseData
.
enable
}
{
SaveChooseData
.
enable
===
'normal'
?
(
<
div
className=
{
styles
.
writeOff
}
>
<
Button
icon=
{
<
PoweroffOutlined
/>
}
type=
"primary"
danger
onClick=
{
handleClick
.
bind
(
this
,
SaveChooseData
.
id
)
}
>
Write Off
</
Button
>
</
div
>
)
:
(
<
div
/>
)
}
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1item1
}
>
Company Name
</
div
>
<
div
className=
{
styles
.
box1item2
}
>
{
SaveChooseData
.
providerName
}
</
div
>
<
div
className=
{
styles
.
box1item3
}
>
Office Address
</
div
>
<
div
className=
{
styles
.
box1item4
}
>
{
SaveChooseData
.
providerAddress
}
</
div
>
</
div
>
<
Line
/>
<
div
style=
{
{
marginBottom
:
28
}
}
>
Service Community
</
div
>
<
ShowOptions
list=
{
SaveChooseData
.
serviceCommunityList
}
/>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2item1
}
>
Services Available
</
div
>
<
div
className=
{
styles
.
box2item2
}
>
Accounting
</
div
>
</
div
>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2item1
}
>
Person In Charge
</
div
>
<
div
className=
{
styles
.
box2item2
}
>
{
SaveChooseData
.
contactName
}
</
div
>
</
div
>
<
div
className=
{
styles
.
box3
}
>
<
div
className=
{
styles
.
box3item1
}
>
Contact Details
</
div
>
<
div
className=
{
styles
.
box3item2
}
>
{
SaveChooseData
.
contactPhone
}
</
div
>
<
div
className=
{
styles
.
box3item3
}
>
{
SaveChooseData
.
contactEmail
}
</
div
>
</
div
>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box3item1
}
>
Upload the address
</
div
>
<
div
></
div
>
</
div
>
</
div
>
);
};
function
mapStateToProps
(
state
:
{
ServiceProvider
:
any
})
{
const
{
SaveChooseData
,
Result
}
=
state
.
ServiceProvider
;
return
{
SaveChooseData
,
Result
,
};
}
export
default
connect
(
mapStateToProps
)(
AccoutingContent
);
src/pages/UserManagement/ServiceProviderManagement/Detail.tsx
View file @
1c2ac72c
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./Detail.less'
;
import
{
Input
,
Button
,
Table
,
Space
,
Pagination
,
Tooltip
,
Checkbox
}
from
'antd'
;
import
{
Button
,
Table
,
Space
,
message
,
Modal
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
ShowOptions
from
'../../../components/ShowOptions/index'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
{
PoweroffOutlined
}
from
'@ant-design/icons'
;
import
{
PoweroffOutlined
,
ExclamationCircleOutlined
}
from
'@ant-design/icons'
;
const
{
confirm
}
=
Modal
;
const
Detail
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data
,
CurDataFollow
,
location
,
SaveChooseData
}
=
props
;
const
{
dispatch
,
Data
,
CurDataFollow
,
location
,
SaveChooseData
,
Result
}
=
props
;
const
TosSecurityGuarderGet
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/TosSecurityGuarderGet'
,
playload
:
values
});
...
...
@@ -32,7 +34,7 @@ const Detail = (props: any) => {
history
.
push
(
location
.
pathname
+
'/Guard?saferName='
+
values
.
saferName
);
};
const
pagination
=
{
defaultC
urrent
:
1
,
c
urrent
:
1
,
total
:
CurDataFollow
!=
null
?
CurDataFollow
.
length
:
CurDataFollow
,
};
...
...
@@ -52,20 +54,54 @@ const Detail = (props: any) => {
},
];
const
handleClick
=
()
=>
{
console
.
log
(
'注销单元'
);
const
handleClick
=
(
id
:
string
)
=>
{
confirm
({
title
:
'Warning'
,
icon
:
<
ExclamationCircleOutlined
/>,
content
:
'Are you sure want to write off?'
,
onOk
()
{
dispatch
({
type
:
'ServiceProvider/DelServiceProvider'
,
playload
:
{
id
}
});
},
onCancel
()
{
console
.
log
(
'Cancel'
);
},
});
};
useEffect
(()
=>
{
console
.
log
(
Result
);
if
(
Result
!==
null
)
{
if
(
Result
)
{
dispatch
({
type
:
'ServiceProvider/ResultClear'
});
message
.
success
(
'Logout successful!'
,
3
,
()
=>
{
history
.
goBack
();
});
}
else
{
message
.
error
(
'Logout failed. Please try again!'
,
3
);
dispatch
({
type
:
'ServiceProvider/ResultClear'
,
playload
:
''
});
}
}
},
[
Result
]);
return
(
<
div
className=
{
styles
.
base
}
>
{
SaveChooseData
!==
null
?
(
<>
<
TitleBack
title=
"Service Provider Details"
/>
{
/* <div className={styles.writeOff}>
<Button icon={<PoweroffOutlined />} type="primary" danger onClick={handleClick}>
{
SaveChooseData
.
enable
===
'normal'
?
(
<
div
className=
{
styles
.
writeOff
}
>
<
Button
icon=
{
<
PoweroffOutlined
/>
}
type=
"primary"
danger
onClick=
{
handleClick
.
bind
(
this
,
SaveChooseData
.
id
)
}
>
Write Off
</
Button
>
</div> */
}
</
div
>
)
:
(
<
div
/>
)
}
<
div
className=
{
styles
.
bigbox
}
>
<
div
className=
{
styles
.
box0
}
>
<
div
className=
{
styles
.
box0item1
}
></
div
>
...
...
@@ -131,11 +167,12 @@ const Detail = (props: any) => {
};
function
mapStateToProps
(
state
:
any
)
{
const
{
Data
,
CurDataFollow
,
SaveChooseData
}
=
state
.
ServiceProvider
;
const
{
Data
,
CurDataFollow
,
SaveChooseData
,
Result
}
=
state
.
ServiceProvider
;
return
{
Data
,
CurDataFollow
,
SaveChooseData
,
Result
,
};
}
export
default
connect
(
mapStateToProps
)(
Detail
);
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
1c2ac72c
...
...
@@ -37,15 +37,27 @@ const ServiceProviderManagement = (props: any) => {
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
values
.
serviceScope
=
options
[
values
.
serviceScopeList
[
0
]][
1
];
SaveChooseData
(
values
);
if
(
values
.
serviceScopeList
[
0
]
===
'0'
)
{
history
.
push
(
location
.
pathname
+
'/Detail'
);
};
const
goToCreate
=
()
=>
{
SaveChooseData
(
null
);
history
.
push
(
location
.
pathname
+
'/Edit'
);
}
else
if
(
values
.
serviceScopeList
[
0
]
===
'1'
)
{
history
.
push
(
location
.
pathname
+
'/AccoutingDetail'
);
}
else
{
history
.
push
(
'/404'
);
}
};
const
goToEdit
=
(
values
:
any
,
e
:
any
)
=>
{
SaveChooseData
(
values
);
history
.
push
(
location
.
pathname
+
'/Edit'
);
// if (values.serviceScopeList[0] === '0') {
// } else if (values.serviceScopeList[0] === '1') {
// history.push(location.pathname + '/AccoutingEdit');
// } else {
// history.push('/404');
// }
};
const
goToCreate
=
()
=>
{
SaveChooseData
(
null
);
history
.
push
(
location
.
pathname
+
'/Edit'
);
};
const
goToServices
=
()
=>
{
history
.
push
(
location
.
pathname
+
'/Services'
);
...
...
@@ -74,7 +86,12 @@ const ServiceProviderManagement = (props: any) => {
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
<
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Detail
</
a
>
<
a
onClick=
{
goToEdit
.
bind
(
this
,
record
)
}
>
edit
</
a
>
<
a
disabled=
{
record
.
enable
==
'Deregistered'
?
true
:
false
}
onClick=
{
goToEdit
.
bind
(
this
,
record
)
}
>
edit
</
a
>
</
Space
>
),
},
...
...
@@ -142,10 +159,14 @@ const ServiceProviderManagement = (props: any) => {
//页面搜索
const
CallBackTitleSearch
=
(
comment
:
any
)
=>
{
readyData
.
serviceCommunityList
=
comment
.
serviceCommunityList
;
console
.
log
(
comment
);
if
(
comment
.
status
==
undefined
)
{
comment
.
status
=
''
;
}
console
.
log
(
comment
);
// if (comment.status) {
// }
history
.
push
(
location
.
pathname
+
urlEncode
(
...
...
@@ -171,10 +192,10 @@ const ServiceProviderManagement = (props: any) => {
for
(
let
items
in
tmp
)
{
switch
(
tmp
[
items
].
enable
)
{
case
0
:
tmp
[
items
].
enable
=
'
unregistered
'
;
tmp
[
items
].
enable
=
'
normal
'
;
break
;
case
1
:
tmp
[
items
].
enable
=
'registered'
;
tmp
[
items
].
enable
=
'
De
registered'
;
break
;
case
2
:
break
;
...
...
@@ -191,15 +212,19 @@ const ServiceProviderManagement = (props: any) => {
list=
{
[
'Service Provider'
]
}
status=
{
[
{
name
:
[
'status'
,
'
s
ervices'
],
data
:
[
[
null
,
'All'
],
...
options
],
name
:
[
'status'
,
'
S
ervices'
],
data
:
[...
options
],
},
]
}
community=
{
'serviceCommunityList'
}
onSubmit=
{
CallBackTitleSearch
}
defaultValue=
{
{
providerName
:
readyData
.
providerName
,
status
:
readyData
.
serviceScope
?
parseInt
(
readyData
.
serviceScope
)
:
null
,
status
:
readyData
.
serviceScope
?
parseInt
(
readyData
.
serviceScope
)
===
0
?
'SecurutyGuard'
:
'Accountant'
:
null
,
}
}
checklist=
{
readyData
.
serviceCommunityList
.
length
!==
0
?
readyData
.
serviceCommunityList
:
null
...
...
src/pages/UserManagement/ServiceProviderManagement/Services.tsx
View file @
1c2ac72c
...
...
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef } from 'react';
import
styles
from
'./Services.less'
;
import
{
Form
,
Button
,
Modal
,
Space
,
Pagination
,
Tooltip
,
Checkbox
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
import
{
connect
}
from
'umi'
;
import
Line
from
'../../../components/Line/Line'
;
import
TagSelect
from
'../../../components/TagSelect/index'
;
...
...
@@ -11,11 +11,9 @@ import TitleBack from '@/components/TitleBack/TitleBack';
const
module
=
'User'
;
const
services
=
[
'Security Guards'
,
'Accountant'
,
'repair'
,
'Clean'
];
const
Services
=
(
props
:
any
)
=>
{
const
{
dispatch
,
DataServices
}
=
props
;
const
formRef
=
useRef
(
null
);
const
formRef
=
useRef
(
null
as
any
);
useEffect
(()
=>
{
RA
(
43
,
{
serviceName
:
''
},
module
,
dispatch
);
...
...
@@ -23,25 +21,26 @@ const Services = (props: any) => {
useEffect
(()
=>
{
if
(
DataServices
!=
null
)
{
var
tmp
=
DataServices
.
data
.
rows
.
map
((
v
:
any
)
=>
{
return
services
[
v
.
serviceCode
-
1
];
console
.
log
(
DataServices
);
let
tmp
=
DataServices
.
data
.
rows
.
map
((
v
:
object
,
i
:
number
)
=>
{
return
v
[
'serviceName'
];
});
console
.
log
(
tmp
);
formRef
.
current
.
setFieldsValue
({
services
:
tmp
});
formRef
.
current
[
'setFieldsValue'
]({
serviceName
:
tmp
});
}
},
[
DataServices
]);
const
onFinish
=
(
values
:
any
)
=>
{
console
.
log
(
values
);
RA
(
44
,
{
id
:
'5'
,
serviceName
:
'律政'
,
},
module
,
dispatch
,
);
//
RA(
//
44,
//
{
//
id: '5',
//
serviceName: '律政',
//
},
//
module,
//
dispatch,
//
);
};
const
Add
=
(
values
:
any
)
=>
{
console
.
log
(
values
);
...
...
@@ -53,7 +52,7 @@ const Services = (props: any) => {
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
{
DataServices
!=
null
?
(
<
Form
.
Item
label=
"Available Services"
name=
"service
Cod
e"
>
<
Form
.
Item
label=
"Available Services"
name=
"service
Nam
e"
>
<
TagSelect
onAdd=
{
Add
}
onRemove=
{
Remove
}
/>
</
Form
.
Item
>
)
:
null
}
...
...
src/pages/user/login/index.tsx
View file @
1c2ac72c
...
...
@@ -121,7 +121,7 @@ const Login: React.FC<LoginProps> = (props) => {
{
forgetflag
?
'Please enter email address'
:
'Account Name'
}
</
div
>
<
Form
.
Item
name=
"userName"
>
<
input
className=
{
styles
.
input
}
v
alue=
{
userName
||
''
}
onChange=
{
usernameHandle
}
/>
<
input
className=
{
styles
.
input
}
defaultV
alue=
{
userName
||
''
}
onChange=
{
usernameHandle
}
/>
</
Form
.
Item
>
<
div
className=
{
styles
.
box1
}
>
{
forgetflag
?
'Please enter a verification code'
:
'Password'
}
...
...
src/services/tos.ts
View file @
1c2ac72c
...
...
@@ -70,7 +70,13 @@ export function TosTosServiceProviderSave(values: any) {
headers
:
{
'Content-Type'
:
'application/json'
},
});
}
export
function
TosTosServiceProviderDel
(
values
:
any
)
{
return
request
(
'/tos/tosServiceProvider/del'
,
{
method
:
'POST'
,
body
:
JSON
.
stringify
(
values
),
headers
:
{
'Content-Type'
:
'application/json'
},
});
}
// /tos/community/facilities/fuzzy/query
//配置文件
// const yellowcolor ="\033[40;33m"
...
...
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