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