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
934ce15b
Commit
934ce15b
authored
Feb 06, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改UI样式,修复下拉选择小区清除不了 情况,
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
38295bfd
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
148 additions
and
155 deletions
+148
-155
PdfUpload.tsx
src/components/Form/PdfUpload.tsx
+14
-13
index.less
src/components/GlobalHeader/index.less
+2
-2
SearchOptionsTow.tsx
src/components/SearchOptions/SearchOptionsTow.tsx
+9
-3
CommunityAnnouncement.tsx
...anagement/CommunityAnnouncement/CommunityAnnouncement.tsx
+10
-15
Facility.tsx
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
+49
-51
FacilityTow.tsx
...ages/CommunityManagement/FacilityBookings/FacilityTow.tsx
+52
-55
index.less
...pages/CommunityManagement/FacilityBookings/css/index.less
+1
-1
Contract.tsx
src/pages/ContractManagement/Contract.tsx
+4
-8
ContractContent.tsx
src/pages/ContractManagement/ContractContent.tsx
+1
-1
tip.ts
src/utils/tip.ts
+6
-6
No files found.
src/components/Form/PdfUpload.tsx
View file @
934ce15b
/*
* @Author: your name
* @Date: 2021-02-01 14:54:48
* @LastEditTime: 2021-02-0
5 18:00:41
* @LastEditTime: 2021-02-0
6 11:51:58
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\Form\PdfUpload.tsx
...
...
@@ -19,7 +19,7 @@ interface PriceInputProps {
}
const
PdfUpload
:
React
.
FC
<
PriceInputProps
>
=
({
value
=
{},
onChange
,
disabled
,
action
,
data
})
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
[
false
,
false
,
false
,
false
,
false
]
);
const
[
imgList
,
setImgList
]
=
useState
([]
as
any
);
// 上传前检测
...
...
@@ -37,12 +37,14 @@ const PdfUpload: React.FC<PriceInputProps> = ({ value = {}, onChange, disabled,
// 上传成功怎么做
const
handleChange
=
(
info
:
any
)
=>
{
console
.
log
(
info
);
console
.
log
(
info
.
event
);
let
{
status
,
response
}
=
info
.
file
;
if
(
status
===
'uploading'
)
{
setLoading
(
true
);
// setLoading(
);
return
;
}
else
{
setLoading
(
false
);
//
setLoading(false);
}
if
(
status
===
'done'
)
{
let
{
fileName
,
key
}
=
response
.
data
;
...
...
@@ -73,6 +75,7 @@ const PdfUpload: React.FC<PriceInputProps> = ({ value = {}, onChange, disabled,
name
:
''
,
fileList
:
[],
tip
:
true
,
loading
:
false
,
message
:
'123'
,
};
list
.
push
(
item
);
...
...
@@ -86,14 +89,6 @@ const PdfUpload: React.FC<PriceInputProps> = ({ value = {}, onChange, disabled,
setImgList
([...
list
]);
};
// 上传的按钮
const
uploadButton
=
(
<
div
>
{
loading
?
<
LoadingOutlined
/>
:
<
PlusOutlined
/>
}
<
div
style=
{
{
marginTop
:
8
}
}
>
Upload
</
div
>
</
div
>
);
//携带数据 、 传递给后台加 key
const
updeta
=
(
key
:
any
)
=>
{
data
.
key
=
key
;
...
...
@@ -133,8 +128,14 @@ const PdfUpload: React.FC<PriceInputProps> = ({ value = {}, onChange, disabled,
onPreview=
{
handlePreview
}
// 预览
beforeUpload=
{
beforeUpload
}
onChange=
{
handleChange
}
id=
{
index
}
>
{
item
.
fileList
&&
item
.
fileList
.
length
>=
5
?
null
:
uploadButton
}
{
item
.
fileList
&&
item
.
fileList
.
length
>=
5
?
null
:
(
<
div
>
{
loading
[
index
]
?
<
LoadingOutlined
/>
:
<
PlusOutlined
/>
}
<
div
style=
{
{
marginTop
:
8
}
}
>
Upload
</
div
>
</
div
>
)
}
</
Upload
>
<
MinusCircleOutlined
className=
"pdf-icon"
...
...
src/components/GlobalHeader/index.less
View file @
934ce15b
...
...
@@ -14,14 +14,14 @@
.right {
display: flex;
float: right;
height: 64px;//@layout-header-height;
height: 64px;
//@layout-header-height;
margin-left: auto;
overflow: hidden;
.action {
display: flex;
align-items: center;
height: 100%;
padding: 0
12
px;
padding: 0
25
px;
cursor: pointer;
transition: all 0.3s;
> span {
...
...
src/components/SearchOptions/SearchOptionsTow.tsx
View file @
934ce15b
/*
* @Author: your name
* @Date: 2020-12-02 09:42:49
* @LastEditTime: 2021-0
1-22 18:16:44
* @LastEditors:
your name
* @LastEditTime: 2021-0
2-06 13:24:38
* @LastEditors:
Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\SearchOptions\SearchOptionsTow.tsx
*/
...
...
@@ -13,7 +13,7 @@ const { Option } = Select;
const
SearchOptionsTow
=
(
porps
:
any
)
=>
{
const
{
list
,
extendName
,
def
,
type
,
disabled
}
=
porps
;
const
[
value
,
setValue
]
=
useState
(
undefined
);
const
[
value
,
setValue
]
=
useState
(
null
as
any
);
const
options
=
list
.
map
((
d
:
any
,
index
:
number
)
=>
(
<
Option
value=
{
d
}
key=
{
index
}
>
{
d
}
...
...
@@ -36,6 +36,10 @@ const SearchOptionsTow = (porps: any) => {
}
},
[
def
]);
const
onClear
=
()
=>
{
setValue
(
null
);
};
return
(
<
div
>
{
type
?
(
...
...
@@ -49,6 +53,7 @@ const SearchOptionsTow = (porps: any) => {
optionFilterProp=
"children"
onChange=
{
onChange
}
value=
{
value
}
onClear=
{
onClear
}
disabled=
{
disabled
}
>
{
options
}
...
...
@@ -62,6 +67,7 @@ const SearchOptionsTow = (porps: any) => {
optionFilterProp=
"children"
onChange=
{
onChange
}
value=
{
value
}
onClear=
{
onClear
}
disabled=
{
disabled
}
>
{
options
}
...
...
src/pages/CommunityManagement/CommunityAnnouncement/CommunityAnnouncement.tsx
View file @
934ce15b
...
...
@@ -147,21 +147,16 @@ const CommunityAnnouncement = (props: any) => {
// 表单提交
const
onFinishContract
=
(
value
:
any
)
=>
{
// console.log(value);
if
(
!
value
.
communityNumList
&&
!
value
.
noticTitlel
&&
!
value
.
creator
)
{
message
.
error
(
'Please enter one of them!'
);
}
else
{
// 要看是哪里分页
let
mlist
=
{
...
value
};
mlist
.
communityNumList
=
value
.
communityNumList
!=
null
&&
value
.
communityNumList
.
length
>
0
?
[
value
.
communityNumList
]
:
null
;
mlist
.
pageNum
=
1
;
// 把内容存进去
SA
(
DetailPage
(
mlist
),
module
,
dispatch
);
// requst(payload);
}
// 要看是哪里分页
let
mlist
=
{
...
value
};
mlist
.
communityNumList
=
value
.
communityNumList
!=
null
&&
value
.
communityNumList
.
length
>
0
?
[
value
.
communityNumList
]
:
null
;
mlist
.
pageNum
=
1
;
// 把内容存进去
SA
(
DetailPage
(
mlist
),
module
,
dispatch
);
// requst(payload);
};
// 选择小区名字并赋值
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
934ce15b
...
...
@@ -329,16 +329,17 @@ const Facility = (props: any) => {
</
Form
.
Item
>
{
/* 设施名称 以及费用 */
}
<
Form
.
Item
label=
"Facility Classification"
name=
"facilityName"
rules=
{
NewFaci
[
1
]
}
>
<
Input
placeholder=
"Facility Classification"
disabled=
{
facilityDetail
}
maxLength=
{
30
}
style=
{
{
width
:
'200px'
}
}
/>
</
Form
.
Item
>
<
Input
.
Group
>
<
Form
.
Item
label=
"Facility Classification"
name=
"facilityName"
rules=
{
NewFaci
[
1
]
}
>
<
Input
placeholder=
"Facility Classification"
disabled=
{
facilityDetail
}
maxLength=
{
30
}
/>
</
Form
.
Item
>
<
span
className=
"divIconMoney"
>
Fee($):
</
span
>
<
Form
.
Item
label=
""
name=
"communityManagerFee"
>
<
Form
.
Item
label=
"Fee($):"
name=
"communityManagerFee"
style=
{
{
marginRight
:
80
}
}
>
<
InputNumber
onKeyUp=
{
keyup_communityManagerFee
}
prefix=
"$"
...
...
@@ -350,8 +351,7 @@ const Facility = (props: any) => {
style=
{
{
width
:
'120px'
}
}
/>
</
Form
.
Item
>
<
span
className=
"divIconMoney"
>
Deposit:
</
span
>
<
Form
.
Item
label=
""
name=
"communityMargin"
>
<
Form
.
Item
label=
"Deposit:"
name=
"communityMargin"
>
<
InputNumber
onKeyUp=
{
keyup_communityMargin
}
prefix=
"$"
...
...
@@ -418,49 +418,47 @@ const Facility = (props: any) => {
<
p
className=
"diyp"
>
Booking Rules :
</
p
>
{
/* 预约设置 */
}
<
Input
.
Group
>
<
Form
.
Item
name=
"cancelReservationDay"
label=
"Early Cancellation"
rules=
{
NewFaci
[
5
]
}
>
<
Input
onKeyUp=
{
keyup
.
bind
(
this
,
'cancelReservationDay'
)
}
disabled=
{
facilityDetail
}
// prefix="Advance"
suffix=
"Day(s) In Advance"
style=
{
{
width
:
160
,
textAlign
:
'center'
}
}
placeholder=
"0"
maxLength=
{
2
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"Cancel Reservation Without Payment"
name=
"nomarginCancelReservationDay"
rules=
{
NewFaci
[
6
]
}
>
<
Input
onKeyUp=
{
keyup
.
bind
(
this
,
'nomarginCancelReservationDay'
)
}
disabled=
{
facilityDetail
}
// prefix="Advance"
suffix=
"Day(s) In Advance"
style=
{
{
width
:
160
,
textAlign
:
'center'
}
}
placeholder=
"0"
maxLength=
{
2
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"Booking"
name=
"canReservationDay"
rules=
{
NewFaci
[
7
]
}
>
<
Input
onKeyUp=
{
keyup
.
bind
(
this
,
'canReservationDay'
)
}
placeholder=
"0"
style=
{
{
width
:
160
,
textAlign
:
'center'
}
}
disabled=
{
facilityDetail
}
// prefix="Advance"
suffix=
"Day(s) In Advance"
maxLength=
{
2
}
/>
</
Form
.
Item
>
</
Input
.
Group
>
<
Form
.
Item
name=
"cancelReservationDay"
label=
"Early Cancellation"
rules=
{
NewFaci
[
5
]
}
>
<
Input
onKeyUp=
{
keyup
.
bind
(
this
,
'cancelReservationDay'
)
}
disabled=
{
facilityDetail
}
// prefix="Advance"
suffix=
"Day(s) In Advance"
style=
{
{
width
:
160
,
textAlign
:
'center'
}
}
placeholder=
"0"
maxLength=
{
2
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"Cancel Reservation Without Payment"
name=
"nomarginCancelReservationDay"
rules=
{
NewFaci
[
6
]
}
>
<
Input
onKeyUp=
{
keyup
.
bind
(
this
,
'nomarginCancelReservationDay'
)
}
disabled=
{
facilityDetail
}
// prefix="Advance"
suffix=
"Day(s) In Advance"
style=
{
{
width
:
160
,
textAlign
:
'center'
}
}
placeholder=
"0"
maxLength=
{
2
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"Booking"
name=
"canReservationDay"
rules=
{
NewFaci
[
7
]
}
>
<
Input
onKeyUp=
{
keyup
.
bind
(
this
,
'canReservationDay'
)
}
placeholder=
"0"
style=
{
{
width
:
160
,
textAlign
:
'center'
}
}
disabled=
{
facilityDetail
}
// prefix="Advance"
suffix=
"Day(s) In Advance"
maxLength=
{
2
}
/>
</
Form
.
Item
>
{
/* 设置次数 */
}
<
Input
.
Group
>
<
Form
.
Item
label=
"Booking Limits"
rules=
{
NewFaci
[
8
]
}
>
<
Form
.
Item
label=
"Booking Limits"
className=
"flex required"
rules=
{
NewFaci
[
8
]
}
>
<
Select
placeholder=
"Cycle"
allowClear
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityTow.tsx
View file @
934ce15b
...
...
@@ -324,16 +324,16 @@ const FacilityTow = (props: any) => {
labelAlign=
"right"
>
{
/* 设施名称 以及费用 */
}
<
Form
.
Item
label=
"Facility Classification"
name=
"facilityName"
rules=
{
NewFaci
[
1
]
}
>
<
Input
placeholder=
"Facility Classification"
disabled=
{
facilityDetail
}
maxLength=
{
30
}
style=
{
{
width
:
'200px'
}
}
/>
</
Form
.
Item
>
<
Input
.
Group
>
<
Form
.
Item
label=
"Facility Classification"
name=
"facilityName"
rules=
{
NewFaci
[
1
]
}
>
<
Input
placeholder=
"Facility Classification"
disabled=
{
facilityDetail
}
maxLength=
{
30
}
/>
</
Form
.
Item
>
<
span
className=
"divIconMoney"
>
Fee($):
</
span
>
<
Form
.
Item
label=
""
name=
"communityManagerFee"
>
<
Form
.
Item
label=
"Fee($):"
name=
"communityManagerFee"
style=
{
{
marginRight
:
80
}
}
>
<
InputNumber
prefix=
"$"
placeholder=
"00.00"
...
...
@@ -344,8 +344,7 @@ const FacilityTow = (props: any) => {
style=
{
{
width
:
'120px'
}
}
/>
</
Form
.
Item
>
<
span
className=
"divIconMoney"
>
Deposit:
</
span
>
<
Form
.
Item
label=
""
name=
"communityMargin"
>
<
Form
.
Item
label=
"Deposit:"
name=
"communityMargin"
>
<
InputNumber
prefix=
"$"
placeholder=
"00.00"
...
...
@@ -415,53 +414,51 @@ const FacilityTow = (props: any) => {
<
p
className=
"diyp"
>
Booking Rules :
</
p
>
{
/* 预约设置 */
}
<
Input
.
Group
>
<
Form
.
Item
name=
"cancelReservationDay"
label=
"Early Cancellation"
rules=
{
NewFaci
[
5
]
}
>
<
Input
onKeyUp=
{
keyup
.
bind
(
this
,
'cancelReservationDay'
)
}
disabled=
{
facilityDetail
}
// prefix="Advance"
suffix=
"Day(s) In Advance"
style=
{
{
width
:
160
,
textAlign
:
'center'
}
}
placeholder=
"0"
maxLength=
{
2
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"Cancel Reservation Without Payment"
name=
"nomarginCancelReservationDay"
rules=
{
NewFaci
[
6
]
}
>
<
Input
onKeyUp=
{
keyup
.
bind
(
this
,
'nomarginCancelReservationDay'
)
}
disabled=
{
facilityDetail
}
// prefix="Advance"
suffix=
"Day(s) In Advance"
style=
{
{
width
:
160
,
textAlign
:
'center'
}
}
placeholder=
"0"
maxLength=
{
2
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"Booking"
name=
"canReservationDay"
rules=
{
NewFaci
[
7
]
}
>
<
Input
onKeyUp=
{
keyup
.
bind
(
this
,
'canReservationDay'
)
}
placeholder=
"0"
style=
{
{
width
:
160
,
textAlign
:
'center'
}
}
disabled=
{
facilityDetail
}
// prefix="Advance"
suffix=
"Day(s) In Advance"
maxLength=
{
2
}
/>
</
Form
.
Item
>
</
Input
.
Group
>
<
Form
.
Item
name=
"cancelReservationDay"
label=
"Early Cancellation"
rules=
{
NewFaci
[
5
]
}
>
<
Input
onKeyUp=
{
keyup
.
bind
(
this
,
'cancelReservationDay'
)
}
disabled=
{
facilityDetail
}
// prefix="Advance"
suffix=
"Day(s) In Advance"
style=
{
{
width
:
160
,
textAlign
:
'center'
}
}
placeholder=
"0"
maxLength=
{
2
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"Cancel Reservation Without Payment"
name=
"nomarginCancelReservationDay"
rules=
{
NewFaci
[
6
]
}
>
<
Input
onKeyUp=
{
keyup
.
bind
(
this
,
'nomarginCancelReservationDay'
)
}
disabled=
{
facilityDetail
}
// prefix="Advance"
suffix=
"Day(s) In Advance"
style=
{
{
width
:
160
,
textAlign
:
'center'
}
}
placeholder=
"0"
maxLength=
{
2
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"Booking"
name=
"canReservationDay"
rules=
{
NewFaci
[
7
]
}
>
<
Input
onKeyUp=
{
keyup
.
bind
(
this
,
'canReservationDay'
)
}
placeholder=
"0"
style=
{
{
width
:
160
,
textAlign
:
'center'
}
}
disabled=
{
facilityDetail
}
// prefix="Advance"
suffix=
"Day(s) In Advance"
maxLength=
{
2
}
/>
</
Form
.
Item
>
{
/* 设置次数 */
}
<
Input
.
Group
>
<
Form
.
Item
label=
"Booking Limits"
rules=
{
NewFaci
[
8
]
}
>
<
Form
.
Item
label=
"Booking Limits"
className=
"flex required"
rules=
{
NewFaci
[
8
]
}
>
<
Select
placeholder=
"Cycle"
allowClear
...
...
src/pages/CommunityManagement/FacilityBookings/css/index.less
View file @
934ce15b
...
...
@@ -332,7 +332,7 @@ hr {
.divIconMoney {
display: inline-block;
margin-right: 10
px;
width: 68
px;
color: rgba(0, 0, 0, 0.85);
line-height: 32px;
}
...
...
src/pages/ContractManagement/Contract.tsx
View file @
934ce15b
...
...
@@ -126,14 +126,10 @@ const Contract = (props: any) => {
// 表单提交
const
onFinishContract
=
(
value
:
any
)
=>
{
if
(
!
value
.
communityName
&&
!
value
.
contractNumber
&&
!
value
.
contractTitle
)
{
message
.
error
(
'Please enter one of them!'
);
}
else
{
value
.
pageNum
=
1
;
let
t
=
{
...
term
,
...
value
};
setTerm
(
t
);
RA
(
19
,
t
);
}
value
.
pageNum
=
1
;
let
t
=
{
...
term
,
...
value
};
setTerm
(
t
);
RA
(
19
,
t
);
};
// 选择小区名字并赋值
...
...
src/pages/ContractManagement/ContractContent.tsx
View file @
934ce15b
...
...
@@ -186,7 +186,7 @@ const ContractContent = (props: any) => {
const
onFinish
=
(
values
:
any
)
=>
{
// 判断有没有文件
if
(
state
.
fileList
.
length
==
0
)
{
message
.
error
(
'Please upload the
attachment
!'
);
message
.
error
(
'Please upload the
contract annex
!'
);
}
else
{
values
.
contractValidStartDate
=
values
.
time
[
0
].
format
(
'YYYY-MM-DD'
);
values
.
contractValidEndDate
=
values
.
time
[
1
].
format
(
'YYYY-MM-DD'
);
...
...
src/utils/tip.ts
View file @
934ce15b
/*
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2021-02-0
2 18:29:06
* @LastEditTime: 2021-02-0
6 13:13:47
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\tip.ts
...
...
@@ -88,14 +88,14 @@ export const Notice = [
// 新增设施
export
const
NewFaci
=
[
[
reqMes
(
'Please
select
community'
)],
[
reqMes
(
'Please input Facility Name'
)],
[
reqMes
(
'Please
the
community'
)],
[
reqMes
(
'Please input
the
Facility Name'
)],
[
reqMes
(
'Please Set management fee'
)],
[
reqMes
(
'Please Set Setting deposit'
)],
[
reqMes
(
'Please Upload facility photos'
)],
[
reqMes
(
'
Required
'
)],
[
reqMes
(
'
Required
'
)],
[
reqMes
(
'
Required
'
)],
[
reqMes
(
'
Please enter restrictions
'
)],
[
reqMes
(
'
Please enter restrictions
'
)],
[
reqMes
(
'
Please enter restrictions
'
)],
[
reqMes
(
'Required'
)],
[
reqMes
(
'Required'
)],
];
...
...
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