Commit 93acc448 authored by MrShi's avatar MrShi

[fix] 查询小区服务商,信息栏显示

parent e892b86e
...@@ -51,9 +51,11 @@ const ServiceProviderManagement = (props: any) => { ...@@ -51,9 +51,11 @@ const ServiceProviderManagement = (props: any) => {
const columns = [ const columns = [
{ title: "Service Provider",dataIndex: 'providerName',}, { title: "Service Provider",dataIndex: 'providerName',},
{ title: "contact Name",dataIndex: 'contactName',},
{ title: "Contacts",dataIndex: 'contactPhone',}, { title: "Contacts",dataIndex: 'contactPhone',},
{ title: "Contact Details",dataIndex: 'contactEmail',}, /*{ title: "Contact Details",dataIndex: 'contactEmail',},*/
{ title: "Services Available",dataIndex: 'enable',}, { title: "Services Available",dataIndex: 'serviceScope',},
{ title: "Account Status",dataIndex: 'enable',}, { title: "Account Status",dataIndex: 'enable',},
{ title: "Actions", { title: "Actions",
render: (text: any, record: any) => ( render: (text: any, record: any) => (
...@@ -70,6 +72,33 @@ const ServiceProviderManagement = (props: any) => { ...@@ -70,6 +72,33 @@ const ServiceProviderManagement = (props: any) => {
case 2:break; case 2:break;
} }
} }
for (let items in tmp) {
switch (tmp[items].serviceScope) {
case 0: tmp[items].serviceScope = "清洁";break;
case 1: tmp[items].serviceScope = "维修";break;
case 2:tmp[items].serviceScope = "保安";break;
case 3:tmp[items].serviceScope = "会计";break;
}
}
// for (let items in tmp) {
// for(let i=0; i<tmp[items].serviceScopeList.length;i++){
// if(tmp[items].serviceScopeList[i] == '0'){
// tmp[items].serviceScopeList[i] = '清洁'
// continue
// }else if(tmp[items].serviceScopeList[i] == '1'){
// tmp[items].serviceScopeList[i] = '维修'
// continue
// }else if(tmp[items].serviceScopeList[i] == '2'){
// tmp[items].serviceScopeList[i] = '保安'
// continue
// }else if(tmp[items].serviceScopeList[i] == '3'){
// tmp[items].serviceScopeList[i] = '会计'
// continue
// }
// }
// }
return tmp; return tmp;
} }
...@@ -79,7 +108,8 @@ const ServiceProviderManagement = (props: any) => { ...@@ -79,7 +108,8 @@ const ServiceProviderManagement = (props: any) => {
//页面搜索 //页面搜索
TosTosServiceProviderGet({ TosTosServiceProviderGet({
providerName: comment.providerName, providerName: comment.providerName,
serviceCommunityList: CommunityList serviceScope:comment.status,
serviceCommunityList: comment.serviceCommunityList
}) })
// history.push(location.pathname+urlEncode(filterObj({ providerName: comment.providerName}))) // history.push(location.pathname+urlEncode(filterObj({ providerName: comment.providerName})))
} }
...@@ -92,6 +122,10 @@ const ServiceProviderManagement = (props: any) => { ...@@ -92,6 +122,10 @@ const ServiceProviderManagement = (props: any) => {
<TitleSearch <TitleSearch
listkey={["providerName"]} listkey={["providerName"]}
list={["Service Provider"]} list={["Service Provider"]}
status={[{
name: ["status", "服务范围"],
data: [[null, "全部"], [0, "清洁"], [1, "维修"], [2, "保安"], [3, "会计"]]
}]}
community={"serviceCommunityList"} community={"serviceCommunityList"}
onSubmit={CallBackTitleSearch} /> onSubmit={CallBackTitleSearch} />
......
...@@ -9,6 +9,7 @@ export function service_1001(values: any) { ...@@ -9,6 +9,7 @@ export function service_1001(values: any) {
console.log(values) console.log(values)
return request('/api/ServiceProvider/get',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}}) return request('/api/ServiceProvider/get',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
} }
export function service_1002(values: any) { export function service_1002(values: any) {
console.log(values) console.log(values)
return request('/api/ServiceProvider/getById',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}}) return request('/api/ServiceProvider/getById',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
...@@ -23,4 +24,4 @@ export function get(values: any) { ...@@ -23,4 +24,4 @@ export function get(values: any) {
export function getSecurityGuarder(values: any) { export function getSecurityGuarder(values: any) {
console.log(values) console.log(values)
return request('/tos/securityGuarder/get',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}}) return request('/tos/securityGuarder/get',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment