Browse Source

fix():bug修改

master
xingjx 1 year ago
parent
commit
f5c79f21d6
  1. 32
      src/components/TableModule/index.jsx
  2. 4
      src/pages/FinancialMgm/PayRecordTotal/loadable.jsx
  3. 2
      src/pages/InRoadMgm/EquipmentMgm/MonitorEquipment/loadable.jsx
  4. 6
      src/pages/OperationCenter/ArrearsRecover/ArrearsCar/loadable.jsx
  5. 5
      src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx
  6. 2
      src/pages/OutRoadMgm/OutDeviceMgm/OutMonitorMgm/loadable.jsx
  7. 26
      src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/AddModal.jsx
  8. 2
      src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/TimePart.jsx
  9. 56
      src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/loadable.jsx
  10. 47
      src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/AddParking.jsx
  11. 3
      src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/BlacklistManagement.jsx
  12. 3
      src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/WhitelistManagement.jsx
  13. 12
      src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/index.jsx
  14. 2
      src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/loadable.jsx

32
src/components/TableModule/index.jsx

@ -574,16 +574,28 @@ const TableModule = forwardRef((props, ref) => {
key={item.name} key={item.name}
defaultValue={item.defaultValue} defaultValue={item.defaultValue}
> >
<Select
getPopupContainer={(e) => e.parentNode}
options={
item.name === "operator" || item.name === "merchantName"
? operatorList
: item.options
}
defaultValue={item.defaultValue}
placeholder={item.placeholder}
/>
{
item.test ?
<Select
options={
item.name === "operator" || item.name === "merchantName"
? operatorList
: item.options
}
defaultValue={item.defaultValue}
placeholder={item.placeholder}
/> :
<Select
getPopupContainer={(e) => e.parentNode}
options={
item.name === "operator" || item.name === "merchantName"
? operatorList
: item.options
}
defaultValue={item.defaultValue}
placeholder={item.placeholder}
/>
}
</Form.Item> </Form.Item>
); );
break;; break;;

4
src/pages/FinancialMgm/PayRecordTotal/loadable.jsx

