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
c12249f6
Commit
c12249f6
authored
Nov 19, 2020
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
1f5066d9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
53 additions
and
44 deletions
+53
-44
Adds.tsx
src/pages/CommunityManagement/CellList/Adds.tsx
+32
-22
CellList.tsx
src/pages/CommunityManagement/CellList/CellList.tsx
+1
-0
Add.tsx
src/pages/CommunityManagement/CommunityAnnouncement/Add.tsx
+1
-1
Bookings.tsx
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
+2
-2
Facility.tsx
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
+1
-1
FacilityBookings.tsx
...CommunityManagement/FacilityBookings/FacilityBookings.tsx
+3
-13
tip.ts
src/utils/tip.ts
+13
-5
No files found.
src/pages/CommunityManagement/CellList/Adds.tsx
View file @
c12249f6
...
@@ -9,8 +9,7 @@ import { history } from 'umi';
...
@@ -9,8 +9,7 @@ import { history } from 'umi';
import
{
village
}
from
'@/utils/tip'
;
import
{
village
}
from
'@/utils/tip'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
parseInt
}
from
'lodash'
;
import
{
getNumber
}
from
'@/utils/string'
;
// 正则
import
{
event
}
from
'@/.umi/plugin-locale/locale'
;
const
{
RangePicker
}
=
TimePicker
;
const
{
RangePicker
}
=
TimePicker
;
...
@@ -188,9 +187,12 @@ const Adds = (props: any) => {
...
@@ -188,9 +187,12 @@ const Adds = (props: any) => {
// 表单验证
// 表单验证
const
onFinish
=
(
values
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
let
{
residentialZipCode
,
residentialAddress
,
residentialName
}
=
values
.
des
;
let
{
residentialZipCode
,
residentialAddress
,
residentialName
}
=
values
.
des
;
let
tel
=
values
.
info
.
tel
;
if
(
residentialZipCode
.
length
<
6
)
{
if
(
residentialZipCode
.
length
<
6
)
{
message
.
error
(
'Please Enter 6-digit Zip Code!'
);
message
.
error
(
'Please Enter 6-digit Zip Code!'
);
}
else
if
(
tel
.
length
!=
8
&&
tel
.
length
!=
11
)
{
message
.
error
(
'Incorrect Contact Information!'
);
}
else
{
}
else
{
onUpDate
(
values
);
onUpDate
(
values
);
}
}
...
@@ -198,12 +200,13 @@ const Adds = (props: any) => {
...
@@ -198,12 +200,13 @@ const Adds = (props: any) => {
// 表单提交
// 表单提交
function
onUpDate
(
values
:
any
)
{
function
onUpDate
(
values
:
any
)
{
console
.
log
(
values
.
help
);
// 额外判断
let
obj
:
any
=
new
Object
();
let
obj
:
any
=
new
Object
();
obj
.
propertyFee
=
PropertyFee
;
obj
.
propertyFee
=
PropertyFee
;
// 小区信息;
// 小区信息;
let
{
residentialZipCode
,
residentialAddress
,
residentialName
}
=
values
.
des
;
let
{
residentialZipCode
,
residentialAddress
,
residentialName
}
=
values
.
des
;
console
.
log
(
values
);
obj
.
residentialZipCode
=
`SINGAPORE
${
residentialZipCode
}
`
;
obj
.
residentialZipCode
=
`SINGAPORE
${
residentialZipCode
}
`
;
obj
.
residentialAddress
=
residentialAddress
;
obj
.
residentialAddress
=
residentialAddress
;
obj
.
residentialName
=
residentialName
;
obj
.
residentialName
=
residentialName
;
...
@@ -244,13 +247,13 @@ const Adds = (props: any) => {
...
@@ -244,13 +247,13 @@ const Adds = (props: any) => {
obj
.
residentialHotlineServieStartTime
=
values
.
workingHours
[
0
].
format
(
'HH:mm'
);
obj
.
residentialHotlineServieStartTime
=
values
.
workingHours
[
0
].
format
(
'HH:mm'
);
obj
.
residentialHotlineServieEndTime
=
values
.
workingHours
[
1
].
format
(
'HH:mm'
);
obj
.
residentialHotlineServieEndTime
=
values
.
workingHours
[
1
].
format
(
'HH:mm'
);
}
}
console
.
log
(
'Success:'
,
obj
);
if
(
Data
)
{
if
(
Data
)
{
obj
.
id
=
Data
.
id
;
obj
.
id
=
Data
.
id
;
}
}
console
.
log
(
obj
);
// 上传
// 上传
RA
(
29
,
obj
,
'CellList'
,
dispatch
);
//
RA(29, obj, 'CellList', dispatch);
}
}
// 返回
// 返回
...
@@ -265,14 +268,19 @@ const Adds = (props: any) => {
...
@@ -265,14 +268,19 @@ const Adds = (props: any) => {
return
value
;
return
value
;
}
}
// 键盘回车事件
// 正则手机号
const
onKeyDowns
=
(
event
:
any
)
=>
{
const
keyup_tool
=
(
value
:
any
)
=>
{
console
.
log
(
event
);
return
getNumber
(
value
.
replace
(
/
[^\d
^
\.]
+/g
,
''
));
};
// 手机号
const
keyup_communityManagerFee
=
(
e
:
any
)
=>
{
e
.
target
.
value
=
keyup_tool
(
e
.
target
.
value
);
};
};
return
(
return
(
<>
<>
<
Spin
spinning=
{
loading
}
tip=
"
信息提交中
..."
size=
"large"
>
<
Spin
spinning=
{
loading
}
tip=
"
loading
..."
size=
"large"
>
<
div
className=
"form"
>
<
div
className=
"form"
>
<
h3
className=
"capi"
>
<
h3
className=
"capi"
>
<
EditOutlined
/>
<
EditOutlined
/>
...
@@ -285,7 +293,6 @@ const Adds = (props: any) => {
...
@@ -285,7 +293,6 @@ const Adds = (props: any) => {
</
div
>
</
div
>
</
h3
>
</
h3
>
<
Form
<
Form
onKeyDown=
{
onKeyDowns
}
name=
"basic"
name=
"basic"
form=
{
form
}
form=
{
form
}
onFinish=
{
onFinish
}
onFinish=
{
onFinish
}
...
@@ -293,17 +300,18 @@ const Adds = (props: any) => {
...
@@ -293,17 +300,18 @@ const Adds = (props: any) => {
layout=
"horizontal"
layout=
"horizontal"
labelAlign=
"left"
labelAlign=
"left"
>
>
<
Form
.
Item
label=
"Community Name"
name=
"des"
rules=
{
village
[
4
]
as
any
}
>
<
Form
.
Item
label=
"Community Name"
name=
"des"
rules=
{
[{
required
:
false
}]
}
>
<
Input
.
Group
compact
>
<
Input
.
Group
compact
>
<
Form
.
Item
name=
{
[
'des'
,
'residentialZipCode'
]
}
noStyle
rules=
{
village
[
0
]
as
any
}
>
<
Form
.
Item
name=
{
[
'des'
,
'residentialZipCode'
]
}
noStyle
rules=
{
village
[
0
]
as
any
}
>
<
Input
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
120
}
}
style=
{
{
marginRight
:
'10px'
,
width
:
120
}
}
placeholder=
"6 Postcode"
placeholder=
"6 Postcode"
maxLength=
{
6
}
maxLength=
{
6
}
onKeyUp=
{
keyup_communityManagerFee
}
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
name=
{
[
'des'
,
'residentialAddress'
]
}
noStyle
rules=
{
village
[
0
]
as
any
}
>
<
Form
.
Item
name=
{
[
'des'
,
'residentialAddress'
]
}
noStyle
rules=
{
village
[
1
]
as
any
}
>
<
Input
<
Input
style=
{
{
width
:
'360px'
}
}
style=
{
{
width
:
'360px'
}
}
placeholder=
"Please enter community adds"
placeholder=
"Please enter community adds"
...
@@ -316,7 +324,7 @@ const Adds = (props: any) => {
...
@@ -316,7 +324,7 @@ const Adds = (props: any) => {
name=
{
[
'des'
,
'residentialName'
]
}
name=
{
[
'des'
,
'residentialName'
]
}
normalize=
{
insdInp
}
normalize=
{
insdInp
}
noStyle
noStyle
rules=
{
village
[
0
]
as
any
}
rules=
{
village
[
2
]
as
any
}
>
>
<
Input
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'260px'
}
}
style=
{
{
marginRight
:
'10px'
,
width
:
'260px'
}
}
...
@@ -330,20 +338,22 @@ const Adds = (props: any) => {
...
@@ -330,20 +338,22 @@ const Adds = (props: any) => {
</
Input
.
Group
>
</
Input
.
Group
>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"Working Hours"
name=
"workingHours"
rules=
{
village
[
1
]
as
any
}
>
<
Form
.
Item
label=
"Working Hours"
name=
"workingHours"
rules=
{
village
[
3
]
as
any
}
>
<
RangePicker
format=
"HH:mm"
placeholder=
{
[
'Start Time'
,
'End Time'
]
}
/>
<
RangePicker
format=
"HH:mm"
placeholder=
{
[
'Start Time'
,
'End Time'
]
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"Community Telephone"
name=
"info"
rules=
{
village
[
3
]
as
any
}
>
<
Form
.
Item
label=
"Community Telephone"
name=
"info"
rules=
{
[{
required
:
false
}]
}
>
<
Input
.
Group
compact
>
<
Input
.
Group
compact
>
<
Form
.
Item
name=
{
[
'info'
,
'tel'
]
}
noStyle
rules=
{
village
[
0
]
as
any
}
>
<
Form
.
Item
name=
{
[
'info'
,
'tel'
]
}
noStyle
rules=
{
village
[
4
]
as
any
}
>
<
Input
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'160px'
}
}
style=
{
{
marginRight
:
'10px'
,
width
:
'160px'
}
}
placeholder=
"Please enter phone"
placeholder=
"Please enter phone"
maxLength=
{
11
}
onKeyUp=
{
keyup_communityManagerFee
}
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Button
type=
"text"
>
—
</
Button
>
<
Button
type=
"text"
>
—
</
Button
>
<
Form
.
Item
name=
{
[
'info'
,
'email'
]
}
noStyle
rules=
{
village
[
0
]
as
any
}
>
<
Form
.
Item
name=
{
[
'info'
,
'email'
]
}
noStyle
rules=
{
village
[
5
]
as
any
}
>
<
Input
<
Input
style=
{
{
marginLeft
:
'10px'
,
width
:
'180px'
}
}
style=
{
{
marginLeft
:
'10px'
,
width
:
'180px'
}
}
placeholder=
"Please enter email"
placeholder=
"Please enter email"
...
@@ -355,9 +365,9 @@ const Adds = (props: any) => {
...
@@ -355,9 +365,9 @@ const Adds = (props: any) => {
<
Form
.
Item
<
Form
.
Item
label=
"Administrators"
label=
"Administrators"
name=
"residentialManagerUserName"
name=
"residentialManagerUserName"
rules=
{
village
[
2
]
as
any
}
rules=
{
village
[
6
]
as
any
}
>
>
<
Input
style=
{
{
width
:
'160px'
}
}
placeholder=
"Contacts"
/>
<
Input
style=
{
{
width
:
'160px'
}
}
placeholder=
"Contacts"
maxLength=
{
30
}
/>
{
/* <Button type="text">
{
/* <Button type="text">
<PlusCircleOutlined style={{ fontSize: '18px', color: '#08c' }} />
<PlusCircleOutlined style={{ fontSize: '18px', color: '#08c' }} />
</Button> */
}
</Button> */
}
...
@@ -396,7 +406,7 @@ const Adds = (props: any) => {
...
@@ -396,7 +406,7 @@ const Adds = (props: any) => {
<
LinkOutlined
color=
"#409EFF"
/>
<
LinkOutlined
color=
"#409EFF"
/>
{
loubaUpload
.
length
>
0
?
loubaUpload
[
0
].
name
:
''
}
{
loubaUpload
.
length
>
0
?
loubaUpload
[
0
].
name
:
''
}
</
p
>
</
p
>
<
span
className=
"capi"
>
Support Files:.doc,.docx,.jpg,.png,
.pdf
</
span
>
<
span
>
Support Files:.jpg, .png,
.pdf
</
span
>
</
div
>
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
...
@@ -409,7 +419,7 @@ const Adds = (props: any) => {
...
@@ -409,7 +419,7 @@ const Adds = (props: any) => {
<
LinkOutlined
color=
"#409EFF"
/>
<
LinkOutlined
color=
"#409EFF"
/>
{
guideUpload
.
length
>
0
?
guideUpload
[
0
].
name
:
''
}
{
guideUpload
.
length
>
0
?
guideUpload
[
0
].
name
:
''
}
</
p
>
</
p
>
<
span
className=
"capi"
>
Support Files:.doc,.docx,.jpg,.png,
.pdf
</
span
>
<
span
>
Support Files:.jpg, .png,
.pdf
</
span
>
</
div
>
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
...
@@ -426,7 +436,7 @@ const Adds = (props: any) => {
...
@@ -426,7 +436,7 @@ const Adds = (props: any) => {
<
LinkOutlined
color=
"#409EFF"
/>
<
LinkOutlined
color=
"#409EFF"
/>
{
periodUpload
.
length
>
0
?
periodUpload
[
0
].
name
:
''
}
{
periodUpload
.
length
>
0
?
periodUpload
[
0
].
name
:
''
}
</
p
>
</
p
>
<
span
className=
"capi"
>
Support Files:.doc,.docx,.jpg,.png,
.pdf
</
span
>
<
span
>
Support Files:.jpg, .png,
.pdf
</
span
>
</
div
>
</
div
>
</
Form
.
Item
>
</
Form
.
Item
>
...
...
src/pages/CommunityManagement/CellList/CellList.tsx
View file @
c12249f6
...
@@ -165,6 +165,7 @@ const CellLists = (props: any) => {
...
@@ -165,6 +165,7 @@ const CellLists = (props: any) => {
total=
{
village
.
page
.
totalRow
}
total=
{
village
.
page
.
totalRow
}
pageSize=
{
village
.
page
.
curPageSize
}
pageSize=
{
village
.
page
.
curPageSize
}
onChange=
{
paginationHandler
}
onChange=
{
paginationHandler
}
showSizeChanger=
{
false
}
/>
/>
</
div
>
</
div
>
)
:
(
)
:
(
...
...
src/pages/CommunityManagement/CommunityAnnouncement/Add.tsx
View file @
c12249f6
...
@@ -54,7 +54,7 @@ const Add = (props: any) => {
...
@@ -54,7 +54,7 @@ const Add = (props: any) => {
// 解除结束时间不可选
// 解除结束时间不可选
settimeT
(
false
);
settimeT
(
false
);
// 图片名
// 图片名
setImageName
(
DataSave
.
noticImageName
);
setImageName
(
DataSave
.
noticImageName
.
split
(
','
)
);
}
}
},
[
DataSave
]);
},
[
DataSave
]);
...
...
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
View file @
c12249f6
...
@@ -391,14 +391,14 @@ const Bookings = (props: any) => {
...
@@ -391,14 +391,14 @@ const Bookings = (props: any) => {
type=
{
0
}
type=
{
0
}
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
span
className=
"diyspan"
>
-
</
span
>
<
span
className=
"diyspan"
>
</
span
>
<
Form
.
Item
name=
"endTime"
noStyle
>
<
Form
.
Item
name=
"endTime"
noStyle
>
<
OnTime
<
OnTime
placeholder=
{
'Closing Time'
}
// 默认值
placeholder=
{
'Closing Time'
}
// 默认值
disabled=
{
prohibit
}
// 是否禁止
disabled=
{
prohibit
}
// 是否禁止
limit=
{
curString
.
categoriesOpenTime
}
// 禁止时间段
limit=
{
curString
.
categoriesOpenTime
}
// 禁止时间段
openSelect=
{
endTimes
}
// 时间类型
openSelect=
{
endTimes
}
// 时间类型
type=
{
1
}
type=
{
0
}
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Form
.
Item
>
</
Form
.
Item
>
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
c12249f6
...
@@ -384,7 +384,7 @@ const Facility = (props: any) => {
...
@@ -384,7 +384,7 @@ const Facility = (props: any) => {
<
OnTime
<
OnTime
placeholder=
{
'Closing Time'
}
// 默认值
placeholder=
{
'Closing Time'
}
// 默认值
openSelect=
{
endTimes
}
openSelect=
{
endTimes
}
type=
{
1
}
type=
{
0
}
defaultValue=
{
soltTime
[
1
]
}
defaultValue=
{
soltTime
[
1
]
}
disabled=
{
imgOpen
}
disabled=
{
imgOpen
}
/>
/>
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityBookings.tsx
View file @
c12249f6
...
@@ -90,24 +90,14 @@ const FacilityBookings = (props: any) => {
...
@@ -90,24 +90,14 @@ const FacilityBookings = (props: any) => {
'Order Time'
,
'Order Time'
,
null
,
null
,
(
text
:
any
,
record
:
any
)
=>
(
(
text
:
any
,
record
:
any
)
=>
(
<
div
>
<
div
>
{
moment
(
record
.
createTime
.
time
).
format
(
'YYYY-MM-DD'
)
}
</
div
>
<
ClockCircleOutlined
style=
{
{
color
:
'#666'
}
}
/>
{
moment
(
record
.
createTime
.
time
).
format
(
'YYYY-MM-DD'
)
}
</
div
>
),
),
],
],
[
[
'Booking Schedule'
,
'Booking Schedule'
,
'subscribeDate'
,
'subscribeDate'
,
(
text
:
any
)
=>
(
(
text
:
any
)
=>
<
div
>
{
moment
(
text
).
format
(
'YYYY-MM-DD'
)
}
</
div
>,
<
div
>
<
ClockCircleOutlined
style=
{
{
color
:
'#666'
}
}
/>
{
moment
(
text
).
format
(
'YYYY-MM-DD'
)
}
</
div
>
),
],
],
[
'Fee'
,
'managerFeeStatus'
,
(
text
:
any
)
=>
<
div
>
{
managerFeeStatusDes
[
text
]
}
</
div
>],
[
'Fee'
,
'managerFeeStatus'
,
(
text
:
any
)
=>
<
div
>
{
managerFeeStatusDes
[
text
]
}
</
div
>],
[
'Deposit'
,
'marginFeeStatus'
,
(
text
:
any
)
=>
<
div
>
{
marginFeeStatusDes
[
text
]
}
</
div
>],
[
'Deposit'
,
'marginFeeStatus'
,
(
text
:
any
)
=>
<
div
>
{
marginFeeStatusDes
[
text
]
}
</
div
>],
...
@@ -367,7 +357,7 @@ const FacilityBookings = (props: any) => {
...
@@ -367,7 +357,7 @@ const FacilityBookings = (props: any) => {
{
curString
?
(
{
curString
?
(
<
div
className=
"pages"
>
<
div
className=
"pages"
>
<
Pagination
<
Pagination
current=
{
curString
.
curPage2
}
current=
{
Data2
.
total
.
curPageSize
}
total=
{
Data2
.
total
.
totalRow
}
total=
{
Data2
.
total
.
totalRow
}
// pageSizeOptions=
{[]}
// pageSizeOptions=
{[]}
showSizeChanger=
{
false
}
showSizeChanger=
{
false
}
...
...
src/utils/tip.ts
View file @
c12249f6
...
@@ -12,11 +12,19 @@ export const tipList = [
...
@@ -12,11 +12,19 @@ export const tipList = [
// 小区提示
// 小区提示
export
const
village
=
[
export
const
village
=
[
[{
required
:
true
,
message
:
'Please select community'
}],
[{
required
:
true
,
message
:
'Please enter the postcode'
}],
[{
required
:
true
,
message
:
'Please select working hours !'
}],
[{
required
:
true
,
message
:
'Please enter the address of the community !'
}],
[{
required
:
true
,
message
:
'Please enter the community administrator !'
}],
[{
required
:
true
,
message
:
'Please enter the cell name !'
}],
[{
required
:
true
,
message
:
'Please enter the phone number and email address !'
}],
[{
required
:
true
,
message
:
'Please select the time !'
}],
[{
required
:
true
,
message
:
'Please input the address and name of the community !'
}],
[{
required
:
true
,
message
:
'Please enter your mobile phone number !'
}],
[
{
required
:
true
,
type
:
'email'
,
message
:
'Please enter the correct email address !'
,
},
],
[{
required
:
true
,
message
:
'Please enter the name of the community administrator !'
}],
];
];
//公告提示
//公告提示
...
...
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