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
3708790d
Commit
3708790d
authored
Nov 12, 2020
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试各bug修复
Signed-off-by:
cellee
<
893264950@qq.com
>
parent
851262aa
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
263 additions
and
189 deletions
+263
-189
login.ts
src/models/login.ts
+1
-0
Adds.tsx
src/pages/CommunityManagement/CellList/Adds.tsx
+10
-2
Add.tsx
src/pages/CommunityManagement/CommunityAnnouncement/Add.tsx
+17
-15
CommunityAnnouncement.tsx
...anagement/CommunityAnnouncement/CommunityAnnouncement.tsx
+5
-5
Detail.tsx
...ages/CommunityManagement/CommunityAnnouncement/Detail.tsx
+3
-3
ann.less
src/pages/CommunityManagement/CommunityAnnouncement/ann.less
+22
-19
Bookings.tsx
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
+39
-9
Facility.tsx
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
+0
-4
Contract.tsx
src/pages/ContractManagement/Contract.tsx
+161
-126
ContractContent.tsx
src/pages/ContractManagement/ContractContent.tsx
+5
-6
No files found.
src/models/login.ts
View file @
3708790d
...
@@ -67,6 +67,7 @@ const Model: LoginModelType = {
...
@@ -67,6 +67,7 @@ const Model: LoginModelType = {
console
.
log
(
userMessage
);
console
.
log
(
userMessage
);
console
.
log
(
userMessage
.
token
);
console
.
log
(
userMessage
.
token
);
setCookie
(
'token'
,
userMessage
.
token
);
setCookie
(
'token'
,
userMessage
.
token
);
setCookie
(
'id'
,
userMessage
.
userModel
.
id
);
setCookie
(
'name'
,
userMessage
.
userModel
.
tosUserName
);
setCookie
(
'name'
,
userMessage
.
userModel
.
tosUserName
);
setCookie
(
'phone'
,
userMessage
.
userModel
.
tosUserPhone
);
setCookie
(
'phone'
,
userMessage
.
userModel
.
tosUserPhone
);
localStorage
.
setItem
(
'permission'
,
JSON
.
stringify
(
userMessage
.
permission
));
localStorage
.
setItem
(
'permission'
,
JSON
.
stringify
(
userMessage
.
permission
));
...
...
src/pages/CommunityManagement/CellList/Adds.tsx
View file @
3708790d
...
@@ -10,6 +10,7 @@ import { village } from '@/utils/tip';
...
@@ -10,6 +10,7 @@ import { village } from '@/utils/tip';
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
parseInt
}
from
'lodash'
;
import
{
parseInt
}
from
'lodash'
;
import
{
event
}
from
'@/.umi/plugin-locale/locale'
;
const
{
RangePicker
}
=
TimePicker
;
const
{
RangePicker
}
=
TimePicker
;
...
@@ -204,6 +205,7 @@ const Adds = (props: any) => {
...
@@ -204,6 +205,7 @@ const Adds = (props: any) => {
// 表单验证
// 表单验证
const
onFinish
=
(
values
:
any
)
=>
{
const
onFinish
=
(
values
:
any
)
=>
{
let
{
residentialZipCode
,
residentialAddress
,
residentialName
}
=
values
.
des
;
let
{
residentialZipCode
,
residentialAddress
,
residentialName
}
=
values
.
des
;
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
{
}
else
{
...
@@ -280,6 +282,11 @@ const Adds = (props: any) => {
...
@@ -280,6 +282,11 @@ const Adds = (props: any) => {
return
value
;
return
value
;
}
}
// 键盘回车事件
const
onKeyDowns
=
(
event
:
any
)
=>
{
console
.
log
(
event
);
};
return
(
return
(
<>
<>
<
Spin
spinning=
{
loading
}
tip=
"信息提交中..."
size=
"large"
>
<
Spin
spinning=
{
loading
}
tip=
"信息提交中..."
size=
"large"
>
...
@@ -295,6 +302,7 @@ const Adds = (props: any) => {
...
@@ -295,6 +302,7 @@ const Adds = (props: any) => {
</
div
>
</
div
>
</
h3
>
</
h3
>
<
Form
<
Form
onKeyDown=
{
onKeyDowns
}
name=
"basic"
name=
"basic"
form=
{
form
}
form=
{
form
}
onFinish=
{
onFinish
}
onFinish=
{
onFinish
}
...
@@ -466,9 +474,9 @@ const Adds = (props: any) => {
...
@@ -466,9 +474,9 @@ const Adds = (props: any) => {
// export default Adds;
// export default Adds;
function
map
(
state
:
any
)
{
function
map
(
state
:
any
)
{
console
.
log
(
state
);
//
console.log(state);
const
Data
=
state
.
CellList
.
DataSave
;
const
Data
=
state
.
CellList
.
DataSave
;
const
loading
=
state
.
loading
.
models
.
CellList
;
const
loading
=
state
.
loading
.
models
.
CellList
?
state
.
loading
.
models
.
CellList
:
false
;
const
{
Result
}
=
state
.
CellList
;
const
{
Result
}
=
state
.
CellList
;
return
{
Data
,
loading
,
Result
};
return
{
Data
,
loading
,
Result
};
}
}
...
...
src/pages/CommunityManagement/CommunityAnnouncement/Add.tsx
View file @
3708790d
...
@@ -20,25 +20,30 @@ import { getCookie } from '@/utils/method';
...
@@ -20,25 +20,30 @@ import { getCookie } from '@/utils/method';
import
moment
from
'moment'
;
import
moment
from
'moment'
;
const
module
=
'CommunityAnnouncement'
;
const
module
=
'CommunityAnnouncement'
;
const
Add
=
(
props
:
any
)
=>
{
const
Add
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Result
,
loading
,
DataSave
,
ImgSrc
}
=
props
;
const
{
dispatch
,
Result
,
loading
,
DataSave
,
ImgSrc
}
=
props
;
const
formRef
=
useRef
(
null
);
const
formRef
=
useRef
(
null
);
const
[
form
]
=
Form
.
useForm
();
const
[
form
]
=
Form
.
useForm
();
// 图片地址
const
[
ImageSrc
,
setImageSrc
]
=
useState
([]
as
any
);
console
.
log
(
ImgSrc
);
console
.
log
(
ImgSrc
);
// 监听传递过来的值
// 监听传递过来的值
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
DataSave
!=
null
)
{
if
(
DataSave
!=
null
)
{
// let tim = DataSave.noticStartTime.time;
let
day
=
moment
(
DataSave
.
noticStartTime
.
time
);
let
day2
=
DataSave
.
noticEndTime
?
moment
(
DataSave
.
noticEndTime
.
time
)
:
null
;
// 赋值
// 赋值
form
.
setFieldsValue
({
form
.
setFieldsValue
({
noticTitle
:
DataSave
.
noticTitlel
,
noticTitle
:
DataSave
.
noticTitlel
,
noticText
:
DataSave
.
noticText
,
noticText
:
DataSave
.
noticText
,
// noticStartTime: moment(tim).format('YYYY-MM-DD')
,
noticStartTime
:
day
,
// noticEndTime:DataSave.noticEndTime?moment(DataSave.noticEndTime, 'YYYY-MM-DD HH:mm:ss'):''
,
noticEndTime
:
day2
,
});
});
// 发起请求图片
// 发起请求图片
let
msg
=
{
let
msg
=
{
type
:
'tosCommunityNoticePreview'
,
type
:
'tosCommunityNoticePreview'
,
...
@@ -48,9 +53,6 @@ const Add = (props: any) => {
...
@@ -48,9 +53,6 @@ const Add = (props: any) => {
}
}
},
[
DataSave
]);
},
[
DataSave
]);
// 图片地址
const
[
ImageSrc
,
setImageSrc
]
=
useState
([]
as
any
);
// 监听图片状态 ImgSrc
// 监听图片状态 ImgSrc
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
ImgSrc
!=
null
)
{
if
(
ImgSrc
!=
null
)
{
...
@@ -151,7 +153,9 @@ const Add = (props: any) => {
...
@@ -151,7 +153,9 @@ const Add = (props: any) => {
rules=
{
Notice
[
2
]
}
rules=
{
Notice
[
2
]
}
>
>
<
TextArea
<
TextArea
style=
{
{
width
:
400
,
height
:
100
}
}
style=
{
{
height
:
100
,
maxWidth
:
600
}
}
maxLength=
{
1000
}
showCount=
{
true
}
placeholder=
"Please input the announcement content"
placeholder=
"Please input the announcement content"
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
...
@@ -162,7 +166,7 @@ const Add = (props: any) => {
...
@@ -162,7 +166,7 @@ const Add = (props: any) => {
data=
{
{
data=
{
{
imageType
:
'tosNotice'
,
imageType
:
'tosNotice'
,
}
}
}
}
limitNums=
{
1
}
limitNums=
{
5
}
defaultValue=
{
ImageSrc
}
defaultValue=
{
ImageSrc
}
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
...
@@ -179,11 +183,7 @@ const Add = (props: any) => {
...
@@ -179,11 +183,7 @@ const Add = (props: any) => {
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
name=
"noticEndTime"
className=
"diyItem"
label=
"Expiration Date"
rules=
{
[]
}
>
<
Form
.
Item
name=
"noticEndTime"
className=
"diyItem"
label=
"Expiration Date"
rules=
{
[]
}
>
<
DatePicker
<
DatePicker
style=
{
{
width
:
200
}
}
placeholder=
"Expiration Dates"
/>
style=
{
{
width
:
200
}
}
placeholder=
"Expiration Dates"
disabledDate=
{
disabledDate
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
hr
/>
<
hr
/>
<
Form
.
Item
style=
{
{
marginBottom
:
5
}
}
className=
"diyItem"
label=
" "
colon=
{
false
}
>
<
Form
.
Item
style=
{
{
marginBottom
:
5
}
}
className=
"diyItem"
label=
" "
colon=
{
false
}
>
...
@@ -200,7 +200,9 @@ const Add = (props: any) => {
...
@@ -200,7 +200,9 @@ const Add = (props: any) => {
function
map
(
state
:
any
)
{
function
map
(
state
:
any
)
{
const
{
Result
,
DataSave
,
ImgSrc
}
=
state
[
module
];
const
{
Result
,
DataSave
,
ImgSrc
}
=
state
[
module
];
const
loading
=
state
.
loading
.
models
.
CommunityAnnouncement
;
const
loading
=
state
.
loading
.
models
.
CommunityAnnouncement
?
state
.
loading
.
models
.
CommunityAnnouncement
:
false
;
return
{
Result
,
loading
,
DataSave
,
ImgSrc
};
return
{
Result
,
loading
,
DataSave
,
ImgSrc
};
}
}
export
default
connect
(
map
)(
Add
);
export
default
connect
(
map
)(
Add
);
src/pages/CommunityManagement/CommunityAnnouncement/CommunityAnnouncement.tsx
View file @
3708790d
...
@@ -65,18 +65,18 @@ const CommunityAnnouncement = (props: any) => {
...
@@ -65,18 +65,18 @@ const CommunityAnnouncement = (props: any) => {
),
),
},
},
{
{
title
:
'
NoticScope
'
,
title
:
'
Status
'
,
dataIndex
:
'noticStatus'
,
dataIndex
:
'noticStatus'
,
render
:
function
(
text
:
any
)
{
render
:
function
(
text
:
any
)
{
switch
(
text
)
{
switch
(
text
)
{
case
1
:
case
1
:
return
<
Tag
color=
"green"
>
Publishing
</
Tag
>;
// 发布中
return
<
Tag
color=
"green"
>
Take Effect
</
Tag
>;
// 发布中
break
;
break
;
case
2
:
case
2
:
return
<
Tag
color=
"red"
>
Expire
d
</
Tag
>;
// 已过期
return
<
Tag
color=
"red"
>
Invali
d
</
Tag
>;
// 已过期
break
;
break
;
default
:
default
:
return
<
Tag
color=
"cyan"
>
Waiting
for r
elease
</
Tag
>;
// 等待发布
return
<
Tag
color=
"cyan"
>
Waiting
For R
elease
</
Tag
>;
// 等待发布
break
;
break
;
}
}
},
},
...
@@ -84,7 +84,7 @@ const CommunityAnnouncement = (props: any) => {
...
@@ -84,7 +84,7 @@ const CommunityAnnouncement = (props: any) => {
{
{
title
:
'Actions'
,
title
:
'Actions'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
<
Space
size=
{
0
}
>
<
Button
<
Button
type=
"link"
type=
"link"
onClick=
{
()
=>
{
onClick=
{
()
=>
{
...
...
src/pages/CommunityManagement/CommunityAnnouncement/Detail.tsx
View file @
3708790d
...
@@ -48,14 +48,14 @@ const Detail = (props: any) => {
...
@@ -48,14 +48,14 @@ const Detail = (props: any) => {
function
hanFunStart
(
start
:
any
)
{
function
hanFunStart
(
start
:
any
)
{
switch
(
start
)
{
switch
(
start
)
{
case
1
:
case
1
:
return
<
Badge
status=
"success"
text=
"
Publishing
"
/>;
return
<
Badge
status=
"success"
text=
"
Take effect
"
/>;
// <Tag color="green">Publishing</Tag>; // 发布中
// <Tag color="green">Publishing</Tag>; // 发布中
break
;
break
;
case
2
:
case
2
:
return
<
Badge
status=
"error"
text=
"
Expire
d"
/>;
// 已过期
return
<
Badge
status=
"error"
text=
"
Invali
d"
/>;
// 已过期
break
;
break
;
default
:
default
:
return
<
Badge
status=
"processing"
text=
"Waiting
for r
elease"
/>;
// 等待发布
return
<
Badge
status=
"processing"
text=
"Waiting
For R
elease"
/>;
// 等待发布
break
;
break
;
}
}
}
}
...
...
src/pages/CommunityManagement/CommunityAnnouncement/ann.less
View file @
3708790d
...
@@ -7,51 +7,54 @@
...
@@ -7,51 +7,54 @@
.ant-form-item-label {
.ant-form-item-label {
label {
label {
min-width
: 120px;
min-width: 120px;
text-align: right;
text-align: right;
}
}
}
}
}
}
hr {
hr {
border
: 0;
border: 0;
height
: 1px;
height: 1px;
background
: #eee;
background: #eee;
margin-bottom: 20px;
margin-bottom: 20px;
}
}
// bianji
// bianji
.form {
.form {
padding
: 20px;
padding: 20px;
border
: 1px solid #efefef;
border: 1px solid #efefef;
border-radius: 3px;
border-radius: 3px;
background
: #fff;
background: #fff;
box-shadow
: 0 1px 1px #ccc;
box-shadow: 0 1px 1px #ccc;
h3 {
h3 {
margin-bottom: 30px;
margin-bottom: 30px;
position
: relative;
position: relative;
line-height
: 35px;
line-height: 35px;
.back {
.back {
position
: absolute;
position: absolute;
right
: 0;
right: 0;
top
: 0;
top: 0;
margin-bottom: 20px;
margin-bottom: 20px;
background
: #fff;
background: #fff;
}
}
}
}
.famg {
.famg {
display
: flex;
display: flex;
justify-content: center;
justify-content: center;
align-items
: center;
align-items: center;
div{
div
{
padding:10% 0;
padding:
10% 0;
}
}
span {
span {
margin: 10px auto;
margin: 10px auto;
}
}
}
}
}
.ant-form-item textarea.ant-input {
height: 100%;
}
}
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
View file @
3708790d
...
@@ -30,8 +30,9 @@ import { validateMessages } from '@/utils/params';
...
@@ -30,8 +30,9 @@ import { validateMessages } from '@/utils/params';
// 日期
// 日期
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
{
BookingsTip
}
from
'@/utils/tip'
;
import
{
BookingsTip
}
from
'@/utils/tip'
;
// 自定义时间段
import
OnTime
from
'@/components/OnTime/OnTime'
;
import
OnTime
from
'@/components/OnTime/OnTime'
;
import
{
getNumber
}
from
'@/utils/string'
;
// 正则
const
Bookings
=
(
props
:
any
)
=>
{
const
Bookings
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data3
,
Result
,
DataSave
,
token
,
load
,
resultTime
}
=
props
;
const
{
dispatch
,
Data3
,
Result
,
DataSave
,
token
,
load
,
resultTime
}
=
props
;
...
@@ -57,7 +58,8 @@ const Bookings = (props: any) => {
...
@@ -57,7 +58,8 @@ const Bookings = (props: any) => {
categoriesOpenTime
:
null
,
categoriesOpenTime
:
null
,
}
as
any
);
}
as
any
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
formRef
=
useRef
(
null
);
const
formRef
=
useRef
(
null
as
any
);
const
[
prohibit
,
setProhibit
]
=
useState
(
true
);
// 输入框是否不可选
const
[
prohibit
,
setProhibit
]
=
useState
(
true
);
// 输入框是否不可选
const
[
result
,
setResultTime
]
=
useState
(
resultTime
);
// 已预约时间段
const
[
result
,
setResultTime
]
=
useState
(
resultTime
);
// 已预约时间段
...
@@ -132,14 +134,17 @@ const Bookings = (props: any) => {
...
@@ -132,14 +134,17 @@ const Bookings = (props: any) => {
// 保存提交
// 保存提交
const
onFinish
=
(
value
:
any
)
=>
{
const
onFinish
=
(
value
:
any
)
=>
{
console
.
log
(
'Success:'
);
var
tmp
=
value
;
var
tmp
=
value
;
console
.
log
(
value
);
// 判断时间选择
// 判断时间选择
if
(
soltTime
.
length
<
2
||
!
soltTime
[
0
])
{
if
(
soltTime
.
length
<
2
||
!
soltTime
[
0
])
{
message
.
error
(
'Please Fill In The Appointment Period!'
);
message
.
error
(
'Please Fill In The Appointment Period!'
);
return
false
;
}
// 手机判断
if
(
tmp
.
accountPhone
.
length
!=
11
&&
tmp
.
accountPhone
.
length
!=
8
)
{
message
.
error
(
'Please Fill In The Contact Information Correctly!'
);
return
false
;
}
}
// tmp.categoriesId = null
// tmp.categoriesId = null
// tmp.facilitiesId = null
// tmp.facilitiesId = null
// tmp.communityName = null
// tmp.communityName = null
...
@@ -179,7 +184,7 @@ const Bookings = (props: any) => {
...
@@ -179,7 +184,7 @@ const Bookings = (props: any) => {
// console.log(comminityValues)
// console.log(comminityValues)
// console.log(tmp)
// console.log(tmp)
};
};
// 选择
// 选择
设施
const
RadioChoose
=
(
e
:
any
)
=>
{
const
RadioChoose
=
(
e
:
any
)
=>
{
Data3
.
map
((
item
:
any
,
index
:
any
)
=>
{
Data3
.
map
((
item
:
any
,
index
:
any
)
=>
{
item
.
categorieList
.
map
((
thing
:
any
,
i
:
any
)
=>
{
item
.
categorieList
.
map
((
thing
:
any
,
i
:
any
)
=>
{
...
@@ -196,7 +201,7 @@ const Bookings = (props: any) => {
...
@@ -196,7 +201,7 @@ const Bookings = (props: any) => {
// 选择后取消输入框禁止
// 选择后取消输入框禁止
setProhibit
(
false
);
setProhibit
(
false
);
// 赋值给延后天数
// 赋值给延后天数
setBookTime
(
-
thing
.
pageSize
);
setBookTime
(
-
item
.
canReservationDay
+
1
);
// console.log(item.communityManagerFee)
// console.log(item.communityManagerFee)
// console.log(item.communityMargin)
// console.log(item.communityMargin)
}
}
...
@@ -217,6 +222,7 @@ const Bookings = (props: any) => {
...
@@ -217,6 +222,7 @@ const Bookings = (props: any) => {
setProhibit
(
true
);
setProhibit
(
true
);
setResultTime
(
null
);
setResultTime
(
null
);
setSoltTime
([]);
setSoltTime
([]);
// formRef.current.resetFields({ accountName: null }); // 清空已填写的表单
};
};
// 设置之前时间不能选择
// 设置之前时间不能选择
...
@@ -249,6 +255,16 @@ const Bookings = (props: any) => {
...
@@ -249,6 +255,16 @@ const Bookings = (props: any) => {
setSoltTime
(
s
);
setSoltTime
(
s
);
};
};
// 正则手机号
const
keyup_tool
=
(
value
:
any
)
=>
{
return
getNumber
(
value
.
replace
(
/
[^\d
^
\.]
+/g
,
''
));
};
// 手机号
const
keyup_communityManagerFee
=
(
e
:
any
)
=>
{
e
.
target
.
value
=
keyup_tool
(
e
.
target
.
value
);
};
return
(
return
(
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件v1.2 */
}
{
/* 头部组件v1.2 */
}
...
@@ -313,6 +329,8 @@ const Bookings = (props: any) => {
...
@@ -313,6 +329,8 @@ const Bookings = (props: any) => {
style=
{
{
width
:
200
}
}
style=
{
{
width
:
200
}
}
placeholder=
"Contact Information"
placeholder=
"Contact Information"
disabled=
{
prohibit
}
disabled=
{
prohibit
}
onKeyUp=
{
keyup_communityManagerFee
}
maxLength=
{
11
}
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
...
@@ -322,11 +340,23 @@ const Bookings = (props: any) => {
...
@@ -322,11 +340,23 @@ const Bookings = (props: any) => {
<
div
className=
{
styles
.
box4item1
}
>
Unit :
</
div
>
<
div
className=
{
styles
.
box4item1
}
>
Unit :
</
div
>
<
div
className=
"divbox4"
>
<
div
className=
"divbox4"
>
<
Form
.
Item
name=
"buildNumber"
rules=
{
BookingsTip
[
2
]
}
>
<
Form
.
Item
name=
"buildNumber"
rules=
{
BookingsTip
[
2
]
}
>
<
Input
placeholder=
"Blk"
style=
{
{
width
:
80
}
}
disabled=
{
prohibit
}
/>
<
Input
placeholder=
"Blk"
style=
{
{
width
:
80
}
}
disabled=
{
prohibit
}
onKeyUp=
{
keyup_communityManagerFee
}
maxLength=
{
10
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
span
className=
"jio"
>
#
</
span
>
<
span
className=
"jio"
>
#
</
span
>
<
Form
.
Item
name=
"floorNumber"
rules=
{
BookingsTip
[
3
]
}
>
<
Form
.
Item
name=
"floorNumber"
rules=
{
BookingsTip
[
3
]
}
>
<
Input
placeholder=
"Floor"
style=
{
{
width
:
80
}
}
disabled=
{
prohibit
}
/>
<
Input
placeholder=
"Floor"
style=
{
{
width
:
80
}
}
disabled=
{
prohibit
}
onKeyUp=
{
keyup_communityManagerFee
}
maxLength=
{
10
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
span
className=
"heng"
>
--
</
span
>
<
span
className=
"heng"
>
--
</
span
>
<
Form
.
Item
name=
"roomNumber"
rules=
{
BookingsTip
[
4
]
}
>
<
Form
.
Item
name=
"roomNumber"
rules=
{
BookingsTip
[
4
]
}
>
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
3708790d
...
@@ -59,10 +59,6 @@ const Facility = (props: any) => {
...
@@ -59,10 +59,6 @@ const Facility = (props: any) => {
const
openCheck
=
true
;
const
openCheck
=
true
;
const
[
Ref3
,
setRef3
]
=
useState
([]);
const
[
extend
,
setExtend
]
=
useState
(
null
);
// 小区名称
const
[
timeExtend
,
setTimeExtend
]
=
useState
(
null
);
const
[
pictrueExtend
,
setPictrueExtend
]
=
useState
({
pic
:
null
,
pics
:
null
,
tab
:
3
});
const
[
pictrueExtend
,
setPictrueExtend
]
=
useState
({
pic
:
null
,
pics
:
null
,
tab
:
3
});
const
[
facilityDetail
,
setFacilityDetail
]
=
useState
(
false
);
const
[
facilityDetail
,
setFacilityDetail
]
=
useState
(
false
);
const
[
PATHNAME
,
setPATHNAME
]
=
useState
(
''
);
const
[
PATHNAME
,
setPATHNAME
]
=
useState
(
''
);
...
...
src/pages/ContractManagement/Contract.tsx
View file @
3708790d
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
React
,
{
useState
,
useEffect
}
from
'react'
;
import
{
Space
,
Button
,
message
,
Pagination
,
Form
,
Input
}
from
'antd'
;
import
{
Space
,
Button
,
message
,
Pagination
,
Form
,
Input
,
Tooltip
}
from
'antd'
;
import
{
connect
,
history
,
Loading
}
from
'umi'
;
import
{
connect
,
history
,
Loading
}
from
'umi'
;
import
{
PlusOutlined
,
SearchOutlined
,
ClearOutlined
}
from
'@ant-design/icons'
;
import
{
PlusOutlined
,
SearchOutlined
,
ClearOutlined
}
from
'@ant-design/icons'
;
import
ProTable
from
'@ant-design/pro-table'
;
import
ProTable
from
'@ant-design/pro-table'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
styles
from
'./ContractContent.less'
;
import
styles
from
'./ContractContent.less'
;
...
@@ -10,59 +10,67 @@ import { RA } from '@/services/tos';
...
@@ -10,59 +10,67 @@ import { RA } from '@/services/tos';
import
SearchOptionsCommnity
from
'@/components/SearchOptions/SearchOptionsCommnity'
;
import
SearchOptionsCommnity
from
'@/components/SearchOptions/SearchOptionsCommnity'
;
const
Contract
=
(
props
:
any
)
=>
{
const
Contract
=
(
props
:
any
)
=>
{
const
{
location
,
dispatch
,
ContractModel
,
userListLoading
}
=
props
;
const
{
location
,
dispatch
,
ContractModel
,
userListLoading
}
=
props
;
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'Contract/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
})
};
dispatch
({
type
:
'Contract/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
});
};
console
.
log
(
userListLoading
)
console
.
log
(
userListLoading
)
;
// 把请求装在一个地方
// 把请求装在一个地方
function
requst
(
payload
:
any
)
{
function
requst
(
payload
:
any
)
{
dispatch
({
type
:
'ContractModel/getList'
,
payload
:
payload
})
dispatch
({
type
:
'ContractModel/getList'
,
payload
:
payload
});
}
}
// 数据
// 数据
useEffect
(()
=>
{
useEffect
(()
=>
{
let
payload
=
{
let
payload
=
{
index
:
19
,
index
:
19
,
page
:{
page
:
{
pageNum
:
ContractModel
.
page
pageNum
:
ContractModel
.
page
,
}
}
,
}
}
;
requst
(
payload
);
requst
(
payload
);
},[
1
])
//页面进来执行一次
},
[
1
]);
//页面进来执行一次
// 跳转
// 跳转
const
Jump
=
(
record
:
any
,
Jump
:
String
)
=>
{
const
Jump
=
(
record
:
any
,
Jump
:
String
)
=>
{
console
.
log
(
record
)
console
.
log
(
record
)
;
console
.
log
(
Jump
)
console
.
log
(
Jump
)
;
dispatch
({
dispatch
({
type
:
'ContractModel/getMove'
,
type
:
'ContractModel/getMove'
,
payload
:
{
payload
:
{
type
:
Jump
,
type
:
Jump
,
record
:
record
,
record
:
record
,
},
},
});
});
// if(record == 0){
// if(record == 0){
// history.push(location.pathname + '/' + Jump)
// history.push(location.pathname + '/' + Jump)
// }
// }
// console.log(location.pathname + '/' + Jump)
// console.log(location.pathname + '/' + Jump)
history
.
push
(
location
.
pathname
+
'/'
+
Jump
)
history
.
push
(
location
.
pathname
+
'/'
+
Jump
)
;
}
}
;
// 表头
// 表头
const
columns
=
[
const
columns
=
[
{
{
title
:
"Contract Number"
,
title
:
'Contract Number'
,
render
:
function
(
record
:
any
)
{
render
:
function
(
record
:
any
)
{
let
mom
=
moment
(
record
.
contractValidEndDate
).
diff
(
moment
(),
'day'
);
let
mom
=
moment
(
record
.
contractValidEndDate
).
diff
(
moment
(),
'day'
);
return
<
span
className=
{
mom
<
30
?
styles
.
red
:
''
}
>
{
record
.
contractNumber
}
</
span
>
if
(
mom
<
30
)
{
return
(
<
Tooltip
title=
"Due Soon"
placement=
"right"
color=
{
'red'
}
key=
{
record
.
id
}
>
<
span
className=
{
styles
.
red
}
>
{
record
.
contractNumber
}
</
span
>
</
Tooltip
>
);
}
else
{
return
<
span
>
{
record
.
contractNumber
}
</
span
>;
}
}
},
},
// 合同编号
},
// 合同编号
{
{
title
:
"Company"
,
title
:
'Company'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<>
<>
<
div
>
<
div
>
<
span
>
Party A :
{
record
.
contractPartyA
}
</
span
>
<
span
>
Party A :
{
record
.
contractPartyA
}
</
span
>
...
@@ -71,101 +79,110 @@ const Contract = (props:any) => {
...
@@ -71,101 +79,110 @@ const Contract = (props:any) => {
<
span
>
Party B :
{
record
.
contractPartyB
}
</
span
>
<
span
>
Party B :
{
record
.
contractPartyB
}
</
span
>
</
div
>
</
div
>
</>
</>
)
)
,
},
//合同方
},
//合同方
{
title
:
"Contract Title"
,
dataIndex
:
'contractTitle'
},
// 合同标题
{
title
:
'Contract Title'
,
dataIndex
:
'contractTitle'
},
// 合同标题
{
title
:
"Community Name"
,
dataIndex
:
'communityName'
},
// 小区名
{
title
:
'Community Name'
,
dataIndex
:
'communityName'
},
// 小区名
{
title
:
"Contacts"
,
dataIndex
:
'communityAccount'
},
// 联系人
{
title
:
'Contacts'
,
dataIndex
:
'communityAccount'
},
// 联系人
{
title
:
"Phone"
,
dataIndex
:
'communityPhone'
},
// 联系电话
{
title
:
'Phone'
,
dataIndex
:
'communityPhone'
},
// 联系电话
{
title
:
"Valid Start Date"
,
dataIndex
:
'contractValidStartDate'
},
// 生效时间
{
title
:
'Valid Start Date'
,
dataIndex
:
'contractValidStartDate'
},
// 生效时间
{
title
:
"Valid End Date"
,
dataIndex
:
'contractValidEndDate'
},
// 到期时间
{
title
:
'Valid End Date'
,
dataIndex
:
'contractValidEndDate'
},
// 到期时间
// { title: "Contract File", dataIndex: 'contractFileName' }, // 附件
// { title: "Contract File", dataIndex: 'contractFileName' }, // 附件
{
{
title
:
"Actions"
,
title
:
'Actions'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
<
Space
size=
"middle"
>
<
a
onClick=
{
()
=>
{
Jump
(
record
,
'Edit'
)}
}
>
Edit
</
a
>
<
a
<
a
onClick=
{
()
=>
{
Jump
(
record
,
'Detail'
)}
}
>
Detail
</
a
>
onClick=
{
()
=>
{
Jump
(
record
,
'Edit'
);
}
}
>
Edit
</
a
>
<
a
onClick=
{
()
=>
{
Jump
(
record
,
'Detail'
);
}
}
>
Detail
</
a
>
</
Space
>
</
Space
>
),
),
},
// 操作
},
// 操作
];
];
// 页面切换
// 页面切换
const
paginationHandler
=
(
page
:
number
,
pageSize
?:
number
)
=>
{
const
paginationHandler
=
(
page
:
number
,
pageSize
?:
number
)
=>
{
dispatch
({
dispatch
({
type
:
'ContractModel/getList'
,
type
:
'ContractModel/getList'
,
payload
:
{
payload
:
{
index
:
19
,
index
:
19
,
page
:{
page
:
{
pageNum
:
page
,
pageNum
:
page
,
}
}
,
},
},
});
});
}
}
;
// 刷新
// 刷新
const
resetHandler
=
()
=>
{
const
resetHandler
=
()
=>
{
dispatch
({
dispatch
({
type
:
'ContractModel/getList'
,
type
:
'ContractModel/getList'
,
payload
:
{
payload
:
{
index
:
19
,
index
:
19
,
page
:{
page
:
{
pageNum
:
ContractModel
.
page
,
pageNum
:
ContractModel
.
page
,
}
}
,
},
},
});
});
};
};
// 表单标识
// 表单标识
const
[
form
]
=
Form
.
useForm
()
const
[
form
]
=
Form
.
useForm
()
;
// 重置
// 重置
const
onReset
=
()
=>
{
const
onReset
=
()
=>
{
form
.
resetFields
();
form
.
resetFields
();
let
payload
=
{
let
payload
=
{
index
:
19
,
index
:
19
,
page
:{
page
:
{
pageNum
:
1
pageNum
:
1
,
}
}
,
}
}
;
requst
(
payload
);
requst
(
payload
);
};
};
// 表单提交
// 表单提交
const
onFinishContract
=
(
value
:
any
)
=>
{
const
onFinishContract
=
(
value
:
any
)
=>
{
// console.log(value)
// console.log(value)
if
(
!
value
.
communityName
&&!
value
.
contractNumber
&&!
value
.
contractTitle
)
{
if
(
!
value
.
communityName
&&
!
value
.
contractNumber
&&
!
value
.
contractTitle
)
{
message
.
error
(
'Please enter one of them!'
)
message
.
error
(
'Please enter one of them!'
)
;
}
else
{
}
else
{
console
.
log
(
value
)
console
.
log
(
value
)
;
let
payload
=
{
let
payload
=
{
index
:
19
,
index
:
19
,
page
:{
page
:
{
pageNum
:
1
,
pageNum
:
1
,
contractNumber
:
value
.
contractNumber
,
contractNumber
:
value
.
contractNumber
,
contractTitle
:
value
.
contractTitle
,
contractTitle
:
value
.
contractTitle
,
communityName
:
value
.
communityName
communityName
:
value
.
communityName
,
}
}
,
}
}
;
requst
(
payload
);
requst
(
payload
);
}
}
}
}
;
// 选择小区名字并赋值
// 选择小区名字并赋值
const
opname
=
(
value
:
any
)
=>
{
const
opname
=
(
value
:
any
)
=>
{
form
.
setFieldsValue
({
form
.
setFieldsValue
({
'communityName'
:
value
communityName
:
value
,
})
})
;
}
}
;
return
(
return
(
<>
<>
<
div
className=
{
styles
.
contop
}
>
<
div
className=
{
styles
.
contop
}
>
<
Form
<
Form
autoComplete=
"off"
autoComplete=
"off"
layout=
"inline"
layout=
"inline"
form=
{
form
}
form=
{
form
}
name=
"contract"
name=
"contract"
...
@@ -174,17 +191,34 @@ const Contract = (props:any) => {
...
@@ -174,17 +191,34 @@ const Contract = (props:any) => {
<
Form
.
Item
name=
"communityName"
>
<
Form
.
Item
name=
"communityName"
>
<
SearchOptionsCommnity
<
SearchOptionsCommnity
// ubmit={extendName}
// ubmit={extendName}
opname=
{
opname
}
/>
opname=
{
opname
}
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
name=
"contractNumber"
>
<
Form
.
Item
name=
"contractNumber"
>
<
Input
allowClear
placeholder=
'Contract Number'
/>
<
Input
allowClear
placeholder=
"Contract Number"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
name=
"contractTitle"
>
<
Form
.
Item
name=
"contractTitle"
>
<
Input
allowClear
placeholder=
'Contract Title'
/>
<
Input
allowClear
placeholder=
"Contract Title"
/>
</
Form
.
Item
>
</
Form
.
Item
>
<
Form
.
Item
>
<
Form
.
Item
>
<
Button
type=
"primary"
htmlType=
"submit"
icon=
{
<
SearchOutlined
/>
}
loading=
{
userListLoading
}
>
Search
</
Button
>
<
Button
<
Button
htmlType=
"button"
onClick=
{
onReset
}
style=
{
{
marginLeft
:
'15px'
}
}
icon=
{
<
ClearOutlined
/>
}
loading=
{
userListLoading
}
>
Reset
</
Button
>
type=
"primary"
htmlType=
"submit"
icon=
{
<
SearchOutlined
/>
}
loading=
{
userListLoading
}
>
Search
{
' '
}
</
Button
>
<
Button
htmlType=
"button"
onClick=
{
onReset
}
style=
{
{
marginLeft
:
'15px'
}
}
icon=
{
<
ClearOutlined
/>
}
loading=
{
userListLoading
}
>
{
' '
}
Reset
</
Button
>
</
Form
.
Item
>
</
Form
.
Item
>
</
Form
>
</
Form
>
</
div
>
</
div
>
...
@@ -192,15 +226,22 @@ const Contract = (props:any) => {
...
@@ -192,15 +226,22 @@ const Contract = (props:any) => {
<
div
className=
{
styles
.
listbox
}
>
<
div
className=
{
styles
.
listbox
}
>
<
ProTable
<
ProTable
// request={requestHeadl}
// request={requestHeadl}
rowKey=
{
"id"
}
rowKey=
{
'id'
}
dataSource=
{
ContractModel
.
list
}
dataSource=
{
ContractModel
.
list
}
columns=
{
columns
}
columns=
{
columns
}
pagination=
{
false
}
// 隐藏默认分页
pagination=
{
false
}
// 隐藏默认分页
search=
{
false
}
search=
{
false
}
loading=
{
userListLoading
}
loading=
{
userListLoading
}
toolBarRender=
{
()
=>
[
toolBarRender=
{
()
=>
[
<
Button
key=
"3"
type=
"primary"
onClick=
{
()
=>
{
Jump
(
0
,
'Add'
)}
}
>
<
Button
<
PlusOutlined
/>
Add Contract
key=
"3"
type=
"primary"
onClick=
{
()
=>
{
Jump
(
0
,
'Add'
);
}
}
>
<
PlusOutlined
/>
Add Contract
</
Button
>,
</
Button
>,
]
}
]
}
options=
{
{
options=
{
{
...
@@ -230,14 +271,8 @@ const Contract = (props:any) => {
...
@@ -230,14 +271,8 @@ const Contract = (props:any) => {
);
);
};
};
const
mapStateToProps
=
({
const
mapStateToProps
=
({
ContractModel
,
loading
}:
{
ContractModel
:
any
;
loading
:
Loading
})
=>
{
ContractModel
,
console
.
log
(
loading
);
loading
,
}:
{
ContractModel
:
any
;
loading
:
Loading
;
})
=>
{
console
.
log
(
loading
)
return
{
return
{
ContractModel
,
ContractModel
,
userListLoading
:
loading
.
models
.
ContractModel
,
userListLoading
:
loading
.
models
.
ContractModel
,
...
...
src/pages/ContractManagement/ContractContent.tsx
View file @
3708790d
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./ContractContent.less'
;
import
styles
from
'./ContractContent.less'
;
import
{
Input
,
Form
,
message
,
Upload
,
Button
,
DatePicker
,
Space
}
from
'antd'
;
import
{
Input
,
Form
,
message
,
Upload
,
Button
,
DatePicker
,
Space
}
from
'antd'
;
import
{
Upload
Outlined
,
LeftOutlined
}
from
'@ant-design/icons'
;
import
{
Plus
Outlined
,
LeftOutlined
}
from
'@ant-design/icons'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
Loading
}
from
'umi'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
,
Loading
}
from
'umi'
;
import
{
RA
}
from
'@/services/tos'
;
import
{
RA
}
from
'@/services/tos'
;
...
@@ -137,7 +137,7 @@ const ContractContent = (props: any) => {
...
@@ -137,7 +137,7 @@ const ContractContent = (props: any) => {
<
div
className=
{
styles
.
base
}
>
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
{
/* 头部组件 */
}
<
div
className=
{
styles
.
box
}
>
<
div
className=
{
styles
.
box
}
>
<
div
className=
{
styles
.
item1
}
>
{
ContractModel
.
type
}
Service Provider
</
div
>
<
div
className=
{
styles
.
item1
}
>
{
ContractModel
.
type
}
Contract
</
div
>
<
button
className=
{
styles
.
item3
}
onClick=
{
goToReturn
}
>
<
button
className=
{
styles
.
item3
}
onClick=
{
goToReturn
}
>
<
LeftOutlined
/>
<
LeftOutlined
/>
Back
Back
...
@@ -225,6 +225,7 @@ const ContractContent = (props: any) => {
...
@@ -225,6 +225,7 @@ const ContractContent = (props: any) => {
locale=
{
locale
}
locale=
{
locale
}
defaultValue=
{
ContractModel
.
time
}
defaultValue=
{
ContractModel
.
time
}
disabledDate=
{
disabledDate
}
disabledDate=
{
disabledDate
}
placeholder=
{
[
'Effective Date'
,
'Expiration Date'
]
}
// onChange={changeTime}
// onChange={changeTime}
/>
/>
</
Form
.
Item
>
</
Form
.
Item
>
...
@@ -237,10 +238,8 @@ const ContractContent = (props: any) => {
...
@@ -237,10 +238,8 @@ const ContractContent = (props: any) => {
label=
"Contract Annex"
label=
"Contract Annex"
rules=
{
[{
required
:
true
,
message
:
`${tipList[6]}`
}]
}
rules=
{
[{
required
:
true
,
message
:
`${tipList[6]}`
}]
}
>
>
<
Upload
{
...
uploadProps
}
>
<
Upload
{
...
uploadProps
}
listType=
{
'picture-card'
}
>
<
Button
>
{
fileList
.
length
>=
3
?
null
:
<
PlusOutlined
/>
}
<
UploadOutlined
/>
Upload
</
Button
>
</
Upload
>
</
Upload
>
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
...
...
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