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
2e1f9cf7
Commit
2e1f9cf7
authored
Apr 27, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
楼顶去空
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
4ad66726
Changes
59
Hide whitespace changes
Inline
Side-by-side
Showing
59 changed files
with
1948 additions
and
2322 deletions
+1948
-2322
config.ts
config/config.ts
+23
-8
package.json
package.json
+30
-30
favicon.ico
public/favicon.ico
+0
-0
PdfUpload.tsx
src/components/Form/PdfUpload.tsx
+30
-15
ZipCode.tsx
src/components/Form/ZipCode.tsx
+3
-3
SearchOptions.jsx
src/components/SearchOptions/SearchOptions.jsx
+2
-2
SearchOptionsTow.tsx
src/components/SearchOptions/SearchOptionsTow.tsx
+2
-2
TableShow.tsx
src/components/TableShow/TableShow.tsx
+5
-7
TreeAction.tsx
src/components/TreeAction/TreeAction.tsx
+1
-1
menu.ts
src/locales/en-US/menu.ts
+5
-4
menu.ts
src/locales/zh-CN/menu.ts
+3
-2
CommunityService.ts
src/models/CommunityManagement/CommunityService.ts
+31
-13
FacilityBookings.ts
src/models/CommunityManagement/FacilityBookings.ts
+1
-1
communityNotice.ts
src/models/communityNotice.ts
+91
-83
AccountManagement.tsx
...AccountManagement/AccountManagement/AccountManagement.tsx
+85
-66
service.tsx
src/pages/AccountManagement/Service/service.tsx
+2
-2
serviceDetail.tsx
src/pages/AccountManagement/Service/serviceDetail.tsx
+1
-1
serviceEdit.tsx
src/pages/AccountManagement/Service/serviceEdit.tsx
+2
-2
Card.tsx
src/pages/CommercialService/Card.tsx
+8
-6
CardAdd.tsx
src/pages/CommercialService/CardAdd.tsx
+2
-10
CardDetail.tsx
src/pages/CommercialService/CardDetail.tsx
+169
-50
Detail.tsx
src/pages/CommercialService/Detail.tsx
+4
-2
MoveOutDetail.tsx
src/pages/CommercialService/MoveOutDetail.tsx
+281
-0
PropertyServices.tsx
src/pages/CommercialService/PropertyServices.tsx
+16
-5
Renovation.tsx
src/pages/CommercialService/Renovation.tsx
+148
-37
RenovationDetail.tsx
src/pages/CommercialService/RenovationDetail.tsx
+13
-8
Detail.less
src/pages/CommercialService/css/Detail.less
+174
-169
Adds.tsx
src/pages/CommunityManagement/CellList/Adds.tsx
+5
-5
Adds3.tsx
src/pages/CommunityManagement/CellList/Adds3.tsx
+0
-666
CellList.tsx
src/pages/CommunityManagement/CellList/CellList.tsx
+3
-3
Details.tsx
src/pages/CommunityManagement/CellList/Details.tsx
+9
-10
Add.tsx
src/pages/CommunityManagement/CommunityAnnouncement/Add.tsx
+1
-1
CommunityAnnouncement.tsx
...anagement/CommunityAnnouncement/CommunityAnnouncement.tsx
+1
-1
Detail copy.tsx
...CommunityManagement/CommunityAnnouncement/Detail copy.tsx
+1
-1
Detail.tsx
...ages/CommunityManagement/CommunityAnnouncement/Detail.tsx
+1
-1
BookingDetail.tsx
...es/CommunityManagement/FacilityBookings/BookingDetail.tsx
+3
-2
Bookings.tsx
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
+5
-5
Facility.tsx
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
+1
-1
FacilityBookings.tsx
...CommunityManagement/FacilityBookings/FacilityBookings.tsx
+2
-2
FacilityTow.tsx
...ages/CommunityManagement/FacilityBookings/FacilityTow.tsx
+1
-1
VisitorRecord.tsx
...pages/CommunityManagement/VisitorRecord/VisitorRecord.tsx
+1
-1
VisitorRecord.tsx
...pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
+1
-1
Contract.tsx
src/pages/ContractManagement/Contract.tsx
+19
-19
ContractContent copy.tsx
src/pages/ContractManagement/ContractContent copy.tsx
+0
-549
ContractContent.tsx
src/pages/ContractManagement/ContractContent.tsx
+139
-76
ContractDetail.tsx
src/pages/ContractManagement/ContractDetail.tsx
+114
-60
Order.tsx
src/pages/OrderManagement/Order.tsx
+64
-42
OrderManagement.tsx
src/pages/OrderManagement/OrderManagement.tsx
+321
-264
ChargeManager.tsx
src/pages/PropertyManagement/ChargeManager.tsx
+1
-1
Users.tsx
src/pages/UserManagement/LIFEUserManagement/Users.tsx
+6
-1
UsersAdd.tsx
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
+12
-5
UsersDetail.tsx
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
+3
-1
AccoutingContent.tsx
...Management/ServiceProviderManagement/AccoutingContent.tsx
+1
-1
Detail.tsx
...pages/UserManagement/ServiceProviderManagement/Detail.tsx
+2
-2
Edit.tsx
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
+1
-1
Template.tsx
src/pages/template/小区公告添加/Template.tsx
+64
-39
Template.tsx
src/pages/template/服务商详情/Template.tsx
+24
-24
params.ts
src/utils/params.ts
+4
-1
power.js
src/utils/power.js
+6
-6
No files found.
config/config.ts
View file @
2e1f9cf7
/*
* @Author: your name
* @Date: 2020-12-01 18:40:06
* @LastEditTime: 2021-0
3-03 15:04:15
* @LastEditTime: 2021-0
4-26 17:35:57
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\config\config.ts
...
...
@@ -19,6 +19,7 @@ export default defineConfig({
dva
:
{
hmr
:
true
,
},
favicon
:
'favicon.ico'
,
locale
:
{
// default zh-CN //zh-CN
default
:
'en-US'
,
...
...
@@ -26,6 +27,7 @@ export default defineConfig({
antd
:
true
,
baseNavigator
:
true
,
},
// ssr: {},
dynamicImport
:
{
loading
:
'@/components/PageLoading/index'
,
},
...
...
@@ -231,19 +233,31 @@ export default defineConfig({
{
path
:
'./Edit'
,
component
:
'./CommercialService/Detail'
},
],
},
// 4-21 去除保质期服务
// {
// path: './ShelfLifeService',
// name: 'shelflifeservice',
// routes: [
// { path: './', component: './CommercialService/PropertyServices' },
// { path: './Detail', component: './CommercialService/Detail' },
// { path: './Edit', component: './CommercialService/Detail' },
// ],
// },
// 4-21 新增迁出申请
{
path
:
'./
ShelfLifeService
'
,
name
:
'
shelflifeservice
'
,
path
:
'./
MoveOut
'
,
name
:
'
moveout
'
,
routes
:
[
{
path
:
'./'
,
component
:
'./CommercialService/PropertyServices'
},
{
path
:
'./Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./Edit'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./'
,
component
:
'./CommercialService/Renovation'
},
{
path
:
'./Detail/:id'
,
component
:
'./CommercialService/MoveOutDetail'
},
],
},
// ------共享编辑与详情-------
{
path
:
'./OwnerComplaints/Detail'
,
component
:
'./CommercialService/Detail'
},
{
path
:
'./OwnerComplaints/Edit'
,
component
:
'./CommercialService/Detail'
},
],
},
// 2-21 暂无订单功能 取消
// {
// path: '/OrderManagement',
// name: 'ordermanagement',
...
...
@@ -256,8 +270,8 @@ export default defineConfig({
icon
:
'SwitcherOutlined'
,
routes
:
[
{
path
:
'./'
,
component
:
'./ContractManagement/Contract'
},
{
path
:
'./Detail'
,
component
:
'./ContractManagement/ContractDetail'
},
{
path
:
'./Edit'
,
component
:
'./ContractManagement/ContractContent'
},
{
path
:
'./Detail
/:id
'
,
component
:
'./ContractManagement/ContractDetail'
},
{
path
:
'./Edit
/:id
'
,
component
:
'./ContractManagement/ContractContent'
},
{
path
:
'./Add'
,
component
:
'./ContractManagement/ContractContent'
,
...
...
@@ -405,6 +419,7 @@ export default defineConfig({
name
:
'companyinformation'
,
component
:
'./AccountManagement/CompanyInformation/CompanyInformation'
,
},
// 3-21 去除语言切换
// {
// path: './LanguageSettings',
// name: 'languagesettings',
...
...
package.json
View file @
2e1f9cf7
...
...
@@ -45,66 +45,66 @@
"not ie <= 10"
],
"dependencies"
:
{
"
@ant-design/icons
"
:
"
^4.
0.0
"
,
"
@ant-design/icons
"
:
"
^4.
6.2
"
,
"
@ant-design/pro-layout
"
:
"
^5.0.16
"
,
"
@ant-design/pro-table
"
:
"
2.3.4
"
,
"
@bundled-es-modules/pdfjs-dist
"
:
"
^2.2.228-alpha1
"
,
"
antd
"
:
"
4.7.3
"
,
"
axios
"
:
"
^0.21.
0
"
,
"
classnames
"
:
"
^2.
2.6
"
,
"
axios
"
:
"
^0.21.
1
"
,
"
classnames
"
:
"
^2.
3.1
"
,
"
js-export-excel
"
:
"
^1.1.2
"
,
"
js-file-download
"
:
"
^0.4.12
"
,
"
lodash
"
:
"
^4.17.
1
1
"
,
"
lodash
"
:
"
^4.17.
2
1
"
,
"
moment
"
:
"
^2.25.3
"
,
"
omit.js
"
:
"
^1.0.2
"
,
"
path-to-regexp
"
:
"
2.4.0
"
,
"
pdfjs
"
:
"
^2.
3.9
"
,
"
qs
"
:
"
^6.
9.4
"
,
"
pdfjs
"
:
"
^2.
4.3
"
,
"
qs
"
:
"
^6.
10.1
"
,
"
react
"
:
"
^16.8.6
"
,
"
react-dom
"
:
"
^16.8.6
"
,
"
react-helmet-async
"
:
"
^1.0.4
"
,
"
react-pdf
"
:
"
^5.0.0
"
,
"
react-file-viewer
"
:
"
^1.2.1
"
,
"
react-helmet-async
"
:
"
^1.0.9
"
,
"
react-pdf
"
:
"
^5.2.0
"
,
"
react-pdf-js
"
:
"
^5.1.0
"
,
"
react-persist
"
:
"
^1.0.2
"
,
"
react-file-viewer
"
:
"
^1.2.1
"
,
"
redux-persist
"
:
"
^6.0.0
"
,
"
umi
"
:
"
^3.
1.2
"
,
"
umi
"
:
"
^3.
4.11
"
,
"
umi-request
"
:
"
^1.0.8
"
,
"
use-merge-value
"
:
"
^1.0.1
"
},
"devDependencies"
:
{
"
@ant-design/pro-cli
"
:
"
^1.0.
1
8
"
,
"
@types/classnames
"
:
"
^2.
2.7
"
,
"
@types/express
"
:
"
^4.17.
0
"
,
"
@ant-design/pro-cli
"
:
"
^1.0.
2
8
"
,
"
@types/classnames
"
:
"
^2.
3.1
"
,
"
@types/express
"
:
"
^4.17.
11
"
,
"
@types/history
"
:
"
^4.7.2
"
,
"
@types/jest
"
:
"
^26.0.
0
"
,
"
@types/lodash
"
:
"
^4.14.1
44
"
,
"
@types/qs
"
:
"
^6.
5.3
"
,
"
@types/react
"
:
"
^16.
9.17
"
,
"
@types/react-dom
"
:
"
^16.
8.4
"
,
"
@types/jest
"
:
"
^26.0.
22
"
,
"
@types/lodash
"
:
"
^4.14.1
68
"
,
"
@types/qs
"
:
"
^6.
9.6
"
,
"
@types/react
"
:
"
^16.
14.5
"
,
"
@types/react-dom
"
:
"
^16.
9.12
"
,
"
@types/react-helmet
"
:
"
^5.0.13
"
,
"
@umijs/fabric
"
:
"
^2.
0.5
"
,
"
@umijs/plugin-blocks
"
:
"
^2.
0.5
"
,
"
@umijs/fabric
"
:
"
^2.
5.7
"
,
"
@umijs/plugin-blocks
"
:
"
^2.
2.2
"
,
"
@umijs/preset-ant-design-pro
"
:
"
^1.2.0
"
,
"
@umijs/preset-react
"
:
"
^1.
4.8
"
,
"
@umijs/preset-ui
"
:
"
^2.
0
.9
"
,
"
@umijs/preset-react
"
:
"
^1.
8.6
"
,
"
@umijs/preset-ui
"
:
"
^2.
2
.9
"
,
"
carlo
"
:
"
^0.9.46
"
,
"
chalk
"
:
"
^4.
0.0
"
,
"
cross-env
"
:
"
^7.0.
2
"
,
"
cross-port-killer
"
:
"
^1.
1.1
"
,
"
chalk
"
:
"
^4.
1.1
"
,
"
cross-env
"
:
"
^7.0.
3
"
,
"
cross-port-killer
"
:
"
^1.
3.0
"
,
"
detect-installer
"
:
"
^1.0.1
"
,
"
enzyme
"
:
"
^3.11.0
"
,
"
eslint
"
:
"
^7.
1
.0
"
,
"
eslint
"
:
"
^7.
24
.0
"
,
"
express
"
:
"
^4.17.1
"
,
"
gh-pages
"
:
"
^3.0.0
"
,
"
husky
"
:
"
^4.
0.7
"
,
"
husky
"
:
"
^4.
3.8
"
,
"
jsdom-global
"
:
"
^3.0.2
"
,
"
lint-staged
"
:
"
^10.
0.0
"
,
"
lint-staged
"
:
"
^10.
5.4
"
,
"
mockjs
"
:
"
^1.0.1-beta3
"
,
"
prettier
"
:
"
^2.
0
.1
"
,
"
prettier
"
:
"
^2.
2
.1
"
,
"
pro-download
"
:
"
1.0.1
"
,
"
puppeteer-core
"
:
"
^3.0.0
"
,
"
stylelint
"
:
"
^13.
0
.0
"
"
stylelint
"
:
"
^13.
12
.0
"
},
"engines"
:
{
"node"
:
">=10.0.0"
...
...
public/favicon.ico
0 → 100644
View file @
2e1f9cf7
4.19 KB
src/components/Form/PdfUpload.tsx
View file @
2e1f9cf7
/*
* @Author: your name
* @Date: 2021-02-01 14:54:48
* @LastEditTime: 2021-0
3-03 10:08
:06
* @LastEditTime: 2021-0
4-26 15:14
:06
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\Form\PdfUpload.tsx
*/
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Input
,
Upload
,
message
,
Button
,
Modal
,
Pagination
}
from
'antd'
;
import
{
Input
,
Upload
,
message
,
Button
,
Modal
,
Pagination
,
Spin
}
from
'antd'
;
import
{
LoadingOutlined
,
PlusOutlined
,
...
...
@@ -15,8 +15,9 @@ import {
FilePdfOutlined
,
}
from
'@ant-design/icons'
;
import
PDF
from
'react-pdf-js'
;
import
{
Document
,
Page
}
from
'react-pdf'
;
import
{
pdfjs
}
from
'react-pdf'
;
pdfjs
.
GlobalWorkerOptions
.
workerSrc
=
`//cdnjs.cloudflare.com/ajax/libs/pdf.js/
${
pdfjs
.
version
}
/pdf.worker.min.js`
;
import
'./zip.less'
;
interface
PriceInputProps
{
detailvalue
?:
any
;
...
...
@@ -237,7 +238,7 @@ const PdfUpload: React.FC<PriceInputProps> = ({
// 点击预览
const
handlePreview
=
async
(
file
:
any
)
=>
{
// console.log(file);
setPdfUrl
(
file
);
setPdfUrl
(
{
...
file
}
);
setModalVisible
(
true
);
};
...
...
@@ -276,8 +277,9 @@ const PdfUpload: React.FC<PriceInputProps> = ({
};
// pdf 总页数
const
onDocumentLoadSuccess
=
(
pages
:
any
)
=>
{
setNumPages
(
pages
);
const
onDocumentLoadSuccess
=
({
numPages
}:
any
)
=>
{
//numPages是总页数
setNumPages
(
numPages
);
};
// 切换pdf 总数
...
...
@@ -304,6 +306,12 @@ const PdfUpload: React.FC<PriceInputProps> = ({
onChange
&&
onChange
(
list
);
};
// 文件失效
const
onError
=
()
=>
{
message
.
error
(
'file error !'
);
setModalVisible
(
false
);
};
return
(
<>
{
imgList
.
map
((
item
:
any
,
index
:
any
)
=>
{
...
...
@@ -383,22 +391,29 @@ const PdfUpload: React.FC<PriceInputProps> = ({
<
Modal
title=
{
PdfUrl
!=
null
?
PdfUrl
.
name
:
'File Preview'
}
visible=
{
ModalVisible
}
width=
{
65
0
}
width=
{
80
0
}
onCancel=
{
handleCancel
}
style=
{
{
textAlign
:
'center'
}
}
footer=
{
null
}
>
<>
<
PDF
file=
{
PdfUrl
?
PdfUrl
.
url
:
null
}
page=
{
pageNumber
}
scale=
{
1
}
onDocumentComplete=
{
onDocumentLoadSuccess
}
/>
<
Document
file=
{
PdfUrl
?
PdfUrl
.
url
:
null
}
//文件路径
onLoadSuccess=
{
onDocumentLoadSuccess
}
//成功加载文档后调用
// onLoadError={console.error} //加载失败时调用
loading=
{
<
Spin
indicator=
{
<
LoadingOutlined
spin
/>
}
/>
}
//加载时提示语句
onLoadError=
{
onError
}
>
<
Page
key=
{
PdfUrl
?
PdfUrl
.
id
:
null
}
pageNumber=
{
pageNumber
}
//当前页页码
scale=
{
1.25
}
/>
</
Document
>
<
Pagination
style=
{
{
textAlign
:
'center'
,
marginTop
:
10
,
display
:
'block'
}
}
simple
c
urrent=
{
pageNumber
}
defaultC
urrent=
{
pageNumber
}
total=
{
numPages
*
10
}
onChange=
{
onChangePage
}
/>
...
...
src/components/Form/ZipCode.tsx
View file @
2e1f9cf7
/*
* @Author: your name
* @Date: 2021-01-30 16:16:41
* @LastEditTime: 2021-0
2-20 11:32:44
* @LastEditTime: 2021-0
4-23 18:50:35
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\Form\ZipCode.tsx
...
...
@@ -92,7 +92,7 @@ const ZipCode: React.FC<PriceInputProps> = ({
// value={value.residentialAddress || number}
onChange=
{
onNumberChange
}
style=
{
{
width
:
'360px'
}
}
placeholder=
"Please enter
community
adds"
placeholder=
"Please enter
Estate
adds"
disabled=
{
disabled
}
value=
{
details
?
details
.
residentialAddress
:
null
}
/>
...
...
@@ -105,7 +105,7 @@ const ZipCode: React.FC<PriceInputProps> = ({
// value={value.residentialName || number}
onChange=
{
onNumberChange
}
style=
{
{
marginRight
:
'10px'
,
width
:
'240px'
}
}
placeholder=
"Please enter
community
name"
placeholder=
"Please enter
Estate
name"
onBlur=
{
onblurs
}
disabled=
{
disabled
}
value=
{
details
?
details
.
residentialName
:
null
}
...
...
src/components/SearchOptions/SearchOptions.jsx
View file @
2e1f9cf7
...
...
@@ -67,7 +67,7 @@ class SearchOptions extends React.Purecomponent {
<
Select
showSearch
value=
{
this
.
state
.
value
}
placeholder=
{
'
Community
Name'
}
placeholder=
{
'
Estate
Name'
}
optionFilterProp=
"children"
filterOption=
{
(
input
,
option
)
=>
option
.
children
.
toLowerCase
().
indexOf
(
input
.
toLowerCase
())
>=
0
...
...
@@ -81,7 +81,7 @@ class SearchOptions extends React.Purecomponent {
notFoundContent=
{
<
div
>
<
Empty
image=
{
Empty
.
PRESENTED_IMAGE_SIMPLE
}
/>
Please enter the correct
Community
Name!
Please enter the correct
Estate
Name!
</
div
>
}
style=
{
{
width
:
200
}
}
...
...
src/components/SearchOptions/SearchOptionsTow.tsx
View file @
2e1f9cf7
...
...
@@ -49,7 +49,7 @@ const SearchOptionsTow = (porps: any) => {
mode=
"multiple"
autoClearSearchValue
style=
{
{
width
:
320
}
}
placeholder=
"
Community
Name"
placeholder=
"
Estate
Name"
optionFilterProp=
"children"
onChange=
{
onChange
}
value=
{
value
}
...
...
@@ -63,7 +63,7 @@ const SearchOptionsTow = (porps: any) => {
showSearch
allowClear
style=
{
{
width
:
200
}
}
placeholder=
"
Community
Name"
placeholder=
"
Estate
Name"
optionFilterProp=
"children"
onChange=
{
onChange
}
value=
{
value
}
...
...
src/components/TableShow/TableShow.tsx
View file @
2e1f9cf7
...
...
@@ -77,13 +77,11 @@ const TableShow = (props: any) => {
<
Row
gutter=
{
16
}
style=
{
{
marginLeft
:
9
}
}
>
<
Col
>
Address:
</
Col
>
<
Col
>
{
item
.
owner
.
buildingNumber
+
' #'
+
item
.
owner
.
floorNumber
+
' -'
+
item
.
owner
.
roomNumber
+
', '
+
item
.
owner
.
addressAndpostalCode
}
<
span
>
{
item
.
owner
.
buildingNumber
?
item
.
owner
.
buildingNumber
+
' #'
:
''
}
</
span
>
<
span
>
{
item
.
owner
.
floorNumber
}
-
{
item
.
owner
.
roomNumber
}
{
' , '
}
</
span
>
<
span
>
{
item
.
owner
.
addressAndpostalCode
}
</
span
>
</
Col
>
</
Row
>
{
item
.
unit
.
map
((
unit
:
any
,
uindex
:
any
)
=>
{
...
...
src/components/TreeAction/TreeAction.tsx
View file @
2e1f9cf7
...
...
@@ -144,7 +144,7 @@ const treeData = [
],
},
{
title
:
'
Community
management'
,
title
:
'
Estate
management'
,
key
:
'G'
,
children
:
[
{
title
:
'View community'
,
key
:
'20'
},
...
...
src/locales/en-US/menu.ts
View file @
2e1f9cf7
/*
* @Author: your name
* @Date: 2020-12-14 18:52:22
* @LastEditTime: 2021-0
3-31 17:33:33
* @LastEditTime: 2021-0
4-22 15:18:20
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\locales\en-US\menu.ts
...
...
@@ -64,17 +64,18 @@ export default {
'menu.usemanagement.serviceproviders'
:
'Service Provider Management'
,
'menu.propertymanagement'
:
'Property Fee Management'
,
'menu.commercialservice'
:
'Service Requests'
,
'menu.commercialservice.communitymaintenance'
:
'
Community
maintenance'
,
'menu.commercialservice.communitymaintenance'
:
'
Estate
maintenance'
,
'menu.commercialservice.ownercomplaints'
:
'Complaints'
,
'menu.commercialservice.problemfeedback'
:
'Feedback'
,
'menu.commercialservice.renovationapplication'
:
'Renovation Application'
,
'menu.commercialservice.moveout'
:
'Move Out Request'
,
'menu.commercialservice.accessCardapplication'
:
'Access Card Application'
,
'menu.commercialservice.reportonline'
:
'Report Matters'
,
'menu.commercialservice.shelflifeservice'
:
'Warranty Period Service'
,
'menu.ordermanagement'
:
'Order Management'
,
'menu.contractmanagement'
:
'Contract Management'
,
'menu.communitymanagement'
:
'
Community
Management'
,
'menu.communitymanagement.celllist'
:
'
Community
'
,
'menu.communitymanagement'
:
'
Estate
Management'
,
'menu.communitymanagement.celllist'
:
'
Estate
'
,
'menu.communitymanagement.communityannouncement'
:
'Announcements'
,
'menu.communitymanagement.facilitybookings'
:
'Facility Bookings'
,
'menu.communitymanagement.visitorrecord'
:
'Visitor Records'
,
...
...
src/locales/zh-CN/menu.ts
View file @
2e1f9cf7
/*
* @Author: your name
* @Date: 2020-12-14 18:52:22
* @LastEditTime: 2021-0
3-01 10:05:23
* @LastEditors:
your name
* @LastEditTime: 2021-0
4-21 14:56:22
* @LastEditors:
Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\locales\zh-CN\menu.ts
*/
...
...
@@ -68,6 +68,7 @@ export default {
'menu.commercialservice.ownercomplaints'
:
'业主投诉'
,
'menu.commercialservice.problemfeedback'
:
'问题反馈'
,
'menu.commercialservice.renovationapplication'
:
'装修申请'
,
'menu.commercialservice.moveout'
:
'迁出申请'
,
'menu.commercialservice.accessCardapplication'
:
'住户卡申请'
,
'menu.commercialservice.reportonline'
:
'在线报事'
,
'menu.commercialservice.shelflifeservice'
:
'保质期服务'
,
...
...
src/models/CommunityManagement/CommunityService.ts
View file @
2e1f9cf7
...
...
@@ -13,6 +13,7 @@ export default {
CurDataDetail
:
null
,
Data7
:
null
,
Data8
:
null
,
Data9
:
null
,
// 迁出申请列表
Result
:
null
,
DataSaveDetail
:
null
,
loadding
:
false
,
...
...
@@ -37,6 +38,9 @@ export default {
returnPage8
(
state
:
object
,
{
Data8
}:
any
)
{
return
{
...
state
,
Data8
};
},
returnPage9
(
state
:
object
,
{
Data9
}:
any
)
{
return
{
...
state
,
Data9
};
},
returnResult
(
state
:
object
,
{
Result
}:
any
)
{
return
{
...
state
,
Result
};
},
...
...
@@ -44,8 +48,8 @@ export default {
return
{
...
state
,
DataSaveDetail
};
},
returnLoadding
(
state
:
object
,
{
loadding
}:
{
loadding
:
boolean
})
{
return
{
...
state
,
loadding
}
}
return
{
...
state
,
loadding
}
;
}
,
},
effects
:
{
...
...
@@ -67,7 +71,7 @@ export default {
// message.error(`${resp.error_code}:${resp.error_msg}`);
// }
if
(
resp
.
error_code
!==
'0000'
)
{
message
.
error
(
`
${
resp
.
error_code
}
:
${
resp
.
error_msg
||
"unkonw error"
}
`
);
message
.
error
(
`
${
resp
.
error_code
}
:
${
resp
.
error_msg
||
'unkonw error'
}
`
);
history
.
go
(
-
1
);
}
else
{
switch
(
playload
.
index
)
{
...
...
@@ -99,7 +103,17 @@ export default {
}
=
{
community
:
tmp
.
communityName
||
tmp
.
communityName
,
address
:
tmp
.
addressAndpostalCode
||
tmp
.
residentialAddress
,
home
:
(
tmp
.
buildingNumber
||
tmp
.
communityBuild
)
+
' #'
+
(
tmp
.
floorNumber
||
tmp
.
communityFloor
)
+
'-'
+
(
tmp
.
roomNumber
||
tmp
.
communtiyRoom
),
home
:
tmp
.
buildingNumber
||
tmp
.
communityBuild
?
(
tmp
.
buildingNumber
||
tmp
.
communityBuild
)
+
' #'
+
(
tmp
.
floorNumber
||
tmp
.
communityFloor
)
+
'-'
+
(
tmp
.
roomNumber
||
tmp
.
communtiyRoom
)
:
(
tmp
.
floorNumber
||
tmp
.
communityFloor
)
+
'-'
+
(
tmp
.
roomNumber
||
tmp
.
communtiyRoom
),
name
:
tmp
.
owerName
||
tmp
.
ownerFamilyName
,
phone
:
tmp
.
owerPhone
||
tmp
.
ownerFamilyPhone
,
email
:
tmp
.
owerEmail
||
tmp
.
ownerFamilyEmail
,
...
...
@@ -119,6 +133,7 @@ export default {
case
33
:
case
34
:
case
22
:
case
76
:
// message.success('Success Operation!', 3);
history
.
go
(
-
1
);
// history.push("/CommercialService/CommunityMaintenance")
...
...
@@ -129,6 +144,12 @@ export default {
yield
put
({
type
:
'returnPage8'
,
Data8
});
}
break
;
case
74
:
{
const
Data9
=
resp
;
yield
put
({
type
:
'returnPage9'
,
Data9
});
}
break
;
case
31
:
{
const
Data7
=
resp
;
...
...
@@ -142,17 +163,14 @@ export default {
}
break
;
case
37
:
{
const
DataSaveDetail
=
resp
;
yield
put
({
type
:
'returnDataSaveDetail'
,
DataSaveDetail
});
}
break
;
case
36
:
case
75
:
{
const
DataSaveDetail
=
resp
;
yield
put
({
type
:
'returnDataSaveDetail'
,
DataSaveDetail
});
}
break
;
case
40
:
{
const
Data
=
resp
;
...
...
@@ -180,22 +198,22 @@ export default {
yield
put
({
type
:
'returnCurDataDetail'
,
CurDataDetail
});
},
*
ResultClear
({
},
{
put
}:
any
)
{
*
ResultClear
({},
{
put
}:
any
)
{
const
Result
=
null
;
yield
put
({
type
:
'returnResult'
,
Result
});
},
*
DataSaveDetailClear
({
},
{
put
}:
any
)
{
*
DataSaveDetailClear
({},
{
put
}:
any
)
{
const
DataSaveDetail
=
null
;
yield
put
({
type
:
'returnDataSaveDetail'
,
DataSaveDetail
});
},
*
DataSaveClear
({
},
{
put
}:
any
)
{
*
DataSaveClear
({},
{
put
}:
any
)
{
const
DataSave
=
null
;
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
},
*
Data7Clear
({
},
{
put
}:
any
)
{
*
Data7Clear
({},
{
put
}:
any
)
{
const
Data7
=
null
;
yield
put
({
type
:
'returnPage7'
,
Data7
});
},
...
...
src/models/CommunityManagement/FacilityBookings.ts
View file @
2e1f9cf7
...
...
@@ -129,7 +129,7 @@ export default {
if
(
JSON
.
stringify
(
Data3
)
==
'{}'
)
{
Data3
=
false
;
// 提示小区没有设施
message
.
warning
(
'There Are No Facilities In The
Community
!'
);
message
.
warning
(
'There Are No Facilities In The
Estate
!'
);
}
yield
put
({
type
:
'returnPage3'
,
Data3
});
}
...
...
src/models/communityNotice.ts
View file @
2e1f9cf7
import
{
getAllNotice
,
getAllDevice
,
saveDevice
,
delDevice
,
getDeviceNum
,
getNewAddBug
,
importUserDeviceListExcel
,
getUserDevice
,
saveUserDevice
,
getTargetKeys
,
getNewAdd
,
importUserListExcel
,
getDeviceDetails
}
from
'@/services/communityNotice'
;
import
{
getRegion
,
getRegionList
}
from
'@/services/region'
;
import
{
getAllNotice
,
getAllDevice
,
saveDevice
,
delDevice
,
getDeviceNum
,
getNewAddBug
,
importUserDeviceListExcel
,
getUserDevice
,
saveUserDevice
,
getTargetKeys
,
getNewAdd
,
importUserListExcel
,
getDeviceDetails
,
}
from
'@/services/communityNotice'
;
import
{
getRegion
,
getRegionList
}
from
'@/services/region'
;
export
default
{
export
default
{
namespace
:
'communityNoticeModel'
,
state
:
{
data
:
[],
},
effects
:
{
*
getAllNotice
({
callback
,
payload
},{
call
,
put
})
{
const
response
=
yield
call
(
getAllNotice
,
payload
);
*
getAllNotice
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getAllNotice
,
payload
);
yield
put
({
type
:
"getAll"
,
type
:
'getAll'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
*
getAllDevice
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getAllDevice
,
payload
);
*
getAllDevice
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getAllDevice
,
payload
);
yield
put
({
type
:
"getAll"
,
type
:
'getAll'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
*
getRegion
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getRegion
,
payload
);
*
getRegion
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getRegion
,
payload
);
yield
put
({
type
:
"getRegions"
,
type
:
'getRegions'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
*
saveDevice
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
saveDevice
,
payload
);
*
saveDevice
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
saveDevice
,
payload
);
yield
put
({
type
:
"save"
,
type
:
'save'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
*
delDevice
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
delDevice
,
payload
);
*
delDevice
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
delDevice
,
payload
);
yield
put
({
type
:
"del"
,
type
:
'del'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
*
getRegionList
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getRegionList
,
payload
);
*
getRegionList
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getRegionList
,
payload
);
yield
put
({
type
:
"regionList"
,
type
:
'regionList'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
*
getDeviceNum
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getDeviceNum
,
payload
);
*
getDeviceNum
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getDeviceNum
,
payload
);
yield
put
({
type
:
"num"
,
type
:
'num'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
*
getUserDevice
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getUserDevice
,
payload
);
*
getUserDevice
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getUserDevice
,
payload
);
yield
put
({
type
:
"userDevice"
,
type
:
'userDevice'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
*
saveUserDevice
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
saveUserDevice
,
payload
);
*
saveUserDevice
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
saveUserDevice
,
payload
);
yield
put
({
type
:
"userDeviceSave"
,
type
:
'userDeviceSave'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
*
getTargetKeys
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getTargetKeys
,
payload
);
*
getTargetKeys
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getTargetKeys
,
payload
);
yield
put
({
type
:
"targetKeys"
,
type
:
'targetKeys'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
*
getNewAdd
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getNewAdd
,
payload
);
*
getNewAdd
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getNewAdd
,
payload
);
yield
put
({
type
:
"newAdd"
,
type
:
'newAdd'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
*
getNewAddBug
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getNewAddBug
,
payload
);
*
getNewAddBug
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getNewAddBug
,
payload
);
yield
put
({
type
:
"newAddBug"
,
type
:
'newAddBug'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
*
importUserListExcel
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
importUserListExcel
,
payload
);
*
importUserListExcel
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
importUserListExcel
,
payload
);
yield
put
({
type
:
"importListExcel"
,
type
:
'importListExcel'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
*
importUserDeviceListExcel
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
importUserDeviceListExcel
,
payload
);
*
importUserDeviceListExcel
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
importUserDeviceListExcel
,
payload
);
yield
put
({
type
:
"importDeviceListExcel"
,
type
:
'importDeviceListExcel'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
*
getDeviceDetails
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getDeviceDetails
,
payload
);
*
getDeviceDetails
({
callback
,
payload
},
{
call
,
put
})
{
const
response
=
yield
call
(
getDeviceDetails
,
payload
);
yield
put
({
type
:
"deviceDetails"
,
type
:
'deviceDetails'
,
});
if
(
callback
)
callback
(
response
);
if
(
callback
)
callback
(
response
);
},
},
reducers
:
{
getAll
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
data
:
action
.
payload
||
{},
};
},
getRegions
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
data
:
action
.
payload
||
{},
};
},
save
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
data
:
action
.
payload
||
{},
};
},
del
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
data
:
action
.
payload
||
{},
};
},
regionList
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
data
:
action
.
payload
||
{},
};
},
num
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
data
:
action
.
payload
||
{},
};
},
userDevice
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
data
:
action
.
payload
||
{},
};
},
userDeviceSave
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
data
:
action
.
payload
||
{},
};
},
targetKeys
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
data
:
action
.
payload
||
{},
};
},
newAdd
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
data
:
action
.
payload
||
{},
};
},
newAddBug
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
data
:
action
.
payload
||
{},
};
},
importListExcel
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
data
:
action
.
payload
||
{},
};
},
importDeviceListExcel
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
data
:
action
.
payload
||
{},
};
},
deviceDetails
(
state
,
action
)
{
return
{
...
state
,
data
:
action
.
payload
||
{},
data
:
action
.
payload
||
{},
};
},
},
};
src/pages/AccountManagement/AccountManagement/AccountManagement.tsx
View file @
2e1f9cf7
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./index.less'
;
import
{
Input
,
Button
,
Table
,
Space
,
Pagination
,
Form
,
Select
,
Layout
}
from
'antd'
;
const
{
Option
}
=
Select
;
...
...
@@ -17,90 +17,109 @@ import { RA, translate } from '@/utils/method';
import
{
EyeTwoTone
,
EyeInvisibleOutlined
,
StarTwoTone
}
from
'@ant-design/icons'
;
import
{
validateMessages
}
from
'@/utils/params'
;
const
authorizeLevel
=
[
"Administrator"
,
"Secondary Administrator"
,
"Three Level Administrator"
]
const
user_state
=
[[
0
,
"enabled"
],[
1
,
"Disabled"
]]
const
module
=
"Account"
const
AccountManagement
=
(
props
:
any
)
=>
{
const
authorizeLevel
=
[
'Administrator'
,
'Secondary Administrator'
,
'Three Level Administrator'
];
const
user_state
=
[
[
0
,
'enabled'
],
[
1
,
'Disabled'
],
];
const
module
=
'Account'
;
const
AccountManagement
=
(
props
:
any
)
=>
{
const
{
dispatch
}
=
props
;
const
formRef
=
useRef
(
null
)
const
onFinish
=
(
values
:
any
)
=>
{
console
.
log
(
values
)
const
formRef
=
useRef
(
null
)
;
const
onFinish
=
(
values
:
any
)
=>
{
console
.
log
(
values
)
;
var
tmp
=
{
"id"
:
"null"
,
"oneself"
:
0
,
"userStatus"
:
1
,
"tosUserName"
:
null
,
"tosUserPwd"
:
null
,
"tosUserPhone"
:
null
,
"tosUserEmail"
:
null
,
"tosuserLevel"
:
null
,
"tosUserToCompany"
:
"1"
,
"tosUserServiceCell"
:
""
,
}
var
tmp2
=
{}
translate
(
tmp
,
values
,
[
[
"tosUserName"
,
"Account"
],
[
"tosUserPwd"
,
"Password"
],
[
"tosUserPhone"
,
"phone"
],
[
"tosUserEmail"
,
"email"
],
[
"tosuserLevel"
,
"tosuserLevel"
],
])
translate
(
tmp2
,
values
,
[
[
"userName"
,
"Account"
],
[
"userPassword"
,
"Password"
],
[
"permissionArray"
,
"premission"
],
])
RA
(
41
,
tmp
,
module
,
dispatch
)
RA
(
42
,
tmp2
,
module
,
dispatch
)
}
id
:
'null'
,
oneself
:
0
,
userStatus
:
1
,
tosUserName
:
null
,
tosUserPwd
:
null
,
tosUserPhone
:
null
,
tosUserEmail
:
null
,
tosuserLevel
:
null
,
tosUserToCompany
:
'1'
,
tosUserServiceCell
:
''
,
}
;
var
tmp2
=
{}
;
translate
(
tmp
,
values
,
[
[
'tosUserName'
,
'Account'
],
[
'tosUserPwd'
,
'Password'
],
[
'tosUserPhone'
,
'phone'
],
[
'tosUserEmail'
,
'email'
],
[
'tosuserLevel'
,
'tosuserLevel'
],
])
;
translate
(
tmp2
,
values
,
[
[
'userName'
,
'Account'
],
[
'userPassword'
,
'Password'
],
[
'permissionArray'
,
'premission'
],
])
;
RA
(
41
,
tmp
,
module
,
dispatch
)
;
RA
(
42
,
tmp2
,
module
,
dispatch
);
}
;
return
(
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件v1.2 */
}
{
/* 头部组件v1.2 */
}
<
TitleBack
title=
"Admin Account Adding"
/>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
validateMessages=
{
validateMessages
}
>
<
Form
.
Item
name=
"Account"
label=
"Account"
rules=
{
[{
required
:
true
}]
}
>
<
Input
placeholder=
"account Name"
style=
{
{
width
:
200
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"Password"
label=
"Password"
rules=
{
[{
required
:
true
}]
}
>
<
Input
.
Password
type=
""
placeholder=
"password"
iconRender=
{
(
visible
)
=>
(
visible
?
<
EyeTwoTone
/>
:
<
EyeInvisibleOutlined
/>)
}
style=
{
{
width
:
200
}
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"Contact Details"
>
<
Input
.
Group
compact
>
<
Form
.
Item
name=
"phone"
style=
{
{
marginRight
:
16
}
}
rules=
{
[{
required
:
true
}]
}
>
<
Input
placeholder=
"Phone number"
></
Input
>
</
Form
.
Item
>
<
Form
.
Item
name=
"email"
rules=
{
[{
required
:
true
}]
}
>
<
Input
placeholder=
"Email"
></
Input
>
</
Form
.
Item
>
</
Input
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
name=
"Account"
label=
"Account"
rules=
{
[{
required
:
true
}]
}
><
Input
placeholder=
"account Name"
style=
{
{
width
:
200
}
}
/></
Form
.
Item
>
<
Form
.
Item
name=
"Password"
label=
"Password"
rules=
{
[{
required
:
true
}]
}
><
Input
.
Password
type=
""
placeholder=
"password"
iconRender=
{
visible
=>
(
visible
?
<
EyeTwoTone
/>
:
<
EyeInvisibleOutlined
/>)
}
style=
{
{
width
:
200
}
}
/></
Form
.
Item
>
<
Form
.
Item
label=
"Contact Details"
>
<
Input
.
Group
compact
>
<
Form
.
Item
name=
"phone"
style=
{
{
marginRight
:
16
}
}
rules=
{
[{
required
:
true
}]
}
><
Input
placeholder=
"Phone number"
></
Input
></
Form
.
Item
>
<
Form
.
Item
name=
"email"
rules=
{
[{
required
:
true
}]
}
><
Input
placeholder=
"Email"
></
Input
></
Form
.
Item
>
</
Input
.
Group
>
<
Form
.
Item
name=
"community"
label=
"Estate"
>
<
SelectCommunity
></
SelectCommunity
>
</
Form
.
Item
>
<
Form
.
Item
name=
"community"
label=
"Community"
><
SelectCommunity
></
SelectCommunity
></
Form
.
Item
>
<
Form
.
Item
label=
"Level"
name=
"tosuserLevel"
wrapperCol=
{
{
offset
:
2
}
}
>
<
Form
.
Item
label=
"Level"
name=
"tosuserLevel"
wrapperCol=
{
{
offset
:
2
}
}
>
<
Select
placeholder=
"Level"
style=
{
{
width
:
240
}
}
>
{
authorizeLevel
.
map
((
item
,
index
)
=>
{
return
<
Option
key=
{
""
+
index
}
value=
{
""
+
index
+
1
}
>
{
item
}
</
Option
>
})
}
</
Select
>
</
Form
.
Item
>
{
authorizeLevel
.
map
((
item
,
index
)
=>
{
return
(
<
Option
key=
{
''
+
index
}
value=
{
''
+
index
+
1
}
>
{
item
}
</
Option
>
);
})
}
</
Select
>
</
Form
.
Item
>
<
Form
.
Item
name=
"premission"
label=
"Permission"
wrapperCol=
{
{
offset
:
1
}
}
>
<
TreeAction
/>
<
Form
.
Item
name=
"premission"
label=
"Permission"
wrapperCol=
{
{
offset
:
1
}
}
>
<
TreeAction
/>
</
Form
.
Item
>
<
Line
></
Line
>
<
Form
.
Item
wrapperCol=
{
{
...
Layout
.
wrapperCol
,
offset
:
3
}
}
><
Button
type=
"primary"
htmlType=
"submit"
>
Submit
</
Button
></
Form
.
Item
>
</
Form
>
<
Form
.
Item
wrapperCol=
{
{
...
Layout
.
wrapperCol
,
offset
:
3
}
}
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Submit
</
Button
>
</
Form
.
Item
>
</
Form
>
</
div
>
);
};
function
mapStateToProps
(
state
:
any
)
{
const
{
Data
}
=
state
.
Account
;
function
mapStateToProps
(
state
:
any
)
{
const
{
Data
}
=
state
.
Account
;
return
{
Data
Data
,
};
}
export
default
connect
(
mapStateToProps
)(
AccountManagement
);
src/pages/AccountManagement/Service/service.tsx
View file @
2e1f9cf7
...
...
@@ -15,7 +15,7 @@ import moment from 'moment';
const
service
=
(
props
:
any
)
=>
{
const
columns
=
[
{
title
:
'
Community
'
,
title
:
'
Estate
'
,
dataIndex
:
'communityName'
,
key
:
'communityName'
,
width
:
240
,
...
...
@@ -144,7 +144,7 @@ const service = (props: any) => {
toolBarRender=
{
false
}
scroll=
{
{
x
:
980
}
}
options=
{
false
}
headerTitle=
"
Community
List"
headerTitle=
"
Estate
List"
/>
{
Data
?
(
<
div
className=
"pages"
>
...
...
src/pages/AccountManagement/Service/serviceDetail.tsx
View file @
2e1f9cf7
...
...
@@ -150,7 +150,7 @@ const service = (props: any) => {
onFinish=
{
onFinish
}
>
{
/* 小区名 */
}
<
Form
.
Item
label=
"
Community
"
name=
"communityName"
rules=
{
[{
required
:
true
}]
}
>
<
Form
.
Item
label=
"
Estate
"
name=
"communityName"
rules=
{
[{
required
:
true
}]
}
>
<
SearchOptionsCommnity
// ubmit={extendName}
opname=
{
opname
}
...
...
src/pages/AccountManagement/Service/serviceEdit.tsx
View file @
2e1f9cf7
/*
* @Author: your name
* @Date: 2021-03-02 14:39:40
* @LastEditTime: 2021-0
3-18 10:40:22
* @LastEditTime: 2021-0
4-22 15:18:59
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx
...
...
@@ -124,7 +124,7 @@ const service = (props: any) => {
onFinish=
{
onFinish
}
>
{
/* 小区名 */
}
<
Form
.
Item
label=
"
Community
"
name=
"communityName"
rules=
{
[{
required
:
true
}]
}
>
<
Form
.
Item
label=
"
Estate
"
name=
"communityName"
rules=
{
[{
required
:
true
}]
}
>
<
SearchOptionsCommnity
// ubmit={extendName}
opname=
{
opname
}
...
...
src/pages/CommercialService/Card.tsx
View file @
2e1f9cf7
...
...
@@ -3,7 +3,7 @@ import { Table, Space, Button, message } from 'antd';
import
{
connect
,
history
}
from
'umi'
;
import
{
RA
,
urlEncode
,
filterObjbyTg
,
Clear
}
from
'@/utils/method'
;
import
{
objectColumns
}
from
'@/utils/string'
;
import
{
timestampToTime
}
from
'@/utils/time
'
;
import
moment
from
'moment
'
;
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
let
readyData
:
any
=
{
...
...
@@ -33,7 +33,7 @@ const Card = (props: any) => {
];
const
columns
=
objectColumns
([
[
'
Community
'
,
'community_name'
],
[
'
Estate
'
,
'community_name'
],
[
'Requestor'
,
'apply_name'
,
...
...
@@ -47,9 +47,11 @@ const Card = (props: any) => {
'Unit No'
,
null
,
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
{
record
.
build_number
+
' #'
+
record
.
floor_number
+
'-'
+
record
.
room_number
}
</
Space
>
<>
{
record
.
build_number
?
<
span
>
{
record
.
build_number
}
#
</
span
>
:
''
}
<
span
>
{
record
.
floor_number
}
-
</
span
>
<
span
>
{
record
.
room_number
}
</
span
>
</>
),
],
[
...
...
@@ -61,7 +63,7 @@ const Card = (props: any) => {
'Application Time'
,
null
,
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
{
timestampToTime
(
record
.
create_time
.
time
)
}
</
Space
>
<
Space
size=
"middle"
>
{
moment
(
text
.
time
).
format
(
'MM.DD HH:mm'
)
}
</
Space
>
),
],
[
...
...
src/pages/CommercialService/CardAdd.tsx
View file @
2e1f9cf7
...
...
@@ -42,8 +42,7 @@ const CardAdd = (props: any) => {
}
values
.
communityName
=
communityName
;
values
.
buildNumber
=
'BLK '
+
values
.
buildNumber
;
console
.
log
(
values
);
values
.
buildNumber
=
values
.
buildNumber
?
'BLK '
+
values
.
buildNumber
:
''
;
setLoading
(
true
);
RA
(
35
,
values
,
module
,
dispatch
);
};
...
...
@@ -86,7 +85,7 @@ const CardAdd = (props: any) => {
<
TitleBack
title=
"New Application For Access Card"
/>
<
Form
form=
{
form
}
name=
"basic"
onFinish=
{
onFinish
}
validateMessages=
{
validateMessages
}
>
<
Spin
spinning=
{
loading
}
>
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
label=
"
Community
"
style=
{
{
marginBottom
:
0
}
}
>
<
Form
.
Item
labelCol=
{
{
span
:
3
}
}
label=
"
Estate
"
style=
{
{
marginBottom
:
0
}
}
>
<
Input
.
Group
compact
>
<
Form
.
Item
name=
"communityName"
style=
{
{
marginRight
:
20
}
}
>
<
SearchOptionsCommnity
opname=
{
extendName
}
/>
...
...
@@ -95,13 +94,6 @@ const CardAdd = (props: any) => {
name=
"buildNumber"
style=
{
{
marginRight
:
16
}
}
className=
{
styles
.
buildNumber
}
rules=
{
[
{
required
:
true
,
pattern
:
/^
[
a-zA-Z0-9
]
+$/
,
message
:
'Only numbers and letters can be entered'
,
},
]
}
>
<
Input
style=
{
{
width
:
80
}
}
placeholder=
"BLK"
/>
</
Form
.
Item
>
...
...
src/pages/CommercialService/CardDetail.tsx
View file @
2e1f9cf7
...
...
@@ -11,6 +11,8 @@ import { RadioChangeEvent } from 'antd/lib/radio';
const
module
=
'CommunityService'
;
import
{
BookingsTip
}
from
'@/utils/tip'
;
// const apply_status = [[0, "审核中"], [1, "批准"], [2, "拒绝"], [3, "领取"]]
const
apply_status
=
[
[
0
,
'Pending'
],
...
...
@@ -52,7 +54,7 @@ const CardDetail = (props: any) => {
useEffect
(()
=>
{
if
(
DataSaveDetail
)
{
console
.
log
(
DataSaveDetail
);
//
console.log(DataSaveDetail);
setListData
(
DataSaveDetail
.
data
.
rows
.
list
[
0
]);
setOnwerDetail
(
DataSaveDetail
.
data
.
rows
.
onwerDetail
);
setLoading
(
false
);
...
...
@@ -69,21 +71,52 @@ const CardDetail = (props: any) => {
const
userInfo
=
localStorage
.
getItem
(
'userInfo'
)
||
''
;
const
{
id
}
=
JSON
.
parse
(
userInfo
).
userModel
;
var
sta
=
''
;
if
(
listData
.
apply_status
==
0
)
{
// 0 从没回复
if
(
values
.
applyStatus
==
2
)
{
sta
=
'2'
;
}
else
{
sta
=
values
.
applyStatusType
&&
values
.
applyStatusType
==
3
?
'3'
:
'1'
;
}
}
else
if
(
listData
.
apply_status
==
1
)
{
sta
=
values
.
applyStatusType
&&
values
.
applyStatusType
==
3
?
'3'
:
'1'
;
}
const
tmp
=
{
communityId
:
listData
.
communityId
,
id
:
listData
.
id
,
ownerId
:
listData
.
ownerId
,
replyId
:
id
,
applyStatus
:
values
.
applyStatus
,
applyStatus
:
sta
,
replyContent
:
listData
.
apply_status
!==
0
&&
values
.
applyStatus
===
'3'
listData
.
apply_status
!==
0
&&
values
.
applyStatus
Type
==
3
?
listData
.
reply_content
:
values
.
replyContent
,
type
:
'7'
,
houseCardNumber
:
values
.
houseCardNumber
,
};
// console.log(sta);
// console.log(listData);
// console.log(values);
// console.log(tmp);
RA
(
34
,
tmp
,
module
,
dispatch
);
setLoading
(
true
);
};
// 只能输入字母数字限制
const
inputNumberStr
=
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
if
(
value
)
{
if
(
/^
[
a-zA-Z0-9
]
+$/g
.
test
(
value
))
{
callback
();
}
else
{
callback
(
new
Error
(
'Only numbers and letters can be entered!'
));
}
}
else
{
callback
(
new
Error
(
'Required!'
));
}
};
return
(
<
Spin
size=
"large"
spinning=
{
loading
}
>
<
div
style=
{
{
width
:
'100%'
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
'#ffffff'
}
}
>
...
...
@@ -91,18 +124,25 @@ const CardDetail = (props: any) => {
<>
<
TitleBack
sublist=
{
[
'Status : '
+
apply_status
[
listData
.
apply_status
][
1
],
'Time : '
+
moment
(
listData
.
create_time
.
time
).
format
(
'DD-MM-YYYY'
),
'Status : '
+
apply_status
&&
apply_status
[
listData
.
apply_status
]
&&
apply_status
[
listData
.
apply_status
][
1
]
?
apply_status
[
listData
.
apply_status
][
1
]
:
''
,
'Time : '
+
listData
&&
listData
.
create_time
&&
listData
.
create_time
.
time
?
moment
(
listData
.
create_time
.
time
).
format
(
'DD-MM-YYYY'
)
:
''
,
]
}
title=
"Access Card Application Details"
/>
<
Row
gutter=
{
8
}
>
<
Col
>
Community
:
</
Col
>
<
Col
>
Estate
:
</
Col
>
<
Col
span=
{
3
}
>
{
listData
.
community_name
}
</
Col
>
<
Col
>
Unit:
</
Col
>
<
Col
>
{
listData
.
build_number
+
' #'
+
listData
.
floor_number
+
'-'
+
listData
.
room_number
}
{
listData
.
build_number
?
listData
.
build_number
+
' #'
:
''
}
{
listData
.
floor_number
+
'-'
+
listData
.
room_number
}
</
Col
>
</
Row
>
...
...
@@ -135,7 +175,7 @@ const CardDetail = (props: any) => {
<
Col
>
{
apply_relation_owner
[
parseInt
(
listData
.
apply_relation_owner
)]
}
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Reason
:
</
Col
>
<
Col
span=
{
4
}
>
Decription of Work
:
</
Col
>
<
Col
>
<
TextArea
disabled
...
...
@@ -147,9 +187,14 @@ const CardDetail = (props: any) => {
<
Line
/>
{
listData
.
apply_status
===
0
?
(
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Approval For Application:
</
Col
>
<
Form
ref=
{
formRef
}
name=
"basic"
initialValues=
{
{
remember
:
true
}
}
onFinish=
{
onFinish
}
>
<
Row
gutter=
{
24
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
4
}
>
Approval For Application:
</
Col
>
<
Col
span=
{
6
}
>
<
Form
.
Item
name=
"applyStatus"
...
...
@@ -170,32 +215,77 @@ const CardDetail = (props: any) => {
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Reply:
</
Col
>
{
/* 新增房卡号 */
}
{
/* 同意才需要卡号 */
}
{
!
isShowText
?
(
<
Row
gutter=
{
24
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
4
}
>
<
span
>
Room card number:
</
span
>
</
Col
>
<
Col
>
<
Form
.
Item
name=
"houseCardNumber"
rules=
{
[
{
required
:
true
,
message
:
'Please Room card number!'
,
validator
:
inputNumberStr
,
},
]
}
>
<
input
defaultValue=
{
''
}
placeholder=
"Room card number"
maxLength=
{
24
}
style=
{
{
width
:
300
,
border
:
'1px solid #d9d9d9'
,
padding
:
6
}
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
)
:
(
''
)
}
<
Row
gutter=
{
24
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
4
}
>
Remarks:
</
Col
>
<
Col
>
<
Form
.
Item
name=
"replyContent"
rules=
{
[{
required
:
isShowText
,
max
:
300
,
message
:
'*it is required!'
}]
}
rules=
{
isShowText
?
[{
required
:
isShowText
,
max
:
300
,
message
:
'*it is required!'
}]
:
[]
}
>
<
TextArea
style=
{
{
width
:
300
,
height
:
100
,
padding
:
8
}
}
/>
<
TextArea
placeholder=
"Remarks"
style=
{
{
width
:
300
,
height
:
100
,
padding
:
8
}
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
style=
{
{
marginTop
:
5
}
}
>
Card Received:
</
Col
>
<
Col
span=
{
4
}
>
<
Form
.
Item
name=
"applyStatus"
>
<
Radio
.
Group
>
<
Radio
value=
"3"
>
Receive
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
</
Row
>
{
/* 同意才可以选择是否领取 */
}
{
!
isShowText
?
(
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
4
}
style=
{
{
marginTop
:
5
}
}
>
Card Issued:
</
Col
>
<
Col
span=
{
4
}
>
<
Form
.
Item
name=
"applyStatusType"
>
<
Radio
.
Group
defaultValue=
{
4
}
>
<
Radio
value=
{
3
}
>
Yes
</
Radio
>
<
Radio
value=
{
4
}
>
No
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
</
Row
>
)
:
(
''
)
}
<
Row
>
<
Col
span=
{
3
}
/>
<
Col
span=
{
4
}
/>
<
Col
>
<
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
>
...
...
@@ -208,14 +298,14 @@ const CardDetail = (props: any) => {
)
:
(
<>
<
Row
>
<
Col
span=
{
3
}
>
Attended By:
</
Col
>
<
Col
span=
{
4
}
>
Attended By:
</
Col
>
<
Col
span=
{
3
}
>
{
listData
.
replyName
}
</
Col
>
<
Col
span=
{
3
}
>
Contact Details:
</
Col
>
<
Col
>
{
listData
.
replyContact
}
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Examine:
</
Col
>
<
Col
span=
{
5
}
>
<
Row
gutter=
{
24
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
4
}
>
Examine:
</
Col
>
<
Col
span=
{
8
}
>
<
Radio
.
Group
value=
{
listData
.
apply_status
===
2
?
'2'
:
'1'
}
>
<
Radio
.
Button
value=
"1"
disabled=
{
listData
.
apply_status
===
2
}
>
Approve
...
...
@@ -231,8 +321,33 @@ const CardDetail = (props: any) => {
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Reply:
</
Col
>
{
/* 新增房卡号 */
}
{
listData
.
apply_status
!==
2
?
(
<
Row
gutter=
{
24
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
4
}
>
<
span
>
Room card number:
</
span
>
</
Col
>
<
Col
>
<
input
defaultValue=
{
listData
.
houseCardNumber
}
placeholder=
"Room card number"
maxLength=
{
24
}
style=
{
{
width
:
300
,
border
:
'1px solid #d9d9d9'
,
padding
:
6
,
color
:
listData
.
apply_status
===
2
?
'red'
:
''
,
}
}
disabled
/>
</
Col
>
</
Row
>
)
:
(
''
)
}
<
Row
gutter=
{
24
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
4
}
>
Remarks:
</
Col
>
<
Col
>
<
TextArea
disabled
...
...
@@ -248,21 +363,27 @@ const CardDetail = (props: any) => {
</
Row
>
{
listData
.
apply_status
===
1
?
(
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
style=
{
{
marginTop
:
5
}
}
>
Card Received:
<
Form
ref=
{
formRef
}
initialValues=
{
{
remember
:
true
}
}
name=
"basic"
onFinish=
{
onFinish
}
>
<
Row
gutter=
{
24
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
4
}
style=
{
{
marginTop
:
5
}
}
>
Card Issued:
</
Col
>
<
Col
span=
{
4
}
>
<
Form
.
Item
name=
"applyStatus"
>
<
Radio
.
Group
>
<
Radio
value=
"3"
>
Receive
</
Radio
>
<
Form
.
Item
name=
"applyStatusType"
>
<
Radio
.
Group
defaultValue=
{
listData
.
apply_status
==
3
?
3
:
4
}
>
<
Radio
value=
{
3
}
>
Yes
</
Radio
>
<
Radio
value=
{
4
}
>
No
</
Radio
>
</
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Row
>
<
Col
span=
{
3
}
/>
<
Col
span=
{
4
}
/>
<
Col
>
<
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
>
...
...
@@ -273,16 +394,14 @@ const CardDetail = (props: any) => {
</
Row
>
</
Form
>
)
:
(
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
style=
{
{
marginTop
:
5
}
}
>
Card
Receiv
ed:
<
Row
gutter=
{
24
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
4
}
style=
{
{
marginTop
:
5
}
}
>
Card
Issu
ed:
</
Col
>
<
Col
span=
{
4
}
>
<
Radio
.
Group
value=
{
listData
.
apply_status
===
3
?
'3'
:
''
}
disabled=
{
listData
.
apply_status
!==
3
}
>
<
Radio
value=
"3"
>
Receive
</
Radio
>
<
Radio
.
Group
defaultValue=
{
listData
.
apply_status
==
3
?
3
:
4
}
disabled
>
<
Radio
value=
{
3
}
>
Yes
</
Radio
>
<
Radio
value=
{
4
}
>
No
</
Radio
>
</
Radio
.
Group
>
</
Col
>
</
Row
>
...
...
src/pages/CommercialService/Detail.tsx
View file @
2e1f9cf7
...
...
@@ -26,7 +26,7 @@ const Detail = (props: any) => {
const
[
headTitle
,
setHeadTitle
]
=
useState
(
''
);
const
headTitles
=
[
'Reply To
Community
maintenance'
,
'Reply To
Estate
maintenance'
,
'Reply To Warranty Period Service'
,
'Reply To Owner Complaints'
,
'Reply To Report Online'
,
...
...
@@ -68,6 +68,8 @@ const Detail = (props: any) => {
fromRef
.
current
.
setFieldsValue
(
tmp
);
}
setLoading
(
false
);
console
.
log
(
CurDataDetail
);
}
},
[
CurDataDetail
]);
...
...
@@ -191,7 +193,7 @@ const Detail = (props: any) => {
</
Row
>
)
:
null
}
<
Row
gutter=
{
16
}
style=
{
{
marginTop
:
20
}
}
>
<
Col
span=
{
3
}
>
Solution
&
Conclusio
n:
</
Col
>
<
Col
span=
{
3
}
>
Action Take
n:
</
Col
>
<
Col
>
<
Form
.
Item
name=
"replyContent"
rules=
{
[{
required
:
true
,
max
:
300
}]
}
>
<
TextArea
...
...
src/pages/CommercialService/MoveOutDetail.tsx
0 → 100644
View file @
2e1f9cf7
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Row
,
Col
,
Button
,
Form
,
Radio
,
message
,
Spin
,
Input
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
RA
,
getCookie
,
Clear
}
from
'@/utils/method'
;
import
TitleBack
from
'@/components/TitleBack/TitleBack'
;
import
Line
from
'@/components/Line/Line'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
import
{
RadioChangeEvent
}
from
'antd/lib/radio'
;
import
moment
from
'moment'
;
import
'./css/Detail.less'
;
const
module
=
'CommunityService'
;
const
decoration_status
=
[
[
0
,
'Pending'
],
[
1
,
'Approved'
],
[
2
,
'Rejected'
],
];
const
RenovationDetail
=
(
props
:
any
)
=>
{
const
{
dispatch
,
DataSaveDetail
,
location
,
match
,
user
}
=
props
;
const
formRef
=
useRef
(
null
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
listData
,
setListData
]
=
useState
(
null
)
as
any
;
const
[
onwerDetail
,
setOnwerDetail
]
=
useState
(
null
)
as
any
;
const
[
isShowText
,
setIsShowText
]
=
useState
(
false
);
const
onRadioChange
=
(
e
:
RadioChangeEvent
)
=>
{
if
(
e
.
target
.
value
===
'2'
)
{
setIsShowText
(
true
);
}
else
{
setIsShowText
(
false
);
}
};
// match 是路由属性
useEffect
(()
=>
{
if
(
match
.
params
.
id
)
{
RA
(
75
,
{
id
:
match
.
params
.
id
},
module
,
dispatch
);
}
else
{
history
.
go
(
-
1
);
}
},
[
match
]);
// useEffect(() => {
// // 发起请求拿取数据
// if (location.query.id) {
// setLoading(true);
// RA(37, { ...location.query }, module, dispatch);
// } else {
// history.go(-1);
// }
// return () => {
// Clear(module + '/DataSaveDetailClear', dispatch);
// };
// }, []);
useEffect
(()
=>
{
if
(
DataSaveDetail
)
{
setListData
(
DataSaveDetail
.
data
.
rows
.
list
[
0
]);
setOnwerDetail
(
DataSaveDetail
.
data
.
rows
.
onwerDetail
);
setLoading
(
false
);
}
},
[
DataSaveDetail
]);
const
onFinish
=
(
values
:
any
)
=>
{
const
permissionArr
=
JSON
.
parse
(
localStorage
.
getItem
(
'permission'
)
||
''
);
// if (permissionArr.indexOf('28') < 0) {
// message.error('No Permissions!!!', 3);
// return;
// }
if
(
values
.
decorationStatus
===
'2'
&&
(
values
.
replyView
===
undefined
||
values
.
replyView
.
trim
()
===
''
)
)
{
message
.
warning
(
'Replies must be entered!'
);
return
;
}
const
tmp
=
{
communityId
:
listData
.
communityId
,
id
:
listData
.
id
,
ownerId
:
user
.
currentUser
.
userModel
.
id
,
handleStatus
:
values
.
decorationStatus
,
replyName
:
user
.
currentUser
.
userModel
.
tosUserName
,
replyPhone
:
user
.
currentUser
.
userModel
.
tosUserPhone
,
replyView
:
values
.
replyView
,
type
:
'8'
,
};
RA
(
76
,
tmp
,
module
,
dispatch
);
setLoading
(
true
);
};
return
(
<
Spin
size=
"large"
spinning=
{
loading
}
>
<
div
style=
{
{
width
:
'100%'
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
'#ffffff'
}
}
>
{
listData
!==
null
&&
onwerDetail
!==
null
?
(
<>
<
TitleBack
sublist=
{
[
'Status : '
+
decoration_status
&&
decoration_status
[
listData
.
handleStatus
]
&&
decoration_status
[
listData
.
handleStatus
][
1
]
?
decoration_status
[
listData
.
handleStatus
][
1
]
:
''
,
'Time : '
+
listData
.
createTime
?
timestampToTime
(
listData
.
createTime
.
time
)
:
''
,
]
}
title=
{
listData
.
handleStatus
===
0
?
'Remarks to move out details'
:
'Move out Details'
}
/>
<
Row
gutter=
{
8
}
>
<
Col
>
Estate:
</
Col
>
<
Col
span=
{
3
}
>
{
onwerDetail
.
communityName
}
</
Col
>
<
Col
>
Unit:
</
Col
>
<
Col
>
{
onwerDetail
.
buildingNumber
?
onwerDetail
.
buildingNumber
+
' #'
:
''
}
{
onwerDetail
.
floorNumber
}
-
{
onwerDetail
.
roomNumber
}
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
>
Address:
</
Col
>
<
Col
>
{
onwerDetail
.
addressAndpostalCode
}
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
>
Owner Name:
</
Col
>
<
Col
span=
{
3
}
>
{
onwerDetail
.
owerName
}
{
onwerDetail
.
deleted
===
1
&&
'(Canceled)'
}
</
Col
>
<
Col
>
Contact Details:
</
Col
>
<
Col
span=
{
3
}
>
{
onwerDetail
.
owerPhone
}
</
Col
>
<
Col
>
{
onwerDetail
.
owerEmail
}
</
Col
>
</
Row
>
<
Line
/>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Applicant:
</
Col
>
<
Col
span=
{
3
}
>
{
listData
.
name
}
</
Col
>
<
Col
>
Contact Details:
</
Col
>
<
Col
span=
{
3
}
>
{
listData
.
phone
}
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Move Out Date:
</
Col
>
<
Col
span=
{
5
}
>
{
moment
(
listData
.
communityMoveOutBeginTime
).
format
(
'DD-MM-YYYY'
)
}
</
Col
>
<
Col
span=
{
5
}
>
{
moment
(
listData
.
communityMoveOutendTime
).
format
(
'DD-MM-YYYY'
)
}
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Description :
</
Col
>
<
Col
>
<
TextArea
autoSize
disabled
value=
{
listData
.
content
}
style=
{
{
width
:
300
,
minHeight
:
100
,
padding
:
8
,
resize
:
'none'
}
}
/>
</
Col
>
</
Row
>
<
Line
/>
{
listData
.
handleStatus
==
0
?
(
<>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
>
{
/* <Row gutter={8} style={{ marginTop: 16 }}>
<Col>Replier:</Col>
<Col span={3}>{user.currentUser.userModel.tosUserName}</Col>
<Col>Contact Details:</Col>
<Col>{user.currentUser.userModel.tosUserPhone}</Col>
</Row> */
}
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Approval For Application:
</
Col
>
<
Col
>
<
Form
.
Item
name=
"decorationStatus"
rules=
{
[
{
required
:
true
,
message
:
'Please choose Approve or Reject the application! '
,
},
]
}
>
<
Radio
.
Group
onChange=
{
onRadioChange
}
>
<
Radio
.
Button
value=
"1"
>
Approve
</
Radio
.
Button
>
{
' '
}
<
Radio
.
Button
style=
{
{
marginLeft
:
10
}
}
value=
"2"
>
Reject
</
Radio
.
Button
>
</
Radio
.
Group
>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Remarks:
</
Col
>
<
Col
>
<
Form
.
Item
name=
"replyView"
rules=
{
[{
required
:
isShowText
,
max
:
300
,
message
:
'*it is required!'
}]
}
>
<
TextArea
style=
{
{
width
:
300
,
height
:
100
,
padding
:
8
}
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
<
Row
>
<
Col
span=
{
3
}
/>
<
Col
>
<
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Submit
</
Button
>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
Form
>
</>
)
:
(
<>
<
Row
>
<
Col
span=
{
3
}
>
Attended By:
</
Col
>
<
Col
span=
{
3
}
>
{
listData
.
replyName
}
</
Col
>
<
Col
span=
{
3
}
>
Contact Details:
</
Col
>
<
Col
>
{
listData
.
replyPhone
}
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Approval For Application:
</
Col
>
<
Col
>
<
Radio
.
Group
value=
{
listData
.
handleStatus
}
>
<
Radio
.
Button
value=
{
1
}
disabled=
{
listData
.
handleStatus
!==
1
}
>
Approve
</
Radio
.
Button
>
{
' '
}
<
Radio
.
Button
style=
{
{
marginLeft
:
10
}
}
value=
{
2
}
disabled=
{
listData
.
handleStatus
!==
2
}
>
Reject
</
Radio
.
Button
>
</
Radio
.
Group
>
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Remarks:
</
Col
>
<
Col
>
<
TextArea
style=
{
{
width
:
300
,
minHeight
:
100
,
padding
:
8
,
resize
:
'none'
,
color
:
listData
.
handleStatus
===
'2'
?
'red'
:
''
,
}
}
disabled
value=
{
listData
.
replyView
}
/>
</
Col
>
</
Row
>
</>
)
}
</>
)
:
null
}
</
div
>
</
Spin
>
);
};
function
map
(
state
:
any
)
{
const
{
DataSaveDetail
}
=
state
[
module
];
const
{
user
}
=
state
;
return
{
DataSaveDetail
,
user
};
}
export
default
connect
(
map
)(
RenovationDetail
);
src/pages/CommercialService/PropertyServices.tsx
View file @
2e1f9cf7
...
...
@@ -3,7 +3,7 @@ import { connect, history } from 'umi';
import
{
Table
,
Space
,
message
}
from
'antd'
;
import
{
RA
,
urlEncode
,
filterObj
,
filterObjbyTg
}
from
'@/utils/method'
;
import
styles
from
'./css/index.less'
;
import
{
timestampToTime3
}
from
'../../utils/time
'
;
import
moment
from
'moment
'
;
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
const
pathname
=
[
...
...
@@ -46,7 +46,7 @@ const PropertyServices = (props: any) => {
// const [readyData, setReadyData] = useState(null);
const
columns
=
[
{
title
:
'
Community
'
,
dataIndex
:
'community_name'
},
{
title
:
'
Estate
'
,
dataIndex
:
'community_name'
},
{
title
:
'Requestor'
,
dataIndex
:
'owner_name'
,
...
...
@@ -60,8 +60,10 @@ const PropertyServices = (props: any) => {
},
{
title
:
parseInt
(
serviceTypeGobal
)
-
1
===
0
?
'Attended By'
:
'Description'
,
dataIndex
:
parseInt
(
serviceTypeGobal
)
-
1
===
0
?
'handle_name'
:
'service_content'
,
// title: parseInt(serviceTypeGobal) - 1 === 0 ? 'Attended By' : 'Description',
// dataIndex: parseInt(serviceTypeGobal) - 1 === 0 ? 'handle_name' : 'service_content',
title
:
'Description'
,
dataIndex
:
'service_content'
,
ellipsis
:
true
,
// width: 400,
render
:
(
text
:
any
)
=>
<
span
>
{
text
!=
null
?
text
:
''
}
</
span
>,
...
...
@@ -70,7 +72,7 @@ const PropertyServices = (props: any) => {
{
title
:
'Submission Time'
,
dataIndex
:
'create_time'
,
render
:
(
text
:
any
)
=>
<
Space
size=
"middle"
>
{
timestampToTime3
(
text
.
time
)
}
</
Space
>,
render
:
(
text
:
any
)
=>
<
Space
size=
"middle"
>
{
moment
(
text
.
time
).
format
(
'MM.DD HH:mm'
)
}
</
Space
>,
},
{
title
:
'Status'
,
...
...
@@ -151,6 +153,10 @@ const PropertyServices = (props: any) => {
pathname
.
forEach
((
item
,
index
)
=>
{
if
(
location
.
pathname
.
indexOf
(
item
)
>
-
1
)
{
serviceType
=
`
${
index
+
1
}
`
;
// console.log(serviceType);
// console.log(index);
// console.log(location.pathname);
// console.log(pathname);
setServiceType
(
serviceType
);
}
});
...
...
@@ -175,6 +181,11 @@ const PropertyServices = (props: any) => {
};
// 获取数据
setLoading
(
true
);
// console.log(serviceType);
// console.log(tmp);
// console.log(pageNum);
RA
(
40
,
{
...
...
src/pages/CommercialService/Renovation.tsx
View file @
2e1f9cf7
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Table
,
Space
,
message
}
from
'antd'
;
import
{
Table
,
Space
,
message
,
Tag
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
RA
,
urlEncode
,
filterObjbyTg
}
from
'@/utils/method'
;
import
{
objectColumns
,
stringTab
}
from
'@/utils/string'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
import
TitleSearch
from
'../../components/TitleSearch/TitleSearch'
;
import
TitleSearch
from
'@/components/TitleSearch/TitleSearch'
;
import
moment
from
'moment'
;
const
module
=
'CommunityService'
;
...
...
@@ -18,12 +19,24 @@ const Renovation = (props: any) => {
[
2
,
'Rejected'
],
];
const
{
dispatch
,
Data8
,
location
}
=
props
;
const
{
dispatch
,
Data
9
,
Data
8
,
location
}
=
props
;
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
readyData
,
setReadyData
]
=
useState
(
null
);
// 地址 默认是装修申请
const
[
urlType
,
setUrlType
]
=
useState
(
0
);
// 地址看是哪一个
const
WebUrl
=
[
'RenovationApplication'
,
// 装修申请
'MoveOut'
,
// 迁出申请
];
// let { log } = console;
// 装修申请的表格
const
columns
=
objectColumns
([
[
'
Community
'
,
'communityName'
],
[
'
Estate
'
,
'communityName'
],
[
'Applicant'
,
'applyforName'
,
...
...
@@ -38,13 +51,14 @@ const Renovation = (props: any) => {
null
,
(
text
:
any
,
record
:
any
)
=>
(
<
div
>
{
record
.
communityBuildDecorate
}
#
{
record
.
communityFloorDecorate
}
-
{
record
.
communityRoomDecoate
}
{
record
.
communityBuildDecorate
?
<
span
>
{
record
.
communityBuildDecorate
}
#
</
span
>
:
''
}
<
span
>
{
record
.
communityFloorDecorate
}
-
</
span
>
<
span
>
{
record
.
communityRoomDecoate
}
</
span
>
</
div
>
),
],
[
'Content'
,
'decorationContent'
,
(
text
:
any
)
=>
<
div
>
{
stringTab
(
text
)
}
</
div
>],
[
'Application Time'
,
'createTime'
,
(
text
:
any
)
=>
<
div
>
{
timestampToTime
(
text
.
time
)
}
</
div
>
],
[
'Application Time'
,
'createTime'
,
(
text
:
any
)
=>
moment
(
text
.
time
).
format
(
'MM.DD HH:mm'
)
],
[
'status'
,
'decorationStatus'
,
(
text
:
any
)
=>
<
div
>
{
decorationStatus
[
parseInt
(
text
)][
1
]
}
</
div
>],
[
'Actions'
,
...
...
@@ -57,6 +71,71 @@ const Renovation = (props: any) => {
),
],
]);
// 迁出申请的表格格式
const
columns2
=
[
{
title
:
'Estate'
,
dataIndex
:
'communityName'
,
key
:
'communityName'
,
},
{
title
:
'Unit'
,
dataIndex
:
'id'
,
key
:
'id'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
{
record
.
communityBuild
?
<
span
>
{
record
.
communityBuild
}
#
</
span
>
:
''
}
<
span
>
{
record
.
communityFloor
}
-
</
span
>
<
span
>
{
record
.
communityRoom
}
</
span
>
</>
),
},
{
title
:
'Requestor'
,
dataIndex
:
'name'
,
key
:
'name'
,
render
:
(
text
:
string
,
record
:
{
exist
:
string
})
=>
{
return
(
<
div
>
{
text
}
{
record
.
exist
===
'1'
&&
'(Canceled)'
}
</
div
>
);
},
},
{
title
:
'Description'
,
dataIndex
:
'content'
,
key
:
'content'
,
},
{
title
:
'Submission Time'
,
dataIndex
:
'createTime'
,
key
:
'createTime'
,
// render: (text: any) => moment(text.time).format('MMMM Do YYYY, h:mm'),
render
:
(
text
:
any
)
=>
moment
(
text
.
time
).
format
(
'MM.DD HH:mm'
),
},
{
title
:
'Status'
,
dataIndex
:
'handleStatus'
,
key
:
'handleStatus'
,
render
:
(
text
:
any
)
=>
(
// <Tag color={text == 0 ? 'lime' : text == 1 ? 'cyan' : 'magenta'}>
// {decorationStatus[parseInt(text)][1]}
// </Tag>,
<
span
>
{
decorationStatus
[
parseInt
(
text
)][
1
]
}
</
span
>
),
},
{
title
:
'Action'
,
dataIndex
:
'operation'
,
key
:
'operation'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
a
onClick=
{
()
=>
goToDetail
(
record
)
}
>
{
record
.
handleStatus
==
0
?
'Reply'
:
'Details'
}
</
a
>
),
},
];
useEffect
(()
=>
{
pageNum
=
1
;
// 分页设置
...
...
@@ -77,24 +156,36 @@ const Renovation = (props: any) => {
setReadyData
(
tmp
);
// 获取数据
setLoading
(
true
);
RA
(
23
,
{
...
tmp
,
handleStatus
:
location
.
query
.
handleStatus
!==
undefined
?
parseInt
(
location
.
query
.
handleStatus
)
:
null
,
pageNum
,
},
module
,
dispatch
,
);
// 看是哪一个
// 细分类:页面指令
let
serviceType
:
any
=
null
;
// console.log(location);
WebUrl
.
forEach
((
item
,
index
)
=>
{
if
(
location
.
pathname
.
indexOf
(
item
)
>
-
1
)
{
setUrlType
(
index
);
serviceType
=
index
;
}
});
// console.log(WebUrl[serviceType]);
// 搜索条件
let
objs
=
{
...
tmp
,
handleStatus
:
location
.
query
.
handleStatus
!==
undefined
?
parseInt
(
location
.
query
.
handleStatus
)
:
null
,
pageNum
,
};
// 请求
RA
(
serviceType
==
0
?
23
:
74
,
objs
,
module
,
dispatch
);
},
[
location
]);
useEffect
(()
=>
{
if
(
Data8
!=
null
)
{
if
(
Data
9
!=
null
||
Data
8
!=
null
)
{
setLoading
(
false
);
}
},
[
Data8
]);
},
[
Data
9
,
Data
8
]);
// 页面搜索
const
ClickTitleSearch
=
(
comment
:
any
)
=>
{
...
...
@@ -108,7 +199,9 @@ const Renovation = (props: any) => {
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
history
.
push
(
'./RenovationApplication/Detail?id='
+
values
.
id
);
urlType
==
0
?
history
.
push
(
'./RenovationApplication/Detail?id='
+
values
.
id
)
:
history
.
push
(
'./MoveOut/Detail/'
+
values
.
id
);
};
const
PageChange
=
(
values
:
any
)
=>
{
...
...
@@ -129,27 +222,45 @@ const Renovation = (props: any) => {
defaultValue=
{
readyData
}
onSubmit=
{
ClickTitleSearch
}
/>
<
Table
loading=
{
loading
}
rowKey=
"id"
style=
{
{
marginTop
:
16
}
}
dataSource=
{
Data8
!==
null
?
Data8
.
data
.
rows
:
null
}
columns=
{
columns
}
onChange=
{
PageChange
}
pagination=
{
{
current
:
parseInt
(
pageNum
),
pageSize
:
Data8
!==
null
?
Data8
.
data
.
page
.
curPageSize
:
null
,
total
:
Data8
!==
null
?
Data8
.
data
.
page
.
totalRow
:
null
,
showSizeChanger
:
false
,
}
}
/>
{
urlType
==
0
?
(
<
Table
loading=
{
loading
}
rowKey=
"id"
style=
{
{
marginTop
:
16
}
}
dataSource=
{
Data8
!==
null
?
Data8
.
data
.
rows
:
null
}
columns=
{
columns
}
onChange=
{
PageChange
}
pagination=
{
{
current
:
parseInt
(
pageNum
),
pageSize
:
Data8
!==
null
?
Data8
.
data
.
page
.
curPageSize
:
null
,
total
:
Data8
!==
null
?
Data8
.
data
.
page
.
totalRow
:
null
,
showSizeChanger
:
false
,
}
}
/>
)
:
(
<
Table
loading=
{
loading
}
rowKey=
"id"
style=
{
{
marginTop
:
16
}
}
dataSource=
{
Data9
!==
null
?
Data9
.
data
.
rows
:
null
}
columns=
{
columns2
}
onChange=
{
PageChange
}
pagination=
{
{
current
:
parseInt
(
pageNum
),
pageSize
:
Data9
!==
null
?
Data9
.
data
.
page
.
curPageSize
:
null
,
total
:
Data9
!==
null
?
Data9
.
data
.
page
.
totalRow
:
null
,
showSizeChanger
:
false
,
}
}
/>
)
}
</>
</
div
>
);
};
function
map
(
state
:
any
)
{
const
{
Data8
}
=
state
[
module
];
return
{
Data8
};
const
{
Data
9
,
Data
8
}
=
state
[
module
];
return
{
Data
9
,
Data
8
};
}
export
default
connect
(
map
)(
Renovation
);
src/pages/CommercialService/RenovationDetail.tsx
View file @
2e1f9cf7
...
...
@@ -90,18 +90,23 @@ const RenovationDetail = (props: any) => {
<>
<
TitleBack
sublist=
{
[
'Status : '
+
decoration_status
[
listData
.
decorationStatus
][
1
],
'Time : '
+
timestampToTime
(
listData
.
createTime
.
time
),
'Status : '
+
decoration_status
&&
decoration_status
[
listData
.
decorationStatus
]
&&
decoration_status
[
listData
.
decorationStatus
][
1
]
?
decoration_status
[
listData
.
decorationStatus
][
1
]
:
''
,
'Time: '
+
timestampToTime
(
listData
.
createTime
.
time
),
]
}
title=
{
listData
.
decorationStatus
===
0
?
'Renovation Reply'
:
'Renovation Detail'
}
/>
<
Row
gutter=
{
8
}
>
<
Col
>
Community
:
</
Col
>
<
Col
>
Estate
:
</
Col
>
<
Col
span=
{
3
}
>
{
onwerDetail
.
communityName
}
</
Col
>
<
Col
>
Unit:
</
Col
>
<
Col
>
{
onwerDetail
.
buildingNumber
}
#
{
onwerDetail
.
floorNumber
}
-
{
onwerDetail
.
roomNumber
}
{
onwerDetail
.
buildingNumber
?
onwerDetail
.
buildingNumber
+
' #'
:
''
}
{
onwerDetail
.
floorNumber
}
-
{
onwerDetail
.
roomNumber
}
</
Col
>
</
Row
>
...
...
@@ -131,12 +136,12 @@ const RenovationDetail = (props: any) => {
<
Col
>
{
listData
.
contactEmail
}
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Time
:
</
Col
>
<
Col
span=
{
3
}
>
Duration of Work
:
</
Col
>
<
Col
span=
{
3
}
>
{
timestampToTime
(
listData
.
decorationBeginTime
)
}
</
Col
>
<
Col
>
{
timestampToTime
(
listData
.
decorationEndTime
)
}
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Reason
:
</
Col
>
<
Col
span=
{
3
}
>
Description of Work
:
</
Col
>
<
Col
>
<
TextArea
autoSize
...
...
@@ -174,7 +179,7 @@ const RenovationDetail = (props: any) => {
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Re
ply
:
</
Col
>
<
Col
span=
{
3
}
>
Re
marks
:
</
Col
>
<
Col
>
<
Form
.
Item
name=
"replyView"
...
...
@@ -225,7 +230,7 @@ const RenovationDetail = (props: any) => {
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Re
ply
:
</
Col
>
<
Col
span=
{
3
}
>
Re
marks
:
</
Col
>
<
Col
>
<
TextArea
style=
{
{
...
...
src/pages/CommercialService/css/Detail.less
View file @
2e1f9cf7
...
...
@@ -2,216 +2,221 @@
//基石
.base {
width: 100%;
background-color: #ffffff;
padding: 34px;
min-width: 1020px;
width: 100%;
background-color: #ffffff;
padding: 34px;
min-width: 1020px;
}
//头部组件
.box{
width: 100%;
height: 64px;
position: relative;
}
.item1{
position: absolute;
width: 180px;
text-align: center;
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;
.box {
width: 100%;
height: 64px;
position: relative;
}
.item1 {
position: absolute;
width: 180px;
text-align: center;
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;
outline: none;
background:
none;
cursor: pointer;
border:1px solid rgba(217,217,217,
1);
border-radius:
2px;
border: 1px solid rgba(217, 217, 217,
1);
border-radius:
2px;
}
//内容组件
.box1{
width: 100%;
height: 36px;
position: relative;
.box1
{
width: 100%;
height: 36px;
position: relative;
}
.box1item1{
position: absolute;
.box1item1 {
position: absolute;
}
.box1item2{
position: absolute;
left: 215px;
.box1item2 {
position: absolute;
left: 215px;
}
.box2{
width: 100%;
height: 36px;
position: relative;
.box2
{
width: 100%;
height: 36px;
position: relative;
}
.box2item1{
position: absolute;
.box2item1 {
position: absolute;
}
.box2item2{
position: absolute;
left: 430px;
.box2item2 {
position: absolute;
left: 430px;
}
.box3{
width: 100%;
height: 36px;
position: relative;
.box3
{
width: 100%;
height: 36px;
position: relative;
}
.box3item1{
position: absolute;
.box3item1
{
position: absolute;
}
.box3item2{
position: absolute;
left: 132px;
.box3item2
{
position: absolute;
left: 132px;
}
.box3item3{
position: absolute;
left: 315px;
.box3item3
{
position: absolute;
left: 315px;
}
.box3item4{
position: absolute;
left: 445px;
.box3item4
{
position: absolute;
left: 445px;
}
.box3item5{
position: absolute;
left: 588px;
.box3item5
{
position: absolute;
left: 588px;
}
.box4{
width: 100%;
height: 90px;
position: relative;
margin-bottom: 28px;
}
.box4item1{
position: absolute;
}
.box4item2{
position: absolute;
left: 193px;
top:
10px;
width: 394px;
height: 80px;
background-color: rgba(244,244,244,
1);
overflow-y: auto;
padding: 8px;
.box4
{
width: 100%;
height: 90px;
position: relative;
margin-bottom: 28px;
}
.box4item1
{
position: absolute;
}
.box4item2
{
position: absolute;
left: 193px;
top:
10px;
width: 394px;
height: 80px;
background-color: rgba(244, 244, 244,
1);
overflow-y: auto;
padding: 8px;
}
.box5{
width: 100%;
height: 80px;
position: relative;
.box5
{
width: 100%;
height: 80px;
position: relative;
}
.box5item1{
position: absolute;
.box5item1
{
position: absolute;
}
.box5item2{
position: absolute;
left: 193px;
.box5item2
{
position: absolute;
left: 193px;
}
.box5item3{
position: absolute;
left: 311px;
.box5item3
{
position: absolute;
left: 311px;
}
.box5item4{
position: absolute;
left: 429px;
.box5item4
{
position: absolute;
left: 429px;
}
// 线栏
.line{
width: 100%;
height: 1px;
border-top: 1px solid rgba(217,217,217,
1);
margin-top: 28px;
margin-bottom: 28px;
.line
{
width: 100%;
height: 1px;
border-top: 1px solid rgba(217, 217, 217,
1);
margin-top: 28px;
margin-bottom: 28px;
}
.box6{
width: 100%;
height: 32px;
position: relative;
margin-bottom: 28px;
line-height: 32px;
.box6
{
width: 100%;
height: 32px;
position: relative;
margin-bottom: 28px;
line-height: 32px;
}
.box6item1{
position: absolute;
.box6item1
{
position: absolute;
}
.box6item2{
position: absolute;
left: 193px;
.box6item2
{
position: absolute;
left: 193px;
}
.box6item3{
position: absolute;
left: 498px;
.box6item3
{
position: absolute;
left: 498px;
}
.box6item4{
position: absolute;
left: 626px;
.box6item4
{
position: absolute;
left: 626px;
}
.box7{
width: 100%;
height: 80px;
position: relative;
margin-bottom: 28px;
.box7
{
width: 100%;
height: 80px;
position: relative;
margin-bottom: 28px;
}
.box7item1{
position: absolute;
.box7item1
{
position: absolute;
}
.box7item2{
position: absolute;
left: 193px;
.box7item2
{
position: absolute;
left: 193px;
}
.box8{
width: 100%;
height: 200px;
position: relative;
}
.box8min{
width: 100%;
height: 100px;
position: relative;
}
.box8item1{
position: absolute;
}
.box8item2{
position: absolute;
left: 193px;
}
.box8item3{
position: absolute;
left: 800px;
}
.box8item01{
position: absolute;
}
.box8item02{
position: absolute;
left: 20px;
}
.box8item03{
position: absolute;
left: 20px;
}
\ No newline at end of file
.box8 {
width: 100%;
height: 200px;
position: relative;
}
.box8min {
width: 100%;
height: 100px;
position: relative;
}
.box8item1 {
position: absolute;
}
.box8item2 {
position: absolute;
left: 193px;
}
.box8item3 {
position: absolute;
left: 800px;
}
.box8item01 {
position: absolute;
}
.box8item02 {
position: absolute;
left: 20px;
}
.box8item03 {
position: absolute;
left: 20px;
}
.diys {
display: flex;
justify-content: space-between;
align-items: center;
.ant-form-item {
&:nth-child(1) {
margin-right: 20px;
}
}
}
src/pages/CommunityManagement/CellList/Adds.tsx
View file @
2e1f9cf7
...
...
@@ -111,8 +111,8 @@ const Adds = (props: any) => {
type
:
imgUrl
.
name
.
match
(
/
\.([^\.]
+
)
$/
)[
1
].
toLowerCase
(),
url
:
imgUrl
.
url
,
};
setpreviewImage
(
info
);
setpreviewVisible
(
true
);
//
setpreviewImage(info);
//
setpreviewVisible(true);
// openDows(imgUrl.url, imgUrl.name);
}
},
[
imgUrl
]);
...
...
@@ -203,7 +203,7 @@ const Adds = (props: any) => {
:
values
.
residentialPhone
;
values
.
residentialHotlineName
=
residentialHotlineName
?
undeFi
(
residentialHotlineName
)
:
'
Community
Hotline'
;
:
'
Estate
Hotline'
;
// 没选的话就上面小区时间
if
(
time
)
{
...
...
@@ -313,7 +313,7 @@ const Adds = (props: any) => {
<
div
className=
"form"
>
<
h3
className=
"capi"
>
<
EditOutlined
/>
{
match
&&
match
.
params
.
id
?
'edit'
:
'Create New'
}
community
{
match
&&
match
.
params
.
id
?
'edit'
:
'Create New'
}
Estate
<
div
className=
"back"
>
<
Button
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
...
...
@@ -334,7 +334,7 @@ const Adds = (props: any) => {
{
/* 小区邮编、地址和名称 */
}
<
Form
.
Item
name=
"des"
label=
"
Community
Name"
label=
"
Estate
Name"
rules=
{
[{
validator
:
checkPrice
}]
}
style=
{
{
marginBottom
:
15
}
}
className=
"must"
...
...
src/pages/CommunityManagement/CellList/Adds3.tsx
deleted
100644 → 0
View file @
4ad66726
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
connect
}
from
'dva'
;
import
{
LeftOutlined
,
EditOutlined
,
LoadingOutlined
,
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
Form
,
Input
,
Image
,
Button
,
TimePicker
,
Checkbox
,
Upload
,
message
,
Spin
,
Modal
,
Pagination
,
}
from
'antd'
;
// 样式
import
'./celllist.less'
;
import
{
RA
}
from
'@/utils/method'
;
import
{
history
}
from
'umi'
;
import
{
village
}
from
'@/utils/tip'
;
import
moment
from
'moment'
;
import
{
getNumber
}
from
'@/utils/string'
;
// 正则
import
FileViewer
from
'react-file-viewer'
;
import
PDF
from
'react-pdf-js'
;
const
{
RangePicker
}
=
TimePicker
;
const
Adds
=
(
props
:
any
)
=>
{
const
module
=
'CellList'
;
const
{
Data
,
dispatch
,
loading
,
imgUrl
,
Result
}
=
props
;
const
[
form
]
=
Form
.
useForm
();
const
[
PropertyFee
,
setPropertyFee
]
=
useState
([
'1'
]);
// 表单物业费提交值
const
[
loubaUpload
,
setLouba
]
=
useState
([]
as
any
);
// 楼巴上传列表
const
[
guideUpload
,
setGuide
]
=
useState
([]
as
any
);
// 物业办事指南列表
const
[
periodUpload
,
setPeriod
]
=
useState
([]
as
any
);
// 保质期服务列表
// 监听用户填写小区名 以及后续禁止输入 提示信息
const
[
codename
,
setCodeName
]
=
useState
(
''
);
const
[
codeStrat
,
setcodeStrat
]
=
useState
(
false
);
const
[
tipMain
,
setTipMain
]
=
useState
(
''
);
const
[
previewVisible
,
setpreviewVisible
]
=
useState
(
false
);
// 预览弹窗显示隐藏
const
[
previewImage
,
setpreviewImage
]
=
useState
({}
as
any
);
// 预览图片信息
//pdf 页码内容
const
[
numPages
,
setNumPages
]
=
useState
(
1
as
any
);
// 总页码数
const
[
pageNumber
,
setPageNumber
]
=
useState
(
1
);
// 当前页码数
const
[
imgLoad
,
setimgLoad
]
=
useState
(
false
);
//图片上传 load状态
// 赋值
useEffect
(()
=>
{
// 如果是添加传来没有值的时候 就清空 否则 赋值给表单
if
(
Data
)
{
// 返回列表
form
.
setFieldsValue
({
// 必填的
des
:
{
residentialZipCode
:
Data
.
residentialZipCode
.
substring
(
Data
.
residentialZipCode
.
length
-
6
,
Data
.
residentialZipCode
.
length
,
),
residentialAddress
:
Data
.
residentialAddress
,
residentialName
:
Data
.
residentialName
,
},
workingHours
:
[
moment
(
Data
.
residentialStartWorking
,
'HH:mm'
),
moment
(
Data
.
residentialEndWorking
,
'HH:mm'
),
],
info
:
{
tel
:
Data
.
residentialPhone
,
email
:
Data
.
residentialEmail
,
},
residentialManagerUserName
:
Data
.
residentialManagerUserName
,
help
:
{
residentialHotlineName
:
Data
.
residentialHotlineName
,
residentialHotline
:
Data
.
residentialHotline
,
time
:
[
moment
(
Data
.
residentialHotlineServieStartTime
,
'HH:mm'
),
moment
(
Data
.
residentialHotlineServieEndTime
,
'HH:mm'
),
],
},
});
// 上传
setLouba
(
Data
.
balouscheduleUrl
?
[
backUpload
(
Data
.
balouscheduleUrl
,
Data
.
id
)]
:
[]);
setGuide
(
Data
.
serviceGuideUrl
?
[
backUpload
(
Data
.
serviceGuideUrl
,
Data
.
id
)]
:
[]);
// setPeriod(Data.lifeServiceUrl ? [backUpload(Data.lifeServiceUrl, Data.id)] : []);
// 小区名 -- 上传需要
setCodeName
(
Data
.
residentialName
);
setcodeStrat
(
true
);
setTipMain
(
'Binding Content Already Exists, Cannot Be Modified!'
);
}
else
{
// console.log('新建');
}
},
[
Data
]);
// 提交成功与否
useEffect
(()
=>
{
if
(
Result
!=
null
)
{
// 如果不是编辑的话就更新本地小区
if
(
!
Data
)
{
dispatch
({
type
:
'Init/addCommunityget'
,
playload
:
{
Result
:
new
Array
(
Result
.
data
)
}
});
}
// 提示跳转
// message.success(`Information saved successfully!`);
history
.
push
(
'/CommunityManagement/CellList'
);
}
},
[
Result
,
Data
]);
// 监听编辑预览是否获取到地址以及发生改变
useEffect
(()
=>
{
if
(
imgUrl
!=
null
)
{
let
info
=
{
uid
:
'1'
,
name
:
imgUrl
.
name
,
status
:
'done'
,
type
:
imgUrl
.
name
.
match
(
/
\.([^\.]
+
)
$/
)[
1
].
toLowerCase
(),
url
:
imgUrl
.
url
,
};
setpreviewImage
(
info
);
setpreviewVisible
(
true
);
// openDows(imgUrl.url, imgUrl.name);
}
},
[
imgUrl
]);
// 编辑 返回上传格式 和 地址
function
backUpload
(
str
:
any
,
index
:
number
,
url
?:
any
)
{
let
a
=
{
uid
:
str
+
index
,
name
:
str
,
status
:
'done'
,
type
:
str
.
match
(
/
\.([^\.]
+
)
$/
)[
1
].
toLowerCase
(),
url
:
'Transfer'
,
// 需要调取接口
};
return
a
;
}
// 上传设置
const
uploads
=
{
name
:
'file'
,
accept
:
'.jpg,.png,.pdf'
,
action
:
'/tos/image/upload'
,
data
:
{
imageType
:
'tosCreateCommunity'
,
extends
:
codename
},
};
// 文件上传判断
function
beforeUpload
(
file
:
any
)
{
// 文件大小判断
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
isLt2M
)
{
message
.
error
(
'File must be less than or equal to 2MB!'
);
}
return
isLt2M
;
}
// 上传返回格式
function
BackFormat
(
name
:
any
,
url
:
any
)
{
let
imgs
=
[
{
uid
:
'-1'
,
name
:
name
,
status
:
'done'
,
type
:
name
.
match
(
/
\.([^\.]
+
)
$/
)[
1
].
toLowerCase
(),
url
:
url
,
},
];
return
imgs
;
}
// 楼巴上传
const
upload1
=
{
onChange
({
file
}:
any
)
{
file
.
status
===
'uploading'
?
setimgLoad
(
true
)
:
setimgLoad
(
false
);
if
(
file
.
status
===
'done'
)
{
let
data
=
file
.
response
.
data
;
setLouba
(
BackFormat
(
data
.
imageName
,
data
.
url
));
setcodeStrat
(
true
);
setTipMain
(
'Binding Content Already Exists, Cannot Be Modified!'
);
}
// 结果
uploadMsg
(
file
);
},
};
// 指南上传
const
upload2
=
{
onChange
({
file
,
fileList
}:
any
)
{
file
.
status
===
'uploading'
?
setimgLoad
(
true
)
:
setimgLoad
(
false
);
if
(
file
.
status
===
'done'
)
{
let
data
=
file
.
response
.
data
;
setGuide
(
BackFormat
(
data
.
imageName
,
data
.
url
));
setcodeStrat
(
true
);
setTipMain
(
'Binding Content Already Exists, Cannot Be Modified!'
);
}
// 结果
uploadMsg
(
file
);
},
};
// 保质期上传
// const upload3 = {
// onChange({ file }: any) {
// file.status === 'uploading' ? setimgLoad(true) : setimgLoad(false);
// if (file.status === 'done') {
// let data = file.response.data;
// setPeriod(BackFormat(data.imageName, data.url));
// setcodeStrat(true);
// setTipMain('Binding Content Already Exists, Cannot Be Modified!');
// }
// // 结果
// uploadMsg(file);
// },
// };
// 上传提示
function
uploadMsg
(
file
:
any
)
{
if
(
file
.
status
===
'done'
)
{
// message.success(`${file.name} File Uploaded Successfully`);
}
else
if
(
file
.
status
===
'error'
)
{
message
.
error
(
`
${
file
.
name
}
File Upload Failed.`
);
}
}
// 多选选择改变值
function
onChange
(
checkedValues
:
any
)
{
// 修改选择值
setPropertyFee
(
checkedValues
);
}
// undefind 验证
function
undeFi
(
e
:
any
)
{
if
(
typeof
e
==
'undefined'
)
{
return
null
;
}
else
{
return
e
;
}
}
// 表单验证
const
onFinish
=
(
values
:
any
)
=>
{
let
{
residentialZipCode
}
=
values
.
des
;
let
tel
=
values
.
info
.
tel
;
if
(
values
.
residentialManagerUserName
.
length
<
2
)
{
message
.
error
(
'Please Enter 2-digit Administrator Name!'
);
}
else
if
(
residentialZipCode
.
length
<
6
)
{
message
.
error
(
'Please Enter The Correct Name!'
);
}
else
if
(
tel
.
length
!=
8
&&
tel
.
length
!=
11
)
{
message
.
error
(
'Incorrect Contact Information!'
);
}
else
{
onUpDate
(
values
);
}
};
// 表单提交
function
onUpDate
(
values
:
any
)
{
// 额外判断
let
obj
:
any
=
new
Object
();
obj
.
propertyFee
=
PropertyFee
;
// 小区信息;
let
{
residentialZipCode
,
residentialAddress
,
residentialName
}
=
values
.
des
;
obj
.
residentialZipCode
=
`SINGAPORE
${
residentialZipCode
}
`
;
obj
.
residentialAddress
=
residentialAddress
;
obj
.
residentialName
=
residentialName
;
// 小区时间与管理员
obj
.
residentialManagerUserName
=
undeFi
(
values
.
residentialManagerUserName
);
obj
.
residentialStartWorking
=
values
.
workingHours
[
0
].
format
(
'HH:mm'
);
obj
.
residentialEndWorking
=
values
.
workingHours
[
1
].
format
(
'HH:mm'
);
obj
.
residentialPhone
=
values
.
info
.
tel
;
obj
.
residentialEmail
=
values
.
info
.
email
;
// 上传内容
obj
.
balouscheduleUrl
=
undeFi
(
loubaUpload
.
map
((
item
:
any
)
=>
item
.
name
)[
0
]);
obj
.
serviceGuideUrl
=
undeFi
(
guideUpload
.
map
((
item
:
any
)
=>
item
.
name
)[
0
]);
// obj.lifeServiceUrl = undeFi(periodUpload.map((item: any) => item.name)[0]);
// 小区热线
// 表单结构存在数据不存在情况, 所以要多判断一次
if
(
values
.
help
)
{
obj
.
residentialHotlineName
=
values
.
help
.
residentialHotlineName
?
undeFi
(
values
.
help
.
residentialHotlineName
)
:
'Community Hotline'
;
obj
.
residentialHotline
=
values
.
help
.
residentialHotline
?
undeFi
(
values
.
help
.
residentialHotline
)
:
values
.
info
.
tel
;
// 编辑的时候 为空 判断
if
(
values
.
help
.
time
)
{
obj
.
residentialHotlineServieStartTime
=
undeFi
(
values
.
help
.
time
[
0
]).
format
(
'HH:mm'
);
obj
.
residentialHotlineServieEndTime
=
undeFi
(
values
.
help
.
time
[
1
]).
format
(
'HH:mm'
);
}
else
{
obj
.
residentialHotlineServieStartTime
=
values
.
workingHours
[
0
].
format
(
'HH:mm'
);
obj
.
residentialHotlineServieEndTime
=
values
.
workingHours
[
1
].
format
(
'HH:mm'
);
}
}
else
{
obj
.
residentialHotlineName
=
values
.
info
.
tel
;
obj
.
residentialHotline
=
values
.
info
.
tel
;
obj
.
residentialHotlineServieStartTime
=
values
.
workingHours
[
0
].
format
(
'HH:mm'
);
obj
.
residentialHotlineServieEndTime
=
values
.
workingHours
[
1
].
format
(
'HH:mm'
);
}
if
(
Data
)
{
obj
.
id
=
Data
.
id
;
}
console
.
log
(
values
);
console
.
log
(
obj
);
// 上传
RA
(
29
,
obj
,
'CellList'
,
dispatch
);
}
// 返回
const
goToReturn
=
()
=>
{
history
.
go
(
-
1
);
};
// 小区名输入监听ant
function
insdInp
(
value
:
string
)
{
setCodeName
(
value
);
return
value
;
}
// 正则手机号
const
keyup_tool
=
(
value
:
any
)
=>
{
return
getNumber
(
value
.
replace
(
/
[^\d
^
\.]
+/g
,
''
));
};
// 手机号
const
keyup_communityManagerFee
=
(
e
:
any
)
=>
{
e
.
target
.
value
=
keyup_tool
(
e
.
target
.
value
);
};
// 上传按钮
const
uploadButton
=
(
<
div
>
{
imgLoad
?
<
LoadingOutlined
/>
:
<
PlusOutlined
/>
}
<
div
style=
{
{
marginTop
:
8
}
}
>
Upload
</
div
>
</
div
>
);
// 文件预览
const
handlePreview
=
async
(
file
:
any
)
=>
{
if
(
file
.
url
==
'Transfer'
)
{
// 这是编辑的预览, 需要发送一个请求
let
msg
=
{
// userToken: '',
// type: ans.substr(ans.lastIndexOf('.') + 1),
type
:
'tosCommunityFileService'
,
fileName
:
file
.
name
,
extends
:
Data
.
residentialName
,
};
RA
(
47
,
msg
,
module
,
dispatch
);
}
else
{
setpreviewImage
(
file
);
setpreviewVisible
(
true
);
}
};
// 点击移除图片
const
handRemove
=
(
key
:
any
)
=>
{
key
==
1
?
setLouba
([])
:
key
==
2
?
setGuide
([])
:
setPeriod
([]);
};
// 点击遮罩回调
const
handleCancel
=
()
=>
{
setpreviewVisible
(
false
);
// 每次关闭预览都要清掉弹窗图片信息 -- 防止编辑打开页面直接弹出窗口
setpreviewImage
({});
dispatch
({
type
:
module
+
'/urlRemove'
});
};
// pdf 总页数
const
onDocumentLoadSuccess
=
(
pages
:
any
)
=>
{
setNumPages
(
pages
);
};
// 切换pdf 总数
const
onChangePage
=
(
page
:
any
)
=>
{
setPageNumber
(
page
);
};
return
(
<>
<
Spin
spinning=
{
loading
}
tip=
"loading..."
size=
"large"
>
<
div
className=
"form"
>
<
h3
className=
"capi"
>
<
EditOutlined
/>
{
Data
?
'edit'
:
'Create New'
}
community
<
div
className=
"back"
>
<
Button
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
Back
</
Button
>
</
div
>
</
h3
>
<
Form
name=
"basic"
form=
{
form
}
onFinish=
{
onFinish
}
wrapperCol=
{
{
span
:
18
}
}
layout=
"horizontal"
labelAlign=
"left"
scrollToFirstError=
{
true
}
>
<
Form
.
Item
label=
"Community Name"
name=
"des"
rules=
{
[{
required
:
false
}]
}
className=
"must"
>
<
Input
.
Group
compact
>
<
Form
.
Item
name=
{
[
'des'
,
'residentialZipCode'
]
}
noStyle
rules=
{
village
[
0
]
as
any
}
>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
120
}
}
placeholder=
"6 Postcode"
maxLength=
{
6
}
onKeyUp=
{
keyup_communityManagerFee
}
/>
</
Form
.
Item
>
<
Form
.
Item
name=
{
[
'des'
,
'residentialAddress'
]
}
noStyle
rules=
{
village
[
1
]
as
any
}
>
<
Input
style=
{
{
width
:
'360px'
}
}
placeholder=
"Please enter community adds"
disabled=
{
codeStrat
}
/>
</
Form
.
Item
>
<
div
className=
"li"
>
<
Form
.
Item
name=
{
[
'des'
,
'residentialName'
]
}
normalize=
{
insdInp
}
noStyle
rules=
{
village
[
2
]
as
any
}
>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'260px'
}
}
placeholder=
"Please enter community name"
disabled=
{
codeStrat
}
/>
</
Form
.
Item
>
{
/* 不可修改提示 */
}
<
span
className=
"redFs"
>
{
tipMain
}
</
span
>
</
div
>
</
Input
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
label=
"Working Hours"
name=
"workingHours"
rules=
{
village
[
3
]
as
any
}
>
<
RangePicker
minuteStep=
{
60
}
format=
"HH:mm"
placeholder=
{
[
'Start Time'
,
'End Time'
]
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"Community Telephone"
name=
"info"
rules=
{
[{
required
:
false
}]
}
className=
"must"
>
<
Input
.
Group
compact
>
<
Form
.
Item
name=
{
[
'info'
,
'tel'
]
}
noStyle
rules=
{
village
[
4
]
as
any
}
>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'160px'
}
}
placeholder=
"Please enter phone"
maxLength=
{
11
}
onKeyUp=
{
keyup_communityManagerFee
}
/>
</
Form
.
Item
>
<
Button
type=
"text"
>
-
</
Button
>
<
Form
.
Item
name=
{
[
'info'
,
'email'
]
}
noStyle
rules=
{
village
[
5
]
as
any
}
>
<
Input
style=
{
{
marginLeft
:
'10px'
,
width
:
'180px'
}
}
placeholder=
"Please enter email"
/>
</
Form
.
Item
>
</
Input
.
Group
>
</
Form
.
Item
>
<
Form
.
Item
label=
"Administrator"
name=
"residentialManagerUserName"
rules=
{
village
[
6
]
as
any
}
>
<
Input
style=
{
{
width
:
'160px'
}
}
placeholder=
"Name"
maxLength=
{
30
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"Property Fee"
name=
"propertyFee"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Checkbox
onChange=
{
onChange
}
disabled
>
Online Payment
</
Checkbox
>
<
Checkbox
onChange=
{
onChange
}
checked
>
Offline Payment
</
Checkbox
>
</
Form
.
Item
>
<
hr
/>
{
/* 上传部分 */
}
<
Form
.
Item
label=
"Shuttle Bus Timetable"
name=
"balouscheduleFile"
style=
{
{
marginBottom
:
'0'
,
minHeight
:
159
}
}
>
<
Upload
{
...
uploads
}
{
...
upload1
}
fileList=
{
loubaUpload
}
beforeUpload=
{
beforeUpload
}
listType=
"picture-card"
disabled=
{
codename
==
''
?
true
:
false
}
onPreview=
{
()
=>
handlePreview
(
loubaUpload
[
0
])
}
// 预览
onRemove=
{
()
=>
handRemove
(
1
)
}
//移除
>
{
loubaUpload
.
length
>=
1
?
null
:
uploadButton
}
</
Upload
>
<
div
className=
"tip"
>
<
span
>
Support Files:.jpg, .png, .pdf
</
span
>
</
div
>
</
Form
.
Item
>
{
/* 上传部分 */
}
<
Form
.
Item
label=
"Property Guide"
name=
"serviceGuideFile"
style=
{
{
marginBottom
:
'0'
,
minHeight
:
159
}
}
>
<
Upload
{
...
uploads
}
{
...
upload2
}
fileList=
{
guideUpload
}
beforeUpload=
{
beforeUpload
}
listType=
"picture-card"
disabled=
{
codename
==
''
?
true
:
false
}
onPreview=
{
()
=>
handlePreview
(
guideUpload
[
0
])
}
// 预览
onRemove=
{
()
=>
handRemove
(
2
)
}
//移除
>
{
guideUpload
.
length
>=
1
?
null
:
uploadButton
}
</
Upload
>
<
div
className=
"tip"
>
<
span
>
Support Files:.jpg, .png, .pdf
</
span
>
</
div
>
</
Form
.
Item
>
{
/* 上传部分 */
}
{
/* <Form.Item
label="Warranty Period Service"
name="lifeServiceFile"
style={{ marginBottom: '0', minHeight: 159 }}
>
<Upload
{...uploads}
{...upload3}
fileList={periodUpload}
beforeUpload={beforeUpload}
listType="picture-card"
disabled={codename == '' ? true : false}
onPreview={() => handlePreview(periodUpload[0])} // 预览
onRemove={() => handRemove(3)} //移除
>
{periodUpload.length >= 1 ? null : uploadButton}
</Upload>
<div className="tip">
<span>Support Files:.jpg, .png, .pdf</span>
</div>
</Form.Item> */
}
<
hr
/>
{
/* 帮助中心 */
}
<
Form
.
Item
label=
"Help Center"
name=
"help"
>
<
Input
.
Group
compact
>
<
Form
.
Item
name=
{
[
'help'
,
'residentialHotlineName'
]
}
noStyle
>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'160px'
}
}
placeholder=
"Name Of Hotline"
/>
</
Form
.
Item
>
<
Form
.
Item
name=
{
[
'help'
,
'residentialHotline'
]
}
noStyle
>
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'180px'
}
}
placeholder=
"Hotline"
/>
</
Form
.
Item
>
<
Form
.
Item
name=
{
[
'help'
,
'time'
]
}
noStyle
>
<
RangePicker
format=
"HH:mm"
placeholder=
{
[
'Start Time'
,
'End Time'
]
}
/>
</
Form
.
Item
>
</
Input
.
Group
>
</
Form
.
Item
>
<
hr
/>
{
/* 提交 */
}
<
Form
.
Item
label=
""
colon=
{
false
}
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
>
Submit
</
Button
>
</
Form
.
Item
>
</
Form
>
</
div
>
{
/* 附件预览 */
}
<
Modal
title=
{
previewImage
!=
null
?
previewImage
.
name
:
'File Preview'
}
visible=
{
previewVisible
}
width=
{
800
}
onCancel=
{
handleCancel
}
style=
{
{
textAlign
:
'center'
}
}
footer=
{
null
}
>
{
previewImage
!=
null
?
(
previewImage
.
type
==
'pdf'
?
(
// pdf 换一种
<>
<
PDF
file=
{
previewImage
.
url
}
page=
{
pageNumber
}
scale=
{
1.25
}
onDocumentComplete=
{
onDocumentLoadSuccess
}
/>
<
Pagination
style=
{
{
textAlign
:
'center'
,
marginTop
:
10
,
display
:
'block'
}
}
simple
defaultCurrent=
{
pageNumber
}
total=
{
numPages
*
10
}
onChange=
{
onChangePage
}
/>
</>
)
:
previewImage
.
type
==
'jpg'
||
previewImage
.
type
==
'png'
?
(
// 图片用指定格式
<
Image
src=
{
previewImage
.
url
}
preview=
{
false
}
style=
{
{
margin
:
'0 auto'
,
textAlign
:
'center'
}
}
/>
)
:
(
<
FileViewer
fileType=
{
previewImage
.
type
}
filePath=
{
previewImage
.
url
}
/>
)
)
:
(
''
)
}
</
Modal
>
</
Spin
>
</>
);
};
// export default Adds;
function
map
(
state
:
any
)
{
// console.log(state);
const
Data
=
state
.
CellList
.
DataSave
;
const
{
imgUrl
,
Result
}
=
state
.
CellList
;
const
loading
=
state
.
loading
.
models
.
CellList
?
state
.
loading
.
models
.
CellList
:
false
;
return
{
Data
,
loading
,
Result
,
imgUrl
};
}
export
default
connect
(
map
)(
Adds
);
src/pages/CommunityManagement/CellList/CellList.tsx
View file @
2e1f9cf7
...
...
@@ -13,7 +13,7 @@ import './celllist.less';
const
CellLists
=
(
props
:
any
)
=>
{
const
columns
=
objectColumns
([
[
'
Community
'
,
'residentialName'
],
[
'
Estate
'
,
'residentialName'
],
[
'Administrator'
,
'residentialManagerUserName'
],
[
'Operation Hours'
,
...
...
@@ -131,7 +131,7 @@ const CellLists = (props: any) => {
checklist=
{
Init
?
Init
.
CommunityList
:
null
}
onSubmit=
{
CallBackTitleSearch
}
push=
{
{
name
:
'Create New
Community
'
,
name
:
'Create New
Estate
'
,
url
:
'/CommunityManagement/CellList/Add'
,
}
}
/>
...
...
@@ -164,7 +164,7 @@ const CellLists = (props: any) => {
reload
:
false
,
setting
:
false
,
}
}
headerTitle="
Community
List"
headerTitle="
Estate
List"
// pagination=
{
{
defaultCurrent
:
1
,
total
:
Data
.
totalRow
}
}
/
>
{
village
.
page
?
(
...
...
src/pages/CommunityManagement/CellList/Details.tsx
View file @
2e1f9cf7
...
...
@@ -153,7 +153,7 @@ const Detail = (props: any) => {
<
div
className=
"form"
style=
{
{
width
:
'100%'
,
minHeight
:
'20vh'
}
}
>
<
h3
>
<
EyeOutlined
/>
Community
Details
Estate
Details
<
div
className=
"back"
>
<
Button
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
...
...
@@ -167,7 +167,7 @@ const Detail = (props: any) => {
<
div
className=
"celBox"
>
{
/* 激活码 */
}
<
div
className=
"code"
>
<
li
>
Community
Activation Code
</
li
>
<
li
>
Estate
Activation Code
</
li
>
<
div
style=
{
{
width
:
122
,
...
...
@@ -185,12 +185,12 @@ const Detail = (props: any) => {
{
/* 详情 */
}
<
div
className=
"list-item"
>
<
div
className=
"item"
>
<
label
>
Community
Name:
</
label
>
<
label
>
Estate
Name:
</
label
>
<
span
>
{
detailData
.
communityData
.
residentialName
}
</
span
>
</
div
>
{
/* ---------- */
}
<
div
className=
"item"
>
<
label
>
Community
Address:
</
label
>
<
label
>
Estate
Address:
</
label
>
<
span
>
{
detailData
.
communityData
.
residentialAddress
}
SINGAPORE
{
/* 这是去掉 新加坡 英文字段 */
}
...
...
@@ -373,7 +373,7 @@ const Detail = (props: any) => {
onClick=
{
openModel
}
>
{
' '
}
<
span
className=
"capi"
>
Close the
community
</
span
>
<
span
className=
"capi"
>
Close the
Estate
</
span
>
</
Button
>
</
div
>
)
:
(
...
...
@@ -382,7 +382,7 @@ const Detail = (props: any) => {
{
/* 确认关闭框 */
}
<
Modal
title=
"Are You Sure You Want To Close The
Community
?"
title=
"Are You Sure You Want To Close The
Estate
?"
visible=
{
ModelFee
}
centered=
{
true
}
onCancel=
{
handleCancel
}
...
...
@@ -393,9 +393,8 @@ const Detail = (props: any) => {
confirmLoading=
{
loading
}
>
<
p
className=
"capi"
>
Close the community will delete
{
' '
}
<
span
style=
{
{
color
:
'red'
}
}
>
all owners
</
span
>
in the community .
Close the Estate will delete
<
span
style=
{
{
color
:
'red'
}
}
>
all owners
</
span
>
in the Estate .
</
p
>
<
p
className=
"capi"
>
please operate carefully!
</
p
>
</
Modal
>
...
...
@@ -409,7 +408,7 @@ const Detail = (props: any) => {
// '关闭小区后的下载预约费用列表或者返回'
<
Result
status=
"success"
title=
"
Community
Deleted Successfully!"
title=
"
Estate
Deleted Successfully!"
subTitle=
"There is booking facility information of transaction in the current community, please select download."
extra=
{
[
ModelResult
&&
ModelResult
.
downloadExcelUrl
?
(
...
...
src/pages/CommunityManagement/CommunityAnnouncement/Add.tsx
View file @
2e1f9cf7
...
...
@@ -170,7 +170,7 @@ const Add = (props: any) => {
onFinish=
{
onFinish
}
validateMessages=
{
validateMessages
}
>
<
Form
.
Item
name=
{
'community'
}
className=
"diyItem"
label=
"
Community
"
rules=
{
Notice
[
0
]
}
>
<
Form
.
Item
name=
{
'community'
}
className=
"diyItem"
label=
"
Estate
"
rules=
{
Notice
[
0
]
}
>
<
SelectCommunity
checklist=
{
DataSave
==
null
?
null
:
DataSave
.
communityNum
.
split
(
','
)
}
/>
...
...
src/pages/CommunityManagement/CommunityAnnouncement/CommunityAnnouncement.tsx
View file @
2e1f9cf7
...
...
@@ -22,7 +22,7 @@ const CommunityAnnouncement = (props: any) => {
// 表头
const
columns
:
any
=
[
{
title
:
'
Community
'
,
title
:
'
Estate
'
,
dataIndex
:
'communityNum'
,
width
:
240
,
ellipsis
:
{
...
...
src/pages/CommunityManagement/CommunityAnnouncement/Detail copy.tsx
View file @
2e1f9cf7
...
...
@@ -113,7 +113,7 @@ const Detail = (props: any) => {
{
hanFunStart
(
DataSave
.
noticStatus
)
}
</
Descriptions
.
Item
>
{
/* 生效小区 */
}
<
Descriptions
.
Item
label=
"Effective
Community:
"
span=
{
3
}
>
<
Descriptions
.
Item
label=
"Effective
Estate
"
span=
{
3
}
>
{
CommunityLists
(
DataSave
.
communityNum
)
}
</
Descriptions
.
Item
>
{
/* 内容 */
}
...
...
src/pages/CommunityManagement/CommunityAnnouncement/Detail.tsx
View file @
2e1f9cf7
...
...
@@ -79,7 +79,7 @@ const Add = (props: any) => {
// {...layout}
validateMessages=
{
validateMessages
}
>
<
Form
.
Item
name=
{
'community'
}
className=
"diyItem"
label=
"
Community
"
rules=
{
Notice
[
0
]
}
>
<
Form
.
Item
name=
{
'community'
}
className=
"diyItem"
label=
"
Estate
"
rules=
{
Notice
[
0
]
}
>
<
ShowOptions
list=
{
DataSave
?
DataSave
.
communityNum
.
split
(
','
)
:
[]
}
defaultValue=
{
'Put It Away'
}
...
...
src/pages/CommunityManagement/FacilityBookings/BookingDetail.tsx
View file @
2e1f9cf7
...
...
@@ -161,14 +161,15 @@ const BookingDetail = (props: any) => {
<
hr
/>
<
Descriptions
>
<
Descriptions
.
Item
label=
"
Community
"
>
{
DataSave
.
communityName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"
Estate
"
>
{
DataSave
.
communityName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Facility"
>
{
DataSave
.
categoriesName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Schedule"
>
{
DataSave
.
subscribeDate
}
{
ExtractTime
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"User Name"
>
{
DataSave
.
accountName
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Unit No."
>
{
DataSave
.
buildNumber
}
#
{
DataSave
.
floorNumber
}
-
{
DataSave
.
roomNumber
}
{
DataSave
.
buildNumber
?
DataSave
.
buildNumber
+
' #'
:
''
}
{
DataSave
.
floorNumber
}
-
{
DataSave
.
roomNumber
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Contact Number"
>
{
DataSave
.
accountPhone
}
</
Descriptions
.
Item
>
</
Descriptions
>
...
...
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
View file @
2e1f9cf7
...
...
@@ -142,11 +142,11 @@ const Bookings = (props: any) => {
// 监听输入框是否全部输入完毕
useEffect
(()
=>
{
if
(
Unit
.
buildNumber
&&
Unit
.
floorNumber
&&
Unit
.
roomNumber
)
{
if
(
Unit
.
floorNumber
&&
Unit
.
roomNumber
)
{
RA
(
58
,
{
facilitiesId
:
curString
.
facilitiesId
,
communityName
:
comminityValues
,
buildNumber
:
`BLK
${
Unit
.
buildNumber
}
`
,
buildNumber
:
Unit
.
buildNumber
?
`BLK
${
Unit
.
buildNumber
}
`
:
''
,
floorNumber
:
Unit
.
floorNumber
,
roomNumber
:
Unit
.
roomNumber
,
subscribeDate
:
Time
,
...
...
@@ -361,12 +361,12 @@ const Bookings = (props: any) => {
<
TitleBack
title=
"Facility Bookings"
/>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1item1
}
>
Community
:
</
div
>
<
div
className=
{
styles
.
box1item1
}
>
Estate
:
</
div
>
<
div
className=
{
styles
.
box1item2
}
>
<
Spin
spinning=
{
loading
}
tip=
"Finding..."
>
<
SearchOptionsCommnity
alone=
{
true
}
placeholder=
{
'
Community
Name'
}
placeholder=
{
'
Estate
Name'
}
opname=
{
getFacility
}
defaultName=
{
DataSave
!=
null
?
DataSave
.
communityName
:
null
}
// onSubmit={getFacility}
...
...
@@ -457,7 +457,7 @@ const Bookings = (props: any) => {
<
span
className=
"jio"
style=
{
{
marginLeft
:
0
}
}
>
BLK
</
span
>
<
Form
.
Item
name=
"buildNumber"
rules=
{
BookingsTip
[
2
]
}
>
<
Form
.
Item
name=
"buildNumber"
>
<
Input
placeholder=
"Blk"
style=
{
{
width
:
80
}
}
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
2e1f9cf7
...
...
@@ -319,7 +319,7 @@ const Facility = (props: any) => {
validateMessages=
{
validateMessages
}
>
{
/* 选择小区 */
}
<
Form
.
Item
label=
"
Community
"
name=
"communityName"
rules=
{
NewFaci
[
0
]
}
>
<
Form
.
Item
label=
"
Estate
"
name=
"communityName"
rules=
{
NewFaci
[
0
]
}
>
<
SearchOptionsCommnity
// ubmit={extendName}
defaultName=
{
DataSave
!=
null
?
DataSave
.
communityName
:
null
}
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityBookings.tsx
View file @
2e1f9cf7
...
...
@@ -139,7 +139,7 @@ const FacilityBookings = (props: any) => {
// 表头
const
key
=
[
[
'
Community
'
,
'communityName'
],
[
'
Estate
'
,
'communityName'
],
[
'User Name'
,
'accountName'
],
[
'Facility'
,
'categoriesName'
],
[
...
...
@@ -167,7 +167,7 @@ const FacilityBookings = (props: any) => {
],
];
const
key2
=
[
[
'
Community
'
,
'community'
],
[
'
Estate
'
,
'community'
],
[
'Facilities'
,
'facilities'
,
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityTow.tsx
View file @
2e1f9cf7
...
...
@@ -301,7 +301,7 @@ const FacilityTow = (props: any) => {
{
/* 设施切换 */
}
<
div
className=
{
'FacilityName'
}
>
<
label
>
Community
:
</
label
>
{
DataSave
?
DataSave
.
community
:
''
}
<
label
>
Estate
:
</
label
>
{
DataSave
?
DataSave
.
community
:
''
}
</
div
>
<
Tabs
defaultActiveKey=
"0"
tabPosition=
"top"
onTabClick=
{
(
key
)
=>
onTabClicks
(
key
)
}
>
...
...
src/pages/CommunityManagement/VisitorRecord/VisitorRecord.tsx
View file @
2e1f9cf7
...
...
@@ -36,7 +36,7 @@ const VisitorRecord = (props: any) => {
dataIndex
:
'updateTime'
,
render
:
(
text
:
any
)
=>
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
),
},
{
title
:
'
Community
'
,
dataIndex
:
'visitorCommunity'
},
{
title
:
'
Estate
'
,
dataIndex
:
'visitorCommunity'
},
{
title
:
'Unit No.'
,
dataIndex
:
'inviterAddress'
,
...
...
src/pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
View file @
2e1f9cf7
...
...
@@ -36,7 +36,7 @@ const VisitorRecord = (props: any) => {
dataIndex
:
'updateTime'
,
render
:
(
text
:
any
)
=>
moment
(
text
).
format
(
'YYYY-MM-DD HH:mm:ss'
),
},
{
title
:
'
Community
'
,
dataIndex
:
'visitorCommunity'
},
{
title
:
'
Estate
'
,
dataIndex
:
'visitorCommunity'
},
{
title
:
'Unit No.'
,
dataIndex
:
'inviterAddress'
,
...
...
src/pages/ContractManagement/Contract.tsx
View file @
2e1f9cf7
...
...
@@ -46,22 +46,22 @@ const Contract = (props: any) => {
};
// 表头
const
columns
=
[
{
title
:
'Contract Number'
,
render
:
function
(
record
:
any
)
{
let
mom
=
moment
(
record
.
contractValidEndDate
).
diff
(
moment
(),
'months'
);
// console.log(mom);
if
(
mom
<
3
)
{
return
(
<
Tooltip
title=
"Due Soon"
placement=
"right"
color=
{
'red'
}
key=
{
record
.
id
}
>
<
span
className=
{
styles
.
red
}
>
{
record
.
contractNumber
}
</
span
>
</
Tooltip
>
);
}
else
{
return
<
span
>
{
record
.
contractNumber
}
</
span
>;
}
},
},
// 合同编号
//
{
//
title: 'Contract Number',
//
render: function (record: any) {
//
let mom = moment(record.contractValidEndDate).diff(moment(), 'months');
//
// console.log(mom);
//
if (mom < 3) {
//
return (
//
<Tooltip title="Due Soon" placement="right" color={'red'} key={record.id}>
//
<span className={styles.red}>{record.contractNumber}</span>
//
</Tooltip>
//
);
//
} else {
//
return <span>{record.contractNumber}</span>;
//
}
//
},
//
}, // 合同编号
{
title
:
' Contract Party'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
...
...
@@ -73,7 +73,7 @@ const Contract = (props: any) => {
),
},
//合同方
{
title
:
'Contract Title'
,
dataIndex
:
'contractTitle'
},
// 合同标题
{
title
:
'
Community
Name'
,
dataIndex
:
'communityName'
},
// 小区名
{
title
:
'
Estate
Name'
,
dataIndex
:
'communityName'
},
// 小区名
{
title
:
'Contacts'
,
dataIndex
:
'communityAccount'
},
// 联系人
{
title
:
'Phone'
,
dataIndex
:
'communityPhone'
},
// 联系电话
{
title
:
'Start Date'
,
dataIndex
:
'contractValidStartDate'
},
// 生效时间
...
...
@@ -85,14 +85,14 @@ const Contract = (props: any) => {
<
Space
size=
"middle"
>
<
a
onClick=
{
()
=>
{
Jump
(
record
,
'Edit'
);
Jump
(
record
,
`Edit/${record.id}`
);
}
}
>
Edit
</
a
>
<
a
onClick=
{
()
=>
{
Jump
(
record
,
'Detail'
);
Jump
(
record
,
`Detail/${record.id}`
);
}
}
>
Detail
...
...
src/pages/ContractManagement/ContractContent copy.tsx
deleted
100644 → 0
View file @
4ad66726
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./ContractContent.less'
;
import
{
Input
,
Form
,
message
,
Upload
,
Button
,
DatePicker
,
Pagination
,
Modal
,
Spin
,
Image
,
}
from
'antd'
;
import
{
PlusOutlined
,
LeftOutlined
,
LoadingOutlined
}
from
'@ant-design/icons'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
Loading
}
from
'umi'
;
import
{
RA
}
from
'@/services/tos'
;
import
LINE
from
'../../components/Line/Line'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
import
moment
from
'moment'
;
import
'./ContractContent.less'
;
// 配置英文
import
'moment/locale/en-au'
;
import
locale
from
'antd/es/date-picker/locale/en_US'
;
import
SearchOptionsCommnity
from
'@/components/SearchOptions/SearchOptionsCommnity'
;
import
{
tipList
}
from
'@/utils/tip'
;
import
FileViewer
from
'react-file-viewer'
;
import
PDF
from
'react-pdf-js'
;
import
{
randomString
}
from
'@/utils/string'
;
const
ContractContent
=
(
props
:
any
)
=>
{
const
{
Contract
,
dispatch
,
FileImg
,
loading
}
=
props
;
const
{
DataSaveDetail
}
=
Contract
;
const
{
RangePicker
}
=
DatePicker
;
// 日期组件
const
[
form
]
=
Form
.
useForm
();
// 表单
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'Contract/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
});
};
// 设置之前时间不能选择
function
disabledDate
(
current
:
any
)
{
return
current
&&
current
<=
moment
().
subtract
(
1
,
'days'
).
endOf
(
'day'
);
}
const
[
fileList
,
setFileList
]
=
useState
([]
as
any
);
// 图片列表
const
[
uploadUp
,
setUploadUp
]
=
useState
(
true
);
// 禁止上传 直到选择了小区后
const
[
comtyName
,
setComtyName
]
=
useState
(
null
);
// 小区名字
const
[
tipTime
,
setTipTime
]
=
useState
([
'previous month'
,
'two months'
]
as
any
);
//提示时间
const
[
tipModal
,
settipModal
]
=
useState
(
false
);
//附件弹窗
const
[
fileInfo
,
setfileInfo
]
=
useState
(
null
as
any
);
//附件内容
//pdf 页码内容
const
[
numPages
,
setNumPages
]
=
useState
(
1
as
any
);
// 总页码数
const
[
pageNumber
,
setPageNumber
]
=
useState
(
1
);
// 当前页码数
const
[
imgInfo
,
setimgInfo
]
=
useState
(
null
as
any
);
//本地图片预览
const
[
previewVisible
,
setPreviewVisible
]
=
useState
(
false
);
//本地图片预览弹窗
const
[
imgLoad
,
setimgLoad
]
=
useState
(
false
);
//本地图片预览
useEffect
(()
=>
{
// 如果是添加传来没有值的时候 就清空 否则 赋值给表单
if
(
DataSaveDetail
==
null
)
{
// 清空表单
form
.
resetFields
();
}
else
{
// 发起图片请求
let
objData
=
{
type
:
'tosContractPreview'
,
fileName
:
DataSaveDetail
.
contractFileName
,
extends
:
DataSaveDetail
.
communityName
,
};
RA
(
47
,
objData
);
// 打开禁止
setUploadUp
(
false
);
// 提示时间
let
a1
=
moment
(
DataSaveDetail
.
contractValidEndDate
)
.
subtract
(
2
,
'month'
)
.
format
(
'YYYY-MM-DD'
);
let
a2
=
moment
(
DataSaveDetail
.
contractValidEndDate
)
.
subtract
(
1
,
'month'
)
.
format
(
'YYYY-MM-DD'
);
setTipTime
([
a1
,
a2
]);
// 给到上传绑定
setComtyName
(
DataSaveDetail
.
communityName
);
// 表单内容
form
.
setFieldsValue
({
...
DataSaveDetail
,
upload
:
'ok'
,
time
:
[
moment
(
DataSaveDetail
.
contractValidStartDate
),
moment
(
DataSaveDetail
.
contractValidEndDate
),
],
});
}
},
[
DataSaveDetail
]);
// 监听上传图片列表
useEffect
(()
=>
{
if
(
FileImg
!=
null
)
{
let
obj
=
new
Array
();
for
(
var
i
in
FileImg
)
{
let
a
=
{
uid
:
i
,
name
:
FileImg
[
i
].
fileName
,
status
:
'done'
,
type
:
FileImg
[
i
].
fileName
.
match
(
/
\.([^\.]
+
)
$/
)[
1
].
toLowerCase
(),
url
:
FileImg
[
i
].
fileUrl
,
};
console
.
log
();
obj
.
push
(
a
);
}
setFileList
([...
obj
]);
}
else
{
setFileList
([]);
}
},
[
FileImg
]);
// 监听列表
useEffect
(()
=>
{
if
(
fileList
.
length
==
0
)
{
form
.
setFieldsValue
[
'upload'
]
=
null
;
}
},
[
fileList
]);
// 返回
const
goToReturn
=
()
=>
{
// console.log(fileList)
history
.
back
();
};
// 提交
const
onFinish
=
(
values
:
any
)
=>
{
// 判断有没有文件
if
(
fileList
.
length
==
0
)
{
message
.
error
(
'Please upload the attachment!'
);
}
else
{
values
.
contractValidStartDate
=
values
.
time
[
0
].
format
(
'YYYY-MM-DD'
);
values
.
contractValidEndDate
=
values
.
time
[
1
].
format
(
'YYYY-MM-DD'
);
let
data
=
new
Array
();
for
(
let
i
=
0
;
i
<
fileList
.
length
;
i
++
)
{
data
.
push
(
fileList
[
i
].
name
);
}
values
.
contractFileNameList
=
data
;
// 编辑
if
(
DataSaveDetail
!=
null
)
{
values
.
id
=
DataSaveDetail
.
id
;
}
RA
(
27
,
values
);
// RA(27, values)
}
};
// 上传文件设置
const
uploadProps
=
{
accept
:
'.docx,.jpg,.png,.pdf'
,
action
:
'/tos/image/upload'
,
data
:
{
imageType
:
'tosContract'
,
extends
:
comtyName
},
fileList
:
fileList
,
onChange
:
({
file
}:
{
file
:
any
})
=>
{
console
.
log
(
file
);
if
(
file
.
status
===
'uploading'
)
{
setimgLoad
(
true
);
}
if
(
file
.
status
===
'error'
)
{
message
.
error
(
file
.
name
+
' Upload failed !'
);
setimgLoad
(
false
);
}
if
(
file
.
status
===
'done'
)
{
// message.success(file.name + ' Upload Successful !');
// 实现在线预览
let
obj
=
{
uid
:
randomString
(
12
),
name
:
file
.
name
,
status
:
'done'
,
type
:
file
.
name
.
match
(
/
\.([^\.]
+
)
$/
)[
1
].
toLowerCase
(),
url
:
file
.
response
.
data
,
};
setFileList
([...
fileList
,
obj
]);
// 添加到表单
form
.
setFieldsValue
({
upload
:
'ok'
,
});
setimgLoad
(
false
);
}
},
};
// // 设置提示倒计时
const
changeTime
=
(
data
:
any
,
dateStrings
:
any
)
=>
{
if
(
data
!=
null
)
{
let
a1
=
moment
(
data
[
1
]).
subtract
(
2
,
'month'
).
format
(
'YYYY-MM-DD'
);
let
a2
=
moment
(
data
[
1
]).
subtract
(
1
,
'month'
).
format
(
'YYYY-MM-DD'
);
setTipTime
([
a1
,
a2
]);
}
};
// 选择小区名字并赋值
const
opname
=
(
value
:
any
)
=>
{
// 打开上传 如果选择了 小区就打开 否则 禁止上传
value
?
setUploadUp
(
false
)
:
setUploadUp
(
true
);
// 如果切换了 清掉上传的图片
if
(
value
!=
comtyName
)
{
setFileList
([]);
}
setComtyName
(
value
);
// 赋值小区名字 给到上传
form
.
setFieldsValue
({
communityName
:
value
,
});
};
//本地图预览处理
function
getBase64
(
file
:
any
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
reader
.
onload
=
()
=>
resolve
(
reader
.
result
);
reader
.
onerror
=
(
error
)
=>
reject
(
error
);
});
}
//点击预览
const
onPreviews
=
async
(
file
:
any
)
=>
{
// 有值的话 就是本地预览
if
(
file
.
size
)
{
if
(
!
file
.
url
&&
!
file
.
preview
)
{
file
.
preview
=
await
getBase64
(
file
.
originFileObj
);
}
let
info
=
{
previewImage
:
file
.
url
||
file
.
preview
,
previewTitle
:
file
.
name
||
file
.
url
.
substring
(
file
.
url
.
lastIndexOf
(
'/'
)
+
1
),
};
setPreviewVisible
(
true
);
// 弹窗
setimgInfo
(
info
);
// 图片信息
}
else
{
setfileInfo
(
file
);
// 设置选择的文件
console
.
log
(
file
);
settipModal
(
true
);
}
};
// 关闭预览弹窗
const
handleCancel
=
()
=>
{
settipModal
(
false
);
};
// pdf 总页数
const
onDocumentLoadSuccess
=
(
pages
:
any
)
=>
{
setNumPages
(
pages
);
};
// const onDocumentLoadSuccess = ({ numPages }: any) => {
// //numPages是总页数
// setNumPages(numPages);
// };
// 切换pdf 总数
const
onChangePage
=
(
page
:
any
)
=>
{
setPageNumber
(
page
);
};
// 文件上传判断
function
beforeUpload
(
file
:
any
)
{
// 文件大小判断
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
isLt2M
)
{
message
.
error
(
'File must be less than or equal to 2MB!'
);
}
return
isLt2M
;
}
// 移除文件
const
onRemove
=
async
(
file
:
any
)
=>
{
let
fileListArr
=
fileList
;
for
(
let
i
in
fileListArr
)
{
if
(
fileListArr
[
i
].
uid
==
file
.
uid
)
{
fileListArr
.
splice
(
i
,
1
);
}
}
setFileList
([...
fileListArr
]);
};
// 文件上传按钮
const
uploadButton
=
(
<
div
>
{
imgLoad
?
<
LoadingOutlined
/>
:
<
PlusOutlined
/>
}
<
div
style=
{
{
marginTop
:
5
}
}
>
Upload
</
div
>
</
div
>
);
return
(
<>
<
Spin
spinning=
{
loading
}
>
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
<
div
className=
{
styles
.
box
}
>
<
div
className=
{
styles
.
item1
}
>
{
DataSaveDetail
?
'Edit'
:
'Add'
}
Contract
</
div
>
<
button
className=
{
styles
.
item3
}
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
Back
</
button
>
</
div
>
{
/* 表单 initialValues={defForm} */
}
<
Form
// ref={formRef}
autoComplete=
"off"
form=
{
form
}
name=
"basic"
initialValues=
{
DataSaveDetail
}
onFinish=
{
onFinish
}
// initialValues={defForm}
>
<
div
className=
"contract_box"
>
<
div
className=
"list2"
>
<
Form
.
Item
name=
"contractNumber"
label=
"Contract Number"
rules=
{
[{
required
:
true
,
message
:
`${tipList[0]}`
}]
}
>
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Contract Number"
/>
</
Form
.
Item
>
</
div
>
{
/* 合同编号、甲方、乙方 */
}
<
div
className=
"list_1"
>
<
div
className=
"item_1"
>
<
Form
.
Item
name=
"contractPartyA"
label=
"Contract Party A"
rules=
{
[{
required
:
true
,
message
:
`${tipList[1]}`
}]
}
>
<
Input
style=
{
{
width
:
300
}
}
placeholder=
"Contract Party A"
/>
</
Form
.
Item
>
</
div
>
<
div
className=
"item_1"
>
<
Form
.
Item
name=
"contractPartyB"
label=
"Contract Party B"
rules=
{
[{
required
:
true
,
message
:
`${tipList[2]}`
}]
}
>
<
Input
style=
{
{
width
:
300
}
}
placeholder=
"Contract Party B"
/>
</
Form
.
Item
>
</
div
>
</
div
>
{
/* 小区 */
}
<
div
className=
"list2"
>
<
div
className=
"main"
>
<
Form
.
Item
labelAlign=
"right"
name=
"communityName"
label=
"Community Name"
rules=
{
[{
required
:
true
,
message
:
`${tipList[3]}`
}]
}
>
<
SearchOptionsCommnity
defaultName=
{
DataSaveDetail
?
DataSaveDetail
.
communityName
:
null
}
// ubmit={extendName}
opname=
{
opname
}
/>
</
Form
.
Item
>
</
div
>
</
div
>
{
/* 合同标题 */
}
<
div
className=
"list2"
>
<
Form
.
Item
labelAlign=
"right"
name=
"contractTitle"
label=
"Contract Title"
rules=
{
[{
required
:
true
,
message
:
`${tipList[4]}`
}]
}
>
<
Input
style=
{
{
width
:
500
}
}
placeholder=
"Contract Title"
/>
</
Form
.
Item
>
</
div
>
{
/* 起止时间 */
}
<
div
className=
"list2"
>
<
Form
.
Item
name=
"time"
labelAlign=
"right"
label=
"Contract Time"
rules=
{
[{
required
:
true
,
message
:
`${tipList[5]}`
}]
}
>
<
RangePicker
locale=
{
locale
}
defaultValue=
{
DataSaveDetail
?
DataSaveDetail
.
time
:
null
}
// disabledDate={disabledDate} // 时间限制
placeholder=
{
[
'Effective Date'
,
'Expiration Date'
]
}
onChange=
{
changeTime
}
/>
</
Form
.
Item
>
</
div
>
{
/* 附件上传 */
}
<
div
className=
"list2"
>
<
Form
.
Item
labelAlign=
"right"
name=
"upload"
label=
"Contract Annex"
rules=
{
[{
required
:
true
,
message
:
`Please upload the attachment!`
}]
}
>
<
Upload
{
...
uploadProps
}
listType=
{
'picture-card'
}
disabled=
{
uploadUp
}
beforeUpload=
{
beforeUpload
}
onPreview=
{
onPreviews
}
onRemove=
{
onRemove
}
>
{
fileList
.
length
>=
3
?
null
:
uploadButton
}
</
Upload
>
</
Form
.
Item
>
</
div
>
{
/* 合同内容 */
}
<
div
className=
"list2"
>
<
div
className=
{
styles
.
box8item2x1
}
>
<
Form
.
Item
rules=
{
[{
required
:
true
,
message
:
`${tipList[5]}`
}]
}
label=
"Contract Remarks"
name=
"contractRemindContent"
style=
{
{
marginBottom
:
0
}
}
>
<
TextArea
style=
{
{
padding
:
8
,
width
:
600
}
}
placeholder=
"Remarks"
showCount=
{
true
}
autoSize=
{
{
minRows
:
6
,
maxRows
:
6
}
}
></
TextArea
>
</
Form
.
Item
>
</
div
>
<
div
className=
{
styles
.
box8item2x2
}
style=
{
{
marginLeft
:
150
,
textTransform
:
'capitalize'
}
}
>
<
p
style=
{
{
marginBottom
:
0
}
}
>
The system will send e-mail notification in the
{
' '
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
tipTime
[
0
]
}
</
span
>
and
{
' '
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
tipTime
[
1
]
}
</
span
>
that the contract is about to
expire !
</
p
>
<
p
style=
{
{
marginBottom
:
0
}
}
>
<
span
style=
{
{
color
:
'red'
}
}
>
*
</
span
>
If the time has passed, it will not be
sent
</
p
>
{
/* <span style={{color:'#f00'}}> {stateTime}</span> */
}
</
div
>
</
div
>
<
div
>
<
LINE
/>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
>
Submit
</
Button
>
</
div
>
</
div
>
</
Form
>
{
/* 附件预览 */
}
<
Modal
title=
{
fileInfo
!=
null
?
fileInfo
.
name
:
'File Preview'
}
visible=
{
tipModal
}
width=
{
800
}
onCancel=
{
handleCancel
}
style=
{
{
textAlign
:
'center'
}
}
footer=
{
null
}
>
{
fileInfo
!=
null
?
(
fileInfo
.
type
==
'pdf'
?
(
// pdf 换一种
<>
<
PDF
file=
{
fileInfo
.
url
}
// file=
{
stringSplit
(
fileInfo
.
url
,
'
m
/
cash
')}
page=
{
pageNumber
}
scale=
{
1.25
}
onDocumentComplete=
{
onDocumentLoadSuccess
}
/>
<
Pagination
style=
{
{
textAlign
:
'center'
,
marginTop
:
10
,
display
:
'block'
}
}
simple
defaultCurrent=
{
pageNumber
}
total=
{
numPages
*
10
}
onChange=
{
onChangePage
}
/>
</>
)
:
fileInfo
.
type
==
'jpg'
||
fileInfo
.
type
==
'png'
?
(
// 图片用指定格式
<
Image
src=
{
fileInfo
.
url
}
preview=
{
false
}
style=
{
{
margin
:
'0 auto'
,
textAlign
:
'center'
}
}
/>
)
:
(
<
FileViewer
fileType=
{
fileInfo
.
type
}
filePath=
{
fileInfo
.
url
}
// filePath=
{
stringSplit
(
fileInfo
.
url
,
'
m
/
cash
')}
/>
)
)
:
(
''
)
}
</
Modal
>
{
/* 本地附件预览 */
}
{
imgInfo
!=
null
?
(
<
Modal
visible=
{
previewVisible
}
title=
{
imgInfo
.
previewTitle
}
footer=
{
null
}
onCancel=
{
()
=>
{
setPreviewVisible
(
false
);
}
}
>
<
img
alt=
"example"
style=
{
{
width
:
'100%'
}
}
src=
{
imgInfo
.
previewImage
}
/>
</
Modal
>
)
:
(
''
)
}
</
div
>
</
Spin
>
</>
);
};
function
mapStateToProps
(
state
:
any
)
{
const
{
ContractModel
,
Contract
}
=
state
;
const
FileImg
=
Contract
.
FileImg
;
const
loading
=
state
.
loading
.
models
.
Contract
||
false
;
return
{
ContractModel
,
Contract
,
FileImg
,
loading
,
};
}
export
default
connect
(
mapStateToProps
)(
ContractContent
);
src/pages/ContractManagement/ContractContent.tsx
View file @
2e1f9cf7
...
...
@@ -24,7 +24,9 @@ import SearchOptionsCommnity from '@/components/SearchOptions/SearchOptionsCommn
import
{
tipList
}
from
'@/utils/tip'
;
import
FileViewer
from
'react-file-viewer'
;
import
PDF
from
'react-pdf-js'
;
import
{
Document
,
Page
}
from
'react-pdf'
;
import
{
pdfjs
}
from
'react-pdf'
;
pdfjs
.
GlobalWorkerOptions
.
workerSrc
=
`//cdnjs.cloudflare.com/ajax/libs/pdf.js/
${
pdfjs
.
version
}
/pdf.worker.min.js`
;
import
{
randomString
}
from
'@/utils/string'
;
...
...
@@ -35,7 +37,6 @@ const contentState = {
fileList
:
[],
// 图片列表
uploadUp
:
true
,
// 禁止上传 直到选择了小区后
comtyName
:
null
,
// 已选小区名字
tipTime
:
[
'previous month'
,
'two months'
,
'there months'
],
//时间提示
tipModal
:
false
,
//附件弹窗
fileInfo
:
null
,
//附件内容
numPages
:
1
,
// pdf 总页码数
...
...
@@ -56,9 +57,6 @@ const contentReducer = (state: any, action: any) => {
case
'setComtyName'
:
// 小区名字
return
{
...
state
,
comtyName
:
action
.
payload
};
case
'setTipTime'
:
// 时间提示
return
{
...
state
,
tipTime
:
action
.
payload
};
case
'settipModal'
:
// 附件弹窗
return
{
...
state
,
tipModal
:
action
.
payload
};
...
...
@@ -88,7 +86,7 @@ const contentReducer = (state: any, action: any) => {
/******* useState 改造 useReducer *********/
const
ContractContent
=
(
props
:
any
)
=>
{
const
{
Contract
,
dispatch
,
FileImg
,
loading
}
=
props
;
const
{
Contract
,
dispatch
,
FileImg
,
loading
,
match
}
=
props
;
const
{
DataSaveDetail
}
=
Contract
;
const
{
RangePicker
}
=
DatePicker
;
// 日期组件
...
...
@@ -100,9 +98,17 @@ const ContractContent = (props: any) => {
/* 使用 useReducer */
const
[
state
,
dispatchs
]
=
useReducer
(
contentReducer
,
contentState
);
// useEffect(() => {
// if (match.params.id) {
// RA(64, { id: match.params.id }, module, dispatch);
// }
// }, [match]);
useEffect
(()
=>
{
// 如果是添加传来没有值的时候 就清空 否则 赋值给表单
if
(
DataSaveDetail
==
null
)
{
// 如果存在id且 传过来的值没有的话 就返回列表
if
(
DataSaveDetail
==
null
&&
match
.
params
.
id
)
{
history
.
go
(
-
1
);
}
else
if
(
DataSaveDetail
==
null
)
{
// 清空表单
form
.
resetFields
();
}
else
{
...
...
@@ -119,15 +125,16 @@ const ContractContent = (props: any) => {
dispatchs
({
type
:
'setUploadUp'
,
payload
:
false
});
// 提示时间
let
a1
=
timeOver
(
DataSaveDetail
.
contractValidEndDate
,
2
);
let
a2
=
timeOver
(
DataSaveDetail
.
contractValidEndDate
,
1
);
let
a3
=
timeOver
(
DataSaveDetail
.
contractValidEndDate
,
3
);
//
let a1 = timeOver(DataSaveDetail.contractValidEndDate, 2);
//
let a2 = timeOver(DataSaveDetail.contractValidEndDate, 1);
//
let a3 = timeOver(DataSaveDetail.contractValidEndDate, 3);
// setTipTime([a1, a2]);
dispatchs
({
type
:
'setTipTime'
,
payload
:
[
a3
,
a1
,
a2
]
});
//
dispatchs({ type: 'setTipTime', payload: [a3, a1, a2] });
// 给到上传绑定
// setComtyName(DataSaveDetail.communityName);
dispatchs
({
type
:
'setComtyName'
,
payload
:
DataSaveDetail
.
communityName
});
// 表单内容
form
.
setFieldsValue
({
...
...
@@ -137,9 +144,14 @@ const ContractContent = (props: any) => {
moment
(
DataSaveDetail
.
contractValidStartDate
),
moment
(
DataSaveDetail
.
contractValidEndDate
),
],
license
:
[
moment
(
DataSaveDetail
.
licenseStartTime
),
moment
(
DataSaveDetail
.
licenseEndTime
)],
lnsurancePolicy
:
[
moment
(
DataSaveDetail
.
lnsurancePolicyStartTime
),
moment
(
DataSaveDetail
.
lnsurancePolicyEndTime
),
],
});
}
},
[
DataSaveDetail
]);
},
[
DataSaveDetail
,
match
]);
// 时间转换
const
timeOver
=
(
time
:
any
,
day
:
any
)
=>
{
...
...
@@ -190,14 +202,26 @@ const ContractContent = (props: any) => {
if
(
state
.
fileList
.
length
==
0
)
{
message
.
error
(
'Please upload the contract annex!'
);
}
else
{
// 合同起止时间
values
.
contractValidStartDate
=
values
.
time
[
0
].
format
(
'YYYY-MM-DD'
);
values
.
contractValidEndDate
=
values
.
time
[
1
].
format
(
'YYYY-MM-DD'
);
// 执照起止时间
values
.
licenseStartTime
=
values
.
license
[
0
].
format
(
'YYYY-MM-DD'
);
values
.
licenseEndTime
=
values
.
license
[
1
].
format
(
'YYYY-MM-DD'
);
// 保险起止时间
values
.
lnsurancePolicyStartTime
=
values
.
lnsurancePolicy
[
0
].
format
(
'YYYY-MM-DD'
);
values
.
lnsurancePolicyEndTime
=
values
.
lnsurancePolicy
[
1
].
format
(
'YYYY-MM-DD'
);
let
data
=
new
Array
();
for
(
let
i
=
0
;
i
<
state
.
fileList
.
length
;
i
++
)
{
data
.
push
(
state
.
fileList
[
i
].
name
);
}
values
.
contractFileNameList
=
data
;
delete
values
.
lnsurancePolicy
;
delete
values
.
license
;
delete
values
.
time
;
// 编辑
if
(
DataSaveDetail
!=
null
)
{
values
.
id
=
DataSaveDetail
.
id
;
...
...
@@ -215,7 +239,7 @@ const ContractContent = (props: any) => {
data
:
{
imageType
:
'tosContract'
,
extends
:
state
.
comtyName
},
fileList
:
state
.
fileList
,
onChange
:
({
file
}:
{
file
:
any
})
=>
{
console
.
log
(
file
);
//
console.log(file);
if
(
file
.
status
===
'uploading'
)
{
// setimgLoad(true);
dispatchs
({
type
:
'setimgLoad'
,
payload
:
true
});
...
...
@@ -251,15 +275,15 @@ const ContractContent = (props: any) => {
};
// // 设置提示倒计时
const
changeTime
=
(
data
:
any
,
dateStrings
:
any
)
=>
{
if
(
data
!=
null
)
{
let
a1
=
timeOver
(
data
[
1
],
2
);
let
a2
=
timeOver
(
data
[
1
],
1
);
let
a3
=
timeOver
(
data
[
1
],
3
);
// setTipTime([a1, a2]);
dispatchs
({
type
:
'setTipTime'
,
payload
:
[
a3
,
a1
,
a2
]
});
}
};
//
const changeTime = (data: any, dateStrings: any) => {
//
if (data != null) {
//
let a1 = timeOver(data[1], 2);
//
let a2 = timeOver(data[1], 1);
//
let a3 = timeOver(data[1], 3);
//
// setTipTime([a1, a2]);
//
dispatchs({ type: 'setTipTime', payload: [a3, a1, a2] });
//
}
//
};
// 选择小区名字并赋值
const
opname
=
(
value
:
any
)
=>
{
...
...
@@ -320,16 +344,11 @@ const ContractContent = (props: any) => {
};
// pdf 总页数
const
onDocumentLoadSuccess
=
(
pages
:
any
)
=>
{
//
setNumPages(pages);
dispatchs
({
type
:
'setNumPages'
,
payload
:
p
ages
});
const
onDocumentLoadSuccess
=
(
{
numPages
}
:
any
)
=>
{
//
numPages是总页数
dispatchs
({
type
:
'setNumPages'
,
payload
:
numP
ages
});
};
// const onDocumentLoadSuccess = ({ numPages }: any) => {
// //numPages是总页数
// setNumPages(numPages);
// };
// 切换pdf 总数
const
onChangePage
=
(
page
:
any
)
=>
{
// setPageNumber(page);
...
...
@@ -366,6 +385,13 @@ const ContractContent = (props: any) => {
</
div
>
);
// word 失效
const
onError
=
()
=>
{
message
.
error
(
'file error !'
);
// settipModal(false);
dispatchs
({
type
:
'settipModal'
,
payload
:
false
});
};
return
(
<>
<
Spin
spinning=
{
loading
}
>
...
...
@@ -389,11 +415,11 @@ const ContractContent = (props: any) => {
// initialValues={defForm}
>
<
div
className=
"contract_box"
>
<
div
className=
"list2"
>
{
/*
<div className="list2">
<Form.Item name="contractNumber" label="Contract Number" rules={tipList[0]}>
<Input style={{ width: 200 }} placeholder="Contract Number" maxLength={25} />
</Form.Item>
</
div
>
</div>
*/
}
{
/* 合同编号、甲方、乙方 */
}
<
div
className=
"list_1"
>
{
/* <div className="item_1">
...
...
@@ -417,7 +443,7 @@ const ContractContent = (props: any) => {
<
Form
.
Item
labelAlign=
"right"
name=
"communityName"
label=
"
Community
Name"
label=
"
Estate
Name"
rules=
{
tipList
[
3
]
}
>
<
SearchOptionsCommnity
...
...
@@ -442,12 +468,17 @@ const ContractContent = (props: any) => {
{
/* 起止时间 */
}
<
div
className=
"list2"
>
<
Form
.
Item
name=
"time"
labelAlign=
"right"
label=
"Contract Time"
rules=
{
tipList
[
5
]
}
>
<
Form
.
Item
name=
"time"
labelAlign=
"right"
label=
"Contract Duration"
rules=
{
tipList
[
5
]
}
>
<
RangePicker
defaultValue=
{
DataSaveDetail
?
DataSaveDetail
.
time
:
null
}
// disabledDate={disabledDate} // 时间限制
placeholder=
{
[
'Effective Date'
,
'Expir
ation
Date'
]
}
onChange=
{
changeTime
}
placeholder=
{
[
'Effective Date'
,
'Expir
y
Date'
]
}
//
onChange={changeTime}
/>
</
Form
.
Item
>
</
div
>
...
...
@@ -473,41 +504,65 @@ const ContractContent = (props: any) => {
</
Form
.
Item
>
</
div
>
{
/* 合同内容 */
}
{
/* --------------------------4.21新增------------------------- */
}
{
/* 许可证编号 */
}
<
div
className=
"list2"
>
<
div
className=
{
styles
.
box8item2x1
}
>
<
Form
.
Item
rules=
{
tipList
[
7
]
}
label=
"Contract Remarks"
name=
"contractRemindContent"
style=
{
{
marginBottom
:
0
}
}
>
<
TextArea
style=
{
{
padding
:
'8px 0'
,
width
:
600
}
}
placeholder=
"Remarks"
showCount=
{
true
}
autoSize=
{
{
minRows
:
6
,
maxRows
:
6
}
}
></
TextArea
>
</
Form
.
Item
>
</
div
>
<
div
className=
{
styles
.
box8item2x2
}
style=
{
{
marginLeft
:
150
,
textTransform
:
'capitalize'
}
}
<
Form
.
Item
labelAlign=
"right"
name=
"licenseNo"
label=
"License No"
rules=
{
tipList
[
4
]
}
>
<
p
style=
{
{
marginBottom
:
0
}
}
>
The system will send email on
{
' '
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
state
.
tipTime
[
0
]
}
</
span
>
,
{
' '
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
state
.
tipTime
[
1
]
}
</
span
>
and
{
' '
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
state
.
tipTime
[
2
]
}
</
span
>
before the contract is
about to expire!
</
p
>
<
p
style=
{
{
marginBottom
:
0
}
}
>
<
span
style=
{
{
color
:
'red'
}
}
>
*
</
span
>
If the time has passed, it will not be
sent
</
p
>
{
/* <span style={{color:'#f00'}}> {stateTime}</span> */
}
</
div
>
<
Input
style=
{
{
width
:
500
}
}
placeholder=
"License No"
/>
</
Form
.
Item
>
</
div
>
{
/* 许可证编号起止时间 */
}
<
div
className=
"list2"
>
<
Form
.
Item
name=
"license"
labelAlign=
"right"
label=
"License Duration"
rules=
{
tipList
[
5
]
}
>
<
RangePicker
defaultValue=
{
DataSaveDetail
?
DataSaveDetail
.
time
:
null
}
// disabledDate={disabledDate} // 时间限制
placeholder=
{
[
'Effective Date'
,
'Expiry Date'
]
}
// onChange={changeTime}
/>
</
Form
.
Item
>
</
div
>
{
/* 保险编号 */
}
<
div
className=
"list2"
>
<
Form
.
Item
labelAlign=
"right"
name=
"lnsurancePolicyNo"
label=
"lnsurance Policy No"
rules=
{
tipList
[
4
]
}
>
<
Input
style=
{
{
width
:
500
}
}
placeholder=
"lnsurance Policy No"
/>
</
Form
.
Item
>
</
div
>
{
/* 保险编号起止时间 */
}
<
div
className=
"list2"
>
<
Form
.
Item
name=
"lnsurancePolicy"
labelAlign=
"right"
label=
"Policy Tenure"
rules=
{
tipList
[
5
]
}
>
<
RangePicker
defaultValue=
{
DataSaveDetail
?
DataSaveDetail
.
time
:
null
}
// disabledDate={disabledDate} // 时间限制
placeholder=
{
[
'Effective Date'
,
'Expiry Date'
]
}
// onChange={changeTime}
/>
</
Form
.
Item
>
</
div
>
<
LINE
/>
<
div
style=
{
{
marginLeft
:
150
}
}
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
>
...
...
@@ -530,13 +585,19 @@ const ContractContent = (props: any) => {
state
.
fileInfo
.
type
==
'pdf'
?
(
// pdf 换一种
<>
<
PDF
file=
{
state
.
fileInfo
.
url
}
// file=
{
stringSplit
(
fileInfo
.
url
,
'
m
/
cash
')}
page=
{
state
.
pageNumber
}
scale=
{
1.25
}
onDocumentComplete=
{
onDocumentLoadSuccess
}
/>
<
Document
file=
{
state
.
fileInfo
.
url
}
//文件路径
onLoadSuccess=
{
onDocumentLoadSuccess
}
//成功加载文档后调用
// onLoadError=
{
console
.
error
}
//加载失败时调用
loading=
{
<
Spin
indicator=
{
<
LoadingOutlined
spin
/>
}
/>
}
//加载时提示语句
onLoadError=
{
onError
}
>
<
Page
key=
{
state
.
fileInfo
.
id
}
pageNumber=
{
state
.
pageNumber
}
//当前页页码
scale=
{
1.25
}
/>
</
Document
>
<
Pagination
style=
{
{
textAlign
:
'center'
,
marginTop
:
10
,
display
:
'block'
}
}
simple
...
...
@@ -557,6 +618,8 @@ const ContractContent = (props: any) => {
<
FileViewer
fileType=
{
state
.
fileInfo
.
type
}
filePath=
{
state
.
fileInfo
.
url
}
key=
{
state
.
fileInfo
.
url
}
onError=
{
onError
}
// filePath=
{
stringSplit
(
fileInfo
.
url
,
'
m
/
cash
')}
/>
)
...
...
src/pages/ContractManagement/ContractDetail.tsx
View file @
2e1f9cf7
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./ContractContent.less'
;
import
{
Input
,
Form
,
message
,
Upload
,
DatePicker
,
Pagination
,
Modal
,
Spin
,
Image
}
from
'antd'
;
import
{
LeftOutlined
}
from
'@ant-design/icons'
;
import
{
LeftOutlined
,
LoadingOutlined
}
from
'@ant-design/icons'
;
import
{
connect
,
history
}
from
'umi'
;
import
LINE
from
'../../components/Line/Line'
;
const
{
TextArea
}
=
Input
;
import
PDF
from
'react-pdf-js'
;
import
{
Document
,
Page
}
from
'react-pdf'
;
import
{
pdfjs
}
from
'react-pdf'
;
pdfjs
.
GlobalWorkerOptions
.
workerSrc
=
`//cdnjs.cloudflare.com/ajax/libs/pdf.js/
${
pdfjs
.
version
}
/pdf.worker.min.js`
;
import
moment
from
'moment'
;
import
'./ContractContent.less'
;
...
...
@@ -64,14 +64,14 @@ const ContractContent = (props: any) => {
setUploadUp
(
false
);
// 提示时间
// 提示时间
let
a1
=
timeOver
(
DataSaveDetail
.
contractValidEndDate
,
2
);
let
a2
=
timeOver
(
DataSaveDetail
.
contractValidEndDate
,
1
);
let
a3
=
timeOver
(
DataSaveDetail
.
contractValidEndDate
,
3
);
//
//
提示时间
//
let a1 = timeOver(DataSaveDetail.contractValidEndDate, 2);
//
let a2 = timeOver(DataSaveDetail.contractValidEndDate, 1);
//
let a3 = timeOver(DataSaveDetail.contractValidEndDate, 3);
// setTipTime([a1, a2]);
//
//
setTipTime([a1, a2]);
setTipTime
([
a3
,
a1
,
a2
]);
//
setTipTime([a3, a1, a2]);
// 给到上传绑定
setComtyName
(
DataSaveDetail
.
communityName
);
...
...
@@ -83,6 +83,12 @@ const ContractContent = (props: any) => {
moment
(
DataSaveDetail
.
contractValidStartDate
),
moment
(
DataSaveDetail
.
contractValidEndDate
),
],
// 执照起止时间
license
:
[
moment
(
DataSaveDetail
.
licenseStartTime
),
moment
(
DataSaveDetail
.
licenseEndTime
)],
lnsurancePolicy
:
[
moment
(
DataSaveDetail
.
lnsurancePolicyStartTime
),
moment
(
DataSaveDetail
.
lnsurancePolicyEndTime
),
],
});
}
},
[
DataSaveDetail
]);
...
...
@@ -172,8 +178,8 @@ const ContractContent = (props: any) => {
setPreviewVisible
(
true
);
// 弹窗
setimgInfo
(
info
);
// 图片信息
}
else
{
setfileInfo
(
file
);
// 设置选择的文件
console
.
log
(
file
);
setfileInfo
(
{
...
file
}
);
// 设置选择的文件
//
console.log(file);
settipModal
(
true
);
}
};
...
...
@@ -183,16 +189,25 @@ const ContractContent = (props: any) => {
settipModal
(
false
);
};
// pdf 总页数
const
onDocumentLoadSuccess
=
(
pages
:
any
)
=>
{
setNumPages
(
pages
);
};
// 切换pdf 总数
const
onChangePage
=
(
page
:
any
)
=>
{
setPageNumber
(
page
);
};
// 文件失效
const
onError
=
()
=>
{
message
.
error
(
'file error !'
);
settipModal
(
false
);
};
// pdf 总页数
const
onDocumentLoadSuccess
=
({
numPages
}:
any
)
=>
{
//numPages是总页数
setNumPages
(
numPages
);
};
// const temp = require('@/assets/d1.pdf');
return
(
<>
<
Spin
spinning=
{
loading
}
>
...
...
@@ -214,7 +229,7 @@ const ContractContent = (props: any) => {
initialValues=
{
DataSaveDetail
}
>
<
div
className=
"contract_box"
>
<
div
className=
"list2"
>
{
/*
<div className="list2">
<Form.Item
name="contractNumber"
label="Contract Number"
...
...
@@ -222,7 +237,7 @@ const ContractContent = (props: any) => {
>
<Input style={{ width: 200 }} disabled placeholder="Contract Number" />
</Form.Item>
</
div
>
</div>
*/
}
{
/* 合同编号、甲方、乙方 */
}
<
div
className=
"list_1"
>
<
div
className=
"item_1"
>
...
...
@@ -241,7 +256,7 @@ const ContractContent = (props: any) => {
<
Form
.
Item
labelAlign=
"right"
name=
"communityName"
label=
"
Community
Name"
label=
"
Estate
Name"
rules=
{
[{
required
:
true
,
message
:
`${tipList[3]}`
}]
}
>
<
SearchOptionsCommnity
...
...
@@ -268,13 +283,13 @@ const ContractContent = (props: any) => {
<
Form
.
Item
name=
"time"
labelAlign=
"right"
label=
"Contract
Time
"
label=
"Contract
Duration
"
rules=
{
[{
required
:
true
,
message
:
`${tipList[5]}`
}]
}
>
<
RangePicker
defaultValue=
{
DataSaveDetail
?
DataSaveDetail
.
time
:
null
}
disabledDate=
{
disabledDate
}
placeholder=
{
[
'Effective Date'
,
'Expir
ation
Date'
]
}
placeholder=
{
[
'Effective Date'
,
'Expir
y
Date'
]
}
disabled
/>
</
Form
.
Item
>
...
...
@@ -297,39 +312,65 @@ const ContractContent = (props: any) => {
</
Form
.
Item
>
</
div
>
{
/* 合同内容 */
}
{
/* --------------------------4.21新增------------------------- */
}
{
/* 许可证编号 */
}
<
div
className=
"list2"
>
<
div
className=
{
styles
.
box8item2x1
}
>
<
Form
.
Item
rules=
{
[{
required
:
true
,
message
:
`${tipList[5]}`
}]
}
label=
"Contract Remarks"
name=
"contractRemindContent"
style=
{
{
marginBottom
:
0
}
}
>
<
TextArea
style=
{
{
padding
:
8
,
width
:
600
}
}
placeholder=
"Remarks"
showCount=
{
true
}
disabled
autoSize=
{
{
minRows
:
6
,
maxRows
:
6
}
}
></
TextArea
>
</
Form
.
Item
>
</
div
>
<
div
className=
{
styles
.
box8item2x2
}
style=
{
{
marginLeft
:
150
,
textTransform
:
'capitalize'
}
}
<
Form
.
Item
labelAlign=
"right"
name=
"licenseNo"
label=
"License No"
rules=
{
tipList
[
4
]
}
>
<
p
style=
{
{
marginBottom
:
0
}
}
>
The system will send email on
<
span
style=
{
{
color
:
'red'
}
}
>
{
tipTime
[
0
]
}
</
span
>
{
' '
}
,
<
span
style=
{
{
color
:
'red'
}
}
>
{
tipTime
[
1
]
}
</
span
>
and
{
' '
}
<
span
style=
{
{
color
:
'red'
}
}
>
{
tipTime
[
2
]
}
</
span
>
before the contract is about
to expire!
</
p
>
<
p
style=
{
{
marginBottom
:
0
}
}
>
<
span
style=
{
{
color
:
'red'
}
}
>
*
</
span
>
If the time has passed, it will not be
sent
</
p
>
</
div
>
<
Input
style=
{
{
width
:
500
}
}
placeholder=
"License No"
disabled
/>
</
Form
.
Item
>
</
div
>
{
/* 许可证编号起止时间 */
}
<
div
className=
"list2"
>
<
Form
.
Item
name=
"license"
labelAlign=
"right"
label=
"License Duration"
rules=
{
tipList
[
5
]
}
>
<
RangePicker
defaultValue=
{
DataSaveDetail
?
DataSaveDetail
.
time
:
null
}
// disabledDate={disabledDate} // 时间限制
placeholder=
{
[
'Effective Date'
,
'Expiry Date'
]
}
// onChange={changeTime}
disabled
/>
</
Form
.
Item
>
</
div
>
{
/* 保险编号 */
}
<
div
className=
"list2"
>
<
Form
.
Item
labelAlign=
"right"
name=
"lnsurancePolicyNo"
label=
"lnsurance Policy No"
rules=
{
tipList
[
4
]
}
>
<
Input
style=
{
{
width
:
500
}
}
placeholder=
"lnsurance Policy No"
disabled
/>
</
Form
.
Item
>
</
div
>
{
/* 保险编号起止时间 */
}
<
div
className=
"list2"
>
<
Form
.
Item
name=
"lnsurancePolicy"
labelAlign=
"right"
label=
"Policy Tenure"
rules=
{
tipList
[
5
]
}
>
<
RangePicker
defaultValue=
{
DataSaveDetail
?
DataSaveDetail
.
time
:
null
}
// disabledDate={disabledDate} // 时间限制
placeholder=
{
[
'Effective Date'
,
'Expiry Date'
]
}
// onChange={changeTime}
disabled
/>
</
Form
.
Item
>
</
div
>
<
div
>
...
...
@@ -346,17 +387,25 @@ const ContractContent = (props: any) => {
onCancel=
{
handleCancel
}
style=
{
{
textAlign
:
'center'
}
}
footer=
{
null
}
forceRender=
{
true
}
>
{
fileInfo
!=
null
?
(
fileInfo
.
type
==
'pdf'
?
(
// pdf 换一种
<>
<
PDF
file=
{
fileInfo
.
url
}
page=
{
pageNumber
}
scale=
{
1.25
}
onDocumentComplete=
{
onDocumentLoadSuccess
}
/>
<
Document
file=
{
fileInfo
.
url
}
//文件路径
onLoadSuccess=
{
onDocumentLoadSuccess
}
//成功加载文档后调用
// onLoadError=
{
console
.
error
}
//加载失败时调用
loading=
{
<
Spin
indicator=
{
<
LoadingOutlined
spin
/>
}
/>
}
//加载时提示语句
onLoadError=
{
onError
}
>
<
Page
key=
{
fileInfo
.
id
}
pageNumber=
{
pageNumber
}
//当前页页码
scale=
{
1.25
}
/>
</
Document
>
<
Pagination
style=
{
{
textAlign
:
'center'
,
marginTop
:
10
,
display
:
'block'
}
}
simple
...
...
@@ -374,7 +423,12 @@ const ContractContent = (props: any) => {
style=
{
{
margin
:
'0 auto'
,
textAlign
:
'center'
}
}
/>
)
:
(
<
FileViewer
fileType=
{
fileInfo
.
type
}
filePath=
{
fileInfo
.
url
}
/>
<
FileViewer
key=
{
fileInfo
.
url
}
fileType=
{
fileInfo
.
type
}
filePath=
{
fileInfo
.
url
}
onError=
{
onError
}
/>
)
)
:
(
''
...
...
src/pages/OrderManagement/Order.tsx
View file @
2e1f9cf7
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Input
,
Tabs
,
Table
,
Space
,
Button
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Input
,
Tabs
,
Table
,
Space
,
Button
}
from
'antd'
;
const
{
TabPane
}
=
Tabs
;
import
{
connect
,
history
}
from
'umi'
;
const
orderStatus
=
[[
0
,
"已发单"
],
[
1
,
"待上门"
],
[
2
,
"进行中"
],
[
3
,
"已完成"
],
[
4
,
"已取消"
]]
const
goToDetail
=
()
=>
{
}
const
orderStatus
=
[
[
0
,
'已发单'
],
[
1
,
'待上门'
],
[
2
,
'进行中'
],
[
3
,
'已完成'
],
[
4
,
'已取消'
],
];
const
goToDetail
=
()
=>
{};
const
columns
=
objectColumns
([
[
"OrderNumber"
,
"orderNumber"
],
[
"Community"
,
"communityName"
],
[
"Owner Name"
,
"ownerName"
],
[
"type"
,
null
,
(
text
:
any
,
record
:
any
)
=>
(<
div
>
{
orderStatus
[
record
.
orderStatus
][
1
]
}
</
div
>)],
[
"Content"
,
"serviceContent"
],
[
"Order Time"
,
null
,
(
text
:
any
,
record
:
any
)
=>
(<
div
>
{
getStringToTime
(
record
.
orderSendTime
)
}
</
div
>)],
[
"Booking Time"
,
null
,
(
text
:
any
,
record
:
any
)
=>
(<
div
>
{
getStringToTime
(
record
.
orderReserveTime
)
}
</
div
>)],
[
"Actions"
,
null
,
(
text
:
any
,
record
:
any
)
=>
(<
Space
size=
"middle"
>
<
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Detail
</
a
></
Space
>)],
])
[
'OrderNumber'
,
'orderNumber'
],
[
'Estate'
,
'communityName'
],
[
'Owner Name'
,
'ownerName'
],
[
'type'
,
null
,
(
text
:
any
,
record
:
any
)
=>
<
div
>
{
orderStatus
[
record
.
orderStatus
][
1
]
}
</
div
>],
[
'Content'
,
'serviceContent'
],
[
'Order Time'
,
null
,
(
text
:
any
,
record
:
any
)
=>
<
div
>
{
getStringToTime
(
record
.
orderSendTime
)
}
</
div
>,
],
[
'Booking Time'
,
null
,
(
text
:
any
,
record
:
any
)
=>
<
div
>
{
getStringToTime
(
record
.
orderReserveTime
)
}
</
div
>,
],
[
'Actions'
,
null
,
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
{
' '
}
<
a
onClick=
{
goToDetail
.
bind
(
this
,
record
)
}
>
Detail
</
a
>
</
Space
>
),
],
]);
import
{
RA
}
from
'@/utils/method'
;
import
{
objectColumns
}
from
'@/utils/string'
;
import
TitleSearch
from
'@/components/TitleSearch/TitleSearch'
;
import
{
timestampToTime
,
getStringToTime
}
from
'@/utils/time'
;
const
module
=
"OrderManagement"
const
Order
=
(
props
:
any
)
=>
{
const
module
=
'OrderManagement'
;
const
Order
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data
}
=
props
;
const
formRef
=
useRef
(
null
)
const
formRef
=
useRef
(
null
)
;
useEffect
(()
=>
{
RA
(
30
,
{
orderNumber
:
""
,
serviceType
:
"0"
},
module
,
dispatch
)
},
[])
RA
(
30
,
{
orderNumber
:
''
,
serviceType
:
'0'
},
module
,
dispatch
);
},
[])
;
// useEffect(() => {
// if (Data != null) {
// console.log("首页信息")
...
...
@@ -41,43 +60,46 @@ const Order = (props:any) => {
// },[Data])
const
CallBackTitleSearch
=
(
value
:
any
)
=>
{
if
(
value
.
orderNumber
!=
null
||
value
.
serviceType
!=
null
)
{
RA
(
30
,
value
,
module
,
dispatch
)
RA
(
30
,
value
,
module
,
dispatch
)
;
}
}
}
;
return
(
<
div
style=
{
{
width
:
"100%"
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
"#ffffff"
}
}
>
{
Data
!=
null
?
<>
<
div
style=
{
{
width
:
'100%'
,
minWidth
:
1020
,
padding
:
34
,
backgroundColor
:
'#ffffff'
}
}
>
{
Data
!=
null
?
(
<>
<
TitleSearch
status=
{
[{
name
:
[
"serviceType"
,
"订单状态"
],
data
:
orderStatus
}]
}
status=
{
[
{
name
:
[
'serviceType'
,
'订单状态'
],
data
:
orderStatus
,
},
]
}
listkey=
{
[
'orderNumber'
]
}
list=
{
[
'订单号'
]
}
onSubmit=
{
CallBackTitleSearch
}
></
TitleSearch
>
<
Table
loading=
{
false
}
rowKey=
"id"
style=
{
{
marginTop
:
16
}
}
<
Table
loading=
{
false
}
rowKey=
"id"
style=
{
{
marginTop
:
16
}
}
dataSource=
{
Data
.
data
.
rows
}
columns=
{
columns
}
pagination=
{
{
current
:
1
,
total
:
Data
.
total
}
}
/>
</>:
null
}
pagination=
{
{
current
:
1
,
total
:
Data
.
total
}
}
/>
</>
)
:
null
}
</
div
>
);
};
function
map
(
state
:
any
)
{
const
{
Data
}
=
state
[
module
]
return
{
Data
}
const
{
Data
}
=
state
[
module
];
return
{
Data
};
}
export
default
connect
(
map
)(
Order
);
// 订单管理模块的order_status int(11) NULL
// 订单管理模块的order_status int(11) NULL
// /tos/tosOrder/get
// {
// "orderNumber":"123",
...
...
@@ -106,4 +128,4 @@ export default connect(map)(Order);
// order_send_time 发单时间
// order_accept_time 接单时间
// order_reserve_time 预约时间
\ No newline at end of file
// order_reserve_time 预约时间
src/pages/OrderManagement/OrderManagement.tsx
View file @
2e1f9cf7
import
React
from
'react'
;
import
{
connect
,
routerRedux
}
from
'dva'
;
import
{
Table
,
Button
,
Input
,
Select
,
Modal
,
Tooltip
,
Upload
,
Icon
,
Checkbox
,
Row
,
Radio
,
Tag
}
from
"antd"
;
import
{
connect
,
routerRedux
}
from
'dva'
;
import
{
Table
,
Button
,
Input
,
Select
,
Modal
,
Tooltip
,
Upload
,
Icon
,
Checkbox
,
Row
,
Radio
,
Tag
,
}
from
'antd'
;
import
styles
from
'./style.less'
;
import
{
ConnectState
}
from
"@/models/connect"
;
import
{
ConnectState
}
from
'@/models/connect'
;
// import XLSX from "@/pages/account/xlsx.core.min";
import
{
router
}
from
"umi"
;
import
{
router
}
from
'umi'
;
import
CheckGroup
from
'./CheckGroup'
;
import
zhCN
from
'ant-design-vue/es/locale-provider/zh_CN'
;
import
moment
from
'moment'
;
import
'moment/locale/zh-cn'
;
class
OrderManagement
extends
React
.
Component
{
//构造
constructor
(
props
)
{
super
(
props
);
...
...
@@ -26,11 +37,15 @@ class OrderManagement extends React.Component {
name
:
''
,
model
:
''
,
status
:
undefined
,
statusList
:
[{
label
:
"在线"
,
value
:
"1"
},
{
label
:
"故障"
,
value
:
"3"
},{
label
:
"未激活"
,
value
:
"4"
}],
statusList
:
[
{
label
:
'在线'
,
value
:
'1'
},
{
label
:
'故障'
,
value
:
'3'
},
{
label
:
'未激活'
,
value
:
'4'
},
],
provinceList
:
[],
cityList
:
[{
name
:
"未选择省"
}],
districtList
:
[{
name
:
"未选择市"
}],
streetList
:
[{
name
:
"未选择区"
}],
cityList
:
[{
name
:
'未选择省'
}],
districtList
:
[{
name
:
'未选择市'
}],
streetList
:
[{
name
:
'未选择区'
}],
delData
:
[],
visible
:
false
,
deviceStatus
:
''
,
...
...
@@ -39,147 +54,150 @@ class OrderManagement extends React.Component {
used
:
null
,
newAdd
:
null
,
strList
:
[],
newList
:[],
authorityList
:[
newList
:
[],
authorityList
:
[
{
"children"
:
[
children
:
[
{
"children"
:
[],
"hasChildren"
:
false
,
"is_admin"
:
1
,
"menuid"
:
5
,
"name"
:
"组织架构"
,
"parentid"
:
1
,
"sort"
:
10
,
"state"
:
""
,
"is_checked"
:
true
children
:
[],
hasChildren
:
false
,
is_admin
:
1
,
menuid
:
5
,
name
:
'组织架构'
,
parentid
:
1
,
sort
:
10
,
state
:
''
,
is_checked
:
true
,
},
{
"children"
:
[],
"hasChildren"
:
false
,
"is_admin"
:
1
,
"menuid"
:
6
,
"name"
:
"员工管理"
,
"parentid"
:
1
,
"sort"
:
20
,
"state"
:
""
,
"is_checked"
:
true
children
:
[],
hasChildren
:
false
,
is_admin
:
1
,
menuid
:
6
,
name
:
'员工管理'
,
parentid
:
1
,
sort
:
20
,
state
:
''
,
is_checked
:
true
,
},
{
"children"
:
[],
"hasChildren"
:
false
,
"is_admin"
:
1
,
"menuid"
:
11
,
"name"
:
"角色管理"
,
"parentid"
:
1
,
"sort"
:
30
,
"state"
:
""
,
"is_checked"
:
false
children
:
[],
hasChildren
:
false
,
is_admin
:
1
,
menuid
:
11
,
name
:
'角色管理'
,
parentid
:
1
,
sort
:
30
,
state
:
''
,
is_checked
:
false
,
},
{
"children"
:
[],
"hasChildren"
:
false
,
"is_admin"
:
1
,
"menuid"
:
17
,
"name"
:
"企业设置"
,
"parentid"
:
1
,
"sort"
:
2
,
"state"
:
""
,
"is_checked"
:
true
children
:
[],
hasChildren
:
false
,
is_admin
:
1
,
menuid
:
17
,
name
:
'企业设置'
,
parentid
:
1
,
sort
:
2
,
state
:
''
,
is_checked
:
true
,
},
{
"children"
:
[],
"hasChildren"
:
false
,
"is_admin"
:
1
,
"menuid"
:
26
,
"name"
:
"员工管理"
,
"parentid"
:
1
,
"sort"
:
1
,
"state"
:
""
,
"is_checked"
:
false
}
children
:
[],
hasChildren
:
false
,
is_admin
:
1
,
menuid
:
26
,
name
:
'员工管理'
,
parentid
:
1
,
sort
:
1
,
state
:
''
,
is_checked
:
false
,
}
,
],
"hasChildren"
:
true
,
"is_admin"
:
1
,
"menuid"
:
1
,
"name"
:
"企业"
,
"parentid"
:
0
,
"sort"
:
20
,
"state"
:
"closed"
,
"is_checked"
:
true
hasChildren
:
true
,
is_admin
:
1
,
menuid
:
1
,
name
:
'企业'
,
parentid
:
0
,
sort
:
20
,
state
:
'closed'
,
is_checked
:
true
,
},
{
"children"
:
[
children
:
[
{
"children"
:
[],
"hasChildren"
:
false
,
"is_admin"
:
1
,
"menuid"
:
12
,
"name"
:
"供应商订单"
,
"parentid"
:
4
,
"sort"
:
10
,
"state"
:
""
,
"is_checked"
:
true
children
:
[],
hasChildren
:
false
,
is_admin
:
1
,
menuid
:
12
,
name
:
'供应商订单'
,
parentid
:
4
,
sort
:
10
,
state
:
''
,
is_checked
:
true
,
},
{
"children"
:
[],
"hasChildren"
:
false
,
"is_admin"
:
1
,
"menuid"
:
15
,
"name"
:
"供应商管理"
,
"parentid"
:
4
,
"sort"
:
20
,
"state"
:
""
,
"is_checked"
:
false
children
:
[],
hasChildren
:
false
,
is_admin
:
1
,
menuid
:
15
,
name
:
'供应商管理'
,
parentid
:
4
,
sort
:
20
,
state
:
''
,
is_checked
:
false
,
},
{
"children"
:
[],
"hasChildren"
:
false
,
"is_admin"
:
1
,
"menuid"
:
16
,
"name"
:
"成为供应商"
,
"parentid"
:
4
,
"sort"
:
30
,
"state"
:
""
,
"is_checked"
:
true
}
children
:
[],
hasChildren
:
false
,
is_admin
:
1
,
menuid
:
16
,
name
:
'成为供应商'
,
parentid
:
4
,
sort
:
30
,
state
:
''
,
is_checked
:
true
,
}
,
],
"hasChildren"
:
true
,
"is_admin"
:
1
,
"menuid"
:
4
,
"name"
:
"供应商"
,
"parentid"
:
0
,
"sort"
:
11
,
"state"
:
"closed"
,
"is_checked"
:
true
}
hasChildren
:
true
,
is_admin
:
1
,
menuid
:
4
,
name
:
'供应商'
,
parentid
:
0
,
sort
:
11
,
state
:
'closed'
,
is_checked
:
true
,
}
,
],
}
}
;
}
/*----------------- 方法集 ------------------*/
//重置
reset
=
()
=>
{
this
.
setState
({
province
:
undefined
,
city
:
undefined
,
district
:
undefined
,
street
:
undefined
,
status
:
undefined
,
name
:
''
,
},()
=>
{
this
.
getDevice
();
});
this
.
setState
(
{
province
:
undefined
,
city
:
undefined
,
district
:
undefined
,
street
:
undefined
,
status
:
undefined
,
name
:
''
,
},
()
=>
{
this
.
getDevice
();
},
);
};
//模态框相关
showModal
=
()
=>
{
let
flag
=
0
;
const
nowUser
=
this
.
props
.
currentUser
;
if
(
nowUser
.
permission
!=
null
)
{
for
(
let
i
=
0
;
i
<
nowUser
.
permission
.
length
;
i
++
)
{
if
(
nowUser
.
permission
[
i
]
==
"4"
)
{
if
(
this
.
state
.
delData
==
null
||
this
.
state
.
delData
.
length
<=
0
)
{
alert
(
"未选中删除项!"
);
if
(
nowUser
.
permission
!=
null
)
{
for
(
let
i
=
0
;
i
<
nowUser
.
permission
.
length
;
i
++
)
{
if
(
nowUser
.
permission
[
i
]
==
'4'
)
{
if
(
this
.
state
.
delData
==
null
||
this
.
state
.
delData
.
length
<=
0
)
{
alert
(
'未选中删除项!'
);
return
;
}
flag
=
1
;
...
...
@@ -188,12 +206,12 @@ class OrderManagement extends React.Component {
});
}
}
}
else
{
//alert("找不到用户权限记录!");
}
else
{
//alert("找不到用户权限记录!");
//return;;
}
if
(
flag
==
0
)
{
alert
(
"缺少设备删除权限!"
);
if
(
flag
==
0
)
{
alert
(
'缺少设备删除权限!'
);
}
};
handleOk
=
()
=>
{
...
...
@@ -218,30 +236,29 @@ class OrderManagement extends React.Component {
model
:
this
.
state
.
model
,
status
:
this
.
state
.
status
,
id
:
this
.
props
.
currentUser
.
userid
,
userPhone
:
"18813787835"
userPhone
:
'18813787835'
,
};
this
.
props
.
dispatch
({
type
:
'orderManagementModel/getOrder'
,
payload
:
params
,
callback
:
(
res
)
=>
{
if
(
res
)
{
/*this.setState({
data: res.rows,
total: res.total,
})*/
if
(
res
.
error_code
==
"0000"
)
{
if
(
res
.
error_code
==
'0000'
)
{
this
.
setState
({
data
:
res
.
data
.
rows
,
total
:
res
.
data
.
total
,
})
})
;
}
if
(
res
.
error_code
==
"0001"
)
{
if
(
res
.
error_code
==
'0001'
)
{
alert
(
res
.
error_msg
);
}
else
if
(
res
.
error_code
==
"0002"
)
{
}
else
if
(
res
.
error_code
==
'0002'
)
{
alert
(
res
.
error_msg
);
}
else
if
(
res
.
error_code
==
"0008"
)
{
}
else
if
(
res
.
error_code
==
'0008'
)
{
alert
(
res
.
error_msg
);
window
.
location
.
href
=
'/'
;
router
.
replace
(
'/'
);
...
...
@@ -250,44 +267,48 @@ class OrderManagement extends React.Component {
// alert("Tos查询出错!未知错误!");
// }
}
}
}
,
});
};
//跳转到编辑页面
edit
=
(
params
)
=>
{
let
flag
=
0
;
const
nowUser
=
this
.
props
.
currentUser
;
if
(
nowUser
.
permission
!=
null
)
{
if
(
params
==
null
)
{
for
(
let
i
=
0
;
i
<
nowUser
.
permission
.
length
;
i
++
)
{
if
(
nowUser
.
permission
[
i
]
==
"3"
)
{
if
(
nowUser
.
permission
!=
null
)
{
if
(
params
==
null
)
{
for
(
let
i
=
0
;
i
<
nowUser
.
permission
.
length
;
i
++
)
{
if
(
nowUser
.
permission
[
i
]
==
'3'
)
{
flag
=
1
;
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'tosUser/create'
,
query
:
params
,
}))
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'tosUser/create'
,
query
:
params
,
}),
);
}
}
}
else
{
for
(
let
i
=
0
;
i
<
nowUser
.
permission
.
length
;
i
++
)
{
if
(
nowUser
.
permission
[
i
]
==
"2"
)
{
}
else
{
for
(
let
i
=
0
;
i
<
nowUser
.
permission
.
length
;
i
++
)
{
if
(
nowUser
.
permission
[
i
]
==
'2'
)
{
flag
=
1
;
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/tosUser/edit'
,
query
:
params
,
}))
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/tosUser/edit'
,
query
:
params
,
}),
);
}
}
}
}
else
{
//alert("找不到用户权限记录!");
}
else
{
//alert("找不到用户权限记录!");
//return;;
}
if
(
flag
==
0
)
{
if
(
params
==
null
)
{
alert
(
"缺少设备添加权限!"
);
}
else
{
alert
(
"缺少设备修改权限!"
);
if
(
flag
==
0
)
{
if
(
params
==
null
)
{
alert
(
'缺少设备添加权限!'
);
}
else
{
alert
(
'缺少设备修改权限!'
);
}
}
};
...
...
@@ -296,87 +317,93 @@ class OrderManagement extends React.Component {
edit2
=
(
params
)
=>
{
let
flag
=
0
;
const
nowUser
=
this
.
props
.
currentUser
;
if
(
nowUser
.
permission
!=
null
)
{
if
(
params
==
null
)
{
for
(
let
i
=
0
;
i
<
nowUser
.
permission
.
length
;
i
++
)
{
if
(
nowUser
.
permission
[
i
]
==
"3"
)
{
if
(
nowUser
.
permission
!=
null
)
{
if
(
params
==
null
)
{
for
(
let
i
=
0
;
i
<
nowUser
.
permission
.
length
;
i
++
)
{
if
(
nowUser
.
permission
[
i
]
==
'3'
)
{
flag
=
1
;
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'tosUser/edit'
,
query
:
params
,
}))
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'tosUser/edit'
,
query
:
params
,
}),
);
}
}
}
else
{
for
(
let
i
=
0
;
i
<
nowUser
.
permission
.
length
;
i
++
)
{
if
(
nowUser
.
permission
[
i
]
==
"2"
)
{
}
else
{
for
(
let
i
=
0
;
i
<
nowUser
.
permission
.
length
;
i
++
)
{
if
(
nowUser
.
permission
[
i
]
==
'2'
)
{
flag
=
1
;
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/tosUser/edit'
,
query
:
params
,
}))
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/tosUser/edit'
,
query
:
params
,
}),
);
}
}
}
}
else
{
//alert("找不到用户权限记录!");
}
else
{
//alert("找不到用户权限记录!");
//return;;
}
if
(
flag
==
0
)
{
if
(
params
==
null
)
{
alert
(
"缺少设备添加权限!"
);
}
else
{
alert
(
"缺少设备修改权限!"
);
if
(
flag
==
0
)
{
if
(
params
==
null
)
{
alert
(
'缺少设备添加权限!'
);
}
else
{
alert
(
'缺少设备修改权限!'
);
}
}
};
//跳转到详情页面
details
=
(
params
)
=>
{
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/orderManagement/Detail'
,
query
:
params
,
}))
this
.
props
.
dispatch
(
routerRedux
.
push
({
pathname
:
'/orderManagement/Detail'
,
query
:
params
,
}),
);
};
//设备状态变更
statusChange
=
(
e
)
=>
{
this
.
setState
({
status
:
e
==
undefined
?
undefined
:
e
});
this
.
setState
({
status
:
e
==
undefined
?
undefined
:
e
});
};
//设备名称和型号修改
nameAndModelChange
=
(
e
)
=>
{
this
.
setState
({
name
:
e
.
target
.
value
});
this
.
setState
({
name
:
e
.
target
.
value
});
};
//加载省
provinceload
=
(
code
)
=>
{
this
.
props
.
dispatch
({
type
:
'deviceModel/getRegion'
,
payload
:
{
code
:
code
,
},
payload
:
{
code
:
code
},
callback
:
(
res
)
=>
{
if
(
res
)
{
this
.
setState
({
provinceList
:
res
.
data
,
});
}
}
}
,
});
};
//省变更
provinceChange
=
(
e
)
=>
{
if
(
e
==
undefined
)
{
this
.
setState
({
cityList
:
[{
name
:
"未选择省"
}],
districtList
:
[{
name
:
"未选择市"
}],
streetList
:
[{
name
:
"未选择区"
}],
cityList
:
[{
name
:
'未选择省'
}],
districtList
:
[{
name
:
'未选择市'
}],
streetList
:
[{
name
:
'未选择区'
}],
province
:
undefined
,
city
:
undefined
,
district
:
undefined
,
street
:
undefined
,
})
})
;
}
else
{
this
.
setState
({
province
:
{
label
:
e
.
label
,}
});
this
.
setState
({
province
:
{
label
:
e
.
label
}
});
this
.
props
.
dispatch
({
type
:
'deviceModel/getRegion'
,
payload
:
{
code
:
e
.
key
,
},
payload
:
{
code
:
e
.
key
},
callback
:
(
res
)
=>
{
if
(
res
)
{
this
.
setState
({
...
...
@@ -386,7 +413,7 @@ class OrderManagement extends React.Component {
street
:
undefined
,
});
}
}
}
,
});
}
};
...
...
@@ -394,17 +421,17 @@ class OrderManagement extends React.Component {
cityChange
=
(
e
)
=>
{
if
(
e
==
undefined
)
{
this
.
setState
({
districtList
:
[{
name
:
"未选择市"
}],
streetList
:
[{
name
:
"未选择区"
}],
districtList
:
[{
name
:
'未选择市'
}],
streetList
:
[{
name
:
'未选择区'
}],
city
:
undefined
,
district
:
undefined
,
street
:
undefined
,
})
})
;
}
else
{
this
.
setState
({
city
:
{
label
:
e
.
label
,}
});
this
.
setState
({
city
:
{
label
:
e
.
label
}
});
this
.
props
.
dispatch
({
type
:
'deviceModel/getRegion'
,
payload
:
{
code
:
e
.
key
,
},
payload
:
{
code
:
e
.
key
},
callback
:
(
res
)
=>
{
if
(
res
)
{
this
.
setState
({
...
...
@@ -413,7 +440,7 @@ class OrderManagement extends React.Component {
street
:
undefined
,
});
}
}
}
,
});
}
};
...
...
@@ -421,15 +448,15 @@ class OrderManagement extends React.Component {
districtChange
=
(
e
)
=>
{
if
(
e
==
undefined
)
{
this
.
setState
({
streetList
:
[{
name
:
"未选择区"
}],
streetList
:
[{
name
:
'未选择区'
}],
district
:
undefined
,
street
:
undefined
,
})
})
;
}
else
{
this
.
setState
({
district
:
{
label
:
e
.
label
,}
});
this
.
setState
({
district
:
{
label
:
e
.
label
}
});
this
.
props
.
dispatch
({
type
:
'deviceModel/getRegion'
,
payload
:
{
code
:
e
.
key
,
},
payload
:
{
code
:
e
.
key
},
callback
:
(
res
)
=>
{
if
(
res
)
{
this
.
setState
({
...
...
@@ -437,7 +464,7 @@ class OrderManagement extends React.Component {
street
:
undefined
,
});
}
}
}
,
});
}
};
...
...
@@ -448,36 +475,36 @@ class OrderManagement extends React.Component {
payload
:
this
.
state
.
delData
,
callback
:
(
res
)
=>
{
if
(
res
)
{
if
(
res
.
error_code
==
"0000"
)
{
if
(
res
.
error_code
==
'0000'
)
{
alert
(
res
.
error_msg
);
this
.
getDevice
();
}
else
if
(
res
.
error_code
==
"0001"
)
{
}
else
if
(
res
.
error_code
==
'0001'
)
{
alert
(
res
.
error_msg
);
}
else
if
(
res
.
error_code
==
"0002"
)
{
}
else
if
(
res
.
error_code
==
'0002'
)
{
alert
(
res
.
error_msg
);
}
else
if
(
res
.
error_code
==
"0008"
)
{
}
else
if
(
res
.
error_code
==
'0008'
)
{
alert
(
res
.
error_msg
);
window
.
location
.
href
=
'/'
;
router
.
replace
(
'/'
);
}
else
{
alert
(
"删除失败!未知错误!"
);
alert
(
'删除失败!未知错误!'
);
}
}
}
}
,
});
}
;
}
//显示信息
info
()
{
const
{
used
,
newAdd
,
strList
}
=
this
.
state
;
const
strSelect
=
strList
.
map
((
item
)
=>
(
<
p
>
{
item
}
</
p
>
));
const
{
used
,
newAdd
,
strList
}
=
this
.
state
;
const
strSelect
=
strList
.
map
((
item
)
=>
<
p
>
{
item
}
</
p
>);
Modal
.
info
({
title
:
'批量导入结果'
,
content
:
(
<
div
>
<
p
>
绑定
<
span
style=
{
{
color
:
"lightgreen"
,
fontSize
:
24
}
}
>
{
newAdd
}
</
span
>
台设备,
以下
<
span
style=
{
{
color
:
"red"
,
fontSize
:
24
}
}
>
{
used
}
</
span
>
台设备已被占用
</
p
>
<
p
>
绑定
<
span
style=
{
{
color
:
'lightgreen'
,
fontSize
:
24
}
}
>
{
newAdd
}
</
span
>
台设备, 以下
<
span
style=
{
{
color
:
'red'
,
fontSize
:
24
}
}
>
{
used
}
</
span
>
台设备已被占用
</
p
>
{
strSelect
}
</
div
>
),
...
...
@@ -493,7 +520,7 @@ class OrderManagement extends React.Component {
//表格列名
columns
=
[
{
title
:
'Service
Community
'
,
title
:
'Service
Estate
'
,
dataIndex
:
'communityName'
,
key
:
'communityName'
,
},
...
...
@@ -526,12 +553,7 @@ class OrderManagement extends React.Component {
title
:
'Status'
,
dataIndex
:
'orderStatus'
,
key
:
'orderStatus'
,
render
:
(
text
,
record
)
=>
(
<
span
>
{
record
.
orderStatus
==
'0'
?
"已发单"
:
"待上门"
}
</
span
>
),
render
:
(
text
,
record
)
=>
<
span
>
{
record
.
orderStatus
==
'0'
?
'已发单'
:
'待上门'
}
</
span
>,
},
/*{
...
...
@@ -555,8 +577,12 @@ class OrderManagement extends React.Component {
key
:
'action'
,
render
:
(
text
,
record
)
=>
(
<
span
>
<
Button
style=
{
{
background
:
'transparent'
,
border
:
0
,
color
:
'#1890FF'
}
}
onClick=
{
()
=>
this
.
details
(
record
)
}
>
Details
</
Button
>
<
Button
style=
{
{
background
:
'transparent'
,
border
:
0
,
color
:
'#1890FF'
}
}
onClick=
{
()
=>
this
.
details
(
record
)
}
>
Details
</
Button
>
{
/*<Button style={{background: 'transparent', border: 0, color: '#1890FF'}}*/
}
{
/* onClick={() => this.edit(record)}>Edit</Button>*/
}
</
span
>
...
...
@@ -565,17 +591,28 @@ class OrderManagement extends React.Component {
];
//行选择
rowSelection
=
{
onChange
:
(
selectedRowKeys
,
selectedRows
)
=>
{
onChange
:
(
selectedRowKeys
,
selectedRows
)
=>
{
this
.
setState
({
delData
:
selectedRows
delData
:
selectedRows
,
});
},
};
//渲染
render
()
{
const
{
data
,
total
,
statusList
,
provinceList
,
cityList
,
districtList
,
province
,
city
,
district
,
status
,
name
,
newList
,
authorityList
data
,
total
,
statusList
,
provinceList
,
cityList
,
districtList
,
province
,
city
,
district
,
status
,
name
,
newList
,
authorityList
,
}
=
this
.
state
;
const
uploadprops
=
{
// 这里我们只接受excel2007以后版本的文件,accept就是指定文件选择框的文件类型
...
...
@@ -591,7 +628,7 @@ class OrderManagement extends React.Component {
const
rABS
=
true
;
const
f
=
fileList
[
0
];
const
reader
=
new
FileReader
();
reader
.
onload
=
e
=>
{
reader
.
onload
=
(
e
)
=>
{
let
dataResult
=
e
.
target
.
result
;
if
(
!
rABS
)
dataResult
=
new
Uint8Array
(
dataResult
);
const
workbook
=
XLSX
.
read
(
dataResult
,
{
...
...
@@ -600,12 +637,17 @@ class OrderManagement extends React.Component {
// 假设我们的数据在第一个标签
const
firstWorksheet
=
workbook
.
Sheets
[
workbook
.
SheetNames
[
0
]];
// XLSX自带了一个工具把导入的数据转成json
const
jsonArr
=
XLSX
.
utils
.
sheet_to_json
(
firstWorksheet
,
{
header
:
1
});
const
jsonArr
=
XLSX
.
utils
.
sheet_to_json
(
firstWorksheet
,
{
header
:
1
});
// 通过自定义的方法处理Json,得到Excel原始数据传给后端,后端统一处理
const
oldDeviceList
=
[];
for
(
let
i
=
0
;
i
<
jsonArr
.
length
;
i
++
)
{
//去重
if
(
!
oldDeviceList
.
includes
(
jsonArr
[
i
][
0
])
&&
jsonArr
[
i
][
0
]
!=
''
&&
jsonArr
[
i
][
0
]
!=
null
&&
jsonArr
[
i
][
0
]
!=
undefined
)
{
if
(
!
oldDeviceList
.
includes
(
jsonArr
[
i
][
0
])
&&
jsonArr
[
i
][
0
]
!=
''
&&
jsonArr
[
i
][
0
]
!=
null
&&
jsonArr
[
i
][
0
]
!=
undefined
)
{
oldDeviceList
.
push
(
jsonArr
[
i
][
0
]);
}
}
...
...
@@ -617,16 +659,19 @@ class OrderManagement extends React.Component {
},
callback
:
(
res
)
=>
{
if
(
res
)
{
this
.
setState
({
used
:
res
.
data
.
used
,
newAdd
:
res
.
data
.
integer
,
strList
:
res
.
data
.
strList
,
},()
=>
{
this
.
getDevice
();
this
.
info
();
});
this
.
setState
(
{
used
:
res
.
data
.
used
,
newAdd
:
res
.
data
.
integer
,
strList
:
res
.
data
.
strList
,
},
()
=>
{
this
.
getDevice
();
this
.
info
();
},
);
}
}
}
,
});
};
if
(
rABS
)
reader
.
readAsBinaryString
(
f
);
...
...
@@ -649,18 +694,24 @@ class OrderManagement extends React.Component {
return
(
<
div
className=
{
styles
.
body
}
>
<
div
className=
{
styles
.
inputBox
}
>
<
Input
className=
{
styles
.
input
}
placeholder=
"Community"
value=
{
name
}
onChange=
{
(
e
)
=>
this
.
nameAndModelChange
(
e
)
}
/>
<
Input
className=
{
styles
.
input
}
placeholder=
"Service Type"
value=
{
name
}
onChange=
{
(
e
)
=>
this
.
nameAndModelChange
(
e
)
}
/>
<
Input
className=
{
styles
.
input
}
placeholder=
"Order State"
value=
{
name
}
onChange=
{
(
e
)
=>
this
.
nameAndModelChange
(
e
)
}
/>
<
Input
className=
{
styles
.
input
}
placeholder=
"Estate"
value=
{
name
}
onChange=
{
(
e
)
=>
this
.
nameAndModelChange
(
e
)
}
/>
<
Input
className=
{
styles
.
input
}
placeholder=
"Service Type"
value=
{
name
}
onChange=
{
(
e
)
=>
this
.
nameAndModelChange
(
e
)
}
/>
<
Input
className=
{
styles
.
input
}
placeholder=
"Order State"
value=
{
name
}
onChange=
{
(
e
)
=>
this
.
nameAndModelChange
(
e
)
}
/>
{
/*<Select className={styles.input}*/
}
{
/* placeholder="设备状态"*/
}
{
/* onChange={(e) => this.statusChange(e)}*/
}
...
...
@@ -690,14 +741,15 @@ class OrderManagement extends React.Component {
{
/* value={district}>*/
}
{
/* {districtSelect}*/
}
{
/*</Select>*/
}
</
div
>
<
div
>
<
Button
className=
{
styles
.
button1
}
onClick=
{
()
=>
this
.
getDevice
()
}
>
Search
</
Button
>
<
Button
className=
{
styles
.
button
}
onClick=
{
()
=>
this
.
reset
()
}
>
重置
</
Button
>
<
Button
className=
{
styles
.
button1
}
onClick=
{
()
=>
this
.
getDevice
()
}
>
Search
</
Button
>
<
Button
className=
{
styles
.
button
}
onClick=
{
()
=>
this
.
reset
()
}
>
重置
</
Button
>
{
/*<Button className={styles.button2} onClick={() => this.edit(null)}>Create New Owner</Button>*/
}
{
/*<Upload {...uploadprops}>*/
}
{
/* <Tooltip title="">*/
}
...
...
@@ -710,28 +762,33 @@ class OrderManagement extends React.Component {
</
div
>
<
div
>
<
Table
rowKey=
{
record
=>
record
.
deviceID
}
rowKey=
{
(
record
)
=>
record
.
deviceID
}
className=
{
styles
.
table
}
rowSelection=
{
this
.
rowSelection
}
columns=
{
this
.
columns
}
dataSource=
{
data
}
size=
"small"
pagination=
{
{
showQuickJumper
:
true
,
pageSize
:
10
,
total
:
total
}
}
pagination=
{
{
showQuickJumper
:
true
,
pageSize
:
10
,
total
:
total
}
}
/>
<
Button
className=
{
styles
.
button3
}
onClick=
{
()
=>
this
.
showModal
()
}
>
Delete
</
Button
>
<
Button
className=
{
styles
.
button3
}
onClick=
{
()
=>
this
.
showModal
()
}
>
Delete
</
Button
>
</
div
>
<
Modal
title=
"确认删除?"
visible=
{
this
.
state
.
visible
}
onOk=
{
this
.
handleOk
}
onCancel=
{
this
.
handleCancel
}
>
<
div
style=
{
{
textAlign
:
"center"
}
}
><
p
style=
{
{
fontSize
:
18
}
}
>
删除信息将不可恢复
</
p
></
div
>
onCancel=
{
this
.
handleCancel
}
>
<
div
style=
{
{
textAlign
:
'center'
}
}
>
<
p
style=
{
{
fontSize
:
18
}
}
>
删除信息将不可恢复
</
p
>
</
div
>
</
Modal
>
</
div
>
);
}
}
export
default
connect
(({
user
}:
ConnectState
)
=>
({
export
default
connect
(({
user
}:
ConnectState
)
=>
({
currentUser
:
user
.
currentUser
,
}))(
OrderManagement
);
src/pages/PropertyManagement/ChargeManager.tsx
View file @
2e1f9cf7
...
...
@@ -104,7 +104,7 @@ const ChargeManager = (props: any) => {
dataIndex
:
'tosOwnerName'
,
},
{
title
:
'
Community
Name'
,
title
:
'
Estate
Name'
,
dataIndex
:
'communityName'
,
},
{
...
...
src/pages/UserManagement/LIFEUserManagement/Users.tsx
View file @
2e1f9cf7
...
...
@@ -60,7 +60,12 @@ const Users = (props: any) => {
{
title
:
unit
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
div
>
{
record
.
buildingNumber
+
' #'
+
record
.
floorNumber
+
'-'
+
record
.
roomNumber
}
</
div
>
// <div>{record.buildingNumber + ' #' + record.floorNumber + '-' + record.roomNumber}</div>
<
div
>
{
record
.
buildingNumber
?
<
span
>
{
record
.
buildingNumber
}
#
</
span
>
:
''
}
<
span
>
{
record
.
floorNumber
}
-
</
span
>
<
span
>
{
record
.
roomNumber
}
</
span
>
</
div
>
),
},
{
...
...
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
View file @
2e1f9cf7
...
...
@@ -33,15 +33,22 @@ const UsersAdd = (props: any) => {
}
else
{
values
.
communityName
=
null
;
}
if
(
checkParam
(
values
))
{
if
(
values
.
addressAndpostalCode
==
null
||
values
.
communityName
==
null
||
values
.
floorNumber
==
null
||
values
.
owerName
==
null
||
values
.
roomNumber
==
null
)
{
setLoading
(
false
);
message
.
error
(
'Error,Please finish it,not empty!'
);
}
else
{
values
.
owerPhone
=
null
;
values
.
owerEmail
=
null
;
values
.
buildingNumber
=
'BLK '
+
values
.
buildingNumber
;
values
.
buildingNumber
=
values
.
buildingNumber
?
'BLK '
+
values
.
buildingNumber
:
''
;
RA
(
14
,
values
,
module
,
dispatch
);
setLoading
(
true
);
}
else
{
setLoading
(
false
);
message
.
error
(
'Error,Please finish it,not empty!'
);
}
};
...
...
src/pages/UserManagement/LIFEUserManagement/UsersDetail.tsx
View file @
2e1f9cf7
...
...
@@ -243,7 +243,9 @@ const UsersDetail = (props: any) => {
<>
<
TitleBack
sublist=
{
[
'Status : '
+
user_type_status
[
DataSave
.
enable
],
'Status : '
+
user_type_status
&&
user_type_status
[
DataSave
.
enable
]
?
user_type_status
[
DataSave
.
enable
]
:
''
,
'Create Time : '
+
timestampToTime
(
DataSave
.
createTime
.
time
),
]
}
title=
{
editFlag
?
'Edit Owner Infomation'
:
'Owner Detail'
}
...
...
src/pages/UserManagement/ServiceProviderManagement/AccoutingContent.tsx
View file @
2e1f9cf7
...
...
@@ -141,7 +141,7 @@ const AccoutingContent = (props: {
</
Button
>
</
div
>
<
div
style=
{
{
marginBottom
:
28
,
marginTop
:
30
}
}
>
Service
Community
</
div
>
<
div
style=
{
{
marginBottom
:
28
,
marginTop
:
30
}
}
>
Service
Estate
</
div
>
<
ShowOptions
list=
{
SaveChooseData
.
serviceCommunityList
}
/>
</
Spin
>
)
:
(
...
...
src/pages/UserManagement/ServiceProviderManagement/Detail.tsx
View file @
2e1f9cf7
...
...
@@ -62,7 +62,7 @@ const Detail = (props: any) => {
// 列表数据
const
columns
=
[
{
title
:
'User Name'
,
dataIndex
:
'saferName'
},
{
title
:
'Service
Community
'
,
dataIndex
:
'projectName'
},
{
title
:
'Service
Estate
'
,
dataIndex
:
'projectName'
},
{
title
:
'Job Title'
,
dataIndex
:
'jobTitle'
},
{
title
:
'User Status'
,
...
...
@@ -168,7 +168,7 @@ const Detail = (props: any) => {
</
div
>
<
div
className=
{
styles
.
box6
}
>
<
div
className=
{
styles
.
box1item1
}
>
Service
Community
</
div
>
<
div
className=
{
styles
.
box1item1
}
>
Service
Estate
</
div
>
</
div
>
{
SaveChooseData
.
serviceCommunityList
!=
null
?
(
<
ShowOptions
list=
{
SaveChooseData
.
serviceCommunityList
}
defaultValue=
{
'Close'
}
/>
...
...
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
View file @
2e1f9cf7
...
...
@@ -102,7 +102,7 @@ const Edit = (props: any) => {
// 提交按钮
const
onFinish
=
(
values
:
any
)
=>
{
if
(
CList
.
length
===
0
)
{
// message.warning('Please select at least one service
Community
!', 3);
// message.warning('Please select at least one service
Estate
!', 3);
return
;
}
const
val
=
values
;
...
...
src/pages/template/小区公告添加/Template.tsx
View file @
2e1f9cf7
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./index.less'
;
import
{
Input
,
Menu
,
DatePicker
,
Upload
,
Modal
,
Button
}
from
'antd'
;
import
{
Input
,
Menu
,
DatePicker
,
Upload
,
Modal
,
Button
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
...
...
@@ -8,90 +8,115 @@ import TextArea from 'antd/lib/input/TextArea';
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
SelectOptions
from
'../../components/SelectOptions/index'
;
const
printContent
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
}
const
printContent
=
(
comment
:
any
)
=>
{
console
.
log
(
comment
)
;
}
;
function
getBase64
(
file
:
Blob
)
{
return
new
Promise
((
resolve
,
reject
)
=>
{
const
reader
=
new
FileReader
();
reader
.
readAsDataURL
(
file
);
reader
.
onload
=
()
=>
resolve
(
reader
.
result
);
reader
.
onerror
=
error
=>
reject
(
error
);
reader
.
onerror
=
(
error
)
=>
reject
(
error
);
});
}
const
Template
=
()
=>
{
const
[
previewVisible
,
setPreviewVisible
]
=
useState
(
false
);
const
[
previewImage
,
setPreviewImage
]
=
useState
(
""
);
const
[
previewTitle
,
setPreviewTitle
]
=
useState
(
""
);
const
[
previewImage
,
setPreviewImage
]
=
useState
(
''
);
const
[
previewTitle
,
setPreviewTitle
]
=
useState
(
''
);
const
[
fileList
,
setFileList
]
=
useState
([]);
const
uploadButton
=
(
<
div
>
<
PlusOutlined
/>
<
div
className=
"ant-upload-text"
>
Upload
</
div
>
</
div
>
);
const
handleCancel
=
()
=>
{
setPreviewVisible
(
false
)
};
);
const
handleCancel
=
()
=>
{
setPreviewVisible
(
false
);
};
const
handlePreview
=
async
(
file
:
{
url
:
string
;
preview
:
string
;
originFileObj
:
Blob
;
name
:
any
;
})
=>
{
const
handlePreview
=
async
(
file
:
{
url
:
string
;
preview
:
string
;
originFileObj
:
Blob
;
name
:
any
;
})
=>
{
if
(
!
file
.
url
&&
!
file
.
preview
)
{
file
.
preview
=
await
getBase64
(
file
.
originFileObj
);
file
.
preview
=
await
getBase64
(
file
.
originFileObj
);
}
setPreviewImage
(
(
file
.
url
||
file
.
preview
)
);
setPreviewImage
(
file
.
url
||
file
.
preview
);
setPreviewVisible
(
true
);
setPreviewTitle
(
file
.
name
||
file
.
url
.
substring
(
file
.
url
.
lastIndexOf
(
'/'
)
+
1
));
};
const
handleChange
=
(
Obj
:
any
)
=>
{
setFileList
(
Obj
.
fileList
)
}
const
handleChange
=
(
Obj
:
any
)
=>
{
setFileList
(
Obj
.
fileList
);
};
return
(
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
{
/* 头部组件 */
}
<
div
className=
{
styles
.
box
}
>
<
div
className=
{
styles
.
item1
}
>
Community
Announcement
</
div
>
<
div
className=
{
styles
.
item1
}
>
Estate
Announcement
</
div
>
<
button
className=
{
styles
.
item3
}
>
返回
</
button
>
</
div
>
<
SelectOptions
list=
{
[
"美国"
,
"美丽的"
,
"美好"
,
"加拿大"
,
"加油"
,
"XO"
].
sort
()
}
onSubmit=
{
printContent
}
/>
<
SelectOptions
list=
{
[
'美国'
,
'美丽的'
,
'美好'
,
'加拿大'
,
'加油'
,
'XO'
].
sort
()
}
onSubmit=
{
printContent
}
/>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1item1
}
>
Announcement Title
</
div
>
<
div
className=
{
styles
.
box1item2
}
><
Input
style=
{
{
width
:
500
}
}
/></
div
>
<
div
className=
{
styles
.
box1item2
}
>
<
Input
style=
{
{
width
:
500
}
}
/>
</
div
>
</
div
>
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2item1
}
>
Announcement Title
</
div
>
<
div
className=
{
styles
.
box2item2
}
><
TextArea
autoSize=
{
false
}
style=
{
{
width
:
500
,
height
:
120
}
}
/></
div
>
<
div
className=
{
styles
.
box2item2
}
>
<
TextArea
autoSize=
{
false
}
style=
{
{
width
:
500
,
height
:
120
}
}
/>
</
div
>
</
div
>
<
div
className=
{
styles
.
box3
}
>
<
Upload
action=
"https://www.mocky.io/v2/5cc8019d300000980a055e76"
listType=
"picture-card"
fileList=
{
fileList
}
onPreview=
{
handlePreview
}
onChange=
{
handleChange
}
>
{
fileList
.
length
>=
3
?
null
:
uploadButton
}
</
Upload
>
<
Modal
visible=
{
previewVisible
}
title=
{
previewTitle
}
footer=
{
null
}
onCancel=
{
handleCancel
}
>
<
img
alt=
"picture"
style=
{
{
width
:
'100%'
}
}
src=
{
previewImage
}
/>
</
Modal
>
<
Upload
action=
"https://www.mocky.io/v2/5cc8019d300000980a055e76"
listType=
"picture-card"
fileList=
{
fileList
}
onPreview=
{
handlePreview
}
onChange=
{
handleChange
}
>
{
fileList
.
length
>=
3
?
null
:
uploadButton
}
</
Upload
>
<
Modal
visible=
{
previewVisible
}
title=
{
previewTitle
}
footer=
{
null
}
onCancel=
{
handleCancel
}
>
<
img
alt=
"picture"
style=
{
{
width
:
'100%'
}
}
src=
{
previewImage
}
/>
</
Modal
>
</
div
>
<
div
className
=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4item1
}
>
Entry into Force Time
</
div
>
<
div
className=
{
styles
.
box4item2
}
><
DatePicker
/></
div
>
<
div
className=
{
styles
.
box4item2
}
>
<
DatePicker
/>
</
div
>
</
div
>
<
div
className
=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4
}
>
<
div
className=
{
styles
.
box4item1
}
>
End Date
</
div
>
<
div
className=
{
styles
.
box4item2
}
><
DatePicker
/></
div
>
<
div
className=
{
styles
.
box4item2
}
>
<
DatePicker
/>
</
div
>
</
div
>
<
div
className=
{
styles
.
line
}
></
div
>
<
Button
type=
"primary"
style=
{
{
width
:
80
,
height
:
32
}
}
>
提交
</
Button
>
<
Button
type=
"primary"
style=
{
{
width
:
80
,
height
:
32
}
}
>
提交
</
Button
>
</
div
>
);
};
export
default
Template
;
src/pages/template/服务商详情/Template.tsx
View file @
2e1f9cf7
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
styles
from
'./index.less'
;
import
{
Input
,
Button
,
Table
,
Space
,
Pagination
,
Tooltip
,
Checkbox
}
from
'antd'
;
import
{
Input
,
Button
,
Table
,
Space
,
Pagination
,
Tooltip
,
Checkbox
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
...
...
@@ -14,38 +14,36 @@ const dataSource = [
];
const
Template
=
()
=>
{
const
pagination
=
{
defaultCurrent
:
1
,
total
:
16
}
const
pagination
=
{
defaultCurrent
:
1
,
total
:
16
};
const
columns
=
[
{
title
:
"username"
,
title
:
'username'
,
dataIndex
:
'name'
,
key
:
'name'
,
},
{
title
:
"project"
,
title
:
'project'
,
dataIndex
:
'age'
,
key
:
'age'
,
},
{
title
:
"unit"
,
title
:
'unit'
,
dataIndex
:
'address'
,
key
:
'address'
,
},
{
title
:
"status"
,
title
:
'status'
,
dataIndex
:
'address'
,
key
:
'address'
,
},
{
title
:
"submissionTime"
,
title
:
'submissionTime'
,
dataIndex
:
'address'
,
key
:
'address'
,
},
{
title
:
"actions"
,
title
:
'actions'
,
key
:
'action'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
...
...
@@ -54,17 +52,15 @@ const Template = () => {
),
},
];
return
(
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
{
/* 头部组件 */
}
<
div
className=
{
styles
.
box
}
>
<
div
className=
{
styles
.
item1
}
>
Service Provider Details
</
div
>
<
button
className=
{
styles
.
item3
}
>
返回
</
button
>
</
div
>
<
div
className=
{
styles
.
box1
}
>
<
div
className=
{
styles
.
box1item1
}
>
Company Name
</
div
>
<
div
className=
{
styles
.
box1item2
}
>
Free Limited
</
div
>
...
...
@@ -72,7 +68,9 @@ const Template = () => {
<
div
className=
{
styles
.
box2
}
>
<
div
className=
{
styles
.
box2item1
}
>
Office Address
</
div
>
<
div
className=
{
styles
.
box2item2
}
>
Albert Street, 175, Singapore, Albert, Bugis, Victoria Street,
</
div
>
<
div
className=
{
styles
.
box2item2
}
>
Albert Street, 175, Singapore, Albert, Bugis, Victoria Street,
{
' '
}
</
div
>
</
div
>
<
div
className=
{
styles
.
box3
}
>
...
...
@@ -90,7 +88,7 @@ const Template = () => {
</
div
>
<
div
className=
{
styles
.
box6
}
>
<
div
className=
{
styles
.
box1item1
}
>
Service
Community
</
div
>
<
div
className=
{
styles
.
box1item1
}
>
Service
Estate
</
div
>
</
div
>
<
div
className=
{
styles
.
box7
}
>
...
...
@@ -98,13 +96,16 @@ const Template = () => {
</
div
>
{
/* 列表组件 */
}
<
Table
style=
{
{
marginTop
:
16
}
}
dataSource=
{
dataSource
}
columns=
{
columns
}
pagination=
{
pagination
}
/>
<
Button
>
Cancellation
</
Button
>
<
Table
style=
{
{
marginTop
:
16
}
}
dataSource=
{
dataSource
}
columns=
{
columns
}
pagination=
{
pagination
}
/>
<
Button
>
Cancellation
</
Button
>
</
div
>
);
};
export
default
Template
;
\ No newline at end of file
export
default
Template
;
src/utils/params.ts
View file @
2e1f9cf7
/*
* @Author: your name
* @Date: 2020-11-19 20:34:18
* @LastEditTime: 2021-0
3-03 18:02:42
* @LastEditTime: 2021-0
4-21 15:18:56
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\params.ts
...
...
@@ -106,4 +106,7 @@ export const requestList = [
[
'/tos/report/reply'
,
'71 web端报告员回复'
,
{}],
[
'/tos/community/get/address'
,
'72 根据小区名搜索小区地址'
,
{}],
[
'/tos/report/delete'
,
'73 删除报告'
,
{}],
[
'/tos/community/moveOut/record/get'
,
'74 迁出申请列表'
,
{}],
[
'/tos/community/moveOut/record/get/detail'
,
'75 迁出申请详情'
,
{}],
[
'/tos/community/moveOut/record/reply'
,
'76 迁出申请回复'
,
{}],
];
src/utils/power.js
View file @
2e1f9cf7
...
...
@@ -217,7 +217,7 @@ export const enUsFaci = [
children
:
[{
title
:
'View Property Fees'
,
key
:
'16'
,
disableCheckbox
:
true
}],
},
{
title
:
'Commercial Service-
Community
Maintenance'
,
title
:
'Commercial Service- Maintenance'
,
key
:
'17'
,
disabled
:
true
,
children
:
[
...
...
@@ -291,14 +291,14 @@ export const enUsFaci = [
],
},
{
title
:
'
Community
'
,
title
:
'
Estate
'
,
key
:
'43'
,
disabled
:
true
,
children
:
[
{
title
:
'View
Community
'
,
key
:
'44'
,
disableCheckbox
:
true
},
{
title
:
'Edit
Community
'
,
key
:
'45'
,
disableCheckbox
:
true
},
{
title
:
'Add
Community
'
,
key
:
'46'
,
disableCheckbox
:
true
},
{
title
:
'Delete
Community
'
,
key
:
'47'
,
disableCheckbox
:
true
},
{
title
:
'View
Estate
'
,
key
:
'44'
,
disableCheckbox
:
true
},
{
title
:
'Edit
Estate
'
,
key
:
'45'
,
disableCheckbox
:
true
},
{
title
:
'Add
Estate
'
,
key
:
'46'
,
disableCheckbox
:
true
},
{
title
:
'Delete
Estate
'
,
key
:
'47'
,
disableCheckbox
:
true
},
],
},
{
...
...
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