Commit 934ce15b authored by cellee's avatar cellee

修改UI样式,修复下拉选择小区清除不了 情况,

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 38295bfd
/*
* @Author: your name
* @Date: 2021-02-01 14:54:48
* @LastEditTime: 2021-02-05 18:00:41
* @LastEditTime: 2021-02-06 11:51:58
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\Form\PdfUpload.tsx
......@@ -19,7 +19,7 @@ interface PriceInputProps {
}
const PdfUpload: React.FC<PriceInputProps> = ({ value = {}, onChange, disabled, action, data }) => {
const [loading, setLoading] = useState(false);
const [loading, setLoading] = useState([false, false, false, false, false]);
const [imgList, setImgList] = useState([] as any);
// 上传前检测
......@@ -37,12 +37,14 @@ const PdfUpload: React.FC<PriceInputProps> = ({ value = {}, onChange, disabled,
// 上传成功怎么做
const handleChange = (info: any) => {
console.log(info);
console.log(info.event);
let { status, response } = info.file;
if (status === 'uploading') {
setLoading(true);
// setLoading();
return;
} else {
setLoading(false);
// setLoading(false);
}
if (status === 'done') {
let { fileName, key } = response.data;
......@@ -73,6 +75,7 @@ const PdfUpload: React.FC<PriceInputProps> = ({ value = {}, onChange, disabled,
name: '',
fileList: [],
tip: true,
loading: false,
message: '123',
};
list.push(item);
......@@ -86,14 +89,6 @@ const PdfUpload: React.FC<PriceInputProps> = ({ value = {}, onChange, disabled,
setImgList([...list]);
};
// 上传的按钮
const uploadButton = (
<div>
{loading ? <LoadingOutlined /> : <PlusOutlined />}
<div style={{ marginTop: 8 }}>Upload</div>
</div>
);
//携带数据 、 传递给后台加 key
const updeta = (key: any) => {
data.key = key;
......@@ -133,8 +128,14 @@ const PdfUpload: React.FC<PriceInputProps> = ({ value = {}, onChange, disabled,
onPreview={handlePreview} // 预览
beforeUpload={beforeUpload}
onChange={handleChange}
id={index}
>
{item.fileList && item.fileList.length >= 5 ? null : uploadButton}
{item.fileList && item.fileList.length >= 5 ? null : (
<div>
{loading[index] ? <LoadingOutlined /> : <PlusOutlined />}
<div style={{ marginTop: 8 }}>Upload</div>
</div>
)}
</Upload>
<MinusCircleOutlined
className="pdf-icon"
......
......@@ -14,14 +14,14 @@
.right {
display: flex;
float: right;
height: 64px;//@layout-header-height;
height: 64px; //@layout-header-height;
margin-left: auto;
overflow: hidden;
.action {
display: flex;
align-items: center;
height: 100%;
padding: 0 12px;
padding: 0 25px;
cursor: pointer;
transition: all 0.3s;
> span {
......
/*
* @Author: your name
* @Date: 2020-12-02 09:42:49
* @LastEditTime: 2021-01-22 18:16:44
* @LastEditors: your name
* @LastEditTime: 2021-02-06 13:24:38
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\SearchOptions\SearchOptionsTow.tsx
*/
......@@ -13,7 +13,7 @@ const { Option } = Select;
const SearchOptionsTow = (porps: any) => {
const { list, extendName, def, type, disabled } = porps;
const [value, setValue] = useState(undefined);
const [value, setValue] = useState(null as any);
const options = list.map((d: any, index: number) => (
<Option value={d} key={index}>
{d}
......@@ -36,6 +36,10 @@ const SearchOptionsTow = (porps: any) => {
}
}, [def]);
const onClear = () => {
setValue(null);
};
return (
<div>
{type ? (
......@@ -49,6 +53,7 @@ const SearchOptionsTow = (porps: any) => {
optionFilterProp="children"
onChange={onChange}
value={value}
onClear={onClear}
disabled={disabled}
>
{options}
......@@ -62,6 +67,7 @@ const SearchOptionsTow = (porps: any) => {
optionFilterProp="children"
onChange={onChange}
value={value}
onClear={onClear}
disabled={disabled}
>
{options}
......
......@@ -147,10 +147,6 @@ const CommunityAnnouncement = (props: any) => {
// 表单提交
const onFinishContract = (value: any) => {
// console.log(value);
if (!value.communityNumList && !value.noticTitlel && !value.creator) {
message.error('Please enter one of them!');
} else {
// 要看是哪里分页
let mlist = { ...value };
mlist.communityNumList =
......@@ -161,7 +157,6 @@ const CommunityAnnouncement = (props: any) => {
// 把内容存进去
SA(DetailPage(mlist), module, dispatch);
// requst(payload);
}
};
// 选择小区名字并赋值
......
......@@ -329,16 +329,17 @@ const Facility = (props: any) => {
</Form.Item>
{/* 设施名称 以及费用 */}
<Input.Group>
<Form.Item label="Facility Classification" name="facilityName" rules={NewFaci[1]}>
<Input
placeholder="Facility Classification"
disabled={facilityDetail}
maxLength={30}
style={{ width: '200px' }}
/>
</Form.Item>
<span className="divIconMoney">Fee($):</span>
<Form.Item label="" name="communityManagerFee">
<Input.Group>
<Form.Item label="Fee($):" name="communityManagerFee" style={{ marginRight: 80 }}>
<InputNumber
onKeyUp={keyup_communityManagerFee}
prefix="$"
......@@ -350,8 +351,7 @@ const Facility = (props: any) => {
style={{ width: '120px' }}
/>
</Form.Item>
<span className="divIconMoney">Deposit:</span>
<Form.Item label="" name="communityMargin">
<Form.Item label="Deposit:" name="communityMargin">
<InputNumber
onKeyUp={keyup_communityMargin}
prefix="$"
......@@ -418,7 +418,6 @@ const Facility = (props: any) => {
<p className="diyp">Booking Rules : </p>
{/* 预约设置 */}
<Input.Group>
<Form.Item name="cancelReservationDay" label="Early Cancellation" rules={NewFaci[5]}>
<Input
onKeyUp={keyup.bind(this, 'cancelReservationDay')}
......@@ -456,11 +455,10 @@ const Facility = (props: any) => {
maxLength={2}
/>
</Form.Item>
</Input.Group>
{/* 设置次数 */}
<Input.Group>
<Form.Item label="Booking Limits" rules={NewFaci[8]}>
<Form.Item label="Booking Limits" className="flex required" rules={NewFaci[8]}>
<Select
placeholder="Cycle"
allowClear
......
......@@ -324,16 +324,16 @@ const FacilityTow = (props: any) => {
labelAlign="right"
>
{/* 设施名称 以及费用 */}
<Input.Group>
<Form.Item label="Facility Classification" name="facilityName" rules={NewFaci[1]}>
<Input
placeholder="Facility Classification"
disabled={facilityDetail}
maxLength={30}
style={{ width: '200px' }}
/>
</Form.Item>
<span className="divIconMoney">Fee($):</span>
<Form.Item label="" name="communityManagerFee">
<Input.Group>
<Form.Item label="Fee($):" name="communityManagerFee" style={{ marginRight: 80 }}>
<InputNumber
prefix="$"
placeholder="00.00"
......@@ -344,8 +344,7 @@ const FacilityTow = (props: any) => {
style={{ width: '120px' }}
/>
</Form.Item>
<span className="divIconMoney">Deposit:</span>
<Form.Item label="" name="communityMargin">
<Form.Item label="Deposit:" name="communityMargin">
<InputNumber
prefix="$"
placeholder="00.00"
......@@ -415,7 +414,6 @@ const FacilityTow = (props: any) => {
<p className="diyp">Booking Rules : </p>
{/* 预约设置 */}
<Input.Group>
<Form.Item
name="cancelReservationDay"
label="Early Cancellation"
......@@ -457,11 +455,10 @@ const FacilityTow = (props: any) => {
maxLength={2}
/>
</Form.Item>
</Input.Group>
{/* 设置次数 */}
<Input.Group>
<Form.Item label="Booking Limits" rules={NewFaci[8]}>
<Form.Item label="Booking Limits" className="flex required" rules={NewFaci[8]}>
<Select
placeholder="Cycle"
allowClear
......
......@@ -332,7 +332,7 @@ hr {
.divIconMoney {
display: inline-block;
margin-right: 10px;
width: 68px;
color: rgba(0, 0, 0, 0.85);
line-height: 32px;
}
......
......@@ -126,14 +126,10 @@ const Contract = (props: any) => {
// 表单提交
const onFinishContract = (value: any) => {
if (!value.communityName && !value.contractNumber && !value.contractTitle) {
message.error('Please enter one of them!');
} else {
value.pageNum = 1;
let t = { ...term, ...value };
setTerm(t);
RA(19, t);
}
};
// 选择小区名字并赋值
......
......@@ -186,7 +186,7 @@ const ContractContent = (props: any) => {
const onFinish = (values: any) => {
// 判断有没有文件
if (state.fileList.length == 0) {
message.error('Please upload the attachment!');
message.error('Please upload the contract annex!');
} else {
values.contractValidStartDate = values.time[0].format('YYYY-MM-DD');
values.contractValidEndDate = values.time[1].format('YYYY-MM-DD');
......
/*
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2021-02-02 18:29:06
* @LastEditTime: 2021-02-06 13:13:47
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\tip.ts
......@@ -88,14 +88,14 @@ export const Notice = [
// 新增设施
export const NewFaci = [
[reqMes('Please select community')],
[reqMes('Please input Facility Name')],
[reqMes('Please the community')],
[reqMes('Please input the Facility Name')],
[reqMes('Please Set management fee')],
[reqMes('Please Set Setting deposit')],
[reqMes('Please Upload facility photos')],
[reqMes('Required')],
[reqMes('Required')],
[reqMes('Required')],
[reqMes('Please enter restrictions')],
[reqMes('Please enter restrictions')],
[reqMes('Please enter restrictions')],
[reqMes('Required')],
[reqMes('Required')],
];
......
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