Browse Source

fix():修改记录查询字段

tags/PMS_V1.0.0_Alpha5
zhugy 1 year ago
parent
commit
ba6ffa6b5b
  1. 76
      src/pages/NewEnergy/RecordsInquiry/Appointment/loadable.jsx
  2. 66
      src/pages/NewEnergy/RecordsInquiry/Charge/loadable.jsx
  3. 83
      src/pages/NewEnergy/RecordsInquiry/Violation/loadable.jsx
  4. 39
      src/services/NewEnergy/recordsInquiry.js
  5. 4
      src/services/index.js

76
src/pages/NewEnergy/RecordsInquiry/Appointment/loadable.jsx

@ -27,8 +27,8 @@ function Appointment() {
const columns = [
{
title: "用户手机号",
dataIndex: "operator",
key: "operator",
dataIndex: "phone",
key: "phone",
align: "center",
},
{
@ -39,62 +39,62 @@ function Appointment() {
},
{
title: "充电站",
dataIndex: "plate_color",
key: "plate_color",
dataIndex: "station",
key: "station",
align: "center",
},
{
title: "商户名称",
dataIndex: "berth_id",
key: "berth_id",
dataIndex: "operator",
key: "operator",
align: "center",
},
{
title: "预约开始时间",
dataIndex: "in_time",
key: "in_time",
title: "预约开始时间",
dataIndex: "pre_start_time",
key: "start_time",
align: "center",
},
{
title: "预约截至时间",
dataIndex: "in_time",
key: "in_time",
dataIndex: "pre_end_time",
key: "end_time",
align: "center",
},
{
title: "缴纳预约费用金额",
dataIndex: "in_time",
key: "in_time",
dataIndex: "pre_money",
key: "pre_money",
align: "center",
},
{
title: "缴费时间",
dataIndex: "in_time",
key: "in_time",
dataIndex: "pay_time",
key: "pay_time",
align: "center",
},
{
title: "订单状态",
dataIndex: "in_time",
key: "in_time",
dataIndex: "order_status",
key: "order_status",
align: "center",
},
{
title: "订单完结时间",
dataIndex: "in_time",
key: "in_time",
dataIndex: "finish_time",
key: "finish_time",
align: "center",
},
{
title: "预约费用退款金额",
dataIndex: "in_time",
key: "in_time",
dataIndex: "refund_money",
key: "refund_money",
align: "center",
},
{
title: "顶动感实收金额",
dataIndex: "in_time",
key: "in_time",
dataIndex: "pay_money",
key: "pay_money",
align: "center",
},
{
@ -131,7 +131,7 @@ function Appointment() {
placeholder: "请输入车牌号",
},
{
name: "charging",
name: "station",
type: "Input",
label: "充电站",
placeholder: "请输入充电站",
@ -144,12 +144,12 @@ function Appointment() {
placeholder: "请选择商户名称",
},
{
name: "timeStart",
name: "pre_time",
type: "DateRangePicker",
label: "预约开始时间",
},
{
name: "timeEnd",
name: "end_time",
type: "DateRangePicker",
label: "订单完结时间",
},
@ -163,10 +163,10 @@ function Appointment() {
//
const search = (params) => {
ajax.getParkingList(params).then((res) => {
ajax.recordsInquiry.getAppointmentList(params).then((res) => {
if (res.status === 20000) {
setTableData(res.data.list);
setTotal(res.data.total);
setTableData(res.data);
setTotal(res.total);
} else {
message.error(res.message)
}
@ -182,19 +182,19 @@ function Appointment() {
<TableModule
showSerial={true}
isExport={false}
diyButton={
<Button
type="primary"
onClick={handelAdd}
>
</Button>
}
// diyButton={
// <Button
// type="primary"
// onClick={handelAdd}
// >
//
// </Button>
// }
columns={columns}
tableData={tableData}
formSearch={formSearch}
pagename="预约订单"
pageName={'Appointment'}
pageName={'appointment'}
initFormData={initFormData}
total={total}
search={search}

66
src/pages/NewEnergy/RecordsInquiry/Charge/loadable.jsx

@ -27,56 +27,56 @@ function Charge() {
const columns = [
{
title: "充电订单号",
dataIndex: "operator",
key: "operator",
dataIndex: "order_id",
key: "order_id",
align: "center",
},
{
title: "充电站",
dataIndex: "plate",
key: "plate",
dataIndex: "name",
key: "name",
align: "center",
},
{
title: "充电电量",
dataIndex: "plate_color",
key: "plate_color",
dataIndex: "capacity",
key: "capacity",
align: "center",
},
{
title: "电费",
dataIndex: "berth_id",
key: "berth_id",
dataIndex: "electric",
key: "electric",
align: "center",
},
{
title: "充电服务费",
dataIndex: "in_time",
key: "in_time",
dataIndex: "service_fee",
key: "service_fee",
align: "center",
},
{
title: "充电收入",
dataIndex: "in_time",
key: "in_time",
dataIndex: "income",
key: "income",
align: "center",
},
{
title: "充电开始时间",
dataIndex: "in_time",
key: "in_time",
dataIndex: "start_time",
key: "start_time",
align: "center",
},
{
title: "充电结束时间",
dataIndex: "in_time",
key: "in_time",
dataIndex: "end_time",
key: "end_time",
align: "center",
},
{
title: "充电时长",
dataIndex: "in_time",
key: "in_time",
dataIndex: "duration",
key: "duration",
align: "center",
},
{
@ -86,34 +86,34 @@ function Charge() {
align: "center",
fixed: "right",
width: 100,
render: (text, record, index) => {
return (
<>
<Button type="primary" onClick={() => openModal(index, record)}>
</Button>
</>
)
// render: (text, record, index) => {
// return (
// <>
// <Button type="primary" onClick={() => openModal(index, record)}>
//
// </Button>
// </>
// )
},
// },
},
];
const formSearch = [
{
name: "phone",
name: "name",
type: "Input",
label: "充电站名称",
placeholder: "请输入充电站名称",
},
{
name: "plate",
name: "order_id",
type: "Input",
label: "订单编号",
placeholder: "请输入订单编号",
},
{
name: "timeStart",
name: "start_time",
type: "DateRangePicker",
label: "充电开始时间",
},
@ -127,10 +127,10 @@ function Charge() {
//
const search = (params) => {
ajax.getParkingList(params).then((res) => {
ajax.recordsInquiry.getChargeList(params).then((res) => {
if (res.status === 20000) {
setTableData(res.data.list);
setTotal(res.data.total);
setTableData(res.data);
setTotal(res.total);
} else {
message.error(res.message)
}

83
src/pages/NewEnergy/RecordsInquiry/Violation/loadable.jsx

@ -14,6 +14,8 @@ function Violation() {
const [detailVisible, setDetailVisible] = useState(false);
//
const [tableData, setTableData] = useState([]);
//
const [typeList, setTypeList] = useState([]);
//
const [total, setTotal] = useState(0);
//
@ -27,8 +29,8 @@ function Violation() {
const columns = [
{
title: "用户手机号",
dataIndex: "operator",
key: "operator",
dataIndex: "phone",
key: "phone",
align: "center",
},
{
@ -39,20 +41,20 @@ function Violation() {
},
{
title: "充电站",
dataIndex: "plate_color",
key: "plate_color",
dataIndex: "name",
key: "name",
align: "center",
},
{
title: "违规类型",
dataIndex: "berth_id",
key: "berth_id",
dataIndex: "type",
key: "type",
align: "center",
},
{
title: "记录创建时间",
dataIndex: "in_time",
key: "in_time",
dataIndex: "create_time",
key: "create_time",
align: "center",
},
{
@ -62,16 +64,16 @@ function Violation() {
align: "center",
fixed: "right",
width: 100,
render: (text, record, index) => {
return (
<>
<Button type="primary" onClick={() => openModal(index, record)}>
</Button>
</>
)
// render: (text, record, index) => {
// return (
// <>
// <Button type="primary" onClick={() => openModal(index, record)}>
//
// </Button>
// </>
// )
},
// },
},
];
@ -89,25 +91,40 @@ function Violation() {
placeholder: "请输入车牌号",
},
{
name: "charging",
name: "name",
type: "Input",
label: "充电站",
placeholder: "请输入充电站",
},
{
name: "operator",
name: "type",
type: "Select",
label: "违规类型",
options: typeList,
defaultValue: "0",
placeholder: "请选择违规类型",
},
{
name: "timeStart",
name: "create_time",
type: "DateRangePicker",
label: "记录创建时间",
},
];
//
const getSelect = () => {
ajax.recordsInquiry.getViolationSelect().then((res) => {
const { status, data } = res
if (status === 20000) {
if (data && data.length) {
setTypeList(data);
}
} else {
message.error(res.message)
}
});
}
//
const openModal = (index, record) => {
setDetailData(record)
@ -116,10 +133,10 @@ function Violation() {
//
const search = (params) => {
ajax.getParkingList(params).then((res) => {
ajax.recordsInquiry.getViolationList(params).then((res) => {
if (res.status === 20000) {
setTableData(res.data.list);
setTotal(res.data.total);
setTableData(res.data);
setTotal(res.total);
} else {
message.error(res.message)
}
@ -130,6 +147,10 @@ function Violation() {
setDetailVisible(true)
}
useEffect(() => {
getSelect()
}, [])
return (
@ -137,14 +158,14 @@ function Violation() {
<TableModule
showSerial={true}
isExport={false}
diyButton={
<Button
type="primary"
onClick={handelAdd}
>
</Button>
}
// diyButton={
// <Button
// type="primary"
// onClick={handelAdd}
// >
//
// </Button>
// }
columns={columns}
tableData={tableData}
formSearch={formSearch}

39
src/services/NewEnergy/recordsInquiry.js

@ -9,8 +9,47 @@ const getUnlockingList = (params) => {
});
};
// 预约记录查询
const getAppointmentList = (params) => {
return ajax({
url: "/api/new_power/records/appointment_list",
type: "post",
data: params,
});
};
// 充电记录查询
const getChargeList = (params) => {
return ajax({
url: "/api/new_power/records/charge_list",
type: "post",
data: params,
});
};
// 违规记录查询
const getViolationList = (params) => {
return ajax({
url: "/api/new_power/records/violation_list",
type: "post",
data: params,
});
};
// 违规类型下拉
const getViolationSelect = (params) => {
return ajax({
url: "/api/new_power/records/violation_select",
type: "get",
data: params,
});
};
export default {
getUnlockingList,
getAppointmentList,
getChargeList,
getViolationList,
getViolationSelect
}

4
src/services/index.js

@ -23,11 +23,7 @@ import FinancialMgm from "./FinancialMgm";
import DataAnalysisPrediction from "./DataAnalysisPrediction";
import ParkingOverview from "./ParkingOverview";
import OffPeak from "./OffPeak";
<<<<<<< Updated upstream
import NewEnergy from "./NewEnergy";
=======
import NewEnergy from "./NewEnergy"
>>>>>>> Stashed changes
const api = {};
export default {
...api,

Loading…
Cancel
Save