Commit 5b1d2f00 authored by cellee's avatar cellee

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

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 60981b65
...@@ -63,7 +63,7 @@ export default defineConfig({ ...@@ -63,7 +63,7 @@ export default defineConfig({
routes: [ routes: [
{ {
path: '/500', path: '/500',
component:'./500' component: './500',
}, },
{ {
path: '/', path: '/',
...@@ -78,7 +78,7 @@ export default defineConfig({ ...@@ -78,7 +78,7 @@ export default defineConfig({
{ {
path: '/UserManagement', path: '/UserManagement',
name: 'usemanagement', name: 'usemanagement',
icon:'ProfileOutlined', icon: 'ProfileOutlined',
routes: [ routes: [
{ {
path: './LIFEUserManagement', path: './LIFEUserManagement',
...@@ -86,29 +86,61 @@ export default defineConfig({ ...@@ -86,29 +86,61 @@ export default defineConfig({
routes: [ routes: [
{ path: './', component: './UserManagement/LIFEUserManagement/Users' }, { path: './', component: './UserManagement/LIFEUserManagement/Users' },
{ path: './Add', component: './UserManagement/LIFEUserManagement/UsersAdd' }, { path: './Add', component: './UserManagement/LIFEUserManagement/UsersAdd' },
{ path: './Detail', component: './UserManagement/LIFEUserManagement/UsersDetail' }, {
{ path: './MemberDetail', component: './UserManagement/LIFEUserManagement/UserMemberDetail' }, path: './Detail',
{ path: './Edit', component: './UserManagement/LIFEUserManagement/UsersDetail' }, component: './UserManagement/LIFEUserManagement/UsersDetail',
{ path: './Result', component: './UserManagement/LIFEUserManagement/ResultPage' }, },
{ path: './ResultFailed', component: './UserManagement/LIFEUserManagement/ResultPageFailed' }, {
] path: './MemberDetail',
component: './UserManagement/LIFEUserManagement/UserMemberDetail',
},
{
path: './Edit',
component: './UserManagement/LIFEUserManagement/UsersDetail',
},
{
path: './Result',
component: './UserManagement/LIFEUserManagement/ResultPage',
},
{
path: './ResultFailed',
component: './UserManagement/LIFEUserManagement/ResultPageFailed',
},
],
}, },
{ {
path: './ServiceProviderManagement', path: './ServiceProviderManagement',
name: 'serviceproviders', name: 'serviceproviders',
routes: [ routes: [
{ path: './', component: './UserManagement/ServiceProviderManagement/ServiceProviderManagement' }, {
path: './',
component:
'./UserManagement/ServiceProviderManagement/ServiceProviderManagement',
},
{ {
path: './Detail', path: './Detail',
routes: [ routes: [
{ path: './', component: './UserManagement/ServiceProviderManagement/Detail'}, {
{ path: './Guard', component: './UserManagement/ServiceProviderManagement/Guard'} path: './',
]}, component: './UserManagement/ServiceProviderManagement/Detail',
{ path: './Edit', component: './UserManagement/ServiceProviderManagement/Edit' }, },
{path:'./Services',component:'./UserManagement/ServiceProviderManagement/Services'}, {
] path: './Guard',
component: './UserManagement/ServiceProviderManagement/Guard',
},
],
},
{
path: './Edit',
component: './UserManagement/ServiceProviderManagement/Edit',
},
{
path: './Services',
component: './UserManagement/ServiceProviderManagement/Services',
},
],
}, },
] ],
}, },
{ {
path: '/PropertyManagement', path: '/PropertyManagement',
...@@ -117,15 +149,15 @@ export default defineConfig({ ...@@ -117,15 +149,15 @@ export default defineConfig({
routes: [ routes: [
{ path: './', component: './PropertyManagement/ChargeManager' }, { path: './', component: './PropertyManagement/ChargeManager' },
{ path: './AccoutingDetail', component: './PropertyManagement/AccoutingContent' }, { path: './AccoutingDetail', component: './PropertyManagement/AccoutingContent' },
{ path: './AccoutingEdit',component:'./PropertyManagement/AccoutingContent'}, { path: './AccoutingEdit', component: './PropertyManagement/AccoutingContent' },
] ],
}, },
{ path: '/PropertyManagementDetail', component: './PropertyManagement/ChargeDetail' }, { path: '/PropertyManagementDetail', component: './PropertyManagement/ChargeDetail' },
{ {
path: '/CommercialService', path: '/CommercialService',
name: 'commercialservice', name: 'commercialservice',
icon:'ConsoleSqlOutlined', icon: 'ConsoleSqlOutlined',
routes: [ routes: [
{ {
path: './CommunityMaintenance', path: './CommunityMaintenance',
...@@ -133,8 +165,8 @@ export default defineConfig({ ...@@ -133,8 +165,8 @@ export default defineConfig({
routes: [ routes: [
{ path: './', component: './CommercialService/PropertyServices' }, { path: './', component: './CommercialService/PropertyServices' },
{ path: './Detail', component: './CommercialService/Detail' }, { path: './Detail', component: './CommercialService/Detail' },
{path: './Edit',component:'./CommercialService/Detail'}, { path: './Edit', component: './CommercialService/Detail' },
] ],
}, },
{ {
path: './OwnerComplaints', path: './OwnerComplaints',
...@@ -144,30 +176,29 @@ export default defineConfig({ ...@@ -144,30 +176,29 @@ export default defineConfig({
{ {
path: './ProblemFeedback', path: './ProblemFeedback',
name: 'problemfeedback', name: 'problemfeedback',
component:'./CommercialService/PropertyServices' component: './CommercialService/PropertyServices',
}, },
{ {
path: './RenovationApplication', path: './RenovationApplication',
name: 'renovationapplication', name: 'renovationapplication',
routes: [ routes: [
{ path: './', component: './CommercialService/Renovation' }, { path: './', component: './CommercialService/Renovation' },
{path:'./Detail', component:'./CommercialService/RenovationDetail' }, { path: './Detail', component: './CommercialService/RenovationDetail' },
] ],
}, },
{ {
path: './AccessCardApplication', path: './AccessCardApplication',
name: 'accessCardapplication', name: 'accessCardapplication',
routes:[ routes: [
{ path: './', component: './CommercialService/Card' }, { path: './', component: './CommercialService/Card' },
{ path: './Detail', component: './CommercialService/CardDetail' }, { path: './Detail', component: './CommercialService/CardDetail' },
{path: './Add', component: './CommercialService/CardAdd'}, { path: './Add', component: './CommercialService/CardAdd' },
] ],
}, },
{ {
path: './ReportOnline', path: './ReportOnline',
name: 'reportonline', name: 'reportonline',
component:'./CommercialService/PropertyServices' component: './CommercialService/PropertyServices',
}, },
{ {
path: './ShelfLifeService', path: './ShelfLifeService',
...@@ -175,26 +206,24 @@ export default defineConfig({ ...@@ -175,26 +206,24 @@ export default defineConfig({
routes: [ routes: [
{ path: './', component: './CommercialService/PropertyServices' }, { path: './', component: './CommercialService/PropertyServices' },
{ path: './Detail', component: './CommercialService/Detail' }, { path: './Detail', component: './CommercialService/Detail' },
{path: './Edit',component:'./CommercialService/Detail'}, { path: './Edit', component: './CommercialService/Detail' },
] ],
}, },
{path: './OwnerComplaints/Detail',component:'./CommercialService/Detail'}, { path: './OwnerComplaints/Detail', component: './CommercialService/Detail' },
{path: './OwnerComplaints/Edit',component:'./CommercialService/Detail'}, { path: './OwnerComplaints/Edit', component: './CommercialService/Detail' },
{path: './ProblemFeedback/Detail',component:'./CommercialService/Detail'}, { path: './ProblemFeedback/Detail', component: './CommercialService/Detail' },
{path: './ProblemFeedback/Edit',component:'./CommercialService/Detail'}, { path: './ProblemFeedback/Edit', component: './CommercialService/Detail' },
{path: './RenovationApplication/Detail',component:'./CommercialService/Detail'}, { path: './RenovationApplication/Detail', component: './CommercialService/Detail' },
{path: './RenovationApplication/Edit',component:'./CommercialService/Detail'}, { path: './RenovationApplication/Edit', component: './CommercialService/Detail' },
{path: './ReportOnline/Detail',component:'./CommercialService/Detail'}, { path: './ReportOnline/Detail', component: './CommercialService/Detail' },
{path: './ReportOnline/Edit',component:'./CommercialService/Detail'}, { path: './ReportOnline/Edit', component: './CommercialService/Detail' },
] ],
}, },
{ {
path: '/OrderManagement', path: '/OrderManagement',
name: 'ordermanagement', name: 'ordermanagement',
icon: 'ContainerOutlined', icon: 'ContainerOutlined',
routes: [ routes: [{ path: './', component: './OrderManagement/Order' }],
{ path: './', component: './OrderManagement/Order' },
]
}, },
{ {
path: '/ContractManagement', path: '/ContractManagement',
...@@ -203,60 +232,85 @@ export default defineConfig({ ...@@ -203,60 +232,85 @@ export default defineConfig({
routes: [ routes: [
{ path: './', component: './ContractManagement/Contract' }, { path: './', component: './ContractManagement/Contract' },
{ path: './Detail', component: './ContractManagement/ContractContent' }, { path: './Detail', component: './ContractManagement/ContractContent' },
{ path: './Edit',component:'./ContractManagement/ContractContent'}, { path: './Edit', component: './ContractManagement/ContractContent' },
{ path: './Add',component:'./ContractManagement/ContractContent'}, { path: './Add', component: './ContractManagement/ContractContent' },
] ],
}, },
{ {
path: '/CommunityManagement', path: '/CommunityManagement',
name: 'communitymanagement', name: 'communitymanagement',
icon:'HddOutlined', icon: 'HddOutlined',
routes: [ routes: [
{ {
path: './CellList', path: './CellList',
name: 'celllist', name: 'celllist',
routes:[ routes: [
{ path: './', component: './CommunityManagement/CellList/CellList' }, { path: './', component: './CommunityManagement/CellList/CellList' },
{ path: './Add', component: './CommunityManagement/CellList/Adds' }, { path: './Add', component: './CommunityManagement/CellList/Adds' },
{path:'./Detail',component:'./CommunityManagement/CellList/Details'}, { path: './Detail', component: './CommunityManagement/CellList/Details' },
] ],
}, },
{ {
path: './CommunityAnnouncement', path: './CommunityAnnouncement',
name: 'communityannouncement', name: 'communityannouncement',
routes: [ routes: [
{ path: "./", component: './CommunityManagement/CommunityAnnouncement/CommunityAnnouncement' }, {
{path:"./Add",component:'./CommunityManagement/CommunityAnnouncement/Add'}, path: './',
] component:
'./CommunityManagement/CommunityAnnouncement/CommunityAnnouncement',
},
{ path: './Add', component: './CommunityManagement/CommunityAnnouncement/Add' },
],
}, },
{ {
path: './FacilityBookings', path: './FacilityBookings',
name: 'facilitybookings', name: 'facilitybookings',
routes: [ routes: [
{ path: "./", component: './CommunityManagement/FacilityBookings/FacilityBookings' }, {
{ path: "./Booking", component: './CommunityManagement/FacilityBookings/Bookings' }, path: './',
{ path: "./Detail", component: './CommunityManagement/FacilityBookings/BookingDetail' }, component: './CommunityManagement/FacilityBookings/FacilityBookings',
{ path: "./Adding", component: './CommunityManagement/FacilityBookings/Facility' }, },
{ path: "./FacilityEdit", component: './CommunityManagement/FacilityBookings/Facility' }, {
{ path: "./FacilityDetail", component: './CommunityManagement/FacilityBookings/Facility' }, path: './Booking',
{ path: "./FacilityApply",component:'./CommunityManagement/FacilityBookings/Bookings'} component: './CommunityManagement/FacilityBookings/Bookings',
] },
{
path: './Detail',
component: './CommunityManagement/FacilityBookings/BookingDetail',
},
{
path: './Adding',
component: './CommunityManagement/FacilityBookings/Facility',
},
{
path: './FacilityEdit',
component: './CommunityManagement/FacilityBookings/Facility',
},
{
path: './FacilityDetail',
component: './CommunityManagement/FacilityBookings/Facility',
},
{
path: './FacilityApply',
component: './CommunityManagement/FacilityBookings/Bookings',
},
],
}, },
{ {
path: './VisitorRecord', path: './VisitorRecord',
name: 'visitorrecord', name: 'visitorrecord',
routes: [ routes: [
{path:"./",component:'./CommunityManagement/VisitorRecord/VisitorRecord'} { path: './', component: './CommunityManagement/VisitorRecord/VisitorRecord' },
] ],
}, },
] ],
}, },
{ {
path: '/AccountManagement', path: '/AccountManagement',
name: 'accountmanagement', name: 'accountmanagement',
icon: 'UserSwitchOutlined', icon: 'UserSwitchOutlined',
routes: [ routes: [
/* { /* {
path: './AccountManagement', path: './AccountManagement',
name: 'accountmanagement1', name: 'accountmanagement1',
routes: [ routes: [
...@@ -268,23 +322,23 @@ export default defineConfig({ ...@@ -268,23 +322,23 @@ export default defineConfig({
path: './account', path: './account',
name: 'accountmanagement1', name: 'accountmanagement1',
routes: [ routes: [
{path:'./',component: './AccountManagement/account/Account'}, { path: './', component: './AccountManagement/account/Account' },
{path: './edit',component:'./AccountManagement/account/AccountEdit'}, { path: './edit', component: './AccountManagement/account/AccountEdit' },
{path: './reset',component:'./AccountManagement/account/AccountReset'}, { path: './reset', component: './AccountManagement/account/AccountReset' },
] ],
}, },
{ {
path: './CompanyInformation', path: './CompanyInformation',
name: 'companyinformation', name: 'companyinformation',
component:'./AccountManagement/CompanyInformation/CompanyInformation' component: './AccountManagement/CompanyInformation/CompanyInformation',
}, },
{ {
path: './LanguageSettings', path: './LanguageSettings',
name: 'languagesettings', name: 'languagesettings',
component:'./AccountManagement/LanguageSettings/LanguageSettings' component: './AccountManagement/LanguageSettings/LanguageSettings',
}, },
] ],
}, },
{ {
component: './404', component: './404',
......
...@@ -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; {
yield put({ type: 'returnPage', Data }); let Data = resp.data;
} break; yield put({ type: 'returnPage', Data });
case 29: { }
let Result = resp; break;
yield put({ type: 'returnResult', Result }); case 29:
message.success(`新增成功!`) {
} break; 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 }) { *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 });
}, },
}, },
}; };
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { connect } from 'dva'; import { connect } from 'dva';
import { LeftOutlined, EditOutlined, UploadOutlined } from '@ant-design/icons'; import { LeftOutlined, EditOutlined, UploadOutlined, LinkOutlined } from '@ant-design/icons';
import { Form, Input, Button, TimePicker, Checkbox, Upload, message } from 'antd'; import { Form, Input, Button, TimePicker, Checkbox, Upload, message, Spin } from 'antd';
// 样式 // 样式
import './celllist.less'; import './celllist.less';
import { RA } from '@/utils/method'; import { RA } from '@/utils/method';
import { village } from '@/utils/tip';
import moment from 'moment'; import moment from 'moment';
// 接口申明 // 接口申明
interface objc {} interface objc {}
const Adds = (props: any) => { const Adds = (props: any) => {
const { Data, dispatch } = props; const { Data, dispatch, loading } = props;
useEffect(() => { const [form] = Form.useForm();
// 如果是添加传来没有值的时候 就清空 否则 赋值给表单
if (Data) {
// 返回列表
console.log('编辑');
console.log(Data);
} else {
console.log('新建');
}
}, [1]);
//物业费选择 //物业费选择
const plainOptions = [ const plainOptions = [
...@@ -42,45 +35,126 @@ const Adds = (props: any) => { ...@@ -42,45 +35,126 @@ const Adds = (props: any) => {
// 保质期服务列表 // 保质期服务列表
const [periodUpload, setPeriod] = useState([] as any); const [periodUpload, setPeriod] = useState([] as any);
// 监听用户填写小区名 以及后续禁止输入 提示信息
const [codename, setCodeName] = useState('');
const [codeStrat, setcodeStrat] = useState(false);
const [tipMain, setTipMain] = useState('');
// 赋值
useEffect(() => {
// 如果是添加传来没有值的时候 就清空 否则 赋值给表单
if (Data) {
// 返回列表
form.setFieldsValue({
// 必填的
des: {
residentialZipCode: Data.residentialZipCode,
residentialAddress: Data.residentialAddress,
residentialName: Data.residentialName,
},
workingHours: [
moment(Data.residentialStartWorking, 'HH:mm'),
moment(Data.residentialEndWorking, 'HH:mm'),
],
info: {
tel: Data.residentialPhone,
email: Data.residentialEmail,
},
residentialManagerUserName: Data.residentialManagerUserName,
// 非必填的
help: {
residentialHotlineName: Data.residentialHotlineName ? Data.residentialHotlineName : '',
residentialHotline: Data.residentialHotline ? Data.residentialHotline : '',
time: Data.residentialHotlineServieStartTime
? [
moment(Data.residentialHotlineServieStartTime, 'HH:mm'),
moment(Data.residentialHotlineServieEndTime, 'HH:mm'),
]
: '',
},
});
// 上传
setLouba(Data.balouscheduleUrl ? [backUpload(Data.balouscheduleUrl, Data.id)] : []);
setGuide(Data.serviceGuideUrl ? [backUpload(Data.serviceGuideUrl, Data.id)] : []);
setPeriod(Data.lifeServiceUrl ? [backUpload(Data.lifeServiceUrl, Data.id)] : []);
// 小区名 -- 上传需要
setCodeName(Data.residentialName);
setcodeStrat(true);
setTipMain('已有绑定内容,不可做修改!');
} else {
console.log('新建');
}
}, [1]);
// 返回上传格式 和 地址
function backUpload(str: string, index: number) {
let a = {
uid: str + index,
name: str,
url: 'http://',
};
return a;
}
// 上传设置 // 上传设置
const uploads = { const uploads = {
name: 'file', name: 'file',
accept: '.doc,.docx,.jpg,.png,.pdf', accept: '.doc,.docx,.jpg,.png,.pdf',
action: '/tos/image/upload', action: '/tos/image/upload',
data: { imageType: 'tosContract' }, data: { imageType: 'tosCreateCommunity', extends: codename },
}; };
// 楼巴上传 // 楼巴上传
const upload1 = { const upload1 = {
onChange(info: any) { onChange(info: any) {
let po = new Array(); if (codename !== '') {
po.push(info.fileList[info.fileList.length - 1]); let po = new Array();
// 给楼巴上传列表值 po.push(info.fileList[info.fileList.length - 1]);
setLouba(po); // 给楼巴上传列表值
// 结果 console.log(po);
uploadMsg(info); setLouba(po);
setcodeStrat(true);
setTipMain('已有绑定内容,不可做修改!');
// 结果
uploadMsg(info);
} else {
message.warning('请先填写小区名');
}
}, },
}; };
// 指南上传 // 指南上传
const upload2 = { const upload2 = {
onChange(info: any) { onChange(info: any) {
let po = new Array(); if (codename !== '') {
po.push(info.fileList[info.fileList.length - 1]); let po = new Array();
// 给楼巴上传列表值 po.push(info.fileList[info.fileList.length - 1]);
setGuide(po); // 给楼巴上传列表值
// 结果 setGuide(po);
uploadMsg(info); setcodeStrat(true);
setTipMain('已有绑定内容,不可做修改!');
// 结果
uploadMsg(info);
} else {
message.warning('请先填写小区名');
}
}, },
}; };
// 保质期上传 // 保质期上传
const upload3 = { const upload3 = {
onChange(info: any) { onChange(info: any) {
let po = new Array(); if (codename !== '') {
po.push(info.fileList[info.fileList.length - 1]); let po = new Array();
// 给楼巴上传列表值 po.push(info.fileList[info.fileList.length - 1]);
setPeriod(po); // 给楼巴上传列表值 以及禁止修改小区名
// 结果 setPeriod(po);
uploadMsg(info); setcodeStrat(true);
setTipMain('已有绑定内容,不可做修改!');
// 结果
uploadMsg(info);
} else {
message.warning('请先填写小区名');
}
}, },
}; };
...@@ -102,7 +176,7 @@ const Adds = (props: any) => { ...@@ -102,7 +176,7 @@ const Adds = (props: any) => {
// undefind 验证 // undefind 验证
function undeFi(e: any) { function undeFi(e: any) {
if (typeof e == 'undefined') { if (typeof e == 'undefined') {
return ''; return null;
} else { } else {
return e; return e;
} }
...@@ -110,11 +184,13 @@ const Adds = (props: any) => { ...@@ -110,11 +184,13 @@ const Adds = (props: any) => {
// 表单提交 // 表单提交
const onFinish = (values: any) => { const onFinish = (values: any) => {
console.log(values.help);
let obj: any = new Object(); let obj: any = new Object();
obj.propertyFee = PropertyFee; obj.propertyFee = PropertyFee;
// 小区信息; // 小区信息;
let { residentialEmail, residentialAddress, residentialName } = values.des; let { residentialZipCode, residentialAddress, residentialName } = values.des;
obj.residentialZipCode = residentialEmail; obj.residentialZipCode = residentialZipCode;
obj.residentialAddress = residentialAddress; obj.residentialAddress = residentialAddress;
obj.residentialName = residentialName; obj.residentialName = residentialName;
...@@ -136,8 +212,14 @@ const Adds = (props: any) => { ...@@ -136,8 +212,14 @@ const Adds = (props: any) => {
if (values.help) { if (values.help) {
obj.residentialHotlineName = undeFi(values.help.residentialHotlineName); obj.residentialHotlineName = undeFi(values.help.residentialHotlineName);
obj.residentialHotline = undeFi(values.help.residentialHotline); obj.residentialHotline = undeFi(values.help.residentialHotline);
obj.residentialHotlineServieStartTime = undeFi(values.help.time[0]).format('HH:mm'); // 编辑的时候 为空 判断
obj.residentialHotlineServieEndTime = undeFi(values.help.time[1]).format('HH:mm'); if (values.help.time !== '') {
obj.residentialHotlineServieStartTime = undeFi(values.help.time[0]).format('HH:mm');
obj.residentialHotlineServieEndTime = undeFi(values.help.time[1]).format('HH:mm');
} else {
obj.residentialHotlineServieStartTime = '';
obj.residentialHotlineServieEndTime = '';
}
} else { } else {
obj.residentialHotlineName = ''; obj.residentialHotlineName = '';
obj.residentialHotline = ''; obj.residentialHotline = '';
...@@ -146,8 +228,10 @@ const Adds = (props: any) => { ...@@ -146,8 +228,10 @@ const Adds = (props: any) => {
} }
console.log('Success:', obj); console.log('Success:', obj);
if (Data) {
obj.id = Data.id;
}
// 上传 // 上传
RA(29, obj, 'CellList', dispatch); RA(29, obj, 'CellList', dispatch);
}; };
...@@ -157,159 +241,187 @@ const Adds = (props: any) => { ...@@ -157,159 +241,187 @@ const Adds = (props: any) => {
history.back(); history.back();
}; };
// 上传 // 小区名输入监听ant
function insdInp(value: string, prevValue, prevValues) {
setCodeName(value);
return value;
}
return ( return (
<div className="form"> <>
<h3> <Spin spinning={loading} tip="信息提交中..." size="large">
<EditOutlined /> <div className="form">
&nbsp; 添加小区 <h3>
<div className="back"> <EditOutlined />
<Button onClick={goToReturn}> &nbsp; {Data ? '编辑' : '新增'}小区
<LeftOutlined /> <div className="back">
Back <Button onClick={goToReturn}>
</Button> <LeftOutlined />
</div> Back
</h3> </Button>
<Form </div>
name="basic" </h3>
onFinish={onFinish} <Form
wrapperCol={{ span: 18 }} name="basic"
layout="horizontal" form={form}
labelAlign="left" onFinish={onFinish}
> wrapperCol={{ span: 18 }}
<Form.Item label="Community Name" name="des"> layout="horizontal"
<Input.Group compact> labelAlign="left"
<Form.Item >
name={['des', 'residentialEmail']} <Form.Item label="Community Name" name="des" rules={village[4] as any}>
noStyle <Input.Group compact>
// rules={[{ required: true, message: 'Province is required' }]} <Form.Item name={['des', 'residentialZipCode']} noStyle rules={village[0] as any}>
> <Input
<Input style={{ marginRight: '10px', width: 120 }}
style={{ marginRight: '10px', width: 120 }} placeholder="6 Postcode"
placeholder="6 Postcode" maxLength={6}
maxLength={6} />
/> </Form.Item>
<Form.Item name={['des', 'residentialAddress']} noStyle rules={village[0] as any}>
<Input style={{ width: '360px' }} placeholder="Please enter community adds" />
</Form.Item>
<div className="li">
<Form.Item
name={['des', 'residentialName']}
normalize={insdInp}
noStyle
rules={village[0] as any}
>
<Input
style={{ marginRight: '10px', width: '260px' }}
placeholder="Please enter community name"
disabled={codeStrat}
/>
</Form.Item>
{/* 不可修改提示 */}
<span className="redFs">{tipMain}</span>
</div>
</Input.Group>
</Form.Item>
<Form.Item label="Working Hours" name="workingHours" rules={village[1] as any}>
<RangePicker format="HH:mm" />
</Form.Item>
<Form.Item label="Community Telephone" name="info" rules={village[3] as any}>
<Input.Group compact>
<Form.Item name={['info', 'tel']} noStyle rules={village[0] as any}>
<Input
style={{ marginRight: '10px', width: '160px' }}
placeholder="Please enter phone"
/>
</Form.Item>
<Button type="text"></Button>
<Form.Item name={['info', 'email']} noStyle rules={village[0] as any}>
<Input
style={{ marginLeft: '10px', width: '180px' }}
placeholder="Please enter Email"
/>
</Form.Item>
</Input.Group>
</Form.Item> </Form.Item>
<Form.Item <Form.Item
name={['des', 'residentialAddress']} label="Administrators"
noStyle name="residentialManagerUserName"
// rules={[{ required: true, message: 'Street is required' }]} rules={village[2] as any}
> >
<Input style={{ width: '360px' }} placeholder="Please enter community adds" /> <Input style={{ width: '160px' }} placeholder="Contacts" />
{/* <Button type="text">
<PlusCircleOutlined style={{ fontSize: '18px', color: '#08c' }} />
</Button> */}
</Form.Item> </Form.Item>
<div className="li"> <Form.Item label="Property Fee" name="propertyFee" style={{ marginBottom: '0' }}>
<Form.Item <Checkbox.Group options={plainOptions} defaultValue={['1']} onChange={onChange} />
name={['des', 'residentialName']}
noStyle
// rules={[{ required: true, message: 'Street is required' }]}
>
<Input
style={{ marginRight: '10px', width: '260px' }}
placeholder="Please enter community name"
/>
</Form.Item>
</div>
</Input.Group>
</Form.Item>
<Form.Item label="Working Hours" name="workingHours"> <div className="tip">
<RangePicker format="HH:mm" /> <span>*</span>线上缴费会有服务费
</Form.Item> </div>
</Form.Item>
<Form.Item label="Community Telephone" name="info"> <hr />
<Input.Group compact> {/* 上传部分 */}
<Form.Item <Form.Item
name={['info', 'tel']} label="Louba Timetable"
noStyle name="balouscheduleFile"
// rules={[{ required: true, message: 'Province is required' }]} style={{ marginBottom: '0' }}
> >
<Input <Upload {...uploads} {...upload1} fileList={loubaUpload} showUploadList={false}>
style={{ marginRight: '10px', width: '160px' }} <Button icon={<UploadOutlined />}>Click to Upload</Button>
placeholder="Please enter phone" </Upload>
/> <div className="tip">
<p className={loubaUpload.length > 0 ? 'show' : ''}>
<LinkOutlined color="#409EFF" />
{loubaUpload.length > 0 ? loubaUpload[0].name : ''}
</p>
<span>支持文件:.pdf,.jpg, .png</span>
</div>
</Form.Item> </Form.Item>
<Button type="text"></Button>
<Form.Item <Form.Item label="Property Guide" name="serviceGuideFile" style={{ marginBottom: '0' }}>
name={['info', 'email']} <Upload {...uploads} {...upload2} fileList={guideUpload} showUploadList={false}>
noStyle <Button icon={<UploadOutlined />}>Click to Upload</Button>
// rules={[{ required: true, message: 'Street is required' }]} </Upload>
> <div className="tip">
<Input <p className={guideUpload.length > 0 ? 'show' : ''}>
style={{ marginLeft: '10px', width: '180px' }} <LinkOutlined color="#409EFF" />
placeholder="Please enter Email" {guideUpload.length > 0 ? guideUpload[0].name : ''}
/> </p>
<span>支持文件:.pdf,.jpg, .png</span>
</div>
</Form.Item> </Form.Item>
</Input.Group>
</Form.Item>
<Form.Item label="Administrators" name="residentialManagerUserName"> <Form.Item
<Input style={{ width: '160px' }} placeholder="Contacts" /> label="Period of Service"
{/* <Button type="text"> name="lifeServiceFile"
<PlusCircleOutlined style={{ fontSize: '18px', color: '#08c' }} /> style={{ marginBottom: '0' }}
</Button> */} >
</Form.Item> <Upload {...uploads} {...upload3} fileList={periodUpload} showUploadList={false}>
<Button icon={<UploadOutlined />}>Click to Upload</Button>
<Form.Item label="Property Fee" name="propertyFee" style={{ marginBottom: '0' }}> </Upload>
<Checkbox.Group options={plainOptions} defaultValue={['1']} onChange={onChange} /> <div className="tip">
<p className={periodUpload.length > 0 ? 'show' : ''}>
<div className="tip"> <LinkOutlined color="#409EFF" />
<span>*</span>线上缴费会有服务费 {periodUpload.length > 0 ? periodUpload[0].name : ''}
</div> </p>
</Form.Item> <span>支持文件:.pdf,.jpg, .png</span>
</div>
<hr />
{/* 小区信息部分 */}
<Form.Item label="Louba Timetable" name="balouscheduleFile" style={{ marginBottom: '0' }}>
<Upload {...uploads} {...upload1} fileList={loubaUpload}>
<Button icon={<UploadOutlined />}>Click to Upload</Button>
</Upload>
<div className="tip">支持文件:.pdf,.jpg, .png</div>
</Form.Item>
<Form.Item label="Property Guide" name="serviceGuideFile" style={{ marginBottom: '0' }}>
<Upload {...uploads} {...upload2} fileList={guideUpload}>
<Button icon={<UploadOutlined />}>Click to Upload</Button>
</Upload>
<div className="tip">支持文件:.pdf,.jpg, .png</div>
</Form.Item>
<Form.Item label="Period of Service" name="lifeServiceFile" style={{ marginBottom: '0' }}>
<Upload {...uploads} {...upload3} fileList={periodUpload}>
<Button icon={<UploadOutlined />}>Click to Upload</Button>
</Upload>
<div className="tip">支持文件:.pdf,.jpg, .png</div>
</Form.Item>
<hr />
{/* 上传部分 */}
<Form.Item label="Help" name="help">
<Input.Group compact>
<Form.Item name={['help', 'residentialHotlineName']} noStyle>
<Input style={{ marginRight: '10px', width: '160px' }} placeholder="热线电话名称" />
</Form.Item> </Form.Item>
<Form.Item name={['help', 'residentialHotline']} noStyle> <hr />
<Input style={{ marginRight: '10px', width: '180px' }} placeholder="热线电话" /> {/* 帮助中心 */}
<Form.Item label="Help" name="help">
<Input.Group compact>
<Form.Item name={['help', 'residentialHotlineName']} noStyle>
<Input
style={{ marginRight: '10px', width: '160px' }}
placeholder="热线电话名称"
/>
</Form.Item>
<Form.Item name={['help', 'residentialHotline']} noStyle>
<Input style={{ marginRight: '10px', width: '180px' }} placeholder="热线电话" />
</Form.Item>
<Form.Item name={['help', 'time']} noStyle>
<RangePicker format="HH:mm" />
</Form.Item>
</Input.Group>
</Form.Item> </Form.Item>
<Form.Item name={['help', 'time']} noStyle> <Form.Item label=" " colon={false}>
<RangePicker format="HH:mm" /> <Button type="primary" htmlType="submit" loading={loading}>
Conserve
</Button>
</Form.Item> </Form.Item>
</Input.Group> </Form>
</Form.Item> </div>
</Spin>
<Form.Item label=" " colon={false}> </>
<Button type="primary" htmlType="submit">
Conserve
</Button>
</Form.Item>
</Form>
</div>
); );
}; };
......
...@@ -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 };
......
...@@ -4,29 +4,32 @@ import { ...@@ -4,29 +4,32 @@ import {
LeftOutlined, LeftOutlined,
EyeOutlined, EyeOutlined,
PoweroffOutlined, PoweroffOutlined,
FileJpgOutlined, SnippetsOutlined,
FilePdfOutlined, ApiTwoTone,
} from '@ant-design/icons'; } from '@ant-design/icons';
import { Modal, Input, Button, TimePicker, Checkbox, Image, message, Divider, Avatar } from 'antd'; import { Modal, Input, Button, Spin, Checkbox, Image, message, Divider, Avatar } from 'antd';
// 样式 // 样式
import './celllist.less'; import './celllist.less';
import { RA } from '@/utils/method'; import { RA } from '@/utils/method';
import img from '@/assets/logo_icon_color.png';
import imgs from '@/assets/logo_icon_bg.png';
import hfor from '@/assets/h5.png';
import moment from 'moment'; import moment from 'moment';
// 接口申明 // 接口申明
const Adds = (props: any) => { const Detail = (props: any) => {
const { Data, dispatch } = props; const module = 'CellList';
const { detailData, DataSave, dispatch, loading, imgUrl } = props;
useEffect(() => { useEffect(() => {
// 如果是添加传来没有值的时候 就清空 否则 赋值给表单 if (DataSave) {
if (Data) {
// 返回列表 // 返回列表
console.log('编辑'); RA(32, { id: DataSave.id }, module, dispatch);
console.log(Data);
} else { } else {
console.log('新建'); console.log('这应该返回列表');
} }
}, [1]); }, [1]);
...@@ -58,176 +61,240 @@ const Adds = (props: any) => { ...@@ -58,176 +61,240 @@ const Adds = (props: any) => {
// 关闭小区 // 关闭小区
const handleOk = () => { const handleOk = () => {
setModelFee(false); setModelFee(false);
message.success('您已关闭小区!'); message.error('后台接口新增中!');
history.back(); // message.success('您已关闭小区!');
// history.back();
}; };
// 打开附件下载
async function opens(ans: string) {
message.warning('接口处理中');
// let msg = {
// // userToken: '',
// // type: ans.substr(ans.lastIndexOf('.') + 1),
// type: 'tosCommunityFileService',
// fileName: ans,
// extends: detailData.rows.residentialName,
// };
// let s = await RA(47, msg, module, dispatch);
// console.log(s);
}
return ( return (
<div className="form"> <>
<h3> <Spin spinning={loading}>
<EyeOutlined /> {detailData.rows ? (
&nbsp;小区详情 <div className="form">
<div className="back"> <h3>
<Button <EyeOutlined />
type="primary" &nbsp;小区详情
danger <div className="back">
style={{ marginRight: '15px' }} <Button
icon={<PoweroffOutlined />} type="primary"
loading={false} danger
onClick={openModel} style={{ marginRight: '15px' }}
> icon={<PoweroffOutlined />}
关闭小区 loading={false}
</Button> onClick={openModel}
<Button onClick={goToReturn}> >
<LeftOutlined /> 关闭小区
Back </Button>
</Button> <Button onClick={goToReturn}>
</div> <LeftOutlined />
</h3> Back
</Button>
<Divider /> </div>
</h3>
<div className="box">
{/* 激活码 */} <Divider />
<div className="code">
<li>激活码</li> <div className="celBox">
<Avatar {/* 激活码 */}
shape="square" <div className="code">
style={{ color: '#f56a00', backgroundColor: '#fde3cf' }} <li>小区激活码</li>
size={120} <Avatar
icon={<FileJpgOutlined />} shape="square"
/> style={{ color: '#f56a00', backgroundColor: '#fde3cf' }}
</div> size={140}
src={detailData.visitorUrl ? detailData.visitorUrl : imgs}
{/* 详情 */} />
<div className="list-item"> </div>
<div className="item">
<label>小区名字:</label> {/* 详情 */}
<span>XXXXX</span> <div className="list-item">
</div> <div className="inst">
{/* ---------- */} <div className="item">
<div className="item"> <label>小区名称:</label>
<label>详细地址:</label> <span>{detailData.rows.residentialName}</span>
<span>XXXXX</span> </div>
</div> <div className="item">
{/* ---------- */} <label>小区邮编:</label>
<div className="item"> <span>{detailData.rows.residentialZipCode}</span>
<label>工作时间:</label> </div>
<span>XXXXX</span> </div>
</div> {/* ---------- */}
{/* ---------- */} <div className="item">
<div className="inst"> <label>详细地址:</label>
<div className="item"> <span>{detailData.rows.residentialAddress}</span>
<label>小区联系电话:</label> </div>
<span>XXXXX</span> {/* ---------- */}
<div className="item">
<label>工作时间:</label>
<span>
{detailData.rows.residentialStartWorking} -{' '}
{detailData.rows.residentialEndWorking}
</span>
</div>
{/* ---------- */}
<div className="inst">
<div className="item">
<label>小区联系电话:</label>
<span>{detailData.rows.residentialPhone}</span>
</div>
<div className="item">
<label>小区邮箱:</label>
<span>{detailData.rows.residentialEmail}</span>
</div>
</div>
{/* ---------- */}
<div className="item">
<label>小区管理员:</label>
<span>{detailData.rows.residentialManagerUserName}</span>
</div>
{/* ---------- */}
<div className="item" style={{ marginBottom: '0' }}>
<label>物业费:</label>
<Checkbox.Group options={plainOptions} defaultValue={['1']} />
</div>
</div>
</div> </div>
<div className="item">
<label>小区邮箱:</label> <Divider />
<span>XXXXX</span>
<div className="celBox">
<div className="list-item">
<div className="item">
<label>楼巴时刻表:</label>
<Avatar
shape="square"
style={{ color: '#f56a00', backgroundColor: '#F2F6FC' }}
size={64}
src={detailData.rows.balouscheduleUrl ? img : imgs}
/>
{detailData.rows.balouscheduleUrl ? (
<Button type="link" onClick={() => opens(detailData.rows.balouscheduleUrl)}>
预览
</Button>
) : (
''
)}
</div>
{/* ---------- */}
<div className="item">
<label>物业办事指南:</label>
<Avatar
shape="square"
style={{ color: '#f56a00', backgroundColor: '#F2F6FC' }}
size={64}
src={detailData.rows.serviceGuideUrl ? img : imgs}
/>
{detailData.rows.serviceGuideUrl ? (
<Button type="link" onClick={() => opens(detailData.rows.serviceGuideUrl)}>
预览
</Button>
) : (
''
)}
</div>
{/* ---------- */}
<div className="item">
<label>保质期服务:</label>
<Avatar
shape="square"
style={{ color: '#f56a00', backgroundColor: '#F2F6FC' }}
size={64}
src={detailData.rows.lifeServiceUrl ? img : imgs}
/>
{detailData.rows.lifeServiceUrl ? (
<Button type="link" onClick={() => opens(detailData.rows.lifeServiceUrl)}>
预览
</Button>
) : (
''
)}
</div>
</div>
</div> </div>
</div>
{/* ---------- */} <Divider />
<div className="item">
<label>小区管理员:</label> <div className="celBox">
<span>XXXXX</span> <div className="list-item">
</div> <div className="item item_span">
{/* ---------- */} <label>帮助中心:</label>
<div className="item" style={{ marginBottom: '0' }}> <span>{detailData.rows.residentialHotlineName}</span>
<label>物业费:</label> <span>{detailData.rows.residentialHotline}</span>
<Checkbox.Group options={plainOptions} defaultValue={['1']} /> <span>{detailData.rows.residentialHotlineServieStartTime}</span>
</div> <span>{detailData.rows.residentialHotlineServieStartTime ? '-' : ''}</span>
</div> <span>{detailData.rows.residentialHotlineServieEndTime}</span>
</div> </div>
</div>
<Divider /> </div>
<div className="box"> <Divider />
<div className="list-item">
<div className="item"> <div className="celBox">
<label>楼巴时刻表:</label> <div className="list-item">
<Avatar <div className="item">
shape="square" <label>临时到访码下载:</label>
style={{ color: '#f56a00', backgroundColor: '#fde3cf' }} <Avatar
size={64} shape="square"
icon={<FileJpgOutlined />} style={{ color: '#f56a00', backgroundColor: '#fde3cf' }}
/> size={64}
<Button type="link">预览</Button> src={hfor}
</div> />
{/* ---------- */} <Button type="link">下载</Button>
<div className="item">
<label>物业办事指南:</label> <Input
<Avatar placeholder="Basic usage"
shape="square" disabled
style={{ color: '#f56a00', backgroundColor: '#fde3cf' }} style={{ width: '280px' }}
size={64} value="http://47.74.233.180:8651/tosVisitorNo"
icon={<FilePdfOutlined />} />
/> <Button type="link" onClick={copy}>
<Button type="link">预览</Button> 复制
</div> </Button>
{/* ---------- */} </div>
<div className="item"> </div>
<label>保质期服务:</label> </div>
<Avatar
shape="square" {/* 确认关闭框 */}
style={{ color: '#f56a00', backgroundColor: '#fde3cf' }} <Modal
size={64} title="确认关闭小区吗?"
/> visible={ModelFee}
<Button type="link">预览</Button> onCancel={handleCancel}
</div> onOk={handleOk}
</div> >
</div> <p>
关闭小区将会<span style={{ color: 'red' }}>删除</span>小区内
<Divider /> <span style={{ color: 'red' }}>所有</span>业主,请谨慎操作!
</p>
<div className="box"> </Modal>
<div className="list-item">
<div className="item">
<label>帮助中心:</label>
<span>1</span>
<span>2</span>
<span>3</span>
<span>4</span>
</div>
</div>
</div>
<Divider />
<div className="box">
<div className="list-item">
<div className="item">
<label>临时到访码下载:</label>
<Avatar
shape="square"
style={{ color: '#f56a00', backgroundColor: '#fde3cf' }}
size={64}
/>
<Button type="link">下载</Button>
<Input placeholder="Basic usage" disabled value="12333333333" />
<Button type="link" onClick={copy}>
复制
</Button>
</div> </div>
</div> ) : (
</div> ''
)}
{/* 确认关闭框 */} </Spin>
<Modal title="确认关闭小区吗?" visible={ModelFee} onCancel={handleCancel} onOk={handleOk}> </>
<p>
关闭小区将会<span style={{ color: 'red' }}>删除</span>小区内
<span style={{ color: 'red' }}>所有</span>业主,请谨慎操作!
</p>
</Modal>
</div>
); );
}; };
// export default Adds; // export default Adds;
function map(state: any) { function map(state: any) {
const Data = state.CellList.DataSave; const { DataSave, detailData, imgUrl } = state.CellList; // 上层传递来的值
const loading = state.loading.models.CellList; const loading = state.loading.models.CellList;
return { Data, loading };
return { DataSave, detailData, loading, imgUrl };
} }
export default connect(map)(Adds); export default connect(map)(Detail);
...@@ -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 });
...@@ -284,39 +281,38 @@ const UsersDetail = (props: any) => { ...@@ -284,39 +281,38 @@ const UsersDetail = (props: any) => {
) : null} ) : null}
</> </>
) : ( ) : (
<> <>
<div> <div>
<TitleBack <TitleBack
title={'Member Detail'} title={'Member Detail'}
url="none" url="none"
titleBack={titleBackCallBack} titleBack={titleBackCallBack}
></TitleBack> ></TitleBack>
<Row> <Row>
<Col span={4}>Customer Type</Col> <Col span={4}>Customer Type</Col>
<Col span={4}> <Col span={4}>
{memberData.owner_relationship != null {memberData.owner_relationship != null
? user_status[memberData.owner_relationship - 1][1] ? user_status[memberData.owner_relationship - 1][1]
: null} : null}
</Col> </Col>
</Row> </Row>
<Row gutter={16}> <Row gutter={16}>
<Col span={4}>User Name</Col> <Col span={4}>User Name</Col>
<Col span={4}>{memberData.ower_name}</Col> <Col span={4}>{memberData.ower_name}</Col>
</Row> </Row>
<Row gutter={16}> <Row gutter={16}>
<Col span={4}>Contact Detail</Col> <Col span={4}>Contact Detail</Col>
<Col span={4}>{memberData.ower_phone}</Col> <Col span={4}>{memberData.ower_phone}</Col>
<Col span={4}>{memberData.ower_email}</Col> <Col span={4}>{memberData.ower_email}</Col>
</Row> </Row>
<Line></Line> <Line></Line>
<Button danger onClick={DeleteMember.bind(this, memberData)}>
Delete
</Button>
</div> <Button danger onClick={DeleteMember.bind(this, memberData)}>
</> Delete
)} </Button>
</div>
</>
)}
</Spin> </Spin>
</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);
\ No newline at end of file
...@@ -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!'], ['Please Choice CommunityName!'],
['Please Choice CommunityName!'], ['Please Choice Contract Title!'],
['Please Choice Contract Title!'], ['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