8.16 代码更新首页

master
shilei 3 months ago
parent ffe90be3aa
commit e35c8698ba

@ -1,132 +1,135 @@
import request from '@/config/axios'
// 充电订单 VO
export interface ChargeOrderVO {
// id
id: number
// 换电站编码
stationNo: string
// 充电订单号
chargeOrder: string
// 换电订单号
swapOrder: string
// 电池序列号
batteryId: string
// 开始时间
startTime: Date
// 结束时间
endTime: Date
// 开始SOC
startSoc: number
// 结束SOC
endSoc: number
// 开始SOE
startSoe: number
// 结束SOE
endSoe: number
// 充电电量
consumption: number
// 充电时长
chargeTime: number
// 充电次数
chargeQuantity: number
// 尖时段电量(直流)
theTipElectric: number
// 尖时段单价(直流)
theTipPrice: number
// 尖时段电费(直流)
theTipExpense: number
// 峰时段电量(直流)
peakElectric: number
// 峰时段单价(直流)
peakPrice: number
// 峰时段电费(直流)
peakExpense: number
// 平时段电量(直流)
flatElectric: number
// 平时段单价(直流)
flatPrice: number
// 平时段电费(直流)
flatExpense: number
// 谷时段电量(直流)
theValleyElectric: number
// 谷时段单价(直流)
theValleyPrice: number
// 谷时段电费(直流)
theValleyExpense: number
// 修正充电量(直流)
amendElectric: number
// 修正电费(直流)
amendExpense: number
// 尖时段电量(交流)
theTipElectricAcMeter: number
// 峰时段电量(交流)
peakElectricAcMeter: number
// 平时段电量(交流)
flatElectricAcMeter: number
// 谷时段电量(交流)
theValleyElectricAcMeter: number
// 尖时段电费(交流)
theTipExpenseAcMeter: number
// 峰时段电费(交流)
peakExpenseAcMeter: number
// 平时段电费(交流)
flatExpenseAcMeter: number
// 谷时段电费(交流)
theValleyExpenseAcMeter: number
// 修正充电量(交流)
amendElectricAcMeter: number
// 修正电费(交流)
amendExpenseAcMeter: number
// 充电前交流表电量
beforeChargingElectric: number
// 充电后交流表电量
afterChargingElectric: number
// 上报方式:1:自动2人工手动
reportingMode: number
// 车架号: 车辆/电池包 VIN
vin: string
// 是否有效:0无效1有效
status: number
// 充电机唯一编码
epm: string
// 充电机仓位号
bin: number
// 是否补单:0否;1:是
replenishmentFlag: number
// 充电流水号
chargeSerialNumber: string
}
// 充电订单 API
export const ChargeOrderApi = {
// 查询充电订单分页
getChargeOrderPage: async (params: any) => {
return await request.get({ url: `/biz/charge-order/page`, params })
},
// 查询充电订单详情
getChargeOrder: async (id: number) => {
return await request.get({ url: `/biz/charge-order/get?id=` + id })
},
// 新增充电订单
createChargeOrder: async (data: ChargeOrderVO) => {
return await request.post({ url: `/biz/charge-order/create`, data })
},
// 修改充电订单
updateChargeOrder: async (data: ChargeOrderVO) => {
return await request.put({ url: `/biz/charge-order/update`, data })
},
// 删除充电订单
deleteChargeOrder: async (id: number) => {
return await request.delete({ url: `/biz/charge-order/delete?id=` + id })
},
// 导出充电订单 Excel
exportChargeOrder: async (params) => {
return await request.download({ url: `/biz/charge-order/export-excel`, params })
},
}
import request from '@/config/axios'
// 充电订单 VO
export interface ChargeOrderVO {
// id
id: number
// 换电站编码
stationNo: string
// 充电订单号
chargeOrder: string
// 换电订单号
swapOrder: string
// 电池序列号
batteryId: string
// 开始时间
startTime: Date
// 结束时间
endTime: Date
// 开始SOC
startSoc: number
// 结束SOC
endSoc: number
// 开始SOE
startSoe: number
// 结束SOE
endSoe: number
// 充电电量
consumption: number
// 充电时长
chargeTime: number
// 充电次数
chargeQuantity: number
// 尖时段电量(直流)
theTipElectric: number
// 尖时段单价(直流)
theTipPrice: number
// 尖时段电费(直流)
theTipExpense: number
// 峰时段电量(直流)
peakElectric: number
// 峰时段单价(直流)
peakPrice: number
// 峰时段电费(直流)
peakExpense: number
// 平时段电量(直流)
flatElectric: number
// 平时段单价(直流)
flatPrice: number
// 平时段电费(直流)
flatExpense: number
// 谷时段电量(直流)
theValleyElectric: number
// 谷时段单价(直流)
theValleyPrice: number
// 谷时段电费(直流)
theValleyExpense: number
// 修正充电量(直流)
amendElectric: number
// 修正电费(直流)
amendExpense: number
// 尖时段电量(交流)
theTipElectricAcMeter: number
// 峰时段电量(交流)
peakElectricAcMeter: number
// 平时段电量(交流)
flatElectricAcMeter: number
// 谷时段电量(交流)
theValleyElectricAcMeter: number
// 尖时段电费(交流)
theTipExpenseAcMeter: number
// 峰时段电费(交流)
peakExpenseAcMeter: number
// 平时段电费(交流)
flatExpenseAcMeter: number
// 谷时段电费(交流)
theValleyExpenseAcMeter: number
// 修正充电量(交流)
amendElectricAcMeter: number
// 修正电费(交流)
amendExpenseAcMeter: number
// 充电前交流表电量
beforeChargingElectric: number
// 充电后交流表电量
afterChargingElectric: number
// 上报方式:1:自动2人工手动
reportingMode: number
// 车架号: 车辆/电池包 VIN
vin: string
// 是否有效:0无效1有效
status: number
// 充电机唯一编码
epm: string
// 充电机仓位号
bin: number
// 是否补单:0否;1:是
replenishmentFlag: number
// 充电流水号
chargeSerialNumber: string,
// 亏电包编码
downBatteryNo: string
}
// 充电订单 API
export const ChargeOrderApi = {
// 查询充电订单分页
getChargeOrderPage: async (params: any) => {
return await request.get({ url: `/cloud/charge-order/page`, params })
},
// 查询充电订单详情
getChargeOrder: async (id: number) => {
return await request.get({ url: `/cloud/charge-order/get?id=` + id })
},
// 新增充电订单
createChargeOrder: async (data: ChargeOrderVO) => {
return await request.post({ url: `/cloud/charge-order/create`, data })
},
// 修改充电订单
updateChargeOrder: async (data: ChargeOrderVO) => {
return await request.put({ url: `/cloud/charge-order/update`, data })
},
// 删除充电订单
deleteChargeOrder: async (id: number) => {
return await request.delete({ url: `/cloud/charge-order/delete?id=` + id })
},
// 导出充电订单 Excel
exportChargeOrder: async (params) => {
return await request.download({ url: `/cloud/charge-order/export-excel`, params })
},
}

