Commit 5b1d2f00 authored by cellee's avatar cellee

小区新增各种情况自查,查看小区内容处理,上传附件与小区绑定处理,禁止用户更改小区姓名,优化表单提交提示

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 60981b65
This diff is collapsed.
...@@ -2,7 +2,7 @@ import * as service from '../../services/tos'; ...@@ -2,7 +2,7 @@ import * as service from '../../services/tos';
import { message } from 'antd'; import { message } from 'antd';
import { Link, useIntl, connect, Dispatch, history } from 'umi'; import { Link, useIntl, connect, Dispatch, history } from 'umi';
import { routerRedux } from 'dva/router' import { routerRedux } from 'dva/router';
import { printf } from '@/utils/log'; import { printf } from '@/utils/log';
import { getObjectInfo } from '@/utils/method'; import { getObjectInfo } from '@/utils/method';
...@@ -11,68 +11,82 @@ export default { ...@@ -11,68 +11,82 @@ export default {
namespace: 'CellList', namespace: 'CellList',
state: { state: {
Data: null, Data: null,
curString:{}, curString: {},
Result: null, Result: null,
DataSave: null, DataSave: null,
DataSaveDetail:null, detailData: {},
imgUrl: '',
}, },
reducers: { reducers: {
returnPage(state, { Data}) { returnPage(state, { Data }) {
return { ...state, Data }; return { ...state, Data };
}, },
returnResult(state, { Result}) { returnResult(state, { Result }) {
return { ...state, Result}; return { ...state, Result };
}, },
returnDataSave(state, { DataSave }) { returnDataSave(state, { DataSave }) {
return {...state,DataSave} return { ...state, DataSave };
}, },
returnDataSaveDetail(state, { DataSaveDetail }) { returnDataSaveDetail(state, { detailData }) {
return {...state,DataSaveDetail} return { ...state, detailData };
},
returnImgurl(state, { imgUrl }) {
return { ...state, imgUrl };
}, },
}, },
effects: { effects: {
//标准请求 //标准请求
*RA({ playload }, { call, put }) { *RA({ playload }, { call, put }) {
const resp = yield call(service.RA, playload); const resp = yield call(service.RA, playload);
console.log(resp) console.log(resp);
// if (resp.code == 500||resp.error_code!="0000") { // if (resp.code == 500||resp.error_code!="0000") {
// } // }
if (resp.code == 500 && resp.error_code != "0000") { if (resp.code == 500 && resp.error_code != '0000') {
getObjectInfo(playload.body) getObjectInfo(playload.body);
printf(playload, resp) printf(playload, resp);
message.error(`${resp.code}:${resp.msg}`) message.error(`${resp.code}:${resp.msg}`);
} else { } else {
switch (playload.index) { switch (playload.index) {
case 24: { case 24:
{
let Data = resp.data; let Data = resp.data;
yield put({ type: 'returnPage', Data }); yield put({ type: 'returnPage', Data });
} break; }
case 29: { break;
case 29:
{
let Result = resp; let Result = resp;
yield put({ type: 'returnResult', Result }); yield put({ type: 'returnResult', Result });
message.success(`新增成功!`) message.success(`小区信息保存成功!`);
} break;
}
history.push('/CommunityManagement/CellList'); history.push('/CommunityManagement/CellList');
} }
break;
case 32:
{
let detailData = resp.data;
yield put({ type: 'returnDataSaveDetail', detailData });
}
break;
case 47:
{
let imgUrl = resp.data;
yield put({ type: 'returnImgurl', imgUrl });
}
break;
}
}
}, },
*ResultClear({ }, { put }) { *ResultClear({}, { put }) {
var tmp=null var tmp = null;
yield put({type: 'returnResult', tmp} ) yield put({ type: 'returnResult', tmp });
}, },
*SA({ playload }, { call, put }) { *SA({ playload }, { call, put }) {
var DataSave = playload var DataSave = playload;
yield put({type: 'returnDataSave', DataSave} ) yield put({ type: 'returnDataSave', DataSave });
}, },
}, },
}; };
...@@ -35,7 +35,7 @@ const CellList = (props: any) => { ...@@ -35,7 +35,7 @@ const CellList = (props: any) => {
null, null,
(text: any, record: any) => ( (text: any, record: any) => (
<Space size="middle"> <Space size="middle">
<a onClick={goToDetail.bind(this, record)}>Edit</a> <a onClick={goToEdit.bind(this, record)}>Edit</a>
<a onClick={goToDetail.bind(this, record)}>Detail</a> <a onClick={goToDetail.bind(this, record)}>Detail</a>
</Space> </Space>
), ),
...@@ -43,10 +43,21 @@ const CellList = (props: any) => { ...@@ -43,10 +43,21 @@ const CellList = (props: any) => {
]); ]);
const { dispatch, Data, loading, curString } = props; const { dispatch, Data, loading, curString } = props;
console.log(curString); console.log(Data);
// useEffect(() => {
// let msg = {
// residentialManagerUserName: '',
// communityNameList: [],
// pageNum: 1,
// };
// RA(48, msg, module, dispatch);
// }, [1]);
useEffect(() => { useEffect(() => {
RA(24, { communityName: '' }, module, dispatch); RA(24, { communityName: '' }, module, dispatch);
}, []); }, [1]);
useEffect(() => { useEffect(() => {
if (Data != null) { if (Data != null) {
//console.log(columnsVal) //console.log(columnsVal)
...@@ -59,6 +70,11 @@ const CellList = (props: any) => { ...@@ -59,6 +70,11 @@ const CellList = (props: any) => {
SA('', module, dispatch); // 清空之前传递的数据 SA('', module, dispatch); // 清空之前传递的数据
history.push('./CellList/Add'); history.push('./CellList/Add');
}; };
const goToEdit = (values: any, e: any) => {
// console.log(values);
SA(values, module, dispatch);
history.push('./CellList/Add');
};
const goToDetail = (values: any, e: any) => { const goToDetail = (values: any, e: any) => {
// console.log(values); // console.log(values);
SA(values, module, dispatch); SA(values, module, dispatch);
...@@ -68,25 +84,26 @@ const CellList = (props: any) => { ...@@ -68,25 +84,26 @@ const CellList = (props: any) => {
// 点击搜索 // 点击搜索
const CallBackTitleSearch = (comment: any) => { const CallBackTitleSearch = (comment: any) => {
if (comment.communityName.length > 0 || typeof comment.label !== 'undefined') { message.error('后台接口更新中');
let tmp: any = new Object(); // if (comment.communityName.length > 0 || typeof comment.label !== 'undefined') {
tmp.adminName = comment.label; // let tmp: any = new Object();
tmp.communityName = comment.communityName; // tmp.adminName = comment.label;
tmp.curPage = 1; // tmp.communityName = comment.communityName;
// QA(tmp); // tmp.curPage = 1;
console.log(tmp); // // QA(tmp);
// CallbackSearch() // console.log(tmp);
//中断 // // CallbackSearch()
// RA(9, { // //中断
// userToken: token, // // RA(9, {
// pageNum: '1', // // userToken: token,
// subscribeDate: tmp.subscribeDate, // // pageNum: '1',
// status: tmp.status, // // subscribeDate: tmp.subscribeDate,
// communityNameList: comment.communityName, // // status: tmp.status,
// }, module, dispatch); // // communityNameList: comment.communityName,
} else { // // }, module, dispatch);
message.error('请输入管理员姓名或选择小区进行搜索!'); // } else {
} // message.error('请输入管理员姓名或选择小区进行搜索!');
// }
}; };
return ( return (
<div> <div>
...@@ -137,7 +154,7 @@ const CellList = (props: any) => { ...@@ -137,7 +154,7 @@ const CellList = (props: any) => {
}; };
function map(state: any) { function map(state: any) {
// console.log(state); console.log(state);
const loading = state.loading.models.CellList; const loading = state.loading.models.CellList;
const { Data, curString } = state[module]; const { Data, curString } = state[module];
return { Data, loading, curString }; return { Data, loading, curString };
......
...@@ -60,7 +60,17 @@ li { ...@@ -60,7 +60,17 @@ li {
margin-bottom: 20px; margin-bottom: 20px;
} }
.tip { .tip {
padding: 15px 0; padding: 10px 0 15px;
p {
display: none;
&.show {
display: block;
}
color: #67c23a;
span {
margin-right: 5px;
}
}
} }
.ant-form-item-label > label { .ant-form-item-label > label {
...@@ -68,8 +78,10 @@ li { ...@@ -68,8 +78,10 @@ li {
} }
// 详情页 // 详情页
.ant-divider-horizontal {
.box { margin: 20px 0;
}
.celBox {
position: relative; position: relative;
.item { .item {
font-size: 15px; font-size: 15px;
...@@ -81,6 +93,12 @@ li { ...@@ -81,6 +93,12 @@ li {
} }
} }
.item_span {
span {
display: inline-block;
margin-right: 15px;
}
}
.inst { .inst {
display: flex; display: flex;
.item { .item {
...@@ -94,7 +112,7 @@ li { ...@@ -94,7 +112,7 @@ li {
position: absolute; position: absolute;
right: 5%; right: 5%;
top: 50%; top: 50%;
transform: translateY(-65%); transform: translateY(-55%);
li { li {
text-align: center; text-align: center;
line-height: 35px; line-height: 35px;
...@@ -105,3 +123,7 @@ li { ...@@ -105,3 +123,7 @@ li {
.ant-picker-time-panel-column { .ant-picker-time-panel-column {
width: 100px; width: 100px;
} }
.redFs {
font-size: 12px;
color: red;
}
...@@ -146,7 +146,6 @@ const UsersDetail = (props: any) => { ...@@ -146,7 +146,6 @@ const UsersDetail = (props: any) => {
setMemberDetail(true); setMemberDetail(true);
}; };
const deleteUnit = (values: any) => { const deleteUnit = (values: any) => {
// console.log(values) // console.log(values)
...@@ -157,7 +156,7 @@ const UsersDetail = (props: any) => { ...@@ -157,7 +156,7 @@ const UsersDetail = (props: any) => {
okText: 'Confirm', okText: 'Confirm',
okType: 'danger', okType: 'danger',
cancelText: 'Cancel', cancelText: 'Cancel',
onCancel() { }, onCancel() {},
onOk() { onOk() {
if (DataSave != null) { if (DataSave != null) {
//console.log(DataSave) //console.log(DataSave)
...@@ -170,10 +169,8 @@ const UsersDetail = (props: any) => { ...@@ -170,10 +169,8 @@ const UsersDetail = (props: any) => {
} }
}, },
}); });
}; };
const DeleteMember = (values: any, e: any) => { const DeleteMember = (values: any, e: any) => {
console.log(values); console.log(values);
RA(39, { id: values.id, ownerId: values.owner_id }); RA(39, { id: values.id, ownerId: values.owner_id });
...@@ -313,7 +310,6 @@ const UsersDetail = (props: any) => { ...@@ -313,7 +310,6 @@ const UsersDetail = (props: any) => {
<Button danger onClick={DeleteMember.bind(this, memberData)}> <Button danger onClick={DeleteMember.bind(this, memberData)}>
Delete Delete
</Button> </Button>
</div> </div>
</> </>
)} )}
...@@ -324,6 +320,7 @@ const UsersDetail = (props: any) => { ...@@ -324,6 +320,7 @@ const UsersDetail = (props: any) => {
function mapStateToProps(state: any) { function mapStateToProps(state: any) {
const { DataSave, DataSaveDetail, Result, returnValue, memberResult } = state.User; const { DataSave, DataSaveDetail, Result, returnValue, memberResult } = state.User;
console.log(state);
return { return {
DataSave, DataSave,
DataSaveDetail, DataSaveDetail,
......
...@@ -4,62 +4,62 @@ import { Input, Button, Table, Space, Pagination, Tooltip, Checkbox } from 'antd ...@@ -4,62 +4,62 @@ import { Input, Button, Table, Space, Pagination, Tooltip, Checkbox } from 'antd
import { Link, useIntl, connect, Dispatch, history } from 'umi'; import { Link, useIntl, connect, Dispatch, history } from 'umi';
import ShowOptions from '../../../components/ShowOptions/index'; import ShowOptions from '../../../components/ShowOptions/index';
import TitleBack from '../../../components/TitleBack/TitleBack'; import TitleBack from '../../../components/TitleBack/TitleBack';
const Detail = (props: any) => { const Detail = (props: any) => {
const { dispatch, Data, CurDataFollow, location, SaveChooseData } = props; const { dispatch, Data, CurDataFollow, location, SaveChooseData } = props;
const TosSecurityGuarderGet = (values: any) => { dispatch({ type: 'ServiceProvider/TosSecurityGuarderGet', playload: values }) }; const TosSecurityGuarderGet = (values: any) => {
dispatch({ type: 'ServiceProvider/TosSecurityGuarderGet', playload: values });
};
const GuarderById = (values: any) => { dispatch({ type: 'ServiceProvider/GuarderById', playload: values }) }; const GuarderById = (values: any) => {
dispatch({ type: 'ServiceProvider/GuarderById', playload: values });
};
useEffect(() => { useEffect(() => {
TosSecurityGuarderGet({ companyName: SaveChooseData.providerName }) TosSecurityGuarderGet({ companyName: SaveChooseData.providerName });
}, []); }, []);
const [showList, setShowList] = useState([]) const [showList, setShowList] = useState([]);
useEffect(() => { useEffect(() => {
console.log(CurDataFollow) console.log(CurDataFollow);
}, [CurDataFollow]); }, [CurDataFollow]);
const goToGuard = (values: any, e: any) => { const goToGuard = (values: any, e: any) => {
GuarderById(values) GuarderById(values);
history.push(location.pathname + '/Guard?saferName=' + values.saferName) history.push(location.pathname + '/Guard?saferName=' + values.saferName);
} };
const pagination = { defaultCurrent: 1, total: CurDataFollow != null ? CurDataFollow.length : CurDataFollow } const pagination = {
defaultCurrent: 1,
total: CurDataFollow != null ? CurDataFollow.length : CurDataFollow,
};
const printContent = (comment: any) => { const printContent = (comment: any) => {
console.log(comment) console.log(comment);
} };
const columns = [ const columns = [
{ title: "User Name", dataIndex: 'saferName', }, { title: 'User Name', dataIndex: 'saferName' },
{ title: "Service Community", dataIndex: 'projectName', }, { title: 'Service Community', dataIndex: 'projectName' },
{ title: "Job Title", dataIndex: 'cdkCode', }, { title: 'Job Title', dataIndex: 'cdkCode' },
{ title: "User Status", dataIndex: 'cdkStatus', }, { title: 'User Status', dataIndex: 'cdkStatus' },
{ {
title: "actions", title: 'actions',
render: (text: any, record: any) => ( render: (text: any, record: any) => (
<Space size="middle"> <a onClick={goToGuard.bind(this, record)}>Detail</a></Space> <Space size="middle">
{' '}
<a onClick={goToGuard.bind(this, record)}>Detail</a>
</Space>
), ),
}, },
]; ];
return ( return (
<div className={styles.base}> <div className={styles.base}>
<TitleBack title="Service Provider Details" /> <TitleBack title="Service Provider Details" />
<div className={styles.bigbox}> <div className={styles.bigbox}>
<div className={styles.box0}> <div className={styles.box0}>
<div className={styles.box0item1}></div> <div className={styles.box0item1}></div>
...@@ -82,7 +82,9 @@ const Detail = (props: any) => { ...@@ -82,7 +82,9 @@ const Detail = (props: any) => {
<div className={styles.box4}> <div className={styles.box4}>
<div className={styles.box4item1}>Contact Details</div> <div className={styles.box4item1}>Contact Details</div>
<div className={styles.box4item2}>{SaveChooseData.contactPhone} {SaveChooseData.contactEmail}</div> <div className={styles.box4item2}>
{SaveChooseData.contactPhone} {SaveChooseData.contactEmail}
</div>
</div> </div>
<div className={styles.box5}> <div className={styles.box5}>
...@@ -93,19 +95,27 @@ const Detail = (props: any) => { ...@@ -93,19 +95,27 @@ const Detail = (props: any) => {
<div className={styles.box6}> <div className={styles.box6}>
<div className={styles.box1item1}>Service Community</div> <div className={styles.box1item1}>Service Community</div>
</div> </div>
{ {SaveChooseData.serviceCommunityList != null ? (
SaveChooseData.serviceCommunityList != null <ShowOptions
? list={SaveChooseData.serviceCommunityList}
<ShowOptions list={SaveChooseData.serviceCommunityList} defaultValue={"Put It Away"} onSubmit={printContent} /> defaultValue={'Put It Away'}
: <></> onSubmit={printContent}
} />
) : (
<></>
)}
<div className={styles.box7}> <div className={styles.box7}>
<div className={styles.box1item1}>Security Guard Account</div> <div className={styles.box1item1}>Security Guard Account</div>
</div> </div>
</div> </div>
<Table rowKey={"id"} style={{ marginTop: 16 }} dataSource={CurDataFollow} columns={columns} pagination={pagination} /> <Table
rowKey={'id'}
style={{ marginTop: 16 }}
dataSource={CurDataFollow}
columns={columns}
pagination={pagination}
/>
</div> </div>
); );
}; };
...@@ -115,7 +125,7 @@ function mapStateToProps(state: any) { ...@@ -115,7 +125,7 @@ function mapStateToProps(state: any) {
return { return {
Data, Data,
CurDataFollow, CurDataFollow,
SaveChooseData SaveChooseData,
}; };
} }
export default connect(mapStateToProps)(Detail); export default connect(mapStateToProps)(Detail);
...@@ -130,6 +130,8 @@ export const requestList = [ ...@@ -130,6 +130,8 @@ export const requestList = [
}, },
], ],
['/tos/tosServiceProvider/get', '46 获取服务商', {}], ['/tos/tosServiceProvider/get', '46 获取服务商', {}],
['/tos/image/priview', '47 获取附件地址', {}],
['/tos/tosCommunity/get/list', '48 修改获取小区列表', {}],
]; ];
const params = [ const params = [
......
// 合同提示
export const tipList = [ export const tipList = [
// 合同提示
['Please Input Contract Numbe!'], ['Please Input Contract Numbe!'],
['Please Input Contract Party A!'], ['Please Input Contract Party A!'],
['Please Input Contract Party B!'], ['Please Input Contract Party B!'],
...@@ -8,4 +8,13 @@ export const tipList = [ ...@@ -8,4 +8,13 @@ export const tipList = [
['Please Choice Contract Time!'], ['Please Choice Contract Time!'],
['Please upload Contract Annex!'], ['Please upload Contract Annex!'],
// ['Please Input Contract Remarks!'], // ['Please Input Contract Remarks!'],
] ];
\ No newline at end of file
// 小区提示
export const village = [
[{ required: true, message: ' ' }],
[{ required: true, message: '请选择工作时间' }],
[{ required: true, message: '请输入小区管理员' }],
[{ required: true, message: '请输入小区服务电话和服务邮箱' }],
[{ required: true, message: '请完整输入小区邮编地址和名称' }],
];
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