|
@@ -17,8 +17,8 @@
|
|
|
v-bind="scope.attrs"
|
|
v-bind="scope.attrs"
|
|
|
/>
|
|
/>
|
|
|
</template>
|
|
</template>
|
|
|
- <template #stopType="scope">
|
|
|
|
|
- <Dict v-model="scope.formData[scope.prop]" code="stop_type" v-bind="scope.attrs" />
|
|
|
|
|
|
|
+ <template #stopReason="scope">
|
|
|
|
|
+ <Dict v-model="scope.formData[scope.prop]" code="charge_stop_reason" v-bind="scope.attrs" />
|
|
|
</template>
|
|
</template>
|
|
|
<template #maspStatus="scope">
|
|
<template #maspStatus="scope">
|
|
|
<Dict v-model="scope.formData[scope.prop]" code="masp_status" v-bind="scope.attrs" />
|
|
<Dict v-model="scope.formData[scope.prop]" code="masp_status" v-bind="scope.attrs" />
|
|
@@ -51,6 +51,9 @@
|
|
|
<template #maspStatus="scope">
|
|
<template #maspStatus="scope">
|
|
|
<DictLabel v-model="scope.row[scope.prop]" code="masp_status" />
|
|
<DictLabel v-model="scope.row[scope.prop]" code="masp_status" />
|
|
|
</template>
|
|
</template>
|
|
|
|
|
+ <template #stopReason="scope">
|
|
|
|
|
+ <DictLabel v-model="scope.row[scope.prop]" code="charge_stop_reason" />
|
|
|
|
|
+ </template>
|
|
|
</page-content>
|
|
</page-content>
|
|
|
|
|
|
|
|
<!-- 新增 -->
|
|
<!-- 新增 -->
|
|
@@ -79,6 +82,9 @@
|
|
|
:modal-config="editModalConfig"
|
|
:modal-config="editModalConfig"
|
|
|
@submit-click="handleSubmitClick"
|
|
@submit-click="handleSubmitClick"
|
|
|
>
|
|
>
|
|
|
|
|
+ <template #chargeOrderNo="scope">
|
|
|
|
|
+ <span class="color-coolGray">{{ scope.formData[scope.prop] }}</span>
|
|
|
|
|
+ </template>
|
|
|
<template #orderType="scope">
|
|
<template #orderType="scope">
|
|
|
<Dict v-model="scope.formData[scope.prop]" code="charge_order_type" v-bind="scope.attrs" />
|
|
<Dict v-model="scope.formData[scope.prop]" code="charge_order_type" v-bind="scope.attrs" />
|
|
|
</template>
|
|
</template>
|
|
@@ -109,6 +115,20 @@ import ChargeOrderInfoAPI, {
|
|
|
import type { IObject, IModalConfig, IContentConfig, ISearchConfig } from "@/components/CURD/types";
|
|
import type { IObject, IModalConfig, IContentConfig, ISearchConfig } from "@/components/CURD/types";
|
|
|
import usePage from "@/components/CURD/usePage";
|
|
import usePage from "@/components/CURD/usePage";
|
|
|
|
|
|
|
|
|
|
+// 处理时间范围参数的通用函数
|
|
|
|
|
+const processTimeParams = (params: any) => {
|
|
|
|
|
+ const processedParams = { ...params };
|
|
|
|
|
+ if ("createTime" in processedParams) {
|
|
|
|
|
+ const createTime = processedParams.createTime as string[];
|
|
|
|
|
+ if (createTime?.length > 1) {
|
|
|
|
|
+ processedParams.startTime = createTime[0] + " 00:00:00";
|
|
|
|
|
+ processedParams.endTime = createTime[1] + " 23:59:59";
|
|
|
|
|
+ }
|
|
|
|
|
+ delete processedParams.createTime;
|
|
|
|
|
+ }
|
|
|
|
|
+ return processedParams;
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
// 组合式 CRUD
|
|
// 组合式 CRUD
|
|
|
const {
|
|
const {
|
|
|
searchRef,
|
|
searchRef,
|
|
@@ -120,11 +140,34 @@ const {
|
|
|
handleAddClick,
|
|
handleAddClick,
|
|
|
handleEditClick,
|
|
handleEditClick,
|
|
|
handleSubmitClick,
|
|
handleSubmitClick,
|
|
|
- handleExportClick,
|
|
|
|
|
|
|
+ handleExportClick: defaultHandleExportClick,
|
|
|
handleSearchClick,
|
|
handleSearchClick,
|
|
|
handleFilterChange,
|
|
handleFilterChange,
|
|
|
} = usePage();
|
|
} = usePage();
|
|
|
|
|
|
|
|
|
|
+// 重写导出函数,处理时间参数
|
|
|
|
|
+const handleExportClick = () => {
|
|
|
|
|
+ const queryParams = searchRef.value?.getQueryParams();
|
|
|
|
|
+ if (queryParams) {
|
|
|
|
|
+ const processedParams = processTimeParams(queryParams);
|
|
|
|
|
+ // 过滤空值参数
|
|
|
|
|
+ const filteredParams: any = {};
|
|
|
|
|
+ for (const key in processedParams) {
|
|
|
|
|
+ const value = processedParams[key];
|
|
|
|
|
+ if (value !== "" && value !== null && value !== undefined) {
|
|
|
|
|
+ if (Array.isArray(value)) {
|
|
|
|
|
+ if (value.length > 0) {
|
|
|
|
|
+ filteredParams[key] = value;
|
|
|
|
|
+ }
|
|
|
|
|
+ } else {
|
|
|
|
|
+ filteredParams[key] = value;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ contentRef.value?.exportPageData(filteredParams);
|
|
|
|
|
+ }
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
// 搜索配置
|
|
// 搜索配置
|
|
|
const searchConfig: ISearchConfig = reactive({
|
|
const searchConfig: ISearchConfig = reactive({
|
|
|
permPrefix: "business:charge-order-info",
|
|
permPrefix: "business:charge-order-info",
|
|
@@ -166,18 +209,18 @@ const searchConfig: ISearchConfig = reactive({
|
|
|
label: "状态", //0待启动 1 充电中 2 结算中 3 已完成, 5未成功充电
|
|
label: "状态", //0待启动 1 充电中 2 结算中 3 已完成, 5未成功充电
|
|
|
prop: "status",
|
|
prop: "status",
|
|
|
attrs: {
|
|
attrs: {
|
|
|
- placeholder: "状态",
|
|
|
|
|
|
|
+ placeholder: "选择状态",
|
|
|
clearable: true,
|
|
clearable: true,
|
|
|
style: { width: "200px" },
|
|
style: { width: "200px" },
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
type: "custom",
|
|
type: "custom",
|
|
|
- slotName: "stopType",
|
|
|
|
|
- label: "停止类型", //1 主动停止 2 充满停止 3 余额不足停止, 4电桩按钮停止
|
|
|
|
|
- prop: "stopType",
|
|
|
|
|
|
|
+ slotName: "stopReason",
|
|
|
|
|
+ label: "结束原因", //1 主动停止 2 充满停止 3 余额不足停止, 4电桩按钮停止
|
|
|
|
|
+ prop: "stopReason",
|
|
|
attrs: {
|
|
attrs: {
|
|
|
- placeholder: "停止类型",
|
|
|
|
|
|
|
+ placeholder: "选择结束原因",
|
|
|
clearable: true,
|
|
clearable: true,
|
|
|
style: { width: "200px" },
|
|
style: { width: "200px" },
|
|
|
},
|
|
},
|
|
@@ -238,19 +281,9 @@ const contentConfig: IContentConfig<ChargeOrderInfoPageQuery> = reactive({
|
|
|
// 主键
|
|
// 主键
|
|
|
pk: "id",
|
|
pk: "id",
|
|
|
// 列表查询接口
|
|
// 列表查询接口
|
|
|
- // indexAction: ChargeOrderInfoAPI.getPage,
|
|
|
|
|
- // 列表查询接口
|
|
|
|
|
indexAction: (params: any) => {
|
|
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);
|
|
|
|
|
|
|
+ const processedParams = processTimeParams(params);
|
|
|
|
|
+ return ChargeOrderInfoAPI.getPage(processedParams);
|
|
|
},
|
|
},
|
|
|
// 删除接口
|
|
// 删除接口
|
|
|
deleteAction: ChargeOrderInfoAPI.deleteByIds,
|
|
deleteAction: ChargeOrderInfoAPI.deleteByIds,
|
|
@@ -315,17 +348,21 @@ const contentConfig: IContentConfig<ChargeOrderInfoPageQuery> = reactive({
|
|
|
{ label: "优惠描述", prop: "discountDesc" },
|
|
{ label: "优惠描述", prop: "discountDesc" },
|
|
|
{ label: "优惠券金额", prop: "couponPrice" },
|
|
{ label: "优惠券金额", prop: "couponPrice" },
|
|
|
{
|
|
{
|
|
|
- label: "停止类型", //1 主动停止 2 充满停止 3 余额不足停止, 4电桩按钮停止
|
|
|
|
|
- prop: "stopType",
|
|
|
|
|
|
|
+ label: "结束原因",
|
|
|
|
|
+ prop: "stopReason",
|
|
|
templet: "custom",
|
|
templet: "custom",
|
|
|
- slotName: "stopType",
|
|
|
|
|
|
|
+ slotName: "stopReason",
|
|
|
},
|
|
},
|
|
|
- { label: "充电结束原因", prop: "stopReason" },
|
|
|
|
|
{ label: "企业名称", prop: "firmName" },
|
|
{ label: "企业名称", prop: "firmName" },
|
|
|
{ label: "企业专享优惠价", prop: "firmPrice" },
|
|
{ label: "企业专享优惠价", prop: "firmPrice" },
|
|
|
{ label: "备注", prop: "remark" },
|
|
{ label: "备注", prop: "remark" },
|
|
|
{ label: "创建时间", prop: "createTime" },
|
|
{ label: "创建时间", prop: "createTime" },
|
|
|
-
|
|
|
|
|
|
|
+ {
|
|
|
|
|
+ label: "操作",
|
|
|
|
|
+ prop: "operation",
|
|
|
|
|
+ templet: "tool",
|
|
|
|
|
+ operat: ["edit"],
|
|
|
|
|
+ },
|
|
|
],
|
|
],
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -348,53 +385,9 @@ const addModalConfig: IModalConfig<ChargeOrderInfoForm> = reactive({
|
|
|
formItems: [
|
|
formItems: [
|
|
|
{
|
|
{
|
|
|
type: "custom",
|
|
type: "custom",
|
|
|
- label: "订单类型",
|
|
|
|
|
- prop: "orderType",
|
|
|
|
|
- slotName: "orderType",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "订单类型",
|
|
|
|
|
- style: { width: "100%" },
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "充电桩编号",
|
|
|
|
|
- },
|
|
|
|
|
- label: "充电桩编号",
|
|
|
|
|
- prop: "equipmentId",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "充电订单号",
|
|
|
|
|
- },
|
|
|
|
|
label: "充电订单号",
|
|
label: "充电订单号",
|
|
|
prop: "chargeOrderNo",
|
|
prop: "chargeOrderNo",
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "充电开始时间",
|
|
|
|
|
- },
|
|
|
|
|
- label: "充电开始时间",
|
|
|
|
|
- prop: "startTime",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "充电结束时间",
|
|
|
|
|
- },
|
|
|
|
|
- label: "充电结束时间",
|
|
|
|
|
- prop: "endTime",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "充电时间",
|
|
|
|
|
- },
|
|
|
|
|
- label: "充电时间(秒)",
|
|
|
|
|
- prop: "chargeTime",
|
|
|
|
|
|
|
+ slotName: "chargeOrderNo",
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
type: "custom",
|
|
type: "custom",
|
|
@@ -406,242 +399,6 @@ const addModalConfig: IModalConfig<ChargeOrderInfoForm> = reactive({
|
|
|
style: { width: "100%" },
|
|
style: { width: "100%" },
|
|
|
},
|
|
},
|
|
|
},
|
|
},
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "充电消费总额",
|
|
|
|
|
- },
|
|
|
|
|
- label: "充电消费总额",
|
|
|
|
|
- prop: "thirdPartyTotalCost",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "充电服务费",
|
|
|
|
|
- },
|
|
|
|
|
- label: "充电服务费",
|
|
|
|
|
- prop: "thirdPartyServerfee",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "充电金额",
|
|
|
|
|
- },
|
|
|
|
|
- label: "充电金额",
|
|
|
|
|
- prop: "thirdPartyElecfee",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "实际充电度数",
|
|
|
|
|
- },
|
|
|
|
|
- label: "实际充电度数", //(单位:0.001 kw/h)
|
|
|
|
|
- prop: "totalCharge",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "平台实际收取金额",
|
|
|
|
|
- },
|
|
|
|
|
- label: "平台实际收取金额",
|
|
|
|
|
- prop: "realCost",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "平台总服务费",
|
|
|
|
|
- },
|
|
|
|
|
- label: "平台总服务费",
|
|
|
|
|
- prop: "realServiceCost",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "custom",
|
|
|
|
|
- label: "停止类型", //1 主动停止 2 充满停止 3 余额不足停止, 4电桩按钮停止
|
|
|
|
|
- prop: "stopType",
|
|
|
|
|
- slotName: "stopType",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "停止类型",
|
|
|
|
|
- style: { width: "100%" },
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "请求启动充电的手机号",
|
|
|
|
|
- },
|
|
|
|
|
- label: "请求启动充电的手机号",
|
|
|
|
|
- prop: "phone",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "车牌号",
|
|
|
|
|
- },
|
|
|
|
|
- label: "车牌号", //( 停车减免必传,格式确保正确)
|
|
|
|
|
- prop: "plateNum",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "充电结束原因",
|
|
|
|
|
- },
|
|
|
|
|
- label: "充电结束原因",
|
|
|
|
|
- prop: "stopReason",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "推送",
|
|
|
|
|
- },
|
|
|
|
|
- label: "推送", //:充电明细信息
|
|
|
|
|
- prop: "chargeDetails",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "充电站id",
|
|
|
|
|
- },
|
|
|
|
|
- label: "充电站id",
|
|
|
|
|
- prop: "thirdPartyStationId",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "预充值金额",
|
|
|
|
|
- },
|
|
|
|
|
- label: "预充值金额",
|
|
|
|
|
- prop: "preAmt",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "平台预扣服务费",
|
|
|
|
|
- },
|
|
|
|
|
- label: "平台预扣服务费",
|
|
|
|
|
- prop: "realPredictServiceCost",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "补缴金额",
|
|
|
|
|
- },
|
|
|
|
|
- label: "补缴金额", //(智停)
|
|
|
|
|
- prop: "maspAmount",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "平台补缴金额",
|
|
|
|
|
- },
|
|
|
|
|
- label: "平台补缴金额",
|
|
|
|
|
- prop: "maspRealAmount",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "需要补缴的总金额",
|
|
|
|
|
- },
|
|
|
|
|
- label: "需要补缴的总金额",
|
|
|
|
|
- prop: "totalMaspMoney",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "custom",
|
|
|
|
|
- label: "补缴状态", // 0.无需补缴 1.待补缴 2.已补缴
|
|
|
|
|
- prop: "maspStatus",
|
|
|
|
|
- slotName: "maspStatus",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "补缴状态",
|
|
|
|
|
- style: { width: "100%" },
|
|
|
|
|
- },
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "补缴时间",
|
|
|
|
|
- },
|
|
|
|
|
- label: "补缴时间",
|
|
|
|
|
- prop: "maspTime",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "补缴描述",
|
|
|
|
|
- },
|
|
|
|
|
- label: "补缴描述", //(默认:系统扣除)
|
|
|
|
|
- prop: "maspDesc",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "优惠金额",
|
|
|
|
|
- },
|
|
|
|
|
- label: "优惠金额",
|
|
|
|
|
- prop: "discountMoney",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "优惠描述",
|
|
|
|
|
- },
|
|
|
|
|
- label: "优惠描述", //(前端展示为优惠描述+优惠金额)
|
|
|
|
|
- prop: "discountDesc",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "优惠活动ID",
|
|
|
|
|
- },
|
|
|
|
|
- label: "优惠活动ID",
|
|
|
|
|
- prop: "discountInfoId",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "按平台计费规则,实际收取的服务费",
|
|
|
|
|
- },
|
|
|
|
|
- label: "按平台计费规则,实际收取的服务费",
|
|
|
|
|
- prop: "realThirdCost",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "企业id",
|
|
|
|
|
- },
|
|
|
|
|
- label: "企业id",
|
|
|
|
|
- prop: "firmId",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "企业专享优惠价",
|
|
|
|
|
- },
|
|
|
|
|
- label: "企业专享优惠价",
|
|
|
|
|
- prop: "firmPrice",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "优惠券金额",
|
|
|
|
|
- },
|
|
|
|
|
- label: "优惠券金额",
|
|
|
|
|
- prop: "couponPrice",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "备注",
|
|
|
|
|
- },
|
|
|
|
|
- label: "备注",
|
|
|
|
|
- prop: "remark",
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- type: "input",
|
|
|
|
|
- attrs: {
|
|
|
|
|
- placeholder: "创建时间",
|
|
|
|
|
- },
|
|
|
|
|
- label: "创建时间",
|
|
|
|
|
- prop: "createTime",
|
|
|
|
|
- },
|
|
|
|
|
],
|
|
],
|
|
|
// 提交函数
|
|
// 提交函数
|
|
|
formAction: (data: ChargeOrderInfoForm) => {
|
|
formAction: (data: ChargeOrderInfoForm) => {
|