|
|
@@ -39,6 +39,9 @@
|
|
|
<template #orderType="scope">
|
|
|
<DictLabel v-model="scope.row[scope.prop]" code="charge_order_type" />
|
|
|
</template>
|
|
|
+ <template #chargeTime="scope">
|
|
|
+ <span>{{ formatSeconds(scope.row[scope.prop]) }}</span>
|
|
|
+ </template>
|
|
|
<template #status="scope">
|
|
|
<DictLabel v-model="scope.row[scope.prop]" code="charge_order_status" />
|
|
|
</template>
|
|
|
@@ -97,8 +100,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
+import BillingStrategyAPI from "@/api/operationsManage/billing-strategy-api";
|
|
|
defineOptions({ name: "ChargeOrderInfo" });
|
|
|
-
|
|
|
import ChargeOrderInfoAPI, {
|
|
|
ChargeOrderInfoForm,
|
|
|
ChargeOrderInfoPageQuery,
|
|
|
@@ -181,24 +184,45 @@ const searchConfig: ISearchConfig = reactive({
|
|
|
},
|
|
|
{
|
|
|
type: "input",
|
|
|
- label: "请求启动充电的手机号",
|
|
|
+ label: "用户手机号",
|
|
|
prop: "phoneNum",
|
|
|
attrs: {
|
|
|
- placeholder: "请求启动充电的手机号",
|
|
|
+ placeholder: "用户手机号",
|
|
|
clearable: true,
|
|
|
style: { width: "200px" },
|
|
|
},
|
|
|
},
|
|
|
{
|
|
|
- type: "custom",
|
|
|
- slotName: "maspStatus",
|
|
|
- label: "补缴状态", // 0.无需补缴 1.待补缴 2.已补缴
|
|
|
- prop: "maspStatus",
|
|
|
+ type: "select",
|
|
|
+ label: "所属站点",
|
|
|
+ prop: "thirdStationId",
|
|
|
attrs: {
|
|
|
- placeholder: "补缴状态",
|
|
|
+ placeholder: "请选择站点",
|
|
|
clearable: true,
|
|
|
+ filterable: true,
|
|
|
style: { width: "200px" },
|
|
|
},
|
|
|
+ options: [],
|
|
|
+ async initFn(formItem) {
|
|
|
+ const data = await BillingStrategyAPI.getChargingPileSelect();
|
|
|
+ formItem.options = (data || []).map((item: any) => ({
|
|
|
+ label: item.stationName,
|
|
|
+ value: item.id,
|
|
|
+ }));
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "date-picker",
|
|
|
+ label: "创建时间",
|
|
|
+ prop: "createTime",
|
|
|
+ attrs: {
|
|
|
+ type: "daterange",
|
|
|
+ "range-separator": "~",
|
|
|
+ "start-placeholder": "开始时间",
|
|
|
+ "end-placeholder": "截止时间",
|
|
|
+ "value-format": "YYYY-MM-DD",
|
|
|
+ style: { width: "240px" },
|
|
|
+ },
|
|
|
},
|
|
|
],
|
|
|
});
|
|
|
@@ -214,9 +238,24 @@ const contentConfig: IContentConfig<ChargeOrderInfoPageQuery> = reactive({
|
|
|
// 主键
|
|
|
pk: "id",
|
|
|
// 列表查询接口
|
|
|
- indexAction: ChargeOrderInfoAPI.getPage,
|
|
|
+ // indexAction: ChargeOrderInfoAPI.getPage,
|
|
|
+ // 列表查询接口
|
|
|
+ indexAction: (params: any) => {
|
|
|
+ // 处理创建时间范围参数
|
|
|
+ if ("createTime" in params) {
|
|
|
+ const createTime = params.createTime as string[];
|
|
|
+ if (createTime?.length > 1) {
|
|
|
+ params.startTime = createTime[0] + " 00:00:00";
|
|
|
+ params.endTime = createTime[1] + " 23:59:59";
|
|
|
+ }
|
|
|
+ delete params.createTime;
|
|
|
+ }
|
|
|
+ return ChargeOrderInfoAPI.getPage(params);
|
|
|
+ },
|
|
|
// 删除接口
|
|
|
deleteAction: ChargeOrderInfoAPI.deleteByIds,
|
|
|
+ // 导出接口
|
|
|
+ exportAction: ChargeOrderInfoAPI.exportExcel,
|
|
|
// 数据解析函数
|
|
|
parseData(res: any) {
|
|
|
return {
|
|
|
@@ -232,80 +271,58 @@ const contentConfig: IContentConfig<ChargeOrderInfoPageQuery> = reactive({
|
|
|
pageSizes: [10, 20, 30, 50],
|
|
|
},
|
|
|
// 工具栏配置
|
|
|
- // toolbar: ["add", "delete"],
|
|
|
+ toolbar: ["export"],
|
|
|
defaultToolbar: ["refresh", "filter"],
|
|
|
// 表格列配置
|
|
|
cols: [
|
|
|
{ type: "selection", width: 55, align: "center" },
|
|
|
+ { label: "充电订单号", prop: "chargeOrderNo" },
|
|
|
+ { label: "用户手机号", prop: "phoneNum" },
|
|
|
{
|
|
|
label: "订单类型", // 1 个人订单 2 集团订单
|
|
|
prop: "orderType",
|
|
|
templet: "custom",
|
|
|
slotName: "orderType",
|
|
|
},
|
|
|
+ { label: "充电站名称", prop: "stationName" },
|
|
|
+ { label: "设备名称", prop: "connectorName" },
|
|
|
{ label: "充电桩编号", prop: "equipmentId" },
|
|
|
- { label: "充电订单号", prop: "chargeOrderNo" },
|
|
|
{ label: "充电开始时间", prop: "startTime" },
|
|
|
{ label: "充电结束时间", prop: "endTime" },
|
|
|
{
|
|
|
label: "充电时间", //:秒
|
|
|
prop: "chargeTime",
|
|
|
+ templet: "custom",
|
|
|
+ slotName: "chargeTime",
|
|
|
},
|
|
|
{
|
|
|
- label: "状态", //0待启动 1 充电中 2 结算中 3 已完成, 5未成功充电
|
|
|
+ label: "订单状态", //0待启动 1 充电中 2 结算中 3 已完成, 5未成功充电
|
|
|
prop: "status",
|
|
|
templet: "custom",
|
|
|
slotName: "status",
|
|
|
},
|
|
|
- { label: "充电消费总额", prop: "thirdPartyTotalCost" },
|
|
|
- { label: "充电服务费", prop: "thirdPartyServerfee" },
|
|
|
- { label: "充电金额", prop: "thirdPartyElecfee" },
|
|
|
{
|
|
|
label: "实际充电度数", //(单位:0.001 kw/h)
|
|
|
prop: "totalCharge",
|
|
|
},
|
|
|
{ label: "平台实际收取金额", prop: "realCost" },
|
|
|
{ label: "平台总服务费", prop: "realServiceCost" },
|
|
|
+ { label: "三方充电消费总额", prop: "thirdPartyTotalCost" },
|
|
|
+ { label: "三方充电服务费", prop: "thirdPartyServerfee" },
|
|
|
+ { label: "三方充电金额", prop: "thirdPartyElecfee" },
|
|
|
+ { label: "预充值金额", prop: "preAmt" },
|
|
|
+ { label: "优惠金额", prop: "discountMoney" },
|
|
|
+ { label: "优惠描述", prop: "discountDesc" },
|
|
|
+ { label: "优惠券金额", prop: "couponPrice" },
|
|
|
{
|
|
|
label: "停止类型", //1 主动停止 2 充满停止 3 余额不足停止, 4电桩按钮停止
|
|
|
prop: "stopType",
|
|
|
templet: "custom",
|
|
|
slotName: "stopType",
|
|
|
},
|
|
|
- { label: "请求启动充电的手机号", prop: "phone" },
|
|
|
- {
|
|
|
- label: "车牌号", //( 停车减免必传,格式确保正确)
|
|
|
- prop: "plateNum",
|
|
|
- },
|
|
|
{ label: "充电结束原因", prop: "stopReason" },
|
|
|
- {
|
|
|
- label: "推送", //:充电明细信息
|
|
|
- prop: "chargeDetails",
|
|
|
- },
|
|
|
- { label: "充电站id", prop: "thirdPartyStationId" },
|
|
|
- { label: "预充值金额", prop: "preAmt" },
|
|
|
- { label: "平台预扣服务费", prop: "realPredictServiceCost" },
|
|
|
- {
|
|
|
- label: "补缴金额", //(智停)
|
|
|
- prop: "maspAmount",
|
|
|
- },
|
|
|
- { label: "平台补缴金额", prop: "maspRealAmount" },
|
|
|
- { label: "需要补缴的总金额", prop: "totalMaspMoney" },
|
|
|
- {
|
|
|
- label: "补缴状态", // 0.无需补缴 1.待补缴 2.已补缴
|
|
|
- prop: "maspStatus",
|
|
|
- templet: "custom",
|
|
|
- slotName: "maspStatus",
|
|
|
- },
|
|
|
- { label: "补缴时间", prop: "maspTime" },
|
|
|
- { label: "补缴描述", prop: "maspDesc" },
|
|
|
- { label: "优惠金额", prop: "discountMoney" },
|
|
|
- { label: "优惠描述", prop: "discountDesc" },
|
|
|
- { label: "优惠活动ID", prop: "discountInfoId" },
|
|
|
- { label: "服务费", prop: "realThirdCost" },
|
|
|
- { label: "企业id", prop: "firmId" },
|
|
|
+ { label: "企业名称", prop: "firmName" },
|
|
|
{ label: "企业专享优惠价", prop: "firmPrice" },
|
|
|
- { label: "优惠券金额", prop: "couponPrice" },
|
|
|
{ label: "备注", prop: "remark" },
|
|
|
{ label: "创建时间", prop: "createTime" },
|
|
|
|
|
|
@@ -666,4 +683,13 @@ const handleOperateClick = (data: IObject) => {
|
|
|
const handleToolbarClick = (name: string) => {
|
|
|
console.log(name);
|
|
|
};
|
|
|
+
|
|
|
+// 格式化秒数为时分秒
|
|
|
+const formatSeconds = (seconds: number) => {
|
|
|
+ if (!seconds && seconds !== 0) return '-';
|
|
|
+ const hours = Math.floor(seconds / 3600);
|
|
|
+ const minutes = Math.floor((seconds % 3600) / 60);
|
|
|
+ const secs = seconds % 60;
|
|
|
+ return `${String(hours).padStart(2, '0')}:${String(minutes).padStart(2, '0')}:${String(secs).padStart(2, '0')}`;
|
|
|
+};
|
|
|
</script>
|