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