Commit 8031fe53 authored by cellee's avatar cellee

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

parents 28241246 06af1b15
import React,{useEffect} from 'react'; import React, { useEffect } from 'react';
import { Select } from 'antd'; import { Select } from 'antd';
const { Option } = Select; const { Option } = Select;
const Relationship = (props:any) => { const Relationship = (props: any) => {
const { value, onChange } = props;
const { value, onChange }=props useEffect(() => {
onChange('0');
useEffect(()=>{ }, []);
onChange("0") const handleChange = (values: any) => {
},[]) onChange(values);
const handleChange=(values:any)=>{ };
onChange(values)
}
return ( return (
<> <>
<Select defaultValue="0" style={{ width: 120 }} onChange={handleChange} allowClear> <Select defaultValue="0" style={{ width: 120 }} onChange={handleChange} allowClear>
<Option value="0">Oneself</Option> <Option value="0">Owner</Option>
<Option value="1">Family Members</Option> <Option value="1">Family Members</Option>
<Option value="2">Tenant</Option> <Option value="2">Tenant</Option>
</Select> </Select>
</> </>
); );
}; };
......
...@@ -26,21 +26,22 @@ const Card = (props: any) => { ...@@ -26,21 +26,22 @@ const Card = (props: any) => {
// const apply_status = [[0, "审核中"], [1, "批准"], [2, "拒绝"], [3, "领取"]] // const apply_status = [[0, "审核中"], [1, "批准"], [2, "拒绝"], [3, "领取"]]
const apply_status = [ const apply_status = [
[0, 'Pending'], [0, 'Pending'],
[1, 'Approval'], [1, 'Approved'],
[2, 'Reject'], [2, 'Rejected'],
[3, 'Received'], [3, 'Received'],
]; ];
const apply_relation = [ const apply_relation = [
[0, 'Oneself'], [0, 'Owner'],
[1, 'Family Members'], [1, 'Family Member'],
[2, 'Tenant'], [2, 'Tenant'],
]; ];
const columns = objectColumns([ const columns = objectColumns([
['Community Name', 'community_name'], ['Community', 'community_name'],
['Requestor', 'apply_name'],
[ [
'Unit', 'Unit No',
null, null,
(text: any, record: any) => ( (text: any, record: any) => (
<Space size="middle"> <Space size="middle">
...@@ -48,7 +49,6 @@ const Card = (props: any) => { ...@@ -48,7 +49,6 @@ const Card = (props: any) => {
</Space> </Space>
), ),
], ],
['User Name', 'apply_name'],
[ [
'Account Type', 'Account Type',
'apply_relation_owner', 'apply_relation_owner',
......
...@@ -94,7 +94,7 @@ const CardAdd = (props: any) => { ...@@ -94,7 +94,7 @@ const CardAdd = (props: any) => {
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 Add'}></TitleBack> <TitleBack title={'New Application For Access Card'}></TitleBack>
<Form form={form} name="basic" onFinish={onFinish} validateMessages={validateMessages}> <Form form={form} name="basic" onFinish={onFinish} validateMessages={validateMessages}>
<Spin spinning={loading}> <Spin spinning={loading}>
...@@ -143,7 +143,7 @@ const CardAdd = (props: any) => { ...@@ -143,7 +143,7 @@ const CardAdd = (props: any) => {
></Input> ></Input>
</Form.Item> </Form.Item>
<Form.Item labelCol={{ span: 3 }} label="Owner Name" style={{ marginBottom: -40 }}> <Form.Item labelCol={{ span: 3 }} label="Owner" style={{ marginBottom: -40 }}>
<Input.Group compact> <Input.Group compact>
<Form.Item <Form.Item
name="communityOwner" name="communityOwner"
...@@ -152,7 +152,7 @@ const CardAdd = (props: any) => { ...@@ -152,7 +152,7 @@ const CardAdd = (props: any) => {
> >
<Input placeholder={'Name'} /> <Input placeholder={'Name'} />
</Form.Item> </Form.Item>
<Form.Item style={{ marginRight: 20 }} label={'Contact Information'}> <Form.Item style={{ marginRight: 20 }} label={'Contact Details'}>
<Input hidden={true} /> <Input hidden={true} />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
...@@ -179,7 +179,7 @@ const CardAdd = (props: any) => { ...@@ -179,7 +179,7 @@ const CardAdd = (props: any) => {
> >
<Input placeholder={'Name'} /> <Input placeholder={'Name'} />
</Form.Item> </Form.Item>
<Form.Item style={{ marginRight: 20 }} label={'Contact Information'}> <Form.Item style={{ marginRight: 20 }} label={'Contact Details'}>
<Input hidden={true} /> <Input hidden={true} />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
......
...@@ -18,7 +18,7 @@ const apply_status = [ ...@@ -18,7 +18,7 @@ const apply_status = [
[3, 'Received'], [3, 'Received'],
]; ];
const apply_relation_owner = ['Oneself', 'Family Members', 'Tenant ']; const apply_relation_owner = ['Owner', 'Family Member', 'Tenant'];
const CardDetail = (props: any) => { const CardDetail = (props: any) => {
const { dispatch, DataSaveDetail, location } = props; const { dispatch, DataSaveDetail, location } = props;
...@@ -86,7 +86,7 @@ const CardDetail = (props: any) => { ...@@ -86,7 +86,7 @@ const CardDetail = (props: any) => {
'Status : ' + apply_status[listData.apply_status][1], 'Status : ' + apply_status[listData.apply_status][1],
'Time : ' + moment(listData.create_time.time).format('DD-MM-YYYY'), 'Time : ' + moment(listData.create_time.time).format('DD-MM-YYYY'),
]} ]}
title="Apply Card Detail" title="Access Card Application Details"
></TitleBack> ></TitleBack>
<Row gutter={8}> <Row gutter={8}>
...@@ -106,14 +106,14 @@ const CardDetail = (props: any) => { ...@@ -106,14 +106,14 @@ const CardDetail = (props: any) => {
<Row gutter={8} style={{ marginTop: 16 }}> <Row gutter={8} style={{ marginTop: 16 }}>
<Col>Owner Name:</Col> <Col>Owner Name:</Col>
<Col span={3}>{onwerDetail.owerName}</Col> <Col span={3}>{onwerDetail.owerName}</Col>
<Col>Phone:</Col> <Col>Contact Details:</Col>
<Col>{onwerDetail.owerPhone}</Col> <Col>{onwerDetail.owerPhone}</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}>Applicant:</Col>
<Col span={3}>{listData.apply_name}</Col> <Col span={3}>{listData.apply_name}</Col>
<Col>Phone:</Col> <Col>Contact Details:</Col>
<Col>{listData.apply_name_phone}</Col> <Col>{listData.apply_name_phone}</Col>
</Row> </Row>
<Row gutter={8} style={{ marginTop: 16 }}> <Row gutter={8} style={{ marginTop: 16 }}>
...@@ -142,9 +142,9 @@ const CardDetail = (props: any) => { ...@@ -142,9 +142,9 @@ const CardDetail = (props: any) => {
rules={[{ required: true, message: 'Please select the reply result!' }]} rules={[{ required: true, message: 'Please select the reply result!' }]}
> >
<Radio.Group> <Radio.Group>
<Radio.Button value={'1'}>Agree</Radio.Button> <Radio.Button value={'1'}>Approve</Radio.Button>
<Radio.Button style={{ marginLeft: 10 }} value={'2'}> <Radio.Button style={{ marginLeft: 10 }} value={'2'}>
Refuse Reject
</Radio.Button> </Radio.Button>
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
...@@ -161,7 +161,7 @@ const CardDetail = (props: any) => { ...@@ -161,7 +161,7 @@ const CardDetail = (props: any) => {
</Row> </Row>
<Row gutter={8} style={{ marginTop: 16 }}> <Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Received:</Col> <Col span={3}>Card Received:</Col>
<Col span={4}> <Col span={4}>
<Form.Item name="applyStatus"> <Form.Item name="applyStatus">
<Radio.Group> <Radio.Group>
...@@ -179,9 +179,9 @@ const CardDetail = (props: any) => { ...@@ -179,9 +179,9 @@ const CardDetail = (props: any) => {
) : ( ) : (
<> <>
<Row> <Row>
<Col span={3}>Replyer:</Col> <Col span={3}>Attended By:</Col>
<Col span={3}>{listData.replyName}</Col> <Col span={3}>{listData.replyName}</Col>
<Col span={3}>Contact:</Col> <Col span={3}>Contact Details:</Col>
<Col>{listData.replyContact}</Col> <Col>{listData.replyContact}</Col>
</Row> </Row>
<Row gutter={8} style={{ marginTop: 16 }}> <Row gutter={8} style={{ marginTop: 16 }}>
...@@ -190,7 +190,7 @@ const CardDetail = (props: any) => { ...@@ -190,7 +190,7 @@ const CardDetail = (props: any) => {
<Radio.Group value={listData.apply_status === 2 ? '2' : '1'}> <Radio.Group value={listData.apply_status === 2 ? '2' : '1'}>
<Radio.Button value={'1'}>Agree</Radio.Button> <Radio.Button value={'1'}>Agree</Radio.Button>
<Radio.Button style={{ marginLeft: 10 }} value={'2'}> <Radio.Button style={{ marginLeft: 10 }} value={'2'}>
Refuse Reject
</Radio.Button> </Radio.Button>
</Radio.Group> </Radio.Group>
</Col> </Col>
...@@ -210,7 +210,7 @@ const CardDetail = (props: any) => { ...@@ -210,7 +210,7 @@ const CardDetail = (props: any) => {
{listData.apply_status === 1 ? ( {listData.apply_status === 1 ? (
<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}>Received:</Col> <Col span={3}>Card Received:</Col>
<Col span={4}> <Col span={4}>
<Form.Item name="applyStatus"> <Form.Item name="applyStatus">
<Radio.Group> <Radio.Group>
...@@ -227,7 +227,7 @@ const CardDetail = (props: any) => { ...@@ -227,7 +227,7 @@ const CardDetail = (props: any) => {
</Form> </Form>
) : ( ) : (
<Row gutter={8} style={{ marginTop: 16 }}> <Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Received:</Col> <Col span={3}>Card Received:</Col>
<Col span={4}> <Col span={4}>
<Radio.Group value={listData.apply_status === 3 ? '3' : ''}> <Radio.Group value={listData.apply_status === 3 ? '3' : ''}>
<Radio value={'3'}>Receive</Radio> <Radio value={'3'}>Receive</Radio>
......
...@@ -29,7 +29,7 @@ const Detail = (props: any) => { ...@@ -29,7 +29,7 @@ const Detail = (props: any) => {
const headTitles = [ const headTitles = [
'Reply To Community maintenance', 'Reply To Community maintenance',
'Reply To Shelf life Service', 'Reply To Warranty Period Service',
'Reply To Owner Complaints', 'Reply To Owner Complaints',
'Reply To Report Online', 'Reply To Report Online',
'Reply To Problem Feedback', 'Reply To Problem Feedback',
...@@ -37,7 +37,7 @@ const Detail = (props: any) => { ...@@ -37,7 +37,7 @@ const Detail = (props: any) => {
const headTitlesDetail = [ const headTitlesDetail = [
'Details of community maintenance', 'Details of community maintenance',
'Details of Shelf life Service', 'Details of Warranty Period Service',
'Details of Owner Complaints', 'Details of Owner Complaints',
'Details of Report Online', 'Details of Report Online',
'Details of Problem Feedback', 'Details of Problem Feedback',
......
...@@ -18,8 +18,6 @@ const ChargeDetail = (props: any) => { ...@@ -18,8 +18,6 @@ const ChargeDetail = (props: any) => {
const [pages, setPages] = useState(1); const [pages, setPages] = useState(1);
const [curpage, setCurpage] = useState(1); const [curpage, setCurpage] = useState(1);
const [loading, setLoading] = useState(false);
useEffect(() => { useEffect(() => {
if (CurData) { if (CurData) {
dispatch({ dispatch({
...@@ -33,16 +31,14 @@ const ChargeDetail = (props: any) => { ...@@ -33,16 +31,14 @@ const ChargeDetail = (props: any) => {
}, },
}, },
}); });
setLoading(true); console.log('发起请求');
} else { } else {
history.back(); history.back();
} }
}, []); }, []);
useEffect(() => { useEffect(() => {
if (FileImg) { console.log(FileImg);
setLoading(false);
}
}, [FileImg]); }, [FileImg]);
const pdfpages = (pages: any) => { const pdfpages = (pages: any) => {
...@@ -84,7 +80,7 @@ const ChargeDetail = (props: any) => { ...@@ -84,7 +80,7 @@ const ChargeDetail = (props: any) => {
<div className={styles.box4}> <div className={styles.box4}>
<Pagination simple defaultCurrent={curpage} total={pages * 10} onChange={pageChange} /> <Pagination simple defaultCurrent={curpage} total={pages * 10} onChange={pageChange} />
</div> </div>
<Spin spinning={loading}> {CurData.billFileUrl.length > 0 || FileImg ? (
<Tooltip title={scale == 1.3 ? '点击放大查看' : '还原视图'}> <Tooltip title={scale == 1.3 ? '点击放大查看' : '还原视图'}>
<div className={scale == 1.3 ? styles.box3out : null}> <div className={scale == 1.3 ? styles.box3out : null}>
<div className={scale == 1.3 ? styles.box3 : styles.box3of} onClick={lookup}> <div className={scale == 1.3 ? styles.box3 : styles.box3of} onClick={lookup}>
...@@ -92,7 +88,7 @@ const ChargeDetail = (props: any) => { ...@@ -92,7 +88,7 @@ const ChargeDetail = (props: any) => {
// key="pdfjs" // key="pdfjs"
file={ file={
// 'data:application/pdf;base64,' + stringSplit(CurData.billFileUrl, 'm/cash') // 'data:application/pdf;base64,' + stringSplit(CurData.billFileUrl, 'm/cash')
stringSplit(CurData.billFileUrl || FileImg[0].fileUrl, 'm/cash') stringSplit(CurData.billFileUrl || FileImg, 'm/cash')
} }
// workerSrc="//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js" // workerSrc="//cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.228/pdf.worker.js"
scale={scale} scale={scale}
...@@ -102,7 +98,9 @@ const ChargeDetail = (props: any) => { ...@@ -102,7 +98,9 @@ const ChargeDetail = (props: any) => {
</div> </div>
</div> </div>
</Tooltip> </Tooltip>
</Spin> ) : (
<></>
)}
</> </>
) : null} ) : null}
</div> </div>
......
...@@ -370,7 +370,7 @@ const UsersDetail = (props: any) => { ...@@ -370,7 +370,7 @@ const UsersDetail = (props: any) => {
<Col span={4}>{memberData.owner_family_name}</Col> <Col span={4}>{memberData.owner_family_name}</Col>
</Row> </Row>
<Row gutter={16}> <Row gutter={16}>
<Col span={4}>Contact Number</Col> <Col span={4}>Contact Details</Col>
<Col span={4}>{memberData.owner_family_phone}</Col> <Col span={4}>{memberData.owner_family_phone}</Col>
<Col span={4}>{memberData.owner_family_email}</Col> <Col span={4}>{memberData.owner_family_email}</Col>
</Row> </Row>
......
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