Commit c292964a authored by Sixiang_Zzb's avatar Sixiang_Zzb

装修申请和住户卡测试问题修复

parent 160cecc8
......@@ -92,6 +92,7 @@ export default {
}
break;
case 33:
case 34:
case 22:
{
message.success('Success Operation!', 3);
......
import React, { useState, useEffect, useRef } from 'react';
import { Input, Tabs, Row, Col, Button, Form, Radio, message } from 'antd';
import { Spin, Tabs, Row, Col, Button, Form, Radio, message } from 'antd';
const { TabPane } = Tabs;
import { connect, history } from 'umi';
......@@ -25,13 +25,7 @@ const apply_relation_owner = ['Oneself', 'Family Members', 'Tenant '];
const CardDetail = (props: any) => {
const { dispatch, Data, DataSave, DataSaveDetail } = props;
const formRef = useRef(null);
// useEffect(() => {
// if (DataSaveDetail != null) {
// console.log(DataSaveDetail);
// }
// }, [DataSaveDetail]);
const [loading, setLoading] = useState(false);
useEffect(() => {
if (DataSave != null) {
console.log(DataSave);
......@@ -58,170 +52,170 @@ const CardDetail = (props: any) => {
type: '7',
};
RA(34, tmp, module, dispatch);
// message.success('Success Operation!');
// history.push('/CommercialService/AccessCardApplication');
// history.go(-1);
setLoading(true);
};
return (
<div style={{ width: '100%', minWidth: 1020, padding: 34, backgroundColor: '#ffffff' }}>
{DataSave != null ? (
<>
<TitleBack
sublist={[
'Status : ' + apply_status[DataSave.apply_status][1],
'Time : ' + moment(DataSave.create_time.time).format('DD-MM-YYYY'),
]}
title="Apply Card Detail"
></TitleBack>
<Row gutter={8}>
<Col>Community:</Col>
<Col span={3}>{DataSave.community_name}</Col>
<Col>Unit:</Col>
<Col>
{DataSave.build_number + '#' + DataSave.floor_number + '-' + DataSave.room_number}
</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col>Address:</Col>
<Col>
{DataSave.zip_address} {DataSave.zip_code}
</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col>Owner Name:</Col>
<Col span={3}>{DataSave.community_owner}</Col>
<Col>Phone:</Col>
<Col>{DataSave.community_owner_phone}</Col>
</Row>
<Line></Line>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Apply Name:</Col>
<Col span={3}>{DataSave.apply_name}</Col>
<Col>Phone:</Col>
<Col>{DataSave.apply_name_phone}</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Relationship:</Col>
<Col>{apply_relation_owner[parseInt(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>
<Line></Line>
{DataSave.apply_status === 0 ? (
<Form ref={formRef} name="basic" onFinish={onFinish}>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Examine:</Col>
<Col span={4}>
<Form.Item
name="applyStatus"
rules={[{ required: true, message: 'Please select the reply result!' }]}
>
<Radio.Group>
<Spin size="large" spinning={loading}>
<div style={{ width: '100%', minWidth: 1020, padding: 34, backgroundColor: '#ffffff' }}>
{DataSave != null ? (
<>
<TitleBack
sublist={[
'Status : ' + apply_status[DataSave.apply_status][1],
'Time : ' + moment(DataSave.create_time.time).format('DD-MM-YYYY'),
]}
title="Apply Card Detail"
></TitleBack>
<Row gutter={8}>
<Col>Community:</Col>
<Col span={3}>{DataSave.community_name}</Col>
<Col>Unit:</Col>
<Col>
{DataSave.build_number + '#' + DataSave.floor_number + '-' + DataSave.room_number}
</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col>Address:</Col>
<Col>
{DataSave.zip_address} {DataSave.zip_code}
</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col>Owner Name:</Col>
<Col span={3}>{DataSave.community_owner}</Col>
<Col>Phone:</Col>
<Col>{DataSave.community_owner_phone}</Col>
</Row>
<Line></Line>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Apply Name:</Col>
<Col span={3}>{DataSave.apply_name}</Col>
<Col>Phone:</Col>
<Col>{DataSave.apply_name_phone}</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Relationship:</Col>
<Col>{apply_relation_owner[parseInt(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>
<Line></Line>
{DataSave.apply_status === 0 ? (
<Form ref={formRef} name="basic" onFinish={onFinish}>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Examine:</Col>
<Col span={4}>
<Form.Item
name="applyStatus"
rules={[{ required: true, message: 'Please select the reply result!' }]}
>
<Radio.Group>
<Radio.Button value={'1'}>Agree</Radio.Button>
<Radio.Button style={{ marginLeft: 10 }} value={'2'}>
Refuse
</Radio.Button>
</Radio.Group>
</Form.Item>
</Col>
</Row>
<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'}>Receive</Radio>
</Radio.Group>
</Form.Item>
</Col>
</Row>
<Form.Item>
<Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Form>
) : (
<>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Examine:</Col>
<Col span={4}>
<Radio.Group value={DataSave.apply_status === 2 ? '2' : '1'}>
<Radio.Button value={'1'}>Agree</Radio.Button>
<Radio.Button style={{ marginLeft: 10 }} value={'2'}>
Refuse
</Radio.Button>
</Radio.Group>
</Form.Item>
</Col>
</Row>
<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'}>Receive</Radio>
</Radio.Group>
</Form.Item>
</Col>
</Row>
<Form.Item>
<Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Form>
) : (
<>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Examine:</Col>
<Col span={4}>
<Radio.Group value={DataSave.apply_status === 2 ? '2' : '1'}>
<Radio.Button value={'1'}>Agree</Radio.Button>
<Radio.Button style={{ marginLeft: 10 }} value={'2'}>
Refuse
</Radio.Button>
</Radio.Group>
</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Reply:</Col>
<Col>
<TextArea
disabled
value={DataSave.reply_content}
style={{ width: 300, height: 100, padding: 8 }}
></TextArea>
</Col>
</Row>
{DataSave.apply_status === 1 ? (
<Form ref={formRef} name="basic" onFinish={onFinish}>
</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Reply:</Col>
<Col>
<TextArea
disabled
value={DataSave.reply_content}
style={{ width: 300, height: 100, padding: 8 }}
></TextArea>
</Col>
</Row>
{DataSave.apply_status === 1 ? (
<Form ref={formRef} name="basic" onFinish={onFinish}>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Received:</Col>
<Col span={4}>
<Form.Item name="applyStatus">
<Radio.Group>
<Radio value={'3'}>Receive</Radio>
</Radio.Group>
</Form.Item>
</Col>
</Row>
<Form.Item>
<Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Form>
) : (
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Received:</Col>
<Col span={4}>
<Form.Item name="applyStatus">
<Radio.Group>
<Radio value={'3'}>Receive</Radio>
</Radio.Group>
</Form.Item>
<Radio.Group value={DataSave.apply_status === 3 ? '3' : ''}>
<Radio value={'3'}>Receive</Radio>
</Radio.Group>
</Col>
</Row>
<Form.Item>
<Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Form>
) : (
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Received:</Col>
<Col span={4}>
<Radio.Group value={DataSave.apply_status === 3 ? '3' : ''}>
<Radio value={'3'}>Receive</Radio>
</Radio.Group>
</Col>
</Row>
)}
</>
)}
</>
) : null}
</div>
)}
</>
)}
</>
) : null}
</div>
</Spin>
);
};
......
......@@ -22,32 +22,35 @@ const Renovation = (props: any) => {
[2, 'Rejected'],
];
const { dispatch, Data8, location } = props;
const [loading, setLoading] = useState(false);
const [readyData, setReadyData] = useState(null);
console.log(Data8);
const columns = objectColumns([
['Community', 'community_name'],
['Applicant', 'applyfor_name'],
['Community', 'communityName'],
['Applicant', 'applyforName'],
[
'Unit',
null,
(text: any, record: any) => (
<div>
{record.community_build_decorate}#{record.community_floor_decorate}-
{record.community_room_decoate}
{record.communityBuildDecorate}#{record.communityFloorDecorate}-
{record.communityRoomDecoate}
</div>
),
],
['Content', 'decoration_content', (text: any) => <div>{stringTab(text)}</div>],
['Request Time', 'create_time', (text: any) => <div>{timestampToTime(text.time)}</div>],
['Content', 'decorationContent', (text: any) => <div>{stringTab(text)}</div>],
['Request Time', 'createTime', (text: any) => <div>{timestampToTime(text.time)}</div>],
[
'status',
'decoration_status',
'decorationStatus',
(text: any) => <div>{decoration_status[parseInt(text)][1]}</div>,
],
[
'Actions',
'decoration_status',
'decorationStatus',
(text: any, record: any) => (
<Space size="middle">
{' '}
......@@ -56,8 +59,6 @@ const Renovation = (props: any) => {
),
],
]);
const { dispatch, Data8, location } = props;
useEffect(() => {
pageNum = 1;
//分页设置
......
......@@ -51,9 +51,7 @@ const RenovationDetail = (props: any) => {
};
RA(33, tmp, module, dispatch);
// message.success('Success Operation!');
// history.push('/CommercialService/RenovationApplication');
// history.go(-1);
setLoading(true);
};
return (
......@@ -63,45 +61,45 @@ const RenovationDetail = (props: any) => {
<>
<TitleBack
sublist={[
'Status : ' + decoration_status[DataSave.decoration_status][1],
'Time : ' + timestampToTime(DataSave.create_time.time),
'Status : ' + decoration_status[DataSave.decorationStatus][1],
'Time : ' + timestampToTime(DataSave.createTime.time),
]}
title={DataSave.decoration_status === 0 ? 'Renovation Reply' : 'Renovation Detail'}
title={DataSave.decorationStatus === 0 ? 'Renovation Reply' : 'Renovation Detail'}
></TitleBack>
<Row gutter={8}>
<Col>Community:</Col>
<Col span={3}>{DataSave.community_name}</Col>
<Col span={3}>{DataSave.communityName}</Col>
<Col>Unit:</Col>
<Col>
{DataSave.community_build_decorate}#{DataSave.community_floor_decorate}-
{DataSave.community_room_decoate}
{DataSave.communityBuildDecorate}#{DataSave.communityFloorDecorate}-
{DataSave.communityRoomDecoate}
</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col>Address:</Col>
<Col>{DataSave.ownerAddress}</Col>
<Col>{DataSave.tosCommunityModel.residentialAddress}</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col>Owner Name:</Col>
<Col span={3}>{DataSave.applyfor_name}</Col>
<Col span={3}>{DataSave.applyforName}</Col>
<Col>Phone:</Col>
<Col>{DataSave.contact_phone}</Col>
<Col>{DataSave.contactPhone}</Col>
</Row>
<Line></Line>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Contract Name:</Col>
<Col span={3}>{DataSave.contact_name}</Col>
<Col span={3}>{DataSave.contactName}</Col>
<Col span={3}>Phone:</Col>
<Col>{DataSave.contact_phone}</Col>
<Col>{DataSave.contactPhone}</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Time:</Col>
<Col span={3}>{timestampToTime(DataSave.decorationBegin_time.time)}</Col>
<Col>{timestampToTime(DataSave.decorationEnd_time.time)}</Col>
<Col span={3}>{timestampToTime(DataSave.decorationBeginTime)}</Col>
<Col>{timestampToTime(DataSave.decorationEndTime)}</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Reason:</Col>
......@@ -109,14 +107,14 @@ const RenovationDetail = (props: any) => {
<TextArea
autoSize
disabled
value={DataSave.decoration_content}
value={DataSave.decorationContent}
style={{ width: 300, minHeight: 100, padding: 8, resize: 'none' }}
></TextArea>
</Col>
</Row>
<Line></Line>
{DataSave.decoration_status === 0 ? (
{DataSave.decorationStatus === '0' ? (
<>
<Form ref={formRef} name="basic" onFinish={onFinish}>
<Row gutter={8} style={{ marginTop: 16 }}>
......@@ -155,17 +153,17 @@ const RenovationDetail = (props: any) => {
<>
<Row>
<Col span={3}>replier:</Col>
<Col span={3}>{DataSave.reply_name}</Col>
<Col span={3}>{DataSave.replyName}</Col>
<Col span={3}>Phone: </Col>
<Col>{DataSave.reply_phone}</Col>
<Col>{DataSave.replyPhone}</Col>
</Row>
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Approval For Application:</Col>
<Col>
<Radio.Group value={DataSave.decoration_status}>
<Radio.Button value={1}>Agree</Radio.Button>{' '}
<Radio.Button style={{ marginLeft: 10 }} value={2}>
<Radio.Group value={DataSave.decorationStatus}>
<Radio.Button value={'1'}>Agree</Radio.Button>{' '}
<Radio.Button style={{ marginLeft: 10 }} value={'2'}>
Reject
</Radio.Button>
</Radio.Group>
......@@ -178,7 +176,7 @@ const RenovationDetail = (props: any) => {
<TextArea
style={{ width: 300, minHeight: 100, padding: 8, resize: 'none' }}
disabled
value={DataSave.reply_view}
value={DataSave.replyView}
></TextArea>
</Col>
</Row>
......
......@@ -3,7 +3,7 @@ import { message, Form, Input, Button } from 'antd';
import styles from './style.less';
interface Password {
password: stirng;
password: string;
}
const Login2 = (props: any) => {
......
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