Commit 93acc448 authored by MrShi's avatar MrShi

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

parent e892b86e
......@@ -51,9 +51,11 @@ const ServiceProviderManagement = (props: any) => {
const columns = [
{ title: "Service Provider",dataIndex: 'providerName',},
{ title: "contact Name",dataIndex: 'contactName',},
{ title: "Contacts",dataIndex: 'contactPhone',},
{ title: "Contact Details",dataIndex: 'contactEmail',},
{ title: "Services Available",dataIndex: 'enable',},
/*{ title: "Contact Details",dataIndex: 'contactEmail',},*/
{ title: "Services Available",dataIndex: 'serviceScope',},
{ title: "Account Status",dataIndex: 'enable',},
{ title: "Actions",
render: (text: any, record: any) => (
......@@ -70,6 +72,33 @@ const ServiceProviderManagement = (props: any) => {
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;
}
......@@ -79,7 +108,8 @@ const ServiceProviderManagement = (props: any) => {
//页面搜索
TosTosServiceProviderGet({
providerName: comment.providerName,
serviceCommunityList: CommunityList
serviceScope:comment.status,
serviceCommunityList: comment.serviceCommunityList
})
// history.push(location.pathname+urlEncode(filterObj({ providerName: comment.providerName})))
}
......@@ -92,6 +122,10 @@ const ServiceProviderManagement = (props: any) => {
<TitleSearch
listkey={["providerName"]}
list={["Service Provider"]}
status={[{
name: ["status", "服务范围"],
data: [[null, "全部"], [0, "清洁"], [1, "维修"], [2, "保安"], [3, "会计"]]
}]}
community={"serviceCommunityList"}
onSubmit={CallBackTitleSearch} />
......
......@@ -9,6 +9,7 @@ export function service_1001(values: any) {
console.log(values)
return request('/api/ServiceProvider/get',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
}
export function service_1002(values: any) {
console.log(values)
return request('/api/ServiceProvider/getById',{method: 'POST',body: JSON.stringify(values),headers:{ 'Content-Type': 'application/json'}})
......
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