@ -0,0 +1,152 @@
import request from '@/config/axios'
// 换电订单 VO
export interface SwapOrderVO {
// id
id: number
// 换电站编码
stationNo: string
// 用户编号
userId: number
// 车牌号
vehicleNo: string
// 车辆VIN码
vehicleVin: string
// mac地址
mac: string
// 车队id
teamId: number
// 换电订单号 :场站编码+时间yyyyMMddHHmmss)+车牌号,唯一,索引
orderNo: string
// 订单状态: 1已付款,2付款失败,0未付款(充电电量模型时:未结算)
payStatus: number
// 失败原因
failReason: string
// 订单创建对象:1换电时的SOC;2:充电时的SOC
socType: number
// 充电电量计算方式:1:交流表;2:直流表;3:充电订单中的soc差值
computeType: number
// 交流电表电费
expenseAcMeter: number
// 直流电表电费
expenseDcMeter: number
// 车辆进场时间
vehicleEnterTime: Date
// 车辆离场时间
vehicleLeaveTime: Date
// 换电开始时间
swapBeginTime: Date
// 订单完成时间
orderTime: Date
// 换电结束时间
swapEndTime: Date
// 备注
remark: string
// 0成功的订单(上报成功,数据检测没有问题,但是尚未支付的订单);订单状态:1:失败的订单(各种情况失败)
status: number
// 订单创建对象:0云平台产生;1:站控创建,离线订单;3:站控创建,用来测试,不计费
creatorType: number
// 是否云平台手动扣费:1是;默认:否
manualFlag: number
// 扣费账户
account: string
// 车辆黑白名单性质 0白名单;1:黑名单; 为空表示都不是
vehicleBlackWhite: number
// 0本地模式;1:云端模式
runModel: number
// 车辆品牌
brand: string
// 优惠前金额
totalFeeBeforeDiscount: number
// 优惠金额
discountFee: number
// 实付总费用(所有的总费用)
totalFee: number
// 结算方式:1:计费模型(交流/直流/SOC); 2:计费模型(交流); 3:计费模型(直流);4:计费模型(交流) + 电网电价(直流); 5:计费模型(交流) + 电网电价(交流); 6:计费模型(直流) + 电网电价(交流); 7:计费模型(直流) + 电网电价(直流) (默认为1)
settleType: number
// 计费模型id
billingModelId: number
// 计费分时模型id
billingTimeId: number
// 换电服务总费用
serviceTotalFee: number
// 电池服务总费用费
batTotalFee: number
// 计费模型总费用
billingTotalFee: number
// 电价模型id
priceId: number
// 电网电价时分秒分时模型id
timeId: number
// 尖费用 (尖电量 * 尖电价)(直流)
theTipExpense: number
// 峰费用 (峰电量 * 峰电价)(直流)
peakExpense: number
// 平费用 (平电量 * 平电价)(直流)
flatExpense: number
// 谷费用 (谷电量 * 谷电价)(直流)
theValleyExpense: number
// 修正电费 (修正电量 * 修正电价)(直流)
amendExpense: number
// 尖时段电费(交流)
theTipExpenseAcMeter: number
// 峰时段电费(交流)
peakExpenseAcMeter: number
// 平时段电费(交流)
flatExpenseAcMeter: number
// 谷时段电费(交流)
theValleyExpenseAcMeter: number
// 修正电费(交流)
amendExpenseAcMeter: number
// 电网电价模型总费用 (尖峰平谷时段)
elecTotalExpense: number
// 是否打折:0:否1是
discountFlag: number
// 是否使用套餐:0:否1是
setMealFlag: number
// 折扣比例:0--100
discountPercent: number
// 适应范围:0全部折扣;1:计费模型折扣2电价折扣
discountScope: number
// 云平台服务总费用
cloudTotalFee: number,
batteryList: Array<any>
}
// 换电订单 API
export const SwapOrderApi = {
// 查询换电订单分页
getSwapOrderPage: async (params: any) => {
return await request.get({ url: `/cloud/swapOrder/page`, params })
},
// 查询换电订单详情
getSwapOrder: async (id: number) => {
return await request.get({ url: `/cloud/swapOrder/get?id=` + id })
},
// 新增换电订单
createSwapOrder: async (data: SwapOrderVO) => {
return await request.post({ url: `/cloud/swapOrder/create`, data })
},
// 挂起换电订单
changeStatusSwapOrder: async (data: any) => {
return await request.post({ url: `/cloud/swapOrder/changeStatus`, data })
},
// 修改换电订单
updateSwapOrder: async (data: SwapOrderVO) => {
return await request.post({ url: `/cloud/swapOrder/update`, data })
},
// 删除换电订单
deleteSwapOrder: async (id: number) => {
return await request.get({ url: `/cloud/swapOrder/delete?id=` + id })
},
// 导出换电订单 Excel
exportSwapOrder: async (params) => {
return await request.get({ url: `/cloud/swapOrder/exportExcel`, params })
},
}

