-
+
@@ -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"
>
-
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}
/>
)}