Commit 5c7e5edb authored by cellee's avatar cellee

ui更新

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 7611da70
import React, { useState, useEffect } from 'react';
import { connect } from 'umi';
import { connect, history } from 'umi';
import { Input, Row, Col, Form, Select, Button, DatePicker } from 'antd';
import { SearchOutlined } from '@ant-design/icons';
import { SearchOutlined, PlusOutlined } from '@ant-design/icons';
import SearchOptionsCommnity from '../SearchOptions/SearchOptionsCommnity';
import SelectOptions from '../SelectOptions/index';
import { SA } from '@/utils/method';
const { Option } = Select;
const TitleSearch = (props: any) => {
......@@ -19,6 +22,7 @@ const TitleSearch = (props: any) => {
time,
username,
searchNone, // 隐藏搜索框
push,
} = props;
const key = props.listkey;
......@@ -100,6 +104,14 @@ const TitleSearch = (props: any) => {
// }
// };
// 清除操作之前的数据
const emptys = (data: any, url: any) => {
dispatch({ type: 'CellList/urlRemove' }); // 清掉图片信息
SA(data, 'CellList', dispatch);
dispatch({ type: 'CellList/ResultClear' }); // 清空之前保存成功的结果
history.push(url);
};
return (
<>
<Form form={form} name="basic" onFinish={onFinish} onFinishFailed={onFinishFailed}>
......@@ -189,15 +201,27 @@ const TitleSearch = (props: any) => {
) : null}
{searchNone == null ? (
<Form.Item style={{ marginBottom: 5 }}>
<Button
type="primary"
htmlType="submit"
style={{ backgroundColor: '#e7f4ff', color: 'rgba(24,144,255,1)' }}
>
<SearchOutlined /> Search
</Button>
</Form.Item>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<Form.Item style={{ marginBottom: 5 }}>
<Button
type="primary"
htmlType="submit"
style={{ backgroundColor: '#e7f4ff', color: 'rgba(24,144,255,1)' }}
>
<SearchOutlined /> Search
</Button>
</Form.Item>
{/* // 传递来跳转的东西 */}
{push ? (
<Button type="primary" onClick={() => emptys(null, push.url)}>
<PlusOutlined />
{push.name}
</Button>
) : (
''
)}
</div>
) : (
''
)}
......
/*
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2021-02-02 10:34:28
* @LastEditors: your name
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\Toast\Toast.tsx
*/
import React, { useState, useEffect } from 'react';
import { message, Button,Modal,} from 'antd';
const Toast = (props:any) => {
import { Button, Modal } from 'antd';
const Toast = (props: any) => {
const { value, onChange } = props;
const [visible, setVisible] = useState(false);
const {value,onChange}=props
const [visible,setVisible]=useState(false)
const showModal = () => {
setVisible(true);
};
const showModal = () => {
setVisible(true)
}
const handleOk = () => {
setVisible(false);
onChange();
};
const handleOk = () => {
setVisible(false)
onChange()
};
const handleCancel = () => {
setVisible(false)
};
const handleCancel = () => {
setVisible(false);
};
return (
<>
......
......@@ -80,21 +80,24 @@ const SystemFeedback = (props: any) => {
return (
<>
<ProTable
dataSource={Data ? Data.list : null}
rowKey={'id'}
columns={columns as any}
pagination={false}
options={{
density: false,
fullScreen: false,
reload: false,
setting: false,
}}
loading={loading}
search={false}
headerTitle="System Feedback"
/>
<div style={{ padding: 20 }}>
<ProTable
dataSource={Data ? Data.list : null}
rowKey={'id'}
columns={columns as any}
pagination={false}
toolBarRender={false}
options={{
density: false,
fullScreen: false,
reload: false,
setting: false,
}}
loading={loading}
search={false}
headerTitle="System Feedback"
/>
</div>
<div className="pages">
<Pagination
// onShowSizeChange={pageSizeHandler}
......
......@@ -228,7 +228,7 @@ const Account = (props: any) => {
return (
<>
<div className="contop">
<div className="contop" style={{ display: 'flex', justifyContent: 'space-between' }}>
<Form
autoComplete="off"
layout="inline"
......@@ -258,6 +258,17 @@ const Account = (props: any) => {
</Button> */}
</Form.Item>
</Form>
<Button
type="primary"
loading={loading}
icon={<PlusOutlined />}
onClick={() => {
edit(1);
}}
>
Add Account
</Button>
</div>
<div className="contop contop2">
......@@ -269,18 +280,19 @@ const Account = (props: any) => {
pagination={false} // 隐藏默认分页
search={false}
loading={loading}
toolBarRender={() => [
<Button
type="primary"
loading={loading}
icon={<PlusOutlined />}
onClick={() => {
edit(1);
}}
>
Add Account
</Button>,
]}
toolBarRender={false}
// toolBarRender={() => [
// <Button
// type="primary"
// loading={loading}
// icon={<PlusOutlined />}
// onClick={() => {
// edit(1);
// }}
// >
// Add Account
// </Button>,
// ]}
options={{
density: false,
fullScreen: false,
......
......@@ -92,7 +92,7 @@ const Adds = (props: any) => {
// 上传
setLouba(Data.balouscheduleUrl ? [backUpload(Data.balouscheduleUrl, Data.id)] : []);
setGuide(Data.serviceGuideUrl ? [backUpload(Data.serviceGuideUrl, Data.id)] : []);
setPeriod(Data.lifeServiceUrl ? [backUpload(Data.lifeServiceUrl, Data.id)] : []);
// setPeriod(Data.lifeServiceUrl ? [backUpload(Data.lifeServiceUrl, Data.id)] : []);
// 小区名 -- 上传需要
setCodeName(Data.residentialName);
setcodeStrat(true);
......@@ -206,19 +206,19 @@ const Adds = (props: any) => {
};
// 保质期上传
const upload3 = {
onChange({ file }: any) {
file.status === 'uploading' ? setimgLoad(true) : setimgLoad(false);
if (file.status === 'done') {
let data = file.response.data;
setPeriod(BackFormat(data.imageName, data.url));
setcodeStrat(true);
setTipMain('Binding Content Already Exists, Cannot Be Modified!');
}
// 结果
uploadMsg(file);
},
};
// const upload3 = {
// onChange({ file }: any) {
// file.status === 'uploading' ? setimgLoad(true) : setimgLoad(false);
// if (file.status === 'done') {
// let data = file.response.data;
// setPeriod(BackFormat(data.imageName, data.url));
// setcodeStrat(true);
// setTipMain('Binding Content Already Exists, Cannot Be Modified!');
// }
// // 结果
// uploadMsg(file);
// },
// };
// 上传提示
function uploadMsg(file: any) {
......@@ -283,7 +283,7 @@ const Adds = (props: any) => {
obj.balouscheduleUrl = undeFi(loubaUpload.map((item: any) => item.name)[0]);
obj.serviceGuideUrl = undeFi(guideUpload.map((item: any) => item.name)[0]);
obj.lifeServiceUrl = undeFi(periodUpload.map((item: any) => item.name)[0]);
// obj.lifeServiceUrl = undeFi(periodUpload.map((item: any) => item.name)[0]);
// 小区热线
// 表单结构存在数据不存在情况, 所以要多判断一次
......@@ -553,7 +553,7 @@ const Adds = (props: any) => {
</Form.Item>
{/* 上传部分 */}
<Form.Item
{/* <Form.Item
label="Warranty Period Service"
name="lifeServiceFile"
style={{ marginBottom: '0', minHeight: 159 }}
......@@ -573,7 +573,7 @@ const Adds = (props: any) => {
<div className="tip">
<span>Support Files:.jpg, .png, .pdf</span>
</div>
</Form.Item>
</Form.Item> */}
<hr />
......
......@@ -265,8 +265,8 @@ const Adds = (props: any) => {
if (Data) {
obj.id = Data.id;
}
console.log(values);
console.log(obj);
// console.log(values);
// console.log(obj);
// 上传
RA(29, obj, 'CellList', dispatch);
}
......
......@@ -136,6 +136,10 @@ const CellLists = (props: any) => {
community={'communityName'}
checklist={Init ? Init.CommunityList : null}
onSubmit={CallBackTitleSearch}
push={{
name: 'Create New Community',
url: '/CommunityManagement/CellList/Add',
}}
/>
</div>
<ProTable
......@@ -146,16 +150,17 @@ const CellLists = (props: any) => {
columns={columns}
search={false}
loading={loading}
toolBarRender={() => [
<Button
key="3"
type="primary"
onClick={() => emptys(null, '/CommunityManagement/CellList/Add')}
>
<PlusOutlined />
Create New Community
</Button>,
]}
toolBarRender={false}
// toolBarRender={() => [
// <Button
// key="3"
// type="primary"
// onClick={() => emptys(null, '/CommunityManagement/CellList/Add')}
// >
// <PlusOutlined />
// Create New Community
// </Button>,
// ]}
options={{
density: false,
fullScreen: false,
......
......@@ -229,10 +229,10 @@ const Detail = (props: any) => {
<PreView OpenUrl={detailData.rows.serviceGuideUrl}></PreView>
</div>
{/* ---------- */}
<div className="item">
{/* <div className="item">
<label>Warranty Period Service:</label>
<PreView OpenUrl={detailData.rows.lifeServiceUrl}></PreView>
</div>
</div> */}
</div>
</div>
......
......@@ -181,7 +181,16 @@ const CommunityAnnouncement = (props: any) => {
return (
<>
<div style={{ width: '100%', padding: 20, marginBottom: 0, backgroundColor: '#ffffff' }}>
<div
style={{
width: '100%',
padding: 20,
marginBottom: 0,
backgroundColor: '#ffffff',
display: 'flex',
justifyContent: 'space-between',
}}
>
<Form
autoComplete="off"
layout="inline"
......@@ -224,6 +233,17 @@ const CommunityAnnouncement = (props: any) => {
</Button> */}
</Form.Item>
</Form>
<Button
key="3"
type="primary"
onClick={() => {
goToAdd(0, {});
}}
>
<PlusOutlined />
Create New Announcement
</Button>
</div>
<div style={{ width: '100%', paddingLeft: 10, paddingRight: 10, backgroundColor: '#ffffff' }}>
<ProTable
......@@ -233,25 +253,26 @@ const CommunityAnnouncement = (props: any) => {
columns={columns}
pagination={false} // 隐藏默认分页
search={false}
toolBarRender={() => [
<Button
key="3"
type="primary"
onClick={() => {
goToAdd(0, {});
}}
>
<PlusOutlined />
Create New Announcement
</Button>,
]}
options={{
density: false,
fullScreen: false,
reload: false,
setting: false,
}}
headerTitle="Announcement list"
toolBarRender={false}
// toolBarRender={() => [
// <Button
// key="3"
// type="primary"
// onClick={() => {
// goToAdd(0, {});
// }}
// >
// <PlusOutlined />
// Create New Announcement
// </Button>,
// ]}
// options={{
// density: false,
// fullScreen: false,
// reload: false,
// setting: false,
// }}
// headerTitle="Announcement list"
/>
<div style={{ textAlign: 'right', padding: 10 }}>
<Pagination
......
......@@ -106,7 +106,11 @@ const Bookings = (props: any) => {
// 更新list
setConcurrent(Result.data);
ResultClear(); // 清除结果
message.warning('The selected time has been reserved by app, please select again!');
// Time.length = 0;
formRef.current.setFieldsValue({
Time: null,
});
message.warning('Please select another time!');
} else {
// 提交成功
ResultClear(); // 清除结果
......@@ -341,6 +345,7 @@ const Bookings = (props: any) => {
// 点击确定时间
const onChanges = (value: any) => {
console.log(value);
let a = parseInt(moment(value[1], 'HH:mm').format('HH')) - 1;
let b = moment(a, 'HH').format('HH:mm');
let c = [value[0], b];
......
......@@ -336,6 +336,13 @@ const FacilityBookings = (props: any) => {
// });
// };
const operations = (
<Button key="3" type="primary" onClick={goToFunction}>
<PlusOutlined />
{curString.tab == 1 ? 'Add Appointment' : 'Add Facilities'}
</Button>
);
return (
<>
<div className="base">
......@@ -387,8 +394,9 @@ const FacilityBookings = (props: any) => {
defaultActiveKey={curString.tab.toString()}
onChange={TabCallback}
className="diytabs"
tabBarExtraContent={operations}
>
<TabPane tab="Facility Bookings" key="1">
<TabPane tab="Facility Bookings" key="1" style={{ marginTop: 15 }}>
<ProTable
loading={loading}
rowKey="id"
......@@ -402,12 +410,13 @@ const FacilityBookings = (props: any) => {
// }}
pagination={false}
search={false}
toolBarRender={() => [
<Button key="3" type="primary" onClick={goToFunction}>
<PlusOutlined />
Add Appointment
</Button>,
]}
toolBarRender={false}
// toolBarRender={() => [
// <Button key="3" type="primary" onClick={goToFunction}>
// <PlusOutlined />
// Add Appointment
// </Button>,
// ]}
options={{
density: false,
fullScreen: false,
......@@ -433,12 +442,13 @@ const FacilityBookings = (props: any) => {
)}
</TabPane>
<TabPane tab="Facility Management" key="2">
<TabPane tab="Facility Management" key="2" style={{ marginTop: 15 }}>
<ProTable
loading={loading}
rowKey={'community'}
dataSource={Facility}
columns={columns2}
toolBarRender={false}
// pagination={{
// current: curString.curPage2,
// total: Data2.total.totalRow,
......@@ -447,12 +457,12 @@ const FacilityBookings = (props: any) => {
// }}
pagination={false} // 隐藏默认分页
search={false}
toolBarRender={() => [
<Button key="3" type="primary" onClick={goToFunction}>
<PlusOutlined />
Add Facilities
</Button>,
]}
// toolBarRender={() => [
// <Button key="3" type="primary" onClick={goToFunction}>
// <PlusOutlined />
// Add Facilities
// </Button>,
// ]}
options={{
density: false,
fullScreen: false,
......
......@@ -237,6 +237,7 @@ const VisitorRecord = (props: any) => {
pagination={pagination}
// pagination={{ current: 1, total: Data.total}}
search={false}
toolBarRender={false}
options={{
density: false,
fullScreen: false,
......
......@@ -237,6 +237,7 @@ const VisitorRecord = (props: any) => {
pagination={pagination}
// pagination={{ current: 1, total: Data.total}}
search={false}
toolBarRender={false}
options={{
density: false,
fullScreen: false,
......
......@@ -144,7 +144,7 @@ const Contract = (props: any) => {
};
return (
<>
<div className={styles.contop}>
<div className={styles.contop} style={{ display: 'flex', justifyContent: 'space-between' }}>
<Form
autoComplete="off"
layout="inline"
......@@ -180,6 +180,18 @@ const Contract = (props: any) => {
</Button> */}
</Form.Item>
</Form>
<Button
key="3"
type="primary"
onClick={() => {
Jump(null, 'Add');
}}
loading={loading}
icon={<PlusOutlined />}
>
Add Contract
</Button>
</div>
<div className={styles.listbox}>
......@@ -191,26 +203,27 @@ const Contract = (props: any) => {
pagination={false} // 隐藏默认分页
search={false}
loading={loading}
toolBarRender={() => [
<Button
key="3"
type="primary"
onClick={() => {
Jump(null, 'Add');
}}
loading={loading}
icon={<PlusOutlined />}
>
Add Contract
</Button>,
]}
options={{
density: false,
fullScreen: false,
reload: false,
setting: false,
}}
headerTitle="Contract list"
// toolBarRender={() => [
// <Button
// key="3"
// type="primary"
// onClick={() => {
// Jump(null, 'Add');
// }}
// loading={loading}
// icon={<PlusOutlined />}
// >
// Add Contract
// </Button>,
// ]}
// options={{
// density: false,
// fullScreen: false,
// reload: false,
// setting: false,
// }}
toolBarRender={false}
// headerTitle="Contract list"
// pagination={{ defaultCurrent: 1, total: Data.totalRow }}
/>
......
......@@ -389,7 +389,7 @@ const ContractContent = (props: any) => {
<div className="contract_box">
<div className="list2">
<Form.Item name="contractNumber" label="Contract Number" rules={tipList[0]}>
<Input style={{ width: 200 }} placeholder="Contract Number" />
<Input style={{ width: 200 }} placeholder="Contract Number" maxLength={25} />
</Form.Item>
</div>
{/* 合同编号、甲方、乙方 */}
......@@ -405,7 +405,7 @@ const ContractContent = (props: any) => {
</div> */}
<div className="item_1">
<Form.Item name="contractPartyB" label="Contract Party" rules={tipList[1]}>
<Input style={{ width: 300 }} placeholder="Contract Party " />
<Input style={{ width: 278 }} placeholder="Contract Party " />
</Form.Item>
</div>
</div>
......@@ -481,7 +481,7 @@ const ContractContent = (props: any) => {
style={{ marginBottom: 0 }}
>
<TextArea
style={{ padding: 8, width: 600 }}
style={{ padding: '8px 0', width: 600 }}
placeholder="Remarks"
showCount={true}
autoSize={{ minRows: 6, maxRows: 6 }}
......
/*
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2021-02-01 17:31:42
* @LastEditTime: 2021-02-02 18:29:06
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\tip.ts
......@@ -57,14 +57,14 @@ const reqMes = (msg: string) => {
// 合同提示
export const tipList = [
[reqMes('Please Input Contract Numbe!')],
[reqMes('Please Input Contract Party!')],
[reqMes('Please fenter the contract number!')],
[reqMes('Please enter the contract party!')],
[reqMes('Please Input Contract Party B!')],
[reqMes('Please Choice CommunityName!')],
[reqMes('Please Choice Contract Title!')],
[reqMes('Please Choice Contract Time!')],
[reqMes('Please upload Contract Annex!')],
[reqMes('Please Input Contract Remarks!')],
[reqMes('Please select community!')],
[reqMes('Please enter the contract title!')],
[reqMes('Please choose the date!')],
[reqMes('Please upload the contract annex!')],
[reqMes('Please enterthe contract remarks!')],
];
// 小区提示
......@@ -81,8 +81,8 @@ export const village = [
//公告提示
export const Notice = [
[reqMes('Please select community')],
[reqMes('Please input the notice title.')],
[reqMes('Please input the announcement content.')],
[reqMes('Please enter the notice title.')],
[reqMes('Please enter the announcement content.')],
[reqMes('Please choose the effective time of the announcement.')],
];
......
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