Commit 596208ca authored by Sixiang_Zzb's avatar Sixiang_Zzb

物业创建业主模块放开英文限制,隐藏物业服务 业主投诉模块

parent 581c456b
......@@ -191,7 +191,7 @@ export default defineConfig({
},
{
path: './OwnerComplaints',
name: 'ownercomplaints',
// name: 'ownercomplaints',
component: './CommercialService/PropertyServices',
},
{
......
......@@ -39,6 +39,7 @@ const UsersAdd = (props: any) => {
values.owerPhone = null;
values.owerEmail = null;
values.buildingNumber = 'BLK ' + values.buildingNumber;
console.log(values);
RA(14, values, module, dispatch);
setLoading(true);
} else {
......@@ -67,23 +68,12 @@ const UsersAdd = (props: any) => {
}
}, [communityInfo]);
const checkData = (rule: any, value: any, callback: any) => {
const checkData = (rule: any, value: string, callback: (arg0?: string) => void) => {
if (value) {
if (/^[a-zA-Z0-9]+$/g.test(value)) {
callback();
} else {
callback(new Error('Only numbers and letters can be entered!'));
}
}
callback();
};
const checkData1 = (rule: any, value: any, callback: any) => {
if (value) {
if (/^[0-9]+$/g.test(value)) {
callback();
} else {
callback(new Error('Only numbers!'));
callback('Only numbers and letters can be entered!');
}
}
callback();
......@@ -119,13 +109,13 @@ const UsersAdd = (props: any) => {
<Form.Item>
<Input.Group>
<div className={styles.box2item3}>
<Form.Item name="buildingNumber" rules={[{ validator: checkData1 }]}>
<Form.Item name="buildingNumber" 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: checkData1 }]}>
<Form.Item name="floorNumber" rules={[{ validator: checkData }]}>
<Input placeholder="Floor" style={{ width: 80 }} />
</Form.Item>
</div>
......
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