Commit 269f1bbb authored by cellee's avatar cellee

新增预约设施分类

Signed-off-by: cellee's avatarcellee <893264950@qq.com>
parent 27c5d6df
...@@ -266,6 +266,7 @@ export default defineConfig({ ...@@ -266,6 +266,7 @@ export default defineConfig({
routes: [ routes: [
{ path: './', component: './CommunityManagement/CellList/CellList' }, { path: './', component: './CommunityManagement/CellList/CellList' },
{ path: './Add', component: './CommunityManagement/CellList/Adds' }, { path: './Add', component: './CommunityManagement/CellList/Adds' },
{ path: './Edit', component: './CommunityManagement/CellList/Adds' },
{ path: './Detail', component: './CommunityManagement/CellList/Details' }, { path: './Detail', component: './CommunityManagement/CellList/Details' },
{ path: '*', component: '@/pages/404' }, { path: '*', component: '@/pages/404' },
], ],
......
...@@ -174,7 +174,7 @@ const Facilitys = (props: any) => { ...@@ -174,7 +174,7 @@ const Facilitys = (props: any) => {
<div className={'Facility'} key={item.id}> <div className={'Facility'} key={item.id}>
<Form.Item <Form.Item
label={`Facility Name ${index + 1}`} label={`Facility ${index + 1}`}
name={'shebei_' + item.id} name={'shebei_' + item.id}
rules={[{ required: true, message: 'Please input Facility Name!' }]} rules={[{ required: true, message: 'Please input Facility Name!' }]}
> >
......
...@@ -21,3 +21,7 @@ ...@@ -21,3 +21,7 @@
} }
} }
} }
.basediy .ant-form-item-required,
.basediy .ant-form-item-label > label {
min-width: 108px !important;
}
...@@ -50,7 +50,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout ...@@ -50,7 +50,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
{ key: '42', path: '/ContractManagement/Edit' }, { key: '42', path: '/ContractManagement/Edit' },
// 小区 // 小区
{ path: '/CommunityManagement/CellList/Detail', title: '查看小区', key: '44' }, { path: '/CommunityManagement/CellList/Detail', title: '查看小区', key: '44' },
{ path: '/CommunityManagement/CellList/Add', title: '编辑小区', key: '45' }, { path: '/CommunityManagement/CellList/Edit', title: '编辑小区', key: '45' },
{ path: '/CommunityManagement/CellList/Add', title: '添加小区', key: '46' }, { path: '/CommunityManagement/CellList/Add', title: '添加小区', key: '46' },
// 小区公告 // 小区公告
{ path: '/CommunityManagement/CommunityAnnouncement', title: '小区公告', key: '48' }, { path: '/CommunityManagement/CommunityAnnouncement', title: '小区公告', key: '48' },
......
...@@ -52,7 +52,7 @@ const CellLists = (props: any) => { ...@@ -52,7 +52,7 @@ const CellLists = (props: any) => {
<Space size="middle"> <Space size="middle">
<a <a
onClick={() => { onClick={() => {
emptys(record, '/CommunityManagement/CellList/Add'); emptys(record, '/CommunityManagement/CellList/Edit');
}} }}
> >
Edit Edit
......
...@@ -111,7 +111,7 @@ const Add = (props: any) => { ...@@ -111,7 +111,7 @@ const Add = (props: any) => {
}} }}
limitNums={5} limitNums={5}
over={true} over={true}
defaultValue={ImageSrc} imgs={ImageSrc}
/> />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
......
...@@ -24,9 +24,7 @@ const BookingDetail = (props: any) => { ...@@ -24,9 +24,7 @@ const BookingDetail = (props: any) => {
let arr = DataSave.subscribeTime.split(','); let arr = DataSave.subscribeTime.split(',');
console.log(arr[0]); console.log(arr[0]);
console.log(arr[arr.length - 1]); console.log(arr[arr.length - 1]);
let start = ampm(arr[0]); setExtractTime(`${arr[0]} To ${arr[arr.length - 1]}`);
let over = ampm(arr[arr.length - 1]);
setExtractTime(`${start} To ${over}`);
if (DataSave.managerFeeStatus != 0) { if (DataSave.managerFeeStatus != 0) {
RA(2, { accountCategoriesId: DataSave.id }); RA(2, { accountCategoriesId: DataSave.id });
} }
...@@ -65,15 +63,6 @@ const BookingDetail = (props: any) => { ...@@ -65,15 +63,6 @@ const BookingDetail = (props: any) => {
} }
}; };
// 看是AM还是PM
const ampm = (time: any) => {
if (time.substring(0, 2) < 12) {
return `${time} AM`;
} else {
return `${time} PM`;
}
};
// 点击退款 // 点击退款
const onFinish = (values: any) => { const onFinish = (values: any) => {
var val = values; var val = values;
...@@ -157,14 +146,14 @@ const BookingDetail = (props: any) => { ...@@ -157,14 +146,14 @@ const BookingDetail = (props: any) => {
<Descriptions> <Descriptions>
<Descriptions.Item label="Community">{DataSave.communityName}</Descriptions.Item> <Descriptions.Item label="Community">{DataSave.communityName}</Descriptions.Item>
<Descriptions.Item label="Facility">{DataSave.categoriesName}</Descriptions.Item> <Descriptions.Item label="Facility">{DataSave.categoriesName}</Descriptions.Item>
<Descriptions.Item label="Booking Time"> <Descriptions.Item label="Schedule">
{DataSave.subscribeDate} {ExtractTime} {DataSave.subscribeDate} {ExtractTime}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="User Name">{DataSave.accountName}</Descriptions.Item> <Descriptions.Item label="User Name">{DataSave.accountName}</Descriptions.Item>
<Descriptions.Item label="Contact Number">{DataSave.accountPhone}</Descriptions.Item>
<Descriptions.Item label="Unit No."> <Descriptions.Item label="Unit No.">
{DataSave.buildNumber} #{DataSave.floorNumber}-{DataSave.roomNumber} {DataSave.buildNumber} #{DataSave.floorNumber}-{DataSave.roomNumber}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="Contact Number">{DataSave.accountPhone}</Descriptions.Item>
</Descriptions> </Descriptions>
<hr /> <hr />
...@@ -251,7 +240,7 @@ const BookingDetail = (props: any) => { ...@@ -251,7 +240,7 @@ const BookingDetail = (props: any) => {
</Descriptions> </Descriptions>
<Button className="pay" loading={load} onClick={makeFee}> <Button className="pay" loading={load} onClick={makeFee}>
Go Pay Make Payment
</Button> </Button>
</div> </div>
<hr /> <hr />
...@@ -261,7 +250,7 @@ const BookingDetail = (props: any) => { ...@@ -261,7 +250,7 @@ const BookingDetail = (props: any) => {
{/* 取消预订按钮 */} {/* 取消预订按钮 */}
{DataSave.status == 1 || DataSave.status == 2 ? ( {DataSave.status == 1 || DataSave.status == 2 ? (
<Button onClick={showModal} loading={load}> <Button onClick={showModal} loading={load}>
Cancel Reservation Cancel Booking
</Button> </Button>
) : null} ) : null}
...@@ -281,10 +270,10 @@ const BookingDetail = (props: any) => { ...@@ -281,10 +270,10 @@ const BookingDetail = (props: any) => {
</p> </p>
) : ( ) : (
<p> <p>
Confirm receipt of all usage amount of the facility ? Please confirm to receive full payment for this booking!
<div> {/* <div>
{DataSave.subscribeDate} {DataSave.subscribeTime} {DataSave.facilityTitle} {DataSave.subscribeDate} {DataSave.subscribeTime} {DataSave.facilityTitle}
</div> </div> */}
</p> </p>
)} )}
</Modal> </Modal>
......
...@@ -89,6 +89,8 @@ const Bookings = (props: any) => { ...@@ -89,6 +89,8 @@ const Bookings = (props: any) => {
setResultTime(null); setResultTime(null);
setSoltTime([]); setSoltTime([]);
} }
console.log(Data3);
}, [Data3]); }, [Data3]);
// 监听 已选时间段 // 监听 已选时间段
...@@ -250,7 +252,7 @@ const Bookings = (props: any) => { ...@@ -250,7 +252,7 @@ const Bookings = (props: any) => {
<TitleBack title="Facility Bookings" /> <TitleBack title="Facility Bookings" />
<div className={styles.box1}> <div className={styles.box1}>
<div className={styles.box1item1}>Project : </div> <div className={styles.box1item1}>Communit : </div>
<div className={styles.box1item2}> <div className={styles.box1item2}>
<Spin spinning={loading} tip="Finding..."> <Spin spinning={loading} tip="Finding...">
<SearchOptionsCommnity <SearchOptionsCommnity
...@@ -275,10 +277,10 @@ const Bookings = (props: any) => { ...@@ -275,10 +277,10 @@ const Bookings = (props: any) => {
// autocomplete="off" // autocomplete="off"
> >
<div className="box2 required"> <div className="box2 required">
<div className={styles.box2item1}>Facility Bookings : </div> <div className={styles.box2item1}>Facilities Available: </div>
<div className={styles.box2item2}> <div className={styles.box2item2}>
<Form.Item name="categoriesName"> <Form.Item name="categoriesName">
<Radio.Group defaultValue={1} onChange={RadioChoose}> {/* <Radio.Group defaultValue={1} onChange={RadioChoose}>
{Data3.map((item: any, index: any) => { {Data3.map((item: any, index: any) => {
var tmp = new Array(); var tmp = new Array();
item.categorieList.map((thing: any, i: any) => { item.categorieList.map((thing: any, i: any) => {
...@@ -291,38 +293,40 @@ const Bookings = (props: any) => { ...@@ -291,38 +293,40 @@ const Bookings = (props: any) => {
return tmp; return tmp;
})} })}
</Radio.Group> */}
<Radio.Group onChange={RadioChoose}>
{Data3.map((item: any, index: any) => {
return (
<li>
<i
style={{
display: 'inline-block',
width: 'auto',
marginRight: 15,
fontSize: 14,
fontStyle: 'normal',
}}
>
{item.facilitiesName} :
</i>
{item.categorieList.map((thing: any, i: any) => {
return (
<Radio key={thing.categoriesId} value={thing}>
{thing.categoriesName}
</Radio>
);
})}
</li>
);
})}
</Radio.Group> </Radio.Group>
</Form.Item> </Form.Item>
</div> </div>
</div> </div>
<div className={styles.line}></div> <div className={styles.line}></div>
<div className="box3 required"> <div className="box4 required" style={{ marginBottom: 25 }}>
<div className={styles.box3item1}>User Name : </div>
<div className={styles.box3item2}>
<Form.Item name="accountName" rules={BookingsTip[0]}>
<Input
style={{ width: 200 }}
placeholder="Name Of Subscriber"
disabled={prohibit}
maxLength={30}
/>
</Form.Item>
</div>
<div className={styles.box3item3}>Contact Details : </div>
<div className={styles.box3item4}>
<Form.Item name="accountPhone" rules={BookingsTip[1]}>
<Input
style={{ width: 200 }}
placeholder="Contact Information"
disabled={prohibit}
maxLength={11}
/>
</Form.Item>
</div>
</div>
<div className="box4 required">
<div className={styles.box4item1}>Unit : </div> <div className={styles.box4item1}>Unit : </div>
<div className="divbox4"> <div className="divbox4">
<Form.Item name="buildNumber" rules={BookingsTip[2]}> <Form.Item name="buildNumber" rules={BookingsTip[2]}>
...@@ -348,6 +352,31 @@ const Bookings = (props: any) => { ...@@ -348,6 +352,31 @@ const Bookings = (props: any) => {
</Form.Item> </Form.Item>
</div> </div>
</div> </div>
<div className="box3 ">
<div className={styles.box3item1}>User Name : </div>
<div className={styles.box3item2}>
<Form.Item name="accountName">
<Input
style={{ width: 200 }}
placeholder="Name Of Subscriber"
disabled={prohibit}
maxLength={30}
/>
</Form.Item>
</div>
<div className={styles.box3item3}>Contact Details : </div>
<div className={styles.box3item4}>
<Form.Item name="accountPhone" rules={BookingsTip[1]}>
<Input
style={{ width: 200 }}
placeholder="Contact Information"
disabled={prohibit}
maxLength={11}
/>
</Form.Item>
</div>
</div>
<div className={styles.line}></div> <div className={styles.line}></div>
<div className="box5 required"> <div className="box5 required">
......
...@@ -327,8 +327,12 @@ const Facility = (props: any) => { ...@@ -327,8 +327,12 @@ const Facility = (props: any) => {
{/* 设施名称 以及费用 */} {/* 设施名称 以及费用 */}
<Input.Group> <Input.Group>
<Form.Item label="Facility" name="facilityName" rules={NewFaci[1]}> <Form.Item label="Facility Classification" name="facilityName" rules={NewFaci[1]}>
<Input placeholder="Facility Name" disabled={facilityDetail} maxLength={30} /> <Input
placeholder="Facility Classification"
disabled={facilityDetail}
maxLength={30}
/>
</Form.Item> </Form.Item>
<Form.Item label="Fee($)" name="communityManagerFee"> <Form.Item label="Fee($)" name="communityManagerFee">
{/* <span className="divIconMoney">$</span> */} {/* <span className="divIconMoney">$</span> */}
...@@ -362,11 +366,7 @@ const Facility = (props: any) => { ...@@ -362,11 +366,7 @@ const Facility = (props: any) => {
<hr></hr> <hr></hr>
{/* 设施品类上传 */} {/* 设施品类上传 */}
<Form.Item <Form.Item label="Facilities" className="flex required" style={{ marginBottom: 0 }}>
label="Facility Classification"
className="flex required"
style={{ marginBottom: 0 }}
>
<Facilitys <Facilitys
disabled={imgOpen} disabled={imgOpen}
updata={{ updata={{
...@@ -381,7 +381,7 @@ const Facility = (props: any) => { ...@@ -381,7 +381,7 @@ const Facility = (props: any) => {
{/* 设施详情上传 */} {/* 设施详情上传 */}
<Form.Item <Form.Item
name="categoriesDetailsImageName" name="categoriesDetailsImageName"
label="Facility Details" label="Facility Pictures"
rules={NewFaci[4]} rules={NewFaci[4]}
> >
<PictureOptionsRow <PictureOptionsRow
...@@ -422,7 +422,7 @@ const Facility = (props: any) => { ...@@ -422,7 +422,7 @@ const Facility = (props: any) => {
<hr></hr> <hr></hr>
{/* ------------- */} {/* ------------- */}
<p className="diyp">Appointment Settings : </p> <p className="diyp">Booking Rules : </p>
{/* 预约设置 */} {/* 预约设置 */}
<Input.Group> <Input.Group>
...@@ -430,8 +430,8 @@ const Facility = (props: any) => { ...@@ -430,8 +430,8 @@ const Facility = (props: any) => {
<Input <Input
onKeyUp={keyup.bind(this, 'cancelReservationDay')} onKeyUp={keyup.bind(this, 'cancelReservationDay')}
disabled={facilityDetail} disabled={facilityDetail}
prefix="Advance" // prefix="Advance"
suffix="Day" suffix="Day(s) In Advance"
style={{ width: 160, textAlign: 'center' }} style={{ width: 160, textAlign: 'center' }}
placeholder="0" placeholder="0"
maxLength={2} maxLength={2}
...@@ -445,8 +445,8 @@ const Facility = (props: any) => { ...@@ -445,8 +445,8 @@ const Facility = (props: any) => {
<Input <Input
onKeyUp={keyup.bind(this, 'nomarginCancelReservationDay')} onKeyUp={keyup.bind(this, 'nomarginCancelReservationDay')}
disabled={facilityDetail} disabled={facilityDetail}
prefix="Advance" // prefix="Advance"
suffix="Day" suffix="Day(s) In Advance"
style={{ width: 160, textAlign: 'center' }} style={{ width: 160, textAlign: 'center' }}
placeholder="0" placeholder="0"
maxLength={2} maxLength={2}
...@@ -458,8 +458,8 @@ const Facility = (props: any) => { ...@@ -458,8 +458,8 @@ const Facility = (props: any) => {
placeholder="0" placeholder="0"
style={{ width: 160, textAlign: 'center' }} style={{ width: 160, textAlign: 'center' }}
disabled={facilityDetail} disabled={facilityDetail}
prefix="Advance" // prefix="Advance"
suffix="Day" suffix="Day(s) In Advance"
maxLength={2} maxLength={2}
/> />
</Form.Item> </Form.Item>
...@@ -467,7 +467,7 @@ const Facility = (props: any) => { ...@@ -467,7 +467,7 @@ const Facility = (props: any) => {
{/* 设置次数 */} {/* 设置次数 */}
<Input.Group> <Input.Group>
<Form.Item label="Appointment Cycle" rules={NewFaci[8]}> <Form.Item label="Booking Quotas" rules={NewFaci[8]}>
<Select <Select
placeholder="Cycle" placeholder="Cycle"
allowClear allowClear
...@@ -487,7 +487,7 @@ const Facility = (props: any) => { ...@@ -487,7 +487,7 @@ const Facility = (props: any) => {
placeholder="Second" placeholder="Second"
style={{ width: 120 }} style={{ width: 120 }}
disabled={facilityDetail} disabled={facilityDetail}
suffix="Second" suffix="Time(s)"
/> />
</Form.Item> </Form.Item>
</Input.Group> </Input.Group>
......
...@@ -94,7 +94,7 @@ const FacilityBookings = (props: any) => { ...@@ -94,7 +94,7 @@ const FacilityBookings = (props: any) => {
history.push(location.pathname + path[index]); history.push(location.pathname + path[index]);
}; };
useEffect(() => { // 表头
const key = [ const key = [
['Community', 'communityName'], ['Community', 'communityName'],
['User Name', 'accountName'], ['User Name', 'accountName'],
...@@ -104,15 +104,8 @@ const FacilityBookings = (props: any) => { ...@@ -104,15 +104,8 @@ const FacilityBookings = (props: any) => {
'subscribeDate', 'subscribeDate',
(text: any, record: any) => ( (text: any, record: any) => (
<div> <div>
{moment(text).format('YYYY-MM-DD')} {record.subscribeTime.substring(0, 5)} {moment(text).format('YYYY-MM-DD')} {record.subscribeTime.substring(0, 5)} To{' '}
{record.subscribeTime.substring(0, 2) < 12 ? 'AM' : 'PM'} To{' '}
{record.subscribeTime.substring(record.subscribeTime.length - 5)} {record.subscribeTime.substring(record.subscribeTime.length - 5)}
{record.subscribeTime.substring(
record.subscribeTime.length - 5,
record.subscribeTime.length - 3,
) < 12
? 'AM'
: 'PM'}
</div> </div>
), ),
], ],
...@@ -133,8 +126,8 @@ const FacilityBookings = (props: any) => { ...@@ -133,8 +126,8 @@ const FacilityBookings = (props: any) => {
]; ];
const key2 = [ const key2 = [
['Community', 'communityName'], ['Community', 'communityName'],
['Facilty', 'facilityName'], ['Facilities', 'facilityName'],
['Open Time', 'categoriesOpenTime'], ['Opening Hours', 'categoriesOpenTime'],
[ [
'Action', 'Action',
null, null,
...@@ -147,8 +140,14 @@ const FacilityBookings = (props: any) => { ...@@ -147,8 +140,14 @@ const FacilityBookings = (props: any) => {
), ),
], ],
]; ];
useEffect(() => {
//设置表头
setColumns(objectColumns(key) as any); setColumns(objectColumns(key) as any);
setColumns2(objectColumns(key2) as any); setColumns2(objectColumns(key2) as any);
//发起请求--有小区再发起,没有就没必要了
if (CommunityList) {
if (curString.tab == 1) { if (curString.tab == 1) {
RA(9, { RA(9, {
communityNameList: CommunityList, communityNameList: CommunityList,
...@@ -156,7 +155,6 @@ const FacilityBookings = (props: any) => { ...@@ -156,7 +155,6 @@ const FacilityBookings = (props: any) => {
pageNum: curString.curPage, pageNum: curString.curPage,
subscribeDate: curString.subscribeDate, subscribeDate: curString.subscribeDate,
status: curString.status, status: curString.status,
// communityNameList: curString.communityNameList,
}); });
} else { } else {
RA(8, { RA(8, {
...@@ -165,7 +163,8 @@ const FacilityBookings = (props: any) => { ...@@ -165,7 +163,8 @@ const FacilityBookings = (props: any) => {
communityNameList: CommunityList, communityNameList: CommunityList,
}); });
} }
}, []); }
}, [CommunityList]);
const CallBackTitleSearch = (comment: any) => { const CallBackTitleSearch = (comment: any) => {
if (curString.tab == 1) { if (curString.tab == 1) {
......
...@@ -54,9 +54,12 @@ ...@@ -54,9 +54,12 @@
.box2 { .box2 {
width: 100%; width: 100%;
height: 34px; height: auto;
position: relative; position: relative;
margin-bottom: 28px; margin-bottom: 28px;
li {
line-height: 32px;
}
} }
.box2item1 { .box2item1 {
position: absolute; position: absolute;
......
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