Commit 6aaa43c3 authored by cellee's avatar cellee

Merge branch 'final' of http://120.77.240.215:9701/Maple/tostumi.git into final

parents 0dea0fdf d1ffefa8
...@@ -97,6 +97,15 @@ const TitleSearch = (props: any) => { ...@@ -97,6 +97,15 @@ const TitleSearch = (props: any) => {
}); });
}; };
// 小区默认值
const communityDef = () => {
if (defaultValue != null && defaultValue.communityName) {
return defaultValue.communityName;
} else {
return undefined;
}
};
return ( return (
<> <>
<Form form={form} name="basic" onFinish={onFinish} onFinishFailed={onFinishFailed}> <Form form={form} name="basic" onFinish={onFinish} onFinishFailed={onFinishFailed}>
...@@ -104,7 +113,11 @@ const TitleSearch = (props: any) => { ...@@ -104,7 +113,11 @@ const TitleSearch = (props: any) => {
{communitySelect != null ? ( {communitySelect != null ? (
<Col key={'communitySelect_'}> <Col key={'communitySelect_'}>
<Form.Item name={'communityName'}> <Form.Item name={'communityName'}>
<SearchOptionsCommnity titleSearch={true} opname={opname} /> <SearchOptionsCommnity
defaultName={communityDef}
titleSearch={true}
opname={opname}
/>
</Form.Item> </Form.Item>
</Col> </Col>
) : null} ) : null}
......
...@@ -12,11 +12,17 @@ import TitleSearch from '../../components/TitleSearch/TitleSearch'; ...@@ -12,11 +12,17 @@ import TitleSearch from '../../components/TitleSearch/TitleSearch';
import { RA, SA, urlEncode, filterObj, filterObjbyTg } from '@/utils/method'; import { RA, SA, urlEncode, filterObj, filterObjbyTg } from '@/utils/method';
let readyData: any = {
communityName: '',
ownerName: '',
handleStatus: '',
pageNum: 1,
};
const module = 'CommunityService'; const module = 'CommunityService';
const Card = (props: any) => { const Card = (props: any) => {
const { dispatch, Data7 } = props; const { dispatch, Data7, location } = props;
const [readyData, setReadyData] = useState(null);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
// const apply_status = [[0, "审核中"], [1, "批准"], [2, "拒绝"], [3, "领取"]] // const apply_status = [[0, "审核中"], [1, "批准"], [2, "拒绝"], [3, "领取"]]
const apply_status = [ const apply_status = [
...@@ -51,42 +57,36 @@ const Card = (props: any) => { ...@@ -51,42 +57,36 @@ const Card = (props: any) => {
], ],
[ [
'Actions', 'Actions',
null, 'apply_status',
(text: any, record: any) => ( (text: any, record: any) => (
<Space size="middle"> <Space size="middle">
{' '}
<a onClick={goToDetail.bind(this, record)}>Detail</a> <a onClick={goToDetail.bind(this, record)}>Detail</a>
</Space> </Space>
), ),
], ],
]); ]);
useEffect(() => {
if (Data7 != null) {
setLoading(false);
}
}, [Data7]);
useEffect(() => { useEffect(() => {
//前置数据 //前置数据
console.log('前置数据'); console.log('前置数据');
let tmp: any = filterObjbyTg(location.query, [ readyData = {
'handleStatus', pageNum: 1,
'ownerName', ...location.query,
'communityName', };
'current',
]);
tmp.handleStatus = apply_status[parseInt(tmp.handleStatus)]; //特殊处理
setReadyData(tmp);
//获取数据 //获取数据
setLoading(true); setLoading(true);
RA(31, { serviceType: '7', id: '' }, module, dispatch); RA(
}, []); 31,
{ ...filterObjbyTg(readyData, ['handleStatus', 'ownerName', 'communityName', 'pageNum']) },
module,
dispatch,
);
}, [location]);
// 监听数据返回
useEffect(() => { useEffect(() => {
if (Data7 != null) { if (Data7 != null) {
console.log('首页信息'); setLoading(false);
console.log(Data7);
} }
}, [Data7]); }, [Data7]);
...@@ -95,17 +95,26 @@ const Card = (props: any) => { ...@@ -95,17 +95,26 @@ const Card = (props: any) => {
history.push('./AccessCardApplication/Detail'); history.push('./AccessCardApplication/Detail');
}; };
const goToAdd = (values: any, e: any) => { const goToAdd = () => {
history.push('./AccessCardApplication/Add'); history.push('./AccessCardApplication/Add');
}; };
//页面搜索 //页面搜索
const ClickTitleSearch = (comment: any) => { const ClickTitleSearch = (comment: any) => {
let tmp = filterObjbyTg(comment, ['handleStatus', 'ownerName', 'communityName']); let tmp = filterObjbyTg(comment, ['handleStatus', 'ownerName', 'communityName']);
tmp['current'] = 1; tmp['pageNum'] = 1;
console.log(tmp);
history.push(location.pathname + urlEncode(tmp)); history.push(location.pathname + urlEncode(tmp));
}; };
// 切换页码
const changePage = (values: any) => {
let tmp = {
...location.query,
pageNum: values.current,
};
history.push(location.pathname + urlEncode(tmp));
};
return ( return (
<div style={{ width: '100%', minWidth: 1020, padding: 34, backgroundColor: '#ffffff' }}> <div style={{ width: '100%', minWidth: 1020, padding: 34, backgroundColor: '#ffffff' }}>
{Data7 != null ? ( {Data7 != null ? (
...@@ -115,8 +124,12 @@ const Card = (props: any) => { ...@@ -115,8 +124,12 @@ const Card = (props: any) => {
listkey={['ownerName']} listkey={['ownerName']}
list={['Owner Name']} list={['Owner Name']}
status={[{ name: ['handleStatus', 'Status'], data: apply_status }]} status={[{ name: ['handleStatus', 'Status'], data: apply_status }]}
defaultValue={readyData}
onSubmit={ClickTitleSearch} onSubmit={ClickTitleSearch}
defaultValue={{
ownerName: readyData.ownerName,
handleStatus: apply_status[parseInt(readyData.handleStatus)],
communityName: readyData.communityName,
}}
/> />
<div style={{ height: 80, position: 'relative' }}> <div style={{ height: 80, position: 'relative' }}>
...@@ -131,9 +144,14 @@ const Card = (props: any) => { ...@@ -131,9 +144,14 @@ const Card = (props: any) => {
loading={loading} loading={loading}
rowKey="id" rowKey="id"
style={{ marginTop: 16 }} style={{ marginTop: 16 }}
dataSource={Data7.data.rows} dataSource={Data7.data.list}
columns={columns} columns={columns}
pagination={{ defaultCurrent: 1, total: Data7.total }} pagination={{
defaultPageSize: 15,
total: Data7.data.page.totalRow,
showSizeChanger: false,
}}
onChange={changePage}
/> />
</> </>
) : null} ) : null}
......
...@@ -11,11 +11,14 @@ import Line from '@/components/Line/Line'; ...@@ -11,11 +11,14 @@ import Line from '@/components/Line/Line';
import TextArea from 'antd/lib/input/TextArea'; import TextArea from 'antd/lib/input/TextArea';
import Relationship from '@/components/Relationship/Relationship'; import Relationship from '@/components/Relationship/Relationship';
import { useForm } from 'antd/es/form/util'; import { useForm } from 'antd/es/form/util';
import { validateMessages } from '@/utils/params';
import styles from './css/index.less';
const module = 'CommunityService'; const module = 'CommunityService';
let communityName: string = '';
const CardAdd = (props: any) => { const CardAdd = (props: any) => {
const { dispatch, Result, communityInfo } = props; const { dispatch, Result, communityInfo } = props;
// const formRef = useRef(null)
const [form] = Form.useForm(); const [form] = Form.useForm();
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
...@@ -35,11 +38,18 @@ const CardAdd = (props: any) => { ...@@ -35,11 +38,18 @@ const CardAdd = (props: any) => {
}, [Result]); }, [Result]);
const onFinish = (values: any) => { const onFinish = (values: any) => {
if (!communityName) {
message.warning('Please enter the complete!');
return;
}
values.communityName = communityName;
setLoading(true); setLoading(true);
RA(35, values, module, dispatch); RA(35, values, module, dispatch);
}; };
const extendName = (values: any) => { const extendName = (values: any) => {
communityName = values;
RA(32, { communityName: values }, 'User', dispatch); RA(32, { communityName: values }, 'User', dispatch);
}; };
...@@ -47,18 +57,39 @@ const CardAdd = (props: any) => { ...@@ -47,18 +57,39 @@ const CardAdd = (props: any) => {
if (communityInfo != null) { if (communityInfo != null) {
form.setFieldsValue({ form.setFieldsValue({
zipCode: zipCode:
communityInfo.data.rows[0].residentialAddress + communityInfo.data.rows.residentialAddress +
' SINGAPORE' + ' SINGAPORE' +
communityInfo.data.rows[0].residentialZipCode, communityInfo.data.rows.residentialZipCode,
}); });
} }
}, [communityInfo]); }, [communityInfo]);
useEffect(() => {
form.resetFields();
}, []);
const checkData = (rule: any, value: any, callback: any) => {
if (value) {
if (/^[a-zA-Z0-9]+$/g.test(value)) {
callback();
} else {
callback(new Error('Only numbers and letters can be entered!'));
}
}
callback();
};
const checkName = (rule: any, value: any, callback: any) => {
if (!value || !value.trim()) {
callback(new Error('*it is required!'));
}
callback();
};
return ( return (
<div style={{ width: '100%', minWidth: 1020, padding: 34, backgroundColor: '#ffffff' }}> <div style={{ width: '100%', minWidth: 1020, padding: 34, backgroundColor: '#ffffff' }}>
<TitleBack title={'Apply Card'}></TitleBack> <TitleBack title={'Apply Card'}></TitleBack>
<Form form={form} name="basic" onFinish={onFinish}> <Form form={form} name="basic" onFinish={onFinish} validateMessages={validateMessages}>
<Spin spinning={loading}> <Spin spinning={loading}>
<Form.Item labelCol={{ span: 3 }} label="Community" style={{ marginBottom: 0 }}> <Form.Item labelCol={{ span: 3 }} label="Community" style={{ marginBottom: 0 }}>
<Input.Group compact> <Input.Group compact>
...@@ -68,7 +99,8 @@ const CardAdd = (props: any) => { ...@@ -68,7 +99,8 @@ const CardAdd = (props: any) => {
<Form.Item <Form.Item
name="buildNumber" name="buildNumber"
style={{ marginRight: 16 }} style={{ marginRight: 16 }}
rules={[{ required: true }]} className={styles.buildNumber}
rules={[{ required: true, validator: checkData }]}
> >
<Input style={{ width: 80 }} placeholder={'Building'} /> <Input style={{ width: 80 }} placeholder={'Building'} />
</Form.Item> </Form.Item>
...@@ -76,18 +108,27 @@ const CardAdd = (props: any) => { ...@@ -76,18 +108,27 @@ const CardAdd = (props: any) => {
<Form.Item <Form.Item
name="floorNumber" name="floorNumber"
style={{ marginRight: 16 }} style={{ marginRight: 16 }}
rules={[{ required: true }]} className={styles.floorNumber}
rules={[{ required: true, validator: checkData }]}
> >
<Input style={{ width: 80 }} placeholder={'Floor'} /> <Input style={{ width: 80 }} placeholder={'Floor'} />
</Form.Item> </Form.Item>
<div style={{ lineHeight: 2, marginRight: 16 }}>-</div> <div style={{ lineHeight: 2, marginRight: 16 }}>-</div>
<Form.Item name="roomNumber" rules={[{ required: true }]}> <Form.Item
name="roomNumber"
className={styles.roomNumber}
rules={[{ required: true, validator: checkData }]}
>
<Input style={{ width: 120 }} placeholder={'Room'} /> <Input style={{ width: 120 }} placeholder={'Room'} />
</Form.Item> </Form.Item>
</Input.Group> </Input.Group>
</Form.Item> </Form.Item>
<Form.Item name="zipCode" wrapperCol={{ ...Layout.wrapperCol, offset: 3 }}> <Form.Item
name="zipCode"
wrapperCol={{ ...Layout.wrapperCol, offset: 3 }}
rules={[{ required: true }]}
>
<Input <Input
style={{ width: 580 }} style={{ width: 580 }}
placeholder={'Display the address and postcode automatically according to the'} placeholder={'Display the address and postcode automatically according to the'}
...@@ -95,35 +136,22 @@ const CardAdd = (props: any) => { ...@@ -95,35 +136,22 @@ const CardAdd = (props: any) => {
></Input> ></Input>
</Form.Item> </Form.Item>
<Form.Item <Form.Item labelCol={{ span: 3 }} label="Owner Name" style={{ marginBottom: -40 }}>
labelCol={{ span: 3 }}
label="Owner Name"
style={{ marginBottom: -40 }}
rules={[{ required: true }]}
>
<Input.Group compact> <Input.Group compact>
<Form.Item <Form.Item
name="communityOwner" name="communityOwner"
style={{ marginRight: 20 }} style={{ marginRight: 20 }}
rules={[{ required: true }]} rules={[{ required: true, validator: checkName }]}
> >
<Input placeholder={'Name'} /> <Input placeholder={'Name'} />
</Form.Item> </Form.Item>
<Form.Item <Form.Item style={{ marginRight: 20 }} label={'Contact Information'}>
style={{ marginRight: 20 }}
label={'Contact Information'}
rules={[{ required: true }]}
>
<Input hidden={true} /> <Input hidden={true} />
</Form.Item> </Form.Item>
<Form.Item <Form.Item name="communityOwnerPhone" style={{ marginRight: 20 }}>
name="communityOwnerPhone"
style={{ marginRight: 20 }}
rules={[{ required: true }]}
>
<Input placeholder={'Phone number'} /> <Input placeholder={'Phone number'} />
</Form.Item> </Form.Item>
<Form.Item name="communityOwnerEmail" rules={[{ required: true }]}> <Form.Item name="communityOwnerEmail" rules={[{ required: true, type: 'email' }]}>
<Input placeholder={'Email'} /> <Input placeholder={'Email'} />
</Form.Item> </Form.Item>
</Input.Group> </Input.Group>
...@@ -133,24 +161,20 @@ const CardAdd = (props: any) => { ...@@ -133,24 +161,20 @@ const CardAdd = (props: any) => {
<Form.Item labelCol={{ span: 3 }} label="Applicant" style={{ marginBottom: -40 }}> <Form.Item labelCol={{ span: 3 }} label="Applicant" style={{ marginBottom: -40 }}>
<Input.Group compact> <Input.Group compact>
<Form.Item name="applyName" style={{ marginRight: 20 }} rules={[{ required: true }]}>
<Input placeholder={'Name'} />
</Form.Item>
<Form.Item <Form.Item
name="applyName"
style={{ marginRight: 20 }} style={{ marginRight: 20 }}
label={'Contact Information'} rules={[{ required: true, validator: checkName }]}
rules={[{ required: true }]}
> >
<Input placeholder={'Phone number'} hidden={true} /> <Input placeholder={'Name'} />
</Form.Item> </Form.Item>
<Form.Item <Form.Item style={{ marginRight: 20 }} label={'Contact Information'}>
name="applyNamePhone" <Input hidden={true} />
style={{ marginRight: 20 }} </Form.Item>
rules={[{ required: true }]} <Form.Item name="applyNamePhone" style={{ marginRight: 20 }}>
>
<Input placeholder={'Phone number'} /> <Input placeholder={'Phone number'} />
</Form.Item> </Form.Item>
<Form.Item name="applyNameEmail" rules={[{ required: true }]}> <Form.Item name="applyNameEmail" rules={[{ required: true, type: 'email' }]}>
<Input placeholder={'Email'} /> <Input placeholder={'Email'} />
</Form.Item> </Form.Item>
</Input.Group> </Input.Group>
......
import React, { useState, useEffect,useRef} from 'react'; import React, { useState, useEffect, useRef } from 'react';
import { Input ,Tabs,Row,Col, Button,Form,Radio,message} from 'antd'; import { Input, Tabs, Row, Col, Button, Form, Radio, message } from 'antd';
const { TabPane } = Tabs; const { TabPane } = Tabs;
import {connect,history} from 'umi'; import { connect, history } from 'umi';
import { RA, getCookie } from '@/utils/method'; import { RA, getCookie } from '@/utils/method';
import TitleBack from '@/components/TitleBack/TitleBack'; import TitleBack from '@/components/TitleBack/TitleBack';
import Line from '@/components/Line/Line'; import Line from '@/components/Line/Line';
import TextArea from 'antd/lib/input/TextArea'; import TextArea from 'antd/lib/input/TextArea';
const module="CommunityService" const module = 'CommunityService';
const CardDetail = (props:any) => { const CardDetail = (props: any) => {
const { dispatch, Data, DataSave, DataSaveDetail } = props;
const { dispatch, Data,DataSave,DataSaveDetail } = props; const formRef = useRef(null);
const formRef = useRef(null)
useEffect(()=>{ useEffect(() => {
if (DataSaveDetail != null) { if (DataSaveDetail != null) {
console.log(DataSaveDetail) console.log(DataSaveDetail);
} }
}, [DataSaveDetail]) }, [DataSaveDetail]);
useEffect(()=>{ useEffect(() => {
if (DataSave != null) { if (DataSave != null) {
console.log("初始化页面参数") console.log('初始化页面参数');
console.log(DataSave); console.log(DataSave);
RA(36, { id:DataSave.id }, module, dispatch); RA(36, { id: DataSave.id }, module, dispatch);
/* apply_name: "jack-小白白"
apply_reason_content: "H4sIAAAAAAAAAHuyo/fJnlkAljbS9QYAAAA="
apply_relation_owner: 0
apply_status: 0
build_number: "01"
communityId: "7e5c6fd2f4ba497a90e64535df6e9088"
community_name: "A4"
community_owner: "jack-小白白"
community_owner_email: "3290098379@qq.com"
create_time: {date: 10, day: 4, hours: 19, minutes: 51, month: 8, …}
deleted: 0
floor_number: "00"
id: "977597589971009536"
ownerId: "c4da40676d044487b37e7a1bdc6dd045"
room_number: "767"
update_time: */
} else { } else {
history.go(-1) history.go(-1);
}
}, [])
const onFinish = (values:any) => {
var tmp={
communityId : DataSave.communityId,
id:DataSave.id,
ownerId:DataSave.ownerId,
applyStatus:values.applyStatus,
replyContent:values.replyContent,
type:"7"
} }
console.log(tmp) }, []);
RA(34,tmp,module,dispatch)
const onFinish = (values: any) => {
var tmp = {
communityId: DataSave.communityId,
id: DataSave.id,
ownerId: DataSave.ownerId,
applyStatus: values.applyStatus,
replyContent: values.replyContent,
type: '7',
};
console.log(tmp);
RA(34, tmp, module, dispatch);
message.success('Success Operation!'); message.success('Success Operation!');
history.push('/CommercialService/AccessCardApplication') history.push('/CommercialService/AccessCardApplication');
} };
return ( return (
<div style={{ width: "100%", minWidth: 1020, padding: 34, backgroundColor: "#ffffff" }}> <div style={{ width: '100%', minWidth: 1020, padding: 34, backgroundColor: '#ffffff' }}>
{ {DataSave != null ? (
DataSave != null ? <> <>
<TitleBack sublist={['Status : ' + "1", 'Time : ' + '12']} title="Apply Card" ></TitleBack> <TitleBack sublist={['Status : ' + '1', 'Time : ' + '12']} title="Apply Card"></TitleBack>
<Row gutter={8}> <Row gutter={8}>
<Col>Community:</Col> <Col>Community:</Col>
<Col span={1}>{DataSave.community_name}</Col> <Col span={3}>{DataSave.community_name}</Col>
<Col>unit:</Col> <Col>unit:</Col>
<Col>{DataSave.build_number}#{DataSave.floor_number}-{DataSave.room_number}</Col> <Col>
{DataSave.build_number}#{DataSave.floor_number}-{DataSave.room_number}
</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col>Address:</Col>
<Col>
{DataSave.build_number}#{DataSave.floor_number}-{DataSave.room_number}
</Col>
</Row> </Row>
<Row gutter={8} style={{marginTop:16}}> <Row gutter={8} style={{ marginTop: 16 }}>
<Col>Address:</Col> <Col>Owner Name:</Col>
<Col>{DataSave.build_number}#{DataSave.floor_number}-{DataSave.room_number}</Col> <Col span={3}>{DataSave.community_owner}</Col>
</Row> <Col>Phone:</Col>
<Col>13169646231</Col>
<Row gutter={8} style={{marginTop:16}}>
<Col>Owner Name:</Col>
<Col span={3}>{DataSave.community_owner}</Col>
<Col>Phone:</Col>
<Col>13169646231</Col>
</Row> </Row>
<Line></Line> <Line></Line>
<Row gutter={8} style={{marginTop:16}}> <Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Apply Name:</Col> <Col span={3}>Apply Name:</Col>
<Col span={3}>{DataSave.apply_name}</Col> <Col span={3}>{DataSave.apply_name}</Col>
<Col>Phone:</Col> <Col>Phone:</Col>
<Col>13169646231</Col> <Col>13169646231</Col>
</Row> </Row>
<Row gutter={8} style={{marginTop:16}}> <Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Relationship:</Col> <Col span={3}>Relationship:</Col>
<Col >{DataSave.apply_relation_owner}</Col> <Col>{DataSave.apply_relation_owner}</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Reason:</Col>
<Col>
<TextArea
disabled
value={DataSave.apply_reason_content}
style={{ width: 300, height: 100, padding: 8 }}
></TextArea>
</Col>
</Row> </Row>
<Row gutter={8} style={{marginTop:16}}>
<Col span={3}>Reason:</Col>
<Col><TextArea disabled value={DataSave.apply_reason_content} style={{width:300,height:100,padding:8}}></TextArea></Col>
</Row>
<Line></Line> <Line></Line>
<Form ref={formRef} name="basic" onFinish={onFinish}> <Form ref={formRef} name="basic" onFinish={onFinish}>
<Row gutter={8} style={{ marginTop: 16 }}>
<Row gutter={8} style={{marginTop:16}}> <Col span={3}>Examine:</Col>
<Col span={3}>Examine:</Col> <Col span={4}>
<Col span={4}><Form.Item name="applyStatus"><Radio.Group ><Radio.Button value={"1"}>Agree</Radio.Button ><Radio.Button style={{marginLeft:10}} value={"2"}>Refuse</Radio.Button ></Radio.Group></Form.Item></Col> <Form.Item name="applyStatus">
</Row> <Radio.Group>
<Radio.Button value={'1'}>Agree</Radio.Button>
<Row gutter={8} style={{marginTop:16}}> <Radio.Button style={{ marginLeft: 10 }} value={'2'}>
<Col span={3}>Reply:</Col> Refuse
<Col> <Form.Item name="replyContent"><TextArea style={{width:300,height:100,padding:8}}></TextArea></Form.Item></Col> </Radio.Button>
</Row> </Radio.Group>
</Form.Item>
<Row gutter={8} style={{marginTop:16}}> </Col>
<Col span={3}>Received:</Col> </Row>
<Col span={4}><Form.Item name="applyStatus"><Radio.Group ><Radio value={"3"}>Agree</Radio></Radio.Group></Form.Item></Col>
</Row>
<Form.Item ><Button type="primary" htmlType="submit">Submit</Button></Form.Item>
</Form>
</>:null
}
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Reply:</Col>
<Col>
{' '}
<Form.Item name="replyContent">
<TextArea style={{ width: 300, height: 100, padding: 8 }}></TextArea>
</Form.Item>
</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Received:</Col>
<Col span={4}>
<Form.Item name="applyStatus">
<Radio.Group>
<Radio value={'3'}>Agree</Radio>
</Radio.Group>
</Form.Item>
</Col>
</Row>
<Form.Item>
<Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Form>
</>
) : null}
</div> </div>
); );
}; };
function map(state:any) { function map(state: any) {
const { Data,DataSave,DataSaveDetail} = state[module] const { Data, DataSave, DataSaveDetail } = state[module];
return { Data,DataSave,DataSaveDetail} return { Data, DataSave, DataSaveDetail };
} }
export default connect(map)(CardDetail); export default connect(map)(CardDetail);
\ No newline at end of file
...@@ -38,18 +38,27 @@ const Detail = (props: any) => { ...@@ -38,18 +38,27 @@ const Detail = (props: any) => {
'Reply To Problem Feedback', 'Reply To Problem Feedback',
]; ];
const headTitlesDetail = [
'Details of community maintenance',
'Details of Shelf life Service',
'Details of Owner Complaints',
'Details of Report Online',
'Details of Problem Feedback',
];
useEffect(() => { useEffect(() => {
if (location.pathname.indexOf('/Edit') > -1) { if (location.pathname.indexOf('/Edit') > -1) {
setEditorFlag(true); setEditorFlag(true);
setHeadTitle(headTitles[parseInt(location.query.serviceType) - 1]);
} else { } else {
setEditorFlag(false); setEditorFlag(false);
setHeadTitle(headTitlesDetail[parseInt(location.query.serviceType) - 1]);
} }
RA(21, { RA(21, {
serviceType: location.query.serviceType, serviceType: location.query.serviceType,
id: location.query.id, id: location.query.id,
}); });
setHeadTitle(headTitles[parseInt(location.query.serviceType) - 1]);
setLoading(true); setLoading(true);
}, [location.pathname]); }, [location.pathname]);
......
...@@ -2,54 +2,90 @@ ...@@ -2,54 +2,90 @@
//基石 //基石
.base { .base {
width: 100%; width: 100%;
background-color: #ffffff; background-color: #ffffff;
padding: 34px; padding: 34px;
min-width: 1020px; min-width: 1020px;
} }
//头部组件 //头部组件
.box{ .box {
width: 100%; width: 100%;
height: 64px; height: 64px;
position: relative; position: relative;
} }
.input{ .input {
width:200px; width: 200px;
height:32px; height: 32px;
background:none; background: none;
outline: none; outline: none;
border:1px solid rgba(217,217,217,1); border: 1px solid rgba(217, 217, 217, 1);
border-radius:2px; border-radius: 2px;
font-size:14px; font-size: 14px;
font-weight:400; font-weight: 400;
line-height:30px; line-height: 30px;
text-indent: 19px; text-indent: 19px;
} }
.item1{ .item1 {
.input(); .input();
} }
.item2{ .item2 {
.input(); .input();
margin-left: 20px; margin-left: 20px;
} }
.item4{ .item4 {
.input(); .input();
margin-left: 20px; margin-left: 20px;
} }
.item3{ .item3 {
width:80px; width: 80px;
height:32px; height: 32px;
border:1px solid rgba(24,144,255,1); border: 1px solid rgba(24, 144, 255, 1);
border-radius:2px; border-radius: 2px;
background-color:#e7f4ff; background-color: #e7f4ff;
outline: none; outline: none;
font-size:14px; font-size: 14px;
font-weight:400; font-weight: 400;
color:rgba(24,144,255,1); color: rgba(24, 144, 255, 1);
line-height:30px; line-height: 30px;
cursor: pointer; cursor: pointer;
margin-left: 48px; margin-left: 48px;
} }
.item3:active{ .item3:active {
background-color:#ffffff; background-color: #ffffff;
} }
\ No newline at end of file
.buildNumber {
:global(.ant-form-item-explain) {
position: absolute;
top: 34px;
left: 33px;
width: 260px;
z-index: 10;
background-color: #fff;
min-height: 20px;
}
}
.floorNumber {
:global(.ant-form-item-explain) {
position: absolute;
top: 34px;
left: -87px;
width: 260px;
z-index: 20;
background-color: #fff;
min-height: 20px;
}
}
.roomNumber {
:global(.ant-form-item-explain) {
position: absolute;
top: 34px;
left: -205px;
width: 260px;
z-index: 30;
background-color: #fff;
min-height: 20px;
}
}
...@@ -11,7 +11,6 @@ import { checkParam, RA } from '../../../utils/method'; ...@@ -11,7 +11,6 @@ import { checkParam, RA } from '../../../utils/method';
import { validateMessages } from '@/utils/params'; import { validateMessages } from '@/utils/params';
const module = 'User'; const module = 'User';
let verifyNum = 0;
const UsersAdd = (props: any) => { const UsersAdd = (props: any) => {
const { dispatch, communityInfo } = props; const { dispatch, communityInfo } = props;
...@@ -47,9 +46,9 @@ const UsersAdd = (props: any) => { ...@@ -47,9 +46,9 @@ const UsersAdd = (props: any) => {
if (postman.extend != null) { if (postman.extend != null) {
formRef.current.setFieldsValue({ formRef.current.setFieldsValue({
addressAndpostalCode: addressAndpostalCode:
communityInfo.data.rows[0].residentialAddress + communityInfo.data.rows.residentialAddress +
' SINGAPORE' + ' SINGAPORE' +
communityInfo.data.rows[0].residentialZipCode, communityInfo.data.rows.residentialZipCode,
}); });
} }
} }
......
...@@ -11,6 +11,9 @@ export const validateMessages = { ...@@ -11,6 +11,9 @@ export const validateMessages = {
number: { number: {
range: '${label} must be between ${min} and ${max}', range: '${label} must be between ${min} and ${max}',
}, },
phone: {
range: 'It has to be an 8 digit number or an 11 digit number!',
},
}; };
export const requestList = [ export const requestList = [
......
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