8.31 站外充电订单修改

master
shilei 3 months ago
parent 2d8d1ac07b
commit 2109bbb085

@ -143,4 +143,14 @@ export const OutChargeOrderApi = {
exportOutChargeOrder: async (params) => {
return await request.download({ url: `/cloud/out-charge-order/export-excel`, params })
},
// 线下结算
postpayOffline: async (data: OutChargeOrderVO) => {
return await request.post({ url: `/cloud/out-charge-order/payOffline`, data })
},
// 挂起关闭
changeoutstatusOrder: async (data: OutChargeOrderVO) => {
return await request.post({ url: `/cloud/out-charge-order/changeStatus`, data })
},
}

@ -280,5 +280,6 @@ GUNSTATUS = 'gunstatus',
OUTORDERSTATUS = 'out_orderStatus',
OUTREPORTINGMODE = 'out_reportingMode',
OUTCHARGSTATUS = 'outcharg_status',
PAYBIZTYPE = 'pay_bizType'
PAYBIZTYPE = 'pay_bizType',
ORDERSTATUS = 'order_status',
}

@ -20,367 +20,35 @@
/>
</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%"
placeholder="请输入"
/> </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-input v-model="formData.startSoc" placeholder="请输入" /> </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-input v-model="formData.endSoc" placeholder="请输入" /> </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="请输入谷时段电量(直流)"
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>