@ -245,6 +245,10 @@ function PayRecordTotal(props) {
message.error('充电订单无法跳转') message.error('充电订单无法跳转')
return return
} }
if (!row.flow_type_name) {
message.error('无支付类型,无法跳转')
return
}
if (row.flow_type_name == "支付" && row.third_party_flow_id) { if (row.flow_type_name == "支付" && row.third_party_flow_id) {
jumpMenu = { jumpMenu = {
text: "停车订单查询", text: "停车订单查询",

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

@ -452,7 +452,7 @@ function Fence(props) {
<Row> <Row>
<Col span={24} className="berth-container"> <Col span={24} className="berth-container">
<Form.Item <Form.Item
label={"通道号"}
label={"泊位"}
name={"berth_ids"} name={"berth_ids"}
rules={[{ required: true, message: '' }]} rules={[{ required: true, message: '' }]}
> >

6
src/pages/OperationCenter/ArrearsRecover/ArrearsCar/loadable.jsx

@ -16,8 +16,8 @@ import "./index.scss";
function ArrearsCar() { function ArrearsCar() {
const [parkID, setParkID] = useState() const [parkID, setParkID] = useState()
const [carId, setCarId] = useState(); const [carId, setCarId] = useState();
const initFormData={
police:0
const initFormData = {
police: 0
} }
const columns = [ const columns = [
{ {
@ -320,7 +320,7 @@ function ArrearsCar() {
ajax({ ajax({
url: "/api/ope/record/get_arrearage_car_info", url: "/api/ope/record/get_arrearage_car_info",
type: "get", type: "get",
data: { carId: e || carId },
data: { carId: e || carId, ...pageData },
}).then((res) => { }).then((res) => {
let { status, data, total } = res let { status, data, total } = res
if (status == 20000) { if (status == 20000) {

5
src/pages/OperationCenter/UserMgm/UserInfo/loadable.jsx

@ -605,6 +605,7 @@ function UserInfo() {
type: "Select", type: "Select",
label: "支付渠道", label: "支付渠道",
placeholder: "请选择支付渠道", placeholder: "请选择支付渠道",
test: 1,
options: dictionary.PayChannel, options: dictionary.PayChannel,
}, },
{//11 {//11
@ -1342,7 +1343,7 @@ function UserInfo() {
isExport={false} isExport={false}
userInfo={resData} userInfo={resData}
pageName={'userInfo'} pageName={'userInfo'}
rowKey={(record) => record.id+ Math.random() * 10000}
rowKey={(record) => record.id + Math.random() * 10000}
/> </> : /> </> :
<div className="userinfo-box"> <div className="userinfo-box">
<div className="back-btn" onClick={() => { setTag('1'); setTabKey('1') }}>返回</div> <div className="back-btn" onClick={() => { setTag('1'); setTabKey('1') }}>返回</div>
@ -1439,7 +1440,7 @@ function UserInfo() {
columns={historyProgressColumns} columns={historyProgressColumns}
dataSource={historyProgressRecord || []} dataSource={historyProgressRecord || []}
scroll={{ x: 1000 }} scroll={{ x: 1000 }}
rowKey={(record) => record.id+ Math.random() * 10000}
rowKey={(record) => record.id + Math.random() * 10000}
pagination={true} pagination={true}
/> />
</> </>

2
src/pages/OutRoadMgm/OutDeviceMgm/OutMonitorMgm/loadable.jsx

@ -680,7 +680,7 @@ function OutMonitorMgm(props) {
</Form.Item> </Form.Item>
</div> </div>
<div className="row-line berth-container"> <div className="row-line berth-container">
<Form.Item label={<span className="required">泊位</span>}>
<Form.Item label={<span className="required">通道号</span>}>
<Transfer <Transfer
dataSource={berthData} dataSource={berthData}
titles={["未选择", "已选择"]} titles={["未选择", "已选择"]}

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

@ -19,12 +19,21 @@ function AddModal(props) {
const { const {
record = {}, record = {},
visible = false, visible = false,
close = () => {},
close = () => { },
status = "add", status = "add",
research = () => {},
research = () => { },
} = props; } = props;
const isEdit = status === "edit"; const isEdit = status === "edit";
const [getOperationName, setGetOperationName] = useState([])
const [getNewOperationName, setNewGetOperationName] = useState([])
const operationName = () => {
ajax.getAllOperator().then(res => {
let arr = res.data
let newArr = arr.slice(1)
setGetOperationName(res.data)
setNewGetOperationName(newArr)
})
}
const [effectiveDateList, setEffectiveDateList] = useState(() => { const [effectiveDateList, setEffectiveDateList] = useState(() => {
if (status === "add") { if (status === "add") {
return [ return [
@ -100,6 +109,9 @@ function AddModal(props) {
}) })
.catch((err) => console.error(err)); .catch((err) => console.error(err));
} }
useEffect(() => {
operationName()
}, [])
return ( return (
<Modal <Modal
open={visible} open={visible}
@ -141,14 +153,10 @@ function AddModal(props) {
rules={[{ required: true }]} rules={[{ required: true }]}
> >
<Select <Select
getPopupContainer={(e) => e.parentNode}
disabled={isEdit} disabled={isEdit}
style={{ width: "40%" }} style={{ width: "40%" }}
options={[
{
label: "测试",
value: 1,
},
]}
options={getNewOperationName}
/> />
</Form.Item> </Form.Item>
</Col> </Col>

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

@ -164,7 +164,7 @@ function TimePart(props) {
<Form.Item <Form.Item
label="时段最高收费金额" label="时段最高收费金额"
name="time_max_money" name="time_max_money"
//rules={[{ required: true }]}
rules={[{ required: true }]}
> >
<Input /> <Input />
</Form.Item> </Form.Item>

56
src/pages/OutRoadMgm/OutSegmentMgm/ChargeRulesMgm/loadable.jsx

@ -89,7 +89,8 @@ function ChargeRulesMgm() {
<div> <div>
<a <a
onClick={() => { onClick={() => {
delChargeRule(record.id);
setUserId(record.id)
setDeleteModal(true)
}} }}
> >
删除 删除
@ -135,7 +136,9 @@ function ChargeRulesMgm() {
}; };
//ref //ref
const childRef = useRef(null); const childRef = useRef(null);
const [show, setShow] = useState(true);
const [userId, setUserId] = useState();
const [deleteModal, setDeleteModal] = useState(false);
// //
const [tableData, setTableData] = useState([]); const [tableData, setTableData] = useState([]);
// //
@ -182,11 +185,16 @@ function ChargeRulesMgm() {
} }
// //
function delChargeRule(id) { function delChargeRule(id) {
setShow(false)
ajax.delChargeRule({ id }).then((res) => { ajax.delChargeRule({ id }).then((res) => {
if (res.status === 20000) { if (res.status === 20000) {
message.success("删除成功"); message.success("删除成功");
setShow(true)
research(); research();
} }
}).catch(e => {
setShow(true)
console.log(e)
}); });
} }
//research //research
@ -205,18 +213,38 @@ function ChargeRulesMgm() {
//TODO //TODO
return ( return (
<> <>
<TableModule
ref={childRef}
columns={columns}
tableData={tableData}
formSearch={formSearch}
total={total}
search={fetch}
initFormData={initFormData}
isExport={false}
pageName={'chargeRulesMgm'}
rightButtonGroup={[addItem()]}
/>
{
show ?
<TableModule
ref={childRef}
columns={columns}
tableData={tableData}
formSearch={formSearch}
total={total}
search={fetch}
initFormData={initFormData}
isExport={false}
pageName={'chargeRulesMgm'}
rightButtonGroup={[addItem()]}
/>
: null
}
<Modal
open={deleteModal}
onCancel={() => { setDeleteModal(false) }}
onOk={() => { delChargeRule(userId); }}
//footer={null}
className="applyCopyModal"
title='提示'
>
<div className="enableStatus">
确认是否删除该记录
</div>
{/* <div className="submitBtn">
<button className="submit colorBtn" onClick={() => { delChargeRule(userId); }}>queidng</button>
<button className="cancel colorReset" onClick={() => { setDeleteModal(false) }}>取消</button>
</div> */}
</Modal>
{addModal.visible && ( {addModal.visible && (
<AddModal <AddModal
visible={addModal.visible} visible={addModal.visible}

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

@ -76,6 +76,9 @@ function AddParking(props) {
.then((res) => { .then((res) => {
if (res.status === 20000) { if (res.status === 20000) {
setAreaList(res.data); setAreaList(res.data);
if (record.area) {
form.setFieldsValue({ area_id: getAreaArr(res.data, record.area) })
}
} }
}) })
.catch((err) => { .catch((err) => {
@ -301,7 +304,7 @@ function AddParking(props) {
moment(record.open_end_time, "HH:mm:ss"), moment(record.open_end_time, "HH:mm:ss"),
], ],
filings_time: moment(record.filings_time), filings_time: moment(record.filings_time),
area_id: getAreaArr(areaList, record.area),
//area_id: record.area,
} }
: {} : {}
} }
@ -456,6 +459,48 @@ function AddParking(props) {
</Col> </Col>
</> </>
); );
case 2:
return (
<>
<Col span="4_8" style={{ width: "33%" }}>
<Form.Item
label="二级车场泊位数"
rules={[{ required: true }]}
name="berth_number"
>
<Input />
</Form.Item>
</Col>
</>
);
case 3:
return (
<>
<Col span="4_8" style={{ width: "33%" }}>
<Form.Item
label="三级车场泊位数"
rules={[{ required: true }]}
name="berth_number"
>
<Input />
</Form.Item>
</Col>
</>
);
case 4:
return (
<>
<Col span="4_8" style={{ width: "33%" }}>
<Form.Item
label="四级车场泊位数"
rules={[{ required: true }]}
name="berth_number"
>
<Input />
</Form.Item>
</Col>
</>
);
default: default:
child = ( child = (
<Form.Item <Form.Item

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

@ -17,7 +17,7 @@ import moment from "moment";
import ajax from "@/services"; import ajax from "@/services";
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
const { TextArea } = Input; const { TextArea } = Input;
function BlacklistManagement() {
function BlacklistManagement({id}) {
const [searchForm] = Form.useForm(); const [searchForm] = Form.useForm();
const [editForm] = Form.useForm(); const [editForm] = Form.useForm();
const columns = [ const columns = [
@ -209,6 +209,7 @@ function BlacklistManagement() {
if (editModal.status === "add") { if (editModal.status === "add") {
ajax.addRoadBlackVehicle({ ajax.addRoadBlackVehicle({
...res, ...res,
road_id:id,
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) => {

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

@ -17,7 +17,7 @@ import moment from "moment";
import ajax from "@/services"; import ajax from "@/services";
const { RangePicker } = DatePicker; const { RangePicker } = DatePicker;
const { TextArea } = Input; const { TextArea } = Input;
function WhitelistManagement() {
function WhitelistManagement({ id }) {
const [searchForm] = Form.useForm(); const [searchForm] = Form.useForm();
const [editForm] = Form.useForm(); const [editForm] = Form.useForm();
const columns = [ const columns = [
@ -225,6 +225,7 @@ function WhitelistManagement() {
res.id = currentId; res.id = currentId;
ajax.editWhiteVehicle({ ajax.editWhiteVehicle({
...res, ...res,
road_id: id,
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) => {

12
src/pages/OutRoadMgm/OutSegmentMgm/OutSegment/ConfigParking/CarMgm/index.jsx

@ -7,32 +7,32 @@ import OffPeakVehicleManagement from "./OffPeakVehicleManagement";
import BlacklistManagement from "./BlacklistManagement"; import BlacklistManagement from "./BlacklistManagement";
import WhitelistManagement from "./WhitelistManagement"; import WhitelistManagement from "./WhitelistManagement";
function CarMgm(props) { function CarMgm(props) {
const {id} =props
const { id } = props
const tabsItems = [ const tabsItems = [
{ {
label: "车辆组管理", label: "车辆组管理",
key: "1", key: "1",
children: <CarGroupMgm id={id}/>,
children: <CarGroupMgm id={id} />,
}, },
{ {
label: "车辆管理", label: "车辆管理",
key: "2", key: "2",
children: <CarManagement id={id} group_id={1}/>,
children: <CarManagement id={id} group_id={1} />,
}, },
{ {
label: "错峰车辆管理", label: "错峰车辆管理",
key: "3", key: "3",
children: <OffPeakVehicleManagement />,
children: <OffPeakVehicleManagement id={id} />,
}, },
{ {
label: "黑名单管理", label: "黑名单管理",
key: "4", key: "4",
children: <BlacklistManagement />,
children: <BlacklistManagement id={id} />,
}, },
{ {
label: "白名单管理", label: "白名单管理",
key: "5", key: "5",
children: <WhitelistManagement />,
children: <WhitelistManagement id={id} />,
}, },
]; ];
return ( return (

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

@ -150,7 +150,7 @@ function OutSegment() {
<div> <div>
<a <a
onClick={() => { onClick={() => {
console.log(record)
//console.log(record)
setEditModal({ setEditModal({
...editModal, ...editModal,
visible: true, visible: true,

Loading…
Cancel
Save