Commit 2e1f9cf7 authored by cellee's avatar cellee

楼顶去空

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 4ad66726
/* /*
* @Author: your name * @Author: your name
* @Date: 2020-12-01 18:40:06 * @Date: 2020-12-01 18:40:06
* @LastEditTime: 2021-03-03 15:04:15 * @LastEditTime: 2021-04-26 17:35:57
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\config\config.ts * @FilePath: \tostumi\config\config.ts
...@@ -19,6 +19,7 @@ export default defineConfig({ ...@@ -19,6 +19,7 @@ export default defineConfig({
dva: { dva: {
hmr: true, hmr: true,
}, },
favicon: 'favicon.ico',
locale: { locale: {
// default zh-CN //zh-CN // default zh-CN //zh-CN
default: 'en-US', default: 'en-US',
...@@ -26,6 +27,7 @@ export default defineConfig({ ...@@ -26,6 +27,7 @@ export default defineConfig({
antd: true, antd: true,
baseNavigator: true, baseNavigator: true,
}, },
// ssr: {},
dynamicImport: { dynamicImport: {
loading: '@/components/PageLoading/index', loading: '@/components/PageLoading/index',
}, },
...@@ -231,19 +233,31 @@ export default defineConfig({ ...@@ -231,19 +233,31 @@ export default defineConfig({
{ path: './Edit', component: './CommercialService/Detail' }, { 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', path: './MoveOut',
name: 'shelflifeservice', name: 'moveout',
routes: [ routes: [
{ path: './', component: './CommercialService/PropertyServices' }, { path: './', component: './CommercialService/Renovation' },
{ path: './Detail', component: './CommercialService/Detail' }, { path: './Detail/:id', component: './CommercialService/MoveOutDetail' },
{ path: './Edit', component: './CommercialService/Detail' },
], ],
}, },
// ------共享编辑与详情-------
{ path: './OwnerComplaints/Detail', component: './CommercialService/Detail' }, { path: './OwnerComplaints/Detail', component: './CommercialService/Detail' },
{ path: './OwnerComplaints/Edit', component: './CommercialService/Detail' }, { path: './OwnerComplaints/Edit', component: './CommercialService/Detail' },
], ],
}, },
// 2-21 暂无订单功能 取消
// { // {
// path: '/OrderManagement', // path: '/OrderManagement',
// name: 'ordermanagement', // name: 'ordermanagement',
...@@ -256,8 +270,8 @@ export default defineConfig({ ...@@ -256,8 +270,8 @@ export default defineConfig({
icon: 'SwitcherOutlined', icon: 'SwitcherOutlined',
routes: [ routes: [
{ path: './', component: './ContractManagement/Contract' }, { path: './', component: './ContractManagement/Contract' },
{ path: './Detail', component: './ContractManagement/ContractDetail' }, { path: './Detail/:id', component: './ContractManagement/ContractDetail' },
{ path: './Edit', component: './ContractManagement/ContractContent' }, { path: './Edit/:id', component: './ContractManagement/ContractContent' },
{ {
path: './Add', path: './Add',
component: './ContractManagement/ContractContent', component: './ContractManagement/ContractContent',
...@@ -405,6 +419,7 @@ export default defineConfig({ ...@@ -405,6 +419,7 @@ export default defineConfig({
name: 'companyinformation', name: 'companyinformation',
component: './AccountManagement/CompanyInformation/CompanyInformation', component: './AccountManagement/CompanyInformation/CompanyInformation',
}, },
// 3-21 去除语言切换
// { // {
// path: './LanguageSettings', // path: './LanguageSettings',
// name: 'languagesettings', // name: 'languagesettings',
......
...@@ -45,66 +45,66 @@ ...@@ -45,66 +45,66 @@
"not ie <= 10" "not ie <= 10"
], ],
"dependencies": { "dependencies": {
"@ant-design/icons": "^4.0.0", "@ant-design/icons": "^4.6.2",
"@ant-design/pro-layout": "^5.0.16", "@ant-design/pro-layout": "^5.0.16",
"@ant-design/pro-table": "2.3.4", "@ant-design/pro-table": "2.3.4",
"@bundled-es-modules/pdfjs-dist": "^2.2.228-alpha1", "@bundled-es-modules/pdfjs-dist": "^2.2.228-alpha1",
"antd": "4.7.3", "antd": "4.7.3",
"axios": "^0.21.0", "axios": "^0.21.1",
"classnames": "^2.2.6", "classnames": "^2.3.1",
"js-export-excel": "^1.1.2", "js-export-excel": "^1.1.2",
"js-file-download": "^0.4.12", "js-file-download": "^0.4.12",
"lodash": "^4.17.11", "lodash": "^4.17.21",
"moment": "^2.25.3", "moment": "^2.25.3",
"omit.js": "^1.0.2", "omit.js": "^1.0.2",
"path-to-regexp": "2.4.0", "path-to-regexp": "2.4.0",
"pdfjs": "^2.3.9", "pdfjs": "^2.4.3",
"qs": "^6.9.4", "qs": "^6.10.1",
"react": "^16.8.6", "react": "^16.8.6",
"react-dom": "^16.8.6", "react-dom": "^16.8.6",
"react-helmet-async": "^1.0.4", "react-file-viewer": "^1.2.1",
"react-pdf": "^5.0.0", "react-helmet-async": "^1.0.9",
"react-pdf": "^5.2.0",
"react-pdf-js": "^5.1.0", "react-pdf-js": "^5.1.0",
"react-persist": "^1.0.2", "react-persist": "^1.0.2",
"react-file-viewer": "^1.2.1",
"redux-persist": "^6.0.0", "redux-persist": "^6.0.0",
"umi": "^3.1.2", "umi": "^3.4.11",
"umi-request": "^1.0.8", "umi-request": "^1.0.8",
"use-merge-value": "^1.0.1" "use-merge-value": "^1.0.1"
}, },
"devDependencies": { "devDependencies": {
"@ant-design/pro-cli": "^1.0.18", "@ant-design/pro-cli": "^1.0.28",
"@types/classnames": "^2.2.7", "@types/classnames": "^2.3.1",
"@types/express": "^4.17.0", "@types/express": "^4.17.11",
"@types/history": "^4.7.2", "@types/history": "^4.7.2",
"@types/jest": "^26.0.0", "@types/jest": "^26.0.22",
"@types/lodash": "^4.14.144", "@types/lodash": "^4.14.168",
"@types/qs": "^6.5.3", "@types/qs": "^6.9.6",
"@types/react": "^16.9.17", "@types/react": "^16.14.5",
"@types/react-dom": "^16.8.4", "@types/react-dom": "^16.9.12",
"@types/react-helmet": "^5.0.13", "@types/react-helmet": "^5.0.13",
"@umijs/fabric": "^2.0.5", "@umijs/fabric": "^2.5.7",
"@umijs/plugin-blocks": "^2.0.5", "@umijs/plugin-blocks": "^2.2.2",
"@umijs/preset-ant-design-pro": "^1.2.0", "@umijs/preset-ant-design-pro": "^1.2.0",
"@umijs/preset-react": "^1.4.8", "@umijs/preset-react": "^1.8.6",
"@umijs/preset-ui": "^2.0.9", "@umijs/preset-ui": "^2.2.9",
"carlo": "^0.9.46", "carlo": "^0.9.46",
"chalk": "^4.0.0", "chalk": "^4.1.1",
"cross-env": "^7.0.2", "cross-env": "^7.0.3",
"cross-port-killer": "^1.1.1", "cross-port-killer": "^1.3.0",
"detect-installer": "^1.0.1", "detect-installer": "^1.0.1",
"enzyme": "^3.11.0", "enzyme": "^3.11.0",
"eslint": "^7.1.0", "eslint": "^7.24.0",
"express": "^4.17.1", "express": "^4.17.1",
"gh-pages": "^3.0.0", "gh-pages": "^3.0.0",
"husky": "^4.0.7", "husky": "^4.3.8",
"jsdom-global": "^3.0.2", "jsdom-global": "^3.0.2",
"lint-staged": "^10.0.0", "lint-staged": "^10.5.4",
"mockjs": "^1.0.1-beta3", "mockjs": "^1.0.1-beta3",
"prettier": "^2.0.1", "prettier": "^2.2.1",
"pro-download": "1.0.1", "pro-download": "1.0.1",
"puppeteer-core": "^3.0.0", "puppeteer-core": "^3.0.0",
"stylelint": "^13.0.0" "stylelint": "^13.12.0"
}, },
"engines": { "engines": {
"node": ">=10.0.0" "node": ">=10.0.0"
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-02-01 14:54:48 * @Date: 2021-02-01 14:54:48
* @LastEditTime: 2021-03-03 10:08:06 * @LastEditTime: 2021-04-26 15:14:06
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\Form\PdfUpload.tsx * @FilePath: \tostumi\src\components\Form\PdfUpload.tsx
*/ */
import React, { useState, useEffect } from 'react'; 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 { import {
LoadingOutlined, LoadingOutlined,
PlusOutlined, PlusOutlined,
...@@ -15,8 +15,9 @@ import { ...@@ -15,8 +15,9 @@ import {
FilePdfOutlined, FilePdfOutlined,
} from '@ant-design/icons'; } 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'; import './zip.less';
interface PriceInputProps { interface PriceInputProps {
detailvalue?: any; detailvalue?: any;
...@@ -237,7 +238,7 @@ const PdfUpload: React.FC<PriceInputProps> = ({ ...@@ -237,7 +238,7 @@ const PdfUpload: React.FC<PriceInputProps> = ({
// 点击预览 // 点击预览
const handlePreview = async (file: any) => { const handlePreview = async (file: any) => {
// console.log(file); // console.log(file);
setPdfUrl(file); setPdfUrl({ ...file });
setModalVisible(true); setModalVisible(true);
}; };
...@@ -276,8 +277,9 @@ const PdfUpload: React.FC<PriceInputProps> = ({ ...@@ -276,8 +277,9 @@ const PdfUpload: React.FC<PriceInputProps> = ({
}; };
// pdf 总页数 // pdf 总页数
const onDocumentLoadSuccess = (pages: any) => { const onDocumentLoadSuccess = ({ numPages }: any) => {
setNumPages(pages); //numPages是总页数
setNumPages(numPages);
}; };
// 切换pdf 总数 // 切换pdf 总数
...@@ -304,6 +306,12 @@ const PdfUpload: React.FC<PriceInputProps> = ({ ...@@ -304,6 +306,12 @@ const PdfUpload: React.FC<PriceInputProps> = ({
onChange && onChange(list); onChange && onChange(list);
}; };
// 文件失效
const onError = () => {
message.error('file error !');
setModalVisible(false);
};
return ( return (
<> <>
{imgList.map((item: any, index: any) => { {imgList.map((item: any, index: any) => {
...@@ -383,22 +391,29 @@ const PdfUpload: React.FC<PriceInputProps> = ({ ...@@ -383,22 +391,29 @@ const PdfUpload: React.FC<PriceInputProps> = ({
<Modal <Modal
title={PdfUrl != null ? PdfUrl.name : 'File Preview'} title={PdfUrl != null ? PdfUrl.name : 'File Preview'}
visible={ModalVisible} visible={ModalVisible}
width={650} width={800}
onCancel={handleCancel} onCancel={handleCancel}
style={{ textAlign: 'center' }} style={{ textAlign: 'center' }}
footer={null} footer={null}
> >
<> <>
<PDF <Document
file={PdfUrl ? PdfUrl.url : null} file={PdfUrl ? PdfUrl.url : null} //文件路径
page={pageNumber} onLoadSuccess={onDocumentLoadSuccess} //成功加载文档后调用
scale={1} // onLoadError={console.error} //加载失败时调用
onDocumentComplete={onDocumentLoadSuccess} loading={<Spin indicator={<LoadingOutlined spin />} />} //加载时提示语句
onLoadError={onError}
>
<Page
key={PdfUrl ? PdfUrl.id : null}
pageNumber={pageNumber} //当前页页码
scale={1.25}
/> />
</Document>
<Pagination <Pagination
style={{ textAlign: 'center', marginTop: 10, display: 'block' }} style={{ textAlign: 'center', marginTop: 10, display: 'block' }}
simple simple
current={pageNumber} defaultCurrent={pageNumber}
total={numPages * 10} total={numPages * 10}
onChange={onChangePage} onChange={onChangePage}
/> />
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-01-30 16:16:41 * @Date: 2021-01-30 16:16:41
* @LastEditTime: 2021-02-20 11:32:44 * @LastEditTime: 2021-04-23 18:50:35
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\Form\ZipCode.tsx * @FilePath: \tostumi\src\components\Form\ZipCode.tsx
...@@ -92,7 +92,7 @@ const ZipCode: React.FC<PriceInputProps> = ({ ...@@ -92,7 +92,7 @@ const ZipCode: React.FC<PriceInputProps> = ({
// value={value.residentialAddress || number} // value={value.residentialAddress || number}
onChange={onNumberChange} onChange={onNumberChange}
style={{ width: '360px' }} style={{ width: '360px' }}
placeholder="Please enter community adds" placeholder="Please enter Estate adds"
disabled={disabled} disabled={disabled}
value={details ? details.residentialAddress : null} value={details ? details.residentialAddress : null}
/> />
...@@ -105,7 +105,7 @@ const ZipCode: React.FC<PriceInputProps> = ({ ...@@ -105,7 +105,7 @@ const ZipCode: React.FC<PriceInputProps> = ({
// value={value.residentialName || number} // value={value.residentialName || number}
onChange={onNumberChange} onChange={onNumberChange}
style={{ marginRight: '10px', width: '240px' }} style={{ marginRight: '10px', width: '240px' }}
placeholder="Please enter community name" placeholder="Please enter Estate name"
onBlur={onblurs} onBlur={onblurs}
disabled={disabled} disabled={disabled}
value={details ? details.residentialName : null} value={details ? details.residentialName : null}
......
...@@ -67,7 +67,7 @@ class SearchOptions extends React.Purecomponent { ...@@ -67,7 +67,7 @@ class SearchOptions extends React.Purecomponent {
<Select <Select
showSearch showSearch
value={this.state.value} value={this.state.value}
placeholder={'Community Name'} placeholder={'Estate Name'}
optionFilterProp="children" optionFilterProp="children"
filterOption={(input, option) => filterOption={(input, option) =>
option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0 option.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
...@@ -81,7 +81,7 @@ class SearchOptions extends React.Purecomponent { ...@@ -81,7 +81,7 @@ class SearchOptions extends React.Purecomponent {
notFoundContent={ notFoundContent={
<div> <div>
<Empty image={Empty.PRESENTED_IMAGE_SIMPLE} /> <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} />
Please enter the correct Community Name! Please enter the correct Estate Name!
</div> </div>
} }
style={{ width: 200 }} style={{ width: 200 }}
......
...@@ -49,7 +49,7 @@ const SearchOptionsTow = (porps: any) => { ...@@ -49,7 +49,7 @@ const SearchOptionsTow = (porps: any) => {
mode="multiple" mode="multiple"
autoClearSearchValue autoClearSearchValue
style={{ width: 320 }} style={{ width: 320 }}
placeholder="Community Name" placeholder="Estate Name"
optionFilterProp="children" optionFilterProp="children"
onChange={onChange} onChange={onChange}
value={value} value={value}
...@@ -63,7 +63,7 @@ const SearchOptionsTow = (porps: any) => { ...@@ -63,7 +63,7 @@ const SearchOptionsTow = (porps: any) => {
showSearch showSearch
allowClear allowClear
style={{ width: 200 }} style={{ width: 200 }}
placeholder="Community Name" placeholder="Estate Name"
optionFilterProp="children" optionFilterProp="children"
onChange={onChange} onChange={onChange}
value={value} value={value}
......
...@@ -77,13 +77,11 @@ const TableShow = (props: any) => { ...@@ -77,13 +77,11 @@ const TableShow = (props: any) => {
<Row gutter={16} style={{ marginLeft: 9 }}> <Row gutter={16} style={{ marginLeft: 9 }}>
<Col>Address:</Col> <Col>Address:</Col>
<Col> <Col>
{item.owner.buildingNumber + <span>{item.owner.buildingNumber ? item.owner.buildingNumber + ' #' : ''}</span>
' #' + <span>
item.owner.floorNumber + {item.owner.floorNumber}-{item.owner.roomNumber} {' , '}
' -' + </span>
item.owner.roomNumber + <span>{item.owner.addressAndpostalCode}</span>
', ' +
item.owner.addressAndpostalCode}
</Col> </Col>
</Row> </Row>
{item.unit.map((unit: any, uindex: any) => { {item.unit.map((unit: any, uindex: any) => {
......
...@@ -144,7 +144,7 @@ const treeData = [ ...@@ -144,7 +144,7 @@ const treeData = [
], ],
}, },
{ {
title: 'Community management', title: 'Estate management',
key: 'G', key: 'G',
children: [ children: [
{ title: 'View community', key: '20' }, { title: 'View community', key: '20' },
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2020-12-14 18:52:22 * @Date: 2020-12-14 18:52:22
* @LastEditTime: 2021-03-31 17:33:33 * @LastEditTime: 2021-04-22 15:18:20
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\locales\en-US\menu.ts * @FilePath: \tostumi\src\locales\en-US\menu.ts
...@@ -64,17 +64,18 @@ export default { ...@@ -64,17 +64,18 @@ export default {
'menu.usemanagement.serviceproviders': 'Service Provider Management', 'menu.usemanagement.serviceproviders': 'Service Provider Management',
'menu.propertymanagement': 'Property Fee Management', 'menu.propertymanagement': 'Property Fee Management',
'menu.commercialservice': 'Service Requests', 'menu.commercialservice': 'Service Requests',
'menu.commercialservice.communitymaintenance': 'Community maintenance', 'menu.commercialservice.communitymaintenance': 'Estate maintenance',
'menu.commercialservice.ownercomplaints': 'Complaints', 'menu.commercialservice.ownercomplaints': 'Complaints',
'menu.commercialservice.problemfeedback': 'Feedback', 'menu.commercialservice.problemfeedback': 'Feedback',
'menu.commercialservice.renovationapplication': 'Renovation Application', 'menu.commercialservice.renovationapplication': 'Renovation Application',
'menu.commercialservice.moveout': 'Move Out Request',
'menu.commercialservice.accessCardapplication': 'Access Card Application', 'menu.commercialservice.accessCardapplication': 'Access Card Application',
'menu.commercialservice.reportonline': 'Report Matters', 'menu.commercialservice.reportonline': 'Report Matters',
'menu.commercialservice.shelflifeservice': 'Warranty Period Service', 'menu.commercialservice.shelflifeservice': 'Warranty Period Service',
'menu.ordermanagement': 'Order Management', 'menu.ordermanagement': 'Order Management',
'menu.contractmanagement': 'Contract Management', 'menu.contractmanagement': 'Contract Management',
'menu.communitymanagement': 'Community Management', 'menu.communitymanagement': 'Estate Management',
'menu.communitymanagement.celllist': 'Community', 'menu.communitymanagement.celllist': 'Estate',
'menu.communitymanagement.communityannouncement': 'Announcements', 'menu.communitymanagement.communityannouncement': 'Announcements',
'menu.communitymanagement.facilitybookings': 'Facility Bookings', 'menu.communitymanagement.facilitybookings': 'Facility Bookings',
'menu.communitymanagement.visitorrecord': 'Visitor Records', 'menu.communitymanagement.visitorrecord': 'Visitor Records',
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2020-12-14 18:52:22 * @Date: 2020-12-14 18:52:22
* @LastEditTime: 2021-03-01 10:05:23 * @LastEditTime: 2021-04-21 14:56:22
* @LastEditors: your name * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\locales\zh-CN\menu.ts * @FilePath: \tostumi\src\locales\zh-CN\menu.ts
*/ */
...@@ -68,6 +68,7 @@ export default { ...@@ -68,6 +68,7 @@ export default {
'menu.commercialservice.ownercomplaints': '业主投诉', 'menu.commercialservice.ownercomplaints': '业主投诉',
'menu.commercialservice.problemfeedback': '问题反馈', 'menu.commercialservice.problemfeedback': '问题反馈',
'menu.commercialservice.renovationapplication': '装修申请', 'menu.commercialservice.renovationapplication': '装修申请',
'menu.commercialservice.moveout': '迁出申请',
'menu.commercialservice.accessCardapplication': '住户卡申请', 'menu.commercialservice.accessCardapplication': '住户卡申请',
'menu.commercialservice.reportonline': '在线报事', 'menu.commercialservice.reportonline': '在线报事',
'menu.commercialservice.shelflifeservice': '保质期服务', 'menu.commercialservice.shelflifeservice': '保质期服务',
......
...@@ -13,6 +13,7 @@ export default { ...@@ -13,6 +13,7 @@ export default {
CurDataDetail: null, CurDataDetail: null,
Data7: null, Data7: null,
Data8: null, Data8: null,
Data9: null, // 迁出申请列表
Result: null, Result: null,
DataSaveDetail: null, DataSaveDetail: null,
loadding: false, loadding: false,
...@@ -37,6 +38,9 @@ export default { ...@@ -37,6 +38,9 @@ export default {
returnPage8(state: object, { Data8 }: any) { returnPage8(state: object, { Data8 }: any) {
return { ...state, Data8 }; return { ...state, Data8 };
}, },
returnPage9(state: object, { Data9 }: any) {
return { ...state, Data9 };
},
returnResult(state: object, { Result }: any) { returnResult(state: object, { Result }: any) {
return { ...state, Result }; return { ...state, Result };
}, },
...@@ -44,8 +48,8 @@ export default { ...@@ -44,8 +48,8 @@ export default {
return { ...state, DataSaveDetail }; return { ...state, DataSaveDetail };
}, },
returnLoadding(state: object, { loadding }: { loadding: boolean }) { returnLoadding(state: object, { loadding }: { loadding: boolean }) {
return { ...state, loadding } return { ...state, loadding };
} },
}, },
effects: { effects: {
...@@ -67,7 +71,7 @@ export default { ...@@ -67,7 +71,7 @@ export default {
// message.error(`${resp.error_code}:${resp.error_msg}`); // message.error(`${resp.error_code}:${resp.error_msg}`);
// } // }
if (resp.error_code !== '0000') { if (resp.error_code !== '0000') {
message.error(`${resp.error_code}:${resp.error_msg || "unkonw error"}`); message.error(`${resp.error_code}:${resp.error_msg || 'unkonw error'}`);
history.go(-1); history.go(-1);
} else { } else {
switch (playload.index) { switch (playload.index) {
...@@ -99,7 +103,17 @@ export default { ...@@ -99,7 +103,17 @@ export default {
} = { } = {
community: tmp.communityName || tmp.communityName, community: tmp.communityName || tmp.communityName,
address: tmp.addressAndpostalCode || tmp.residentialAddress, 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, name: tmp.owerName || tmp.ownerFamilyName,
phone: tmp.owerPhone || tmp.ownerFamilyPhone, phone: tmp.owerPhone || tmp.ownerFamilyPhone,
email: tmp.owerEmail || tmp.ownerFamilyEmail, email: tmp.owerEmail || tmp.ownerFamilyEmail,
...@@ -119,6 +133,7 @@ export default { ...@@ -119,6 +133,7 @@ export default {
case 33: case 33:
case 34: case 34:
case 22: case 22:
case 76:
// message.success('Success Operation!', 3); // message.success('Success Operation!', 3);
history.go(-1); history.go(-1);
// history.push("/CommercialService/CommunityMaintenance") // history.push("/CommercialService/CommunityMaintenance")
...@@ -129,6 +144,12 @@ export default { ...@@ -129,6 +144,12 @@ export default {
yield put({ type: 'returnPage8', Data8 }); yield put({ type: 'returnPage8', Data8 });
} }
break; break;
case 74:
{
const Data9 = resp;
yield put({ type: 'returnPage9', Data9 });
}
break;
case 31: case 31:
{ {
const Data7 = resp; const Data7 = resp;
...@@ -142,17 +163,14 @@ export default { ...@@ -142,17 +163,14 @@ export default {
} }
break; break;
case 37: case 37:
{
const DataSaveDetail = resp;
yield put({ type: 'returnDataSaveDetail', DataSaveDetail });
}
break;
case 36: case 36:
case 75:
{ {
const DataSaveDetail = resp; const DataSaveDetail = resp;
yield put({ type: 'returnDataSaveDetail', DataSaveDetail }); yield put({ type: 'returnDataSaveDetail', DataSaveDetail });
} }
break; break;
case 40: case 40:
{ {
const Data = resp; const Data = resp;
...@@ -180,22 +198,22 @@ export default { ...@@ -180,22 +198,22 @@ export default {
yield put({ type: 'returnCurDataDetail', CurDataDetail }); yield put({ type: 'returnCurDataDetail', CurDataDetail });
}, },
*ResultClear({ }, { put }: any) { *ResultClear({}, { put }: any) {
const Result = null; const Result = null;
yield put({ type: 'returnResult', Result }); yield put({ type: 'returnResult', Result });
}, },
*DataSaveDetailClear({ }, { put }: any) { *DataSaveDetailClear({}, { put }: any) {
const DataSaveDetail = null; const DataSaveDetail = null;
yield put({ type: 'returnDataSaveDetail', DataSaveDetail }); yield put({ type: 'returnDataSaveDetail', DataSaveDetail });
}, },
*DataSaveClear({ }, { put }: any) { *DataSaveClear({}, { put }: any) {
const DataSave = null; const DataSave = null;
yield put({ type: 'returnDataSave', DataSave }); yield put({ type: 'returnDataSave', DataSave });
}, },
*Data7Clear({ }, { put }: any) { *Data7Clear({}, { put }: any) {
const Data7 = null; const Data7 = null;
yield put({ type: 'returnPage7', Data7 }); yield put({ type: 'returnPage7', Data7 });
}, },
......
...@@ -129,7 +129,7 @@ export default { ...@@ -129,7 +129,7 @@ export default {
if (JSON.stringify(Data3) == '{}') { if (JSON.stringify(Data3) == '{}') {
Data3 = false; 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 }); yield put({ type: 'returnPage3', Data3 });
} }
......
import { getAllNotice,getAllDevice,saveDevice,delDevice,getDeviceNum,getNewAddBug,importUserDeviceListExcel, import {
getUserDevice,saveUserDevice,getTargetKeys,getNewAdd,importUserListExcel,getDeviceDetails } from '@/services/communityNotice'; getAllNotice,
import { getRegion,getRegionList } from '@/services/region'; 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', namespace: 'communityNoticeModel',
state: { state: {
data: [], data: [],
}, },
effects: { 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({ yield put({
type: "getAll", type: 'getAll',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
*getAllDevice({callback,payload},{ call, put }) { *getAllDevice({ callback, payload }, { call, put }) {
const response = yield call(getAllDevice,payload); const response = yield call(getAllDevice, payload);
yield put({ yield put({
type: "getAll", type: 'getAll',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
*getRegion({callback,payload},{ call, put }) { *getRegion({ callback, payload }, { call, put }) {
const response = yield call(getRegion,payload); const response = yield call(getRegion, payload);
yield put({ yield put({
type: "getRegions", type: 'getRegions',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
*saveDevice({callback,payload},{ call, put }) { *saveDevice({ callback, payload }, { call, put }) {
const response = yield call(saveDevice,payload); const response = yield call(saveDevice, payload);
yield put({ yield put({
type: "save", type: 'save',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
*delDevice({callback,payload},{ call, put }) { *delDevice({ callback, payload }, { call, put }) {
const response = yield call(delDevice,payload); const response = yield call(delDevice, payload);
yield put({ yield put({
type: "del", type: 'del',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
*getRegionList({callback,payload},{ call, put }) { *getRegionList({ callback, payload }, { call, put }) {
const response = yield call(getRegionList,payload); const response = yield call(getRegionList, payload);
yield put({ yield put({
type: "regionList", type: 'regionList',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
*getDeviceNum({callback,payload},{ call, put }) { *getDeviceNum({ callback, payload }, { call, put }) {
const response = yield call(getDeviceNum,payload); const response = yield call(getDeviceNum, payload);
yield put({ yield put({
type: "num", type: 'num',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
*getUserDevice({callback,payload},{ call, put }) { *getUserDevice({ callback, payload }, { call, put }) {
const response = yield call(getUserDevice,payload); const response = yield call(getUserDevice, payload);
yield put({ yield put({
type: "userDevice", type: 'userDevice',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
*saveUserDevice({callback,payload},{ call, put }) { *saveUserDevice({ callback, payload }, { call, put }) {
const response = yield call(saveUserDevice,payload); const response = yield call(saveUserDevice, payload);
yield put({ yield put({
type: "userDeviceSave", type: 'userDeviceSave',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
*getTargetKeys({callback,payload},{ call, put }) { *getTargetKeys({ callback, payload }, { call, put }) {
const response = yield call(getTargetKeys,payload); const response = yield call(getTargetKeys, payload);
yield put({ yield put({
type: "targetKeys", type: 'targetKeys',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
*getNewAdd({callback,payload},{ call, put }) { *getNewAdd({ callback, payload }, { call, put }) {
const response = yield call(getNewAdd,payload); const response = yield call(getNewAdd, payload);
yield put({ yield put({
type: "newAdd", type: 'newAdd',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
*getNewAddBug({callback,payload},{ call, put }) { *getNewAddBug({ callback, payload }, { call, put }) {
const response = yield call(getNewAddBug,payload); const response = yield call(getNewAddBug, payload);
yield put({ yield put({
type: "newAddBug", type: 'newAddBug',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
*importUserListExcel({callback,payload},{ call, put }) { *importUserListExcel({ callback, payload }, { call, put }) {
const response = yield call(importUserListExcel,payload); const response = yield call(importUserListExcel, payload);
yield put({ yield put({
type: "importListExcel", type: 'importListExcel',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
*importUserDeviceListExcel({callback,payload},{ call, put }) { *importUserDeviceListExcel({ callback, payload }, { call, put }) {
const response = yield call(importUserDeviceListExcel,payload); const response = yield call(importUserDeviceListExcel, payload);
yield put({ yield put({
type: "importDeviceListExcel", type: 'importDeviceListExcel',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
*getDeviceDetails({callback,payload},{ call, put }) { *getDeviceDetails({ callback, payload }, { call, put }) {
const response = yield call(getDeviceDetails,payload); const response = yield call(getDeviceDetails, payload);
yield put({ yield put({
type: "deviceDetails", type: 'deviceDetails',
}); });
if(callback) callback(response); if (callback) callback(response);
}, },
}, },
reducers: { reducers: {
getAll(state, action) { getAll(state, action) {
return { return {
...state, ...state,
data:action.payload || {}, data: action.payload || {},
}; };
}, },
getRegions(state, action) { getRegions(state, action) {
return { return {
...state, ...state,
data:action.payload || {}, data: action.payload || {},
}; };
}, },
save(state, action) { save(state, action) {
return { return {
...state, ...state,
data:action.payload || {}, data: action.payload || {},
}; };
}, },
del(state, action) { del(state, action) {
return { return {
...state, ...state,
data:action.payload || {}, data: action.payload || {},
}; };
}, },
regionList(state, action) { regionList(state, action) {
return { return {
...state, ...state,
data:action.payload || {}, data: action.payload || {},
}; };
}, },
num(state, action) { num(state, action) {
return { return {
...state, ...state,
data:action.payload || {}, data: action.payload || {},
}; };
}, },
userDevice(state, action) { userDevice(state, action) {
return { return {
...state, ...state,
data:action.payload || {}, data: action.payload || {},
}; };
}, },
userDeviceSave(state, action) { userDeviceSave(state, action) {
return { return {
...state, ...state,
data:action.payload || {}, data: action.payload || {},
}; };
}, },
targetKeys(state, action) { targetKeys(state, action) {
return { return {
...state, ...state,
data:action.payload || {}, data: action.payload || {},
}; };
}, },
newAdd(state, action) { newAdd(state, action) {
return { return {
...state, ...state,
data:action.payload || {}, data: action.payload || {},
}; };
}, },
newAddBug(state, action) { newAddBug(state, action) {
return { return {
...state, ...state,
data:action.payload || {}, data: action.payload || {},
}; };
}, },
importListExcel(state, action) { importListExcel(state, action) {
return { return {
...state, ...state,
data:action.payload || {}, data: action.payload || {},
}; };
}, },
importDeviceListExcel(state, action) { importDeviceListExcel(state, action) {
return { return {
...state, ...state,
data:action.payload || {}, data: action.payload || {},
}; };
}, },
deviceDetails(state, action) { deviceDetails(state, action) {
return { return {
...state, ...state,
data:action.payload || {}, data: action.payload || {},
}; };
}, },
}, },
}; };
import React, { useState, useEffect,useRef} from 'react'; import React, { useState, useEffect, useRef } from 'react';
import styles from './index.less'; import styles from './index.less';
import { Input, Button, Table, Space, Pagination, Form, Select, Layout } from 'antd'; import { Input, Button, Table, Space, Pagination, Form, Select, Layout } from 'antd';
const { Option } = Select; const { Option } = Select;
...@@ -17,90 +17,109 @@ import { RA, translate } from '@/utils/method'; ...@@ -17,90 +17,109 @@ import { RA, translate } from '@/utils/method';
import { EyeTwoTone, EyeInvisibleOutlined, StarTwoTone } from '@ant-design/icons'; import { EyeTwoTone, EyeInvisibleOutlined, StarTwoTone } from '@ant-design/icons';
import { validateMessages } from '@/utils/params'; import { validateMessages } from '@/utils/params';
const authorizeLevel = ["Administrator","Secondary Administrator", "Three Level Administrator"] const authorizeLevel = ['Administrator', 'Secondary Administrator', 'Three Level Administrator'];
const user_state=[[0, "enabled"],[1,"Disabled"]] const user_state = [
const module="Account" [0, 'enabled'],
const AccountManagement = (props:any) => { [1, 'Disabled'],
];
const module = 'Account';
const AccountManagement = (props: any) => {
const { dispatch } = props; const { dispatch } = props;
const formRef = useRef(null) const formRef = useRef(null);
const onFinish = (values:any) =>{ const onFinish = (values: any) => {
console.log(values) console.log(values);
var tmp = { var tmp = {
"id": "null", id: 'null',
"oneself": 0, oneself: 0,
"userStatus": 1, userStatus: 1,
"tosUserName": null, tosUserName: null,
"tosUserPwd": null, tosUserPwd: null,
"tosUserPhone": null, tosUserPhone: null,
"tosUserEmail": null, tosUserEmail: null,
"tosuserLevel": null, tosuserLevel: null,
"tosUserToCompany": "1", tosUserToCompany: '1',
"tosUserServiceCell":"", tosUserServiceCell: '',
} };
var tmp2 = {} var tmp2 = {};
translate(tmp,values, [ translate(tmp, values, [
["tosUserName", "Account"], ['tosUserName', 'Account'],
["tosUserPwd", "Password"], ['tosUserPwd', 'Password'],
["tosUserPhone", "phone"], ['tosUserPhone', 'phone'],
["tosUserEmail", "email"], ['tosUserEmail', 'email'],
["tosuserLevel", "tosuserLevel"], ['tosuserLevel', 'tosuserLevel'],
]) ]);
translate(tmp2,values, [ translate(tmp2, values, [
["userName", "Account"], ['userName', 'Account'],
["userPassword", "Password"], ['userPassword', 'Password'],
["permissionArray", "premission"], ['permissionArray', 'premission'],
]) ]);
RA(41, tmp, module, dispatch) RA(41, tmp, module, dispatch);
RA(42,tmp2,module,dispatch) RA(42, tmp2, module, dispatch);
} };
return ( return (
<div className={styles.base}> <div className={styles.base}>
{/* 头部组件v1.2 */} {/* 头部组件v1.2 */}
<TitleBack title="Admin Account Adding" /> <TitleBack title="Admin Account Adding" />
<Form ref={formRef} name="basic" onFinish={onFinish} validateMessages={validateMessages}> <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 name="Account" label="Account" rules={[{required:true}]} ><Input placeholder="account Name" style={{width:200}}/></Form.Item> <Form.Item label="Contact Details">
<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> <Input.Group compact>
<Form.Item name="phone" style={{marginRight:16}} rules={[{required:true}]}><Input placeholder="Phone number"></Input></Form.Item> <Form.Item name="phone" style={{ marginRight: 16 }} rules={[{ required: true }]}>
<Form.Item name="email" rules={[{required:true}]}><Input placeholder="Email" ></Input></Form.Item> <Input placeholder="Phone number"></Input>
</Form.Item>
<Form.Item name="email" rules={[{ required: true }]}>
<Input placeholder="Email"></Input>
</Form.Item>
</Input.Group> </Input.Group>
</Form.Item> </Form.Item>
<Form.Item name="community" label="Community" ><SelectCommunity ></SelectCommunity></Form.Item> <Form.Item name="community" label="Estate">
<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 }}> <Select placeholder="Level" style={{ width: 240 }}>
{ {authorizeLevel.map((item, index) => {
authorizeLevel.map((item, index) => { return (
return <Option key={"" + index} value={"" + index+1}>{item}</Option> <Option key={'' + index} value={'' + index + 1}>
}) {item}
} </Option>
);
})}
</Select> </Select>
</Form.Item> </Form.Item>
<Form.Item name="premission" label="Permission" wrapperCol={{ offset: 1}}> <Form.Item name="premission" label="Permission" wrapperCol={{ offset: 1 }}>
<TreeAction/> <TreeAction />
</Form.Item> </Form.Item>
<Line></Line> <Line></Line>
<Form.Item wrapperCol={{ ...Layout.wrapperCol, offset: 3 }}><Button type="primary" htmlType="submit">Submit</Button></Form.Item> <Form.Item wrapperCol={{ ...Layout.wrapperCol, offset: 3 }}>
<Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Form> </Form>
</div> </div>
); );
}; };
function mapStateToProps(state:any) { function mapStateToProps(state: any) {
const { Data } = state.Account; const { Data } = state.Account;
return { return {
Data Data,
}; };
} }
export default connect(mapStateToProps)(AccountManagement); export default connect(mapStateToProps)(AccountManagement);
...@@ -15,7 +15,7 @@ import moment from 'moment'; ...@@ -15,7 +15,7 @@ import moment from 'moment';
const service = (props: any) => { const service = (props: any) => {
const columns = [ const columns = [
{ {
title: 'Community', title: 'Estate',
dataIndex: 'communityName', dataIndex: 'communityName',
key: 'communityName', key: 'communityName',
width: 240, width: 240,
...@@ -144,7 +144,7 @@ const service = (props: any) => { ...@@ -144,7 +144,7 @@ const service = (props: any) => {
toolBarRender={false} toolBarRender={false}
scroll={{ x: 980 }} scroll={{ x: 980 }}
options={false} options={false}
headerTitle="Community List" headerTitle="Estate List"
/> />
{Data ? ( {Data ? (
<div className="pages"> <div className="pages">
......
...@@ -150,7 +150,7 @@ const service = (props: any) => { ...@@ -150,7 +150,7 @@ const service = (props: any) => {
onFinish={onFinish} onFinish={onFinish}
> >
{/* 小区名 */} {/* 小区名 */}
<Form.Item label="Community" name="communityName" rules={[{ required: true }]}> <Form.Item label="Estate" name="communityName" rules={[{ required: true }]}>
<SearchOptionsCommnity <SearchOptionsCommnity
// ubmit={extendName} // ubmit={extendName}
opname={opname} opname={opname}
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-03-02 14:39:40 * @Date: 2021-03-02 14:39:40
* @LastEditTime: 2021-03-18 10:40:22 * @LastEditTime: 2021-04-22 15:18:59
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx * @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx
...@@ -124,7 +124,7 @@ const service = (props: any) => { ...@@ -124,7 +124,7 @@ const service = (props: any) => {
onFinish={onFinish} onFinish={onFinish}
> >
{/* 小区名 */} {/* 小区名 */}
<Form.Item label="Community" name="communityName" rules={[{ required: true }]}> <Form.Item label="Estate" name="communityName" rules={[{ required: true }]}>
<SearchOptionsCommnity <SearchOptionsCommnity
// ubmit={extendName} // ubmit={extendName}
opname={opname} opname={opname}
......
...@@ -3,7 +3,7 @@ import { Table, Space, Button, message } from 'antd'; ...@@ -3,7 +3,7 @@ import { Table, Space, Button, message } from 'antd';
import { connect, history } from 'umi'; import { connect, history } from 'umi';
import { RA, urlEncode, filterObjbyTg, Clear } from '@/utils/method'; import { RA, urlEncode, filterObjbyTg, Clear } from '@/utils/method';
import { objectColumns } from '@/utils/string'; import { objectColumns } from '@/utils/string';
import { timestampToTime } from '@/utils/time'; import moment from 'moment';
import TitleSearch from '../../components/TitleSearch/TitleSearch'; import TitleSearch from '../../components/TitleSearch/TitleSearch';
let readyData: any = { let readyData: any = {
...@@ -33,7 +33,7 @@ const Card = (props: any) => { ...@@ -33,7 +33,7 @@ const Card = (props: any) => {
]; ];
const columns = objectColumns([ const columns = objectColumns([
['Community', 'community_name'], ['Estate', 'community_name'],
[ [
'Requestor', 'Requestor',
'apply_name', 'apply_name',
...@@ -47,9 +47,11 @@ const Card = (props: any) => { ...@@ -47,9 +47,11 @@ const Card = (props: any) => {
'Unit No', 'Unit No',
null, null,
(text: any, record: any) => ( (text: any, record: any) => (
<Space size="middle"> <>
{record.build_number + ' #' + record.floor_number + '-' + record.room_number} {record.build_number ? <span>{record.build_number} #</span> : ''}
</Space> <span>{record.floor_number}-</span>
<span>{record.room_number}</span>
</>
), ),
], ],
[ [
...@@ -61,7 +63,7 @@ const Card = (props: any) => { ...@@ -61,7 +63,7 @@ const Card = (props: any) => {
'Application Time', 'Application Time',
null, null,
(text: any, record: any) => ( (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>
), ),
], ],
[ [
......
...@@ -42,8 +42,7 @@ const CardAdd = (props: any) => { ...@@ -42,8 +42,7 @@ const CardAdd = (props: any) => {
} }
values.communityName = communityName; values.communityName = communityName;
values.buildNumber = 'BLK ' + values.buildNumber; values.buildNumber = values.buildNumber ? 'BLK ' + values.buildNumber : '';
console.log(values);
setLoading(true); setLoading(true);
RA(35, values, module, dispatch); RA(35, values, module, dispatch);
}; };
...@@ -86,7 +85,7 @@ const CardAdd = (props: any) => { ...@@ -86,7 +85,7 @@ const CardAdd = (props: any) => {
<TitleBack title="New Application For Access Card" /> <TitleBack title="New Application For Access Card" />
<Form form={form} name="basic" onFinish={onFinish} validateMessages={validateMessages}> <Form form={form} name="basic" onFinish={onFinish} validateMessages={validateMessages}>
<Spin spinning={loading}> <Spin spinning={loading}>
<Form.Item labelCol={{ span: 3 }} label="Community" style={{ marginBottom: 0 }}> <Form.Item labelCol={{ span: 3 }} label="Estate" style={{ marginBottom: 0 }}>
<Input.Group compact> <Input.Group compact>
<Form.Item name="communityName" style={{ marginRight: 20 }}> <Form.Item name="communityName" style={{ marginRight: 20 }}>
<SearchOptionsCommnity opname={extendName} /> <SearchOptionsCommnity opname={extendName} />
...@@ -95,13 +94,6 @@ const CardAdd = (props: any) => { ...@@ -95,13 +94,6 @@ const CardAdd = (props: any) => {
name="buildNumber" name="buildNumber"
style={{ marginRight: 16 }} style={{ marginRight: 16 }}
className={styles.buildNumber} 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" /> <Input style={{ width: 80 }} placeholder="BLK" />
</Form.Item> </Form.Item>
......
This diff is collapsed.
...@@ -26,7 +26,7 @@ const Detail = (props: any) => { ...@@ -26,7 +26,7 @@ const Detail = (props: any) => {
const [headTitle, setHeadTitle] = useState(''); const [headTitle, setHeadTitle] = useState('');
const headTitles = [ const headTitles = [
'Reply To Community maintenance', 'Reply To Estate maintenance',
'Reply To Warranty Period Service', 'Reply To Warranty Period Service',
'Reply To Owner Complaints', 'Reply To Owner Complaints',
'Reply To Report Online', 'Reply To Report Online',
...@@ -68,6 +68,8 @@ const Detail = (props: any) => { ...@@ -68,6 +68,8 @@ const Detail = (props: any) => {
fromRef.current.setFieldsValue(tmp); fromRef.current.setFieldsValue(tmp);
} }
setLoading(false); setLoading(false);
console.log(CurDataDetail);
} }
}, [CurDataDetail]); }, [CurDataDetail]);
...@@ -191,7 +193,7 @@ const Detail = (props: any) => { ...@@ -191,7 +193,7 @@ const Detail = (props: any) => {
</Row> </Row>
) : null} ) : null}
<Row gutter={16} style={{ marginTop: 20 }}> <Row gutter={16} style={{ marginTop: 20 }}>
<Col span={3}>Solution & Conclusion:</Col> <Col span={3}>Action Taken:</Col>
<Col> <Col>
<Form.Item name="replyContent" rules={[{ required: true, max: 300 }]}> <Form.Item name="replyContent" rules={[{ required: true, max: 300 }]}>
<TextArea <TextArea
......
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);
...@@ -3,7 +3,7 @@ import { connect, history } from 'umi'; ...@@ -3,7 +3,7 @@ import { connect, history } from 'umi';
import { Table, Space, message } from 'antd'; import { Table, Space, message } from 'antd';
import { RA, urlEncode, filterObj, filterObjbyTg } from '@/utils/method'; import { RA, urlEncode, filterObj, filterObjbyTg } from '@/utils/method';
import styles from './css/index.less'; import styles from './css/index.less';
import { timestampToTime3 } from '../../utils/time'; import moment from 'moment';
import TitleSearch from '../../components/TitleSearch/TitleSearch'; import TitleSearch from '../../components/TitleSearch/TitleSearch';
const pathname = [ const pathname = [
...@@ -46,7 +46,7 @@ const PropertyServices = (props: any) => { ...@@ -46,7 +46,7 @@ const PropertyServices = (props: any) => {
// const [readyData, setReadyData] = useState(null); // const [readyData, setReadyData] = useState(null);
const columns = [ const columns = [
{ title: 'Community', dataIndex: 'community_name' }, { title: 'Estate', dataIndex: 'community_name' },
{ {
title: 'Requestor', title: 'Requestor',
dataIndex: 'owner_name', dataIndex: 'owner_name',
...@@ -60,8 +60,10 @@ const PropertyServices = (props: any) => { ...@@ -60,8 +60,10 @@ const PropertyServices = (props: any) => {
}, },
{ {
title: parseInt(serviceTypeGobal) - 1 === 0 ? 'Attended By' : 'Description', // title: parseInt(serviceTypeGobal) - 1 === 0 ? 'Attended By' : 'Description',
dataIndex: parseInt(serviceTypeGobal) - 1 === 0 ? 'handle_name' : 'service_content', // dataIndex: parseInt(serviceTypeGobal) - 1 === 0 ? 'handle_name' : 'service_content',
title: 'Description',
dataIndex: 'service_content',
ellipsis: true, ellipsis: true,
// width: 400, // width: 400,
render: (text: any) => <span>{text != null ? text : ''}</span>, render: (text: any) => <span>{text != null ? text : ''}</span>,
...@@ -70,7 +72,7 @@ const PropertyServices = (props: any) => { ...@@ -70,7 +72,7 @@ const PropertyServices = (props: any) => {
{ {
title: 'Submission Time', title: 'Submission Time',
dataIndex: 'create_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', title: 'Status',
...@@ -151,6 +153,10 @@ const PropertyServices = (props: any) => { ...@@ -151,6 +153,10 @@ const PropertyServices = (props: any) => {
pathname.forEach((item, index) => { pathname.forEach((item, index) => {
if (location.pathname.indexOf(item) > -1) { if (location.pathname.indexOf(item) > -1) {
serviceType = `${index + 1}`; serviceType = `${index + 1}`;
// console.log(serviceType);
// console.log(index);
// console.log(location.pathname);
// console.log(pathname);
setServiceType(serviceType); setServiceType(serviceType);
} }
}); });
...@@ -175,6 +181,11 @@ const PropertyServices = (props: any) => { ...@@ -175,6 +181,11 @@ const PropertyServices = (props: any) => {
}; };
// 获取数据 // 获取数据
setLoading(true); setLoading(true);
// console.log(serviceType);
// console.log(tmp);
// console.log(pageNum);
RA( RA(
40, 40,
{ {
......
import React, { useState, useEffect } from 'react'; 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 { connect, history } from 'umi';
import { RA, urlEncode, filterObjbyTg } from '@/utils/method'; import { RA, urlEncode, filterObjbyTg } from '@/utils/method';
import { objectColumns, stringTab } from '@/utils/string'; import { objectColumns, stringTab } from '@/utils/string';
import { timestampToTime } from '@/utils/time'; import { timestampToTime } from '@/utils/time';
import TitleSearch from '../../components/TitleSearch/TitleSearch'; import TitleSearch from '@/components/TitleSearch/TitleSearch';
import moment from 'moment';
const module = 'CommunityService'; const module = 'CommunityService';
...@@ -18,12 +19,24 @@ const Renovation = (props: any) => { ...@@ -18,12 +19,24 @@ const Renovation = (props: any) => {
[2, 'Rejected'], [2, 'Rejected'],
]; ];
const { dispatch, Data8, location } = props; const { dispatch, Data9, Data8, location } = props;
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [readyData, setReadyData] = useState(null); const [readyData, setReadyData] = useState(null);
// 地址 默认是装修申请
const [urlType, setUrlType] = useState(0);
// 地址看是哪一个
const WebUrl = [
'RenovationApplication', // 装修申请
'MoveOut', // 迁出申请
];
// let { log } = console;
// 装修申请的表格
const columns = objectColumns([ const columns = objectColumns([
['Community', 'communityName'], ['Estate', 'communityName'],
[ [
'Applicant', 'Applicant',
'applyforName', 'applyforName',
...@@ -38,13 +51,14 @@ const Renovation = (props: any) => { ...@@ -38,13 +51,14 @@ const Renovation = (props: any) => {
null, null,
(text: any, record: any) => ( (text: any, record: any) => (
<div> <div>
{record.communityBuildDecorate} #{record.communityFloorDecorate}- {record.communityBuildDecorate ? <span>{record.communityBuildDecorate} #</span> : ''}
{record.communityRoomDecoate} <span>{record.communityFloorDecorate}-</span>
<span>{record.communityRoomDecoate}</span>
</div> </div>
), ),
], ],
['Content', 'decorationContent', (text: any) => <div>{stringTab(text)}</div>], ['Content', 'decorationContent', (text: any) => <div>{stringTab(text)}</div>],
['Application Time', 'createTime', (text: any) => <div>{timestampToTime(text.time)}</div>], ['Application Time', 'createTime', (text: any) => moment(text.time).format('MM.DD HH:mm')],
['status', 'decorationStatus', (text: any) => <div>{decorationStatus[parseInt(text)][1]}</div>], ['status', 'decorationStatus', (text: any) => <div>{decorationStatus[parseInt(text)][1]}</div>],
[ [
'Actions', 'Actions',
...@@ -57,6 +71,71 @@ const Renovation = (props: any) => { ...@@ -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(() => { useEffect(() => {
pageNum = 1; pageNum = 1;
// 分页设置 // 分页设置
...@@ -77,24 +156,36 @@ const Renovation = (props: any) => { ...@@ -77,24 +156,36 @@ const Renovation = (props: any) => {
setReadyData(tmp); setReadyData(tmp);
// 获取数据 // 获取数据
setLoading(true); setLoading(true);
RA(
23, // 看是哪一个
{ // 细分类:页面指令
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, ...tmp,
handleStatus: handleStatus:
location.query.handleStatus !== undefined ? parseInt(location.query.handleStatus) : null, location.query.handleStatus !== undefined ? parseInt(location.query.handleStatus) : null,
pageNum, pageNum,
}, };
module,
dispatch, // 请求
); RA(serviceType == 0 ? 23 : 74, objs, module, dispatch);
}, [location]); }, [location]);
useEffect(() => { useEffect(() => {
if (Data8 != null) { if (Data9 != null || Data8 != null) {
setLoading(false); setLoading(false);
} }
}, [Data8]); }, [Data9, Data8]);
// 页面搜索 // 页面搜索
const ClickTitleSearch = (comment: any) => { const ClickTitleSearch = (comment: any) => {
...@@ -108,7 +199,9 @@ const Renovation = (props: any) => { ...@@ -108,7 +199,9 @@ const Renovation = (props: any) => {
message.error('No Permissions!!!', 3); message.error('No Permissions!!!', 3);
return; 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) => { const PageChange = (values: any) => {
...@@ -129,6 +222,8 @@ const Renovation = (props: any) => { ...@@ -129,6 +222,8 @@ const Renovation = (props: any) => {
defaultValue={readyData} defaultValue={readyData}
onSubmit={ClickTitleSearch} onSubmit={ClickTitleSearch}
/> />
{urlType == 0 ? (
<Table <Table
loading={loading} loading={loading}
rowKey="id" rowKey="id"
...@@ -143,13 +238,29 @@ const Renovation = (props: any) => { ...@@ -143,13 +238,29 @@ const Renovation = (props: any) => {
showSizeChanger: false, 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> </div>
); );
}; };
function map(state: any) { function map(state: any) {
const { Data8 } = state[module]; const { Data9, Data8 } = state[module];
return { Data8 }; return { Data9, Data8 };
} }
export default connect(map)(Renovation); export default connect(map)(Renovation);
...@@ -90,18 +90,23 @@ const RenovationDetail = (props: any) => { ...@@ -90,18 +90,23 @@ const RenovationDetail = (props: any) => {
<> <>
<TitleBack <TitleBack
sublist={[ sublist={[
'Status : ' + decoration_status[listData.decorationStatus][1], 'Status : ' + decoration_status &&
'Time : ' + timestampToTime(listData.createTime.time), 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'} title={listData.decorationStatus === 0 ? 'Renovation Reply' : 'Renovation Detail'}
/> />
<Row gutter={8}> <Row gutter={8}>
<Col>Community:</Col> <Col>Estate:</Col>
<Col span={3}>{onwerDetail.communityName}</Col> <Col span={3}>{onwerDetail.communityName}</Col>
<Col>Unit:</Col> <Col>Unit:</Col>
<Col> <Col>
{onwerDetail.buildingNumber} #{onwerDetail.floorNumber}-{onwerDetail.roomNumber} {onwerDetail.buildingNumber ? onwerDetail.buildingNumber + ' #' : ''}
{onwerDetail.floorNumber}-{onwerDetail.roomNumber}
</Col> </Col>
</Row> </Row>
...@@ -131,12 +136,12 @@ const RenovationDetail = (props: any) => { ...@@ -131,12 +136,12 @@ const RenovationDetail = (props: any) => {
<Col>{listData.contactEmail}</Col> <Col>{listData.contactEmail}</Col>
</Row> </Row>
<Row gutter={8} style={{ marginTop: 16 }}> <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 span={3}>{timestampToTime(listData.decorationBeginTime)}</Col>
<Col>{timestampToTime(listData.decorationEndTime)}</Col> <Col>{timestampToTime(listData.decorationEndTime)}</Col>
</Row> </Row>
<Row gutter={8} style={{ marginTop: 16 }}> <Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Reason:</Col> <Col span={3}>Description of Work:</Col>
<Col> <Col>
<TextArea <TextArea
autoSize autoSize
...@@ -174,7 +179,7 @@ const RenovationDetail = (props: any) => { ...@@ -174,7 +179,7 @@ const RenovationDetail = (props: any) => {
</Row> </Row>
<Row gutter={8} style={{ marginTop: 16 }}> <Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Reply:</Col> <Col span={3}>Remarks:</Col>
<Col> <Col>
<Form.Item <Form.Item
name="replyView" name="replyView"
...@@ -225,7 +230,7 @@ const RenovationDetail = (props: any) => { ...@@ -225,7 +230,7 @@ const RenovationDetail = (props: any) => {
</Row> </Row>
<Row gutter={8} style={{ marginTop: 16 }}> <Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Reply:</Col> <Col span={3}>Remarks:</Col>
<Col> <Col>
<TextArea <TextArea
style={{ style={{
......
...@@ -8,210 +8,215 @@ ...@@ -8,210 +8,215 @@
min-width: 1020px; min-width: 1020px;
} }
//头部组件 //头部组件
.box{ .box {
width: 100%; width: 100%;
height: 64px; height: 64px;
position: relative; position: relative;
} }
.item1{ .item1 {
position: absolute; position: absolute;
width: 180px; width: 180px;
text-align: center; text-align: center;
border-left: 5px solid rgba(24,144,255,1); border-left: 5px solid rgba(24, 144, 255, 1);
font-family:'Source Han Sans CN'; font-family: 'Source Han Sans CN';
font-size: 18px; font-size: 18px;
font-weight: 600; font-weight: 600;
color: #000000; color: #000000;
} }
.item3{ .item3 {
width:80px; width: 80px;
height: 32px; height: 32px;
position: absolute; position: absolute;
right: 0; right: 0;
outline: none; outline: none;
background:none; background: none;
cursor: pointer; cursor: pointer;
border:1px solid rgba(217,217,217,1); border: 1px solid rgba(217, 217, 217, 1);
border-radius:2px; border-radius: 2px;
} }
//内容组件 //内容组件
.box1{ .box1 {
width: 100%; width: 100%;
height: 36px; height: 36px;
position: relative; position: relative;
} }
.box1item1{ .box1item1 {
position: absolute; position: absolute;
} }
.box1item2{ .box1item2 {
position: absolute; position: absolute;
left: 215px; left: 215px;
} }
.box2{ .box2 {
width: 100%; width: 100%;
height: 36px; height: 36px;
position: relative; position: relative;
} }
.box2item1{ .box2item1 {
position: absolute; position: absolute;
} }
.box2item2{ .box2item2 {
position: absolute; position: absolute;
left: 430px; left: 430px;
} }
.box3{ .box3 {
width: 100%; width: 100%;
height: 36px; height: 36px;
position: relative; position: relative;
} }
.box3item1{ .box3item1 {
position: absolute; position: absolute;
} }
.box3item2{ .box3item2 {
position: absolute; position: absolute;
left: 132px; left: 132px;
} }
.box3item3{ .box3item3 {
position: absolute; position: absolute;
left: 315px; left: 315px;
} }
.box3item4{ .box3item4 {
position: absolute; position: absolute;
left: 445px; left: 445px;
} }
.box3item5{ .box3item5 {
position: absolute; position: absolute;
left: 588px; left: 588px;
} }
.box4{ .box4 {
width: 100%; width: 100%;
height: 90px; height: 90px;
position: relative; position: relative;
margin-bottom: 28px; margin-bottom: 28px;
} }
.box4item1{ .box4item1 {
position: absolute; position: absolute;
} }
.box4item2{ .box4item2 {
position: absolute; position: absolute;
left: 193px; left: 193px;
top:10px; top: 10px;
width: 394px; width: 394px;
height: 80px; height: 80px;
background-color: rgba(244,244,244,1); background-color: rgba(244, 244, 244, 1);
overflow-y: auto; overflow-y: auto;
padding: 8px; padding: 8px;
} }
.box5{ .box5 {
width: 100%; width: 100%;
height: 80px; height: 80px;
position: relative; position: relative;
} }
.box5item1{ .box5item1 {
position: absolute; position: absolute;
} }
.box5item2{ .box5item2 {
position: absolute; position: absolute;
left: 193px; left: 193px;
} }
.box5item3{ .box5item3 {
position: absolute; position: absolute;
left: 311px; left: 311px;
} }
.box5item4{ .box5item4 {
position: absolute; position: absolute;
left: 429px; left: 429px;
} }
// 线栏 // 线栏
.line{ .line {
width: 100%; width: 100%;
height: 1px; height: 1px;
border-top: 1px solid rgba(217,217,217,1); border-top: 1px solid rgba(217, 217, 217, 1);
margin-top: 28px; margin-top: 28px;
margin-bottom: 28px; margin-bottom: 28px;
} }
.box6{ .box6 {
width: 100%; width: 100%;
height: 32px; height: 32px;
position: relative; position: relative;
margin-bottom: 28px; margin-bottom: 28px;
line-height: 32px; line-height: 32px;
} }
.box6item1{ .box6item1 {
position: absolute; position: absolute;
} }
.box6item2{ .box6item2 {
position: absolute; position: absolute;
left: 193px; left: 193px;
} }
.box6item3{ .box6item3 {
position: absolute; position: absolute;
left: 498px; left: 498px;
} }
.box6item4{ .box6item4 {
position: absolute; position: absolute;
left: 626px; left: 626px;
} }
.box7{ .box7 {
width: 100%; width: 100%;
height: 80px; height: 80px;
position: relative; position: relative;
margin-bottom: 28px; margin-bottom: 28px;
} }
.box7item1{ .box7item1 {
position: absolute; position: absolute;
} }
.box7item2{ .box7item2 {
position: absolute; position: absolute;
left: 193px; left: 193px;
} }
.box8{ .box8 {
width: 100%; width: 100%;
height: 200px; height: 200px;
position: relative; position: relative;
} }
.box8min{ .box8min {
width: 100%; width: 100%;
height: 100px; height: 100px;
position: relative; position: relative;
} }
.box8item1{ .box8item1 {
position: absolute; position: absolute;
} }
.box8item2{ .box8item2 {
position: absolute; position: absolute;
left: 193px; left: 193px;
} }
.box8item3{ .box8item3 {
position: absolute; position: absolute;
left: 800px; left: 800px;
} }
.box8item01{ .box8item01 {
position: absolute; position: absolute;
} }
.box8item02{ .box8item02 {
position: absolute; position: absolute;
left: 20px; left: 20px;
} }
.box8item03{ .box8item03 {
position: absolute; position: absolute;
left: 20px; left: 20px;
} }
.diys {
display: flex;
justify-content: space-between;
align-items: center;
.ant-form-item {
&:nth-child(1) {
margin-right: 20px;
}
}
}
...@@ -111,8 +111,8 @@ const Adds = (props: any) => { ...@@ -111,8 +111,8 @@ const Adds = (props: any) => {
type: imgUrl.name.match(/\.([^\.]+)$/)[1].toLowerCase(), type: imgUrl.name.match(/\.([^\.]+)$/)[1].toLowerCase(),
url: imgUrl.url, url: imgUrl.url,
}; };
setpreviewImage(info); // setpreviewImage(info);
setpreviewVisible(true); // setpreviewVisible(true);
// openDows(imgUrl.url, imgUrl.name); // openDows(imgUrl.url, imgUrl.name);
} }
}, [imgUrl]); }, [imgUrl]);
...@@ -203,7 +203,7 @@ const Adds = (props: any) => { ...@@ -203,7 +203,7 @@ const Adds = (props: any) => {
: values.residentialPhone; : values.residentialPhone;
values.residentialHotlineName = residentialHotlineName values.residentialHotlineName = residentialHotlineName
? undeFi(residentialHotlineName) ? undeFi(residentialHotlineName)
: 'Community Hotline'; : 'Estate Hotline';
// 没选的话就上面小区时间 // 没选的话就上面小区时间
if (time) { if (time) {
...@@ -313,7 +313,7 @@ const Adds = (props: any) => { ...@@ -313,7 +313,7 @@ const Adds = (props: any) => {
<div className="form"> <div className="form">
<h3 className="capi"> <h3 className="capi">
<EditOutlined /> <EditOutlined />
&nbsp; {match && match.params.id ? 'edit' : 'Create New'} community &nbsp; {match && match.params.id ? 'edit' : 'Create New'} Estate
<div className="back"> <div className="back">
<Button onClick={goToReturn}> <Button onClick={goToReturn}>
<LeftOutlined /> <LeftOutlined />
...@@ -334,7 +334,7 @@ const Adds = (props: any) => { ...@@ -334,7 +334,7 @@ const Adds = (props: any) => {
{/* 小区邮编、地址和名称 */} {/* 小区邮编、地址和名称 */}
<Form.Item <Form.Item
name="des" name="des"
label="Community Name" label="Estate Name"
rules={[{ validator: checkPrice }]} rules={[{ validator: checkPrice }]}
style={{ marginBottom: 15 }} style={{ marginBottom: 15 }}
className="must" className="must"
......
This diff is collapsed.
...@@ -13,7 +13,7 @@ import './celllist.less'; ...@@ -13,7 +13,7 @@ import './celllist.less';
const CellLists = (props: any) => { const CellLists = (props: any) => {
const columns = objectColumns([ const columns = objectColumns([
['Community', 'residentialName'], ['Estate', 'residentialName'],
['Administrator', 'residentialManagerUserName'], ['Administrator', 'residentialManagerUserName'],
[ [
'Operation Hours', 'Operation Hours',
...@@ -131,7 +131,7 @@ const CellLists = (props: any) => { ...@@ -131,7 +131,7 @@ const CellLists = (props: any) => {
checklist={Init ? Init.CommunityList : null} checklist={Init ? Init.CommunityList : null}
onSubmit={CallBackTitleSearch} onSubmit={CallBackTitleSearch}
push={{ push={{
name: 'Create New Community', name: 'Create New Estate',
url: '/CommunityManagement/CellList/Add', url: '/CommunityManagement/CellList/Add',
}} }}
/> />
...@@ -164,7 +164,7 @@ const CellLists = (props: any) => { ...@@ -164,7 +164,7 @@ const CellLists = (props: any) => {
reload: false, reload: false,
setting: false, setting: false,
}} }}
headerTitle="Community List" headerTitle="Estate List"
// pagination={{ defaultCurrent: 1, total: Data.totalRow }} // pagination={{ defaultCurrent: 1, total: Data.totalRow }}
/> />
{village.page ? ( {village.page ? (
......
...@@ -153,7 +153,7 @@ const Detail = (props: any) => { ...@@ -153,7 +153,7 @@ const Detail = (props: any) => {
<div className="form" style={{ width: '100%', minHeight: '20vh' }}> <div className="form" style={{ width: '100%', minHeight: '20vh' }}>
<h3> <h3>
<EyeOutlined /> <EyeOutlined />
&nbsp;Community Details &nbsp;Estate Details
<div className="back"> <div className="back">
<Button onClick={goToReturn}> <Button onClick={goToReturn}>
<LeftOutlined /> <LeftOutlined />
...@@ -167,7 +167,7 @@ const Detail = (props: any) => { ...@@ -167,7 +167,7 @@ const Detail = (props: any) => {
<div className="celBox"> <div className="celBox">
{/* 激活码 */} {/* 激活码 */}
<div className="code"> <div className="code">
<li>Community Activation Code</li> <li>Estate Activation Code</li>
<div <div
style={{ style={{
width: 122, width: 122,
...@@ -185,12 +185,12 @@ const Detail = (props: any) => { ...@@ -185,12 +185,12 @@ const Detail = (props: any) => {
{/* 详情 */} {/* 详情 */}
<div className="list-item"> <div className="list-item">
<div className="item"> <div className="item">
<label>Community Name:</label> <label>Estate Name:</label>
<span>{detailData.communityData.residentialName}</span> <span>{detailData.communityData.residentialName}</span>
</div> </div>
{/* ---------- */} {/* ---------- */}
<div className="item"> <div className="item">
<label>Community Address:</label> <label>Estate Address:</label>
<span> <span>
{detailData.communityData.residentialAddress}&nbsp;&nbsp; SINGAPORE &nbsp; {detailData.communityData.residentialAddress}&nbsp;&nbsp; SINGAPORE &nbsp;
{/* 这是去掉 新加坡 英文字段 */} {/* 这是去掉 新加坡 英文字段 */}
...@@ -373,7 +373,7 @@ const Detail = (props: any) => { ...@@ -373,7 +373,7 @@ const Detail = (props: any) => {
onClick={openModel} onClick={openModel}
> >
{' '} {' '}
<span className="capi">Close the community</span> <span className="capi">Close the Estate</span>
</Button> </Button>
</div> </div>
) : ( ) : (
...@@ -382,7 +382,7 @@ const Detail = (props: any) => { ...@@ -382,7 +382,7 @@ const Detail = (props: any) => {
{/* 确认关闭框 */} {/* 确认关闭框 */}
<Modal <Modal
title="Are You Sure You Want To Close The Community ?" title="Are You Sure You Want To Close The Estate ?"
visible={ModelFee} visible={ModelFee}
centered={true} centered={true}
onCancel={handleCancel} onCancel={handleCancel}
...@@ -393,9 +393,8 @@ const Detail = (props: any) => { ...@@ -393,9 +393,8 @@ const Detail = (props: any) => {
confirmLoading={loading} confirmLoading={loading}
> >
<p className="capi"> <p className="capi">
Close the community will delete{' '} Close the Estate will delete <span style={{ color: 'red' }}> all owners </span>
<span style={{ color: 'red' }}> all owners </span> in the Estate .
in the community .
</p> </p>
<p className="capi">please operate carefully!</p> <p className="capi">please operate carefully!</p>
</Modal> </Modal>
...@@ -409,7 +408,7 @@ const Detail = (props: any) => { ...@@ -409,7 +408,7 @@ const Detail = (props: any) => {
// '关闭小区后的下载预约费用列表或者返回' // '关闭小区后的下载预约费用列表或者返回'
<Result <Result
status="success" 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." subTitle="There is booking facility information of transaction in the current community, please select download."
extra={[ extra={[
ModelResult && ModelResult.downloadExcelUrl ? ( ModelResult && ModelResult.downloadExcelUrl ? (
......
...@@ -170,7 +170,7 @@ const Add = (props: any) => { ...@@ -170,7 +170,7 @@ const Add = (props: any) => {
onFinish={onFinish} onFinish={onFinish}
validateMessages={validateMessages} 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 <SelectCommunity
checklist={DataSave == null ? null : DataSave.communityNum.split(',')} checklist={DataSave == null ? null : DataSave.communityNum.split(',')}
/> />
......
...@@ -22,7 +22,7 @@ const CommunityAnnouncement = (props: any) => { ...@@ -22,7 +22,7 @@ const CommunityAnnouncement = (props: any) => {
// 表头 // 表头
const columns: any = [ const columns: any = [
{ {
title: 'Community', title: 'Estate',
dataIndex: 'communityNum', dataIndex: 'communityNum',
width: 240, width: 240,
ellipsis: { ellipsis: {
......
...@@ -113,7 +113,7 @@ const Detail = (props: any) => { ...@@ -113,7 +113,7 @@ const Detail = (props: any) => {
{hanFunStart(DataSave.noticStatus)} {hanFunStart(DataSave.noticStatus)}
</Descriptions.Item> </Descriptions.Item>
{/* 生效小区 */} {/* 生效小区 */}
<Descriptions.Item label="Effective Community:" span={3}> <Descriptions.Item label="Effective Estate" span={3}>
{CommunityLists(DataSave.communityNum)} {CommunityLists(DataSave.communityNum)}
</Descriptions.Item> </Descriptions.Item>
{/* 内容 */} {/* 内容 */}
......
...@@ -79,7 +79,7 @@ const Add = (props: any) => { ...@@ -79,7 +79,7 @@ const Add = (props: any) => {
// {...layout} // {...layout}
validateMessages={validateMessages} 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 <ShowOptions
list={DataSave ? DataSave.communityNum.split(',') : []} list={DataSave ? DataSave.communityNum.split(',') : []}
defaultValue={'Put It Away'} defaultValue={'Put It Away'}
......
...@@ -161,14 +161,15 @@ const BookingDetail = (props: any) => { ...@@ -161,14 +161,15 @@ const BookingDetail = (props: any) => {
<hr /> <hr />
<Descriptions> <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="Facility">{DataSave.categoriesName}</Descriptions.Item>
<Descriptions.Item label="Schedule"> <Descriptions.Item label="Schedule">
{DataSave.subscribeDate} {ExtractTime} {DataSave.subscribeDate} {ExtractTime}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="User Name">{DataSave.accountName}</Descriptions.Item> <Descriptions.Item label="User Name">{DataSave.accountName}</Descriptions.Item>
<Descriptions.Item label="Unit No."> <Descriptions.Item label="Unit No.">
{DataSave.buildNumber} #{DataSave.floorNumber}-{DataSave.roomNumber} {DataSave.buildNumber ? DataSave.buildNumber + ' #' : ''}
{DataSave.floorNumber}-{DataSave.roomNumber}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="Contact Number">{DataSave.accountPhone}</Descriptions.Item> <Descriptions.Item label="Contact Number">{DataSave.accountPhone}</Descriptions.Item>
</Descriptions> </Descriptions>
......
...@@ -142,11 +142,11 @@ const Bookings = (props: any) => { ...@@ -142,11 +142,11 @@ const Bookings = (props: any) => {
// 监听输入框是否全部输入完毕 // 监听输入框是否全部输入完毕
useEffect(() => { useEffect(() => {
if (Unit.buildNumber && Unit.floorNumber && Unit.roomNumber) { if (Unit.floorNumber && Unit.roomNumber) {
RA(58, { RA(58, {
facilitiesId: curString.facilitiesId, facilitiesId: curString.facilitiesId,
communityName: comminityValues, communityName: comminityValues,
buildNumber: `BLK ${Unit.buildNumber}`, buildNumber: Unit.buildNumber ? `BLK ${Unit.buildNumber}` : '',
floorNumber: Unit.floorNumber, floorNumber: Unit.floorNumber,
roomNumber: Unit.roomNumber, roomNumber: Unit.roomNumber,
subscribeDate: Time, subscribeDate: Time,
...@@ -361,12 +361,12 @@ const Bookings = (props: any) => { ...@@ -361,12 +361,12 @@ const Bookings = (props: any) => {
<TitleBack title="Facility Bookings" /> <TitleBack title="Facility Bookings" />
<div className={styles.box1}> <div className={styles.box1}>
<div className={styles.box1item1}>Community : </div> <div className={styles.box1item1}>Estate : </div>
<div className={styles.box1item2}> <div className={styles.box1item2}>
<Spin spinning={loading} tip="Finding..."> <Spin spinning={loading} tip="Finding...">
<SearchOptionsCommnity <SearchOptionsCommnity
alone={true} alone={true}
placeholder={'Community Name'} placeholder={'Estate Name'}
opname={getFacility} opname={getFacility}
defaultName={DataSave != null ? DataSave.communityName : null} defaultName={DataSave != null ? DataSave.communityName : null}
// onSubmit={getFacility} // onSubmit={getFacility}
...@@ -457,7 +457,7 @@ const Bookings = (props: any) => { ...@@ -457,7 +457,7 @@ const Bookings = (props: any) => {
<span className="jio" style={{ marginLeft: 0 }}> <span className="jio" style={{ marginLeft: 0 }}>
BLK BLK
</span> </span>
<Form.Item name="buildNumber" rules={BookingsTip[2]}> <Form.Item name="buildNumber">
<Input <Input
placeholder="Blk" placeholder="Blk"
style={{ width: 80 }} style={{ width: 80 }}
......
...@@ -319,7 +319,7 @@ const Facility = (props: any) => { ...@@ -319,7 +319,7 @@ const Facility = (props: any) => {
validateMessages={validateMessages} validateMessages={validateMessages}
> >
{/* 选择小区 */} {/* 选择小区 */}
<Form.Item label="Community" name="communityName" rules={NewFaci[0]}> <Form.Item label="Estate" name="communityName" rules={NewFaci[0]}>
<SearchOptionsCommnity <SearchOptionsCommnity
// ubmit={extendName} // ubmit={extendName}
defaultName={DataSave != null ? DataSave.communityName : null} defaultName={DataSave != null ? DataSave.communityName : null}
......
...@@ -139,7 +139,7 @@ const FacilityBookings = (props: any) => { ...@@ -139,7 +139,7 @@ const FacilityBookings = (props: any) => {
// 表头 // 表头
const key = [ const key = [
['Community', 'communityName'], ['Estate', 'communityName'],
['User Name', 'accountName'], ['User Name', 'accountName'],
['Facility', 'categoriesName'], ['Facility', 'categoriesName'],
[ [
...@@ -167,7 +167,7 @@ const FacilityBookings = (props: any) => { ...@@ -167,7 +167,7 @@ const FacilityBookings = (props: any) => {
], ],
]; ];
const key2 = [ const key2 = [
['Community', 'community'], ['Estate', 'community'],
[ [
'Facilities', 'Facilities',
'facilities', 'facilities',
......
...@@ -301,7 +301,7 @@ const FacilityTow = (props: any) => { ...@@ -301,7 +301,7 @@ const FacilityTow = (props: any) => {
{/* 设施切换 */} {/* 设施切换 */}
<div className={'FacilityName'}> <div className={'FacilityName'}>
<label>Community :</label> {DataSave ? DataSave.community : ''} <label>Estate :</label> {DataSave ? DataSave.community : ''}
</div> </div>
<Tabs defaultActiveKey="0" tabPosition="top" onTabClick={(key) => onTabClicks(key)}> <Tabs defaultActiveKey="0" tabPosition="top" onTabClick={(key) => onTabClicks(key)}>
......
...@@ -36,7 +36,7 @@ const VisitorRecord = (props: any) => { ...@@ -36,7 +36,7 @@ const VisitorRecord = (props: any) => {
dataIndex: 'updateTime', dataIndex: 'updateTime',
render: (text: any) => moment(text).format('YYYY-MM-DD HH:mm:ss'), render: (text: any) => moment(text).format('YYYY-MM-DD HH:mm:ss'),
}, },
{ title: 'Community', dataIndex: 'visitorCommunity' }, { title: 'Estate', dataIndex: 'visitorCommunity' },
{ {
title: 'Unit No.', title: 'Unit No.',
dataIndex: 'inviterAddress', dataIndex: 'inviterAddress',
......
...@@ -36,7 +36,7 @@ const VisitorRecord = (props: any) => { ...@@ -36,7 +36,7 @@ const VisitorRecord = (props: any) => {
dataIndex: 'updateTime', dataIndex: 'updateTime',
render: (text: any) => moment(text).format('YYYY-MM-DD HH:mm:ss'), render: (text: any) => moment(text).format('YYYY-MM-DD HH:mm:ss'),
}, },
{ title: 'Community', dataIndex: 'visitorCommunity' }, { title: 'Estate', dataIndex: 'visitorCommunity' },
{ {
title: 'Unit No.', title: 'Unit No.',
dataIndex: 'inviterAddress', dataIndex: 'inviterAddress',
......
...@@ -46,22 +46,22 @@ const Contract = (props: any) => { ...@@ -46,22 +46,22 @@ const Contract = (props: any) => {
}; };
// 表头 // 表头
const columns = [ const columns = [
{ // {
title: 'Contract Number', // title: 'Contract Number',
render: function (record: any) { // render: function (record: any) {
let mom = moment(record.contractValidEndDate).diff(moment(), 'months'); // let mom = moment(record.contractValidEndDate).diff(moment(), 'months');
// console.log(mom); // // console.log(mom);
if (mom < 3) { // if (mom < 3) {
return ( // return (
<Tooltip title="Due Soon" placement="right" color={'red'} key={record.id}> // <Tooltip title="Due Soon" placement="right" color={'red'} key={record.id}>
<span className={styles.red}>{record.contractNumber}</span> // <span className={styles.red}>{record.contractNumber}</span>
</Tooltip> // </Tooltip>
); // );
} else { // } else {
return <span>{record.contractNumber}</span>; // return <span>{record.contractNumber}</span>;
} // }
}, // },
}, // 合同编号 // }, // 合同编号
{ {
title: ' Contract Party', title: ' Contract Party',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
...@@ -73,7 +73,7 @@ const Contract = (props: any) => { ...@@ -73,7 +73,7 @@ const Contract = (props: any) => {
), ),
}, //合同方 }, //合同方
{ title: 'Contract Title', dataIndex: 'contractTitle' }, // 合同标题 { title: 'Contract Title', dataIndex: 'contractTitle' }, // 合同标题
{ title: 'Community Name', dataIndex: 'communityName' }, // 小区名 { title: 'Estate Name', dataIndex: 'communityName' }, // 小区名
{ title: 'Contacts', dataIndex: 'communityAccount' }, // 联系人 { title: 'Contacts', dataIndex: 'communityAccount' }, // 联系人
{ title: 'Phone', dataIndex: 'communityPhone' }, // 联系电话 { title: 'Phone', dataIndex: 'communityPhone' }, // 联系电话
{ title: 'Start Date', dataIndex: 'contractValidStartDate' }, // 生效时间 { title: 'Start Date', dataIndex: 'contractValidStartDate' }, // 生效时间
...@@ -85,14 +85,14 @@ const Contract = (props: any) => { ...@@ -85,14 +85,14 @@ const Contract = (props: any) => {
<Space size="middle"> <Space size="middle">
<a <a
onClick={() => { onClick={() => {
Jump(record, 'Edit'); Jump(record, `Edit/${record.id}`);
}} }}
> >
Edit Edit
</a> </a>
<a <a
onClick={() => { onClick={() => {
Jump(record, 'Detail'); Jump(record, `Detail/${record.id}`);
}} }}
> >
Detail Detail
......
This diff is collapsed.
import React, { useState, useEffect,useRef} from 'react'; import React, { useState, useEffect, useRef } from 'react';
import { Input ,Tabs,Table,Space, Button} from 'antd'; import { Input, Tabs, Table, Space, Button } from 'antd';
const { TabPane } = Tabs; const { TabPane } = Tabs;
import { connect, history } from 'umi'; import { connect, history } from 'umi';
const orderStatus = [[0, "已发单"], [1, "待上门"], [2, "进行中"], [3, "已完成"], [4, "已取消"]] const orderStatus = [
const goToDetail = () => { [0, '已发单'],
[1, '待上门'],
} [2, '进行中'],
[3, '已完成'],
[4, '已取消'],
];
const goToDetail = () => {};
const columns = objectColumns([ const columns = objectColumns([
["OrderNumber", "orderNumber"], ['OrderNumber', 'orderNumber'],
["Community", "communityName"], ['Estate', 'communityName'],
["Owner Name", "ownerName"], ['Owner Name', 'ownerName'],
["type", null, (text: any, record: any) => (<div>{orderStatus[record.orderStatus][1]}</div>)], ['type', null, (text: any, record: any) => <div>{orderStatus[record.orderStatus][1]}</div>],
["Content", "serviceContent"], ['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>)], 'Order Time',
["Actions",null, (text: any, record: any) => (<Space size="middle"> <a onClick={goToDetail.bind(this,record)}>Detail</a></Space>)], 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 { RA } from '@/utils/method';
import { objectColumns } from '@/utils/string'; import { objectColumns } from '@/utils/string';
import TitleSearch from '@/components/TitleSearch/TitleSearch'; import TitleSearch from '@/components/TitleSearch/TitleSearch';
import { timestampToTime, getStringToTime } from '@/utils/time'; import { timestampToTime, getStringToTime } from '@/utils/time';
const module = 'OrderManagement';
const module="OrderManagement" const Order = (props: any) => {
const Order = (props:any) => {
const { dispatch, Data } = props; const { dispatch, Data } = props;
const formRef = useRef(null) const formRef = useRef(null);
useEffect(() => { useEffect(() => {
RA(30, {orderNumber:"",serviceType:"0"}, module, dispatch) RA(30, { orderNumber: '', serviceType: '0' }, module, dispatch);
}, []) }, []);
// useEffect(() => { // useEffect(() => {
// if (Data != null) { // if (Data != null) {
// console.log("首页信息") // console.log("首页信息")
...@@ -41,39 +60,42 @@ const Order = (props:any) => { ...@@ -41,39 +60,42 @@ const Order = (props:any) => {
// },[Data]) // },[Data])
const CallBackTitleSearch = (value: any) => { const CallBackTitleSearch = (value: any) => {
if (value.orderNumber != null || value.serviceType != null) { if (value.orderNumber != null || value.serviceType != null) {
RA(30, value, module, dispatch) RA(30, value, module, dispatch);
}
} }
};
return ( return (
<div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}> <div style={{ width: '100%', minWidth: 1020, padding: 34, backgroundColor: '#ffffff' }}>
{Data != null ? (
{ <>
Data != null ? <>
<TitleSearch <TitleSearch
status={[{ status={[
name: ["serviceType", "订单状态"], {
data: orderStatus name: ['serviceType', '订单状态'],
}]} data: orderStatus,
},
]}
listkey={['orderNumber']} listkey={['orderNumber']}
list={['订单号']} list={['订单号']}
onSubmit={CallBackTitleSearch} onSubmit={CallBackTitleSearch}
></TitleSearch> ></TitleSearch>
<Table loading={false} rowKey="id" style={{ marginTop: 16 }} <Table
loading={false}
rowKey="id"
style={{ marginTop: 16 }}
dataSource={Data.data.rows} dataSource={Data.data.rows}
columns={columns} columns={columns}
pagination={{ current: 1, total: Data.total }} /> pagination={{ current: 1, total: Data.total }}
/>
</>:null </>
} ) : null}
</div> </div>
); );
}; };
function map(state: any) { function map(state: any) {
const { Data} = state[module] const { Data } = state[module];
return { Data} return { Data };
} }
export default connect(map)(Order); export default connect(map)(Order);
......
...@@ -104,7 +104,7 @@ const ChargeManager = (props: any) => { ...@@ -104,7 +104,7 @@ const ChargeManager = (props: any) => {
dataIndex: 'tosOwnerName', dataIndex: 'tosOwnerName',
}, },
{ {
title: 'Community Name', title: 'Estate Name',
dataIndex: 'communityName', dataIndex: 'communityName',
}, },
{ {
......
...@@ -60,7 +60,12 @@ const Users = (props: any) => { ...@@ -60,7 +60,12 @@ const Users = (props: any) => {
{ {
title: unit, title: unit,
render: (text: any, record: any) => ( 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>
), ),
}, },
{ {
......
...@@ -33,15 +33,22 @@ const UsersAdd = (props: any) => { ...@@ -33,15 +33,22 @@ const UsersAdd = (props: any) => {
} else { } else {
values.communityName = null; 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.owerPhone = null;
values.owerEmail = null; values.owerEmail = null;
values.buildingNumber = 'BLK ' + values.buildingNumber; values.buildingNumber = values.buildingNumber ? 'BLK ' + values.buildingNumber : '';
RA(14, values, module, dispatch); RA(14, values, module, dispatch);
setLoading(true); setLoading(true);
} else {
setLoading(false);
message.error('Error,Please finish it,not empty!');
} }
}; };
......
...@@ -243,7 +243,9 @@ const UsersDetail = (props: any) => { ...@@ -243,7 +243,9 @@ const UsersDetail = (props: any) => {
<> <>
<TitleBack <TitleBack
sublist={[ 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), 'Create Time : ' + timestampToTime(DataSave.createTime.time),
]} ]}
title={editFlag ? 'Edit Owner Infomation' : 'Owner Detail'} title={editFlag ? 'Edit Owner Infomation' : 'Owner Detail'}
......
...@@ -141,7 +141,7 @@ const AccoutingContent = (props: { ...@@ -141,7 +141,7 @@ const AccoutingContent = (props: {
</Button> </Button>
</div> </div>
<div style={{ marginBottom: 28, marginTop: 30 }}>Service Community</div> <div style={{ marginBottom: 28, marginTop: 30 }}>Service Estate</div>
<ShowOptions list={SaveChooseData.serviceCommunityList} /> <ShowOptions list={SaveChooseData.serviceCommunityList} />
</Spin> </Spin>
) : ( ) : (
......
...@@ -62,7 +62,7 @@ const Detail = (props: any) => { ...@@ -62,7 +62,7 @@ const Detail = (props: any) => {
// 列表数据 // 列表数据
const columns = [ const columns = [
{ title: 'User Name', dataIndex: 'saferName' }, { title: 'User Name', dataIndex: 'saferName' },
{ title: 'Service Community', dataIndex: 'projectName' }, { title: 'Service Estate', dataIndex: 'projectName' },
{ title: 'Job Title', dataIndex: 'jobTitle' }, { title: 'Job Title', dataIndex: 'jobTitle' },
{ {
title: 'User Status', title: 'User Status',
...@@ -168,7 +168,7 @@ const Detail = (props: any) => { ...@@ -168,7 +168,7 @@ const Detail = (props: any) => {
</div> </div>
<div className={styles.box6}> <div className={styles.box6}>
<div className={styles.box1item1}>Service Community</div> <div className={styles.box1item1}>Service Estate</div>
</div> </div>
{SaveChooseData.serviceCommunityList != null ? ( {SaveChooseData.serviceCommunityList != null ? (
<ShowOptions list={SaveChooseData.serviceCommunityList} defaultValue={'Close'} /> <ShowOptions list={SaveChooseData.serviceCommunityList} defaultValue={'Close'} />
......
...@@ -102,7 +102,7 @@ const Edit = (props: any) => { ...@@ -102,7 +102,7 @@ const Edit = (props: any) => {
// 提交按钮 // 提交按钮
const onFinish = (values: any) => { const onFinish = (values: any) => {
if (CList.length === 0) { 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; return;
} }
const val = values; const val = values;
......
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import styles from './index.less'; import styles from './index.less';
import { Input ,Menu,DatePicker,Upload,Modal, Button } from 'antd'; import { Input, Menu, DatePicker, Upload, Modal, Button } from 'antd';
import { Link, useIntl, connect, Dispatch } from 'umi'; import { Link, useIntl, connect, Dispatch } from 'umi';
import TextArea from 'antd/lib/input/TextArea'; import TextArea from 'antd/lib/input/TextArea';
...@@ -8,23 +8,22 @@ import TextArea from 'antd/lib/input/TextArea'; ...@@ -8,23 +8,22 @@ import TextArea from 'antd/lib/input/TextArea';
import { PlusOutlined } from '@ant-design/icons'; import { PlusOutlined } from '@ant-design/icons';
import SelectOptions from '../../components/SelectOptions/index'; import SelectOptions from '../../components/SelectOptions/index';
const printContent = (comment: any)=>{ const printContent = (comment: any) => {
console.log(comment) console.log(comment);
} };
function getBase64(file: Blob) { function getBase64(file: Blob) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const reader = new FileReader(); const reader = new FileReader();
reader.readAsDataURL(file); reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result); reader.onload = () => resolve(reader.result);
reader.onerror = error => reject(error); reader.onerror = (error) => reject(error);
}); });
} }
const Template = () => { const Template = () => {
const [previewVisible, setPreviewVisible] = useState(false); const [previewVisible, setPreviewVisible] = useState(false);
const [previewImage, setPreviewImage] = useState(""); const [previewImage, setPreviewImage] = useState('');
const [previewTitle, setPreviewTitle] = useState(""); const [previewTitle, setPreviewTitle] = useState('');
const [fileList, setFileList] = useState([]); const [fileList, setFileList] = useState([]);
const uploadButton = ( const uploadButton = (
...@@ -34,42 +33,63 @@ const Template = () => { ...@@ -34,42 +33,63 @@ const Template = () => {
</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) { 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); setPreviewVisible(true);
setPreviewTitle(file.name || file.url.substring(file.url.lastIndexOf('/') + 1)); 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 ( return (
<div className={styles.base}> <div className={styles.base}>
{/* 头部组件 */} {/* 头部组件 */}
<div className={styles.box}> <div className={styles.box}>
<div className={styles.item1}>Community Announcement</div> <div className={styles.item1}>Estate Announcement</div>
<button className={styles.item3}>返回</button> <button className={styles.item3}>返回</button>
</div> </div>
<SelectOptions list={["美国", "美丽的", "美好", "加拿大", "加油", "XO"].sort()} onSubmit={printContent} /> <SelectOptions
list={['美国', '美丽的', '美好', '加拿大', '加油', 'XO'].sort()}
onSubmit={printContent}
/>
<div className={styles.box1}> <div className={styles.box1}>
<div className={styles.box1item1}>Announcement Title</div> <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>
<div className={styles.box2}> <div className={styles.box2}>
<div className={styles.box2item1}>Announcement Title</div> <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>
<div className={styles.box3}> <div className={styles.box3}>
<Upload action="https://www.mocky.io/v2/5cc8019d300000980a055e76" listType="picture-card" fileList={fileList} onPreview={handlePreview} onChange={handleChange}> <Upload
action="https://www.mocky.io/v2/5cc8019d300000980a055e76"
listType="picture-card"
fileList={fileList}
onPreview={handlePreview}
onChange={handleChange}
>
{fileList.length >= 3 ? null : uploadButton} {fileList.length >= 3 ? null : uploadButton}
</Upload> </Upload>
<Modal visible={previewVisible} title={previewTitle} footer={null} onCancel={handleCancel}> <Modal visible={previewVisible} title={previewTitle} footer={null} onCancel={handleCancel}>
...@@ -77,21 +97,26 @@ const Template = () => { ...@@ -77,21 +97,26 @@ const Template = () => {
</Modal> </Modal>
</div> </div>
< div className = { styles.box4 } > <div className={styles.box4}>
<div className={styles.box4item1}>Entry into Force Time</div> <div className={styles.box4item1}>Entry into Force Time</div>
<div className={styles.box4item2}><DatePicker/></div> <div className={styles.box4item2}>
<DatePicker />
</div>
</div> </div>
< div className = { styles.box4 } > <div className={styles.box4}>
<div className={styles.box4item1}>End Date</div> <div className={styles.box4item1}>End Date</div>
<div className={styles.box4item2}><DatePicker/></div> <div className={styles.box4item2}>
<DatePicker />
</div>
</div> </div>
<div className={styles.line}></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> </div>
); );
}; };
export default Template; export default Template;
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import styles from './index.less'; 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'; import { Link, useIntl, connect, Dispatch } from 'umi';
...@@ -14,38 +14,36 @@ const dataSource = [ ...@@ -14,38 +14,36 @@ const dataSource = [
]; ];
const Template = () => { const Template = () => {
const pagination = { defaultCurrent: 1, total: 16 };
const pagination={defaultCurrent:1,total: 16}
const columns = [ const columns = [
{ {
title: "username", title: 'username',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
}, },
{ {
title: "project", title: 'project',
dataIndex: 'age', dataIndex: 'age',
key: 'age', key: 'age',
}, },
{ {
title: "unit", title: 'unit',
dataIndex: 'address', dataIndex: 'address',
key: 'address', key: 'address',
}, },
{ {
title: "status", title: 'status',
dataIndex: 'address', dataIndex: 'address',
key: 'address', key: 'address',
}, },
{ {
title: "submissionTime", title: 'submissionTime',
dataIndex: 'address', dataIndex: 'address',
key: 'address', key: 'address',
}, },
{ {
title: "actions", title: 'actions',
key: 'action', key: 'action',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space size="middle"> <Space size="middle">
...@@ -57,14 +55,12 @@ const Template = () => { ...@@ -57,14 +55,12 @@ const Template = () => {
return ( return (
<div className={styles.base}> <div className={styles.base}>
{/* 头部组件 */} {/* 头部组件 */}
<div className={styles.box}> <div className={styles.box}>
<div className={styles.item1}>Service Provider Details</div> <div className={styles.item1}>Service Provider Details</div>
<button className={styles.item3}>返回</button> <button className={styles.item3}>返回</button>
</div> </div>
<div className={styles.box1}> <div className={styles.box1}>
<div className={styles.box1item1}>Company Name</div> <div className={styles.box1item1}>Company Name</div>
<div className={styles.box1item2}>Free Limited</div> <div className={styles.box1item2}>Free Limited</div>
...@@ -72,7 +68,9 @@ const Template = () => { ...@@ -72,7 +68,9 @@ const Template = () => {
<div className={styles.box2}> <div className={styles.box2}>
<div className={styles.box2item1}>Office Address</div> <div className={styles.box2item1}>Office Address</div>
<div className={styles.box2item2}>Albert Street, 175, Singapore, Albert, Bugis, Victoria Street, </div> <div className={styles.box2item2}>
Albert Street, 175, Singapore, Albert, Bugis, Victoria Street,{' '}
</div>
</div> </div>
<div className={styles.box3}> <div className={styles.box3}>
...@@ -90,7 +88,7 @@ const Template = () => { ...@@ -90,7 +88,7 @@ const Template = () => {
</div> </div>
<div className={styles.box6}> <div className={styles.box6}>
<div className={styles.box1item1}>Service Community</div> <div className={styles.box1item1}>Service Estate</div>
</div> </div>
<div className={styles.box7}> <div className={styles.box7}>
...@@ -98,13 +96,16 @@ const Template = () => { ...@@ -98,13 +96,16 @@ const Template = () => {
</div> </div>
{/* 列表组件 */} {/* 列表组件 */}
<Table style={{ marginTop: 16 }} dataSource={dataSource} columns={columns} pagination={pagination} /> <Table
style={{ marginTop: 16 }}
<Button >Cancellation</Button> dataSource={dataSource}
columns={columns}
pagination={pagination}
/>
<Button>Cancellation</Button>
</div> </div>
); );
}; };
export default Template; export default Template;
/* /*
* @Author: your name * @Author: your name
* @Date: 2020-11-19 20:34:18 * @Date: 2020-11-19 20:34:18
* @LastEditTime: 2021-03-03 18:02:42 * @LastEditTime: 2021-04-21 15:18:56
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\params.ts * @FilePath: \tostumi\src\utils\params.ts
...@@ -106,4 +106,7 @@ export const requestList = [ ...@@ -106,4 +106,7 @@ export const requestList = [
['/tos/report/reply', '71 web端报告员回复', {}], ['/tos/report/reply', '71 web端报告员回复', {}],
['/tos/community/get/address', '72 根据小区名搜索小区地址', {}], ['/tos/community/get/address', '72 根据小区名搜索小区地址', {}],
['/tos/report/delete', '73 删除报告', {}], ['/tos/report/delete', '73 删除报告', {}],
['/tos/community/moveOut/record/get', '74 迁出申请列表', {}],
['/tos/community/moveOut/record/get/detail', '75 迁出申请详情', {}],
['/tos/community/moveOut/record/reply', '76 迁出申请回复', {}],
]; ];
...@@ -217,7 +217,7 @@ export const enUsFaci = [ ...@@ -217,7 +217,7 @@ export const enUsFaci = [
children: [{ title: 'View Property Fees', key: '16', disableCheckbox: true }], children: [{ title: 'View Property Fees', key: '16', disableCheckbox: true }],
}, },
{ {
title: 'Commercial Service-Community Maintenance', title: 'Commercial Service- Maintenance',
key: '17', key: '17',
disabled: true, disabled: true,
children: [ children: [
...@@ -291,14 +291,14 @@ export const enUsFaci = [ ...@@ -291,14 +291,14 @@ export const enUsFaci = [
], ],
}, },
{ {
title: 'Community', title: 'Estate',
key: '43', key: '43',
disabled: true, disabled: true,
children: [ children: [
{ title: 'View Community', key: '44', disableCheckbox: true }, { title: 'View Estate', key: '44', disableCheckbox: true },
{ title: 'Edit Community', key: '45', disableCheckbox: true }, { title: 'Edit Estate', key: '45', disableCheckbox: true },
{ title: 'Add Community', key: '46', disableCheckbox: true }, { title: 'Add Estate', key: '46', disableCheckbox: true },
{ title: 'Delete Community', key: '47', disableCheckbox: true }, { title: 'Delete Estate', key: '47', disableCheckbox: true },
], ],
}, },
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment