| | |
| | | direction="horizontal" |
| | | class="par-account-list" |
| | | v-if="userAccountAllList.length > 0" |
| | | @change="handleUserAccountChange" |
| | | @change="_handleUserAccountChange" |
| | | > |
| | | <NutRadio |
| | | :label="item.id" |
| | |
| | | <ConfirmDialogInfoItem label="实付金额" :content="`¥${realParValue}`" danger /> |
| | | </template> |
| | | </ConfirmDialog> |
| | | <NutToast :msg="state.msg" v-model:visible="state.show" type="warn" cover /> |
| | | <NutToast :msg="state.msg" v-model:visible="state.show" type="warn" cover :duration="3000" /> |
| | | </NutForm> |
| | | </template> |
| | | |
| | |
| | | import { RechargeProps } from './types'; |
| | | import Chunk from '../../components/Layout/Chunk.vue'; |
| | | import IconSelect from '../../assets/recharge/icon-select.png'; |
| | | import { useCheckCanRecharge } from '../../hooks/rate'; |
| | | |
| | | defineOptions({ |
| | | name: 'PhoneBillRechargeStep2', |
| | |
| | | form.phone = currentUserAccount.content; |
| | | form.ispCode = currentUserAccountExtraProperties.ispCode; |
| | | form.name = currentUserAccountExtraProperties.name; |
| | | |
| | | form.remark = currentUserAccount.remark; |
| | | |
| | | changeIspCode(form.ispCode as any); |
| | | }, |
| | | async getDefaultUserAccount(userAccountList) { |
| | | await ensureLifePayRateChannelAllList(); |
| | | const defaultUserAccount = userAccountList.find((x) => { |
| | | const currentUserAccountExtraProperties = JSON.parse( |
| | | x.extraProperties |
| | | ) as PhoneUserAccountExtraProperties; |
| | | return isCanRecharge(currentUserAccountExtraProperties.ispCode); |
| | | }); |
| | | return defaultUserAccount; |
| | | }, |
| | | }); |
| | | |
| | | function _handleUserAccountChange(userAccountId: string) { |
| | | const currentUserAccount = userAccountAllList.value.find((x) => x.id === userAccountId); |
| | | const currentUserAccountExtraProperties = JSON.parse( |
| | | currentUserAccount.extraProperties |
| | | ) as PhoneUserAccountExtraProperties; |
| | | if (!checkCanRecharge(currentUserAccountExtraProperties.ispCode)) { |
| | | // 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.ispCode)) { |
| | | return; |
| | | } |
| | | let params: LifePhoneDataCreateLifePayOrderInput = { |
| | | userId: blLifeRecharge.accountModel.userId, |
| | | channelId: blLifeRecharge.accountModel.channlesNum, |