Commit 6e123393 authored by Sixiang_Zzb's avatar Sixiang_Zzb

测试问题修复

parent 3bfc14e6
......@@ -183,12 +183,9 @@ export default defineConfig({
{
path: './CommunityMaintenance',
name: 'communitymaintenance',
routes: [
{ path: './', component: './CommercialService/PropertyServices' },
{ path: './Detail', component: './CommercialService/Detail' },
{ path: './Edit', component: './CommercialService/Detail' },
],
component: './CommercialService/PropertyServices'
},
{
path: './OwnerComplaints',
// name: 'ownercomplaints',
......@@ -202,20 +199,16 @@ export default defineConfig({
{
path: './RenovationApplication',
name: 'renovationapplication',
routes: [
{ path: './', component: './CommercialService/Renovation' },
{ path: './Detail', component: './CommercialService/RenovationDetail' },
],
component: './CommercialService/Renovation',
},
{ path: './RenovationApplication/Detail', component: './CommercialService/RenovationDetail' },
{
path: './AccessCardApplication',
name: 'accessCardapplication',
routes: [
{ path: './', component: './CommercialService/Card' },
{ path: './Detail', component: './CommercialService/CardDetail' },
{ path: './Add', component: './CommercialService/CardAdd' },
],
component: './CommercialService/Card'
},
{ path: './AccessCardApplication/Detail', component: './CommercialService/CardDetail' },
{ path: './AccessCardApplication/Add', component: './CommercialService/CardAdd' },
{
path: './ReportOnline',
name: 'reportonline',
......@@ -224,12 +217,10 @@ export default defineConfig({
{
path: './ShelfLifeService',
name: 'shelflifeservice',
routes: [
{ path: './', component: './CommercialService/PropertyServices' },
{ path: './Detail', component: './CommercialService/Detail' },
{ path: './Edit', component: './CommercialService/Detail' },
],
component: './CommercialService/PropertyServices'
},
{ 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' },
......@@ -238,6 +229,8 @@ export default defineConfig({
{ 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' },
],
},
{
......
import React, { useEffect } from 'react';
import { connect } from 'umi';
import SearchOptions from './SearchOptions';
import SearchOptionsTow from './SearchOptionsTow';
const SearchOptionsCommnity = (props: any) => {
......@@ -37,7 +36,7 @@ const SearchOptionsCommnity = (props: any) => {
extendName={extendName}
def={defaultName}
type={type}
></SearchOptionsTow>
/>
) : null}
</>
);
......
......@@ -6,25 +6,36 @@
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\SearchOptions\SearchOptionsTow.tsx
*/
import React from 'react';
import React, { useEffect, useState } from 'react';
import { Select } from 'antd';
const { Option } = Select;
const SearchOptionsTow = (porps: any) => {
const { list, extendName, def, type, disabled } = porps;
const [value, setValue] = useState(undefined);
const options = list.map((d: any, index: number) => (
<Option value={d} key={index}>
{d}
</Option>
));
function onChange(value: any) {
// console.log(`selected ${value}`);
if (!value) {
value = '';
} else {
setValue(value);
}
extendName(value);
}
useEffect(() => {
if (def) {
setValue(def);
} else {
setValue(undefined);
}
}, [def]);
return (
<div>
{type ? (
......@@ -37,7 +48,7 @@ const SearchOptionsTow = (porps: any) => {
placeholder="Community Name"
optionFilterProp="children"
onChange={onChange}
defaultValue={def ? def : null}
value={value}
disabled={disabled}
>
{options}
......@@ -50,7 +61,7 @@ const SearchOptionsTow = (porps: any) => {
placeholder="Community Name"
optionFilterProp="children"
onChange={onChange}
defaultValue={def ? def : null}
value={value}
disabled={disabled}
>
{options}
......
import React, { useState, useEffect } from 'react';
import { connect } from 'umi';
import { Input, Row, Col, Form, Select, Button, DatePicker } from 'antd';
import { SearchOutlined } from '@ant-design/icons';
import SearchOptionsCommnity from '../SearchOptions/SearchOptionsCommnity';
import SelectOptions from '../SelectOptions/index';
import { Input, Row, Col, Form, Select, Button, DatePicker } from 'antd';
const { Option } = Select;
import SelectOptions from '../../components/SelectOptions/index';
import SearchOptionsCommnity from '../SearchOptions/SearchOptionsCommnity';
const TitleSearch = (props: any) => {
const {
dispatch,
......@@ -58,7 +56,7 @@ const TitleSearch = (props: any) => {
useEffect(() => {
if (CommunityList != null) {
var tmp = {};
const tmp = {};
tmp[community] = CommunityList;
// props.onSubmit(tmp) 禁用 改用组件初始化
setCommunitys(CommunityList);
......@@ -73,13 +71,10 @@ const TitleSearch = (props: any) => {
if (community) {
values[community] = communitys;
}
console.log('Success:', values);
props.onSubmit(values);
};
const onFinishFailed = (errorInfo: any) => {
console.log('Failed:', errorInfo);
};
const onFinishFailed = () => {};
const onChange = (date: any, dateString: string) => {
setDate(dateString);
......@@ -110,8 +105,8 @@ const TitleSearch = (props: any) => {
<Form form={form} name="basic" onFinish={onFinish} onFinishFailed={onFinishFailed}>
<Row gutter={32}>
{communitySelect != null ? (
<Col key={'communitySelect_'}>
<Form.Item name={'communityName'}>
<Col key="communitySelect_">
<Form.Item name="communityName">
<SearchOptionsCommnity
defaultName={defalueName}
titleSearch={true}
......@@ -149,7 +144,7 @@ const TitleSearch = (props: any) => {
<Select
style={{ width: 160 }}
placeholder={item.name[1]}
allowClear={true}
allowClear
defaultValue={item.default}
>
{item.data.map((word) => {
......@@ -166,7 +161,7 @@ const TitleSearch = (props: any) => {
})
: null}
{time != null ? (
<Col key={'datePicker_'}>
<Col key="datePicker_">
{' '}
<DatePicker placeholder={time[1]} onChange={onChange} />
</Col>
......
......@@ -150,7 +150,7 @@ const BasicLayout: React.FC<BasicLayoutProps> = (props) => {
<span>{route.breadcrumbName}</span>
);
}}
//footerRender={() => defaultFooterDom}
// footerRender={() => defaultFooterDom}
menuDataRender={menuDataRender}
rightContentRender={() => <RightContent />}
{...props}
......
......@@ -83,15 +83,14 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
];
// 用户重新打开需要重新登录
let time = localStorage.getItem('loginTime');
const time = localStorage.getItem('loginTime');
const tokenLogin = time ? JSON.parse(time) : false;
// 登录
if (history.location.pathname == '/') {
var isLogin = false;
const isLogin = false;
console.log(getCookie('token'));
if (getCookie('token').length != 0) {
if (getCookie('token').length !== 0) {
isLogin = true;
}
const queryString = stringify({
......@@ -107,7 +106,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
// 在判断权限
const permission = JSON.parse(localStorage.getItem('permission') || '[]');
let perObj = perList.filter((obj) => {
const perObj = perList.filter((obj) => {
return obj.path === location.pathname;
});
......@@ -123,7 +122,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
// 退出登录
const key = 'outLogin';
message.warning({ content: 'Expired login !', key });
setTimeout(function () {
setTimeout(() => {
logOut();
}, 1000);
......
......@@ -15,25 +15,25 @@ export interface UserLayoutProps extends Partial<ConnectProps> {
const UserLayout: React.FC<UserLayoutProps> = (props) => {
const {
route = {
routes: [],
},
// route = {
// routes: [],
// },
children,
location = {
pathname: '',
},
// location = {
// pathname: '',
// },
result,
dispatch,
// dispatch,
} = props;
const { routes = [] } = route;
const { formatMessage } = useIntl();
const { breadcrumb } = getMenuData(routes);
const title = getPageTitle({
pathname: location.pathname,
formatMessage,
breadcrumb,
...props,
});
// const { routes = [] } = route;
// const { formatMessage } = useIntl();
// const { breadcrumb } = getMenuData(routes);
// const title = getPageTitle({
// pathname: location.pathname,
// formatMessage,
// breadcrumb,
// ...props,
// });
return (
<div className={styles.container + ' ' + (result ? styles.active : '')}>
......
import * as service from '@/services/tos';
import { message } from 'antd';
import { Link, useIntl, connect, Dispatch, history } from 'umi';
import { routerRedux } from 'dva/router';
import { timestampToTime, timestampToTime4 } from '@/utils/time';
import { history } from 'umi';
import { timestampToTime4 } from '@/utils/time';
import { picFromate, Fromate } from '@/utils/method';
export default {
......@@ -52,37 +49,37 @@ export default {
},
effects: {
//预订设施查询
// 预订设施查询
*RA({ playload }: any, { call, put }: any) {
switch (playload.index) {
case 40:
{
var Data = null;
const Data = null;
yield put({ type: 'returnPage', Data });
}
break;
default:
break;
}
const resp = yield call(service.RA, playload);
console.log(resp);
if (resp.code == 500 || resp.error_code != '0000') {
if (resp.code === 500 || resp.error_code !== '0000') {
// window.location.href = '/500';
message.error(`${resp.error_code}:${resp.error_msg}`);
}
if (resp.error_code != '0000') {
if (resp.error_code !== '0000') {
message.error(`${resp.error_code}:${resp.error_msg}`);
} else {
switch (playload.index) {
case 21:
{
var tmp = resp.data.tosOwerModel || resp.data.tosOwnerRelationModel;
var tmp2 = resp.data;
console.log(resp);
const tmp = resp.data.tosOwerModel || resp.data.tosOwnerRelationModel;
const tmp2 = resp.data;
if (!tmp) {
message.error('Data loading error!');
history.go(-1);
history.goBack();
return;
}
var CurDataDetail: {
const CurDataDetail: {
community: string;
address: string;
home: string;
......@@ -121,86 +118,84 @@ export default {
case 33:
case 34:
case 22:
{
message.success('Success Operation!', 3);
history.go(-1);
// history.push("/CommercialService/CommunityMaintenance")
}
// message.success('Success Operation!', 3);
history.go(-1);
// history.push("/CommercialService/CommunityMaintenance")
break;
case 23:
{
let Data8 = resp;
const Data8 = resp;
yield put({ type: 'returnPage8', Data8 });
}
break;
case 31:
{
let Data7 = resp;
const Data7 = resp;
yield put({ type: 'returnPage7', Data7 });
}
break;
case 35:
{
let Result = resp;
const Result = resp;
yield put({ type: 'returnResult', Result });
}
break;
case 37:
{
let DataSaveDetail = resp;
const DataSaveDetail = resp;
yield put({ type: 'returnDataSaveDetail', DataSaveDetail });
}
break;
case 36:
{
let DataSaveDetail = resp;
const DataSaveDetail = resp;
yield put({ type: 'returnDataSaveDetail', DataSaveDetail });
}
break;
case 40:
{
let Data = resp;
const Data = resp;
yield put({ type: 'returnPage', Data });
}
break;
default:
break;
}
}
},
*SA({ playload }: any, { call, put }: any) {
var DataSave = playload;
const DataSave = playload;
yield put({ type: 'returnDataSave', DataSave });
},
*setCurData({ playload }: any, { call, put }: any) {
var CurData = playload;
const CurData = playload;
yield put({ type: 'returnCurData', CurData });
},
*setCurDataDetail({ playload }: any, { call, put }: any) {
var CurDataDetail = null;
const CurDataDetail = null;
yield put({ type: 'returnCurDataDetail', CurDataDetail });
},
*ResultClear({ }, { put }: any) {
var Result = null;
console.log('清除');
const Result = null;
yield put({ type: 'returnResult', Result });
},
*DataSaveDetailClear({ }, { put }: any) {
console.log('清楚数据');
let DataSaveDetail = null;
const DataSaveDetail = null;
yield put({ type: 'returnDataSaveDetail', DataSaveDetail });
},
*DataSaveClear({ }, { put }: any) {
let DataSave = null;
const DataSave = null;
yield put({ type: 'returnDataSave', DataSave });
},
*Data7Clear({ }, { put }: any) {
let Data7 = null;
const Data7 = null;
yield put({ type: 'returnPage7', Data7 });
},
......
......@@ -17,15 +17,14 @@ export default {
},
effects: {
//获取物业费列表
// 获取物业费列表
*get({ playload }: any, { call, put }: any) {
const resp = yield call(service.get, playload);
console.log(resp);
let Data = resp.data;
const Data = resp.data;
yield put({ type: 'returnData', Data });
},
*getById({ playload }: any, { call, put }: any) {
let CurData = playload;
const CurData = playload;
yield put({ type: 'returnCurData', CurData });
},
},
......
import React, { useState, useEffect, useRef } from 'react';
import { Input, Tabs, Table, Space, Button, message } from 'antd';
const { TabPane } = Tabs;
import React, { useState, useEffect } from 'react';
import { Table, Space, Button, message } from 'antd';
import { connect, history } from 'umi';
import { RA, urlEncode, filterObjbyTg, Clear } from '@/utils/method';
import { objectColumns } from '@/utils/string';
import { timestampToTime } from '@/utils/time';
import Login from '../user/login/components/Login';
import TitleSearch from '../../components/TitleSearch/TitleSearch';
import { RA, SA, urlEncode, filterObj, filterObjbyTg, Clear } from '@/utils/method';
let readyData: any = {
communityName: '',
ownerName: '',
......@@ -61,7 +55,7 @@ const Card = (props: any) => {
[
'Account Type',
'apply_relation_owner',
(text: string, record: any) => <div>{apply_relation[text][1]}</div>,
(text: string) => <div>{apply_relation[text][1]}</div>,
],
[
'Application Time',
......@@ -73,7 +67,7 @@ const Card = (props: any) => {
[
'Status',
'apply_status',
(text: any, record: any) => <Space size="middle">{apply_status[parseInt(text)][1]}</Space>,
(text: any) => <Space size="middle">{apply_status[parseInt(text)][1]}</Space>,
],
[
'Actions',
......@@ -87,13 +81,13 @@ const Card = (props: any) => {
]);
useEffect(() => {
//前置数据
// 前置数据
readyData = {
...location.query,
pageNum: location.query.pageNum ? parseInt(location.query.pageNum) : 1,
};
//获取数据
// 获取数据
setLoading(true);
RA(
31,
......@@ -120,7 +114,7 @@ const Card = (props: any) => {
}
}, [Data7]);
const goToDetail = (values: any, e: any) => {
const goToDetail = (values: any) => {
if (permissionArr.indexOf('30') < 0) {
message.error('No Permissions!!!', 3);
return;
......@@ -136,19 +130,19 @@ const Card = (props: any) => {
history.push('./AccessCardApplication/Add');
};
//页面搜索
// 页面搜索
const ClickTitleSearch = (comment: any) => {
if (comment.handleStatus instanceof Array) {
comment.handleStatus = comment.handleStatus[0];
}
let tmp = filterObjbyTg(comment, ['handleStatus', 'ownerName', 'communityName']);
const tmp = filterObjbyTg(comment, ['handleStatus', 'ownerName', 'communityName']);
tmp['pageNum'] = 1;
history.push(location.pathname + urlEncode(tmp));
};
// 切换页码
const changePage = (values: any) => {
let tmp = {
const tmp = {
...location.query,
pageNum: values.current,
};
......
......@@ -22,8 +22,8 @@ const CardAdd = (props: any) => {
useEffect(() => {
if (Result != null) {
if ((Result.error_code = '0000')) {
message.success('Operation Success!');
if (Result.error_code === '0000') {
// message.success('Operation Success!');
setLoading(false);
ResultClear(module, dispatch);
history.push('/CommercialService/AccessCardApplication');
......@@ -69,17 +69,6 @@ const CardAdd = (props: any) => {
form.resetFields();
}, []);
const checkData2: (rule: any, value: string, cb: any) => void = (rule, value, cb) => {
if (value) {
if (/^[a-zA-Z0-9]+$/g.test(value)) {
cb();
} else {
cb(new Error('Only numbers and letters can be entered!'));
}
}
cb();
};
// 手机号码验证
const phoneNumber: (rule: any, value: string, cb: any) => void = (rule, value, cb) => {
if (value) {
......@@ -94,8 +83,7 @@ const CardAdd = (props: any) => {
return (
<div style={{ width: '100%', minWidth: 1020, padding: 34, backgroundColor: '#ffffff' }}>
<TitleBack title={'New Application For Access Card'}></TitleBack>
<TitleBack title="New Application For Access Card" />
<Form form={form} name="basic" onFinish={onFinish} validateMessages={validateMessages}>
<Spin spinning={loading}>
<Form.Item labelCol={{ span: 3 }} label="Community" style={{ marginBottom: 0 }}>
......@@ -115,7 +103,7 @@ const CardAdd = (props: any) => {
},
]}
>
<Input style={{ width: 80 }} placeholder={'BLK'} />
<Input style={{ width: 80 }} placeholder="BLK" />
</Form.Item>
<div style={{ lineHeight: 2, marginRight: 16 }}>#</div>
<Form.Item
......@@ -130,7 +118,7 @@ const CardAdd = (props: any) => {
},
]}
>
<Input style={{ width: 80 }} placeholder={'Floor'} />
<Input style={{ width: 80 }} placeholder="Floor" />
</Form.Item>
<div style={{ lineHeight: 2, marginRight: 16 }}>-</div>
<Form.Item
......@@ -144,7 +132,7 @@ const CardAdd = (props: any) => {
},
]}
>
<Input style={{ width: 120 }} placeholder={'Room'} />
<Input style={{ width: 120 }} placeholder="Room" />
</Form.Item>
</Input.Group>
</Form.Item>
......@@ -152,9 +140,9 @@ const CardAdd = (props: any) => {
<Form.Item name="zipCode" wrapperCol={{ offset: 3 }} rules={[{ required: true }]}>
<Input
style={{ width: 580 }}
placeholder={'Display the address and postcode automatically according to the'}
placeholder="Display the address and postcode automatically according to the"
disabled
></Input>
/>
</Form.Item>
<Form.Item labelCol={{ span: 3 }} label="Owner" style={{ marginBottom: -40 }}>
......@@ -164,25 +152,25 @@ const CardAdd = (props: any) => {
style={{ marginRight: 20 }}
rules={[{ required: true, max: 30, min: 2 }]}
>
<Input placeholder={'Name'} />
<Input placeholder="Name" />
</Form.Item>
<Form.Item style={{ marginRight: 20 }} label={'Contact Details'}>
<Input hidden={true} />
<Form.Item style={{ marginRight: 20 }} label="Contact Details">
<Input hidden />
</Form.Item>
<Form.Item
name="communityOwnerPhone"
style={{ marginRight: 20 }}
rules={[{ validator: phoneNumber }]}
>
<Input placeholder={'Phone number'} />
<Input placeholder="Phone number" />
</Form.Item>
<Form.Item name="communityOwnerEmail" rules={[{ required: true, type: 'email' }]}>
<Input placeholder={'Email'} />
<Input placeholder="Email" />
</Form.Item>
</Input.Group>
</Form.Item>
<Line></Line>
<Line />
<Form.Item labelCol={{ span: 3 }} label="Applicant" style={{ marginBottom: -40 }}>
<Input.Group compact>
......@@ -191,37 +179,37 @@ const CardAdd = (props: any) => {
style={{ marginRight: 20 }}
rules={[{ required: true, max: 30, min: 2 }]}
>
<Input placeholder={'Name'} />
<Input placeholder="Name" />
</Form.Item>
<Form.Item style={{ marginRight: 20 }} label={'Contact Details'}>
<Input hidden={true} />
<Form.Item style={{ marginRight: 20 }} label="Contact Details">
<Input hidden />
</Form.Item>
<Form.Item
name="applyNamePhone"
style={{ marginRight: 20 }}
rules={[{ validator: phoneNumber }]}
>
<Input placeholder={'Phone number'} />
<Input placeholder="Phone number" />
</Form.Item>
<Form.Item name="applyNameEmail" rules={[{ required: true, type: 'email' }]}>
<Input placeholder={'Email'} />
<Input placeholder="Email" />
</Form.Item>
</Input.Group>
</Form.Item>
{/* label={"Contact Information"} */}
<Form.Item labelCol={{ span: 3 }} name="applyRelationOwner" label={'Relationship'}>
<Form.Item labelCol={{ span: 3 }} name="applyRelationOwner" label="Relationship">
<Relationship />
</Form.Item>
<Form.Item
labelCol={{ span: 3 }}
name="applyReasonContent"
label={'Reason'}
label="Reason"
rules={[{ required: true, max: 500 }]}
>
<TextArea style={{ width: 400 }}></TextArea>
<TextArea style={{ width: 400 }} />
</Form.Item>
<Line></Line>
<Line />
<Form.Item wrapperCol={{ offset: 3 }}>
<Button type="primary" htmlType="submit">
Submit
......
......@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef } from 'react';
import { Spin, Row, Col, Button, Form, Radio, message } from 'antd';
import { connect, history } from 'umi';
import { RA, getCookie, Clear } from '@/utils/method';
import { RA, Clear } from '@/utils/method';
import TitleBack from '@/components/TitleBack/TitleBack';
import Line from '@/components/Line/Line';
import TextArea from 'antd/lib/input/TextArea';
......@@ -42,7 +42,6 @@ const CardDetail = (props: any) => {
}, []);
useEffect(() => {
console.log(DataSaveDetail);
if (DataSaveDetail) {
setListData(DataSaveDetail.data.rows.list[0]);
setOnwerDetail(DataSaveDetail.data.rows.onwerDetail);
......@@ -57,15 +56,10 @@ const CardDetail = (props: any) => {
return;
}
if (values.applyStatus === '2' && !values.replyContent) {
message.error('Replies must be filled in!', 3);
return;
}
const userInfo = localStorage.getItem('userInfo') || '';
const id = JSON.parse(userInfo).userModel.id;
const { id } = JSON.parse(userInfo).userModel;
let tmp = {
const tmp = {
communityId: listData.communityId,
id: listData.id,
ownerId: listData.ownerId,
......@@ -81,7 +75,6 @@ const CardDetail = (props: any) => {
RA(34, tmp, module, dispatch);
setLoading(true);
};
console.log(listData);
return (
<Spin size="large" spinning={loading}>
......@@ -94,7 +87,7 @@ const CardDetail = (props: any) => {
'Time : ' + moment(listData.create_time.time).format('DD-MM-YYYY'),
]}
title="Access Card Application Details"
></TitleBack>
/>
<Row gutter={8}>
<Col>Community:</Col>
......@@ -119,7 +112,7 @@ const CardDetail = (props: any) => {
<Col span={2}>{onwerDetail.owerPhone}</Col>
<Col>{onwerDetail.owerEmail}</Col>
</Row>
<Line></Line>
<Line />
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Applicant:</Col>
<Col span={3}>{listData.apply_name}</Col>
......@@ -138,10 +131,10 @@ const CardDetail = (props: any) => {
disabled
value={listData.apply_reason_content}
style={{ width: 300, height: 100, padding: 8 }}
></TextArea>
/>
</Col>
</Row>
<Line></Line>
<Line />
{listData.apply_status === 0 ? (
<Form ref={formRef} name="basic" onFinish={onFinish}>
......@@ -158,8 +151,8 @@ const CardDetail = (props: any) => {
]}
>
<Radio.Group>
<Radio.Button value={'1'}>Approve</Radio.Button>
<Radio.Button style={{ marginLeft: 10 }} value={'2'}>
<Radio.Button value="1">Approve</Radio.Button>
<Radio.Button style={{ marginLeft: 10 }} value="2">
Reject
</Radio.Button>
</Radio.Group>
......@@ -170,8 +163,11 @@ const CardDetail = (props: any) => {
<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
name="replyContent"
rules={[{ required: true, max: 300, message: '*it is required!' }]}
>
<TextArea style={{ width: 300, height: 100, padding: 8 }} />
</Form.Item>
</Col>
</Row>
......@@ -183,7 +179,7 @@ const CardDetail = (props: any) => {
<Col span={4}>
<Form.Item name="applyStatus">
<Radio.Group>
<Radio value={'3'}>Receive</Radio>
<Radio value="3">Receive</Radio>
</Radio.Group>
</Form.Item>
</Col>
......@@ -206,8 +202,14 @@ const CardDetail = (props: any) => {
<Col span={3}>Examine:</Col>
<Col span={5}>
<Radio.Group value={listData.apply_status === 2 ? '2' : '1'}>
<Radio.Button value={'1'}>Approve</Radio.Button>
<Radio.Button style={{ marginLeft: 10 }} value={'2'}>
<Radio.Button value="1" disabled={listData.apply_status === 2}>
Approve
</Radio.Button>
<Radio.Button
style={{ marginLeft: 10 }}
value="2"
disabled={listData.apply_status !== 2}
>
Reject
</Radio.Button>
</Radio.Group>
......@@ -221,7 +223,7 @@ const CardDetail = (props: any) => {
disabled
value={listData.reply_content}
style={{ width: 300, height: 100, padding: 8 }}
></TextArea>
/>
</Col>
</Row>
......@@ -234,7 +236,7 @@ const CardDetail = (props: any) => {
<Col span={4}>
<Form.Item name="applyStatus">
<Radio.Group>
<Radio value={'3'}>Receive</Radio>
<Radio value="3">Receive</Radio>
</Radio.Group>
</Form.Item>
</Col>
......@@ -251,8 +253,11 @@ const CardDetail = (props: any) => {
Card Received:
</Col>
<Col span={4}>
<Radio.Group value={listData.apply_status === 3 ? '3' : ''}>
<Radio value={'3'}>Receive</Radio>
<Radio.Group
value={listData.apply_status === 3 ? '3' : ''}
disabled={listData.apply_status !== 3}
>
<Radio value="3">Receive</Radio>
</Radio.Group>
</Col>
</Row>
......
import React, { useState, useEffect, useRef } from 'react';
import styles from './css/Detail.less';
import { Form, Row, Col, Spin, Button, Descriptions, message } from 'antd';
import { connect } from 'umi';
import TextArea from 'antd/lib/input/TextArea';
import { getCookie } from '@/utils/method';
import { validateMessages } from '@/utils/params';
import Line from '../../components/Line/Line';
import TitleBack from '../../components/TitleBack/TitleBack';
import PictureOptionsRow from '../../components/PictureOptions/PictureOptionsRow';
import { getCookie } from '@/utils/method';
import { validateMessages } from '@/utils/params';
import styles from './css/Detail.less';
const treatStatus = ['Pending', 'Processed'];
......@@ -19,7 +17,7 @@ const Detail = (props: any) => {
const { dispatch, location, CurDataDetail, loadding } = props;
const fromRef = useRef(null) as any;
const RA = (index: any, values: any) => {
dispatch({ type: 'CommunityService/RA', playload: { index: index, body: values } });
dispatch({ type: 'CommunityService/RA', playload: { index, body: values } });
};
const [curString, setCurString] = useState({ readyState: false });
......@@ -61,17 +59,15 @@ const Detail = (props: any) => {
useEffect(() => {
setCurString({ readyState: true });
console.log('页面准备好了');
}, []);
useEffect(() => {
if (CurDataDetail != null && curString.readyState == true) {
if (CurDataDetail != null && curString.readyState === true) {
if (!editorFlag) {
var tmp = { replyContent: CurDataDetail.replyContent, file: CurDataDetail.replyImgUrl };
const tmp = { replyContent: CurDataDetail.replyContent, file: CurDataDetail.replyImgUrl };
fromRef.current.setFieldsValue(tmp);
}
setLoading(false);
console.log(CurDataDetail);
}
}, [CurDataDetail]);
......@@ -105,16 +101,15 @@ const Detail = (props: any) => {
}
}
var val = values;
const val = values;
val.handleName = getCookie('name');
val.handleContacts = getCookie('phone');
val.type = '' + location.query.serviceType;
val.type = `${location.query.serviceType}`;
val.id = location.query.id;
val.userId = location.query.user_id;
val.communityId = location.query.community_id;
val.handleStatus = '1';
// val.file=fileList
console.log('Success:', val);
RA(22, val);
setLoading(true);
};
......@@ -208,7 +203,7 @@ const Detail = (props: any) => {
</Col>
</Row>
<Row gutter={16}>
<Col span={3}></Col>
<Col span={3} />
<Col>
{/* putSubmit={PictureOptionsRowRef} */}
<Form.Item name="file">
......@@ -220,7 +215,7 @@ const Detail = (props: any) => {
imageType: 'tosCommunityImageReply',
extends: '',
}}
over={CurDataDetail.replyImgUrl.length > 0 ? true : false}
over={CurDataDetail.replyImgUrl.length > 0}
/>
</Form.Item>
</Col>
......@@ -229,7 +224,7 @@ const Detail = (props: any) => {
<>
<Line />
<Row>
<Col span={3}></Col>
<Col span={3} />
<Col>
<Form.Item>
<Button disabled={loadding} type="primary" htmlType="submit">
......
import React, { useState, useEffect } from 'react';
import { connect, history } from 'umi';
import { Table, Space, message } from 'antd';
import { RA, urlEncode, filterObj, filterObjbyTg } from '@/utils/method';
import styles from './css/index.less';
import { Input, Menu, Table, Space, Upload, message, Pagination, Button } from 'antd';
import { Link, useIntl, connect, Dispatch, history } from 'umi';
import { timestampToTime3 } from '../../utils/time';
import TitleSearch from '../../components/TitleSearch/TitleSearch';
import { RA, urlEncode, filterObj, filterObjbyTg } from '@/utils/method';
const pathname = [
'CommunityMaintenance', // 小区保养
......@@ -17,10 +14,10 @@ const pathname = [
'ProblemFeedback', // 问题反馈
];
const handle_Status = [
const handleStatus = [
[0, 'Pending'],
[1, 'Processed'],
]; //["未处理","处理","拒绝"] , [2,"Rejected"]
]; // ["未处理","处理","拒绝"] , [2,"Rejected"]
const goToName = ['Reply', 'Detail'];
const module = 'CommunityService';
......@@ -73,15 +70,13 @@ const PropertyServices = (props: any) => {
{
title: 'Submission Time',
dataIndex: 'create_time',
render: (text: any, record: any) => (
<Space size="middle">{timestampToTime3(text.time)}</Space>
),
render: (text: any) => <Space size="middle">{timestampToTime3(text.time)}</Space>,
},
{
title: 'Status',
dataIndex: 'id',
render: (text: any, record: any) => (
<Space size="middle">{handle_Status[record.handle_status][1]}</Space>
<Space size="middle">{handleStatus[record.handle_status][1]}</Space>
),
},
{
......@@ -95,9 +90,7 @@ const PropertyServices = (props: any) => {
},
];
const goToDetail = (value: any, record: any, e: any) => {
console.log(serviceTypeGobal);
const goToDetail = (value: any, record: any) => {
if (serviceTypeGobal === '1') {
if (permissionArr.indexOf('18') < 0) {
message.error('No Permissions!!!', 3);
......@@ -125,10 +118,10 @@ const PropertyServices = (props: any) => {
}
}
//页面递进
// 页面递进
history.push(
location.pathname +
(value == 0 ? '/Edit' : '/Detail') +
(value === 0 ? '/Edit' : '/Detail') +
urlEncode({
serviceType: serviceTypeGobal,
id: record.id,
......@@ -145,73 +138,69 @@ const PropertyServices = (props: any) => {
}, [Data]);
useEffect(() => {
console.log(readyData);
if (location != null) {
//细分类:页面指令
var serviceType = '';
pathname.map((item, index) => {
// 重置数据
readyData = {
handleStatus: '',
ownerName: '',
communityName: '',
};
if (location !== null) {
// 细分类:页面指令
let serviceType = '';
pathname.forEach((item, index) => {
if (location.pathname.indexOf(item) > -1) {
serviceType = '' + (index + 1);
serviceType = `${index + 1}`;
setServiceType(serviceType);
}
});
//分页设置
// 分页设置
if (location.query.pageNum != null) {
pageNum = parseInt(location.query.pageNum);
} else {
pageNum = 1;
}
//前置数据
var tmp: DataType = filterObjbyTg(location.query, [
// 前置数据
const tmp: DataType = filterObjbyTg(location.query, [
'handleStatus',
'ownerName',
'communityName',
]);
console.log(tmp);
tmp.ownerName = tmp.ownerName || '';
tmp.communityName = tmp.communityName || '';
tmp.handleStatus = handle_Status[parseInt(tmp.handleStatus as string)] as Array<string>; //特殊处理
console.log(tmp);
// setReadyData(tmp);
tmp.handleStatus = handleStatus[parseInt(tmp.handleStatus as string)] as Array<string>; //特殊处理
readyData = {
...tmp,
};
//获取数据
// 获取数据
setLoading(true);
RA(
40,
{
serviceType: serviceType,
serviceType,
...tmp,
handleStatus:
location.query.handleStatus != undefined ? parseInt(location.query.handleStatus) : null,
location.query.handleStatus !== undefined
? parseInt(location.query.handleStatus)
: null,
pageNum,
},
module,
dispatch,
);
}
return () => {
readyData = {
...readyData,
handleStatus: '',
ownerName: '',
communityName: '',
};
};
}, [location]);
const PageChange = (values: any) => {
//页面跳转参数
var tmp = filterObjbyTg(location.query, ['handleStatus', 'ownerName', 'communityName']);
// 页面跳转参数
const tmp = filterObjbyTg(location.query, ['handleStatus', 'ownerName', 'communityName']);
tmp['pageNum'] = values.current;
history.push(location.pathname + urlEncode(tmp));
};
const ClickTitleSearch = (comment: any) => {
//页面搜索
// 页面搜索
// comment.serviceType = serviceTypeGobal;
comment.pageNum = 1;
history.push(location.pathname + urlEncode(filterObj(comment)));
......@@ -223,12 +212,12 @@ const PropertyServices = (props: any) => {
communitySelect={true}
listkey={['ownerName']}
list={['Owner Name']}
status={[{ name: ['handleStatus', 'Status'], data: handle_Status }]}
status={[{ name: ['handleStatus', 'Status'], data: handleStatus }]}
defaultValue={readyData}
onSubmit={ClickTitleSearch}
/>
<Table
rowKey={'id'}
rowKey="id"
style={{ marginTop: 16 }}
loading={loading}
columns={columns}
......
import React, { useState, useEffect } from 'react';
import { Table, Space, message } from 'antd';
import { connect, history } from 'umi';
import TitleSearch from '../../components/TitleSearch/TitleSearch';
import { RA, urlEncode, filterObjbyTg } from '@/utils/method';
import { objectColumns, stringTab } from '@/utils/string';
import { timestampToTime } from '@/utils/time';
import TitleSearch from '../../components/TitleSearch/TitleSearch';
const module = 'CommunityService';
let pageNum: any = 1;
const Renovation = (props: any) => {
const permissionArr = JSON.parse(localStorage.getItem('permission') || '');
// const decoration_status = [[0, "待处理"], [1, "已批准"], [2, "已拒绝"]]
const decoration_status = [
// const decorationStatus = [[0, "待处理"], [1, "已批准"], [2, "已拒绝"]]
const decorationStatus = [
[0, 'Pending'],
[1, 'Approved'],
[2, 'Rejected'],
......@@ -25,8 +22,6 @@ const Renovation = (props: any) => {
const [loading, setLoading] = useState(false);
const [readyData, setReadyData] = useState(null);
console.log(Data8);
const columns = objectColumns([
['Community', 'communityName'],
[
......@@ -50,11 +45,7 @@ const Renovation = (props: any) => {
],
['Content', 'decorationContent', (text: any) => <div>{stringTab(text)}</div>],
['Application Time', 'createTime', (text: any) => <div>{timestampToTime(text.time)}</div>],
[
'status',
'decorationStatus',
(text: any) => <div>{decoration_status[parseInt(text)][1]}</div>,
],
['status', 'decorationStatus', (text: any) => <div>{decorationStatus[parseInt(text)][1]}</div>],
[
'Actions',
'decorationStatus',
......@@ -68,27 +59,30 @@ const Renovation = (props: any) => {
]);
useEffect(() => {
pageNum = 1;
//分页设置
// 分页设置
if (location.query.pageNum != null) {
pageNum = location.query.pageNum;
} else {
pageNum = 1;
}
//前置数据
console.log('前置数据');
let tmp: any = filterObjbyTg(location.query, ['handleStatus', 'applyforName', 'communityName']);
tmp.handleStatus = decoration_status[parseInt(tmp.handleStatus)]; //特殊处理
// 前置数据
const tmp: any = filterObjbyTg(location.query, [
'handleStatus',
'applyforName',
'communityName',
]);
tmp.handleStatus = decorationStatus[parseInt(tmp.handleStatus)]; // 特殊处理
setReadyData(tmp);
//获取数据
// 获取数据
setLoading(true);
RA(
23,
{
...tmp,
handleStatus:
location.query.handleStatus != undefined ? parseInt(location.query.handleStatus) : null,
location.query.handleStatus !== undefined ? parseInt(location.query.handleStatus) : null,
pageNum,
},
module,
......@@ -102,14 +96,14 @@ const Renovation = (props: any) => {
}
}, [Data8]);
//页面搜索
// 页面搜索
const ClickTitleSearch = (comment: any) => {
let tmp = filterObjbyTg(comment, ['handleStatus', 'applyforName', 'communityName']);
const tmp = filterObjbyTg(comment, ['handleStatus', 'applyforName', 'communityName']);
pageNum = 1;
history.push(location.pathname + urlEncode(tmp));
};
const goToDetail = (values: any, e: any) => {
const goToDetail = (values: any) => {
if (permissionArr.indexOf('27') < 0) {
message.error('No Permissions!!!', 3);
return;
......@@ -118,8 +112,8 @@ const Renovation = (props: any) => {
};
const PageChange = (values: any) => {
//页面跳转参数
var tmp = filterObjbyTg(location.query, ['handleStatus', 'ownerName', 'communityName']);
// 页面跳转参数
const tmp = filterObjbyTg(location.query, ['handleStatus', 'ownerName', 'communityName']);
tmp['pageNum'] = values.current;
history.push(location.pathname + urlEncode(tmp));
};
......@@ -131,7 +125,7 @@ const Renovation = (props: any) => {
communitySelect={true}
listkey={['applyforName']}
list={['Owner Name']}
status={[{ name: ['handleStatus', 'Status'], data: decoration_status }]}
status={[{ name: ['handleStatus', 'Status'], data: decorationStatus }]}
defaultValue={readyData}
onSubmit={ClickTitleSearch}
/>
......
import React, { useState, useEffect, useRef } from 'react';
import { Row, Col, Button, Form, Radio, message, Spin } from 'antd';
import { connect, history } from 'umi';
const decoration_status = [
[0, 'Pending'],
[1, 'Approved'],
[2, 'Rejected'],
];
import { RA, getCookie, Clear } from '@/utils/method';
import TitleBack from '@/components/TitleBack/TitleBack';
import Line from '@/components/Line/Line';
......@@ -16,6 +8,12 @@ import TextArea from 'antd/lib/input/TextArea';
import { timestampToTime } from '@/utils/time';
const module = 'CommunityService';
const decoration_status = [
[0, 'Pending'],
[1, 'Approved'],
[2, 'Rejected'],
];
const RenovationDetail = (props: any) => {
const { dispatch, DataSaveDetail, location } = props;
const formRef = useRef(null);
......@@ -54,13 +52,13 @@ const RenovationDetail = (props: any) => {
if (
values.decorationStatus === '2' &&
(values.replyView == undefined || values.replyView.trim() === '')
(values.replyView === undefined || values.replyView.trim() === '')
) {
message.warning('Replies must be entered!');
return;
}
var tmp = {
const tmp = {
communityId: listData.communityId,
id: listData.id,
ownerId: listData.ownerId,
......@@ -86,7 +84,7 @@ const RenovationDetail = (props: any) => {
'Time : ' + timestampToTime(listData.createTime.time),
]}
title={listData.decorationStatus === 0 ? 'Renovation Reply' : 'Renovation Detail'}
></TitleBack>
/>
<Row gutter={8}>
<Col>Community:</Col>
......@@ -112,7 +110,7 @@ const RenovationDetail = (props: any) => {
<Col>{onwerDetail.owerEmail}</Col>
</Row>
<Line></Line>
<Line />
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Applicant:</Col>
<Col span={3}>{listData.contactName}</Col>
......@@ -133,10 +131,10 @@ const RenovationDetail = (props: any) => {
disabled
value={listData.decorationContent}
style={{ width: 300, minHeight: 100, padding: 8, resize: 'none' }}
></TextArea>
/>
</Col>
</Row>
<Line></Line>
<Line />
{listData.decorationStatus === '0' ? (
<>
......@@ -154,8 +152,8 @@ const RenovationDetail = (props: any) => {
]}
>
<Radio.Group>
<Radio.Button value={'1'}>Approve</Radio.Button>{' '}
<Radio.Button style={{ marginLeft: 10 }} value={'2'}>
<Radio.Button value="1">Approve</Radio.Button>{' '}
<Radio.Button style={{ marginLeft: 10 }} value="2">
Reject
</Radio.Button>
</Radio.Group>
......@@ -166,8 +164,11 @@ const RenovationDetail = (props: any) => {
<Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Reply:</Col>
<Col>
<Form.Item name="replyView">
<TextArea style={{ width: 300, height: 100, padding: 8 }}></TextArea>
<Form.Item
name="replyView"
rules={[{ required: true, max: 300, message: '*it is required!' }]}
>
<TextArea style={{ width: 300, height: 100, padding: 8 }} />
</Form.Item>
</Col>
</Row>
......@@ -191,8 +192,14 @@ const RenovationDetail = (props: any) => {
<Col span={3}>Approval For Application:</Col>
<Col>
<Radio.Group value={listData.decorationStatus}>
<Radio.Button value={'1'}>Approve</Radio.Button>{' '}
<Radio.Button style={{ marginLeft: 10 }} value={'2'}>
<Radio.Button value="1" disabled={listData.decorationStatus !== '1'}>
Approve
</Radio.Button>{' '}
<Radio.Button
style={{ marginLeft: 10 }}
value="2"
disabled={listData.decorationStatus !== '2'}
>
Reject
</Radio.Button>
</Radio.Group>
......@@ -206,7 +213,7 @@ const RenovationDetail = (props: any) => {
style={{ width: 300, minHeight: 100, padding: 8, resize: 'none' }}
disabled
value={listData.replyView}
></TextArea>
/>
</Col>
</Row>
</>
......
import React, { useState, useEffect, useRef } from 'react';
import styles from './index.less';
import { useIntl, connect, history } from 'umi';
import { Button, Tag, Table, Space, message } from 'antd';
import React, { useState, useEffect } from 'react';
import { connect, history } from 'umi';
import { message } from 'antd';
import { filterObj, urlEncode } from '@/utils/method';
import ProTable, { ProColumns } from '@ant-design/pro-table';
import { timestampToTime } from '../../utils/time';
import { filterObj, urlEncode, filterObjbyTg } from '@/utils/method';
import TitleSearch from '../../components/TitleSearch/TitleSearch';
import styles from './index.less';
import ProTable, { ProColumns } from '@ant-design/pro-table';
interface readyData {
[key: string]: any;
}
......@@ -42,6 +37,11 @@ const ChargeManager = (props: any) => {
const { dispatch, location, Data } = props;
const [loading, setLoading] = useState(false);
// 存储详情页数据
const getById = (values: any) => {
dispatch({ type: 'PropertyManagement/getById', playload: values });
};
// 详情页
const goToDetail = (values: any) => {
const permissionArr = JSON.parse(localStorage.getItem('permission') || '');
......@@ -53,10 +53,6 @@ const ChargeManager = (props: any) => {
history.push('/PropertyManagementDetail');
};
// 存储详情页数据
const getById = (values: any) => {
dispatch({ type: 'PropertyManagement/getById', playload: values });
};
// 获取数据
const get = (values: any) => {
dispatch({ type: 'PropertyManagement/get', playload: values });
......@@ -90,7 +86,6 @@ const ChargeManager = (props: any) => {
// 搜索按钮
const TitleSearchContent = (comment: any) => {
setLoading(true);
console.log(comment);
history.push(
location.pathname +
urlEncode(
......@@ -133,17 +128,6 @@ const ChargeManager = (props: any) => {
},
];
// 重置表单触发
const resetHandler = () => {
setLoading(true);
readyData = {
communityName: '',
pageNum: 1,
tosOwnerName: '',
};
history.push(location.pathname + urlEncode(filterObj(readyData)));
};
// 切换页码
const changePage = (value: any) => {
setLoading(true);
......@@ -157,13 +141,13 @@ const ChargeManager = (props: any) => {
),
);
};
console.log(Data);
return (
<div className={styles.base}>
<TitleSearch
listkey={['tosOwnerName']}
list={['Name Of Owner']}
communitySelect={true}
communitySelect
onSubmit={TitleSearchContent}
defaultValue={readyData}
/>
......@@ -173,7 +157,7 @@ const ChargeManager = (props: any) => {
columnEmptyText={false}
columns={columns}
dataSource={Data.list}
rowKey={'id'}
rowKey="id"
search={false}
loading={loading}
onChange={changePage}
......@@ -183,12 +167,7 @@ const ChargeManager = (props: any) => {
total: Data.page.totalRow,
current: +readyData.pageNum,
}}
options={{
density: true,
fullScreen: true,
reload: false,
setting: false,
}}
options={false}
/>
) : (
<></>
......
......@@ -104,20 +104,19 @@ const Users = (props: any) => {
if (file.name.indexOf('.xlsx') === -1 && file.name.indexOf('.xls') === -1) {
message.error(`${file.name} file format is incorrect!`);
return false;
} else {
return true;
}
return true;
},
onChange(info: any) {
if (info.file.status == 'uploading') {
if (info.file.status === 'uploading') {
setFileUploading(true);
}
if (info.file.status === 'done') {
if (info.file.response.error_code == '0000') {
if (info.file.response.error_code === '0000') {
history.push(location.pathname + '/Result');
} else if (info.file.response.error_code == '0002') {
} else if (info.file.response.error_code === '0002') {
message.error(info.file.response.error_msg);
} else if (info.file.response.error_code == '0001') {
} else if (info.file.response.error_code === '0001') {
history.push(location.pathname + '/ResultFailed');
message.error(
`${info.file.name} file upload failed.` +
......@@ -139,7 +138,13 @@ const Users = (props: any) => {
// 监听路由变化更新数据
useEffect(() => {
console.log(readyData);
// 重置数据
readyData = {
pageNum: 1,
owerName: '',
communityArray: [],
};
if (location.query) {
readyData = {
...readyData,
......@@ -168,7 +173,7 @@ const Users = (props: any) => {
readyData.communityArray = CommunityList;
}
setLoading(true);
//获取数据
// 获取数据
RA(
12,
{
......@@ -187,7 +192,7 @@ const Users = (props: any) => {
}
}, [Data]);
const goToDetail = (values: any, e: any) => {
const goToDetail = (values: any) => {
if (permissionArr.indexOf('2') < 0) {
message.error('No Permissions!!!', 3);
return;
......@@ -196,7 +201,7 @@ const Users = (props: any) => {
history.push(location.pathname + '/Detail');
};
const goToEdit = (values: any, e: any) => {
const goToEdit = (values: any) => {
if (permissionArr.indexOf('3') < 0) {
message.error('No Permissions!!!', 3);
return;
......@@ -217,10 +222,9 @@ const Users = (props: any) => {
// LIFE用户管理页面的搜索按钮
const CallBackTitleSearch = (comment: any) => {
console.log(comment);
readyData.communityArray = comment.serviceCommunityList;
/*页面跳转*/
// 页面跳转
history.push(
location.pathname +
urlEncode(
......@@ -246,7 +250,7 @@ const Users = (props: any) => {
<TitleSearch
listkey={['OwnerName']}
list={['Owner Name']}
community={'serviceCommunityList'}
community="serviceCommunityList"
onSubmit={CallBackTitleSearch}
defaultValue={{ OwnerName: readyData.owerName }}
checklist={readyData.communityArray.length !== 0 ? readyData.communityArray : null}
......@@ -277,7 +281,7 @@ const Users = (props: any) => {
{/* 列表组件 */}
<Table
rowKey={'id'}
rowKey="id"
loading={loading}
style={{ marginTop: 16 }}
dataSource={Data != null ? Data.data.list : []}
......
......@@ -74,7 +74,7 @@ const UsersDetail = (props: any) => {
if (Result.error_code !== '0000') {
message.error(Result.error_msg);
ResultClear();
history.back();
history.goBack();
}
}
}, [Result]);
......@@ -88,7 +88,7 @@ const UsersDetail = (props: any) => {
playload: {},
});
history.back();
history.goBack();
} else {
message.error(returnValue.error_msg, 3);
}
......@@ -113,7 +113,7 @@ const UsersDetail = (props: any) => {
roomNumber: DataSave.roomNumber,
});
} else {
history.back();
history.goBack();
}
}, [DataSave]);
......@@ -306,7 +306,7 @@ const UsersDetail = (props: any) => {
{editFlag && DataSaveDetail.rows[0].owner.deleted !== 1 ? (
<>
<Line />
<Form.Item>
<Form.Item style={{ textAlign: 'left' }}>
<Button type="primary" htmlType="submit">
Submit
</Button>
......
......@@ -2,130 +2,130 @@
//基石
.base {
width: 100%;
background-color: #ffffff;
padding: 34px;
width: 100%;
background-color: #ffffff;
padding: 34px;
}
//边栏1
//头部组件
.box{
width: 100%;
height: 34px;
position: relative;
margin-bottom: 16px;
}
.input{
width:200px;
height:32px;
background:none;
outline: none;
border:1px solid rgba(217,217,217,1);
border-radius:2px;
font-size:14px;
font-weight:400;
line-height:30px;
text-indent: 19px;
.box {
width: 100%;
height: 34px;
position: relative;
margin-bottom: 16px;
}
.input {
width: 200px;
height: 32px;
background: none;
outline: none;
border: 1px solid rgba(217, 217, 217, 1);
border-radius: 2px;
font-size: 14px;
font-weight: 400;
line-height: 30px;
text-indent: 19px;
}
.item1{
.input();
}
.item2{
.input();
margin-left: 20px;
}
.item3{
width:80px;
height:32px;
border:1px solid rgba(24,144,255,1);
border-radius:2px;
background-color:#e7f4ff;
outline: none;
font-size:14px;
font-weight:400;
color:rgba(24,144,255,1);
line-height:30px;
cursor: pointer;
margin-top: 16px;
}
.item3:active{
background-color:#ffffff;
.item1 {
.input();
}
.item2 {
.input();
margin-left: 20px;
}
.item3 {
width: 80px;
height: 32px;
border: 1px solid rgba(24, 144, 255, 1);
border-radius: 2px;
background-color: #e7f4ff;
outline: none;
font-size: 14px;
font-weight: 400;
color: rgba(24, 144, 255, 1);
line-height: 30px;
cursor: pointer;
margin-top: 16px;
}
.item3:active {
background-color: #ffffff;
}
//边栏2
.box2{
width: 100%;
height: 40px;
margin-top: 0px;
position: relative;
.box2 {
width: 90%;
height: 40px;
margin-top: -35px;
margin-left: 150/1920 * 100vw;
position: relative;
}
//小组件1
.buttonLine{
width:240px;
height:32px;
border:none;
background:none;
outline: none;
font-size:14px;
font-weight:400;
line-height:30px;
cursor: pointer;
.buttonLine {
width: 240px;
height: 32px;
border: none;
background: none;
outline: none;
font-size: 14px;
font-weight: 400;
line-height: 30px;
cursor: pointer;
}
.fontgz(){
font-size:16px;
font-family:'Source Han Sans CN;';
font-weight:800;
.fontgz() {
font-size: 16px;
font-family: 'Source Han Sans CN;';
font-weight: 800;
}
.buttonWait{
.buttonLine();
border-bottom:2px solid#dedede;
color:#454545;
.fontgz();
.buttonWait {
.buttonLine();
border-bottom: 2px solid#dedede;
color: #454545;
.fontgz();
}
.buttonWait:hover{
border-bottom:3px solid rgba(24,144,255,1);
color:rgba(24,144,255,1);
.fontgz();
.buttonWait:hover {
border-bottom: 3px solid rgba(24, 144, 255, 1);
color: rgba(24, 144, 255, 1);
.fontgz();
}
.buttonChoose{
.buttonLine();
border-bottom:3px solid rgba(24,144,255,1);
color:rgba(24,144,255,1);
.fontgz();
.buttonChoose {
.buttonLine();
border-bottom: 3px solid rgba(24, 144, 255, 1);
color: rgba(24, 144, 255, 1);
.fontgz();
}
.butttonAdd0{
border:1px solid rgba(24,144,255,1);
color:rgba(24,144,255,1);
border-radius:2px;
}
.buttonAdd{
// .butttonAdd0();
background:none;
outline: none;
cursor: pointer;
// width:170px;
// height:32px;
position: absolute;
right: 0;
.butttonAdd0 {
border: 1px solid rgba(24, 144, 255, 1);
color: rgba(24, 144, 255, 1);
border-radius: 2px;
}
.buttonAdd {
// .butttonAdd0();
background: none;
outline: none;
cursor: pointer;
// width:170px;
// height:32px;
position: absolute;
right: 0;
}
.buttonAdd2{
background:none;
outline: none;
cursor: pointer;
width:170px;
height:32px;
border:1px solid rgba(24,144,255,1);
color:rgba(24,144,255,1);
border-radius:2px;
position: absolute;
right: 180px;
.buttonAdd2 {
background: none;
outline: none;
cursor: pointer;
width: 170px;
height: 32px;
border: 1px solid rgba(24, 144, 255, 1);
color: rgba(24, 144, 255, 1);
border-radius: 2px;
position: absolute;
right: 180px;
}
import React, { useState, useEffect, useRef } from 'react';
import { Input, Button, Form, Spin, message, Checkbox } from 'antd';
import { Input, Button, Form, Spin, Modal, Checkbox } from 'antd';
import { connect, history } from 'umi';
......@@ -18,14 +18,15 @@ let optionsList: {
const Edit = (props: any) => {
const { dispatch, CurData, SaveChooseData, CommunityList, DataServices } = props;
const TosTosServiceProviderSave = (values: any) => {
dispatch({ type: 'ServiceProvider/TosTosServiceProviderSave', playload: values });
};
const [CList, setCList] = useState(CommunityList);
const [load, setload] = useState(false);
const TosTosServiceProviderSave = (values: any) => {
dispatch({ type: 'ServiceProvider/TosTosServiceProviderSave', playload: values });
};
const printContent = (List: any) => {
setCList(List);
};
......@@ -33,7 +34,12 @@ const Edit = (props: any) => {
// 选择服务商事件
const onSelectCheckBox = (checkedValue: CheckboxValueType[]) => {
console.log(checkedValue);
if (checkedValue.indexOf('0') > -1 && checkedValue.indexOf('1') > -1) {
Modal.error({
title: 'Error',
content: <div>Accountant and security can only choose one!!!</div>,
});
}
};
// 拿取服务范围数据
......@@ -107,7 +113,6 @@ const Edit = (props: any) => {
if (SaveChooseData) {
val.id = SaveChooseData.id;
}
setload(true);
TosTosServiceProviderSave(val);
};
......
......@@ -152,7 +152,6 @@ const ServiceProviderManagement = (props: propsType) => {
// 处理服务商数据
useEffect(() => {
if (DataServices) {
console.log(DataServices);
options = DataServices.data.rows.map((v: any) => {
return [v.serviceCode, v.serviceName];
});
......@@ -161,14 +160,20 @@ const ServiceProviderManagement = (props: propsType) => {
// 监听路由url
useEffect(() => {
// 重置数据
readyData = {
pageNum: 1,
serviceCommunityList: [],
serviceScope: '',
providerName: '',
};
if (location.query) {
readyData = {
...readyData,
...location.query,
};
}
console.log(location.query);
console.log(readyData);
if (CommunityList && flag === false) {
flag = true;
setLoading(true);
......@@ -194,14 +199,12 @@ const ServiceProviderManagement = (props: propsType) => {
}
}, [Data]);
//页面搜索
// 页面搜索
const CallBackTitleSearch = (comment: any) => {
console.log(comment);
readyData.serviceCommunityList = comment.serviceCommunityList;
if (comment.status == undefined) {
if (comment.status === undefined) {
comment.status = '';
}
console.log(comment);
history.push(
location.pathname +
......@@ -217,7 +220,7 @@ const ServiceProviderManagement = (props: propsType) => {
// 切换页码
const pageChange = (values: any) => {
let tmp = filterObjbyTg(location.query, ['providerName', 'serviceScope']);
const tmp = filterObjbyTg(location.query, ['providerName', 'serviceScope']);
tmp['pageNum'] = values.current;
history.push(location.pathname + urlEncode(tmp));
};
......@@ -233,7 +236,7 @@ const ServiceProviderManagement = (props: propsType) => {
case 1:
tmp[items].enable = 'Deregistered';
break;
case 2:
default:
break;
}
}
......@@ -252,7 +255,7 @@ const ServiceProviderManagement = (props: propsType) => {
data: [...options],
},
]}
community={'serviceCommunityList'}
community="serviceCommunityList"
onSubmit={CallBackTitleSearch}
defaultValue={{
providerName: readyData.providerName,
......@@ -274,26 +277,24 @@ const ServiceProviderManagement = (props: propsType) => {
</div>
{/* 列表组件 */}
{
<Table
rowKey={'id'}
style={{ marginTop: 16 }}
loading={loading}
columns={columns}
dataSource={Data ? dataSource(Data.rows) : []}
pagination={
Data
? {
current: +readyData.pageNum,
total: Data.page.totalRow,
showSizeChanger: false,
pageSize: Data.page.curPageSize,
}
: {}
}
onChange={pageChange}
/>
}
<Table
rowKey={'id'}
style={{ marginTop: 16 }}
loading={loading}
columns={columns}
dataSource={Data ? dataSource(Data.rows) : []}
pagination={
Data
? {
current: +readyData.pageNum,
total: Data.page.totalRow,
showSizeChanger: false,
pageSize: Data.page.curPageSize,
}
: {}
}
onChange={pageChange}
/>
</div>
);
};
......
......@@ -2,108 +2,107 @@
//基石
.base {
width: 100%;
min-width: 980px;
background-color: #ffffff;
padding: 34px;
overflow: auto;
width: 100%;
min-width: 980px;
background-color: #ffffff;
padding: 34px;
overflow: auto;
}
//边栏1
//头部组件
.box{
width: 100%;
height: 64px;
position: relative;
.box {
width: 100%;
height: 64px;
position: relative;
}
.input{
width:200px;
height:32px;
background:none;
outline: none;
border:1px solid rgba(217,217,217,1);
border-radius:2px;
font-size:14px;
font-weight:400;
line-height:30px;
text-indent: 19px;
.input {
width: 200px;
height: 32px;
background: none;
outline: none;
border: 1px solid rgba(217, 217, 217, 1);
border-radius: 2px;
font-size: 14px;
font-weight: 400;
line-height: 30px;
text-indent: 19px;
}
.item1{
.input();
.item1 {
.input();
}
.item2{
.input();
margin-left: 20px;
.item2 {
.input();
margin-left: 20px;
}
.item3{
width:80px;
height:32px;
border:1px solid rgba(24,144,255,1);
border-radius:2px;
background-color:#e7f4ff;
outline: none;
font-size:14px;
font-weight:400;
color:rgba(24,144,255,1);
line-height:30px;
cursor: pointer;
margin-top: 16px;
.item3 {
width: 80px;
height: 32px;
border: 1px solid rgba(24, 144, 255, 1);
border-radius: 2px;
background-color: #e7f4ff;
outline: none;
font-size: 14px;
font-weight: 400;
color: rgba(24, 144, 255, 1);
line-height: 30px;
cursor: pointer;
margin-top: 16px;
}
.item3:active{
background-color:#ffffff;
.item3:active {
background-color: #ffffff;
}
//边栏2
.box2{
width: 100%;
height: 40px;
margin-top: 0px;
position: relative;
.box2 {
width: 90%;
height: 40px;
margin-top: -35px;
margin-left: 150/1920 * 100vw;
position: relative;
}
//小组件1
.buttonLine{
width:200px;
height:32px;
border:none;
background:none;
outline: none;
font-size:14px;
font-weight:400;
line-height:30px;
cursor: pointer;
.buttonLine {
width: 200px;
height: 32px;
border: none;
background: none;
outline: none;
font-size: 14px;
font-weight: 400;
line-height: 30px;
cursor: pointer;
}
.buttonWait{
.buttonLine();
border-bottom:2px solid#dedede;
color:#454545;
.buttonWait {
.buttonLine();
border-bottom: 2px solid#dedede;
color: #454545;
}
.buttonWait:hover{
border-bottom:3px solid rgba(24,144,255,1);
color:rgba(24,144,255,1);
.buttonWait:hover {
border-bottom: 3px solid rgba(24, 144, 255, 1);
color: rgba(24, 144, 255, 1);
}
.buttonChoose{
.buttonLine();
border-bottom:3px solid rgba(24,144,255,1);
color:rgba(24,144,255,1);
.buttonChoose {
.buttonLine();
border-bottom: 3px solid rgba(24, 144, 255, 1);
color: rgba(24, 144, 255, 1);
}
.buttonAdd{
background:none;
outline: none;
cursor: pointer;
font-size:14px;
width:154px;
height:32px;
border:1px solid rgba(24,144,255,1);
color:rgba(24,144,255,1);
border-radius:2px;
position: absolute;
right: 0;
.buttonAdd {
background: none;
outline: none;
cursor: pointer;
font-size: 14px;
width: 154px;
height: 32px;
border: 1px solid rgba(24, 144, 255, 1);
color: rgba(24, 144, 255, 1);
border-radius: 2px;
position: absolute;
right: 0;
}
.buttonAdd2{
.buttonAdd();
right: 168px;
.buttonAdd2 {
.buttonAdd();
right: 168px;
}
import request from '@/utils/request';
export function get(values: any) {
console.log(values)
const userInfo = localStorage.getItem('userInfo') || '';
const id = JSON.parse(userInfo).userModel.id;
const { id } = JSON.parse(userInfo).userModel;
return request('/tos/tosPropertyFee/get', {
method: 'POST',
body: JSON.stringify({
......
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