chenglb 1 year ago
parent
commit
95658efc98
  1. 20
      src/components/TableModule/index.jsx
  2. 5
      src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageAly/ParkArrear/index.jsx
  3. 1
      src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageAly/ParkArrear/index.scss
  4. 8
      src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageAly/PlateArrear/index.jsx
  5. 5
      src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageAly/PlateArrear/index.scss
  6. 1
      src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageAly/index.scss
  7. 7
      src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageRecoverAly/loadable.jsx
  8. 1
      src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityArrearageAly/loadable.jsx
  9. 1
      src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityIncomeStat/loadable.jsx
  10. 1
      src/pages/DataAnalysisPrediction/ParkingIncomeAly/OrderArrearageAly/loadable.jsx
  11. 1
      src/pages/DataAnalysisPrediction/ParkingIncomeAly/PriceAly/loadable.jsx
  12. 4
      src/pages/DataAnalysisPrediction/ParkingOverview/index.scss
  13. 30
      src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx
  14. 4
      src/pages/InRoadMgm/BusinessMgm/ChargeRules/EditModal.jsx
  15. 2
      src/pages/InRoadMgm/EquipmentMgm/MonitorEquipment/loadable.jsx
  16. 35
      src/pages/InRoadMgm/PersonMgm/Performance/SalesStat/loadable.jsx
  17. 21
      src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx
  18. 21
      src/pages/InRoadMgm/RoadMgm/RoadConf/index.scss
  19. 32
      src/pages/InRoadMgm/RoadMgm/RoadConf/loadable.jsx
  20. 2
      src/pages/InRoadMgm/Stuff/CategroyConf/loadable.jsx
  21. 25
      src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/AddModal.jsx
  22. 4
      src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/EffectiveDate.jsx
  23. 71
      src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/TimePart.jsx
  24. 3
      src/pages/SystemMgm/MessageMgm/ConfMes/loadable.jsx
  25. 3
      src/pages/SystemMgm/MessageMgm/DeviceAlarmMes/loadable.jsx
  26. 3
      src/pages/SystemMgm/MessageMgm/MonitorCarAlarmMes/loadable.jsx
  27. 1
      src/pages/SystemMgm/MessageMgm/NotificationMes/loadable.jsx
  28. 7
      src/pages/SystemMgm/OrgnizationMgm/loadable.jsx
  29. 3
      src/pages/SystemMgm/RoleMgm/loadable.jsx
  30. 2
      src/services/InroadMgm/InRoadOverview/index.js

20
src/components/TableModule/index.jsx

