Commit 7c658770 authored by Sixiang_Zzb's avatar Sixiang_Zzb

用户管理新建业主 样式修改,放开添加住户卡的栋和层的英文限制

parent fca46b7d
...@@ -108,7 +108,11 @@ const CardAdd = (props: any) => { ...@@ -108,7 +108,11 @@ const CardAdd = (props: any) => {
style={{ marginRight: 16 }} style={{ marginRight: 16 }}
className={styles.buildNumber} className={styles.buildNumber}
rules={[ rules={[
{ required: true, pattern: /^\d+$/, message: 'Only number can be entered' }, {
required: true,
pattern: /^\d+$/,
message: 'Only numbers and letters can be entered',
},
]} ]}
> >
<Input style={{ width: 80 }} placeholder={'BLK'} /> <Input style={{ width: 80 }} placeholder={'BLK'} />
...@@ -119,7 +123,11 @@ const CardAdd = (props: any) => { ...@@ -119,7 +123,11 @@ const CardAdd = (props: any) => {
style={{ marginRight: 16 }} style={{ marginRight: 16 }}
className={styles.floorNumber} className={styles.floorNumber}
rules={[ rules={[
{ required: true, pattern: /^\d+$/, message: 'Only number can be entered' }, {
required: true,
pattern: /^\d+$/,
message: 'Only numbers and letters can be entered',
},
]} ]}
> >
<Input style={{ width: 80 }} placeholder={'Floor'} /> <Input style={{ width: 80 }} placeholder={'Floor'} />
...@@ -128,7 +136,13 @@ const CardAdd = (props: any) => { ...@@ -128,7 +136,13 @@ const CardAdd = (props: any) => {
<Form.Item <Form.Item
name="roomNumber" name="roomNumber"
className={styles.roomNumber} className={styles.roomNumber}
rules={[{ required: true, validator: checkData2 }]} rules={[
{
required: true,
pattern: /^\d+$/,
message: 'Only numbers and letters can be entered',
},
]}
> >
<Input style={{ width: 120 }} placeholder={'Room'} /> <Input style={{ width: 120 }} placeholder={'Room'} />
</Form.Item> </Form.Item>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
position: absolute; position: absolute;
top: 34px; top: 34px;
left: 33px; left: 33px;
width: 180px; width: 260px;
z-index: 10; z-index: 10;
background-color: #fff; background-color: #fff;
min-height: 20px; min-height: 20px;
...@@ -71,21 +71,21 @@ ...@@ -71,21 +71,21 @@
position: absolute; position: absolute;
top: 34px; top: 34px;
left: -87px; left: -87px;
width: 180px; width: 260px;
z-index: 20; z-index: 20;
background-color: #fff; background-color: #fff;
min-height: 20px; min-height: 20px;
} }
} }
// .roomNumber { .roomNumber {
// :global(.ant-form-item-explain) { :global(.ant-form-item-explain) {
// position: absolute; position: absolute;
// top: 34px; top: 34px;
// left: -205px; left: -205px;
// width: 260px; width: 260px;
// z-index: 30; z-index: 30;
// background-color: #fff; background-color: #fff;
// min-height: 20px; min-height: 20px;
// } }
// } }
...@@ -117,13 +117,16 @@ const Users = (props: any) => { ...@@ -117,13 +117,16 @@ const Users = (props: any) => {
history.push(location.pathname + '/Result'); 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); message.error(info.file.response.error_msg);
} else { } else if (info.file.response.error_code == '0001') {
history.push(location.pathname + '/ResultFailed'); history.push(location.pathname + '/ResultFailed');
message.error( message.error(
`${info.file.name} file upload failed.` + `${info.file.name} file upload failed.` +
'failed count is ' + 'failed count is ' +
info.file.response.data.count, info.file.response.data.count,
); );
} else {
message.error('File upload failed');
setFileUploading(false);
} }
setFileUploading(false); setFileUploading(false);
} else if (info.file.status === 'error') { } else if (info.file.status === 'error') {
......
...@@ -142,3 +142,38 @@ ...@@ -142,3 +142,38 @@
.ant-form-item-explain { .ant-form-item-explain {
margin-top: 5px; margin-top: 5px;
} }
.buildNumber {
:global(.ant-form-item-explain) {
position: absolute;
top: 34px;
left: 33px;
width: 260px;
z-index: 10;
background-color: #fff;
min-height: 20px;
}
}
.floorNumber {
:global(.ant-form-item-explain) {
position: absolute;
top: 34px;
left: -87px;
width: 260px;
z-index: 20;
background-color: #fff;
min-height: 20px;
}
}
.roomNumber {
:global(.ant-form-item-explain) {
position: absolute;
top: 34px;
left: -205px;
width: 260px;
z-index: 30;
background-color: #fff;
min-height: 20px;
}
}
...@@ -94,12 +94,6 @@ const UsersAdd = (props: any) => { ...@@ -94,12 +94,6 @@ const UsersAdd = (props: any) => {
</div> </div>
</div> </div>
{/* <div className={styles.box4}>
<div className={styles.box4item0}>Contact Details</div>
<div className={styles.box4item1}><Form.Item name="owerPhone" ><Input placeholder="Phone Number" /></Form.Item></div>
<div className={styles.box4item2}><Form.Item name="owerEmail" ><Input placeholder="Email" /></Form.Item></div>
</div> */}
<div className={styles.box2}> <div className={styles.box2}>
<div className={styles.box2item1}>Contact Details</div> <div className={styles.box2item1}>Contact Details</div>
<div className={styles.box2item2}> <div className={styles.box2item2}>
...@@ -109,13 +103,21 @@ const UsersAdd = (props: any) => { ...@@ -109,13 +103,21 @@ const UsersAdd = (props: any) => {
<Form.Item> <Form.Item>
<Input.Group> <Input.Group>
<div className={styles.box2item3}> <div className={styles.box2item3}>
<Form.Item name="buildingNumber" rules={[{ validator: checkData }]}> <Form.Item
name="buildingNumber"
className={styles.buildNumber}
rules={[{ validator: checkData }]}
>
<Input placeholder="BLK" style={{ width: 94 }} /> <Input placeholder="BLK" style={{ width: 94 }} />
</Form.Item> </Form.Item>
</div> </div>
<div className={styles.box2item4}>#</div> <div className={styles.box2item4}>#</div>
<div className={styles.box2item5}> <div className={styles.box2item5}>
<Form.Item name="floorNumber" rules={[{ validator: checkData }]}> <Form.Item
name="floorNumber"
className={styles.floorNumber}
rules={[{ validator: checkData }]}
>
<Input placeholder="Floor" style={{ width: 80 }} /> <Input placeholder="Floor" style={{ width: 80 }} />
</Form.Item> </Form.Item>
</div> </div>
...@@ -124,6 +126,7 @@ const UsersAdd = (props: any) => { ...@@ -124,6 +126,7 @@ const UsersAdd = (props: any) => {
<Form.Item <Form.Item
name="roomNumber" name="roomNumber"
rules={[{ validator: checkData }]} rules={[{ validator: checkData }]}
className={styles.roomNumber}
style={{ width: 260 }} style={{ width: 260 }}
> >
<Input placeholder="Room" style={{ width: 112 }} /> <Input placeholder="Room" style={{ width: 112 }} />
......
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