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
af67086e
Commit
af67086e
authored
Nov 20, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
测试bug修复
parent
19afdaad
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
86 additions
and
116 deletions
+86
-116
Card.tsx
src/pages/CommercialService/Card.tsx
+3
-0
CardAdd.tsx
src/pages/CommercialService/CardAdd.tsx
+2
-32
CardDetail.tsx
src/pages/CommercialService/CardDetail.tsx
+13
-5
Detail.tsx
src/pages/CommercialService/Detail.tsx
+5
-8
RenovationDetail.tsx
src/pages/CommercialService/RenovationDetail.tsx
+2
-2
index.less
src/pages/CommercialService/css/index.less
+13
-13
Edit.tsx
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
+22
-29
ServiceProviderManagement.tsx
...t/ServiceProviderManagement/ServiceProviderManagement.tsx
+26
-27
No files found.
src/pages/CommercialService/Card.tsx
View file @
af67086e
...
...
@@ -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 @
af67086e
...
...
@@ -67,21 +67,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 +78,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 +146,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 +173,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 @
af67086e
...
...
@@ -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,12 @@ const CardDetail = (props: any) => {
<
Col
span=
{
3
}
>
{
DataSave
.
community_name
}
</
Col
>
<
Col
>
Unit:
</
Col
>
<
Col
>
{
DataSave
.
build_number
+
'#'
+
DataSave
.
floor_number
+
'-'
+
DataSave
.
room_number
}
{
'BLK '
+
DataSave
.
build_number
+
'#'
+
DataSave
.
floor_number
+
'-'
+
DataSave
.
room_number
}
</
Col
>
</
Row
>
...
...
@@ -159,6 +161,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 @
af67086e
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
}
});
};
...
...
@@ -158,9 +155,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 @
af67086e
...
...
@@ -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 @
af67086e
...
...
@@ -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/ServiceProviderManagement/Edit.tsx
View file @
af67086e
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 @
af67086e
...
...
@@ -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
}
>
...
...
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