| | |
| | | env: { |
| | | // BASE_URL: '"https://testrlywx.boleyuma.com"', |
| | | BASE_URL: '"https://api.81812333.com"', |
| | | BASE_URL_H5: '"http://118.178.252.28:8742"', |
| | | BASE_URL_H5: '"https://testrlywx.boleyuma.com"', |
| | | BASE_URL_JX: '"https://api.jx818.com"', |
| | | |
| | | OSS_URL: '"https://waterdroptest2.oss-cn-hangzhou.aliyuncs.com/"', |
| | |
| | | 'selectPayType/selectPayType', |
| | | 'rechargeResult/rechargeResult', |
| | | 'rechargeElectricResult/rechargeElectricResult', |
| | | 'rechargeGasResult/rechargeGasResult', |
| | | ], |
| | | }, |
| | | { |
| | | root: 'subpackages/order', |
| | | pages: ['order/order', 'orderApplyRefund/orderApplyRefund'], |
| | | pages: [ |
| | | 'order/order', |
| | | 'orderApplyRefund/orderApplyRefund', |
| | | 'orderRefundResult/orderRefundResult', |
| | | ], |
| | | }, |
| | | { |
| | | root: 'subpackages/userAccount', |
| | | pages: ['userAccountList/userAccountList'], |
| | | pages: [ |
| | | 'userAccountList/userAccountList', |
| | | 'editGasUserAccount/editGasUserAccount', |
| | | 'editPhoneUserAccount/editPhoneUserAccount', |
| | | 'editElectricUserAccount/editElectricUserAccount', |
| | | ], |
| | | }, |
| | | ], |
| | | // preloadRule: { |
| | |
| | | selectPayType = '/subpackages/recharge/selectPayType/selectPayType', |
| | | rechargeResult = '/subpackages/recharge/rechargeResult/rechargeResult', |
| | | rechargeElectricResult = '/subpackages/recharge/rechargeElectricResult/rechargeElectricResult', |
| | | rechargeGasResult = '/subpackages/recharge/rechargeGasResult/rechargeGasResult', |
| | | |
| | | order = '/subpackages/order/order/order', |
| | | orderApplyRefund = '/subpackages/order/orderApplyRefund/orderApplyRefund', |
| | | orderRefundResult = '/subpackages/order/orderRefundResult/orderRefundResult', |
| | | userAccountList = '/subpackages/userAccount/userAccountList/userAccountList', |
| | | editGasUserAccount = '/subpackages/userAccount/editGasUserAccount/editGasUserAccount', |
| | | editPhoneUserAccount = '/subpackages/userAccount/editPhoneUserAccount/editPhoneUserAccount', |
| | | editElectricUserAccount = '/subpackages/userAccount/editElectricUserAccount/editElectricUserAccount', |
| | | } |
| | |
| | | <div class="mine-page-top-view" @click="goLogin"> |
| | | <img class="mine-avatar" :src="DefaultAvatar" alt="" /> |
| | | <div class="user-info"> |
| | | <div class="user-info-name" v-if="isLogin">{{ virtualPhoneNumber }}</div> |
| | | <div class="user-info-name" v-if="isLogin">{{ hiddenPhoneNumber(virtualPhoneNumber) }}</div> |
| | | <div class="mine-go-login" v-else>登录</div> |
| | | </div> |
| | | </div> |
| | |
| | | import { useUserStore } from '@/stores/modules/user'; |
| | | import { Message } from '@/utils'; |
| | | import { useLifeRechargeContext } from '@life-payment/core-vue'; |
| | | import { hiddenPhoneNumber } from '@life-payment/utils'; |
| | | |
| | | const { userDetail, virtualPhoneNumber } = useUser(); |
| | | const isLogin = useIsLogin(); |
| | |
| | | |
| | | const orderType = ref('1'); |
| | | |
| | | function goApplyRefund(orderNo: string) { |
| | | function goApplyRefund(id: string) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.orderApplyRefund}?orderNo=${orderNo}`, |
| | | url: `${RouterPath.orderApplyRefund}?id=${id}`, |
| | | // events: { |
| | | // submitApplyRefund: function () {}, |
| | | // }, |
| | |
| | | } |
| | | function goRefundDetail(orderNo: string) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.orderApplyRefund}?orderNo=${orderNo}`, |
| | | url: `${RouterPath.orderRefundResult}?orderNo=${orderNo}`, |
| | | }); |
| | | } |
| | | </script> |
| | |
| | | <template> |
| | | <ContentScrollView :paddingH="false"> |
| | | <OrderApplyRefundView :orderNo="orderNo" /> |
| | | <OrderApplyRefundView :id="id" @submitApplyRefund="submitApplyRefund" /> |
| | | </ContentScrollView> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import Taro from '@tarojs/taro'; |
| | | import { OrderApplyRefundView } from '@life-payment/components'; |
| | | import { goBack } from '@/utils'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | const router = Taro.useRouter(); |
| | | const orderNo = router.params?.orderNo ?? ''; |
| | | const id = router.params?.id ?? ''; |
| | | |
| | | function submitApplyRefund() { |
| | | goBack(); |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <ContentScrollView> |
| | | <OrderRefundResultView |
| | | style="margin-top: 40px" |
| | | @go-back-home="goHome()" |
| | | :orderNo="orderNo" |
| | | ></OrderRefundResultView> |
| | | </ContentScrollView> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { OrderRefundResultView } from '@life-payment/components'; |
| | | import { goHome } from '@/utils'; |
| | | import Taro from '@tarojs/taro'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | const router = Taro.useRouter(); |
| | | const orderNo = router.params?.orderNo ?? ''; |
| | | </script> |
New file |
| | |
| | | export default definePageConfig({ |
| | | disableScroll: true, |
| | | }); |
New file |
| | |
| | | <template> |
| | | <PageLayout title="申请退款" class="orderRefundResult-page-wrapper" hasBorder> |
| | | <InnerPage /> |
| | | </PageLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { PageLayout } from '@/components'; |
| | | import InnerPage from './InnerPage.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'orderRefundResult', |
| | | }); |
| | | </script> |
New file |
| | |
| | | export default definePageConfig({ |
| | | disableScroll: true, |
| | | }); |
New file |
| | |
| | | <template> |
| | | <PageLayout title="充值成功" class="rechargeGasResult-page-wrapper" hasBorder> |
| | | <ContentScrollView> |
| | | <RechargeResultView |
| | | style="margin-top: 40px" |
| | | @go-back-home="goHome()" |
| | | title="支付成功,充值款将在0-72小时内到账" |
| | | > |
| | | <template #tips> |
| | | 同一燃气费账户在充值期间,未到账前切勿在其他任何平台再次充值。因此造成的资金损失须用户自行承担!!! |
| | | </template> |
| | | </RechargeResultView> |
| | | </ContentScrollView> |
| | | </PageLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { PageLayout } from '@/components'; |
| | | import { goHome } from '@/utils'; |
| | | import { RechargeResultView } from '@life-payment/components'; |
| | | |
| | | defineOptions({ |
| | | name: 'rechargeGasResult', |
| | | }); |
| | | </script> |
| | |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.rechargeElectricResult}?orderNo=${orderNo}&lifePayOrderType=${lifePayOrderType}`, |
| | | }); |
| | | } else if (lifePayOrderType === LifeRechargeConstants.LifePayOrderTypeEnum.燃气订单) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.rechargeGasResult}?orderNo=${orderNo}&lifePayOrderType=${lifePayOrderType}`, |
| | | }); |
| | | } |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <ContentScrollView :paddingH="false"> |
| | | <EditElectricUserAccount :id="id" @success="handleSuccess" /> |
| | | </ContentScrollView> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import Taro from '@tarojs/taro'; |
| | | import { EditElectricUserAccount } from '@life-payment/components'; |
| | | import { goBack } from '@/utils'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | const router = Taro.useRouter(); |
| | | const id = router.params?.id ?? ''; |
| | | |
| | | function handleSuccess() { |
| | | goBack(); |
| | | } |
| | | </script> |
New file |
| | |
| | | export default definePageConfig({ |
| | | disableScroll: true, |
| | | }); |
New file |
| | |
| | | <template> |
| | | <PageLayout title="编辑" class="editElectricUserAccount-page-wrapper" hasBorder> |
| | | <InnerPage /> |
| | | </PageLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { PageLayout } from '@/components'; |
| | | import InnerPage from './InnerPage.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'editElectricUserAccount', |
| | | }); |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <ContentScrollView :paddingH="false"> |
| | | <EditGasUserAccount :id="id" @success="handleSuccess" /> |
| | | </ContentScrollView> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import Taro from '@tarojs/taro'; |
| | | import { EditGasUserAccount } from '@life-payment/components'; |
| | | import { goBack } from '@/utils'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | const router = Taro.useRouter(); |
| | | const id = router.params?.id ?? ''; |
| | | |
| | | function handleSuccess() { |
| | | goBack(); |
| | | } |
| | | </script> |
New file |
| | |
| | | export default definePageConfig({ |
| | | disableScroll: true, |
| | | }); |
New file |
| | |
| | | <template> |
| | | <PageLayout title="编辑" class="editGasUserAccount-page-wrapper" hasBorder> |
| | | <InnerPage /> |
| | | </PageLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { PageLayout } from '@/components'; |
| | | import InnerPage from './InnerPage.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'editGasUserAccount', |
| | | }); |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <ContentScrollView :paddingH="false"> |
| | | <EditPhoneUserAccount :id="id" @success="handleSuccess" /> |
| | | </ContentScrollView> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import Taro from '@tarojs/taro'; |
| | | import { EditPhoneUserAccount } from '@life-payment/components'; |
| | | import { goBack } from '@/utils'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | const router = Taro.useRouter(); |
| | | const id = router.params?.id ?? ''; |
| | | |
| | | function handleSuccess() { |
| | | goBack(); |
| | | } |
| | | </script> |
New file |
| | |
| | | export default definePageConfig({ |
| | | disableScroll: true, |
| | | }); |
New file |
| | |
| | | <template> |
| | | <PageLayout title="编辑" class="editPhoneUserAccount-page-wrapper" hasBorder> |
| | | <InnerPage /> |
| | | </PageLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { PageLayout } from '@/components'; |
| | | import InnerPage from './InnerPage.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'editPhoneUserAccount', |
| | | }); |
| | | </script> |
| | |
| | | <template> |
| | | <UserAccountListView /> |
| | | <UserAccountListView @go-edit="handleGoEdit" /> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { UserAccountListView } from '@life-payment/components'; |
| | | import { UserAccountListOutput, LifeRechargeConstants } from '@life-payment/core-vue'; |
| | | import Taro from '@tarojs/taro'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | function handleGoEdit(row: UserAccountListOutput) { |
| | | if (row.lifePayType === LifeRechargeConstants.LifePayOrderTypeEnum.话费订单) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.editPhoneUserAccount}?id=${row.id}`, |
| | | }); |
| | | } else if (row.lifePayType === LifeRechargeConstants.LifePayOrderTypeEnum.电费订单) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.editElectricUserAccount}?id=${row.id}`, |
| | | }); |
| | | } else if (row.lifePayType === LifeRechargeConstants.LifePayOrderTypeEnum.燃气订单) { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.editGasUserAccount}?id=${row.id}`, |
| | | }); |
| | | } |
| | | } |
| | | </script> |
| | |
| | | axiosConfig: config, |
| | | userId: getStorageVirtualUserId()?.virtualUserId ?? '', |
| | | phoneNumber: getStorageVirtualUserId()?.virtualPhoneNumber ?? '', |
| | | channlesNum: '818', |
| | | }); |
| | |
| | | "@life-payment/core-vue": "workspace:^", |
| | | "@nutui/icons-vue-taro": "0.0.9", |
| | | "@nutui/nutui-taro": "4.3.13", |
| | | "@tanstack/vue-query": "4.35.3", |
| | | "@tarojs/components": "3.6.20", |
| | | "@tarojs/taro": "3.6.20", |
| | | "@vitejs/plugin-vue": "^5.1.4", |
| | |
| | | "peerDependencies": { |
| | | "@life-payment/core-vue": "*", |
| | | "@nutui/nutui-taro": "*", |
| | | "@tanstack/vue-query": "4.35.3", |
| | | "@tarojs/components": "*", |
| | | "@tarojs/taro": "*", |
| | | "vue": "*" |
| | |
| | | <div |
| | | class="order-card-action" |
| | | v-if="status === LifeRechargeConstants.LifePayOrderFrontStatusEnum.支付成功" |
| | | @click="emit('goApplyRefund', orderNo)" |
| | | @click="emit('goApplyRefund', id)" |
| | | > |
| | | 申请退款 |
| | | </div> |
| | |
| | | title: string; |
| | | status: LifeRechargeConstants.LifePayOrderFrontStatusEnum; |
| | | orderNo: string; |
| | | id: string; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), {}); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'goApplyRefund', orderNo: string): void; |
| | | (e: 'goApplyRefund', id: string): void; |
| | | (e: 'goRefundDetail', orderNo: string): void; |
| | | }>(); |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <ChooseInput :modelValue="inputValue" @click="handleOpen()" v-bind="$attrs"></ChooseInput> |
| | | <NutPopup v-model:visible="visible" position="bottom"> |
| | | <NutPicker |
| | | :modelValue="modelValue" |
| | | :columns="columns" |
| | | :fieldNames="fieldNames" |
| | | :title="title" |
| | | @cancel="visible = false" |
| | | @confirm="handleConfirm" |
| | | > |
| | | </NutPicker> |
| | | </NutPopup> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | // import { useAllAreaList } from '../../hooks/area'; |
| | | import ChooseInput from './ChooseInput.vue'; |
| | | import { Popup as NutPopup, Picker as NutPicker } from '@nutui/nutui-taro'; |
| | | import { computed, ref } from 'vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'ChooseInputWithAreaPicker', |
| | | }); |
| | | |
| | | // const { findAreaNameFromCode } = useAllAreaList(); |
| | | |
| | | type Props = { |
| | | fieldNames?: object; |
| | | columns: API.AreaTreeNode[]; |
| | | modelValue: Array<string | number>; |
| | | title?: string; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | title: '选择地址', |
| | | fieldNames: () => ({ |
| | | text: 'areaName', |
| | | value: 'areaName', |
| | | children: 'children', |
| | | }), |
| | | }); |
| | | const inputValue = computed(() => props.modelValue.join(',')); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'update:modelValue', val: Array<string | number>): void; |
| | | }>(); |
| | | |
| | | const visible = ref(false); |
| | | |
| | | function handleOpen() { |
| | | visible.value = true; |
| | | } |
| | | |
| | | function handleConfirm({ selectedValue, selectedOptions }) { |
| | | emit( |
| | | 'update:modelValue', |
| | | selectedOptions.map((x) => x.areaName) |
| | | ); |
| | | visible.value = false; |
| | | } |
| | | </script> |
New file |
| | |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { computed } from 'vue'; |
| | | import { useLifeRechargeContext, AreaInfo } from '@life-payment/core-vue'; |
| | | // import { AreaType } from '@12333/constants'; |
| | | |
| | | export function flattenAreaTree(tree: AreaInfo[]) { |
| | | let result = [] as AreaInfo[]; |
| | | |
| | | // 递归函数,用于遍历子节点 |
| | | function flatten(node: AreaInfo) { |
| | | result.push(node); |
| | | |
| | | if (node.children && node.children.length > 0) { |
| | | node.children.forEach(flatten); |
| | | } |
| | | } |
| | | |
| | | // 遍历树的根节点 |
| | | tree.forEach(flatten); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | export function useArea() { |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | const { data: areaStore } = useQuery({ |
| | | queryKey: ['blLifeRecharge/getRegionalManagementList'], |
| | | queryFn: async () => { |
| | | return await blLifeRecharge.services.getRegionalManagementList({ showLoading: false }); |
| | | }, |
| | | placeholderData: () => [] as AreaInfo[], |
| | | staleTime: Infinity, |
| | | select(data) { |
| | | const areaItemMap: Record<AreaInfo['areaCode'], AreaInfo> = {}; |
| | | data.forEach((item) => { |
| | | areaItemMap[item.areaCode] = item; |
| | | }); |
| | | const completeAreaList = flattenAreaTree([...data]); |
| | | return { |
| | | completeAreaList: completeAreaList, |
| | | completeAreaTree: [...data], |
| | | // cityAreaTree: formatAreaListToTree(completeAreaList, 0, AreaType.City), |
| | | provinceList: [...data], |
| | | areaItemMap: areaItemMap, |
| | | }; |
| | | }, |
| | | }); |
| | | |
| | | function getAreaFromCompleteAreaList(areaCode: number) { |
| | | return areaStore.value.completeAreaList.find((x) => x.areaCode === areaCode); |
| | | } |
| | | |
| | | function getAreaByAreaCode(areaCode: number) { |
| | | return areaStore.value.areaItemMap[areaCode]; |
| | | } |
| | | |
| | | return { |
| | | completeAreaList: computed(() => areaStore.value.completeAreaList), |
| | | completeAreaTree: computed(() => areaStore.value.completeAreaTree), |
| | | cityAreaTree: computed(() => |
| | | areaStore.value.completeAreaTree.map((x) => ({ |
| | | ...x, |
| | | children: x.children.map((y) => ({ |
| | | ...y, |
| | | children: undefined, |
| | | })), |
| | | })) |
| | | ), |
| | | provinceList: computed(() => areaStore.value.provinceList), |
| | | areaItemMap: computed(() => areaStore.value.areaItemMap), |
| | | getAreaFromCompleteAreaList, |
| | | getAreaByAreaCode, |
| | | }; |
| | | } |
| | | |
| | | export function useAllAreaList() { |
| | | const { completeAreaTree, provinceList, completeAreaList, cityAreaTree } = useArea(); |
| | | |
| | | const findAreaCodeFromName = (areaName: string) => { |
| | | const areaItem = completeAreaList.value.find((x) => x.areaName === areaName); |
| | | return areaItem?.areaCode ?? 0; |
| | | }; |
| | | |
| | | const findAreaNameFromCode = (areaCode: number) => { |
| | | const areaItem = completeAreaList.value.find((x) => x.areaCode === areaCode); |
| | | return areaItem?.areaName ?? ''; |
| | | }; |
| | | |
| | | const findAreaItemFromCode = (areaCode: number) => { |
| | | const areaItem = completeAreaList.value.find((x) => x.areaCode === areaCode); |
| | | return areaItem; |
| | | }; |
| | | |
| | | return { |
| | | findAreaCodeFromName, |
| | | findAreaNameFromCode, |
| | | findAreaItemFromCode, |
| | | areaTreeList: completeAreaTree, |
| | | provinceList, |
| | | cityAreaTree, |
| | | }; |
| | | } |
| | |
| | | UserAccountListOutput, |
| | | AddUpdateUserAccountInput, |
| | | GasParValueResponse, |
| | | GasParValueOutput, |
| | | } from '@life-payment/core-vue'; |
| | | import { useQuery, useQueryClient } from '@tanstack/vue-query'; |
| | | import { computed, MaybeRef, reactive, unref } from 'vue'; |
| | |
| | | const { data: phoneParValueList, isLoading } = useQuery({ |
| | | queryKey: ['blLifeRecharge/getPhoneParValue'], |
| | | queryFn: async () => { |
| | | return await blLifeRecharge.services.getPhoneParValue({ showLoading: false }); |
| | | return await blLifeRecharge.services.getPhoneParValue({}, { showLoading: false }); |
| | | }, |
| | | select(data) { |
| | | return data?.phoneParValue ?? []; |
| | |
| | | const { data: electricParValueList, isLoading } = useQuery({ |
| | | queryKey: ['blLifeRecharge/getElectricSupportArea'], |
| | | queryFn: async () => { |
| | | return await blLifeRecharge.services.getElectricSupportArea({ showLoading: false }); |
| | | return await blLifeRecharge.services.getElectricSupportArea({}, { showLoading: false }); |
| | | }, |
| | | select(data) { |
| | | return data.electricAreaList ?? []; |
| | |
| | | const { data: gasParValueList, isLoading } = useQuery({ |
| | | queryKey: ['blLifeRecharge/getGasParValue'], |
| | | queryFn: async () => { |
| | | return await blLifeRecharge.services.getGasParValue({ showLoading: false }); |
| | | return await blLifeRecharge.services.getGasParValue({}, { showLoading: false }); |
| | | }, |
| | | select(data) { |
| | | return data?.gasParValue ?? []; |
| | |
| | | export { default as ElectricOrder } from './views/Order/components/ElectricOrder.vue'; |
| | | export { default as GasOrder } from './views/Order/components/GasOrder.vue'; |
| | | export { default as OrderApplyRefundView } from './views/Order/OrderApplyRefundView.vue'; |
| | | export { default as OrderRefundResultView } from './views/Order/OrderRefundResultView.vue'; |
| | | export { default as UserAccountListView } from './views/userAccount/UserAccountListView.vue'; |
| | | export { default as EditPhoneUserAccount } from './views/userAccount/EditPhoneUserAccount.vue'; |
| | | export { default as EditElectricUserAccount } from './views/userAccount/EditElectricUserAccount.vue'; |
| | | export { default as EditGasUserAccount } from './views/userAccount/EditGasUserAccount.vue'; |
| | | export * from './utils'; |
| | |
| | | line-height: 32px; |
| | | } |
| | | |
| | | .recharge-result-view-remark { |
| | | margin-bottom: 40px; |
| | | font-size: 24px; |
| | | color: boleGetCssVar('text-color', 'primary'); |
| | | line-height: 32px; |
| | | } |
| | | |
| | | .recharge-result-view-btn-wrapper { |
| | | display: flex; |
| | | justify-content: center; |
| | |
| | | return Promise.resolve(true); |
| | | } |
| | | |
| | | // static validatorArray(value: any, ruleCfg: FormItemRuleWithoutValidator) { |
| | | // if (!_.isArray(value) || !value?.length) { |
| | | // return Promise.reject(ruleCfg.message); |
| | | // } |
| | | // return Promise.resolve(true); |
| | | // } |
| | | static validatorArray(value: any, ruleCfg: FormItemRuleWithoutValidator) { |
| | | if (!Array.isArray(value) || !value?.length) { |
| | | return Promise.reject(ruleCfg.message); |
| | | } |
| | | return Promise.resolve(true); |
| | | } |
| | | |
| | | // 身份证后六位 |
| | | static validatorIDNumberSix(value: string, ruleCfg: FormItemRuleWithoutValidator) { |
| | |
| | | }>(); |
| | | |
| | | const preSetForm = reactive({ |
| | | gasOrgType: '' as any as LifeRechargeConstants.GasOrgCodeEnum, |
| | | province: '', |
| | | city: '', |
| | | gasOrgType: '', |
| | | // province: '', |
| | | // city: '', |
| | | gasAccount: '', |
| | | remark: '', |
| | | areaList: [] as string[], |
| | | }); |
| | | |
| | | provide(GasBillRechargeContextKey, { |
| | |
| | | label-position="top" |
| | | class="order-bill-recharge electric" |
| | | > |
| | | <slot name="top"></slot> |
| | | <NutFormItem label="所在城市" class="bole-form-item" prop="areaList" required> |
| | | <ChooseInputWithAreaPicker |
| | | :columns="cityAreaTree" |
| | | v-model="form.areaList" |
| | | placeholder="请选择所在城市" |
| | | ></ChooseInputWithAreaPicker> |
| | | </NutFormItem> |
| | | <NutFormItem label="缴费户号" class="bole-form-item" prop="gasAccount" required> |
| | | <NutInput |
| | | v-model.trim="form.gasAccount" |
| | |
| | | import { Form as NutForm, FormItem as NutFormItem, Input as NutInput } from '@nutui/nutui-taro'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { reactive, ref, computed, watch } from 'vue'; |
| | | import { useGetGasParValue } from '../../hooks'; |
| | | import ChooseInputWithAreaPicker from '../../components/Input/ChooseInputWithAreaPicker.vue'; |
| | | import { useAllAreaList } from '../../hooks/area'; |
| | | import { FormValidator } from '../../utils'; |
| | | |
| | | defineOptions({ |
| | | name: 'GasBillRechargeBaseForm', |
| | | }); |
| | | |
| | | const form = defineModel<{ |
| | | province: string; |
| | | city: string; |
| | | gasAccount: string; |
| | | }>('form'); |
| | | const { findAreaNameFromCode, cityAreaTree } = useAllAreaList(); |
| | | |
| | | const { gasParValueList } = useGetGasParValue(); |
| | | const form = defineModel<{ |
| | | // province: string; |
| | | // city: string; |
| | | gasAccount: string; |
| | | areaList: string[]; |
| | | }>('form'); |
| | | |
| | | const rules = reactive<FormRules>({ |
| | | province: [{ required: true, message: '请选择所在区域' }], |
| | | city: [{ required: true, message: '请选择所在城市' }], |
| | | gasAccount: [{ required: true, message: '请输入缴费户号', regex: /^\d{13}$/ }], |
| | | areaList: [ |
| | | { required: true, message: '请选择所在城市', validator: FormValidator.validatorArray }, |
| | | ], |
| | | }); |
| | | |
| | | const formRef = ref<any>(null); |
| | |
| | | <NutForm label-position="top" class="order-bill-recharge gas-bill-recharge-wrapper phone"> |
| | | <NutFormItem class="bole-form-item"> |
| | | <GasOrgTypeCard |
| | | :title="item" |
| | | v-for="(item, gasOrgCodeEnum) in BlLifeRecharge.constants.GasOrgCodeEnumText" |
| | | :key="item" |
| | | @click="goNext(gasOrgCodeEnum)" |
| | | :title="item.gasOrgName" |
| | | v-for="item in gasParValueList" |
| | | :key="item.gasOrgCode" |
| | | @click="goNext(item.gasOrgCode)" |
| | | ></GasOrgTypeCard> |
| | | </NutFormItem> |
| | | <div class="common-content"> |
| | |
| | | import GasOrgTypeCard from './GasOrgTypeCard.vue'; |
| | | import { BlLifeRecharge, LifeRechargeConstants } from '@life-payment/core-vue'; |
| | | import { useGasBillRechargeContext } from './context'; |
| | | import { useGetGasParValue } from '../../hooks'; |
| | | |
| | | defineOptions({ |
| | | name: 'GasBillRechargeStep1', |
| | |
| | | |
| | | const { preSetForm, goToNext, goTo } = useGasBillRechargeContext(); |
| | | |
| | | function goNext(gasOrgType: LifeRechargeConstants.GasOrgCodeEnum) { |
| | | const { gasParValueList } = useGetGasParValue(); |
| | | |
| | | function goNext(gasOrgType: string) { |
| | | preSetForm.gasOrgType = gasOrgType; |
| | | goToNext(); |
| | | } |
| | |
| | | /> |
| | | </NutFormItem> |
| | | <div class="common-content"> |
| | | <nut-button class="recharge-button" type="primary" @click="handleNext"> |
| | | <NutButton class="recharge-button" type="primary" @click="handleNext"> |
| | | <div class="recharge-button-inner"> |
| | | <div class="recharge-button-text">立即充值</div> |
| | | </div> |
| | | </nut-button> |
| | | <nut-button class="recharge-button" type="primary" plain @click="goToPrevious"> |
| | | </NutButton> |
| | | <NutButton class="recharge-button" type="primary" plain @click="goToPrevious"> |
| | | <div class="recharge-button-inner"> |
| | | <div class="recharge-button-text">返回</div> |
| | | </div> |
| | | </nut-button> |
| | | </NutButton> |
| | | </div> |
| | | </GasBillRechargeBaseForm> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { Button as NutButton, FormItem as NutFormItem, Input as NutInput } from '@nutui/nutui-taro'; |
| | | import { reactive, ref, computed, watch } from 'vue'; |
| | | import GasBillRechargeBaseForm from './GasBillRechargeBaseForm.vue'; |
| | | import { useGasBillRechargeContext } from './context'; |
| | |
| | | userId: blLifeRecharge.accountModel.userId, |
| | | lifePayType: LifeRechargeConstants.LifePayOrderTypeEnum.燃气订单, |
| | | content: preSetForm.gasAccount, |
| | | province: preSetForm.province, |
| | | city: preSetForm.city, |
| | | province: preSetForm.areaList?.[0] ?? '', |
| | | city: preSetForm.areaList?.[1] ?? '', |
| | | extraProperties: JSON.stringify(preSetForm), |
| | | operators: preSetForm.gasOrgType, |
| | | remark: preSetForm.remark, |
| | | }; |
| | | await addUpdateUserAccount(params); |
| | | preSetForm.areaList = []; |
| | | preSetForm.gasAccount = ''; |
| | | preSetForm.remark = ''; |
| | | preSetForm.gasOrgType = '' as any; |
| | | goToNext(); |
| | | } catch (error) {} |
| | | } |
| | |
| | | <AccountCard |
| | | v-if="userAccountAllList.length > 0" |
| | | title="充值户号" |
| | | :content="`${form.city} ${form.gasAccount}`" |
| | | :content="`${form.areaList?.[1] ?? ''} ${form.gasAccount}`" |
| | | :remark="form.remark" |
| | | > |
| | | <template #action> |
| | |
| | | <AccountAddCard text="新增户号" v-else @click="handleAddUserAccount" /> |
| | | </NutFormItem> |
| | | |
| | | <NutFormItem |
| | | v-if="!!form.province" |
| | | label="选择充值金额" |
| | | class="bole-form-item" |
| | | prop="parValue" |
| | | required |
| | | > |
| | | <NutFormItem label="选择充值金额" class="bole-form-item" prop="parValue" required> |
| | | <NutRadioGroup v-model="form.parValue" direction="horizontal" class="parValue-radio-group"> |
| | | <!-- <NutRadio |
| | | <NutRadio |
| | | :label="Number(item)" |
| | | :key="item" |
| | | shape="button" |
| | | v-for="item in parValueList" |
| | | v-for="item in gasValueList" |
| | | class="parValue-item" |
| | | > |
| | | <div class="parValue-item-inner"> |
| | |
| | | </div> |
| | | <div class="discountTag">{{ lifePayGasRate }}折</div> |
| | | </div> |
| | | </NutRadio> --> |
| | | </NutRadio> |
| | | </NutRadioGroup> |
| | | </NutFormItem> |
| | | <div class="common-content"> |
| | | <nut-button class="recharge-button" type="primary" @click="handleSubmit"> |
| | | <div class="recharge-button-inner"> |
| | | <!-- <div>¥{{ realParValue }}</div> --> |
| | | <div>¥{{ realParValue }}</div> |
| | | <div class="recharge-button-text">立即充值</div> |
| | | </div> |
| | | </nut-button> |
| | |
| | | <template #info> |
| | | <ConfirmDialogInfoItem |
| | | label="燃气类型" |
| | | :content="blLifeRecharge.constants.GasOrgCodeEnumText[form.gasOrgType]" |
| | | :content="currentGasParValueItem?.gasOrgName ?? ''" |
| | | /> |
| | | <ConfirmDialogInfoItem :label-width="96" label="户号" :content="form.gasAccount" /> |
| | | <ConfirmDialogInfoItem label="充值金额" :content="`¥${form.parValue.toFixed(2)}`" danger /> |
| | |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | const { lifePayGasRate } = useGetRate(); |
| | | const { gasParValueList } = useGetGasParValue(); |
| | | |
| | | const form = reactive({ |
| | | parValue: 0, |
| | | province: '', |
| | | city: '', |
| | | // province: '', |
| | | // city: '', |
| | | gasOrgType: '', |
| | | gasAccount: '', |
| | | currentUserAccountId: '', |
| | | remark: '', |
| | | areaList: [] as string[], |
| | | }); |
| | | |
| | | const { userAccountAllList, handleUserAccountChange } = useSetUserAccountBySelect({ |
| | |
| | | const currentUserAccountExtraProperties = JSON.parse( |
| | | currentUserAccount.extraProperties |
| | | ) as GasUserAccountExtraProperties; |
| | | // form.currentUserAccountId = currentUserAccount.id; |
| | | // form.electricAccount = currentUserAccount.content; |
| | | // form.province = currentUserAccount.province; |
| | | // form.city = currentUserAccount.city; |
| | | form.currentUserAccountId = currentUserAccount.id; |
| | | form.gasAccount = currentUserAccount.content; |
| | | form.areaList = [currentUserAccount.province, currentUserAccount.city]; |
| | | form.gasOrgType = currentUserAccount.operators; |
| | | |
| | | // form.electricType = currentUserAccountExtraProperties.electricType; |
| | | // form.electricAccountType = currentUserAccountExtraProperties.electricAccountType; |
| | | // form.sixID = currentUserAccountExtraProperties.sixID; |
| | | // form.remark = currentUserAccount.remark; |
| | | // const electricParValueItem = electricParValueList.value.find( |
| | | // (x) => x.cityName === form.province |
| | | // ); |
| | | // if ( |
| | | // electricParValueItem && |
| | | // electricParValueItem.parValue.every((x) => Number(x) !== form.parValue) |
| | | // ) { |
| | | // form.parValue = 0; |
| | | // } |
| | | form.remark = currentUserAccount.remark; |
| | | const gasParValueItem = gasParValueList.value.find((x) => x.gasOrgCode === form.gasOrgType); |
| | | if (gasParValueItem && gasParValueItem.parValue.every((x) => Number(x) !== form.parValue)) { |
| | | form.parValue = 0; |
| | | } |
| | | }, |
| | | }); |
| | | |
| | | function handleAddUserAccount() { |
| | | goTo('step1'); |
| | | } |
| | | |
| | | const currentGasParValueItem = computed(() => |
| | | gasParValueList.value.find((x) => x.gasOrgCode === form.gasOrgType) |
| | | ); |
| | | |
| | | const gasValueList = computed(() => { |
| | | const gasValueList = currentGasParValueItem.value?.parValue ?? []; |
| | | return blLifeRecharge.filterParValueList(gasValueList); |
| | | }); |
| | | |
| | | const realParValue = computed(() => |
| | | blLifeRecharge.getRechargeParValue(form.parValue, lifePayGasRate.value) |
| | |
| | | parValue: props.isDev ? 0.1 : form.parValue, |
| | | gasOrgType: form.gasOrgType, |
| | | gasAccount: form.gasAccount, |
| | | province: form.province, |
| | | city: form.city, |
| | | province: form.areaList?.[0] ?? '', |
| | | city: form.areaList?.[1] ?? '', |
| | | }, |
| | | }; |
| | | let res = await blLifeRecharge.services.createLifePayGasOrder(params); |
| | |
| | | } |
| | | |
| | | export type GasUserAccountExtraProperties = { |
| | | gasOrgType: LifeRechargeConstants.GasOrgCodeEnum; |
| | | province: string; |
| | | city: string; |
| | | // gasOrgType: LifeRechargeConstants.GasOrgCodeEnum; |
| | | gasOrgType: string; |
| | | // province: string; |
| | | // city: string; |
| | | gasAccount: string; |
| | | remark: string; |
| | | areaList: string[]; |
| | | }; |
| | |
| | | }); |
| | | |
| | | type Props = { |
| | | orderNo: string; |
| | | id: string; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), {}); |
| | |
| | | async function refundUserLifePayOrder() { |
| | | try { |
| | | let params: RefundUserLifePayOrderInput = { |
| | | id: props.orderNo, |
| | | id: props.id, |
| | | userId: blLifeRecharge.accountModel.userId, |
| | | refundApplyRemark: form.refundApplyRemark, |
| | | }; |
New file |
| | |
| | | <template> |
| | | <LoadingLayout :loading="isLoading"> |
| | | <div class="recharge-result-view"> |
| | | <div class="recharge-result-view-title">{{ title }}</div> |
| | | <div class="recharge-result-view-subtitle">订单号:{{ orderNo }}</div> |
| | | <div class="recharge-result-view-remark"> |
| | | {{ detail.refundCheckRemark }},如有疑问请联系客服 {{ CustomerServicePhone }}(周一到周五 |
| | | 9:00-17:30) |
| | | </div> |
| | | <div class="recharge-result-view-btn-wrapper"> |
| | | <div class="recharge-result-view-btn" @click="emit('goBackHome')">回首页</div> |
| | | </div> |
| | | </div> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { LifeRechargeConstants, useLifeRechargeContext } from '@life-payment/core-vue'; |
| | | import { CustomerServicePhone } from '../../constants'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { computed } from 'vue'; |
| | | import LoadingLayout from '../../components//Layout/LoadingLayout.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'OrderRefundResultView', |
| | | }); |
| | | |
| | | type Props = { |
| | | title?: string; |
| | | orderNo?: string; |
| | | lifePayOrderType?: LifeRechargeConstants.LifePayOrderTypeEnum; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | title: '退款失败', |
| | | }); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'goBackHome'): void; |
| | | }>(); |
| | | |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | const { data: detail, isLoading } = useQuery({ |
| | | queryKey: ['blLifeRecharge/getUserLifePayOrderDetail', props.orderNo], |
| | | queryFn: async () => { |
| | | return await blLifeRecharge.services.getUserLifePayOrderDetail( |
| | | { orderNo: props.orderNo }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | enabled: computed(() => !!props.orderNo), |
| | | }); |
| | | </script> |
| | |
| | | title="电费充值" |
| | | :status="convertOrderFrontStatus(item?.payStatus, item?.lifePayOrderStatus)" |
| | | :order-no="item?.orderNo" |
| | | :id="item?.id" |
| | | @goApplyRefund="emit('goApplyRefund', $event)" |
| | | @goRefundDetail="emit('goRefundDetail', $event)" |
| | | > |
| | |
| | | // const props = withDefaults(defineProps<Props>(), {}); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'goApplyRefund', orderNo: string): void; |
| | | (e: 'goApplyRefund', id: string): void; |
| | | (e: 'goRefundDetail', orderNo: string): void; |
| | | }>(); |
| | | |
| | |
| | | title="燃气充值" |
| | | :status="convertOrderFrontStatus(item?.payStatus, item?.lifePayOrderStatus)" |
| | | :order-no="item?.orderNo" |
| | | :id="item?.id" |
| | | @goApplyRefund="emit('goApplyRefund', $event)" |
| | | @goRefundDetail="emit('goRefundDetail', $event)" |
| | | > |
| | |
| | | // const props = withDefaults(defineProps<Props>(), {}); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'goApplyRefund', orderNo: string): void; |
| | | (e: 'goApplyRefund', id: string): void; |
| | | (e: 'goRefundDetail', orderNo: string): void; |
| | | }>(); |
| | | |
| | |
| | | title="话费充值" |
| | | :status="convertOrderFrontStatus(item?.payStatus, item?.lifePayOrderStatus)" |
| | | :order-no="item?.orderNo" |
| | | :id="item?.id" |
| | | @goApplyRefund="emit('goApplyRefund', $event)" |
| | | @goRefundDetail="emit('goRefundDetail', $event)" |
| | | > |
| | |
| | | // const props = withDefaults(defineProps<Props>(), {}); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'goApplyRefund', orderNo: string): void; |
| | | (e: 'goApplyRefund', id: string): void; |
| | | (e: 'goRefundDetail', orderNo: string): void; |
| | | }>(); |
| | | |
| | |
| | | <div class="recharge-result-view-title">{{ title }}</div> |
| | | <div class="recharge-result-view-subtitle">订单号:{{ orderNo }}</div> |
| | | <div class="recharge-result-view-tips"> |
| | | 同一号码充值期间,未到账前切勿在其他任何平台再次充值。因此造成的资金损失须用户自行承担!!! |
| | | <slot name="tips"> |
| | | 同一号码充值期间,未到账前切勿在其他任何平台再次充值。因此造成的资金损失须用户自行承担!!! |
| | | </slot> |
| | | </div> |
| | | <div class="recharge-result-view-warning"> |
| | | 如接到陌生来电,对方以缴费或误操作等理由要求处理款项,务必立即拉黑,谨防诈骗!!! |
| | |
| | | let params: AddUpdateUserAccountInput = { |
| | | userId: blLifeRecharge.accountModel.userId, |
| | | lifePayType: LifeRechargeConstants.LifePayOrderTypeEnum.电费订单, |
| | | operators: form.electricType, |
| | | content: form.electricAccount, |
| | | province: form.province, |
| | | city: form.city, |
New file |
| | |
| | | <template> |
| | | <LoadingLayout :loading="isLoading"> |
| | | <ElectricBillRechargeBaseForm ref="formRef" v-model:form="form"> |
| | | <NutFormItem label="备注信息" class="bole-form-item" prop="remark"> |
| | | <NutInput |
| | | v-model.trim="form.remark" |
| | | class="bole-input-text" |
| | | placeholder="请输入备注信息" |
| | | type="text" |
| | | max-length="30" |
| | | /> |
| | | </NutFormItem> |
| | | <div class="common-content"> |
| | | <NutButton class="recharge-button" type="primary" @click="handleSave"> |
| | | <div class="recharge-button-inner"> |
| | | <div class="recharge-button-text">保存</div> |
| | | </div> |
| | | </NutButton> |
| | | </div> |
| | | </ElectricBillRechargeBaseForm> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import ElectricBillRechargeBaseForm from '../electricBillRecharge/ElectricBillRechargeBaseForm.vue'; |
| | | import { Button as NutButton } from '@nutui/nutui-taro'; |
| | | import { reactive, ref, computed } from 'vue'; |
| | | import { |
| | | useLifeRechargeContext, |
| | | LifeRechargeConstants, |
| | | AddUpdateUserAccountInput, |
| | | } from '@life-payment/core-vue'; |
| | | import { useAddUpdateUserAccount } from '../../hooks'; |
| | | import LoadingLayout from '../../components//Layout/LoadingLayout.vue'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { ElectricUserAccountExtraProperties } from '../electricBillRecharge/context'; |
| | | |
| | | defineOptions({ |
| | | name: 'EditElectricUserAccount', |
| | | }); |
| | | |
| | | type Props = { |
| | | id?: string; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), {}); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'success'): void; |
| | | }>(); |
| | | |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | const { isLoading } = useQuery({ |
| | | queryKey: ['blLifeRecharge/getUserAccountDetail', props.id], |
| | | queryFn: async () => { |
| | | return await blLifeRecharge.services.getUserAccountDetail( |
| | | { id: props.id }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | onSuccess(data) { |
| | | const currentUserAccountExtraProperties = JSON.parse( |
| | | data.extraProperties |
| | | ) as ElectricUserAccountExtraProperties; |
| | | form.electricAccount = data.content; |
| | | form.province = data.province; |
| | | form.city = data.city; |
| | | |
| | | form.electricType = currentUserAccountExtraProperties.electricType; |
| | | form.electricAccountType = currentUserAccountExtraProperties.electricAccountType; |
| | | form.sixID = currentUserAccountExtraProperties.sixID; |
| | | form.remark = data.remark; |
| | | }, |
| | | enabled: computed(() => !!props.id), |
| | | }); |
| | | |
| | | const form = reactive({ |
| | | electricAccount: '', |
| | | electricType: '', |
| | | electricAccountType: '', |
| | | province: '', |
| | | city: '', |
| | | sixID: '', |
| | | remark: '', |
| | | }); |
| | | |
| | | const formRef = ref<any>(null); |
| | | |
| | | function handleSave() { |
| | | if (!formRef.value) return; |
| | | formRef.value.validate().then(({ valid, errors }: any) => { |
| | | if (valid) { |
| | | handleAddUpdateUserAccount(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | const { addUpdateUserAccount } = useAddUpdateUserAccount(); |
| | | |
| | | async function handleAddUpdateUserAccount() { |
| | | try { |
| | | let params: AddUpdateUserAccountInput = { |
| | | userId: blLifeRecharge.accountModel.userId, |
| | | operators: form.electricType, |
| | | lifePayType: LifeRechargeConstants.LifePayOrderTypeEnum.电费订单, |
| | | content: form.electricAccount, |
| | | province: form.province, |
| | | city: form.city, |
| | | extraProperties: JSON.stringify(form), |
| | | remark: form.remark, |
| | | id: props.id, |
| | | }; |
| | | await addUpdateUserAccount(params); |
| | | emit('success'); |
| | | } catch (error) {} |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <LoadingLayout :loading="isLoading"> |
| | | <GasBillRechargeBaseForm ref="formRef" v-model:form="form"> |
| | | <template #top> |
| | | <NutFormItem label="燃气类型" class="bole-form-item" prop="gasOrgType" required> |
| | | <ChooseInputWithPicker |
| | | v-model="form.gasOrgType" |
| | | placeholder="请选择燃气类型" |
| | | :value-enum="gasParValueList" |
| | | enum-label-key="gasOrgName" |
| | | enum-value-key="gasOrgCode" |
| | | /> |
| | | </NutFormItem> |
| | | </template> |
| | | <NutFormItem label="备注信息" class="bole-form-item" prop="remark"> |
| | | <NutInput |
| | | v-model.trim="form.remark" |
| | | class="bole-input-text" |
| | | placeholder="请输入备注信息" |
| | | type="text" |
| | | max-length="30" |
| | | /> |
| | | </NutFormItem> |
| | | <div class="common-content"> |
| | | <NutButton class="recharge-button" type="primary" @click="handleSave"> |
| | | <div class="recharge-button-inner"> |
| | | <div class="recharge-button-text">保存</div> |
| | | </div> |
| | | </NutButton> |
| | | </div> |
| | | </GasBillRechargeBaseForm> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import GasBillRechargeBaseForm from '../GasBillRecharge/GasBillRechargeBaseForm.vue'; |
| | | import { Button as NutButton } from '@nutui/nutui-taro'; |
| | | import { reactive, ref, computed } from 'vue'; |
| | | import { |
| | | useLifeRechargeContext, |
| | | LifeRechargeConstants, |
| | | AddUpdateUserAccountInput, |
| | | } from '@life-payment/core-vue'; |
| | | import { useAddUpdateUserAccount, useGetGasParValue } from '../../hooks'; |
| | | import LoadingLayout from '../../components//Layout/LoadingLayout.vue'; |
| | | import ChooseInputWithPicker from '../../components//Input/ChooseInputWithPicker.vue'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { GasUserAccountExtraProperties } from '../GasBillRecharge/context'; |
| | | |
| | | defineOptions({ |
| | | name: 'EditGasUserAccount', |
| | | }); |
| | | |
| | | type Props = { |
| | | id?: string; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), {}); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'success'): void; |
| | | }>(); |
| | | |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | const { gasParValueList } = useGetGasParValue(); |
| | | |
| | | const { isLoading } = useQuery({ |
| | | queryKey: ['blLifeRecharge/getUserAccountDetail', props.id], |
| | | queryFn: async () => { |
| | | return await blLifeRecharge.services.getUserAccountDetail( |
| | | { id: props.id }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | onSuccess(data) { |
| | | const currentUserAccountExtraProperties = JSON.parse( |
| | | data.extraProperties |
| | | ) as GasUserAccountExtraProperties; |
| | | form.gasAccount = data.content; |
| | | form.areaList = [data.province, data.city]; |
| | | form.gasOrgType = data.operators as any; |
| | | |
| | | form.remark = data.remark; |
| | | }, |
| | | enabled: computed(() => !!props.id), |
| | | }); |
| | | |
| | | const form = reactive({ |
| | | gasOrgType: '', |
| | | // province: '', |
| | | // city: '', |
| | | gasAccount: '', |
| | | remark: '', |
| | | areaList: [] as string[], |
| | | }); |
| | | |
| | | const formRef = ref<any>(null); |
| | | |
| | | function handleSave() { |
| | | if (!formRef.value) return; |
| | | formRef.value.validate().then(({ valid, errors }: any) => { |
| | | if (valid) { |
| | | handleAddUpdateUserAccount(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | const { addUpdateUserAccount } = useAddUpdateUserAccount(); |
| | | |
| | | async function handleAddUpdateUserAccount() { |
| | | try { |
| | | let params: AddUpdateUserAccountInput = { |
| | | userId: blLifeRecharge.accountModel.userId, |
| | | lifePayType: LifeRechargeConstants.LifePayOrderTypeEnum.燃气订单, |
| | | content: form.gasAccount, |
| | | province: form.areaList?.[0] ?? '', |
| | | city: form.areaList?.[1] ?? '', |
| | | extraProperties: JSON.stringify(form), |
| | | remark: form.remark, |
| | | operators: form.gasOrgType, |
| | | id: props.id, |
| | | }; |
| | | await addUpdateUserAccount(params); |
| | | emit('success'); |
| | | } catch (error) {} |
| | | } |
| | | </script> |
New file |
| | |
| | | <template> |
| | | <LoadingLayout :loading="isLoading"> |
| | | <PhoneBillRechargeBaseForm ref="formRef" v-model:form="form"> |
| | | <NutFormItem label="备注信息" class="bole-form-item" prop="remark"> |
| | | <NutInput |
| | | v-model.trim="form.remark" |
| | | class="bole-input-text" |
| | | placeholder="请输入备注信息" |
| | | type="text" |
| | | max-length="30" |
| | | /> |
| | | </NutFormItem> |
| | | <div class="common-content"> |
| | | <NutButton class="recharge-button" type="primary" @click="handleSave"> |
| | | <div class="recharge-button-inner"> |
| | | <div class="recharge-button-text">保存</div> |
| | | </div> |
| | | </NutButton> |
| | | </div> |
| | | </PhoneBillRechargeBaseForm> |
| | | </LoadingLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import PhoneBillRechargeBaseForm from '../PhoneBillRecharge/PhoneBillRechargeBaseForm.vue'; |
| | | import { Button as NutButton } from '@nutui/nutui-taro'; |
| | | import { reactive, ref, computed } from 'vue'; |
| | | import { |
| | | useLifeRechargeContext, |
| | | LifeRechargeConstants, |
| | | AddUpdateUserAccountInput, |
| | | } from '@life-payment/core-vue'; |
| | | import { useAddUpdateUserAccount } from '../../hooks'; |
| | | import LoadingLayout from '../../components//Layout/LoadingLayout.vue'; |
| | | import { useQuery } from '@tanstack/vue-query'; |
| | | import { PhoneUserAccountExtraProperties } from '../PhoneBillRecharge/context'; |
| | | |
| | | defineOptions({ |
| | | name: 'EditPhoneUserAccount', |
| | | }); |
| | | |
| | | type Props = { |
| | | id?: string; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), {}); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'success'): void; |
| | | }>(); |
| | | |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | const { isLoading } = useQuery({ |
| | | queryKey: ['blLifeRecharge/getUserAccountDetail', props.id], |
| | | queryFn: async () => { |
| | | return await blLifeRecharge.services.getUserAccountDetail( |
| | | { id: props.id }, |
| | | { |
| | | showLoading: false, |
| | | } |
| | | ); |
| | | }, |
| | | onSuccess(data) { |
| | | const currentUserAccountExtraProperties = JSON.parse( |
| | | data.extraProperties |
| | | ) as PhoneUserAccountExtraProperties; |
| | | form.ispCode = currentUserAccountExtraProperties.ispCode; |
| | | form.phone = data.content; |
| | | form.name = currentUserAccountExtraProperties.name; |
| | | form.remark = data.remark; |
| | | }, |
| | | enabled: computed(() => !!props.id), |
| | | }); |
| | | |
| | | const form = reactive({ |
| | | ispCode: '', |
| | | phone: '', |
| | | name: '', |
| | | remark: '', |
| | | }); |
| | | |
| | | const formRef = ref<any>(null); |
| | | |
| | | function handleSave() { |
| | | if (!formRef.value) return; |
| | | formRef.value.validate().then(({ valid, errors }: any) => { |
| | | if (valid) { |
| | | handleAddUpdateUserAccount(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | const { addUpdateUserAccount } = useAddUpdateUserAccount(); |
| | | |
| | | async function handleAddUpdateUserAccount() { |
| | | try { |
| | | let params: AddUpdateUserAccountInput = { |
| | | userId: blLifeRecharge.accountModel.userId, |
| | | operators: form.ispCode, |
| | | lifePayType: LifeRechargeConstants.LifePayOrderTypeEnum.话费订单, |
| | | content: form.phone, |
| | | extraProperties: JSON.stringify(form), |
| | | remark: form.remark, |
| | | id: props.id, |
| | | }; |
| | | await addUpdateUserAccount(params); |
| | | emit('success'); |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | |
| | | }" |
| | | > |
| | | <template #action> |
| | | <div class="account-card-action" @click="handleEditUserAccount">编辑</div> |
| | | <div class="account-card-action" @click="handleEditUserAccount">删除</div> |
| | | <div class="account-card-action" @click="handleEditUserAccount(item)">编辑</div> |
| | | <div class="account-card-action" @click="handleDeleteUserAccount(item)">删除</div> |
| | | </template> |
| | | </AccountCard> |
| | | </template> |
| | |
| | | useLifeRechargeContext, |
| | | QueryUserAccountListInput, |
| | | LifeRechargeConstants, |
| | | UserAccountListOutput, |
| | | } from '@life-payment/core-vue'; |
| | | import { useInfiniteLoading } from '../../hooks/infiniteLoading'; |
| | | import { OrderInputType } from '../../constants'; |
| | |
| | | name: 'UserAccountListView', |
| | | }); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'goEdit', row: UserAccountListOutput): void; |
| | | }>(); |
| | | |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | const TitleMap = { |
| | |
| | | [LifeRechargeConstants.LifePayOrderTypeEnum.燃气订单]: '燃气户号', |
| | | }; |
| | | |
| | | const { infiniteLoadingProps } = useInfiniteLoading( |
| | | const { infiniteLoadingProps, invalidateQueries } = useInfiniteLoading( |
| | | ({ pageParam }) => { |
| | | let params: QueryUserAccountListInput = { |
| | | pageModel: { |
| | | rows: 20, |
| | | page: pageParam, |
| | | orderInput: [{ property: 'id', order: OrderInputType.Desc }], |
| | | orderInput: [{ property: 'creationTime', order: OrderInputType.Desc }], |
| | | }, |
| | | userId: blLifeRecharge.accountModel.userId, |
| | | }; |
| | |
| | | } |
| | | ); |
| | | |
| | | function handleEditUserAccount() {} |
| | | function handleEditUserAccount(row: UserAccountListOutput) { |
| | | emit('goEdit', row); |
| | | } |
| | | |
| | | async function handleDeleteUserAccount(row: UserAccountListOutput) { |
| | | try { |
| | | const res = await Taro.showModal({ |
| | | title: '提示', |
| | | content: '确定要删除该数据吗?', |
| | | confirmColor: '#3a71ff', |
| | | }); |
| | | if (res.confirm) { |
| | | await blLifeRecharge.services.deleteUserAccount({ |
| | | id: row.id, |
| | | }); |
| | | invalidateQueries(); |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | </script> |
| | |
| | | constants = LifeRechargeConstants; |
| | | |
| | | constructor(options: BlLifeRechargeOptions<TResponse, TRequestOptions>) { |
| | | this.services = new BlLifeRechargeServices(options); |
| | | this.services = new BlLifeRechargeServices(this, options); |
| | | this.accountModel = new BlLifeRechargeAccountModel({ |
| | | userId: options.userId, |
| | | phoneNumber: options.phoneNumber, |
| | |
| | | export class BlLifeRechargeAccountModel { |
| | | userId = ''; |
| | | phoneNumber = ''; |
| | | channlesNum = ''; |
| | | |
| | | constructor(options: BlLifeRechargeAccountModelOptions = {}) { |
| | | const { userId = '', phoneNumber = '' } = options; |
| | | const { userId = '', phoneNumber = '', channlesNum } = options; |
| | | this.setUserId(userId); |
| | | this.setPhoneNumber(phoneNumber); |
| | | this.setChannlesNum(channlesNum); |
| | | } |
| | | |
| | | setUserId(userId: string) { |
| | |
| | | setPhoneNumber(phoneNumber: string) { |
| | | this.phoneNumber = phoneNumber; |
| | | } |
| | | setChannlesNum(channlesNum: string) { |
| | | this.channlesNum = channlesNum; |
| | | } |
| | | } |
| | |
| | | import { BlLifeRechargeServicesOptions } from './types'; |
| | | import { LifeRechargeConstants } from './lifeRechargeConstants'; |
| | | import { Request, IRequest } from 'senior-request'; |
| | | import { BlLifeRecharge } from './lifeRecharge'; |
| | | |
| | | export interface RequestConfig {} |
| | | |
| | | export class BlLifeRechargeServices<TResponse = any, TRequestOptions = any> { |
| | | private request: IRequest; |
| | | constructor({ axiosConfig }: BlLifeRechargeServicesOptions<TResponse, TRequestOptions>) { |
| | | ctx: BlLifeRecharge<TResponse, TRequestOptions>; |
| | | |
| | | constructor( |
| | | ctx: BlLifeRecharge<TResponse, TRequestOptions>, |
| | | { axiosConfig }: BlLifeRechargeServicesOptions<TResponse, TRequestOptions> |
| | | ) { |
| | | this.ctx = ctx; |
| | | this.request = Request.create({ |
| | | ...axiosConfig, |
| | | // baseURL: process.env.NODE_ENV === 'development' ? '/' : 'https://api.81812333.com', |
| | | requestInterceptors: [ |
| | | // [ |
| | | // (config) => { |
| | | // console.log('config2: ', config); |
| | | // return config; |
| | | // }, |
| | | // ], |
| | | ...axiosConfig.requestInterceptors, |
| | | ], |
| | | timeout: 10 * 1000, |
| | | headers: { |
| | | Accept: 'application/json, text/plain, */*', |
| | |
| | | } |
| | | |
| | | /** 获取电费充值区域 GET /api/LifePay/GetElectricSupportArea */ |
| | | async getElectricSupportArea(options?: RequestConfig) { |
| | | async getElectricSupportArea(body: ChannelsBaseInput, options?: RequestConfig) { |
| | | return this.request<ElectricSupportAreaResponse>('/api/LifePay/GetElectricSupportArea', { |
| | | method: 'GET', |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取电费面值 GET /api/LifePay/GetElectricParValue */ |
| | | async getElectricParValue(options?: RequestConfig) { |
| | | /** 获取电费面值 POST /api/LifePay/GetElectricParValue */ |
| | | async getElectricParValue(body: ChannelsBaseInput, options?: RequestConfig) { |
| | | return this.request<ElectricParValueResponse>('/api/LifePay/GetElectricParValue', { |
| | | method: 'GET', |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取话费面值 GET /api/LifePay/GetPhoneParValue */ |
| | | async getPhoneParValue(options?: RequestConfig) { |
| | | async getPhoneParValue(body: ChannelsBaseInput, options?: RequestConfig) { |
| | | return this.request<PhoneParValueResponse>('/api/LifePay/GetPhoneParValue', { |
| | | method: 'GET', |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | } |
| | | |
| | | /** 获取燃气面值 GET /api/LifePay/GetGasParValue */ |
| | | async getGasParValue(options?: RequestConfig) { |
| | | async getGasParValue(body: ChannelsBaseInput, options?: RequestConfig) { |
| | | return this.request<GasParValueResponse>('/api/LifePay/GetGasParValue', { |
| | | method: 'GET', |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 删除我的户号 POST /api/LifePay/DeleteUserAccount */ |
| | | async deleteUserAccount( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: APIdeleteUserAccountParams, |
| | | options?: RequestConfig |
| | | ) { |
| | | return this.request<number>('/api/LifePay/DeleteUserAccount', { |
| | | method: 'POST', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取我的户号详情 GET /api/LifePay/GetUserAccountDetail */ |
| | | async getUserAccountDetail( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: APIgetUserAccountDetailParams, |
| | | options?: RequestConfig |
| | | ) { |
| | | return this.request<UserAccountOutput>('/api/LifePay/GetUserAccountDetail', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取我的订单详情 GET /api/LifePay/GetUserLifePayOrderDetail */ |
| | | async getUserLifePayOrderDetail( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: APIgetUserLifePayOrderDetailParams, |
| | | options?: RequestConfig |
| | | ) { |
| | | return this.request<UserLifePayOrderOutput>('/api/LifePay/GetUserLifePayOrderDetail', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 搜索管理--列表(区域管理) GET /api/Area/GetRegionalManagementList */ |
| | | async getRegionalManagementList(options?: RequestConfig) { |
| | | return this.request<AreaInfo[]>('/api/Area/GetRegionalManagementList', { |
| | | method: 'GET', |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | creationTime?: string; |
| | | /** 退款时间 */ |
| | | refundTime?: string; |
| | | /** 退款凭证 */ |
| | | refundCredentialsImgUrl?: string; |
| | | refundApplyRemark?: string; |
| | | refundCheckRemark?: string; |
| | | /** 渠道流水号 */ |
| | | acoolyOrderNo?: string; |
| | | } |
| | | |
| | | export interface ElectricSupportAreaResponse { |
| | |
| | | code?: string; |
| | | message?: string; |
| | | detail?: string; |
| | | gasParValue?: GasParValueOutput; |
| | | gasParValue?: GasParValueOutput[]; |
| | | } |
| | | |
| | | export interface GasParValueOutput { |
| | |
| | | objectData?: any; |
| | | data?: UserAccountListOutput[]; |
| | | } |
| | | |
| | | export interface APIdeleteUserAccountParams { |
| | | id?: string; |
| | | } |
| | | |
| | | export interface APIgetUserAccountDetailParams { |
| | | id?: string; |
| | | } |
| | | |
| | | export interface UserAccountOutput { |
| | | id?: string; |
| | | lifePayType?: LifeRechargeConstants.LifePayOrderTypeEnum; |
| | | /** 运营商 */ |
| | | operators?: string; |
| | | /** 手机号/户号 */ |
| | | content?: string; |
| | | /** 省 */ |
| | | province?: string; |
| | | /** 市 */ |
| | | city?: string; |
| | | /** 拓展字段(电费类型) */ |
| | | extraProperties?: string; |
| | | /** 备注 */ |
| | | remark?: string; |
| | | /** 创建时间 */ |
| | | creationTime?: string; |
| | | isDeleted?: boolean; |
| | | } |
| | | |
| | | export interface APIgetUserLifePayOrderDetailParams { |
| | | orderNo?: string; |
| | | } |
| | | |
| | | export interface ChannelsBaseInput { |
| | | channelId?: string; |
| | | } |
| | | |
| | | export interface AreaInfo { |
| | | areaCode?: number; |
| | | parentId?: number; |
| | | areaName?: string; |
| | | /** 1省 2市 3区 4镇 */ |
| | | layer?: number; |
| | | sort?: number; |
| | | children?: AreaInfo[]; |
| | | /** 简易拼音 */ |
| | | simpleSpelling?: string; |
| | | /** 快速检索 */ |
| | | quickQuery?: string; |
| | | } |
| | |
| | | export type BlLifeRechargeAccountModelOptions = { |
| | | userId?: string; |
| | | phoneNumber?: string; |
| | | channlesNum?: string; |
| | | }; |
| | | |
| | | export type BlLifeRechargeOptions< |
| | |
| | | body: API.QueryUserAccountListInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.UserAccountListOutputPageOutput>('/api/LifePay/GetAccountPage', { |
| | | return request<API.UserAccountOutputPageOutput>('/api/LifePay/GetAccountPage', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 获取电费面值 GET /api/LifePay/GetElectricParValue */ |
| | | export async function getElectricParValue(options?: API.RequestConfig) { |
| | | /** 获取电费面值 POST /api/LifePay/GetElectricParValue */ |
| | | export async function getElectricParValue( |
| | | body: API.ChannelsBaseInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.ElectricParValueResponse>('/api/LifePay/GetElectricParValue', { |
| | | method: 'GET', |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取电费充值区域 GET /api/LifePay/GetElectricSupportArea */ |
| | | export async function getElectricSupportArea(options?: API.RequestConfig) { |
| | | /** 获取电费充值区域 POST /api/LifePay/GetElectricSupportArea */ |
| | | export async function getElectricSupportArea( |
| | | body: API.ChannelsBaseInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.ElectricSupportAreaResponse>('/api/LifePay/GetElectricSupportArea', { |
| | | method: 'GET', |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取燃气支持商户 GET /api/LifePay/GetGasOrgType */ |
| | | export async function getGasOrgType(options?: API.RequestConfig) { |
| | | /** 获取燃气支持商户 POST /api/LifePay/GetGasOrgType */ |
| | | export async function getGasOrgType(body: API.ChannelsBaseInput, options?: API.RequestConfig) { |
| | | return request<API.GasOrgTypeValueResponse>('/api/LifePay/GetGasOrgType', { |
| | | method: 'GET', |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取燃气面值 GET /api/LifePay/GetGasParValue */ |
| | | export async function getGasParValue(options?: API.RequestConfig) { |
| | | /** 获取燃气面值 POST /api/LifePay/GetGasParValue */ |
| | | export async function getGasParValue(body: API.ChannelsBaseInput, options?: API.RequestConfig) { |
| | | return request<API.GasParValueResponse>('/api/LifePay/GetGasParValue', { |
| | | method: 'GET', |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 此处后端没有提供注释 POST /api/LifePay/GetLifePayOrderPageExport */ |
| | | /** 导出订单Excel POST /api/LifePay/GetLifePayOrderPageExport */ |
| | | export async function getLifePayOrderPageExport( |
| | | body: API.QueryLifePayOrderListInput, |
| | | options?: API.RequestConfig |
| | |
| | | |
| | | /** 根据订单号获取支付状态 GET /api/LifePay/GetPayStatusByOrderNo */ |
| | | export async function getPayStatusByOrderNo( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetPayStatusByOrderNoParams, |
| | | body: API.GetPayStatusByOrderNoInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.LifePayStatusEnum>('/api/LifePay/GetPayStatusByOrderNo', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取话费面值 GET /api/LifePay/GetPhoneParValue */ |
| | | export async function getPhoneParValue(options?: API.RequestConfig) { |
| | | /** 获取话费面值 POST /api/LifePay/GetPhoneParValue */ |
| | | export async function getPhoneParValue(body: API.ChannelsBaseInput, options?: API.RequestConfig) { |
| | | return request<API.PhoneParValueResponse>('/api/LifePay/GetPhoneParValue', { |
| | | method: 'GET', |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | body: API.QueryUserAccountAllListInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.UserAccountListOutput[]>('/api/LifePay/GetUserAccountAllList', { |
| | | return request<API.UserAccountOutput[]>('/api/LifePay/GetUserAccountAllList', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 获取我的户号详情 GET /api/LifePay/GetUserAccountDetail */ |
| | | export async function getUserAccountDetail( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetUserAccountDetailParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.UserAccountOutput>('/api/LifePay/GetUserAccountDetail', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取我的户号列表 POST /api/LifePay/GetUserAccountList */ |
| | | export async function getUserAccountList( |
| | | body: API.QueryUserAccountListInput, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.UserAccountListOutputPageOutput>('/api/LifePay/GetUserAccountList', { |
| | | return request<API.UserAccountOutputPageOutput>('/api/LifePay/GetUserAccountList', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json', |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 获取我的订单详情 GET /api/LifePay/GetUserLifePayOrderDetail */ |
| | | export async function getUserLifePayOrderDetail( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetUserLifePayOrderDetailParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.UserLifePayOrderOutput>('/api/LifePay/GetUserLifePayOrderDetail', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 获取我的订单分页数据 POST /api/LifePay/GetUserLifePayOrderPage */ |
| | | export async function getUserLifePayOrderPage( |
| | | body: API.QueryLifePayOrderListInput, |
| | |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIgetPayStatusByOrderNoParams { |
| | | orderNo?: string; |
| | | } |
| | | |
| | | interface APIgetPersonalAttestationParams { |
| | | /** 用户认证Id */ |
| | | id?: string; |
| | |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIgetUserAccountDetailParams { |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIgetUserCanAuthProductListParams { |
| | | companyId?: string; |
| | | } |
| | |
| | | |
| | | interface APIgetUserFollowInfoParams { |
| | | userId?: string; |
| | | } |
| | | |
| | | interface APIgetUserLifePayOrderDetailParams { |
| | | orderNo?: string; |
| | | } |
| | | |
| | | interface APIgetUserLifePayOrderRefundParams { |
| | |
| | | currentPassword: string; |
| | | /** 短信验证码 */ |
| | | verificationCode: string; |
| | | } |
| | | |
| | | interface ChannelsBaseInput { |
| | | checkChannelId?: string; |
| | | } |
| | | |
| | | type ChargeTypeEnum = 1 | 2; |
| | |
| | | code?: string; |
| | | message?: string; |
| | | detail?: string; |
| | | gasParValue?: GasParValueOutput; |
| | | gasParValue?: GasParValueOutput[]; |
| | | } |
| | | |
| | | interface GasSupportMerchantInfos { |
| | |
| | | openId?: string; |
| | | attach?: string; |
| | | payAppId?: string; |
| | | checkChannelId?: string; |
| | | } |
| | | |
| | | interface GetPayStatusByOrderNoInput { |
| | | checkChannelId?: string; |
| | | orderNo?: string; |
| | | } |
| | | |
| | | interface GetPermissionListResultDto { |
| | |
| | | userId?: string; |
| | | /** 渠道Id */ |
| | | channelId?: string; |
| | | checkChannelId?: string; |
| | | productData?: LifeElectricData; |
| | | } |
| | | |
| | |
| | | userId?: string; |
| | | /** 渠道Id */ |
| | | channelId?: string; |
| | | checkChannelId?: string; |
| | | productData?: LifeGasData; |
| | | } |
| | | |
| | |
| | | /** 用户手机号 */ |
| | | phoneNumber?: string; |
| | | lifePayType?: LifePayTypeEnum; |
| | | /** 渠道名称 */ |
| | | channelName?: string; |
| | | lifePayOrderType?: LifePayOrderTypeEnum; |
| | | /** 订单号 */ |
| | | orderNo?: string; |
| | |
| | | type LifePayOrderTypeEnum = 10 | 20 | 30; |
| | | |
| | | interface LifePayPhoneMesssageCodeLoginInput { |
| | | checkChannelId?: string; |
| | | /** 手机号 */ |
| | | phoneNumber: string; |
| | | } |
| | |
| | | userId?: string; |
| | | /** 渠道Id */ |
| | | channelId?: string; |
| | | checkChannelId?: string; |
| | | productData?: LifePhoneData; |
| | | } |
| | | |
| | |
| | | | 30 |
| | | | 31 |
| | | | 32 |
| | | | 40; |
| | | | 40 |
| | | | 42; |
| | | |
| | | interface OrderChangedBzContentInput { |
| | | outBizNo?: string; |
| | |
| | | userId?: string; |
| | | /** 搜索关键词 */ |
| | | keyWords?: string; |
| | | checkChannelId?: string; |
| | | } |
| | | |
| | | interface QueryMatchMakingApplyByOrderInput { |
| | |
| | | h5Type?: string; |
| | | openId?: string; |
| | | attach?: string; |
| | | checkChannelId?: string; |
| | | } |
| | | |
| | | interface SetManyContractTemplateHandSignKeyInput { |
| | |
| | | staffCount?: number; |
| | | } |
| | | |
| | | interface UserAccountListOutput { |
| | | interface UserAccountOutput { |
| | | id?: string; |
| | | lifePayType?: LifePayOrderTypeEnum; |
| | | /** 运营商 */ |
| | |
| | | isDeleted?: boolean; |
| | | } |
| | | |
| | | interface UserAccountListOutputPageOutput { |
| | | interface UserAccountOutputPageOutput { |
| | | pageModel?: Pagination; |
| | | objectData?: any; |
| | | data?: UserAccountListOutput[]; |
| | | data?: UserAccountOutput[]; |
| | | } |
| | | |
| | | interface UserAttentionsDto { |
| | |
| | | |
| | | export const hiddenIDNumberForEnd6 = (realIDNumber: string) => |
| | | realIDNumber.replace(/^(\d+)(.{6})$/, '$1******'); |
| | | |
| | | export const hiddenPhoneNumber = (realPhoneNumbe: string) => |
| | | realPhoneNumbe.replace(/^(.{3})(?:\d+)(.{4})$/, '$1****$2'); |