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
fc0bc1b4
Commit
fc0bc1b4
authored
Jan 22, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signed-off-by: cellee <893264950@qq.com>
parent
a9b87c90
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
112 additions
and
68 deletions
+112
-68
SearchOptionsTow.tsx
src/components/SearchOptions/SearchOptionsTow.tsx
+9
-0
FacilityBookings.ts
src/models/CommunityManagement/FacilityBookings.ts
+12
-12
Account.tsx
src/pages/AccountManagement/account/Account.tsx
+4
-2
AccountEdit.tsx
src/pages/AccountManagement/account/AccountEdit.tsx
+1
-1
CellList.tsx
src/pages/CommunityManagement/CellList/CellList.tsx
+3
-3
Bookings.tsx
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
+66
-40
Facility.tsx
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
+6
-2
FacilityBookings.tsx
...CommunityManagement/FacilityBookings/FacilityBookings.tsx
+3
-5
FacilityTow.tsx
...ages/CommunityManagement/FacilityBookings/FacilityTow.tsx
+8
-3
No files found.
src/components/SearchOptions/SearchOptionsTow.tsx
View file @
fc0bc1b4
/*
* @Author: your name
* @Date: 2020-12-02 09:42:49
* @LastEditTime: 2021-01-22 18:16:44
* @LastEditors: your name
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\components\SearchOptions\SearchOptionsTow.tsx
*/
import
React
from
'react'
;
import
{
Select
}
from
'antd'
;
const
{
Option
}
=
Select
;
...
...
@@ -37,6 +45,7 @@ const SearchOptionsTow = (porps: any) => {
)
:
(
<
Select
showSearch
allowClear
style=
{
{
width
:
200
}
}
placeholder=
"Community Name"
optionFilterProp=
"children"
...
...
src/models/CommunityManagement/FacilityBookings.ts
View file @
fc0bc1b4
...
...
@@ -108,18 +108,18 @@ export default {
// // window.location.href = '/500';
// }
if
(
resp
.
error_code
!=
"0000"
)
{
var
Result
=
null
switch
(
playload
.
index
)
{
case
1
:
// message.error("Could't not found the facility!")
Result
=
{
index
:
playload
.
index
,
msg
:
"Could't not found the facility!"
};
yield
put
({
type
:
'returnResult'
,
Result
});
break
;
case
11
:
Result
=
{
index
:
playload
.
index
,
msg
:
resp
.
error_msg
};
yield
put
({
type
:
'returnResult'
,
Result
});
break
;
}
//
var Result = null
//
switch (playload.index) {
//
case 1:
//
// message.error("Could't not found the facility!")
//
Result ={index:playload.index,msg:"Could't not found the facility!"};
//
yield put({ type: 'returnResult', Result });
//
break;
//
case 11:
//
Result ={index:playload.index,msg:resp.error_msg};
//
yield put({ type: 'returnResult', Result });
//
break;
//
}
message
.
error
(
`
${
resp
.
error_code
}
:
${
resp
.
error_msg
}
`
);
}
else
{
...
...
src/pages/AccountManagement/account/Account.tsx
View file @
fc0bc1b4
...
...
@@ -188,7 +188,9 @@ const Account = (props: any) => {
// 表头单搜索
const
onFinishContract
=
(
value
:
any
)
=>
{
if
(
value
.
tosUserName
||
value
.
creatorName
)
{
if
(
value
.
tosAccountName
||
value
.
creatorName
)
{
const
userInfo
=
JSON
.
parse
(
localStorage
.
getItem
(
'userInfo'
)
||
'[]'
);
value
.
creatorId
=
userInfo
.
userModel
.
id
;
let
t
=
{
...
term
,
...
value
};
delete
t
.
pageNum
;
// 搜索的时候 删除页码
...
...
@@ -234,7 +236,7 @@ const Account = (props: any) => {
name=
"contract"
onFinish=
{
onFinishContract
}
>
<
Form
.
Item
name=
"tos
User
Name"
>
<
Form
.
Item
name=
"tos
Account
Name"
>
<
Input
allowClear
placeholder=
"Account Name"
/>
</
Form
.
Item
>
<
Form
.
Item
name=
"creatorName"
>
...
...
src/pages/AccountManagement/account/AccountEdit.tsx
View file @
fc0bc1b4
...
...
@@ -390,7 +390,7 @@ const Account = (props: any) => {
<
Descriptions
column=
{
{
xs
:
1
,
sm
:
1
,
md
:
2
,
xl
:
3
}
}
>
<
Descriptions
.
Item
>
<
Form
.
Item
name=
"tosUserName"
label=
"Account ID"
rules=
{
AccountTip
[
0
]
as
any
}
>
<
Input
placeholder=
"Login Account"
className=
"input"
/>
<
Input
placeholder=
"Login Account"
className=
"input"
disabled
/>
</
Form
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
...
...
src/pages/CommunityManagement/CellList/CellList.tsx
View file @
fc0bc1b4
...
...
@@ -69,7 +69,7 @@ const CellLists = (props: any) => {
],
]);
const
{
dispatch
,
loading
,
curString
,
village
,
Init
}
=
props
;
const
{
dispatch
,
loading
,
village
,
Init
}
=
props
;
const
[
term
,
setTerm
]
=
useState
({
communityNameList
:
Init
.
CommunityList
,
pageNum
:
1
}
as
any
);
// 拉取数据的条件存储
...
...
@@ -78,13 +78,13 @@ const CellLists = (props: any) => {
useEffect
(()
=>
{
if
(
village
==
null
)
{
const
obj
=
{
communityNameList
:
Init
.
CommunityList
,
communityNameList
:
Init
.
CommunityList
?
Init
.
CommunityList
:
[]
,
pageNum
:
1
,
};
setTerm
(
obj
);
RA
(
48
,
obj
,
module
,
dispatch
);
}
},
[
village
]);
},
[
village
,
Init
]);
// 清除操作之前的数据
const
emptys
=
(
data
:
any
,
url
:
any
)
=>
{
...
...
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
View file @
fc0bc1b4
...
...
@@ -59,6 +59,9 @@ const Bookings = (props: any) => {
const
[
value
,
setValue
]
=
React
.
useState
(
1
);
const
[
dateTime
,
setdateTime
]
=
React
.
useState
(
true
);
//是否选择了日期,不选择不给输入楼栋, 要用来查找
const
[
Time
,
setTime
]
=
React
.
useState
(
null
as
any
);
// 选择的日期
// 表单标识
const
[
form
]
=
Form
.
useForm
();
...
...
@@ -125,6 +128,7 @@ const Bookings = (props: any) => {
buildNumber
:
`BLK
${
Unit
.
buildNumber
}
`
,
floorNumber
:
Unit
.
floorNumber
,
roomNumber
:
Unit
.
roomNumber
,
subscribeDate
:
Time
,
});
}
},
[
Unit
]);
...
...
@@ -243,6 +247,8 @@ const Bookings = (props: any) => {
}
});
});
setdateTime
(
true
);
// 输入框禁止
};
// 选择小区名字发起请求
...
...
@@ -253,10 +259,13 @@ const Bookings = (props: any) => {
setCurString
({
communityManagerFee
:
null
,
});
setResultTime
(
null
);
RA
(
1
,
{
userToken
:
token
,
communityName
:
values
});
set
Loading
(
true
);
set
ResultTime
(
null
);
setProhibit
(
true
);
setdateTime
(
true
);
// 输入框禁止
if
(
values
!==
''
)
{
setLoading
(
true
);
}
};
// 设置之前日期不能选择
...
...
@@ -273,6 +282,21 @@ const Bookings = (props: any) => {
};
RA
(
50
,
data
);
setTime
(
moment
(
value
).
format
(
'YYYY-MM-DD'
));
// 判断有没有楼栋
if
(
Unit
.
buildNumber
&&
Unit
.
floorNumber
&&
Unit
.
roomNumber
)
{
RA
(
58
,
{
facilitiesId
:
curString
.
facilitiesId
,
communityName
:
comminityValues
,
buildNumber
:
`BLK
${
Unit
.
buildNumber
}
`
,
floorNumber
:
Unit
.
floorNumber
,
roomNumber
:
Unit
.
roomNumber
,
subscribeDate
:
moment
(
value
).
format
(
'YYYY-MM-DD'
),
});
}
setdateTime
(
false
);
// 输入框打开
};
// 鼠标移走
...
...
@@ -372,6 +396,37 @@ const Bookings = (props: any) => {
</
Form
.
Item
>
</
div
>
</
div
>
<
div
className=
{
styles
.
line
}
></
div
>
<
div
className=
"box5 required"
>
<
div
className=
{
styles
.
box5item1
}
>
Booking Schedule :
</
div
>
<
div
className=
{
styles
.
box5item2
}
>
<
Row
gutter=
{
8
}
>
<
Col
>
<
Form
.
Item
name=
"subscribeDate"
rules=
{
BookingsTip
[
5
]
}
>
<
DatePicker
placeholder=
"Select Date"
disabledDate=
{
disabledDate
}
onChange=
{
confirmData
}
disabled=
{
prohibit
}
/>
</
Form
.
Item
>
</
Col
>
<
Col
>
<
Form
.
Item
label=
"Reserve Time"
name=
"Time"
noStyle
>
<
OnTime
disabled=
{
prohibit
}
limit=
{
curString
.
categoriesOpenTime
}
// 设施默认禁止时间段
inhibitTime=
{
result
}
// 选择日期后的禁止时间
onChanges=
{
onChanges
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
div
>
</
div
>
<
div
className=
{
styles
.
line
}
></
div
>
<
div
className=
"box4 required"
style=
{
{
marginBottom
:
25
}
}
>
...
...
@@ -384,7 +439,7 @@ const Bookings = (props: any) => {
<
Input
placeholder=
"Blk"
style=
{
{
width
:
80
}
}
disabled=
{
prohibit
}
disabled=
{
prohibit
||
dateTime
}
maxLength=
{
10
}
onBlur=
{
onBlur
}
/>
...
...
@@ -394,7 +449,7 @@ const Bookings = (props: any) => {
<
Input
placeholder=
"Floor"
style=
{
{
width
:
80
}
}
disabled=
{
prohibit
}
disabled=
{
prohibit
||
dateTime
}
maxLength=
{
10
}
onBlur=
{
onBlur
}
/>
...
...
@@ -404,7 +459,7 @@ const Bookings = (props: any) => {
<
Input
placeholder=
"Room"
style=
{
{
width
:
80
}
}
disabled=
{
prohibit
}
disabled=
{
prohibit
||
dateTime
}
onBlur=
{
onBlur
}
/>
</
Form
.
Item
>
...
...
@@ -418,7 +473,7 @@ const Bookings = (props: any) => {
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Name Of Subscriber"
disabled=
{
prohibit
}
disabled=
{
prohibit
||
dateTime
}
maxLength=
{
30
}
onBlur=
{
onBlurName
}
/>
...
...
@@ -430,41 +485,12 @@ const Bookings = (props: any) => {
<
Input
style=
{
{
width
:
200
}
}
placeholder=
"Contact Information"
disabled=
{
prohibit
}
disabled=
{
prohibit
||
dateTime
}
maxLength=
{
11
}
/>
</
Form
.
Item
>
</
div
>
</
div
>
<
div
className=
{
styles
.
line
}
></
div
>
<
div
className=
"box5 required"
>
<
div
className=
{
styles
.
box5item1
}
>
Booking Schedule :
</
div
>
<
div
className=
{
styles
.
box5item2
}
>
<
Row
gutter=
{
8
}
>
<
Col
>
<
Form
.
Item
name=
"subscribeDate"
rules=
{
BookingsTip
[
5
]
}
>
<
DatePicker
placeholder=
"Select Date"
disabledDate=
{
disabledDate
}
onChange=
{
confirmData
}
disabled=
{
prohibit
}
/>
</
Form
.
Item
>
</
Col
>
<
Col
>
<
Form
.
Item
label=
"Reserve Time"
name=
"Time"
noStyle
>
<
OnTime
disabled=
{
prohibit
}
limit=
{
curString
.
categoriesOpenTime
}
// 设施默认禁止时间段
inhibitTime=
{
result
}
// 选择日期后的禁止时间
onChanges=
{
onChanges
}
/>
</
Form
.
Item
>
</
Col
>
</
Row
>
</
div
>
</
div
>
{
curString
.
communityManagerFee
!=
null
&&
Data3
?
(
<>
...
...
@@ -523,10 +549,10 @@ const Bookings = (props: any) => {
function
mapStateToProps
(
state
:
any
)
{
const
{
Data3
,
Result
,
DataSave
,
resultTime
,
Remaining
}
=
state
.
FacilityBookings
;
const
load
=
typeof
state
.
loading
.
models
.
FacilityBookings
==
'undefined'
?
true
:
state
.
loading
.
models
.
FacilityBookings
;
const
load
=
state
.
loading
.
models
.
FacilityBookings
?
state
.
loading
.
models
.
FacilityBookings
:
false
;
const
{
token
}
=
state
.
login
;
return
{
Data3
,
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
fc0bc1b4
...
...
@@ -200,8 +200,12 @@ const Facility = (props: any) => {
values
.
categoriesOpenTime
=
`
${
moment
(
values
.
Time
[
0
]).
format
(
'HH:mm'
)}
-
${
moment
(
values
.
Time
[
1
],
).
format
(
'HH:mm'
)}
`
;
// 预约时间段 二开需要
values
.
communityManagerFee
=
values
.
communityManagerFee
?
values
.
communityManagerFee
:
'0.00'
;
// 价格押金没有为0
values
.
communityMargin
=
values
.
communityMargin
?
values
.
communityMargin
:
'0.00'
;
// 价格押金没有为0
values
.
communityManagerFee
=
values
.
communityManagerFee
?
parseFloat
(
values
.
communityManagerFee
).
toFixed
(
2
)
:
'0.00'
;
// 价格押金没有为0
values
.
communityMargin
=
values
.
communityMargin
?
parseFloat
(
values
.
communityMargin
).
toFixed
(
2
)
:
'0.00'
;
// 价格押金没有为0
values
.
periodType
=
Cycle
;
delete
values
.
picList
;
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityBookings.tsx
View file @
fc0bc1b4
...
...
@@ -465,13 +465,11 @@ const FacilityBookings = (props: any) => {
};
function
mapStateToProps
(
state
:
any
)
{
// console.log(state);
const
{
Data
,
Data2
,
DataSave
,
curString
,
Result
}
=
state
.
FacilityBookings
;
const
{
token
}
=
state
.
login
;
const
loading
=
typeof
state
.
loading
.
models
.
FacilityBookings
==
'undefined'
?
true
:
state
.
loading
.
models
.
FacilityBookings
;
const
loading
=
state
.
loading
.
models
.
FacilityBookings
?
state
.
loading
.
models
.
FacilityBookings
:
false
;
const
{
CommunityList
}
=
state
.
Init
;
// 小区列表
return
{
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityTow.tsx
View file @
fc0bc1b4
...
...
@@ -177,7 +177,7 @@ const FacilityTow = (props: any) => {
// 提交
const
onFinish
=
(
values
:
any
)
=>
{
// console.log(FacilitysList
);
console
.
log
(
values
);
// 先判断是否填写完整
for
(
let
j
in
FacilitysList
)
{
if
(
FacilitysList
[
j
].
fileList
.
length
==
0
)
{
...
...
@@ -230,8 +230,12 @@ const FacilityTow = (props: any) => {
values
.
categoriesOpenTime
=
`
${
moment
(
values
.
Time
[
0
]).
format
(
'HH:mm'
)}
-
${
moment
(
values
.
Time
[
1
],
).
format
(
'HH:mm'
)}
`
;
// 预约时间段 二开需要
values
.
communityManagerFee
=
values
.
communityManagerFee
?
values
.
communityManagerFee
:
'0.00'
;
// 价格押金没有为0
values
.
communityMargin
=
values
.
communityMargin
?
values
.
communityMargin
:
'0.00'
;
// 价格押金没有为0
values
.
communityManagerFee
=
values
.
communityManagerFee
?
parseFloat
(
values
.
communityManagerFee
).
toFixed
(
2
)
:
'0.00'
;
// 价格押金没有为0
values
.
communityMargin
=
values
.
communityMargin
?
parseFloat
(
values
.
communityMargin
).
toFixed
(
2
)
:
'0.00'
;
// 价格押金没有为0
values
.
communityName
=
DataSave
.
community
;
values
.
periodType
=
Cycle
;
values
.
id
=
Facilityid
;
...
...
@@ -240,6 +244,7 @@ const FacilityTow = (props: any) => {
delete
values
.
endTime
;
delete
values
.
picList
;
delete
values
.
Time
;
RA
(
17
,
values
);
}
};
...
...
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