diff --git a/src/pages/FinancialMgm/ExceptionDeal/DealRecordAudit/index.jsx b/src/pages/FinancialMgm/ExceptionDeal/DealRecordAudit/index.jsx index afbd2de..fd911e3 100644 --- a/src/pages/FinancialMgm/ExceptionDeal/DealRecordAudit/index.jsx +++ b/src/pages/FinancialMgm/ExceptionDeal/DealRecordAudit/index.jsx @@ -1,15 +1,453 @@ import React, { useState, useRef, useEffect } from "react"; -// import { message, Pagination, Table, Space, Modal, } from "antd"; -// import { dictionary, utils } from "@/config/common"; -// 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 "./index.scss"; -// import errorImg from "@/assets/images/layout/error.png" -// import { useLocation } from "react-router-dom"; +import { message, Pagination, Table, Select, Input, Cascader, DatePicker, Button, Popover } from "antd"; +import { dictionary, utils } from "@/config/common"; +import moment from "moment"; +import { useSessionStorageState, useUpdateEffect } from "ahooks"; +import ajax from "@/services"; +import { QuickMenu, ParkingRecordModal } from "@/components"; +import "./index.scss"; +import errorImg from "@/assets/images/layout/error.png"; +import { useLocation } from "react-router-dom"; function DealRecordAudit() { - return <div>DealRecordAudit</div> + // 默认数据 + const defaultData = { + park_id: "", // 停车订单ID + operator: 0, // 商户名称 + region: [0], // 区域 + road: "", // 车场名称 + road_type: 0, // 车场类型 + plate: "", // 车牌号 + type: 1, // 出入场类型 1: 入场 2: 出场 + start_time: moment().subtract(7, "days").startOf("day").format("YYYY-MM-DD HH:mm:ss"), // 开始时间 + end_time: moment().format("YYYY-MM-DD HH:mm:ss"), // 结束时间 + pn: 1, + page_size: dictionary?.pageSizeOptions1[0] + }; + + const [formData, setFormData] = useState(defaultData); // 表单数据 + const [operatorList, setOperatorList] = useState([{ value: 0, label: "全部" }]); //商户名称 + const [areaList, setAreaList] = useState([]); //区域的下拉数据 + const [loading, setLoading] = useState(false); // 检索按钮加载状态 + const [tableSelectCheck, setTableSelectCheck] = useState([]); // 列表选中的停车订单id + const [parkingRecordModal, setParkingRecordModal] = useState({ open: false, tableData: {} }); // 详情弹框 + + // 表格返回数据 + const [resultData, setResultData] = useState({ + total: 0, + list: [], + }); + + //列表 + const tableColumns = [ + { + title: "序号", + width: 60, + align: "center", + fixed: 'left', + render: (text, record, index) => index + 1, + }, + { + title: "处理记录ID", + dataIndex: "deal_record_id", + key: "deal_record_id", + width: 200, + align: "center", + fixed: 'left', + render: (text) => ( + <> + <a onClick={() => { + navigator.clipboard.writeText(`${text}`).then(() => { message.success("已复制到剪切板") }); + }}>{text}</a> + </> + ), + }, + { + title: "处理时间", + dataIndex: "deal_time", + key: "deal_time", + align: "center", + width: 150, + }, + { + title: "处理人", + dataIndex: "dealer", + key: "dealer", + align: "center", + width: 150, + }, + { + title: "业务订单类型", + dataIndex: "business_type", + key: "business_type", + align: "center", + width: 150, + }, + { + title: "业务订单ID", + dataIndex: "park_id", + key: "park_id", + align: "center", + width: 150, + }, + { + title: "更改项", + dataIndex: "change_content", + key: "change_content", + align: "center", + width: 150, + render: (text, record, index) => { + let content = '' + switch (text) { + case 1: + content = "调整出场时间" + break; + case 2: + content = "变更车牌号" + break; + case 3: + content = "更改订单金额" + break; + case 4: + content = "免费该订单" + break; + case 5: + content = "作废该订单" + break; + default: + break; + } + return <>{content}</> + }, + }, + { + title: "更改项初始值", + dataIndex: "initial_value", + key: "initial_value", + align: "center", + width: 150, + }, + { + title: "更改项更新值", + dataIndex: "update_value", + key: "update_value", + align: "center", + width: 150, + }, + { + title: "状态", + dataIndex: "status", + key: "status", + align: "center", + width: 150, + render: (text, record, index) => { + let content = '--' + switch (text) { + case 1: + content = "待审核" + break; + case 2: + content = "已完成" + break; + case 3: + content = "已驳回" + break; + default: + break; + } + return <>{content}</> + }, + }, + { + title: '操作', + key: 'operation', + dataIndex: 'operation', + align: "center", + fixed: 'right', + width: 100, + render: (text, record, index) => { + return <> + <Popover + overlayClassName="start-exception-deal-operate" + content={ + <div className="operateBtn operate-btn" style={{ cursor: "pointer" }} trigger="hover"> + <div className="hover" onClick={() => { setParkingRecordModal({ open: true, tableData: record || {} }) }}>查看</div> + {record?.status_now == 2 ? + <div className="disabled">处理中</div> : + <div className="hover" onClick={() => { console.log("处理"); }}>处理</div> + } + </div> + } + > + <Button type="primary">操作</Button> + </Popover> + </> + }, + }, + ]; + + // 批量处理 + const $batchProcessing = () => { + if (!tableSelectCheck?.length) return message.error("请选择需要处理的数据!"); + console.log(tableSelectCheck); + }; + + // 分页 + const $changePn = (pn, page_size) => { + let temFormData = {}; + if (formData.page_size == page_size) { + temFormData = { + ...formData, + pn + }; + } else { + temFormData = { + ...formData, + pn: 1, + page_size, + }; + }; + setFormData(temFormData); + $getTableList(temFormData); + }; + + // 获取商户名称 + const $getAllOperator = () => { + ajax + .getAllOperator() + .then((res) => { + if (res.status === 20000 || res.status == 0) { + setOperatorList(res.data || { value: 0, label: "全部" }); + } else { + message.error(res.message); + } + }) + .catch((error) => { + message.error(error.message); + }); + }; + + // 获取区域树结构 + const $getAreaList = () => { + ajax + .getAreaTree() + .then((res) => { + if (res.status === 20000 || res.status == 0) { + setAreaList( + res.data || [{ name: "全部", id: 0, level: 1, children: [] }] + ); + } else { + message.error(res.message); + } + }) + .catch((error) => { + message.error(error.message); + }); + }; + + // 获取表格数据 + const $getTableList = (value = {}) => { + setTableSelectCheck([]); // 清空表格选中项 + let _data = { + ...formData, + ...value + }; + setLoading(true); + ajax.getDealRecordListTableData(_data).then((res) => { + setLoading(false); + if (res.status === 20000 || res.status == 0) { + setResultData(res?.data || {}); + } else { + message.error(res.message); + } + }).catch((error) => { + setLoading(false); + message.error(error.message); + }); + }; + + useEffect(() => { + $getAllOperator(); + $getAreaList(); + $getTableList(); + }, []); + return ( + <div className="start-exception-deal"> + <div className="paid-search"> + <div className="title">查询条件</div> + <div className="form-Wrap"> + <div className="yisa-search"> + <label>处理记录ID</label> + <Input + className="form-con" + placeholder="请输入处理记录ID" + value={formData?.deal_record_id} + allowClear + onChange={(e) => + setFormData({ ...formData, deal_record_id: e.target.value || "" }) + } + /> + </div> + <div className="yisa-search"> + <label>业务订单类型</label> + <Select + className="form-con" + placeholder="请选择" + options={[ + { + label: "全部", + value: -1, + }, + + ]} + value={formData.business_type} + onChange={(v) => setFormData({ ...formData, business_type: v })} + /> + </div> + <div className="yisa-search"> + <label>业务订单ID</label> + <Input + className="form-con" + placeholder="请输入业务订单ID" + value={formData?.park_id} + allowClear + onChange={(e) => + setFormData({ ...formData, park_id: e.target.value || "" }) + } + /> + </div> + <div className="yisa-search"> + <label>时间段</label> + <DatePicker + className="form-con" + showTime + format={"YYYY-MM-DD HH:mm:ss"} + value={moment(formData.start_time)} + disabledDate={(current) => current > moment(formData.end_time)} + onChange={(date, time) => { + setFormData({ ...formData, start_time: time || null }) + }} + /> + </div> + <div className="yisa-search" style={{ marginBottom: "0" }}> + <label>至</label> + <DatePicker + className="form-con" + showTime + format={"YYYY-MM-DD HH:mm:ss"} + value={moment(formData.end_time)} + disabledDate={(current) => current < moment(formData.start_time)} + onChange={(date, time) => { + setFormData({ ...formData, end_time: time || null }) + }} + /> + </div> + <div className="yisa-search"> + <label></label> + <QuickMenu + dropdownData={[ + { text: '昨日', value: 1 }, + { text: '近30天', value: 30 }, + { text: '近90天', value: 90 }, + { text: '近180天', value: 180 } + ]} + onChange={(v) => { + let plate = formData?.plateNumber || ""; + let value = v?.value || 0; + if (plate) { + console.log(utils?.validationPlate(plate)) + if (utils?.validationPlate(plate)) { + setFormData({ + ...formData, + end_time: v?.endDateTime || null, + start_time: v?.startDateTime || null, + }) + } else { + message.error('请正确输入车牌号') + return + } + } else { + if (value > 30) return message.warning("请输入您查询的车牌号!"); + } + setFormData({ + ...formData, + end_time: v?.endDateTime || null, + start_time: v?.startDateTime || null, + }) + }} + /> + </div> + <div className="form-btn"> + <Button + className="reset" + onClick={() => setFormData({ ...defaultData, pn: formData?.pn || 1, page_size: formData?.page_size || dictionary?.pageSizeOptions1[0] })} + > + 重置 + </Button> + <Button + className="submit" + type="primary" + onClick={() => { + let _data = { + ...formData, + pn: 1, + page_size: dictionary?.pageSizeOptions1[0] + } + setFormData(_data) + $getTableList(_data) + }} + loading={loading} + > + 查询 + </Button> + </div> + </div> + </div> + <div className="paid-result"> + <div className="result"> + <div className="row-head"> + <span className="number-wrapper"></span> + </div> + <div className="result-data"> + <Table + rowKey={(row) => row.park_id} + className="table" + dataSource={resultData?.list || []} + columns={tableColumns} + pagination={false} + loading={loading} + // rowSelection={{ + // selectedRowKeys: tableSelectCheck, + // onChange: (selectedRowKeys, selectedRows) => { + // console.log(selectedRowKeys, selectedRows); + // setTableSelectCheck(selectedRowKeys) + // }, + // getCheckboxProps: (record) => ({ + // disabled: record?.status_now == 2 + // }) + // }} + scroll={{ x: "1500", y: "calc(100vh - 310px)" }} + /> + <Pagination + className="pagination-common" + showSizeChanger={true} + showQuickJumper={true} + showTotal={() => `共 ${resultData.total || 0} 条`} + total={resultData.total} + current={formData.pn} + pageSize={formData.page_size} + pageSizeOptions={dictionary?.pageSizeOptions1} + onChange={$changePn} + /> + </div> + </div> + </div> + <ParkingRecordModal + title={parkingRecordModal?.tableData?.road || null} + {...parkingRecordModal} + onCancel={() => { setParkingRecordModal({ open: false, tableData: {} }) }} + /> + </div> + ); } export default DealRecordAudit; \ No newline at end of file diff --git a/src/pages/FinancialMgm/ExceptionDeal/DealRecordAudit/index.scss b/src/pages/FinancialMgm/ExceptionDeal/DealRecordAudit/index.scss index 1838f71..115c54a 100644 --- a/src/pages/FinancialMgm/ExceptionDeal/DealRecordAudit/index.scss +++ b/src/pages/FinancialMgm/ExceptionDeal/DealRecordAudit/index.scss @@ -1,5 +1,209 @@ @import "@/assets/css/mixin.scss"; -$color-container-bg : var(--color-container-bg); -$color-user-list-bg : var(--color-user-list-bg); -$color-text : var(--color-text); -$color-primary : var(--color-primary); +$color-container-bg: var(--color-container-bg); +$color-user-list-bg: var(--color-user-list-bg); +$color-text: var(--color-text); +$color-primary: var(--color-primary); + +.start-exception-deal { + display: flex; + padding-top: 10px; + width: 100%; + height: 100%; + .paid-search { + display: block; + width: 375px; + padding: 10px 10px 20px 20px; + .title { + width: 100%; + font-size: 16px; + font-family: Microsoft YaHei, Microsoft YaHei-Bold; + font-weight: 700; + text-align: left; + color: var(--color-text); + margin-bottom: 20px; + } + .form-Wrap { + height: calc(100% - 45px); + overflow-y: auto; + scrollbar-width: none; + -ms-overflow-style: none; + + &::-webkit-scrollbar { + display: none; + } + } + .yisa-search { + width: 100%; + display: flex; + align-items: center; + margin-bottom: 24px; + + label { + color: var(--color-search-list-item-text); + flex: 0 0 25%; + max-width: 25%; + text-align: right; + padding-right: 8px; + } + + .form-con { + flex: 1; + width: 220px; + } + } + .form-btn { + display: flex; + flex-flow: row nowrap; + padding: 0 10px; + justify-content: space-between; + .reset { + width: 90px; + height: 36px; + border-radius: 4px; + } + .submit { + width: calc(100% - 100px); + height: 36px; + border-radius: 4px; + } + } + .ant-select-selector, + .ant-picker, + .ant-input { + background-color: var(--color-search-list-item-bg) !important; + box-shadow: none !important; + color: var(--color-search-list-item-value); + border-color: var(--color-search-list-item-bd) !important; + } + } + .paid-result { + width: calc(100% - 375px); + padding-bottom: 15px; + padding: 20px; + background: var(--color-user-list-bg); + border-top-left-radius: 20px; + box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.08); + .result { + height: 100%; + display: flex; + flex-direction: column; + .row-head { + height: 32px; + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 13px; + } + .result-data { + width: 100%; + height: calc(100% - 45px - 60px); + .table { + width: 100%; + .ant-table-body { + @include scrollBar(var(--color-user-list-bg), #3B97FF); + + } + .ant-table-thead { + th { + // padding: 0px 16px; + height: 50px; + } + + .ant-table-cell { + background: var(--color-table-header-bg) !important; + font-weight: 700; + + &::before { + display: none; + } + } + } + + .ant-table-tbody { + tr { + &:nth-child(2n) { + td { + background: #3E4557 !important; + } + } + + &:hover { + td { + background: #3E4557 !important; + } + } + + td { + background: #3E4557 !important; + // border-bottom-color: #f2f2f2; + } + } + } + + .ant-pagination-options { + .ant-select { + &:hover { + .ant-select-selector { + border-color: #f5f6f9; + box-shadow: none; + } + } + } + + .ant-select-selector { + border-color: #f5f6f9; + } + + .ant-select-focused { + .ant-select-selector { + box-shadow: none !important; + border-color: #f5f6f9 !important; + } + } + + .ant-pagination-options-quick-jumper { + input { + background: #3E4557; + border-color: #f5f6f9; + + &:focus { + box-shadow: none; + } + } + } + } + .ant-table-cell-fix-left, .ant-table-cell-fix-right { + z-index: 2; + } + } + } + } + } +} + +.start-exception-deal-cascader { + .ant-cascader-menu-item-active { + background-color: var(--color-tag-bg) !important; + } +} + +.start-exception-deal-operate { + .ant-popover-inner-content { + padding: 5px 5px; + width: 100%; + .hover, + .disabled { + padding: 5px 12px; + text-align: center; + } + .hover { + &:hover { + background-color: #414960; + } + } + .disabled { + cursor: no-drop; + color: rgba(255, 255, 255, .3); + } + } +} diff --git a/src/pages/FinancialMgm/ExceptionDeal/DealRecordList/index.jsx b/src/pages/FinancialMgm/ExceptionDeal/DealRecordList/index.jsx index 0b9ffc0..b0b6b70 100644 --- a/src/pages/FinancialMgm/ExceptionDeal/DealRecordList/index.jsx +++ b/src/pages/FinancialMgm/ExceptionDeal/DealRecordList/index.jsx @@ -1,15 +1,456 @@ import React, { useState, useRef, useEffect } from "react"; -// import { message, Pagination, Table, Space, Modal, } from "antd"; -// import { dictionary, utils } from "@/config/common"; -// 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 "./index.scss"; -// import errorImg from "@/assets/images/layout/error.png" -// import { useLocation } from "react-router-dom"; +import { message, Pagination, Table, Select, Input, Cascader, DatePicker, Button, Popover } from "antd"; +import { dictionary, utils } from "@/config/common"; +import moment from "moment"; +import { useSessionStorageState, useUpdateEffect } from "ahooks"; +import ajax from "@/services"; +import { QuickMenu, ParkingRecordModal } from "@/components"; +import "./index.scss"; +import errorImg from "@/assets/images/layout/error.png"; +import { useLocation } from "react-router-dom"; function DealRecordList() { - return <div>DealRecordList</div> + // 默认数据 + const defaultData = { + park_id: "", // 停车订单ID + operator: 0, // 商户名称 + region: [0], // 区域 + road: "", // 车场名称 + road_type: 0, // 车场类型 + plate: "", // 车牌号 + type: 1, // 出入场类型 1: 入场 2: 出场 + start_time: moment().subtract(7, "days").startOf("day").format("YYYY-MM-DD HH:mm:ss"), // 开始时间 + end_time: moment().format("YYYY-MM-DD HH:mm:ss"), // 结束时间 + pn: 1, + page_size: dictionary?.pageSizeOptions1[0] + }; + + const [formData, setFormData] = useState(defaultData); // 表单数据 + const [operatorList, setOperatorList] = useState([{ value: 0, label: "全部" }]); //商户名称 + const [areaList, setAreaList] = useState([]); //区域的下拉数据 + const [loading, setLoading] = useState(false); // 检索按钮加载状态 + const [tableSelectCheck, setTableSelectCheck] = useState([]); // 列表选中的停车订单id + const [parkingRecordModal, setParkingRecordModal] = useState({ open: false, tableData: {} }); // 详情弹框 + + // 表格返回数据 + const [resultData, setResultData] = useState({ + total: 0, + list: [], + }); + + //列表 + const tableColumns = [ + { + title: "序号", + width: 60, + align: "center", + fixed: 'left', + render: (text, record, index) => index + 1, + }, + { + title: "处理记录ID", + dataIndex: "deal_record_id", + key: "deal_record_id", + width: 200, + align: "center", + fixed: 'left', + render: (text) => ( + <> + <a onClick={() => { + navigator.clipboard.writeText(`${text}`).then(() => { message.success("已复制到剪切板") }); + }}>{text}</a> + </> + ), + }, + { + title: "发起时间", + dataIndex: "deal_time", + key: "deal_time", + align: "center", + width: 150, + }, + { + title: "处理人", + dataIndex: "dealer", + key: "dealer", + align: "center", + width: 150, + }, + { + title: "业务订单类型", + dataIndex: "business_type", + key: "business_type", + align: "center", + width: 150, + }, + { + title: "业务订单ID", + dataIndex: "park_id", + key: "park_id", + align: "center", + width: 150, + }, + { + title: "更改项", + dataIndex: "change_content", + key: "change_content", + align: "center", + width: 150, + render: (text, record, index) => { + let content = '' + switch (text) { + case 1: + content = "调整出场时间" + break; + case 2: + content = "变更车牌号" + break; + case 3: + content = "更改订单金额" + break; + case 4: + content = "免费该订单" + break; + case 5: + content = "作废该订单" + break; + default: + break; + } + return <>{content}</> + }, + }, + { + title: "更改项初始值", + dataIndex: "initial_value", + key: "initial_value", + align: "center", + width: 150, + }, + { + title: "更改项更新值", + dataIndex: "update_value", + key: "update_value", + align: "center", + width: 150, + }, + { + title: '操作', + key: 'operation', + dataIndex: 'operation', + align: "center", + fixed: 'right', + width: 100, + render: (text, record, index) => { + return <> + <Popover + overlayClassName="start-exception-deal-operate" + content={ + <div className="operateBtn operate-btn" style={{ cursor: "pointer" }} trigger="hover"> + <div className="hover" onClick={() => { setParkingRecordModal({ open: true, tableData: record || {} }) }}>查看</div> + {record?.status_now == 2 ? + <div className="disabled">处理中</div> : + <div className="hover" onClick={() => { console.log("处理"); }}>处理</div> + } + </div> + } + > + <Button type="primary">操作</Button> + </Popover> + </> + }, + }, + ]; + + // 批量处理 + const $batchProcessing = () => { + if (!tableSelectCheck?.length) return message.error("请选择需要处理的数据!"); + console.log(tableSelectCheck); + }; + + // 分页 + const $changePn = (pn, page_size) => { + let temFormData = {}; + if (formData.page_size == page_size) { + temFormData = { + ...formData, + pn + }; + } else { + temFormData = { + ...formData, + pn: 1, + page_size, + }; + }; + setFormData(temFormData); + $getTableList(temFormData); + }; + + // 获取商户名称 + const $getAllOperator = () => { + ajax + .getAllOperator() + .then((res) => { + if (res.status === 20000 || res.status == 0) { + setOperatorList(res.data || { value: 0, label: "全部" }); + } else { + message.error(res.message); + } + }) + .catch((error) => { + message.error(error.message); + }); + }; + + // 获取区域树结构 + const $getAreaList = () => { + ajax + .getAreaTree() + .then((res) => { + if (res.status === 20000 || res.status == 0) { + setAreaList( + res.data || [{ name: "全部", id: 0, level: 1, children: [] }] + ); + } else { + message.error(res.message); + } + }) + .catch((error) => { + message.error(error.message); + }); + }; + + // 获取表格数据 + const $getTableList = (value = {}) => { + setTableSelectCheck([]); // 清空表格选中项 + let _data = { + ...formData, + ...value + }; + setLoading(true); + ajax.getDealRecordListTableData(_data).then((res) => { + setLoading(false); + if (res.status === 20000 || res.status == 0) { + setResultData(res?.data || {}); + } else { + message.error(res.message); + } + }).catch((error) => { + setLoading(false); + message.error(error.message); + }); + }; + + useEffect(() => { + $getAllOperator(); + $getAreaList(); + $getTableList(); + }, []); + return ( + <div className="start-exception-deal"> + <div className="paid-search"> + <div className="title">查询条件</div> + <div className="form-Wrap"> + <div className="yisa-search"> + <label>处理记录ID</label> + <Input + className="form-con" + placeholder="请输入处理记录ID" + value={formData?.deal_record_id} + allowClear + onChange={(e) => + setFormData({ ...formData, deal_record_id: e.target.value || "" }) + } + /> + </div> + <div className="yisa-search"> + <label>业务订单类型</label> + <Select + className="form-con" + placeholder="请选择" + options={[ + { + label: "全部", + value: -1, + }, + + ]} + value={formData.business_type} + onChange={(v) => setFormData({ ...formData, business_type: v })} + /> + </div> + <div className="yisa-search"> + <label>业务订单ID</label> + <Input + className="form-con" + placeholder="请输入业务订单ID" + value={formData?.park_id} + allowClear + onChange={(e) => + setFormData({ ...formData, park_id: e.target.value || "" }) + } + /> + </div> + <div className="yisa-search"> + <label>时间段</label> + <DatePicker + className="form-con" + showTime + format={"YYYY-MM-DD HH:mm:ss"} + value={moment(formData.start_time)} + disabledDate={(current) => current > moment(formData.end_time)} + onChange={(date, time) => { + setFormData({ ...formData, start_time: time || null }) + }} + /> + </div> + <div className="yisa-search" style={{ marginBottom: "0" }}> + <label>至</label> + <DatePicker + className="form-con" + showTime + format={"YYYY-MM-DD HH:mm:ss"} + value={moment(formData.end_time)} + disabledDate={(current) => current < moment(formData.start_time)} + onChange={(date, time) => { + setFormData({ ...formData, end_time: time || null }) + }} + /> + </div> + <div className="yisa-search"> + <label></label> + <QuickMenu + dropdownData={[ + { text: '昨日', value: 1 }, + { text: '近30天', value: 30 }, + { text: '近90天', value: 90 }, + { text: '近180天', value: 180 } + ]} + onChange={(v) => { + let plate = formData?.plateNumber || ""; + let value = v?.value || 0; + if (plate) { + console.log(utils?.validationPlate(plate)) + if (utils?.validationPlate(plate)) { + setFormData({ + ...formData, + end_time: v?.endDateTime || null, + start_time: v?.startDateTime || null, + }) + } else { + message.error('请正确输入车牌号') + return + } + } else { + if (value > 30) return message.warning("请输入您查询的车牌号!"); + } + setFormData({ + ...formData, + end_time: v?.endDateTime || null, + start_time: v?.startDateTime || null, + }) + }} + /> + </div> + <div className="yisa-search"> + <label>状态</label> + <Select + className="form-con" + placeholder="请选择" + options={[ + { + label: "全部", + value: -1, + }, + { + label: "待审核", + value: 1, + }, + { + label: "已完成", + value: 2, + }, + { + label: "已驳回", + value: 3, + }, + ]} + value={formData.status} + onChange={(v) => setFormData({ ...formData, status: v })} + /> + </div> + <div className="form-btn"> + <Button + className="reset" + onClick={() => setFormData({ ...defaultData, pn: formData?.pn || 1, page_size: formData?.page_size || dictionary?.pageSizeOptions1[0] })} + > + 重置 + </Button> + <Button + className="submit" + type="primary" + onClick={() => { + let _data = { + ...formData, + pn: 1, + page_size: dictionary?.pageSizeOptions1[0] + } + setFormData(_data) + $getTableList(_data) + }} + loading={loading} + > + 查询 + </Button> + </div> + </div> + </div> + <div className="paid-result"> + <div className="result"> + <div className="row-head"> + <span className="number-wrapper">处理记录列表</span> + </div> + <div className="result-data"> + <Table + rowKey={(row) => row.park_id} + className="table" + dataSource={resultData?.list || []} + columns={tableColumns} + pagination={false} + loading={loading} + // rowSelection={{ + // selectedRowKeys: tableSelectCheck, + // onChange: (selectedRowKeys, selectedRows) => { + // console.log(selectedRowKeys, selectedRows); + // setTableSelectCheck(selectedRowKeys) + // }, + // getCheckboxProps: (record) => ({ + // disabled: record?.status_now == 2 + // }) + // }} + scroll={{ x: "1500", y: "calc(100vh - 310px)" }} + /> + <Pagination + className="pagination-common" + showSizeChanger={true} + showQuickJumper={true} + showTotal={() => `共 ${resultData.total || 0} 条`} + total={resultData.total} + current={formData.pn} + pageSize={formData.page_size} + pageSizeOptions={dictionary?.pageSizeOptions1} + onChange={$changePn} + /> + </div> + </div> + </div> + <ParkingRecordModal + title={parkingRecordModal?.tableData?.road || null} + {...parkingRecordModal} + onCancel={() => { setParkingRecordModal({ open: false, tableData: {} }) }} + /> + </div> + ); } export default DealRecordList; \ No newline at end of file diff --git a/src/pages/FinancialMgm/ExceptionDeal/DealRecordList/index.scss b/src/pages/FinancialMgm/ExceptionDeal/DealRecordList/index.scss index 1838f71..115c54a 100644 --- a/src/pages/FinancialMgm/ExceptionDeal/DealRecordList/index.scss +++ b/src/pages/FinancialMgm/ExceptionDeal/DealRecordList/index.scss @@ -1,5 +1,209 @@ @import "@/assets/css/mixin.scss"; -$color-container-bg : var(--color-container-bg); -$color-user-list-bg : var(--color-user-list-bg); -$color-text : var(--color-text); -$color-primary : var(--color-primary); +$color-container-bg: var(--color-container-bg); +$color-user-list-bg: var(--color-user-list-bg); +$color-text: var(--color-text); +$color-primary: var(--color-primary); + +.start-exception-deal { + display: flex; + padding-top: 10px; + width: 100%; + height: 100%; + .paid-search { + display: block; + width: 375px; + padding: 10px 10px 20px 20px; + .title { + width: 100%; + font-size: 16px; + font-family: Microsoft YaHei, Microsoft YaHei-Bold; + font-weight: 700; + text-align: left; + color: var(--color-text); + margin-bottom: 20px; + } + .form-Wrap { + height: calc(100% - 45px); + overflow-y: auto; + scrollbar-width: none; + -ms-overflow-style: none; + + &::-webkit-scrollbar { + display: none; + } + } + .yisa-search { + width: 100%; + display: flex; + align-items: center; + margin-bottom: 24px; + + label { + color: var(--color-search-list-item-text); + flex: 0 0 25%; + max-width: 25%; + text-align: right; + padding-right: 8px; + } + + .form-con { + flex: 1; + width: 220px; + } + } + .form-btn { + display: flex; + flex-flow: row nowrap; + padding: 0 10px; + justify-content: space-between; + .reset { + width: 90px; + height: 36px; + border-radius: 4px; + } + .submit { + width: calc(100% - 100px); + height: 36px; + border-radius: 4px; + } + } + .ant-select-selector, + .ant-picker, + .ant-input { + background-color: var(--color-search-list-item-bg) !important; + box-shadow: none !important; + color: var(--color-search-list-item-value); + border-color: var(--color-search-list-item-bd) !important; + } + } + .paid-result { + width: calc(100% - 375px); + padding-bottom: 15px; + padding: 20px; + background: var(--color-user-list-bg); + border-top-left-radius: 20px; + box-shadow: 0px 3px 8px 0px rgba(0, 0, 0, 0.08); + .result { + height: 100%; + display: flex; + flex-direction: column; + .row-head { + height: 32px; + display: flex; + align-items: center; + justify-content: space-between; + margin-bottom: 13px; + } + .result-data { + width: 100%; + height: calc(100% - 45px - 60px); + .table { + width: 100%; + .ant-table-body { + @include scrollBar(var(--color-user-list-bg), #3B97FF); + + } + .ant-table-thead { + th { + // padding: 0px 16px; + height: 50px; + } + + .ant-table-cell { + background: var(--color-table-header-bg) !important; + font-weight: 700; + + &::before { + display: none; + } + } + } + + .ant-table-tbody { + tr { + &:nth-child(2n) { + td { + background: #3E4557 !important; + } + } + + &:hover { + td { + background: #3E4557 !important; + } + } + + td { + background: #3E4557 !important; + // border-bottom-color: #f2f2f2; + } + } + } + + .ant-pagination-options { + .ant-select { + &:hover { + .ant-select-selector { + border-color: #f5f6f9; + box-shadow: none; + } + } + } + + .ant-select-selector { + border-color: #f5f6f9; + } + + .ant-select-focused { + .ant-select-selector { + box-shadow: none !important; + border-color: #f5f6f9 !important; + } + } + + .ant-pagination-options-quick-jumper { + input { + background: #3E4557; + border-color: #f5f6f9; + + &:focus { + box-shadow: none; + } + } + } + } + .ant-table-cell-fix-left, .ant-table-cell-fix-right { + z-index: 2; + } + } + } + } + } +} + +.start-exception-deal-cascader { + .ant-cascader-menu-item-active { + background-color: var(--color-tag-bg) !important; + } +} + +.start-exception-deal-operate { + .ant-popover-inner-content { + padding: 5px 5px; + width: 100%; + .hover, + .disabled { + padding: 5px 12px; + text-align: center; + } + .hover { + &:hover { + background-color: #414960; + } + } + .disabled { + cursor: no-drop; + color: rgba(255, 255, 255, .3); + } + } +} diff --git a/src/pages/FinancialMgm/PayConf/AppConf/index.jsx b/src/pages/FinancialMgm/PayConf/AppConf/index.jsx index bb15ced..1c250db 100644 --- a/src/pages/FinancialMgm/PayConf/AppConf/index.jsx +++ b/src/pages/FinancialMgm/PayConf/AppConf/index.jsx @@ -62,6 +62,7 @@ function AppConfiguration(props) { const [visible, setVisible] = useState(false); const [actionState, setActionState] = useState(null); //操作状态 const [appTypeData, setAppTypeData] = useState([]); //应用类型 + const [typeData, setTypeData] = useState([]); //应用类型 const [merchantNameData, setMerchantNameData] = useState([]); //支付商户名称 const defRowData = { @@ -89,7 +90,13 @@ function AppConfiguration(props) { ajax.getAppTypeScenariosInfo().then( (res) => { if (parseInt(res?.status) === 20000) { - setAppTypeData(res.data?.app_type_scenario_arr || []); + var typedata = JSON.parse(JSON.stringify(res.data?.app_type_scenario_arr)) + setTypeData(typedata || []) + var typedata2 = [...res.data?.app_type_scenario_arr] + typedata2?.map((item)=>{ + item.options = item.payment_scenario_list + }) + setAppTypeData(typedata2 || []); setMerchantNameData(res.data?.payment_merchant_list || []); } }, @@ -410,7 +417,7 @@ function AppConfiguration(props) { value: rowData?.app_type_name, disabled: actionState !== "add", required: actionState !== "view", - options: appTypeData, + options: typeData, }, { type: "input", @@ -445,15 +452,15 @@ function AppConfiguration(props) { <> {([9, 10, 11].includes(getFieldValue("app_type")) ? [ - { - type: "input", - label: "APPSecret", - name: "app_secret", - value: rowData?.app_secret, - disabled: actionState !== "add", - required: actionState !== "view", - }, - ] + { + type: "input", + label: "APPSecret", + name: "app_secret", + value: rowData?.app_secret, + disabled: actionState !== "add", + required: actionState !== "view", + }, + ] : [] ) .concat([ diff --git a/src/pages/OperationCenter/CarMgm/CarAuth/index.scss b/src/pages/OperationCenter/CarMgm/CarAuth/index.scss index 5a0690a..34bae5b 100644 --- a/src/pages/OperationCenter/CarMgm/CarAuth/index.scss +++ b/src/pages/OperationCenter/CarMgm/CarAuth/index.scss @@ -190,9 +190,15 @@ $color-primary : var(--color-primary); } } .ltc-item-img { - display: flex !important; - img { - margin: 10px 20px; + width: 540px; + height: 300px; + border: 1px solid; + background: #6565656b; + margin-right: 20px !important; + img { + width: 100%; + height: 100%; + object-fit: contain; } } } diff --git a/src/pages/OperationCenter/CarMgm/CarAuth/loadable.jsx b/src/pages/OperationCenter/CarMgm/CarAuth/loadable.jsx index b2850f5..1e6c33a 100644 --- a/src/pages/OperationCenter/CarMgm/CarAuth/loadable.jsx +++ b/src/pages/OperationCenter/CarMgm/CarAuth/loadable.jsx @@ -227,12 +227,18 @@ function CarAuth() { <div className="new-item">车主姓名</div> <div className="new-value">{resultData[indexby].car_owner_name || "--"}</div> </div> + </div> + <div className="ltc-content"> + <div className="ltc-item ltc-item-img"> + <img src={resultData[indexby].vehicle_travel_license_img1} onClick={() => { setBigPic(resultData[indexby].vehicle_travel_license_img1); setBigpicVisible(true) }} /> + {/* <img src={'https://ts1.cn.mm.bing.net/th/id/R-C.31df3a5a2d8462228734f95d459883e2?rik=7EE6TeWDk%2f%2bctQ&riu=http%3a%2f%2fwww.quazero.com%2fuploads%2fallimg%2f140303%2f1-140303214331.jpg&ehk=SpI7mz%2byLqOkT8BL79jcd3iCtQYNFlBHQzbtF1p0vuQ%3d&risl=&pid=ImgRaw&r=0'} onClick={() => { setBigPic(resultData[indexby].vehicle_travel_license_img1); setBigpicVisible(true) }} /> */} + </div> <div className="ltc-item ltc-item-img"> - <img width={300} src={resultData[indexby].vehicle_travel_license_img1} onClick={() => { setBigPic(resultData[indexby].vehicle_travel_license_img1); setBigpicVisible(true) }} /> - <img width={300} src={resultData[indexby].vehicle_travel_license_img2} onClick={() => { setBigPic(resultData[indexby].vehicle_travel_license_img2); setBigpicVisible(true) }} /> - {/* <img width={300} src={'https://ts1.cn.mm.bing.net/th/id/R-C.31df3a5a2d8462228734f95d459883e2?rik=7EE6TeWDk%2f%2bctQ&riu=http%3a%2f%2fwww.quazero.com%2fuploads%2fallimg%2f140303%2f1-140303214331.jpg&ehk=SpI7mz%2byLqOkT8BL79jcd3iCtQYNFlBHQzbtF1p0vuQ%3d&risl=&pid=ImgRaw&r=0'} onClick={() => { setBigPic(resultData[indexby].vehicle_travel_license_img1); setBigpicVisible(true) }} /> - <img width={300} src={'https://ts1.cn.mm.bing.net/th/id/R-C.31df3a5a2d8462228734f95d459883e2?rik=7EE6TeWDk%2f%2bctQ&riu=http%3a%2f%2fwww.quazero.com%2fuploads%2fallimg%2f140303%2f1-140303214331.jpg&ehk=SpI7mz%2byLqOkT8BL79jcd3iCtQYNFlBHQzbtF1p0vuQ%3d&risl=&pid=ImgRaw&r=0'} onClick={() => { setBigPic(resultData[indexby].vehicle_travel_license_img2); setBigpicVisible(true) }} /> */} + <img src={resultData[indexby].vehicle_travel_license_img2} onClick={() => { setBigPic(resultData[indexby].vehicle_travel_license_img2); setBigpicVisible(true) }} /> + {/* <img src={'https://ts1.cn.mm.bing.net/th/id/R-C.31df3a5a2d8462228734f95d459883e2?rik=7EE6TeWDk%2f%2bctQ&riu=http%3a%2f%2fwww.quazero.com%2fuploads%2fallimg%2f140303%2f1-140303214331.jpg&ehk=SpI7mz%2byLqOkT8BL79jcd3iCtQYNFlBHQzbtF1p0vuQ%3d&risl=&pid=ImgRaw&r=0'} onClick={() => { setBigPic(resultData[indexby].vehicle_travel_license_img2); setBigpicVisible(true) }} /> */} </div> + </div> + <div className="ltc-content"> <div className="ltc-item"> <div className="new-item">驾驶证姓名</div> <div className="new-value">{resultData[indexby].driving_licence_name || "--"}</div> @@ -241,10 +247,16 @@ function CarAuth() { <div className="new-item">准驾车型</div> <div className="new-value">{resultData[indexby].driving_type || "--"}</div> </div> + </div> + <div className="ltc-content"> + <div className="ltc-item ltc-item-img"> + <img src={resultData[indexby].driving_licence_img1} onClick={() => { setBigPic(resultData[indexby].driving_licence_img1); setBigpicVisible(true) }} /> + </div> <div className="ltc-item ltc-item-img"> - <img width={300} src={resultData[indexby].driving_licence_img1} onClick={() => { setBigPic(resultData[indexby].driving_licence_img1); setBigpicVisible(true) }} /> - <img width={300} src={resultData[indexby].driving_licence_img2} onClick={() => { setBigPic(resultData[indexby].driving_licence_img2); setBigpicVisible(true) }} /> + <img src={resultData[indexby].driving_licence_img2} onClick={() => { setBigPic(resultData[indexby].driving_licence_img2); setBigpicVisible(true) }} /> </div> + </div> + <div className="ltc-content"> {resultData[indexby].auditState == '残疾车待审核' || resultData[indexby].auditState == '残疾车已审核' || resultData[indexby].auditState == '残疾车已作废' ? <> <div className="ltc-item"> <div className="new-item">残疾证姓名</div> @@ -260,8 +272,10 @@ function CarAuth() { </div> </> : null} <div className="ltc-item ltc-item-img"> - <img width={300} src={resultData[indexby].disabled_certificate_img1} onClick={() => { setBigPic(resultData[indexby].disabled_certificate_img1); setBigpicVisible(true) }} /> - <img width={300} src={resultData[indexby].disabled_certificate_img2} onClick={() => { setBigPic(resultData[indexby].disabled_certificate_img2); setBigpicVisible(true) }} /> + <img src={resultData[indexby].disabled_certificate_img1} onClick={() => { setBigPic(resultData[indexby].disabled_certificate_img1); setBigpicVisible(true) }} /> + </div> + <div className="ltc-item ltc-item-img"> + <img src={resultData[indexby].disabled_certificate_img2} onClick={() => { setBigPic(resultData[indexby].disabled_certificate_img2); setBigpicVisible(true) }} /> </div> </div> </div> diff --git a/src/pages/OperationCenter/CarMgm/CarInfo/index.scss b/src/pages/OperationCenter/CarMgm/CarInfo/index.scss index b87b9a5..424cf7a 100644 --- a/src/pages/OperationCenter/CarMgm/CarInfo/index.scss +++ b/src/pages/OperationCenter/CarMgm/CarInfo/index.scss @@ -161,6 +161,15 @@ $color-primary: var(--color-primary); } .ltc-img { margin-right: 20px; + width: 600px; + height: 300px; + border: 1px solid; + background: #6565656b; + img { + width: 100%; + height: 100%; + object-fit: contain; + } } .ltc-box { width: 100%; @@ -254,30 +263,6 @@ $color-primary: var(--color-primary); } } } - .ltc-liuc { - display: flex; - margin-left: 200px; - .ltc-item { - display: flex; - .ltc-item-name { - margin: 6px 10px 0 10px; - color: #3f94df; - } - } - .ltc-work{ - text-align: center; - .ltc-tips { - border: 3px solid #000; - text-align: center; - line-height: 27px; - height: 35px; - width: 35px; - border-radius: 28px; - margin: auto; - } - } - - } } .distable { .ant-pagination { diff --git a/src/pages/OperationCenter/CarMgm/CarInfo/loadable.jsx b/src/pages/OperationCenter/CarMgm/CarInfo/loadable.jsx index 318c076..e3d90f8 100644 --- a/src/pages/OperationCenter/CarMgm/CarInfo/loadable.jsx +++ b/src/pages/OperationCenter/CarMgm/CarInfo/loadable.jsx @@ -40,31 +40,43 @@ function CarInfo() { title: "车牌号", dataIndex: "plate_number", key: "plate_number", + fixed: "right", + align: "center", }, { title: "会员姓名", dataIndex: "name", key: "name", + fixed: "right", + align: "center", }, { title: "会员手机号", dataIndex: "mobile", key: "mobile", + fixed: "right", + align: "center", }, { title: "行驶本认证", dataIndex: "authStateName", key: "authStateName", + fixed: "right", + align: "center", }, { title: "欠费金额", dataIndex: "arrears_money", key: "arrears_money", + fixed: "right", + align: "center", }, { title: "创建时间", dataIndex: "create_time", key: "create_time", + fixed: "right", + align: "center", }, { title: "操作", @@ -87,7 +99,7 @@ function CarInfo() { ]; //构建表头 const createCol = (label, name, type) => { - label.length == name.length ? null : console.log('参数缺失', label.length, name.length) + label.length == name.length ? null : console.log('参数缺失', label, label.length, name.length) var arr = [] label?.map((item, index) => { let cm = { @@ -829,11 +841,11 @@ function CarInfo() { </div> <div className="ltc-item"> <div className="new-item">车辆型号:</div> - <Input className="ltc-item-input" value={baseData.car_model} placeholder="请输入车辆型号" disabled={edit}></Input> + <Input className="ltc-item-input" value={baseData.car_model} onChange={(e) => { setBaseData({ ...baseData, car_model: e.target.value }) }} placeholder="请输入车辆型号" disabled={edit}></Input> </div> <div className="ltc-item"> <div className="new-item">车身颜色:</div> - <Input className="ltc-item-input" value={baseData.car_color} placeholder="请输入车身颜色" disabled={edit}></Input> + <Input className="ltc-item-input" value={baseData.car_color} onChange={(e) => { setBaseData({ ...baseData, car_color: e.target.value }) }} placeholder="请输入车身颜色" disabled={edit}></Input> </div> <div className="ltc-item"> <div className="new-item"> 车辆类型:</div> @@ -859,7 +871,7 @@ function CarInfo() { /> </div> <div className="ltc-item"> - 号牌类型: + <div className="new-item">号牌类型:</div> <Select disabled={edit} options={dictionary.PlateType} @@ -1105,7 +1117,7 @@ function CarInfo() { pageName={'carInfo'} /> : <> - <div className="back-btn" onClick={() => { setTag('1') }}>返回</div> + <div className="back-btn" onClick={() => { setTag('1');setTabKey('1') }}>返回</div> <Tabs activeKey={tabKey} onChange={changeKey}> <Tabs.TabPane tab="基本信息" key="1"> {renderRecord(detailData)} diff --git a/src/pages/OperationCenter/UserMgm/UserInfo/index.scss b/src/pages/OperationCenter/UserMgm/UserInfo/index.scss index de50c10..fc08a1f 100644 --- a/src/pages/OperationCenter/UserMgm/UserInfo/index.scss +++ b/src/pages/OperationCenter/UserMgm/UserInfo/index.scss @@ -244,7 +244,7 @@ $color-primary: var(--color-primary); height: 300px; border: 1px solid; background: #6565656b; - margin-right: 20px; + margin-right: 20px !important; img { width: 100%; height: 100%; diff --git a/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx b/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx index 1f06a57..90c4de2 100644 --- a/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx +++ b/src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx @@ -79,7 +79,7 @@ function UserInfo() { key: "create_time", fixed: "right", align: "center", - width: 500, + width: 300, }, { title: "绑定车牌", @@ -838,8 +838,8 @@ function UserInfo() { </div> <div className="ltc-box-title"><div className="text">入场照片</div><div className="line"></div></div> <Descriptions title=""> - <Descriptions.Item label=""><img width={300} src={params.in_veh_pic} onClick={() => { setBigPic(params.in_veh_pic); setBigpicVisible(true) }} /></Descriptions.Item> - <Descriptions.Item label=""><img width={300} src={params.in_plate_pic} onClick={() => { setBigPic(params.in_plate_pic); setBigpicVisible(true) }} /></Descriptions.Item> + <Descriptions.Item label=""><img src={params.in_veh_pic} onClick={() => { setBigPic(params.in_veh_pic); setBigpicVisible(true) }} /></Descriptions.Item> + <Descriptions.Item label=""><img src={params.in_plate_pic} onClick={() => { setBigPic(params.in_plate_pic); setBigpicVisible(true) }} /></Descriptions.Item> </Descriptions> </div> ); @@ -945,10 +945,10 @@ function UserInfo() { </div> <div className="ltc-content"> <div className="ltc-item ltc-item-img "> - <img width={340} src={baseData.authImg1} onClick={() => { setBigPic(baseData.authImg1); setBigpicVisible(true) }} /> + <img src={baseData.authImg1} onClick={() => { setBigPic(baseData.authImg1); setBigpicVisible(true) }} /> </div> <div className="ltc-item ltc-item-img "> - <img width={340} src={baseData.authImg2} onClick={() => { setBigPic(baseData.authImg2); setBigpicVisible(true) }} /> + <img src={baseData.authImg2} onClick={() => { setBigPic(baseData.authImg2); setBigpicVisible(true) }} /> </div> </div> </div> diff --git a/src/services/FinancialMgm/exceptionDeal.js b/src/services/FinancialMgm/exceptionDeal.js index 12a87fc..c79acf3 100644 --- a/src/services/FinancialMgm/exceptionDeal.js +++ b/src/services/FinancialMgm/exceptionDeal.js @@ -49,4 +49,22 @@ export default { data: params, }); }, + + // 处理记录列表 表格数据 + getDealRecordListTableData: (params) => { + return ajax({ + url: "/api/fin/abnormal_action/abnormal_action_list", + type: "post", + data: params, + }); + }, + + // 处理记录审核 表格数据 + getDealRecordListTableData: (params) => { + return ajax({ + url: "/api/fin/abnormal_action/abnormal_check_list", + type: "post", + data: params, + }); + }, } \ No newline at end of file