diff --git a/src/pages/OperationCenter/CustomerServieMgm/ComplainManage/index.scss b/src/pages/OperationCenter/CustomerServieMgm/ComplainManage/index.scss index 5ac0a12..00d8b30 100644 --- a/src/pages/OperationCenter/CustomerServieMgm/ComplainManage/index.scss +++ b/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, diff --git a/src/pages/OperationCenter/CustomerServieMgm/ComplainManage/loadable.jsx b/src/pages/OperationCenter/CustomerServieMgm/ComplainManage/loadable.jsx index 96e0e62..56c719f 100644 --- a/src/pages/OperationCenter/CustomerServieMgm/ComplainManage/loadable.jsx +++ b/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) {