@ -60,7 +60,7 @@ const remainingRouter : AppRouteRecordRaw[] = [
children: [
{
path: 'index',
component: () => import('@/views/Home/Index.vue'),
component: () => import('@/views/mall/Home/Index.vue'),
name: 'Index',//原来Index
meta: {
title: t('router.home'),

@ -47,57 +47,72 @@ export const useAppStore = defineStore('app', {
title: import.meta.env.VITE_APP_TITLE, // 标题
pageLoading: false, // 路由跳转loading
breadcrumb: true, // 面包屑
breadcrumbIcon: true, // 面包屑图标
collapse: false, // 折叠菜单
uniqueOpened: true, // 是否只保持一个子菜单的展开
hamburger: true, // 折叠图标
screenfull: true, // 全屏图标
search: true, // 搜索图标
size: true, // 尺寸图标
locale: true, // 多语言图标
message: true, // 消息图标
tagsView: true, // 标签页
tagsViewIcon: true, // 是否显示标签图标
logo: true, // logo
fixedHeader: true, // 固定toolheader
footer: true, // 显示页脚
greyMode: false, // 是否开始灰色模式,用于特殊悼念日
fixedMenu: wsCache.get('fixedMenu') || false, // 是否固定菜单
layout: wsCache.get(CACHE_KEY.LAYOUT) || 'classic', // layout布局
isDark: wsCache.get(CACHE_KEY.IS_DARK) || false, // 是否是暗黑模式
currentSize: wsCache.get('default') || 'default', // 组件尺寸
theme: wsCache.get(CACHE_KEY.THEME) || {
// 主题色
elColorPrimary: '#409eff',
// 左侧菜单边框颜色
leftMenuBorderColor: 'inherit',
// 左侧菜单背景颜色
leftMenuBgColor: '#001529',
// 左侧菜单浅色背景颜色
leftMenuBgLightColor: '#0f2438',
// 左侧菜单选中背景颜色
leftMenuBgActiveColor: 'var(--el-color-primary)',
// 左侧菜单收起选中背景颜色
leftMenuCollapseBgActiveColor: 'var(--el-color-primary)',
// 左侧菜单字体颜色
leftMenuTextColor: '#bfcbd9',
// 左侧菜单选中字体颜色
leftMenuTextActiveColor: '#fff',
// logo字体颜色
logoTitleTextColor: '#fff',
// logo边框颜色
logoBorderColor: 'inherit',
// 头部背景颜色
topHeaderBgColor: '#fff',
// 头部字体颜色
topHeaderTextColor: 'inherit',
// 头部悬停颜色
topHeaderHoverColor: '#f6f6f6',
// 头部边框颜色
topToolBorderColor: '#eee'
}
// 面包屑
breadcrumb: true,
// 面包屑图标
breadcrumbIcon: true,
// 折叠图标
hamburger: true,
// 全屏图标
screenfull: true,
// 尺寸图标
size: true,
// 多语言图标
locale: true,
// 消息图标
message: true,
// 标签页
tagsView: true,
// 标签页图标
getTagsViewIcon: true,
// logo
logo: true,
// 菜单手风琴
uniqueOpened: true,
// 固定header
fixedHeader: true,
// 页脚
footer: true,
// 灰色模式
greyMode: false,
// layout布局
layout: 'topLeft',
// 暗黑模式
isDark: false,
// 组件尺寸
currentSize: 'default',
// 主题相关
theme: {
// 主题色
elColorPrimary: '#009688',
// 左侧菜单边框颜色
leftMenuBorderColor: '#eee',
// 左侧菜单背景颜色
leftMenuBgColor: '#fff',
// 左侧菜单浅色背景颜色
leftMenuBgLightColor: '#fff',
// 左侧菜单选中背景颜色
leftMenuBgActiveColor: 'RGBA(0,150,136,0.1)',
// 左侧菜单收起选中背景颜色
leftMenuCollapseBgActiveColor: 'RGBA(0,150,136,0.1)',
// 左侧菜单字体颜色
leftMenuTextColor: '#333',
// 左侧菜单选中字体颜色
leftMenuTextActiveColor: 'var(--el-color-primary)',
// logo字体颜色
logoTitleTextColor: 'inherit',
// logo边框颜色
logoBorderColor: '#eee',
// 头部背景颜色
topHeaderBgColor: '#fff',
// 头部字体颜色
topHeaderTextColor: 'inherit',
// 头部悬停颜色
topHeaderHoverColor: '#f6f6f6',
// 头部边框颜色
topToolBorderColor: '#eee'
}
}
},
getters: {

@ -253,5 +253,7 @@ export enum DICT_TYPE {
VEHICLEPROPERTY = 'vehicleProperty',
SOCSOURCE = 'socsource',
ELECTRICITYSOURCE = 'electricitySource',
REPORTMETHOD = 'report_method'
REPORTMETHOD = 'report_method',
SWAPRESULT = 'swapResult',
PAYRESULT = 'payresult',
}

@ -184,9 +184,11 @@ const loginData = reactive({
captchaEnable: import.meta.env.VITE_APP_CAPTCHA_ENABLE,
tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE,
loginForm: {
tenantName: '芋道源码',
username: 'admin',
password: 'admin123',
tenantName: '马尔塞云平台',
// username: 'admin',
// password: 'admin123',
username: 'maersai',
password: '888888',
captchaVerification: '',
rememberMe: false
}

@ -15,7 +15,7 @@
<LoginFormTitle style="width: 100%" />
</el-form-item>
</el-col>
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<!-- <el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item v-if="loginData.tenantEnable === 'true'" prop="tenantName">
<el-input
v-model="loginData.loginForm.tenantName"
@ -25,7 +25,7 @@
type="primary"
/>
</el-form-item>
</el-col>
</el-col> -->
<el-col :span="24" style="padding-right: 10px; padding-left: 10px">
<el-form-item prop="username">
<el-input
@ -185,8 +185,10 @@ const loginData = reactive({
tenantEnable: import.meta.env.VITE_APP_TENANT_ENABLE,
loginForm: {
tenantName: '芋道源码',
username: 'admin',
password: 'admin123',
// username: 'admin',
// password: 'admin123',
username: 'maersai',
password: '888888',
captchaVerification: '',
rememberMe: false
}
@ -214,6 +216,8 @@ const getCode = async () => {
const getTenantId = async () => {
if (loginData.tenantEnable === 'true') {
const res = await LoginApi.getTenantIdByName(loginData.loginForm.tenantName)
console.log(res, 'res租户id');
authUtil.setTenantId(res)
}
}

@ -86,6 +86,6 @@ const getMemberRegisterCountList = async () => {
/** 初始化 **/
onMounted(() => {
getMemberRegisterCountList()
// getMemberRegisterCountList()
})
</script>

@ -85,8 +85,8 @@ const handleClick = (routerName: string) => {
/** 初始化 **/
onMounted(() => {
getOrderData()
getProductData()
getWalletRechargeData()
// getOrderData()
// getProductData()
// getWalletRechargeData()
})
</script>

@ -203,6 +203,6 @@ const getOrderCountTrendComparison = async (
/** 初始化 **/
onMounted(() => {
handleTimeRangeTypeChange()
// handleTimeRangeTypeChange()
})
</script>

@ -1,37 +1,46 @@
<template>
<div class="flex flex-col">
<!-- 数据对照 -->
<el-row :gutter="16" class="row">
<el-row :gutter="16" class="row" type="flex" justify="space-between">
<el-col :md="6" :sm="12" :xs="24" :loading="loading">
<ComparisonCard
tag="今日"
title="销售额"
title="营收"
prefix="¥"
::decimals="2"
:value="fenToYuan(orderComparison?.value?.orderPayPrice || 0)"
:reference="fenToYuan(orderComparison?.reference?.orderPayPrice || 0)"
/>
</el-col>
<el-col :md="6" :sm="12" :xs="24" :loading="loading">
<el-col :md="4" :sm="12" :xs="24" :loading="loading">
<ComparisonCard
tag="今日"
title="用户访问量"
title="次数"
:value="userComparison?.value?.visitUserCount || 0"
:reference="userComparison?.reference?.visitUserCount || 0"
/>
</el-col>
<el-col :md="6" :sm="12" :xs="24" :loading="loading">
<el-col :md="4" :sm="12" :xs="24" :loading="loading">
<ComparisonCard
tag="今日"
title="订单量"
title="量"
:value="fenToYuan(orderComparison?.value?.orderPayCount || 0)"
:reference="fenToYuan(orderComparison?.reference?.orderPayCount || 0)"
/>
</el-col>
<el-col :md="4" :sm="12" :xs="24" :loading="loading">
<ComparisonCard
tag="今日"
title="换电车辆"
:value="userComparison?.value?.registerUserCount || 0"
:reference="userComparison?.reference?.registerUserCount || 0"
/>
</el-col>
<el-col :md="6" :sm="12" :xs="24" :loading="loading">
<ComparisonCard
tag="今日"
title="新增用户"
title="真实金额"
prefix="¥"
:value="userComparison?.value?.registerUserCount || 0"
:reference="userComparison?.reference?.registerUserCount || 0"
/>
@ -97,9 +106,9 @@ const getUserCountComparison = async () => {
/** 初始化 **/
onMounted(async () => {
loading.value = true
await Promise.all([getOrderComparison(), getUserCountComparison()])
loading.value = false
// loading.value = true
// await Promise.all([getOrderComparison(), getUserCountComparison()])
// loading.value = false
})
</script>
<style lang="scss" scoped>

@ -100,10 +100,10 @@ const analyseData = ref<MemberAnalyseRespVO>() // 会员分析数据
/** 查询会员概览数据列表 */
const handleTimeRangeChange = async (times: [dayjs.ConfigType, dayjs.ConfigType]) => {
loading.value = true
// loading.value = true
//
analyseData.value = await MemberStatisticsApi.getMemberAnalyse({ times })
loading.value = false
// analyseData.value = await MemberStatisticsApi.getMemberAnalyse({ times })
// loading.value = false
}
</script>
<style lang="scss" scoped>

@ -64,6 +64,6 @@ const getMemberTerminalStatisticsList = async () => {
/** 初始化 **/
onMounted(() => {
getMemberTerminalStatisticsList()
// getMemberTerminalStatisticsList()
})
</script>

@ -298,8 +298,8 @@ const getMemberTerminalStatisticsList = async () => {
onMounted(async () => {
loading.value = true
await Promise.all([
getMemberSummary(),
getMemberTerminalStatisticsList(),
// getMemberSummary(),
// getMemberTerminalStatisticsList(),
getMemberAreaStatisticsList(),
getMemberSexStatisticsList()
])

@ -31,16 +31,16 @@
<dict-tag :type="DICT_TYPE.SYSTEM_USER_SEX" :value="check_row.sex" />
</el-descriptions-item>
<el-descriptions-item label="头像:" label-align="right" align="center">
{{ check_row.avatar }}
<el-image :src="check_row.avatar" style="width: 160px; height: 90px" />
</el-descriptions-item>
<el-descriptions-item label="身份证人像面:" label-align="right" align="center">
{{ check_row.idFront }}
<el-image :src="check_row.idFront" style="width: 160px; height: 90px" />
</el-descriptions-item>
<el-descriptions-item label="身份证国徽面:" label-align="right" align="center">
{{ check_row.idBack }}
<el-image :src="check_row.idBack" style="width: 160px; height: 90px" />
</el-descriptions-item>
<el-descriptions-item label="驾驶证图片:" label-align="right" align="center">
{{ check_row.driverLicense }}
<el-image :src="check_row.driverLicense" style="width: 160px; height: 90px" />
</el-descriptions-item>
</el-descriptions>
<!-- -->

@ -50,7 +50,13 @@
@current-change="handleCurrentChange"
>
<el-table-column label="用户昵称" align="center" prop="nickname" />
<el-table-column label="头像" align="center" prop="avatar" />
<el-table-column label="头像" align="center" prop="avatar">
<template #default="{ row }">
<div style="display: flex; align-items: center">
<el-image :src="row.avatar" style="width: 160px; height: 90px" />
</div>
</template>
</el-table-column>
<el-table-column label="真实姓名" align="center" prop="name" />
<el-table-column label="用户性别" align="center" prop="sex">
<template #default="scope">
@ -98,7 +104,6 @@
</template>
<script setup lang="ts">
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { UserApi, UserVO } from '@/api/member/driver'
import UserForm from './UserForm.vue'

@ -6,183 +6,372 @@
: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="充电订单号" prop="chargeOrder">
<el-input v-model="formData.chargeOrder" placeholder="请输入充电订单号" />
</el-form-item>
<el-form-item label="换电订单号" prop="swapOrder">
<el-input v-model="formData.swapOrder" placeholder="请输入换电订单号" />
</el-form-item>
<el-form-item label="电池序列号" prop="batteryId">
<el-input v-model="formData.batteryId" 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="endTime">
<el-date-picker
v-model="formData.endTime"
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="endSoc">
<el-input v-model="formData.endSoc" 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="endSoe">
<el-input v-model="formData.endSoe" placeholder="请输入结束SOE" />
</el-form-item>
<el-form-item label="充电电量" prop="consumption">
<el-input v-model="formData.consumption" 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="充电次数" prop="chargeQuantity">
<el-input v-model="formData.chargeQuantity" placeholder="请输入充电次数" />
</el-form-item>
<el-form-item label="尖时段电量(直流)" prop="theTipElectric">
<el-input v-model="formData.theTipElectric" placeholder="请输入尖时段电量(直流)" />
</el-form-item>
<el-form-item label="尖时段单价(直流)" prop="theTipPrice">
<el-input v-model="formData.theTipPrice" placeholder="请输入尖时段单价(直流)" />
</el-form-item>
<el-form-item label="尖时段电费(直流)" prop="theTipExpense">
<el-input v-model="formData.theTipExpense" placeholder="请输入尖时段电费(直流)" />
</el-form-item>
<el-form-item label="峰时段电量(直流)" prop="peakElectric">
<el-input v-model="formData.peakElectric" placeholder="请输入峰时段电量(直流)" />
</el-form-item>
<el-form-item label="峰时段单价(直流)" prop="peakPrice">
<el-input v-model="formData.peakPrice" placeholder="请输入峰时段单价(直流)" />
</el-form-item>
<el-form-item label="峰时段电费(直流)" prop="peakExpense">
<el-input v-model="formData.peakExpense" placeholder="请输入峰时段电费(直流)" />
</el-form-item>
<el-form-item label="平时段电量(直流)" prop="flatElectric">
<el-input v-model="formData.flatElectric" placeholder="请输入平时段电量(直流)" />
</el-form-item>
<el-form-item label="平时段单价(直流)" prop="flatPrice">
<el-input v-model="formData.flatPrice" placeholder="请输入平时段单价(直流)" />
</el-form-item>
<el-form-item label="平时段电费(直流)" prop="flatExpense">
<el-input v-model="formData.flatExpense" placeholder="请输入平时段电费(直流)" />
</el-form-item>
<el-form-item label="谷时段电量(直流)" prop="theValleyElectric">
<el-input v-model="formData.theValleyElectric" placeholder="请输入谷时段电量(直流)" />
</el-form-item>
<el-form-item label="谷时段单价(直流)" prop="theValleyPrice">
<el-input v-model="formData.theValleyPrice" placeholder="请输入谷时段单价(直流)" />
</el-form-item>
<el-form-item label="谷时段电费(直流)" prop="theValleyExpense">
<el-input v-model="formData.theValleyExpense" placeholder="请输入谷时段电费(直流)" />
</el-form-item>
<el-form-item label="修正充电量(直流)" prop="amendElectric">
<el-input v-model="formData.amendElectric" placeholder="请输入修正充电量(直流)" />
</el-form-item>
<el-form-item label="修正电费(直流)" prop="amendExpense">
<el-input v-model="formData.amendExpense" placeholder="请输入修正电费(直流)" />
</el-form-item>
<el-form-item label="尖时段电量(交流)" prop="theTipElectricAcMeter">
<el-input v-model="formData.theTipElectricAcMeter" placeholder="请输入尖时段电量(交流)" />
</el-form-item>
<el-form-item label="峰时段电量(交流)" prop="peakElectricAcMeter">
<el-input v-model="formData.peakElectricAcMeter" placeholder="请输入峰时段电量(交流)" />
</el-form-item>
<el-form-item label="平时段电量(交流)" prop="flatElectricAcMeter">
<el-input v-model="formData.flatElectricAcMeter" placeholder="请输入平时段电量(交流)" />
</el-form-item>
<el-form-item label="谷时段电量(交流)" prop="theValleyElectricAcMeter">
<el-input v-model="formData.theValleyElectricAcMeter" placeholder="请输入谷时段电量(交流)" />
</el-form-item>
<el-form-item label="尖时段电费(交流)" prop="theTipExpenseAcMeter">
<el-input v-model="formData.theTipExpenseAcMeter" placeholder="请输入尖时段电费(交流)" />
</el-form-item>
<el-form-item label="峰时段电费(交流)" prop="peakExpenseAcMeter">
<el-input v-model="formData.peakExpenseAcMeter" placeholder="请输入峰时段电费(交流)" />
</el-form-item>
<el-form-item label="平时段电费(交流)" prop="flatExpenseAcMeter">
<el-input v-model="formData.flatExpenseAcMeter" placeholder="请输入平时段电费(交流)" />
</el-form-item>
<el-form-item label="谷时段电费(交流)" prop="theValleyExpenseAcMeter">
<el-input v-model="formData.theValleyExpenseAcMeter" placeholder="请输入谷时段电费(交流)" />
</el-form-item>
<el-form-item label="修正充电量(交流)" prop="amendElectricAcMeter">
<el-input v-model="formData.amendElectricAcMeter" placeholder="请输入修正充电量(交流)" />
</el-form-item>
<el-form-item label="修正电费(交流)" prop="amendExpenseAcMeter">
<el-input v-model="formData.amendExpenseAcMeter" placeholder="请输入修正电费(交流)" />
</el-form-item>
<el-form-item label="充电前交流表电量" prop="beforeChargingElectric">
<el-input v-model="formData.beforeChargingElectric" placeholder="请输入充电前交流表电量" />
</el-form-item>
<el-form-item label="充电后交流表电量" prop="afterChargingElectric">
<el-input v-model="formData.afterChargingElectric" placeholder="请输入充电后交流表电量" />
</el-form-item>
<el-form-item label="上报方式:1:自动2人工手动" prop="reportingMode">
<el-select v-model="formData.reportingMode" placeholder="请选择上报方式:1:自动2人工手动">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.REPORT_METHOD)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
<el-form-item label="车架号: 车辆/电池包 VIN" prop="vin">
<el-input v-model="formData.vin" placeholder="请输入车架号: 车辆/电池包 VIN" />
</el-form-item>
<el-form-item label="是否有效:0无效1有效" prop="status">
<el-radio-group v-model="formData.status">
<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-form-item label="充电机唯一编码" prop="epm">
<el-input v-model="formData.epm" placeholder="请输入充电机唯一编码" />
</el-form-item>
<el-form-item label="充电机仓位号" prop="bin">
<el-input v-model="formData.bin" placeholder="请输入充电机仓位号" />
</el-form-item>
<el-form-item label="是否补单:0否;1:是" prop="replenishmentFlag">
<el-radio-group v-model="formData.replenishmentFlag">
<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-form-item label="充电流水号" prop="chargeSerialNumber">
<el-input v-model="formData.chargeSerialNumber" placeholder="请输入充电流水号" />
</el-form-item>
<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-col>
<el-col :span="11">
<el-form-item label="换电订单号" prop="swapOrder">
<el-input v-model="formData.swapOrder" placeholder="请输入换电订单号" /> </el-form-item
></el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="开始时间" prop="startTime">
<el-date-picker
v-model="formData.startTime"
type="date"
value-format="x"
placeholder="选择开始时间"
style="width: 100%"
/> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="结束时间" prop="endTime">
<el-date-picker
v-model="formData.endTime"
type="date"
value-format="x"
placeholder="选择结束时间"
style="width: 100%"
/> </el-form-item
></el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="开始SOC" prop="startSoc">
<el-input v-model="formData.startSoc" placeholder="请输入开始SOC" /> </el-form-item
></el-col>
<el-col :span="11">
<el-form-item label="结束SOC" prop="endSoc">
<el-input v-model="formData.endSoc" placeholder="请输入结束SOC" /> </el-form-item
></el-col>
</el-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
></el-col>
</el-row>
</el-form>
<template #footer>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
@ -252,9 +441,11 @@ const formData = ref({
bin: undefined,
replenishmentFlag: undefined,
chargeSerialNumber: undefined,
downBatteryNo: undefined
})
const formRules = reactive({
stationNo: [{ required: true, message: '换电站编码不能为空', trigger: 'blur' }],
downBatteryNo: [{ required: true, message: '不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
@ -350,7 +541,9 @@ const resetForm = () => {
bin: undefined,
replenishmentFlag: undefined,
chargeSerialNumber: undefined,
downBatteryNo: undefined
}
formRef.value?.resetFields()
}
</script>@/api/biz/chargingorder
</script>
@/api/biz/chargingorder

@ -6,7 +6,7 @@
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="68px"
label-width="100px"
>
<el-form-item label="充电订单号" prop="chargeOrder">
<el-input
@ -41,58 +41,142 @@
<!-- 列表 -->
<ContentWrap>
<el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
<el-table-column label="充电订单号" align="center" prop="chargeOrder" />
<el-table-column label="换电订单号" align="center" prop="swapOrder" />
<el-table-column label="电池序列号" align="center" prop="batteryId" />
<el-table
v-loading="loading"
:data="list"
:stripe="true"
:show-overflow-tooltip="true"
:header-cell-style="{
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="batteryId" width="150" />
<el-table-column
label="开始时间"
align="center"
prop="startTime"
:formatter="dateFormatter"
width="180px"
width="150px"
/>
<el-table-column
label="结束时间"
align="center"
prop="endTime"
:formatter="dateFormatter"
width="180px"
width="150px"
/>
<el-table-column label="开始SOC" align="center" prop="startSoc" />
<el-table-column label="结束SOC" align="center" prop="endSoc" />
<el-table-column label="开始SOE" align="center" prop="startSoe" />
<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" />
<el-table-column label="尖时段单价(直流)" align="center" prop="theTipPrice" />
<el-table-column label="尖时段电费(直流)" align="center" prop="theTipExpense" />
<el-table-column label="峰时段电量(直流)" align="center" prop="peakElectric" />
<el-table-column label="峰时段单价(直流)" align="center" prop="peakPrice" />
<el-table-column label="峰时段电费(直流)" align="center" prop="peakExpense" />
<el-table-column label="平时段电量(直流)" align="center" prop="flatElectric" />
<el-table-column label="平时段单价(直流)" align="center" prop="flatPrice" />
<el-table-column label="平时段电费(直流)" align="center" prop="flatExpense" />
<el-table-column label="谷时段电量(直流)" align="center" prop="theValleyElectric" />
<el-table-column label="谷时段单价(直流)" align="center" prop="theValleyPrice" />
<el-table-column label="谷时段电费(直流)" align="center" prop="theValleyExpense" />
<el-table-column label="修正充电量(直流)" align="center" prop="amendElectric" />
<el-table-column label="修正电费(直流)" align="center" prop="amendExpense" />
<el-table-column label="尖时段电量(交流)" align="center" prop="theTipElectricAcMeter" />
<el-table-column label="峰时段电量(交流)" align="center" prop="peakElectricAcMeter" />
<el-table-column label="平时段电量(交流)" align="center" prop="flatElectricAcMeter" />
<el-table-column label="谷时段电量(交流)" align="center" prop="theValleyElectricAcMeter" />
<el-table-column label="尖时段电费(交流)" align="center" prop="theTipExpenseAcMeter" />
<el-table-column label="峰时段电费(交流)" align="center" prop="peakExpenseAcMeter" />
<el-table-column label="平时段电费(交流)" align="center" prop="flatExpenseAcMeter" />
<el-table-column label="谷时段电费(交流)" align="center" prop="theValleyExpenseAcMeter" />
<el-table-column label="修正充电量(交流)" align="center" prop="amendElectricAcMeter" />
<el-table-column label="修正电费(交流)" align="center" prop="amendExpenseAcMeter" />
<el-table-column label="充电前交流表电量" align="center" prop="beforeChargingElectric" />
<el-table-column label="充电后交流表电量" align="center" prop="afterChargingElectric" />
<el-table-column label="上报方式:" align="center" prop="reportingMode">
<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>
@ -103,8 +187,8 @@
<dict-tag :type="DICT_TYPE.APPACCESS_STATUS" :value="scope.row.status" />
</template>
</el-table-column>
<el-table-column label="充电机唯一编码" align="center" prop="epm" />
<el-table-column label="充电机仓位号" align="center" prop="bin" />
<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" />

@ -0,0 +1,371 @@
<template>
<Dialog :title="dialogTitle" v-model="dialogVisible">
<el-form
ref="formRef"
:model="formData"
:rules="formRules"
label-width="100px"
v-loading="formLoading"
label-position="top"
>
<el-row type="flex" justify="space-around">
<el-col :span="11"
><el-form-item label="换电站编码" prop="stationNo">
<!-- <el-input v-model="formData.stationNo" placeholder="请输入换电站编码" /> -->
<el-select v-model="formData.stationNo" placeholder="请选择" style="width: 100%">
<el-option
v-for="(item, index) in stationList"
:key="index"
:label="item.stationName"
:value="item.stationNo"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="车牌号" prop="vehicleNo">
<el-input v-model="formData.vehicleNo" placeholder="请输入车牌号" />
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="车辆VIN码" prop="vehicleVin">
<el-input v-model="formData.vehicleVin" placeholder="请输入车辆VIN码" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item label="实付总费用">
<el-input v-model="formData.totalFee" placeholder="请输入" type="number" />
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="订单支付状态" prop="payStatus">
<el-select v-model="formData.payStatus" placeholder="请选择" style="width: 100%">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.PAYRESULT)"
: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="account">
<el-input v-model="formData.account" placeholder="请输入扣费账户" />
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item label="换电结果" prop="swapResult">
<el-select v-model="formData.swapResult" placeholder="请选择" style="width: 100%">
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.SWAPRESULT)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select>
</el-form-item>
</el-col>
<el-col :span="11" />
</el-row>
<!-- -->
<div
v-for="(item, index) in formData.batteryList"
:key="index"
style="background: rgb(235 241 240)"
>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item :label="'亏电包编码' + (index + 1)" prop="">
<el-input v-model="formData.batteryList[index].downBatteryNo" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item :label="'亏电包soc' + (index + 1)" prop="">
<el-input
v-model="formData.batteryList[index].downBatterySoc"
type="number"
placeholder="请输入"
/>
</el-form-item>
</el-col>
</el-row>
<el-row type="flex" justify="space-around">
<el-col :span="11">
<el-form-item :label="'满电包编码' + (index + 1)" prop="">
<el-input v-model="formData.batteryList[index].upBatteryNo" placeholder="请输入" />
</el-form-item>
</el-col>
<el-col :span="11">
<el-form-item :label="'满电包soc' + (index + 1)" prop="">
<el-input
v-model="formData.batteryList[index].upBatterySoc"
type="number"
placeholder="请输入"
/>
<el-button class="mt-2" @click.prevent="removeDomain(index)" type="danger">
删除
</el-button>
</el-form-item>
</el-col>
</el-row>
</div>
</el-form>
<template #footer>
<el-button @click="addDomain"></el-button>
<el-button @click="submitForm" type="primary" :disabled="formLoading"> </el-button>
<el-button @click="closeDialog"> </el-button>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { SwapOrderApi, SwapOrderVO } from '@/api/biz/swaporder'
/** 换电订单 表单 */
defineOptions({ name: 'SwapOrderForm' })
const props = defineProps({
stationList: Array
})
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,
userId: undefined,
vehicleNo: undefined,
vehicleVin: undefined,
mac: undefined,
teamId: undefined,
orderNo: undefined,
payStatus: undefined,
failReason: undefined,
socType: undefined,
computeType: undefined,
expenseAcMeter: undefined,
expenseDcMeter: undefined,
vehicleEnterTime: undefined,
vehicleLeaveTime: undefined,
swapBeginTime: undefined,
orderTime: undefined,
swapEndTime: undefined,
remark: undefined,
swapResult: undefined,
creatorType: undefined,
manualFlag: undefined,
account: undefined,
vehicleBlackWhite: undefined,
runModel: undefined,
brand: undefined,
totalFeeBeforeDiscount: undefined,
discountFee: undefined,
totalFee: undefined,
settleType: undefined,
billingModelId: undefined,
billingTimeId: undefined,
serviceTotalFee: undefined,
batTotalFee: undefined,
billingTotalFee: undefined,
priceId: undefined,
timeId: undefined,
theTipExpense: undefined,
peakExpense: undefined,
flatExpense: undefined,
theValleyExpense: undefined,
amendExpense: undefined,
theTipExpenseAcMeter: undefined,
peakExpenseAcMeter: undefined,
flatExpenseAcMeter: undefined,
theValleyExpenseAcMeter: undefined,
amendExpenseAcMeter: undefined,
elecTotalExpense: undefined,
discountFlag: undefined,
setMealFlag: undefined,
discountPercent: undefined,
discountScope: undefined,
cloudTotalFee: undefined,
batteryList: [
{
downBatterySoc: 0,
downBatteryNo: undefined,
upBatteryNo: undefined,
upBatterySoc: 0
}
]
})
const formRules = reactive({
stationNo: [{ required: true, message: '不能为空', trigger: 'blur' }],
vehicleNo: [{ required: true, message: '不能为空', trigger: 'blur' }],
vehicleVin: [{ required: true, message: '不能为空', trigger: 'blur' }],
socType: [{ required: true, message: '不能为空', trigger: 'blur' }],
swapResult: [{ required: true, message: '不能为空', trigger: 'blur' }],
cloudTotalFee: [{ required: true, message: '不能为空', trigger: 'blur' }],
downBatterySoc: [{ required: true, message: '不能为空', trigger: 'blur' }],
downBatteryNo: [{ required: true, message: '不能为空', trigger: 'blur' }],
upBatteryNo: [{ required: true, message: '不能为空', trigger: 'blur' }],
upBatterySoc: [{ 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 SwapOrderApi.getSwapOrder(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
const batteryList = ref([])
const addDomain = () => {
if (formData.value.batteryList.length >= 3) {
message.error('电池数量不能超过3个')
return
} else {
formData.value.batteryList.push({
downBatterySoc: 0,
downBatteryNo: undefined,
upBatteryNo: undefined,
upBatterySoc: 0
})
}
}
const removeDomain = (index: number) => {
formData.value.batteryList.splice(index, 1)
}
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
await formRef.value.validate()
//
formLoading.value = true
// for (let i = 0; i < batteryList.value.length; i++) {
// if (!batteryList.value[i].downBatteryNo) {
// message.error('')
// return
// }
// if (!batteryList.value[i].upBatteryNo) {
// message.error('')
// return
// }
// batteryList.value[i].downBatterySoc = parseInt(batteryList.value[i].downBatterySoc)
// batteryList.value[i].upBatterySoc = parseInt(batteryList.value[i].upBatterySoc)
// }
// formData.value.batteryList = batteryList.value
try {
const data = formData.value as unknown as SwapOrderApi.SwapOrderVO
if (formType.value === 'create') {
await SwapOrderApi.createSwapOrder(data)
message.success(t('common.createSuccess'))
} else {
await SwapOrderApi.updateSwapOrder(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
id: undefined,
stationNo: undefined,
userId: undefined,
vehicleNo: undefined,
vehicleVin: undefined,
mac: undefined,
teamId: undefined,
orderNo: undefined,
payStatus: undefined,
failReason: undefined,
socType: undefined,
computeType: undefined,
expenseAcMeter: undefined,
expenseDcMeter: undefined,
vehicleEnterTime: undefined,
vehicleLeaveTime: undefined,
swapBeginTime: undefined,
orderTime: undefined,
swapEndTime: undefined,
remark: undefined,
swapResult: undefined,
creatorType: undefined,
manualFlag: undefined,
account: undefined,
vehicleBlackWhite: undefined,
runModel: undefined,
brand: undefined,
totalFeeBeforeDiscount: undefined,
discountFee: undefined,
totalFee: undefined,
settleType: undefined,
billingModelId: undefined,
billingTimeId: undefined,
serviceTotalFee: undefined,
batTotalFee: undefined,
billingTotalFee: undefined,
priceId: undefined,
timeId: undefined,
theTipExpense: undefined,
peakExpense: undefined,
flatExpense: undefined,
theValleyExpense: undefined,
amendExpense: undefined,
theTipExpenseAcMeter: undefined,
peakExpenseAcMeter: undefined,
flatExpenseAcMeter: undefined,
theValleyExpenseAcMeter: undefined,
amendExpenseAcMeter: undefined,
elecTotalExpense: undefined,
discountFlag: undefined,
setMealFlag: undefined,
discountPercent: undefined,
discountScope: undefined,
cloudTotalFee: undefined,
batteryList: [
{
downBatterySoc: 0,
downBatteryNo: undefined,
upBatteryNo: undefined,
upBatterySoc: 0
}
]
}
formRef.value?.resetFields()
}
const closeDialog = () => {
dialogVisible.value = false
// batteryList.value = []
resetForm()
}
</script>

@ -0,0 +1,174 @@
<template>
<div>
<el-drawer
title="订单详情"
:close-on-click-modal="false"
v-model="drawer"
direction="rtl"
size="60%"
>
<div class="title_info">订单信息</div>
<br />
<el-descriptions :column="3" border>
<el-descriptions-item
size="large"
label="换电订单号:"
label-align="right"
align="center"
label-class-name="my-label"
class-name="my-content"
width="150px"
>
{{ check_row.orderNo == null ? '--' : check_row.orderNo }}
</el-descriptions-item>
<el-descriptions-item label="订单支付状态:" label-align="right" align="center">
<dict-tag
:type="DICT_TYPE.PAYRESULT"
:value="check_row.payStatus"
v-if="check_row.payStatus != null"
/>
<span v-else> -- </span>
</el-descriptions-item>
<el-descriptions-item label="换电量:" label-align="right" align="center">
{{ check_row.totalElectricity == null ? '--' : check_row.totalElectricity }}
</el-descriptions-item>
<el-descriptions-item label="车牌号:" label-align="right" align="center">
{{ check_row.vehicleNo == null ? '--' : check_row.vehicleNo }}
</el-descriptions-item>
<el-descriptions-item label="车辆VIN码:" label-align="right" align="center">
{{ check_row.vehicleVin == null ? '--' : check_row.vehicleVin }}
</el-descriptions-item>
<!-- -->
<div v-for="(item, index) in check_row.batteryList" :key="index">
<el-descriptions-item
:label="'亏电包编码' + (index + 1) + ':'"
label-align="right"
align="center"
>
{{
check_row.batteryList[index].downBatteryNo == null
? '--'
: check_row.batteryList[index].downBatteryNo
}}
</el-descriptions-item>
<el-descriptions-item
:label="'亏电包soc' + (index + 1) + ':'"
label-align="right"
align="center"
>
{{
check_row.batteryList[index].downBatterySoc == null
? '--'
: check_row.batteryList[index].downBatterySoc
}}
</el-descriptions-item>
<el-descriptions-item
:label="'满电包编码' + (index + 1) + ':'"
label-align="right"
align="center"
>
{{
check_row.batteryList[index].downBatteryNo == null
? '--'
: check_row.batteryList[index].downBatteryNo
}}
</el-descriptions-item>
<el-descriptions-item
:label="'满电包soc' + (index + 1) + ':'"
label-align="right"
align="center"
>
{{
check_row.batteryList[index].downBatterySoc == null
? '--'
: check_row.batteryList[index].downBatterySoc
}}
</el-descriptions-item>
</div>
</el-descriptions>
<!-- -->
<div class="title_info" style="margin-top: 20px">支付信息</div>
<br />
<el-descriptions :column="3" border>
<el-descriptions-item
size="large"
label="扣费账户:"
label-align="right"
align="center"
label-class-name="my-label"
class-name="my-content"
width="150px"
>
{{ check_row.account == null ? '--' : check_row.account }}
</el-descriptions-item>
<el-descriptions-item label="优惠金额:" label-align="right" align="center">
{{ check_row.discountFee == null ? '--' : check_row.discountFee / 100 + '元' }}
</el-descriptions-item>
<el-descriptions-item label="换电服务总费用:" label-align="right" align="center">
{{ check_row.serviceTotalFee == null ? '--' : check_row.serviceTotalFee / 100 + '元' }}
</el-descriptions-item>
<el-descriptions-item label="电池服务总费用:" label-align="right" align="center">
{{ check_row.batTotalFee == null ? '--' : check_row.batTotalFee / 100 + '元' }}
</el-descriptions-item>
<el-descriptions-item label="云平台服务总费用:" label-align="right" align="center">
{{ check_row.cloudTotalFee == null ? '--' : check_row.cloudTotalFee / 100 + '元' }}
</el-descriptions-item>
<el-descriptions-item label="计费模型总费用:" label-align="right" align="center">
{{ check_row.billingTotalFee == null ? '--' : check_row.billingTotalFee / 100 + '元' }}
</el-descriptions-item>
<el-descriptions-item label="电网电价模型总费用:" label-align="right" align="center">
{{ check_row.elecTotalExpense == null ? '--' : check_row.elecTotalExpense / 100 + '元' }}
</el-descriptions-item>
<el-descriptions-item label="是否使用套餐:" label-align="right" align="center">
<dict-tag
:type="DICT_TYPE.APPACCESS_STATUS"
:value="check_row.setMealFlag"
v-if="check_row.setMealFlag != null"
/>
<span v-else> -- </span>
</el-descriptions-item>
<el-descriptions-item label="实付总费用:" label-align="right" align="center">
{{ check_row.totalFee == null ? '--' : check_row.totalFee / 100 + '元' }}
</el-descriptions-item>
</el-descriptions>
</el-drawer>
</div>
</template>
<script setup lang="ts">
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
const drawer = ref(false)
const check_row = ref<any>()
const open = (row: any) => {
// console.log(row, 'row')
check_row.value = row
drawer.value = true
}
defineExpose({ open }) // open
</script>
<style scoped lang="less">
.lines {
width: 90%;
height: 1px;
background: #ccc;
margin: 0 auto;
}
.title_info {
font-size: 16px;
font-weight: 600;
}
:deep(.el-drawer__title) {
font-size: 20px;
font-weight: 600;
// color: #303133;
color: black;
}
</style>

@ -1,5 +1,314 @@
<template>
<span>111</span>
<ContentWrap>
<!-- 搜索工作栏 -->
<el-form
class="-mb-15px"
:model="queryParams"
ref="queryFormRef"
:inline="true"
label-width="100px"
>
<el-form-item label="车牌号" prop="vehicleNo">
<el-input
v-model="queryParams.vehicleNo"
placeholder="请输入车牌号"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="车辆VIN码" prop="vehicleVin">
<el-input
v-model="queryParams.vehicleVin"
placeholder="请输入车辆VIN码"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item>
<el-form-item label="mac地址" prop="mac">
<el-input
v-model="queryParams.mac"
placeholder="请输入mac地址"
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="orderNo" />
<el-table-column label="车牌号" align="center" prop="vehicleNo" />
<el-table-column label="所属换电站" align="center" prop="stationNo">
<template #default="scope"> {{ handle_staion_name(scope.row.stationNo) }} </template>
</el-table-column>
<el-table-column label="订单支付状态" align="center" prop="payStatus">
<template #default="scope">
<dict-tag :type="DICT_TYPE.PAYRESULT" :value="scope.row.payStatus" />
</template>
</el-table-column>
<el-table-column label="换电量(度)" align="center" prop="totalElectricity" />
<el-table-column label="实付总费用" align="center" prop="totalFee" />
<el-table-column label="实际支付金额" align="center" prop="actualPay" />
<el-table-column
label="创建时间"
align="center"
prop="createTime"
:formatter="dateFormatter"
width="180px"
/>
<el-table-column label="操作" align="center" fixed="right" width="200">
<template #default="scope">
<el-button
link
type="primary"
@click="openForm('update', scope.row.id)"
v-if="scope.row.payStatus == 0 || scope.row.payStatus == 1 || scope.row.payStatus == 5"
>
编辑
</el-button>
<el-button link type="primary" @click="open_drawer(scope.row)"> </el-button>
<el-button link type="danger" @click="handleDelete(scope.row.id)"> </el-button>
<el-button
link
type="success"
@click="handle_changes(scope.row, 5)"
v-if="scope.row.payStatus == 6"
>
挂起
</el-button>
<el-button
link
type="warning"
@click="handle_changes(scope.row, 6)"
v-if="scope.row.payStatus == 5"
>
关闭
</el-button>
</template>
</el-table-column>
</el-table>
<!-- 分页 -->
<Pagination
:total="total"
v-model:page="queryParams.pageNo"
v-model:limit="queryParams.pageSize"
@pagination="getList"
/>
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<SwapOrderForm ref="formRef" @success="getList" :stationList="stationList" />
<drawer ref="drawerRef" />
</template>
<script setup lang="ts">
</script>
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import { SwapOrderApi, SwapOrderVO } from '@/api/biz/swaporder'
import { StationInfoApi, StationInfoVO } from '@/api/share/stationinfo'
import SwapOrderForm from './SwapOrderForm.vue'
import drawer from './components/drawer.vue'
/** 换电订单 列表 */
defineOptions({ name: 'SwapOrder' })
const message = useMessage() //
const { t } = useI18n() //
const loading = ref(true) //
const list = ref<SwapOrderVO[]>([]) //
//
const total = ref(0)
const queryParams = reactive({
pageNo: 1,
pageSize: 10,
stationNo: undefined,
userId: undefined,
vehicleNo: undefined,
vehicleVin: undefined,
mac: undefined,
teamId: undefined,
orderNo: undefined,
payStatus: undefined,
failReason: undefined,
socType: undefined,
computeType: undefined,
expenseAcMeter: undefined,
expenseDcMeter: undefined,
vehicleEnterTime: [],
vehicleLeaveTime: [],
swapBeginTime: [],
orderTime: [],
swapEndTime: [],
remark: undefined,
status: undefined,
creatorType: undefined,
manualFlag: undefined,
account: undefined,
vehicleBlackWhite: undefined,
runModel: undefined,
brand: undefined,
totalFeeBeforeDiscount: undefined,
discountFee: undefined,
totalFee: undefined,
settleType: undefined,
billingModelId: undefined,
billingTimeId: undefined,
serviceTotalFee: undefined,
batTotalFee: undefined,
billingTotalFee: undefined,
priceId: undefined,
timeId: undefined,
theTipExpense: undefined,
peakExpense: undefined,
flatExpense: undefined,
theValleyExpense: undefined,
amendExpense: undefined,
theTipExpenseAcMeter: undefined,
peakExpenseAcMeter: undefined,
flatExpenseAcMeter: undefined,
theValleyExpenseAcMeter: undefined,
amendExpenseAcMeter: undefined,
elecTotalExpense: undefined,
discountFlag: undefined,
setMealFlag: undefined,
discountPercent: undefined,
discountScope: undefined,
createTime: [],
cloudTotalFee: undefined
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
/** 查询列表 */
const getList = async () => {
loading.value = true
try {
const data = await SwapOrderApi.getSwapOrderPage(queryParams)
list.value = data.list
total.value = data.total
} finally {
loading.value = false
}
}
const stationList = ref([])
const getstationList = async () => {
try {
const data = await StationInfoApi.getStationInfoList()
stationList.value = data
// console.log(stationList.value)
} finally {
}
}
const handle_staion_name = (stationNo: string) => {
for (let i = 0; i < stationList.value.length; i++) {
if (stationNo == stationList.value[i].stationNo) {
return stationList.value[i].stationName
}
}
}
/** 搜索按钮操作 */
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 handle_changes = async (row: any, type: number) => {
try {
//
await message.confirm('是否确认此操作?', '提示')
//
let data = {
orderId: row.id,
payStatus: type
}
await SwapOrderApi.changeStatusSwapOrder(data)
message.success(t('common.success'))
//
await getList()
} catch {}
}
/** 删除按钮操作 */
const handleDelete = async (id: number) => {
try {
//
await message.delConfirm()
//
await SwapOrderApi.deleteSwapOrder(id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
/** 导出按钮操作 */
const handleExport = async () => {
try {
//
await message.exportConfirm()
//
exportLoading.value = true
const data = await SwapOrderApi.exportSwapOrder(queryParams)
download.excel(data, '换电订单.xls')
} catch {
} finally {
exportLoading.value = false
}
}
const drawerRef = ref()
const open_drawer = async (row: any) => {
let formData = ref(null)
formData = await SwapOrderApi.getSwapOrder(row.id)
drawerRef.value.open(formData)
}
/** 初始化 **/
onMounted(() => {
getList()
getstationList()
})
</script>

@ -55,7 +55,18 @@
/>
</el-select> </el-form-item
></el-col>
<el-col :span="11" />
<el-col :span="11">
<el-form-item label="站点名称" prop="stationNo">
<el-select v-model="formData.stationNo" placeholder="请选择" style="width: 100%">
<el-option
v-for="(item, index) in stationList"
:key="index"
:label="item.stationName"
:value="item.stationNo"
/>
</el-select>
</el-form-item>
</el-col>
</el-row>
</el-form>
<template #footer>
@ -70,7 +81,9 @@ import { TeamApi, TeamVO } from '@/api/biz/team'
/** 车队 表单 */
defineOptions({ name: 'TeamForm' })
const props = defineProps({
stationList: Array
})
const { t } = useI18n() //
const message = useMessage() //
@ -88,10 +101,12 @@ const formData = ref({
contactWay: undefined,
roundingMode: undefined,
limit: undefined,
openFlag: undefined
openFlag: undefined,
stationNo: undefined
})
const formRules = reactive({
teamName: [{ required: true, message: '车队名称不能为空', trigger: 'blur' }]
teamName: [{ required: true, message: '车队名称不能为空', trigger: 'blur' }],
stationNo: [{ required: true, message: '不能为空', trigger: 'change' }]
})
const formRef = ref() // Ref
@ -149,7 +164,8 @@ const resetForm = () => {
contactWay: undefined,
roundingMode: undefined,
limit: undefined,
openFlag: undefined
openFlag: undefined,
stationNo: undefined
}
formRef.value?.resetFields()
}

@ -19,22 +19,22 @@
class-name="my-content"
width="150px"
>
kooriookami
{{ check_row.teamName }}
</el-descriptions-item>
<el-descriptions-item label="队长:" label-align="right" align="center">
<!-- <el-descriptions-item label="队长:" label-align="right" align="center">
18100000000
</el-descriptions-item>
</el-descriptions-item> -->
<el-descriptions-item label="负责人:" label-align="right" align="center">
Suzhou
{{ check_row.principal }}
</el-descriptions-item>
<el-descriptions-item label="联系方式:" label-align="right" align="center">
<el-tag size="small">School</el-tag>
{{ check_row.contactWay }}
</el-descriptions-item>
<el-descriptions-item label="是否开启:" label-align="right" align="center">
No.1188, Wuzhong Avenue, Wuzhong District, Suzhou, Jiangsu Province
<dict-tag :type="DICT_TYPE.OPENFLAG" :value="check_row.roundingMode" />
</el-descriptions-item>
<el-descriptions-item label="舍入模式:" label-align="right" align="center">
No.1188, Wuzhong Avenue, Wuzhong District, Suzhou, Jiangsu Province
<dict-tag :type="DICT_TYPE.ROUNDINGMODE" :value="check_row.roundingMode" />
</el-descriptions-item>
</el-descriptions>
<!-- -->
@ -47,6 +47,7 @@
<script setup lang="ts">
import TeamVehicleList from './TeamVehicleList.vue'
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict'
const drawer = ref(false)
const check_row = ref<any>()

@ -8,15 +8,16 @@
:inline="true"
label-width="68px"
>
<!-- <el-form-item label="运营商id" prop="operatorId">
<el-input
v-model="queryParams.operatorId"
placeholder="请输入运营商id"
clearable
@keyup.enter="handleQuery"
class="!w-240px"
/>
</el-form-item> -->
<el-form-item label="所属站点" prop="stationNo">
<el-select v-model="queryParams.stationNo" placeholder="请选择">
<el-option
v-for="(item, index) in stationList"
:key="index"
:label="item.stationName"
:value="item.stationNo"
/>
</el-select>
</el-form-item>
<el-form-item label="负责人" prop="captain">
<el-input
v-model="queryParams.principal"
@ -85,7 +86,11 @@
backgroundColor: '#eff4fa'
}"
>
<!-- <el-table-column label="队长" align="center" prop="captain" /> -->
<el-table-column label="所属站点" align="center" prop="stationNo">
<template #default="scope">
{{ handle_staion_name(scope.row.stationNo) }}
</template>
</el-table-column>
<el-table-column label="车队名称" align="center" prop="teamName" />
<el-table-column label="负责人" align="center" prop="principal" />
<el-table-column label="联系方式" align="center" prop="contactWay" />
@ -133,7 +138,7 @@
</ContentWrap>
<!-- 表单弹窗添加/修改 -->
<TeamForm ref="formRef" @success="getList" />
<TeamForm ref="formRef" @success="getList" :stationList="stationList" />
<!-- 子表的列表 -->
<!-- <ContentWrap>
<el-tabs model-value="teamVehicle">
@ -143,7 +148,6 @@
</el-tabs>
</ContentWrap> -->
<drawer ref="drawerRef" />
</template>
<script setup lang="ts">
@ -154,6 +158,7 @@ import { TeamApi, TeamVO } from '@/api/biz/team'
import TeamForm from './TeamForm.vue'
import TeamVehicleList from './components/TeamVehicleList.vue'
import drawer from './components/drawer.vue'
import { StationInfoApi, StationInfoVO } from '@/api/share/stationinfo'
/** 车队 列表 */
defineOptions({ name: 'Team' })
@ -177,11 +182,20 @@ const queryParams = reactive({
roundingMode: undefined,
limit: undefined,
createTime: [],
openFlag: undefined
openFlag: undefined,
stationNo: undefined
})
const queryFormRef = ref() //
const exportLoading = ref(false) //
const handle_staion_name = (stationNo: string) => {
for (let i = 0; i < stationList.value.length; i++) {
if (stationNo == stationList.value[i].stationNo) {
return stationList.value[i].stationName
}
}
}
/** 查询列表 */
const getList = async () => {
loading.value = true
@ -195,6 +209,16 @@ const getList = async () => {
}
}
const stationList = ref([])
const getstationList = async () => {
try {
const data = await StationInfoApi.getStationInfoList()
stationList.value = data
// console.log(stationList.value)
} finally {
}
}
/** 搜索按钮操作 */
const handleQuery = () => {
queryParams.pageNo = 1
@ -207,7 +231,6 @@ const resetQuery = () => {
handleQuery()
}
/** 添加/修改操作 */
const formRef = ref()
const openForm = (type: string, id?: number) => {
@ -260,12 +283,13 @@ const handleCurrentChange = (row) => {
}
const drawerRef = ref()
const open_drawer = (row:any) => {
const open_drawer = (row: any) => {
drawerRef.value.open(row)
}
/** 初始化 **/
onMounted(() => {
getList()
getstationList()
})
</script>

@ -38,7 +38,13 @@
<el-col :span="11"
><el-form-item label="站类型" prop="stationType">
<el-select v-model="formData.stationType" placeholder="请选择" style="width: 100%">
<el-option label="请选择" value="" />
<!-- <el-option label="请选择" value="" /> -->
<el-option
v-for="dict in getIntDictOptions(DICT_TYPE.SITECLASSIFICATION_TYPE)"
:key="dict.value"
:label="dict.label"
:value="dict.value"
/>
</el-select> </el-form-item
></el-col>
<el-col :span="11">

Loading…
Cancel
Save