From 92eb0d0183b921e68061501afd79fad108c21213 Mon Sep 17 00:00:00 2001 From: janedididada <105195341+janedididada@users.noreply.github.com> Date: Wed, 13 Dec 2023 09:19:42 +0800 Subject: [PATCH 01/10] =?UTF-8?q?feat():=E8=A7=A3=E5=86=B3=E9=83=A8?= =?UTF-8?q?=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OrderInquiry/OrderChangeInquiry/index.jsx | 526 ++++++---- .../OrderInquiry/ParkingOrderInquiry/index.jsx | 4 +- .../OrderInquiry/ReturnOrderInquiry/index.jsx | 1049 ++++++++++++-------- .../OrderInquiry/ReturnOrderInquiry/index.scss | 95 ++ src/pages/FinancialMgm/PayConf/AppConf/index.scss | 9 + .../FinancialMgm/PayConf/PayMerchantConf/index.jsx | 6 +- .../InRoadMgm/EquipmentMgm/NvrMgm/loadable.jsx | 2 +- .../DisabledCarParkRecordTotal/loadable.jsx | 4 + src/pages/InRoadMgm/RoadMgm/AddRoad/loadable.jsx | 2 +- .../InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx | 12 +- .../OperationCenter/CarMgm/CarAuth/index.scss | 3 + .../OperationCenter/UserMgm/UserInfo/loadable.jsx | 5 +- .../OutRoadMgm/OutDeviceMgm/OutNvrMgm/loadable.jsx | 11 +- .../OutSegmentMgm/OutSegment/loadable.jsx | 1 + 14 files changed, 1124 insertions(+), 605 deletions(-) diff --git a/src/pages/FinancialMgm/OrderInquiry/OrderChangeInquiry/index.jsx b/src/pages/FinancialMgm/OrderInquiry/OrderChangeInquiry/index.jsx index f1a290e..50999cb 100644 --- a/src/pages/FinancialMgm/OrderInquiry/OrderChangeInquiry/index.jsx +++ b/src/pages/FinancialMgm/OrderInquiry/OrderChangeInquiry/index.jsx @@ -1,11 +1,21 @@ import React, { useState, useEffect } from "react"; import { ResultFlowResult } from "@/components"; -import { Select, Input, Button, Table, message, Pagination, DatePicker, Modal, Tooltip } from "antd"; +import { + Select, + Input, + Button, + Table, + message, + Pagination, + DatePicker, + Modal, + Tooltip, +} from "antd"; import { useSessionStorageState } from "ahooks"; import { useNavigate } from "react-router-dom"; import { setTabList } from "@/store/common.js"; import { useSelector, useDispatch } from "react-redux"; -import { QuestionCircleFilled } from "@ant-design/icons" +import { QuestionCircleFilled } from "@ant-design/icons"; import moment from "moment"; import "./index.scss"; import ajax from "@/services"; @@ -22,15 +32,21 @@ function EditOrderInquiry(props) { { defaultValue: null } ); const [detailVisible, setDetailVisible] = useState(false); - const [bigpicVisible, setBigpicVisible] = useState(false);//大图展示 + const [bigpicVisible, setBigpicVisible] = useState(false); //大图展示 const [bigPic, setBigPic] = useState(); - const [ycddData, setYcddData] = useState([])//详情数据 - const [detailTable, setDetailTable] = useState([]) + const [ycddData, setYcddData] = useState([]); //详情数据 + const [detailTable, setDetailTable] = useState([]); // 默认数据 const defaultData = { - start_time: moment().subtract(7, "days").startOf("day").format("YYYY-MM-DD HH:mm:ss"), + start_time: moment() + .subtract(7, "days") + .startOf("day") + .format("YYYY-MM-DD HH:mm:ss"), end_time: moment().endOf("day").format("YYYY-MM-DD HH:mm:ss"), - deal_time_start: moment().subtract(7, "days").startOf("day").format("YYYY-MM-DD HH:mm:ss"), + deal_time_start: moment() + .subtract(7, "days") + .startOf("day") + .format("YYYY-MM-DD HH:mm:ss"), deal_time_end: moment().endOf("day").format("YYYY-MM-DD HH:mm:ss"), //app_name: "", // 应用名称 //app_type: 0, //应用类型 @@ -59,27 +75,30 @@ function EditOrderInquiry(props) { const [total, setTotal] = useState(false); const [detailTableData, setDetailTableData] = useState([]); const [searchSelectList, setSearchSelectList] = useState([]); //搜索下拉数据 - const [sessionTabList, setSessionTabList] = useSessionStorageState('editOrderInquiry', { - value: { + const [sessionTabList, setSessionTabList] = useSessionStorageState( + "editOrderInquiry", + { + value: {}, } - }) + ); useEffect(() => { if (sessionTabList && Object.values(sessionTabList).length > 0) { setFormData({ - ...formData, ...sessionTabList - }) + ...formData, + ...sessionTabList, + }); getData({ - ...sessionTabList - }) + ...sessionTabList, + }); } else { - getData() + getData(); } - }, [isAjax]) + }, [isAjax]); useEffect(() => { setSessionTabList({ - ...formData - }) - }, [formData]) + ...formData, + }); + }, [formData]); // useEffect(() => { // getSelectList(); // }, []); @@ -111,12 +130,12 @@ function EditOrderInquiry(props) { } setDefaultParams({ ...postData, ...pageInfo }); setTabLoading(true); - console.log(115, pageInfo, { ...postData, ...v, ...pageInfo }) + console.log(115, pageInfo, { ...postData, ...v, ...pageInfo }); ajax.getOrderChangeList({ ...postData, ...v, ...pageInfo }).then( (res) => { if (parseInt(res?.status) === 20000) { setResultData(res?.data.list || []); - setTotal(res.data.total) + setTotal(res.data.total); } else { message.error(res?.message); } @@ -136,7 +155,7 @@ function EditOrderInquiry(props) { (res) => { if (parseInt(res?.status) === 20000) { setYcddData(res?.data || []); - setDetailTable(res?.data?.order_update_detail) + setDetailTable(res?.data?.order_update_detail); } else { message.error(res?.message); } @@ -201,11 +220,17 @@ function EditOrderInquiry(props) { width: 160, render: (text) => ( <> - { - navigator.clipboard.writeText(`${text}`).then(() => { message.success("已复制到剪切板") }); - }}>{text} + { + navigator.clipboard.writeText(`${text}`).then(() => { + message.success("已复制到剪切板"); + }); + }} + > + {text} + - ) + ), }, { title: "业务订单类型", @@ -220,11 +245,17 @@ function EditOrderInquiry(props) { width: 160, render: (text) => ( <> - { - navigator.clipboard.writeText(`${text}`).then(() => { message.success("已复制到剪切板") }); - }}>{text} + { + navigator.clipboard.writeText(`${text}`).then(() => { + message.success("已复制到剪切板"); + }); + }} + > + {text} + - ) + ), }, { title: "订单金额(元)", @@ -271,13 +302,18 @@ function EditOrderInquiry(props) { title: "操作", align: "center", width: 140, - fixed: 'right', + fixed: "right", render: (val, row, index) => { return ( - { handleView(row); }}> + { + handleView(row); + }} + > 查看 ); @@ -312,11 +348,17 @@ function EditOrderInquiry(props) { align: "center", render: (text) => ( <> - { - navigator.clipboard.writeText(`${text}`).then(() => { message.success("已复制到剪切板") }); - }}>{text} + { + navigator.clipboard.writeText(`${text}`).then(() => { + message.success("已复制到剪切板"); + }); + }} + > + {text} + - ) + ), }, { title: "抵扣修改金额", @@ -346,102 +388,194 @@ function EditOrderInquiry(props) { ]; // 查看 const handleView = (row) => { - getDetailData({ deal_record_id: row.deal_record_id, park_record_id: row.park_record_id }) - setDetailVisible(true) + getDetailData({ + deal_record_id: row.deal_record_id, + park_record_id: row.park_record_id, + }); + setDetailVisible(true); }; //订单详情 - const tkddModal =
-
停车订单:{ycddData.park_record_id}
-
车厂详情
-
-
-
停车场名称
{ycddData?.order_info?.parking_detail.road_name || "--"}
-
-
-
区域
{ycddData?.order_info?.parking_detail.region_name || "--"}
-
-
-
商户名称
{ycddData?.order_info?.parking_detail.operator_name || "--"}
-
-
-
泊位号
{ycddData?.order_info?.parking_detail.berth_id || "--"}
-
-
-
车场类型
{ycddData?.order_info?.parking_detail.parking_model_type_name || "--"}
-
-
- -
车辆详情
-
-
-
车牌号
{ycddData?.order_info?.vehicle_detail.plate || "--"}
+ const tkddModal = ( +
+
+
停车订单:{ycddData.park_record_id}
+
-
-
停车时长
{ycddData?.order_info?.vehicle_detail.parking_duration || "--"}
+
+
车厂详情
-
-
入场时间
{ycddData?.order_info?.vehicle_detail.in_time || "--"}
-
-
-
出场时间
{ycddData?.order_info?.vehicle_detail.out_time || "--"}
-
-
-
入场记录来源
{ycddData?.order_info?.vehicle_detail.in_source_name || "--"}
-
-
-
出场记录来源
{ycddData?.order_info?.vehicle_detail.out_source_name || "--"}
-
-
-
证据图像
+
+
+
停车场名称
+
+ {ycddData?.order_info?.parking_detail.road_name || "--"} +
+
+
+
区域
+
+ {ycddData?.order_info?.parking_detail.region_name || "--"} +
+
+
+
商户名称
+
+ {ycddData?.order_info?.parking_detail.operator_name || "--"} +
+
+
+
泊位号
+
+ {ycddData?.order_info?.parking_detail.berth_id || "--"} +
+
+
+
车场类型
+
+ {ycddData?.order_info?.parking_detail.parking_model_type_name || + "--"} +
+
-
-
订单详情:{ycddData?.refund_id}
-
-
-
应收金额
{ycddData?.order_info?.order_detail.receivable_amount || "--"}
-
-
-
优惠总计
{ycddData?.order_info?.order_detail.preferential_amount || "--"}
-
-
-
实付总计
{ycddData?.order_info?.order_detail.actual_amount || "--"}
+
+
车辆详情
-
-
欠费总计
{ycddData?.order_info?.order_detail.arrears_mount || "--"}
+
+
+
车牌号
+
+ {ycddData?.order_info?.vehicle_detail.plate || "--"} +
+
+
+
停车时长
+
+ {ycddData?.order_info?.vehicle_detail.parking_duration || "--"} +
+
+
+
入场时间
+
+ {ycddData?.order_info?.vehicle_detail.in_time || "--"} +
+
+
+
出场时间
+
+ {ycddData?.order_info?.vehicle_detail.out_time || "--"} +
+
+
+
入场记录来源
+
+ {ycddData?.order_info?.vehicle_detail.in_source_name || "--"} +
+
+
+
出场记录来源
+
+ {ycddData?.order_info?.vehicle_detail.out_source_name || "--"} +
+
+
-
-
修改信息:{ycddData?.refund_id}
-
-
-
修改原因
{ycddData?.update_info?.update_reason || "--"}
-
-
-
欠费金额修改
{ycddData?.update_info?.receivable_amount || "--"}
+
+
订单详情:{ycddData?.refund_id}
-
-
修改金额
{ycddData?.update_info?.receivable_amount_exception || "--"}
+
+
+
应收金额
+
+ {ycddData?.order_info?.order_detail.receivable_amount || "--"} +
+
+
+
优惠总计
+
+ {ycddData?.order_info?.order_detail.preferential_amount || "--"} +
+
+
+
实付总计
+
+ {ycddData?.order_info?.order_detail.actual_amount || "--"} +
+
+
+
欠费总计
+
+ {ycddData?.order_info?.order_detail.arrears_mount || "--"} +
+
-
-
优惠金额修改
{ycddData?.update_info?.preferential_amount || "--"}
+
+
修改信息:{ycddData?.refund_id}
+
-
-
退款方式
{ycddData?.update_info?.refund_type_name || "--"}
+
+
+
修改原因
+
+ {ycddData?.update_info?.update_reason || "--"} +
+
+
+
欠费金额修改
+
+ {ycddData?.update_info?.receivable_amount || "--"} +
+
+
+
修改金额
+
+ {ycddData?.update_info?.receivable_amount_exception || "--"} +
+
+
+
优惠金额修改
+
+ {ycddData?.update_info?.preferential_amount || "--"} +
+
+
+
退款方式
+
+ {ycddData?.update_info?.refund_type_name || "--"} +
+
+
+
退款金额共计
+
+ {ycddData?.update_info?.actual_refund || "--"} +
+
-
-
退款金额共计
{ycddData?.update_info?.actual_refund || "--"}
+
+
订单修改明细
+
+ -
订单修改明细
-
- + ); // 导出 const handleExport = () => { if (resultData.list?.length > 0) { @@ -531,50 +665,48 @@ function EditOrderInquiry(props) { placeholder="请选择" options={[ { - value: '0', - label: '全部' + value: "0", + label: "全部", }, { - value: '1', - label: '停车订单' + value: "1", + label: "停车订单", }, { - value: '2', - label: '充电订单' + value: "2", + label: "充电订单", }, { - value: '3', - label: '充值订单' + value: "3", + label: "充值订单", }, { - value: '4', - label: '停车卡订单' + value: "4", + label: "停车卡订单", }, { - value: '5', - label: '充电预约订单' + value: "5", + label: "充电预约订单", }, { - value: '6', - label: '停车预约订单' + value: "6", + label: "停车预约订单", }, { - value: '7', - label: '错峰订单' + value: "7", + label: "错峰订单", }, { - value: '8', - label: '预付费订单' + value: "8", + label: "预付费订单", }, { - value: '9', - label: '商家预付费订单' + value: "9", + label: "商家预付费订单", }, ]} value={formData.parking_type} - onChange={(v) => - setFormData({ ...formData, parking_type: v }) - } + onChange={(v) => setFormData({ ...formData, parking_type: v })} />
@@ -594,20 +726,31 @@ function EditOrderInquiry(props) { className="form-con" showTime allowClear={false} - value={formData.start_time ? moment(formData.start_time) : undefined} - onChange={(date, dateString) => setFormData({ ...formData, start_time: dateString })} + value={ + formData.start_time ? moment(formData.start_time) : undefined + } + onChange={(date, dateString) => + setFormData({ ...formData, start_time: dateString }) + } disabledDate={(current) => current > moment(formData.end_time)} />
+
setFormData({ ...formData, end_time: dateString })} - disabledDate={(current) => current < moment(formData.start_time)} + value={ + formData.end_time ? moment(formData.end_time) : undefined + } + onChange={(date, dateString) => + setFormData({ ...formData, end_time: dateString }) + } + disabledDate={(current) => + current < moment(formData.start_time) + } />
@@ -616,9 +759,17 @@ function EditOrderInquiry(props) { className="form-con" showTime allowClear={false} - value={formData.deal_time_start ? moment(formData.deal_time_start) : undefined} - onChange={(date, dateString) => setFormData({ ...formData, deal_time_start: dateString })} - disabledDate={(current) => current > moment(formData.deal_time_end)} + value={ + formData.deal_time_start + ? moment(formData.deal_time_start) + : undefined + } + onChange={(date, dateString) => + setFormData({ ...formData, deal_time_start: dateString }) + } + disabledDate={(current) => + current > moment(formData.deal_time_end) + } />
@@ -627,9 +778,17 @@ function EditOrderInquiry(props) { className="form-con" showTime allowClear={false} - value={formData.deal_time_end ? moment(formData.deal_time_end) : undefined} - onChange={(date, dateString) => setFormData({ ...formData, deal_time_end: dateString })} - disabledDate={(current) => current < moment(formData.deal_time_start)} + value={ + formData.deal_time_end + ? moment(formData.deal_time_end) + : undefined + } + onChange={(date, dateString) => + setFormData({ ...formData, deal_time_end: dateString }) + } + disabledDate={(current) => + current < moment(formData.deal_time_start) + } />
@@ -652,9 +811,7 @@ function EditOrderInquiry(props) { }, ]} value={formData.status_id} - onChange={(v) => - setFormData({ ...formData, status_id: v }) - } + onChange={(v) => setFormData({ ...formData, status_id: v })} />
@@ -709,23 +866,27 @@ function EditOrderInquiry(props) { { setDetailVisible(false); }} footer={[ - ]} + , + ]} > {tkddModal} { setBigpicVisible(false); @@ -733,22 +894,49 @@ function EditOrderInquiry(props) { footer={false} >
-
入场照片
+
+
入场照片
+
+
- +
- +
-
出场照片
+
+
出场照片
+
+
- +
- +
diff --git a/src/pages/FinancialMgm/OrderInquiry/ParkingOrderInquiry/index.jsx b/src/pages/FinancialMgm/OrderInquiry/ParkingOrderInquiry/index.jsx index a69c7c3..bddd5b5 100644 --- a/src/pages/FinancialMgm/OrderInquiry/ParkingOrderInquiry/index.jsx +++ b/src/pages/FinancialMgm/OrderInquiry/ParkingOrderInquiry/index.jsx @@ -301,14 +301,14 @@ function ParkingOrderInquiry(props) { type: "Select", label: "支付渠道", placeholder: "请选择支付渠道", - options: dictionary.PayChannel, + options: sysConfig.payment, }, {//11 name: "payment_equipment", type: "Select", label: "支付设备", placeholder: "请选择支付设备", - options: dictionary.PayDevice + options: sysConfig.Equipment }, {//12 name: "pay_type", diff --git a/src/pages/FinancialMgm/OrderInquiry/ReturnOrderInquiry/index.jsx b/src/pages/FinancialMgm/OrderInquiry/ReturnOrderInquiry/index.jsx index 01571d6..9acf50f 100644 --- a/src/pages/FinancialMgm/OrderInquiry/ReturnOrderInquiry/index.jsx +++ b/src/pages/FinancialMgm/OrderInquiry/ReturnOrderInquiry/index.jsx @@ -1,474 +1,677 @@ import React, { useState, useRef, useEffect } from "react"; import { - message, - Pagination, - Table, - Input, - Space, - Modal, - Button, - Select, - Tabs, - Descriptions, - Timeline + message, + Pagination, + Table, + Input, + Space, + Modal, + Button, + Select, + Tabs, + Descriptions, + Timeline, } from "antd"; import moment from "moment"; -import ajax from '@/config/ajax.js' +import ajax from "@/config/ajax.js"; import { TableModule } from "@/components"; import { dictionary } from "@/config/common.js"; import "./index.scss"; function ReturnOrderInquiry() { - const [memberId, setMemberId] = useState() - //构建表头 - const createCol = (label, name, type) => { - label.length == name.length ? null : console.log('参数缺失', name, label.length, name.length) - var arr = [] - label?.map((item, index) => { - let cm = { - title: item, - dataIndex: name[index], - key: name[index], - align: "center", - } - switch (item) { - case "序号": - cm.render = (text, record, index) => index + 1 - break - case "退款订单ID": - case "业务订单ID": - case "支付订单ID": - cm.render = (text) => ( - <> - { - navigator.clipboard.writeText(`${text}`).then(() => { message.success("已复制到剪切板") }); - }}>{text} - - ) - break - default: break - } - arr.push(cm) - }) - var obj = { - title: "操作", - dataIndex: "operation", - key: "operation", - fixed: "right", - align: "center", - } - switch (type) { - case 8: - obj.render = (text, record) => { - - return <> - {record.state_name == "退款失败" || record.state_name == "处理中" || record.state_name == "退款中" ? - { - refundre(record) - // setTkddVisible(true) - }}> - 重试 - - : null} - { - refundSearch(record) - setTkddVisible(true) - }}> - 详情 - - - } - arr.push(obj) - break - default: break - } - return arr + const [memberId, setMemberId] = useState(); + //构建表头 + const createCol = (label, name, type) => { + label.length == name.length + ? null + : console.log("参数缺失", name, label.length, name.length); + var arr = []; + label?.map((item, index) => { + let cm = { + title: item, + dataIndex: name[index], + key: name[index], + align: "center", + }; + switch (item) { + case "序号": + cm.render = (text, record, index) => index + 1; + break; + case "退款订单ID": + case "业务订单ID": + case "支付订单ID": + cm.render = (text) => ( + <> + { + navigator.clipboard.writeText(`${text}`).then(() => { + message.success("已复制到剪切板"); + }); + }} + > + {text} + + + ); + break; + default: + break; + } + arr.push(cm); + }); + var obj = { + title: "操作", + dataIndex: "operation", + key: "operation", + fixed: "right", + align: "center", + }; + switch (type) { + case 8: + obj.render = (text, record) => { + return ( + <> + {record.state_name == "退款失败" || + record.state_name == "处理中" || + record.state_name == "退款中" ? ( + { + refundre(record); + // setTkddVisible(true) + }} + > + 重试 + + ) : null} + { + refundSearch(record); + setTkddVisible(true); + }} + > + 详情 + + + ); + }; + arr.push(obj); + break; + default: + break; } - //退费记录检索条件 - const formRefundSearch = [ + return arr; + }; + //退费记录检索条件 + const formRefundSearch = [ + { + name: "refund_id", + type: "Input", + label: "退款订单号", + placeholder: "请输入退款订单号", + }, + { + name: "type", + type: "Select", + label: "业务订单类型", + defaultValue: "0", + options: [ + { + value: "0", + label: "全部", + }, + { + value: "1", + label: "停车订单", + }, + { + value: "2", + label: "充电订单", + }, + { + value: "3", + label: "充值订单", + }, + { + value: "4", + label: "停车卡订单", + }, + { + value: "5", + label: "充电预约订单", + }, + { + value: "6", + label: "停车预约订单", + }, + { + value: "7", + label: "错峰订单", + }, + { + value: "8", + label: "预付费订单", + }, + { + value: "9", + label: "商家预付费订单", + }, + ], + }, + { + name: "park_id", + type: "Input", + label: "业务订单ID", + placeholder: "请输入业务订单ID", + }, + { + name: "order_id", + type: "Input", + label: "支付订单ID", + placeholder: "请输入支付订单ID", + }, + { + name: "state", + type: "Select", + label: "退款状态", + options: [ + { + label: "全部", + value: 0, + }, { - name: "refund_id", - type: "Input", - label: "退款订单号", - placeholder: "请输入退款订单号", + label: "待确认", + value: 1, }, { - name: "type", - type: "Select", - label: "业务订单类型", - defaultValue:'0', - options: [ - { - value: '0', - label: '全部' - }, - { - value: '1', - label: '停车订单' - }, - { - value: '2', - label: '充电订单' - }, - { - value: '3', - label: '充值订单' - }, - { - value: '4', - label: '停车卡订单' - }, - { - value: '5', - label: '充电预约订单' - }, - { - value: '6', - label: '停车预约订单' - }, - { - value: '7', - label: '错峰订单' - }, - { - value: '8', - label: '预付费订单' - }, - { - value: '9', - label: '商家预付费订单' - }, - ], + label: "退款中", + value: 2, }, { - name: "park_id", - type: "Input", - label: "业务订单ID", - placeholder: "请输入业务订单ID", + label: "已完成", + value: 3, }, { - name: "order_id", - type: "Input", - label: "支付订单ID", - placeholder: "请输入支付订单ID", + label: "退款失败", + value: 4, }, + ], + defaultValue: 0, + }, + { + name: "reason", + type: "Select", + label: "退款原因", + defaultValue: 0, + options: [ { - name: "state", - type: "Select", - label: "退款状态", - options: [ - { - label: "全部", - value: 0, - }, - { - label: "待确认", - value: 1, - }, - { - label: "退款中", - value: 2, - }, - { - label: "已完成", - value: 3, - }, - { - label: "退款失败", - value: 4, - }, - ], - defaultValue:0, + label: "全部", + value: 0, }, { - name: "reason", - type: "Select", - label: "退款原因", - defaultValue:0, - options: [ - { - label: "全部", - value: 0, - }, - { - label: "重复支付退款", - value: 2, - }, - { - label: "异常支付退款", - value: 7, - }, - { - label: "异常订单处理", - value: 11, - }, - { - label: "自动平单退款", - value: 12, - }, - ], + label: "重复支付退款", + value: 2, }, { - name: "flow_id", - type: "Input", - label: "渠道流水号", - placeholder: "请输入渠道流水号", + label: "异常支付退款", + value: 7, }, { - name: "timePeriod", - type: "RangePicker", - label: "时间段", - defaultTitle: ['退款时间', '至'], - defaultValue: [moment().subtract(1, "month"), moment()], + label: "异常订单处理", + value: 11, }, - ]; - const [resultData, setResultData] = useState([]) - const [ycddData, setYcddData] = useState([])//详情数据 - const [detailVisible, setDetailVisible] = useState(false); - const [timesVisible, setTimesVisible] = useState(false); //退款尝试次数展开 - const [tkddVisible, setTkddVisible] = useState(false); - const [eaeVisible, setEaeVisible] = useState(false);//出入场图片 - const [bigpicVisible, setBigpicVisible] = useState(false);//大图展示 - const [bigPic, setBigPic] = useState(); - const [total, setTotal] = useState(0); + { + label: "自动平单退款", + value: 12, + }, + ], + }, + { + name: "flow_id", + type: "Input", + label: "渠道流水号", + placeholder: "请输入渠道流水号", + }, + { + name: "timePeriod", + type: "RangePicker", + label: "时间段", + defaultTitle: ["退款时间", "至"], + defaultValue: [moment().subtract(1, "month"), moment()], + }, + ]; + const [resultData, setResultData] = useState([]); + const [ycddData, setYcddData] = useState([]); //详情数据 + const [detailVisible, setDetailVisible] = useState(false); + const [timesVisible, setTimesVisible] = useState(false); //退款尝试次数展开 + const [tkddVisible, setTkddVisible] = useState(false); + const [eaeVisible, setEaeVisible] = useState(false); //出入场图片 + const [bigpicVisible, setBigpicVisible] = useState(false); //大图展示 + const [bigPic, setBigPic] = useState(); + const [total, setTotal] = useState(0); - //列表查询 - function search(e) { - var url = "/api/ope/record/get_refund_orders"//退费订单 - ajax({ - url: url, - type: "post", - data: { ...e, memberId: memberId, startTime: e?.start_time, endTime: e?.end_time }, - }).then((res) => { - let { status, data, total } = res - if (status == 20000) { - if (data.list) { - setResultData(data.list) - setTotal(data.total) - } else { - setResultData(data) - setTotal(total) - } - } else { - setResultData([]) - message.error(res.message) - } - }) - } - //退款订单详情 - function refundSearch(e) { - ajax({ - url: "/api/ope/record/refund_info", - type: "get", - data: { id: e.id }, - }).then((res) => { - let { status, data } = res - if (status == 20000) { - //setResultData(data) - setYcddData(data) - } else { - message.error(res.message) - } - }) - } - //退款重试 - function refundre(e) { - ajax({ - url: "/api/fin/order_search/refund_retry", - type: "post", - data: { refund_id: e.id }, - }).then((res) => { - let { status } = res - if (status == 20000) { - message.success(res.message) - } else { - message.error(res.message) - } - }) - } - //页面渲染 - function renderTable(columns, arr, dataSource, exportUrl) { - return ( - - ); - } + //列表查询 + function search(e) { + var url = "/api/ope/record/get_refund_orders"; //退费订单 + ajax({ + url: url, + type: "post", + data: { + ...e, + memberId: memberId, + startTime: e?.start_time, + endTime: e?.end_time, + }, + }).then((res) => { + let { status, data, total } = res; + if (status == 20000) { + if (data.list) { + setResultData(data.list); + setTotal(data.total); + } else { + setResultData(data); + setTotal(total); + } + } else { + setResultData([]); + message.error(res.message); + } + }); + } + //退款订单详情 + function refundSearch(e) { + ajax({ + url: "/api/ope/record/refund_info", + type: "get", + data: { id: e.id }, + }).then((res) => { + let { status, data } = res; + if (status == 20000) { + //setResultData(data) + setYcddData(data); + } else { + message.error(res.message); + } + }); + } + //退款重试 + function refundre(e) { + ajax({ + url: "/api/fin/order_search/refund_retry", + type: "post", + data: { refund_id: e.id }, + }).then((res) => { + let { status } = res; + if (status == 20000) { + message.success(res.message); + } else { + message.error(res.message); + } + }); + } + //页面渲染 + function renderTable(columns, arr, dataSource, exportUrl) { + return ( + + ); + } - //退款订单详情 - const tkddModal =
-
退款订单:{ycddData?.refund_id}
-
+ //退款订单详情 + const tkddModal = ( +
+
+
退款订单:{ycddData?.refund_id}
+
+
+
+
+
生成时间
+
{ycddData?.refund_time || "--"}
+
+
+
退款状态
+
{ycddData.refund_state || "--"}
+
+
+
支付渠道
+
{ycddData.payment_channels || "--"}
+
+
+
退款方式
+
{ycddData.refund_type || "--"}
+
+
+
应退实付金额
+
+ {ycddData.refund_actual_amount || "--"} +
+
+
+
已退实付金额
+
+ {ycddData.has_refund_actual_amount || "--"} +
+
+
+
应退优惠金额
+
+ {ycddData.refund_discount_amount || "--"} +
+
+
+
已退优惠金额
+
+ {ycddData.has_refund_discount_amount || "--"} +
+
+
+
退款尝试次数
+
+ {ycddData.try_count || "--"} + {timesVisible ? ( + { + setTimesVisible(false); + }} + > + 收起 + + ) : ( + { + setTimesVisible(true); + }} + > + 查看 + + )} +
+
+
+
最近尝试时间
+
{ycddData.latest_try_time || "--"}
+
+
+ {timesVisible ? ( + <> +
+
退款尝试详情
+
+
+ {/*
record.id} + /> */} + + ) : ( + <> +
+
支付订单:{ycddData.order_id}
+
+
+
-
生成时间
{ycddData?.refund_time || "--"}
+
平台商户
+
{ycddData.payment_operator_name}
-
退款状态
{ycddData.refund_state || "--"}
+
生成时间
+
{ycddData.payment_create_time}
-
支付渠道
{ycddData.payment_channels || "--"}
+
支付时间
+
{ycddData.pay_time}
-
退款方式
{ycddData.refund_type || "--"}
+
支付渠道
+
{ycddData.payment_channels}
-
应退实付金额
{ycddData.refund_actual_amount || "--"}
+
优惠金额
+
{ycddData.discount_amount}
-
已退实付金额
{ycddData.has_refund_actual_amount || "--"}
+
支付应用
+
{ycddData.payment_equipment}
-
应退优惠金额
{ycddData.refund_discount_amount || "--"}
+
实付金额
+
{ycddData.paid_in_money}
+
+
+
停车订单:{ycddData.park_record_id}
+
+
+
+
车厂详情
+
+
-
已退优惠金额
{ycddData.has_refund_discount_amount || "--"}
+
平台商户
+
{ycddData.payment_operator_name}
-
退款尝试次数
{ycddData.try_count || "--"} - {timesVisible ? - { setTimesVisible(false) }}>收起 : - { setTimesVisible(true) }}>查看} -
+
停车场名称
+
{ycddData?.road_name}
-
最近尝试时间
{ycddData.latest_try_time || "--"}
+
区域
+
{ycddData.area_name}
-
- {timesVisible ? <> -
退款尝试详情
- {/*
record.id} - /> */} - : - <> -
支付订单:{ycddData.order_id}
-
-
-
平台商户
{ycddData.payment_operator_name}
-
-
-
生成时间
{ycddData.payment_create_time}
-
-
-
支付时间
{ycddData.pay_time}
-
-
-
支付渠道
{ycddData.payment_equipment}
-
-
-
优惠金额
{ycddData.discount_amount}
-
-
-
支付应用
{ycddData.payment_equipment}
-
-
-
实付金额
{ycddData.paid_in_money}
-
-
-
停车订单:{ycddData.park_record_id}
-
车厂详情
-
-
-
平台商户
{ycddData.payment_operator_name}
-
-
-
停车场名称
{ycddData?.road_name}
-
-
-
区域
{ycddData.area_name}
-
-
-
商户名称
{ycddData.park_operator_name}
-
-
-
泊位号
{ycddData.berth_code}
-
-
-
车场类型
{ycddData.road_type}
-
-
-
车辆详情
-
-
-
车牌号
{ycddData.plate_number}
-
-
-
停车时长
{ycddData.parking_duration}
-
-
-
入场时间
{ycddData.in_time}
-
-
-
出场时间
{ycddData.out_time}
-
-
-
入场记录来源
{ycddData.inSource}
-
-
-
出场记录来源
{ycddData.outSource}
-
- -
- } + {/*
+
商户名称
+
{ycddData.park_operator_name}
+
+
+
泊位号
+
{ycddData.berth_code}
+
*/} +
+
车场类型
+
{ycddData.road_type}
+
+ +
+
车辆详情
+
+
+
+
车牌号
+
{ycddData.plate_number}
+
+
+
停车时长
+
{ycddData.parking_duration}
+
+
+
入场时间
+
{ycddData.in_time}
+
+
+
出场时间
+
{ycddData.out_time}
+
+
+
入场记录来源
+
{ycddData.inSource}
+
+
+
出场记录来源
+
{ycddData.outSource}
+
+ +
+ + )} + ); - return ( - <> - {renderTable( - createCol(['序号', '最近尝试时间', '支付渠道', '应退实付(元)', '应退优惠(元)', '退款原因', '退款申请时间', '退款订单ID', '业务订单类型', '业务订单ID', '支付订单类型', '支付订单ID', '渠道流水号', '状态'], - ['index', 'latest_try_time', 'payment_channels_name', 'refund_actual_amount', 'refund_discount_amount', 'reason_name', 'refund_time', 'id', 'parking_type_name', 'park_record_id', 'payment_type_name', 'payment_order_id', 'flow_id', 'state_name'], 8), - formRefundSearch, - resultData,'/api/ope/record/refund_export' - )} - { - setBigpicVisible(false); - }} - footer={false} - > -
-
- -
-
-
- { - setTkddVisible(false); - setYcddData([]); - }} - footer={[ - ]} - > - {tkddModal} - - - ); + return ( + <> + {renderTable( + createCol( + [ + "序号", + "最近尝试时间", + "支付渠道", + "应退实付(元)", + "应退优惠(元)", + "退款原因", + "退款申请时间", + "退款订单ID", + "业务订单类型", + "业务订单ID", + "支付订单类型", + "支付订单ID", + "渠道流水号", + "状态", + ], + [ + "index", + "latest_try_time", + "payment_channels_name", + "refund_actual_amount", + "refund_discount_amount", + "reason_name", + "refund_time", + "id", + "parking_type_name", + "park_record_id", + "payment_type_name", + "payment_order_id", + "flow_id", + "state_name", + ], + 8 + ), + formRefundSearch, + resultData, + "/api/ope/record/refund_export" + )} + { + setBigpicVisible(false); + }} + footer={false} + > +
+
+ +
+
+
+ { + setTkddVisible(false); + setYcddData([]); + }} + footer={[ + , + ]} + > + {tkddModal} + + { + setEaeVisible(false); + }} + footer={false} + > +
+
+
入场照片
+
+
+
+
+ +
+
+ +
+
+
+
出场照片
+
+
+
+
+ +
+
+ +
+
+
+
+ + ); } -export default ReturnOrderInquiry; \ No newline at end of file +export default ReturnOrderInquiry; diff --git a/src/pages/FinancialMgm/OrderInquiry/ReturnOrderInquiry/index.scss b/src/pages/FinancialMgm/OrderInquiry/ReturnOrderInquiry/index.scss index 9455417..84d9602 100644 --- a/src/pages/FinancialMgm/OrderInquiry/ReturnOrderInquiry/index.scss +++ b/src/pages/FinancialMgm/OrderInquiry/ReturnOrderInquiry/index.scss @@ -301,6 +301,101 @@ $color-primary: var(--color-primary); display: inline-block; font-size: 16px; } + .ltc-box { + width: 100%; + .ltc-box-title { + font-size: 18px; + font-weight: bolder; + width: 100%; + white-space: nowrap; + overflow: hidden; + .text { + display: inline-block; + } + .line { + display: inline-block; + border: 1px dotted #607092; + width: inherit; + margin-bottom: 6px; + } + .ltc-icon { + width: 5px; + background: #0080db; + height: 19px; + display: inline-block; + margin-right: 10px; + } + .ltc-btn { + display: inline-block; + border: 1px solid; + border-radius: 5px; + margin: 0 10px; + width: 60px; + height: 35px; + line-height: 35px; + text-align: center; + background: #409eff; + color: #fff; + font-weight: 100; + cursor: pointer; + } + .ltc-cancel { + background: #fff; + color: #000; + } + } + .ltc-box-line { + border: 1px solid #e7e7e7; + margin: 8px 0; + } + .ltc-box-in { + margin-left: 20px; + .ant-descriptions { + margin-left: 20px; + } + } + .ltc-title { + margin: auto; + width: 50%; + text-align: center; + font-size: 18px; + font-weight: 600; + } + .ltc-content { + margin: auto; + padding: 20px; + .ltc-item { + font-size: 14px; + margin: 6px 12px 6px 0; + display: inline-flex; + //width: 470px; + .new-item { + display: inline-block; + width: 120px; + height: 32px; + line-height: 32px; + background: rgba(150,161,192,0.24); + text-align: center; + } + .new-value { + display: inline-block; + width: 320px; + height: 32px; + line-height: 32px; + text-align: center; + background: #3E4557; + box-shadow: 0px 3px 8px 0px rgba(0,0,0,0.12); + } + .ltc-item-input { + display: inline-block; + width: 200px; + } + div { + width: 150px; + } + } + } + } } .cc-container { overflow: auto; diff --git a/src/pages/FinancialMgm/PayConf/AppConf/index.scss b/src/pages/FinancialMgm/PayConf/AppConf/index.scss index 0d23259..a745ccc 100644 --- a/src/pages/FinancialMgm/PayConf/AppConf/index.scss +++ b/src/pages/FinancialMgm/PayConf/AppConf/index.scss @@ -208,4 +208,13 @@ $color-primary : var(--color-primary); margin-left: 20px; } } + .form-container{ + .ant-form-item{ + .ant-form-item-label{ + label{ + line-height: 32px; + } + } + } + } } \ No newline at end of file diff --git a/src/pages/FinancialMgm/PayConf/PayMerchantConf/index.jsx b/src/pages/FinancialMgm/PayConf/PayMerchantConf/index.jsx index c1f33e8..752bc89 100644 --- a/src/pages/FinancialMgm/PayConf/PayMerchantConf/index.jsx +++ b/src/pages/FinancialMgm/PayConf/PayMerchantConf/index.jsx @@ -328,6 +328,7 @@ function MerchantConfiguration(props) { // 表单提交 const onFinish = (values) => { + console.log(values); ajax[values?.id ? "getPaymentMerchantEdit" : "getPaymentMerchantAdd"]({ ...values, }).then( @@ -485,7 +486,7 @@ function MerchantConfiguration(props) { type: "select", label: "服务窗", name: "service_window", - value: rowData?.service_window_name, + value: rowData?.service_window, options: platformToAppData?.service_window || [], required: false, allowClear: true, @@ -494,7 +495,7 @@ function MerchantConfiguration(props) { type: "select", label: "APP-支付宝", name: "alipay_app", - value: rowData?.alipay_app_name, + value: rowData?.alipay_app, options: platformToAppData?.alipay_app || [], required: false, allowClear: true, @@ -615,7 +616,6 @@ function MerchantConfiguration(props) { return null; } }; - return ( <>
diff --git a/src/pages/InRoadMgm/EquipmentMgm/NvrMgm/loadable.jsx b/src/pages/InRoadMgm/EquipmentMgm/NvrMgm/loadable.jsx index b45cc26..6627ceb 100644 --- a/src/pages/InRoadMgm/EquipmentMgm/NvrMgm/loadable.jsx +++ b/src/pages/InRoadMgm/EquipmentMgm/NvrMgm/loadable.jsx @@ -56,7 +56,7 @@ function Fence(props) { address: "", device_name: "", road_name: "", //路段名称 - operator: -1, //运营商 + operator: "0", //运营商 export: false, road_id: "", //所属路段 pn: 1, diff --git a/src/pages/InRoadMgm/RecordInquiry/DisabledCarParkRecordTotal/loadable.jsx b/src/pages/InRoadMgm/RecordInquiry/DisabledCarParkRecordTotal/loadable.jsx index 27f9df1..7244c18 100644 --- a/src/pages/InRoadMgm/RecordInquiry/DisabledCarParkRecordTotal/loadable.jsx +++ b/src/pages/InRoadMgm/RecordInquiry/DisabledCarParkRecordTotal/loadable.jsx @@ -727,6 +727,10 @@ function DisabledCarParkRecordTotal() { onCancel={() => { setCardVisible(false); }} + onOk={()=>{ + setCardVisible(false); + + }} >
diff --git a/src/pages/InRoadMgm/RoadMgm/AddRoad/loadable.jsx b/src/pages/InRoadMgm/RoadMgm/AddRoad/loadable.jsx index 555c089..d3ce383 100644 --- a/src/pages/InRoadMgm/RoadMgm/AddRoad/loadable.jsx +++ b/src/pages/InRoadMgm/RoadMgm/AddRoad/loadable.jsx @@ -148,7 +148,7 @@ function AddRoad() { function getAreaArr(data, id, path = []) { console.log(data); for (const item of data) { - if (item.id === id) { + if (item.id == id) { path.push(item.id); return path; } diff --git a/src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx b/src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx index 7b4c23f..f4b1154 100644 --- a/src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx +++ b/src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx @@ -856,8 +856,9 @@ function ConfigRoad() { }, }; //form子组件 - const formRef = React.createRef(); - console.log(showBerthSelect); + // const formRef = React.createRef(); + const formRef=useRef() + //收费员管理 const tollCollector = { form: [ @@ -1180,6 +1181,7 @@ function ConfigRoad() { .then((res) => { if (res.status === 20000) { message.success(res.message); + formRef.current.getList(); } else { message.error(res.message); } @@ -1187,6 +1189,7 @@ function ConfigRoad() { .catch((err) => console.error(err)); } + function getRoadTollList() { ajax .getRoadTollList({ road_id: parking_id }) @@ -2011,6 +2014,7 @@ function ConfigRoad() { targetKeys={hasSelectTollList} onChange={(nexTargetKeys) => { setHasSelectTollList(nexTargetKeys); + console.log(nexTargetKeys); }} render={(item) => item.label} /> @@ -2494,8 +2498,8 @@ const SearchPart = forwardRef((props, ref) => { getList(); } useImperativeHandle(ref, () => { - return { getList }; - }); + return { getList:getList }; + },[]); useEffect(() => { getList(); diff --git a/src/pages/OperationCenter/CarMgm/CarAuth/index.scss b/src/pages/OperationCenter/CarMgm/CarAuth/index.scss index c878ac3..5674e16 100644 --- a/src/pages/OperationCenter/CarMgm/CarAuth/index.scss +++ b/src/pages/OperationCenter/CarMgm/CarAuth/index.scss @@ -134,6 +134,9 @@ $color-primary : var(--color-primary); text-align: center; } .new-value { + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; display: inline-block; width: 320px; height: 32px; diff --git a/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx b/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx index 483a58b..fb07a92 100644 --- a/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx +++ b/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx @@ -606,6 +606,8 @@ function UserInfo() { const [bigPic, setBigPic] = useState(); const [total, setTotal] = useState(0); const [tabKey, setTabKey] = useState("1"); + //详情弹框tab + const [actkey,setactKey]=useState("1") function openModal(params) { setDetailVisible(true); } @@ -1218,10 +1220,11 @@ function UserInfo() { width={1500} onCancel={() => { setDetailVisible(false); + setactKey("1") }} footer={null} > - + {setactKey(v)}}> {/* {renderParkRecord(detailData)} */} {renderParkRecord(ycddData)} diff --git a/src/pages/OutRoadMgm/OutDeviceMgm/OutNvrMgm/loadable.jsx b/src/pages/OutRoadMgm/OutDeviceMgm/OutNvrMgm/loadable.jsx index 2a4f1f6..f16e3b3 100644 --- a/src/pages/OutRoadMgm/OutDeviceMgm/OutNvrMgm/loadable.jsx +++ b/src/pages/OutRoadMgm/OutDeviceMgm/OutNvrMgm/loadable.jsx @@ -394,7 +394,16 @@ function OutNvrMgm(props) { // 表单提交 const onFinish = (values) => { - // console.log(values); + let pattern = /^([0-9]{1,3}\.){3}[0-9]{1,3}$/; + let duankou=/^([1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])$/; + if(!pattern.test(values.ip_address)){ + message.warning("请输入合理格式的ip地址") + return false + }else if(!duankou.test(values.port)){ + message.warning("请输入合适的端口号") + return false + } + console.log(values); ajax[values?.id ? "doEditOutNvr" : "doAddOutNvr"](values).then( (res) => { if (res?.status == 20000) { diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx index 5ab6539..598640b 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx @@ -82,6 +82,7 @@ function OutSegment() { dataIndex: "area_name", key: "area_name", align: "center", + render: (text, record, index) =>
{text}
}, { title: "车位数", From 514295fb7608432fe731f0005e63c86cb081642e Mon Sep 17 00:00:00 2001 From: lisf Date: Wed, 13 Dec 2023 10:14:20 +0800 Subject: [PATCH 02/10] =?UTF-8?q?fix():=20=E4=BF=AE=E5=A4=8D=E5=81=9C?= =?UTF-8?q?=E8=BD=A6=E5=8D=A1=E8=AE=A2=E5=8D=95=E4=B8=8D=E8=83=BD=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OtherBusiness/ParkingCard/ParkingCardMgm/loadable.jsx | 2 +- .../OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardMgm/loadable.jsx b/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardMgm/loadable.jsx index 5963402..9c9a85e 100644 --- a/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardMgm/loadable.jsx +++ b/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardMgm/loadable.jsx @@ -674,7 +674,7 @@ function ParkingCardMgm(props) { code: sessionTabList?.code || formData.code,//物品编号 brand_id: sessionTabList?.brand_id || formData.brand_id,//物品类型 model_id: sessionTabList?.model_id || formData.model_id,//物品型号 - operatorid: sessionTabList?.operatorid || formData?.operatorid,//商户名称 + operatorid: sessionTabList?.operatorid || formData?.operator_id,//商户名称 name: sessionTabList?.name || formData.name,//物品名称 status: sessionTabList?.status || formData.status,//状态 uid: sessionTabList?.uid || formData.uid,//领用人 diff --git a/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx b/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx index 1ef54ba..1ced6ec 100644 --- a/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx +++ b/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx @@ -303,7 +303,8 @@ function ParkingCardOrder() { ...addOrderData, effective_days:undefined, days:undefined, - scope:undefined + scope:undefined, + name:undefined } let phoneReg = new RegExp(/^(?:(?:\+|00)86)?1[3-9]\d{9}$/) @@ -317,7 +318,7 @@ function ParkingCardOrder() { }else if(addOrderData.plate_type == ''){ message.error('请选择车牌颜色') return - }else if(!phoneReg.test(addOrderData.phone)){ + }else if(addOrderData.phone && !phoneReg.test(addOrderData.phone)){ message.error('请输入正确的手机号') return }else if(addOrderData.name == ''){ @@ -346,7 +347,7 @@ function ParkingCardOrder() { effective_days:data.effective_days, days:data.days, scope:data.scope, - card_id:data.card_id + card_id:data.value }) } From 1b27a824af214dd1e3ed796a941da5e0f4a29c7e Mon Sep 17 00:00:00 2001 From: chenqiang Date: Wed, 13 Dec 2023 10:58:30 +0800 Subject: [PATCH 03/10] =?UTF-8?q?fix():=20=E8=A7=A3=E5=86=B3=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F=E6=94=B6=E5=85=A5y=E8=BD=B4=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/utils.js | 395 ++++++++++++--------- .../ParkingOverview/loadable.jsx | 7 +- 2 files changed, 233 insertions(+), 169 deletions(-) diff --git a/src/config/utils.js b/src/config/utils.js index e470742..f49d834 100644 --- a/src/config/utils.js +++ b/src/config/utils.js @@ -1,39 +1,42 @@ const utils = { - isObject: (params) => Object.prototype.toString.call(params) === "[object Object]", - isArray: (params) => Object.prototype.toString.call(params) === "[object Array]", - isFunction: (params) => Object.prototype.toString.call(params) === "[object Function]", + isObject: (params) => + Object.prototype.toString.call(params) === "[object Object]", + isArray: (params) => + Object.prototype.toString.call(params) === "[object Array]", + isFunction: (params) => + Object.prototype.toString.call(params) === "[object Function]", toSizeText: (size) => { - let num = 0 - let unit = "" + let num = 0; + let unit = ""; if (size / 1024 < 1000) { - num = size / 1024 - unit = "KB" + num = size / 1024; + unit = "KB"; } else if (size / 1024 / 1024 < 1000) { - num = size / 1024 / 1024 - unit = "MB" + num = size / 1024 / 1024; + unit = "MB"; } else { - num = size / 1024 / 1024 / 1024 - unit = "GB" + num = size / 1024 / 1024 / 1024; + unit = "GB"; } - num = Math.floor(num * 100) / 100 - return `${num}${unit}` + num = Math.floor(num * 100) / 100; + return `${num}${unit}`; }, // 获取localStorage的已存容量 getLocalSurplus: () => { if (!window.localStorage) { - console.log("浏览器不支持localStorage") + console.log("浏览器不支持localStorage"); } - var size = 0 + var size = 0; for (let item in window.localStorage) { if (window.localStorage.hasOwnProperty(item)) { - size += window.localStorage.getItem(item).length + size += window.localStorage.getItem(item).length; } } if (parseInt((size / 1024).toFixed(2)) > 4000) { - window.localStorage.clear() + window.localStorage.clear(); } - console.log("当前localStorage已存容量为" + (size / 1024).toFixed(2) + "KB") + console.log("当前localStorage已存容量为" + (size / 1024).toFixed(2) + "KB"); }, // parseFormatNum: (number) => { @@ -47,60 +50,60 @@ const utils = { // return vn.split("").reverse().join("") // }, parseFormatNum: (number) => { - if (!number) return 0 - let arr = number.toString().split(".") - let hasXiaoShu = arr.length > 1 // 有小数 - const a = arr[0].split("") - let v = a.reverse() - let vn = "" + if (!number) return 0; + let arr = number.toString().split("."); + let hasXiaoShu = arr.length > 1; // 有小数 + const a = arr[0].split(""); + let v = a.reverse(); + let vn = ""; for (let i = 0; i < v.length; i++) { - vn += v[i] + ((i + 1) % 3 == 0 && i + 1 != v.length ? "," : "") + vn += v[i] + ((i + 1) % 3 == 0 && i + 1 != v.length ? "," : ""); } - return vn.split("").reverse().join("") + (hasXiaoShu ? `.${arr[1]}` : '') + return vn.split("").reverse().join("") + (hasXiaoShu ? `.${arr[1]}` : ""); }, idCardTest: (value) => { - let re = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/ - return re.test(value) + let re = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/; + return re.test(value); }, imsiTest: (value) => { - let re = /(^\d{15}$)/ - return re.test(value) + let re = /(^\d{15}$)/; + return re.test(value); }, getQueryString: (str, name) => { - let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)") - let r = str.substr(1).match(reg) - if (r != null) return decodeURIComponent(r[2]) - return null + let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); + let r = str.substr(1).match(reg); + if (r != null) return decodeURIComponent(r[2]); + return null; }, updateTreeData: (data) => { - let item = [] + let item = []; data.map(({ id, text, nodes }) => { item.push({ key: id, value: id, title: text, children: nodes ? utils.updateTreeData(nodes) : [], - }) - }) - return item + }); + }); + return item; }, changeObjToQuery: (obj) => { - let arr = [] + let arr = []; Object.keys(obj).forEach((elem) => { if (obj[elem] && Array.isArray(obj[elem])) { - arr.push(`${elem}=${obj[elem].join(",")}`) + arr.push(`${elem}=${obj[elem].join(",")}`); } else { - arr.push(`${elem}=${obj[elem] ? obj[elem] : ""}`) + arr.push(`${elem}=${obj[elem] ? obj[elem] : ""}`); } - }) - return arr.join("&") + }); + return arr.join("&"); }, // openNewWindow: (url, id) => { // window.location = window.location.href.split("#")[0] + "#" + url // }, openNewWindow: (url) => { if (url) { - window.open(url, "_self") + window.open(url, "_self"); } }, // 打开自定义窗口 @@ -115,42 +118,46 @@ const utils = { //window.screen.height获得屏幕的高,window.screen.width获得屏幕的宽 var iTop = (window.screen.height - 30 - customHeight) / 2; //获得窗口的垂直位置; var iLeft = (window.screen.width - 10 - customWidth) / 2; //获得窗口的水平位置; - window.open(url, "_blank", `height=${customHeight},innerHeight=${customHeight},width=${customWidth},innerWidth=${customWidth},top=${iTop},left=${iLeft},toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no`) + window.open( + url, + "_blank", + `height=${customHeight},innerHeight=${customHeight},width=${customWidth},innerWidth=${customWidth},top=${iTop},left=${iLeft},toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no` + ); }, toFindRegion: (pro, city, county) => { - let cityData = JSON.parse(localStorage.getItem("_cityData")) + let cityData = JSON.parse(localStorage.getItem("_cityData")); if (cityData) { - let region = [] + let region = []; for (let i = 0; i < cityData.length; i++) { - let elem = cityData[i] + let elem = cityData[i]; if (elem.label === pro) { - region.push(elem.value) + region.push(elem.value); if (elem.children) { if (city.length && county) { for (let j = 0; j < elem.children.length; j++) { - let node = elem.children[j] + let node = elem.children[j]; if (node.label === city) { - region.push(node.value) + region.push(node.value); if (node.children) { for (let k = 0; k < node.children.length; k++) { - let child = node.children[k] + let child = node.children[k]; if (child.label === county) { - region.push(child.value) - break + region.push(child.value); + break; } } } } } } else if (!city.length && county) { - let node = elem.children[0] - region.push(node.value) + let node = elem.children[0]; + region.push(node.value); if (node.children) { for (let k = 0; k < node.children.length; k++) { - let child = node.children[k] + let child = node.children[k]; if (child.label === county) { - region.push(child.value) - break + region.push(child.value); + break; } } } @@ -158,165 +165,190 @@ const utils = { } } } - return region + return region; } else { - return [] + return []; } }, // 生成列表序号 toSerialNumber: (number) => { - let result = number + let result = number; switch (number.toString().length) { case 1: - result = `00${number}` - break + result = `00${number}`; + break; case 2: - result = `0${number}` - break + result = `0${number}`; + break; default: - result += "" - break + result += ""; + break; } - return result + return result; }, // 获取地址栏搜索参数 search 格式,如: ?deal_status=2 generateParams: (search) => { - let result = {} - let searchParamsStr = search.split("?")[1] + let result = {}; + let searchParamsStr = search.split("?")[1]; if (searchParamsStr) { - let searchParams = searchParamsStr.split("&") + let searchParams = searchParamsStr.split("&"); searchParams.forEach((elem) => { - let arr = elem.split("=") - let key = arr[0] - let value = arr[1] + let arr = elem.split("="); + let key = arr[0]; + let value = arr[1]; if (key) { - result[key] = decodeURIComponent(value) + result[key] = decodeURIComponent(value); } - }) + }); } - return result + return result; }, // 生成一个唯一随机数 createRandom: () => { - return new Date().getTime() + "-" + Math.random() + "-" + Math.random() + return new Date().getTime() + "-" + Math.random() + "-" + Math.random(); }, // 输入框输入整数处理 integerHandle: (value) => { if (isNaN(parseInt(value))) { - return "" + return ""; } else { - return parseInt(value) + return parseInt(value); } }, // 判断时间段是否包含 validationTime: function (obj) { //如果没有第二个时间段直接通过 - if (!obj.start_date2) return true + if (!obj.start_date2) return true; - let start_date = new Date(obj.start_date.replace(/-/g, "/")).getTime() - let end_date = new Date(obj.end_date.replace(/-/g, "/")).getTime() - let start_date2 = new Date(obj.start_date2.replace(/-/g, "/")).getTime() - let end_date2 = new Date(obj.end_date2.replace(/-/g, "/")).getTime() + let start_date = new Date(obj.start_date.replace(/-/g, "/")).getTime(); + let end_date = new Date(obj.end_date.replace(/-/g, "/")).getTime(); + let start_date2 = new Date(obj.start_date2.replace(/-/g, "/")).getTime(); + let end_date2 = new Date(obj.end_date2.replace(/-/g, "/")).getTime(); //如果时间段不互相包含 直接通过 if ( - (start_date > start_date2 && end_date > start_date2 && start_date > end_date2) || - (start_date < start_date2 && end_date < start_date2 && end_date < start_date2) + (start_date > start_date2 && + end_date > start_date2 && + start_date > end_date2) || + (start_date < start_date2 && + end_date < start_date2 && + end_date < start_date2) ) { - return true + return true; } - return false + return false; }, // 开始时间不可以大于结束时间 validationTime2: function (obj) { if (obj.start_date && obj.end_date) { - let start_date = new Date(obj.start_date.replace(/-/g, "/")).getTime() - let end_date = new Date(obj.end_date.replace(/-/g, "/")).getTime() + let start_date = new Date(obj.start_date.replace(/-/g, "/")).getTime(); + let end_date = new Date(obj.end_date.replace(/-/g, "/")).getTime(); if (start_date > end_date) { - return false + return false; } } if (obj.start_date2 && obj.end_date2) { - let start_date2 = new Date(obj.start_date2.replace(/-/g, "/")).getTime() - let end_date2 = new Date(obj.end_date2.replace(/-/g, "/")).getTime() + let start_date2 = new Date(obj.start_date2.replace(/-/g, "/")).getTime(); + let end_date2 = new Date(obj.end_date2.replace(/-/g, "/")).getTime(); if (start_date2 > end_date2) { - return false + return false; } } - return true + return true; }, // 时间范围不能超过多少天 validationTime3: function (obj, max) { - let maxTime = (parseInt(max) + 1) * 24 * 60 * 60 * 1000 + let maxTime = (parseInt(max) + 1) * 24 * 60 * 60 * 1000; if (obj.start_date && obj.end_date) { - let start_date = new Date(obj.start_date.replace(/-/g, "/")).getTime() - let end_date = new Date(obj.end_date.replace(/-/g, "/")).getTime() + let start_date = new Date(obj.start_date.replace(/-/g, "/")).getTime(); + let end_date = new Date(obj.end_date.replace(/-/g, "/")).getTime(); if (end_date - start_date > maxTime) { - return false + return false; } } if (obj.start_date2 && obj.end_date2) { - let start_date2 = new Date(obj.start_date2.replace(/-/g, "/")).getTime() - let end_date2 = new Date(obj.end_date2.replace(/-/g, "/")).getTime() + let start_date2 = new Date(obj.start_date2.replace(/-/g, "/")).getTime(); + let end_date2 = new Date(obj.end_date2.replace(/-/g, "/")).getTime(); if (end_date2 - start_date2 > maxTime) { - return false + return false; } } - return true + return true; }, // 车牌号校验 plate 车牌号 accurate 是否是精确的 validationPlate: function (plate, accurate) { - let value = plate.toUpperCase().trim().replace(/\s/g, "") + let value = plate.toUpperCase().trim().replace(/\s/g, ""); // 精准车牌不能有这两个字符 - if (accurate && (!value || value.indexOf("*") !== -1 || value.indexOf("?") !== -1)) { - return false + if ( + accurate && + (!value || value.indexOf("*") !== -1 || value.indexOf("?") !== -1) + ) { + return false; } // 车牌号不能大于8 if (value.length > 8) { - return false + return false; } // 车牌号不能有特殊字符 let containSpecial = RegExp( /[(\ )(\~)(\!)(\@)(\#)(\$)(\%)(\¥)(\^)(\&)(\()(\))(\-)(\_)(\+)(\=)(\[)(\])(\{)(\})(\|)(\\)(\;)(\:)(\')(\")(\,)(\.)(\/)(\<)(\>)(\)]+/ - ) - let ft = containSpecial.test(value) + ); + let ft = containSpecial.test(value); if (ft == true) { - return false + return false; } if (value !== "" && value.indexOf("*") == -1 && value.indexOf("?") == -1) { //let re=/^[\u4e00-\u9fa5]{1}[A-Z]{1}[A-Z_0-9]{5}$/; let re = - /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领军空A-Z]{1}[A-Z]{1}[警京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]{0,1}[A-Z0-9]{3,5}[A-Z0-9挂学警港澳使领]{1}$/ + /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领军空A-Z]{1}[A-Z]{1}[警京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼]{0,1}[A-Z0-9]{3,5}[A-Z0-9挂学警港澳使领]{1}$/; // let re = /^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/ if (value.search(re) == -1) { - return false + return false; } } else { if (value !== "" && value.indexOf("*") == -1) { if (value.length != 6 && value.length != 7 && value.length != 8) { - return false + return false; } } } - return true + return true; }, // 数字格式格式化 亿、万 numberFormat: function (num) { if (!num) { - return "0" + return "0"; + } + let str = JSON.stringify(num); + let len = str.length; + if (len > 8) { + let str1 = str.substring(0, len - 8); + let str2 = str.substring(str1.length, str1.length + 2); + str = str1 + "." + str2 + "亿"; + } else if (len > 4 && len <= 8) { + let str1 = str.substring(0, len - 4); + let str2 = str.substring(str1.length, str1.length + 2); + str = str1 + "." + str2 + "万"; + } + return str; + }, + // 数字格式格式化 亿、万,echarts要个毛线 .00,y轴放不下 + noonenumberFormat: function (num) { + if (!num) { + return "0"; } - let str = JSON.stringify(num) - let len = str.length + let str = JSON.stringify(num); + let len = str.length; if (len > 8) { - let str1 = str.substring(0, len - 8) - let str2 = str.substring(str1.length, str1.length + 2) - str = str1 + "." + str2 + "亿" + let str1 = str.substring(0, len - 8); + let str2 = str.substring(str1.length, str1.length + 2); + str = str1 + "亿"; } else if (len > 4 && len <= 8) { - let str1 = str.substring(0, len - 4) - let str2 = str.substring(str1.length, str1.length + 2) - str = str1 + "." + str2 + "万" + let str1 = str.substring(0, len - 4); + let str2 = str.substring(str1.length, str1.length + 2); + str = str1 + "万"; } - return str + return str; }, // 加入暂存架数据转换 transformData: (data) => { @@ -327,7 +359,9 @@ const utils = { temporaryId: data.temporary_id, pic_id: data.pic_id, detection: data.detection ? JSON.stringify(data.detection) : "", - vehicle_detection: data.vehicle_detection ? JSON.stringify(data.vehicle_detection) : "", + vehicle_detection: data.vehicle_detection + ? JSON.stringify(data.vehicle_detection) + : "", imgURL: data.big_pic, jcryUrl: data.jcry_url, time: data.capture_time, @@ -350,76 +384,103 @@ const utils = { car_color: data.color_name, car_info: data.car_info, }, - } + }; } catch (e) { - return {} + return {}; } }, validatePlate: (str) => { return /^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/.test( str - ) + ); }, // 千位加逗号 toThousands: function (num) { var num = (num || 0).toString(), - result = "" + result = ""; while (num.length > 3) { - result = "," + num.slice(-3) + result - num = num.slice(0, num.length - 3) + result = "," + num.slice(-3) + result; + num = num.slice(0, num.length - 3); } if (num) { - result = num + result + result = num + result; } - return result + return result; }, // 验证经度 validatorLongitude: (value) => { - const reg = /^(\-|\+)?(((\d|[1-9]\d|1[0-7]\d|0{1,3})\.\d{0,15})|(\d|[1-9]\d|1[0-7]\d|0{1,3})|180\.0{0,15}|180)$/ + const reg = + /^(\-|\+)?(((\d|[1-9]\d|1[0-7]\d|0{1,3})\.\d{0,15})|(\d|[1-9]\d|1[0-7]\d|0{1,3})|180\.0{0,15}|180)$/; if (!reg.test(value)) { - return false + return false; } else { - return true + return true; } }, // 验证纬度 validatorLatitude: (value) => { - const reg = /^(\-|\+)?([0-8]?\d{1}\.\d{0,15}|90\.0{0,15}|[0-8]?\d{1}|90)$/ + const reg = /^(\-|\+)?([0-8]?\d{1}\.\d{0,15}|90\.0{0,15}|[0-8]?\d{1}|90)$/; if (!reg.test(value)) { - return false + return false; } else { - return true + return true; } }, - createTimeRange: (limit)=>{ - let date = new Date(), dateBefore = new Date(date.getTime() - limit * 86400* 1000) - let str = date.getFullYear()+"-" + ('0' + (date.getMonth() + 1)).slice(-2) +"-"+ ("0"+ date.getDate()).slice(-2), - strBefore = dateBefore.getFullYear() +"-"+ ('0' + (dateBefore.getMonth() + 1)).slice(-2) +"-"+ ("0"+ dateBefore.getDate()).slice(-2); - if(limit > 0){ - return strBefore + ' 00:00:00' + ',' + str + ' 23:59:59' - } - return str + ' 00:00:00' + ',' + strBefore+ ' 23:59:59' + createTimeRange: (limit) => { + let date = new Date(), + dateBefore = new Date(date.getTime() - limit * 86400 * 1000); + let str = + date.getFullYear() + + "-" + + ("0" + (date.getMonth() + 1)).slice(-2) + + "-" + + ("0" + date.getDate()).slice(-2), + strBefore = + dateBefore.getFullYear() + + "-" + + ("0" + (dateBefore.getMonth() + 1)).slice(-2) + + "-" + + ("0" + dateBefore.getDate()).slice(-2); + if (limit > 0) { + return strBefore + " 00:00:00" + "," + str + " 23:59:59"; + } + return str + " 00:00:00" + "," + strBefore + " 23:59:59"; }, - createTimeStr: (minusOrAdd)=>{ + createTimeStr: (minusOrAdd) => { let num = Number.isInteger(minusOrAdd) ? minusOrAdd : 0; - let date = new Date(new Date().getTime() - num * 86400* 1000) - let str = date.getFullYear()+"-" + ('0' + (date.getMonth() + 1)).slice(-2) +"-"+ ("0"+ date.getDate()).slice(-2) + ' ' + - ('0' + date.getHours()).slice(-2) + ':' + ('0' +date.getMinutes() ).slice(-2) + ":" + ('0' + date.getSeconds()).slice(-2) - return str + let date = new Date(new Date().getTime() - num * 86400 * 1000); + let str = + date.getFullYear() + + "-" + + ("0" + (date.getMonth() + 1)).slice(-2) + + "-" + + ("0" + date.getDate()).slice(-2) + + " " + + ("0" + date.getHours()).slice(-2) + + ":" + + ("0" + date.getMinutes()).slice(-2) + + ":" + + ("0" + date.getSeconds()).slice(-2); + return str; }, - createDateStr: (minusOrAdd)=>{ + createDateStr: (minusOrAdd) => { let num = Number.isInteger(minusOrAdd) ? minusOrAdd : 0; - let date = new Date(new Date().getTime() - num * 86400* 1000) - let str = date.getFullYear()+"-" + ('0' + (date.getMonth() + 1)).slice(-2) +"-"+ ("0"+ date.getDate()).slice(-2) - return str + let date = new Date(new Date().getTime() - num * 86400 * 1000); + let str = + date.getFullYear() + + "-" + + ("0" + (date.getMonth() + 1)).slice(-2) + + "-" + + ("0" + date.getDate()).slice(-2); + return str; + }, + validateTimeStr: (str) => { + let reg = /^20\d{2}-\d{1,2}-\d{1,2}/; + if (reg.test(str)) { + return true; + } + return false; }, - validateTimeStr : (str)=>{ - let reg = /^20\d{2}-\d{1,2}-\d{1,2}/ - if(reg.test(str)){ - return true - } - return false - } -} +}; -export default utils +export default utils; diff --git a/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx b/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx index 98e250a..fe5a52d 100644 --- a/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx +++ b/src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx @@ -798,7 +798,10 @@ const ParkingOverview = connect(function mapStateToProps(state) { // interval: 10, // splitNumber: 6, //设置坐标轴的分割段数 axisLabel: { - //formatter: "{value}元", + formatter: (value) => { + return utils.noonenumberFormat(value); + }, + textStyle: { color: "#bbb", }, @@ -824,7 +827,7 @@ const ParkingOverview = connect(function mapStateToProps(state) { color: "rgba(13,225,250, .31)", }, - data: data.map((ele) => utils.numberFormat(ele.value)), + data: data.map((ele) => ele.value), }, ], grid: { From 816b11ca501e499cfbbd85f43287ebf92cf49302 Mon Sep 17 00:00:00 2001 From: lisf Date: Wed, 13 Dec 2023 11:03:23 +0800 Subject: [PATCH 04/10] =?UTF-8?q?fix():=20=E5=81=9C=E8=BD=A6=E5=8D=A1?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=B7=BB=E5=8A=A0=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx | 6 +++--- src/services/OperationCenter/ParkingCardMgm/index.js | 12 +++++++++++- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx b/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx index 1ced6ec..0835db5 100644 --- a/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx +++ b/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx @@ -325,12 +325,12 @@ function ParkingCardOrder() { message.error('请选择停车卡名称') return }else{ - ajax.saveCardOrder(data).then((res) => { + ajax.addCardOrder(data).then((res) => { if (res.status === 20000) { setAddVisible(false) setAddOrderData(modalParams) getData(formData) - message.success("保存成功") + message.success("添加成功") } }).catch(err => { console.log(err); @@ -362,7 +362,7 @@ function ParkingCardOrder() { ajax.editCardOrder(updataOrder).then(res => { if(res.status == 20000){ setIsShowDetail(false) - message.success("编辑成功") + message.success("修改成功") setUpdataOrder({}) getData() } diff --git a/src/services/OperationCenter/ParkingCardMgm/index.js b/src/services/OperationCenter/ParkingCardMgm/index.js index 6f9c1a4..89f3e23 100644 --- a/src/services/OperationCenter/ParkingCardMgm/index.js +++ b/src/services/OperationCenter/ParkingCardMgm/index.js @@ -62,6 +62,15 @@ const selectCardOrder = (params) => { data:params }) } + +// 停车卡订单新增 +const addCardOrder = (params) => { + return ajax({ + url:'/api/ope/parkcard/order_insert', + type:'post', + data:params + }) +} // 停车卡订单导出 const exportOrder = (params) => { return ajax({ @@ -98,5 +107,6 @@ export default { selectCardOrder, exportOrder, editCardOrder, - cardStaData + cardStaData, + addCardOrder } From 1dd1cf1920314a48afd0772260cd31fc5ef72a1f Mon Sep 17 00:00:00 2001 From: guoxin Date: Wed, 13 Dec 2023 14:10:11 +0800 Subject: [PATCH 05/10] =?UTF-8?q?fix():=E4=BF=AE=E6=94=B9=E8=B7=AF?= =?UTF-8?q?=E5=86=85bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InRoadMgm/PersonMgm/PersonInfo/loadable.jsx | 53 ++++++------ .../InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx | 9 +- src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx | 95 ++++++++++++---------- .../BusinessConfig/BusinessConf/index.scss | 6 ++ .../BusinessConfig/BusinessConf/loadable.jsx | 52 +++++++++--- 5 files changed, 132 insertions(+), 83 deletions(-) diff --git a/src/pages/InRoadMgm/PersonMgm/PersonInfo/loadable.jsx b/src/pages/InRoadMgm/PersonMgm/PersonInfo/loadable.jsx index 303b552..8fece69 100644 --- a/src/pages/InRoadMgm/PersonMgm/PersonInfo/loadable.jsx +++ b/src/pages/InRoadMgm/PersonMgm/PersonInfo/loadable.jsx @@ -145,25 +145,8 @@ function PersonInfo() { } // 点击编辑 获取人员信息 - const getPersonAllRoad = () => { - ajax.getPersonAllRoad().then(res => { - if (res.status == 20000) { - let temparr = []; - res.data.map(item => { - temparr.push({ - key: item.value + '', - title: item.label - }) - }) - setTranferAllData(temparr) - } else { - message.error(res.message) - } - }).catch(err => { - console.log(err) - }).finally(() => { - - }) + const getPersonAllRoad = (data) => { + } // 重置密码 const resetPersonPwd = (id) => { @@ -261,7 +244,7 @@ function PersonInfo() { }) } - + const [getPersonId, setGetPersonId] = useState('') const changeOperator = (e) => { setFormData({ operator_id: e }); getDeparts(e) @@ -272,8 +255,32 @@ function PersonInfo() { setCurrentPersonInfo({ ...currentPersonInfo, operator: e }) getDeparts(e) getAssets(e) + setGetPersonId(e) } - + useEffect(() => { + if (getPersonId !='') { + let data = { + operator_id: getPersonId + } + ajax.getPersonAllRoad(data).then(res => { + if (res.status == 20000) { + let temparr = []; + res.data.map(item => { + temparr.push({ + key: item.value + '', + title: item.label + }) + }) + setTranferAllData(temparr) + } else { + message.error(res.message) + } + }).catch(err => { + console.log(err) + }).finally(() => { + }) + } + }, [getPersonId]) /** * @description 分页功能模块 * @param {number} current 当前页 @@ -376,7 +383,7 @@ function PersonInfo() { message.error('请输入员工编号') } else if (currentPersonInfo.road_ids === '') { message.error('请选择路段') - } else if (getEdit==true) { + } else if (getEdit == true) { ajax.editUserPersonInfo({ ...currentPersonInfo, id: currentPersonId }).then(res => { if (res.status == 20000) { message.success(res.message) @@ -425,7 +432,7 @@ function PersonInfo() { useEffect(() => { getAllOperator() - getPersonAllRoad() + // getPersonAllRoad() }, []) useEffect(() => { diff --git a/src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx b/src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx index f4b1154..32b844b 100644 --- a/src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx +++ b/src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx @@ -747,10 +747,8 @@ function ConfigRoad() { is_select: record.berth_ids === "" ? 0 : 1, id: record.id }); - setSelectedBerth(record.berth_ids.split(",").map(item => +item)) - + // setSelectedBerth(record.berth_ids.split(",").map(item => +item)) setRuleModal(true); - console.log(record.berth_ids); if(record.berth_ids ===''){ setShowBerthSelect(false); setIsRuleEdit(true); @@ -760,7 +758,7 @@ function ConfigRoad() { } let data = { road_id: parking_id, - vehicle_type: getCarTypeValue, + vehicle_type: record.vehicle_type, id:record.id } ajax @@ -773,7 +771,6 @@ function ConfigRoad() { }) setAllBerthList(res.data.left); setSelectedBerth(res.data.right) - console.log(res.data.list); } else { message.error(res.message) } @@ -1208,7 +1205,7 @@ function ConfigRoad() { .catch((err) => console.error(err)); } const [getCarType, setGetCarType] = useState(true) - const [getCarTypeValue, setGetCarTypeValue] = useState(true) + const [getCarTypeValue, setGetCarTypeValue] = useState({}) //处理添加计费规则-车辆类型切换 function handleCarTypeChange(value) { setGetCarTypeValue(value) diff --git a/src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx b/src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx index 11a7314..1bf5965 100644 --- a/src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx +++ b/src/pages/InRoadMgm/Stuff/StuffMgm/loadable.jsx @@ -9,6 +9,7 @@ import { SearchOutlined, DeleteOutlined } from '@ant-design/icons'; import ajax from '@/services' import { useSessionStorageState } from "ahooks" import { useNavigate, useLocation } from "react-router-dom" +import { operator } from '@/config/character.config.js'; function StuffMgm(props) { // const configData = props.sysConfig["lib-deploy"] || {}; @@ -51,7 +52,7 @@ function StuffMgm(props) { setFormData({ ...formData, name: v.target.value }) } //物品类型 - const [getBrandId, setGetBrandId] = useState({}) + const [getBrandId, setGetBrandId] = useState('') const handleOperator = (v) => { setGetBrandId(v) setFormData({ ...formData, brand_id: v }) @@ -222,16 +223,16 @@ function StuffMgm(props) { /** * */ - if (record.status=== '0') { + if (record.status === '0') { setGetSelectStatus(false) } - if (record.status=== '1') { + if (record.status === '1') { setGetSelectStatus(true) setGetUid({ uid: '' }) } - if (record.status=== '2') { + if (record.status === '2') { setGetSelectStatus(true) setGetUid({ uid: '' @@ -351,39 +352,7 @@ function StuffMgm(props) { const getSearchData = (data = formData) => { getData(data) } - const [getOperationName, setGetOperationName] = useState([]) - const [getNewOperationName, setNewGetOperationName] = useState([]) - const operatorid = () => { - ajax.assetsType().then(res => { - let arr = res.data - let newArr = arr.slice(1) - setGetOperationName(res.data) - setNewGetOperationName(newArr) - }) - } - const [getMerchantDataName, setGetMerchantDataName] = useState([]) - const [getNewMerchantDataName, setNewMerchantDataName] = useState([]) - const merchantDataName = () => { - ajax.getOperator().then(res => { - let arr = res.data - let newArr = arr.slice(1) - setGetMerchantDataName(res.data) - setNewMerchantDataName(newArr) - }) - } - const [getAssetsModel, setGetAssetsModel] = useState([]) - const [getNewAssetsModel, setNewGetAssetsModel] = useState([]) - const assetsModelName = () => { - let data = { - brand_id: getBrandId - } - ajax.assetsModel(data).then(res => { - let arr = res.data - let newArr = arr.slice(1) - setGetAssetsModel(res.data) - setNewGetAssetsModel(newArr) - }) - } + const [getRecipient, setGetRecipient] = useState([]) const recipientName = () => { ajax.recipient().then(res => { @@ -423,7 +392,7 @@ function StuffMgm(props) { } const [checkData, setCheckData] = useState(param) const [getUid, setGetUid] = useState({ - uid:'' + uid: '' }) const onChange = (newValue) => { let arr = newValue @@ -436,7 +405,9 @@ function StuffMgm(props) { }; //商户名称 const [getOperatorid, setGetOperatorid] = useState(true) + const [getOperatorValue, setGetOperatorValue] = useState('') const handleAddDeployType = (value) => { + setGetOperatorValue(value) if (value) { setGetOperatorid(false) } @@ -592,9 +563,6 @@ function StuffMgm(props) { }) setGetSelectStatus(false) } - useEffect(() => { - assetsModelName() - }, [getBrandId]) const [sessionTabList, setSessionTabList] = useSessionStorageState('stuffMgm', { value: { } @@ -616,6 +584,51 @@ function StuffMgm(props) { }) } }, []) + const [getOperationName, setGetOperationName] = useState([]) + const [getNewOperationName, setNewGetOperationName] = useState([]) + useEffect(() => { + if (getOperatorValue != '') { + let data = { + operator_id: getOperatorValue + } + ajax.assetsType(data).then(res => { + let arr = res.data + let newArr = arr.slice(1) + setGetOperationName(res.data) + setNewGetOperationName(newArr) + }) + } + }, [getOperatorValue]) + + const operatorid = () => { + + } + const [getMerchantDataName, setGetMerchantDataName] = useState([]) + const [getNewMerchantDataName, setNewMerchantDataName] = useState([]) + const merchantDataName = () => { + ajax.getOperator().then(res => { + let arr = res.data + let newArr = arr.slice(1) + setGetMerchantDataName(res.data) + setNewMerchantDataName(newArr) + }) + } + const [getAssetsModel, setGetAssetsModel] = useState([]) + const [getNewAssetsModel, setNewGetAssetsModel] = useState([]) + useEffect(() => { + if (getBrandId != '') { + let data = { + brand_id: getBrandId, + operator_id: getOperatorValue + } + ajax.assetsModel(data).then(res => { + let arr = res.data + let newArr = arr.slice(1) + setGetAssetsModel(res.data) + setNewGetAssetsModel(newArr) + }) + } + }, [getBrandId]) useEffect(() => { setSessionTabList({ ...formData diff --git a/src/pages/SystemMgm/BusinessConfig/BusinessConf/index.scss b/src/pages/SystemMgm/BusinessConfig/BusinessConf/index.scss index dec7581..57858d1 100644 --- a/src/pages/SystemMgm/BusinessConfig/BusinessConf/index.scss +++ b/src/pages/SystemMgm/BusinessConfig/BusinessConf/index.scss @@ -221,6 +221,9 @@ $color-primary: var(--color-primary); .yisa-search { margin-top: 20px; display: flex; + .redLogo{ + line-height: 35px; + } label { line-height: 31px; } @@ -257,6 +260,9 @@ $color-primary: var(--color-primary); .yisa-search { margin-top: 20px; display: flex; + .redLogo{ + line-height: 35px; + } label { line-height: 31px; } diff --git a/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx b/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx index 869a59f..b366f60 100644 --- a/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx +++ b/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx @@ -142,7 +142,7 @@ function BusinessConf(props) { message.error('请选择商户名称') } else if (addManage.item_name === '') { message.error('请选择配置项') - } else if (addManage.parameter === undefined && addManage.parameterValue === undefined) { + } else if (addManage.parameter === undefined || addManage.parameterValue === undefined) { message.error('请选择参数项') } else { ajax.addBusiness(data).then(res => { @@ -264,7 +264,11 @@ function BusinessConf(props) { const [geteditData, setGetEditData] = useState({ area_id: "0", operator_id: "0", - item_id: '' + item_id: '', + parameter:'', + parameterValue:1, + parameter_exit:'', + parameter_exit_pda:'' }) const CheckApplyBtn = (record) => { setGetAdminId(record) @@ -281,9 +285,13 @@ function BusinessConf(props) { } //所属类型 const [getPlateColor, setGetPlateColor] = useState([]) + const [getNewPlateColor, setGetNewPlateColor] = useState([]) const plateColor = () => { ajax.getItemName().then(res => { + let arr = res.data + let newArr = arr.slice(1) setGetPlateColor(res.data) + setGetNewPlateColor(newArr) }) } @@ -385,13 +393,27 @@ function BusinessConf(props) { id: getAdminId.id, ...geteditData } - ajax.editBusiness(data).then(res => { - if (res.status === 20000) { - setEditVisible(false) - getData(formData) - setGetConfiguration(0) - } - }) + // console.log(geteditData); + if (geteditData.area_name === '') { + message.error('请选择城市') + } else if (geteditData.operator_name === '') { + message.error('请选择商户名称') + } else if (geteditData.item_name === '') { + message.error('请选择配置项') + } else if (geteditData.parameter === '' || geteditData.parameterValue === '') { + message.error('请选择参数项') + }else{ + ajax.editBusiness(data).then(res => { + if (res.status === 20000) { + setEditVisible(false) + getData(formData) + setGetConfiguration(0) + }else { + message.error(res.message) + } + }) + } + } //角色 @@ -522,7 +544,7 @@ function BusinessConf(props) { style={{ width: 260, marginLeft: 35 }} placeholder="请选择" value={addManage.item_name} - options={getPlateColor} + options={getNewPlateColor} onChange={handleConfiguration} fieldNames={{ label: 'type' @@ -675,7 +697,7 @@ function BusinessConf(props) { style={{ width: 260, marginLeft: 35 }} placeholder="请选择" value={getCheckData.item_id} - options={getPlateColor} + options={getNewPlateColor} onChange={(v, option) => { setGetMessage(option); setGetConfiguration(v) @@ -825,6 +847,7 @@ function BusinessConf(props) { >
+
*
+
*
Date: Wed, 13 Dec 2023 14:54:40 +0800 Subject: [PATCH 06/10] =?UTF-8?q?feat():=20=E6=96=B0=E5=A2=9E=E5=AE=A2?= =?UTF-8?q?=E8=AF=89=E7=BB=9F=E8=AE=A1=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ComplainStat/echartsOptions.jsx | 563 +++++++++++++++++++++ .../CustomerServieMgm/ComplainStat/index.scss | 115 ++++- .../CustomerServieMgm/ComplainStat/loadable.jsx | 211 ++++++-- .../OperationCenter/CustomerManage/index.js | 19 +- 4 files changed, 848 insertions(+), 60 deletions(-) create mode 100644 src/pages/OperationCenter/CustomerServieMgm/ComplainStat/echartsOptions.jsx diff --git a/src/pages/OperationCenter/CustomerServieMgm/ComplainStat/echartsOptions.jsx b/src/pages/OperationCenter/CustomerServieMgm/ComplainStat/echartsOptions.jsx new file mode 100644 index 0000000..07a98aa --- /dev/null +++ b/src/pages/OperationCenter/CustomerServieMgm/ComplainStat/echartsOptions.jsx @@ -0,0 +1,563 @@ +const hexToRgba = (hex, alpha = 1) => { + const color = hex.slice(1); + const rgba = [ + parseInt("0x" + color.slice(0, 2)), + parseInt("0x" + color.slice(2, 4)), + parseInt("0x" + color.slice(4, 6)), + alpha, + ]; + return `rgba(${rgba.toString()})`; +}; +const colorList = [ + "#9baaff", + "#ff9ba7", + "#c8d6f4", + "#9bfff3", + "#ff9bf3", + "#eeb08e", + "#79d3fb", +]; +function linearColors1(color) { + return { + type: "linear", + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [ + { + offset: 0.3, + color: color, + }, + { + offset: 1, + color: "#fff", + }, + ], + global: false, + }; +} +function linearColors2(color) { + return { + type: "linear", + x: 0, + y: 0, + x2: 1, + y2: 1, + colorStops: [ + { + offset: 0, + color: hexToRgba(color, 1), + }, + { + offset: 1, + color: hexToRgba(color, 0.2), + }, + ], + global: false, + }; +} + +// 条形图 +export const barChartOption = (data) => { + const { x_axis = [], y_axis = [] } = data; + // console.log(data); + const len = parseInt(x_axis?.length || 0); + const zoomSpan = 100 / ((len < 8 ? 8 : len) / 8); + return { + backgroundColor: "transparent", + tooltip: { + trigger: "axis", + axisPointer: { + type: "shadow", + }, + backgroundColor: "rgba(0, 0, 0, 0.5)", + borderColor: "rgba(75, 253, 238, 0.4)", + textStyle: { color: "#FFFFFF", fontSize: 12 }, + }, + grid: { + top: 15, + left: "5%", + right: "3%", + bottom: len > 8 ? 25 : 15, + containLabel: true, + }, + // legend: { + // top: 0, + // right: "3%", + // itemWidth: 15, + // itemHeight: 10, + // textStyle: { color: "#999999", fontSize: 12 }, + // data: getLegend(y_axis), + // }, + dataZoom: [ + { + type: "inside", + // span: zoomSpan, + minSpan: zoomSpan, + maxSpan: zoomSpan, + zoomLock: true, + }, + { + type: "slider", + backgroundColor: "rgba(255,255,255,.3)", + dataBackground: { + areaStyle: "#fff", + }, + height: 9, + bottom: 15, + show: len > 8 ? true : false, + zoomLock: true, + moveHandleSize: 10, + handleIcon: + "path://M512 512m-208 0a6.5 6.5 0 1 0 416 0 6.5 6.5 0 1 0-416 0Z M512 192C335.264 192 192 335.264 192 512c0 176.736 143.264 320 320 320s320-143.264 320-320C832 335.264 688.736 192 512 192zM512 800c-159.072 0-288-128.928-288-288 0-159.072 128.928-288 288-288s288 128.928 288 288C800 671.072 671.072 800 512 800z", + handleColor: "#0260FF", + handleSize: "95%", + // handleStyle: { + // shadowBlur: 3, + // shadowOffsetX: 1, + // shadowOffsetY: 1, + // shadowColor: "rgba(0, 0, 0, 0.6)", + // }, + textStyle: { + fontSize: 12, + color: "#9A9A9A", + }, + showDetail: false, + }, + ], + xAxis: [ + { + // type: "value", + type: "category", + axisTick: { show: false }, + axisLine: { show: false }, + axisLabel: { fontSize: 12, color: "#FFFFFF", interval: 0 }, + data: x_axis || [], + }, + ], + yAxis: [ + { + axisTick: { show: false }, + axisLine: { + lineStyle: { + color: "#9A9A9A", + opacity: 0.6, + }, + }, + splitLine: { + lineStyle: { + opacity: 0.4, + }, + }, + axisLabel: { fontSize: 12, color: "#FFFFFF" }, + type: "value", + // type: "category", + }, + ], + series: renderBars(y_axis), + }; +}; + +// 生成条形 +function renderBars(arr) { + let newArr = []; + if (arr?.length) { + newArr = arr.map((v, i) => { + return { + type: "bar", + name: v?.name || "数量", + // yAxisIndex: 0, + // barMaxWidth: "auto", + // barCategoryGap:20, + barWidth: 20, + label: { + show: true, + position: "top", + formatter: function (params) { + let value = params.value || params.value != 0 ? params.value : ""; + return value; + }, + }, + itemStyle: { + color: i % 2 ? linearColors2("#fd9a9a") : linearColors2("#4a70f4"), + }, + data: v?.value || [], + }; + }); + } + return newArr; +} + +// 饼图 +export const pieChartOption = (data) => { + const list = [...data]; + const labels = list?.length ? list.map((v) => v.name) : []; + const option = { + color: colorList, + backgroundColor: "transparent", + tooltip: { + trigger: "item", + backgroundColor: "rgba(0, 0, 0, 0.5)", + textStyle: { color: "#FFFFFF", fontSize: 14 }, + }, + grid: { + top: "middle", + eft: "center", + containLabel: false, + }, + legend: { + orient: "horizontal", + top: "bottom", + left: "center", + data: labels, + type: "scroll", + // formatter(name) { + // let num = labels.findIndex((v) => v == name); + // return name + " {a|" + list[num]?.value + "}"; + // }, + // itemWidth: 10, + // itemHeight: 10, + textStyle: { + color: "#FFFFFF", + // width: 120, + // overflow: "breakAll", + // lineHeight: 16, + // rich: { + // a: { color: "#3f7ff7" }, + // }, + }, + // itemGap: 16, + // selectedMode: false + }, + series: [ + { + // id: "1", + type: "pie", + center: ["50%", "46%"], + radius: ["50%", "70%"], + data: list, + // z: 0, + // itemStyle: { + // color: ({ dataIndex }: any) => linearColors2[dataIndex % 20], + // }, + emphasis: { label: { show: true } }, + label: { + show: false, + position: "center", + // borderRadius: 10, + // backgroundColor: "#ffffff", + // width: "120", + // overflow: "breakAll", + formatter(param) { + // return "{num|" + param.value + "}" + "\n {name|" + param.name + "}"; + return ( + "{num|" + param.percent + "%}" + "\n {name|" + param.name + "}" + ); + }, + rich: { + num: { + fontSize: 16, + fontWeight: 500, + padding: [0, 0, 5], + color: "#3f7ff7", + }, + name: { + fontSize: 14, + color: "#FFFFFF", + }, + }, + }, + }, + ], + }; + return option; +}; + +// 折线图 +export const lineChartOption = (data) => { + const { x_axis = [], y_axis = [] } = data; + // console.log(data); + const len = parseInt(x_axis?.length || 0); + const zoomSpan = 100 / ((len < 8 ? 8 : len) / 8); + return { + backgroundColor: "transparent", + tooltip: { + trigger: "axis", + backgroundColor: "rgba(0, 0, 0, 0.5)", + borderColor: "rgba(75, 253, 238, 0.4)", + textStyle: { color: "#FFFFFF", fontSize: 12 }, + }, + grid: { + // top: y_axis?.length > 5 ? 60 : 40, + top: 30, + left: "5%", + right: "3%", + bottom: len > 8 ? 25 : 15, + containLabel: true, + }, + legend: { + top: 0, + right: "3%", + // itemWidth: 15, + // itemHeight: 10, + textStyle: { color: "#FFFFFF", fontSize: 12 }, + data: getLegend(y_axis), + }, + dataZoom: [ + { + type: "inside", + // span: zoomSpan, + minSpan: zoomSpan, + maxSpan: zoomSpan, + zoomLock: true, + }, + { + type: "slider", + backgroundColor: "rgba(255,255,255,.3)", + dataBackground: { + areaStyle: "#fff", + }, + height: 9, + bottom: 15, + show: len > 8 ? true : false, + zoomLock: true, + moveHandleSize: 10, + handleIcon: + "path://M512 512m-208 0a6.5 6.5 0 1 0 416 0 6.5 6.5 0 1 0-416 0Z M512 192C335.264 192 192 335.264 192 512c0 176.736 143.264 320 320 320s320-143.264 320-320C832 335.264 688.736 192 512 192zM512 800c-159.072 0-288-128.928-288-288 0-159.072 128.928-288 288-288s288 128.928 288 288C800 671.072 671.072 800 512 800z", + handleColor: "#0260FF", + handleSize: "95%", + // handleStyle: { + // shadowBlur: 3, + // shadowOffsetX: 1, + // shadowOffsetY: 1, + // shadowColor: "rgba(0, 0, 0, 0.6)", + // }, + textStyle: { + fontSize: 12, + color: "#9A9A9A", + }, + showDetail: false, + }, + ], + xAxis: [ + { + type: "category", + boundaryGap: false, + axisLabel: { fontSize: 12, color: "#FFFFFF" }, + axisLine: { + lineStyle: { + color: "#9A9A9A", + opacity: 0.55, + }, + }, + data: x_axis || [], + }, + ], + yAxis: [ + { + type: "value", + axisLabel: { fontSize: 12, color: "#FFFFFF" }, + axisLine: { + lineStyle: { + color: "#9A9A9A", + opacity: 0.6, + }, + }, + axisTick: { + show: false, + }, + splitLine: { + lineStyle: { + opacity: 0.4, + }, + }, + }, + ], + series: renderLines(y_axis), + // series: { + // name: "数量", + // type: "line", + // smooth: true, + // lineStyle: { + // width: 2, + // color: "#58b8ff", + // }, + // data: y_axis || [], + // }, + }; +}; + +// 获取图例 +function getLegend(arr) { + let newArr = []; + if (arr?.length) { + arr.forEach((v, i) => { + newArr.push(v?.name || "数量" + i); + }); + } + return newArr; +} + +// 生成折线 +function renderLines(arr) { + let newArr = []; + if (arr?.length) { + newArr = arr.map((v) => { + return { + name: v?.name || "数量", + type: "line", + // stack: "Total", + yAxisIndex: 0, + // smooth: true, + // lineStyle: { + // width: 2, + // color: `#30b4ea`, + // }, + // itemStyle: { + // color: `#30b4ea`, + // }, + // areaStyle: { + // opacity: 0.8, + // color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ + // { + // offset: 0, + // color: "rgba(59,255,244,0.3)", + // }, + // { + // offset: 1, + // color: "rgba(59,255,244,0)", + // }, + // ]), + // }, + data: v?.value || [], + }; + }); + } + return newArr; +} + +// 水球 +export function waterOption(data) { + let num = (data / 100).toFixed(2); + return { + backgroundColor: "transparent", + // title: [ + // { + // text: "比率", + // x: "22%", + // y: "70%", + // textStyle: { + // fontSize: 14, + // fontWeight: "100", + // color: "#5dc3ea", + // lineHeight: 16, + // textAlign: "center", + // }, + // }, + // ], + series: [ + { + type: "liquidFill", + radius: "85%", + // center: ["25%", "45%"], + color: [ + { + type: "linear", + x: 0, + y: 0, + x2: 0, + y2: 1, + colorStops: [ + { + offset: 0, + color: "#7A7BF0", + }, + { + offset: 0.25, + color: "#7F76F1", + }, + { + offset: 0.5, + color: "#9170F7", + }, + { + offset: 0.75, + color: "#BF7EFB", + }, + { + offset: 1, + color: "#C89EF9", + }, + ], + globalCoord: false, + }, + ], + data: [num, num], // data个数代表波浪数 + backgroundStyle: { + borderWidth: 1, + opacity: 0.5, + color: { + type: "radial", + x: 0.5, + y: 0.5, + r: 0.5, + colorStops: [ + { + offset: 0, + color: "#E9EAFB", + }, + { + offset: 0.4, + color: "#E9EAFB", + }, + { + offset: 1, + color: "#CDCDF9", + }, + ], + global: false, + }, + }, + label: { + fontSize: 14, + color: "#fff", + formatter(param) { + return "{num|" + data + "%}" + "\n {name|完好率}"; + }, + rich: { + num: { + fontSize: 20, + padding: [10, 0, 5], + color: "#ffffff", + }, + name: { + fontSize: 10, + color: "#ffffff", + }, + }, + }, + outline: { + // show: false, + borderDistance: 0, + itemStyle: { + borderWidth: 3, + borderColor: "#CCD5F6", + }, + }, + }, + { + type: "pie", + radius: ["85%", "100%"], + silent: true, + labelLine: { + show: false, + }, + itemStyle: { + color: "#EDEDFD", + }, + data: [{ value: 100 }], + }, + ], + }; +} diff --git a/src/pages/OperationCenter/CustomerServieMgm/ComplainStat/index.scss b/src/pages/OperationCenter/CustomerServieMgm/ComplainStat/index.scss index fea4653..dac5473 100644 --- a/src/pages/OperationCenter/CustomerServieMgm/ComplainStat/index.scss +++ b/src/pages/OperationCenter/CustomerServieMgm/ComplainStat/index.scss @@ -17,7 +17,7 @@ $color-primary : var(--color-primary); align-items: center; padding: 20px; background: var(--color-user-list-bg); - border-radius: 20px; + border-radius: 10px; box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.08); .ant-select-selector, @@ -85,39 +85,91 @@ $color-primary : var(--color-primary); width: 100%; margin-top: 20px; flex: 1; - padding: 20px; display: flex; flex-direction: column; - background: var(--color-user-list-bg); - border-radius: 20px; - box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.08); .paid-summary { display: flex; justify-content: space-between; width: 100%; - // height: 100px; + height: 120px; >div { - width: calc(25% - 15px); + width: calc(20% - 16px); height: 100%; - background-color: #ffc0cb; - &.sum-item{ + background: var(--color-user-list-bg); + border-radius: 5px; + box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.08); + + &.sum-item { display: flex; flex-direction: column; - .sum-con{ + padding: 6px; + + .sum-con { flex: 1; display: flex; align-items: center; - justify-content: space-between; + // justify-content: space-between; + overflow: hidden; + + .num-box { + padding-left: 30px; + + .anticon { + color: var(--color-primary); + transform: rotate(95deg); + } + + + >span { + margin-right: 5px; + font-size: 28px; + font-weight: 600; + } + } - .per-box{ - transform: scale(0.5); + .per-box { + transform: scale(0.4); } } - .sum-txt{ - padding: 3px; + + .sum-txt { + height: 34px; + line-height: 34px; + font-size: 16px; text-align: center; + border-radius: 4px; + // background-color: rgba($color: pink, $alpha: 0.4); + } + + @mixin setColor($color) { + .num-box>span { + color: $color; + } + .sum-txt { + background-color: rgba($color: $color, $alpha: 0.2); + } + } + + &:nth-child(1) { + @include setColor(#459CFC); + } + + &:nth-child(2) { + @include setColor(#F3511D); + } + + &:nth-child(3) { + @include setColor(#F8BF4D); + } + + &:nth-child(4) { + @include setColor(#9CC811); + } + + &:nth-child(5) { + @include setColor(#8182E6); } } } @@ -135,10 +187,39 @@ $color-primary : var(--color-primary); margin-top: 20px; } - >div { + .chart-box { width: 100%; height: calc(50% - 10px); - background-color: yellow; + display: flex; + flex-direction: column; + justify-content: space-between; + padding: 10px; + background: var(--color-user-list-bg); + border-radius: 10px; + box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.08); + + .title { + width: 100%; + height: 32px; + display: flex; + align-items: center; + + &::before { + content: ""; + display: inline-block; + width: 6px; + height: 20px; + margin-right: 8px; + border-radius: 3px; + background-color: var(--color-primary); + } + } + + .wraper { + flex: 1; + width: 100%; + // height: calc(100% - 32px); + } } &.col-one { diff --git a/src/pages/OperationCenter/CustomerServieMgm/ComplainStat/loadable.jsx b/src/pages/OperationCenter/CustomerServieMgm/ComplainStat/loadable.jsx index 98e8dc5..0f52130 100644 --- a/src/pages/OperationCenter/CustomerServieMgm/ComplainStat/loadable.jsx +++ b/src/pages/OperationCenter/CustomerServieMgm/ComplainStat/loadable.jsx @@ -1,42 +1,106 @@ -import React, { useState, useRef, useEffect } from "react"; +import React, { useState, useRef, useEffect, useCallback } from "react"; import { message, Button, DatePicker, Progress, Modal } from "antd"; -import { SearchOutlined, DeleteOutlined } from "@ant-design/icons"; +import { SearchOutlined, PhoneOutlined } from "@ant-design/icons"; import * as echarts from "echarts"; import ReactEcharts from "echarts-for-react"; // import { dictionary, utils } from "@/config/common"; -// import moment from 'moment' +import moment from "moment"; // import { useSessionStorageState, useUpdateEffect, useSize, useUpdate } from 'ahooks'; -// import ajax from "@/services" -// import { FormInput, FormSelect, OptionPanel, ResultPanel, FormSliderPicker, AreaCascader, ImgResize, ImgZoom, } from "@/components" +import ajax from "@/services"; +import { + pieChartOption, + barChartOption, + lineChartOption, +} from "./echartsOptions"; import "./index.scss"; -// import errorImg from "@/assets/images/layout/error.png" // import { useLocation } from "react-router-dom"; function ComplainStat() { - function renderItem() { + // 查询数据 + const [formData, setFormData] = useState({ + s_time: moment().subtract(7, "days").format("YYYY-MM-DD"), //起始时间 + e_time: moment().format("YYYY-MM-DD"), //截止时间 + }); + // 结果数据 + const [resultData, setResultData] = useState({ + total: 0, // 投诉总量 + wait_num: 0, // 待处理数量 + follow_num: 0, // 跟进中数量 + deal_num: 0, // 已处理数量 + deal_rate: 0, // 按时处理比率 + }); + // 饼图数据1 + const [chartData1, setChartData1] = useState([]); + // 饼图数据2 + const [chartData2, setChartData2] = useState([]); + // 折线图数据 + const [chartData3, setChartData3] = useState({}); + // 条形图数据 + const [chartData4, setChartData4] = useState({}); + + useEffect(() => { + getData(); + }, []); + + // 获取列表数据 + const getData = () => { + ajax.getComplainStatistics(formData).then( + (res) => { + if (parseInt(res?.status) === 20000) { + let { base_data, pie1_data, pie2_data, line_data, bar_data } = + res?.data || {}; + setResultData(base_data || {}); + setChartData1(pie1_data || []); + setChartData2(pie2_data || []); + setChartData3(line_data || {}); + setChartData4(bar_data || {}); + } else { + message.error(res?.message); + } + }, + (err) => { + console.log(err); + message.error("服务器异常"); + } + ); + }; + + // 计算百分比 + const getPercent = (val) => { + const a = parseInt(resultData?.total); + const b = parseInt(val); + if (a && b) { + return ((b * 100) / a).toFixed(2); + } else { + return 0; + } + }; + + // 模版 + function renderItem(text, html, num, color) { + const bool = typeof num !== "undefined"; return (
-
-
- 6 -
-
- -
-
- 投诉总量 +
+ + {html} +
+ {bool ? ( +
+ +
+ ) : null}
+
{text}
); } @@ -48,8 +112,18 @@ function ComplainStat() { setFormData({ ...formData, updateTimes: e })} + value={[ + formData?.s_time ? moment(formData.s_time, "YYYY-MM-DD") : null, + formData?.e_time ? moment(formData.e_time, "YYYY-MM-DD") : null, + ]} + onChange={(e, str) => { + let bool = str?.length === 2; + setFormData({ + ...formData, + s_time: bool ? str[0] : "", + e_time: bool ? str[1] : "", + }); + }} />
@@ -57,8 +131,7 @@ function ComplainStat() { className="submit" type="primary" icon={} - // onClick={handleSearch} - // loading={loading} + onClick={() => getData()} > 查询 @@ -66,19 +139,81 @@ function ComplainStat() {
- {renderItem()} - {renderItem()} - {renderItem()} - {renderItem()} + {renderItem( + "投诉总量", + <> + {resultData?.total || 0}条 + + )} + {renderItem( + "待处理数量", + <> + {resultData?.wait_num || 0}条 + , + getPercent(resultData?.wait_num), + "#F3511D" + )} + {renderItem( + "跟进中数量", + <> + {resultData?.follow_num || 0}条 + , + getPercent(resultData?.follow_num), + "#F8BF4D" + )} + {renderItem( + "已处理数量", + <> + {resultData?.deal_num || 0}条 + , + getPercent(resultData?.deal_num), + "#9CC811" + )} + {renderItem( + "按时处理比率", + <> + {resultData?.deal_rate || 0}% + , + resultData?.deal_rate || 0, + "#8182E6" + )}
-
-
+
+
投诉订单来源比例
+ +
+
+
用户满意度占比
+ +
-
-
+
+
投诉订单来源趋势
+ +
+
+
问题类型统计
+ +
diff --git a/src/services/OperationCenter/CustomerManage/index.js b/src/services/OperationCenter/CustomerManage/index.js index c78d7f0..a35f10c 100644 --- a/src/services/OperationCenter/CustomerManage/index.js +++ b/src/services/OperationCenter/CustomerManage/index.js @@ -73,6 +73,14 @@ const submitData = (params) => { data: params, }); }; +//客服管理-反馈建议-撤回 +const getRejectData = (params) => { + return ajax({ + url: "/api/ope/service/withDraw", + type: "get", + data: params, + }); +}; //客服管理-客诉工单-列表 const getComplainList = (params) => { return ajax({ @@ -81,11 +89,11 @@ const getComplainList = (params) => { data: params, }); }; -//客服管理-反馈建议-撤回 -const getRejectData = (params) => { +//客服管理-客诉统计-数据 +const getComplainStatistics = (params) => { return ajax({ - url: "/api/ope/service/withDraw", - type: "get", + url: "/api/ope/service/complaint_statistics", + type: "post", data: params, }); }; @@ -100,5 +108,6 @@ export default{ submitData, passData, rejectData, - getComplainList + getComplainList, + getComplainStatistics, } \ No newline at end of file From 0e243d9c4444b977b640bf85778b2b700229f75d Mon Sep 17 00:00:00 2001 From: fengxiang <361798944@qq.com> Date: Wed, 13 Dec 2023 15:36:01 +0800 Subject: [PATCH 07/10] =?UTF-8?q?fix():=20=E6=95=B0=E6=8D=AE=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E7=9B=B8=E5=85=B3=E9=A1=B5=E9=9D=A2=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DataMonitor/MonitorCarSet/loadable.jsx | 29 ++++++++++++++-------- .../DataMonitor/PDAWarnRecord/loadable.jsx | 23 +++++++++++------ src/services/OperationCenter/DataMonitor/index.js | 24 ++++++++++++++++++ src/services/OperationCenter/index.js | 4 ++- 4 files changed, 60 insertions(+), 20 deletions(-) create mode 100644 src/services/OperationCenter/DataMonitor/index.js diff --git a/src/pages/OperationCenter/DataMonitor/MonitorCarSet/loadable.jsx b/src/pages/OperationCenter/DataMonitor/MonitorCarSet/loadable.jsx index 89b9756..a96dcfc 100644 --- a/src/pages/OperationCenter/DataMonitor/MonitorCarSet/loadable.jsx +++ b/src/pages/OperationCenter/DataMonitor/MonitorCarSet/loadable.jsx @@ -23,12 +23,12 @@ function MonitorCarSet() { }, { title: "设置时间", - dataIndex: "in_time", + dataIndex: "create_time", align: "center", }, { title: "备注", - dataIndex: "remark", + dataIndex: "text", align: "center", }, { @@ -85,12 +85,19 @@ function MonitorCarSet() { // 列表查询 function fetch(params) { - ajax.getOutParkingArrearsList(params).then((res) => { - if (parseInt(res?.status) === 20000) { - setTableData(res.data.list); - setTotal(res.data.total); + ajax.getMonitorCarList(params).then( + (res) => { + if (parseInt(res?.status) === 20000) { + const { list, total } = res?.data || {}; + setTableData(list || []); + setTotal(total || 0); + } + }, + (err) => { + console.log(err); + message.error("服务器异常"); } - }); + ); } // 提交 @@ -99,7 +106,7 @@ function MonitorCarSet() { message.error("请输入车牌号"); return; } - ajax.getOutParkingArrearsList(rowData).then( + ajax[rowData?.id ? "doMonitorCarEdit" : "doMonitorCarAdd"](rowData).then( (res) => { if (parseInt(res?.status) === 20000) { message.success(res?.message); @@ -123,7 +130,7 @@ function MonitorCarSet() { // title: "删除", content: <>此操作将删除该车辆,是否继续?, onOk: () => { - ajax.getOutParkingArrearsList({ id: data?.id }).then( + ajax.doMonitorCarDel({ id: data?.id }).then( (res) => { if (parseInt(res?.status) === 20000) { message.success(res?.message); @@ -210,11 +217,11 @@ function MonitorCarSet() { setRowData({ ...rowData, - remark: e.target.value, + text: e.target.value, }) } /> diff --git a/src/pages/OperationCenter/DataMonitor/PDAWarnRecord/loadable.jsx b/src/pages/OperationCenter/DataMonitor/PDAWarnRecord/loadable.jsx index 0d32749..8f7cbc1 100644 --- a/src/pages/OperationCenter/DataMonitor/PDAWarnRecord/loadable.jsx +++ b/src/pages/OperationCenter/DataMonitor/PDAWarnRecord/loadable.jsx @@ -11,7 +11,7 @@ function PDAWarnRecord() { const columns = [ { title: "预警类型", - dataIndex: "warn_type", + dataIndex: "type", align: "center", }, { @@ -26,13 +26,13 @@ function PDAWarnRecord() { }, { title: "预警时间", - dataIndex: "warn_time", + dataIndex: "capture_time", align: "center", }, ]; const formSearch = [ { - name: "warn_type", + name: "type", type: "Select", label: "预警类型", placeholder: "不限", @@ -81,12 +81,19 @@ function PDAWarnRecord() { // 列表查询 function fetch(params) { - ajax.getOutParkingArrearsList(params).then((res) => { - if (parseInt(res?.status) === 20000) { - setTableData(res.data.list); - setTotal(res.data.total); + ajax.getMonitorResList(params).then( + (res) => { + if (parseInt(res?.status) === 20000) { + const { list, total } = res?.data || {}; + setTableData(list || []); + setTotal(total || 0); + } + }, + (err) => { + console.log(err); + message.error("服务器异常"); } - }); + ); } return ( diff --git a/src/services/OperationCenter/DataMonitor/index.js b/src/services/OperationCenter/DataMonitor/index.js new file mode 100644 index 0000000..875d63f --- /dev/null +++ b/src/services/OperationCenter/DataMonitor/index.js @@ -0,0 +1,24 @@ +import ajax from "@/config/ajax"; +// --推送管理-- +export default { + /** 监控车辆设置 */ + + // 监控车辆设置-列表数据 + getMonitorCarList: (data) => + ajax({ url: "/api/ope/monitor/list", type: "post", data }), + // 监控车辆设置-新增 + doMonitorCarAdd: (data) => + ajax({ url: "/api/ope/monitor/insert", type: "post", data }), + // 监控车辆设置-编辑 + doMonitorCarEdit: (data) => + ajax({ url: "/api/ope/monitor/edit", type: "post", data }), + // 监控车辆设置-删除 + doMonitorCarDel: (data) => + ajax({ url: "/api/ope/monitor/delete", type: "post", data }), + + /** PDA预警记录 */ + + // PDA预警记录-列表 + getMonitorResList: (data) => + ajax({ url: "/api/ope/monitor/res_list", type: "post", data }), +}; diff --git a/src/services/OperationCenter/index.js b/src/services/OperationCenter/index.js index 6cd9d8a..d55ba1f 100644 --- a/src/services/OperationCenter/index.js +++ b/src/services/OperationCenter/index.js @@ -4,10 +4,12 @@ import OperationSales from "./OperationSales"; import CustomerManage from "./CustomerManage"; import ParkingCardMgm from "./ParkingCardMgm"; import StaggeredMgm from "./StaggeredMgm"; +import DataMonitor from "./DataMonitor"; export default { ...CustomerServieMgm, ...OperationSales, ...CustomerManage, ...ParkingCardMgm, - ...StaggeredMgm + ...StaggeredMgm, + ...DataMonitor }; From 2e04872a53b6897de10eb3591611e1348c8a275d Mon Sep 17 00:00:00 2001 From: guoxin Date: Wed, 13 Dec 2023 15:37:00 +0800 Subject: [PATCH 08/10] =?UTF-8?q?fix():=E4=BF=AE=E6=94=B9=E8=B7=AF?= =?UTF-8?q?=E5=86=85bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InRoadMgm/BusinessMgm/ChargeRules/index.scss | 3 ++ .../PersonMgm/Performance/WorkerStat/loadable.jsx | 44 +++------------------- .../InRoadMgm/RoadMgm/RoadDetail/loadable.jsx | 6 ++- .../CallbackSuggestion/loadable.jsx | 2 +- .../BusinessConfig/BusinessConf/loadable.jsx | 8 ++-- 5 files changed, 20 insertions(+), 43 deletions(-) diff --git a/src/pages/InRoadMgm/BusinessMgm/ChargeRules/index.scss b/src/pages/InRoadMgm/BusinessMgm/ChargeRules/index.scss index ac845a0..bb3e9c5 100644 --- a/src/pages/InRoadMgm/BusinessMgm/ChargeRules/index.scss +++ b/src/pages/InRoadMgm/BusinessMgm/ChargeRules/index.scss @@ -468,6 +468,9 @@ margin-top: 20px; } .bindModal { width: 1000px !important; + position: absolute; + top: 10px; + right: 511px; .selectChange { text-align: center; } diff --git a/src/pages/InRoadMgm/PersonMgm/Performance/WorkerStat/loadable.jsx b/src/pages/InRoadMgm/PersonMgm/Performance/WorkerStat/loadable.jsx index d6c9f2a..409210e 100644 --- a/src/pages/InRoadMgm/PersonMgm/Performance/WorkerStat/loadable.jsx +++ b/src/pages/InRoadMgm/PersonMgm/Performance/WorkerStat/loadable.jsx @@ -88,59 +88,27 @@ function WorkerStat(props) { key: 'name', }, { - title: '当日实收', + title: '实收金额', dataIndex: 'today_sale', key: 'today_sale', }, { - title: '当日追缴', + title: '追缴金额', dataIndex: 'today_rate', key: 'today_rate', }, { - title: '当日应收', + title: '应收金额', dataIndex: 'today_receive', key: 'today_receive', }, { - title: '收费员收费率', + title: '收费率', dataIndex: 'sale_rate', key: 'sale_rate', }, { - title: '营收总额', - dataIndex: 'total_revenue', - key: 'total_revenue', - width: '160px', - render: (text, record) => { - return <> - {record.total_revenue} - - }, - }, - { - title: '预付金额', - dataIndex: 'prepaid_amount', - key: 'prepaid_amount', - render: (text, record) => { - return <> - {record.prepaid_amount} - - }, - }, - { - title: 'PDA欠费追缴金额', - dataIndex: 'debt_collection_amount', - key: 'debt_collection_amount', - width: '200px', - render: (text, record) => { - return <> - {record.debt_collection_amount} - - }, - }, - { - title: '入场操作记录数', + title: '入场操作数', dataIndex: 'entry_operation_records_count', key: 'entry_operation_records_count', render: (text, record) => { @@ -150,7 +118,7 @@ function WorkerStat(props) { }, }, { - title: '出场操作记录数', + title: '出场操作数', dataIndex: 'exit_operation_records_count', key: 'exit_operation_records_count', width: '120px', diff --git a/src/pages/InRoadMgm/RoadMgm/RoadDetail/loadable.jsx b/src/pages/InRoadMgm/RoadMgm/RoadDetail/loadable.jsx index 3afec60..d865f5b 100644 --- a/src/pages/InRoadMgm/RoadMgm/RoadDetail/loadable.jsx +++ b/src/pages/InRoadMgm/RoadMgm/RoadDetail/loadable.jsx @@ -9,11 +9,14 @@ function RoadDetail(props) { const navigate = useNavigate(); const id = location.search.split("=")[1]; const [resultData, setResultData] = useState({}); + const [resultNewData, setResultNewData] = useState({}); function getRoadInfo() { ajax.getRoadInfo({ id }).then((res) => { if (res.status === 20000) { console.log(res.data); setResultData(res.data); + let arr=res.data.img_url.split(',') + setResultNewData(arr); } }); } @@ -115,7 +118,8 @@ function RoadDetail(props) {
{ - resultData.img_url?.map(res=>{ + + resultNewData.img_url?.map(res=>{ return( diff --git a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx index fce577c..fa87b7b 100644 --- a/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx +++ b/src/pages/OperationCenter/CustomerServieMgm/CallbackSuggestion/loadable.jsx @@ -351,7 +351,7 @@ function CallbackSuggestion(props) { const beforeUpload = (file) => { const isPNG = file.type === 'image/png'; if (!isPNG) { - message.error(`请上传图片`); + message.error(`请上传png,jpeg类型图片`); } return isPNG || Upload.LIST_IGNORE; }; diff --git a/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx b/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx index b366f60..d51d471 100644 --- a/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx +++ b/src/pages/SystemMgm/BusinessConfig/BusinessConf/loadable.jsx @@ -73,6 +73,8 @@ function BusinessConf(props) { ...addManage, item_name: v, area_name: '0', operator_name: "0", + parameter:'', + parameterValue:1 }) } //添加 @@ -393,14 +395,14 @@ function BusinessConf(props) { id: getAdminId.id, ...geteditData } - // console.log(geteditData); + console.log(geteditData); if (geteditData.area_name === '') { message.error('请选择城市') } else if (geteditData.operator_name === '') { message.error('请选择商户名称') } else if (geteditData.item_name === '') { message.error('请选择配置项') - } else if (geteditData.parameter === '' || geteditData.parameterValue === '') { + } else if (geteditData.parameter === '' && (geteditData.item_id != 1 &&geteditData.item_id != 11 && geteditData.item_id!=8)) { message.error('请选择参数项') }else{ ajax.editBusiness(data).then(res => { @@ -890,7 +892,7 @@ function BusinessConf(props) { setGetMessage(option); setGetConfiguration(v) setGetEditData( - Object.assign({}, geteditData, { item_id: v, area_id: "0", operator_id: "0" }) + Object.assign({}, geteditData, { item_id: v, area_id: "0", operator_id: "0", parameter:'', parameterValue:1}) ); console.log(geteditData); }} From ff6983e0e1d6dd9fb4e554254c110829b7000273 Mon Sep 17 00:00:00 2001 From: lisf Date: Wed, 13 Dec 2023 15:54:47 +0800 Subject: [PATCH 09/10] =?UTF-8?q?fix():=20=E4=BF=AE=E5=A4=8D=E5=81=9C?= =?UTF-8?q?=E8=BD=A6=E5=8D=A1=E8=AE=A2=E5=8D=95=E7=BC=96=E8=BE=91=E5=B0=91?= =?UTF-8?q?=E4=BC=A0=E5=8F=82=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OtherBusiness/ParkingCard/ParkingCardMgm/loadable.jsx | 3 ++- .../OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx | 8 ++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardMgm/loadable.jsx b/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardMgm/loadable.jsx index 9c9a85e..552013f 100644 --- a/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardMgm/loadable.jsx +++ b/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardMgm/loadable.jsx @@ -254,7 +254,8 @@ function ParkingCardMgm(props) { setAddVisible(true) setCheckData({ ...checkData, - ...record + ...record, + scope:record.scope || "1" }) scopeRef.current = record.scope; } diff --git a/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx b/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx index 0835db5..a88db3a 100644 --- a/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx +++ b/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx @@ -271,7 +271,7 @@ function ParkingCardOrder() { }; // 导出 - const ReportPaySummaryReport = () => { + const ReportPaySummaryReport = () => { ajax.exportOrder(formData).then(res => { if (parseInt(res?.status) === 20000){ Donwload(res.data?.url) @@ -359,7 +359,11 @@ function ParkingCardOrder() { // 修改保存 const editSave = () => { - ajax.editCardOrder(updataOrder).then(res => { + let data = { + ...updataOrder, + id:listItem.id + } + ajax.editCardOrder(data).then(res => { if(res.status == 20000){ setIsShowDetail(false) message.success("修改成功") From a183fdcbac2b5a73cd606536848eab5c5ffba68a Mon Sep 17 00:00:00 2001 From: lisf Date: Wed, 13 Dec 2023 15:57:37 +0800 Subject: [PATCH 10/10] =?UTF-8?q?fix():=E4=BF=AE=E5=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx b/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx index a88db3a..66b4128 100644 --- a/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx +++ b/src/pages/OperationCenter/OtherBusiness/ParkingCard/ParkingCardOrder/loadable.jsx @@ -190,8 +190,6 @@ function ParkingCardOrder() { // 加载 const [ajaxLoading, setAjaxLoading] = useState(false) - // 详情表格数据 - const [detailTableData, setDetailTableData] = useState([]) // 不可选择的日期 const disabledDate = (current) => { return current && current < moment().startOf('day');