| | |
| | | ref="formRef" |
| | | :rules="rules" |
| | | label-position="top" |
| | | class="order-bill-recharge phone" |
| | | class="order-bill-recharge phone chunk-form" |
| | | > |
| | | <NutFormItem label="选择运营商:" class="bole-form-item" prop="ispCode" required> |
| | | <NutRadioGroup v-model="form.ispCode" direction="horizontal" @change="handleIspCodeChange"> |
| | | <BlRadio |
| | | :label="key" |
| | | v-for="(val, key) in BlLifeRecharge.constants.IspCodeText" |
| | | :key="key" |
| | | >{{ val }}</BlRadio |
| | | > |
| | | <BlRadio :label="item.code" v-for="item in allRateChannelList" :key="item.id">{{ |
| | | item.rateChannelName |
| | | }}</BlRadio> |
| | | </NutRadioGroup> |
| | | </NutFormItem> |
| | | <NutFormItem label="充值手机号" class="bole-form-item" prop="phone" required> |
| | |
| | | class="bole-input-text" |
| | | placeholder="请填写您需要充值的手机号码" |
| | | type="text" |
| | | placeholderClass="bole-input-text-placeholder" |
| | | /> |
| | | </NutFormItem> |
| | | <NutFormItem |
| | | label="姓名" |
| | | class="bole-form-item" |
| | | prop="name" |
| | | required |
| | | v-if="form.ispCode === BlLifeRecharge.constants.IspCode.dianxin" |
| | | > |
| | | <NutFormItem label="机主姓名" class="bole-form-item" prop="name" required> |
| | | <NutInput |
| | | v-model.trim="form.name" |
| | | class="bole-input-text" |
| | | placeholder="请填写您的姓名" |
| | | placeholder="请填写充值手机号对应的户主姓名" |
| | | type="text" |
| | | placeholderClass="bole-input-text-placeholder" |
| | | /> |
| | | </NutFormItem> |
| | | <slot></slot> |
| | | <NutDialog |
| | | title="提示" |
| | | content="电信可充值区域包括:广东、江苏、湖北、四川、江西、河北、河南、福建、辽宁。其它区域正在分批次进行维护中,在此期间可能会出现充值不成功并自动退款的情况,请您谅解。" |
| | | v-model:visible="dialogVisible" |
| | | /> |
| | | </NutForm> |
| | | <NutDialog |
| | | title="提示" |
| | | content="电信可充值区域包括: 江苏、甘肃、四川、福建、吉林、辽宁、山东、贵州。其它区域正在分批次进行维护中,在此期间可能会出现充值不成功并自动退款的情况,请您谅解。" |
| | | v-model:visible="dialogVisible" |
| | | /> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | |
| | | import BlRadio from '../../components/Radio/Radio.vue'; |
| | | import { FormValidator } from '../../utils'; |
| | | import { BlLifeRecharge, LifeRechargeConstants } from '@life-payment/core-vue'; |
| | | import { useLifePayRateChannelAllList } from '../../hooks/rate'; |
| | | |
| | | defineOptions({ |
| | | name: 'PhoneBillRechargeBaseForm', |
| | |
| | | { required: true, message: '请输入充值手机号' }, |
| | | { validator: FormValidator.validatorPhoneNumber, message: '请输入正确的手机号' }, |
| | | ], |
| | | name: [{ required: true, message: '请输入姓名' }], |
| | | name: [{ required: true, message: '请填写充值手机号对应的户主姓名' }], |
| | | }); |
| | | |
| | | const dialogVisible = ref(false); |
| | | |
| | | const { allRateChannelList } = useLifePayRateChannelAllList({ |
| | | params: { |
| | | lifePayOrderType: LifeRechargeConstants.LifePayOrderTypeEnum.话费订单, |
| | | }, |
| | | }); |
| | | |
| | | function handleIspCodeChange(ispCode: LifeRechargeConstants.IspCode) { |
| | | console.log('ispCode: ', ispCode); |
| | | if (ispCode === LifeRechargeConstants.IspCode.dianxin) { |