diff --git a/src/api/member/driver/index.ts b/src/api/member/driver/index.ts index ea0e9fc..bdbd990 100644 --- a/src/api/member/driver/index.ts +++ b/src/api/member/driver/index.ts @@ -93,6 +93,10 @@ export const UserApi = { return await request.download({ url: `/member/user/export-excel`, params }) }, + //重置密码 + resetpassword: async (data: UserVO) => { + return await request.put({ url: `/member/user/update-password`, data }) + }, // ==================== 子表(用户车辆信息) ==================== // 获得用户车辆信息分页 diff --git a/src/api/pay/wallet/account/index.ts b/src/api/pay/wallet/account/index.ts index 56422bd..ee8b3b8 100644 --- a/src/api/pay/wallet/account/index.ts +++ b/src/api/pay/wallet/account/index.ts @@ -24,6 +24,12 @@ export interface WalletVO { // 会员钱包 API export const WalletApi = { + + // 修改余额 + setbalance: async (data: WalletVO) => { + return await request.post({ url: `/pay/wallet/updateWalletBalance`, data }) + }, + // 查询会员钱包分页 getWalletPage: async (params: any) => { return await request.get({ url: `/pay/wallet/page`, params }) diff --git a/src/api/share/stationinfo/index.ts b/src/api/share/stationinfo/index.ts index 17c874b..cc8200e 100644 --- a/src/api/share/stationinfo/index.ts +++ b/src/api/share/stationinfo/index.ts @@ -147,4 +147,8 @@ export const StationInfoApi = { exportStationInfo: async (params) => { return await request.download({ url: `/cloud/station-info/export-excel`, params }) }, + // 启用/禁用 + enableStationInfo: async (data: StationInfoVO) => { + return await request.put({ url: `/cloud/station-info/updateEnable`, data }) + }, } diff --git a/src/api/system/marketingManagement/packageList/index.ts b/src/api/system/marketingManagement/packageList/index.ts new file mode 100644 index 0000000..eae959e --- /dev/null +++ b/src/api/system/marketingManagement/packageList/index.ts @@ -0,0 +1,54 @@ +import request from '@/config/axios' + +// 充电换电套餐 VO +export interface SetMealVO { + // 编号 + id: number + // 换电站编码 + stationNo: string + // 套餐名 + name: string + // 支付金额 + payPrice: number + // 有效月份 + effective: number + // 套餐次数 + frequency: number + // 状态 + status: number + // 套餐类型 + type: number +} + +// 充电换电套餐 API +export const SetMealApi = { + // 查询充电换电套餐分页 + getSetMealPage: async (params: any) => { + return await request.get({ url: `/cloud/set-meal/page`, params }) + }, + + // 查询充电换电套餐详情 + getSetMeal: async (id: number) => { + return await request.get({ url: `/cloud/set-meal/get?id=` + id }) + }, + + // 新增充电换电套餐 + createSetMeal: async (data: SetMealVO) => { + return await request.post({ url: `/cloud/set-meal/create`, data }) + }, + + // 修改充电换电套餐 + updateSetMeal: async (data: SetMealVO) => { + return await request.put({ url: `/cloud/set-meal/update`, data }) + }, + + // 删除充电换电套餐 + deleteSetMeal: async (id: number) => { + return await request.delete({ url: `/cloud/set-meal/delete?id=` + id }) + }, + + // 导出充电换电套餐 Excel + exportSetMeal: async (params) => { + return await request.download({ url: `/cloud/set-meal/export-excel`, params }) + }, +} \ No newline at end of file diff --git a/src/utils/dict.ts b/src/utils/dict.ts index 668ea8c..6834127 100644 --- a/src/utils/dict.ts +++ b/src/utils/dict.ts @@ -138,6 +138,11 @@ REFUND_TYPE = 'refund_type', ELECTRICITYSOURCE_OUT = 'electricitySourceOut', ELECTERICITYPRICEMODEL = 'electricityPriceModel', TOP_UP_STATUS = 'top_up_status', + ENABLE_STATUS = 'enable_status', + + PACKAGE_TYPE = 'package_type',//zz +PACKAGE_STATUS = 'package_status', +SITEMANAGER_SERVICE_STATE = 'siteManager_service_state', PEAK_PLATEAU_STATE = 'peak_plateau_state', USER_TYPE = 'user_type', USER_NUMBER_STATUS = 'user_number_status', diff --git a/src/views/system/accountManagement/fleetAccount/index.vue b/src/views/system/accountManagement/fleetAccount/index.vue index 39c19b9..ab7b971 100644 --- a/src/views/system/accountManagement/fleetAccount/index.vue +++ b/src/views/system/accountManagement/fleetAccount/index.vue @@ -57,9 +57,10 @@ {{ scope.row.freezePrice / 100 }} - + @@ -98,7 +99,7 @@ import { WalletApi, WalletVO } from '@/api/pay/wallet/account' defineOptions({ name: 'PayWallet' }) const message = useMessage() // 消息弹窗 - +const { t } = useI18n() // 国际化 const loading = ref(true) // 列表的加载中 const list = ref([]) // 列表的数据 // 列表的总页数 @@ -171,7 +172,26 @@ const drawerRef = ref() const open_drawer = (row: any) => { drawerRef.value.open(row) } - +/** 修改余额 */ +const setbalance = async (row) => { + try { + // 重置的二次确认 + const result = await message.prompt( + '请输入"' + row.teamName + '"的需要修改余额', + t('common.reminder') + ) + const balance = result.value + // 发起重置 + const params = { + walletId:row.id, + balance:balance + } + await WalletApi.setbalance(params) + getList() + message.success('修改成功' ) + // message.success('修改成功,新密码是:' + balance) + } catch {} +} /** 初始化 **/ onMounted(() => { getList() diff --git a/src/views/system/accountManagement/individualAccount/index.vue b/src/views/system/accountManagement/individualAccount/index.vue index b771d85..bd95631 100644 --- a/src/views/system/accountManagement/individualAccount/index.vue +++ b/src/views/system/accountManagement/individualAccount/index.vue @@ -47,9 +47,10 @@ - + @@ -86,7 +87,7 @@ import { WalletApi, WalletVO } from '@/api/pay/wallet/account' /** 会员钱包 列表 */ defineOptions({ name: 'PayWallet' }) - +const { t } = useI18n() // 国际化 const message = useMessage() // 消息弹窗 const loading = ref(true) // 列表的加载中 @@ -160,7 +161,26 @@ const drawerRef = ref() const open_drawer = (row: any) => { drawerRef.value.open(row) } - +/** 修改余额 */ +const setbalance = async (row) => { + try { + // 重置的二次确认 + const result = await message.prompt( + '请输入"' + row.nickname + '"的需要修改余额', + t('common.reminder') + ) + const balance = result.value + // 发起重置 + const params = { + walletId:row.id, + balance:balance + } + await WalletApi.setbalance(params) + getList() + message.success('修改成功' ) + // message.success('修改成功,新密码是:' + balance) + } catch {} +} /** 初始化 **/ onMounted(() => { getList() diff --git a/src/views/system/customerManagement/driverManagement/index.vue b/src/views/system/customerManagement/driverManagement/index.vue index cdac9e8..112b15b 100644 --- a/src/views/system/customerManagement/driverManagement/index.vue +++ b/src/views/system/customerManagement/driverManagement/index.vue @@ -77,16 +77,16 @@ - + @@ -245,6 +245,24 @@ const open_drawer = (row: any) => { drawerRef.value.open(row) } +/** 重置密码 */ +const handleResetPwd = async (row) => { + try { + // 重置的二次确认 + const result = await message.prompt( + '请输入"' + row.name + '"的新密码', + t('common.reminder') + ) + const password = result.value + // 发起重置 + const params = { + userId:row.id, + password: password + } + await UserApi.resetpassword(params) + message.success('修改成功,新密码是:' + password) + } catch {} +} /** 初始化 **/ onMounted(() => { getList() diff --git a/src/views/system/marketingManagement/packageList/SetMealForm.vue b/src/views/system/marketingManagement/packageList/SetMealForm.vue new file mode 100644 index 0000000..ccb9bbf --- /dev/null +++ b/src/views/system/marketingManagement/packageList/SetMealForm.vue @@ -0,0 +1,159 @@ + + \ No newline at end of file diff --git a/src/views/system/marketingManagement/packageList/index.vue b/src/views/system/marketingManagement/packageList/index.vue new file mode 100644 index 0000000..25995da --- /dev/null +++ b/src/views/system/marketingManagement/packageList/index.vue @@ -0,0 +1,222 @@ + + + \ No newline at end of file diff --git a/src/views/system/marketingManagement/packageManagement/SetMealRecordsForm.vue b/src/views/system/marketingManagement/packageManagement/SetMealRecordsForm.vue index 5213f16..11ce938 100644 --- a/src/views/system/marketingManagement/packageManagement/SetMealRecordsForm.vue +++ b/src/views/system/marketingManagement/packageManagement/SetMealRecordsForm.vue @@ -72,6 +72,18 @@ + + + + + + + + + + --> - + - + - + @@ -115,7 +115,7 @@ const formData = ref({ endTime: undefined, electricityModelId: props.selectId, - // Time:[] + Time:[] }) const formRules = reactive({ name: [{ required: true, message: '计费模型名称不能为空', trigger: 'blur' }], @@ -137,9 +137,9 @@ const open = async (type: string, id?: number) => { if (id) { formLoading.value = true try { - // const res = await ElectricityTimeApi.getElectricityTime(id) - formData.value = await ElectricityTimeApi.getElectricityTime(id) - // formData.value={...res,Time:[res?.startTime,res?.endTime]} + const res = await ElectricityTimeApi.getElectricityTime(id) + // formData.value = await ElectricityTimeApi.getElectricityTime(id) + formData.value={...res,Time:[res?.startTime,res?.endTime]} } finally { formLoading.value = false } @@ -158,8 +158,8 @@ const submitForm = async () => { // formData.value.dateId=props.selectId try { const data = formData.value as unknown as ElectricityTimeApi.ElectricityTimeVO - // data.startTime=formData.value.Time[0] - // data.endTime=formData.value.Time[1] + data.startTime=formData.value.Time[0] + data.endTime=formData.value.Time[1] if (formType.value === 'create') { await ElectricityTimeApi.createElectricityTime(data) message.success(t('common.createSuccess')) diff --git a/src/views/system/substation/binManagement/BinInfoDetails.vue b/src/views/system/substation/binManagement/BinInfoDetails.vue new file mode 100644 index 0000000..2a2482e --- /dev/null +++ b/src/views/system/substation/binManagement/BinInfoDetails.vue @@ -0,0 +1,237 @@ + + + \ No newline at end of file diff --git a/src/views/system/substation/binManagement/index.vue b/src/views/system/substation/binManagement/index.vue index 8a9951e..851c85e 100644 --- a/src/views/system/substation/binManagement/index.vue +++ b/src/views/system/substation/binManagement/index.vue @@ -164,6 +164,7 @@ 编辑 删除 + 详情 @@ -178,6 +179,8 @@ + +