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
f0aec099
Commit
f0aec099
authored
Jan 20, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设施详情状态判断
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
018f0c76
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
15 deletions
+91
-15
BookingDetail.tsx
...es/CommunityManagement/FacilityBookings/BookingDetail.tsx
+23
-12
FacilityTow.tsx
...ages/CommunityManagement/FacilityBookings/FacilityTow.tsx
+68
-3
No files found.
src/pages/CommunityManagement/FacilityBookings/BookingDetail.tsx
View file @
f0aec099
...
...
@@ -22,9 +22,8 @@ const BookingDetail = (props: any) => {
// 已预约时间段
let
arr
=
DataSave
.
subscribeTime
.
split
(
','
);
setExtractTime
(
`
${
arr
[
0
]}
To
${
arr
[
arr
.
length
-
1
]}
`
);
if
(
DataSave
.
managerFeeStatus
!=
0
)
{
// if (DataSave.managerFeeStatus != 0) {}
RA
(
2
,
{
accountCategoriesId
:
DataSave
.
id
});
}
}
else
{
history
.
push
(
'/CommunityManagement/FacilityBookings'
);
}
...
...
@@ -120,6 +119,26 @@ const BookingDetail = (props: any) => {
setModalVisible
(
false
);
};
// 条件判断
function
pd
(
a
:
any
,
b
:
any
)
{
if
(
a
==
b
)
{
return
true
;
}
else
{
return
false
;
}
}
// 状态
let
status
=
DataSave
.
status
;
// 预约设施状态
let
feeStatus
=
DataSave
.
feeStatus
;
//费用状态
// let subFeeStatus = DataSave.subFeeStatus; // 排序状态
// let marginFeeStatus = DataSave.marginFeeStatus; //押金状态
// let managerFeeStatus = DataSave.managerFeeStatus; //管理费状态
// 退费条件
let
term1
=
pd
(
status
,
2
)
&&
pd
(
feeStatus
,
1
);
let
term2
=
pd
(
status
,
3
)
&&
pd
(
feeStatus
,
2
);
let
term3
=
pd
(
status
,
4
)
&&
pd
(
feeStatus
,
2
);
return
(
<>
{
DataSave
&&
DataSaveDetail
?
(
...
...
@@ -167,15 +186,7 @@ const BookingDetail = (props: any) => {
DataSave.status != 3 &&
DataSave.status != 5) ? ( */
}
{(
DataSave
&&
DataSaveDetail
&&
DataSave
.
managerFeeStatus
==
1
&&
DataSaveDetail
.
backMarginFee
==
0
&&
DataSaveDetail
.
marginFee
>
0
)
||
(
DataSaveDetail
.
managerFee
==
0
&&
DataSaveDetail
.
marginFee
>
0
&&
DataSave
.
status
!=
3
&&
DataSave
.
status
!=
5
)
?
(
{
DataSave
&&
DataSaveDetail
&&
(
term1
||
term2
||
term3
)
?
(
<>
<
Form
ref=
{
formRef
}
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityTow.tsx
View file @
f0aec099
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
{
Tabs
,
Spin
,
Input
,
InputNumber
,
Button
,
Form
,
Select
,
message
,
TimePicker
}
from
'antd'
;
import
{
Tabs
,
Spin
,
Input
,
InputNumber
,
Button
,
Form
,
Select
,
message
,
TimePicker
,
Modal
,
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
PoweroffOutlined
}
from
'@ant-design/icons'
;
const
{
Option
}
=
Select
;
const
{
RangePicker
}
=
TimePicker
;
const
{
TabPane
}
=
Tabs
;
...
...
@@ -37,6 +50,8 @@ const FacilityTow = (props: any) => {
const
[
Cycle
,
setCycle
]
=
useState
(
null
as
any
);
// 周期下拉
const
[
Facilityid
,
setFacilityId
]
=
useState
(
null
as
any
);
// 周期下拉
const
[
isModalVisible
,
setIsModalVisible
]
=
useState
(
false
);
// 关闭弹出框
const
formRef
=
useRef
(
null
as
any
);
const
[
form
]
=
Form
.
useForm
();
// 表单标识
const
module
=
'FacilityBookings'
;
...
...
@@ -67,7 +82,7 @@ const FacilityTow = (props: any) => {
return
n1
.
id
-
n2
.
id
;
});
}
else
{
//返回列表
history
.
push
(
'/CommunityManagement/FacilityBookings'
);
}
},
[
DataSave
]);
...
...
@@ -241,6 +256,30 @@ const FacilityTow = (props: any) => {
});
};
// 打开关闭框
const
showModal
=
()
=>
{
setIsModalVisible
(
true
);
};
// 确认删除
const
handleOk
=
()
=>
{
// setIsModalVisible(false);
message
.
info
(
'In function development'
);
};
// 关闭关闭框
const
handleCancel
=
()
=>
{
setIsModalVisible
(
false
);
};
// 关闭按钮
const
operations
=
(
<
Button
type=
"primary"
danger
onClick=
{
showModal
}
>
<
PoweroffOutlined
/>
Close The Selected Facility
</
Button
>
);
return
(
<
div
style=
{
{
padding
:
16
}
}
>
{
/* 头部组件v1.2 */
}
...
...
@@ -252,7 +291,12 @@ const FacilityTow = (props: any) => {
<
label
>
Community :
</
label
>
{
DataSave
?
DataSave
.
community
:
''
}
</
div
>
<
Tabs
defaultActiveKey=
"0"
tabPosition=
"top"
onTabClick=
{
(
key
)
=>
onTabClicks
(
key
)
}
>
<
Tabs
defaultActiveKey=
"0"
tabPosition=
"top"
onTabClick=
{
(
key
)
=>
onTabClicks
(
key
)
}
tabBarExtraContent=
{
facilityDetail
?
operations
:
''
}
>
{
DataSave
?
DataSave
.
facilities
.
map
((
i
:
any
)
=>
<
TabPane
tab=
{
`${i.name}`
}
key=
{
i
.
id
}
></
TabPane
>)
:
''
}
...
...
@@ -439,6 +483,27 @@ const FacilityTow = (props: any) => {
</
Form
>
</
div
>
</
Spin
>
<
Modal
title=
"Close Facility"
visible=
{
isModalVisible
}
onOk=
{
handleOk
}
okText=
{
'Confirm'
}
cancelText=
{
'Cancel'
}
onCancel=
{
handleCancel
}
centered
confirmLoading=
{
load
}
>
<
p
>
Closing of facilities :
{
' '
}
<
span
style=
{
{
color
:
'#f00'
}
}
>
{
DataSaveDetail
&&
DataSaveDetail
.
facilities
&&
DataSaveDetail
.
facilities
.
facilityName
?
DataSaveDetail
.
facilities
.
facilityName
:
''
}{
' '
}
</
span
>
?
</
p
>
</
Modal
>
</
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