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
01e4a8da
Commit
01e4a8da
authored
Dec 10, 2020
by
Sixiang_Zzb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
小区服务 图片显示处理 新增服务商错误提示修改
parent
9cd8bfa2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
73 additions
and
35 deletions
+73
-35
CommunityService.ts
src/models/CommunityManagement/CommunityService.ts
+4
-4
ServiceProvider.ts
src/models/ServiceProvider.ts
+38
-8
Detail.tsx
src/pages/CommercialService/Detail.tsx
+8
-6
PropertyServices.tsx
src/pages/CommercialService/PropertyServices.tsx
+13
-13
Edit.tsx
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
+10
-4
No files found.
src/models/CommunityManagement/CommunityService.ts
View file @
01e4a8da
...
@@ -173,24 +173,24 @@ export default {
...
@@ -173,24 +173,24 @@ export default {
yield
put
({
type
:
'returnCurDataDetail'
,
CurDataDetail
});
yield
put
({
type
:
'returnCurDataDetail'
,
CurDataDetail
});
},
},
*
ResultClear
({},
{
put
}:
any
)
{
*
ResultClear
({
},
{
put
}:
any
)
{
var
Result
=
null
;
var
Result
=
null
;
console
.
log
(
'清除'
);
console
.
log
(
'清除'
);
yield
put
({
type
:
'returnResult'
,
Result
});
yield
put
({
type
:
'returnResult'
,
Result
});
},
},
*
DataSaveDetailClear
({},
{
put
}:
any
)
{
*
DataSaveDetailClear
({
},
{
put
}:
any
)
{
console
.
log
(
'清楚数据'
);
console
.
log
(
'清楚数据'
);
let
DataSaveDetail
=
null
;
let
DataSaveDetail
=
null
;
yield
put
({
type
:
'returnDataSaveDetail'
,
DataSaveDetail
});
yield
put
({
type
:
'returnDataSaveDetail'
,
DataSaveDetail
});
},
},
*
DataSaveClear
({},
{
put
}:
any
)
{
*
DataSaveClear
({
},
{
put
}:
any
)
{
let
DataSave
=
null
;
let
DataSave
=
null
;
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
yield
put
({
type
:
'returnDataSave'
,
DataSave
});
},
},
*
Data7Clear
({},
{
put
}:
any
)
{
*
Data7Clear
({
},
{
put
}:
any
)
{
let
Data7
=
null
;
let
Data7
=
null
;
yield
put
({
type
:
'returnPage7'
,
Data7
});
yield
put
({
type
:
'returnPage7'
,
Data7
});
},
},
...
...
src/models/ServiceProvider.ts
View file @
01e4a8da
import
*
as
service
from
'../services/tos'
;
import
*
as
service
from
'../services/tos'
;
import
{
message
}
from
'antd'
;
import
{
message
,
Modal
}
from
'antd'
;
export
default
{
export
default
{
namespace
:
'ServiceProvider'
,
namespace
:
'ServiceProvider'
,
...
@@ -27,6 +27,7 @@ export default {
...
@@ -27,6 +27,7 @@ export default {
return
{
...
state
,
SaveChooseData
};
return
{
...
state
,
SaveChooseData
};
},
},
returnCurData
(
state
:
object
,
{
CurData
}:
any
)
{
returnCurData
(
state
:
object
,
{
CurData
}:
any
)
{
console
.
log
(
CurData
)
return
{
...
state
,
CurData
};
return
{
...
state
,
CurData
};
},
},
returnResult
(
state
:
object
,
{
Result
}:
any
)
{
returnResult
(
state
:
object
,
{
Result
}:
any
)
{
...
@@ -56,17 +57,46 @@ export default {
...
@@ -56,17 +57,46 @@ export default {
console
.
log
(
playload
);
console
.
log
(
playload
);
const
resp
=
yield
call
(
service
.
TosTosServiceProviderSave
,
playload
);
const
resp
=
yield
call
(
service
.
TosTosServiceProviderSave
,
playload
);
console
.
log
(
resp
);
console
.
log
(
resp
);
if
(
resp
.
code
==
500
)
{
let
CurData
=
false
;
// 服务范围选择错误
yield
put
({
type
:
'returnCurData'
},
CurData
);
if
(
resp
.
error_code
===
"0002"
)
{
let
CurData
:
Boolean
=
false
;
yield
put
({
type
:
"returnCurData"
,
CurData
});
// message.error("Service scope selection error!!!")
Modal
.
error
({
title
:
'Service scope selection error'
,
content
:
'Accounting service / security service provider is a single option!!!'
,
});
return
;
}
// 小区选择错误
if
(
resp
.
error_code
===
"0003"
)
{
let
CurData
:
Boolean
=
false
;
yield
put
({
type
:
"returnCurData"
,
CurData
});
Modal
.
error
({
title
:
'Community selection error'
,
content
:
'You cannot select a community that already has a scope of service!!!'
,
});
return
;
}
// 提交失败
if
(
resp
.
error_code
===
"0001"
)
{
let
CurData
:
Boolean
=
false
;
yield
put
({
type
:
'returnCurData'
,
CurData
});
message
.
error
(
'Creation failed. Please try again!'
);
message
.
error
(
'Creation failed. Please try again!'
);
// window.location.href = '/500';
return
;
}
else
{
}
let
CurData
=
true
;
yield
put
({
type
:
'returnCurData'
},
CurData
);
// 创建成功
if
(
resp
.
error_code
===
"0000"
)
{
message
.
success
(
'Operator Success!'
,
1.5
,
()
=>
{
message
.
success
(
'Operator Success!'
,
1.5
,
()
=>
{
window
.
location
.
href
=
'/UserManagement/ServiceProviderManagement'
;
window
.
location
.
href
=
'/UserManagement/ServiceProviderManagement'
;
});
});
let
CurData
:
Boolean
=
true
;
yield
put
({
type
:
'returnCurData'
,
CurData
});
return
;
}
}
},
},
...
...
src/pages/CommercialService/Detail.tsx
View file @
01e4a8da
...
@@ -112,8 +112,8 @@ const Detail = (props: any) => {
...
@@ -112,8 +112,8 @@ const Detail = (props: any) => {
<
Descriptions
.
Item
label=
"Address"
span=
{
3
}
>
<
Descriptions
.
Item
label=
"Address"
span=
{
3
}
>
{
CurDataDetail
.
address
}{
' '
}
{
CurDataDetail
.
address
}{
' '
}
</
Descriptions
.
Item
>
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"User Name"
>
{
CurDataDetail
.
name
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"User Name"
span=
{
3
}
>
{
CurDataDetail
.
name
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Contact Details"
>
{
CurDataDetail
.
phone
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
label=
"Contact Details"
>
{
CurDataDetail
.
phone
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
CurDataDetail
.
email
}
</
Descriptions
.
Item
>
<
Descriptions
.
Item
>
{
CurDataDetail
.
email
}
</
Descriptions
.
Item
>
</
Descriptions
>
</
Descriptions
>
<
Row
gutter=
{
16
}
>
<
Row
gutter=
{
16
}
>
...
@@ -131,17 +131,19 @@ const Detail = (props: any) => {
...
@@ -131,17 +131,19 @@ const Detail = (props: any) => {
<
Col
span=
{
3
}
>
Picture:
</
Col
>
<
Col
span=
{
3
}
>
Picture:
</
Col
>
<
Col
>
<
Col
>
{
CurDataDetail
!=
null
?
(
{
CurDataDetail
!=
null
?
(
<
PictureOptionsRow
<
PictureOptionsRow
action=
"/tos/communtiy/service/reply/img"
action=
"/tos/communtiy/service/reply/img"
disabled=
{
true
}
disabled=
{
true
}
defaultValue=
{
CurDataDetail
.
pictrues
}
// defaultValue=
{
v
.
url
}
value=
{
CurDataDetail
.
pictrues
}
data=
{
{
data=
{
{
userToken
:
'token'
,
userToken
:
'token'
,
imageType
:
'tosCommunityImageReply'
,
imageType
:
'tosCommunityImageReply'
,
extends
:
''
,
extends
:
''
,
}
}
}
}
//
/>
/>
)
:
null
}
)
:
null
}
</
Col
>
</
Col
>
</
Row
>
</
Row
>
...
@@ -215,8 +217,8 @@ const Detail = (props: any) => {
...
@@ -215,8 +217,8 @@ const Detail = (props: any) => {
</
Spin
>
</
Spin
>
</>
</>
)
:
(
)
:
(
<></>
<></>
)
}
)
}
</
div
>
</
div
>
);
);
};
};
...
...
src/pages/CommercialService/PropertyServices.tsx
View file @
01e4a8da
...
@@ -49,19 +49,19 @@ const PropertyServices = (props: any) => {
...
@@ -49,19 +49,19 @@ const PropertyServices = (props: any) => {
// const [readyData, setReadyData] = useState(null);
// const [readyData, setReadyData] = useState(null);
const
columns
=
[
const
columns
=
[
{
title
:
'Community
Name
'
,
dataIndex
:
'community_name'
},
{
title
:
'Community'
,
dataIndex
:
'community_name'
},
{
title
:
'
Owner Name
'
,
dataIndex
:
'owner_name'
},
{
title
:
'
Requestor
'
,
dataIndex
:
'owner_name'
},
{
{
title
:
parseInt
(
serviceTypeGobal
)
-
1
===
0
?
'
Replier
'
:
'Content'
,
title
:
parseInt
(
serviceTypeGobal
)
-
1
===
0
?
'
Attended By
'
:
'Content'
,
dataIndex
:
parseInt
(
serviceTypeGobal
)
-
1
===
0
?
'handle_name'
:
'service_content'
,
dataIndex
:
parseInt
(
serviceTypeGobal
)
-
1
===
0
?
'handle_name'
:
'service_content'
,
ellipsis
:
true
,
ellipsis
:
true
,
width
:
400
,
//
width: 400,
render
:
(
text
:
any
)
=>
<
Space
size=
"middle"
>
{
text
!=
null
?
text
:
'
--
'
}
</
Space
>,
render
:
(
text
:
any
)
=>
<
Space
size=
"middle"
>
{
text
!=
null
?
text
:
''
}
</
Space
>,
},
},
{
{
title
:
'
Create
Time'
,
title
:
'
Submission
Time'
,
dataIndex
:
'create_time'
,
dataIndex
:
'create_time'
,
render
:
(
text
:
any
,
record
:
any
)
=>
(
render
:
(
text
:
any
,
record
:
any
)
=>
(
<
Space
size=
"middle"
>
{
timestampToTime3
(
text
.
time
)
}
</
Space
>
<
Space
size=
"middle"
>
{
timestampToTime3
(
text
.
time
)
}
</
Space
>
...
@@ -93,13 +93,13 @@ const PropertyServices = (props: any) => {
...
@@ -93,13 +93,13 @@ const PropertyServices = (props: any) => {
//页面递进
//页面递进
history
.
push
(
history
.
push
(
location
.
pathname
+
location
.
pathname
+
(
value
==
0
?
'/Edit'
:
'/Detail'
)
+
(
value
==
0
?
'/Edit'
:
'/Detail'
)
+
urlEncode
({
urlEncode
({
serviceType
:
serviceTypeGobal
,
serviceType
:
serviceTypeGobal
,
id
:
record
.
id
,
id
:
record
.
id
,
user_id
:
record
.
user_id
,
user_id
:
record
.
user_id
,
community_id
:
record
.
community_id
,
community_id
:
record
.
community_id
,
}),
}),
);
);
};
};
...
...
src/pages/UserManagement/ServiceProviderManagement/Edit.tsx
View file @
01e4a8da
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useRef
}
from
'react'
;
import
styles
from
'./Edit.less'
;
import
styles
from
'./Edit.less'
;
import
{
Input
,
Button
,
Form
,
Spin
,
Radio
,
message
}
from
'antd'
;
import
{
Input
,
Button
,
Form
,
Spin
,
Radio
,
message
,
Checkbox
}
from
'antd'
;
import
{
connect
,
history
}
from
'umi'
;
import
{
connect
,
history
}
from
'umi'
;
...
@@ -48,6 +48,11 @@ const Edit = (props: any) => {
...
@@ -48,6 +48,11 @@ const Edit = (props: any) => {
optionsList
=
[...
DataServices
.
data
.
rows
];
optionsList
=
[...
DataServices
.
data
.
rows
];
}
}
return
()
=>
{
}
},
[
DataServices
]);
},
[
DataServices
]);
// 判断是否有小区列表数据返回
// 判断是否有小区列表数据返回
...
@@ -88,7 +93,7 @@ const Edit = (props: any) => {
...
@@ -88,7 +93,7 @@ const Edit = (props: any) => {
val
.
serviceCommunityList
=
CList
;
val
.
serviceCommunityList
=
CList
;
val
.
creator
=
'admin'
;
val
.
creator
=
'admin'
;
val
.
updater
=
'admin'
;
val
.
updater
=
'admin'
;
val
.
serviceScopeList
=
[
val
.
serviceScopeList
]
;
// val.serviceScopeList = val.serviceScopeList
;
if
(
SaveChooseData
)
{
if
(
SaveChooseData
)
{
val
.
id
=
SaveChooseData
.
id
;
val
.
id
=
SaveChooseData
.
id
;
}
}
...
@@ -157,8 +162,8 @@ const Edit = (props: any) => {
...
@@ -157,8 +162,8 @@ const Edit = (props: any) => {
},
},
]
}
]
}
>
>
{
/* <Checkbox.Group options={options as any} /> */
}
<
Checkbox
.
Group
options=
{
options
as
any
}
/>
<
Radio
.
Group
options=
{
options
as
any
}
/>
{
/* <Radio.Group options={options as any} /> */
}
</
Form
.
Item
>
</
Form
.
Item
>
</
div
>
</
div
>
</
div
>
</
div
>
...
@@ -233,6 +238,7 @@ function mapStateToProps(state: any) {
...
@@ -233,6 +238,7 @@ function mapStateToProps(state: any) {
const
{
CurData
,
SaveChooseData
}
=
state
.
ServiceProvider
;
const
{
CurData
,
SaveChooseData
}
=
state
.
ServiceProvider
;
const
{
DataServices
}
=
state
.
User
;
const
{
DataServices
}
=
state
.
User
;
const
{
CommunityList
}
=
state
.
Init
;
const
{
CommunityList
}
=
state
.
Init
;
console
.
log
(
CurData
)
return
{
return
{
CurData
,
CurData
,
SaveChooseData
,
SaveChooseData
,
...
...
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