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
e24fb233
Commit
e24fb233
authored
Dec 07, 2020
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signed-off-by: cellee <893264950@qq.com>
parent
92b62fb4
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
47 additions
and
57 deletions
+47
-57
OnTime.tsx
src/components/OnTime/OnTime.tsx
+2
-2
FacilityBookings.ts
src/models/CommunityManagement/FacilityBookings.ts
+2
-22
Account.tsx
src/pages/AccountManagement/account/Account.tsx
+1
-1
AccountDetail.tsx
src/pages/AccountManagement/account/AccountDetail.tsx
+2
-1
BookingDetail.tsx
...es/CommunityManagement/FacilityBookings/BookingDetail.tsx
+2
-3
Bookings.tsx
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
+9
-15
Facility.tsx
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
+2
-2
FacilityBookings.tsx
...CommunityManagement/FacilityBookings/FacilityBookings.tsx
+7
-6
tip.ts
src/utils/tip.ts
+20
-5
No files found.
src/components/OnTime/OnTime.tsx
View file @
e24fb233
...
...
@@ -22,12 +22,12 @@ const OnTime = (porps: any) => {
arrs
=
arrs
+
strArr
;
});
let
confirm
=
[...
new
Set
(
arrs
.
substr
(
0
,
arrs
.
length
-
1
).
split
(
','
))];
console
.
log
(
confirm
);
let
newConfirm
=
[]
as
any
;
confirm
.
forEach
((
element
:
any
)
=>
{
return
newConfirm
.
push
(
parseInt
(
element
));
});
console
.
log
(
newConfirm
);
setScheduled
(
newConfirm
);
}
},
[
inhibitTime
]);
...
...
src/models/CommunityManagement/FacilityBookings.ts
View file @
e24fb233
...
...
@@ -9,7 +9,7 @@ import { timeToMoment } from '@/utils/time';
export
default
{
namespace
:
'FacilityBookings'
,
state
:
{
Data
:
{
data
:[],
total
:
0
}
,
Data
:
null
,
Data2
:
{
data
:[],
total
:
0
},
Data3
:
null
,
DataSave
:
null
,
...
...
@@ -46,26 +46,6 @@ export default {
return
{
...
state
,
FacilitysList
}
},
// 设施图片名称
retImgsName
(
state
,
{
data
})
{
state
.
imgList
[
data
.
key
][
'name'
]
=
data
.
val
;
console
.
log
(
state
)
return
state
},
// 清除图片
overImgList
(
state
,{
data
})
{
state
.
imgList
[
data
.
key
]
=
{};
console
.
log
(
state
)
return
state
},
// 清除所有图片
overAllImgList
(
state
)
{
state
.
imgList
=
[{},{},{},{},{}];
return
state
},
// returnPage(state, { Data,DataPage,DataSave}) {
// return { ...state, Data,DataPage,DataSave };
// },
...
...
@@ -197,7 +177,7 @@ export default {
}
break
;
case
0
:
case
9
:
{
let
Data
=
{
data
:
resp
.
data
.
list
,
total
:
resp
.
data
.
page
}
;
let
Data
=
resp
.
data
;
yield
put
({
type
:
'returnPage'
,
Data
});
}
break
;
...
...
src/pages/AccountManagement/account/Account.tsx
View file @
e24fb233
...
...
@@ -281,7 +281,7 @@ const Account = (props: any) => {
density
:
false
,
fullScreen
:
false
,
reload
:
()
=>
{
Refresh
2
();
Refresh
();
},
setting
:
false
,
}
}
...
...
src/pages/AccountManagement/account/AccountDetail.tsx
View file @
e24fb233
...
...
@@ -211,7 +211,8 @@ const Account = (props: any) => {
const
handleOk
=
(
e
:
any
)
=>
{
//
let
obj
=
{
userStatus
:
accountName
.
userStatus
==
0
?
1
:
0
,
// userStatus: accountName.userStatus == 0 ? 1 : 0,
userStatus
:
1
,
userID
:
accountName
.
tosUserId
,
};
RA
(
52
,
obj
,
module
,
dispatch
);
...
...
src/pages/CommunityManagement/FacilityBookings/BookingDetail.tsx
View file @
e24fb233
...
...
@@ -26,10 +26,9 @@ const BookingDetail = (props: any) => {
let
time2
=
parseInt
(
moment
(
arr
[
arr
.
length
-
1
],
'HH:mm'
).
format
(
'hh'
));
let
Time
=
''
;
for
(
let
i
=
time1
;
i
<=
time2
;
i
++
)
{
Time
=
`
${
Time
}${
i
}
:00,`
;
i
<
10
?
(
Time
=
`
${
Time
}
0
${
i
}
:00,`
)
:
(
Time
=
`
${
Time
}${
i
}
:00,`
)
;
}
setExtractTime
(
Time
);
if
(
DataSave
.
managerFeeStatus
!=
0
)
{
RA
(
2
,
{
accountCategoriesId
:
DataSave
.
id
});
}
...
...
@@ -237,7 +236,7 @@ const BookingDetail = (props: any) => {
{
DataSave
!=
null
&&
DataSave
.
status
==
1
&&
DataSave
.
managerFeeStatus
==
0
?
(
<>
<
div
style=
{
{
paddingBottom
:
16
}
}
>
<
Descriptions
column=
{
{
xs
:
2
,
sm
:
3
,
md
:
4
}
}
style=
{
{
marginBottom
:
6
}
}
>
<
Descriptions
style=
{
{
marginBottom
:
6
}
}
>
<
Descriptions
.
Item
label=
"Management fee required"
>
$
{
parseInt
(
DataSave
.
communityManagerFee
).
toFixed
(
2
)
}
</
Descriptions
.
Item
>
...
...
src/pages/CommunityManagement/FacilityBookings/Bookings.tsx
View file @
e24fb233
...
...
@@ -18,7 +18,6 @@ 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
;
...
...
@@ -154,6 +153,8 @@ const Bookings = (props: any) => {
message
.
error
(
'Appointment time range error'
);
}
else
{
tmp
.
reservedTimeList
=
soltTime
;
// 预约时间
console
.
log
(
tmp
);
RA
(
11
,
tmp
);
}
};
...
...
@@ -225,16 +226,6 @@ 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 */
}
...
...
@@ -257,7 +248,13 @@ const Bookings = (props: any) => {
</
div
>
{
Data3
&&
Data3
.
length
>
0
?
(
<>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
validateMessages=
{
validateMessages
}
>
<
Form
ref=
{
formRef
}
name=
"basic"
onFinish=
{
onFinish
}
validateMessages=
{
validateMessages
}
autocomplete=
"off"
>
<
div
className=
"box2 required"
>
<
div
className=
{
styles
.
box2item1
}
>
Facility Bookings :
</
div
>
<
div
className=
{
styles
.
box2item2
}
>
...
...
@@ -300,7 +297,6 @@ const Bookings = (props: any) => {
style=
{
{
width
:
200
}
}
placeholder=
"Contact Information"
disabled=
{
prohibit
}
onKeyUp=
{
keyup_communityManagerFee
}
maxLength=
{
11
}
/>
</
Form
.
Item
>
...
...
@@ -315,7 +311,6 @@ const Bookings = (props: any) => {
placeholder=
"Blk"
style=
{
{
width
:
80
}
}
disabled=
{
prohibit
}
onKeyUp=
{
keyup_communityManagerFee
}
maxLength=
{
10
}
/>
</
Form
.
Item
>
...
...
@@ -325,7 +320,6 @@ const Bookings = (props: any) => {
placeholder=
"Floor"
style=
{
{
width
:
80
}
}
disabled=
{
prohibit
}
onKeyUp=
{
keyup_communityManagerFee
}
maxLength=
{
10
}
/>
</
Form
.
Item
>
...
...
src/pages/CommunityManagement/FacilityBookings/Facility.tsx
View file @
e24fb233
...
...
@@ -338,7 +338,7 @@ const Facility = (props: any) => {
<
Form
.
Item
label=
"Facility"
name=
"facilityName"
rules=
{
NewFaci
[
1
]
}
>
<
Input
placeholder=
"Facility Name"
disabled=
{
facilityDetail
}
maxLength=
{
30
}
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"Fee($)"
name=
"communityManagerFee"
rules=
{
NewFaci
[
2
]
}
>
<
Form
.
Item
label=
"Fee($)"
name=
"communityManagerFee"
>
{
/* <span className="divIconMoney">$</span> */
}
<
InputNumber
onKeyUp=
{
keyup_communityManagerFee
}
...
...
@@ -352,7 +352,7 @@ const Facility = (props: any) => {
/>
</
Form
.
Item
>
<
Form
.
Item
label=
"Deposit"
name=
"communityMargin"
rules=
{
NewFaci
[
3
]
}
>
<
Form
.
Item
label=
"Deposit"
name=
"communityMargin"
>
{
/* <span className="divIconMoney">$</span> */
}
<
InputNumber
onKeyUp=
{
keyup_communityMargin
}
...
...
src/pages/CommunityManagement/FacilityBookings/FacilityBookings.tsx
View file @
e24fb233
...
...
@@ -153,7 +153,7 @@ const FacilityBookings = (props: any) => {
var
tmp
=
curString
;
tmp
.
subscribeDate
=
comment
.
key
;
if
(
comment
.
status
==
null
||
comment
.
status
==
undefined
)
{
tmp
.
status
=
0
;
tmp
.
status
=
null
;
}
else
{
tmp
.
status
=
comment
.
status
;
}
...
...
@@ -282,7 +282,7 @@ const FacilityBookings = (props: any) => {
<
ProTable
loading=
{
loading
}
rowKey=
"id"
dataSource=
{
Data
.
data
}
dataSource=
{
Data
?
Data
.
list
:
null
}
columns=
{
columns
}
// pagination={{
// current: curString.curPage,
...
...
@@ -309,14 +309,14 @@ const FacilityBookings = (props: any) => {
// headerTitle="预约列表"
/>
{
curString
?
(
{
Data
?
(
<
div
className=
"pages"
>
<
Pagination
current=
{
curString
.
curPage
}
total=
{
Data
.
total
.
totalRow
}
current=
{
curString
.
curPage
?
curString
.
curPage
:
0
}
total=
{
Data
.
page
.
totalRow
?
Data
.
page
.
totalRow
:
0
}
// pageSizeOptions=
{[]}
showSizeChanger=
{
false
}
// pageSize=
{
village
.
page
.
curPageSize
}
pageSize=
{
Data
.
page
.
pageSize
?
Data
.
page
.
pageSize
:
0
}
onChange=
{
Pagechange
}
/>
</
div
>
...
...
@@ -384,6 +384,7 @@ function mapStateToProps(state: any) {
typeof
state
.
loading
.
models
.
FacilityBookings
==
'undefined'
?
true
:
state
.
loading
.
models
.
FacilityBookings
;
return
{
Data
,
Data2
,
...
...
src/utils/tip.ts
View file @
e24fb233
/*
* @Author: your name
* @Date: 2020-11-19 16:54:53
* @LastEditTime: 2020-12-0
4 11:41:39
* @LastEditTime: 2020-12-0
7 16:17:28
* @LastEditors: Please set LastEditors
* @Description: In User Settings Edit
* @FilePath: \tostumi\src\utils\tip.ts
...
...
@@ -30,6 +30,21 @@ const inputNumber = (rule: any, value: any, callback: any) => {
callback
();
};
// 只能输入数字限制 电话提示
const
inputNumberTel
=
(
rule
:
any
,
value
:
any
,
callback
:
any
)
=>
{
if
(
value
)
{
if
(
(
/^
[
0-9
]
+$/g
.
test
(
value
)
&&
value
.
length
==
8
)
||
(
/^
[
0-9
]
+$/g
.
test
(
value
)
&&
value
.
length
==
11
)
)
{
callback
();
}
else
{
callback
(
new
Error
(
'Please input contact information (8-11 digits)!'
));
}
}
callback
();
};
const
reqMes
=
(
msg
:
string
)
=>
{
return
{
required
:
true
,
...
...
@@ -85,11 +100,11 @@ export const NewFaci = [
// 设施预订
export
const
BookingsTip
=
[
[
reqMes
(
'Please input Name '
)],
[
reqMes
(
'Please input Contact Details'
)
],
[
{
...
reqMes
(
'Please input contact information (8-11 digits)'
),
validator
:
inputNumberTel
}
],
// [{ required: true, pattern: new RegExp(/^[1-9]\d*$/, 'g'), message: 'Only numbers!')],
[{
...
reqMes
(
''
),
validator
:
inputNumber
}],
[{
...
reqMes
(
''
),
validator
:
inputNumber
}],
[{
...
reqMes
(
''
),
validator
:
inputNumberStr
}],
[{
...
reqMes
(
'
Only numbers!
'
),
validator
:
inputNumber
}],
[{
...
reqMes
(
'
Only numbers!
'
),
validator
:
inputNumber
}],
[{
...
reqMes
(
'
Only numbers and letters can be entered!
'
),
validator
:
inputNumberStr
}],
[
reqMes
(
'Please Select The Date'
)],
];
...
...
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