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
59f00b7a
Commit
59f00b7a
authored
Feb 01, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
上线前样式统一
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
e31991a0
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
23 changed files
with
541 additions
and
425 deletions
+541
-425
PdfUpload.tsx
src/components/Form/PdfUpload.tsx
+127
-0
ZipCode.tsx
src/components/Form/ZipCode.tsx
+16
-3
zip.less
src/components/Form/zip.less
+35
-1
OnTime.tsx
src/components/OnTime/OnTime.tsx
+32
-10
Facilities.tsx
src/components/PdfUpload/Facilities.tsx
+0
-102
FacilityBookings.ts
src/models/CommunityManagement/FacilityBookings.ts
+135
-135
BugDetail.tsx
src/pages/AccountManagement/SystemFeedback/BugDetail.tsx
+10
-2
Account.tsx
src/pages/AccountManagement/account/Account.tsx
+2
-2
AccountAdds.tsx
src/pages/AccountManagement/account/AccountAdds.tsx
+2
-2
AccountDetail.tsx
src/pages/AccountManagement/account/AccountDetail.tsx
+8
-11
AccountEdit.tsx
src/pages/AccountManagement/account/AccountEdit.tsx
+2
-2
Adds.tsx
src/pages/CommunityManagement/CellList/Adds.tsx
+12
-2
Adds2.tsx
src/pages/CommunityManagement/CellList/Adds2.tsx
+64
-69
Details.tsx
src/pages/CommunityManagement/CellList/Details.tsx
+19
-17
celllist.less
src/pages/CommunityManagement/CellList/celllist.less
+16
-0
CommunityAnnouncement.tsx
...anagement/CommunityAnnouncement/CommunityAnnouncement.tsx
+2
-2
Bookings.tsx
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
+24
-13
FacilityTow.tsx
...ages/CommunityManagement/FacilityBookings/FacilityTow.tsx
+14
-17
VisitorRecord.tsx
...pages/CommunityManagement/VisitorRecord/VisitorRecord.tsx
+2
-2
VisitorRecord.tsx
...pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
+2
-2
Contract.tsx
src/pages/ContractManagement/Contract.tsx
+2
-2
ContractContent.tsx
src/pages/ContractManagement/ContractContent.tsx
+9
-23
tip.ts
src/utils/tip.ts
+6
-6
No files found.
src/components/Form/PdfUpload.tsx
0 → 100644
View file @
59f00b7a
/*
* @Author: your name
* @Date: 2021-02-01 14:54:48
* @LastEditTime: 2021-02-01 16:57:27
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\Form\PdfUpload.tsx
*/
import
React
,
{
useState
}
from
'react'
;
import
{
Input
,
Upload
,
message
,
Button
}
from
'antd'
;
import
{
LoadingOutlined
,
PlusOutlined
,
MinusCircleOutlined
}
from
'@ant-design/icons'
;
interface
PriceInputProps
{
value
?:
any
;
onChange
?:
any
;
disabled
?:
any
;
// 禁用状态
action
?:
any
;
// 传递地址
data
?:
any
;
// 附带数据
}
const
PdfUpload
:
React
.
FC
<
PriceInputProps
>
=
({
value
=
{},
onChange
,
disabled
,
action
,
data
})
=>
{
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
imgList
,
setImgList
]
=
useState
([]
as
any
);
// 上传前检测
function
beforeUpload
(
file
:
any
)
{
const
isJpgOrPng
=
file
.
type
===
'application/pdf'
||
file
.
type
===
'pdf'
;
if
(
!
isJpgOrPng
)
{
message
.
error
(
'You can only upload PDF file!'
);
}
const
isLt2M
=
file
.
size
/
1024
/
1024
<
2
;
if
(
!
isLt2M
)
{
message
.
error
(
'PDF must smaller than 2MB!'
);
}
return
isJpgOrPng
&&
isLt2M
;
}
const
handleChange
=
(
info
:
any
)
=>
{
if
(
info
.
file
.
status
===
'uploading'
)
{
setLoading
(
true
);
return
;
}
else
{
setLoading
(
false
);
}
if
(
info
.
file
.
status
===
'done'
)
{
// Get this url from response in real world.
// getBase64(info.file.originFileObj, (imageUrl: any) => {
// setLoading(true);
// setImageUrl(imageUrl);
// });
console
.
log
(
info
);
}
};
// 新增的按钮
const
add
=
()
=>
{
let
list
=
Object
.
assign
(
imgList
);
let
item
=
[
{
id
:
Math
.
floor
(
Math
.
random
()
*
100
),
name
:
''
,
fileList
:
[],
},
];
list
.
push
(
item
);
console
.
log
(
list
);
setImgList
([...
list
]);
};
// 删除的按钮
const
del
=
(
index
:
any
)
=>
{
let
list
=
Object
.
assign
(
imgList
);
list
.
splice
(
index
,
1
);
setImgList
([...
list
]);
};
return
(
<>
{
imgList
.
map
((
item
:
any
,
index
:
any
)
=>
{
return
(
<
div
className=
"pdf"
key=
{
index
}
>
<
span
>
<
Input
placeholder=
"Basic usage"
className=
"pdf-input"
/>
</
span
>
<
div
className=
"pdf-div"
>
<
Upload
className=
"avatar-uploader"
accept=
".pdf"
action=
{
action
!=
null
?
action
:
'/tos/image/upload'
}
data=
{
data
}
name=
"file"
listType=
"picture"
fileList=
{
item
.
fileList
}
// showUploadList=
{
false
}
beforeUpload=
{
beforeUpload
}
onChange=
{
handleChange
}
>
<
Button
icon=
{
loading
?
<
LoadingOutlined
/>
:
<
PlusOutlined
/>
}
>
Upload
</
Button
>
</
Upload
>
<
MinusCircleOutlined
className=
"pdf-icon"
onClick=
{
()
=>
{
del
(
index
);
}
}
/>
</
div
>
</
div
>
);
})
}
{
imgList
.
length
<
5
?
(
<
div
className=
"pdf-add"
>
<
Button
type=
"dashed"
onClick=
{
()
=>
add
()
}
className=
"pdf-btn"
icon=
{
<
PlusOutlined
/>
}
disabled=
{
disabled
}
></
Button
>
</
div
>
)
:
(
''
)
}
</>
);
};
export
default
PdfUpload
;
src/components/Form/ZipCode.tsx
View file @
59f00b7a
/*
* @Author: your name
* @Date: 2021-01-30 16:16:41
* @LastEditTime: 2021-02-01 15:12:24
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\Form\ZipCode.tsx
*/
import
React
,
{
useState
}
from
'react'
;
import
React
,
{
useState
}
from
'react'
;
import
{
Input
}
from
'antd'
;
import
{
Input
}
from
'antd'
;
...
@@ -12,13 +20,18 @@ interface PriceValue {
...
@@ -12,13 +20,18 @@ interface PriceValue {
interface
PriceInputProps
{
interface
PriceInputProps
{
value
?:
PriceValue
;
value
?:
PriceValue
;
onChange
?:
(
value
:
PriceValue
)
=>
void
;
onChange
?:
(
value
:
PriceValue
)
=>
void
;
insdInps
?:
any
;
}
}
const
PriceInput
:
React
.
FC
<
PriceInputProps
>
=
({
value
=
{},
onChange
})
=>
{
const
ZipCode
:
React
.
FC
<
PriceInputProps
>
=
({
value
=
{},
onChange
,
insdInps
})
=>
{
const
triggerChange
=
(
changedValue
:
any
)
=>
{
const
triggerChange
=
(
changedValue
:
any
)
=>
{
console
.
log
(
changedValue
);
if
(
onChange
)
{
if
(
onChange
)
{
onChange
({
...
value
,
...
changedValue
});
onChange
({
...
value
,
...
changedValue
});
}
}
if
(
changedValue
.
residentialName
)
{
insdInps
(
changedValue
.
residentialName
);
}
};
};
const
onNumberChange
=
(
e
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
const
onNumberChange
=
(
e
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
...
@@ -54,7 +67,7 @@ const PriceInput: React.FC<PriceInputProps> = ({ value = {}, onChange }) => {
...
@@ -54,7 +67,7 @@ const PriceInput: React.FC<PriceInputProps> = ({ value = {}, onChange }) => {
name=
"residentialName"
name=
"residentialName"
// value={value.residentialName || number}
// value={value.residentialName || number}
onChange=
{
onNumberChange
}
onChange=
{
onNumberChange
}
style=
{
{
marginRight
:
'10px'
,
width
:
'2
6
0px'
}
}
style=
{
{
marginRight
:
'10px'
,
width
:
'2
4
0px'
}
}
placeholder=
"Please enter community name"
placeholder=
"Please enter community name"
/>
/>
</
div
>
</
div
>
...
@@ -62,4 +75,4 @@ const PriceInput: React.FC<PriceInputProps> = ({ value = {}, onChange }) => {
...
@@ -62,4 +75,4 @@ const PriceInput: React.FC<PriceInputProps> = ({ value = {}, onChange }) => {
);
);
};
};
export
default
PriceInput
;
export
default
ZipCode
;
src/components/Form/zip.less
View file @
59f00b7a
...
@@ -2,5 +2,39 @@
...
@@ -2,5 +2,39 @@
margin-bottom: 15px;
margin-bottom: 15px;
}
}
.zip1 {
.zip1 {
margin-bottom: 10px;
margin-bottom: 5px;
}
// pdf上传
.pdf {
margin-bottom: 15px;
.pdf-input {
width: 104px;
margin-right: 10px;
}
.pdf-div {
display: inline-block !important;
}
.avatar-uploader {
display: inline-block !important;
width: 100px;
}
.pdf-icon {
font-size: 20px !important;
margin-left: 10px !important;
vertical-align: text-top !important;
cursor: pointer;
transition: all 0.3s;
&:hover {
color: #1890ff;
}
}
}
.pdf-add {
margin-top: 10px;
}
.pdf-btn {
width: 80px;
height: 80px;
border-radius: 2px;
}
}
src/components/OnTime/OnTime.tsx
View file @
59f00b7a
...
@@ -14,7 +14,8 @@ import './OnTime.less';
...
@@ -14,7 +14,8 @@ import './OnTime.less';
const
OnTime
=
(
porps
:
any
)
=>
{
const
OnTime
=
(
porps
:
any
)
=>
{
// disabled 是否禁用 // limit 设施默认禁止时间段 // onChanges 提交到父页面 // inhibitTime 选择日期后的禁止时间
// disabled 是否禁用 // limit 设施默认禁止时间段 // onChanges 提交到父页面 // inhibitTime 选择日期后的禁止时间
let
{
disabled
,
limit
,
onChanges
,
inhibitTime
}
=
porps
;
// concurrent 并发后禁止的时间
let
{
disabled
,
limit
,
onChanges
,
inhibitTime
,
concurrent
}
=
porps
;
// 语言设置
// 语言设置
const
[
imgOpen
,
setImgOpen
]
=
useState
([]
as
any
);
const
[
imgOpen
,
setImgOpen
]
=
useState
([]
as
any
);
...
@@ -63,15 +64,7 @@ const OnTime = (porps: any) => {
...
@@ -63,15 +64,7 @@ const OnTime = (porps: any) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
inhibitTime
)
{
if
(
inhibitTime
)
{
// 只要数据变化了先清空原来的数据
// 只要数据变化了先清空原来的数据
let
a
=
[]
as
any
;
restore
();
if
(
getLocale
()
==
'zh-CN'
)
{
setImgOpen
([
'开始时间'
,
'结束时间'
]);
}
else
{
setImgOpen
([
'Start time'
,
'End time'
]);
}
setScheduled
(
false
);
time
.
length
=
0
;
timeOks
.
length
=
0
;
// 先循环一次把所有k的变成可选
// 先循环一次把所有k的变成可选
for
(
let
k
in
Quantum
)
{
for
(
let
k
in
Quantum
)
{
...
@@ -92,6 +85,35 @@ const OnTime = (porps: any) => {
...
@@ -92,6 +85,35 @@ const OnTime = (porps: any) => {
}
}
},
[
inhibitTime
]);
},
[
inhibitTime
]);
// 并发后禁止的时间
useEffect
(()
=>
{
if
(
concurrent
)
{
for
(
let
i
in
concurrent
)
{
for
(
let
j
in
Quantum
)
{
if
(
Quantum
[
j
].
id
==
parseInt
(
moment
(
concurrent
[
i
],
'HH:mm'
).
format
(
'HH'
)))
{
Quantum
[
j
].
active
=
false
;
Quantum
[
j
].
disabled
=
true
;
}
}
}
// 只要数据变化了先清空原来的数据
restore
();
}
},
[
concurrent
]);
// 清空还原原来数据
const
restore
=
()
=>
{
// 只要数据变化了先清空原来的数据
if
(
getLocale
()
==
'zh-CN'
)
{
setImgOpen
([
'开始时间'
,
'结束时间'
]);
}
else
{
setImgOpen
([
'Start time'
,
'End time'
]);
}
setScheduled
(
false
);
time
.
length
=
0
;
timeOks
.
length
=
0
;
};
// 点击时间
// 点击时间
const
onclicks
=
(
item
:
any
,
index
:
any
)
=>
{
const
onclicks
=
(
item
:
any
,
index
:
any
)
=>
{
// 用作判断
// 用作判断
...
...
src/components/PdfUpload/Facilities.tsx
deleted
100644 → 0
View file @
e31991a0
import
React
,
{
useState
}
from
'react'
;
import
{
Form
,
Input
,
Select
,
Button
}
from
'antd'
;
const
{
Option
}
=
Select
;
type
Currency
=
'rmb'
|
'dollar'
;
interface
PriceValue
{
number
?:
number
;
currency
?:
Currency
;
}
interface
PriceInputProps
{
value
?:
PriceValue
;
onChange
?:
(
value
:
PriceValue
)
=>
void
;
}
const
PriceInput
:
React
.
FC
<
PriceInputProps
>
=
({
value
=
{},
onChange
})
=>
{
const
[
number
,
setNumber
]
=
useState
(
0
);
const
[
currency
,
setCurrency
]
=
useState
<
Currency
>
(
'rmb'
);
const
triggerChange
=
(
changedValue
:
{
number
?:
number
;
currency
?:
Currency
})
=>
{
if
(
onChange
)
{
onChange
({
number
,
currency
,
...
value
,
...
changedValue
});
}
};
const
onNumberChange
=
(
e
:
React
.
ChangeEvent
<
HTMLInputElement
>
)
=>
{
const
newNumber
=
parseInt
(
e
.
target
.
value
||
'0'
,
10
);
if
(
Number
.
isNaN
(
number
))
{
return
;
}
if
(
!
(
'number'
in
value
))
{
setNumber
(
newNumber
);
}
triggerChange
({
number
:
newNumber
});
};
const
onCurrencyChange
=
(
newCurrency
:
Currency
)
=>
{
if
(
!
(
'currency'
in
value
))
{
setCurrency
(
newCurrency
);
}
triggerChange
({
currency
:
newCurrency
});
};
return
(
<
span
>
<
Input
type=
"text"
value=
{
value
.
number
||
number
}
onChange=
{
onNumberChange
}
style=
{
{
width
:
100
}
}
/>
<
Select
value=
{
value
.
currency
||
currency
}
style=
{
{
width
:
80
,
margin
:
'0 8px'
}
}
onChange=
{
onCurrencyChange
}
>
<
Option
value=
"rmb"
>
RMB
</
Option
>
<
Option
value=
"dollar"
>
Dollar
</
Option
>
</
Select
>
</
span
>
);
};
const
Facilities
=
()
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
console
.
log
(
'Received values from form: '
,
values
);
};
const
checkPrice
=
(
_
:
any
,
value
:
{
number
:
number
})
=>
{
if
(
value
.
number
>
0
)
{
return
Promise
.
resolve
();
}
return
Promise
.
reject
(
'Price must be greater than zero!'
);
};
return
(
<
Form
name=
"customized_form_controls"
layout=
"inline"
onFinish=
{
onFinish
}
initialValues=
{
{
price
:
{
number
:
0
,
currency
:
'rmb'
,
},
}
}
>
<
Form
.
Item
name=
"price"
label=
"Price"
rules=
{
[{
validator
:
checkPrice
}]
}
>
<
PriceInput
/>
</
Form
.
Item
>
<
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
>
Submit
</
Button
>
</
Form
.
Item
>
</
Form
>
);
};
export
default
Facilities
;
src/models/CommunityManagement/FacilityBookings.ts
View file @
59f00b7a
This diff is collapsed.
Click to expand it.
src/pages/AccountManagement/SystemFeedback/BugDetail.tsx
View file @
59f00b7a
/*
* @Author: your name
* @Date: 2021-01-12 16:05:46
* @LastEditTime: 2021-02-01 18:11:30
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\pages\AccountManagement\SystemFeedback\BugDetail.tsx
*/
import
React
,
{
useEffect
}
from
'react'
;
import
React
,
{
useEffect
}
from
'react'
;
import
{
Button
,
Descriptions
,
Image
}
from
'antd'
;
import
{
Button
,
Descriptions
,
Image
}
from
'antd'
;
import
{
EditOutlined
,
LeftOutlined
}
from
'@ant-design/icons'
;
import
{
EditOutlined
,
LeftOutlined
}
from
'@ant-design/icons'
;
...
@@ -51,8 +59,8 @@ const BugDetail = (props: any) => {
...
@@ -51,8 +59,8 @@ const BugDetail = (props: any) => {
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
className=
"diys"
label=
" "
style=
{
{
paddingBottom
:
16
}
}
>
<
Descriptions
.
Item
className=
"diys"
label=
" "
style=
{
{
paddingBottom
:
16
}
}
>
{
DataSave
{
DataSave
?
DataSave
.
imageUrls
.
map
((
item
:
any
)
=>
{
?
DataSave
.
imageUrls
.
map
((
item
:
any
,
index
:
any
)
=>
{
return
<
Image
width=
{
120
}
src=
{
item
}
/>;
return
<
Image
key=
{
index
}
width=
{
120
}
src=
{
item
}
/>;
})
})
:
'-'
}
:
'-'
}
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
...
...
src/pages/AccountManagement/account/Account.tsx
View file @
59f00b7a
...
@@ -246,7 +246,7 @@ const Account = (props: any) => {
...
@@ -246,7 +246,7 @@ const Account = (props: any) => {
<
Button
type=
"primary"
htmlType=
"submit"
icon=
{
<
SearchOutlined
/>
}
loading=
{
loading
}
>
<
Button
type=
"primary"
htmlType=
"submit"
icon=
{
<
SearchOutlined
/>
}
loading=
{
loading
}
>
Search
{
' '
}
Search
{
' '
}
</
Button
>
</
Button
>
<
Button
{
/*
<Button
htmlType="button"
htmlType="button"
onClick={Refresh}
onClick={Refresh}
style={{ marginLeft: '15px' }}
style={{ marginLeft: '15px' }}
...
@@ -255,7 +255,7 @@ const Account = (props: any) => {
...
@@ -255,7 +255,7 @@ const Account = (props: any) => {
>
>
{' '}
{' '}
Reset
Reset
</
Button
>
</Button>
*/
}
</
Form
.
Item
>
</
Form
.
Item
>
</
Form
>
</
Form
>
</
div
>
</
div
>
...
...
src/pages/AccountManagement/account/AccountAdds.tsx
View file @
59f00b7a
...
@@ -297,7 +297,7 @@ const Account = (props: any) => {
...
@@ -297,7 +297,7 @@ const Account = (props: any) => {
<
Descriptions
column=
{
{
xs
:
1
,
sm
:
1
,
md
:
2
,
xl
:
3
}
}
>
<
Descriptions
column=
{
{
xs
:
1
,
sm
:
1
,
md
:
2
,
xl
:
3
}
}
>
<
Descriptions
.
Item
>
<
Descriptions
.
Item
>
<
Form
.
Item
name=
"tosUserName"
label=
"Account ID"
rules=
{
AccountTip
[
0
]
as
any
}
>
<
Form
.
Item
name=
"tosUserName"
label=
"Account ID"
rules=
{
AccountTip
[
0
]
as
any
}
>
<
Input
placeholder=
"
Login Account
"
className=
"input"
/>
<
Input
placeholder=
"
E-mail address
"
className=
"input"
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
<
Descriptions
.
Item
>
...
@@ -306,7 +306,7 @@ const Account = (props: any) => {
...
@@ -306,7 +306,7 @@ const Account = (props: any) => {
</
Form
.
Item
>
</
Form
.
Item
>
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
<
Descriptions
.
Item
>
<
Form
.
Item
name=
"tosUserPhone"
label=
"
P
hone"
rules=
{
AccountTip
[
2
]
as
any
}
>
<
Form
.
Item
name=
"tosUserPhone"
label=
"
Correct telep
hone"
rules=
{
AccountTip
[
2
]
as
any
}
>
<
Input
<
Input
placeholder=
"Contact Information"
placeholder=
"Contact Information"
className=
"input"
className=
"input"
...
...
src/pages/AccountManagement/account/AccountDetail.tsx
View file @
59f00b7a
...
@@ -407,14 +407,6 @@ const Account = (props: any) => {
...
@@ -407,14 +407,6 @@ const Account = (props: any) => {
<
EditOutlined
/>
<
EditOutlined
/>
Account Detail
Account Detail
<
div
className=
"back"
>
<
div
className=
"back"
>
{
user
&&
user
.
currentUser
.
tosUserLevel
!==
3
?
(
<
Button
type=
"primary"
danger
style=
{
{
marginRight
:
15
}
}
onClick=
{
lockS
}
>
<
PoweroffOutlined
/>
Close Account
</
Button
>
)
:
(
''
)
}
<
Button
onClick=
{
goToReturn
}
>
<
Button
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
<
LeftOutlined
/>
Back
Back
...
@@ -514,9 +506,14 @@ const Account = (props: any) => {
...
@@ -514,9 +506,14 @@ const Account = (props: any) => {
<
div
className=
"diy"
>
<
div
className=
"diy"
>
<
div
className=
"label"
></
div
>
<
div
className=
"label"
></
div
>
<
div
className=
"label"
>
<
div
className=
"label"
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
disabled
>
{
user
&&
user
.
currentUser
.
tosUserLevel
!==
3
?
(
Submit
<
Button
danger
style=
{
{
marginRight
:
15
}
}
onClick=
{
lockS
}
>
</
Button
>
<
PoweroffOutlined
/>
Close Account
</
Button
>
)
:
(
''
)
}
</
div
>
</
div
>
</
div
>
</
div
>
...
...
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
59f00b7a
...
@@ -565,7 +565,7 @@ const Account = (props: any) => {
...
@@ -565,7 +565,7 @@ const Account = (props: any) => {
<
Descriptions
column=
{
{
xs
:
1
,
sm
:
1
,
md
:
2
,
xl
:
3
}
}
>
<
Descriptions
column=
{
{
xs
:
1
,
sm
:
1
,
md
:
2
,
xl
:
3
}
}
>
<
Descriptions
.
Item
>
<
Descriptions
.
Item
>
<
Form
.
Item
name=
"tosUserName"
label=
"Account ID"
rules=
{
AccountTip
[
0
]
as
any
}
>
<
Form
.
Item
name=
"tosUserName"
label=
"Account ID"
rules=
{
AccountTip
[
0
]
as
any
}
>
<
Input
placeholder=
"
Login Account
"
className=
"input"
disabled
/>
<
Input
placeholder=
"
E-mail address
"
className=
"input"
disabled
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
<
Descriptions
.
Item
>
...
@@ -574,7 +574,7 @@ const Account = (props: any) => {
...
@@ -574,7 +574,7 @@ const Account = (props: any) => {
</
Form
.
Item
>
</
Form
.
Item
>
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
<
Descriptions
.
Item
>
<
Form
.
Item
name=
"tosUserPhone"
label=
"
P
hone"
rules=
{
AccountTip
[
2
]
as
any
}
>
<
Form
.
Item
name=
"tosUserPhone"
label=
"
Correct telep
hone"
rules=
{
AccountTip
[
2
]
as
any
}
>
<
Input
<
Input
placeholder=
"Contact Information"
placeholder=
"Contact Information"
className=
"input"
className=
"input"
...
...
src/pages/CommunityManagement/CellList/Adds.tsx
View file @
59f00b7a
...
@@ -411,7 +411,12 @@ const Adds = (props: any) => {
...
@@ -411,7 +411,12 @@ const Adds = (props: any) => {
labelAlign=
"left"
labelAlign=
"left"
scrollToFirstError=
{
true
}
scrollToFirstError=
{
true
}
>
>
<
Form
.
Item
label=
"Community Name"
name=
"des"
rules=
{
[{
required
:
false
}]
}
>
<
Form
.
Item
label=
"Community Name"
name=
"des"
rules=
{
[{
required
:
false
}]
}
className=
"must"
>
<
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
...
@@ -457,7 +462,12 @@ const Adds = (props: any) => {
...
@@ -457,7 +462,12 @@ const Adds = (props: any) => {
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"Community Telephone"
name=
"info"
rules=
{
[{
required
:
false
}]
}
>
<
Form
.
Item
label=
"Community Telephone"
name=
"info"
rules=
{
[{
required
:
false
}]
}
className=
"must"
>
<
Input
.
Group
compact
>
<
Input
.
Group
compact
>
<
Form
.
Item
name=
{
[
'info'
,
'tel'
]
}
noStyle
rules=
{
village
[
4
]
as
any
}
>
<
Form
.
Item
name=
{
[
'info'
,
'tel'
]
}
noStyle
rules=
{
village
[
4
]
as
any
}
>
<
Input
<
Input
...
...
src/pages/CommunityManagement/CellList/Adds2.tsx
View file @
59f00b7a
...
@@ -22,10 +22,9 @@ import { village } from '@/utils/tip';
...
@@ -22,10 +22,9 @@ import { village } from '@/utils/tip';
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
getNumber
}
from
'@/utils/string'
;
// 正则
import
{
getNumber
}
from
'@/utils/string'
;
// 正则
// banner 上传
import
PictureOptionsRow
from
'@/components/PictureOptions/PictureOptionsRow'
;
// banner 上传
import
PictureOptionsRow
from
'@/components/PictureOptions/PictureOptionsRow'
;
import
Facilities
from
'@/components/Form/ZipCode'
;
// 小区邮编地址名称
// 多图上传
import
PdfUpload
from
'@/components/Form/PdfUpload'
;
// 多图上传
import
Facilities
from
'@/components/Form/ZipCode'
;
import
PDF
from
'react-pdf-js'
;
import
PDF
from
'react-pdf-js'
;
...
@@ -41,7 +40,7 @@ const Adds = (props: any) => {
...
@@ -41,7 +40,7 @@ const Adds = (props: any) => {
const
[
PropertyFee
,
setPropertyFee
]
=
useState
([
'1'
]);
// 表单物业费提交值
const
[
PropertyFee
,
setPropertyFee
]
=
useState
([
'1'
]);
// 表单物业费提交值
// 监听用户填写小区名 以及后续禁止输入 提示信息
// 监听用户填写小区名 以及后续禁止输入 提示信息
const
[
codename
,
setCodeName
]
=
useState
(
''
);
const
[
codename
,
setCodeName
]
=
useState
(
null
);
const
[
codeStrat
,
setcodeStrat
]
=
useState
(
false
);
const
[
codeStrat
,
setcodeStrat
]
=
useState
(
false
);
const
[
tipMain
,
setTipMain
]
=
useState
(
''
);
const
[
tipMain
,
setTipMain
]
=
useState
(
''
);
...
@@ -89,9 +88,9 @@ const Adds = (props: any) => {
...
@@ -89,9 +88,9 @@ const Adds = (props: any) => {
},
},
});
});
// 上传
// 上传
setLouba
(
Data
.
balouscheduleUrl
?
[
backUpload
(
Data
.
balouscheduleUrl
,
Data
.
id
)]
:
[]);
//
setLouba(Data.balouscheduleUrl ? [backUpload(Data.balouscheduleUrl, Data.id)] : []);
setGuide
(
Data
.
serviceGuideUrl
?
[
backUpload
(
Data
.
serviceGuideUrl
,
Data
.
id
)]
:
[]);
//
setGuide(Data.serviceGuideUrl ? [backUpload(Data.serviceGuideUrl, Data.id)] : []);
setPeriod
(
Data
.
lifeServiceUrl
?
[
backUpload
(
Data
.
lifeServiceUrl
,
Data
.
id
)]
:
[]);
//
setPeriod(Data.lifeServiceUrl ? [backUpload(Data.lifeServiceUrl, Data.id)] : []);
// 小区名 -- 上传需要
// 小区名 -- 上传需要
setCodeName
(
Data
.
residentialName
);
setCodeName
(
Data
.
residentialName
);
setcodeStrat
(
true
);
setcodeStrat
(
true
);
...
@@ -213,29 +212,14 @@ const Adds = (props: any) => {
...
@@ -213,29 +212,14 @@ const Adds = (props: any) => {
}
}
}
}
// 表单验证
const
onFinish
=
(
values
:
any
)
=>
{
let
{
residentialZipCode
}
=
values
.
des
;
let
tel
=
values
.
info
.
tel
;
if
(
values
.
residentialManagerUserName
.
length
<
2
)
{
message
.
error
(
'Please Enter 2-digit Administrator Name!'
);
}
else
if
(
residentialZipCode
.
length
<
6
)
{
message
.
error
(
'Please Enter The Correct Name!'
);
}
else
if
(
tel
.
length
!=
8
&&
tel
.
length
!=
11
)
{
message
.
error
(
'Incorrect Contact Information!'
);
}
else
{
onUpDate
(
values
);
}
};
// 表单提交
// 表单提交
function
on
UpDate
(
values
:
any
)
{
function
on
Finish
(
values
:
any
)
{
// 额外判断
// 额外判断
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
;
obj
.
residentialZipCode
=
`SINGAPORE
${
residentialZipCode
}
`
;
obj
.
residentialZipCode
=
`SINGAPORE
${
residentialZipCode
}
`
;
obj
.
residentialAddress
=
residentialAddress
;
obj
.
residentialAddress
=
residentialAddress
;
...
@@ -250,9 +234,9 @@ const Adds = (props: any) => {
...
@@ -250,9 +234,9 @@ const Adds = (props: any) => {
// 上传内容
// 上传内容
obj
.
balouscheduleUrl
=
undeFi
(
loubaUpload
.
map
((
item
:
any
)
=>
item
.
name
)[
0
]);
//
obj.balouscheduleUrl = undeFi(loubaUpload.map((item: any) => item.name)[0]);
obj
.
serviceGuideUrl
=
undeFi
(
guideUpload
.
map
((
item
:
any
)
=>
item
.
name
)[
0
]);
//
obj.serviceGuideUrl = undeFi(guideUpload.map((item: any) => item.name)[0]);
obj
.
lifeServiceUrl
=
undeFi
(
periodUpload
.
map
((
item
:
any
)
=>
item
.
name
)[
0
]);
//
obj.lifeServiceUrl = undeFi(periodUpload.map((item: any) => item.name)[0]);
// 小区热线
// 小区热线
// 表单结构存在数据不存在情况, 所以要多判断一次
// 表单结构存在数据不存在情况, 所以要多判断一次
...
@@ -292,10 +276,11 @@ const Adds = (props: any) => {
...
@@ -292,10 +276,11 @@ const Adds = (props: any) => {
history
.
go
(
-
1
);
history
.
go
(
-
1
);
};
};
// 小区名输入监听ant
// 小区名输入监听赋值
function
insdInp
(
value
:
string
)
{
function
insdInp
(
value
:
any
)
{
setCodeName
(
value
);
if
(
value
.
trim
()
!=
''
)
{
return
value
;
setCodeName
(
value
);
}
}
}
// 正则手机号
// 正则手机号
...
@@ -357,28 +342,26 @@ const Adds = (props: any) => {
...
@@ -357,28 +342,26 @@ const Adds = (props: any) => {
setPageNumber
(
page
);
setPageNumber
(
page
);
};
};
// 验证
//
邮编小区名字
验证
const
checkPrice
=
(
_
:
any
,
value
:
any
)
=>
{
const
checkPrice
=
(
_
:
any
,
value
:
any
)
=>
{
console
.
log
(
isNaN
(
value
.
residentialZipCode
));
if
(
!
value
)
{
if
(
!
value
)
{
return
Promise
.
reject
(
'
必填
!'
);
return
Promise
.
reject
(
'
Please fill in the basic information
!'
);
}
}
if
(
value
.
residentialZipCode
&&
value
.
residentialZipCode
.
trim
()
==
''
)
{
if
(
!
value
.
residentialZipCode
||
value
.
residentialZipCode
.
trim
()
==
''
)
{
return
Promise
.
reject
(
'邮编不能空!'
);
return
Promise
.
reject
(
'Please enter the postcode !'
);
}
else
if
(
value
.
residentialZipCode
.
length
<
6
||
isNaN
(
parseInt
(
value
.
residentialZipCode
)))
{
}
else
if
(
value
.
residentialZipCode
.
length
<
6
||
!
/^
\d
+$/
.
test
(
value
.
residentialZipCode
))
{
return
Promise
.
reject
(
'邮编错误!'
);
return
Promise
.
reject
(
'Wrong zip code !'
);
}
else
if
(
value
.
residentialAddress
&&
value
.
residentialAddress
.
trim
()
==
''
)
{
}
else
if
(
return
Promise
.
reject
(
'地址不能空!'
);
!
value
.
residentialAddress
||
}
else
if
(
value
.
residentialName
&&
value
.
residentialName
.
trim
()
==
''
)
{
value
.
residentialAddress
.
trim
()
==
''
||
return
Promise
.
reject
(
'名称不能空!'
);
value
.
residentialAddress
.
length
<
2
)
{
return
Promise
.
reject
(
'Please enter the address of the community !'
);
}
else
if
(
!
value
.
residentialName
||
value
.
residentialName
.
trim
()
==
''
)
{
return
Promise
.
reject
(
'Please enter the community name !'
);
}
else
{
}
else
{
return
Promise
.
resolve
();
return
Promise
.
resolve
();
}
}
console
.
log
(
value
);
// if (value.length > 0) {
// return Promise.resolve();
// }
return
Promise
.
reject
(
'Price must be greater than zero!'
);
};
};
return
(
return
(
...
@@ -404,14 +387,19 @@ const Adds = (props: any) => {
...
@@ -404,14 +387,19 @@ const Adds = (props: any) => {
labelAlign=
"left"
labelAlign=
"left"
scrollToFirstError=
{
true
}
scrollToFirstError=
{
true
}
>
>
{
/* 小区邮编 */
}
{
/* 小区邮编
、地址和名称
*/
}
<
Form
.
Item
<
Form
.
Item
name=
"des"
name=
"des"
label=
"Community Name"
label=
"Community Name"
rules=
{
[{
validator
:
checkPrice
}]
}
rules=
{
[{
validator
:
checkPrice
}]
}
style=
{
{
marginBottom
:
10
}
}
style=
{
{
marginBottom
:
15
}
}
className=
"must"
>
>
<
Facilities
/>
<
Facilities
insdInps=
{
(
value
:
any
)
=>
{
insdInp
(
value
);
}
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
{
/* 小区时间 */
}
{
/* 小区时间 */
}
...
@@ -423,33 +411,31 @@ const Adds = (props: any) => {
...
@@ -423,33 +411,31 @@ const Adds = (props: any) => {
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
label=
"Community Telephone"
name=
"info"
rules=
{
[{
required
:
true
}]
}
>
{
/* 小区联系方式 */
}
<
Input
.
Group
compact
>
<
Form
.
Item
name=
"tel"
label=
"Community Telephone"
rules=
{
village
[
4
]
as
any
}
>
<
Form
.
Item
name=
{
[
'info'
,
'tel'
]
}
noStyle
rules=
{
village
[
4
]
as
any
}
>
<
Input
<
Input
style=
{
{
marginRight
:
'10px'
,
width
:
'240px'
}
}
style=
{
{
marginRight
:
'10px'
,
width
:
'160px'
}
}
placeholder=
"Please enter phone"
placeholder=
"Please enter phone"
maxLength=
{
11
}
maxLength=
{
11
}
onKeyUp=
{
keyup_communityManagerFee
}
onKeyUp=
{
keyup_communityManagerFee
}
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
span
style=
{
{
display
:
'inline-block'
,
marginRight
:
'10px'
,
lineHeight
:
'30px'
}
}
>
{
/* 小区邮箱 */
}
-
<
Form
.
Item
name=
"email"
label=
"Community Mailbox"
rules=
{
village
[
5
]
as
any
}
>
</
span
>
<
Input
style=
{
{
width
:
'240px'
}
}
placeholder=
"Please enter email"
/>
<
Form
.
Item
name=
{
[
'info'
,
'email'
]
}
noStyle
rules=
{
village
[
5
]
as
any
}
>
<
Input
style=
{
{
width
:
'180px'
}
}
placeholder=
"Please enter email"
/>
</
Form
.
Item
>
</
Input
.
Group
>
</
Form
.
Item
>
</
Form
.
Item
>
{
/* 小区管理员 */
}
<
Form
.
Item
<
Form
.
Item
label=
"Administrator"
label=
"Administrator"
name=
"residentialManagerUserName"
name=
"residentialManagerUserName"
rules=
{
village
[
6
]
as
any
}
rules=
{
village
[
6
]
as
any
}
>
>
<
Input
style=
{
{
width
:
'
160px'
}
}
placeholder=
"N
ame"
maxLength=
{
30
}
/>
<
Input
style=
{
{
width
:
'
240px'
}
}
placeholder=
"Please enter n
ame"
maxLength=
{
30
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
{
/* 小区缴费方式 */
}
<
Form
.
Item
label=
"Property Fee"
name=
"propertyFee"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Form
.
Item
label=
"Property Fee"
name=
"propertyFee"
style=
{
{
marginBottom
:
'0'
}
}
>
<
Checkbox
onChange=
{
onChange
}
disabled
>
<
Checkbox
onChange=
{
onChange
}
disabled
>
Online Payment
Online Payment
...
@@ -474,6 +460,15 @@ const Adds = (props: any) => {
...
@@ -474,6 +460,15 @@ const Adds = (props: any) => {
</
Form
.
Item
>
</
Form
.
Item
>
{
/* 第一个上传 */
}
{
/* 第一个上传 */
}
<
Form
.
Item
name=
{
'banner2'
}
label=
"Maintenance Schedule:"
colon=
{
false
}
>
<
PdfUpload
action=
"/tos/image/upload"
data=
{
{
imageType
:
'tosNotice'
,
comName
:
codename
,
}
}
></
PdfUpload
>
</
Form
.
Item
>
<
hr
/>
<
hr
/>
...
...
src/pages/CommunityManagement/CellList/Details.tsx
View file @
59f00b7a
...
@@ -137,22 +137,6 @@ const Detail = (props: any) => {
...
@@ -137,22 +137,6 @@ const Detail = (props: any) => {
<
EyeOutlined
/>
<
EyeOutlined
/>
Community Details
Community Details
<
div
className=
"back"
>
<
div
className=
"back"
>
{
user
&&
user
.
currentUser
.
permission
.
includes
(
'47'
)
?
(
<
Button
type=
"primary"
danger
style=
{
{
marginRight
:
'15px'
}
}
icon=
{
<
PoweroffOutlined
/>
}
loading=
{
false
}
onClick=
{
openModel
}
>
{
' '
}
<
span
className=
"capi"
>
Close the community
</
span
>
</
Button
>
)
:
(
''
)
}
<
Button
onClick=
{
goToReturn
}
>
<
Button
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
<
LeftOutlined
/>
Back
Back
...
@@ -301,9 +285,27 @@ const Detail = (props: any) => {
...
@@ -301,9 +285,27 @@ const Detail = (props: any) => {
</
div
>
</
div
>
</
div
>
</
div
>
{
user
&&
user
.
currentUser
.
permission
.
includes
(
'47'
)
?
(
<
div
>
<
Divider
/>
<
Button
danger
style=
{
{
marginRight
:
'15px'
}
}
icon=
{
<
PoweroffOutlined
/>
}
loading=
{
false
}
onClick=
{
openModel
}
>
{
' '
}
<
span
className=
"capi"
>
Close the community
</
span
>
</
Button
>
</
div
>
)
:
(
''
)
}
{
/* 确认关闭框 */
}
{
/* 确认关闭框 */
}
<
Modal
<
Modal
title=
"Are You Sure You Want To Close The Community
?
?"
title=
"Are You Sure You Want To Close The Community
?"
visible=
{
ModelFee
}
visible=
{
ModelFee
}
centered=
{
true
}
centered=
{
true
}
onCancel=
{
handleCancel
}
onCancel=
{
handleCancel
}
...
...
src/pages/CommunityManagement/CellList/celllist.less
View file @
59f00b7a
...
@@ -153,3 +153,19 @@ img {
...
@@ -153,3 +153,19 @@ img {
text-align: right;
text-align: right;
padding: 10px;
padding: 10px;
}
}
// 必填
.must {
.ant-form-item-label > label {
position: relative;
&::before {
display: inline-block;
margin-right: 4px;
color: #ff4d4f;
font-size: 14px;
font-family: SimSun, sans-serif;
line-height: 1;
content: '*';
}
}
}
src/pages/CommunityManagement/CommunityAnnouncement/CommunityAnnouncement.tsx
View file @
59f00b7a
...
@@ -212,7 +212,7 @@ const CommunityAnnouncement = (props: any) => {
...
@@ -212,7 +212,7 @@ const CommunityAnnouncement = (props: any) => {
>
>
Search
{
' '
}
Search
{
' '
}
</
Button
>
</
Button
>
<
Button
{
/*
<Button
htmlType="button"
htmlType="button"
onClick={onReset}
onClick={onReset}
style={{ marginLeft: '15px' }}
style={{ marginLeft: '15px' }}
...
@@ -221,7 +221,7 @@ const CommunityAnnouncement = (props: any) => {
...
@@ -221,7 +221,7 @@ const CommunityAnnouncement = (props: any) => {
>
>
{' '}
{' '}
Reset
Reset
</
Button
>
</Button>
*/
}
</
Form
.
Item
>
</
Form
.
Item
>
</
Form
>
</
Form
>
</
div
>
</
div
>
...
...
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
View file @
59f00b7a
...
@@ -21,7 +21,7 @@ import { BookingsTip } from '@/utils/tip';
...
@@ -21,7 +21,7 @@ import { BookingsTip } from '@/utils/tip';
import
OnTimeTow
from
'@/components/OnTime/OnTime'
;
import
OnTimeTow
from
'@/components/OnTime/OnTime'
;
const
Bookings
=
(
props
:
any
)
=>
{
const
Bookings
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data3
,
Result
,
DataSave
,
token
,
load
,
resultTime
,
Remaining
}
=
props
;
const
{
dispatch
,
Data3
,
Result
,
DataSave
,
token
,
load
,
resultTime
,
Remaining
,
history
}
=
props
;
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'FacilityBookings/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
});
dispatch
({
type
:
'FacilityBookings/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
});
...
@@ -51,6 +51,7 @@ const Bookings = (props: any) => {
...
@@ -51,6 +51,7 @@ const Bookings = (props: any) => {
const
[
prohibit
,
setProhibit
]
=
useState
(
true
);
// 输入框是否不可选
const
[
prohibit
,
setProhibit
]
=
useState
(
true
);
// 输入框是否不可选
const
[
result
,
setResultTime
]
=
useState
(
null
as
any
);
// 已预约时间段
const
[
result
,
setResultTime
]
=
useState
(
null
as
any
);
// 已预约时间段
const
[
concurrent
,
setConcurrent
]
=
useState
(
null
as
any
);
// 并发后禁止的时间
const
[
bookTime
,
setBookTime
]
=
useState
(
1
);
// 默认延后预订时间
const
[
bookTime
,
setBookTime
]
=
useState
(
1
);
// 默认延后预订时间
...
@@ -91,12 +92,27 @@ const Bookings = (props: any) => {
...
@@ -91,12 +92,27 @@ const Bookings = (props: any) => {
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
Result
!=
null
)
{
if
(
Result
!=
null
)
{
message
.
error
(
Result
.
msg
);
// 预约的结果 0004的话就是 并发被占用了
if
(
Result
.
index
==
1
)
{
IA
();
// message.error(Result.msg);
// if (Result.index == 1) {
// IA();
// }
// setLoading(false);
// ResultClear();
// 并发触发占用时间
if
(
Result
.
error_code
==
'0004'
)
{
// 更新list
setConcurrent
(
Result
.
data
);
ResultClear
();
// 清除结果
message
.
warning
(
'The selected time has been reserved by app, please select again!'
);
}
else
{
// 提交成功
ResultClear
();
// 清除结果
message
.
success
(
'Success Operation!'
,
3
);
history
.
push
(
'/CommunityManagement/FacilityBookings'
);
}
}
setLoading
(
false
);
ResultClear
();
}
}
},
[
Result
]);
},
[
Result
]);
...
@@ -420,6 +436,7 @@ const Bookings = (props: any) => {
...
@@ -420,6 +436,7 @@ const Bookings = (props: any) => {
limit=
{
curString
.
categoriesOpenTime
}
// 设施默认禁止时间段
limit=
{
curString
.
categoriesOpenTime
}
// 设施默认禁止时间段
inhibitTime=
{
result
}
// 选择日期后的禁止时间
inhibitTime=
{
result
}
// 选择日期后的禁止时间
onChanges=
{
onChanges
}
onChanges=
{
onChanges
}
concurrent=
{
concurrent
}
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
Col
>
</
Col
>
...
@@ -531,13 +548,7 @@ const Bookings = (props: any) => {
...
@@ -531,13 +548,7 @@ const Bookings = (props: any) => {
)
:
null
}
)
:
null
}
<
div
className=
{
styles
.
line
}
></
div
>
<
div
className=
{
styles
.
line
}
></
div
>
<
Button
<
Button
htmlType=
"submit"
type=
"primary"
loading=
{
load
}
disabled=
{
prohibit
}
>
htmlType=
"submit"
type=
"primary"
loading=
{
load
}
disabled=
{
prohibit
}
style=
{
{
width
:
80
,
height
:
32
}
}
>
Submit
Submit
</
Button
>
</
Button
>
</
Form
>
</
Form
>
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityTow.tsx
View file @
59f00b7a
...
@@ -32,6 +32,7 @@ import { NewFaci } from '@/utils/tip';
...
@@ -32,6 +32,7 @@ import { NewFaci } from '@/utils/tip';
const
FacilityTow
=
(
props
:
any
)
=>
{
const
FacilityTow
=
(
props
:
any
)
=>
{
const
{
const
{
user
,
dispatch
,
dispatch
,
location
,
location
,
DataSaveDetail
,
DataSaveDetail
,
...
@@ -290,14 +291,6 @@ const FacilityTow = (props: any) => {
...
@@ -290,14 +291,6 @@ const FacilityTow = (props: any) => {
setIsModalVisible
(
false
);
setIsModalVisible
(
false
);
};
};
// 关闭按钮
const
operations
=
(
<
Button
type=
"primary"
danger
onClick=
{
showModal
}
>
<
PoweroffOutlined
/>
Close The Selected Facility
</
Button
>
);
return
(
return
(
<>
<>
{
DataSave
?
(
{
DataSave
?
(
...
@@ -311,12 +304,7 @@ const FacilityTow = (props: any) => {
...
@@ -311,12 +304,7 @@ const FacilityTow = (props: any) => {
<
label
>
Community :
</
label
>
{
DataSave
?
DataSave
.
community
:
''
}
<
label
>
Community :
</
label
>
{
DataSave
?
DataSave
.
community
:
''
}
</
div
>
</
div
>
<
Tabs
<
Tabs
defaultActiveKey=
"0"
tabPosition=
"top"
onTabClick=
{
(
key
)
=>
onTabClicks
(
key
)
}
>
defaultActiveKey=
"0"
tabPosition=
"top"
onTabClick=
{
(
key
)
=>
onTabClicks
(
key
)
}
tabBarExtraContent=
{
facilityDetail
?
operations
:
''
}
>
{
DataSave
{
DataSave
?
DataSave
.
facilities
.
map
((
i
:
any
)
=>
(
?
DataSave
.
facilities
.
map
((
i
:
any
)
=>
(
<
TabPane
tab=
{
`${i.name}`
}
key=
{
i
.
id
}
></
TabPane
>
<
TabPane
tab=
{
`${i.name}`
}
key=
{
i
.
id
}
></
TabPane
>
...
@@ -502,9 +490,16 @@ const FacilityTow = (props: any) => {
...
@@ -502,9 +490,16 @@ const FacilityTow = (props: any) => {
<
hr
></
hr
>
<
hr
></
hr
>
<>
<>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
load
}
disabled=
{
facilityDetail
}
>
{
facilityDetail
&&
user
&&
user
.
currentUser
.
permission
.
includes
(
'58'
)
?
(
Submit
<
Button
danger
onClick=
{
showModal
}
>
</
Button
>
<
PoweroffOutlined
/>
Close The Selected Facility
</
Button
>
)
:
(
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
load
}
>
Submit
</
Button
>
)
}
</>
</>
</
Form
>
</
Form
>
</
div
>
</
div
>
...
@@ -550,8 +545,10 @@ function mapStateToProps(state: any) {
...
@@ -550,8 +545,10 @@ function mapStateToProps(state: any) {
FacilityDelete
,
FacilityDelete
,
}
=
state
.
FacilityBookings
;
}
=
state
.
FacilityBookings
;
const
{
token
}
=
state
.
login
;
const
{
token
}
=
state
.
login
;
const
user
=
state
.
user
;
const
load
=
state
.
loading
.
models
.
FacilityBookings
||
false
;
const
load
=
state
.
loading
.
models
.
FacilityBookings
||
false
;
return
{
return
{
user
,
DataSave
,
DataSave
,
DataSaveDetail
,
DataSaveDetail
,
sourceData
,
sourceData
,
...
...
src/pages/CommunityManagement/VisitorRecord/VisitorRecord.tsx
View file @
59f00b7a
...
@@ -210,7 +210,7 @@ const VisitorRecord = (props: any) => {
...
@@ -210,7 +210,7 @@ const VisitorRecord = (props: any) => {
<
Button
type=
"primary"
htmlType=
"submit"
icon=
{
<
SearchOutlined
/>
}
loading=
{
loading
}
>
<
Button
type=
"primary"
htmlType=
"submit"
icon=
{
<
SearchOutlined
/>
}
loading=
{
loading
}
>
Search
{
' '
}
Search
{
' '
}
</
Button
>
</
Button
>
<
Button
{
/*
<Button
htmlType="button"
htmlType="button"
onClick={onReset}
onClick={onReset}
style={{ marginLeft: '15px' }}
style={{ marginLeft: '15px' }}
...
@@ -219,7 +219,7 @@ const VisitorRecord = (props: any) => {
...
@@ -219,7 +219,7 @@ const VisitorRecord = (props: any) => {
>
>
{' '}
{' '}
Reset
Reset
</
Button
>
</Button>
*/
}
</
Form
.
Item
>
</
Form
.
Item
>
<
div
style=
{
{
marginTop
:
24
,
marginRight
:
-
16
,
width
:
'calc(100% + 16px)'
}
}
>
<
div
style=
{
{
marginTop
:
24
,
marginRight
:
-
16
,
width
:
'calc(100% + 16px)'
}
}
>
<
Form
.
Item
name=
"community"
label=
""
>
<
Form
.
Item
name=
"community"
label=
""
>
...
...
src/pages/CommunityManagement/visitorRecord/VisitorRecord.tsx
View file @
59f00b7a
...
@@ -210,7 +210,7 @@ const VisitorRecord = (props: any) => {
...
@@ -210,7 +210,7 @@ const VisitorRecord = (props: any) => {
<
Button
type=
"primary"
htmlType=
"submit"
icon=
{
<
SearchOutlined
/>
}
loading=
{
loading
}
>
<
Button
type=
"primary"
htmlType=
"submit"
icon=
{
<
SearchOutlined
/>
}
loading=
{
loading
}
>
Search
{
' '
}
Search
{
' '
}
</
Button
>
</
Button
>
<
Button
{
/*
<Button
htmlType="button"
htmlType="button"
onClick={onReset}
onClick={onReset}
style={{ marginLeft: '15px' }}
style={{ marginLeft: '15px' }}
...
@@ -219,7 +219,7 @@ const VisitorRecord = (props: any) => {
...
@@ -219,7 +219,7 @@ const VisitorRecord = (props: any) => {
>
>
{' '}
{' '}
Reset
Reset
</
Button
>
</Button>
*/
}
</
Form
.
Item
>
</
Form
.
Item
>
<
div
style=
{
{
marginTop
:
24
,
marginRight
:
-
16
,
width
:
'calc(100% + 16px)'
}
}
>
<
div
style=
{
{
marginTop
:
24
,
marginRight
:
-
16
,
width
:
'calc(100% + 16px)'
}
}
>
<
Form
.
Item
name=
"community"
label=
""
>
<
Form
.
Item
name=
"community"
label=
""
>
...
...
src/pages/ContractManagement/Contract.tsx
View file @
59f00b7a
...
@@ -168,7 +168,7 @@ const Contract = (props: any) => {
...
@@ -168,7 +168,7 @@ const Contract = (props: any) => {
<
Button
type=
"primary"
htmlType=
"submit"
icon=
{
<
SearchOutlined
/>
}
loading=
{
loading
}
>
<
Button
type=
"primary"
htmlType=
"submit"
icon=
{
<
SearchOutlined
/>
}
loading=
{
loading
}
>
Search
{
' '
}
Search
{
' '
}
</
Button
>
</
Button
>
<
Button
{
/*
<Button
htmlType="button"
htmlType="button"
onClick={onReset}
onClick={onReset}
style={{ marginLeft: '15px' }}
style={{ marginLeft: '15px' }}
...
@@ -177,7 +177,7 @@ const Contract = (props: any) => {
...
@@ -177,7 +177,7 @@ const Contract = (props: any) => {
>
>
{' '}
{' '}
Reset
Reset
</
Button
>
</Button>
*/
}
</
Form
.
Item
>
</
Form
.
Item
>
</
Form
>
</
Form
>
</
div
>
</
div
>
...
...
src/pages/ContractManagement/ContractContent.tsx
View file @
59f00b7a
...
@@ -388,11 +388,7 @@ const ContractContent = (props: any) => {
...
@@ -388,11 +388,7 @@ const ContractContent = (props: any) => {
>
>
<
div
className=
"contract_box"
>
<
div
className=
"contract_box"
>
<
div
className=
"list2"
>
<
div
className=
"list2"
>
<
Form
.
Item
<
Form
.
Item
name=
"contractNumber"
label=
"Contract Number"
rules=
{
tipList
[
0
]
}
>
name=
"contractNumber"
label=
"Contract Number"
rules=
{
[{
required
:
true
,
message
:
`${tipList[0]}`
}]
}
>
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Contract Number"
/>
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Contract Number"
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
...
@@ -408,11 +404,7 @@ const ContractContent = (props: any) => {
...
@@ -408,11 +404,7 @@ const ContractContent = (props: any) => {
</Form.Item>
</Form.Item>
</div> */
}
</div> */
}
<
div
className=
"item_1"
>
<
div
className=
"item_1"
>
<
Form
.
Item
<
Form
.
Item
name=
"contractPartyB"
label=
"Contract Party"
rules=
{
tipList
[
1
]
}
>
name=
"contractPartyB"
label=
"Contract Party"
rules=
{
[{
required
:
true
,
message
:
`${tipList[2]}`
}]
}
>
<
Input
style=
{
{
width
:
300
}
}
placeholder=
"Contract Party "
/>
<
Input
style=
{
{
width
:
300
}
}
placeholder=
"Contract Party "
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
...
@@ -424,7 +416,7 @@ const ContractContent = (props: any) => {
...
@@ -424,7 +416,7 @@ const ContractContent = (props: any) => {
labelAlign=
"right"
labelAlign=
"right"
name=
"communityName"
name=
"communityName"
label=
"Community Name"
label=
"Community Name"
rules=
{
[{
required
:
true
,
message
:
`${tipList[3]}`
}
]
}
rules=
{
tipList
[
3
]
}
>
>
<
SearchOptionsCommnity
<
SearchOptionsCommnity
defaultName=
{
DataSaveDetail
?
DataSaveDetail
.
communityName
:
null
}
defaultName=
{
DataSaveDetail
?
DataSaveDetail
.
communityName
:
null
}
...
@@ -440,7 +432,7 @@ const ContractContent = (props: any) => {
...
@@ -440,7 +432,7 @@ const ContractContent = (props: any) => {
labelAlign=
"right"
labelAlign=
"right"
name=
"contractTitle"
name=
"contractTitle"
label=
"Contract Title"
label=
"Contract Title"
rules=
{
[{
required
:
true
,
message
:
`${tipList[4]}`
}
]
}
rules=
{
tipList
[
4
]
}
>
>
<
Input
style=
{
{
width
:
500
}
}
placeholder=
"Contract Title"
/>
<
Input
style=
{
{
width
:
500
}
}
placeholder=
"Contract Title"
/>
</
Form
.
Item
>
</
Form
.
Item
>
...
@@ -448,12 +440,7 @@ const ContractContent = (props: any) => {
...
@@ -448,12 +440,7 @@ const ContractContent = (props: any) => {
{
/* 起止时间 */
}
{
/* 起止时间 */
}
<
div
className=
"list2"
>
<
div
className=
"list2"
>
<
Form
.
Item
<
Form
.
Item
name=
"time"
labelAlign=
"right"
label=
"Contract Time"
rules=
{
tipList
[
5
]
}
>
name=
"time"
labelAlign=
"right"
label=
"Contract Time"
rules=
{
[{
required
:
true
,
message
:
`${tipList[5]}`
}]
}
>
<
RangePicker
<
RangePicker
defaultValue=
{
DataSaveDetail
?
DataSaveDetail
.
time
:
null
}
defaultValue=
{
DataSaveDetail
?
DataSaveDetail
.
time
:
null
}
// disabledDate={disabledDate} // 时间限制
// disabledDate={disabledDate} // 时间限制
...
@@ -469,7 +456,7 @@ const ContractContent = (props: any) => {
...
@@ -469,7 +456,7 @@ const ContractContent = (props: any) => {
labelAlign=
"right"
labelAlign=
"right"
name=
"upload"
name=
"upload"
label=
"Contract Annex"
label=
"Contract Annex"
rules=
{
[{
required
:
true
,
message
:
`Please upload the attachment!`
}
]
}
rules=
{
tipList
[
6
]
}
>
>
<
Upload
<
Upload
{
...
uploadProps
}
{
...
uploadProps
}
...
@@ -488,7 +475,7 @@ const ContractContent = (props: any) => {
...
@@ -488,7 +475,7 @@ const ContractContent = (props: any) => {
<
div
className=
"list2"
>
<
div
className=
"list2"
>
<
div
className=
{
styles
.
box8item2x1
}
>
<
div
className=
{
styles
.
box8item2x1
}
>
<
Form
.
Item
<
Form
.
Item
rules=
{
[{
required
:
true
,
message
:
`${tipList[5]}`
}
]
}
rules=
{
tipList
[
7
]
}
label=
"Contract Remarks"
label=
"Contract Remarks"
name=
"contractRemindContent"
name=
"contractRemindContent"
style=
{
{
marginBottom
:
0
}
}
style=
{
{
marginBottom
:
0
}
}
...
@@ -519,9 +506,8 @@ const ContractContent = (props: any) => {
...
@@ -519,9 +506,8 @@ const ContractContent = (props: any) => {
{
/* <span style={{color:'#f00'}}> {stateTime}</span> */
}
{
/* <span style={{color:'#f00'}}> {stateTime}</span> */
}
</
div
>
</
div
>
</
div
>
</
div
>
<
LINE
/>
<
div
>
<
div
style=
{
{
marginLeft
:
150
}
}
>
<
LINE
/>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
>
<
Button
type=
"primary"
htmlType=
"submit"
loading=
{
loading
}
>
Submit
Submit
</
Button
>
</
Button
>
...
...
src/utils/tip.ts
View file @
59f00b7a
/*
/*
* @Author: your name
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2021-0
1-28 09:28:38
* @LastEditTime: 2021-0
2-01 17:31:42
* @LastEditors: Please set LastEditors
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\tip.ts
* @FilePath: \tostumi\src\utils\tip.ts
...
@@ -58,13 +58,13 @@ const reqMes = (msg: string) => {
...
@@ -58,13 +58,13 @@ const reqMes = (msg: string) => {
// 合同提示
// 合同提示
export
const
tipList
=
[
export
const
tipList
=
[
[
reqMes
(
'Please Input Contract Numbe!'
)],
[
reqMes
(
'Please Input Contract Numbe!'
)],
[
reqMes
(
'Please Input Contract Party
A
!'
)],
[
reqMes
(
'Please Input Contract Party!'
)],
[
reqMes
(
'Please Input Contract Party B!'
)],
[
reqMes
(
'Please Input Contract Party B!'
)],
[
reqMes
(
'Please Choice CommunityName!'
)],
[
reqMes
(
'Please Choice CommunityName!'
)],
[
reqMes
(
'Please Choice Contract Title!'
)],
[
reqMes
(
'Please Choice Contract Title!'
)],
[
reqMes
(
'Please Choice Contract Time!'
)],
[
reqMes
(
'Please Choice Contract Time!'
)],
[
reqMes
(
'Please upload Contract Annex!'
)],
[
reqMes
(
'Please upload Contract Annex!'
)],
//
[reqMes('Please Input Contract Remarks!')],
[
reqMes
(
'Please Input Contract Remarks!'
)],
];
];
// 小区提示
// 小区提示
...
@@ -108,12 +108,12 @@ export const BookingsTip = [
...
@@ -108,12 +108,12 @@ export const BookingsTip = [
[{
required
:
true
,
message
:
'Letters or numbers!'
,
validator
:
inputNumberStr
}],
[{
required
:
true
,
message
:
'Letters or numbers!'
,
validator
:
inputNumberStr
}],
[{
required
:
true
,
message
:
'Letters or numbers!'
,
validator
:
inputNumberStr
}],
[{
required
:
true
,
message
:
'Letters or numbers!'
,
validator
:
inputNumberStr
}],
[{
required
:
true
,
message
:
'Letters or numbers!'
,
validator
:
inputNumberStr
}],
[{
required
:
true
,
message
:
'Letters or numbers!'
,
validator
:
inputNumberStr
}],
[
reqMes
(
'Please
Select The D
ate'
)],
[
reqMes
(
'Please
choose the d
ate'
)],
];
];
// 账号新增编辑
// 账号新增编辑
export
const
AccountTip
=
[
export
const
AccountTip
=
[
[{
...
reqMes
(
'Please enter email address !'
),
type
:
'email'
}],
[{
...
reqMes
(
'Please enter email address !'
),
type
:
'email'
}],
[
reqMes
(
'
Required
'
)],
[
reqMes
(
'
Please enter the name !
'
)],
[
reqMes
(
'Please enter the correct
contact information
!'
)],
[
reqMes
(
'Please enter the correct
telephone
!'
)],
];
];
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