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
Expand all
Hide 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 = {
console
.
log
(
userMessage
);
console
.
log
(
userMessage
.
token
);
setCookie
(
'token'
,
userMessage
.
token
);
setCookie
(
'id'
,
userMessage
.
userModel
.
id
);
setCookie
(
'name'
,
userMessage
.
userModel
.
tosUserName
);
setCookie
(
'phone'
,
userMessage
.
userModel
.
tosUserPhone
);
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';
import
moment
from
'moment'
;
import
{
parseInt
}
from
'lodash'
;
import
{
event
}
from
'@/.umi/plugin-locale/locale'
;
const
{
RangePicker
}
=
TimePicker
;
...
...
@@ -204,6 +205,7 @@ const Adds = (props: any) => {
// 表单验证
const
onFinish
=
(
values
:
any
)
=>
{
let
{
residentialZipCode
,
residentialAddress
,
residentialName
}
=
values
.
des
;
if
(
residentialZipCode
.
length
<
6
)
{
message
.
error
(
'Please Enter 6-digit Zip Code!'
);
}
else
{
...
...
@@ -280,6 +282,11 @@ const Adds = (props: any) => {
return
value
;
}
// 键盘回车事件
const
onKeyDowns
=
(
event
:
any
)
=>
{
console
.
log
(
event
);
};
return
(
<>
<
Spin
spinning=
{
loading
}
tip=
"信息提交中..."
size=
"large"
>
...
...
@@ -295,6 +302,7 @@ const Adds = (props: any) => {
</
div
>
</
h3
>
<
Form
onKeyDown=
{
onKeyDowns
}
name=
"basic"
form=
{
form
}
onFinish=
{
onFinish
}
...
...
@@ -466,9 +474,9 @@ const Adds = (props: any) => {
// export default Adds;
function
map
(
state
:
any
)
{
console
.
log
(
state
);
//
console.log(state);
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
;
return
{
Data
,
loading
,
Result
};
}
...
...
src/pages/CommunityManagement/CommunityAnnouncement/Add.tsx
View file @
3708790d
...
...
@@ -20,25 +20,30 @@ import { getCookie } from '@/utils/method';
import
moment
from
'moment'
;
const
module
=
'CommunityAnnouncement'
;
const
Add
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Result
,
loading
,
DataSave
,
ImgSrc
}
=
props
;
const
formRef
=
useRef
(
null
);
const
[
form
]
=
Form
.
useForm
();
// 图片地址
const
[
ImageSrc
,
setImageSrc
]
=
useState
([]
as
any
);
console
.
log
(
ImgSrc
);
// 监听传递过来的值
useEffect
(()
=>
{
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
({
noticTitle
:
DataSave
.
noticTitlel
,
noticText
:
DataSave
.
noticText
,
// noticStartTime: moment(tim).format('YYYY-MM-DD')
,
// noticEndTime:DataSave.noticEndTime?moment(DataSave.noticEndTime, 'YYYY-MM-DD HH:mm:ss'):''
,
noticStartTime
:
day
,
noticEndTime
:
day2
,
});
// 发起请求图片
let
msg
=
{
type
:
'tosCommunityNoticePreview'
,
...
...
@@ -48,9 +53,6 @@ const Add = (props: any) => {
}
},
[
DataSave
]);
// 图片地址
const
[
ImageSrc
,
setImageSrc
]
=
useState
([]
as
any
);
// 监听图片状态 ImgSrc
useEffect
(()
=>
{
if
(
ImgSrc
!=
null
)
{
...
...
@@ -151,7 +153,9 @@ const Add = (props: any) => {
rules=
{
Notice
[
2
]
}
>
<
TextArea
style=
{
{
width
:
400
,
height
:
100
}
}
style=
{
{
height
:
100
,
maxWidth
:
600
}
}
maxLength=
{
1000
}
showCount=
{
true
}
placeholder=
"Please input the announcement content"
/>
</
Form
.
Item
>
...
...
@@ -162,7 +166,7 @@ const Add = (props: any) => {
data=
{
{
imageType
:
'tosNotice'
,
}
}
limitNums=
{
1
}
limitNums=
{
5
}
defaultValue=
{
ImageSrc
}
/>
</
Form
.
Item
>
...
...
@@ -179,11 +183,7 @@ const Add = (props: any) => {
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"noticEndTime"
className=
"diyItem"
label=
"Expiration Date"
rules=
{
[]
}
>
<
DatePicker
style=
{
{
width
:
200
}
}
placeholder=
"Expiration Dates"
disabledDate=
{
disabledDate
}
/>
<
DatePicker
style=
{
{
width
:
200
}
}
placeholder=
"Expiration Dates"
/>
</
Form
.
Item
>
<
hr
/>
<
Form
.
Item
style=
{
{
marginBottom
:
5
}
}
className=
"diyItem"
label=
" "
colon=
{
false
}
>
...
...
@@ -200,7 +200,9 @@ const Add = (props: any) => {
function
map
(
state
:
any
)
{
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
};
}
export
default
connect
(
map
)(
Add
);
src/pages/CommunityManagement/CommunityAnnouncement/CommunityAnnouncement.tsx
View file @
3708790d
...
...
@@ -65,18 +65,18 @@ const CommunityAnnouncement = (props: any) => {
),
},
{
title
:
'
NoticScope
'
,
title
:
'
Status
'
,
dataIndex
:
'noticStatus'
,
render
:
function
(
text
:
any
)
{
switch
(
text
)
{
case
1
:
return
<
Tag
color=
"green"
>
Publishing
</
Tag
>;
// 发布中
return
<
Tag
color=
"green"
>
Take Effect
</
Tag
>;
// 发布中
break
;
case
2
:
return
<
Tag
color=
"red"
>
Expire
d
</
Tag
>;
// 已过期
return
<
Tag
color=
"red"
>
Invali
d
</
Tag
>;
// 已过期
break
;
default
:
return
<
Tag
color=
"cyan"
>
Waiting
for r
elease
</
Tag
>;
// 等待发布
return
<
Tag
color=
"cyan"
>
Waiting
For R
elease
</
Tag
>;
// 等待发布
break
;
}
},
...
...
@@ -84,7 +84,7 @@ const CommunityAnnouncement = (props: any) => {
{
title
:
'Actions'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
<
Space
size=
{
0
}
>
<
Button
type=
"link"
onClick=
{
()
=>
{
...
...
src/pages/CommunityManagement/CommunityAnnouncement/Detail.tsx
View file @
3708790d
...
...
@@ -48,14 +48,14 @@ const Detail = (props: any) => {
function
hanFunStart
(
start
:
any
)
{
switch
(
start
)
{
case
1
:
return
<
Badge
status=
"success"
text=
"
Publishing
"
/>;
return
<
Badge
status=
"success"
text=
"
Take effect
"
/>;
// <Tag color="green">Publishing</Tag>; // 发布中
break
;
case
2
:
return
<
Badge
status=
"error"
text=
"
Expire
d"
/>;
// 已过期
return
<
Badge
status=
"error"
text=
"
Invali
d"
/>;
// 已过期
break
;
default
:
return
<
Badge
status=
"processing"
text=
"Waiting
for r
elease"
/>;
// 等待发布
return
<
Badge
status=
"processing"
text=
"Waiting
For R
elease"
/>;
// 等待发布
break
;
}
}
...
...
src/pages/CommunityManagement/CommunityAnnouncement/ann.less
View file @
3708790d
...
...
@@ -7,51 +7,54 @@
.ant-form-item-label {
label {
min-width
: 120px;
min-width: 120px;
text-align: right;
}
}
}
hr {
border
: 0;
height
: 1px;
background
: #eee;
border: 0;
height: 1px;
background: #eee;
margin-bottom: 20px;
}
// bianji
.form {
padding
: 20px;
border
: 1px solid #efefef;
padding: 20px;
border: 1px solid #efefef;
border-radius: 3px;
background
: #fff;
box-shadow
: 0 1px 1px #ccc;
background: #fff;
box-shadow: 0 1px 1px #ccc;
h3 {
margin-bottom: 30px;
position
: relative;
line-height
: 35px;
position: relative;
line-height: 35px;
.back {
position
: absolute;
right
: 0;
top
: 0;
position: absolute;
right: 0;
top: 0;
margin-bottom: 20px;
background
: #fff;
background: #fff;
}
}
.famg {
display
: flex;
display: flex;
justify-content: center;
align-items
: center;
div{
padding:10% 0;
align-items: center;
div
{
padding:
10% 0;
}
span {
margin: 10px auto;
}
}
}
}
\ No newline at end of file
.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';
// 日期
import
moment
from
'moment'
;
import
{
BookingsTip
}
from
'@/utils/tip'
;
// 自定义时间段
import
OnTime
from
'@/components/OnTime/OnTime'
;
import
{
getNumber
}
from
'@/utils/string'
;
// 正则
const
Bookings
=
(
props
:
any
)
=>
{
const
{
dispatch
,
Data3
,
Result
,
DataSave
,
token
,
load
,
resultTime
}
=
props
;
...
...
@@ -57,7 +58,8 @@ const Bookings = (props: any) => {
categoriesOpenTime
:
null
,
}
as
any
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
const
formRef
=
useRef
(
null
);
const
formRef
=
useRef
(
null
as
any
);
const
[
prohibit
,
setProhibit
]
=
useState
(
true
);
// 输入框是否不可选
const
[
result
,
setResultTime
]
=
useState
(
resultTime
);
// 已预约时间段
...
...
@@ -132,14 +134,17 @@ const Bookings = (props: any) => {
// 保存提交
const
onFinish
=
(
value
:
any
)
=>
{
console
.
log
(
'Success:'
);
var
tmp
=
value
;
console
.
log
(
value
);
// 判断时间选择
if
(
soltTime
.
length
<
2
||
!
soltTime
[
0
])
{
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.facilitiesId = null
// tmp.communityName = null
...
...
@@ -179,7 +184,7 @@ const Bookings = (props: any) => {
// console.log(comminityValues)
// console.log(tmp)
};
// 选择
// 选择
设施
const
RadioChoose
=
(
e
:
any
)
=>
{
Data3
.
map
((
item
:
any
,
index
:
any
)
=>
{
item
.
categorieList
.
map
((
thing
:
any
,
i
:
any
)
=>
{
...
...
@@ -196,7 +201,7 @@ const Bookings = (props: any) => {
// 选择后取消输入框禁止
setProhibit
(
false
);
// 赋值给延后天数
setBookTime
(
-
thing
.
pageSize
);
setBookTime
(
-
item
.
canReservationDay
+
1
);
// console.log(item.communityManagerFee)
// console.log(item.communityMargin)
}
...
...
@@ -217,6 +222,7 @@ const Bookings = (props: any) => {
setProhibit
(
true
);
setResultTime
(
null
);
setSoltTime
([]);
// formRef.current.resetFields({ accountName: null }); // 清空已填写的表单
};
// 设置之前时间不能选择
...
...
@@ -249,6 +255,16 @@ const Bookings = (props: any) => {
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
(
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件v1.2 */
}
...
...
@@ -313,6 +329,8 @@ const Bookings = (props: any) => {
style=
{
{
width
:
200
}
}
placeholder=
"Contact Information"
disabled=
{
prohibit
}
onKeyUp=
{
keyup_communityManagerFee
}
maxLength=
{
11
}
/>
</
Form
.
Item
>
</
div
>
...
...
@@ -322,11 +340,23 @@ const Bookings = (props: any) => {
<
div
className=
{
styles
.
box4item1
}
>
Unit :
</
div
>
<
div
className=
"divbox4"
>
<
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
>
<
span
className=
"jio"
>
#
</
span
>
<
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
>
<
span
className=
"heng"
>
--
</
span
>
<
Form
.
Item
name=
"roomNumber"
rules=
{
BookingsTip
[
4
]
}
>
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
3708790d
...
...
@@ -59,10 +59,6 @@ const Facility = (props: any) => {
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
[
facilityDetail
,
setFacilityDetail
]
=
useState
(
false
);
const
[
PATHNAME
,
setPATHNAME
]
=
useState
(
''
);
...
...
src/pages/ContractManagement/Contract.tsx
View file @
3708790d
This diff is collapsed.
Click to expand it.
src/pages/ContractManagement/ContractContent.tsx
View file @
3708790d
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./ContractContent.less'
;
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
{
RA
}
from
'@/services/tos'
;
...
...
@@ -137,7 +137,7 @@ const ContractContent = (props: any) => {
<
div
className=
{
styles
.
base
}
>
{
/* 头部组件 */
}
<
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
}
>
<
LeftOutlined
/>
Back
...
...
@@ -225,6 +225,7 @@ const ContractContent = (props: any) => {
locale=
{
locale
}
defaultValue=
{
ContractModel
.
time
}
disabledDate=
{
disabledDate
}
placeholder=
{
[
'Effective Date'
,
'Expiration Date'
]
}
// onChange={changeTime}
/>
</
Form
.
Item
>
...
...
@@ -237,10 +238,8 @@ const ContractContent = (props: any) => {
label=
"Contract Annex"
rules=
{
[{
required
:
true
,
message
:
`${tipList[6]}`
}]
}
>
<
Upload
{
...
uploadProps
}
>
<
Button
>
<
UploadOutlined
/>
Upload
</
Button
>
<
Upload
{
...
uploadProps
}
listType=
{
'picture-card'
}
>
{
fileList
.
length
>=
3
?
null
:
<
PlusOutlined
/>
}
</
Upload
>
</
Form
.
Item
>
</
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