Commit 2e1f9cf7 authored by cellee's avatar cellee

楼顶去空

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