Commit 7c658770 authored by Sixiang_Zzb's avatar Sixiang_Zzb

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

parent fca46b7d
......@@ -108,7 +108,11 @@ const CardAdd = (props: any) => {
style={{ marginRight: 16 }}
className={styles.buildNumber}
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'} />
......@@ -119,7 +123,11 @@ const CardAdd = (props: any) => {
style={{ marginRight: 16 }}
className={styles.floorNumber}
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'} />
......@@ -128,7 +136,13 @@ const CardAdd = (props: any) => {
<Form.Item
name="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'} />
</Form.Item>
......
......@@ -59,7 +59,7 @@
position: absolute;
top: 34px;
left: 33px;
width: 180px;
width: 260px;
z-index: 10;
background-color: #fff;
min-height: 20px;
......@@ -71,21 +71,21 @@
position: absolute;
top: 34px;
left: -87px;
width: 180px;
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;
// }
// }
.roomNumber {
:global(.ant-form-item-explain) {
position: absolute;
top: 34px;
left: -205px;
width: 260px;
z-index: 30;
background-color: #fff;
min-height: 20px;
}
}
......@@ -117,13 +117,16 @@ const Users = (props: any) => {
history.push(location.pathname + '/Result');
} else if (info.file.response.error_code == '0002') {
message.error(info.file.response.error_msg);
} else {
} else if (info.file.response.error_code == '0001') {
history.push(location.pathname + '/ResultFailed');
message.error(
`${info.file.name} file upload failed.` +
'failed count is ' +
info.file.response.data.count,
);
} else {
message.error('File upload failed');
setFileUploading(false);
}
setFileUploading(false);
} else if (info.file.status === 'error') {
......
......@@ -142,3 +142,38 @@
.ant-form-item-explain {
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) => {
</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.box2item1}>Contact Details</div>
<div className={styles.box2item2}>
......@@ -109,13 +103,21 @@ const UsersAdd = (props: any) => {
<Form.Item>
<Input.Group>
<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 }} />
</Form.Item>
</div>
<div className={styles.box2item4}>#</div>
<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 }} />
</Form.Item>
</div>
......@@ -124,6 +126,7 @@ const UsersAdd = (props: any) => {
<Form.Item
name="roomNumber"
rules={[{ validator: checkData }]}
className={styles.roomNumber}
style={{ width: 260 }}
>
<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