From d4689a02f904811afa933bebbd5e48c3f23844c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=AE=87=E8=88=AA?= <740464440@qq.com> Date: Wed, 18 Oct 2023 16:03:20 +0800 Subject: [PATCH] =?UTF-8?q?fix():=20=E4=BF=AE=E6=94=B9=E5=8F=91=E7=A5=A8?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E5=92=8C=E5=95=86=E6=88=B7=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F=E7=AD=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config/character.config.js | 26 +- .../ExceptionDeal/StartExceptionDeal/index.jsx | 263 ++++++++++++++++- .../ExceptionDeal/StartExceptionDeal/index.scss | 17 +- src/pages/MerchantMgm/InvoiceConf/index.scss | 314 +++++++++++--------- src/pages/MerchantMgm/InvoiceConf/loadable.jsx | 74 ++--- src/pages/MerchantMgm/MerchantInfo/index.scss | 317 ++++++++++++--------- src/pages/MerchantMgm/MerchantInfo/loadable.jsx | 36 +-- 7 files changed, 716 insertions(+), 331 deletions(-) diff --git a/src/config/character.config.js b/src/config/character.config.js index 7f34b59..05223bc 100644 --- a/src/config/character.config.js +++ b/src/config/character.config.js @@ -693,7 +693,30 @@ export default { "text": "女性", "value": 2 }, - ] + ], + // 财务管理 -- 异常处理 车场类型 + roadType: [ + { + label: "全部", + value: 0, + }, + { + label: "路侧平行", + value: 1, + }, + { + label: "路侧垂停", + value: 2, + }, + { + label: "封闭车场", + value: 3, + }, + { + label: "半封闭车场", + value: 4, + }, + ], } //商户名称 export const merchantName = [ @@ -726,4 +749,5 @@ export const schedule = [ ] // 页数格式 export const pageSizeOptions = ["10", "40", "100"]; +; diff --git a/src/pages/FinancialMgm/ExceptionDeal/StartExceptionDeal/index.jsx b/src/pages/FinancialMgm/ExceptionDeal/StartExceptionDeal/index.jsx index 0f87b99..4366529 100644 --- a/src/pages/FinancialMgm/ExceptionDeal/StartExceptionDeal/index.jsx +++ b/src/pages/FinancialMgm/ExceptionDeal/StartExceptionDeal/index.jsx @@ -1,15 +1,256 @@ 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, + Space, + Modal, + Select, + Input, + Cascader, + DatePicker, + Button +} 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"; function StartExceptionDeal() { - return
StartExceptionDeal
+ // 默认数据 + const defaultData = { + park_id: "", // 停车订单ID + operator_id: 0, // 商户名称 + area: [0], // 区域 + road_id: "", // 车场名称 + road_type: 0, // 车场类型 + plate: "", // 车牌号 + exit_gate: 2, // 出入场类型 + start_date: moment().subtract(7, "days").startOf("day").format("YYYY-MM-DD HH:mm:ss"), // 开始时间 + end_date: moment().format("YYYY-MM-DD HH:mm:ss"), // 结束时间 + }; + // session缓存 + const [defaultParams, setDefaultParams] = useSessionStorageState( + "formData_editOrderInquiry", + { defaultValue: null } + ); + + // 表单数据 + const [formData, setFormData] = useState({ + ...defaultData, + ...defaultParams, + }); + const [operatorList, setOperatorList] = useState([ + { value: 0, label: "全部" }, + ]); //商户名称 + const [areaList, setAreaList] = useState([]); //区域的下拉数据 + + const [loading, setLoading] = useState(false); // 检索按钮加载状态 + + // 获取商户名称 + 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); + }); + }; + + useEffect(() => { + $getAllOperator(); + $getAreaList(); + }, []); + + return ( +
+
+
查询条件
+
+
+ + + setFormData({ ...formData, park_id: e.target.value || "" }) + } + /> +
+
+ + { + setFormData({ ...formData, area: v ? v : [0] }); + }} + /> +
+
+ + + setFormData({ ...formData, road_id: e.target.value || "" }) + } + /> +
+
+ + + setFormData({ ...formData, plate: e.target.value || "" }) + } + /> +
+
+ + + - + - - - - @@ -650,32 +647,35 @@ function InvoiceConf() {
-
- { - if (total) { - return `共 ${total} 条` +
+
+ { + if (total) { + return `共 ${total} 条` + } + else return `共 0 条` } - else return `共 0 条` - } - } - total={total} - current={pageInfo.pn} - pageSize={pageInfo.page_size} - pageSizeOptions={pageSizeOptions} - onChange={changePn} - onShowSizeChange={changeLength} - /> - : + } + total={total} + current={pageInfo.pn} + pageSize={pageInfo.page_size} + pageSizeOptions={pageSizeOptions} + onChange={changePn} + onShowSizeChange={changeLength} + /> +
+
: '' } diff --git a/src/pages/MerchantMgm/MerchantInfo/index.scss b/src/pages/MerchantMgm/MerchantInfo/index.scss index 8539043..0c93882 100644 --- a/src/pages/MerchantMgm/MerchantInfo/index.scss +++ b/src/pages/MerchantMgm/MerchantInfo/index.scss @@ -5,158 +5,206 @@ $color-text : var(--color-text); $color-primary : var(--color-primary); #MerchantInfo { - .panel { - width: 100%; - // height: 100px; - padding-top: 20px; - padding-left: 20px; - background: none; - - .panel-1 { - display: flex; - - .yisa-search { + height: 100%; + .merchant-info-table { + display: flex; + height: 100%; + padding-top: 10px; + .panel { + display: block; + width: 375px; + padding: 0 10px 20px 20px; + background: transparent; + .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: 10px; + } + .panel-1 { display: flex; - flex-basis: fit-content; - align-items: center; - width: 288px; - margin: 10px 5px; - - .yisa-cascader { - width: 100px; - background: transparent; - border-color: var(--color-border); + >.ant-form-inline { + display: block; + .ant-form-item-row { + flex: 1; + .ant-input-group { + display: flex; + .ant-input-group-addon { + width: 120px; + margin-right: 10px; + } + } + .ant-form-item-control { + flex: 1; + } + } } - - .yisa-select { - width: 190px; - - .ant-select-selector { + + .yisa-search { + display: flex; + flex-basis: fit-content; + align-items: center; + margin: 10px 0; + label { + display: inline-block; + width: 120px; + text-align: right; + margin-right: 10px; + } + .yisa-cascader { + width: 120px; + background: transparent; + border-color: var(--color-border); + } + + .yisa-select { + // width: 190px; + + .ant-select-selector { + background: transparent; + border-color: var(--color-border); + } + + } + + .form-input { + // width: 190px; + background: transparent; + border-color: var(--color-border); + } + + .ant-select-arrow { + background: none !important; + } + + .ant-input { background: transparent; border-color: var(--color-border); } - - } - - .form-input { - width: 190px; - background: transparent; - border-color: var(--color-border); - } - - .ant-select-arrow { - background: none !important; } - - .ant-input { + .search-group-item { background: transparent; border-color: var(--color-border); } - } - .search-group-item { - background: transparent; - border-color: var(--color-border); - } - - - .btnBox { - display: flex; - align-items: center; - - .btn { - margin: 0 5px; - border-radius: 5px; - border: none; - } - - .search-btn { - background-color: #409EFF; - } - - .reset-btn { - color: #000; - background-color: #fff; - } - - .create-btn { - background-color: #67C23A; - + + + .btnBox { + display: flex; + margin-top: 20px; + align-items: center; + margin-right: 0; + .ant-form-item-control-input-content { + display: flex; + justify-content: space-between; + } + .btn { + width: 110px; + height: 36px; + // margin: 0 5px; + border-radius: 5px; + border: none; + } + + .search-btn { + background-color: #409EFF; + } + + .reset-btn { + color: #000; + background-color: #fff; + } + + .create-btn { + background-color: #67C23A; + + } } } } + .table-content { + flex: 1; + 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); + .table { + width: 100%; + max-height: calc(100% - 50px); + .ant-table-body { + @include scrollBar(var(--color-user-list-bg), #3B97FF); - } - - .table { - width: 98%; - margin: 15px 10px 10px 15px; - - - .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; + .ant-table-thead { + th { + padding: 0px 16px; + height: 50px; } - } - - &:hover { - td { - background: #3E4557 !important; + + .ant-table-cell { + background: var(--color-table-header-bg) !important; + font-weight: 700; + + &::before { + display: none; + } } } - - td { - background: #3E4557 !important; - border-bottom-color: #f2f2f2; + + .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-pagination-options { + .ant-select { + &:hover { + .ant-select-selector { + border-color: #f5f6f9; + box-shadow: none; + } + } + } + .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-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; + } + } } } } @@ -172,8 +220,9 @@ $color-primary : var(--color-primary); } #create { - height: 800px; + height: 100%; overflow-y: scroll; + @include scrollBar(var(--color-user-list-bg), #3B97FF); .create-form { .ant-form-item-label{ @@ -352,9 +401,9 @@ $color-primary : var(--color-primary); } #check { - height: 800px; + height: 100%; overflow-y: scroll; - + @include scrollBar(var(--color-user-list-bg), #3B97FF); .check-form { .btns { display: flex; diff --git a/src/pages/MerchantMgm/MerchantInfo/loadable.jsx b/src/pages/MerchantMgm/MerchantInfo/loadable.jsx index 6460527..aed341e 100644 --- a/src/pages/MerchantMgm/MerchantInfo/loadable.jsx +++ b/src/pages/MerchantMgm/MerchantInfo/loadable.jsx @@ -766,8 +766,9 @@ function MerchantInfo() {
{ !createVisible && !updateVisible && !checkVisible ? - <> +
+
查询条件
- -
- -
- + record.id} + scroll={{ y: "calc(100vh - 280px)" }} + >
+ { @@ -890,9 +893,10 @@ function MerchantInfo() { pageSize={pageInfo.page_size} pageSizeOptions={pageSizeOptions} onChange={changePn} - onShowSizeChange={changeLength} - /> - : '' + onShowSizeChange={changeLength} + /> +
+
: '' } {