Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maple
TOSTUMI
Commits
12cab9bc
Commit
12cab9bc
authored
Jan 08, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设施预约时间限制
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
7ca55b90
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
30 deletions
+40
-30
Bookings.tsx
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
+33
-5
FacilityBookings.tsx
...CommunityManagement/FacilityBookings/FacilityBookings.tsx
+7
-25
No files found.
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
View file @
12cab9bc
...
@@ -129,7 +129,7 @@ const Bookings = (props: any) => {
...
@@ -129,7 +129,7 @@ const Bookings = (props: any) => {
return
false
;
return
false
;
}
}
// 手机判断
// 手机判断
if
(
tmp
.
accountPhone
.
length
!=
11
&&
tmp
.
accountPhone
.
length
!=
8
)
{
if
(
tmp
.
accountPhone
&&
tmp
.
accountPhone
.
length
!=
11
&&
tmp
.
accountPhone
.
length
!=
8
)
{
message
.
error
(
'Please Fill In The Contact Information Correctly!'
);
message
.
error
(
'Please Fill In The Contact Information Correctly!'
);
return
false
;
return
false
;
}
}
...
@@ -157,7 +157,7 @@ const Bookings = (props: any) => {
...
@@ -157,7 +157,7 @@ const Bookings = (props: any) => {
tmp
.
communityManagerFee
=
numberToString
(
curString
.
communityManagerFee
);
tmp
.
communityManagerFee
=
numberToString
(
curString
.
communityManagerFee
);
tmp
.
communityMargin
=
numberToString
(
curString
.
communityMargin
);
tmp
.
communityMargin
=
numberToString
(
curString
.
communityMargin
);
}
}
if
(
tmp
.
accountName
.
length
<
2
)
{
if
(
tmp
.
accountName
&&
tmp
.
accountName
.
length
<
2
)
{
message
.
error
(
'User Name Should be limit 2~30!'
,
3
);
message
.
error
(
'User Name Should be limit 2~30!'
,
3
);
}
else
if
(
}
else
if
(
soltTime
&&
soltTime
&&
...
@@ -168,8 +168,36 @@ const Bookings = (props: any) => {
...
@@ -168,8 +168,36 @@ const Bookings = (props: any) => {
}
else
{
}
else
{
tmp
.
reservedTimeList
=
soltTime
;
// 预约时间
tmp
.
reservedTimeList
=
soltTime
;
// 预约时间
// 选择的总时间段
let
times
=
[]
as
any
;
for
(
let
i
=
0
;
i
<=
parseInt
(
moment
(
soltTime
[
1
],
'HH:mm'
).
format
(
'HH'
));
i
++
)
{
if
(
i
>=
parseInt
(
moment
(
soltTime
[
0
],
'HH:mm'
).
format
(
'HH'
)))
{
times
.
push
(
moment
(
i
,
'HH'
).
format
(
'HH:mm'
));
}
}
// 如果有已被预约的时间段的话、循环判断已被预约时间是否包含选择的时间
let
fruit
=
false
;
if
(
result
)
{
// 是不是存在
for
(
let
i
in
times
)
{
result
.
find
((
item
:
any
)
=>
{
if
(
item
.
indexOf
(
times
[
i
])
!==
-
1
)
{
fruit
=
true
;
}
});
}
}
// 如果选择的时间段有其他包含的话 给出提示,否则 可以提交
if
(
fruit
)
{
// 判断选的时间 是不是结束时间小于开始时间
message
.
error
(
'Reservation period already exists!'
);
return
false
;
}
else
{
RA
(
11
,
tmp
);
RA
(
11
,
tmp
);
}
}
}
};
};
// 选择设施
// 选择设施
const
RadioChoose
=
(
e
:
any
)
=>
{
const
RadioChoose
=
(
e
:
any
)
=>
{
...
@@ -459,7 +487,7 @@ const Bookings = (props: any) => {
...
@@ -459,7 +487,7 @@ const Bookings = (props: any) => {
</
div
>
</
div
>
{
/* 提示已选时间段 */
}
{
/* 提示已选时间段 */
}
{
result
!=
null
&&
result
.
length
>
0
?
(
{
/* {
result != null && result.length > 0 ? (
<div className={styles.box3}>
<div className={styles.box3}>
<div className={styles.box3item1}>Reserved Time Period:</div>
<div className={styles.box3item1}>Reserved Time Period:</div>
<div className="boxdiyitem">
<div className="boxdiyitem">
...
@@ -472,7 +500,7 @@ const Bookings = (props: any) => {
...
@@ -472,7 +500,7 @@ const Bookings = (props: any) => {
})}
})}
</div>
</div>
</div>
</div>
)
:
null
}
) : null}
*/
}
{
curString
.
communityManagerFee
!=
null
&&
Data3
?
(
{
curString
.
communityManagerFee
!=
null
&&
Data3
?
(
<>
<>
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityBookings.tsx
View file @
12cab9bc
...
@@ -12,11 +12,14 @@ import TitleSearch from '../../../components/TitleSearch/TitleSearch';
...
@@ -12,11 +12,14 @@ import TitleSearch from '../../../components/TitleSearch/TitleSearch';
// const managerFeeStatusDes= ["未交", "已交", "已退"]
// const managerFeeStatusDes= ["未交", "已交", "已退"]
// const marginFeeStatusDes = ["未交", "已交", "未退", "已退部分", "已退全部"]
// const marginFeeStatusDes = ["未交", "已交", "未退", "已退部分", "已退全部"]
// const statusDes = ["全部", "已申请", "已预订", "已使用", "已取消", "已完成"]
// const statusDes = ["全部", "已申请", "已预订", "已使用", "已取消", "已完成"]
// const managerFeeStatusDes = ['Not paid', 'Paid', 'Returned'];
const
managerFeeStatusDes
=
[
'Not paid'
,
'Paid'
,
'Returned'
];
// const marginFeeStatusDes = ['Not paid', 'Paid', 'Not Returned', 'Returned part', 'Returned all'];
const
marginFeeStatusDes
=
[
'Not paid'
,
'Paid'
,
'Not Returned'
,
'Returned part'
,
'Returned all'
];
const
statusDes
=
[
'All'
,
'Applied'
,
'Reserved'
,
'Used'
,
'Cancelled'
,
'Completed'
];
const
statusDes
=
[
'All'
,
'Applied'
,
'Reserved'
,
'Used'
,
'Cancelled'
,
'Completed'
];
//修改的状态
// const feeStatus = ['已申请未给钱', '未使用', '已使用未退款', '已使用部分退款', '全退款', '其他'];
const
feeStatus
=
[
'Unpaid'
,
'Paid'
,
'Pending Refund'
,
'Partial Refund'
,
'Full Refund'
,
'N.A.'
];
import
'./css/index.less'
;
import
'./css/index.less'
;
import
ProTable
from
'@ant-design/pro-table'
;
import
ProTable
from
'@ant-design/pro-table'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
...
@@ -109,28 +112,7 @@ const FacilityBookings = (props: any) => {
...
@@ -109,28 +112,7 @@ const FacilityBookings = (props: any) => {
</
div
>
</
div
>
),
),
],
],
[
[
'Fee/Depsit'
,
'feeStatus'
,
(
text
:
any
)
=>
<
div
>
{
feeStatus
[
text
]
}
</
div
>],
'Fee'
,
'managerFeeStatus'
,
(
text
:
any
,
record
:
any
)
=>
(
<
div
>
{
record
.
communityManagerFee
==
0
&&
record
.
communityMargin
?
'N.A.'
:
managerFeeStatusDes
[
text
]
}
</
div
>
),
],
[
'Deposit'
,
'marginFeeStatus'
,
(
text
:
any
,
record
:
any
)
=>
(
<
div
>
{
record
.
communityManagerFee
==
0
&&
record
.
communityMargin
?
'N.A.'
:
marginFeeStatusDes
[
text
]
}
</
div
>
),
],
[
'Status'
,
'status'
,
(
text
:
any
)
=>
<
div
>
{
statusDes
[
text
]
}
</
div
>],
[
'Status'
,
'status'
,
(
text
:
any
)
=>
<
div
>
{
statusDes
[
text
]
}
</
div
>],
[
[
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment