Commit e1d97977 authored by Sixiang_Zzb's avatar Sixiang_Zzb

测试bug修复

parent 1113e39c
......@@ -183,9 +183,12 @@ export default defineConfig({
{
path: './CommunityMaintenance',
name: 'communitymaintenance',
component: './CommercialService/PropertyServices'
routes: [
{ path: './', component: './CommercialService/PropertyServices' },
{ path: './Detail', component: './CommercialService/Detail' },
{ path: './Edit', component: './CommercialService/Detail' },
],
},
{
path: './OwnerComplaints',
// name: 'ownercomplaints',
......@@ -194,43 +197,51 @@ export default defineConfig({
{
path: './ProblemFeedback',
name: 'problemfeedback',
component: './CommercialService/PropertyServices',
routes: [
{ path: './', component: './CommercialService/PropertyServices' },
{ path: './Detail', component: './CommercialService/Detail' },
{ path: './Edit', component: './CommercialService/Detail' },
]
},
{
path: './RenovationApplication',
name: 'renovationapplication',
component: './CommercialService/Renovation',
routes: [
{ path: './', component: './CommercialService/Renovation' },
{ path: './Detail', component: './CommercialService/RenovationDetail' },
{ path: './Detail', component: './CommercialService/Detail' },
{ path: './Edit', component: './CommercialService/Detail' },
],
},
{ path: './RenovationApplication/Detail', component: './CommercialService/RenovationDetail' },
{
path: './AccessCardApplication',
name: 'accessCardapplication',
component: './CommercialService/Card'
routes: [
{ path: './', component: './CommercialService/Card' },
{ path: './Detail', component: './CommercialService/CardDetail' },
{ path: './Add', component: './CommercialService/CardAdd' },
],
},
{ path: './AccessCardApplication/Detail', component: './CommercialService/CardDetail' },
{ path: './AccessCardApplication/Add', component: './CommercialService/CardAdd' },
{
path: './ReportOnline',
name: 'reportonline',
component: './CommercialService/PropertyServices',
routes: [
{ path: "./", component: './CommercialService/PropertyServices' },
{ path: './Detail', component: './CommercialService/Detail' },
{ path: './Edit', component: './CommercialService/Detail' },
]
},
{
path: './ShelfLifeService',
name: 'shelflifeservice',
component: './CommercialService/PropertyServices'
routes: [
{ path: './', component: './CommercialService/PropertyServices' },
{ path: './Detail', component: './CommercialService/Detail' },
{ path: './Edit', component: './CommercialService/Detail' },
],
},
{ path: './ShelfLifeService/Detail', component: './CommercialService/Detail' },
{ path: './ShelfLifeService/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: './CommunityMaintenance/Detail', component: './CommercialService/Detail' },
{ path: './CommunityMaintenance/Edit', component: './CommercialService/Detail' },
],
},
{
......
......@@ -7,6 +7,7 @@ import TitleBack from '@/components/TitleBack/TitleBack';
import Line from '@/components/Line/Line';
import TextArea from 'antd/lib/input/TextArea';
import * as moment from 'moment';
import { RadioChangeEvent } from 'antd/lib/radio';
const module = 'CommunityService';
......@@ -26,7 +27,15 @@ const CardDetail = (props: any) => {
const [loading, setLoading] = useState(false);
const [listData, setListData] = useState(null) as any;
const [onwerDetail, setOnwerDetail] = useState(null) as any;
const [isShowText, setIsShowText] = useState(false);
const onRadioChange = (e: RadioChangeEvent) => {
if (e.target.value === '2') {
setIsShowText(true);
} else {
setIsShowText(false);
}
};
useEffect(() => {
if (location.query) {
setLoading(true);
......@@ -43,6 +52,7 @@ const CardDetail = (props: any) => {
useEffect(() => {
if (DataSaveDetail) {
console.log(DataSaveDetail);
setListData(DataSaveDetail.data.rows.list[0]);
setOnwerDetail(DataSaveDetail.data.rows.onwerDetail);
setLoading(false);
......@@ -71,11 +81,9 @@ const CardDetail = (props: any) => {
: values.replyContent,
type: '7',
};
RA(34, tmp, module, dispatch);
setLoading(true);
};
return (
<Spin size="large" spinning={loading}>
<div style={{ width: '100%', minWidth: 1020, padding: 34, backgroundColor: '#ffffff' }}>
......@@ -150,7 +158,7 @@ const CardDetail = (props: any) => {
},
]}
>
<Radio.Group>
<Radio.Group onChange={onRadioChange}>
<Radio.Button value="1">Approve</Radio.Button>
<Radio.Button style={{ marginLeft: 10 }} value="2">
Reject
......@@ -165,7 +173,7 @@ const CardDetail = (props: any) => {
<Col>
<Form.Item
name="replyContent"
rules={[{ required: true, max: 300, message: '*it is required!' }]}
rules={[{ required: isShowText, max: 300, message: '*it is required!' }]}
>
<TextArea style={{ width: 300, height: 100, padding: 8 }} />
</Form.Item>
......@@ -184,11 +192,16 @@ const CardDetail = (props: any) => {
</Form.Item>
</Col>
</Row>
<Row>
<Col span={3} />
<Col>
<Form.Item>
<Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Col>
</Row>
</Form>
) : (
<>
......@@ -222,7 +235,12 @@ const CardDetail = (props: any) => {
<TextArea
disabled
value={listData.reply_content}
style={{ width: 300, height: 100, padding: 8 }}
style={{
width: 300,
height: 100,
padding: 8,
color: listData.apply_status === 2 ? 'red' : '',
}}
/>
</Col>
</Row>
......@@ -241,11 +259,16 @@ const CardDetail = (props: any) => {
</Form.Item>
</Col>
</Row>
<Row>
<Col span={3} />
<Col>
<Form.Item>
<Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Col>
</Row>
</Form>
) : (
<Row gutter={8} style={{ marginTop: 16 }}>
......
......@@ -6,6 +6,7 @@ import TitleBack from '@/components/TitleBack/TitleBack';
import Line from '@/components/Line/Line';
import TextArea from 'antd/lib/input/TextArea';
import { timestampToTime } from '@/utils/time';
import { RadioChangeEvent } from 'antd/lib/radio';
const module = 'CommunityService';
const decoration_status = [
......@@ -20,6 +21,15 @@ const RenovationDetail = (props: any) => {
const [loading, setLoading] = useState(false);
const [listData, setListData] = useState(null) as any;
const [onwerDetail, setOnwerDetail] = useState(null) as any;
const [isShowText, setIsShowText] = useState(false);
const onRadioChange = (e: RadioChangeEvent) => {
if (e.target.value === '2') {
setIsShowText(true);
} else {
setIsShowText(false);
}
};
useEffect(() => {
// 发起请求拿取数据
......@@ -151,7 +161,7 @@ const RenovationDetail = (props: any) => {
},
]}
>
<Radio.Group>
<Radio.Group onChange={onRadioChange}>
<Radio.Button value="1">Approve</Radio.Button>{' '}
<Radio.Button style={{ marginLeft: 10 }} value="2">
Reject
......@@ -166,17 +176,23 @@ const RenovationDetail = (props: any) => {
<Col>
<Form.Item
name="replyView"
rules={[{ required: true, max: 300, message: '*it is required!' }]}
rules={[{ required: isShowText, max: 300, message: '*it is required!' }]}
>
<TextArea style={{ width: 300, height: 100, padding: 8 }} />
</Form.Item>
</Col>
</Row>
<Row>
<Col span={3} />
<Col>
<Form.Item>
<Button type="primary" htmlType="submit">
Submit
</Button>
</Form.Item>
</Col>
</Row>
</Form>
</>
) : (
......@@ -210,7 +226,13 @@ const RenovationDetail = (props: any) => {
<Col span={3}>Reply:</Col>
<Col>
<TextArea
style={{ width: 300, minHeight: 100, padding: 8, resize: 'none' }}
style={{
width: 300,
minHeight: 100,
padding: 8,
resize: 'none',
color: listData.decorationStatus === '2' ? 'red' : '',
}}
disabled
value={listData.replyView}
/>
......
......@@ -146,7 +146,8 @@ const UsersAdd = (props: any) => {
</div>
</div>
<Line />
<Form.Item>
<Form.Item style={{ marginLeft: 146 }}>
<Button type="primary" htmlType="submit">
Submit
</Button>
......
......@@ -238,7 +238,7 @@ const Edit = (props: any) => {
</div>
<div className={styles.line} />
<Form.Item>
<Form.Item style={{ marginLeft: 190 }}>
<Button type="primary" htmlType="submit">
Submit
</Button>
......
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