Browse Source

fix(): 客诉工单页面修改

tags/PMS_Frontend_v1.0.6-develop
fengxiang 1 year ago
parent
commit
648dcb3ec9
  1. 27
      src/pages/OperationCenter/CustomerServieMgm/ComplainManage/index.scss
  2. 180
      src/pages/OperationCenter/CustomerServieMgm/ComplainManage/loadable.jsx
  3. 1
      src/pages/OperationCenter/CustomerServieMgm/ComplainStat/echartsOptions.jsx
  4. 36
      src/services/OperationCenter/CustomerManage/index.js

27
src/pages/OperationCenter/CustomerServieMgm/ComplainManage/index.scss

@ -236,6 +236,7 @@ $color-primary: var(--color-primary);
} }
.ant-table-body { .ant-table-body {
overflow-y: auto !important;
@include scrollBar(var(--color-user-list-bg), #3b97ff); @include scrollBar(var(--color-user-list-bg), #3b97ff);
} }
} }
@ -466,7 +467,7 @@ $color-primary: var(--color-primary);
border-top: 1px solid #434343; border-top: 1px solid #434343;
border-left: 1px solid #434343; border-left: 1px solid #434343;
&.pl-form .pl-item{
&.pl-form .pl-item {
margin-bottom: 10px; margin-bottom: 10px;
} }
@ -478,6 +479,11 @@ $color-primary: var(--color-primary);
&.pl-item-lg { &.pl-item-lg {
width: 100%; width: 100%;
>span:last-child {
padding-left: 10px;
text-align: left;
}
} }
>span { >span {
@ -536,23 +542,8 @@ $color-primary: var(--color-primary);
.ant-table { .ant-table {
.ant-table-body { .ant-table-body {
// overflow-y: auto !important;
&::-webkit-scrollbar-track-piece,
&::-webkit-scrollbar-corner,
&::-webkit-scrollbar-track {
background: #9da2ab;
}
&::-webkit-scrollbar {
width: 4px;
height: 4px;
}
&::-webkit-scrollbar-thumb {
background: #3B97FF;
border-radius: 2px;
}
overflow-y: auto !important;
@include scrollBar(var(--color-user-list-bg), #3b97ff);
} }
.ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table, .ant-table.ant-table-bordered>.ant-table-container>.ant-table-content>table,

180
src/pages/OperationCenter/CustomerServieMgm/ComplainManage/loadable.jsx

@ -45,7 +45,7 @@ function ComplainManage(props) {
]; ];
// //
const defaultData = { const defaultData = {
tab: "1", //
tab: "1", //
order_num: "", // order_num: "", //
source: "", // source: "", //
order_type: "", // order_type: "", //
@ -94,8 +94,11 @@ function ComplainManage(props) {
const [tabLoading, setTabLoading] = useState(false); const [tabLoading, setTabLoading] = useState(false);
// //
const [resultData, setResultData] = useState({ const [resultData, setResultData] = useState({
data: [],
total_records: 0,
wait_num: 0, //
follow_num: 0, //
over_num: 0, //
total: 0, //
list: [], //
}); });
// //
@ -231,11 +234,11 @@ function ComplainManage(props) {
// //
const exportData = () => { const exportData = () => {
let data = { ...holdData, ...pageInfo }; let data = { ...holdData, ...pageInfo };
ajax.getExportOrder(data).then((res) => {
ajax.getComplainExport(data).then((res) => {
if (res?.data?.url) { if (res?.data?.url) {
window.open(res.data.url); window.open(res.data.url);
} else { } else {
message.error("暂无文件");
message.error("导出异常");
} }
}); });
}; };
@ -256,7 +259,7 @@ function ComplainManage(props) {
}, },
{ {
title: "来源", title: "来源",
dataIndex: "source",
dataIndex: "source_name",
}, },
{ {
title: "联系人", title: "联系人",
@ -268,7 +271,7 @@ function ComplainManage(props) {
}, },
{ {
title: "工单类型", title: "工单类型",
dataIndex: "order_type",
dataIndex: "order_type_name",
}, },
{ {
title: "派单时间", title: "派单时间",
@ -284,7 +287,7 @@ function ComplainManage(props) {
}, },
{ {
title: "状态", title: "状态",
dataIndex: "status",
dataIndex: "status_name",
}, },
{ {
title: "操作", title: "操作",
@ -317,7 +320,6 @@ function ComplainManage(props) {
// console.log(param.key, record); // console.log(param.key, record);
if (param.key == "2") { if (param.key == "2") {
// //
getProblemSelect1();
setIsDeal(true); setIsDeal(true);
} else { } else {
// //
@ -328,15 +330,13 @@ function ComplainManage(props) {
// //
const getDetail = (obj) => { const getDetail = (obj) => {
ajax.getComplainList({ id: obj?.id }).then(
ajax.getComplainDetail({ id: obj?.id }).then(
(res) => { (res) => {
if (parseInt(res?.status) === 20000) { if (parseInt(res?.status) === 20000) {
let { create_data, park_data, history_data, deal_data } =
res?.data || {};
setCreateData(create_data || {});
let { base_data, park_data, history_data } = res?.data || {};
setCreateData(base_data || {});
setParkData(park_data || []); setParkData(park_data || []);
setHistoryData(history_data || []); setHistoryData(history_data || []);
setDealData(deal_data || {});
setActKey2(["1", "2", "3", "4"]); setActKey2(["1", "2", "3", "4"]);
setVisible2(true); setVisible2(true);
} else { } else {
@ -361,20 +361,9 @@ function ComplainManage(props) {
(res) => { (res) => {
setLoading(false); setLoading(false);
setTabLoading(false); setTabLoading(false);
if (res?.status === 20000) {
let resDataArr = res?.data?.list
? res.data.list.map((item) => {
item.key = item.id;
return item;
})
: [];
setResultData({
...resultData,
data: resDataArr,
total_records: res?.data?.total || 0,
});
if (parseInt(res?.status) === 20000) {
setResultData(res?.data || {});
} else { } else {
setResultData({ data: [], total_records: 0 });
message.error(res.message); message.error(res.message);
} }
}, },
@ -395,6 +384,13 @@ function ComplainManage(props) {
}; };
useEffect(() => { useEffect(() => {
if (isDeal) {
getProblemSelect1();
setDealData({});
}
}, [isDeal]);
useEffect(() => {
setSessionTabList({ ...formData }); setSessionTabList({ ...formData });
}, [formData]); }, [formData]);
@ -409,8 +405,8 @@ function ComplainManage(props) {
// position: ["bottomCenter"], // position: ["bottomCenter"],
showQuickJumper: true, showQuickJumper: true,
showSizeChanger: true, showSizeChanger: true,
// showTotal: () => ` ${resultData.total_records || 0} `,
total: resultData?.total_records,
// showTotal: () => ` ${resultData.total || 0} `,
total: resultData?.total,
current: pageInfo.pn, current: pageInfo.pn,
pageSize: pageInfo.page_size, pageSize: pageInfo.page_size,
pageSizeOptions: Array.from( pageSizeOptions: Array.from(
@ -496,42 +492,42 @@ function ComplainManage(props) {
const columns1 = [ const columns1 = [
{ {
title: "停车场", title: "停车场",
dataIndex: "order_num",
dataIndex: "road",
align: "center", align: "center",
}, },
{ {
title: "泊位号", title: "泊位号",
dataIndex: "source",
dataIndex: "berth_id",
align: "center", align: "center",
}, },
{ {
title: "计费类型", title: "计费类型",
dataIndex: "person",
dataIndex: "charge_type",
align: "center", align: "center",
}, },
{ {
title: "车牌号", title: "车牌号",
dataIndex: "phone",
dataIndex: "plate",
align: "center", align: "center",
}, },
{ {
title: "入场时间", title: "入场时间",
dataIndex: "send_time",
dataIndex: "in_time",
align: "center", align: "center",
}, },
{ {
title: "出场时间", title: "出场时间",
dataIndex: "end_time",
dataIndex: "out_time",
align: "center", align: "center",
}, },
{ {
title: "停车时长", title: "停车时长",
dataIndex: "order_type",
dataIndex: "parking_duration",
align: "center", align: "center",
}, },
{ {
title: "应收金额", title: "应收金额",
dataIndex: "order_type",
dataIndex: "receivable_amount",
align: "center", align: "center",
}, },
]; ];
@ -539,32 +535,32 @@ function ComplainManage(props) {
const columns2 = [ const columns2 = [
{ {
title: "处理时间", title: "处理时间",
dataIndex: "order_num",
dataIndex: "deal_time",
align: "center", align: "center",
}, },
{ {
title: "处理人", title: "处理人",
dataIndex: "source",
dataIndex: "deal_person",
align: "center", align: "center",
}, },
{ {
title: "市级平台订单号", title: "市级平台订单号",
dataIndex: "person",
dataIndex: "sjpt_num",
align: "center", align: "center",
}, },
{ {
title: "问题一级分类", title: "问题一级分类",
dataIndex: "phone",
dataIndex: "wtyj_sort",
align: "center", align: "center",
}, },
{ {
title: "问题二级分类", title: "问题二级分类",
dataIndex: "order_type",
dataIndex: "wtej_sort",
align: "center", align: "center",
}, },
{ {
title: "处理方式", title: "处理方式",
dataIndex: "send_time",
dataIndex: "deal_way",
align: "center", align: "center",
}, },
]; ];
@ -721,7 +717,9 @@ function ComplainManage(props) {
} }
if ( if (
["1", "2"].includes(createData?.source) && ["1", "2"].includes(createData?.source) &&
!moment(createData.end_time).isAfter(moment(createData.tx_time))
!moment(createData.end_time, "YYYY-MM-DD").isAfter(
moment(createData.tx_time, "YYYY-MM-DD")
)
) { ) {
message.error("截止时间必须在提醒时间之后"); message.error("截止时间必须在提醒时间之后");
return false; return false;
@ -734,14 +732,14 @@ function ComplainManage(props) {
if (!checkDate()) { if (!checkDate()) {
return; return;
} }
ajax.getComplainList({ ...createData, flag }).then(
ajax.getComplainCreate({ ...createData, flag }).then(
(res) => { (res) => {
if (parseInt(res?.status) === 20000) { if (parseInt(res?.status) === 20000) {
message.success(res?.message); message.success(res?.message);
setVisible1(false); setVisible1(false);
if (flag == 1) { if (flag == 1) {
setIsDeal(true); setIsDeal(true);
getDetail(res?.data?.id);
getDetail(res?.data);
} else { } else {
setIsAjax(!isAjax); setIsAjax(!isAjax);
} }
@ -786,12 +784,12 @@ function ComplainManage(props) {
return; return;
} }
const newObj = { const newObj = {
create_data: createData,
base_data: createData,
park_data: parkData, park_data: parkData,
deal_data: dealData, deal_data: dealData,
// history_data:historyData, // history_data:historyData,
}; };
ajax.getComplainList(newObj).then(
ajax.getComplainDeal(newObj).then(
(res) => { (res) => {
if (parseInt(res?.status) === 20000) { if (parseInt(res?.status) === 20000) {
message.success(res?.message); message.success(res?.message);
@ -807,6 +805,7 @@ function ComplainManage(props) {
} }
); );
}; };
// //
const handleSaveSort = () => { const handleSaveSort = () => {
if (sortData?.tab == "1" && !rowData?.sort1) { if (sortData?.tab == "1" && !rowData?.sort1) {
@ -885,6 +884,7 @@ function ComplainManage(props) {
setProblemArr2([]); setProblemArr2([]);
} }
}; };
// //
const getSortSelect1 = () => { const getSortSelect1 = () => {
ajax.getComplainList().then( ajax.getComplainList().then(
@ -905,6 +905,7 @@ function ComplainManage(props) {
} }
); );
}; };
// //
const getRuleSelect = () => { const getRuleSelect = () => {
ajax.getComplainList().then( ajax.getComplainList().then(
@ -1445,8 +1446,9 @@ function ComplainManage(props) {
placeholder="全部" placeholder="全部"
value={formData?.status || undefined} value={formData?.status || undefined}
options={[ options={[
{ value: "1", label: "跟进中" },
{ value: "2", label: "未处理" },
{ value: "1", label: "未处理" },
{ value: "2", label: "跟进中" },
// { value: "3", label: "" },
]} ]}
onChange={(e) => setFormData({ ...formData, status: e })} onChange={(e) => setFormData({ ...formData, status: e })}
/> />
@ -1499,21 +1501,15 @@ function ComplainManage(props) {
<div className="row-head"> <div className="row-head">
<span className="number-wrapper"> <span className="number-wrapper">
<span className="letter">共查询到</span> <span className="letter">共查询到</span>
<span className="total-number">
{resultData.total_records || 0}
</span>
<span className="total-number">{resultData.total || 0}</span>
<span className="letter">条结果待处理</span> <span className="letter">条结果待处理</span>
<span className="total-number">
{resultData.total_records || 0}
</span>
<span className="total-number">{resultData.wait_num || 0}</span>
<span className="letter">跟进中</span> <span className="letter">跟进中</span>
<span className="total-number"> <span className="total-number">
{resultData.total_records || 0}
{resultData.follow_num || 0}
</span> </span>
<span className="letter">已超期</span> <span className="letter">已超期</span>
<span className="total-number">
{resultData.total_records || 0}
</span>
<span className="total-number">{resultData.over_num || 0}</span>
</span> </span>
<div> <div>
<Button <Button
@ -1549,13 +1545,13 @@ function ComplainManage(props) {
</div> </div>
<ResultFlowResult <ResultFlowResult
ajaxLoad={tabLoading} ajaxLoad={tabLoading}
resultData={resultData?.data || []}
resultData={resultData?.list || []}
> >
<Table <Table
// bordered // bordered
// className="yisa-table" // className="yisa-table"
rowKey={(row, index) => row?.id || index} rowKey={(row, index) => row?.id || index}
dataSource={resultData?.data || []}
dataSource={resultData?.list || []}
columns={columns} columns={columns}
pagination={false} pagination={false}
loading={tabLoading} loading={tabLoading}
@ -1590,8 +1586,9 @@ function ComplainManage(props) {
> >
<Collapse <Collapse
className="custom-collapse" className="custom-collapse"
activeKey={actKey1}
expandIconPosition={"end"} expandIconPosition={"end"}
collapsible="icon"
activeKey={actKey1}
onChange={setActKey1} onChange={setActKey1}
> >
<Panel header="客诉信息" key="1"> <Panel header="客诉信息" key="1">
@ -1626,8 +1623,9 @@ function ComplainManage(props) {
> >
<Collapse <Collapse
className="custom-collapse" className="custom-collapse"
activeKey={actKey2}
expandIconPosition={"end"} expandIconPosition={"end"}
collapsible="icon"
activeKey={actKey2}
onChange={setActKey2} onChange={setActKey2}
> >
<Panel <Panel
@ -1651,7 +1649,7 @@ function ComplainManage(props) {
<div className="pl-group"> <div className="pl-group">
<div className="pl-item"> <div className="pl-item">
<span>客诉来源</span> <span>客诉来源</span>
<span>{createData?.order_num || "-"}</span>
<span>{createData?.source_name || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>工单编号</span> <span>工单编号</span>
@ -1659,47 +1657,47 @@ function ComplainManage(props) {
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>工单类型</span> <span>工单类型</span>
<span>{createData?.order_num || "-"}</span>
<span>{createData?.order_type_name || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>被反映单位</span> <span>被反映单位</span>
<span>{createData?.order_num || "-"}</span>
<span>{createData?.reaction_unit || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>承办单位</span> <span>承办单位</span>
<span>{createData?.order_num || "-"}</span>
<span>{createData?.undertake_unit || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>联系人姓名</span> <span>联系人姓名</span>
<span>{createData?.order_num || "-"}</span>
<span>{createData?.person || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>联系电话</span> <span>联系电话</span>
<span>{createData?.order_num || "-"}</span>
<span>{createData?.phone || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>是否重复投诉</span> <span>是否重复投诉</span>
<span>{createData?.order_num || "-"}</span>
<span>{createData?.is_repeat_name || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>平台派单时间</span> <span>平台派单时间</span>
<span>{createData?.order_num || "-"}</span>
<span>{createData?.ptpd_time || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>城管委派单时间</span> <span>城管委派单时间</span>
<span>{createData?.order_num || "-"}</span>
<span>{createData?.cgwpd_time || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>提醒时间</span> <span>提醒时间</span>
<span>{createData?.order_num || "-"}</span>
<span>{createData?.tx_time || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>截止时间</span> <span>截止时间</span>
<span>{createData?.order_num || "-"}</span>
<span>{createData?.end_time || "-"}</span>
</div> </div>
<div className="pl-item pl-item-lg"> <div className="pl-item pl-item-lg">
<span>投诉具体内容</span> <span>投诉具体内容</span>
<span>{createData?.order_num || "-"}</span>
<span>{createData?.specific_content || "-"}</span>
</div> </div>
</div> </div>
)} )}
@ -1735,7 +1733,7 @@ function ComplainManage(props) {
rowKey={(row, index) => row?.id || index} rowKey={(row, index) => row?.id || index}
dataSource={parkData || []} dataSource={parkData || []}
columns={isDeal ? getNewColumns() : columns1} columns={isDeal ? getNewColumns() : columns1}
scroll={{ y: "300px" }}
scroll={{ y: "260px" }}
pagination={false} pagination={false}
/> />
</Panel> </Panel>
@ -1899,7 +1897,7 @@ function ComplainManage(props) {
dataSource={historyData || []} dataSource={historyData || []}
columns={columns2} columns={columns2}
pagination={false} pagination={false}
scroll={{ y: "300px" }}
scroll={{ y: "275px" }}
/> />
</Panel> </Panel>
) : null} ) : null}
@ -2130,7 +2128,7 @@ function ComplainManage(props) {
dataSource={tableData?.data || []} dataSource={tableData?.data || []}
columns={columns1} columns={columns1}
rowSelection={rowSelection} rowSelection={rowSelection}
scroll={{ y: "300px" }}
scroll={{ y: "550px" }}
pagination={false} pagination={false}
/> />
<Pagination {...paginationProps1} className="pagination-common" /> <Pagination {...paginationProps1} className="pagination-common" />
@ -2163,43 +2161,43 @@ function ComplainManage(props) {
<div className="pl-group"> <div className="pl-group">
<div className="pl-item"> <div className="pl-item">
<span>车牌号</span> <span>车牌号</span>
<span>{recordDetail?.order_num || "-"}</span>
<span>{recordDetail?.plate || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>停车场名称</span> <span>停车场名称</span>
<span>{recordDetail?.order_num || "-"}</span>
<span>{recordDetail?.road || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>泊位号</span> <span>泊位号</span>
<span>{recordDetail?.order_num || "-"}</span>
<span>{recordDetail?.berth_id || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>入场时间</span> <span>入场时间</span>
<span>{recordDetail?.order_num || "-"}</span>
<span>{recordDetail?.in_time || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>出场时间</span> <span>出场时间</span>
<span>{recordDetail?.order_num || "-"}</span>
<span>{recordDetail?.out_time || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>停车时长</span> <span>停车时长</span>
<span>{recordDetail?.order_num || "-"}</span>
<span>{recordDetail?.parking_duration || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>计费类型</span> <span>计费类型</span>
<span>{recordDetail?.order_num || "-"}</span>
<span>{recordDetail?.charge_type || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>应收金额</span> <span>应收金额</span>
<span>{recordDetail?.order_num || "-"}</span>
<span>{recordDetail?.receivable_amount || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>入场设备类型</span> <span>入场设备类型</span>
<span>{recordDetail?.order_num || "-"}</span>
<span>{recordDetail?.in_device || "-"}</span>
</div> </div>
<div className="pl-item"> <div className="pl-item">
<span>出场设备类型</span> <span>出场设备类型</span>
<span>{recordDetail?.order_num || "-"}</span>
<span>{recordDetail?.out_device || "-"}</span>
</div> </div>
</div> </div>
<div className="pic-wrapper"> <div className="pic-wrapper">
@ -2208,7 +2206,7 @@ function ComplainManage(props) {
<Image <Image
preview={false} preview={false}
fallback={errorPic} fallback={errorPic}
src={recordDetail?.in_pic || ""}
src={recordDetail?.in_img || ""}
/> />
</div> </div>
<div className="pic-txt">出场照片</div> <div className="pic-txt">出场照片</div>
@ -2216,7 +2214,7 @@ function ComplainManage(props) {
<Image <Image
preview={false} preview={false}
fallback={errorPic} fallback={errorPic}
src={recordDetail?.out_pic || ""}
src={recordDetail?.out_img || ""}
/> />
</div> </div>
</div> </div>

1
src/pages/OperationCenter/CustomerServieMgm/ComplainStat/echartsOptions.jsx

@ -197,6 +197,7 @@ function render3DBars(arr) {
newArr = arr.map((v, i) => { newArr = arr.map((v, i) => {
return { return {
type: 'custom', type: 'custom',
name: v?.name || "数量",
renderItem: (params, api) => { renderItem: (params, api) => {
const location = api.coord([api.value(0), api.value(1)]) const location = api.coord([api.value(0), api.value(1)])
return { return {

36
src/services/OperationCenter/CustomerManage/index.js

@ -89,6 +89,38 @@ const getComplainList = (params) => {
data: params, data: params,
}); });
}; };
//客服管理-客诉工单-导出
const getComplainExport = (params) => {
return ajax({
url: "/api/ope/service/complain_export",
type: "post",
data: params,
});
};
//客服管理-客诉工单-详情
const getComplainDetail = (params) => {
return ajax({
url: "/api/ope/service/complain_detail",
type: "post",
data: params,
});
};
//客服管理-客诉工单-创建
const getComplainCreate = (params) => {
return ajax({
url: "/api/ope/service/complain_create",
type: "post",
data: params,
});
};
//客服管理-客诉工单-处理
const getComplainDeal = (params) => {
return ajax({
url: "/api/ope/service/complain_deal",
type: "post",
data: params,
});
};
//客服管理-客诉统计-数据 //客服管理-客诉统计-数据
const getComplainStatistics = (params) => { const getComplainStatistics = (params) => {
return ajax({ return ajax({
@ -109,5 +141,9 @@ export default{
passData, passData,
rejectData, rejectData,
getComplainList, getComplainList,
getComplainExport,
getComplainDetail,
getComplainCreate,
getComplainDeal,
getComplainStatistics, getComplainStatistics,
} }
Loading…
Cancel
Save