Browse Source

fix():bug修改

tags/PMS_V1.0.0_Alpha5
xingjx 1 year ago
parent
commit
97892c8586
  1. 5
      src/components/SelectGaodeLngLat/index.jsx
  2. 2
      src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/loadable.jsx
  3. 2
      src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.jsx
  4. 12
      src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/AddParking.jsx
  5. 24
      src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/BillingRules.jsx
  6. 31
      src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/BlacklistManagement.jsx
  7. 13
      src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/WhitelistManagement.jsx
  8. 13
      src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/LEDConfiguration.jsx
  9. 2
      src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/PositionGroupManagement.jsx
  10. 143
      src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx

5
src/components/SelectGaodeLngLat/index.jsx

@ -8,7 +8,6 @@ import ajax from "@/services";
import "./index.scss"; import "./index.scss";
import { compileString } from "sass"; import { compileString } from "sass";
import Rerm from "./blue-point.png"; import Rerm from "./blue-point.png";
import { constant } from "lodash";
let timer = null; let timer = null;
function SelectGaodeLngLat(props) { function SelectGaodeLngLat(props) {
const { const {
@ -81,7 +80,7 @@ function SelectGaodeLngLat(props) {
onChange(address); onChange(address);
}, [address]); }, [address]);
useEffect(() => { useEffect(() => {
getLocationMessage(lnglat)
lnglat?.length > 0 && getLocationMessage(lnglat)
}, [lnglat]); }, [lnglat]);
return ( return (
<div className="SelectLnglat"> <div className="SelectLnglat">
@ -118,7 +117,7 @@ function SelectGaodeLngLat(props) {
<div className="input-search"> <div className="input-search">
<AutoComplete <AutoComplete
options={getLngLabel} options={getLngLabel}
placeholder="请选择地址"
placeholder={address?address:"请选择地址"}
onSearch={searchLnglat} onSearch={searchLnglat}
onSelect={onSelect} onSelect={onSelect}
// enterButton={""} // enterButton={""}

2
src/pages/DataAnalysisPrediction/ParkingBusinessAly/ParkBerthAly/loadable.jsx

@ -280,7 +280,7 @@ function ParkBerthAly() {
let week = getWeek(e) let week = getWeek(e)
ite += `${time} ${week}<br />` ite += `${time} ${week}<br />`
}) })
return `<div class="tooltip-box">
return `<div class="tooltip-box" style="z-index:999999999">
${ite} ${ite}
全市日均泊位周转次数${totalData.all_turnover + '(次)'}<br/> 全市日均泊位周转次数${totalData.all_turnover + '(次)'}<br/>
全市平均停车时长${totalData.all_average_duration + '(时)'}<br/> 全市平均停车时长${totalData.all_average_duration + '(时)'}<br/>

2
src/pages/FinancialMgm/OrderInquiry/ProductOrderInquiry/index.jsx

@ -184,7 +184,7 @@ function ProductOrderInquiry() {
type: "RangePicker", type: "RangePicker",
label: "时间段", label: "时间段",
defaultTitle: ['支付时间', '至'], defaultTitle: ['支付时间', '至'],
defaultValue: [moment().startOf("day"), moment()],
defaultValue: [moment().startOf("day"), moment().endOf('day')],
}, },
{ {
name: "channel_serial_number", name: "channel_serial_number",

12
src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/AddParking.jsx

@ -26,8 +26,15 @@ function AddParking(props) {
close = () => { }, close = () => { },
record = {}, record = {},
status = "add", status = "add",
type = 0,
search = () => { }, search = () => { },
} = props; } = props;
useEffect(() => {
console.log(type)
if (type == 1) {
setDisabled(true)
}
}, [])
// //
const [areaList, setAreaList] = useState([]); const [areaList, setAreaList] = useState([]);
const [fileList, setFileList] = useState(() => { const [fileList, setFileList] = useState(() => {
@ -282,7 +289,8 @@ function AddParking(props) {
address: '', address: '',
is_business: '', is_business: '',
cooperate_type: '', cooperate_type: '',
access_type:'',
access_type: '',
poi: '',
}) })
setLngLat([]) setLngLat([])
} }
@ -300,7 +308,7 @@ function AddParking(props) {
open={visible} open={visible}
onCancel={close} onCancel={close}
destroyOnClose destroyOnClose
title="添加封闭停车场"
title={status == "edit" ? "编辑" : "添加封闭停车场"}
okText={"提交"} okText={"提交"}
onOk={submit} onOk={submit}
> >

24
src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/BillingRules.jsx

@ -17,6 +17,7 @@ function BillingRules(props) {
const [form] = Form.useForm(); const [form] = Form.useForm();
const [editform] = Form.useForm(); const [editform] = Form.useForm();
const carTypeList = [ const carTypeList = [
{ label: "全部", value: 0 },
{ label: "小型车", value: 1 }, { label: "小型车", value: 1 },
{ label: "大型车", value: 2 }, { label: "大型车", value: 2 },
]; ];
@ -36,20 +37,20 @@ function BillingRules(props) {
}, },
{ {
title: "车辆类型", title: "车辆类型",
dataIndex: "vehicle_type",
key: "vehicle_type",
dataIndex: "vehicle_type_name",
key: "vehicle_type_name",
align: "center", align: "center",
}, },
{ {
title: "车辆组", title: "车辆组",
dataIndex: "group_ids",
key: "group_ids",
dataIndex: "group_name",
key: "group_name",
align: "center", align: "center",
}, },
{ {
title: "描述", title: "描述",
dataIndex: "group_ids",
key: "group_ids",
dataIndex: "note",
key: "note",
align: "center", align: "center",
}, },
{ {
@ -72,8 +73,8 @@ function BillingRules(props) {
<div> <div>
<a <a
onClick={() => { onClick={() => {
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({ editform.setFieldsValue({
rule_id: record.rule_id, rule_id: record.rule_id,
vehicle_type: record.vehicle_type, vehicle_type: record.vehicle_type,
@ -125,6 +126,7 @@ function BillingRules(props) {
id: "", id: "",
}); });
const addRule = () => { const addRule = () => {
setTempGroup([])
setModalData({ ...modalData, visible: true, status: 'add' }); setModalData({ ...modalData, visible: true, status: 'add' });
}; };
@ -190,7 +192,7 @@ function BillingRules(props) {
if (modalData.status === "add") { if (modalData.status === "add") {
addRoadBillRule({ ...values, road_id: id, ...pageData }); addRoadBillRule({ ...values, road_id: id, ...pageData });
} else if (modalData.status === "edit") { } 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)); .catch((err) => console.error(err));
@ -244,7 +246,7 @@ function BillingRules(props) {
</Col> </Col>
<Form.Item> <Form.Item>
<div className="bottom-button"> <div className="bottom-button">
<Button type="primary">查询</Button>
<Button type="primary" onClick={search}>查询</Button>
<Button type="primary" onClick={addRule}> <Button type="primary" onClick={addRule}>
添加 添加
</Button> </Button>
@ -286,7 +288,7 @@ function BillingRules(props) {
name="vehicle_type" name="vehicle_type"
rules={[{ required: true }]} rules={[{ required: true }]}
> >
<Select options={carTypeList} />
<Select options={carTypeList.slice(1)} />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="车辆组" label="车辆组"

31
src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/BlacklistManagement.jsx

@ -150,28 +150,28 @@ function BlacklistManagement({ id }) {
const [dataSource, setDataSource] = useState([]); const [dataSource, setDataSource] = useState([]);
const [total, setTotal] = useState(0); const [total, setTotal] = useState(0);
const [batchUploadModal ,setBatchUploadModal] = useState(false)
const [batchUploadModal, setBatchUploadModal] = useState(false)
const props = { const props = {
action: process.env.NODE_ENV == "development" ? 'http://10.10.128.65:3001/mock/11/api/ope/coupon/import':`${baseApi}/api/ope/coupon/import`,
action: process.env.NODE_ENV == "development" ? 'http://10.10.128.65:3001/mock/11/api/ope/coupon/import' : `${baseApi}/api/ope/coupon/import`,
multiple: false, multiple: false,
showUploadList: false, showUploadList: false,
method: 'post', method: 'post',
beforeUpload : (file, fileList)=>{
beforeUpload: (file, fileList) => {
console.log(file, 'file') console.log(file, 'file')
if(fileList.length > 1){
if (fileList.length > 1) {
message.error('只支撑同时上传一个文件') message.error('只支撑同时上传一个文件')
return return
} }
return true return true
}, },
onChange: (res)=>{
if(res.file.status == 'done'){
onChange: (res) => {
if (res.file.status == 'done') {
console.log(res) console.log(res)
} }
} }
}; };
const excuteUploadBatchData = ()=>{
const excuteUploadBatchData = () => {
// ajax.getVehicleList(values).then((res) => { // ajax.getVehicleList(values).then((res) => {
// if (res.status === 20000) { // if (res.status === 20000) {
// setDataSource(res.data.list); // setDataSource(res.data.list);
@ -237,7 +237,16 @@ function BlacklistManagement({ id }) {
editForm editForm
.validateFields() .validateFields()
.then((res) => { .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('生效日期必须为当前时间以后的时间') message.error('生效日期必须为当前时间以后的时间')
return return
} }
@ -443,15 +452,15 @@ function BlacklistManagement({ id }) {
<Modal <Modal
open={batchUploadModal} open={batchUploadModal}
onCancel={() => { setBatchUploadModal(false) }} onCancel={() => { setBatchUploadModal(false) }}
onOk={() => { }}
onOk={() => { }}
//footer={null} //footer={null}
className="batchUploadModal" className="batchUploadModal"
title='批量上传' title='批量上传'
zIndex={2000} zIndex={2000}
> >
<div className="batch-upload-car"> <div className="batch-upload-car">
<Upload
{...props}
<Upload
{...props}
// fileList={fileList} // fileList={fileList}
> >
<Button type="primary">上传</Button> <Button type="primary">上传</Button>

13
src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/WhitelistManagement.jsx

@ -206,7 +206,16 @@ function WhitelistManagement({ id }) {
editForm editForm
.validateFields() .validateFields()
.then((res) => { .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('生效日期必须为当前时间以后的时间') message.error('生效日期必须为当前时间以后的时间')
return return
} }
@ -230,7 +239,7 @@ function WhitelistManagement({ id }) {
res.id = currentId; res.id = currentId;
ajax.editWhiteVehicle({ ajax.editWhiteVehicle({
...res, ...res,
id: id,
id: currentId,
effective_begin_date: moment(res.effective_date[0]).format("YY-MM-DD HH:mm:ss"), 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") effective_end_date: moment(res.effective_date[1]).format("YY-MM-DD HH:mm:ss")
}).then((res) => { }).then((res) => {

13
src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/LEDConfiguration.jsx

@ -54,10 +54,10 @@ function LEDConfiguration({ id }) {
<div> <div>
<a <a
onClick={() => { onClick={() => {
setModalData({ visible: true, status: "edit" });
setModalData({ visible: true, status: "edit", id: record.id });
addForm.setFieldsValue({ addForm.setFieldsValue({
business_type: record.business_type, 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({ const [modalData, setModalData] = useState({
visible: false, visible: false,
status: "add", status: "add",
show_copywriting:""
show_copywriting: ""
}); });
const [delModal, setDelModal] = useState({ const [delModal, setDelModal] = useState({
visible: false, visible: false,
@ -154,6 +154,7 @@ function LEDConfiguration({ id }) {
addForm.resetFields(); addForm.resetFields();
} else { } else {
res.road_id = id; res.road_id = id;
res.id = modalData.id
editLED(res); editLED(res);
addForm.resetFields(); addForm.resetFields();
} }
@ -204,7 +205,7 @@ function LEDConfiguration({ id }) {
<Row> <Row>
<Col span="4_8" style={{ width: "30%" }}> <Col span="4_8" style={{ width: "30%" }}>
<Form.Item label="业务场景" name="business_type"> <Form.Item label="业务场景" name="business_type">
<Select options={businessList || []}/>
<Select options={businessList || []} />
</Form.Item> </Form.Item>
</Col> </Col>
<Form.Item> <Form.Item>
@ -228,7 +229,7 @@ function LEDConfiguration({ id }) {
/> />
</main> </main>
<Modal <Modal
title="添加LED显示文案"
title={modalData.status == 'add' ? "添加LED显示文案" : '编辑'}
open={modalData.visible} open={modalData.visible}
onCancel={() => { onCancel={() => {
setModalData({ ...modalData, visible: false }); setModalData({ ...modalData, visible: false });
@ -242,7 +243,7 @@ function LEDConfiguration({ id }) {
rules={[{ required: true }]} rules={[{ required: true }]}
name="business_type" name="business_type"
> >
<Select getPopupContainer={(e) => e.parentNode} options={(modalData.status === "add"?modalBusinessList:businessList)|| []} disabled={modalData.status === "edit"} />
<Select getPopupContainer={(e) => e.parentNode} options={(modalData.status === "add" ? modalBusinessList : businessList) || []} disabled={modalData.status === "edit"} />
</Form.Item> </Form.Item>
<Form.Item <Form.Item
label="LED显示文案" label="LED显示文案"

2
src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/PositionGroupManagement.jsx

@ -93,7 +93,7 @@ function PositionGroupManagement() {
></Table> ></Table>
</main> </main>
<Modal <Modal
title="添加LED显示文案"
title="添加岗亭组"
open={modalData.visible} open={modalData.visible}
onCancel={() => setModalData({ ...modalData, visible: false })} onCancel={() => setModalData({ ...modalData, visible: false })}
> >

143
src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx

@ -261,7 +261,7 @@ function OutSegment() {
// //
const [berthNumModal, setBerthNumModal] = useState({ const [berthNumModal, setBerthNumModal] = useState({
visible: false, visible: false,
close: () => setBerthNumModal({ ...berthNumModal, visible: false }),
close: () => { setBerthNumModal({ ...berthNumModal, visible: false }); berthForm.setFieldsValue({ berth_number: '' }) },
id: "", id: "",
}); });
// //
@ -403,6 +403,135 @@ function OutSegment() {
...params, ...params,
}) })
.then((res) => { .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) { if (res.status === 20000) {
setTableData(res.data.list); setTableData(res.data.list);
setTotal(res.data.total); setTotal(res.data.total);
@ -416,10 +545,11 @@ function OutSegment() {
if (res.status === 20000) { if (res.status === 20000) {
message.success(res.message); message.success(res.message);
search() search()
setBerthNumModal({ ...berthNumModal, visible: false });
} else { } else {
message.error(res.message); message.error(res.message);
} }
setBerthNumModal({ ...berthNumModal, visible: false });
berthForm.setFieldsValue({ berth_number: '' })
}); });
}; };
// //
@ -481,7 +611,7 @@ function OutSegment() {
operator_status: 0, operator_status: 0,
name: "", name: "",
code: "", code: "",
area:'0',
area: '0',
operator: "0", operator: "0",
is_no_pwd_pay: 0, is_no_pwd_pay: 0,
}} }}
@ -618,14 +748,16 @@ function OutSegment() {
close={checkModal.close} close={checkModal.close}
itemData={checkModal.record} itemData={checkModal.record}
setConfigModal={() => { setConfigModal={() => {
setConfigModal({ ...configModal, visible: true, record: recordData });
setConfigModal({ ...configModal, visible: true, record: recordData });
}} }}
setEditModal={(v) => { setEditModal={(v) => {
console.log(v)
setEditModal({ setEditModal({
...editModal, ...editModal,
visible: true, visible: true,
record: recordData,
record: v ? v : recordData,
status: "edit", status: "edit",
type: v.road_name == "二级车场" || v.road_name == "三级车场" || v.road_name == "四级车场" ? 1 : 0
}); });
}} }}
/> />
@ -636,6 +768,7 @@ function OutSegment() {
close={editModal.close} close={editModal.close}
record={editModal.record} record={editModal.record}
status={editModal.status} status={editModal.status}
type={editModal.type}
/> />
)} )}
<ConfigParking <ConfigParking

Loading…
Cancel
Save