Commit 1596dbf3 authored by cellee's avatar cellee

Signed-off-by: cellee <893264950@qq.com>

parent eb1dda02
/* /*
* @Author: your name * @Author: your name
* @Date: 2020-12-01 18:40:06 * @Date: 2020-12-01 18:40:06
* @LastEditTime: 2021-04-26 17:35:57 * @LastEditTime: 2021-05-20 09:50:09
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\config\config.ts * @FilePath: \tostumi\config\config.ts
...@@ -395,6 +395,7 @@ export default defineConfig({ ...@@ -395,6 +395,7 @@ export default defineConfig({
name: 'service', name: 'service',
routes: [ routes: [
{ path: './', component: './AccountManagement/Service/service' }, { path: './', component: './AccountManagement/Service/service' },
{ path: './add', component: './AccountManagement/Service/serviceAdds' },
{ path: './edit/:id', component: './AccountManagement/Service/serviceEdit' }, { path: './edit/:id', component: './AccountManagement/Service/serviceEdit' },
{ {
path: './detail/:id', path: './detail/:id',
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-01-30 16:16:41 * @Date: 2021-01-30 16:16:41
* @LastEditTime: 2021-04-23 18:50:35 * @LastEditTime: 2021-05-06 09:39:51
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\Form\ZipCode.tsx * @FilePath: \tostumi\src\components\Form\ZipCode.tsx
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2020-12-02 09:42:49 * @Date: 2020-12-02 09:42:49
* @LastEditTime: 2021-02-06 13:24:38 * @LastEditTime: 2021-05-20 14:22:39
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\SearchOptions\SearchOptionsTow.tsx * @FilePath: \tostumi\src\components\SearchOptions\SearchOptionsTow.tsx
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-01-14 09:23:51 * @Date: 2021-01-14 09:23:51
* @LastEditTime: 2021-03-11 14:36:23 * @LastEditTime: 2021-05-21 15:32:36
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\models\CommunityManagement\Bug.ts * @FilePath: \tostumi\src\models\CommunityManagement\Bug.ts
...@@ -55,6 +55,7 @@ export default { ...@@ -55,6 +55,7 @@ export default {
switch (playload.index) { switch (playload.index) {
case 68: // 获取列表 case 68: // 获取列表
{ {
// console.log(resp.data);
let Data = resp.data; let Data = resp.data;
yield put({ type: 'returnPage', Data }); yield put({ type: 'returnPage', Data });
} }
...@@ -65,26 +66,33 @@ export default { ...@@ -65,26 +66,33 @@ export default {
yield put({ type: 'returnDataSave', DataSave }); yield put({ type: 'returnDataSave', DataSave });
} }
break; break;
case 72: // 小区改变 case 72: // 改变
{ {
let Community = resp.data; let Community = resp.data;
Community.communityName = playload.body.communityName; Community.communityName = playload.body.communityName;
yield put({ type: 'returnDataSaveCommunity', Community }); yield put({ type: 'returnDataSaveCommunity', Community });
} }
break; break;
case 70: // 小区编辑保存 case 71: // 回复保存
case 71: // 小区回复保存
{ {
let Data = null; let Data = null;
yield put({ type: 'returnPage', Data }); yield put({ type: 'returnPage', Data });
history.push('/AccountManagement/service'); history.push('/AccountManagement/service');
} }
break; break;
case 70: // 编辑保存
{
let Result = {
state: 2,
};
yield put({ type: 'returnResult', Result });
}
break;
case 73: // 删除报告 case 73: // 删除报告
{ {
let Result = { let Result = {
msg: 'Successfully deleted', state: 1,
state: '0000',
}; };
yield put({ type: 'returnResult', Result }); yield put({ type: 'returnResult', Result });
// let Community = resp.data; // let Community = resp.data;
...@@ -92,6 +100,11 @@ export default { ...@@ -92,6 +100,11 @@ export default {
// yield put({ type: 'returnDataSaveCommunity', Community }); // yield put({ type: 'returnDataSaveCommunity', Community });
} }
break; break;
case 77: // 获取列表
{
history.push('/AccountManagement/service');
}
break;
} }
} }
}, },
...@@ -103,7 +116,7 @@ export default { ...@@ -103,7 +116,7 @@ export default {
let DataSave = null; let DataSave = null;
yield put({ type: 'returnDataSave', DataSave }); yield put({ type: 'returnDataSave', DataSave });
}, },
*Result({ playload }, { call, put }) { *Results({ playload }, { call, put }) {
let Result = null; let Result = null;
yield put({ type: 'returnResult', Result }); yield put({ type: 'returnResult', Result });
}, },
......
.contop { .contop {
position: relative;
padding: 20px; padding: 20px;
.listBut {
position: absolute;
right: 20px;
bottom: 25px;
}
} }
.pages { .pages {
padding: 20px; padding: 20px;
...@@ -17,12 +23,26 @@ ...@@ -17,12 +23,26 @@
margin-bottom: 18px; margin-bottom: 18px;
} }
hr { hr {
border: 0;
height: 1px; height: 1px;
background: #eee;
margin-bottom: 24px; margin-bottom: 24px;
background: #eee;
border: 0;
} }
.diys { .diys {
display: inline-block; display: inline-block;
margin-left: 10%; margin-left: 10%;
} }
.psoBox {
position: relative;
.psoBtn {
// float: right;
margin-left: 30px;
}
}
.flex {
display: flex;
align-items: center;
justify-content: end;
}
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Space, message, Pagination, Spin } from 'antd'; import { Space, message, Pagination, Button } from 'antd';
import { connect, history } from 'umi'; import { connect, history } from 'umi';
import { PlusOutlined } from '@ant-design/icons';
import ProTable from '@ant-design/pro-table'; import ProTable from '@ant-design/pro-table';
...@@ -69,7 +70,7 @@ const service = (props: any) => { ...@@ -69,7 +70,7 @@ const service = (props: any) => {
const { Data, dispatch, loading, Init, location } = props; const { Data, dispatch, loading, Init, location } = props;
const [locationkey, setlocationkey] = useState(null as any); // 是否从其他列表刷新来的 const [locationkey, setlocationkey] = useState(null as any); // 是否从其他列表刷新来的
const [term, setTerm] = useState(null as any); // 拉取数据的条件存储 const [term, setTerm] = useState({} as any); // 拉取数据的条件存储
// 监听是否有数据 // 监听是否有数据
useEffect(() => { useEffect(() => {
...@@ -83,7 +84,7 @@ const service = (props: any) => { ...@@ -83,7 +84,7 @@ const service = (props: any) => {
setTerm({ ...obj }); setTerm({ ...obj });
RA(68, obj, module, dispatch); RA(68, obj, module, dispatch);
} }
}, [location, Init]); }, [location, Init, Data]);
// 清除操作之前的数据 // 清除操作之前的数据
const emptys = (data: any, url: any) => { const emptys = (data: any, url: any) => {
...@@ -122,6 +123,10 @@ const service = (props: any) => { ...@@ -122,6 +123,10 @@ const service = (props: any) => {
// console.log(page) // console.log(page)
}; };
const adds = () => {
history.push('/AccountManagement/service/Add');
};
return ( return (
<div> <div>
<> <>
...@@ -133,11 +138,14 @@ const service = (props: any) => { ...@@ -133,11 +138,14 @@ const service = (props: any) => {
checklist={Init ? Init.CommunityList : []} checklist={Init ? Init.CommunityList : []}
onSubmit={CallBackTitleSearch} onSubmit={CallBackTitleSearch}
/> />
<Button className="listBut" type="primary" onClick={() => adds()} icon={<PlusOutlined />}>
Create Report
</Button>
</div> </div>
<ProTable <ProTable
pagination={false} // 隐藏默认分页 pagination={false} // 隐藏默认分页
rowKey={'id'}
dataSource={Data ? Data.list : null} dataSource={Data ? Data.list : null}
rowKey={'id'}
columns={columns} columns={columns}
search={false} search={false}
loading={loading} loading={loading}
......
/*
* @Author: your name
* @Date: 2021-03-02 14:39:40
* @LastEditTime: 2021-05-20 16:32:22
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx
*/
import React, { useState, useEffect } from 'react';
import { Button, Spin, Form, Input, message } from 'antd';
import { connect } from 'umi';
import { PlusOutlined } from '@ant-design/icons';
const { TextArea } = Input;
import { RA } from '@/utils/method';
const module = 'ServicePro';
import './service.less';
import TitleBack from '@/components/TitleBack/TitleBack';
import SearchOptionsCommnity from '@/components/SearchOptions/SearchOptionsCommnity';
import PictureOptionsRow from '@/components/PictureOptions/PictureOptionsRow';
const service = (props: any) => {
const { DataSave, dispatch, loading, match, user } = props;
const [term, setTerm] = useState(null as any); // 默认小区
const [ImageSrc, setImageSrc] = useState([] as any); // 图片地址
const [report, setreport] = useState([] as any); // 循环新增的报告
const [form] = Form.useForm();
// 监听是否有数据
useEffect(() => {
if (match.params.id) {
// RA(69, { id: match.params.id }, module, dispatch);
}
}, [match]);
useEffect(() => {
if (DataSave != null) {
}
}, [DataSave]);
//onFinish 提交
const onFinish = (values: any) => {
// 存储个数
let num = [];
// 先抽取所有的key
let obj = Object.keys(values);
// 再看有多少个 值
for (let i in obj) {
if (obj[i].indexOf('reportContent') != -1) {
num.push(obj[i]);
}
}
// 删除第一个
num.splice(num.indexOf('reportContent'), 1);
// 开始拼接
let tosReportRecordModels = [];
// 第一个是都有的
let requte = {
reporterId: user.currentUser.userModel.id,
communityName: values.communityName,
imagesList: values.imagesList,
reportContent: values.reportContent,
};
// 添加进去
tosReportRecordModels.push(requte);
// 如果存在其他的
if (num.length > 0) {
num.forEach((i, idx) => {
let img = 'imagesList' + idx;
let cont = 'reportContent' + idx;
let objs = {
reporterId: user.currentUser.userModel.id,
communityName: values.communityName,
imagesList: values[img],
reportContent: values[cont],
};
tosReportRecordModels.push(objs);
});
}
// 最后结果
let oves = {
tosReportRecordModels,
};
// 再发起请求
RA(77, oves, module, dispatch);
};
// 选择小区名字并赋值
const opname = (value: any) => {
// if (value) {
// RA(72, { communityName: value }, module, dispatch);
// }
// setTerm(value);
form.setFieldsValue({
communityName: value,
});
};
// 增加
const addItem = () => {
// 先检查表单内容填完了没
let objs = form.getFieldsValue();
// 存在没填写的就禁止增加
for (let i in objs) {
if (typeof objs[i] === 'undefined') {
message.warning('Please enter all information!');
return false;
}
}
// 再新增
let a = report;
a.push(report.length);
setreport([...a]);
};
return (
<Spin spinning={loading}>
<div className="edit">
{/* 标题 */}
<TitleBack title={'Add report'} />
{/* 信息 */}
<div className="form_s">
<Form
name="basic"
form={form}
initialValues={{ remember: true }}
labelCol={{ xs: 12, sm: 6, md: 6, lg: 4, xl: 4, xxl: 2 }}
wrapperCol={{ xs: 12, sm: 18, md: 18, lg: 20, xl: 20, xxl: 22 }}
onFinish={onFinish}
>
{/* 小区名 */}
<Form.Item label="Estate" name="communityName" rules={[{ required: true }]}>
<SearchOptionsCommnity
// ubmit={extendName}
opname={opname}
defaultName={term ? term.communityName : null}
// type={1} // 单选还是多选 单选就直接去掉
/>
</Form.Item>
{/* 报告描述 */}
<Form.Item label="Description" name="reportContent" rules={[{ required: true }]}>
<div className="psoBox flex">
<TextArea rows={4} style={{ maxWidth: 600, width: '100%' }} />
{report.length == 0 ? (
<div className="psoBtn">
<Button
shape="circle"
icon={<PlusOutlined />}
onClick={() => {
addItem();
}}
/>
</div>
) : (
''
)}
</div>
</Form.Item>
{/* 报告图片 */}
<Form.Item label="Picture" name="imagesList" rules={[{ required: true }]}>
<PictureOptionsRow
action="/tos/image/upload"
data={{
imageType: 'tosReportImage',
identification: '',
}}
limitNums={10}
imgs={ImageSrc}
over={loading}
/>
</Form.Item>
<hr></hr>
{/* --------------------------------------------------------------------------------------------- */}
{report.map((i: any, idx: any) => {
return (
<div key={idx}>
<Form.Item
label="Description"
name={'reportContent' + idx}
rules={[{ required: true }]}
>
<div className="psoBox flex">
<TextArea rows={4} style={{ maxWidth: 600, width: '100%' }} />
{idx == report.length - 1 ? (
<div className="psoBtn">
<Button
shape="circle"
icon={<PlusOutlined />}
onClick={() => {
addItem();
}}
/>
</div>
) : (
''
)}
</div>
</Form.Item>
<Form.Item label="Picture" name={'imagesList' + idx} rules={[{ required: true }]}>
<PictureOptionsRow
action="/tos/image/upload"
data={{
imageType: 'tosReportImage',
identification: '',
}}
limitNums={10}
imgs={ImageSrc}
over={loading}
/>
</Form.Item>
<hr></hr>
</div>
);
})}
{/* --------------------------------------------------------------------------------------------- */}
{/* 提交 */}
<Form.Item label=" " colon={false}>
<Button type="primary" loading={loading} htmlType="submit">
Submit
</Button>
</Form.Item>
</Form>
</div>
</div>
</Spin>
);
};
function map(state: any) {
const loading = state.loading.global;
const { Init, user } = state;
const { DataSave, curString, village } = state[module];
return { DataSave, loading, curString, village, Init, user };
}
export default connect(map)(service);
/* /*
* @Author: your name * @Author: your name
* @Date: 2021-03-02 14:39:40 * @Date: 2021-03-02 14:39:40
* @LastEditTime: 2021-03-18 10:40:34 * @LastEditTime: 2021-05-21 17:24:18
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx * @FilePath: \tostumi\src\pages\AccountManagement\Service\serviceEdit.tsx
*/ */
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { Button, Spin, Form, Input } from 'antd'; import { Button, Spin, Form, Input, Modal, message, Pagination } from 'antd';
import { connect, history } from 'umi'; import { connect } from 'umi';
const { TextArea } = Input; const { TextArea } = Input;
import {
FormOutlined,
DeleteOutlined,
DeliveredProcedureOutlined,
RollbackOutlined,
} from '@ant-design/icons';
import { RA, SA } from '@/utils/method'; import { RA } from '@/utils/method';
const module = 'ServicePro'; const module = 'ServicePro';
import './service.less'; import './service.less';
import TitleBack from '@/components/TitleBack/TitleBack'; import TitleBack from '@/components/TitleBack/TitleBack';
import SearchOptionsCommnity from '@/components/SearchOptions/SearchOptionsCommnity';
import PictureOptionsRow from '@/components/PictureOptions/PictureOptionsRow'; import PictureOptionsRow from '@/components/PictureOptions/PictureOptionsRow';
import moment from 'moment'; import moment from 'moment';
...@@ -24,10 +29,11 @@ import moment from 'moment'; ...@@ -24,10 +29,11 @@ import moment from 'moment';
const service = (props: any) => { const service = (props: any) => {
const { DataSave, dispatch, loading, match, Result } = props; const { DataSave, dispatch, loading, match, Result } = props;
const [term, setTerm] = useState(null as any); // 默认小区 const [term, setTerm] = useState(null as any); // 所有信息
const [ImageSrc, setImageSrc] = useState([] as any); // 图片地址 const [reportList, setReportList] = useState([] as any); // 列表存储
const [isModalVisible, setIsModalVisible] = useState(false); // 删除 model
const [imgs, setImgs] = useState([] as any); // 回复地址 const [listIdx, setListIdx] = useState(0); // 正在操作的第几条记录
const [form] = Form.useForm(); const [form] = Form.useForm();
// 监听是否有数据 // 监听是否有数据
...@@ -39,110 +45,138 @@ const service = (props: any) => { ...@@ -39,110 +45,138 @@ const service = (props: any) => {
useEffect(() => { useEffect(() => {
if (DataSave != null) { if (DataSave != null) {
setTerm({ ...DataSave }); // 单钱循环处理
for (let i in DataSave.list) {
form.setFieldsValue({
communityName: DataSave.communityName,
reportContent: DataSave.reportContent,
reportImages: DataSave.reportImages ? DataSave.reportImages.split(',') : null,
});
if (DataSave.reportPictures.length > 0) {
// 图片名any
let a = DataSave.reportPictures.map((item: any, i: any) => {
let img = DataSave.reportImages.split(',');
let key = img[i];
return {
uid: i,
name: key,
status: 'done',
url: item,
};
});
// 图片列表
setImageSrc(a);
}
if (DataSave.replyData.length > 0) {
// 图片名any
let b = [] as any; let b = [] as any;
DataSave.replyData[0].replyPictures.map((item: any, i: any) => { DataSave.list[i].imageNames.map((item: any, idx: any) => {
let obj = { let obj = {
uid: i, uid: idx,
name: i, name: item,
status: 'done', status: 'done',
url: item, url: item,
}; };
b.push(obj); b.push(obj);
}); });
DataSave.list[i].img = b;
DataSave.list[i].edit = false;
DataSave.list[i].delete = false;
}
// 回复列表 setReportList([...DataSave.list.slice(0, 10)]); // 所有回复列表
setImgs(b); setTerm({ ...DataSave });
form.setFieldsValue({ form.setFieldsValue({
replyContent: DataSave.replyData[0].replyContent, communityName: DataSave.communityName,
}); });
}
} }
}, [DataSave]); }, [DataSave]);
//onFinish 提交 //onFinish 提交
const onFinish = (values: any) => { const onFinish = (values: any) => {
values.id = match.params.id; values.reportId = reportList[listIdx].reportId;
values.reportImages = values.reportImages ? values.reportImages.join(',') : null;
values.replyList = [ console.log(values);
{
replyContent: values.replyContent, let obj = {
replyImages: values.replyImages ? values.replyImages.join(',') : null, imageContentDtos: [values],
}, };
];
RA(70, obj, module, dispatch);
RA(70, values, module, dispatch);
}; };
// 选择小区名字并赋值 // 弹出删除model
const opname = (value: any) => { const showModal = (idx: any) => {
// console.log(value); setListIdx(idx);
if (value) { setIsModalVisible(true);
RA(72, { communityName: value }, module, dispatch);
}
form.setFieldsValue({
communityName: value,
});
}; };
// 确认删除 // 确认删除
const handleOk = () => { const handleOk = () => {
console.log('触发'); RA(73, { ids: reportList[listIdx].reportId }, module, dispatch);
RA(73, { ids: match.params.id }, module, dispatch); setIsModalVisible(false);
};
// 隐藏
const handleCancel = () => {
setIsModalVisible(false);
}; };
// 删除结果 // 删除\编辑结果
useEffect(() => { useEffect(() => {
if (Result) { if (Result) {
setTimeout(() => { if (Result.state == 1) {
dispatch({ type: module + '/SA' }); // 清空详情缓存 dispatch({ type: module + '/Results' });
history.push('/AccountManagement/service'); let arr = term.list;
}, 300); arr.splice(listIdx, 1);
setReportList([...arr]);
} else if (Result.state == 2) {
dispatch({ type: module + '/Results' });
RA(69, { id: match.params.id }, module, dispatch);
}
} }
}, [Result]); }, [Result]);
// 点击编辑
const showEdit = (idx: any) => {
// 先看之前是否存在编辑情况
for (let i in reportList) {
if (reportList[i].edit) {
message.warning('Please edit the content before processing!');
return false;
}
}
// 先打开状态
setListIdx(idx);
let des = reportList;
des[idx].edit = true;
setReportList([...des]);
// 再赋值
form.setFieldsValue({
content: des[idx].content,
imageNames: des[idx].imageNames,
reportRemark: des[idx].reportRemark,
});
};
// 取消编辑
const noneEdit = (idx: any) => {
let des = reportList;
des[idx].edit = false;
setReportList([...des]);
form.setFieldsValue({
reportRemark: '',
});
};
// 分页点击
const onChange = (page: any) => {
// 先看之前是否存在编辑情况
for (let i in reportList) {
if (reportList[i].edit) {
message.warning('Please edit the content before processing!');
return false;
}
}
// 再开始分页
let a = JSON.parse(JSON.stringify(term.list));
let b = a.splice((page - 1) * 10, 10);
setReportList([...b]);
};
return ( return (
<Spin spinning={loading}> <Spin spinning={loading}>
<div className="edit"> <div className="edit">
{/* 标题 */} {/* 标题 */}
<TitleBack <TitleBack title={'Report details'} loading={loading} Result={Result} />
title={'Report details'}
del={'Report delete'}
handleOk={handleOk}
loading={loading}
Result={Result}
/>
{/* 信息 */} {/* 信息 */}
<div className="form_s"> <div className="form_s">
<Form <Form
name="basic" name="basic"
colon={false}
form={form} form={form}
initialValues={{ remember: true }} initialValues={{ remember: true }}
labelCol={{ xs: 12, sm: 6, md: 6, lg: 4, xl: 4, xxl: 2 }} labelCol={{ xs: 12, sm: 6, md: 6, lg: 4, xl: 4, xxl: 2 }}
...@@ -150,91 +184,146 @@ const service = (props: any) => { ...@@ -150,91 +184,146 @@ const service = (props: any) => {
onFinish={onFinish} onFinish={onFinish}
> >
{/* 小区名 */} {/* 小区名 */}
<Form.Item label="Estate" name="communityName" rules={[{ required: true }]}> <Form.Item label="Estate:" name="communityName">
<SearchOptionsCommnity <span>{term ? term.communityName : ''}</span>
// ubmit={extendName}
opname={opname}
defaultName={term ? term.communityName : null}
// type={1} // 单选还是多选 单选就直接去掉
disabled
/>
</Form.Item> </Form.Item>
{/* 小区地址 */} {/* 小区地址 */}
<Form.Item label="Address"> <Form.Item label="Address:">
<span>{term ? `${term.communityAddress} , ${term.postCode}` : null}</span> <span>{term ? `${term.communityAddress} , ${term.postCode}` : null}</span>
</Form.Item> </Form.Item>
{/* 报告人 */} {/* 报告人 */}
<Form.Item label="Reported By"> <Form.Item label="Reported By:">
<span>{term ? term.reporterName : null}</span> <span>{term ? term.reporterName : null}</span>
</Form.Item> </Form.Item>
{/* 报告人联系方式 */} {/* 报告人联系方式 */}
<Form.Item label="Contact Details"> <Form.Item label="Contact Details:">
{/* <span style={{ display: 'inline-block', marginRight: 20 }}> {/* <span style={{ display: 'inline-block', marginRight: 20 }}>
{term ? term.reporterEmail : null} {term ? term.reporterEmail : null}
</span> */} </span> */}
<span>{term ? term.reporterPhone : null}</span> <span>{term ? term.reporterPhone : null}</span>
</Form.Item> </Form.Item>
{/* 报告描述 */}
<Form.Item label="Description" name="reportContent" rules={[{ required: true }]}>
<TextArea rows={4} style={{ maxWidth: 600, width: '100%' }} disabled />
</Form.Item>
{/* 报告图片 */}
<Form.Item label="Picture" name="reportImages" rules={[{ required: true }]}>
<PictureOptionsRow
action="/tos/image/upload"
data={{
imageType: 'tosReportImage',
identification: '',
}}
limitNums={10}
imgs={ImageSrc}
overs={true}
/>
</Form.Item>
<hr></hr> <hr></hr>
{/* --------------------------------------------------------------------------------------------- */}
{/* 回复人信息 */} {/* 本小区报告列表 */}
{DataSave && DataSave.replyData.length > 0 ? ( {reportList.map((i: any, idx: any) => {
<Form.Item label="Amended By"> // console.log(reportList);
{DataSave.replyData[0].replyName} return (
<span style={{ display: 'inline-block', margin: '0 10px 0 50px' }}> <div key={idx}>
Contact Details :{' '} {i.edit ? (
</span>{' '} <div key={idx}>
{DataSave.replyData[0].replyPhone} <Form.Item label="Description:" name="content" rules={[{ required: true }]}>
</Form.Item> <TextArea rows={4} style={{ maxWidth: 600, width: '100%' }} />
) : ( </Form.Item>
'' <Form.Item label="Remarks:" name="reportRemark" rules={[{ required: true }]}>
)} <TextArea rows={4} style={{ maxWidth: 600, width: '100%' }} />
</Form.Item>
{/* 回复内容 */}
{DataSave && DataSave.replyData.length > 0 && DataSave.replyData[0].replyContent ? ( <Form.Item label=" " name="imageNames" rules={[{ required: true }]}>
<Form.Item label="Overview" name="replyContent"> <PictureOptionsRow
<TextArea rows={4} style={{ maxWidth: 600, width: '100%' }} disabled /> action="/tos/image/upload"
</Form.Item> data={{
) : ( imageType: 'tosReportImage',
'' identification: '',
)} }}
limitNums={5}
{/* 回复图片 */} imgs={i.img}
{imgs.length > 0 ? ( />
<Form.Item label="Picture" name="replyImages"> </Form.Item>
<PictureOptionsRow {/* 保存 */}
action="/tos/image/upload" <Form.Item label=" ">
data={{ <Button type="link" htmlType="submit">
// imageType: 'tosReportImage', <DeliveredProcedureOutlined />
imageType: 'tosReplyImage', Save
}} </Button>
limitNums={10} <Button
imgs={imgs} type="text"
overs={true} onClick={() => {
/> noneEdit(idx);
</Form.Item> }}
) : ( >
'' <RollbackOutlined />
)} Cancel
</Button>
</Form.Item>
</div>
) : (
<Spin spinning={i.delete} key={idx}>
<Form.Item label="Description:">
<span>{i.content}</span>
</Form.Item>
{i.reportRemark ? (
<Form.Item label="Remarks:">
<span>{i.reportRemark}</span>
</Form.Item>
) : (
''
)}
<Form.Item label=" ">
<PictureOptionsRow
action="/tos/image/upload"
data={{
imageType: 'tosReportImage',
identification: '',
}}
limitNums={5}
imgs={i.img}
overs={true}
/>
</Form.Item>
{/* 编辑\删除 */}
<Form.Item label=" ">
<Button
type="text"
onClick={() => {
showEdit(idx);
}}
>
<FormOutlined />
Edit
</Button>
<Button
type="text"
danger
onClick={() => {
showModal(idx);
}}
>
<DeleteOutlined />
Delete
</Button>
</Form.Item>
</Spin>
)}
<hr></hr>
</div>
);
})}
</Form> </Form>
</div> </div>
{/* 分页 */}
<div style={{ textAlign: 'right' }}>
<Pagination
defaultCurrent={1}
defaultPageSize={10}
total={term && term.list ? term.list.length : 10}
onChange={onChange}
/>
</div>
</div> </div>
{/* 删除 */}
<Modal
title="Delete Message"
visible={isModalVisible}
onOk={handleOk}
centered={true}
okText="Confirm"
onCancel={handleCancel}
>
<p>Are you sure you want to delete this message?</p>
</Modal>
</Spin> </Spin>
); );
}; };
......
...@@ -97,8 +97,8 @@ const Renovation = (props: any) => { ...@@ -97,8 +97,8 @@ const Renovation = (props: any) => {
}, },
{ {
title: 'Requestor', title: 'Requestor',
dataIndex: 'name', dataIndex: 'applyName',
key: 'name', key: 'applyName',
render: (text: string, record: { exist: string }) => { render: (text: string, record: { exist: string }) => {
return ( return (
<div> <div>
...@@ -170,7 +170,8 @@ const Renovation = (props: any) => { ...@@ -170,7 +170,8 @@ const Renovation = (props: any) => {
serviceType = index; serviceType = index;
} }
}); });
// console.log(WebUrl[serviceType]); //
// applyName
// 搜索条件 // 搜索条件
let objs = { let objs = {
...@@ -178,8 +179,15 @@ const Renovation = (props: any) => { ...@@ -178,8 +179,15 @@ const Renovation = (props: any) => {
handleStatus: handleStatus:
location.query.handleStatus !== undefined ? parseInt(location.query.handleStatus) : null, location.query.handleStatus !== undefined ? parseInt(location.query.handleStatus) : null,
pageNum, pageNum,
applyName: tmp.applyforName,
}; };
if (serviceType == 0) {
delete objs.applyName;
} else {
delete objs.applyforName;
}
// 请求 // 请求
RA(serviceType == 0 ? 23 : 74, objs, module, dispatch); RA(serviceType == 0 ? 23 : 74, objs, module, dispatch);
}, [location]); }, [location]);
......
...@@ -364,11 +364,16 @@ const Adds = (props: any) => { ...@@ -364,11 +364,16 @@ const Adds = (props: any) => {
placeholder="Please enter phone" placeholder="Please enter phone"
maxLength={11} maxLength={11}
onKeyUp={keyup_communityManagerFee} onKeyUp={keyup_communityManagerFee}
autocomplete="off"
/> />
</Form.Item> </Form.Item>
{/* 小区邮箱 */} {/* 小区邮箱 */}
<Form.Item name="residentialEmail" label="Email" rules={village[5] as any}> <Form.Item name="residentialEmail" label="Email" rules={village[5] as any}>
<Input style={{ width: '240px' }} placeholder="Please enter email" /> <Input
style={{ width: '240px' }}
placeholder="Please enter email"
autocomplete="off"
/>
</Form.Item> </Form.Item>
{/* 小区管理员 */} {/* 小区管理员 */}
<Form.Item <Form.Item
...@@ -376,7 +381,12 @@ const Adds = (props: any) => { ...@@ -376,7 +381,12 @@ const Adds = (props: any) => {
name="residentialManagerUserName" name="residentialManagerUserName"
rules={village[6] as any} rules={village[6] as any}
> >
<Input style={{ width: '240px' }} placeholder="Please enter name" maxLength={30} /> <Input
style={{ width: '240px' }}
placeholder="Please enter name"
maxLength={30}
autocomplete="off"
/>
</Form.Item> </Form.Item>
{/* 小区缴费方式 */} {/* 小区缴费方式 */}
<Form.Item label="Property Fee" name="propertyFee" style={{ marginBottom: '0' }}> <Form.Item label="Property Fee" name="propertyFee" style={{ marginBottom: '0' }}>
......
...@@ -2,41 +2,41 @@ li { ...@@ -2,41 +2,41 @@ li {
list-style: none; list-style: none;
} }
.contop { .contop {
padding: 15px 15px 10px;
background: #fff;
margin-bottom: 15px; margin-bottom: 15px;
padding: 20px;
background: #fff;
} }
.listbox { .listbox {
width: 100%; width: 100%;
background-color: #ffffff;
padding: 10px; padding: 10px;
background-color: #ffffff;
} }
// 添加 // 添加
.form { .form {
padding: 20px; padding: 20px;
overflow: auto;
background: #fff;
border: 1px solid #efefef; border: 1px solid #efefef;
border-radius: 3px; border-radius: 3px;
background: #fff;
box-shadow: 0 1px 1px #ccc; box-shadow: 0 1px 1px #ccc;
overflow: auto;
h3 { h3 {
margin-bottom: 30px;
position: relative; position: relative;
margin-bottom: 30px;
.back { .back {
position: absolute; position: absolute;
right: 0;
top: 0; top: 0;
right: 0;
margin-bottom: 20px; margin-bottom: 20px;
background: #fff; background: #fff;
} }
} }
.li { .li {
display: block;
min-width: 140px; min-width: 140px;
margin-top: 15px; margin-top: 15px;
margin-left: 0; margin-left: 0;
display: block;
} }
input { input {
width: 240px; width: 240px;
...@@ -54,19 +54,19 @@ li { ...@@ -54,19 +54,19 @@ li {
line-height: 34px; line-height: 34px;
} }
hr { hr {
border: 0;
height: 1px; height: 1px;
background: #eee;
margin-bottom: 20px; margin-bottom: 20px;
background: #eee;
border: 0;
} }
.tip { .tip {
padding: 10px 0 15px; padding: 10px 0 15px;
p { p {
display: none; display: none;
color: #67c23a;
&.show { &.show {
display: block; display: block;
} }
color: #67c23a;
span { span {
margin-right: 5px; margin-right: 5px;
} }
...@@ -84,9 +84,9 @@ li { ...@@ -84,9 +84,9 @@ li {
.celBox { .celBox {
position: relative; position: relative;
.item { .item {
margin-bottom: 15px;
font-size: 14px; font-size: 14px;
line-height: 35px; line-height: 35px;
margin-bottom: 15px;
label { label {
display: inline-block; display: inline-block;
min-width: 160px; min-width: 160px;
...@@ -110,24 +110,24 @@ li { ...@@ -110,24 +110,24 @@ li {
} }
.code { .code {
position: absolute; position: absolute;
right: 5%;
top: 50%; top: 50%;
transform: translateY(-55%); right: 5%;
width: 200px; width: 200px;
text-align: center; text-align: center;
transform: translateY(-55%);
li { li {
text-align: center;
line-height: 35px;
margin-bottom: 6px; margin-bottom: 6px;
line-height: 35px;
text-align: center;
} }
img { img {
border-radius: 3px;
margin-bottom: 5px; margin-bottom: 5px;
border-radius: 3px;
} }
.lis { .lis {
color: #67c23a; color: #67c23a;
font-size: 18px;
font-weight: 500; font-weight: 500;
font-size: 18px;
} }
} }
} }
...@@ -136,8 +136,8 @@ li { ...@@ -136,8 +136,8 @@ li {
width: 100px; width: 100px;
} }
.redFs { .redFs {
font-size: 12px;
color: red; color: red;
font-size: 12px;
} }
img { img {
...@@ -148,9 +148,9 @@ img { ...@@ -148,9 +148,9 @@ img {
text-transform: capitalize; text-transform: capitalize;
} }
.pages { .pages {
background: #fff;
text-align: right;
padding: 10px; padding: 10px;
text-align: right;
background: #fff;
} }
// 必填 // 必填
...@@ -175,7 +175,7 @@ img { ...@@ -175,7 +175,7 @@ img {
.acitves { .acitves {
} }
.pdfform { .pdfform {
background: #f4f4f4;
padding: 15px; padding: 15px;
background: #f4f4f4;
} }
} }
...@@ -154,9 +154,9 @@ const Contract = (props: any) => { ...@@ -154,9 +154,9 @@ const Contract = (props: any) => {
opname={opname} opname={opname}
/> />
</Form.Item> </Form.Item>
<Form.Item name="contractNumber"> {/* <Form.Item name="contractNumber">
<Input allowClear placeholder="Contract Number" /> <Input allowClear placeholder="Contract Number" />
</Form.Item> </Form.Item> */}
<Form.Item name="contractTitle"> <Form.Item name="contractTitle">
<Input allowClear placeholder="Contract Title" /> <Input allowClear placeholder="Contract Title" />
</Form.Item> </Form.Item>
......
/* /*
* @Author: your name * @Author: your name
* @Date: 2020-11-19 20:34:18 * @Date: 2020-11-19 20:34:18
* @LastEditTime: 2021-04-21 15:18:56 * @LastEditTime: 2021-05-20 11:00:23
* @LastEditors: Please set LastEditors * @LastEditors: Please set LastEditors
* @Description: In User Settings Edit * @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\params.ts * @FilePath: \tostumi\src\utils\params.ts
...@@ -64,14 +64,7 @@ export const requestList = [ ...@@ -64,14 +64,7 @@ export const requestList = [
['/tos/property/community/houseCard/query/detail', '36 获取住户卡详情', {}], ['/tos/property/community/houseCard/query/detail', '36 获取住户卡详情', {}],
['/tos/property/decorate/record/get/detail', '37 获取装修记录详情', {}], ['/tos/property/decorate/record/get/detail', '37 获取装修记录详情', {}],
['/tos/users/save', '38 新建后台信息', {}], ['/tos/users/save', '38 新建后台信息', {}],
[ ['/tos/life/community/account/member/del', '39 删除业主成员信息', {}],
'/tos/life/community/account/member/del',
'39 删除业主成员信息',
{
id: 'c06286cfe7b843cb96fdfcb987231123',
ownerId: '6b359755a36b49c28241a4620fa6539b',
},
],
['/tos/community/service/get', '40 获取小区服务回复列表', {}], ['/tos/community/service/get', '40 获取小区服务回复列表', {}],
['/tos/users/save', '41 添加后台账号', {}], ['/tos/users/save', '41 添加后台账号', {}],
['/tos/account/permission/savePermission', '42 添加后台权限', {}], ['/tos/account/permission/savePermission', '42 添加后台权限', {}],
...@@ -109,4 +102,5 @@ export const requestList = [ ...@@ -109,4 +102,5 @@ export const requestList = [
['/tos/community/moveOut/record/get', '74 迁出申请列表', {}], ['/tos/community/moveOut/record/get', '74 迁出申请列表', {}],
['/tos/community/moveOut/record/get/detail', '75 迁出申请详情', {}], ['/tos/community/moveOut/record/get/detail', '75 迁出申请详情', {}],
['/tos/community/moveOut/record/reply', '76 迁出申请回复', {}], ['/tos/community/moveOut/record/reply', '76 迁出申请回复', {}],
['/tos/report/create', '77 报告新增', {}],
]; ];
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