Browse Source

fix():增加停车卡数据页面

tags/PMS_Frontend_v1.0.6-develop
guoxin 1 year ago
parent
commit
470880f73d
  1. 6
      src/components/Search/OptionPanel/index.scss
  2. 11
      src/components/Search/ResultPanel/index.scss
  3. 105
      src/pages/InRoadMgm/BusinessMgm/ChargeRules/EditModal.jsx
  4. 2
      src/pages/InRoadMgm/BusinessMgm/ChargeRules/index.scss
  5. 2
      src/pages/InRoadMgm/BusinessMgm/ChargeRules/loadable.jsx
  6. 6
      src/pages/InRoadMgm/RecordInquiry/ParkRecordTotal/loadable.jsx

6
src/components/Search/OptionPanel/index.scss

@ -115,9 +115,7 @@ $color-primary: var(--color-primary);
height: 4px; height: 4px;
} }
.searchWrap::-webkit-scrollbar-thumb { .searchWrap::-webkit-scrollbar-thumb {
background-color: var(--color-scrollbar-thumb);
background-clip: padding-box;
border-radius: 4px;
min-height: 28px;
background-color: #9da2ab;
border-radius: 10px;
} }
} }

11
src/components/Search/ResultPanel/index.scss

@ -406,15 +406,14 @@ $color-primary : var(--color-primary);
} }
.table-wrap::-webkit-scrollbar { .table-wrap::-webkit-scrollbar {
width: 4px;
height: 4px;
width: 5px;
height: 5px;
cursor: pointer;
} }
.table-wrap::-webkit-scrollbar-thumb { .table-wrap::-webkit-scrollbar-thumb {
background-color: var(--color-scrollbar-thumb);
background-clip: padding-box;
border-radius: 4px;
min-height: 28px;
background-color: #9da2ab;
border-radius: 10px;
} }
} }

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

