| | |
| | | direction="horizontal" |
| | | class="par-account-list" |
| | | v-if="userAccountAllList.length > 0" |
| | | @change="handleUserAccountChange" |
| | | @change="_handleUserAccountChange" |
| | | > |
| | | <NutRadio |
| | | :label="item.id" |
| | |
| | | import { RechargeProps } from '../PhoneBillRecharge/types'; |
| | | import Chunk from '../../components/Layout/Chunk.vue'; |
| | | import IconSelect from '../../assets/recharge/icon-select.png'; |
| | | import { useCheckCanRecharge } from '../../hooks/rate'; |
| | | |
| | | defineOptions({ |
| | | name: 'GasBillRechargeStep3', |
| | |
| | | form.parValue = 0; |
| | | } |
| | | }, |
| | | async getDefaultUserAccount(userAccountList) { |
| | | await ensureLifePayRateChannelAllList(); |
| | | const defaultUserAccount = userAccountList.find((x) => { |
| | | const currentUserAccountExtraProperties = JSON.parse( |
| | | x.extraProperties |
| | | ) as GasUserAccountExtraProperties; |
| | | return isCanRecharge(currentUserAccountExtraProperties.gasOrgType); |
| | | }); |
| | | return defaultUserAccount; |
| | | }, |
| | | }); |
| | | |
| | | function _handleUserAccountChange(userAccountId: string) { |
| | | const currentUserAccount = userAccountAllList.value.find((x) => x.id === userAccountId); |
| | | const currentUserAccountExtraProperties = JSON.parse( |
| | | currentUserAccount.extraProperties |
| | | ) as GasUserAccountExtraProperties; |
| | | if (!checkCanRecharge(currentUserAccountExtraProperties.gasOrgType)) { |
| | | // return; |
| | | } |
| | | handleUserAccountChange(userAccountId); |
| | | } |
| | | |
| | | function handleAddUserAccount() { |
| | | goTo('step1'); |
| | |
| | | |
| | | const currentOrderNo = ref(''); |
| | | |
| | | const { isCanRecharge, checkCanRecharge, ensureLifePayRateChannelAllList } = useCheckCanRecharge({ |
| | | msg: toRef(state, 'msg'), |
| | | show: toRef(state, 'show'), |
| | | }); |
| | | |
| | | async function goPay() { |
| | | try { |
| | | if (!checkCanRecharge(form.gasOrgType)) { |
| | | return; |
| | | } |
| | | let params: LifeGasDataCreateLifePayOrderInput = { |
| | | userId: blLifeRecharge.accountModel.userId, |
| | | channelId: blLifeRecharge.accountModel.channlesNum, |