diff --git a/src/components/SelectGaodeLngLat/index.jsx b/src/components/SelectGaodeLngLat/index.jsx index 69eaa1e..f54752f 100644 --- a/src/components/SelectGaodeLngLat/index.jsx +++ b/src/components/SelectGaodeLngLat/index.jsx @@ -8,7 +8,6 @@ import ajax from "@/services"; import "./index.scss"; import { compileString } from "sass"; import Rerm from "./blue-point.png"; -import { constant } from "lodash"; let timer = null; function SelectGaodeLngLat(props) { const { @@ -81,7 +80,7 @@ function SelectGaodeLngLat(props) { onChange(address); }, [address]); useEffect(() => { - getLocationMessage(lnglat) + lnglat?.length > 0 && getLocationMessage(lnglat) }, [lnglat]); return (
@@ -118,7 +117,7 @@ function SelectGaodeLngLat(props) {
` }) - return `
+ return `
${ite} 全市日均泊位周转次数:${totalData.all_turnover + '(次)'}
全市平均停车时长:${totalData.all_average_duration + '(时)'}
diff --git a/src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.jsx b/src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.jsx index 081deae..4a46af9 100644 --- a/src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.jsx +++ b/src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.jsx @@ -184,7 +184,7 @@ function ProductOrderInquiry() { type: "RangePicker", label: "时间段", defaultTitle: ['支付时间', '至'], - defaultValue: [moment().startOf("day"), moment()], + defaultValue: [moment().startOf("day"), moment().endOf('day')], }, { name: "channel_serial_number", diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/AddParking.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/AddParking.jsx index 0e8a611..6595657 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/AddParking.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/AddParking.jsx @@ -26,8 +26,15 @@ function AddParking(props) { close = () => { }, record = {}, status = "add", + type = 0, search = () => { }, } = props; + useEffect(() => { + console.log(type) + if (type == 1) { + setDisabled(true) + } + }, []) //区域的下拉数据 const [areaList, setAreaList] = useState([]); const [fileList, setFileList] = useState(() => { @@ -282,7 +289,8 @@ function AddParking(props) { address: '', is_business: '', cooperate_type: '', - access_type:'', + access_type: '', + poi: '', }) setLngLat([]) } @@ -300,7 +308,7 @@ function AddParking(props) { open={visible} onCancel={close} destroyOnClose - title="添加封闭停车场" + title={status == "edit" ? "编辑" : "添加封闭停车场"} okText={"提交"} onOk={submit} > diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/BillingRules.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/BillingRules.jsx index 6ff2779..9660109 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/BillingRules.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/BillingRules.jsx @@ -17,6 +17,7 @@ function BillingRules(props) { const [form] = Form.useForm(); const [editform] = Form.useForm(); const carTypeList = [ + { label: "全部", value: 0 }, { label: "小型车", value: 1 }, { label: "大型车", value: 2 }, ]; @@ -36,20 +37,20 @@ function BillingRules(props) { }, { title: "车辆类型", - dataIndex: "vehicle_type", - key: "vehicle_type", + dataIndex: "vehicle_type_name", + key: "vehicle_type_name", align: "center", }, { title: "车辆组", - dataIndex: "group_ids", - key: "group_ids", + dataIndex: "group_name", + key: "group_name", align: "center", }, { title: "描述", - dataIndex: "group_ids", - key: "group_ids", + dataIndex: "note", + key: "note", align: "center", }, { @@ -72,8 +73,8 @@ function BillingRules(props) {
{ - setModalData({ ...modalData, visible: true, stutus: 'edit' }); - console.log(record.group_ids); + getTempGroup(record.vehicle_type); + setModalData({ ...modalData, visible: true, status: 'edit', id: record.id }); editform.setFieldsValue({ rule_id: record.rule_id, vehicle_type: record.vehicle_type, @@ -125,6 +126,7 @@ function BillingRules(props) { id: "", }); const addRule = () => { + setTempGroup([]) setModalData({ ...modalData, visible: true, status: 'add' }); }; @@ -190,7 +192,7 @@ function BillingRules(props) { if (modalData.status === "add") { addRoadBillRule({ ...values, road_id: id, ...pageData }); } else if (modalData.status === "edit") { - editRoadBullRule({ ...values, road_id: id, ...pageData }); + editRoadBullRule({ ...values, road_id: id, ...pageData, id: modalData.id }); } }) .catch((err) => console.error(err)); @@ -244,7 +246,7 @@ function BillingRules(props) {
- + @@ -286,7 +288,7 @@ function BillingRules(props) { name="vehicle_type" rules={[{ required: true }]} > - { + beforeUpload: (file, fileList) => { console.log(file, 'file') - if(fileList.length > 1){ + if (fileList.length > 1) { message.error('只支撑同时上传一个文件') return } return true }, - onChange: (res)=>{ - if(res.file.status == 'done'){ + onChange: (res) => { + if (res.file.status == 'done') { console.log(res) } } }; - const excuteUploadBatchData = ()=>{ + const excuteUploadBatchData = () => { // ajax.getVehicleList(values).then((res) => { // if (res.status === 20000) { // setDataSource(res.data.list); @@ -237,7 +237,16 @@ function BlacklistManagement({ id }) { editForm .validateFields() .then((res) => { - if(new Date(res.effective_date[0]).getTime() < new Date().getTime()){ + if (res.plate != '' && !utils?.validationPlate(res.plate)) { + message.error('请输入正确的车牌号') + return + } + let phoneReg = new RegExp(/^(?:(?:\+|00)86)?1[3-9]\d{9}$/) + if (res.phone && !phoneReg.test(res.phone)) { + message.error('请输入正确的手机号') + return + } + if (new Date(res.effective_date[0]).getTime() < new Date().getTime()) { message.error('生效日期必须为当前时间以后的时间') return } @@ -443,15 +452,15 @@ function BlacklistManagement({ id }) { { setBatchUploadModal(false) }} - onOk={() => { }} + onOk={() => { }} //footer={null} className="batchUploadModal" title='批量上传' zIndex={2000} >
- diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/WhitelistManagement.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/WhitelistManagement.jsx index 3f5b60c..3ccd0d7 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/WhitelistManagement.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/WhitelistManagement.jsx @@ -206,7 +206,16 @@ function WhitelistManagement({ id }) { editForm .validateFields() .then((res) => { - if(new Date(res.effective_date[0]).getTime() < new Date().getTime()){ + if (res.plate != '' && !utils?.validationPlate(res.plate)) { + message.error('请输入正确的车牌号') + return + } + let phoneReg = new RegExp(/^(?:(?:\+|00)86)?1[3-9]\d{9}$/) + if (res.phone && !phoneReg.test(res.phone)) { + message.error('请输入正确的手机号') + return + } + if (new Date(res.effective_date[0]).getTime() < new Date().getTime()) { message.error('生效日期必须为当前时间以后的时间') return } @@ -230,7 +239,7 @@ function WhitelistManagement({ id }) { res.id = currentId; ajax.editWhiteVehicle({ ...res, - id: id, + id: currentId, effective_begin_date: moment(res.effective_date[0]).format("YY-MM-DD HH:mm:ss"), effective_end_date: moment(res.effective_date[1]).format("YY-MM-DD HH:mm:ss") }).then((res) => { diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/LEDConfiguration.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/LEDConfiguration.jsx index 65ce448..a8bfbd8 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/LEDConfiguration.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/LEDConfiguration.jsx @@ -54,10 +54,10 @@ function LEDConfiguration({ id }) {
{ - setModalData({ visible: true, status: "edit" }); + setModalData({ visible: true, status: "edit", id: record.id }); addForm.setFieldsValue({ business_type: record.business_type, - show_copywriting:record.show_copywriting + show_copywriting: record.show_copywriting }); }} > @@ -90,7 +90,7 @@ function LEDConfiguration({ id }) { const [modalData, setModalData] = useState({ visible: false, status: "add", - show_copywriting:"" + show_copywriting: "" }); const [delModal, setDelModal] = useState({ visible: false, @@ -154,6 +154,7 @@ function LEDConfiguration({ id }) { addForm.resetFields(); } else { res.road_id = id; + res.id = modalData.id editLED(res); addForm.resetFields(); } @@ -204,7 +205,7 @@ function LEDConfiguration({ id }) { - @@ -228,7 +229,7 @@ function LEDConfiguration({ id }) { /> { setModalData({ ...modalData, visible: false }); @@ -242,7 +243,7 @@ function LEDConfiguration({ id }) { rules={[{ required: true }]} name="business_type" > - e.parentNode} options={(modalData.status === "add" ? modalBusinessList : businessList) || []} disabled={modalData.status === "edit"} /> setModalData({ ...modalData, visible: false })} > diff --git a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx index 7be3863..36bf41d 100644 --- a/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx +++ b/src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx @@ -261,7 +261,7 @@ function OutSegment() { //修改剩余泊位数 const [berthNumModal, setBerthNumModal] = useState({ visible: false, - close: () => setBerthNumModal({ ...berthNumModal, visible: false }), + close: () => { setBerthNumModal({ ...berthNumModal, visible: false }); berthForm.setFieldsValue({ berth_number: '' }) }, id: "", }); //二维码 @@ -403,6 +403,135 @@ function OutSegment() { ...params, }) .then((res) => { + res = { + "status": 20000, + "message": "操作成功", + "data": { + "list": [ + { + "id": "1703486751517865999", + "pid": "0", + "operator_id": "1777347430730653926", + "road_code": "121313", + "road_name": "xjx233", + "system_code": "PA231225144510", + "road_type": 1, + "system_type": 0, + "physics_type": 2, + "berth_number": 12, + "area": "5910983100923906", + "hot_trading_area": null, + "operator_status": 1, + "address": "山东省青岛市胶州市三里河街道S24青商高速", + "poi": null, + "lng_lat": "119.9460,36.2202", + "update_time": "2023-12-25 14:45:51", + "is_business": "政府", + "is_contract": 1, + "cooperate_type": 1, + "open_begin_time": "01:00:00", + "open_end_time": "07:00:00", + "status": 3, + "recharge": 1, + "is_arrearage": 1, + "access_type": 1, + "billing_rules": null, + "filings_time": "2023-12-25", + "img": "https://qingd-pre-image.obs.cn-southwest-2.myhuaweicloud.com:443/common/20231225/51cafe01-453c-e595-d3dc-b1e37488fc33.jpeg", + "is_no_pwd_pay": "未开通", + "is_remote": 2, + "remaining_berths": 12, + "total_berth_number": 100, + "area_name": "东区", + "operator": "公用事业集团", + "operator_status_name": "待上线", + "road_type_name": "一级车场", + "system_type_name": "AI值守" + }, + { + "id": "1702827141489792458", + "pid": "0", + "operator_id": "1823446704323817732", + "road_code": "122", + "road_name": "xjx2221", + "system_code": "PA231217233286", + "road_type": 0, + "system_type": 2, + "physics_type": 1, + "berth_number": 3222, + "area": "5", + "hot_trading_area": null, + "operator_status": 4, + "address": "山东省青岛市胶州市胶西街道西匡家庄村", + "poi": null, + "lng_lat": null, + "update_time": "2023-12-17 23:34:25", + "is_business": "商业", + "is_contract": 1, + "cooperate_type": 1, + "open_begin_time": null, + "open_end_time": null, + "status": 3, + "recharge": 1, + "is_arrearage": 1, + "access_type": 1, + "billing_rules": null, + "filings_time": "2023-12-17", + "img": "Array", + "is_no_pwd_pay": "未开通", + "is_remote": 2, + "remaining_berths": 3222, + "total_berth_number": 0, + "area_name": null, + "operator": "lindh的测试商户001", + "operator_status_name": "下线", + "road_type_name": "独立车场", + "system_type_name": "无人值守" + }, + { + "id": "1702823160684717492", + "pid": "0", + "operator_id": "1777347430730653926", + "road_code": "12", + "road_name": "xjx", + "system_code": "PA231217222674", + "road_type": 0, + "system_type": 0, + "physics_type": 2, + "berth_number": 32, + "area": "5910983100923905", + "hot_trading_area": null, + "operator_status": 4, + "address": "山东省青岛市黄岛区王台街道河南邢村", + "poi": null, + "lng_lat": "119.9886,36.0627", + "update_time": "2023-12-17 22:26:00", + "is_business": "政府", + "is_contract": 1, + "cooperate_type": 0, + "open_begin_time": "04:00:00", + "open_end_time": "10:00:00", + "status": 2, + "recharge": 1, + "is_arrearage": 1, + "access_type": 1, + "billing_rules": null, + "filings_time": "2023-12-17", + "img": "https://qingd-pre-image.obs.cn-southwest-2.myhuaweicloud.com:443/common/20231217/844bfba0-9dc5-ad48-adea-af487d1c6c0f.jpeg", + "is_no_pwd_pay": "未开通", + "is_remote": 2, + "remaining_berths": 32, + "total_berth_number": 0, + "area_name": "西区", + "operator": "公用事业集团", + "operator_status_name": "下线", + "road_type_name": "独立车场", + "system_type_name": "AI值守" + } + ], + "total": 3 + } + } if (res.status === 20000) { setTableData(res.data.list); setTotal(res.data.total); @@ -416,10 +545,11 @@ function OutSegment() { if (res.status === 20000) { message.success(res.message); search() + setBerthNumModal({ ...berthNumModal, visible: false }); } else { message.error(res.message); } - setBerthNumModal({ ...berthNumModal, visible: false }); + berthForm.setFieldsValue({ berth_number: '' }) }); }; //评价批量配置 @@ -481,7 +611,7 @@ function OutSegment() { operator_status: 0, name: "", code: "", - area:'0', + area: '0', operator: "0", is_no_pwd_pay: 0, }} @@ -618,14 +748,16 @@ function OutSegment() { close={checkModal.close} itemData={checkModal.record} setConfigModal={() => { - setConfigModal({ ...configModal, visible: true, record: recordData }); + setConfigModal({ ...configModal, visible: true, record: recordData }); }} setEditModal={(v) => { + console.log(v) setEditModal({ ...editModal, visible: true, - record: recordData, + record: v ? v : recordData, status: "edit", + type: v.road_name == "二级车场" || v.road_name == "三级车场" || v.road_name == "四级车场" ? 1 : 0 }); }} /> @@ -636,6 +768,7 @@ function OutSegment() { close={editModal.close} record={editModal.record} status={editModal.status} + type={editModal.type} /> )}