@ -21,7 +21,7 @@ const FormModal = (props) => {
yisaData = {}, yisaData = {},
editVisible, editVisible,
editModal = () => { }, editModal = () => { },
getEditData={}
getEditData = {}
} = props } = props
// //
console.log(getEditData); console.log(getEditData);
@ -100,12 +100,12 @@ const FormModal = (props) => {
// //
const handleForm = (changedValues, allValues) => { const handleForm = (changedValues, allValues) => {
let obj = {};
let obj = {};
let key = Object.keys(changedValues)[0]; let key = Object.keys(changedValues)[0];
let val = Object.values(changedValues)[0]; let val = Object.values(changedValues)[0];
console.log('val', val); console.log('val', val);
console.log('key', key); console.log('key', key);
if(key == 'newCarStatus'){
if (key == 'newCarStatus') {
getNewCarRef.current = val getNewCarRef.current = val
} }
switch (key) { switch (key) {
@ -163,7 +163,7 @@ const FormModal = (props) => {
form.setFieldsValue(newObj); form.setFieldsValue(newObj);
changeGetNewCar() changeGetNewCar()
}; };
const changeGetNewCar = ()=>{
const changeGetNewCar = () => {
setGetNewCar(getNewCarRef.current) setGetNewCar(getNewCarRef.current)
} }
@ -221,7 +221,10 @@ const FormModal = (props) => {
if (JSON.stringify(yisaData) != "{}") { if (JSON.stringify(yisaData) != "{}") {
newObj = handelDate(yisaData, 2) newObj = handelDate(yisaData, 2)
} }
// console.log(newObj);
console.log(newObj);
newObj.rules = newObj?.source?.rules
delete newObj.source
console.log(newObj);
form.setFieldsValue(newObj); form.setFieldsValue(newObj);
}, [yisaData]); }, [yisaData]);
@ -315,7 +318,7 @@ const FormModal = (props) => {
<Checkbox>新能源车</Checkbox> <Checkbox>新能源车</Checkbox>
</Form.Item> </Form.Item>
{ {
getNewCar?
getNewCar ?
<div > <div >
<Form.Item <Form.Item
name="evFreeTime" name="evFreeTime"
@ -387,7 +390,7 @@ const FormModal = (props) => {
// console.log(fields); // console.log(fields);
return ( return (
<div className="yisa-table"> <div className="yisa-table">
<div className="row-line" key={'rules-'+key}>
<div className="row-line" key={'rules-' + key}>
<div className="timeAdd"> <div className="timeAdd">
<Space direction="vertical" size={12}> <Space direction="vertical" size={12}>
<Form.Item <Form.Item
@ -456,7 +459,7 @@ const FormModal = (props) => {
{fields.map(({ key, name, ...restField }, i) => { {fields.map(({ key, name, ...restField }, i) => {
// console.log(fields); // console.log(fields);
return ( return (
<div key={'details-'+key}>
<div key={'details-' + key}>
<div className="row"> <div className="row">
<Form.Item <Form.Item
{...restField} {...restField}
@ -466,7 +469,7 @@ const FormModal = (props) => {
> >
<TimePicker format={format} style={{ marginLeft: 10 }} /> <TimePicker format={format} style={{ marginLeft: 10 }} />
</Form.Item> </Form.Item>
<label className="mid">to</label>
<label className="mid">to</label>
<Form.Item <Form.Item
{...restField} {...restField}
name={[name, "end"]} name={[name, "end"]}
@ -512,7 +515,7 @@ const FormModal = (props) => {
<> <>
{fields.map(({ key, name, ...restField }, z) => { {fields.map(({ key, name, ...restField }, z) => {
return ( return (
<div className="row-line" key={'items-'+key}>
<div className="row-line" key={'items-' + key}>
<div className="row"> <div className="row">
<Form.Item <Form.Item
name={[name, "type"]} name={[name, "type"]}
@ -541,48 +544,48 @@ const FormModal = (props) => {
<Form.Item <Form.Item
noStyle noStyle
shouldUpdate> shouldUpdate>
{
form?.getFieldValue('rules')[j].details[i].items[z].type == '3' ?
<div className="row">
<Form.Item
{...restField}
name={[name, "unit"]}
label=""
>
<Input style={{ width: 50, marginLeft: 10 }} />
</Form.Item>
<label className="mid">/</label>
</div>
:
<div className="row">
<Form.Item
{...restField}
name={[name, "segment"]}
label=""
>
<Input style={{ width: 50, marginLeft: 10 }} />
</Form.Item>
{
form?.getFieldValue('rules')[j].details[i].items[z].type == '3' ?
<div className="row">
<Form.Item
{...restField}
name={[name, "unit"]}
label=""
>
<Input style={{ width: 50, marginLeft: 10 }} />
</Form.Item>
<label className="mid">/</label>
</div>
:
<div className="row">
<Form.Item
{...restField}
name={[name, "segment"]}
label=""
>
<Input style={{ width: 50, marginLeft: 10 }} />
</Form.Item>
<label className="mid">分钟</label>
<Form.Item
{...restField}
name={[name, "unit"]}
label=""
>
<Input style={{ width: 50, marginLeft: 10 }} />
</Form.Item>
<label className="mid">/</label>
<Form.Item
{...restField}
name={[name, "period"]}
label=""
>
<Input style={{ width: 50, marginLeft: 10 }} />
</Form.Item>
<label className="mid">分钟</label>
</div>
}
</Form.Item>
<label className="mid">分钟</label>
<Form.Item
{...restField}
name={[name, "unit"]}
label=""
>
<Input style={{ width: 50, marginLeft: 10 }} />
</Form.Item>
<label className="mid">/</label>
<Form.Item
{...restField}
name={[name, "period"]}
label=""
>
<Input style={{ width: 50, marginLeft: 10 }} />
</Form.Item>
<label className="mid">分钟</label>
</div>
}
</Form.Item>
<Form.Item <Form.Item
className="btm-box" className="btm-box"
> >

2
src/pages/InRoadMgm/BusinessMgm/ChargeRules/index.scss

@ -188,7 +188,7 @@ $color-primary: var(--color-primary);
} }
} }
.addRuleModal { .addRuleModal {
width: 700px !important;
width: 1000px !important;
.addRule::-webkit-scrollbar-track { .addRule::-webkit-scrollbar-track {
background: white; background: white;
} }

2
src/pages/InRoadMgm/BusinessMgm/ChargeRules/loadable.jsx

@ -353,7 +353,7 @@ function ChargeRules(props) {
} }
const deleteSubmit = () => { const deleteSubmit = () => {
let data = { let data = {
user_id: getDeleteData.id
id: getDeleteData.id
} }
ajax.changeEditRule(data).then(res => { ajax.changeEditRule(data).then(res => {
if (res.status === 20000) { if (res.status === 20000) {

6
src/pages/InRoadMgm/RecordInquiry/ParkRecordTotal/loadable.jsx

@ -85,8 +85,8 @@ function ParkRecordTotal() {
}, },
{ {
title: "泊位号", title: "泊位号",
dataIndex: "road",
key: "road",
dataIndex: "berth_id",
key: "berth_id",
width: 100, width: 100,
align: "center", align: "center",
}, },
@ -491,7 +491,7 @@ function ParkRecordTotal() {
<div> <div>
<Descriptions title="停车场名称"> <Descriptions title="停车场名称">
<Descriptions.Item label="停车场名称"> <Descriptions.Item label="停车场名称">
Zhou Maomao
{item.road}
</Descriptions.Item> </Descriptions.Item>
<Descriptions.Item label="泊位号">{item.berth_id}</Descriptions.Item> <Descriptions.Item label="泊位号">{item.berth_id}</Descriptions.Item>
<Descriptions.Item label="区域">{item.region}</Descriptions.Item> <Descriptions.Item label="区域">{item.region}</Descriptions.Item>

Loading…
Cancel
Save