diff --git a/.env.prod b/.env.prod index 33d0c2e..1bcaed0 100644 --- a/.env.prod +++ b/.env.prod @@ -4,12 +4,12 @@ NODE_ENV=production VITE_DEV=false # 请求路径 -VITE_BASE_URL='http://180.76.133.253:16808' +VITE_BASE_URL='http://180.76.133.253:16994' # VITE_BASE_URL='http://106.12.36.89:48080' # 上传路径 -VITE_UPLOAD_URL='http://180.76.133.253:16808/admin-api/infra/file/upload' -# VITE_UPLOAD_URL='http://106.12.36.89:48080/admin-api/infra/file/upload' +VITE_UPLOAD_URL='http://180.76.133.253:16994/admin-api/infra/file/upload' +# VITE_UPLOAD_URL='http://106.12.36.89:48080/admin-api/infra/file/upload'p # 接口前缀 VITE_API_BASEPATH= diff --git a/src/api/biz/outchargeorder/index.ts b/src/api/biz/outchargeorder/index.ts new file mode 100644 index 0000000..d664a68 --- /dev/null +++ b/src/api/biz/outchargeorder/index.ts @@ -0,0 +1,146 @@ +import request from '@/config/axios' + +// 站外充电订单 VO +export interface OutChargeOrderVO { + // id + id: number + // 换电站编码 + stationNo: string + // 充电流水号 + chargeSeriaNumber: string + // 充电订单号 + chargeOrder: string + // 充电枪编号 + chargerGunNo: string + // 电池序列号 + batteryId: string + // 开始时间 + startTime: Date + // 结束时间 + endTime: Date + // 开始SOC + startSoc: number + // 结束SOC + endSoc: number + // 开始SOE + startSoe: number + // 结束SOE + endSoe: number + // 充电电量 + chargingCapacity: number + // 充电时长 + chargingTime: number + // 车架号: 车辆/电池包 VIN + vin: string + // 状态:1-充电中;2-待支付;3-支付完成;4-取消; + status: number + // 优惠前总费用 + totalFeeBeforeDiscount: number + // 优惠金额 + discountFee: number + // 总费用 + totalFee: number + // 实际支付金额 + actualPay: number + // 尖时段电量(直流) + theTipElectric: number + // 尖时段单价(直流) + theTipPrice: number + // 尖时段电费(直流) + theTipExpense: number + // 峰时段电量(直流) + peakElectric: number + // 峰时段单价(直流) + peakPrice: number + // 峰时段电费(直流) + peakExpense: number + // 平时段电量(直流) + flatElectric: number + // 平时段单价(直流) + flatPrice: number + // 平时段电费(直流) + flatExpense: number + // 谷时段电量(直流) + theValleyElectric: number + // 谷时段单价(直流) + theValleyPrice: number + // 谷时段电费(直流) + theValleyExpense: number + // 修正充电量(直流) + amendElectric: number + // 修正电费(直流) + amendExpense: number + // 尖时段电量(交流) + theTipElectricAcMeter: number + // 峰时段电量(交流) + peakElectricAcMeter: number + // 平时段电量(交流) + flatElectricAcMeter: number + // 谷时段电量(交流) + theValleyElectricAcMeter: number + // 尖时段电费(交流) + theTipExpenseAcMeter: number + // 峰时段电费(交流) + peakExpenseAcMeter: number + // 平时段电费(交流) + flatExpenseAcMeter: number + // 谷时段电费(交流) + theValleyExpenseAcMeter: number + // 修正充电量(交流) + amendElectricAcMeter: number + // 修正电费(交流) + amendExpenseAcMeter: number + // 充电前交流表电量 + beforeChargingElectric: number + // 充电后交流表电量 + afterChargingElectric: number + // 套餐优惠电量度数 + freeCharge: number + // 上报方式:1:自动;2:人工手动 + reportingMode: number + // 是否有效:0无效;1有效 + orderStatus: number + // 充电机唯一编码 + epm: string + // 是否补单:0否;1:是 + replenishmentFlag: number + // 电价模型id + priceId: number + // 电网电价月日分时模型id + dateId: number + // 电网电价时分秒分时模型id + timeId: number +} + +// 站外充电订单 API +export const OutChargeOrderApi = { + // 查询站外充电订单分页 + getOutChargeOrderPage: async (params: any) => { + return await request.get({ url: `/cloud/out-charge-order/page`, params }) + }, + + // 查询站外充电订单详情 + getOutChargeOrder: async (id: number) => { + return await request.get({ url: `/cloud/out-charge-order/get?id=` + id }) + }, + + // 新增站外充电订单 + createOutChargeOrder: async (data: OutChargeOrderVO) => { + return await request.post({ url: `/cloud/out-charge-order/create`, data }) + }, + + // 修改站外充电订单 + updateOutChargeOrder: async (data: OutChargeOrderVO) => { + return await request.put({ url: `/cloud/out-charge-order/update`, data }) + }, + + // 删除站外充电订单 + deleteOutChargeOrder: async (id: number) => { + return await request.delete({ url: `/cloud/out-charge-order/delete?id=` + id }) + }, + + // 导出站外充电订单 Excel + exportOutChargeOrder: async (params) => { + return await request.download({ url: `/cloud/out-charge-order/export-excel`, params }) + }, +} diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 03e805e..68c4810 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -113,10 +113,10 @@ export enum DICT_TYPE { CHECK_ORDER_STATUS_ONE = 'check_order_status_one', //zz退款单状态 状态:2-退款成功;3-取消 // -----------zzzz PERSONAL_VEHICLE_FREEZE_NO = 'personal_vehicle_freeze_no',//zz 0-未审核 1-通过审核 2-审核拒绝 - PERSONAL_VEHICLE_AUDIT='personal_vehicle_audit',//1通过2不通过 - AUDIT_STATUS= 'audit_status',//ZZ 0 未审核 1 审核通过 2 拒绝审核 - BILLING_MODEL= 'billing_model',//ZZ 1.SOE差值;2:剩余SOE;3:充电电量;4:SOC差值模型 - MODEL_TIME_STATUS= 'model_time_status',//0启 1 禁 + PERSONAL_VEHICLE_AUDIT = 'personal_vehicle_audit',//1通过2不通过 + AUDIT_STATUS = 'audit_status',//ZZ 0 未审核 1 审核通过 2 拒绝审核 + BILLING_MODEL = 'billing_model',//ZZ 1.SOE差值;2:剩余SOE;3:充电电量;4:SOC差值模型 + MODEL_TIME_STATUS = 'model_time_status',//0启 1 禁 PEAK_PLATEAU_STATE = 'peak_plateau_state', USER_TYPE = 'user_type', USER_NUMBER_STATUS = 'user_number_status', @@ -260,5 +260,10 @@ export enum DICT_TYPE { PAYRESULT = 'payresult', CARTYPE = 'car_type', BTYTYPE = 'bty_type', - BIZTYPE = 'biz_type' + BIZTYPE = 'biz_type', + OUTREPLENISHMENTFLAG = 'out_replenishmentFlag', + OUTORDERSTATUS = 'out_orderStatus', + OUTREPORTINGMODE = 'out_reportingMode', + OUTCHARGSTATUS = 'outcharg_status', + PAYBIZTYPE = 'pay_bizType' } diff --git a/src/views/mall/statistics/member/components/MemberFunnelCard.vue b/src/views/mall/statistics/member/components/MemberFunnelCard.vue index c6005ab..72093e3 100644 --- a/src/views/mall/statistics/member/components/MemberFunnelCard.vue +++ b/src/views/mall/statistics/member/components/MemberFunnelCard.vue @@ -35,7 +35,7 @@
- 武汉站:{{ analyseData?.comparison?.value?.visitUserCount || 504.22 }} + 长沙站:{{ analyseData?.comparison?.value?.visitUserCount || 504.22 }}
+ + + + + + + + + + + + + + + 搜索 + 重置 + + 新增 + + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file +import { dateFormatter } from '@/utils/formatTime' +import download from '@/utils/download' +import { OutChargeOrderApi, OutChargeOrderVO } from '@/api/biz/outchargeorder' +import OutChargeOrderForm from './OutChargeOrderForm.vue' +import { StationInfoApi, StationInfoVO } from '@/api/share/stationinfo' +import { getIntDictOptions, DICT_TYPE } from '@/utils/dict' + +/** 站外充电订单 列表 */ +defineOptions({ name: 'OutChargeOrder' }) + +const message = useMessage() // 消息弹窗 +const { t } = useI18n() // 国际化 + +const loading = ref(true) // 列表的加载中 +const list = ref([]) // 列表的数据 +// 列表的总页数 +const total = ref(0) +const queryParams = reactive({ + pageNo: 1, + pageSize: 10, + stationNo: undefined, + chargeSeriaNumber: undefined, + chargeOrder: undefined, + chargerGunNo: undefined, + batteryId: undefined, + startTime: [], + endTime: [], + startSoc: undefined, + endSoc: undefined, + startSoe: undefined, + endSoe: undefined, + chargingCapacity: undefined, + chargingTime: [], + vin: undefined, + status: undefined, + totalFeeBeforeDiscount: undefined, + discountFee: undefined, + totalFee: undefined, + actualPay: undefined, + theTipElectric: undefined, + theTipPrice: undefined, + theTipExpense: undefined, + peakElectric: undefined, + peakPrice: undefined, + peakExpense: undefined, + flatElectric: undefined, + flatPrice: undefined, + flatExpense: undefined, + theValleyElectric: undefined, + theValleyPrice: undefined, + theValleyExpense: undefined, + amendElectric: undefined, + amendExpense: undefined, + theTipElectricAcMeter: undefined, + peakElectricAcMeter: undefined, + flatElectricAcMeter: undefined, + theValleyElectricAcMeter: undefined, + theTipExpenseAcMeter: undefined, + peakExpenseAcMeter: undefined, + flatExpenseAcMeter: undefined, + theValleyExpenseAcMeter: undefined, + amendElectricAcMeter: undefined, + amendExpenseAcMeter: undefined, + beforeChargingElectric: undefined, + afterChargingElectric: undefined, + freeCharge: undefined, + reportingMode: undefined, + orderStatus: undefined, + epm: undefined, + replenishmentFlag: undefined, + createTime: [], + priceId: undefined, + dateId: undefined, + timeId: undefined +}) +const queryFormRef = ref() // 搜索的表单 +const exportLoading = ref(false) // 导出的加载中 + +/** 查询列表 */ +const getList = async () => { + loading.value = true + try { + const data = await OutChargeOrderApi.getOutChargeOrderPage(queryParams) + list.value = data.list + total.value = data.total + } finally { + loading.value = false + } +} + +const drawerRef = ref() +const open_drawer = (row: any) => { + drawerRef.value.open(row,stationinfoList.value) +} + +/** 搜索按钮操作 */ +const handleQuery = () => { + queryParams.pageNo = 1 + getList() +} + +const handle_stationNo = (data) => { + let str = '' + for (var i = 0; i < stationinfoList.value.length; i++) { + if (data == stationinfoList.value[i].stationNo) { + str = stationinfoList.value[i].stationName + } + } + return str +} + +const stationinfoList = ref([]) +const getStationList = async () => { + try { + const data = await StationInfoApi.getStationInfoList() + // console.log(data, 'data') + stationinfoList.value = data + } finally { + } +} + +/** 重置按钮操作 */ +const resetQuery = () => { + queryFormRef.value.resetFields() + handleQuery() +} + +/** 添加/修改操作 */ +const formRef = ref() +const openForm = (type: string, id?: number) => { + formRef.value.open(type, id) +} + +/** 删除按钮操作 */ +const handleDelete = async (id: number) => { + try { + // 删除的二次确认 + await message.delConfirm() + // 发起删除 + await OutChargeOrderApi.deleteOutChargeOrder(id) + message.success(t('common.delSuccess')) + // 刷新列表 + await getList() + } catch {} +} + +/** 导出按钮操作 */ +const handleExport = async () => { + try { + // 导出的二次确认 + await message.exportConfirm() + // 发起导出 + exportLoading.value = true + const data = await OutChargeOrderApi.exportOutChargeOrder(queryParams) + download.excel(data, '站外充电订单.xls') + } catch { + } finally { + exportLoading.value = false + } +} + +/** 初始化 **/ +onMounted(() => { + getList() + getStationList() +}) + diff --git a/src/views/system/substation/siteManager/StationInfoForm.vue b/src/views/system/substation/siteManager/StationInfoForm.vue index 64b7398..8112e39 100644 --- a/src/views/system/substation/siteManager/StationInfoForm.vue +++ b/src/views/system/substation/siteManager/StationInfoForm.vue @@ -25,7 +25,6 @@ - { formLoading.value = true try { formData.value = await StationInfoApi.getStationInfo(id) - // center_map_data.value = [ - // parseInt(formData.value.longitude), - // parseInt(formData.value.latitude) - // ] - center_map_data.value = [120.177664, 30.350422] - console.log(center_map_data.value, 'center_map_data.value') + center_map_data.value = [ + parseInt(formData.value.longitude), + parseInt(formData.value.latitude) + ] + // center_map_data.value = [120.177664, 30.350422] + // console.log(center_map_data.value, 'center_map_data.value') open_map() } finally { formLoading.value = false