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
177a89dd
Commit
177a89dd
authored
Oct 28, 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
5b1d2f00
de18cd4d
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
629 additions
and
435 deletions
+629
-435
TitleSearch.tsx
src/components/TitleSearch/TitleSearch.tsx
+12
-31
PropertyManagement.ts
src/models/PropertyManagement.ts
+11
-17
ChargeDetail.less
src/pages/PropertyManagement/ChargeDetail.less
+12
-0
ChargeDetail.tsx
src/pages/PropertyManagement/ChargeDetail.tsx
+8
-4
ChargeManager.tsx
src/pages/PropertyManagement/ChargeManager.tsx
+74
-30
Users.tsx
src/pages/UserManagement/LIFEUserManagement/Users.tsx
+175
-127
UsersAdd.less
src/pages/UserManagement/LIFEUserManagement/UsersAdd.less
+31
-5
UsersAdd.tsx
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
+24
-32
Edit.tsx
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
+97
-70
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+185
-119
No files found.
src/components/TitleSearch/TitleSearch.tsx
View file @
177a89dd
...
...
@@ -14,30 +14,25 @@ import { gray } from 'chalk';
import
SearchOptionsCommnity
from
'../SearchOptions/SearchOptionsCommnity'
;
const
TitleSearch
=
(
props
:
any
)
=>
{
// console.log("===================================", props)
const
{
dispatch
,
CommunityList
}
=
props
;
const
{
dispatch
,
CommunityList
,
single
,
checklist
,
status
,
communitySelect
,
defaultValue
,
time
,
username
,
}
=
props
;
const
key
=
props
.
listkey
;
console
.
log
(
props
);
const
name
=
props
.
list
;
// const single = props.single
// const checklist = props.checklist;
// const status = props.status;
// const communitySelect = props.communitySelect
// const defaultValue = props.defaultValue;
// const time = props.time;
// username 为 小区列表管理者名字筛选
const
{
single
,
checklist
,
status
,
communitySelect
,
defaultValue
,
time
,
username
}
=
props
;
const
community
=
props
.
community
;
const
[
selectOptions
,
setSelectOptions
]
=
useState
(
true
);
const
[
communitys
,
setCommunitys
]
=
useState
(
CommunityList
);
const
[
communitySingle
,
setCommunitySingle
]
=
useState
(
null
);
const
[
datePicker
,
setDate
]
=
useState
(
null
);
const
[
datePicker
,
setDate
]
=
useState
(
null
as
any
);
const
[
form
]
=
Form
.
useForm
();
...
...
@@ -197,23 +192,9 @@ const TitleSearch = (props: any) => {
);
};
function
mapStateToProps
(
state
:
any
)
{
// console.log("state参数",state)
const
{
CommunityList
}
=
state
.
Init
;
return
{
CommunityList
,
};
}
export
default
connect
(
mapStateToProps
)(
TitleSearch
);
// time={["key","预订时间筛选"]}
// status = [{name:"status",data:["处理", "未处理"]}]
// listkey={['A', 'C']} list={['订单状态', '预订时间筛选']}
// <TitleSearch
// status={[{
// name: ["status", "订单状态"],
// data: [[0, "全部"], [1, "已申请"], [2, "已预订"], [3, "已使用"], [4, "已取消"]]
// }]}
// time={["key", "预订时间筛选"]}
// community={"communityName"}
// // single={true}
// onSubmit={CallBackTitleSearch} />
src/models/PropertyManagement.ts
View file @
177a89dd
import
*
as
service
from
'../services/PropertyManagementServices'
;
import
{
message
}
from
'antd'
;
import
{
routerRedux
}
from
'dva/router'
export
default
{
namespace
:
'PropertyManagement'
,
state
:
{
Data
:
''
,
CurData
:
''
,
Data
:
null
,
CurData
:
''
,
},
reducers
:
{
returnData
(
state
,
{
Data
}
)
{
returnData
(
state
:
{},
{
Data
}:
any
)
{
return
{
...
state
,
Data
};
},
returnCurData
(
state
,
{
CurData
}
)
{
returnCurData
(
state
:
{},
{
CurData
}:
any
)
{
return
{
...
state
,
CurData
};
},
},
effects
:
{
//获取物业费列表
*
get
({
playload
}
,
{
call
,
put
}
)
{
console
.
log
(
playload
)
*
get
({
playload
}
:
any
,
{
call
,
put
}:
any
)
{
console
.
log
(
playload
)
;
const
resp
=
yield
call
(
service
.
get
,
playload
);
console
.
log
(
resp
)
let
Data
=
resp
.
data
.
rows
;
yield
put
({
type
:
'returnData'
,
Data
,
});
console
.
log
(
resp
)
;
let
Data
=
resp
.
data
;
yield
put
({
type
:
'returnData'
,
Data
});
},
*
getById
({
playload
}
,
{
call
,
put
}
)
{
*
getById
({
playload
}
:
any
,
{
call
,
put
}:
any
)
{
let
CurData
=
playload
;
yield
put
({
type
:
'returnCurData'
,
CurData
,
});
yield
put
({
type
:
'returnCurData'
,
CurData
});
},
},
};
src/pages/PropertyManagement/ChargeDetail.less
View file @
177a89dd
...
...
@@ -139,3 +139,15 @@
.box4 {
padding-left: 200px;
}
.time1 {
position: absolute;
top: -60px;
left: 200px;
}
.time2 {
position: absolute;
top: -60px;
left: 285px;
}
src/pages/PropertyManagement/ChargeDetail.tsx
View file @
177a89dd
...
...
@@ -53,6 +53,8 @@ const ChargeDetail = (props: any) => {
/>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
time1
}
>
uploadTime :
</
div
>
<
div
className=
{
styles
.
time2
}
>
01-01-2020
</
div
>
<
div
className=
{
styles
.
item21
}
>
Project (community)
</
div
>
<
div
className=
{
styles
.
item22
}
>
{
CurData
.
communityName
}
</
div
>
<
div
className=
{
styles
.
item23
}
>
Street name
</
div
>
...
...
@@ -63,17 +65,19 @@ const ChargeDetail = (props: any) => {
<
div
className=
{
styles
.
item26
}
>
{
CurData
.
roomNumber
}
</
div
>
<
div
className=
{
styles
.
item27
}
>
业主姓名
</
div
>
</
div
>
{
/* <>{stringSplit(CurData.billFileUrl, 'm/cash')}</> */
}
{
/*
<div className={styles.box4}>
<>
{
stringSplit
(
CurData
.
billFileUrl
,
'm/cash'
)
}
</>
<
div
className=
{
styles
.
box4
}
>
<
Pagination
simple
defaultCurrent=
{
curpage
}
total=
{
pages
*
10
}
onChange=
{
pageChange
}
/>
</div>
*/
}
</
div
>
<>
<
Tooltip
title=
{
scale
==
1.3
?
'点击放大查看'
:
'还原视图'
}
>
<
div
className=
{
scale
==
1.3
?
styles
.
box3out
:
null
}
>
<
div
className=
{
scale
==
1.3
?
styles
.
box3
:
styles
.
box3of
}
onClick=
{
lookup
}
>
<
PDF
key=
"pdfjs"
file=
{
stringSplit
(
CurData
.
billFileUrl
,
'm/cash'
)
}
file=
{
'data:application/pdf;base64,'
+
stringSplit
(
CurData
.
billFileUrl
,
'm/cash'
)
}
workerSrc=
"//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js"
scale=
{
scale
}
page=
{
curpage
}
...
...
src/pages/PropertyManagement/ChargeManager.tsx
View file @
177a89dd
...
...
@@ -8,40 +8,28 @@ import { Link, useIntl, connect, Dispatch, history } from 'umi';
import
{
timestampToTime
}
from
'../../utils/time'
;
import
{
values
}
from
'lodash'
;
import
{
filterObj
,
urlEncode
}
from
'@/utils/method'
;
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
let
readyData
:
object
=
{
tosOwnerName
:
''
,
communityName
:
''
,
pageNum
:
1
,
};
const
ChargeManager
=
(
props
:
any
)
=>
{
const
{
formatMessage
}
=
useIntl
();
const
{
dispatch
,
location
,
Data
}
=
props
;
const
get
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/get'
,
playload
:
values
});
};
const
getById
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/getById'
,
playload
:
values
});
};
useEffect
(()
=>
{
get
(
null
);
},
[]);
const
nameofowner
=
formatMessage
({
id
:
'R.charge.input.nameofowner'
});
const
inputProject
=
formatMessage
({
id
:
'R.charge.input.project'
});
const
{
formatMessage
}
=
useIntl
();
const
username
=
formatMessage
({
id
:
'R.charge.username'
});
const
project
=
formatMessage
({
id
:
'R.charge.project'
});
const
unit
=
formatMessage
({
id
:
'R.charge.unit'
});
const
status
=
formatMessage
({
id
:
'R.charge.status'
});
const
submissionTime
=
formatMessage
({
id
:
'R.charge.submissionTime'
});
const
actions
=
formatMessage
({
id
:
'R.charge.actions'
});
const
search
=
formatMessage
({
id
:
'R.charge.search'
});
const
addaccount
=
formatMessage
({
id
:
'R.charge.addaccount'
});
const
paymentsetting
=
formatMessage
({
id
:
'R.charge.paymentsetting'
});
const
menuListNormal
=
[
'A'
,
'Accounting company'
];
const
[
display
,
setDisplay
]
=
useState
(
'A'
);
//小组件:线框
const
pagination
=
{
defaultCurrent
:
15
,
total
:
16
,
};
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
goToDetail
=
(
values
:
any
)
=>
{
getById
(
values
);
...
...
@@ -50,6 +38,55 @@ const ChargeManager = (props: any) => {
const
goToAddAccout
=
()
=>
{
history
.
push
(
location
.
pathname
+
'/AccoutingDetail'
);
};
const
getById
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/getById'
,
playload
:
values
});
};
const
get
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/get'
,
playload
:
values
});
};
useEffect
(()
=>
{
if
(
location
.
query
)
{
readyData
=
{
...
readyData
,
...
location
.
query
,
};
setLoading
(
true
);
get
({
...
readyData
,
});
}
},
[
location
]);
useEffect
(()
=>
{
if
(
Data
!=
null
)
{
console
.
log
(
Data
);
setLoading
(
false
);
}
},
[
Data
]);
const
TitleSearchContent
=
(
comment
:
any
)
=>
{
history
.
push
(
location
.
pathname
+
urlEncode
(
filterObj
({
...
comment
,
pageNum
:
1
,
}),
),
);
};
const
changePage
=
(
values
:
any
)
=>
{
let
tmp
=
{
...
location
.
query
,
pageNum
:
values
.
current
,
};
history
.
push
(
location
.
pathname
+
urlEncode
(
filterObj
(
tmp
)));
};
const
columns
=
[
{
title
:
username
,
dataIndex
:
'tosOwnerName'
},
{
title
:
project
,
dataIndex
:
'communityName'
},
...
...
@@ -69,20 +106,25 @@ const ChargeManager = (props: any) => {
),
},
];
const
TitleSearchContent
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
);
const
pagination
=
{
defaultPageSize
:
15
,
total
:
Data
&&
Data
.
page
.
totalRow
,
showSizeChanger
:
false
,
};
return
(
<
div
className=
{
styles
.
base
}
>
<
TitleSearch
listkey=
{
[
'tosOwnerName'
,
'communityName'
]
}
list=
{
[
'tosOwnerName'
,
'communityName'
]
}
onSubmit=
{
TitleSearchContent
}
defaultValue=
{
{
...
readyData
}
}
/>
{
/* 内容组件 */
}
<
div
className=
{
styles
.
box2
}
>
{
menuListNormal
.
map
((
item
,
index
)
=>
{
{
/* {
menuListNormal.map((item, index) => {
return (
<button
key={'bt' + index}
...
...
@@ -94,20 +136,22 @@ const ChargeManager = (props: any) => {
{item}
</button>
);
})
}
<
button
className=
{
styles
.
buttonAdd
2
}
onClick=
{
goToAddAccout
}
>
})}
*/
}
<
button
className=
{
styles
.
buttonAdd
}
onClick=
{
goToAddAccout
}
>
+
{
addaccount
}{
' '
}
</
button
>
<
button
className=
{
styles
.
buttonAdd
}
>
{
paymentsetting
}
</
button
>
{
/* <button className={styles.buttonAdd}>{paymentsetting}</button> */
}
</
div
>
{
/* 列表组件 */
}
<
Table
style=
{
{
marginTop
:
16
}
}
rowKey=
{
'id'
}
dataSource=
{
Data
}
loading=
{
loading
}
dataSource=
{
Data
!=
null
?
Data
.
list
:
[]
}
columns=
{
columns
}
pagination=
{
pagination
}
onChange=
{
changePage
}
/>
</
div
>
);
...
...
src/pages/UserManagement/LIFEUserManagement/Users.tsx
View file @
177a89dd
This diff is collapsed.
Click to expand it.
src/pages/UserManagement/LIFEUserManagement/UsersAdd.less
View file @
177a89dd
...
...
@@ -88,31 +88,57 @@
}
.box2item3 {
position: absolute;
left: 362
px;
top: -15
px;
}
.box2item4 {
position: absolute;
left: 461px;
left: 100px;
top: -10px;
}
.box2item5 {
position: absolute;
left: 475px;
left: 115px;
top: -15px;
}
.box2item6 {
position: absolute;
left: 561px;
left: 200px;
top: -10px;
}
.box2item7 {
position: absolute;
left: 583px;
left: 230px;
top: -15px;
}
.box3 {
width: 100%;
height: 34px;
position: relative;
z-index: 40;
}
.box3item1 {
padding-left: 146px;
}
.box5 {
position: absolute;
left: 370px;
width: 340px;
height: 60px;
&::after {
content: '';
width: 100%;
height: 100%;
position: absolute;
top: 55px;
left: 0;
z-index: 20;
background-color: #fff;
}
}
.ant-form-item-explain {
margin-top: 5px;
}
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
View file @
177a89dd
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./UsersAdd.less'
;
import
{
Input
,
Menu
,
Table
,
Space
,
Pagination
,
Spin
,
Button
,
Form
,
Row
,
Col
,
message
}
from
'antd'
;
import
{
Input
,
Spin
,
Button
,
Form
,
message
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
import
{
connect
}
from
'umi'
;
import
Line
from
'../../../components/Line/Line'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
...
...
@@ -10,9 +10,8 @@ import SearchOptionsCommnity from '../../../components/SearchOptions/SearchOptio
import
{
checkParam
,
RA
}
from
'../../../utils/method'
;
import
{
validateMessages
}
from
'@/utils/params'
;
// import "./UsersAddInput.less"
const
module
=
'User'
;
let
verifyNum
=
0
;
const
UsersAdd
=
(
props
:
any
)
=>
{
const
{
dispatch
,
communityInfo
}
=
props
;
...
...
@@ -22,13 +21,11 @@ const UsersAdd = (props: any) => {
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
onFinish
=
(
values
:
any
)
=>
{
console
.
log
(
values
);
if
(
postman
.
extend
!=
null
)
{
values
.
communityName
=
postman
.
extend
;
}
else
{
values
.
communityName
=
null
;
}
// var tmp = Object.keys(values);
if
(
checkParam
(
values
))
{
values
.
owerPhone
=
null
;
values
.
owerEmail
=
null
;
...
...
@@ -46,9 +43,7 @@ const UsersAdd = (props: any) => {
setPostman
(
tmp
);
};
useEffect
(()
=>
{
console
.
log
(
communityInfo
);
if
(
communityInfo
!=
null
)
{
console
.
log
(
communityInfo
);
if
(
postman
.
extend
!=
null
)
{
formRef
.
current
.
setFieldsValue
({
addressAndpostalCode
:
...
...
@@ -61,7 +56,6 @@ const UsersAdd = (props: any) => {
},
[
communityInfo
]);
const
checkData
=
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
console
.
log
(
rule
,
value
);
if
(
value
)
{
if
(
/^
[
a-zA-Z0-9
]
+$/g
.
test
(
value
))
{
callback
();
...
...
@@ -97,21 +91,27 @@ const UsersAdd = (props: any) => {
<
div
className=
{
styles
.
box2item2
}
>
<
SearchOptionsCommnity
alone=
{
true
}
opname=
{
extendName
}
/>
</
div
>
<
div
className=
{
styles
.
box2item3
}
>
<
Form
.
Item
name=
"buildingNumber"
rules=
{
[{
validator
:
checkData
}]
}
>
<
Input
placeholder=
"Building"
style=
{
{
width
:
94
}
}
/>
</
Form
.
Item
>
</
div
>
<
div
className=
{
styles
.
box2item4
}
>
#
</
div
>
<
div
className=
{
styles
.
box2item5
}
>
<
Form
.
Item
name=
"floorNumber"
rules=
{
[{
validator
:
checkData
}]
}
>
<
Input
placeholder=
"Floor"
style=
{
{
width
:
80
}
}
/>
</
Form
.
Item
>
</
div
>
<
div
className=
{
styles
.
box2item6
}
>
——
</
div
>
<
div
className=
{
styles
.
box2item7
}
>
<
Form
.
Item
name=
"roomNumber"
rules=
{
[{
validator
:
checkData
}]
}
>
<
Input
placeholder=
"Room"
style=
{
{
width
:
112
}
}
/>
<
div
className=
{
styles
.
box5
}
>
<
Form
.
Item
>
<
Input
.
Group
>
<
div
className=
{
styles
.
box2item3
}
>
<
Form
.
Item
name=
"buildingNumber"
noStyle
rules=
{
[{
validator
:
checkData
}]
}
>
<
Input
placeholder=
"Building"
style=
{
{
width
:
94
}
}
/>
</
Form
.
Item
>
</
div
>
<
div
className=
{
styles
.
box2item4
}
>
#
</
div
>
<
div
className=
{
styles
.
box2item5
}
>
<
Form
.
Item
name=
"floorNumber"
noStyle
rules=
{
[{
validator
:
checkData
}]
}
>
<
Input
placeholder=
"Floor"
style=
{
{
width
:
80
}
}
/>
</
Form
.
Item
>
</
div
>
<
div
className=
{
styles
.
box2item6
}
>
——
</
div
>
<
div
className=
{
styles
.
box2item7
}
>
<
Form
.
Item
name=
"roomNumber"
noStyle
rules=
{
[{
validator
:
checkData
}]
}
>
<
Input
placeholder=
"Room"
style=
{
{
width
:
112
}
}
/>
</
Form
.
Item
>
</
div
>
</
Input
.
Group
>
</
Form
.
Item
>
</
div
>
</
div
>
...
...
@@ -148,11 +148,3 @@ function mapStateToProps(state: any) {
};
}
export
default
connect
(
mapStateToProps
)(
UsersAdd
);
// "owerName":"孟浩",
// "owerPhone":"18813787878",
// "owerEmail":"sale@huahuico.com",
// "communityName":"A7",
// "buildingNumber":"A1",
// "floorNumber":"11",
// "roomNumber":"388",
// "addressAndpostalCode":"工业大道3689561"
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
View file @
177a89dd
...
...
@@ -8,68 +8,83 @@ import SelectOptions from '../../../components/SelectOptions/index';
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
{
RA
}
from
'@/utils/method'
;
const
module
=
"User"
const
module
=
'User'
;
let
options
:
Array
<
{}
>
=
[];
const
Edit
=
(
props
:
any
)
=>
{
const
{
dispatch
,
CurData
,
SaveChooseData
,
location
,
CommunityList
,
DataServices
}
=
props
;
const
TosTosServiceProviderSave
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/TosTosServiceProviderSave'
,
playload
:
values
})
};
const
TosTosServiceProviderSave
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/TosTosServiceProviderSave'
,
playload
:
values
});
};
const
[
CList
,
setCList
]
=
useState
(
CommunityList
);
const
[
SList
,
setSList
]
=
useState
([
"1"
])
const
[
load
,
setload
]
=
useState
(
false
)
const
printContent
=
(
List
:
any
)
=>
{
setCList
(
List
)
}
const
formRef
=
useRef
(
null
);
const
[
load
,
setload
]
=
useState
(
false
);
const
printContent
=
(
List
:
any
)
=>
{
setCList
(
List
);
};
const
formRef
=
useRef
(
null
as
any
);
useEffect
(()
=>
{
console
.
log
(
SaveChooseData
)
RA
(
43
,
{
serviceName
:
""
},
module
,
dispatch
)
RA
(
43
,
{},
module
,
dispatch
);
},
[]);
useEffect
(()
=>
{
if
(
DataServices
!=
null
)
{
var
tmp
=
DataServices
.
data
.
serviceScopeList
;
options
=
tmp
.
map
((
v
:
string
,
i
:
number
)
=>
{
return
{
label
:
v
,
value
:
i
.
toString
(),
};
});
}
},
[
DataServices
]);
console
.
log
(
DataServices
)
var
tmp
=
DataServices
.
data
.
serviceScopeList
console
.
log
(
tmp
)
if
(
SaveChooseData
!=
null
)
{
formRef
.
current
.
setFieldsValue
(
SaveChooseData
)
}
useEffect
(()
=>
{
if
(
SaveChooseData
!=
null
)
{
console
.
log
(
SaveChooseData
);
console
.
log
(
options
);
let
arr
:
[]
=
[];
SaveChooseData
.
serviceScopeList
.
forEach
((
v
:
any
)
=>
{
options
.
forEach
((
ele
:
any
)
=>
{
if
(
v
===
ele
.
label
)
{
arr
.
push
(
ele
.
value
as
never
);
}
});
});
SaveChooseData
.
serviceScopeList
=
arr
;
formRef
.
current
.
setFieldsValue
(
SaveChooseData
);
}
},
[
DataServices
])
},
[
SaveChooseData
]);
const
onFinish
=
(
values
:
any
)
=>
{
var
val
=
values
val
.
serviceCommunityList
=
CList
// val.serviceScopeList = SList
val
.
creator
=
"admin"
;
val
.
updater
=
"admin"
;
setload
(
true
)
TosTosServiceProviderSave
(
val
)
};
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
console
.
log
(
'Failed:'
,
errorInfo
)
var
val
=
values
;
val
.
serviceCommunityList
=
CList
;
val
.
creator
=
'admin'
;
val
.
updater
=
'admin'
;
setload
(
true
);
TosTosServiceProviderSave
(
val
);
};
return
(
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件v1.2 */
}
<
TitleBack
title=
"Edit Service Provider"
/>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
<
Spin
spinning=
{
load
}
tip=
"In the submission,Please Wait..."
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1item1
}
>
Company Name
</
div
>
<
div
className=
{
styles
.
box1item2
}
>
<
Form
.
Item
name=
"providerName"
rules=
{
[{
required
:
true
,
message
:
"Please enter the company name!"
}]
}
<
Form
.
Item
name=
"providerName"
rules=
{
[
{
required
:
true
,
message
:
'Please enter the company name!'
,
},
]
}
>
<
Input
style=
{
{
width
:
260
}
}
placeholder=
"Please enter company name"
/>
</
Form
.
Item
>
...
...
@@ -78,10 +93,12 @@ const Edit = (props: any) => {
<
div
className=
{
styles
.
box1item4
}
>
<
Form
.
Item
name=
"providerAddress"
rules=
{
[{
required
:
true
,
message
:
"Please enter your office address!"
}]
}
rules=
{
[
{
required
:
true
,
message
:
'Please enter your office address!'
,
},
]
}
>
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Single Line Input"
/>
</
Form
.
Item
>
...
...
@@ -90,19 +107,25 @@ const Edit = (props: any) => {
<
div
className=
{
styles
.
line
}
></
div
>
<
SelectOptions
list=
{
CommunityList
.
sort
()
}
checklist=
{
SaveChooseData
!=
null
?
SaveChooseData
.
serviceCommunityList
:
null
}
onSubmit=
{
printContent
}
/>
<
SelectOptions
list=
{
CommunityList
?
CommunityList
.
sort
()
:
[]
}
checklist=
{
SaveChooseData
!=
null
?
SaveChooseData
.
serviceCommunityList
:
null
}
onSubmit=
{
printContent
}
/>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2item1
}
>
Services Available
</
div
>
<
div
className=
{
styles
.
box2item2
}
>
<
Form
.
Item
name=
"serviceScopeList"
rules=
{
[{
required
:
true
,
message
:
"Please select at least one service available!"
}]
}
rules=
{
[
{
required
:
true
,
message
:
'Please select at least one service available!'
,
},
]
}
>
<
Checkbox
.
Group
options=
{
DataServices
!=
null
?
DataServices
.
data
.
serviceScopeList
:
null
}
/>
<
Checkbox
.
Group
options=
{
options
as
any
}
/>
</
Form
.
Item
>
</
div
>
</
div
>
...
...
@@ -112,59 +135,63 @@ const Edit = (props: any) => {
<
div
className=
{
styles
.
box3item2
}
>
<
Form
.
Item
name=
"contactName"
rules=
{
[{
required
:
true
,
message
:
"Please enter the name of the person in charge!"
}]
}
rules=
{
[
{
required
:
true
,
message
:
'Please enter the name of the person in charge!'
,
},
]
}
>
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Please enter a name"
/>
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Please enter a name"
/>
</
Form
.
Item
>
</
div
>
</
div
>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4item1
}
>
Contact Details
</
div
>
<
div
className=
{
styles
.
box4item2
}
><
Form
.
Item
name=
"contactPhone"
><
Input
style=
{
{
width
:
200
}
}
placeholder=
"Telephone"
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box4item2
}
>
<
Form
.
Item
name=
"contactPhone"
>
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Telephone"
/>
</
Form
.
Item
>
</
div
>
<
div
className=
{
styles
.
box4item3
}
>
<
Form
.
Item
name=
"contactEmail"
rules=
{
[{
required
:
true
,
type
:
"email"
,
message
:
"Please enter the correct email address!"
}]
}
rules=
{
[
{
required
:
true
,
type
:
'email'
,
message
:
'Please enter the correct email address!'
,
},
]
}
>
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"E-mail"
/></
Form
.
Item
></
div
>
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"E-mail"
/>
</
Form
.
Item
>
</
div
>
</
div
>
<
div
className=
{
styles
.
line
}
></
div
>
<
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Submit
</
Button
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Submit
</
Button
>
</
Form
.
Item
>
</
Spin
>
</
Form
>
</
div
>
);
};
function
mapStateToProps
(
state
:
any
)
{
const
{
CurData
,
SaveChooseData
}
=
state
.
ServiceProvider
;
const
{
DataServices
,
}
=
state
.
User
;
const
{
DataServices
}
=
state
.
User
;
const
{
CommunityList
}
=
state
.
Init
;
return
{
CurData
,
SaveChooseData
,
CommunityList
,
DataServices
DataServices
,
};
}
export
default
connect
(
mapStateToProps
)(
Edit
);
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
177a89dd
This diff is collapsed.
Click to expand it.
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