9.3 初步修改bug提交

master
zz 3 months ago
parent 2109bbb085
commit 46d7417637

@ -147,7 +147,7 @@ export const SwapOrderApi = {
// 导出换电订单 Excel
exportSwapOrder: async (params) => {
return await request.get({ url: `/cloud/swapOrder/exportExcel`, params })
return await request.download({ url: `/cloud/swapOrder/exportExcel`, params })
},
// 支付

@ -109,13 +109,13 @@ export const StationInfoApi = {
},
// 查询电价模型
getBillingModelList: async () => {
return await request.get({ url: `/cloud/billing-model/list` })
getBillingModelList: async (params: any) => {
return await request.get({ url: `/cloud/billing-model/list`,params })
},
// 查询换电计费模型
getElectricityPriceList: async () => {
return await request.get({ url: `/cloud/electricity-price/list` })
getElectricityPriceList: async (params) => {
return await request.get({ url: `/cloud/electricity-price/list`,params })
},
// 查询场站模型

@ -1,74 +1,74 @@
import request from '@/config/axios'
// 充电机数据上报 VO
export interface ChargeGunVO {
// id
id: number
// 换电站编码
stationNo: string
// 电接头连接状态 0未知1已经连接2未连接
connectionState: number
// 枪号
gunNo: number
// 枪的工作状态 00H待机01H工作02H工作完成03H充电暂停
chargeState: number
// 枪名
gunName: number
// 告警状态 00H无告警01H有告警
alarmStatus: number
// 故障码
troubleCode: number
// 充电开始时间
startTime: Date
// 已经充电时间 单位分钟
chargeTime: number
// 充电开始SOC
startSoc: number
// 当前SOC
currentSoc: number
// 充电开始SOE
startSoe: number
// 当前SOE
currentSoe: number
// 当前充电电压
currentVoltage: number
// 当前充电电流
currentElectricCurrent: number
// BMS需求电压
bmsVoltage: number
// BMS需求电流
bmsElectricCurrent: number
}
// 充电机数据上报 API
export const ChargeGunApi = {
// 查询充电机数据上报分页
getChargeGunPage: async (params: any) => {
return await request.get({ url: `/cloud/charge-gun/page`, params })
},
// 查询充电机数据上报详情
getChargeGun: async (id: number) => {
return await request.get({ url: `/cloud/charge-gun/get?id=` + id })
},
// 新增充电机数据上报
createChargeGun: async (data: ChargeGunVO) => {
return await request.post({ url: `/cloud/charge-gun/create`, data })
},
// 修改充电机数据上报
updateChargeGun: async (data: ChargeGunVO) => {
return await request.put({ url: `/cloud/charge-gun/update`, data })
},
// 删除充电机数据上报
deleteChargeGun: async (id: number) => {
return await request.delete({ url: `/cloud/charge-gun/delete?id=` + id })
},
// 导出充电机数据上报 Excel
exportChargeGun: async (params) => {
return await request.download({ url: `/cloud/charge-gun/export-excel`, params })
},
}
import request from '@/config/axios'
// 充电机数据上报 VO
export interface ChargeGunVO {
// id
id: number
// 换电站编码
stationNo: string
// 电接头连接状态 0未知1已经连接2未连接
connectionState: number
// 枪号
gunNo: number
// 枪的工作状态 00H待机01H工作02H工作完成03H充电暂停
chargeState: number
// 枪名
gunName: number
// 告警状态 00H无告警01H有告警
alarmStatus: number
// 故障码
troubleCode: number
// 充电开始时间
startTime: Date
// 已经充电时间 单位分钟
chargeTime: number
// 充电开始SOC
startSoc: number
// 当前SOC
currentSoc: number
// 充电开始SOE
startSoe: number
// 当前SOE
currentSoe: number
// 当前充电电压
currentVoltage: number
// 当前充电电流
currentElectricCurrent: number
// BMS需求电压
bmsVoltage: number
// BMS需求电流
bmsElectricCurrent: number
}
// 充电机数据上报 API
export const ChargeGunApi = {
// 查询充电机数据上报分页
getChargeGunPage: async (params: any) => {
return await request.get({ url: `/cloud/chargeGun/page`, params })
},
// 查询充电机数据上报详情
getChargeGun: async (id: number) => {
return await request.get({ url: `/cloud/chargeGun/get?id=` + id })
},
// 新增充电机数据上报
createChargeGun: async (data: ChargeGunVO) => {
return await request.post({ url: `/cloud/chargeGun/create`, data })
},
// 修改充电机数据上报
updateChargeGun: async (data: ChargeGunVO) => {
return await request.put({ url: `/cloud/chargeGun/update`, data })
},
// 删除充电机数据上报
deleteChargeGun: async (id: number) => {
return await request.delete({ url: `/cloud/chargeGun/delete?id=` + id })
},
// 导出充电机数据上报 Excel
exportChargeGun: async (params) => {
return await request.download({ url: `/cloud/chargeGun/export-excel`, params })
},
}

@ -1,50 +1,50 @@
import request from '@/config/axios'
// 充值套餐 VO
export interface WalletRechargePackageVO {
// 编号
id: number
// 套餐名
name: string
// 支付金额
payPrice: number
// 赠送金额
bonusPrice: number
// 状态
status: number
// 换电站编码
stationNo: string
}
// 充值套餐 API
export const WalletRechargePackageApi = {
// 查询充值套餐分页
getWalletRechargePackagePage: async (params: any) => {
return await request.get({ url: `/pay/wallet-recharge-package/page`, params })
},
// 查询充值套餐详情
getWalletRechargePackage: async (id: number) => {
return await request.get({ url: `/pay/wallet-recharge-package/get?id=` + id })
},
// 新增充值套餐
createWalletRechargePackage: async (data: WalletRechargePackageVO) => {
return await request.post({ url: `/pay/wallet-recharge-package/create`, data })
},
// 修改充值套餐
updateWalletRechargePackage: async (data: WalletRechargePackageVO) => {
return await request.put({ url: `/pay/wallet-recharge-package/update`, data })
},
// 删除充值套餐
deleteWalletRechargePackage: async (id: number) => {
return await request.delete({ url: `/pay/wallet-recharge-package/delete?id=` + id })
},
// 导出充值套餐 Excel
exportWalletRechargePackage: async (params) => {
return await request.download({ url: `/pay/wallet-recharge-package/export-excel`, params })
},
}
import request from '@/config/axios'
// 充值套餐 VO
export interface WalletRechargePackageVO {
// 编号
id: number
// 套餐名
name: string
// 支付金额
payPrice: number
// 赠送金额
bonusPrice: number
// 状态
status: number
// 换电站编码
stationNo: string
}
// 充值套餐 API
export const WalletRechargePackageApi = {
// 查询充值套餐分页
getWalletRechargePackagePage: async (params: any) => {
return await request.get({ url: `/pay/wallet-recharge-package/page`, params })
},
// 查询充值套餐详情
getWalletRechargePackage: async (id: number) => {
return await request.get({ url: `/pay/wallet-recharge-package/get?id=` + id })
},
// 新增充值套餐
createWalletRechargePackage: async (data: WalletRechargePackageVO) => {
return await request.post({ url: `/pay/wallet-recharge-package/create`, data })
},
// 修改充值套餐
updateWalletRechargePackage: async (data: WalletRechargePackageVO) => {
return await request.put({ url: `/pay/wallet-recharge-package/update`, data })
},
// 删除充值套餐
deleteWalletRechargePackage: async (id: number) => {
return await request.delete({ url: `/pay/wallet-recharge-package/delete?id=` + id })
},
// 导出充值套餐 Excel
exportWalletRechargePackage: async (params) => {
return await request.download({ url: `/pay/wallet-recharge-package/export-excel`, params })
},
}

@ -43,6 +43,6 @@ export const operatorInformationApi = {
// 导出运营商基础信息 Excel
exportoperatorInformation: async (params) => {
return await request.get({ url: `/cloud/operator/export-excel`, params })
return await request.download({ url: `/cloud/operator/export-excel`, params })
},
}

@ -0,0 +1,80 @@
import request from '@/config/axios'
// 退款订单 VO
export interface RefundOrderVO {
// 主键
id: number
// 换电站编码
stationNo: string
// 售后单号
no: string
// 退款状态1申请中2完成3取消
status: number
// 售后方式10仅退款20退货退款
way: number
// 用户id
userId: number
// 申请原因
applyReason: string
// 补充描述
applyDescription: string
// 补充凭证图片
applyPicUrls: string
// 订单流水号
orderNo: string
// 审批时间
auditTime: Date
// 审批人
auditUserId: number
// 审批备注
auditReason: string
// 退款金额,单位:分。
refundPrice: number
// 支付退款编号
payRefundId: number
// 退款时间
refundTime: Date
// 交易订单id
orderId: number
nickName:string
}
// 退款订单 API
export const RefundOrderApi = {
// 审核状态
checkRefundOrder: async data => {
return await request.post({ url: `/cloud/refund-order/audit`, data })
},
// 查询退款订单分页
getRefundOrderPage: async (params: any) => {
return await request.get({ url: `/cloud/refund-order/page`, params })
},
// 查询退款订单详情
getRefundOrder: async (id: number) => {
return await request.get({ url: `/cloud/refund-order/get?id=` + id })
},
// 新增退款订单
createRefundOrder: async (data: RefundOrderVO) => {
return await request.post({ url: `/cloud/refund-order/create`, data })
},
// 修改退款订单
updateRefundOrder: async (data: RefundOrderVO) => {
return await request.put({ url: `/cloud/refund-order/update`, data })
},
// 删除退款订单
deleteRefundOrder: async (id: number) => {
return await request.delete({ url: `/cloud/refund-order/delete?id=` + id })
},
// 导出退款订单 Excel
exportRefundOrder: async (params) => {
return await request.download({ url: `/cloud/refund-order/export-excel`, params })
},
}

@ -69,5 +69,5 @@ export const deleteMemberTag = async (id: number) => {
// 导出 zz
export const exportPost = async (params) => {
return await request.get({ url: '/cloud/teamVehicle/export', params })
return await request.download({ url: '/cloud/teamVehicle/export', params })
}

@ -75,5 +75,5 @@ export const deleteMemberTag = async (id: number) => {
// }
// 导出岗位
export const exportPost = async (params) => {
return await request.get({ url: '/cloud/personalVehicle/export', params })
return await request.download({ url: '/cloud/personalVehicle/export', params })
}

@ -131,6 +131,12 @@ CHARGER_TYPE = 'charger_type',
CHARGER_TYPE_OUT = 'charger_type_out',
GUNSTATUS = 'gunstatus',
REFUND_STATUS = 'refund_status',
REFUND_STATUS_two = 'refund_status_two',
AFTER_SALE_MODE = 'after_sale_mode',
REFUND_TYPE = 'refund_type',
ELECTRICITYSOURCE_OUT = 'electricitySourceOut',
ELECTERICITYPRICEMODEL = 'electricityPriceModel',
TOP_UP_STATUS = 'top_up_status',
PEAK_PLATEAU_STATE = 'peak_plateau_state',
USER_TYPE = 'user_type',

@ -36,9 +36,16 @@ const menuList = [
name: '设备管理',
icon: 'fluent-mdl2:product',
bgColor: 'bg-orange-400',
routerName: 'ProductSpu'
routerName: 'chargerManagement'
// routerName: 'ProductSpu'
},
{ name: '车队管理', icon: 'ep:list', bgColor: 'bg-yellow-500', routerName: 'chargerManagement' },
{
name: '车队管理',
icon: 'ep:list',
bgColor: 'bg-yellow-500',
routerName: 'fleetManagement'
// routerName: 'chargerManagement'
},
{
name: '司机管理',
icon: 'ri:refund-2-line',

@ -1,26 +1,26 @@
<template>
<el-drawer title="基本信息" v-model="dialogVisible" size="70%">
<el-descriptions :column="3" border>
<el-descriptions-item label="充电机编号" label-class-name="my-label"
<!-- <el-descriptions-item label="充电机编号" label-class-name="my-label"
class-name="my-content"
width="150px">
{{ formData.chargeCode || "--" }}
</el-descriptions-item>
</el-descriptions-item> -->
<el-descriptions-item label="充电机唯一编码" label-class-name="my-label"
class-name="my-content"
width="150px">
{{ formData.epm || "--" }}
</el-descriptions-item>
<el-descriptions-item label="充电架ID" label-class-name="my-label"
<!-- <el-descriptions-item label="充电架ID" label-class-name="my-label"
class-name="my-content"
width="150px">
{{ formData.chargingRackId || "--" }}
</el-descriptions-item>
</el-descriptions-item> -->
<el-descriptions-item label="换电站编码" l>
{{ formData.stationNo || "--" }}
</el-descriptions-item>
<el-descriptions-item label="充电机工作状态" >
<!-- <el-descriptions-item label="充电机工作状态" >
<dict-tag
:type="DICT_TYPE.WORKING_STATUS_CHARGER"
:value="formData.chargeState"
@ -28,7 +28,7 @@
/>
<span v-else> -- </span>
</el-descriptions-item>
</el-descriptions-item> -->
<el-descriptions-item label="故障状态" >
<dict-tag
:type="DICT_TYPE.STATE_FAILURE"
@ -38,7 +38,7 @@
<span v-else> -- </span>
</el-descriptions-item>
<el-descriptions-item label="电接头连接状态" >
<!-- <el-descriptions-item label="电接头连接状态" >
<dict-tag
:type="DICT_TYPE.STATE_ELECTRICALCO_NNECTOR"
:value="formData.connectionState"
@ -62,100 +62,11 @@
<el-descriptions-item label="当前SOC" >
{{ formData.currentSoc || "--" }}
</el-descriptions-item>
<!-- --------- -->
<!-- <el-descriptions-item label="充电机最大允许输出功率" label-class-name="my-label"
class-name="my-content"
width="150px">
{{ formData.maximumPower || "--" }}
</el-descriptions-item>
<el-descriptions-item label="充电机最大允许充电速率" >
{{ formData.maximumChargeRate || "--" }}
</el-descriptions-item>
<el-descriptions-item label="充电机序号" >
{{ formData.chargeNo || "--" }}
</el-descriptions-item>
<el-descriptions-item label="告警状态" >
<dict-tag
:type="DICT_TYPE.STATE_ALARM"
:value="formData.alarmStatus"
v-if="formData.alarmStatus != null"
/>
<span v-else> -- </span>
</el-descriptions-item>
<el-descriptions-item label="故障码" >
{{ formData.troubleCode || "--" }}
</el-descriptions-item>
<el-descriptions-item label="充电开始时间" >
{{ formData.startTime || "--" }}
</el-descriptions-item>
<el-descriptions-item label="已经充电时间(分钟)" >
{{ formData.chargeTime || "--" }}
</el-descriptions-item>
<el-descriptions-item label="充电开始SOC" >
{{ formData.startSoc || "--" }}
</el-descriptions-item>
<el-descriptions-item label="充电开始SOE" >
{{ formData.startSoe || "--" }}
</el-descriptions-item>
<el-descriptions-item label="当前SOE" >
{{ formData.currentSoe || "--" }}
</el-descriptions-item>
<el-descriptions-item label="当前充电电压" >
{{ formData.currentVoltage || "--" }}
</el-descriptions-item>
<el-descriptions-item label="当前充电电流" >
{{ formData.currentElectricCurrent || "--" }}
</el-descriptions-item>
<el-descriptions-item label="BMS需求电压" >
{{ formData.bmsVoltage || "--" }}
</el-descriptions-item>
<el-descriptions-item label="BMS需求电流" >
{{ formData.bmsElectricCurrent || "--" }}
</el-descriptions-item>
<el-descriptions-item label="最低单体电压" >
{{ formData.lowVoltage || "--" }}
</el-descriptions-item>
<el-descriptions-item label="最高单体电压" >
{{ formData.highVoltage || "--" }}
</el-descriptions-item>
<el-descriptions-item label="最低单体温度" >
{{ formData.lowTemperature || "--" }}
</el-descriptions-item>
<el-descriptions-item label="最高单体温度" >
{{ formData.highTemperature || "--" }}
</el-descriptions-item>
<el-descriptions-item label="水冷状态" >
<dict-tag
:type="DICT_TYPE.WATER_COOLED_STATE"
:value="formData.waterCooledStatus"
v-if="formData.waterCooledStatus != null"
/>
<span v-else> -- </span>
</el-descriptions-item>
<el-descriptions-item label="进水口温度" >
{{ formData.intakeTemperature || "--" }}
</el-descriptions-item>
<el-descriptions-item label="出水口温度" >
{{ formData.outletTemperature || "--" }}
</el-descriptions-item>
<el-descriptions-item label="充电机仓位号" >
{{ formData.bin || "--" }}
</el-descriptions-item> -->
-->
</el-descriptions>
<div class="title_info" style="margin-top: 20px">枪列表</div>
<br />
<GunList :stationNo="stationNos" ref="guninfo" />
<GunList :stationNo="stationNo" ref="guninfo" :chargeId="chargeId"/>
<template #footer>
<!-- <el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button> -->
<el-button @click="dialogVisible = false"> </el-button>
@ -166,6 +77,7 @@
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import GunList from './gunlist/index.vue'
import { ChargeUploadApi, ChargeUploadVO } from '@/api/system/equipmentManagement/chargerManagement'
import { number } from 'vue-types';
/** 充电机数据上报 表单 */
defineOptions({ name: 'ChargeUploadForm' })
@ -216,26 +128,26 @@
chargeCode: [{ required: true, message: '充电机编号不能为空', trigger: 'blur' }],
})
const formRef = ref() // Ref
const guninfo = ref(null)
const stationNos = ref()
const stationNo = ref()
const chargeId=ref()
/** 打开弹窗 */
const open = async ( data) => {
stationNos = data.stationNo
const open = async (item:any) => {
// const open = async (row) => {
dialogVisible.value = true
setTimeout(() => {
// console.log(TeamVehicle.value, 'TeamVehicle')
guninfo.value.handleQuery()
}, 1000)
// resetForm()
// //
// if (id) {
// formLoading.value = true
// try {
// formData.value = await ChargeUploadApi.getChargeUpload(id)
// } finally {
// formLoading.value = false
// }
// }
stationNo.value=item?.stationNo
chargeId.value=item?.id
resetForm()
//
if (item?.id) {
formLoading.value = true
try {
formData.value = await ChargeUploadApi.getChargeUpload(item?.id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open

@ -2,74 +2,148 @@
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:model="formData.formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
label-position="top"
>
<el-form-item label="换电站编码" prop="stationNo">
<el-input v-model="formData.stationNo" placeholder="请输入换电站编码" />
</el-form-item>
<el-form-item label="电接头连接状态 0未知1已经连接2未连接" prop="connectionState">
<el-input v-model="formData.connectionState" placeholder="请输入电接头连接状态 0未知1已经连接2未连接" />
</el-form-item>
<el-form-item label="枪号" prop="gunNo">
<el-input v-model="formData.gunNo" placeholder="请输入枪号" />
</el-form-item>
<el-form-item label="枪的工作状态 00H待机01H工作02H工作完成03H充电暂停" prop="chargeState">
<el-input v-model="formData.chargeState" placeholder="请输入枪的工作状态 00H待机01H工作02H工作完成03H充电暂停" />
</el-form-item>
<el-form-item label="枪名" prop="gunName">
<el-input v-model="formData.gunName" placeholder="请输入枪名" />
</el-form-item>
<el-form-item label="告警状态 00H无告警01H有告警" prop="alarmStatus">
<el-radio-group v-model="formData.alarmStatus">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="故障码" prop="troubleCode">
<el-input v-model="formData.troubleCode" placeholder="请输入故障码" />
</el-form-item>
<el-form-item label="充电开始时间" prop="startTime">
<el-date-picker
v-model="formData.startTime"
type="date"
value-format="x"
placeholder="选择充电开始时间"
/>
</el-form-item>
<el-form-item label="已经充电时间 单位分钟" prop="chargeTime">
<el-date-picker
v-model="formData.chargeTime"
type="date"
value-format="x"
placeholder="选择已经充电时间 单位分钟"
/>
</el-form-item>
<el-form-item label="充电开始SOC" prop="startSoc">
<el-input v-model="formData.startSoc" placeholder="请输入充电开始SOC" />
</el-form-item>
<el-form-item label="当前SOC" prop="currentSoc">
<el-input v-model="formData.currentSoc" placeholder="请输入当前SOC" />
</el-form-item>
<el-form-item label="充电开始SOE" prop="startSoe">
<el-input v-model="formData.startSoe" placeholder="请输入充电开始SOE" />
</el-form-item>
<el-form-item label="当前SOE" prop="currentSoe">
<el-input v-model="formData.currentSoe" placeholder="请输入当前SOE" />
</el-form-item>
<el-form-item label="当前充电电压" prop="currentVoltage">
<el-input v-model="formData.currentVoltage" placeholder="请输入当前充电电压" />
</el-form-item>
<el-form-item label="当前充电电流" prop="currentElectricCurrent">
<el-input v-model="formData.currentElectricCurrent" placeholder="请输入当前充电电流" />
</el-form-item>
<el-form-item label="BMS需求电压" prop="bmsVoltage">
<el-input v-model="formData.bmsVoltage" placeholder="请输入BMS需求电压" />
</el-form-item>
<el-form-item label="BMS需求电流" prop="bmsElectricCurrent">
<el-input v-model="formData.bmsElectricCurrent" placeholder="请输入BMS需求电流" />
</el-form-item>
<el-row :gutter="24">
<!-- <el-col :span="12">
<el-form-item label="换电站编码" prop="stationNo">
<el-input v-model="formData.formData.stationNo" placeholder="请输入换电站编码" />
</el-form-item>
</el-col> -->
<!-- <el-col :span="12">
<el-form-item label="电接头连接状态" prop="connectionState">
<el-select
v-model="formData.formData.connectionState"
placeholder="请选电接头连接状态"
clearable
style="width: 100%"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.STATE_ELECTRICALCO_NNECTOR)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="枪号" prop="gunNo">
<el-input v-model="formData.formData.gunNo" placeholder="请输入枪号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="枪的工作状态" prop="chargeState">
<el-select
v-model="formData.formData.chargeState"
placeholder="请选枪的工作状态"
clearable
style="width: 100%"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.GUNSTATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="枪名" prop="gunName">
<el-input v-model="formData.formData.gunName" placeholder="请输入枪名" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="告警状态" prop="alarmStatus">
<el-select
v-model="formData.formData.alarmStatus"
placeholder="请选告警状态"
clearable
style="width: 100%"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.STATE_ALARM)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col> -->
<!-- <el-col :span="12">
<el-form-item label="故障码" prop="troubleCode">
<el-input v-model="formData.formData.troubleCode" placeholder="请输入故障码" />
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="充电开始时间" prop="startTime">
<el-date-picker
v-model="formData.formData.startTime"
type="date"
value-format="x"
placeholder="选择充电开始时间"
style="width: 100%;"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="已经充电时间(分钟)" prop="chargeTime">
<el-input v-model="formData.formData.chargeTime" placeholder="请输入已经充电时间" />
<!-- <el-date-picker
v-model="formData.formData.chargeTime"
type="date"
value-format="x"
placeholder="选择已经充电时间 单位分钟"
style="width: 100%;"
/> -->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="充电开始SOC" prop="startSoc">
<el-input v-model="formData.formData.startSoc" placeholder="请输入充电开始SOC" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="当前SOC" prop="currentSoc">
<el-input v-model="formData.formData.currentSoc" placeholder="请输入当前SOC" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="充电开始SOE" prop="startSoe">
<el-input v-model="formData.formData.startSoe" placeholder="请输入充电开始SOE" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="当前SOE" prop="currentSoe">
<el-input v-model="formData.formData.currentSoe" placeholder="请输入当前SOE" />
</el-form-item>
</el-col> -->
<el-col :span="12">
<el-form-item label="当前充电电压" prop="currentVoltage">
<el-input v-model="formData.formData.currentVoltage" placeholder="请输入当前充电电压" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="当前充电电流" prop="currentElectricCurrent">
<el-input v-model="formData.formData.currentElectricCurrent" placeholder="请输入当前充电电流" />
</el-form-item>
</el-col>
<!-- <el-col :span="12">
<el-form-item label="BMS需求电压" prop="bmsVoltage">
<el-input v-model="formData.formData.bmsVoltage" placeholder="请输入BMS需求电压" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="BMS需求电流" prop="bmsElectricCurrent">
<el-input v-model="formData.formData.bmsElectricCurrent" placeholder="请输入BMS需求电流" />
</el-form-item>
</el-col> -->
</el-row>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
@ -79,10 +153,17 @@
</template>
<script setup lang="ts">
import { ChargeGunApi, ChargeGunVO } from '@/api/system/equipmentManagement/energyMeter/gunlist'
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
/** 充电机数据上报 表单 */
defineOptions({ name: 'ChargeGunForm' })
// const props = defineProps({
// stationNo: {
// type:String,
// default:''
// },
// })
const { t } = useI18n() //
const message = useMessage() //
@ -90,9 +171,11 @@ const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
id: undefined,
const formData = reactive({
formData:{
id: undefined,
stationNo: undefined,
// stationNo: props.stationNo,
connectionState: undefined,
gunNo: undefined,
chargeState: undefined,
@ -109,23 +192,28 @@ const formData = ref({
currentElectricCurrent: undefined,
bmsVoltage: undefined,
bmsElectricCurrent: undefined,
})
chargeId:'',
}})
const formRules = reactive({
stationNo: [{ required: true, message: '换电站编码不能为空', trigger: 'blur' }],
gunNo: [{ required: true, message: '枪号不能为空', trigger: 'blur' }],
gunName: [{ required: true, message: '枪名不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
const open = async (type: string, id?: number,stationNo:string,chargeId:string) => {
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
// formData.formData.stationNo=stationNo
formData.formData.chargeId=chargeId
resetForm()
//
if (id) {
formLoading.value = true
try {
formData.value = await ChargeGunApi.getChargeGun(id)
formData.formData = await ChargeGunApi.getChargeGun(id)
} finally {
formLoading.value = false
}
@ -141,8 +229,11 @@ const submitForm = async () => {
//
formLoading.value = true
try {
const data = formData.value as unknown as ChargeGunApi.ChargeGunVO
const data = formData.formData as unknown as ChargeGunApi.ChargeGunVO
// data.stationNo= props.stationNo
if (formType.value === 'create') {
await ChargeGunApi.createChargeGun(data)
message.success(t('common.createSuccess'))
} else {
@ -150,6 +241,8 @@ const submitForm = async () => {
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
resetForm()
//
emit('success')
} finally {
@ -159,26 +252,32 @@ const submitForm = async () => {
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
stationNo: undefined,
connectionState: undefined,
gunNo: undefined,
chargeState: undefined,
gunName: undefined,
alarmStatus: undefined,
troubleCode: undefined,
startTime: undefined,
chargeTime: undefined,
startSoc: undefined,
currentSoc: undefined,
startSoe: undefined,
currentSoe: undefined,
currentVoltage: undefined,
currentElectricCurrent: undefined,
bmsVoltage: undefined,
bmsElectricCurrent: undefined,
}
// formData.formData= {
// id: undefined,
// stationNo: undefined,
// connectionState: undefined,
// gunNo: undefined,
// chargeState: undefined,
// gunName: undefined,
// alarmStatus: undefined,
// troubleCode: undefined,
// startTime: undefined,
// chargeTime: undefined,
// startSoc: undefined,
// currentSoc: undefined,
// startSoe: undefined,
// currentSoe: undefined,
// currentVoltage: undefined,
// currentElectricCurrent: undefined,
// bmsVoltage: undefined,
// bmsElectricCurrent: undefined
// }
formRef.value?.resetFields()
}
// watch(()=>props.stationNo,(newValue)=>{
// },{
// deep:true,
// immediate:true
// })
</script>

@ -6,9 +6,9 @@
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
label-width="100px"
>
<el-form-item label="换电站编码" prop="stationNo">
<!-- <el-form-item label="换电站编码" prop="stationNo">
<el-input
v-model="queryParams.stationNo"
placeholder="请输入换电站编码"
@ -16,7 +16,7 @@
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
</el-form-item> -->
<el-form-item label="枪号" prop="gunNo">
<el-input
@ -77,14 +77,17 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="id" align="center" prop="id" />
<el-table-column label="换电站编码" align="center" prop="stationNo" />
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true" :header-cell-style="{
backgroundColor: '#eff4fa'
}">
<el-table-column label="序号" type="index" align="center" width="80" />
<!-- <el-table-column label="id" align="center" prop="id" /> -->
<!-- <el-table-column label="换电站编码" align="center" prop="stationNo" />
<el-table-column label="电接头连接状态" align="center" prop="connectionState" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.STATE_ELECTRICALCO_NNECTOR" :value="scope.row.connectionState" />
</template>
</el-table-column>
</el-table-column> -->
<el-table-column label="枪号" align="center" prop="gunNo" />
<el-table-column label="枪的工作状态" align="center" prop="chargeState" >
<template #default="scope">
@ -92,12 +95,12 @@
</template>
</el-table-column>
<el-table-column label="枪名" align="center" prop="gunName" />
<el-table-column label="告警状态" align="center" prop="alarmStatus" >
<!-- <el-table-column label="告警状态" align="center" prop="alarmStatus" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.STATE_ALARM" :value="scope.row.alarmStatus" />
</template>
</el-table-column>
<el-table-column label="故障码" align="center" prop="troubleCode" />
</el-table-column> -->
<!-- <el-table-column label="故障码" align="center" prop="troubleCode" /> -->
<el-table-column
label="充电开始时间"
align="center"
@ -108,14 +111,14 @@
<el-table-column label="已经充电时间 单位分钟" align="center" prop="chargeTime" />
<el-table-column label="充电开始SOC" align="center" prop="startSoc" />
<el-table-column label="当前SOC" align="center" prop="currentSoc" />
<el-table-column label="充电开始SOE" align="center" prop="startSoe" />
<el-table-column label="当前SOE" align="center" prop="currentSoe" />
<!-- <el-table-column label="充电开始SOE" align="center" prop="startSoe" /> -->
<!-- <el-table-column label="当前SOE" align="center" prop="currentSoe" /> -->
<el-table-column label="当前充电电压" align="center" prop="currentVoltage" />
<el-table-column label="当前充电电流" align="center" prop="currentElectricCurrent" />
<el-table-column label="BMS需求电压" align="center" prop="bmsVoltage" />
<el-table-column label="BMS需求电流" align="center" prop="bmsElectricCurrent" />
<!-- <el-table-column label="BMS需求电压" align="center" prop="bmsVoltage" /> -->
<!-- <el-table-column label="BMS需求电流" align="center" prop="bmsElectricCurrent" /> -->
<el-table-column label="操作" align="center">
<el-table-column label="操作" align="center" fixed="right" width="140">
<template #default="scope">
<el-button
link
@ -159,11 +162,14 @@ import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
defineOptions({ name: 'ChargeGun' })
const props = defineProps({
stationNos: {
type: Array,
stationNo: {
type:String,
default:''
},
chargeId: {
type:String,
default:''
},
})
const message = useMessage() //
const { t } = useI18n() //
@ -175,8 +181,7 @@ const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
stationNo: props.stationNos,
stationNo:undefined,
connectionState: undefined,
gunNo: undefined,
chargeState: undefined,
@ -202,7 +207,7 @@ const exportLoading = ref(false) // 导出的加载中
const getList = async () => {
loading.value = true
try {
queryParams.stationNo = props.stationNos
queryParams.stationNo = props.stationNo
const data = await ChargeGunApi.getChargeGunPage(queryParams)
list.value = data.list
total.value = data.total
@ -226,7 +231,8 @@ const resetQuery = () => {
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
formRef.value.open(type, id)
console.log('props.stationNo',props)
formRef.value.open(type, id,props.stationNo,props.chargeId)
}
/** 删除按钮操作 */
@ -257,8 +263,14 @@ const handleExport = async () => {
}
}
/** 初始化 **/
onMounted(() => {
// /** **/
// onMounted(() => {
// getList()
// })
watch(()=>props.stationNo,(newValue)=>{
getList()
},{
deep:true,
immediate:true
})
</script>

@ -44,20 +44,6 @@
</el-select>
</el-form-item>
<!-- <el-form-item label="充电机类型" prop="types" >
<el-select
v-model="queryParams.type"
placeholder="请选择水冷状态"
multiple clearable
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.CHARGER_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> -->
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
@ -65,15 +51,7 @@
<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"
v-hasPermi="['biz:charge-upload:export']"
>
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button> -->
</el-form-item>
</el-form>
</ContentWrap>
@ -110,7 +88,7 @@
编辑
</el-button>
<el-button link type="danger" @click="handleDelete(scope.row.id)"> </el-button>
<!-- <el-button link type="primary" @click="openDetail(scope.row.id)"> </el-button> -->
<el-button link type="primary" @click="openDetail(scope.row)"> </el-button>
</template>
</el-table-column>
</el-table>
@ -272,8 +250,11 @@ const handleExport = async () => {
}
}
//
const openDetail = (id?: number) => {
detailRef.value.open(id)
const openDetail = (item:any) => {
detailRef.value.open(item)
}
/** 初始化 **/
onMounted(() => {

@ -30,11 +30,12 @@
<!-- <Editor v-model="formData.mtnContent" height="150px" /> -->
</el-form-item>
</el-col>
<el-col :span="12">
<!-- <el-col :span="12">
<el-form-item label="保养照片地址" prop="mtnPicPath">
<el-input v-model="formData.mtnPicPath" placeholder="请输入保养照片地址" />
<UploadImgs v-model:modelValue="formData.mtnPicPath" />
</el-form-item>
</el-col>
</el-col> -->
<el-col :span="12">
<el-form-item label="是否普通保养" prop="mtnIsNormal">
<el-select
@ -166,7 +167,13 @@
/>
</el-select>
</el-form-item>
</el-col>
</el-col>
<el-col :span="12">
<el-form-item label="保养照片地址" prop="mtnPicPath">
<UploadImgs v-model:modelValue="formData.mtnPicPath" />
<!-- <el-input v-model="formData.mtnPicPath" placeholder="请输入保养照片地址" /> -->
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>

@ -76,15 +76,13 @@
<el-table-column label="设备编号" align="center" prop="eqmCode" />
<el-table-column label="设备名称" align="center" prop="eqmName" />
<el-table-column label="保养内容" align="center" prop="mtnContent" />
<el-table-column label="保养照片地址" align="center" prop="mtnPicPath" width="120"/>
<!-- <template #default="scope">
<el-table-column label="保养照片地址" align="center" prop="mtnPicPath" width="120">
<template #default="scope">
<div style="display: flex; align-items: center; justify-content: center">
<el-image :src="scope.row.mtnPicPath" style="width: 160px; height: 90px" />
</div>
</template>
<el-image :src="check_row.idFront" style="width: 160px; height: 90px" />
-->
</el-table-column>
<el-table-column label="是否普通保养" align="center" prop="mtnIsNormal" width="110">
<template #default="scope">
<dict-tag :type="DICT_TYPE.APPACCESS_STATUS" :value="scope.row.mtnIsNormal" />

@ -17,18 +17,22 @@
class="!w-240px"
/>
</el-form-item>
<!-- <el-form-item label="计费模型" prop="type">
<el-select v-model="queryParams.type" clearable placeholder="请选择计费模型">
<el-form-item label="计费模型" prop="modeType">
<el-select
v-model="queryParams.modeType"
placeholder="请选择站类型"
clearable
class="!w-240px"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.BILLING_MODEL)"
v-for="dict in getIntDictOptions(DICT_TYPE.ELECTERICITYPRICEMODEL)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item> -->
</el-form-item>
<el-form-item>
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
@ -69,22 +73,13 @@
</el-dropdown>
</template>
</el-table-column>
<!-- <el-table-column label="计费模型" align="center" prop="type" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.BILLING_MODEL" :value="scope.row.type" />
<el-table-column label="计费模型" align="center" prop="modeType" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.ELECTERICITYPRICEMODEL" :value="scope.row.modeType" />
</template>
</el-table-column>
<el-table-column label="时段数" align="center" prop="periodsAmount" />
<el-table-column label="备注信息" align="center" prop="remark" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="运营商id" align="center" prop="operatorId" /> -->
</el-table-column>
<!-- <el-table-column label="运营商id" align="center" prop="operatorId" /> -->
<el-table-column label="操作" align="center">
<template #default="scope">
<el-button link type="primary" @click="openForm('update', scope.row.id)">

@ -39,6 +39,7 @@
<el-table-column label="序号" type="index" align="center" width="80" />
<!-- <el-table-column label="计费模型 ID" align="center" prop="id" /> -->
<el-table-column label="计费模型名称" align="center" prop="name" />
<el-table-column label="站点" align="center">
<template #default="scope">
<el-dropdown placement="bottom-start">
@ -56,6 +57,7 @@
</template>
</el-dropdown> </template>
</el-table-column>
<!-- <el-table-column label="尖电价" align="center" prop="theTipPrice" />
<el-table-column label="峰电价" align="center" prop="peakPrice" />
<el-table-column label="平电价" align="center" prop="flatPrice" />
@ -95,6 +97,7 @@
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import {

@ -191,7 +191,7 @@ const handleExport = async () => {
//
exportLoading.value = true
const data = await operatorInformationApi.exportoperatorInformation(queryParams)
download.excel(data, '电池基础信息.xls')
download.excel(data, '运营商信息.xls')
} catch {
} finally {
exportLoading.value = false

@ -0,0 +1,221 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-row :gutter="24">
<el-col :span="12">
<el-form-item label="换电订单号" prop="swapOrderNo ">
<el-input v-model="formData.swapOrderNo " placeholder="请输入换电订单号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="换电站编码" prop="stationNo">
<el-input v-model="formData.stationNo" placeholder="请输入换电站编码" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="售后单号" prop="no">
<el-input v-model="formData.no" placeholder="请输入售后单号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="退款状态1申请中2完成3取消" prop="status">
<el-radio-group v-model="formData.status">
<el-radio label="1">请选择字典生成</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="售后方式10仅退款20退货退款" prop="way">
<el-input v-model="formData.way" placeholder="请输入售后方式10仅退款20退货退款" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="用户id" prop="userId">
<el-input v-model="formData.userId" placeholder="请输入用户id" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="申请原因" prop="applyReason">
<!-- type="textarea" -->
<el-input v-model="formData.applyReason" placeholder="请输入申请原因" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="补充描述" prop="applyDescription">
<Editor v-model="formData.applyDescription" height="150px" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="补充凭证图片" prop="applyPicUrls">
<el-input v-model="formData.applyPicUrls" placeholder="请输入补充凭证图片" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="订单流水号" prop="orderNo">
<el-input v-model="formData.orderNo" placeholder="请输入订单流水号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审批时间" prop="auditTime">
<el-date-picker
v-model="formData.auditTime"
type="date"
value-format="x"
placeholder="选择审批时间"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审批人" prop="auditUserId">
<el-input v-model="formData.auditUserId" placeholder="请输入审批人" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="审批备注" prop="auditReason">
<el-input v-model="formData.auditReason" placeholder="请输入审批备注" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="退款金额,单位:分。" prop="refundPrice">
<el-input v-model="formData.refundPrice" placeholder="请输入退款金额,单位:分。" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="支付退款编号" prop="payRefundId">
<el-input v-model="formData.payRefundId" placeholder="请输入支付退款编号" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="退款时间" prop="refundTime">
<el-date-picker
v-model="formData.refundTime"
type="date"
value-format="x"
placeholder="选择退款时间"
/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="交易订单id" prop="orderId">
<el-input v-model="formData.orderId" placeholder="请输入交易订单id" />
</el-form-item>
</el-col>
</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 { RefundOrderApi, RefundOrderVO } from '@/api/system/orderManagement/refundOrder'
/** 退款订单 表单 */
defineOptions({ name: 'RefundOrderForm' })
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,
no: undefined,
status: undefined,
way: undefined,
userId: undefined,
applyReason: undefined,
applyDescription: undefined,
applyPicUrls: undefined,
orderNo: undefined,
auditTime: undefined,
auditUserId: undefined,
auditReason: undefined,
refundPrice: undefined,
payRefundId: undefined,
refundTime: undefined,
orderId: undefined,
swapOrderNo:undefined,
})
const formRules = reactive({
stationNo: [{ 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 RefundOrderApi.getRefundOrder(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 RefundOrderApi.RefundOrderVO
if (formType.value === 'create') {
await RefundOrderApi.createRefundOrder(data)
message.success(t('common.createSuccess'))
} else {
await RefundOrderApi.updateRefundOrder(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
stationNo: undefined,
no: undefined,
status: undefined,
way: undefined,
userId: undefined,
applyReason: undefined,
applyDescription: undefined,
applyPicUrls: undefined,
orderNo: undefined,
auditTime: undefined,
auditUserId: undefined,
auditReason: undefined,
refundPrice: undefined,
payRefundId: undefined,
refundTime: undefined,
orderId: undefined,
}
formRef.value?.resetFields()
}
</script>

@ -0,0 +1,94 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
>
<el-form-item label="退款状态" prop="status">
<el-radio-group v-model="formData.status">
<el-radio
v-for="dict in getIntDictOptions(DICT_TYPE.REFUND_STATUS_two )"
:key="dict.value"
:label="dict.value"
>
{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="审核备注" prop="applyReason">
<el-input v-model="formData.applyReason" placeholder="请输入审核备注" type="textarea" />
</el-form-item>
</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 { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { RefundOrderApi, RefundOrderVO } from '@/api/system/orderManagement/refundOrder'
/** 退款订单 表单 */
defineOptions({ name: 'RefundOrderForm' })
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 = reactive({
id: undefined,
applyReason: '',
status:undefined,
})
const formRules = reactive({
// stationNo: [{ required: true, message: '', trigger: 'blur' }],
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (id?: number) => {
formData.id = id
dialogVisible.value = true
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
try {
const data = await RefundOrderApi.checkRefundOrder(formData)
if(data){
dialogVisible.value = false
message.success('成功')
}else{
message.error('失败')
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
watch(()=>dialogVisible.value,(newValue)=>{
if(!newValue){
formData.applyReason=''
}
},{
deep:true
})
</script>

@ -0,0 +1,305 @@
<template>
<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="no">
<el-input
v-model="queryParams.no"
placeholder="请输入售后单号"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="退款状态" prop="status">
<el-select v-model="queryParams.status" placeholder="请选择">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.REFUND_STATUS)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="订单类型" prop="type">
<el-select v-model="queryParams.status" placeholder="请选择">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.REFUND_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="支付退款编号" prop="payRefundId">
<el-input
v-model="queryParams.payRefundId"
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 type="index" label="序号" align="center" width="80px" />
<!-- <el-table-column label="换电站编码" align="center" prop="stationNo" /> -->
<el-table-column label="售后单号" align="center" prop="no" width="240"/>
<!-- <el-table-column label="退款状态" align="center" prop="status" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.REFUND_STATUS" :value="scope.row.status" />
</template>
</el-table-column> -->
<!-- <el-table-column label="售后方式" align="center" prop="way" >
<template #default="scope">
<dict-tag :type="DICT_TYPE.AFTER_SALE_MODE" :value="scope.row.way" />
</template>
</el-table-column> -->
<el-table-column label="订单类型" align="center" prop="type">
<template #default="scope">
<dict-tag :type="DICT_TYPE.REFUND_TYPE" :value="scope.row.type" />
</template>
</el-table-column>
<el-table-column label="订单流水号" align="center" prop="orderNo" width="240"/>
<el-table-column label="用户名称" align="center" prop="nickName" />
<el-table-column label="审核备注" align="center" prop="applyReason" />
<!-- <el-table-column label="用户id" align="center" prop="userId" /> -->
<el-table-column label="审批人" align="center" prop="auditUserId" />
<el-table-column
label="审批时间"
align="center"
prop="auditTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="退款金额(分)" align="center" prop="refundPrice" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<!-- ===== -->
<!--
<el-table-column label="补充描述" align="center" prop="applyDescription" />
<el-table-column label="补充凭证图片" align="center" prop="applyPicUrls" >
<template #default="scope">
<div style="display: flex; align-items: center; justify-content: center">
<el-image :src="scope.row.applyPicUrls" style="width: 160px; height: 90px" />
</div>
</template>
</el-table-column>
<el-table-column label="审批备注" align="center" prop="auditReason" />
<el-table-column label="支付退款编号" align="center" prop="payRefundId" />
<el-table-column
label="退款时间"
align="center"
prop="refundTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="交易订单id" align="center" prop="orderId" /> -->
<el-table-column label="操作" align="center">
<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="danger"
@click="handleCheck(scope.row.id)"
v-if="scope.row.status == 1"
>
审核
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<RefundOrderForm ref="formRef" @success="getList" />
<!-- 审核 -->
<checkRefundOrder ref="checkformRef" @success="getList" />
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { RefundOrderApi, RefundOrderVO } from '@/api/system/orderManagement/refundOrder'
import RefundOrderForm from './RefundOrderForm.vue'
import checkRefundOrder from './checkRefundOrder.vue'
/** 退款订单 列表 */
defineOptions({ name: 'RefundOrder' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<RefundOrderVO[]>([]) //
//
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
stationNo: undefined,
no: undefined,
status: undefined,
way: undefined,
userId: undefined,
applyReason: undefined,
applyDescription: undefined,
applyPicUrls: undefined,
orderNo: undefined,
auditTime: [],
auditUserId: undefined,
auditReason: undefined,
refundPrice: undefined,
payRefundId: undefined,
refundTime: [],
createTime: [],
orderId: undefined,
nickName:undefined,
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await RefundOrderApi.getRefundOrderPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
getList()
}
/** 重置按钮操作 */
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 RefundOrderApi.deleteRefundOrder(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await RefundOrderApi.exportRefundOrder(queryParams)
download.excel(data, '退款订单.xls')
} catch {
} finally {
exportLoading.value = false
}
}
const checkformRef = ref()
const handleCheck = (id?: number) => {
checkformRef.value.open(id)
}
/** 初始化 **/
onMounted(() => {
getList()
})
</script>

@ -8,21 +8,23 @@
v-loading="formLoading"
label-position="top"
>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-row gutter="24">
<el-col :span="12">
<el-form-item label="换电站编码" prop="stationNo">
<el-input v-model="formData.stationNo" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-col :span="12">
<el-form-item label="换电站名称" prop="stationName">
<el-input v-model="formData.stationName" placeholder="请输入" />
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11"
<!-- <el-col :span="12">
<el-form-item label="换电站识别码" prop="stationName">
<el-input v-model="formData.stationSn" placeholder="请输入" />
</el-form-item>
</el-col> -->
<el-col :span="12"
><el-form-item label="站类型" prop="stationType">
<el-select v-model="formData.stationType" placeholder="请选择" style="width: 100%">
<el-option
@ -33,8 +35,8 @@
/>
</el-select> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="计费模型" prop="sbmId">
<el-col :span="12">
<el-form-item label="换电计费模型" prop="sbmId">
<el-select v-model="formData.sbmId" placeholder="请选择" style="width: 100%">
<el-option
:label="item.name"
@ -44,10 +46,28 @@
/>
</el-select> </el-form-item
></el-col>
</el-row>
<el-col :span="12">
<el-form-item label="站外充电计费模型" prop="chargeModeId">
<el-select v-model="formData.chargeModeId" placeholder="请选择" style="width: 100%">
<el-option
:label="item.name"
:value="item.id"
v-for="(item, index) in chargeModeIdList"
:key="index"
/>
</el-select>
<!-- <el-select v-model="formData.chargeModeId" placeholder="请选择" style="width: 100%">
<el-option
:label="item.name"
:value="item.id"
v-for="(item, index) in sbmIdlist"
:key="index"
/>
</el-select>--> </el-form-item
></el-col>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-col :span="12">
<el-form-item label="电价模型" prop="priceId">
<el-select v-model="formData.priceId" placeholder="请选择" style="width: 100%">
<el-option
@ -58,7 +78,7 @@
/>
</el-select> </el-form-item
></el-col>
<el-col :span="11">
<el-col :span="12">
<el-form-item label="场站运营模型" prop="runId">
<el-select v-model="formData.runId" placeholder="请选择" style="width: 100%">
<el-option
@ -70,22 +90,18 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-col :span="12">
<el-form-item label="经度" prop="longitude">
<el-input v-model="formData.longitude" placeholder="请输入" /> </el-form-item
></el-col>
<el-col :span="11">
<el-col :span="12">
<el-form-item label="纬度" prop="latitude">
<el-input v-model="formData.latitude" placeholder="请输入" /> </el-form-item
></el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-col :span="12">
<el-form-item label="营运时间" prop="operationTime">
<el-date-picker
v-model="formData.operationTime"
@ -95,7 +111,7 @@
style="width: 100%"
/> </el-form-item
></el-col>
<el-col :span="11"
<el-col :span="12"
><el-form-item label="投放时间" prop="launchTime">
<el-date-picker
v-model="formData.launchTime"
@ -105,31 +121,28 @@
style="width: 100%"
/> </el-form-item
></el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-col :span="12">
<el-form-item label="手机号" prop="contactWay">
<el-input v-model="formData.contactWay" placeholder="请输入" /> </el-form-item
></el-col>
<el-col :span="11">
<el-col :span="12">
<el-form-item label="负责人" prop="principal">
<el-input v-model="formData.principal" placeholder="请输入" />
</el-form-item>
</el-col>
<!-- <el-col :span="11">
<!-- <el-col :span="12">
<el-form-item label="服务电话" prop="serviceTel">
<el-input v-model="formData.serviceTel" placeholder="请输入" />
</el-form-item>
</el-col> -->
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-col :span="12">
<el-form-item label="区域名称" prop="areaName">
<el-input v-model="formData.areaName" placeholder="请输入" /> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="计费电量" prop="electricitySource">
<el-col :span="12">
<el-form-item label="换电计费电量" prop="electricitySource">
<el-select
v-model="formData.electricitySource"
placeholder="请选择"
@ -144,11 +157,25 @@
</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="electricityPriceSource">
<el-col :span="12">
<el-form-item label="站外充电计费电量" prop="chargeElectricitySource">
<el-select
v-model="formData.chargeElectricitySource"
placeholder="请选择"
style="width: 100%"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.ELECTRICITYSOURCE_OUT)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="换电电价电量" prop="electricityPriceSource">
<el-select
v-model="formData.electricityPriceSource"
placeholder="请选择"
@ -163,7 +190,23 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-col :span="12">
<el-form-item label="站外充电电价电量" prop="chargeElectricityPriceSource">
<el-select
v-model="formData.chargeElectricityPriceSource"
placeholder="请选择"
style="width: 100%"
>
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.ELECTRICITYSOURCE_OUT)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="soc类型" prop="socSource">
<el-select v-model="formData.socSource" placeholder="请选择" style="width: 100%">
<el-option
@ -175,9 +218,7 @@
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="20">
<el-form-item label="换电站现场照片" prop="avatar">
<UploadImgs v-model:modelValue="formData.avatar" />
@ -203,15 +244,12 @@
import { StationInfoApi, StationInfoVO } from '@/api/share/stationinfo'
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { copyValueToTarget } from '@/utils'
import { ref } from 'vue';
import AMapLoader from '@amap/amap-jsapi-loader'
/** 换电站基础信息 表单 */
defineOptions({ name: 'StationInfoForm' })
const props = defineProps({
sbmIdlist: {
type: Array,
default: () => []
},
priceIdList: {
type: Array,
default: () => []
@ -221,7 +259,7 @@ const props = defineProps({
default: () => []
}
})
const sbmIdlist=ref([])
const { t } = useI18n() //
const message = useMessage() //
@ -278,7 +316,10 @@ const formData = ref({
enable: undefined,
electricitySource: undefined,
electricityPriceSource: undefined,
socSource: undefined
socSource: undefined,
chargeElectricitySource:undefined,
chargeElectricityPriceSource:undefined,
chargeModeId:undefined,
})
const formRules = reactive({
stationNo: [{ required: true, message: '换电站编码不能为空', trigger: 'blur' }],
@ -293,9 +334,15 @@ const formRules = reactive({
areaCode: [{ required: true, message: '区域编号不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
const chargeModeIdList=ref()
/** 打开弹窗 */
const open = async (type: string, id?: number) => {
// const data= getIntDictOptions(DICT_TYPE.SITECLASSIFICATION_TYPE)
// console.log('data',data[0]?.value)
const data1 = await StationInfoApi.getBillingModelList({modeType:1})
const data2 = await StationInfoApi.getBillingModelList({modeType:2})
sbmIdlist.value=data1
chargeModeIdList.value=data2
dialogVisible.value = true
dialogTitle.value = t('action.' + type)
formType.value = type
@ -304,9 +351,10 @@ const open = async (type: string, id?: number) => {
if (id) {
formLoading.value = true
try {
formData.value = await StationInfoApi.getStationInfo(id)
const res= await StationInfoApi.getStationInfo(id)
formData.value =res
center_map_data.value = [
parseInt(formData.value.longitude),
parseInt(formData.value.longitude),
parseInt(formData.value.latitude)
]
// center_map_data.value = [120.177664, 30.350422]
@ -358,14 +406,13 @@ const submitForm = async () => {
await formRef.value.validate()
//
formLoading.value = true
console.log(formData.value)
// if (formData.value.avatar !== undefined) {
// if (formData.avatar !== undefined) {
// let array_avatar = []
// for (var i = 0; i < formData.value.avatar.length; i++) {
// array_avatar[i] = formData.value.avatar[i].url
// for (var i = 0; i < formData.avatar.length; i++) {
// array_avatar[i] = formData.avatar[i].url
// }
// formData.value.avatar = array_avatar
// formData.avatar = array_avatar
// }
try {
@ -438,4 +485,19 @@ const resetForm = () => {
}
formRef.value?.resetFields()
}
// watch(()=>stationType.value,async(newValue)=>{
// console.log(newValue, 'newValue')
// try {
// if(newValue){
// const data = await StationInfoApi.getBillingModelList({modeType:newValue})
// console.log(data, 'data')
// sbmIdlist.value = data
// }
// } finally {
// }
// },{
// deep:true,
// immediate:true
// })
</script>

@ -68,26 +68,26 @@
>
<el-table-column label="序号" type="index" align="center" width="80" />
<!-- <el-table-column label="运营商id" align="center" prop="operatorId" /> -->
<el-table-column label="换电站编码" align="center" prop="stationNo" />
<el-table-column label="换电站名称" align="center" prop="stationName" />
<el-table-column label="换电站编码" align="center" prop="stationNo" width="120"/>
<el-table-column label="换电站名称" align="center" prop="stationName" width="110"/>
<!-- <el-table-column label="换电站识别号" align="center" prop="stationSn" width="120" /> -->
<!-- <el-table-column label="地理位置" align="center" prop="stationLocation" /> -->
<el-table-column label="站类型" align="center" prop="stationType">
<el-table-column label="站类型" align="center" prop="stationType" width="110">
<template #default="scope">
<dict-tag :type="DICT_TYPE.SITECLASSIFICATION_TYPE" :value="scope.row.stationType" />
</template>
</el-table-column>
<el-table-column label="计费模型" align="center">
<el-table-column label="换电计费模型" align="center" width="110">
<template #default="scope">
{{ handle_sbmId(scope.row.sbmId) }}
</template>
</el-table-column>
<el-table-column label="电价模型" align="center">
<el-table-column label="换电电价模型" align="center" width="160">
<template #default="scope">
{{ handle_priceId(scope.row.priceId) }}
</template>
</el-table-column>
<el-table-column label="场站运营模型" align="center">
<el-table-column label="场站运营模型" align="center" width="130">
<template #default="scope">
{{ handle_runId(scope.row.runId) }}
</template>
@ -95,23 +95,23 @@
<!-- <el-table-column label="换电站现场照片" align="center" prop="avatar" width="150" /> -->
<!-- <el-table-column label="纬度" align="center" prop="latitude" width="120" /> -->
<!-- <el-table-column label="经度" align="center" prop="longitude" width="120" /> -->
<el-table-column label="区域名称" align="center" prop="areaName" />
<el-table-column label="区域名称" align="center" prop="areaName" width="110"/>
<!-- <el-table-column label="区域编号" align="center" prop="areaCode" width="120" /> -->
<el-table-column
label="营运时间"
align="center"
prop="operationTime"
:formatter="dateFormatter"
width="150px"
width="180px"
/>
<el-table-column
label="投放时间"
align="center"
prop="launchTime"
:formatter="dateFormatter"
width="150px"
width="180px"
/>
<el-table-column label="手机号" align="center" prop="contactWay" />
<el-table-column label="手机号" align="center" prop="contactWay" width="120" />
<!-- <el-table-column label="服务电话" align="center" prop="serviceTel" /> -->
<!-- <el-table-column label="邮箱地址" align="center" prop="email" width="120" /> -->
<el-table-column label="负责人" align="center" prop="principal" />
@ -280,6 +280,7 @@ const queryParams = reactive({
constructionSite: undefined,
batteryId: undefined,
enable: undefined,
chargeModeId:undefined,
createTime: []
})
const queryFormRef = ref() //
@ -406,7 +407,7 @@ const handleExport = async () => {
/** 初始化 **/
onMounted(() => {
getList()
getBillingModelList()
// getBillingModelList()
getElectricityPriceList()
getRunModelList()
})

@ -64,9 +64,9 @@
<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" @click="openForm('create')">
<el-button type="primary" @click="openForm('create')">
<Icon icon="ep:plus" class="mr-5px" /> 新增
</el-button> -->
</el-button>
<el-button type="success" plain @click="handleExport" :loading="exportLoading">
<Icon icon="ep:download" class="mr-5px" /> 导出
</el-button>

Loading…
Cancel
Save