8.23 站外充电订单

master
shilei 3 months ago
parent 35ba13fc77
commit a0550504be

@ -4,12 +4,12 @@ NODE_ENV=production
VITE_DEV=false
# 请求路径
VITE_BASE_URL='http://180.76.133.253:16808'
VITE_BASE_URL='http://180.76.133.253:16994'
# VITE_BASE_URL='http://106.12.36.89:48080'
# 上传路径
VITE_UPLOAD_URL='http://180.76.133.253:16808/admin-api/infra/file/upload'
# VITE_UPLOAD_URL='http://106.12.36.89:48080/admin-api/infra/file/upload'
VITE_UPLOAD_URL='http://180.76.133.253:16994/admin-api/infra/file/upload'
# VITE_UPLOAD_URL='http://106.12.36.89:48080/admin-api/infra/file/upload'p
# 接口前缀
VITE_API_BASEPATH=

@ -0,0 +1,146 @@
import request from '@/config/axios'
// 站外充电订单 VO
export interface OutChargeOrderVO {
// id
id: number
// 换电站编码
stationNo: string
// 充电流水号
chargeSeriaNumber: string
// 充电订单号
chargeOrder: string
// 充电枪编号
chargerGunNo: string
// 电池序列号
batteryId: string
// 开始时间
startTime: Date
// 结束时间
endTime: Date
// 开始SOC
startSoc: number
// 结束SOC
endSoc: number
// 开始SOE
startSoe: number
// 结束SOE
endSoe: number
// 充电电量
chargingCapacity: number
// 充电时长
chargingTime: number
// 车架号: 车辆/电池包 VIN
vin: string
// 状态1-充电中2-待支付3-支付完成4-取消;
status: number
// 优惠前总费用
totalFeeBeforeDiscount: number
// 优惠金额
discountFee: number
// 总费用
totalFee: number
// 实际支付金额
actualPay: number
// 尖时段电量(直流)
theTipElectric: number
// 尖时段单价(直流)
theTipPrice: number
// 尖时段电费(直流)
theTipExpense: number
// 峰时段电量(直流)
peakElectric: number
// 峰时段单价(直流)
peakPrice: number
// 峰时段电费(直流)
peakExpense: number
// 平时段电量(直流)
flatElectric: number
// 平时段单价(直流)
flatPrice: number
// 平时段电费(直流)
flatExpense: number
// 谷时段电量(直流)
theValleyElectric: number
// 谷时段单价(直流)
theValleyPrice: number
// 谷时段电费(直流)
theValleyExpense: number
// 修正充电量(直流)
amendElectric: number
// 修正电费(直流)
amendExpense: number
// 尖时段电量(交流)
theTipElectricAcMeter: number
// 峰时段电量(交流)
peakElectricAcMeter: number
// 平时段电量(交流)
flatElectricAcMeter: number
// 谷时段电量(交流)
theValleyElectricAcMeter: number
// 尖时段电费(交流)
theTipExpenseAcMeter: number
// 峰时段电费(交流)
peakExpenseAcMeter: number
// 平时段电费(交流)
flatExpenseAcMeter: number
// 谷时段电费(交流)
theValleyExpenseAcMeter: number
// 修正充电量(交流)
amendElectricAcMeter: number
// 修正电费(交流)
amendExpenseAcMeter: number
// 充电前交流表电量
beforeChargingElectric: number
// 充电后交流表电量
afterChargingElectric: number
// 套餐优惠电量度数
freeCharge: number
// 上报方式:1:自动2人工手动
reportingMode: number
// 是否有效:0无效1有效
orderStatus: number
// 充电机唯一编码
epm: string
// 是否补单:0否;1:是
replenishmentFlag: number
// 电价模型id
priceId: number
// 电网电价月日分时模型id
dateId: number
// 电网电价时分秒分时模型id
timeId: number
}
// 站外充电订单 API
export const OutChargeOrderApi = {
// 查询站外充电订单分页
getOutChargeOrderPage: async (params: any) => {
return await request.get({ url: `/cloud/out-charge-order/page`, params })
},
// 查询站外充电订单详情
getOutChargeOrder: async (id: number) => {
return await request.get({ url: `/cloud/out-charge-order/get?id=` + id })
},
// 新增站外充电订单
createOutChargeOrder: async (data: OutChargeOrderVO) => {
return await request.post({ url: `/cloud/out-charge-order/create`, data })
},
// 修改站外充电订单
updateOutChargeOrder: async (data: OutChargeOrderVO) => {
return await request.put({ url: `/cloud/out-charge-order/update`, data })
},
// 删除站外充电订单
deleteOutChargeOrder: async (id: number) => {
return await request.delete({ url: `/cloud/out-charge-order/delete?id=` + id })
},
// 导出站外充电订单 Excel
exportOutChargeOrder: async (params) => {
return await request.download({ url: `/cloud/out-charge-order/export-excel`, params })
},
}

