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