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
Hide 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
&&
DataSaveDetail
&&
DataSave
.
managerFeeStatus
==
1
&&
DataSaveDetail
.
backMarginFee
==
0
&&
DataSaveDetail
.
managerFee
>
0
?
(
{
(
DataSave
&&
DataSaveDetail
&&
DataSave
.
managerFeeStatus
==
1
&&
DataSaveDetail
.
backMarginFee
==
0
&&
DataSaveDetail
.
managerFee
>
0
)
||
(
DataSave
.
managerFee
==
0
&&
DataSave
.
marginFee
>
0
&&
DataSave
.
status
!=
3
)
?
(
<>
<
Form
ref=
{
formRef
}
...
...
@@ -190,28 +188,33 @@ const BookingDetail = (props: any) => {
<
Radio
value=
{
1
}
style=
{
radioStyle
}
>
Full Refund
</
Radio
>
<
Radio
value=
{
2
}
style=
{
radioStyle
}
>
Partial Refund
{
backFeeFlag
?
(
<>
<
InputNumber
placeholder=
"00.00"
min=
{
0
}
max=
{
(
parseInt
(
DataSaveDetail
.
marginFee
)
+
parseInt
(
DataSaveDetail
.
managerFee
)
).
toFixed
(
2
)
as
any
}
maxLength=
{
6
}
step=
{
0.01
}
prefix=
"$"
onChange=
{
getBackMarginFee
}
style=
{
{
width
:
80
,
marginLeft
:
10
}
}
/>
</>
)
:
null
}
</
Radio
>
{
DataSave
.
status
==
'2'
||
DataSave
.
status
==
'4'
?
(
''
)
:
(
<
Radio
value=
{
2
}
style=
{
radioStyle
}
>
Partial Refund
{
backFeeFlag
?
(
<>
<
InputNumber
placeholder=
"00.00"
min=
{
0
}
max=
{
(
parseInt
(
DataSaveDetail
.
marginFee
)
+
parseInt
(
DataSaveDetail
.
managerFee
)
).
toFixed
(
2
)
as
any
}
maxLength=
{
6
}
step=
{
0.01
}
prefix=
"$"
onChange=
{
getBackMarginFee
}
style=
{
{
width
:
80
,
marginLeft
:
10
}
}
/>
</>
)
:
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,54 +70,60 @@ 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
sam
=
{
id
:
index
,
name
:
item
.
categoriesName
,
fileList
:
[
{
uid
:
item
.
id
,
name
:
item
.
categoriesImageName
,
status
:
'done'
,
url
:
item
.
categoriesImageUrl
,
},
],
};
// 设施图片列表默认值
form
.
setFieldsValue
({
[
'shebei_'
+
index
]:
item
.
categoriesName
,
});
return
sam
;
});
let
list
:
any
=
categories
?
categories
.
map
((
item
:
any
,
index
:
any
)
=>
{
let
sam
=
{
id
:
index
,
name
:
item
.
categoriesName
,
fileList
:
[
{
uid
:
item
.
id
,
name
:
item
.
categoriesImageName
,
status
:
'done'
,
url
:
item
.
categoriesImageUrl
,
},
],
};
// 设施图片列表默认值
form
.
setFieldsValue
({
[
'shebei_'
+
index
]:
item
.
categoriesName
,
});
return
sam
;
})
:
[];
dispatch
({
type
:
module
+
'/genxin'
,
list
});
// 设施总图片
let
fileListImg
:
any
=
[];
facilities
.
facilitiesImageList
.
map
((
item
:
any
,
index
:
any
)
=>
{
let
sam
=
{
uid
:
index
,
name
:
item
.
facilitiesImageName
,
status
:
'done'
,
url
:
item
.
facilitiesImageUrl
,
};
fileListImg
.
push
(
sam
);
});
setFileList
([...
fileListImg
]);
if
(
facilities
)
{
facilities
.
facilitiesImageList
.
map
((
item
:
any
,
index
:
any
)
=>
{
let
sam
=
{
uid
:
index
,
name
:
item
.
facilitiesImageName
,
status
:
'done'
,
url
:
item
.
facilitiesImageUrl
,
};
fileListImg
.
push
(
sam
);
});
// 设置表单默认值
formRef
.
current
.
setFieldsValue
(
facilities
);
// 周期
setCycle
(
facilities
.
periodType
+
''
);
// 时间
let
time
=
facilities
.
reservationQuantumTime
.
split
(
','
);
formRef
.
current
.
setFieldsValue
({
Time
:
[
moment
(
time
[
0
],
'HH:mm'
),
moment
(
time
[
1
],
'HH:mm'
)],
});
// 设置表单默认值
formRef
.
current
.
setFieldsValue
(
facilities
);
// 周期
setCycle
(
facilities
.
periodType
+
''
);
// 时间
let
time
=
facilities
.
reservationQuantumTime
.
split
(
','
);
formRef
.
current
.
setFieldsValue
({
Time
:
[
moment
(
time
[
0
],
'HH:mm'
),
moment
(
time
[
1
],
'HH:mm'
)],
});
}
setFileList
([...
fileListImg
]);
}
},
[
DataSaveDetail
]);
...
...
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