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
02608e8a
Commit
02608e8a
authored
Nov 20, 2020
by
cellee
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'final' of
http://120.77.240.215:9701/Maple/tostumi.git
into final
parents
5a33990a
a58884e8
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
123 additions
and
121 deletions
+123
-121
CommunityService.ts
src/models/CommunityManagement/CommunityService.ts
+1
-1
User.ts
src/models/CommunityManagement/User.ts
+18
-0
Card.tsx
src/pages/CommercialService/Card.tsx
+3
-0
CardAdd.tsx
src/pages/CommercialService/CardAdd.tsx
+4
-32
CardDetail.tsx
src/pages/CommercialService/CardDetail.tsx
+8
-5
Detail.tsx
src/pages/CommercialService/Detail.tsx
+6
-8
RenovationDetail.tsx
src/pages/CommercialService/RenovationDetail.tsx
+3
-3
index.less
src/pages/CommercialService/css/index.less
+13
-13
UsersAdd.tsx
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
+16
-3
Edit.tsx
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
+22
-29
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+26
-27
method.ts
src/utils/method.ts
+3
-0
No files found.
src/models/CommunityManagement/CommunityService.ts
View file @
02608e8a
...
...
@@ -77,7 +77,7 @@ export default {
var
CurDataDetail
=
{
community
:
tmp
.
communityName
,
address
:
tmp
.
addressAndpostalCode
,
home
:
tmp
.
buildingNumber
+
'#'
+
tmp
.
floorNumber
+
'-'
+
tmp
.
roomNumber
,
home
:
tmp
.
buildingNumber
+
'
#'
+
tmp
.
floorNumber
+
'-'
+
tmp
.
roomNumber
,
name
:
tmp
.
owerName
,
phone
:
tmp
.
owerPhone
,
email
:
tmp
.
owerEmail
,
...
...
src/models/CommunityManagement/User.ts
View file @
02608e8a
...
...
@@ -23,6 +23,8 @@ export default {
memberResult
:
null
,
DataServices
:
null
,
Data4Error
:
null
,
},
reducers
:
{
...
...
@@ -62,6 +64,9 @@ export default {
returnDataServices
(
state
,
{
DataServices
})
{
return
{
...
state
,
DataServices
};
},
returnData4Error
(
state
,
{
Data4Error
})
{
return
{
...
state
,
Data4Error
};
},
},
effects
:
{
...
...
@@ -93,6 +98,7 @@ export default {
if
(
resp
.
code
==
500
||
resp
.
error_code
!=
'0000'
)
{
// message.error("Server Error,try again,error code:500",3)
// window.location.href = '/500';
console
.
log
();
}
if
(
resp
.
error_code
!=
'0000'
)
{
...
...
@@ -100,6 +106,7 @@ export default {
console
.
log
(
playload
);
var
Data3Error
=
null
;
var
Result
=
null
;
let
Data4Error
=
null
;
switch
(
playload
.
index
)
{
case
11
:
{
...
...
@@ -120,6 +127,12 @@ export default {
yield
put
({
type
:
'returnResult'
,
Result
});
}
break
;
case
14
:
{
Data4Error
=
{
msg
:
'The community or unit is already registered!'
};
}
yield
put
({
type
:
'returnData4Error'
,
Data4Error
});
break
;
}
}
else
{
switch
(
playload
.
index
)
{
...
...
@@ -216,5 +229,10 @@ export default {
let
memberResult
=
null
;
yield
put
({
type
:
'returnMemberResult'
,
memberResult
});
},
*
Data4ErrorClear
({},
{
put
})
{
let
Data4Error
=
null
;
yield
put
({
type
:
'returnData4Error'
,
Data4Error
});
},
},
};
src/pages/CommercialService/Card.tsx
View file @
02608e8a
...
...
@@ -94,6 +94,9 @@ const Card = (props: any) => {
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
const
user
=
JSON
.
parse
(
localStorage
.
getItem
(
'userInfo'
)
as
string
);
values
[
'Reply_name'
]
=
user
.
userModel
.
tosUserName
;
values
[
'Reply_Contact'
]
=
user
.
userModel
.
tosUserPhone
;
SA
(
values
,
module
,
dispatch
);
history
.
push
(
'./AccessCardApplication/Detail'
);
};
...
...
src/pages/CommercialService/CardAdd.tsx
View file @
02608e8a
...
...
@@ -42,6 +42,8 @@ const CardAdd = (props: any) => {
}
values
.
communityName
=
communityName
;
console
.
log
(
values
);
values
.
buildNumber
=
'BLK '
+
values
.
buildNumber
;
setLoading
(
true
);
RA
(
35
,
values
,
module
,
dispatch
);
};
...
...
@@ -67,21 +69,6 @@ const CardAdd = (props: any) => {
form
.
resetFields
();
},
[]);
// const checkData: (rule: any, value: string, callback: any) => void = (
// rule: any,
// value: any,
// callback: any,
// ) => {
// if (value) {
// if (/^\d$/) {
// } else {
// }
// }
// callback()
// };
const
checkData2
:
(
rule
:
any
,
value
:
string
,
cb
:
any
)
=>
void
=
(
rule
,
value
,
cb
)
=>
{
if
(
value
)
{
if
(
/^
[
a-zA-Z0-9
]
+$/g
.
test
(
value
))
{
...
...
@@ -93,21 +80,6 @@ const CardAdd = (props: any) => {
cb
();
};
// const checkName: (rule: any, value: string, callback: any) => void = (
// rule: any,
// value: any,
// callback: any,
// ) => {
// if (value) {
// if () {
// } else {
// callback(new Error(''));
// }
// }
// callback();
// };
// 手机号码验证
const
phoneNumber
:
(
rule
:
any
,
value
:
string
,
cb
:
any
)
=>
void
=
(
rule
,
value
,
cb
)
=>
{
if
(
value
)
{
...
...
@@ -176,7 +148,7 @@ const CardAdd = (props: any) => {
<
Form
.
Item
name=
"communityOwner"
style=
{
{
marginRight
:
20
}
}
rules=
{
[{
required
:
true
,
max
:
8
,
min
:
2
}]
}
rules=
{
[{
required
:
true
,
max
:
30
,
min
:
2
}]
}
>
<
Input
placeholder=
{
'Name'
}
/>
</
Form
.
Item
>
...
...
@@ -203,7 +175,7 @@ const CardAdd = (props: any) => {
<
Form
.
Item
name=
"applyName"
style=
{
{
marginRight
:
20
}
}
rules=
{
[{
required
:
true
,
max
:
8
,
min
:
2
}]
}
rules=
{
[{
required
:
true
,
max
:
30
,
min
:
2
}]
}
>
<
Input
placeholder=
{
'Name'
}
/>
</
Form
.
Item
>
...
...
src/pages/CommercialService/CardDetail.tsx
View file @
02608e8a
...
...
@@ -27,10 +27,7 @@ const CardDetail = (props: any) => {
const
formRef
=
useRef
(
null
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
useEffect
(()
=>
{
if
(
DataSave
!=
null
)
{
console
.
log
(
DataSave
);
// RA(36, { id: DataSave.id }, module, dispatch);
}
else
{
if
(
!
DataSave
)
{
history
.
go
(
-
1
);
}
},
[]);
...
...
@@ -73,7 +70,7 @@ const CardDetail = (props: any) => {
<
Col
span=
{
3
}
>
{
DataSave
.
community_name
}
</
Col
>
<
Col
>
Unit:
</
Col
>
<
Col
>
{
DataSave
.
build_number
+
'#'
+
DataSave
.
floor_number
+
'-'
+
DataSave
.
room_number
}
{
DataSave
.
build_number
+
'
#'
+
DataSave
.
floor_number
+
'-'
+
DataSave
.
room_number
}
</
Col
>
</
Row
>
...
...
@@ -159,6 +156,12 @@ const CardDetail = (props: any) => {
</
Form
>
)
:
(
<>
<
Row
>
<
Col
span=
{
3
}
>
Replyer:
</
Col
>
<
Col
span=
{
3
}
>
{
DataSave
.
Reply_name
}
</
Col
>
<
Col
span=
{
3
}
>
Contact:
</
Col
>
<
Col
>
{
DataSave
.
Reply_Contact
}
</
Col
>
</
Row
>
<
Row
gutter=
{
8
}
style=
{
{
marginTop
:
16
}
}
>
<
Col
span=
{
3
}
>
Examine:
</
Col
>
<
Col
span=
{
4
}
>
...
...
src/pages/CommercialService/Detail.tsx
View file @
02608e8a
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./css/Detail.less'
;
import
{
Input
,
Form
,
Row
,
Col
,
Upload
,
Spin
,
Button
,
Descriptions
}
from
'antd'
;
import
{
Form
,
Row
,
Col
,
Spin
,
Button
,
Descriptions
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
Dispatch
}
from
'umi'
;
import
{
connect
}
from
'umi'
;
import
TextArea
from
'antd/lib/input/TextArea'
;
import
{
PlusOutlined
}
from
'@ant-design/icons'
;
import
Line
from
'../../components/Line/Line'
;
import
TitleBack
from
'../../components/TitleBack/TitleBack'
;
import
PictureOptionsRow
from
'../../components/PictureOptions/PictureOptionsRow'
;
import
{
getCookie
}
from
'@/utils/method'
;
import
{
timestampToTime
}
from
'@/utils/time'
;
import
{
validateMessages
}
from
'@/utils/params'
;
const
treatStatus
=
[
'Pending'
,
'Processed'
];
...
...
@@ -20,7 +17,7 @@ const Detail = (props: any) => {
const
[
editorFlag
,
setEditorFlag
]
=
useState
(
true
);
const
{
dispatch
,
location
,
CurDataDetail
}
=
props
;
const
fromRef
=
useRef
(
null
);
const
fromRef
=
useRef
(
null
)
as
any
;
const
RA
=
(
index
:
any
,
values
:
any
)
=>
{
dispatch
({
type
:
'CommunityService/RA'
,
playload
:
{
index
:
index
,
body
:
values
}
});
};
...
...
@@ -74,6 +71,7 @@ const Detail = (props: any) => {
fromRef
.
current
.
setFieldsValue
(
tmp
);
}
setLoading
(
false
);
console
.
log
(
CurDataDetail
);
}
},
[
CurDataDetail
]);
...
...
@@ -158,9 +156,9 @@ const Detail = (props: any) => {
>
{
!
editorFlag
?
(
<
Row
gutter=
{
16
}
>
<
Col
>
Re
sponse
:
</
Col
>
<
Col
>
Re
plyer
:
</
Col
>
<
Col
span=
{
6
}
>
{
getCookie
(
'name'
)
}
</
Col
>
<
Col
>
Cont
ract Detail
:
</
Col
>
<
Col
>
Cont
act
:
</
Col
>
<
Col
>
{
getCookie
(
'phone'
)
}
</
Col
>
</
Row
>
)
:
null
}
...
...
src/pages/CommercialService/RenovationDetail.tsx
View file @
02608e8a
...
...
@@ -72,7 +72,7 @@ const RenovationDetail = (props: any) => {
<
Col
span=
{
3
}
>
{
DataSave
.
communityName
}
</
Col
>
<
Col
>
Unit:
</
Col
>
<
Col
>
{
DataSave
.
communityBuildDecorate
}
#
{
DataSave
.
communityFloorDecorate
}
-
{
DataSave
.
communityBuildDecorate
}
#
{
DataSave
.
communityFloorDecorate
}
-
{
DataSave
.
communityRoomDecoate
}
</
Col
>
</
Row
>
...
...
@@ -152,9 +152,9 @@ const RenovationDetail = (props: any) => {
)
:
(
<>
<
Row
>
<
Col
span=
{
3
}
>
repli
er:
</
Col
>
<
Col
span=
{
3
}
>
Reply
er:
</
Col
>
<
Col
span=
{
3
}
>
{
DataSave
.
replyName
}
</
Col
>
<
Col
span=
{
3
}
>
Phone
:
</
Col
>
<
Col
span=
{
3
}
>
Contact
:
</
Col
>
<
Col
>
{
DataSave
.
replyPhone
}
</
Col
>
</
Row
>
...
...
src/pages/CommercialService/css/index.less
View file @
02608e8a
...
...
@@ -59,7 +59,7 @@
position: absolute;
top: 34px;
left: 33px;
width:
26
0px;
width:
18
0px;
z-index: 10;
background-color: #fff;
min-height: 20px;
...
...
@@ -71,21 +71,21 @@
position: absolute;
top: 34px;
left: -87px;
width:
26
0px;
width:
18
0px;
z-index: 20;
background-color: #fff;
min-height: 20px;
}
}
.roomNumber {
:global(.ant-form-item-explain) {
position: absolute;
top: 34px;
left: -205px;
width: 260px;
z-index: 30;
background-color: #fff;
min-height: 20px;
}
}
//
.roomNumber {
//
:global(.ant-form-item-explain) {
//
position: absolute;
//
top: 34px;
//
left: -205px;
//
width: 260px;
//
z-index: 30;
//
background-color: #fff;
//
min-height: 20px;
//
}
//
}
src/pages/UserManagement/LIFEUserManagement/UsersAdd.tsx
View file @
02608e8a
...
...
@@ -7,18 +7,28 @@ import styles from './UsersAdd.less';
import
Line
from
'../../../components/Line/Line'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
import
SearchOptionsCommnity
from
'../../../components/SearchOptions/SearchOptionsCommnity'
;
import
{
checkParam
,
RA
}
from
'../../../utils/method'
;
import
{
checkParam
,
RA
,
Data4ErrorClear
}
from
'../../../utils/method'
;
import
{
validateMessages
}
from
'@/utils/params'
;
const
module
=
'User'
;
const
UsersAdd
=
(
props
:
any
)
=>
{
const
{
dispatch
,
communityInfo
}
=
props
;
const
{
dispatch
,
communityInfo
,
Data4Error
}
=
props
;
const
[
postman
,
setPostman
]
=
useState
({
extend
:
null
});
const
formRef
=
useRef
(
null
as
any
);
const
[
loading
,
setLoading
]
=
useState
(
false
);
useEffect
(()
=>
{
if
(
Data4Error
)
{
if
(
Data4Error
.
msg
)
{
setLoading
(
false
);
message
.
error
(
Data4Error
.
msg
,
3
);
Data4ErrorClear
(
module
,
dispatch
);
}
}
},
[
Data4Error
]);
const
onFinish
=
(
values
:
any
)
=>
{
if
(
postman
.
extend
!=
null
)
{
values
.
communityName
=
postman
.
extend
;
...
...
@@ -36,12 +46,14 @@ const UsersAdd = (props: any) => {
message
.
error
(
'Error,Please finish it,not empty!'
,
3
);
}
};
const
extendName
=
(
values
:
any
)
=>
{
var
tmp
=
postman
;
tmp
.
extend
=
values
;
RA
(
32
,
{
communityName
:
values
},
module
,
dispatch
);
setPostman
(
tmp
);
};
useEffect
(()
=>
{
if
(
communityInfo
!=
null
)
{
if
(
postman
.
extend
!=
null
)
{
...
...
@@ -156,11 +168,12 @@ const UsersAdd = (props: any) => {
};
function
mapStateToProps
(
state
:
any
)
{
const
{
DataSave
,
communityInfo
}
=
state
.
User
;
const
{
DataSave
,
communityInfo
,
Data4Error
}
=
state
.
User
;
return
{
DataSave
,
communityInfo
,
Data4Error
,
};
}
export
default
connect
(
mapStateToProps
)(
UsersAdd
);
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
View file @
02608e8a
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./Edit.less'
;
import
{
Input
,
Button
,
Form
,
Result
,
Pagination
,
Tooltip
,
Checkbox
,
Spin
,
Radio
,
message
,
}
from
'antd'
;
import
{
Link
,
useIntl
,
connect
,
history
}
from
'umi'
;
import
{
Input
,
Button
,
Form
,
Spin
,
Radio
,
message
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
SelectOptions
from
'../../../components/SelectOptions/index'
;
import
TitleBack
from
'../../../components/TitleBack/TitleBack'
;
...
...
@@ -21,8 +10,13 @@ import { RA } from '@/utils/method';
const
module
=
'User'
;
let
options
:
Array
<
{
label
:
string
;
value
:
number
}
>
=
[];
let
optionsList
:
{
serviceName
:
string
;
serviceCode
:
string
;
}[]
=
[];
const
Edit
=
(
props
:
any
)
=>
{
const
{
dispatch
,
CurData
,
SaveChooseData
,
location
,
CommunityList
,
DataServices
}
=
props
;
const
{
dispatch
,
CurData
,
SaveChooseData
,
CommunityList
,
DataServices
}
=
props
;
const
TosTosServiceProviderSave
=
(
values
:
any
)
=>
{
dispatch
({
type
:
'ServiceProvider/TosTosServiceProviderSave'
,
playload
:
values
});
};
...
...
@@ -44,12 +38,15 @@ const Edit = (props: any) => {
// 处理服务范围数据
useEffect
(()
=>
{
if
(
DataServices
!=
null
)
{
console
.
log
(
DataServices
);
options
=
DataServices
.
data
.
rows
.
map
((
v
:
any
)
=>
{
return
{
label
:
v
.
serviceName
,
value
:
v
.
serviceCode
,
};
});
optionsList
=
[...
DataServices
.
data
.
rows
];
}
},
[
DataServices
]);
...
...
@@ -69,20 +66,15 @@ const Edit = (props: any) => {
useEffect
(()
=>
{
if
(
SaveChooseData
!=
null
)
{
// console.log(SaveChooseData);
// console.log(options);
// let arr: Array<''> = [];
// SaveChooseData.serviceScopeList.forEach((v: any) => {
// options.forEach((ele: any) => {
// if (v === ele.value) {
// arr.push(ele.value as never);
// }
// });
// });
// console.log(arr);
// SaveChooseData.serviceScopeList = arr;
SaveChooseData
.
serviceScopeList
=
SaveChooseData
.
serviceScopeList
[
0
];
formRef
.
current
.
setFieldsValue
(
SaveChooseData
);
// 处理服务范围数据
optionsList
.
forEach
((
v
)
=>
{
if
(
v
.
serviceName
===
SaveChooseData
.
serviceScope
)
{
SaveChooseData
.
serviceScopeList
=
v
.
serviceCode
;
formRef
.
current
.
setFieldsValue
(
SaveChooseData
);
}
});
console
.
log
(
SaveChooseData
);
}
},
[
SaveChooseData
]);
...
...
@@ -97,6 +89,7 @@ const Edit = (props: any) => {
val
.
creator
=
'admin'
;
val
.
updater
=
'admin'
;
val
.
serviceScopeList
=
[
val
.
serviceScopeList
];
console
.
log
(
val
);
if
(
SaveChooseData
)
{
val
.
id
=
SaveChooseData
.
id
;
}
...
...
src/pages/UserManagement/ServiceProviderManagement/ServiceProviderManagement.tsx
View file @
02608e8a
...
...
@@ -59,17 +59,16 @@ const ServiceProviderManagement = (props: propsType) => {
message
.
error
(
'No Permissions!!!'
,
3
);
return
;
}
values
.
serviceScope
=
options
[
values
.
serviceScopeList
[
0
]][
1
];
SaveChooseData
(
values
);
if
(
values
.
serviceScopeList
[
0
].
toString
()
===
'0'
)
{
history
.
push
(
location
.
pathname
+
'/Detail'
);
}
else
if
(
values
.
serviceScopeList
[
0
].
toString
()
===
'1'
)
{
if
(
values
.
serviceScope
===
'Accountant'
)
{
history
.
push
(
location
.
pathname
+
'/AccoutingDetail'
);
}
else
{
history
.
push
(
'/404
'
);
history
.
push
(
location
.
pathname
+
'/Detail
'
);
}
};
const
goToEdit
=
(
values
:
object
,
e
:
any
)
=>
{
if
(
permissionArr
.
indexOf
(
'7'
)
<
0
)
{
message
.
error
(
'No Permissions!!!'
,
3
);
...
...
@@ -100,12 +99,12 @@ const ServiceProviderManagement = (props: propsType) => {
},
{
title
:
'Services Available'
,
dataIndex
:
'serviceScope
List
'
,
render
:
(
text
:
Array
<
''
>
,
record
:
object
)
=>
{
let
type
:
string
=
''
;
if
(
options
.
length
>
0
)
type
=
options
[
text
[
0
]][
1
];
return
type
;
},
dataIndex
:
'serviceScope'
,
//
render: (text: Array<''>, record: object) => {
//
let type: string = '';
//
if (options.length > 0) type = options[text[0]][1];
//
return type;
//
},
},
{
title
:
'Account Status'
,
dataIndex
:
'enable'
},
{
...
...
@@ -215,22 +214,22 @@ const ServiceProviderManagement = (props: propsType) => {
};
// 数据处理
//
const dataSource = (values: any) => {
//
let tmp = values;
//
for (let items in tmp) {
//
switch (tmp[items].enable) {
//
case 0:
//
tmp[items].enable = 'Normal';
//
break;
//
case 1:
//
tmp[items].enable = 'Deregistered';
//
break;
//
case 2:
//
break;
//
}
//
}
//
return tmp;
//
};
const
dataSource
=
(
values
:
any
)
=>
{
let
tmp
=
values
;
for
(
let
items
in
tmp
)
{
switch
(
tmp
[
items
].
enable
)
{
case
0
:
tmp
[
items
].
enable
=
'Normal'
;
break
;
case
1
:
tmp
[
items
].
enable
=
'Deregistered'
;
break
;
case
2
:
break
;
}
}
return
tmp
;
};
return
(
<
div
className=
{
styles
.
base
}
>
...
...
src/utils/method.ts
View file @
02608e8a
...
...
@@ -85,6 +85,9 @@ export const DataSaveDetailClear = (module: any, dispatch: any) => {
export
const
DataSaveClear
=
(
module
:
any
,
dispatch
:
any
)
=>
{
dispatch
({
type
:
module
+
'/DataSaveClear'
});
};
export
const
Data4ErrorClear
=
(
module
:
any
,
dispatch
:
any
)
=>
{
dispatch
({
type
:
module
+
'/Data4ErrorClear'
});
};
// const reg = [["url", "categoriesImageUrl"], ["name", "categoriesName"]]
// const values = [{ categoriesImageUrl: "http://url", categoriesName: "A9" },{ categoriesImageUrl: "http://url...", categoriesName: "A8" }]
export
const
Fromate
=
(
values
:
any
,
reg
:
any
)
=>
{
...
...
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