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
13c6e474
Commit
13c6e474
authored
Jan 18, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
设施限制
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
489fc3c6
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
96 additions
and
98 deletions
+96
-98
Facilitys.tsx
src/components/Facilitys/Facilitys.tsx
+13
-15
SearchOptionsTow.tsx
src/components/SearchOptions/SearchOptionsTow.tsx
+0
-1
BookingDetail.tsx
...es/CommunityManagement/FacilityBookings/BookingDetail.tsx
+34
-31
Facility.tsx
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
+1
-6
FacilityBookings.tsx
...CommunityManagement/FacilityBookings/FacilityBookings.tsx
+3
-6
FacilityTow.tsx
...ages/CommunityManagement/FacilityBookings/FacilityTow.tsx
+45
-39
No files found.
src/components/Facilitys/Facilitys.tsx
View file @
13c6e474
...
...
@@ -72,19 +72,6 @@ const Facilitys = (props: any) => {
// 存储到mode里面去
dispatch
({
type
:
module
+
'/genxin'
,
list
});
// 当前页面也要刷新
// let list = fileList;
// setFileList(list); // 注意 不能直接赋值 因为使用完全绑定需要全部更新
// setFileList(list);
// let list: any = [...fileList, ...info.fileList];
// setFileList(list);
// 将图片信息提交给state
// let data = { val: info.file.name, key: keys };
// dispatch({ type: module + '/retImgsList', data });
// 结束
}
else
if
(
info
.
file
.
status
===
'error'
)
{
message
.
error
(
`
${
info
.
file
.
name
}
file upload failed.`
);
}
...
...
@@ -130,6 +117,17 @@ const Facilitys = (props: any) => {
dispatch
({
type
:
module
+
'/genxin'
,
list
});
};
// 删除图片
const
deleteImgs
=
(
key
:
any
,
id
:
any
)
=>
{
let
list
=
FacilitysList
;
list
[
key
].
name
=
''
;
list
[
key
].
fileList
=
[];
// 存储到mode里面去
dispatch
({
type
:
module
+
'/genxin'
,
list
});
};
// 新增按钮
const
uploadButton
=
(
<
div
>
...
...
@@ -162,7 +160,7 @@ const Facilitys = (props: any) => {
disabled=
{
disabled
}
// 禁止
onPreview=
{
handlePreview
}
// 预览
onRemove=
{
()
=>
{
deleteImg
(
index
,
item
.
id
);
deleteImg
s
(
index
,
item
.
id
);
}
}
//移除
>
{
FacilitysList
[
index
].
fileList
.
length
>
0
?
null
:
uploadButton
}
...
...
@@ -180,7 +178,7 @@ const Facilitys = (props: any) => {
id=
{
index
}
onChange=
{
(
e
:
any
)
=>
monitor
(
e
,
index
)
}
value=
{
FacilitysList
[
index
].
name
}
disabled=
{
FacilitysList
[
index
].
disabled
}
disabled=
{
FacilitysList
[
index
].
disabled
||
disabled
}
/>
</
Form
.
Item
>
<
div
className=
{
'over'
}
>
...
...
src/components/SearchOptions/SearchOptionsTow.tsx
View file @
13c6e474
...
...
@@ -37,7 +37,6 @@ const SearchOptionsTow = (porps: any) => {
)
:
(
<
Select
showSearch
allowClear
style=
{
{
width
:
200
}
}
placeholder=
"Community Name"
optionFilterProp=
"children"
...
...
src/pages/CommunityManagement/FacilityBookings/BookingDetail.tsx
View file @
13c6e474
...
...
@@ -10,9 +10,8 @@ import { connect } from 'umi';
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
import
{
getUrlLast
}
from
'../../../utils/string'
;
const
BookingDetail
=
(
props
:
any
)
=>
{
const
{
dispatch
,
location
,
DataSave
,
history
,
DataSaveDetail
,
token
,
load
}
=
props
;
const
{
dispatch
,
DataSave
,
history
,
DataSaveDetail
,
token
,
load
}
=
props
;
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'FacilityBookings/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
});
...
...
@@ -22,8 +21,6 @@ const BookingDetail = (props: any) => {
if
(
DataSave
!=
null
)
{
// 已预约时间段
let
arr
=
DataSave
.
subscribeTime
.
split
(
','
);
console
.
log
(
arr
[
0
]);
console
.
log
(
arr
[
arr
.
length
-
1
]);
setExtractTime
(
`
${
arr
[
0
]}
To
${
arr
[
arr
.
length
-
1
]}
`
);
if
(
DataSave
.
managerFeeStatus
!=
0
)
{
RA
(
2
,
{
accountCategoriesId
:
DataSave
.
id
});
...
...
@@ -165,11 +162,12 @@ const BookingDetail = (props: any) => {
<
hr
/>
{
/* 已交押金且未产生退费且不是免费的 */
}
{
DataSave
&&
{
(
DataSave
&&
DataSaveDetail
&&
DataSave
.
managerFeeStatus
==
1
&&
DataSaveDetail
.
backMarginFee
==
0
&&
DataSaveDetail
.
managerFee
>
0
?
(
DataSaveDetail
.
managerFee
>
0
)
||
(
DataSave
.
managerFee
==
0
&&
DataSave
.
marginFee
>
0
&&
DataSave
.
status
!=
3
)
?
(
<>
<
Form
ref=
{
formRef
}
...
...
@@ -190,6 +188,10 @@ const BookingDetail = (props: any) => {
<
Radio
value=
{
1
}
style=
{
radioStyle
}
>
Full Refund
</
Radio
>
{
DataSave
.
status
==
'2'
||
DataSave
.
status
==
'4'
?
(
''
)
:
(
<
Radio
value=
{
2
}
style=
{
radioStyle
}
>
Partial Refund
{
backFeeFlag
?
(
...
...
@@ -212,6 +214,7 @@ const BookingDetail = (props: any) => {
</>
)
:
null
}
</
Radio
>
)
}
</
Radio
.
Group
>
{
backFeeFlag
?
(
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
13c6e474
...
...
@@ -21,8 +21,6 @@ import { validateMessages } from '@/utils/params';
const
module
=
'FacilityBookings'
;
import
moment
from
'moment'
;
import
OnTime
from
'@/components/OnTime/OnTime'
;
const
Facility
=
(
props
:
any
)
=>
{
const
{
dispatch
,
location
,
token
,
sourceData
,
DataSave
,
Result
,
load
,
FacilitysList
}
=
props
;
...
...
@@ -479,10 +477,7 @@ const Facility = (props: any) => {
</
Input
.
Group
>
<
hr
></
hr
>
{
/* <Row gutter={32} style={{ marginTop: 28 }}>
<Col>Appointment Period</Col>
<Col><TimeSelect putSubmit={TimeSelectRef} defaultValue={timeExtend} disabled={facilityDetail}/></Col>
</Row> */
}
{
facilityDetail
?
(
<>
{
imgOpen
?
(
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityBookings.tsx
View file @
13c6e474
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Input
,
Tabs
,
Pagination
,
Space
,
Button
,
message
}
from
'antd'
;
import
{
Tabs
,
Pagination
,
Space
,
Button
,
message
}
from
'antd'
;
const
{
TabPane
}
=
Tabs
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
history
}
from
'umi'
;
import
{
useIntl
,
connect
,
history
}
from
'umi'
;
import
{
objectColumns
}
from
'../../../utils/string'
;
import
{
timestampToTime
}
from
'../../../utils/time'
;
import
TitleSearch
from
'../../../components/TitleSearch/TitleSearch'
;
// const managerFeeStatusDes= ["未交", "已交", "已退"]
...
...
@@ -27,8 +26,6 @@ import { PlusOutlined } from '@ant-design/icons';
import
moment
from
'moment'
;
const
FacilityBookings
=
(
props
:
any
)
=>
{
const
{
formatMessage
}
=
useIntl
();
const
{
dispatch
,
location
,
...
...
@@ -316,7 +313,7 @@ const FacilityBookings = (props: any) => {
<
TitleSearch
status=
{
[
{
name
:
[
'status'
,
'
Order
status'
],
name
:
[
'status'
,
'
Booking
status'
],
data
:
[
[
0
,
'All'
],
[
1
,
'Applied'
],
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityTow.tsx
View file @
13c6e474
...
...
@@ -70,11 +70,13 @@ const FacilityTow = (props: any) => {
// 点击设施获取到的设施列表
useEffect
(()
=>
{
if
(
DataSaveDetail
)
{
if
(
DataSaveDetail
!==
null
)
{
let
{
categories
,
facilities
}
=
DataSaveDetail
;
console
.
log
(
categories
);
// 设施A、设施B小图
let
list
:
any
=
categories
.
map
((
item
:
any
,
index
:
any
)
=>
{
let
list
:
any
=
categories
?
categories
.
map
((
item
:
any
,
index
:
any
)
=>
{
let
sam
=
{
id
:
index
,
name
:
item
.
categoriesName
,
...
...
@@ -92,11 +94,14 @@ const FacilityTow = (props: any) => {
[
'shebei_'
+
index
]:
item
.
categoriesName
,
});
return
sam
;
});
})
:
[];
dispatch
({
type
:
module
+
'/genxin'
,
list
});
// 设施总图片
let
fileListImg
:
any
=
[];
if
(
facilities
)
{
facilities
.
facilitiesImageList
.
map
((
item
:
any
,
index
:
any
)
=>
{
let
sam
=
{
uid
:
index
,
...
...
@@ -107,8 +112,6 @@ const FacilityTow = (props: any) => {
fileListImg
.
push
(
sam
);
});
setFileList
([...
fileListImg
]);
// 设置表单默认值
formRef
.
current
.
setFieldsValue
(
facilities
);
// 周期
...
...
@@ -119,6 +122,9 @@ const FacilityTow = (props: any) => {
Time
:
[
moment
(
time
[
0
],
'HH:mm'
),
moment
(
time
[
1
],
'HH:mm'
)],
});
}
setFileList
([...
fileListImg
]);
}
},
[
DataSaveDetail
]);
// tab 切换
...
...
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