Commit fe7ae761 authored by cellee's avatar cellee

合同完整bug修复

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 13c3a04e
...@@ -243,7 +243,7 @@ export default defineConfig({ ...@@ -243,7 +243,7 @@ export default defineConfig({
icon: 'SwitcherOutlined', icon: 'SwitcherOutlined',
routes: [ routes: [
{ path: './', component: './ContractManagement/Contract' }, { path: './', component: './ContractManagement/Contract' },
{ path: './Detail', component: './ContractManagement/ContractContent' }, { path: './Detail', component: './ContractManagement/ContractDetail' },
{ path: './Edit', component: './ContractManagement/ContractContent' }, { path: './Edit', component: './ContractManagement/ContractContent' },
{ path: './Add', component: './ContractManagement/ContractContent' }, { path: './Add', component: './ContractManagement/ContractContent' },
], ],
......
import React, { useState, useEffect } from 'react';
import { connect } from 'umi';
import { Avatar, Modal, Button, Spin, Image, Pagination } from 'antd';
import {} from '@ant-design/icons';
import { RA } from '@/utils/method';
// icon
import IconPdf from '@/assets/icon-pdf.png';
import IconImg from '@/assets/icon-img.png';
import IconNone from '@/assets/logo_icon_bg.png';
import PDF from 'react-pdf-js';
import FileViewer from 'react-file-viewer';
import { stringSplit } from '@/utils/string';
const PreView = (props: any) => {
const { OpenUrl, loading } = props;
const [Icon, setIcon] = useState(null as any); // 图标显示哪一个控制
const [ModalTip, setModalTip] = useState(false); // 弹窗控制
//pdf 页码内容
const [numPages, setNumPages] = useState(1 as any); // 总页码数
const [pageNumber, setPageNumber] = useState(1); // 当前页码数
// 图标显示判断
useEffect(() => {
console.log(OpenUrl);
if (OpenUrl) {
OpenUrl.type == 'pdf' ? setIcon(IconPdf) : setIcon(IconImg);
} else {
setIcon(IconNone);
}
}, [OpenUrl]);
//点击预览
const opens = () => {
setModalTip(true);
};
// 隐藏弹窗
const handleCancel = () => {
setModalTip(false);
};
// pdf 总页数
const onDocumentLoadSuccess = (pages: any) => {
setNumPages(pages);
};
// 切换pdf 总数
const onChangePage = (page: any) => {
setPageNumber(page);
};
return (
<>
{OpenUrl ? (
<div style={{ marginBottom: 10 }}>
{/* 文件 Icon */}
<Avatar
shape="square"
style={{
color: '#f56a00',
backgroundColor: '#F2F6FC',
border: '1px solid #F2F6FC',
borderRadius: 4,
}}
size={80}
src={Icon}
/>
{/* 文件名 */}
<span style={{ display: 'inline-block', margin: '0 15px', minWidth: 200 }}>
{OpenUrl.name}
</span>
{/* 文件操作 */}
<Button type="link" onClick={opens}>
Browse
</Button>
{/* 文件弹窗 */}
<Modal
visible={ModalTip}
width={650}
style={{ textAlign: 'center' }}
footer={null}
title={OpenUrl.name}
onCancel={handleCancel}
>
<Spin spinning={loading}>
{OpenUrl != null && OpenUrl.type == 'pdf' ? (
<>
<PDF
file={OpenUrl ? stringSplit(OpenUrl.url, 'm/cash') : ''}
page={pageNumber}
onDocumentComplete={onDocumentLoadSuccess}
/>
<Pagination
style={{ textAlign: 'center', marginTop: 10, display: 'block' }}
simple
defaultCurrent={pageNumber}
total={numPages * 10}
onChange={onChangePage}
/>
</>
) : OpenUrl.type == 'jpg' || OpenUrl.type == 'png' ? (
// 图片用指定格式
<Image
src={OpenUrl.url}
preview={false}
style={{ margin: '0 auto', textAlign: 'center' }}
/>
) : (
<FileViewer fileType={OpenUrl.type} filePath={stringSplit(OpenUrl.url, 'm/cash')} />
)}
</Spin>
</Modal>
</div>
) : (
''
)}
</>
);
};
function PreViewPorps(state: any) {
const { CellList } = state;
const loading = false;
return {
CellList,
loading,
};
}
export default connect(PreViewPorps)(PreView);
...@@ -58,12 +58,18 @@ export default { ...@@ -58,12 +58,18 @@ export default {
yield put({ type: 'returnPage', Data }); yield put({ type: 'returnPage', Data });
} }
break; break;
case 51: case 51: // 获取后台所有账号
{ {
let Data = resp.data; let Data = resp.data;
yield put({ type: 'returnPage', Data }); yield put({ type: 'returnPage', Data });
} }
break; break;
case 52: // 修改账号状态
{
let Result = resp.data;
yield put({ type: 'returnResult', Result });
}
break;
} }
} }
}, },
......
...@@ -7,7 +7,7 @@ import { routerRedux } from 'dva/router'; ...@@ -7,7 +7,7 @@ import { routerRedux } from 'dva/router';
export default { export default {
namespace: 'Contract', namespace: 'Contract',
state: { state: {
Data: { data: [], total: 0 }, Data: null,
curString: {}, curString: {},
Result: null, Result: null,
DataSave: null, DataSave: null,
...@@ -45,7 +45,6 @@ export default { ...@@ -45,7 +45,6 @@ export default {
*RA({ playload }, { call, put }) { *RA({ playload }, { call, put }) {
console.log('开始请求'); console.log('开始请求');
const resp = yield call(service.RA, playload); const resp = yield call(service.RA, playload);
console.log(resp);
if (resp.error_code != '0000') { if (resp.error_code != '0000') {
console.log('请求错误码:' + '(' + playload.index + ')' + resp.error_code); console.log('请求错误码:' + '(' + playload.index + ')' + resp.error_code);
console.log(playload); console.log(playload);
...@@ -66,11 +65,15 @@ export default { ...@@ -66,11 +65,15 @@ export default {
case 27: case 27:
{ {
message.success('Save Success !'); message.success('Save Success !');
var tmp = resp; let tmp = resp;
let Data = null;
yield put({ type: 'returnResult', tmp }); yield put({ type: 'returnResult', tmp });
// 保存成功 清空列表 以便列表拿取最新数据
yield put({ type: 'returnPage', Data });
setTimeout(function () { setTimeout(function () {
history.goBack(); history.goBack();
}, 1000); }, 500);
} }
break; break;
case 47: case 47:
...@@ -83,13 +86,6 @@ export default { ...@@ -83,13 +86,6 @@ export default {
} }
}, },
// url 带参数
// *RA2({ playload }, { call, put }){
// console.log("开始请求")
// const resp = yield call(service.RA2, playload);
// console.log(resp)
// },
*ResultClear({}, { put }) { *ResultClear({}, { put }) {
var tmp = null; var tmp = null;
yield put({ type: 'returnResult', tmp }); yield put({ type: 'returnResult', tmp });
...@@ -104,6 +100,12 @@ export default { ...@@ -104,6 +100,12 @@ export default {
yield put({ type: 'returnPath', playload }); yield put({ type: 'returnPath', playload });
}, },
// 详情
*DataSaveDetail({ playload }, { put }) {
let DataSaveDetail = playload.record;
yield put({ type: 'returnDataSaveDetail', DataSaveDetail });
},
// 清掉图片列表 // 清掉图片列表
*FileImgs({ playload }, { put }) { *FileImgs({ playload }, { put }) {
let FileImg = null; let FileImg = null;
......
...@@ -2,51 +2,50 @@ import { getRemoveList } from '@/services/package/contract'; ...@@ -2,51 +2,50 @@ import { getRemoveList } from '@/services/package/contract';
import { message } from 'antd'; import { message } from 'antd';
const ContractModel = { const ContractModel = {
//model标识 //model标识
namespace: 'ContractModel', namespace: 'ContractModel',
// 数据 // 数据
state: { state: {
list:[], list: [],
page:1, page: 1,
totalRow:0, totalRow: 0,
type:'Add', type: 'Add',
record:-1, record: -1,
loding:true, loding: true,
},
// 同步
reducers: {
reGetList(state: any, { payload }: { payload: any }) {
return Object.assign({}, state, payload);
// return {...payload}
}, },
// 同步 },
reducers: { // 异步
reGetList(state:any,{ payload }:{payload:any}) { effects: {
return Object.assign({}, state, payload) // 拉取列表
// return {...payload} *getList({ payload }: { payload: any }, { put, call }: { put: any; call: any }) {
} const data = yield call(getRemoveList, payload);
if (data) {
yield put({
type: 'reGetList',
payload: {
list: data.list,
page: payload.page.pageNum,
totalRow: data.page.totalRow,
loding: false,
},
});
} else {
message.error('列表获取失败');
}
}, },
// 异步
effects: {
// 拉取列表
*getList({payload}:{payload:any}, { put, call}:{ put:any, call:any}) {
const data = yield call(getRemoveList,payload);
if(data){
yield put({
type: 'reGetList',
payload:{
list:data.list,
page:payload.page.pageNum,
totalRow:data.page.totalRow,
loding:false
},
})
}else{
message.error('列表获取失败')
}
},
*getMove({payload}:{payload:any},{ put, call}:{ put:any, call:any}){ *getMove({ payload }: { payload: any }, { put, call }: { put: any; call: any }) {
yield put({ yield put({
type: 'reGetList', type: 'reGetList',
payload:payload, payload: payload,
}) });
}
}, },
},
}; };
export default ContractModel; export default ContractModel;
\ No newline at end of file
...@@ -14,26 +14,38 @@ const Account = (props: any) => { ...@@ -14,26 +14,38 @@ const Account = (props: any) => {
const RA = (index: any, values: any) => { const RA = (index: any, values: any) => {
dispatch({ type: 'Account/RA', playload: { index: index, body: values } }); dispatch({ type: 'Account/RA', playload: { index: index, body: values } });
}; };
const [term, setTerm] = useState({} as any); // 拉取数据的条件存储
const [over, setOver] = useState(false); // 关闭账号确认弹窗
const [accountName, setaccountName] = useState(null as any); // 弹窗账号信息
// 数据 // 数据
useEffect(() => { useEffect(() => {
if (Data == null) { if (Data == null) {
let obj = { Refresh();
leaderID: getCookie('id'),
pageNum: 1,
};
// RA(45, obj);
setTerm(obj);
RA(51, obj);
} }
}, [Data]); //页面进来执行一次 }, [Data]); //页面进来执行一次
const [term, setTerm] = useState({} as any); // 拉取数据的条件存储 // 监听改变状态提交结果
const [over, setOver] = useState(false); // 关闭账号确认弹窗 useEffect(() => {
const [accountName, setaccountName] = useState(null as any); // 弹窗账号信息 if (Result != null) {
console.log('改变');
}
}, [Result]);
const [form] = Form.useForm(); // 表单标识 const [form] = Form.useForm(); // 表单标识
// 刷新加载
const Refresh = () => {
let obj = {
leaderID: getCookie('id'),
pageNum: 1,
};
// RA(45, obj);
form.resetFields();
setTerm(obj);
RA(51, obj);
};
// 表头 // 表头
const columns = [ const columns = [
{ {
...@@ -128,7 +140,7 @@ const Account = (props: any) => { ...@@ -128,7 +140,7 @@ const Account = (props: any) => {
// 表头单搜索 // 表头单搜索
const onFinishContract = (value: any) => { const onFinishContract = (value: any) => {
if (value.creatorName || value.accountName) { if (value.tosUserName || value.creatorName) {
let t = { ...term, ...value }; let t = { ...term, ...value };
delete t.pageNum; // 搜索的时候 删除页码 delete t.pageNum; // 搜索的时候 删除页码
setTerm(t); setTerm(t);
...@@ -148,10 +160,17 @@ const Account = (props: any) => { ...@@ -148,10 +160,17 @@ const Account = (props: any) => {
RA(51, t); RA(51, t);
}; };
// 弹窗 // 弹窗 提交确认账号打开关闭
const handleOk = (e: any) => { const handleOk = (e: any) => {
setOver(false); //
let obj = {
userStatus: accountName.userStatus == 0 ? 1 : 0,
userID: accountName.tosUserId,
};
RA(52, obj);
// setOver(false);
}; };
// 关闭弹窗
const handleCancel = (e: any) => { const handleCancel = (e: any) => {
setOver(false); setOver(false);
}; };
...@@ -166,7 +185,7 @@ const Account = (props: any) => { ...@@ -166,7 +185,7 @@ const Account = (props: any) => {
name="contract" name="contract"
onFinish={onFinishContract} onFinish={onFinishContract}
> >
<Form.Item name="accountName"> <Form.Item name="tosUserName">
<Input allowClear placeholder="Account Name" /> <Input allowClear placeholder="Account Name" />
</Form.Item> </Form.Item>
<Form.Item name="creatorName"> <Form.Item name="creatorName">
...@@ -178,7 +197,7 @@ const Account = (props: any) => { ...@@ -178,7 +197,7 @@ const Account = (props: any) => {
</Button> </Button>
<Button <Button
htmlType="button" htmlType="button"
// onClick={onReset} onClick={Refresh}
style={{ marginLeft: '15px' }} style={{ marginLeft: '15px' }}
icon={<ClearOutlined />} icon={<ClearOutlined />}
loading={loading} loading={loading}
...@@ -205,7 +224,6 @@ const Account = (props: any) => { ...@@ -205,7 +224,6 @@ const Account = (props: any) => {
loading={loading} loading={loading}
icon={<PlusOutlined />} icon={<PlusOutlined />}
onClick={() => { onClick={() => {
// Jump(0, 'Add');
edit(1); edit(1);
}} }}
> >
...@@ -216,7 +234,7 @@ const Account = (props: any) => { ...@@ -216,7 +234,7 @@ const Account = (props: any) => {
density: false, density: false,
fullScreen: false, fullScreen: false,
reload: () => { reload: () => {
edit; Refresh();
}, },
setting: false, setting: false,
}} }}
...@@ -243,6 +261,7 @@ const Account = (props: any) => { ...@@ -243,6 +261,7 @@ const Account = (props: any) => {
cancelText={'Cancel'} cancelText={'Cancel'}
onOk={handleOk} onOk={handleOk}
onCancel={handleCancel} onCancel={handleCancel}
confirmLoading={loading}
> >
{accountName != null ? ( {accountName != null ? (
<p> <p>
......
...@@ -57,13 +57,17 @@ const Account = (props: any) => { ...@@ -57,13 +57,17 @@ const Account = (props: any) => {
// 保存提交 // 保存提交
const onFinishContract = (value: any) => { const onFinishContract = (value: any) => {
console.log(value);
if (checkedKeys.length == 0) { if (checkedKeys.length == 0) {
// 权限
message.error('Please Select Permission!'); message.error('Please Select Permission!');
return false; return false;
} else if (value.community.value == 0) { } else if (value.community.value.length == 0) {
// 小区
message.error('Please Select The Jurisdiction Area!'); message.error('Please Select The Jurisdiction Area!');
return false; return false;
} else if (value.tosUserName.length < 6 || value.tosUserPwd.length < 6) { } else if (value.tosUserName.length < 6) {
// 账号长度
message.error('The Account Password is Greater Than 6 Digits!'); message.error('The Account Password is Greater Than 6 Digits!');
return false; return false;
} else { } else {
...@@ -85,12 +89,14 @@ const Account = (props: any) => { ...@@ -85,12 +89,14 @@ const Account = (props: any) => {
}; };
console.log(obj); console.log(obj);
// RA(38, value, module, dispatch); // 信息上传 RA(38, value, module, dispatch); // 信息上传
// RA(42, obj, module, dispatch); // 权限上传 RA(42, obj, module, dispatch); // 权限上传
} }
}; };
//goToReturn //goToReturn
const goToReturn = () => {}; const goToReturn = () => {
history.go(-1);
};
// 全选 // 全选
const onCheckAllChange = (e: any) => {}; const onCheckAllChange = (e: any) => {};
...@@ -159,6 +165,14 @@ const Account = (props: any) => { ...@@ -159,6 +165,14 @@ const Account = (props: any) => {
name="contract" name="contract"
onFinish={onFinishContract} onFinish={onFinishContract}
> >
<Descriptions column={{ xs: 1, sm: 2, md: 3 }}>
<Descriptions.Item>
<Form.Item name="tosUserName" label="Account ID" rules={AccountTip[2]}>
<Input placeholder="Login Account" className="input" />
</Form.Item>
</Descriptions.Item>
</Descriptions>
<Descriptions column={{ xs: 1, sm: 2, md: 3 }}> <Descriptions column={{ xs: 1, sm: 2, md: 3 }}>
<Descriptions.Item> <Descriptions.Item>
<Form.Item name="tosAccountName" label="Name" rules={AccountTip[0]}> <Form.Item name="tosAccountName" label="Name" rules={AccountTip[0]}>
...@@ -175,24 +189,6 @@ const Account = (props: any) => { ...@@ -175,24 +189,6 @@ const Account = (props: any) => {
/> />
</Form.Item> </Form.Item>
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item>
<Form.Item name="tosUserToCompany" label="Company">
<Input placeholder="Affiliated Company" className="input" />
</Form.Item>
</Descriptions.Item>
</Descriptions>
<Descriptions column={{ xs: 1, sm: 2, md: 3 }}>
<Descriptions.Item>
<Form.Item name="tosUserName" label="Account ID" rules={AccountTip[2]}>
<Input placeholder="Login Account" className="input" />
</Form.Item>
</Descriptions.Item>
<Descriptions.Item>
<Form.Item name="tosUserPwd" label="PassWord" rules={AccountTip[3]}>
<Input placeholder="Login PassWord" className="input" />
</Form.Item>
</Descriptions.Item>
</Descriptions> </Descriptions>
<Form.Item name="community" label="Community"> <Form.Item name="community" label="Community">
......
...@@ -11,43 +11,40 @@ import { RA } from '@/services/tos'; ...@@ -11,43 +11,40 @@ import { RA } from '@/services/tos';
import SearchOptionsCommnity from '@/components/SearchOptions/SearchOptionsCommnity'; import SearchOptionsCommnity from '@/components/SearchOptions/SearchOptionsCommnity';
const Contract = (props: any) => { const Contract = (props: any) => {
const { location, dispatch, ContractModel, userListLoading } = props; const { location, dispatch, Contract, loading } = props;
const { Data, DataSave, DataSaveDetail, Result } = Contract;
// 把请求装在一个地方
const RA = (index: any, values: any) => { const RA = (index: any, values: any) => {
dispatch({ type: 'Contract/RA', playload: { index: index, body: values } }); dispatch({ type: 'Contract/RA', playload: { index: index, body: values } });
}; };
// 把请求装在一个地方
function requst(payload: any) { function requst(payload: any) {
dispatch({ type: 'ContractModel/getList', payload: payload }); dispatch({ type: 'Contract/getList', payload: payload });
} }
// 数据 // 数据
useEffect(() => { useEffect(() => {
let payload = { if (Data == null) {
index: 19, //如果没数据请求一次
page: { let obj = {
pageNum: ContractModel.page, pageNum: 1,
}, };
}; RA(19, obj);
requst(payload); }
}, [1]); //页面进来执行一次 }, [Data]);
// 表单标识
const [form] = Form.useForm();
// 跳转 // 跳转
const Jump = (record: any, Jump: String) => { const Jump = (record: any, Jump: String) => {
dispatch({ // RA();
type: 'ContractModel/getMove',
payload: { dispatch({ type: 'Contract/DataSaveDetail', playload: { record } });
type: Jump,
record: record,
},
});
// 清掉图片列表 // 清掉图片列表
dispatch({ type: 'Contract/FileImgs' }); dispatch({ type: 'Contract/FileImgs' });
// 跳转
// if(record == 0){
// history.push(location.pathname + '/' + Jump)
// }
// console.log(location.pathname + '/' + Jump)
history.push(location.pathname + '/' + Jump); history.push(location.pathname + '/' + Jump);
}; };
// 表头 // 表头
...@@ -56,7 +53,7 @@ const Contract = (props: any) => { ...@@ -56,7 +53,7 @@ const Contract = (props: any) => {
title: 'Contract Number', title: 'Contract Number',
render: function (record: any) { render: function (record: any) {
let mom = moment(record.contractValidEndDate).diff(moment(), 'day'); let mom = moment(record.contractValidEndDate).diff(moment(), 'day');
if (mom < 30) { if (mom < 60) {
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>
...@@ -112,62 +109,28 @@ const Contract = (props: any) => { ...@@ -112,62 +109,28 @@ const Contract = (props: any) => {
// 页面切换 // 页面切换
const paginationHandler = (page: number, pageSize?: number) => { const paginationHandler = (page: number, pageSize?: number) => {
dispatch({ let obj = {
type: 'ContractModel/getList', pageNum: page,
payload: { };
index: 19, RA(19, obj);
page: {
pageNum: page,
},
},
});
};
// 刷新
const resetHandler = () => {
dispatch({
type: 'ContractModel/getList',
payload: {
index: 19,
page: {
pageNum: ContractModel.page,
},
},
});
}; };
// 表单标识
const [form] = Form.useForm();
// 重置 // 重置
const onReset = () => { const onReset = () => {
form.resetFields(); form.resetFields();
let payload = { let obj = {
index: 19, pageNum: 1,
page: {
pageNum: 1,
},
}; };
requst(payload); RA(19, obj);
}; };
// 表单提交 // 表单提交
const onFinishContract = (value: any) => { const onFinishContract = (value: any) => {
// console.log(value)
if (!value.communityName && !value.contractNumber && !value.contractTitle) { if (!value.communityName && !value.contractNumber && !value.contractTitle) {
message.error('Please enter one of them!'); message.error('Please enter one of them!');
} else { } else {
console.log(value); value.pageNum = 1;
let payload = { RA(19, value);
index: 19,
page: {
pageNum: 1,
contractNumber: value.contractNumber,
contractTitle: value.contractTitle,
communityName: value.communityName,
},
};
requst(payload);
} }
}; };
...@@ -200,12 +163,7 @@ const Contract = (props: any) => { ...@@ -200,12 +163,7 @@ const Contract = (props: any) => {
<Input allowClear placeholder="Contract Title" /> <Input allowClear placeholder="Contract Title" />
</Form.Item> </Form.Item>
<Form.Item> <Form.Item>
<Button <Button type="primary" htmlType="submit" icon={<SearchOutlined />} loading={loading}>
type="primary"
htmlType="submit"
icon={<SearchOutlined />}
loading={userListLoading}
>
Search{' '} Search{' '}
</Button> </Button>
<Button <Button
...@@ -213,7 +171,7 @@ const Contract = (props: any) => { ...@@ -213,7 +171,7 @@ const Contract = (props: any) => {
onClick={onReset} onClick={onReset}
style={{ marginLeft: '15px' }} style={{ marginLeft: '15px' }}
icon={<ClearOutlined />} icon={<ClearOutlined />}
loading={userListLoading} loading={loading}
> >
{' '} {' '}
Reset Reset
...@@ -226,28 +184,29 @@ const Contract = (props: any) => { ...@@ -226,28 +184,29 @@ const Contract = (props: any) => {
<ProTable <ProTable
// request={requestHeadl} // request={requestHeadl}
rowKey={'id'} rowKey={'id'}
dataSource={ContractModel.list} dataSource={Data ? Data.list : ''}
columns={columns} columns={columns}
pagination={false} // 隐藏默认分页 pagination={false} // 隐藏默认分页
search={false} search={false}
loading={userListLoading} loading={loading}
toolBarRender={() => [ toolBarRender={() => [
<Button <Button
key="3" key="3"
type="primary" type="primary"
onClick={() => { onClick={() => {
Jump(0, 'Add'); Jump(null, 'Add');
}} }}
loading={loading}
icon={<PlusOutlined />}
> >
<PlusOutlined />
Add Contract Add Contract
</Button>, </Button>,
]} ]}
options={{ options={{
density: true, density: false,
fullScreen: true, fullScreen: false,
reload: () => { reload: () => {
resetHandler(); onReset();
}, },
setting: false, setting: false,
}} }}
...@@ -257,12 +216,10 @@ const Contract = (props: any) => { ...@@ -257,12 +216,10 @@ const Contract = (props: any) => {
<div className={styles.pages}> <div className={styles.pages}>
<Pagination <Pagination
current={ContractModel.page} current={Data ? Data.page.currentPage : 0}
total={ContractModel.totalRow} total={Data ? Data.page.totalRow : 0}
onChange={paginationHandler} onChange={paginationHandler}
// onShowSizeChange={pageSizeHandler} defaultPageSize={Data ? Data.page.pageSize : 15}
// current={users.meta.page}
// pageSize={users.meta.per_page}
/> />
</div> </div>
</div> </div>
...@@ -270,10 +227,11 @@ const Contract = (props: any) => { ...@@ -270,10 +227,11 @@ const Contract = (props: any) => {
); );
}; };
const mapStateToProps = ({ ContractModel, loading }: { ContractModel: any; loading: Loading }) => { const mapStateToProps = (state: any) => {
console.log(state);
return { return {
ContractModel, Contract: state.Contract,
userListLoading: loading.models.ContractModel || false, loading: state.loading.models.Contract || false,
}; };
}; };
......
import React, { useState, useEffect } from 'react';
import { Input ,Table,Space,Form,Button,message} from 'antd';
import { Link, useIntl, connect, Dispatch, history, Loading } from 'umi';
import ProTable, { ProColumns, TableDropdown, ActionType } from '@ant-design/pro-table';
import { RA } from '@/services/tos';
import { times } from 'lodash';
import moment from 'moment';
import styles from './index.less';
import './ContractContent.less';
const Contract = (props:any) => {
const { formatMessage } = useIntl();
const { dispatch,location,Data,Result ,loading } = props;
const RA = (index: any, values: any) => { dispatch({ type: 'Contract/RA', playload: { index: index, body: values } }) };
const SA = (values: any) => { dispatch({ type: 'Contract/SA', playload: values }) };
// 把请求装在一个地方
function requst(){RA(19, {pageNum:"1",contractNumber:"",contractTitle:"",communityName:""})}
useEffect(() => {
console.log("合同页面")
requst()
}, [])
useEffect(() => {
if (Data != null) {
console.log(Data)
}
},[Data])
const goToDetail = (record: any, e: any) => {
SA(record)
history.push(location.pathname+'/Detail')
}
const goToEdit = (record: any, e: any) => {
SA(record)
history.push(location.pathname+'/Edit')
}
const goToAdd = (record: any) => {
SA(record)
history.push(location.pathname+'/Add')
}
// 日期处理
function CountDown(record: any) {
return record.contractValidEndDate
};
// 表头
const columns = [
{
title: "Contract Number",
render:function(record) {
let mom = moment(record.contractValidEndDate).diff(moment(), 'day');
return <span className={mom < 30? 'red' : ''}>{record.contractNumber}</span>
}
}, // 合同编号
{
title: "Company",
render: (text:any, record:any) => (
<>
<div>
<span>Party A : {record.contractPartyA}</span>
</div>
<div>
<span>Party B : {record.contractPartyB}</span>
</div>
</>
)
}, //合同方
{title: "Contract Title",dataIndex: 'contractTitle'}, // 合同标题
{title: "Community Name",dataIndex: 'communityName'}, // 小区名
{title: "Contacts",dataIndex: 'communityAccount'}, // 联系人
{title: "Phone",dataIndex: 'communityPhone'}, // 联系电话
{title: "Valid Start Date",dataIndex: 'contractValidStartDate'}, // 生效时间
{title: "Valid End Date",dataIndex: 'contractValidEndDate'},// 到期时间
// { title: "Contract File", dataIndex: 'contractFileName' }, // 附件
{
title: "Actions",
render: (text: any, record: any) => (
<Space size="middle">
<a onClick={goToEdit.bind(this, record)}>Edit</a>
<a onClick={goToDetail.bind(this,record)}>Detail</a>
</Space>
),
},// 操作
];
// 表单标识
const [form] = Form.useForm()
// 重置
const onReset = () => {
form.resetFields();
requst()
};
// 表单提交
const onFinishContract = (value:any)=>{
// console.log(value)
if(!value.communityName&&!value.contractNumber&&!value.contractTitle){
message.error('Please enter one of them!')
}else{
RA(19, {
pageNum:"1",
contractNumber:value.contractNumber,
contractTitle:value.contractTitle,
communityName:value.communityName
})
}
}
return (
<div className={styles.base}>
{/* 头部组件 */}
{/* <div className={styles.box}>
<Form
autoComplete= "off"
layout="inline"
form={form}
name="contract"
onFinish={onFinishContract}
>
<Form.Item name="communityName">
<Input allowClear placeholder='Community name' />
</Form.Item>
<Form.Item name="contractNumber">
<Input allowClear placeholder='Contract No' />
</Form.Item>
<Form.Item name="contractTitle">
<Input allowClear placeholder='Contract Title' />
</Form.Item>
<Form.Item>
<Button type="primary" htmlType="submit"> Search </Button>
<Button htmlType="button" onClick={onReset} style={{marginLeft:'15px'}}>Reset</Button>
</Form.Item>
</Form>
</div> */}
{/* 内容组件 */}
<div className={styles.box2}>
<button className={styles.buttonAdd} onClick={goToAdd}> + Add To</button>
</div>
{/* 列表组件 */}
{
<ProTable
request={requestHeadl}
rowKey={"id"}
style={{ marginTop: 16 }}
columns={columns}
pagination={{ defaultCurrent: 1, total: Data.totalRow }}
loading={ loading }
/>
}
</div>
);
};
function mapStateToProps(state) {
const { Data,curString,Result } = state.Contract;
const loading = state.loading.models.user;
return {
Data,
curString,
Result,
loading
};
}
export default connect(mapStateToProps)(Contract);
...@@ -34,7 +34,9 @@ import PDF from 'react-pdf-js'; ...@@ -34,7 +34,9 @@ import PDF from 'react-pdf-js';
import { stringSplit } from '@/utils/string'; import { stringSplit } from '@/utils/string';
const ContractContent = (props: any) => { const ContractContent = (props: any) => {
const { ContractModel, dispatch, FileImg, loading } = props; const { Contract, dispatch, FileImg, loading } = props;
const { DataSaveDetail } = Contract;
const { RangePicker } = DatePicker; // 日期组件 const { RangePicker } = DatePicker; // 日期组件
const [form] = Form.useForm(); // 表单 const [form] = Form.useForm(); // 表单
const RA = (index: any, values: any) => { const RA = (index: any, values: any) => {
...@@ -56,19 +58,20 @@ const ContractContent = (props: any) => { ...@@ -56,19 +58,20 @@ const ContractContent = (props: any) => {
const [numPages, setNumPages] = useState(1 as any); // 总页码数 const [numPages, setNumPages] = useState(1 as any); // 总页码数
const [pageNumber, setPageNumber] = useState(1); // 当前页码数 const [pageNumber, setPageNumber] = useState(1); // 当前页码数
const [imgInfo, setimgInfo] = useState(null as any); //本地图片预览
const [previewVisible, setPreviewVisible] = useState(false); //本地图片预览弹窗
useEffect(() => { useEffect(() => {
// 如果是添加传来没有值的时候 就清空 否则 赋值给表单 // 如果是添加传来没有值的时候 就清空 否则 赋值给表单
if (ContractModel.record === -1) { if (DataSaveDetail == null) {
// 返回列表 // 清空表单
console.log('没数据');
} else if (ContractModel.record === 0) {
form.resetFields(); form.resetFields();
} else { } else {
// 发起请求 // 发起图片请求
let objData = { let objData = {
type: 'tosContractPreview', type: 'tosContractPreview',
fileName: ContractModel.record.contractFileName, fileName: DataSaveDetail.contractFileName,
extends: ContractModel.record.communityName, extends: DataSaveDetail.communityName,
}; };
RA(47, objData); RA(47, objData);
...@@ -76,28 +79,29 @@ const ContractContent = (props: any) => { ...@@ -76,28 +79,29 @@ const ContractContent = (props: any) => {
setUploadUp(false); setUploadUp(false);
// 提示时间 // 提示时间
let a1 = moment(ContractModel.record.contractValidEndDate) let a1 = moment(DataSaveDetail.contractValidEndDate)
.subtract(2, 'month') .subtract(2, 'month')
.format('YYYY-MM-DD'); .format('YYYY-MM-DD');
let a2 = moment(ContractModel.record.contractValidEndDate) let a2 = moment(DataSaveDetail.contractValidEndDate)
.subtract(1, 'month') .subtract(1, 'month')
.format('YYYY-MM-DD'); .format('YYYY-MM-DD');
setTipTime([a1, a2]); setTipTime([a1, a2]);
// 给到上传绑定 // 给到上传绑定
setComtyName(ContractModel.record.communityName); setComtyName(DataSaveDetail.communityName);
// 表单内容 // 表单内容
form.setFieldsValue({ form.setFieldsValue({
...ContractModel.record, ...DataSaveDetail,
upload: 'ok',
time: [ time: [
moment(ContractModel.record.contractValidStartDate), moment(DataSaveDetail.contractValidStartDate),
moment(ContractModel.record.contractValidEndDate), moment(DataSaveDetail.contractValidEndDate),
], ],
}); });
} }
}, [ContractModel]); }, [DataSaveDetail]);
// 监听图片列表 // 监听上传图片列表
useEffect(() => { useEffect(() => {
if (FileImg != null) { if (FileImg != null) {
let obj = new Array(); let obj = new Array();
...@@ -118,29 +122,41 @@ const ContractContent = (props: any) => { ...@@ -118,29 +122,41 @@ const ContractContent = (props: any) => {
} }
}, [FileImg]); }, [FileImg]);
// 监听列表
useEffect(() => {
if (fileList.length == 0) {
form.setFieldsValue['upload'] = null;
}
}, [fileList]);
// 返回 // 返回
const goToReturn = () => { const goToReturn = () => {
// console.log(fileList) // console.log(fileList)
history.back(); history.back();
}; };
// // 提交 // 提交
const onFinish = (values: any) => { const onFinish = (values: any) => {
values.contractValidStartDate = values.time[0].format('YYYY-MM-DD'); // 判断有没有文件
values.contractValidEndDate = values.time[1].format('YYYY-MM-DD'); if (fileList.length == 0) {
let data = new Array(); message.error('Please upload the attachment!');
for (let i = 0; i < fileList.length; i++) { } else {
data.push(fileList[i].name); values.contractValidStartDate = values.time[0].format('YYYY-MM-DD');
} values.contractValidEndDate = values.time[1].format('YYYY-MM-DD');
values.contractFileNameList = data; let data = new Array();
for (let i = 0; i < fileList.length; i++) {
data.push(fileList[i].name);
}
values.contractFileNameList = data;
// 编辑 // 编辑
if (ContractModel.record.id != undefined) { if (DataSaveDetail != null) {
values.id = ContractModel.record.id; values.id = DataSaveDetail.id;
} }
RA(27, values); RA(27, values);
// RA(27, values) // RA(27, values)
}
}; };
// 上传文件设置 // 上传文件设置
...@@ -152,6 +168,11 @@ const ContractContent = (props: any) => { ...@@ -152,6 +168,11 @@ const ContractContent = (props: any) => {
onChange({ file, fileList }: { file: any; fileList: any }) { onChange({ file, fileList }: { file: any; fileList: any }) {
setFileList(fileList); setFileList(fileList);
// 添加到表单
form.setFieldsValue({
upload: 'ok',
});
if (file.status == 'done') { if (file.status == 'done') {
message.success(file.name, 3); message.success(file.name, 3);
} }
...@@ -182,10 +203,33 @@ const ContractContent = (props: any) => { ...@@ -182,10 +203,33 @@ const ContractContent = (props: any) => {
}); });
}; };
//本地图预览处理
function getBase64(file: any) {
return new Promise((resolve, reject) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = () => resolve(reader.result);
reader.onerror = (error) => reject(error);
});
}
//点击预览 //点击预览
const onPreviews = (file: any) => { const onPreviews = async (file: any) => {
setfileInfo(file); // 设置选择的文件 // 有值的话 就是本地预览
settipModal(true); if (file.size) {
if (!file.url && !file.preview) {
file.preview = await getBase64(file.originFileObj);
}
let info = {
previewImage: file.url || file.preview,
previewTitle: file.name || file.url.substring(file.url.lastIndexOf('/') + 1),
};
setPreviewVisible(true); // 弹窗
setimgInfo(info); // 图片信息
} else {
setfileInfo(file); // 设置选择的文件
settipModal(true);
}
}; };
// 关闭预览弹窗 // 关闭预览弹窗
...@@ -209,7 +253,7 @@ const ContractContent = (props: any) => { ...@@ -209,7 +253,7 @@ const ContractContent = (props: any) => {
<div className={styles.base}> <div className={styles.base}>
{/* 头部组件 */} {/* 头部组件 */}
<div className={styles.box}> <div className={styles.box}>
<div className={styles.item1}>{ContractModel.type} Contract</div> <div className={styles.item1}>{DataSaveDetail ? 'Edit' : 'Add'} Contract</div>
<button className={styles.item3} onClick={goToReturn}> <button className={styles.item3} onClick={goToReturn}>
<LeftOutlined /> <LeftOutlined />
Back Back
...@@ -221,7 +265,7 @@ const ContractContent = (props: any) => { ...@@ -221,7 +265,7 @@ const ContractContent = (props: any) => {
autoComplete="off" autoComplete="off"
form={form} form={form}
name="basic" name="basic"
initialValues={ContractModel.record} initialValues={DataSaveDetail}
onFinish={onFinish} onFinish={onFinish}
// initialValues={defForm} // initialValues={defForm}
> >
...@@ -266,7 +310,7 @@ const ContractContent = (props: any) => { ...@@ -266,7 +310,7 @@ const ContractContent = (props: any) => {
rules={[{ required: true, message: `${tipList[3]}` }]} rules={[{ required: true, message: `${tipList[3]}` }]}
> >
<SearchOptionsCommnity <SearchOptionsCommnity
defaultName={ContractModel.record.communityName} defaultName={DataSaveDetail ? DataSaveDetail.communityName : null}
// ubmit={extendName} // ubmit={extendName}
opname={opname} opname={opname}
/> />
...@@ -295,7 +339,7 @@ const ContractContent = (props: any) => { ...@@ -295,7 +339,7 @@ const ContractContent = (props: any) => {
> >
<RangePicker <RangePicker
locale={locale} locale={locale}
defaultValue={ContractModel.time} defaultValue={DataSaveDetail ? DataSaveDetail.time : null}
disabledDate={disabledDate} disabledDate={disabledDate}
placeholder={['Effective Date', 'Expiration Date']} placeholder={['Effective Date', 'Expiration Date']}
onChange={changeTime} onChange={changeTime}
...@@ -307,8 +351,9 @@ const ContractContent = (props: any) => { ...@@ -307,8 +351,9 @@ const ContractContent = (props: any) => {
<div className="list2"> <div className="list2">
<Form.Item <Form.Item
labelAlign="right" labelAlign="right"
name="upload"
label="Contract Annex" label="Contract Annex"
rules={[{ required: true, message: `${tipList[6]}` }]} rules={[{ required: true, message: `Please upload the attachment!` }]}
> >
<Upload <Upload
{...uploadProps} {...uploadProps}
...@@ -395,7 +440,7 @@ const ContractContent = (props: any) => { ...@@ -395,7 +440,7 @@ const ContractContent = (props: any) => {
// 图片用指定格式 // 图片用指定格式
<Image <Image
src={stringSplit(fileInfo.url, 'm/cash')} src={fileInfo.url}
preview={false} preview={false}
style={{ margin: '0 auto', textAlign: 'center' }} style={{ margin: '0 auto', textAlign: 'center' }}
/> />
...@@ -409,6 +454,22 @@ const ContractContent = (props: any) => { ...@@ -409,6 +454,22 @@ const ContractContent = (props: any) => {
'' ''
)} )}
</Modal> </Modal>
{/* 本地附件预览 */}
{imgInfo != null ? (
<Modal
visible={previewVisible}
title={imgInfo.previewTitle}
footer={null}
onCancel={() => {
setPreviewVisible(false);
}}
>
<img alt="example" style={{ width: '100%' }} src={imgInfo.previewImage} />
</Modal>
) : (
''
)}
</div> </div>
</Spin> </Spin>
</> </>
...@@ -421,6 +482,7 @@ function mapStateToProps(state: any) { ...@@ -421,6 +482,7 @@ function mapStateToProps(state: any) {
const loading = state.loading.models.Contract || false; const loading = state.loading.models.Contract || false;
return { return {
ContractModel, ContractModel,
Contract,
FileImg, FileImg,
loading, loading,
}; };
......
import React, { useEffect, useState } from 'react';
import { connect } from 'umi';
import { Spin, Descriptions } from 'antd';
import { LeftOutlined } from '@ant-design/icons';
import './ContractContent.less';
import PreView from '@/components/PreView/PreViewTow';
const ContractDetail = (props: any) => {
const { Contract, dispatch, FileImg, loading } = props;
const { DataSaveDetail } = Contract;
const RA = (index: any, values: any) => {
dispatch({ type: 'Contract/RA', playload: { index: index, body: values } });
};
const goToReturn = () => {
history.go(-1);
};
const [fileList, setFileList] = useState([] as any); // 图片列表
// 带来信息
useEffect(() => {
if (DataSaveDetail == null) {
console.log('返回列表');
} else {
let objData = {
type: 'tosContractPreview',
fileName: DataSaveDetail.contractFileName,
extends: DataSaveDetail.communityName,
};
RA(47, objData);
}
}, [DataSaveDetail]);
// 监听图片列表
useEffect(() => {
if (FileImg != null) {
let obj = new Array();
for (var i in FileImg) {
let a = {
uid: i,
name: FileImg[i].fileName,
status: 'done',
type: FileImg[i].fileName.match(/\.([^\.]+)$/)[1].toLowerCase(),
url: FileImg[i].fileUrl,
};
obj.push(a);
}
setFileList([...obj]);
} else {
setFileList([]);
}
}, [FileImg]);
return (
<Spin spinning={loading}>
{DataSaveDetail ? (
<div className="base">
{/* 头部组件 */}
<div className="box">
<div className="item1">Detail Contract</div>
<button className="item3" onClick={goToReturn}>
<LeftOutlined />
Back
</button>
</div>
<div className="">
<Descriptions title="" bordered layout="vertical">
<Descriptions.Item label="Contract Number :">
{DataSaveDetail.contractNumber}
</Descriptions.Item>
<Descriptions.Item label="Party A :">
{DataSaveDetail.contractPartyA}
</Descriptions.Item>
<Descriptions.Item label="Party B :">
{DataSaveDetail.contractPartyB}
</Descriptions.Item>
<Descriptions.Item label="Contract Title :" span={2}>
{DataSaveDetail.contractTitle}
</Descriptions.Item>
<Descriptions.Item label="Community Name :">
{DataSaveDetail.communityName}
</Descriptions.Item>
<Descriptions.Item label="Date :">
{DataSaveDetail.contractValidStartDate} ~ {DataSaveDetail.contractValidEndDate}
</Descriptions.Item>
<Descriptions.Item label="Contacts :">
{DataSaveDetail.communityAccount}
</Descriptions.Item>
<Descriptions.Item label="Phone :">{DataSaveDetail.communityPhone}</Descriptions.Item>
<Descriptions.Item label="Contract Annex :" span={3}>
{fileList.map((item: any, index: number) => {
return <PreView OpenUrl={item} key={index}></PreView>;
})}
</Descriptions.Item>
<Descriptions.Item label="Contract Remarks :">
{DataSaveDetail.contractRemindContent}
</Descriptions.Item>
</Descriptions>
</div>
</div>
) : (
''
)}
</Spin>
);
};
function mapStateToProps(state: any) {
const { Contract } = state;
const { FileImg } = Contract;
const loading = state.loading.models.Contract || false;
return {
Contract,
FileImg,
loading,
};
}
export default connect(mapStateToProps)(ContractDetail);
...@@ -138,6 +138,7 @@ export const requestList = [ ...@@ -138,6 +138,7 @@ export const requestList = [
['/tos/community/delete', '49 关闭小区', {}], ['/tos/community/delete', '49 关闭小区', {}],
['/tos/community/facilities/subscribeTime/query', '50 设施预订时间段查询', {}], ['/tos/community/facilities/subscribeTime/query', '50 设施预订时间段查询', {}],
['/tos/user/infromation/get', '51 获取后台所有账号', {}], ['/tos/user/infromation/get', '51 获取后台所有账号', {}],
['/tos/users/quitAndUser', '52 修改账号状态', {}],
]; ];
const params = [ const params = [
......
export const zhCnFaci = [ export const zhCnFaci = [
{ {
title: 'Check all', title: 'Check all',
key: '0', key: '0',
children: [ children: [
{ {
title: 'life用户管理', title: 'life用户管理',
key: '1', key: '1',
children: [ children: [
{ title: '查看LIFE用户', key: '2' }, { title: '查看用户', key: '2' },
{ title: '编辑LIFE用户', key: '3' }, { title: '编辑用户', key: '3' },
{ title: '添加业主档案', key: '4' }, { title: '添加用户', key: '4' },
{ title: '注销业主档案', key: '5' }, { title: '删除单元', key: '5' },
{ title: '添加家属/租户', key: '6' }, { title: '查看家属/租户', key: '6' },
{ title: '注销家属/租户', key: '7' }, { title: '注销家属/租户', key: '7' },
], ],
}, },
{ {
title: '物业费管理', title: '服务商管理',
key: '8', key: '8',
children: [ children: [
{ title: '查看物业费', key: '9' }, { title: '查看服务商', key: '9' },
{ title: '编辑物业费', key: '10' }, { title: '编辑服务商', key: '10' },
], { title: '添加服务商', key: '11' },
}, { title: '注销服务商', key: '12' },
], { title: '查看保安账号', key: '13' },
}, { title: '注销保安账号', key: '14' },
]; ],
\ No newline at end of file },
{
title: '物业费管理',
key: '15',
children: [{ title: '查看物业费', key: '16' }],
},
{
title: '物业服务-小区保养',
key: '17',
children: [
{ title: '查看信息', key: '18' },
{ title: '回复信息', key: '19' },
],
},
{
title: '物业服务-业主投诉',
key: '20',
children: [
{ title: '查看信息', key: '21' },
{ title: '回复信息', key: '22' },
],
},
{
title: '物业服务-建议反馈',
key: '23',
children: [
{ title: '查看信息', key: '24' },
{ title: '回复信息', key: '25' },
],
},
{
title: '物业服务-装修申请',
key: '26',
children: [
{ title: '查看信息', key: '27' },
{ title: '回复信息', key: '28' },
],
},
{
title: '物业服务-住户卡申请',
key: '29',
children: [
{ title: '查看信息', key: '30' },
{ title: '回复信息', key: '31' },
{ title: '申请住户卡', key: '32' },
],
},
{
title: '物业服务-在线报事',
key: '33',
children: [
{ title: '查看信息', key: '34' },
{ title: '回复信息', key: '35' },
],
},
{
title: '物业服务-保质期服务',
key: '36',
children: [
{ title: '查看信息', key: '37' },
{ title: '回复信息', key: '38' },
],
},
{
title: '合同管理',
key: '39',
children: [
{ title: '查看合同', key: '40' },
{ title: '添加合同', key: '41' },
{ title: '编辑合同', key: '42' },
],
},
{
title: '小区列表',
key: '43',
children: [
{ title: '查看小区', key: '44' },
{ title: '编辑小区', key: '45' },
{ title: '添加小区', key: '46' },
{ title: '注销小区', key: '47' },
],
},
{
title: '小区公告',
key: '48',
children: [
{ title: '查看公告', key: '49' },
{ title: '编辑公告', key: '50' },
{ title: '添加公告', key: '51' },
],
},
{
title: '小区设施',
key: '52',
children: [
{ title: '查看预约设施', key: '53' },
{ title: '添加预约设施', key: '54' },
{ title: '取消预约设施', key: '55' },
{ title: '退还预约设施费用', key: '56' },
{ title: '查看设施', key: '57' },
{ title: '编辑设施', key: '58' },
{ title: '添加设施', key: '59' },
],
},
{
title: '访客记录',
key: '60',
children: [{ title: '查看访客记录', key: '61' }],
},
{
title: '账号管理',
key: '62',
children: [
{ title: '查看账号', key: '63' },
{ title: '编辑账号', key: '64' },
{ title: '添加账号', key: '65' },
{ title: '注销账号', key: '66' },
],
},
],
},
];
export const enUsFaci = [
{
title: 'Check all',
key: '0',
children: [
{
title: 'LIFE Users',
key: '1',
children: [
{ title: 'Check users', key: '2' },
{ title: 'Edit users', key: '3' },
{ title: 'Add users', key: '4' },
{ title: 'Delete unit', key: '5' },
{ title: 'Check family/tenants', key: '6' },
{ title: 'Log off family/tenants', key: '7' },
],
},
{
title: 'Service Providers',
key: '8',
children: [
{ title: 'Check service providers', key: '9' },
{ title: 'Edit service providers', key: '10' },
{ title: 'Add service providers', key: '11' },
{ title: 'Log off service providers', key: '12' },
{ title: 'Check security account', key: '13' },
{ title: 'Log off security account', key: '14' },
],
},
{
title: 'Property Management',
key: '15',
children: [{ title: 'View property fees', key: '16' }],
},
{
title: 'Commercial Service-Community Maintenance',
key: '17',
children: [
{ title: 'See information', key: '18' },
{ title: 'Reply message', key: '19' },
],
},
{
title: 'Commercial Service-Owner Complaints',
key: '20',
children: [
{ title: 'See information', key: '21' },
{ title: 'Reply message', key: '22' },
],
},
{
title: 'Commercial Service-Problem Feedback',
key: '23',
children: [
{ title: 'See information', key: '24' },
{ title: 'Reply message', key: '25' },
],
},
{
title: 'Commercial Service-Renovation Application',
key: '26',
children: [
{ title: 'See information', key: '27' },
{ title: 'Reply message', key: '28' },
],
},
{
title: 'Commercial Service-AccessCard Application',
key: '29',
children: [
{ title: 'See information', key: '30' },
{ title: 'Reply message', key: '31' },
{ title: 'Apply accesscard', key: '32' },
],
},
{
title: 'Commercial Service-Report Online',
key: '33',
children: [
{ title: 'See information', key: '34' },
{ title: 'Reply message', key: '35' },
],
},
{
title: 'Commercial Service-Shelf Life Service',
key: '36',
children: [
{ title: 'See information', key: '37' },
{ title: 'Reply message', key: '38' },
],
},
{
title: 'Contract Management',
key: '39',
children: [
{ title: 'Check contract', key: '40' },
{ title: 'Add contract', key: '41' },
{ title: 'Edit contract', key: '42' },
],
},
{
title: 'Community',
key: '43',
children: [
{ title: 'Check community', key: '44' },
{ title: 'Edit community', key: '45' },
{ title: 'Add community', key: '46' },
{ title: 'Log off community', key: '47' },
],
},
{
title: 'Announcement',
key: '48',
children: [
{ title: 'Check announcement', key: '49' },
{ title: 'Edit announcement', key: '50' },
{ title: 'Add announcement', key: '51' },
],
},
{
title: 'Facility Bookings',
key: '52',
children: [
{ title: 'View booking facilities', key: '53' },
{ title: 'Add booking facilities', key: '54' },
{ title: 'Cancel booking facilities', key: '55' },
{ title: 'Refund of booking facility fee', key: '56' },
{ title: 'View facilities', key: '57' },
{ title: 'Edit facilities', key: '58' },
{ title: 'Add facilities', key: '59' },
],
},
{
title: 'Visitor Record',
key: '60',
children: [{ title: 'View visitor record', key: '61' }],
},
{
title: 'Account Management',
key: '62',
children: [
{ title: 'View account', key: '63' },
{ title: 'Edit account', key: '64' },
{ title: 'Add account', key: '65' },
{ title: 'Log off account', key: '66' },
],
},
],
},
];
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