| | |
| | | label-position="top" |
| | | class="order-bill-recharge phone" |
| | | > |
| | | <Chunk borderRadiusSmall> |
| | | <NutFormItem class="bole-form-item" prop="currentUserAccountId"> |
| | | <Chunk borderRadiusSmall :hasPaddingBottom="false"> |
| | | <NutFormItem class="bole-form-item user-account-form-item" prop="currentUserAccountId"> |
| | | <NutRadioGroup |
| | | v-model="form.currentUserAccountId" |
| | | direction="horizontal" |
| | |
| | | shape="button" |
| | | v-for="item in userAccountAllList" |
| | | :key="item.id" |
| | | >{{ item.content }}</NutRadio |
| | | >{{ addStarForPhone(item.content) }}</NutRadio |
| | | > |
| | | </NutRadioGroup> |
| | | <AccountCard |
| | | <AccountCardV2 |
| | | v-if="userAccountAllList.length > 0" |
| | | title="充值手机号" |
| | | :content="form.phone" |
| | | :content="StringUtils.phoneNumberAddSpace(form.phone)" |
| | | :remark="form.remark" |
| | | :showEditBtn="!!form.currentUserAccountId" |
| | | @add="handleAddUserAccount" |
| | | @edit="emit('editUserAccount', form.currentUserAccountId)" |
| | | > |
| | | <template #action> |
| | | <div class="account-card-action" @click="handleAddUserAccount">新增</div> |
| | | </template> |
| | | </AccountCard> |
| | | <AccountAddCard v-else @click="handleAddUserAccount" /> |
| | | </AccountCardV2> |
| | | <AccountAddCardV2 |
| | | content="去添加充值号码" |
| | | remark="添加号码将保存在生活缴费进行管理" |
| | | tip="添加正确号码" |
| | | v-else |
| | | @add="handleAddUserAccount" |
| | | /> |
| | | </NutFormItem> |
| | | </Chunk> |
| | | |
| | | <NutFormItem label="选择充值金额" class="bole-form-item" prop="parValue" required> |
| | | <NutRadioGroup v-model="form.parValue" direction="horizontal" class="parValue-radio-group"> |
| | | <NutRadio |
| | | :label="Number(item)" |
| | | :key="item" |
| | | shape="button" |
| | | v-for="item in parValueList" |
| | | class="parValue-item" |
| | | > |
| | | <div class="parValue-item-inner"> |
| | | <div class="amount-wrapper"> |
| | | <div class="amount">{{ item }}</div> |
| | | <div class="unit">元</div> |
| | | </div> |
| | | <div class="price-wrapper"> |
| | | <div class="price-text">折后</div> |
| | | <div class="price"> |
| | | {{ blLifeRecharge.getRechargeParValue(item, lifePayPhoneRate) }}元 |
| | | <Chunk borderRadiusSmall :hasPaddingBottom="false" title="选择充值金额"> |
| | | <NutFormItem class="bole-form-item" prop="parValue" required> |
| | | <NutRadioGroup v-model="form.parValue" direction="horizontal" class="parValue-radio-group"> |
| | | <NutRadio |
| | | :label="Number(item)" |
| | | :key="item" |
| | | shape="button" |
| | | v-for="item in parValueList" |
| | | class="parValue-item" |
| | | > |
| | | <div class="parValue-item-inner"> |
| | | <div class="amount-wrapper"> |
| | | <div class="amount">{{ item }}</div> |
| | | <div class="unit">元</div> |
| | | </div> |
| | | <div class="price-wrapper"> |
| | | <div class="price-text">折后</div> |
| | | <div class="price"> |
| | | {{ blLifeRecharge.getRechargeParValue(item, lifePayPhoneRate) }}元 |
| | | </div> |
| | | </div> |
| | | <div class="discountTag" v-if="lifePayPhoneRate > 0">{{ lifePayPhoneRate }}折</div> |
| | | <img :src="IconSelect" class="discount-icon" /> |
| | | </div> |
| | | <div class="discountTag" v-if="lifePayPhoneRate > 0">{{ lifePayPhoneRate }}折</div> |
| | | </div> |
| | | </NutRadio> |
| | | </NutRadioGroup> |
| | | </NutFormItem> |
| | | </NutRadio> |
| | | </NutRadioGroup> |
| | | </NutFormItem> |
| | | </Chunk> |
| | | |
| | | <SelectPayTypeFormItem |
| | | v-model="form.lifePayType" |
| | | :showWeixinPay="showWeixinPay" |
| | | :showAliPay="showAliPay" |
| | | ></SelectPayTypeFormItem> |
| | | <div class="common-content"> |
| | | <nut-button class="recharge-button" type="primary" @click="handleSubmit"> |
| | | <nut-button |
| | | class="recharge-button recharge-button-linear" |
| | | type="primary" |
| | | @click="handleSubmit" |
| | | > |
| | | <div class="recharge-button-inner"> |
| | | <div>¥{{ realParValue }}</div> |
| | | <div class="recharge-button-text">立即充值</div> |
| | |
| | | } from '@nutui/nutui-taro'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { reactive, ref, computed, toRef } from 'vue'; |
| | | import { FormValidator, initLifePayType } from '../../utils'; |
| | | import { FormValidator, initLifePayType, addStarForPhone, StringUtils } from '../../utils'; |
| | | import { |
| | | useLifeRechargeContext, |
| | | BlLifeRecharge, |
| | |
| | | import ConfirmDialog from '../../components/Dialog/ConfirmDialog.vue'; |
| | | import ConfirmDialogInfoItem from '../../components/Dialog/ConfirmDialogInfoItem.vue'; |
| | | import { useGetRate, useGetPhoneParValue, useSetUserAccountBySelect } from '../../hooks'; |
| | | import AccountAddCard from '../../components/Card/AccountAddCard.vue'; |
| | | import AccountCard from '../../components/Card/AccountCard.vue'; |
| | | import AccountAddCardV2 from '../../components/Card/AccountAddCardV2.vue'; |
| | | import AccountCardV2 from '../../components/Card/AccountCardV2.vue'; |
| | | import { usePhoneBillRechargeContext, PhoneUserAccountExtraProperties } from './context'; |
| | | import SelectPayTypeFormItem from '../../components/SelectPayTypeFormItem/SelectPayTypeFormItem.vue'; |
| | | import { useSelectPayType, useGetPayStatusByOrderNo } from '../../hooks/selectPayType'; |
| | | import { RechargeProps } from './types'; |
| | | import Chunk from '../../components/Layout/Chunk.vue'; |
| | | import IconSelect from '../../assets/recharge/icon-select.png'; |
| | | |
| | | defineOptions({ |
| | | name: 'PhoneBillRechargeStep2', |
| | |
| | | (e: 'goPay', orderNo: string): void; |
| | | (e: 'paySuccess', orderNo: string): void; |
| | | (e: 'missName', userAccountId: string): void; |
| | | (e: 'editUserAccount', userAccountId: string): void; |
| | | }>(); |
| | | |
| | | const { lifePayPhoneRate } = useGetRate(); |
| | |
| | | |
| | | function handleSubmit() { |
| | | if (!formRef.value) return; |
| | | console.log('form: ', form, formRef.value); |
| | | formRef.value.validate().then(({ valid, errors }: any) => { |
| | | console.log('errors: ', errors); |
| | | if (valid) { |
| | | if (!form.name) { |
| | | emit('missName', form.currentUserAccountId); |