@ -7,7 +7,17 @@
direction="rtl"
size="60%"
>
<div class="title_info">基本信息</div>
<div class="title_info">
<span>基本信息</span>
<div
v-if="
check_row.orderStatus != 8 && check_row.orderStatus != 5 && check_row.orderStatus != 9
"
>
<el-button type="primary" @click="handle_changes(check_row, 8)">挂起</el-button>
<el-button type="danger" @click="handle_changes(check_row, 9)">关闭</el-button>
</div>
</div>
<br />
<el-descriptions :column="2" border>
<el-descriptions-item
@ -32,10 +42,10 @@
{{ 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 }}
{{ check_row.startSoc == null ? '--' : check_row.startSoc }}
</el-descriptions-item>
<el-descriptions-item label="结束SOC:" label-align="right" align="center">
{{ check_row.endSoc == null ? '--' : check_row.endSoc / 100 }}
{{ check_row.endSoc == null ? '--' : check_row.endSoc }}
</el-descriptions-item>
</el-descriptions>
<br />
@ -82,28 +92,51 @@
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { OutChargeOrderApi, OutChargeOrderVO } from '@/api/biz/outchargeorder'
const { t } = useI18n() //
const message = useMessage() //
const drawer = ref(false)
const check_row = ref<any>()
const user_tableData = ref([])
const emit = defineEmits(['success'])
const open = async (row: any, stationinfoList: any) => {
// console.log(row, 'row')
// console.log(row, 'row')
drawer.value = true
check_row.value = row
user_tableData.value = row.payOrder
stationinfoList.value = stationinfoList
stationinfoList_all.value = stationinfoList
}
const stationinfoList = ref([])
const stationinfoList_all = 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
for (var i = 0; i < stationinfoList_all.value.length; i++) {
if (data == stationinfoList_all.value[i].stationNo) {
str = stationinfoList_all.value[i].stationName
}
}
return str
}
const handle_changes = async (row: any, type: number) => {
try {
//
await message.confirm('是否确认此操作?', '提示')
//
let data = {
orderId: row.id,
payStatus: type
}
await OutChargeOrderApi.changeoutstatusOrder(data)
message.success(t('common.success'))
emit('success')
//
} catch {}
}
defineExpose({ open }) // open
</script>
@ -117,6 +150,9 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
.title_info {
font-size: 16px;
font-weight: 600;
display: flex;
align-items: center;
justify-content: space-between;
}
:deep(.el-drawer__title) {
font-size: 20px;

@ -27,7 +27,7 @@
/>
</el-select>
</el-form-item>
<el-form-item label="充电流水号" prop="chargeSeriaNumber">
<!-- <el-form-item label="充电流水号" prop="chargeSeriaNumber">
<el-input
v-model="queryParams.chargeSeriaNumber"
placeholder="请输入充电流水号"
@ -35,7 +35,7 @@
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
</el-form-item> -->
<el-form-item label="充电订单号" prop="chargeOrder">
<el-input
v-model="queryParams.chargeOrder"
@ -71,7 +71,7 @@
>
<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" >
<el-table-column label="换电站名称" align="center" prop="stationNo">
<template #default="scope">
{{ handle_stationNo(scope.row.stationNo) }}
</template>
@ -99,135 +99,36 @@
<!-- <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" />
<el-table-column label="充电时长" align="center" prop="chargingTime" />
<el-table-column label="充电时长(min)" align="center" prop="chargingTime" />
<!-- <el-table-column label="车架号" align="center" prop="vin" /> -->
<el-table-column label="状态" align="center" prop="status">
<el-table-column label="订单状态" align="center" prop="orderStatus">
<template #default="scope">
<dict-tag :type="DICT_TYPE.OUTCHARGSTATUS" :value="scope.row.stationType" />
<dict-tag :type="DICT_TYPE.ORDERSTATUS" :value="scope.row.orderStatus" />
</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" />
<el-table-column label="实际支付金额" align="center" prop="actualPay" />
<!-- <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">
<el-table-column label="实际支付金额(元)" align="center" prop="actualPay">
<template #default="scope">
<dict-tag :type="DICT_TYPE.OUTREPORTINGMODE" :value="scope.row.stationType" />
{{ scope.row.actualPay / 100 }}
</template>
</el-table-column>
<el-table-column label="是否有效" align="center" prop="orderStatus">
<!-- <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> -->
<!-- <el-table-column label="充电机唯一编码" align="center" prop="epm" width="150" /> -->
<el-table-column label="是否补单" align="center" prop="replenishmentFlag">
<!-- <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> -->
<!-- <el-table-column
label="创建时间"
align="center"
@ -238,13 +139,15 @@
<!-- <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">
<el-table-column label="操作" align="center" width="250" 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>
<el-button link type="primary" @click="handle_Offline(scope.row)"> 线 </el-button>
</template>
</el-table-column>
</el-table>
@ -256,9 +159,23 @@
@pagination="getList"
/>
</ContentWrap>
<drawer ref="drawerRef" />
<drawer ref="drawerRef" @success="getList" />
<!-- 表单弹窗添加/修改 -->
<OutChargeOrderForm ref="formRef" @success="getList" :stationinfoList="stationinfoList" />
<el-dialog v-model="dialogFormVisible" title="填写结算金额" width="500">
<el-form :model="actualPay_form">
<el-form-item label="金额(元)" label-width="100">
<el-input v-model="actualPay_form.actualPay" autocomplete="off" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogFormVisible = false">取消</el-button>
<el-button type="primary" @click="submit_actualPay"> </el-button>
</div>
</template>
</el-dialog>
</template>
<script setup lang="ts">
@ -340,6 +257,8 @@ const queryParams = reactive({
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
const actualPay_form = ref({ actualPay: '' })
const dialogFormVisible = ref(false) // /
/** 查询列表 */
const getList = async () => {
@ -353,6 +272,32 @@ const getList = async () => {
}
}
const check_actualpay_id = ref()
const handle_Offline = async (scope) => {
actualPay_form.value.actualPay = scope.actualPay / 100
check_actualpay_id.value = scope.id
dialogFormVisible.value = true
// let params = {
// orderId: scope.id,
// actualPay: scope.actualPay
// }
// const data = await OutChargeOrderApi.postpayOffline(params)
// console.log(data, 'data')
}
const submit_actualPay = async () => {
let params = {
orderId: check_actualpay_id.value,
actualPay: actualPay_form.value.actualPay * 100
}
try {
const data = await OutChargeOrderApi.postpayOffline(params)
console.log(data, 'data')
message.success('支付成功')
dialogFormVisible.value = false
} finally {
}
}
const drawerRef = ref()
const open_drawer = (row: any) => {
drawerRef.value.open(row, stationinfoList.value)

@ -11,7 +11,14 @@
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="换电站编码" prop="stationNo">
<el-input v-model="formData.stationNo" placeholder="请输入换电站编码" /> </el-form-item
<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="swapOrder">
@ -52,321 +59,7 @@
<el-input v-model="formData.endSoc" placeholder="请输入结束SOC" /> </el-form-item
></el-col>
</el-row>
<el-row type="flex" justify="space-around">
<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-row>
<el-row type="flex" justify="space-around">
<el-col :span="11"
><el-form-item label="充电电量" prop="consumption">
<el-input v-model="formData.consumption" placeholder="请输入充电电量" /> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="充电时长" prop="chargeTime">
<el-date-picker
v-model="formData.chargeTime"
type="date"
value-format="x"
placeholder="选择充电时长"
style="width: 100%"
/> </el-form-item
></el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="充电次数" prop="chargeQuantity">
<el-input
v-model="formData.chargeQuantity"
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-row>
<el-row type="flex" justify="space-around">
<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-row>
<el-row type="flex" justify="space-around">
<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-row>
<el-row type="flex" justify="space-around">
<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-row>
<el-row type="flex" justify="space-around">
<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-row>
<el-row type="flex" justify="space-around">
<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-row>
<el-row type="flex" justify="space-around">
<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-row>
<el-row type="flex" justify="space-around">
<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-row>
<el-row type="flex" justify="space-around">
<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-row>
<el-row type="flex" justify="space-around">
<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="请输入尖时段电费(交流)"
/>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="峰时段电费(交流)" prop="peakExpenseAcMeter">
<el-input v-model="formData.peakExpenseAcMeter" placeholder="请输入峰时段电费(交流)" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="平时段电费(交流)" prop="flatExpenseAcMeter">
<el-input v-model="formData.flatExpenseAcMeter" placeholder="请输入平时段电费(交流)" />
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="谷时段电费(交流)" prop="theValleyExpenseAcMeter">
<el-input
v-model="formData.theValleyExpenseAcMeter"
placeholder="请输入谷时段电费(交流)"
/>
</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-row>
<el-row type="flex" justify="space-around">
<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-row>
<el-row type="flex" justify="space-around">
<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="reportingMode">
<el-select
v-model="formData.reportingMode"
placeholder="请选择上报方式"
style="width: 100%"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.REPORTMETHOD)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="车架号" prop="vin">
<el-input v-model="formData.vin" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="是否有效" prop="status">
<el-radio-group v-model="formData.status" style="width: 100%">
<el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.APPACCESS_STATUS)"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="充电机唯一编码" prop="epm">
<el-input v-model="formData.epm" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="充电机仓位号" prop="bin">
<el-input v-model="formData.bin" placeholder="请输入" />
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="是否补单" prop="replenishmentFlag">
<el-radio-group v-model="formData.replenishmentFlag" style="width: 100%">
<el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.APPACCESS_STATUS)"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="充电流水号" prop="chargeSerialNumber">
<el-input v-model="formData.chargeSerialNumber" placeholder="请输入充电流水号" />
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-around">
<!-- <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="downBatteryNo">
<el-input v-model="formData.downBatteryNo" placeholder="请输入" /> </el-form-item
@ -389,7 +82,12 @@ defineOptions({ name: 'ChargeOrderForm' })
const { t } = useI18n() //
const message = useMessage() //
const props = defineProps({
stationinfoList: {
type: Array,
default: () => []
}
})
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
@ -445,9 +143,13 @@ const formData = ref({
downBatteryNo: undefined
})
const formRules = reactive({
stationNo: [{ required: true, message: '换电站编码不能为空', trigger: 'blur' }],
stationNo: [{ required: true, message: '不能为空', trigger: 'change' }],
downBatteryNo: [{ required: true, message: '不能为空', trigger: 'blur' }],
swapOrder: [{ required: true, message: '换电订单号不能为空', trigger: 'blur' }],
swapOrder: [{ 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' }]
})
const formRef = ref() // Ref

@ -8,6 +8,16 @@
:inline="true"
label-width="100px"
>
<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="chargeOrder">
<el-input
v-model="queryParams.chargeOrder"
@ -50,9 +60,15 @@
backgroundColor: '#eff4fa'
}"
>
<el-table-column label="充电订单号" align="center" prop="chargeOrder" width="150" />
<el-table-column label="换电订单号" align="center" prop="swapOrder" width="150" />
<el-table-column label="电池编码" align="center" prop="downBatteryNo" width="150" />
<el-table-column label="序号" align="center" type="index" width="80" />
<el-table-column label="换电站名称" align="center" prop="stationNo">
<template #default="scope">
{{ handle_stationNo(scope.row.stationNo) }}
</template>
</el-table-column>
<el-table-column label="充电订单号" align="center" prop="chargeOrder" />
<el-table-column label="换电订单号" align="center" prop="swapOrder" />
<el-table-column label="电池编码" align="center" prop="downBatteryNo" />
<el-table-column
label="开始时间"
align="center"
@ -67,133 +83,10 @@
:formatter="dateFormatter"
width="150px"
/>
<el-table-column label="开始SOC" align="center" prop="startSoc" width="150" />
<el-table-column label="结束SOC" align="center" prop="endSoc" width="150" />
<el-table-column label="开始SOE" align="center" prop="startSoe" width="150" />
<el-table-column label="结束SOE" align="center" prop="endSoe" />
<el-table-column label="充电电量" align="center" prop="consumption" />
<el-table-column label="充电时长" align="center" prop="chargeTime" />
<el-table-column label="充电次数" align="center" prop="chargeQuantity" />
<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="downBatteryNo"
width="150"
/> -->
<el-table-column label="上报方式" align="center" prop="reportingMode" width="150">
<template #default="scope">
<dict-tag :type="DICT_TYPE.REPORTMETHOD" :value="scope.row.reportingMode" />
</template>
</el-table-column>
<el-table-column label="车架号" align="center" prop="vin" />
<el-table-column label="是否有效" align="center" prop="status">
<template #default="scope">
<dict-tag :type="DICT_TYPE.APPACCESS_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="充电机唯一编码" align="center" prop="epm" width="150" />
<el-table-column label="充电机仓位号" align="center" prop="bin" width="150" />
<el-table-column label="是否补单" align="center" prop="replenishmentFlag">
<template #default="scope">
<dict-tag :type="DICT_TYPE.APPACCESS_STATUS" :value="scope.row.replenishmentFlag" />
</template>
</el-table-column>
<el-table-column label="开始SOC" align="center" prop="startSoc" />
<el-table-column label="结束SOC" align="center" prop="endSoc" />
<el-table-column label="亏电包编码" align="center" prop="downBatteryNo" />
<el-table-column label="操作" align="center" fixed="right" width="200">
<template #default="scope">
<el-button link type="primary" @click="openForm('update', scope.row.id)">
@ -213,7 +106,7 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<ChargeOrderForm ref="formRef" @success="getList" />
<ChargeOrderForm ref="formRef" @success="getList" :stationinfoList="stationinfoList" />
</template>
<script setup lang="ts">
@ -222,6 +115,7 @@ import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { ChargeOrderApi, ChargeOrderVO } from '@/api/biz/chargingorder'
import ChargeOrderForm from './ChargeOrderForm.vue'
import { StationInfoApi, StationInfoVO } from '@/api/share/stationinfo'
/** 充电订单 列表 */
defineOptions({ name: 'ChargeOrder' })
@ -299,6 +193,27 @@ const getList = async () => {
}
}
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 handleQuery = () => {
queryParams.pageNo = 1
@ -348,6 +263,7 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
getStationList()
})
</script>
@/api/biz/chargingorder

Loading…
Cancel
Save