@ -272,7 +272,7 @@ const TableModule = forwardRef((props, ref) => {
setFormData({ ...searchForm.getFieldsValue(), plateValue: '' })
//search({ ...searchForm.getFieldsValue() })
setTimeGroup({
timeType: timeGroup.timeType,
timeType: '',
timeRanges: {
start_time: moment().subtract(1, "day").format('YYYY-MM-DD 00:00:00'),
end_time: moment().format("YYYY-MM-DD 23:59:59"),
@ -280,6 +280,9 @@ const TableModule = forwardRef((props, ref) => {
});
}
useEffect(() => {
if (pageName == 'productOrderInquiryCar' || pageName == 'productOrderInquiry') {
return
}
!areaSelectedList.length && setTimeout(fetch, 1000)
}, [areaSelectedList])
function cascaderChange(value, options) {
@ -744,6 +747,7 @@ const TableModule = forwardRef((props, ref) => {
console.log(range, type)
setTimeGroup({ timeType: type, timeRanges: range });
}}
_timeGroup={timeGroup.timeRanges}
/>
</>
@ -1020,13 +1024,17 @@ function InputSelectGroup(params) {
const {
onChange = () => { },
getValue = () => { },
} = params;
const [timeType, setTimeType] = useState(1);
const [timeGroup, setTimeGroup] = useState({
_timeGroup = {
start_time: moment().subtract(1, "day").format('YYYY-MM-DD 00:00:00'),
end_time: moment().format("YYYY-MM-DD 23:59:59"),
});
console.log(timeGroup);
}
} = params;
const [timeType, setTimeType] = useState(1);
const [timeGroup, setTimeGroup] = useState(_timeGroup);
useEffect(() => {
setTimeGroup(_timeGroup)
console.log(_timeGroup);
}, [_timeGroup]);
useEffect(() => {
onChange(timeGroup, timeType);
}, [timeGroup, timeType]);

5
src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageAly/ParkArrear/index.jsx

@ -78,7 +78,8 @@ const ParkArrear = forwardRef((props, ref) => {
total: resultData?.totalRecords,
pageSize: pageInfo.length,
pageSizeOptions: Array.from(
new Set([...[15], ...(dictionary?.pageSizeOptions || [])])
// new Set([...[15], ...(dictionary?.pageSizeOptions || [])])
[...dictionary?.pageSizeOptions]
),
onChange: (current, size) => {
setPageInfo({
@ -159,7 +160,7 @@ const ParkArrear = forwardRef((props, ref) => {
dataSource={resultData?.list || []}
columns={tableColumns}
pagination={false}
scroll={{y: 585}}
scroll={{y: 'calc(100% - 200px)'}}
loading={tableLoading}
/>
<Pagination {...paginationProps} className="pagination-common" />

1
src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageAly/ParkArrear/index.scss

@ -22,6 +22,7 @@
height: 25px;
}
.park-table-content {
min-height: 0;
flex: 1;
.park-table {
flex: 1;

8
src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageAly/PlateArrear/index.jsx

@ -75,9 +75,7 @@ const PlateArrear = forwardRef((props, ref) => {
current: pageInfo.pn,
total: resultData?.totalRecords,
pageSize: pageInfo.length,
pageSizeOptions: Array.from(
new Set([...[15], ...(dictionary?.pageSizeOptions || [])])
),
pageSizeOptions: dictionary.pageSizeOptions,
onChange: (current, size) => {
setPageInfo({
...pageInfo,
@ -286,14 +284,14 @@ const ModalDetail = (props) => {
return (
<Modal
className="yisa-modal detail-modal"
title={"弹窗详情"}
title={"欠费总分析详情"}
open={visible}
width={1100}
onCancel={onCancel}
onOk={onOk}
>
<div className="detail-modal-container">
<div className="detail-title">欠费总分析详情</div>
<div className="detail-title">共查询到<span>{ resultData.totalRecords || 0 }</span>条结果</div>
<ResultFlowResult
ajaxLoad={tableLoading}
resultData={resultData?.list || []}

5
src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageAly/PlateArrear/index.scss

@ -45,6 +45,11 @@
padding-bottom: 5px;
.detail-title {
margin-bottom: 10px;
span {
color: var(--color-primary);
padding: 0 5px;
font-weight: 700;
}
}
.ant-table-thead>tr>th {
background-color: #616b83;

1
src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageAly/index.scss

@ -36,6 +36,7 @@ $color-primary : var(--color-primary);
margin-bottom: 10px;
}
.parking-wrapper {
min-height: 0;
flex: 1;
}
}

7
src/pages/DataAnalysisPrediction/ParkingIncomeAly/ArrearageRecoverAly/loadable.jsx

@ -70,9 +70,10 @@ function ArrearageRecoverAly(props) {
current: pageInfo.pn,
total: resultData?.totalRecords,
pageSize: pageInfo.length,
pageSizeOptions: Array.from(
new Set([...[15], ...(dictionary?.pageSizeOptions || [])])
),
// pageSizeOptions: Array.from(
// new Set([...[15], ...(dictionary?.pageSizeOptions || [])])
// ),
pageSizeOptions: dictionary.pageSizeOptions,
onChange: (current, size) => {
setPageInfo({
...pageInfo,

1
src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityArrearageAly/loadable.jsx

@ -73,6 +73,7 @@ function CityArrearageAly(props) {
pageSizeOptions: Array.from(
new Set([...[15], ...(dictionary?.pageSizeOptions || [])])
),
pageSizeOptions: dictionary.pageSizeOptions,
onChange: (current, size) => {
setPageInfo({
...pageInfo,

1
src/pages/DataAnalysisPrediction/ParkingIncomeAly/CityIncomeStat/loadable.jsx

@ -78,6 +78,7 @@ function CityIncomeStat(props) {
pageSizeOptions: Array.from(
new Set([...[15], ...(dictionary?.pageSizeOptions || [])])
),
pageSizeOptions: dictionary.pageSizeOptions,
onChange: (current, size) => {
setPageInfo({
...pageInfo,

1
src/pages/DataAnalysisPrediction/ParkingIncomeAly/OrderArrearageAly/loadable.jsx

@ -81,6 +81,7 @@ function OrderArrearageAly(props) {
pageSizeOptions: Array.from(
new Set([...[15], ...(dictionary?.pageSizeOptions || [])])
),
pageSizeOptions: dictionary.pageSizeOptions,
onChange: (current, size) => {
setPageInfo({
...pageInfo,

1
src/pages/DataAnalysisPrediction/ParkingIncomeAly/PriceAly/loadable.jsx

@ -80,6 +80,7 @@ function PriceAly(props) {
pageSizeOptions: Array.from(
new Set([...[15], ...(dictionary?.pageSizeOptions || [])])
),
pageSizeOptions: dictionary.pageSizeOptions,
onChange: (current, size) => {
setPageInfo({
...pageInfo,

4
src/pages/DataAnalysisPrediction/ParkingOverview/index.scss

@ -531,7 +531,7 @@ $color-primary : var(--color-primary);
.tfff {
display: flex;
flex-direction: column;
justify-content: space-between;
// justify-content: space-between;
}
.fsagsxf {
@ -543,7 +543,7 @@ $color-primary : var(--color-primary);
.topcarlv {
display: flex;
justify-content: space-between;
justify-content: space-around;
padding: 0 20px;
.tpph {

30
src/pages/DataAnalysisPrediction/ParkingOverview/loadable.jsx

@ -789,7 +789,7 @@ const ParkingOverview = connect(function mapStateToProps(state) {
viewControl: {
//3d
alpha: 30, //
distance: 250, //zoom
distance: 300, //zoom
rotateSensitivity: 0, //0
zoomSensitivity: 0, //0
panSensitivity: 0, //0
@ -1743,7 +1743,7 @@ const ParkingOverview = connect(function mapStateToProps(state) {
GetRevenueAnalysis(RoadSelect, "1");
if (CarRoad[CarShow]?.type == 2) {
setRoadturn(true);
GetrateRank("1");
GetrateRank(RoadSelect, "1");
GetincomeType(RoadSelect, "1");
GetOverviewData(RoadSelect);
} else {
@ -2135,7 +2135,7 @@ const ParkingOverview = connect(function mapStateToProps(state) {
? "实时收入占比"
: RoadSelect == "2"
? "路段收费率排行榜"
: "路段周转TOP3"}
: "车场周转率TOP3"}
</div>
{CarRoad[CarShow]?.type != 2 ? (
@ -2160,33 +2160,45 @@ const ParkingOverview = connect(function mapStateToProps(state) {
{CarRoad[CarShow]?.type == 1 ? (
<div className="topcarlv">
{Cartop[1]?.name && (
<div className="tpph topt">
{/* <img src={TOP2} alt="" /> */}
<span>TOP2</span>
<p>
{RoadSelect == 3 ? "周转率" : "收费率"}
{Cartop[1]?.rate || 0}
{Cartop[1]?.rate || 0}%
</p>
<div title={Cartop[1]?.name || ""}>{Cartop[1]?.name || ""}</div>
<div title={Cartop[1]?.name || ""}>
{Cartop[1]?.name || ""}
</div>
</div>
)}
{Cartop[0]?.name && (
<div className="tpph topo">
{/* <img src={TOP1} alt="" /> */}
<span>TOP1</span>
<p>
{RoadSelect == 3 ? "周转率" : "收费率"}
{Cartop[0]?.rate || 0}
{Cartop[0]?.rate || 0}%
</p>
<div title={Cartop[0]?.name || ""}>{Cartop[0]?.name || ""}</div>
<div title={Cartop[0]?.name || ""}>
{Cartop[0]?.name || ""}
</div>
</div>
)}
{Cartop[2]?.name && (
<div className="tpph tops">
{/* <img src={TOP3} alt="" /> */}
<span>TOP3</span>
<p>
{RoadSelect == 3 ? "周转率" : "收费率"}
{Cartop[2]?.rate || 0}
{Cartop[2]?.rate || 0}%
</p>
<div title={Cartop[2]?.name || ""}>{Cartop[2]?.name || ""}</div>
<div title={Cartop[2]?.name || ""}>
{Cartop[2]?.name || ""}
</div>
</div>
)}
</div>
) : (
<ReactEcharts

4
src/pages/InRoadMgm/BusinessMgm/ChargeRules/EditModal.jsx

@ -32,7 +32,7 @@ const FormModal = (props) => {
const defaultData = {
feeName: '',
freeTimeAble: 0,
operator_name: '',
operationId: '',
feeCode: '',
freeTime: '',
extend_time: '',
@ -564,7 +564,7 @@ const FormModal = (props) => {
</Form.Item>
<Form.Item
name="operator_name"
name="operationId"
label="商户名称"
className="yisa-label inputSearch"
rules={[{ required: true, message: "请选择${label}" }]}

2
src/pages/InRoadMgm/EquipmentMgm/MonitorEquipment/loadable.jsx

@ -112,7 +112,9 @@ function Fence(props) {
})
setEditId(item.id)
getBerthDataByNvr(item.nvr_id).then(() => {
setTimeout(() => {
setBerthSelectData(item.berth_ids ? item.berth_ids.split(',').map((v) => v) : [])
}, 500)
})
setEditModalVisible(true)
}

35
src/pages/InRoadMgm/PersonMgm/Performance/SalesStat/loadable.jsx

@ -29,18 +29,20 @@ function SalesStat(props) {
}
const [tabData, setTabData] = useState({
pn: 1,
length: Number(pageSizeOptions[0])
length: Number(pageSizeOptions[0]),
uid: '',
start: '',
end: ''
})
const [formData, setFormData] = useState(parameter)
const [lastFormData, setLastFormData] = useState(formData)
const lastFormDataRef = useRef(formData)
const lastTabDataRef = useRef()
const lastTabDataRef = useRef(tabData)
const [lastTotalData, setLastTotalData] = useState(tabData)
const [revenueVisible, setRevenueVisible] = useState(false)
const [exportVisible, setExportVisible] = useState(false)
const [lastTotalData, setLastTotalData] = useState(tabData)
const [getTabData, setGetTabData] = useState([])
const [getTabTitle, setGetTabTitle] = useState([])
console.log(lastTotalData);
const [checkData, setCheckData] = useState([])
const [getValue, setGetValue] = useState({})
const [getTotal, setGetTotal] = useState({})
@ -58,6 +60,11 @@ function SalesStat(props) {
end: v.endDateTime,
time: v.time
})
setTabData({
...tabData,
start: v.startDateTime,
end: v.endDateTime,
})
}
//
const handleColumns = (tab) => {
@ -177,13 +184,18 @@ function SalesStat(props) {
dataIndex: 'persent',
key: 'persent',
}]
const [getDetailId, setDetailId] = useState({})
const getDetailData = (record) => {
setDetailId(record)
setTabData(Object.assign({}, tabData, { uid: record.id }))
getDetailList(record)
}
const getDetailList = (record) => {
let data = {
...lastTotalData,
uid: record.id,
start: getTime.startDateTime,
end: getTime.endDateTime
...tabData,
pn: record.pn == null ? tabData.pn : record.pn,
length: record.length == null ? tabData.length : record.length,
uid: record.id || tabData.id,
}
ajax.revenueData(data).then(res => {
if (res.status === 20000) {
@ -236,9 +248,10 @@ function SalesStat(props) {
setTabData(Object.assign({}, tabData, { pn: pn, length: length }))
setLastTotalData(Object.assign({}, lastTotalData, { pn: pn, length: length }))
lastTabDataRef.current = Object.assign({}, lastTotalData, { pn: pn, length: length })
getDetailData(Object.assign({}, lastTotalData, { pn: pn, length: length }))
getDetailData(Object.assign({}, tabData, { pn: pn, length: length, ...getDetailId }))
}
}
console.log(tabData);
//
const changeLength = (pn, length) => {
setFormData(Object.assign({}, formData, { pn: 1, length: length }))
@ -299,7 +312,7 @@ function SalesStat(props) {
setCheckData(item.children)
setGetTotal(item.total_records)
}
console.log(getTotal);
// console.log(getTotal);
return <>
<div className="paid-sales">
<div className="paid-search">

21
src/pages/InRoadMgm/RoadMgm/ConfigRoad/loadable.jsx

@ -51,13 +51,17 @@ import { getToken } from "@/config/cookie";
import { useSetState, useSessionStorageState, useUpdateEffect } from "ahooks";
const { TextArea } = Input;
function ConfigRoad() {
const ConfigRoad = (props) => {
const {
getRecordList = {}
} = props
console.log(getRecordList);
const navigate = useNavigate();
//
const location = useLocation();
const parking_id = location.search.split("=")[1].split("&")[0];
const operator_id = location.search.split("&")[1].split("=")[1];
const region_id = location.search.split("&")[2].split("=")[1];
const parking_id = getRecordList.id;
const operator_id = getRecordList.operator_id;
// const region_id = location.search.split("&")[2].split("=")[1];
const [modalBtnLoading, setModalBtnLoading] = useState(false)
//Form
const [berthForm] = Form.useForm();
@ -633,7 +637,7 @@ function ConfigRoad() {
downloadUrl: "/api/bpm/device/road_set_pole_position_import_template",
importProps: {
name: "file",
action: "/api/bpm/device/road_set_import_pole_position",
action: "/PMS/api/bpm/device/road_set_import_pole_position",
data: { road_id: parking_id },
headers: {
Authorization: getToken(),
@ -1777,7 +1781,7 @@ function ConfigRoad() {
<div className="right-list">
<div className="total-row-wrapper">
<span className="number-wrapper">
<span>
{/* <span>
<Button
type="primary"
style={{ marginRight: "10px" }}
@ -1787,7 +1791,7 @@ function ConfigRoad() {
>
返回
</Button>
</span>
</span> */}
<span className="letter">共查询到</span>
<span className="total-number"> {resultData.total_records}</span>
<span className="letter">条结果</span>
@ -1947,7 +1951,8 @@ function ConfigRoad() {
</p>
<p>2.请选择上传文件并上传</p>
<Upload {...currentObj.importProps} beforeUpload={beforeUpload}>
<Button type="primary" icon={<UploadOutlined />}>
<Button type="primaryimport { pages } from '@/pages';
" icon={<UploadOutlined />}>
上传
</Button>
</Upload>

21
src/pages/InRoadMgm/RoadMgm/RoadConf/index.scss

@ -98,16 +98,14 @@ $color-primary: var(--color-primary);
.ant-select-selection-placeholder {
color: var(--color-placeholder);
}
.ant-select-disabled.ant-select-single:not(.ant-select-customize-input)
.ant-select-selector {
.ant-select-disabled.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {
background: var(--color-input-disabled-bg);
color: var(--color-placeholder);
}
.ant-select-disabled .ant-select-arrow {
color: var(--color-placeholder);
}
.ant-select-disabled.ant-select:not(.ant-select-customize-input)
.ant-select-selector {
.ant-select-disabled.ant-select:not(.ant-select-customize-input) .ant-select-selector {
background-color: var(--color-input-disabled-bg);
color: var(--color-input-disabled-color);
cursor: not-allowed;
@ -161,3 +159,18 @@ $color-primary: var(--color-primary);
// border-color:var(--checkable-tag-border);
}
}
.handleCloseDetail {
width: 1750px !important;
position: absolute;
top: 30px;
left: 100px;
max-height: 850px;
overflow: auto;
}
.handleCloseDetail::-webkit-scrollbar {
width: 5px;
}
.handleCloseDetail::-webkit-scrollbar-thumb {
background-color: #9da2ab;
border-radius: 10px;
}

32
src/pages/InRoadMgm/RoadMgm/RoadConf/loadable.jsx

@ -21,6 +21,7 @@ import { useSetState, useSessionStorageState, useUpdateEffect } from "ahooks";
import ajax from "@/services";
import { ResultFlow } from "@/components";
import "./index.scss";
import ConfigRoad from "../ConfigRoad"
import AuditModifyModal from "./AuditModifyModal";
// import errorImg from "@/assets/images/layout/error.png"
// import { useLocation } from "react-router-dom";
@ -129,14 +130,20 @@ function RoadConf() {
>
编辑
</Link>
{record.road_level == 2 ? null : <Link
{record.road_level == 2 ? null :
<>
{/* <Link
to={{
pathname: "/inRoad/ConfigRoad",
search: `?id=${record.id}&operator_id=${record.operator_id}&region_id=${record.region_id}`,
}}
>
路段配置
</Link>}
</Link> */}
<a onClick={() => handleModal(record)}> 路段配置</a>
</>
}
<a
onClick={() => {
const type = record.no_pwd_pay === 1 ? 2 : 1;
@ -170,7 +177,15 @@ function RoadConf() {
road_level: 0,
no_pwd_pay: 0,
};
const [handleDetail, setHandleDetail] = useState(false)
const [getRecordList, setGetRecordList] = useState({})
const handleModal = (record) => {
setGetRecordList(record)
setHandleDetail(true)
}
const handleClose = () => {
setHandleDetail(false)
}
const [loading, setLoading] = useState(false);
const [resultData, setReusltData] = useSetState({
//
@ -608,6 +623,17 @@ function RoadConf() {
>
高德的POI没有录入请先录入
</Modal>
<Modal
visible={handleDetail}
onCancel={handleClose}
footer={false}
className="handleCloseDetail"
>
<ConfigRoad
getRecordList={getRecordList}
>
</ConfigRoad>
</Modal>
</div>
{/* <AuditModifyModal
open={auditModalData.visible}

2
src/pages/InRoadMgm/Stuff/CategroyConf/loadable.jsx

@ -108,6 +108,8 @@ function CategroyConf(props) {
message.success('删除成功')
setDeleteVisible(false)
getData(formData)
}else{
message.error(res.message)
}
})
}

25
src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/AddModal.jsx

@ -28,6 +28,7 @@ function AddModal(props) {
const isEdit = status === "edit";
const [getOperationName, setGetOperationName] = useState([])
const [getNewOperationName, setNewGetOperationName] = useState([])
const [timestatus, setTimestatus] = useState(true)
const operationName = () => {
ajax.getAllOperator().then(res => {
let arr = res.data
@ -57,6 +58,7 @@ function AddModal(props) {
});
function addEctiveDate() {
setTimestatus(false)
const randomNum = Math.floor(Math.random() * 1000);
const item = {
key: randomNum.toString() + Date.now().toString().substring(0, 6),
@ -78,15 +80,23 @@ function AddModal(props) {
}
//
function fetch(params) {
console.log(81, params, timePart)
//timePart()
console.log(81, params)
// if(params?.property?.rules){
// params.property.rules.map((item)=>{
// item.details.map((e)=>{
// e.items.map(()
// })
// if(!item.details){
// message.error("")
// return
// }
// // item.details.map((e)=>{
// // e.items.map(()
// // })
// })
// }
//return
if(!timestatus){
message.error("请填写完整!")
return
}
if (status === "add") {
ajax.addChargeRule(params).then((res) => {
if (res.status === 20000) {
@ -301,7 +311,10 @@ function AddModal(props) {
index={index + 1}
itemKey={item.key}
remove={removeEffectiveDate}
timePart={timePart}
timePart={(e) => { console.log(78787,e);setTimestatus(e) }}
validate={() => {
}}
onChange={(value, key) => {
const _effectiveDateList = effectiveDateList.map((item) => {
if (item.key === key) {

4
src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/EffectiveDate.jsx

@ -18,12 +18,12 @@ function EffectiveDate(props) {
remove = () => { },
itemKey,
onChange = () => { },
validate= () => { },
timePart = () => { },
index,
disable = false,
record = {},
} = props;
console.log(25, record)
let ac = {
"unitDelay": 1,
"unitUp": 1,
@ -179,7 +179,7 @@ function EffectiveDate(props) {
)}
<Divider />
{timePartList.map((item, index) => {
console.log(180, timePartList);
//console.log(180, timePartList);
return (
<TimePart
disable={item.status === "disable"}

71
src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/TimePart.jsx

@ -9,7 +9,8 @@ import {
Row,
Col,
Divider,
InputNumber
InputNumber,
message
} from "antd";
import moment from "moment";
function TimePart(props) {
@ -39,17 +40,49 @@ function TimePart(props) {
"status": "disable",
"key": "821170365"
}
useEffect(() => {
console.log(43, form.getFieldsValue())
if (form.getFieldsValue().time_part == undefined) {
timePart(false)
}
}, [form])
const countDown = (time) => {
var s = 0;
var hour = time.split(':')[0];
var min = time.split(':')[1];
var sec = time.split(':')[2];
s = Number(hour * 3600) + Number(min * 60) + Number(sec);
return s;
}
const valueChange = (value, all) => {
timePart(value)
//timePart(value)
console.log(value)
if(value.limit){
form.validateFields(Object.keys(value))
// if (value.limit) {
// console.log(46)
// //form.validateFields(Object.keys(value))
// form.validateFields()
// .then(values => { console.log(values) })
// .catch(e => console.log(e))
// }
form.validateFields().then((data) => {
console.log(data)
}).catch(err => {
if (err.errorFields.length > 0) {
console.log('不完整')
timePart(false)
} else {
console.log('完整了',all, countDown(all.end) - countDown(all.start)<all.items[0].segment * 60 )
if ( countDown(all.end) - countDown(all.start) < all.items[0].segment * 60) {
message.error("输入的分钟数要小于时间段时间")
return
}
timePart(true)
}
})
all.key = itemKey;
if (all.time_part) {
all.start = moment(all.time_part[0]).format('HH:mm:ss')
all.end = moment(all.time_part[1]).format('HH:mm:ss')
delete all.time_part
}
if (all.type == 0) {
all.items = [
@ -65,7 +98,7 @@ function TimePart(props) {
"threshold": 0,
"period": all.time_after_minute,
"unit": all.time_after_money,
"segment": all.time_before,
"segment": all.time_part ? (moment(all.time_part[1]) - moment(all.time_part[0])) / 60000 - all.time_before : all.time_before,
},
]
delete all.type
@ -99,7 +132,8 @@ function TimePart(props) {
delete all.unit
delete all.segment
}
console.log(66, all)
delete all.time_part
//console.log(66, all)
onChange(all);
};
useEffect(() => {
@ -134,7 +168,6 @@ function TimePart(props) {
})
}
}, [])
console.log(30, record)
return (
<div className="timepart-box">
<Form
@ -155,7 +188,7 @@ function TimePart(props) {
>
<Row gutter={[30]}>
<Col span={16}>
<Form.Item label={`时段${index}`} name="time_part">
<Form.Item label={`时段${index}`} name="time_part" rules={[{ required: true, message: '请选择时间段!' }]}>
<TimePicker.RangePicker style={{ width: "50%" }} order={false} secondStep={60} />
</Form.Item>
</Col>
@ -199,11 +232,11 @@ function TimePart(props) {
return (
<>
<Input.Group compact>
<Form.Item name="time_before" label="前:" rules={[{ required: true }]}>
<Form.Item name="time_before" label="前:" rules={[{ required: true, message: '请输入内容!' }]} >
<InputNumber min={0} precision={0} addonAfter={"分钟"} />
</Form.Item>
<div className="wenzi">,</div>
<Form.Item name="time_before_money" noStyle rules={[{ required: true }]}>
<Form.Item name="time_before_money" noStyle rules={[{ required: true, message: '' }]}>
<InputNumber
min={0}
addonAfter={"元"}
@ -211,7 +244,7 @@ function TimePart(props) {
/>
</Form.Item>
<div className="wenzi">/</div>
<Form.Item name="time_before_minute" noStyle rules={[{ required: true }]}>
<Form.Item name="time_before_minute" noStyle rules={[{ required: true, message: '' }]}>
<InputNumber
min={1}
precision={0}
@ -221,11 +254,11 @@ function TimePart(props) {
</Form.Item>
</Input.Group>
<Input.Group compact>
<Form.Item name="time_before" label="满:" rules={[{ required: true }]}>
<Form.Item name="time_before" label="满:" rules={[{ required: true, message: '请输入内容!' }]} >
<InputNumber min={0} precision={0} addonAfter={"分钟"} disabled />
</Form.Item>
<div className="wenzi">,</div>
<Form.Item name="time_after_money" noStyle rules={[{ required: true }]}>
<Form.Item name="time_after_money" noStyle >
<InputNumber
min={0}
addonAfter={"元"}
@ -233,7 +266,7 @@ function TimePart(props) {
/>
</Form.Item>
<div className="wenzi">/</div>
<Form.Item name="time_after_minute" noStyle rules={[{ required: true }]}>
<Form.Item name="time_after_minute" noStyle rules={[{ required: true, message: '' }]}>
<InputNumber
min={1}
precision={0}
@ -247,11 +280,11 @@ function TimePart(props) {
case 2:
return (
<Input.Group compact>
<Form.Item name="unit" noStyle rules={[{ required: true }]}>
<Form.Item name="unit" noStyle rules={[{ required: true, message: '请输入内容!' }]} >
<InputNumber min={0} addonAfter={"元"} style={{ width: "20%" }} />
</Form.Item>
<div className="wenzi">/</div>
<Form.Item name="period" noStyle rules={[{ required: true }]}>
<Form.Item name="period" noStyle rules={[{ required: true, message: '' }]} >
<InputNumber min={1} precision={0} addonAfter={"分钟"} style={{ width: "20%" }} />
</Form.Item>
</Input.Group>
@ -259,7 +292,7 @@ function TimePart(props) {
case 1:
return (
<Form.Item name="unit">
<InputNumber min={0} addonAfter={"元/次"} style={{ width: "20%" }} />
<InputNumber min={0} addonAfter={"元/次"} style={{ width: "20%" }} rules={[{ required: true, message: '请输入内容!' }]} />
</Form.Item>
);
}
@ -277,7 +310,7 @@ function TimePart(props) {
<Form.Item
label="时段最高收费金额"
name="limit"
rules={[{ required: true }]}
rules={[{ required: true, message: '请输入内容!' }]}
>
<InputNumber min={0} addonAfter={"元"} />
</Form.Item>

3
src/pages/SystemMgm/MessageMgm/ConfMes/loadable.jsx

@ -128,7 +128,8 @@ function ConfMes(props) {
current: pageInfo.pn,
total: resultData?.totalRecords,
pageSize: pageInfo.length,
pageSizeOptions: [8, 10 ,20],
// pageSizeOptions: [8, 10 ,20],
pageSizeOptions: dictionary.pageSizeOptions,
onChange: (current, size) => {
setPageInfo({
...pageInfo,

3
src/pages/SystemMgm/MessageMgm/DeviceAlarmMes/loadable.jsx

@ -100,7 +100,8 @@ function NotificationMes(props) {
current: pageInfo.pn,
total: resultData?.totalRecords,
pageSize: pageInfo.length,
pageSizeOptions: [8, 10 ,20],
// pageSizeOptions: [8, 10 ,20],
pageSizeOptions: dictionary.pageSizeOptions,
onChange: (current, size) => {
setPageInfo({
...pageInfo,

3
src/pages/SystemMgm/MessageMgm/MonitorCarAlarmMes/loadable.jsx

@ -99,7 +99,8 @@ function MonitorCarAlarmMes(props) {
current: pageInfo.pn,
total: resultData?.totalRecords,
pageSize: pageInfo.length,
pageSizeOptions: [8, 10 ,20],
// pageSizeOptions: [8, 10 ,20],
pageSizeOptions: dictionary.pageSizeOptions,
onChange: (current, size) => {
setPageInfo({
...pageInfo,

1
src/pages/SystemMgm/MessageMgm/NotificationMes/loadable.jsx

@ -142,6 +142,7 @@ function NotificationMes(props) {
total: resultData?.totalRecords,
pageSize: pageInfo.length,
pageSizeOptions: [8, 10 ,20],
pageSizeOptions: dictionary.pageSizeOptions,
onChange: (current, size) => {
setPageInfo({
...pageInfo,

7
src/pages/SystemMgm/OrgnizationMgm/loadable.jsx

@ -136,7 +136,8 @@ function OrgnizationMgm() {
orgForm.setFieldsValue({
id: id,
'depart_id': recursionFindIdPath([...departTree], id, undefined, false),
'name': name
'name': name,
pid: pid
})
setActiveOrgTree({ isTop: isTop })
setOrgModalVisible(true)
@ -374,12 +375,13 @@ function OrgnizationMgm() {
const handleOrgConfirm = () => {
orgForm.validateFields().then((data) => {
// console.log(data)
let arr =data.depart_id
if (data.id) {
ajaxAreaEdit(Object.assign({}, {
id: data.id,
name: data.name,
pid: arr ? arr.at(-1) : ''
pid: data.pid
})).then((msg) => {
message.success(msg)
setOrgModalVisible(false)
@ -642,6 +644,7 @@ function OrgnizationMgm() {
>
<Form.Item name="id" hidden></Form.Item>
<Form.Item name="level" hidden></Form.Item>
<Form.Item name="pid" hidden></Form.Item>
<Form.Item label="部门名称" name="name" rules={[
{
required: true

3
src/pages/SystemMgm/RoleMgm/loadable.jsx

@ -457,7 +457,8 @@ function RoleMgm(props) {
...getImg,
auth: str,
id: getAdminId.id,
depart_id: lastElement
depart_id: lastElement,
depart_arr: arrStr.toString()
}
if (getImg.name == "") {

2
src/services/InroadMgm/InRoadOverview/index.js

@ -28,7 +28,7 @@ const getParkingRecordTop5 = (params) => {
};
const getParkingPayTop5 = (params) => {
return ajax({
url: "/api/bpm/home/parking_records_top5 ",
url: "/api/bpm/home/parking_fees_top5",
type: "get",
data: params,
});

Loading…
Cancel
Save