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 {
overflow-y: auto !important;
@include scrollBar(var(--color-user-list-bg), #3b97ff);
}
}
@ -466,7 +467,7 @@ $color-primary: var(--color-primary);
border-top: 1px solid #434343;
border-left: 1px solid #434343;
&.pl-form .pl-item{
&.pl-form .pl-item {
margin-bottom: 10px;
}
@ -478,6 +479,11 @@ $color-primary: var(--color-primary);
&.pl-item-lg {
width: 100%;
>span:last-child {
padding-left: 10px;
text-align: left;
}
}
>span {
@ -536,23 +542,8 @@ $color-primary: var(--color-primary);
.ant-table {
.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,

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

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

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

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

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

@ -89,6 +89,38 @@ const getComplainList = (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) => {
return ajax({
@ -109,5 +141,9 @@ export default{
passData,
rejectData,
getComplainList,
getComplainExport,
getComplainDetail,
getComplainCreate,
getComplainDeal,
getComplainStatistics,
}
Loading…
Cancel
Save