@ -113,10 +113,10 @@ export enum DICT_TYPE {
CHECK_ORDER_STATUS_ONE = 'check_order_status_one', //zz退款单状态 状态2-退款成功3-取消
// -----------zzzz
PERSONAL_VEHICLE_FREEZE_NO = 'personal_vehicle_freeze_no',//zz 0-未审核 1-通过审核 2-审核拒绝
PERSONAL_VEHICLE_AUDIT='personal_vehicle_audit',//1通过2不通过
AUDIT_STATUS= 'audit_status',//ZZ 0 未审核 1 审核通过 2 拒绝审核
BILLING_MODEL= 'billing_model',//ZZ 1.SOE差值;2:剩余SOE;3:充电电量;4:SOC差值模型
MODEL_TIME_STATUS= 'model_time_status',//0启 1 禁
PERSONAL_VEHICLE_AUDIT = 'personal_vehicle_audit',//1通过2不通过
AUDIT_STATUS = 'audit_status',//ZZ 0 未审核 1 审核通过 2 拒绝审核
BILLING_MODEL = 'billing_model',//ZZ 1.SOE差值;2:剩余SOE;3:充电电量;4:SOC差值模型
MODEL_TIME_STATUS = 'model_time_status',//0启 1 禁
PEAK_PLATEAU_STATE = 'peak_plateau_state',
USER_TYPE = 'user_type',
USER_NUMBER_STATUS = 'user_number_status',
@ -260,5 +260,10 @@ export enum DICT_TYPE {
PAYRESULT = 'payresult',
CARTYPE = 'car_type',
BTYTYPE = 'bty_type',
BIZTYPE = 'biz_type'
BIZTYPE = 'biz_type',
OUTREPLENISHMENTFLAG = 'out_replenishmentFlag',
OUTORDERSTATUS = 'out_orderStatus',
OUTREPORTINGMODE = 'out_reportingMode',
OUTCHARGSTATUS = 'outcharg_status',
PAYBIZTYPE = 'pay_bizType'
}

@ -35,7 +35,7 @@
<div class="h-full w-75% flex bg-cyan-50 <lg:w-35% <xl:w-55%">
<div class="ml-15 h-full flex flex-col justify-center">
<div class="font-bold">
武汉{{ analyseData?.comparison?.value?.visitUserCount || 504.22 }}
长沙{{ analyseData?.comparison?.value?.visitUserCount || 504.22 }}
</div>
<!-- <div class="mt-2 text-3.5">
武汉换电站{{

@ -39,10 +39,10 @@ const terminalChartOptions = reactive<EChartsOption>({
},
data: [
{ value: 943.58, name: '合肥站' },
{ value: 504.22, name: '武汉站' },
{ value: 504.22, name: '长沙站' },
{ value: 186.2, name: '南京站' },
{ value: 0, name: '浙江站' },
{ value: 0, name: '苏州站' }
{ value: 0, name: '海口站' },
{ value: 0, name: '石家庄站' }
]
}
]

@ -19,6 +19,9 @@
</template>
</el-table-column>
<el-table-column label="流水号" align="center" prop="no" />
<el-table-column label="车辆" align="center" prop="vehicleNo" />
<el-table-column label="司机" align="center" prop="nickname" />
<el-table-column label="订单号" align="center" prop="bizId" />
<el-table-column label="流水标题" align="center" prop="title" />
<el-table-column label="交易金额(元)" align="center" prop="price">
<template #default="scope">

@ -0,0 +1,632 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
label-position="top"
>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="换电站编码" prop="stationNo">
<el-select v-model="formData.stationNo" placeholder="请选择" style="width: 100%">
<el-option
:label="item.stationName"
:value="item.stationNo"
v-for="(item, index) in stationinfoList"
:key="index"
/>
</el-select> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="充电流水号" prop="chargeSeriaNumber">
<el-input
v-model="formData.chargeSeriaNumber"
placeholder="请输入充电流水号"
/> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="充电订单号" prop="chargeOrder">
<el-input
v-model="formData.chargeOrder"
placeholder="请输入充电订单号"
/> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="充电枪编号" prop="chargerGunNo">
<el-input
v-model="formData.chargerGunNo"
placeholder="请输入充电枪编号"
/> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="电池序列号" prop="batteryId">
<el-input v-model="formData.batteryId" placeholder="请输入电池序列号" /> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="开始时间" prop="startTime">
<el-date-picker
v-model="formData.startTime"
type="date"
value-format="x"
placeholder="选择开始时间"
style="width: 100%"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="结束时间" prop="endTime">
<el-date-picker
v-model="formData.endTime"
type="date"
value-format="x"
placeholder="选择结束时间"
style="width: 100%"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="开始SOC" prop="startSoc">
<el-input v-model="formData.startSoc" placeholder="请输入开始SOC" /> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="结束SOC" prop="endSoc">
<el-input v-model="formData.endSoc" placeholder="请输入结束SOC" /> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="开始SOE" prop="startSoe">
<el-input v-model="formData.startSoe" placeholder="请输入开始SOE" /> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="结束SOE" prop="endSoe">
<el-input v-model="formData.endSoe" placeholder="请输入结束SOE" /> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="充电电量" prop="chargingCapacity">
<el-input
v-model="formData.chargingCapacity"
placeholder="请输入充电电量"
/> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="充电时长" prop="chargingTime">
<el-date-picker
v-model="formData.chargingTime"
type="date"
value-format="x"
placeholder="选择充电时长"
style="width: 100%"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="车架号VIN" prop="vin">
<el-input
v-model="formData.vin"
placeholder="请输入车架号: 车辆/电池包 VIN"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="状态" prop="status">
<el-select v-model="formData.status" placeholder="请选择" style="width: 100%">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.OUTCHARGSTATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="优惠前总费用" prop="totalFeeBeforeDiscount">
<el-input
v-model="formData.totalFeeBeforeDiscount"
placeholder="请输入优惠前总费用"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="优惠金额" prop="discountFee">
<el-input v-model="formData.discountFee" placeholder="请输入优惠金额" /> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="总费用" prop="totalFee">
<el-input v-model="formData.totalFee" placeholder="请输入总费用" /> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="实际支付金额" prop="actualPay">
<el-input
v-model="formData.actualPay"
placeholder="请输入实际支付金额"
/> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="尖时段电量(直流)" prop="theTipElectric">
<el-input
v-model="formData.theTipElectric"
placeholder="请输入尖时段电量(直流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="尖时段单价(直流)" prop="theTipPrice">
<el-input
v-model="formData.theTipPrice"
placeholder="请输入尖时段单价(直流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="尖时段电费(直流)" prop="theTipExpense">
<el-input
v-model="formData.theTipExpense"
placeholder="请输入尖时段电费(直流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="峰时段电量(直流)" prop="peakElectric">
<el-input
v-model="formData.peakElectric"
placeholder="请输入峰时段电量(直流)"
/> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="峰时段单价(直流)" prop="peakPrice">
<el-input
v-model="formData.peakPrice"
placeholder="请输入峰时段单价(直流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="峰时段电费(直流)" prop="peakExpense">
<el-input
v-model="formData.peakExpense"
placeholder="请输入峰时段电费(直流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="平时段电量(直流)" prop="flatElectric">
<el-input
v-model="formData.flatElectric"
placeholder="请输入平时段电量(直流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="平时段单价(直流)" prop="flatPrice">
<el-input
v-model="formData.flatPrice"
placeholder="请输入平时段单价(直流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="平时段电费(直流)" prop="flatExpense">
<el-input
v-model="formData.flatExpense"
placeholder="请输入平时段电费(直流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="谷时段电量(直流)" prop="theValleyElectric">
<el-input
v-model="formData.theValleyElectric"
placeholder="请输入谷时段电量(直流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="谷时段单价(直流)" prop="theValleyPrice">
<el-input
v-model="formData.theValleyPrice"
placeholder="请输入谷时段单价(直流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="谷时段电费(直流)" prop="theValleyExpense">
<el-input
v-model="formData.theValleyExpense"
placeholder="请输入谷时段电费(直流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="修正充电量(直流)" prop="amendElectric">
<el-input
v-model="formData.amendElectric"
placeholder="请输入修正充电量(直流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="修正电费(直流)" prop="amendExpense">
<el-input
v-model="formData.amendExpense"
placeholder="请输入修正电费(直流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="尖时段电量(交流)" prop="theTipElectricAcMeter">
<el-input
v-model="formData.theTipElectricAcMeter"
placeholder="请输入尖时段电量(交流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="峰时段电量(交流)" prop="peakElectricAcMeter">
<el-input
v-model="formData.peakElectricAcMeter"
placeholder="请输入峰时段电量(交流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="平时段电量(交流)" prop="flatElectricAcMeter">
<el-input
v-model="formData.flatElectricAcMeter"
placeholder="请输入平时段电量(交流)"
/> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="谷时段电量(交流)" prop="theValleyElectricAcMeter">
<el-input
v-model="formData.theValleyElectricAcMeter"
placeholder="请输入谷时段电量(交流)"
/> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="尖时段电费(交流)" prop="theTipExpenseAcMeter">
<el-input
v-model="formData.theTipExpenseAcMeter"
placeholder="请输入尖时段电费(交流)"
type="number"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="峰时段电费(交流)" prop="peakExpenseAcMeter">
<el-input
v-model="formData.peakExpenseAcMeter"
placeholder="请输入峰时段电费(交流)"
type="number"
/> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="平时段电费(交流)" prop="flatExpenseAcMeter">
<el-input
v-model="formData.flatExpenseAcMeter"
placeholder="请输入平时段电费(交流)"
type="number"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="谷时段电费(交流)" prop="theValleyExpenseAcMeter">
<el-input
v-model="formData.theValleyExpenseAcMeter"
placeholder="请输入谷时段电费(交流)"
type="number"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="修正充电量(交流)" prop="amendElectricAcMeter">
<el-input
v-model="formData.amendElectricAcMeter"
placeholder="请输入修正充电量(交流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="修正电费(交流)" prop="amendExpenseAcMeter">
<el-input
v-model="formData.amendExpenseAcMeter"
placeholder="请输入修正电费(交流)"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="充电前交流表电量" prop="beforeChargingElectric">
<el-input
v-model="formData.beforeChargingElectric"
placeholder="请输入充电前交流表电量"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="充电后交流表电量" prop="afterChargingElectric">
<el-input
v-model="formData.afterChargingElectric"
placeholder="请输入充电后交流表电量"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="套餐优惠电量度数" prop="freeCharge">
<el-input
v-model="formData.freeCharge"
placeholder="请输入套餐优惠电量度数"
/> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="上报方式" prop="reportingMode">
<el-select v-model="formData.reportingMode" placeholder="请选择" style="width: 100%">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.OUTREPORTINGMODE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="是否有效" prop="orderStatus">
<el-select
v-model="formData.orderStatus"
placeholder="请选择是否有效"
style="width: 100%"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.OUTORDERSTATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="电池编码" prop="batteryNo">
<el-input v-model="formData.batteryNo" placeholder="请输入" /> </el-form-item
></el-col>
<el-col :span="11"
><el-form-item label="是否补单" prop="replenishmentFlag">
<el-select
v-model="formData.replenishmentFlag"
placeholder="请选择"
style="width: 100%"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.OUTREPLENISHMENTFLAG)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="用户编号" prop="userId">
<el-input v-model="formData.userId" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="11" />
</el-row>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { OutChargeOrderApi, OutChargeOrderVO } from '@/api/biz/outchargeorder'
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
/** 站外充电订单 表单 */
defineOptions({ name: 'OutChargeOrderForm' })
const props = defineProps({
stationinfoList: {
type: Array,
default: () => []
}
})
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
stationNo: undefined,
chargeSeriaNumber: undefined,
chargeOrder: undefined,
chargerGunNo: undefined,
batteryId: undefined,
startTime: undefined,
endTime: undefined,
startSoc: undefined,
endSoc: undefined,
startSoe: undefined,
endSoe: undefined,
chargingCapacity: undefined,
chargingTime: undefined,
vin: undefined,
status: undefined,
totalFeeBeforeDiscount: undefined,
discountFee: undefined,
totalFee: undefined,
actualPay: undefined,
theTipElectric: undefined,
theTipPrice: undefined,
theTipExpense: undefined,
peakElectric: undefined,
peakPrice: undefined,
peakExpense: undefined,
flatElectric: undefined,
flatPrice: undefined,
flatExpense: undefined,
theValleyElectric: undefined,
theValleyPrice: undefined,
theValleyExpense: undefined,
amendElectric: undefined,
amendExpense: undefined,
theTipElectricAcMeter: 0,
peakElectricAcMeter: 0,
flatElectricAcMeter: 0,
theValleyElectricAcMeter: undefined,
theTipExpenseAcMeter: undefined,
peakExpenseAcMeter: undefined,
flatExpenseAcMeter: 0,
theValleyExpenseAcMeter: undefined,
amendElectricAcMeter: undefined,
amendExpenseAcMeter: undefined,
beforeChargingElectric: undefined,
afterChargingElectric: undefined,
freeCharge: undefined,
reportingMode: undefined,
orderStatus: undefined,
epm: undefined,
replenishmentFlag: undefined,
priceId: undefined,
dateId: undefined,
timeId: undefined,
userId: undefined,
batteryNo: undefined
})
const formRules = reactive({
// stationNo: [{ required: true, message: '', trigger: 'blur' }],
stationNo: [{ required: true, message: '不能为空', trigger: 'blur' }],
chargeSeriaNumber: [{ required: true, message: '不能为空', trigger: 'blur' }],
chargeOrder: [{ required: true, message: '不能为空', trigger: 'blur' }],
chargerGunNo: [{ required: true, message: '不能为空', trigger: 'blur' }],
batteryId: [{ required: true, message: '不能为空', trigger: 'blur' }],
startTime: [{ required: true, message: '不能为空', trigger: 'blur' }],
endTime: [{ required: true, message: '不能为空', trigger: 'blur' }],
startSoc: [{ required: true, message: '不能为空', trigger: 'blur' }],
endSoc: [{ required: true, message: '不能为空', trigger: 'blur' }],
startSoe: [{ required: true, message: '不能为空', trigger: 'blur' }],
endSoe: [{ required: true, message: '不能为空', trigger: 'blur' }],
chargingCapacity: [{ required: true, message: '不能为空', trigger: 'blur' }],
chargingTime: [{ required: true, message: '不能为空', trigger: 'blur' }],
vin: [{ required: true, message: '不能为空', trigger: 'blur' }],
status: [{ required: true, message: '不能为空', trigger: 'blur' }],
totalFeeBeforeDiscount: [{ required: true, message: '不能为空', trigger: 'blur' }],
discountFee: [{ required: true, message: '不能为空', trigger: 'blur' }],
totalFee: [{ required: true, message: '不能为空', trigger: 'blur' }],
actualPay: [{ required: true, message: '不能为空', trigger: 'blur' }],
theTipElectric: [{ required: true, message: '不能为空', trigger: 'blur' }],
theTipPrice: [{ required: true, message: '不能为空', trigger: 'blur' }],
theTipExpense: [{ required: true, message: '不能为空', trigger: 'blur' }],
peakElectric: [{ required: true, message: '不能为空', trigger: 'blur' }],
peakPrice: [{ required: true, message: '不能为空', trigger: 'blur' }],
peakExpense: [{ required: true, message: '不能为空', trigger: 'blur' }],
flatElectric: [{ required: true, message: '不能为空', trigger: 'blur' }],
flatPrice: [{ required: true, message: '不能为空', trigger: 'blur' }],
flatExpense: [{ required: true, message: '不能为空', trigger: 'blur' }],
theValleyElectric: [{ required: true, message: '不能为空', trigger: 'blur' }],
theValleyPrice: [{ required: true, message: '不能为空', trigger: 'blur' }],
theValleyExpense: [{ required: true, message: '不能为空', trigger: 'blur' }],
amendElectric: [{ required: true, message: '不能为空', trigger: 'blur' }],
amendExpense: [{ required: true, message: '不能为空', trigger: 'blur' }],
theTipElectricAcMeter: [{ required: true, message: '不能为空', trigger: 'blur' }],
peakElectricAcMeter: [{ required: true, message: '不能为空', trigger: 'blur' }],
flatElectricAcMeter: [{ required: true, message: '不能为空', trigger: 'blur' }],
theValleyElectricAcMeter: [{ required: true, message: '不能为空', trigger: 'blur' }],
theTipExpenseAcMeter: [{ required: true, message: '不能为空', trigger: 'blur' }],
peakExpenseAcMeter: [{ required: true, message: '不能为空', trigger: 'blur' }],
flatExpenseAcMeter: [{ required: true, message: '不能为空', trigger: 'blur' }],
theValleyExpenseAcMeter: [{ required: true, message: '不能为空', trigger: 'blur' }],
amendElectricAcMeter: [{ required: true, message: '不能为空', trigger: 'blur' }],
amendExpenseAcMeter: [{ required: true, message: '不能为空', trigger: 'blur' }],
beforeChargingElectric: [{ required: true, message: '不能为空', trigger: 'blur' }],
afterChargingElectric: [{ required: true, message: '不能为空', trigger: 'blur' }],
freeCharge: [{ required: true, message: '不能为空', trigger: 'blur' }],
reportingMode: [{ required: true, message: '不能为空', trigger: 'blur' }],
orderStatus: [{ required: true, message: '不能为空', trigger: 'blur' }],
epm: [{ required: true, message: '不能为空', trigger: 'blur' }],
replenishmentFlag: [{ required: true, message: '不能为空', trigger: 'blur' }],
priceId: [{ required: true, message: '不能为空', trigger: 'blur' }],
dateId: [{ required: true, message: '不能为空', trigger: 'blur' }],
timeId: [{ required: true, message: '不能为空', trigger: 'blur' }],
userId: [{ required: true, message: '不能为空', trigger: 'blur' }],
batteryNo: [{ required: true, message: '不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await OutChargeOrderApi.getOutChargeOrder(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = formData.value as unknown as OutChargeOrderApi.OutChargeOrderVO
if (formType.value === 'create') {
await OutChargeOrderApi.createOutChargeOrder(data)
message.success(t('common.createSuccess'))
} else {
await OutChargeOrderApi.updateOutChargeOrder(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
stationNo: undefined,
chargeSeriaNumber: undefined,
chargeOrder: undefined,
chargerGunNo: undefined,
batteryId: undefined,
startTime: undefined,
endTime: undefined,
startSoc: undefined,
endSoc: undefined,
startSoe: undefined,
endSoe: undefined,
chargingCapacity: undefined,
chargingTime: undefined,
vin: undefined,
status: undefined,
totalFeeBeforeDiscount: undefined,
discountFee: undefined,
totalFee: undefined,
actualPay: undefined,
theTipElectric: undefined,
theTipPrice: undefined,
theTipExpense: undefined,
peakElectric: undefined,
peakPrice: undefined,
peakExpense: undefined,
flatElectric: undefined,
flatPrice: undefined,
flatExpense: undefined,
theValleyElectric: undefined,
theValleyPrice: undefined,
theValleyExpense: undefined,
amendElectric: undefined,
amendExpense: undefined,
theTipElectricAcMeter: 0,
peakElectricAcMeter: 0,
flatElectricAcMeter: 0,
theValleyElectricAcMeter: undefined,
theTipExpenseAcMeter: undefined,
peakExpenseAcMeter: undefined,
flatExpenseAcMeter: 0,
theValleyExpenseAcMeter: undefined,
amendElectricAcMeter: undefined,
amendExpenseAcMeter: undefined,
beforeChargingElectric: undefined,
afterChargingElectric: undefined,
freeCharge: undefined,
reportingMode: undefined,
orderStatus: undefined,
epm: undefined,
replenishmentFlag: undefined,
priceId: undefined,
dateId: undefined,
timeId: undefined
}
formRef.value?.resetFields()
}
</script>

@ -0,0 +1,127 @@
<template>
<div>
<el-drawer
title="订单详情"
:close-on-click-modal="false"
v-model="drawer"
direction="rtl"
size="60%"
>
<div class="title_info">基本信息</div>
<br />
<el-descriptions :column="2" border>
<el-descriptions-item
size="large"
label="所属换电站:"
label-align="right"
align="center"
label-class-name="my-label"
class-name="my-content"
width="150px"
>
{{ handle_stationNo(check_row.stationNo) }}
</el-descriptions-item>
<el-descriptions-item label="充电流水号:" label-align="right" align="center">
{{ check_row.chargeSeriaNumber == null ? '--' : check_row.chargeSeriaNumber }}
</el-descriptions-item>
<el-descriptions-item label="开始时间:" label-align="right" align="center">
{{ check_row.startTime == null ? '--' : check_row.startTime }}
</el-descriptions-item>
<el-descriptions-item label="结束时间:" label-align="right" align="center">
{{ check_row.endTime == null ? '--' : check_row.endTime }}
</el-descriptions-item>
<el-descriptions-item label="开始SOC:" label-align="right" align="center">
{{ check_row.startSoc == null ? '--' : check_row.startSoc / 100 }}
</el-descriptions-item>
<el-descriptions-item label="结束SOC:" label-align="right" align="center">
{{ check_row.endSoc == null ? '--' : check_row.endSoc / 100 }}
</el-descriptions-item>
</el-descriptions>
<br />
<div class="title_info">支付信息</div>
<br />
<ContentWrap>
<el-table
:data="user_tableData"
border
style="width: 100%; margin-top: 15px"
max-height="500"
:header-cell-style="{
backgroundColor: '#eff4fa'
}"
>
<el-table-column type="index" label="序号" align="center" width="80" />
<el-table-column label="钱包编号" align="center" prop="walletId" />
<el-table-column label="业务分类" align="center" prop="bizType">
<template #default="scope">
<dict-tag :type="DICT_TYPE.PAYBIZTYPE" :value="scope.row.stationType" />
</template>
</el-table-column>
<el-table-column label="交易金额(元)" align="center" prop="price">
<template #default="scope">
{{ scope.row.price / 100 }}
</template>
</el-table-column>
<el-table-column label="流水标题" align="center" prop="title" />
<el-table-column label="交易后的金额(元)" align="center" prop="balance">
<template #default="scope">
{{ scope.row.balance / 100 }}
</template>
</el-table-column>
<el-table-column label="交易时间" align="center" prop="createTime" />
<el-table-column label="流水号" align="center" prop="no" />
<el-table-column label="关联业务编号" align="center" prop="bizId" />
<el-table-column label="车牌号" align="center" prop="vehicleNo" />
</el-table>
</ContentWrap>
<br />
</el-drawer>
</div>
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
const drawer = ref(false)
const check_row = ref<any>()
const user_tableData = ref([])
const open = async (row: any, stationinfoList: any) => {
// console.log(row, 'row')
drawer.value = true
check_row.value = row
user_tableData.value = row.payOrder
stationinfoList.value = stationinfoList
}
const stationinfoList = ref([])
const handle_stationNo = (data) => {
let str = ''
for (var i = 0; i < stationinfoList.value.length; i++) {
if (data == stationinfoList.value[i].stationNo) {
str = stationinfoList.value[i].stationName
}
}
return str
}
defineExpose({ open }) // open
</script>
<style scoped lang="less">
.lines {
width: 90%;
height: 1px;
background: #ccc;
margin: 0 auto;
}
.title_info {
font-size: 16px;
font-weight: 600;
}
:deep(.el-drawer__title) {
font-size: 20px;
font-weight: 600;
// color: #303133;
color: black;
}
</style>

@ -1,5 +1,431 @@
<template>
<span>111</span>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="100px"
>
<!-- <el-form-item label="换电站编码" prop="stationNo">
<el-input
v-model="queryParams.stationNo"
placeholder="请输入换电站编码"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item> -->
<el-form-item label="所属换电站" prop="stationNo">
<el-select v-model="queryParams.stationNo" placeholder="请选择">
<el-option
v-for="(item, index) in stationinfoList"
:key="index"
:label="item.stationName"
:value="item.stationNo"
/>
</el-select>
</el-form-item>
<el-form-item label="充电流水号" prop="chargeSeriaNumber">
<el-input
v-model="queryParams.chargeSeriaNumber"
placeholder="请输入充电流水号"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="充电订单号" prop="chargeOrder">
<el-input
v-model="queryParams.chargeOrder"
placeholder="请输入充电订单号"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
<el-button type="primary" plain @click="openForm('create')">
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button>
<el-button type="success" plain @click="handleExport" :loading="exportLoading">
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>
</el-form-item>
</el-form>
</ContentWrap>
<!-- 列表 -->
<ContentWrap>
<el-table
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:header-cell-style="{
backgroundColor: '#eff4fa'
}"
>
<el-table-column label="序号" align="center" type="index" width="80" />
<!-- <el-table-column label="换电站编码" align="center" prop="stationNo" width="120" /> -->
<el-table-column label="换电站名称" align="center" prop="stationNo" width="120">
<template #default="scope">
{{ handle_stationNo(scope.row.stationNo) }}
</template>
</el-table-column>
<el-table-column label="充电流水号" align="center" prop="chargeSeriaNumber" width="120" />
<el-table-column label="充电订单号" align="center" prop="chargeOrder" width="120" />
<el-table-column label="充电枪编号" align="center" prop="chargerGunNo" width="120" />
<el-table-column label="电池序列号" align="center" prop="batteryId" width="120" />
<el-table-column
label="开始时间"
align="center"
prop="startTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column
label="结束时间"
align="center"
prop="endTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="开始SOC" align="center" prop="startSoc" width="120" />
<el-table-column label="结束SOC" align="center" prop="endSoc" width="120" />
<el-table-column label="开始SOE" align="center" prop="startSoe" width="120" />
<el-table-column label="结束SOE" align="center" prop="endSoe" width="120" />
<el-table-column label="充电电量" align="center" prop="chargingCapacity" width="120" />
<el-table-column label="充电时长" align="center" prop="chargingTime" width="120" />
<el-table-column label="车架号" align="center" prop="vin" />
<el-table-column label="状态" align="center" prop="status">
<template #default="scope">
<dict-tag :type="DICT_TYPE.OUTCHARGSTATUS" :value="scope.row.stationType" />
</template>
</el-table-column>
<el-table-column
label="优惠前总费用"
align="center"
prop="totalFeeBeforeDiscount"
width="120"
/>
<el-table-column label="优惠金额" align="center" prop="discountFee" width="120" />
<el-table-column label="总费用" align="center" prop="totalFee" width="120" />
<el-table-column label="实际支付金额" align="center" prop="actualPay" width="120" />
<el-table-column label="尖时段电量(直流)" align="center" prop="theTipElectric" width="150" />
<el-table-column label="尖时段单价(直流)" align="center" prop="theTipPrice" width="150" />
<el-table-column label="尖时段电费(直流)" align="center" prop="theTipExpense" width="150" />
<el-table-column label="峰时段电量(直流)" align="center" prop="peakElectric" width="150" />
<el-table-column label="峰时段单价(直流)" align="center" prop="peakPrice" width="150" />
<el-table-column label="峰时段电费(直流)" align="center" prop="peakExpense" width="150" />
<el-table-column label="平时段电量(直流)" align="center" prop="flatElectric" width="150" />
<el-table-column label="平时段单价(直流)" align="center" prop="flatPrice" width="150" />
<el-table-column label="平时段电费(直流)" align="center" prop="flatExpense" width="150" />
<el-table-column
label="谷时段电量(直流)"
align="center"
prop="theValleyElectric"
width="150"
/>
<el-table-column label="谷时段单价(直流)" align="center" prop="theValleyPrice" width="150" />
<el-table-column
label="谷时段电费(直流)"
align="center"
prop="theValleyExpense"
width="150"
/>
<el-table-column label="修正充电量(直流)" align="center" prop="amendElectric" width="150" />
<el-table-column label="修正电费(直流)" align="center" prop="amendExpense" width="150" />
<el-table-column
label="尖时段电量(交流)"
align="center"
prop="theTipElectricAcMeter"
width="150"
/>
<el-table-column
label="峰时段电量(交流)"
align="center"
prop="peakElectricAcMeter"
width="150"
/>
<el-table-column
label="平时段电量(交流)"
align="center"
prop="flatElectricAcMeter"
width="150"
/>
<el-table-column
label="谷时段电量(交流)"
align="center"
prop="theValleyElectricAcMeter"
width="150"
/>
<el-table-column
label="尖时段电费(交流)"
align="center"
prop="theTipExpenseAcMeter"
width="150"
/>
<el-table-column
label="峰时段电费(交流)"
align="center"
prop="peakExpenseAcMeter"
width="150"
/>
<el-table-column
label="平时段电费(交流)"
align="center"
prop="flatExpenseAcMeter"
width="150"
/>
<el-table-column
label="谷时段电费(交流)"
align="center"
prop="theValleyExpenseAcMeter"
width="150"
/>
<el-table-column
label="修正充电量(交流)"
align="center"
prop="amendElectricAcMeter"
width="150"
/>
<el-table-column
label="修正电费(交流)"
align="center"
prop="amendExpenseAcMeter"
width="150"
/>
<el-table-column
label="充电前交流表电量"
align="center"
prop="beforeChargingElectric"
width="150"
/>
<el-table-column
label="充电后交流表电量"
align="center"
prop="afterChargingElectric"
width="150"
/>
<el-table-column label="套餐优惠电量度数" align="center" prop="freeCharge" width="150" />
<el-table-column label="上报方式" align="center" prop="reportingMode">
<template #default="scope">
<dict-tag :type="DICT_TYPE.OUTREPORTINGMODE" :value="scope.row.stationType" />
</template>
</el-table-column>
<el-table-column label="是否有效" align="center" prop="orderStatus">
<template #default="scope">
<dict-tag :type="DICT_TYPE.OUTORDERSTATUS" :value="scope.row.stationType" />
</template>
</el-table-column>
<el-table-column label="充电机唯一编码" align="center" prop="epm" width="150" />
<el-table-column label="是否补单" align="center" prop="replenishmentFlag">
<template #default="scope">
<dict-tag :type="DICT_TYPE.OUTREPLENISHMENTFLAG" :value="scope.row.stationType" />
</template>
</el-table-column>
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<!-- <el-table-column label="电价模型id" align="center" prop="priceId" /> -->
<!-- <el-table-column label="电网电价月日分时模型id" align="center" prop="dateId" /> -->
<!-- <el-table-column label="电网电价时分秒分时模型id" align="center" prop="timeId" /> -->
<el-table-column label="操作" align="center" width="200" fixed="right">
<template #default="scope">
<el-button link type="primary" @click="openForm('update', scope.row.id)">
编辑
</el-button>
<el-button link type="danger" @click="handleDelete(scope.row.id)"> </el-button>
<el-button link type="primary" @click="open_drawer(scope.row)"> </el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<drawer ref="drawerRef" />
<!-- 表单弹窗添加/修改 -->
<OutChargeOrderForm ref="formRef" @success="getList" :stationinfoList="stationinfoList" />
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { OutChargeOrderApi, OutChargeOrderVO } from '@/api/biz/outchargeorder'
import OutChargeOrderForm from './OutChargeOrderForm.vue'
import { StationInfoApi, StationInfoVO } from '@/api/share/stationinfo'
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
/** 站外充电订单 列表 */
defineOptions({ name: 'OutChargeOrder' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<OutChargeOrderVO[]>([]) //
//
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
stationNo: undefined,
chargeSeriaNumber: undefined,
chargeOrder: undefined,
chargerGunNo: undefined,
batteryId: undefined,
startTime: [],
endTime: [],
startSoc: undefined,
endSoc: undefined,
startSoe: undefined,
endSoe: undefined,
chargingCapacity: undefined,
chargingTime: [],
vin: undefined,
status: undefined,
totalFeeBeforeDiscount: undefined,
discountFee: undefined,
totalFee: undefined,
actualPay: undefined,
theTipElectric: undefined,
theTipPrice: undefined,
theTipExpense: undefined,
peakElectric: undefined,
peakPrice: undefined,
peakExpense: undefined,
flatElectric: undefined,
flatPrice: undefined,
flatExpense: undefined,
theValleyElectric: undefined,
theValleyPrice: undefined,
theValleyExpense: undefined,
amendElectric: undefined,
amendExpense: undefined,
theTipElectricAcMeter: undefined,
peakElectricAcMeter: undefined,
flatElectricAcMeter: undefined,
theValleyElectricAcMeter: undefined,
theTipExpenseAcMeter: undefined,
peakExpenseAcMeter: undefined,
flatExpenseAcMeter: undefined,
theValleyExpenseAcMeter: undefined,
amendElectricAcMeter: undefined,
amendExpenseAcMeter: undefined,
beforeChargingElectric: undefined,
afterChargingElectric: undefined,
freeCharge: undefined,
reportingMode: undefined,
orderStatus: undefined,
epm: undefined,
replenishmentFlag: undefined,
createTime: [],
priceId: undefined,
dateId: undefined,
timeId: undefined
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await OutChargeOrderApi.getOutChargeOrderPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
const drawerRef = ref()
const open_drawer = (row: any) => {
drawerRef.value.open(row,stationinfoList.value)
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
const handle_stationNo = (data) => {
let str = ''
for (var i = 0; i < stationinfoList.value.length; i++) {
if (data == stationinfoList.value[i].stationNo) {
str = stationinfoList.value[i].stationName
}
}
return str
}
const stationinfoList = ref([])
const getStationList = async () => {
try {
const data = await StationInfoApi.getStationInfoList()
// console.log(data, 'data')
stationinfoList.value = data
} finally {
}
}
/** 重置按钮操作 */
const resetQuery = () => {
queryFormRef.value.resetFields()
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await OutChargeOrderApi.deleteOutChargeOrder(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await OutChargeOrderApi.exportOutChargeOrder(queryParams)
download.excel(data, '站外充电订单.xls')
} catch {
} finally {
exportLoading.value = false
}
}
/** 初始化 **/
onMounted(() => {
getList()
getStationList()
})
</script>

@ -25,7 +25,6 @@
<el-col :span="11"
><el-form-item label="站类型" prop="stationType">
<el-select v-model="formData.stationType" placeholder="请选择" style="width: 100%">
<!-- <el-option label="请选择" value="" /> -->
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.SITECLASSIFICATION_TYPE)"
:key="dict.value"
@ -306,12 +305,12 @@ const open = async (type: string, id?: number) => {
formLoading.value = true
try {
formData.value = await StationInfoApi.getStationInfo(id)
// center_map_data.value = [
// parseInt(formData.value.longitude),
// parseInt(formData.value.latitude)
// ]
center_map_data.value = [120.177664, 30.350422]
console.log(center_map_data.value, 'center_map_data.value')
center_map_data.value = [
parseInt(formData.value.longitude),
parseInt(formData.value.latitude)
]
// center_map_data.value = [120.177664, 30.350422]
// console.log(center_map_data.value, 'center_map_data.value')
open_map()
} finally {
formLoading.value = false

Loading…
Cancel
Save