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
81689003
Commit
81689003
authored
Aug 06, 2020
by
maple
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[new]补充服务商接口、物业费接口
parent
1f80c3e0
Changes
19
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
with
745 additions
and
223 deletions
+745
-223
proxy.ts
config/proxy.ts
+6
-1
ArrayToPingYin.js
src/components/ShowOptions/ArrayToPingYin.js
+73
-0
index.jsx
src/components/ShowOptions/index.jsx
+198
-0
u.c
src/components/ShowOptions/u.c
+12
-0
TreeAction.tsx
src/components/TreeAction/TreeAction.tsx
+113
-0
index.less
src/components/TreeAction/index.less
+8
-0
R.ts
src/locales/en-US/R.ts
+9
-9
menu.ts
src/locales/zh-CN/menu.ts
+23
-0
PropertyManagement.ts
src/models/PropertyManagement.ts
+31
-0
ServiceProvider.ts
src/models/ServiceProvider.ts
+43
-5
AccountManagement.tsx
...AccountManagement/AccountManagement/AccountManagement.tsx
+14
-2
index.less
src/pages/AccountManagement/AccountManagement/index.less
+21
-0
ChargeDetail.tsx
src/pages/PropertyManagement/ChargeDetail.tsx
+10
-20
ChargeManager.tsx
src/pages/PropertyManagement/ChargeManager.tsx
+21
-33
Detail.tsx
...pages/UserManagement/ServiceProviderManagement/Detail.tsx
+50
-48
Edit.tsx
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
+34
-32
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+54
-73
PropertyManagementServices.ts
src/services/PropertyManagementServices.ts
+6
-0
ServiceProviderServices.ts
src/services/ServiceProviderServices.ts
+19
-0
No files found.
config/proxy.ts
View file @
81689003
...
@@ -35,6 +35,11 @@ export default {
...
@@ -35,6 +35,11 @@ export default {
target
:
'http://acc-huahui.oss-cn-shenzhen.aliyuncs.com'
,
target
:
'http://acc-huahui.oss-cn-shenzhen.aliyuncs.com'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
pathRewrite
:
{
'^'
:
''
},
}
},
'/tos/'
:
{
target
:
'http://localhost:8651'
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
},
},
},
};
};
src/components/ShowOptions/ArrayToPingYin.js
0 → 100644
View file @
81689003
This diff is collapsed.
Click to expand it.
src/components/ShowOptions/index.jsx
0 → 100644
View file @
81689003
import
React
from
'react'
;
import
{
Table
,
Tag
,
Space
,
Button
,
Radio
,
Row
,
Col
,
Input
,
Checkbox
}
from
'antd'
;
import
{
connect
}
from
'dva'
;
import
{
gray
}
from
'chalk'
;
import
{
StarOutlined
,
StarFilled
,
StarTwoTone
}
from
'@ant-design/icons'
;
import
{
indexOf
}
from
'lodash'
;
import
{
useIntl
,
getLocale
}
from
'umi'
;
import
{
DownOutlined
,
UpOutlined
,
}
from
'@ant-design/icons'
;
var
ArrayToPingYin
=
require
(
'./ArrayToPingYin'
);
const
CheckboxGroup
=
Checkbox
.
Group
;
const
menuListNormal
=
[
"A"
,
"B"
,
"C"
,
"D"
,
"E"
,
"F"
,
"G"
,
"H"
,
"I"
,
"J"
,
"K"
,
"L"
,
"M"
,
"N"
,
"O"
,
"P"
,
"Q"
,
"R"
,
"S"
,
"T"
,
"U"
,
"V"
,
"W"
,
"X"
,
"Y"
,
"Z"
]
function
getDotText
(
arr
)
{
if
(
arr
){
var
str
=
""
;
for
(
var
i
=
0
;
i
<
arr
.
length
;
i
++
)
{
str
+=
arr
[
i
]
+
","
;
}
if
(
str
.
length
>
0
)
{
str
=
str
.
substr
(
0
,
str
.
length
-
1
);
}
return
str
;
}
}
class
ShowOptions
extends
React
.
Component
{
state
=
{
};
componentDidMount
(){
var
name
=
getLocale
();
//console.log(name)
if
(
name
==
"zh-CN"
){
this
.
setState
({
selectoptionsOpen
:
'展开'
,
selectoptionsPutItAway
:
'收起'
,
selectoptionsSelected
:
'已选'
,
selectoptionsSelectAll
:
'全选'
,
selectoptionsSelectNone
:
'全不选'
,
selectoptionsAll
:
'所有'
,
selectoptionsSearchCell
:
'搜索小区'
,
selectoptionsAllCell
:
'全部小区'
,
componetVisible
:
'展开'
,
})
}
else
{
this
.
setState
({
selectoptionsOpen
:
'Open'
,
selectoptionsPutItAway
:
'Put It Away'
,
selectoptionsSelected
:
'Selected'
,
selectoptionsSelectAll
:
'Select All'
,
selectoptionsSelectNone
:
'Unselect All'
,
selectoptionsAll
:
'All'
,
selectoptionsSearchCell
:
'Search cell'
,
selectoptionsAllCell
:
'All Cell'
,
componetVisible
:
'Open'
,
})
}
};
constructor
(
props
)
{
super
(
props
);
const
{
list
,
dispatch
}
=
this
.
props
;
if
(
list
==
null
){
//console.error("组件错误:没有数据导入")
}
this
.
state
=
{
selectoptionsOpen
:
'Open'
,
selectoptionsPutItAway
:
'Put It Away'
,
selectoptionsSelected
:
'Selected'
,
selectoptionsSelectNone
:
'Select None'
,
selectoptionsAll
:
'All'
,
selectoptionsSearchCell
:
'Search cell'
,
menuList
:
ArrayToPingYin
.
get
(
list
),
componetVisible
:
'Open'
,
checkedListOptions
:
list
,
checkedList
:
list
,
indeterminate
:
false
,
checkAll
:
true
,
checkNone
:
false
,
resultList
:
list
,
};
}
hideAndexpand
=
()
=>
{
if
(
this
.
state
.
componetVisible
==
this
.
state
.
selectoptionsOpen
){
this
.
setState
({
componetVisible
:
this
.
state
.
selectoptionsPutItAway
})
}
else
{
this
.
setState
({
componetVisible
:
this
.
state
.
selectoptionsOpen
})
}
};
itemSelectAll
=
(
e
)
=>
{
this
.
setState
({
checkedListOptions
:
this
.
props
.
list
,
checkedList
:
this
.
state
.
resultList
,
});
}
itemSelect
=
(
item
,
e
)
=>
{
var
arraylist
=
this
.
props
.
list
var
array
=
ArrayToPingYin
.
get
(
this
.
props
.
list
)
var
tempAarry
=
new
Array
();
if
(
array
){
for
(
var
i
=
0
;
i
<
array
.
length
;
i
++
){
if
(
array
[
i
]
==
item
){
tempAarry
.
push
(
arraylist
[
i
]);
}
}
}
this
.
setState
({
checkedListOptions
:
tempAarry
,
checkedList
:
tempAarry
,
});
};
getSearchValue
=
(
item
,
e
)
=>
{
var
list
=
this
.
props
.
list
var
tempAarry
=
new
Array
()
for
(
var
i
=
0
;
i
<
list
.
length
;
i
++
){
if
((
list
[
i
].
toLowerCase
()).
indexOf
(
item
.
toLowerCase
())
!=-
1
){
tempAarry
.
push
(
list
[
i
]);
}
}
this
.
setState
({
checkedList
:
tempAarry
})
};
render
()
{
return
(
<
div
style=
{
{
minWidth
:
800
}
}
>
{
this
.
state
.
componetVisible
==
this
.
state
.
selectoptionsOpen
?
<
div
style=
{
{
width
:
"100%"
,
height
:
48
,
position
:
"relative"
}
}
>
<
div
style=
{
{
position
:
"absolute"
,
left
:
5
,
top
:
5
}
}
>
{
this
.
state
.
selectoptionsSelected
}
...
</
div
>
<
div
style=
{
{
position
:
"absolute"
,
right
:
16
,
top
:
5
,
cursor
:
"pointer"
}
}
onClick=
{
()
=>
this
.
hideAndexpand
()
}
>
{
this
.
state
.
componetVisible
}
<
DownOutlined
/></
div
>
</
div
>
:
<
div
style=
{
{
width
:
"100%"
,
backgroundColor
:
"#eeeeee"
}
}
>
<
div
style=
{
{
width
:
"100%"
,
height
:
48
,
position
:
"relative"
}
}
>
<
div
style=
{
{
position
:
"absolute"
,
left
:
5
,
top
:
5
}
}
>
{
this
.
state
.
resultList
.
length
==
0
?
this
.
state
.
selectoptionsSelectNone
:(
this
.
state
.
selectoptionsSelected
+
" "
+
this
.
state
.
resultList
.
length
)
}
</
div
>
<
div
style=
{
{
position
:
"absolute"
,
right
:
16
,
top
:
5
,
cursor
:
"pointer"
}
}
onClick=
{
()
=>
this
.
hideAndexpand
()
}
>
{
this
.
state
.
componetVisible
}
<
UpOutlined
/></
div
>
</
div
>
<
div
style=
{
{
width
:
"100%"
,
backgroundColor
:
"#eeeeee"
,
userSelect
:
"none"
}
}
>
<
div
style=
{
{
width
:
"100%"
,
height
:
40
,
position
:
"relative"
}
}
>
<
div
style=
{
{
fontSize
:
14
,
position
:
"absolute"
}
}
>
<
a
style=
{
{
marginLeft
:
16
}
}
onClick=
{
this
.
itemSelectAll
.
bind
(
this
)
}
>
{
this
.
state
.
selectoptionsAll
}
</
a
>
{
menuListNormal
.
map
((
item
,
index
)
=>
{
if
(
this
.
state
.
menuList
.
indexOf
(
item
)
>-
1
){
return
(<
a
key=
{
item
}
style=
{
{
marginLeft
:
10
,
userSelect
:
"none"
}
}
onClick=
{
this
.
itemSelect
.
bind
(
this
,
item
)
}
>
{
item
}
</
a
>)
}
else
{
return
(<
a
key=
{
item
}
style=
{
{
marginLeft
:
10
,
userSelect
:
"none"
}
}
disabled
>
{
item
}
</
a
>)
}
})
}
</
div
>
</
div
>
<
div
style=
{
{
width
:
"100%"
,
paddingLeft
:
16
,
paddingRight
:
16
}
}
>
<
div
style=
{
{
width
:
"100%"
,
backgroundColor
:
"#ffffff"
,
border
:
"1px solid #cfcfcf"
,
padding
:
5
}
}
>
<
Input
.
Search
placeholder=
{
this
.
state
.
selectoptionsSearchCell
}
onSearch=
{
this
.
getSearchValue
.
bind
(
this
)
}
style=
{
{
width
:
200
,
margin
:
16
}
}
/>
<
div
><
h1
>
</
h1
></
div
>
{
(
this
.
state
.
checkedList
).
map
((
tag
,
index
)
=>
{
return
(
<
Tag
color=
"blue"
key=
{
"Tag_"
+
index
}
>
{
tag
}
</
Tag
>
);
})
}
<
div
><
h1
>
</
h1
></
div
>
</
div
>
</
div
>
<
br
/>
</
div
>
</
div
>
}
</
div
>
);
}
};
export
default
ShowOptions
;
\ No newline at end of file
src/components/ShowOptions/u.c
0 → 100644
View file @
81689003
/* 使用说明:(传入的参数 使用sort排序 )
import ShowOptions from '../../components/ShowOptions/index';
const printContent = (comment: any)=>{
console.log(comment)
}
<ShowOptions list={["美国","美丽的","美好","加拿大","加油","XO"].sort()} onSubmit={printContent}/>
*/
\ No newline at end of file
src/components/TreeAction/TreeAction.tsx
0 → 100644
View file @
81689003
import
React
from
'react'
;
import
styles
from
'./index.less'
;
import
{
Tree
}
from
'antd'
;
const
treeData
=
[
{
title
:
'LIFE用户管理'
,
key
:
'0-0'
,
children
:
[
{
title
:
'查看LIFE用户'
,
key
:
'0-0-1'
},
{
title
:
'编辑LIFE用户'
,
key
:
'0-0-2'
},
{
title
:
'添加业主档案'
,
key
:
'0-0-3'
},
{
title
:
'注销业主档案'
,
key
:
'0-0-4'
},
],
},
{
title
:
'数据中心'
,
key
:
'0-1'
},
{
title
:
'服务商管理'
,
key
:
'0-2'
,
children
:
[
{
title
:
'查看服务商'
,
key
:
'0-2-1'
},
{
title
:
'编辑服务商'
,
key
:
'0-2-2'
},
{
title
:
'添加服务商'
,
key
:
'0-2-3'
},
{
title
:
'注销服务商'
,
key
:
'0-2-4'
},
],
},
{
title
:
'物业费管理'
,
key
:
'0-3'
,
children
:
[
{
title
:
'查看物业费记录'
,
key
:
'0-3-1'
},
{
title
:
'添加物业费记录'
,
key
:
'0-3-2'
},
],
},
{
title
:
'物业管理'
,
key
:
'0-4'
,
children
:
[
{
title
:
'查看物业服务'
,
key
:
'0-4-1'
},
{
title
:
'编辑物业服务'
,
key
:
'0-4-2'
},
{
title
:
'注销物业服务'
,
key
:
'0-4-3'
},
],
},
{
title
:
'订单管理'
,
key
:
'0-5'
,
children
:
[
{
title
:
'查看订单'
,
key
:
'0-5-1'
},
{
title
:
'编辑订单'
,
key
:
'0-5-2'
},
],
},
{
title
:
'合同管理'
,
key
:
'0-6'
,
children
:
[
{
title
:
'查看合同'
,
key
:
'0-6-1'
},
{
title
:
'编辑合同'
,
key
:
'0-6-2'
},
{
title
:
'添加合同'
,
key
:
'0-6-3'
},
],
},
{
title
:
'小区管理'
,
key
:
'0-7'
,
children
:
[
{
title
:
'查看小区'
,
key
:
'0-7-1'
},
{
title
:
'编辑小区'
,
key
:
'0-7-2'
},
{
title
:
'添加小区'
,
key
:
'0-7-3'
},
],
},
{
title
:
'访客记录'
,
key
:
'1-0'
},
{
title
:
'预订设施'
,
key
:
'0-8'
,
children
:
[
{
title
:
'查看预定服务'
,
key
:
'0-8-1'
},
{
title
:
'编辑预定服务'
,
key
:
'0-8-2'
},
{
title
:
'添加预定服务'
,
key
:
'0-8-3'
},
],
},
{
title
:
'后台管理'
,
key
:
'0-9'
,
children
:
[
{
title
:
'查看后台账号'
,
key
:
'0-9-1'
},
{
title
:
'配置后台账号'
,
key
:
'0-9-2'
},
],
},
];
const
TreeAction
=
(
props
:
any
)
=>
{
const
onSelect
=
(
selectedKeys
,
info
)
=>
{
console
.
log
(
'selected'
,
selectedKeys
,
info
);
};
const
onCheck
=
(
checkedKeys
,
info
)
=>
{
props
.
onSubmit
(
checkedKeys
)
};
return
(
<>
<
Tree
checkable
defaultExpandedKeys=
{
[]
}
defaultSelectedKeys=
{
[]
}
defaultCheckedKeys=
{
[
'0-0'
,
'0-1'
,
'0-2'
,
'0-3'
,
'0-4'
,
'0-5'
,
'0-6'
,
'0-7'
,
'0-8'
,
'0-9'
,
'1-0'
]
}
onSelect=
{
onSelect
}
onCheck=
{
onCheck
}
treeData=
{
treeData
}
/>
</>
);
};
export
default
TreeAction
;
src/components/TreeAction/index.less
0 → 100644
View file @
81689003
// 线栏
.line{
width: 100%;
height: 1px;
border-top: 1px solid rgba(217,217,217,1);
margin-top: 28px;
margin-bottom: 28px;
}
\ No newline at end of file
src/locales/en-US/R.ts
View file @
81689003
export
default
{
export
default
{
'R.charge.input.project'
:
'Project'
,
'R.charge.input.project'
:
'Project'
,
'R.charge.input.nameofowner'
:
'Name of Owner'
,
'R.charge.input.nameofowner'
:
'Name of Owner'
,
'R.charge.username'
:
'
usern
ame'
,
'R.charge.username'
:
'
User N
ame'
,
'R.charge.project'
:
'
p
roject'
,
'R.charge.project'
:
'
P
roject'
,
'R.charge.unit'
:
'
u
nit'
,
'R.charge.unit'
:
'
U
nit'
,
'R.charge.status'
:
'
s
tatus'
,
'R.charge.status'
:
'
S
tatus'
,
'R.charge.submissionTime'
:
'
submission
Time'
,
'R.charge.submissionTime'
:
'
Submission
Time'
,
'R.charge.actions'
:
'
a
ctions'
,
'R.charge.actions'
:
'
A
ctions'
,
'R.charge.search'
:
'
s
earch'
,
'R.charge.search'
:
'
S
earch'
,
'R.charge.addaccount'
:
'
adda
ccount'
,
'R.charge.addaccount'
:
'
Add A
ccount'
,
'R.charge.paymentsetting'
:
'
payments
etting'
,
'R.charge.paymentsetting'
:
'
Payment S
etting'
,
'R.selectoptions.open'
:
'Open'
,
'R.selectoptions.open'
:
'Open'
,
'R.selectoptions.PutItAway'
:
'Put It Away'
,
'R.selectoptions.PutItAway'
:
'Put It Away'
,
...
...
src/locales/zh-CN/menu.ts
View file @
81689003
...
@@ -50,4 +50,27 @@ export default {
...
@@ -50,4 +50,27 @@ export default {
'menu.editor.mind'
:
'脑图编辑器'
,
'menu.editor.mind'
:
'脑图编辑器'
,
'menu.editor.koni'
:
'拓扑编辑器'
,
'menu.editor.koni'
:
'拓扑编辑器'
,
'menu.usemanagement'
:
'用户管理'
,
'menu.monitoringcenter'
:
'监控中心'
,
'menu.usemanagement.lifeusers'
:
'LIFE用户管理'
,
'menu.usemanagement.serviceproviders'
:
'服务商管理'
,
'menu.propertymanagement'
:
'物业费管理'
,
'menu.commercialservice'
:
'物业服务'
,
'menu.commercialservice.ownercomplaints'
:
'业主投诉'
,
'menu.commercialservice.problemfeedback'
:
'问题反馈'
,
'menu.commercialservice.renovationapplication'
:
'装修申请'
,
'menu.commercialservice.accessCardapplication'
:
'住户卡申请'
,
'menu.commercialservice.reportonline'
:
'在线报事'
,
'menu.commercialservice.shelflifeservice'
:
'保质期服务'
,
'menu.ordermanagement'
:
'订单管理'
,
'menu.contractmanagement'
:
'合同管理'
,
'menu.communitymanagement'
:
'小区管理'
,
'menu.communitymanagement.celllist'
:
'小区列表'
,
'menu.communitymanagement.communityannouncement'
:
'小区公告'
,
'menu.communitymanagement.facilitybookings'
:
'预定设施'
,
'menu.communitymanagement.visitorrecord'
:
'访客记录'
,
'menu.accountmanagement'
:
'后台管理'
,
'menu.accountmanagement.accountmanagement1'
:
'账号管理'
,
'menu.accountmanagement.companyinformation'
:
'公司信息'
,
'menu.accountmanagement.languagesettings'
:
'语言设置'
,
};
};
src/models/PropertyManagement.ts
0 → 100644
View file @
81689003
import
*
as
service
from
'../services/PropertyManagementServices'
;
import
{
message
}
from
'antd'
;
import
{
routerRedux
}
from
'dva/router'
export
default
{
namespace
:
'PropertyManagement'
,
state
:
{
Data
:
''
,
},
reducers
:
{
returnData
(
state
,
{
Data
})
{
return
{
...
state
,
Data
};
},
},
effects
:
{
//获取物业费列表
*
get
({
playload
},
{
call
,
put
})
{
console
.
log
(
playload
)
const
resp
=
yield
call
(
service
.
get
,
playload
);
console
.
log
(
resp
)
let
Data
=
resp
.
data
.
rows
;
yield
put
({
type
:
'returnData'
,
Data
,
});
},
},
};
src/models/ServiceProvider.ts
View file @
81689003
...
@@ -7,33 +7,71 @@ export default {
...
@@ -7,33 +7,71 @@ export default {
namespace
:
'ServiceProvider'
,
namespace
:
'ServiceProvider'
,
state
:
{
state
:
{
Data
:
''
,
Data
:
''
,
CurData
:
''
,
CurDataFollow
:
''
},
},
reducers
:
{
reducers
:
{
returnPage
(
state
,
{
Data
})
{
returnPage
(
state
,
{
Data
})
{
return
{
...
state
,
Data
};
return
{
...
state
,
Data
};
},
},
returnCurData
(
state
,
{
CurData
})
{
return
{
...
state
,
CurData
};
},
returnCurDataFollow
(
state
,
{
CurDataFollow
})
{
return
{
...
state
,
CurDataFollow
};
},
},
},
effects
:
{
effects
:
{
*
create
({
playload
},
{
call
,
put
}){
//获取服务商
*
model_1001
({
playload
},
{
call
,
put
}){
const
resp
=
yield
call
(
service
.
service_1001
,
playload
);
console
.
log
(
resp
)
let
Data
=
resp
;
yield
put
({
type
:
'returnPage'
,
Data
,
});
},
//获取服务商根据ID
*
model_1002
({
playload
},
{
call
,
put
}){
const
resp
=
yield
call
(
service
.
service_1002
,
playload
);
console
.
log
(
resp
)
let
CurData
=
resp
;
yield
put
({
type
:
'returnCurData'
,
CurData
,
});
},
//创建服务商
*
model_1003
({
playload
},
{
call
,
put
}){
const
resp
=
yield
call
(
service
.
create
,
playload
);
const
resp
=
yield
call
(
service
.
create
,
playload
);
console
.
log
(
resp
)
console
.
log
(
resp
)
let
Data
=
resp
;
let
Data
=
resp
;
message
.
success
(
"create success!"
,
2
);
message
.
success
(
"create success!"
,
2
);
//yield put({ type: 'returnPage', Data, });
yield
put
(
routerRedux
.
push
(
'/UserManagement/ServiceProviderManagement'
));
yield
put
(
routerRedux
.
push
(
'/UserManagement/ServiceProviderManagement'
));
},
},
// 获取服务商
*
get
({
playload
},
{
call
,
put
}){
*
get
({
playload
},
{
call
,
put
}){
const
resp
=
yield
call
(
service
.
create
,
playload
);
const
resp
=
yield
call
(
service
.
get
,
playload
);
console
.
log
(
resp
)
console
.
log
(
resp
)
let
Data
=
resp
;
let
Data
=
resp
;
yield
put
({
type
:
'returnPage'
,
Data
,
});
yield
put
({
type
:
'returnPage'
,
Data
,
});
},
},
//获取服务商根据服务名
*
getByProviderName
({
playload
},
{
call
,
put
})
{
console
.
log
(
playload
)
const
resp
=
yield
call
(
service
.
get
,
playload
);
console
.
log
(
resp
)
let
CurData
=
resp
.
data
.
rows
[
0
];
yield
put
({
type
:
'returnCurData'
,
CurData
,
});
},
//获取服务商保安根据服务商名
*
getSecurityGuarder
({
playload
},
{
call
,
put
})
{
console
.
log
(
playload
)
const
resp
=
yield
call
(
service
.
getSecurityGuarder
,
playload
);
console
.
log
(
resp
)
let
CurDataFollow
=
resp
.
data
.
rows
;
yield
put
({
type
:
'returnCurDataFollow'
,
CurDataFollow
,
});
},
},
},
};
};
src/pages/AccountManagement/AccountManagement/AccountManagement.tsx
View file @
81689003
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
import
{
Input
,
Menu
,
Table
,
Space
,
Pagination
,
Tooltip
,
Radio
}
from
'antd'
;
import
{
Input
,
Button
,
Table
,
Space
,
Pagination
,
Tooltip
,
Radio
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
TreeAction
from
'../../../components/TreeAction/TreeAction'
;
const
printContent
=
(
comment
:
any
)
=>
{
const
printContent
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
console
.
log
(
comment
)
}
}
const
getTreeActionValues
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
}
const
AccountManagement
=
()
=>
{
const
AccountManagement
=
()
=>
{
...
@@ -48,7 +54,13 @@ const AccountManagement = () => {
...
@@ -48,7 +54,13 @@ const AccountManagement = () => {
<
Input
/>
<
Input
/>
</
div
>
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4item1
}
></
div
>
<
div
className=
{
styles
.
box4item2
}
>
<
TreeAction
onSubmit=
{
getTreeActionValues
}
/>
</
div
>
</
div
>
<
div
className=
{
styles
.
line
}
></
div
><
Button
type=
"primary"
style=
{
{
width
:
80
,
height
:
32
}
}
>
Submit
</
Button
>
</
div
>
</
div
>
);
);
};
};
...
...
src/pages/AccountManagement/AccountManagement/index.less
View file @
81689003
...
@@ -94,4 +94,25 @@
...
@@ -94,4 +94,25 @@
position: absolute;
position: absolute;
left: 485px;
left: 485px;
top:19px;
top:19px;
}
.box4{
width: 100%;
position: relative;
margin-top: 20px;
}
.box4item1{
position: absolute;
}
.box4item2{
padding-left: 196px;
}
// 线栏
.line{
width: 100%;
height: 1px;
border-top: 1px solid rgba(217,217,217,1);
margin-top: 28px;
margin-bottom: 28px;
}
}
\ No newline at end of file
src/pages/PropertyManagement/ChargeDetail.tsx
View file @
81689003
...
@@ -61,26 +61,16 @@ const ChargeDetail = () => {
...
@@ -61,26 +61,16 @@ const ChargeDetail = () => {
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4
}
>
<
Pagination
simple
defaultCurrent=
{
curpage
}
total=
{
pages
*
10
}
onChange=
{
pageChange
}
/>
<
Pagination
simple
defaultCurrent=
{
curpage
}
total=
{
pages
*
10
}
onChange=
{
pageChange
}
/>
</
div
>
</
div
>
{
scale
==
1.3
?
(
<><
Tooltip
title=
{
scale
==
1.3
?
"点击放大查看"
:
"还原视图"
}
>
<
Tooltip
title=
"点击放大查看"
>
<
div
className=
{
scale
==
1.3
?
styles
.
box3out
:
null
}
>
<
div
className=
{
styles
.
box3out
}
>
<
div
className=
{
scale
==
1.3
?
styles
.
box3
:
styles
.
box3of
}
onClick=
{
lookup
}
>
<
div
className=
{
styles
.
box3
}
onClick=
{
lookup
}
>
<
PDF
key=
"pdfjs"
file=
"/cash/tos-manager/bill/B1-21-1002.pdf?Expires=1911893716&OSSAccessKeyId=LTAI4FxB6SgPMtnJ7UpcATA6&Signature=c72T%2B6BrcHcqXeXdMY%2BuBNZmgCw%3D"
workerSrc
=
"
//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js" scale={scale} page={curpage} onDocumentComplete={pdfpages} />
{
/* <Document file="http://localhost:8000/test2.pdf" /> */
}
</
div
>
</
div
>
<
PDF
key=
"pdfjs"
file=
"/cash/tos-manager/bill/B1-21-1002.pdf?Expires=1911893716&OSSAccessKeyId=LTAI4FxB6SgPMtnJ7UpcATA6&Signature=c72T%2B6BrcHcqXeXdMY%2BuBNZmgCw%3D"
workerSrc
=
"
//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js" scale=
{
scale
}
page=
{
curpage
}
onDocumentComplete=
{
pdfpages
}
/>
</
Tooltip
></>
</
div
>
</
div
>
</
Tooltip
>
)
:
(
<
Tooltip
title=
"还原视图"
>
<
div
className=
{
styles
.
box3of
}
onClick=
{
lookup
}
>
{
/* <PDF key="pdfjs" file="test2.pdf" cMapUrl="http://127.0.0.1:80/" workerSrc = '//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js' scale={scale} page={curpage} onDocumentComplete={pdfpages} /> */
}
</
div
>
</
Tooltip
>
)
}
</
div
>
</
div
>
...
...
src/pages/PropertyManagement/ChargeManager.tsx
View file @
81689003
...
@@ -14,10 +14,15 @@ const dataSource = [
...
@@ -14,10 +14,15 @@ const dataSource = [
},
},
];
];
const
ChargeManager
=
(
props
:
{
location
:
any
;
}
)
=>
{
const
ChargeManager
=
(
props
:
any
)
=>
{
const
{
formatMessage
}
=
useIntl
();
const
{
formatMessage
}
=
useIntl
();
const
{
dispatch
,
location
,
Data
}
=
props
;
const
get
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'PropertyManagement/get'
,
playload
:
values
})};
useEffect
(()
=>
{
get
(
null
)
},
[]);
const
{
location
}
=
props
;
const
nameofowner
=
formatMessage
({
id
:
'R.charge.input.nameofowner'
})
const
nameofowner
=
formatMessage
({
id
:
'R.charge.input.nameofowner'
})
const
inputProject
=
formatMessage
({
id
:
'R.charge.input.project'
})
const
inputProject
=
formatMessage
({
id
:
'R.charge.input.project'
})
...
@@ -43,34 +48,12 @@ const ChargeManager = (props: { location: any; }) => {
...
@@ -43,34 +48,12 @@ const ChargeManager = (props: { location: any; }) => {
history
.
push
(
location
.
pathname
+
'/AccoutingDetail'
)
history
.
push
(
location
.
pathname
+
'/AccoutingDetail'
)
}
}
const
columns
=
[
const
columns
=
[
{
{
title
:
username
,
dataIndex
:
'tosOwnerName'
},
title
:
username
,
{
title
:
project
,
dataIndex
:
'communityName'
},
dataIndex
:
'name'
,
{
title
:
unit
,
dataIndex
:
'buildingNumber'
},
key
:
'name'
,
{
title
:
status
,
dataIndex
:
'enable'
},
},
{
title
:
submissionTime
,
dataIndex
:
'updateTime'
},
{
{
title
:
actions
,
title
:
project
,
dataIndex
:
'age'
,
key
:
'age'
,
},
{
title
:
unit
,
dataIndex
:
'address'
,
key
:
'address'
,
},
{
title
:
status
,
dataIndex
:
'address'
,
key
:
'address'
,
},
{
title
:
submissionTime
,
dataIndex
:
'address'
,
key
:
'address'
,
},
{
title
:
actions
,
key
:
'action'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
<
Space
size=
"middle"
>
<
a
onClick=
{
goToDetail
}
>
Detail
</
a
>
<
a
onClick=
{
goToDetail
}
>
Detail
</
a
>
...
@@ -100,12 +83,17 @@ const ChargeManager = (props: { location: any; }) => {
...
@@ -100,12 +83,17 @@ const ChargeManager = (props: { location: any; }) => {
</
div
>
</
div
>
{
/* 列表组件 */
}
{
/* 列表组件 */
}
<
Table
style=
{
{
marginTop
:
16
}
}
dataSource=
{
dataSource
}
columns=
{
columns
}
pagination=
{
pagination
}
/>
<
Table
style=
{
{
marginTop
:
16
}
}
rowKey=
{
"id"
}
dataSource=
{
Data
}
columns=
{
columns
}
pagination=
{
pagination
}
/>
</
div
>
</
div
>
);
);
};
};
function
mapStateToProps
(
state
:
any
)
{
export
default
ChargeManager
;
const
{
Data
}
=
state
.
PropertyManagement
;
return
{
Data
};
}
export
default
connect
(
mapStateToProps
)(
ChargeManager
);
src/pages/UserManagement/ServiceProviderManagement/Detail.tsx
View file @
81689003
...
@@ -4,56 +4,49 @@ import { Input ,Button,Table,Space,Pagination,Tooltip, Checkbox } from 'antd';
...
@@ -4,56 +4,49 @@ import { Input ,Button,Table,Space,Pagination,Tooltip, Checkbox } from 'antd';
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
const
dataSource
=
[
{
key
:
'1'
,
name
:
'胡彦斌'
,
age
:
32
,
address
:
'西湖区湖底公园1号'
,
},
];
const
Template
=
()
=>
{
import
ShowOptions
from
'../../../components/ShowOptions/index'
;
const
Detail
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data
,
CurData
,
CurDataFollow
,
location
}
=
props
;
const
getByProviderName
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/getByProviderName'
,
playload
:
values
})
};
const
getSecurityGuarder
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/getSecurityGuarder'
,
playload
:
values
})
};
useEffect
(()
=>
{
getByProviderName
(
location
.
query
)
getSecurityGuarder
({
companyName
:
location
.
query
.
providerName
})
},
[]);
useEffect
(()
=>
{
console
.
log
(
CurData
)
console
.
log
(
CurDataFollow
)
},
[
CurData
,
CurDataFollow
]);
const
goToReturn
=
()
=>
{
const
goToReturn
=
()
=>
{
history
.
back
()
history
.
back
()
}
}
const
pagination
=
{
defaultCurrent
:
1
,
total
:
16
}
const
pagination
=
{
defaultCurrent
:
1
,
total
:
16
}
const
printContent
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
}
const
columns
=
[
const
columns
=
[
{
{
title
:
"User Name"
,
dataIndex
:
'saferName'
,},
title
:
"username"
,
{
title
:
"Service Community"
,
dataIndex
:
'projectName'
,
},
dataIndex
:
'name'
,
{
title
:
"Job Title"
,
dataIndex
:
'cdkCode'
,
},
key
:
'name'
,
{
title
:
"User Status"
,
dataIndex
:
'cdkStatus'
,},
},
{
title
:
"project"
,
dataIndex
:
'age'
,
key
:
'age'
,
},
{
title
:
"unit"
,
dataIndex
:
'address'
,
key
:
'address'
,
},
{
title
:
"status"
,
dataIndex
:
'address'
,
key
:
'address'
,
},
{
title
:
"submissionTime"
,
dataIndex
:
'address'
,
key
:
'address'
,
},
{
{
title
:
"actions"
,
title
:
"actions"
,
key
:
'action'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
<
Space
size=
"middle"
>
<
a
>
Detail
</
a
></
Space
>
<
a
>
详情
</
a
>
|
<
a
>
编辑
</
a
>
</
Space
>
),
),
},
},
];
];
...
@@ -74,21 +67,22 @@ const Template = () => {
...
@@ -74,21 +67,22 @@ const Template = () => {
</
div
>
</
div
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1item1
}
>
Company Name
</
div
>
<
div
className=
{
styles
.
box1item1
}
>
Company Name
</
div
>
<
div
className=
{
styles
.
box1item2
}
>
Free Limited
</
div
>
<
div
className=
{
styles
.
box1item2
}
>
{
CurData
.
providerName
}
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2item1
}
>
Office Address
</
div
>
<
div
className=
{
styles
.
box2item1
}
>
Office Address
</
div
>
<
div
className=
{
styles
.
box2item2
}
>
Albert Street, 175, Singapore, Albert, Bugis, Victoria Street,
</
div
>
<
div
className=
{
styles
.
box2item2
}
>
{
CurData
.
providerAddress
}
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
box3
}
>
<
div
className=
{
styles
.
box3
}
>
<
div
className=
{
styles
.
box3item1
}
>
Person In Charge
</
div
>
<
div
className=
{
styles
.
box3item1
}
>
Person In Charge
</
div
>
<
div
className=
{
styles
.
box3item2
}
>
Bellamy
</
div
>
<
div
className=
{
styles
.
box3item2
}
>
{
CurData
.
contactName
}
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4item1
}
>
Contact Details
</
div
>
<
div
className=
{
styles
.
box4item1
}
>
Contact Details
</
div
>
<
div
className=
{
styles
.
box4item2
}
>
18205462231 371712650@qq.com
</
div
>
<
div
className=
{
styles
.
box4item2
}
>
{
CurData
.
contactPhone
}
{
CurData
.
contactEmail
}
</
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
box5
}
>
<
div
className=
{
styles
.
box5
}
>
...
@@ -104,8 +98,9 @@ const Template = () => {
...
@@ -104,8 +98,9 @@ const Template = () => {
<
div
className=
{
styles
.
box1item1
}
>
Security Guard Account
</
div
>
<
div
className=
{
styles
.
box1item1
}
>
Security Guard Account
</
div
>
</
div
>
</
div
>
</
div
>
</
div
>
{
/* 列表组件 */
}
<
ShowOptions
list=
{
[
'小区'
]
}
onSubmit=
{
printContent
}
/>
<
Table
style=
{
{
marginTop
:
16
}
}
dataSource=
{
dataSource
}
columns=
{
columns
}
pagination=
{
pagination
}
/>
<
Table
rowKey=
{
"id"
}
style=
{
{
marginTop
:
16
}
}
dataSource=
{
CurDataFollow
}
columns=
{
columns
}
pagination=
{
pagination
}
/>
<
Button
>
Cancellation
</
Button
>
<
Button
>
Cancellation
</
Button
>
...
@@ -113,5 +108,12 @@ const Template = () => {
...
@@ -113,5 +108,12 @@ const Template = () => {
);
);
};
};
function
mapStateToProps
(
state
:
any
)
{
export
default
Template
;
const
{
Data
,
CurData
,
CurDataFollow
}
=
state
.
ServiceProvider
;
\ No newline at end of file
return
{
Data
,
CurData
,
CurDataFollow
,
};
}
export
default
connect
(
mapStateToProps
)(
Detail
);
\ No newline at end of file
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
View file @
81689003
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./Edit.less'
;
import
styles
from
'./Edit.less'
;
import
{
Input
,
Button
,
Form
,
Result
,
Pagination
,
Tooltip
,
Checkbox
}
from
'antd'
;
import
{
Input
,
Button
,
Form
,
Result
,
Pagination
,
Tooltip
,
Checkbox
}
from
'antd'
;
...
@@ -8,32 +8,35 @@ import SelectOptions from '../../../components/SelectOptions/index';
...
@@ -8,32 +8,35 @@ import SelectOptions from '../../../components/SelectOptions/index';
const
Edit
=
(
props
:
any
)
=>
{
const
Edit
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data
}
=
props
;
const
{
dispatch
,
CurData
,
location
}
=
props
;
const
getByProviderName
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/getByProviderName'
,
playload
:
values
})
};
const
req_1001
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/model_1003'
,
playload
:
values
})
};
const
ServiceProviderCreate
=
(
values
:
any
)
=>
{
const
[
createFlag
,
setCreateFlag
]
=
useState
(
true
);
dispatch
({
type
:
'ServiceProvider/create'
,
playload
:
values
});
};
const
goToReturn
=
()
=>
{
history
.
back
()
}
const
printContent
=
(
comment
:
any
)
=>
{
const
formRef
=
useRef
(
null
);
console
.
log
(
comment
)
}
useEffect
(()
=>
{
if
(
location
.
query
.
providerName
!=
null
)
{
setCreateFlag
(
false
)
getByProviderName
({
providerName
:
location
.
query
.
providerName
})
}
},
[]);
useEffect
(()
=>
{
if
(
createFlag
==
false
){
formRef
.
current
.
setFieldsValue
(
CurData
)
}
},
[
CurData
]);
const
onFinish
=
(
values
:
any
)
=>
{
ServiceProviderCreate
(
values
)
console
.
log
(
'Success:'
,
values
);
};
const
goToReturn
=
()
=>
{
history
.
back
()}
const
printContent
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)}
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
req_1001
(
values
)};
console
.
log
(
'Failed:'
,
errorInfo
);
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
console
.
log
(
'Failed:'
,
errorInfo
)
};
};
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
...
@@ -44,18 +47,17 @@ const printContent = (comment: any)=>{
...
@@ -44,18 +47,17 @@ const printContent = (comment: any)=>{
<
button
className=
{
styles
.
item3
}
onClick=
{
goToReturn
}
>
返回
</
button
>
<
button
className=
{
styles
.
item3
}
onClick=
{
goToReturn
}
>
返回
</
button
>
</
div
>
</
div
>
<
Form
name=
"basic"
initialValues=
{
{}
}
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
Form
ref=
{
formRef
}
name=
"basic"
initialValues=
{
{}
}
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1item1
}
>
Company Name
</
div
>
<
div
className=
{
styles
.
box1item1
}
>
Company Name
</
div
>
<
div
className=
{
styles
.
box1item2
}
><
Form
.
Item
name=
"
company
Name"
><
Input
style=
{
{
width
:
260
}
}
placeholder=
"Please enter company name"
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box1item2
}
><
Form
.
Item
name=
"
provider
Name"
><
Input
style=
{
{
width
:
260
}
}
placeholder=
"Please enter company name"
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box1item3
}
>
Office Address
</
div
>
<
div
className=
{
styles
.
box1item3
}
>
Office Address
</
div
>
<
div
className=
{
styles
.
box1item4
}
><
Form
.
Item
name=
"
a
ddress"
><
Input
style=
{
{
width
:
200
}
}
placeholder=
"Single Line Input"
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box1item4
}
><
Form
.
Item
name=
"
providerA
ddress"
><
Input
style=
{
{
width
:
200
}
}
placeholder=
"Single Line Input"
/></
Form
.
Item
></
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
line
}
></
div
>
<
div
className=
{
styles
.
line
}
></
div
>
<
SelectOptions
list=
{
[
"
美国"
,
"美丽的"
,
"美好"
,
"加拿大"
,
"加油"
,
"XO"
].
sort
()
}
onSubmit=
{
printContent
}
/>
<
SelectOptions
list=
{
[
"
小区A"
,
].
sort
()
}
onSubmit=
{
printContent
}
/>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2item1
}
>
Services Available
</
div
>
<
div
className=
{
styles
.
box2item1
}
>
Services Available
</
div
>
...
@@ -64,13 +66,13 @@ const printContent = (comment: any)=>{
...
@@ -64,13 +66,13 @@ const printContent = (comment: any)=>{
<
div
className=
{
styles
.
box3
}
>
<
div
className=
{
styles
.
box3
}
>
<
div
className=
{
styles
.
box3item1
}
>
Person In Charge
</
div
>
<
div
className=
{
styles
.
box3item1
}
>
Person In Charge
</
div
>
<
div
className=
{
styles
.
box3item2
}
><
Form
.
Item
name=
"
n
ame"
><
Input
style=
{
{
width
:
200
}
}
placeholder=
"Please enter a name"
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box3item2
}
><
Form
.
Item
name=
"
contactN
ame"
><
Input
style=
{
{
width
:
200
}
}
placeholder=
"Please enter a name"
/></
Form
.
Item
></
div
>
</
div
>
</
div
>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4item1
}
>
Contact Details
</
div
>
<
div
className=
{
styles
.
box4item1
}
>
Contact Details
</
div
>
<
div
className=
{
styles
.
box4item2
}
><
Form
.
Item
name=
"
p
hone"
><
Input
style=
{
{
width
:
200
}
}
placeholder=
"Telephone"
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box4item2
}
><
Form
.
Item
name=
"
contactP
hone"
><
Input
style=
{
{
width
:
200
}
}
placeholder=
"Telephone"
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box4item3
}
><
Form
.
Item
name=
"
mailbox
"
><
Input
style=
{
{
width
:
200
}
}
placeholder=
"E-mail"
/></
Form
.
Item
></
div
>
<
div
className=
{
styles
.
box4item3
}
><
Form
.
Item
name=
"
contactEmail
"
><
Input
style=
{
{
width
:
200
}
}
placeholder=
"E-mail"
/></
Form
.
Item
></
div
>
</
div
>
</
div
>
...
@@ -85,9 +87,9 @@ const printContent = (comment: any)=>{
...
@@ -85,9 +87,9 @@ const printContent = (comment: any)=>{
};
};
function
mapStateToProps
(
state
:
any
)
{
function
mapStateToProps
(
state
:
any
)
{
const
{
Data
}
=
state
.
ServiceProvider
;
const
{
Cur
Data
}
=
state
.
ServiceProvider
;
return
{
return
{
Data
CurData
};
};
}
}
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
81689003
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./index.less'
;
import
styles
from
'./index.less'
;
import
{
Input
,
Menu
,
Table
,
Space
}
from
'antd'
;
import
{
Form
,
Input
,
Menu
,
Table
,
Space
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
const
dataSource
=
[
{
key
:
'1'
,
name
:
'胡彦斌'
,
age
:
32
,
address
:
'西湖区湖底公园1号'
,
},
];
const
ServiceProviderManagement
=
(
props
:
any
)
=>
{
const
ServiceProviderManagement
=
(
props
:
{
location
:
any
;
})
=>
{
const
{
formatMessage
}
=
useIntl
();
const
{
formatMessage
}
=
useIntl
();
const
{
location
}
=
props
;
const
{
dispatch
,
location
,
Data
}
=
props
;
const
goToDetail
=
()
=>
{
const
get
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/get'
,
playload
:
values
})};
history
.
push
(
location
.
pathname
+
'/Detail'
)
useEffect
(()
=>
{
get
(
null
)
},
[]);
const
formRef
=
useRef
(
null
);
const
onFinish
=
(
values
:
any
)
=>
{
get
(
values
)};
const
onFinishFailed
=
(
errorInfo
:
any
)
=>
{
console
.
log
(
'Failed:'
,
errorInfo
)
};
const
goToDetail
=
(
values
:
any
,
e
:
any
)
=>
{
history
.
push
(
location
.
pathname
+
'/Detail?providerName='
+
values
.
providerName
)
}
}
const
goToEdit
=
()
=>
{
const
goToCreate
=
()
=>
{
history
.
push
(
location
.
pathname
+
'/Edit'
)
history
.
push
(
location
.
pathname
+
'/Edit'
)
}
const
goToEdit
=
(
values
:
any
,
e
:
any
)
=>
{
history
.
push
(
location
.
pathname
+
'/Edit?providerName='
+
values
.
providerName
)
}
}
const
goToServices
=
()
=>
{
history
.
push
(
location
.
pathname
+
'/Services'
)}
const
goToServices
=
()
=>
{
history
.
push
(
location
.
pathname
+
'/Services'
)}
const
nameofowner
=
formatMessage
({
id
:
'R.charge.input.nameofowner'
})
const
inputProject
=
formatMessage
({
id
:
'R.charge.input.project'
})
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"
]
const
[
display
,
setDisplay
]
=
useState
(
"A"
);
//小组件:线框
const
pagination
=
{
defaultCurrent
:
1
,
total
:
16
}
const
pagination
=
{
defaultCurrent
:
1
,
total
:
16
}
const
columns
=
[
const
columns
=
[
{
{
title
:
"Service Provider"
,
dataIndex
:
'providerName'
,},
title
:
username
,
{
title
:
"Contacts"
,
dataIndex
:
'contactPhone'
,},
dataIndex
:
'name'
,
{
title
:
"Contact Details"
,
dataIndex
:
'contactEmail'
,},
key
:
'name'
,
{
title
:
"Services Available"
,
dataIndex
:
'enable'
,},
},
{
title
:
"Account Status"
,
dataIndex
:
'enable'
,},
{
{
title
:
"Actions"
,
title
:
project
,
dataIndex
:
'age'
,
key
:
'age'
,
},
{
title
:
unit
,
dataIndex
:
'address'
,
key
:
'address'
,
},
{
title
:
status
,
dataIndex
:
'address'
,
key
:
'address'
,
},
{
title
:
submissionTime
,
dataIndex
:
'address'
,
key
:
'address'
,
},
{
title
:
actions
,
key
:
'action'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
<
Space
size=
"middle"
><
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Detail
</
a
><
a
onClick=
{
goToEdit
.
bind
(
this
,
record
)
}
>
edit
</
a
></
Space
>
<
a
onClick=
{
goToDetail
}
>
详情
</
a
>
|
<
a
onClick=
{
goToDetail
}
>
编辑
</
a
>
</
Space
>
),
),
},
},
];
];
const
dataSource
=
(
values
:
any
)
=>
{
let
tmp
=
values
;
for
(
let
items
in
tmp
)
{
switch
(
tmp
[
items
].
enable
)
{
case
0
:
tmp
[
items
].
enable
=
"unregistered"
;
break
;
case
1
:
tmp
[
items
].
enable
=
"registered"
;
break
;
case
2
:
break
;
}
}
return
tmp
;
}
const
printContent
=
(
comment
:
any
)
=>
{
const
printContent
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
console
.
log
(
comment
)
}
}
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
{
/* 头部组件 */
}
<
div
className=
{
styles
.
box
}
>
<
input
className=
{
styles
.
item1
}
placeholder=
{
nameofowner
}
/>
<
Form
ref=
{
formRef
}
name=
"basic"
initialValues=
{
{}
}
onFinish=
{
onFinish
}
onFinishFailed=
{
onFinishFailed
}
>
</
div
>
<
div
className=
{
styles
.
box
}
><
Form
.
Item
name=
"providerName"
><
Input
style=
{
{
width
:
200
}
}
placeholder=
"Service Provider"
/></
Form
.
Item
><
/
div
>
<
SelectOptions
list=
{
[
"美国"
,
"美丽的"
,
"美好"
,
"加拿大"
,
"加油"
,
"XO"
].
sort
()
}
onSubmit=
{
printContent
}
/>
<
SelectOptions
list=
{
[
"美国"
,
"美丽的"
,
"美好"
,
"加拿大"
,
"加油"
,
"XO"
].
sort
()
}
onSubmit=
{
printContent
}
/>
<
button
className=
{
styles
.
item3
}
>
{
search
}
</
button
>
<
Form
.
Item
><
button
className=
{
styles
.
item3
}
>
Search
</
button
></
Form
.
Item
>
</
Form
>
{
/* 内容组件 */
}
{
/* 内容组件 */
}
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2
}
>
<
button
className=
{
styles
.
buttonAdd2
}
onClick=
{
goToServices
}
>
Avail Services
</
button
>
<
button
className=
{
styles
.
buttonAdd2
}
onClick=
{
goToServices
}
>
Avail Services
</
button
>
<
button
className=
{
styles
.
buttonAdd
}
onClick=
{
goTo
Edit
}
>
Create New
</
button
>
<
button
className=
{
styles
.
buttonAdd
}
onClick=
{
goTo
Create
}
>
Create New
</
button
>
</
div
>
</
div
>
{
/* 列表组件 */
}
{
/* 列表组件 */
}
<
Table
s
tyle=
{
{
marginTop
:
16
}
}
dataSource=
{
dataSource
}
columns=
{
columns
}
pagination=
{
pagination
}
/>
<
Table
s
ize=
"small"
rowKey=
{
"id"
}
style=
{
{
marginTop
:
16
}
}
columns=
{
columns
}
dataSource=
{
Data
.
data
!=
null
?
dataSource
(
Data
.
data
.
rows
):
null
}
pagination=
{
pagination
}
/>
</
div
>
</
div
>
);
);
};
};
function
mapStateToProps
(
state
:
any
)
{
const
{
Data
}
=
state
.
ServiceProvider
;
return
{
Data
};
}
export
default
(
ServiceProviderManagement
);
export
default
connect
(
mapStateToProps
)
(
ServiceProviderManagement
);
src/services/PropertyManagementServices.ts
0 → 100644
View file @
81689003
import
request
from
'@/utils/request'
;
export
function
get
(
values
:
any
)
{
console
.
log
(
values
)
return
request
(
'/tos/tosPropertyFee/get'
,{
method
:
'POST'
,
body
:
JSON
.
stringify
(
values
),
headers
:{
'Content-Type'
:
'application/json'
}})
}
\ No newline at end of file
src/services/ServiceProviderServices.ts
View file @
81689003
...
@@ -5,3 +5,22 @@ export function create(values: any) {
...
@@ -5,3 +5,22 @@ export function create(values: any) {
console
.
log
(
values
)
console
.
log
(
values
)
return
request
(
'/api/ServiceProvider/create'
,{
method
:
'POST'
,
body
:
JSON
.
stringify
(
values
),
headers
:{
'Content-Type'
:
'application/json'
}})
return
request
(
'/api/ServiceProvider/create'
,{
method
:
'POST'
,
body
:
JSON
.
stringify
(
values
),
headers
:{
'Content-Type'
:
'application/json'
}})
}
}
export
function
service_1001
(
values
:
any
)
{
console
.
log
(
values
)
return
request
(
'/api/ServiceProvider/get'
,{
method
:
'POST'
,
body
:
JSON
.
stringify
(
values
),
headers
:{
'Content-Type'
:
'application/json'
}})
}
export
function
service_1002
(
values
:
any
)
{
console
.
log
(
values
)
return
request
(
'/api/ServiceProvider/getById'
,{
method
:
'POST'
,
body
:
JSON
.
stringify
(
values
),
headers
:{
'Content-Type'
:
'application/json'
}})
}
export
function
get
(
values
:
any
)
{
console
.
log
(
values
)
return
request
(
'/tos/tosServiceProvider/get'
,{
method
:
'POST'
,
body
:
JSON
.
stringify
(
values
),
headers
:{
'Content-Type'
:
'application/json'
}})
}
export
function
getSecurityGuarder
(
values
:
any
)
{
console
.
log
(
values
)
return
request
(
'/tos/securityGuarder/get'
,{
method
:
'POST'
,
body
:
JSON
.
stringify
(
values
),
headers
:{
'Content-Type'
:
'application/json'
}})
}
\ No newline at end of file
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