Merge branch 'master' of http://120.26.58.240:8888/r/LifePaymentFront
| | |
| | | root: 'subpackages/recharge', |
| | | pages: [ |
| | | 'phoneBillRecharge/phoneBillRecharge', |
| | | 'electricBillRecharge/electricBillRecharge', |
| | | 'selectPayType/selectPayType', |
| | | 'rechargeResult/rechargeResult', |
| | | ], |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <nut-input |
| | | class="nut-input-text bole-input-text" |
| | | type="text" |
| | | readonly |
| | | alwaysEmbed |
| | | v-bind="$attrs" |
| | | > |
| | | <template #clear> |
| | | <slot name="clear"></slot> |
| | | </template> |
| | | <template #right> |
| | | <slot name="right"> |
| | | <RectRight :size="12" class="common-choose-input-icon" /> |
| | | </slot> |
| | | </template> |
| | | </nut-input> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { RectRight } from '@nutui/icons-vue-taro'; |
| | | |
| | | defineOptions({ |
| | | name: 'ChooseInput', |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/styles/common.scss'; |
| | | |
| | | .common-choose-input-icon { |
| | | // width: 13px; |
| | | // height: 23px; |
| | | margin-left: 18px; |
| | | color: boleGetCssVar('text-color', 'primary'); |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <ChooseInput :modelValue="modelValue" @click="handleOpen()"></ChooseInput> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import ChooseInput from './ChooseInput.vue'; |
| | | import { Popup, DatePicker } from '@nutui/nutui-taro'; |
| | | import { Portal } from 'senin-mini/components'; |
| | | import { h } from 'vue'; |
| | | import dayjs from 'dayjs'; |
| | | |
| | | defineOptions({ |
| | | name: 'ChooseInputWithDatePicker', |
| | | }); |
| | | |
| | | type Props = { |
| | | modelValue: string | number; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), {}); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'update:modelValue', val: string | number): void; |
| | | }>(); |
| | | |
| | | function handleOpen() { |
| | | const _modelValue = [props.modelValue]; |
| | | Portal.add((key) => { |
| | | return h( |
| | | Portal.Container, |
| | | { keyNumber: key, delayOpen: true }, |
| | | { |
| | | default: ({ open, onClose }) => |
| | | h( |
| | | Popup, |
| | | { |
| | | visible: open.value, |
| | | 'onUpdate:visible': (value) => !value && onClose(), |
| | | position: 'bottom', |
| | | }, |
| | | { |
| | | default: () => |
| | | h(DatePicker, { |
| | | modelValue: _modelValue, |
| | | onCancel: onClose, |
| | | onConfirm: ({ selectedValue }) => { |
| | | console.log('selectedValue: ', selectedValue); |
| | | emit('update:modelValue', dayjs(selectedValue).format('YYYY-MM-DD')); |
| | | onClose(); |
| | | }, |
| | | }), |
| | | } |
| | | ), |
| | | } |
| | | ); |
| | | }); |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <ChooseInput :modelValue="inputValue" @click="handleOpen()"></ChooseInput> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import ChooseInput from './ChooseInput.vue'; |
| | | import { Popup, Picker } from '@nutui/nutui-taro'; |
| | | import { convertOptions, ValueEnum } from 'senin-mini/utils'; |
| | | import { Portal } from 'senin-mini/components'; |
| | | import { computed, h } from 'vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'ChooseInputWithPicker', |
| | | }); |
| | | |
| | | type Props = { |
| | | enumLabelKey?: string; |
| | | enumValueKey?: string; |
| | | valueEnum?: ValueEnum; |
| | | modelValue: string | number; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | enumLabelKey: 'name', |
| | | enumValueKey: 'id', |
| | | }); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'update:modelValue', val: string | number): void; |
| | | }>(); |
| | | |
| | | const options = computed(() => |
| | | convertOptions(props.valueEnum, props.enumLabelKey, props.enumValueKey) |
| | | ); |
| | | |
| | | const inputValue = computed( |
| | | () => options.value?.find((x) => x.value === props.modelValue)?.text ?? '' |
| | | ); |
| | | |
| | | function handleOpen() { |
| | | const _modelValue = [props.modelValue]; |
| | | Portal.add((key) => { |
| | | return h( |
| | | Portal.Container, |
| | | { keyNumber: key, delayOpen: true }, |
| | | { |
| | | default: ({ open, onClose }) => |
| | | h( |
| | | Popup, |
| | | { |
| | | visible: open.value, |
| | | 'onUpdate:visible': (value) => !value && onClose(), |
| | | position: 'bottom', |
| | | }, |
| | | { |
| | | default: () => |
| | | h(Picker, { |
| | | modelValue: _modelValue, |
| | | columns: options.value, |
| | | onCancel: onClose, |
| | | onConfirm: ({ selectedValue, selectedOptions }) => { |
| | | console.log('selectedValue: ', selectedValue, selectedOptions); |
| | | emit('update:modelValue', selectedOptions[0].value); |
| | | onClose(); |
| | | }, |
| | | }), |
| | | } |
| | | ), |
| | | } |
| | | ); |
| | | }); |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="common-input-field-wrapper"> |
| | | <div class="common-input-field"> |
| | | <slot></slot> |
| | | </div> |
| | | <RectRight :size="12" class="common-input-field-icon" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { RectRight } from '@nutui/icons-vue-taro'; |
| | | |
| | | defineOptions({ |
| | | name: 'CommonInputField', |
| | | }); |
| | | |
| | | // type Props = {}; |
| | | |
| | | // const props = withDefaults(defineProps<Props>(), {}); |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/styles/common.scss'; |
| | | |
| | | .common-input-field-wrapper { |
| | | display: flex; |
| | | width: 100%; |
| | | |
| | | .common-input-field { |
| | | flex: 1; |
| | | min-width: 0; |
| | | } |
| | | |
| | | .common-input-field-icon { |
| | | margin-left: 18px; |
| | | color: boleGetCssVar('text-color', 'primary'); |
| | | } |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <nut-input type="number" :formatter="formatter" formatTrigger="onBlur" v-model="innerModelValue"> |
| | | <template #right> |
| | | <slot name="right"></slot> |
| | | </template> |
| | | </nut-input> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { computed } from 'vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'NumberInput', |
| | | }); |
| | | |
| | | type Props = { |
| | | min?: number; |
| | | max?: number; |
| | | precision?: number; |
| | | modelValue?: number | string; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | max: Math.pow(2, 53) - 1, |
| | | }); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'update:modelValue', val: string | number): void; |
| | | }>(); |
| | | |
| | | const innerModelValue = computed({ |
| | | get() { |
| | | return props.modelValue + ''; |
| | | }, |
| | | set(val) { |
| | | emit('update:modelValue', val); |
| | | }, |
| | | }); |
| | | |
| | | function formatter(value: string): string { |
| | | const newVal = value !== '' ? Number.parseFloat(value) : ''; |
| | | if (Number.isNaN(newVal)) { |
| | | return ''; |
| | | } |
| | | if (newVal && newVal > props.max) { |
| | | return `${toPrecision(props.max)}`; |
| | | } |
| | | if (props.min !== undefined && !!`${newVal}` && (newVal as number) < props.min) { |
| | | return `${toPrecision(props.min)}`; |
| | | } |
| | | return newVal !== '' ? `${toPrecision(newVal)}` : newVal; |
| | | } |
| | | |
| | | function toPrecision(num: number) { |
| | | if (props.precision) { |
| | | if (props.precision === 0) return Math.round(num); |
| | | let snum = String(num); |
| | | const pointPos = snum.indexOf('.'); |
| | | if (pointPos === -1) return num; |
| | | const nums = snum.replace('.', '').split(''); |
| | | const datum = nums[pointPos + props.precision]; |
| | | if (!datum) return num; |
| | | const length = snum.length; |
| | | if (snum.charAt(length - 1) === '5') { |
| | | snum = `${snum.slice(0, Math.max(0, length - 1))}6`; |
| | | } |
| | | return Number(snum).toFixed(props.precision); |
| | | } |
| | | return String(num); |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | export type ChooseCheckBoxOptionItem = { |
| | | text: string; |
| | | value: string | number; |
| | | }; |
| | |
| | | mine = '/pages/mine/index', |
| | | |
| | | phoneBillRecharge = '/subpackages/recharge/phoneBillRecharge/phoneBillRecharge', |
| | | electricBillRecharge = '/subpackages/recharge/electricBillRecharge/electricBillRecharge', |
| | | selectPayType = '/subpackages/recharge/selectPayType/selectPayType', |
| | | rechargeResult = '/subpackages/recharge/rechargeResult/rechargeResult', |
| | | } |
| | |
| | | <template> |
| | | <PageLayoutWithBg class="index-page-wrapper" :title="'çæ´»ç¼´è´¹'" :need-auth="false"> |
| | | <ContentView> |
| | | <RechargeGrid @phoneBillRecharge="goPhoneBillRecharge" /> |
| | | <RechargeGrid |
| | | @phoneBillRecharge="goPhoneBillRecharge" |
| | | @electricityBillRecharge="goElectricityBillRecharge" |
| | | /> |
| | | </ContentView> |
| | | </PageLayoutWithBg> |
| | | </template> |
| | |
| | | url: `${RouterPath.phoneBillRecharge}`, |
| | | }); |
| | | }); |
| | | const goElectricityBillRecharge = useAccessLogin(() => { |
| | | Taro.navigateTo({ |
| | | url: `${RouterPath.electricBillRecharge}`, |
| | | }); |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | |
| | | </div> |
| | | </div> |
| | | <ContentScrollView> |
| | | <List class="mine-list-wrapper"> |
| | | <List class="mine-list-wrapper" v-if="isLogin"> |
| | | <ListItem title="订å管ç" @click="goOrderManage"></ListItem> |
| | | <ListItem title="éåºç»å½" @click="goLogout"></ListItem> |
| | | </List> |
| | | </ContentScrollView> |
| | | </PageLayoutWithBg> |
| | |
| | | import DefaultAvatar from '@/assets/components/icon-default-avatar.png'; |
| | | import { useSystemStore } from '@/stores/modules/system'; |
| | | import PageLayoutWithBg from '@/components/Layout/PageLayoutWithBg.vue'; |
| | | import { useUserStore } from '@/stores/modules/user'; |
| | | import { useUserStoreWithOut } from '@/stores/modules/user'; |
| | | |
| | | const { userDetail } = useUser(); |
| | | const isLogin = useIsLogin(); |
| | | const systemStore = useSystemStore(); |
| | | const userStore = useUserStore(); |
| | | |
| | | const { goLoginFn } = useGoLogin(); |
| | | const bgHeight = computed(() => 133 + systemStore.navHeight); |
| | |
| | | }); |
| | | |
| | | function goOrderManage() {} |
| | | |
| | | function goLogout() { |
| | | userStore.logout(); |
| | | useUserStoreWithOut().logout(); |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <ContentScrollView :paddingH="false"> |
| | | <electricBillRecharge @goPay="goPay" /> |
| | | </ContentScrollView> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { electricBillRecharge } from '@life-payment/components'; |
| | | import Taro from '@tarojs/taro'; |
| | | |
| | | defineOptions({ |
| | | name: 'InnerPage', |
| | | }); |
| | | |
| | | function goPay() { |
| | | Taro.navigateTo({ |
| | | url: RouterPath.selectPayType, |
| | | }); |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | export default definePageConfig({ |
| | | disableScroll: true, |
| | | }); |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <PageLayout |
| | | title="çµè´¹å
å¼" |
| | | class="electricBillRecharge-page-wrapper" |
| | | hasBorder |
| | | :need-auth="false" |
| | | > |
| | | <InnerPage /> |
| | | </PageLayout> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { PageLayout } from '@/components'; |
| | | import InnerPage from './InnerPage.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'electricBillRecharge', |
| | | }); |
| | | </script> |
| | |
| | | <template> |
| | | <nut-dialog title="è¯·æ ¸å¯¹å
å¼ä¿¡æ¯å¹¶æ¯ä»" v-model:visible="visible"> |
| | | <nut-dialog title="è¯·æ ¸å¯¹å
å¼ä¿¡æ¯å¹¶æ¯ä»" v-model:visible="visible" class="confirm-dialog-wrapper"> |
| | | <div class="confirm-dialog-content"> |
| | | <div class="confirm-dialog-content-tips"> |
| | | 该产å为æ
¢å
模å¼ï¼0-24å°æ¶å
å°è´¦ï¼ä»æè¯·å¿ä»æ¬¾ï¼ å
å¼å请ä»ç»é
读å
å¼é¡»ç¥ï¼ |
| | | <slot name="tips"> |
| | | 该产å为æ
¢å
模å¼ï¼0-24å°æ¶å
å°è´¦ï¼ä»æè¯·å¿ä»æ¬¾ï¼ å
å¼å请ä»ç»é
读å
å¼é¡»ç¥ï¼ |
| | | </slot> |
| | | </div> |
| | | <div class="confirm-dialog-content-info"> |
| | | <slot name="info"></slot> |
| | | </div> |
| | | <div class="confirm-dialog-content-warning"> |
| | | åä¸å·ç å
弿é´ï¼æªå°è´¦ååå¿å¨å
¶ä»ä»»ä½å¹³å°å次å
å¼ãå æ¤é æçèµéæå¤±é¡»ç¨æ·èªè¡æ¿æ
ï¼ï¼ï¼ |
| | | <slot name="warning"> |
| | | åä¸å·ç å
弿é´ï¼æªå°è´¦ååå¿å¨å
¶ä»ä»»ä½å¹³å°å次å
å¼ãå æ¤é æçèµéæå¤±é¡»ç¨æ·èªè¡æ¿æ
ï¼ï¼ï¼ |
| | | </slot> |
| | | </div> |
| | | </div> |
| | | </nut-dialog> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <nut-input |
| | | class="nut-input-text bole-input-text" |
| | | type="text" |
| | | readonly |
| | | alwaysEmbed |
| | | v-bind="$attrs" |
| | | > |
| | | <template #clear> |
| | | <slot name="clear"></slot> |
| | | </template> |
| | | <template #right> |
| | | <slot name="right"> |
| | | <RectRight :size="12" class="common-choose-input-icon" /> |
| | | </slot> |
| | | </template> |
| | | </nut-input> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { RectRight } from '@nutui/icons-vue-taro'; |
| | | |
| | | defineOptions({ |
| | | name: 'ChooseInput', |
| | | }); |
| | | </script> |
| | | |
| | | <style lang="scss"> |
| | | @import '@/styles/common.scss'; |
| | | |
| | | .common-choose-input-icon { |
| | | // width: 13px; |
| | | // height: 23px; |
| | | margin-left: 18px; |
| | | color: boleGetCssVar('text-color', 'primary'); |
| | | } |
| | | </style> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <ChooseInput :modelValue="inputValue" @click="handleOpen()"></ChooseInput> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import ChooseInput from './ChooseInput.vue'; |
| | | import { Popup, Picker } from '@nutui/nutui-taro'; |
| | | import { convertOptions, ValueEnum } from 'senin-mini/utils'; |
| | | import { Portal } from 'senin-mini/components'; |
| | | import { computed, h } from 'vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'ChooseInputWithPicker', |
| | | }); |
| | | |
| | | type Props = { |
| | | enumLabelKey?: string; |
| | | enumValueKey?: string; |
| | | valueEnum?: ValueEnum; |
| | | modelValue: string | number; |
| | | }; |
| | | |
| | | const props = withDefaults(defineProps<Props>(), { |
| | | enumLabelKey: 'name', |
| | | enumValueKey: 'id', |
| | | }); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'update:modelValue', val: string | number): void; |
| | | }>(); |
| | | |
| | | const options = computed(() => |
| | | convertOptions(props.valueEnum, props.enumLabelKey, props.enumValueKey) |
| | | ); |
| | | |
| | | const inputValue = computed( |
| | | () => options.value?.find((x) => x.value === props.modelValue)?.text ?? '' |
| | | ); |
| | | |
| | | function handleOpen() { |
| | | const _modelValue = [props.modelValue]; |
| | | Portal.add((key) => { |
| | | return h( |
| | | Portal.Container, |
| | | { keyNumber: key, delayOpen: true }, |
| | | { |
| | | default: ({ open, onClose }) => |
| | | h( |
| | | Popup, |
| | | { |
| | | visible: open.value, |
| | | 'onUpdate:visible': (value) => !value && onClose(), |
| | | position: 'bottom', |
| | | }, |
| | | { |
| | | default: () => |
| | | h(Picker, { |
| | | modelValue: _modelValue, |
| | | columns: options.value, |
| | | onCancel: onClose, |
| | | onConfirm: ({ selectedValue, selectedOptions }) => { |
| | | console.log('selectedValue: ', selectedValue, selectedOptions); |
| | | emit('update:modelValue', selectedOptions[0].value); |
| | | onClose(); |
| | | }, |
| | | }), |
| | | } |
| | | ), |
| | | } |
| | | ); |
| | | }); |
| | | } |
| | | </script> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | export type ChooseCheckBoxOptionItem = { |
| | | text: string; |
| | | value: string | number; |
| | | }; |
| | |
| | | export { default as RechargeGrid } from './views/RechargeGrid/RechargeGrid.vue'; |
| | | export { default as PhoneBillRecharge } from './views/PhoneBillRecharge/PhoneBillRecharge.vue'; |
| | | export { default as electricBillRecharge } from './views/electricBillRecharge/electricBillRecharge.vue'; |
| | | export { default as SelectPayTypeView } from './views/SelectPayTypeView/SelectPayTypeView.vue'; |
| | | export { default as RechargeResultView } from './views/RechargeResultView/RechargeResultView.vue'; |
| | | export * from './utils'; |
| | |
| | | } |
| | | } |
| | | |
| | | .phone-bill-recharge { |
| | | .order-bill-recharge { |
| | | .recharge-button { |
| | | width: 100%; |
| | | margin: 20px 0; |
| | |
| | | ref="formRef" |
| | | :rules="rules" |
| | | label-position="top" |
| | | class="phone-bill-recharge" |
| | | class="order-bill-recharge phone" |
| | | > |
| | | <FormItem label="éæ©è¿è¥å:" class="bole-form-item" prop="ispCode" required> |
| | | <RadioGroup v-model="form.ispCode" direction="horizontal"> |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <Form |
| | | :model-value="form" |
| | | ref="formRef" |
| | | :rules="rules" |
| | | label-position="top" |
| | | class="order-bill-recharge electric" |
| | | > |
| | | <FormItem label="æå¨åå¸" class="bole-form-item" prop="type" required> |
| | | <ChooseInputWithPicker |
| | | v-model="form.type" |
| | | placeholder="è¯·éæ©åå¸" |
| | | :value-enum="IspCodeText" |
| | | /> |
| | | </FormItem> |
| | | <FormItem label="çµç½ç±»å" class="bole-form-item" prop="type" required> |
| | | <ChooseInputWithPicker |
| | | v-model="form.type" |
| | | placeholder="è¯·éæ©çµç½ç±»å" |
| | | :value-enum="IspCodeText" |
| | | /> |
| | | </FormItem> |
| | | <FormItem label="çµè´¹ç±»å" class="bole-form-item" prop="type" required> |
| | | <ChooseInputWithPicker |
| | | v-model="form.type" |
| | | placeholder="è¯·éæ©çµè´¹ç±»å" |
| | | :value-enum="IspCodeText" |
| | | /> |
| | | </FormItem> |
| | | <FormItem label="çµç½æ·å·" class="bole-form-item" prop="phone" required> |
| | | <Input |
| | | v-model.trim="form.phone" |
| | | class="bole-input-text" |
| | | placeholder="请è¾å
¥13使°åç¼å·" |
| | | type="text" |
| | | /> |
| | | </FormItem> |
| | | <FormItem label="éæ©å
å¼éé¢" class="bole-form-item" prop="parValue" required> |
| | | <RadioGroup v-model="form.parValue" direction="horizontal" class="parValue-radio-group"> |
| | | <Radio |
| | | :label="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, rate) }}å
</div> |
| | | </div> |
| | | <div class="discountTag">{{ rate * 100 }}æ</div> |
| | | </div> |
| | | </Radio> |
| | | </RadioGroup> |
| | | </FormItem> |
| | | <div class="common-content"> |
| | | <nut-button class="recharge-button" type="primary" @click="recharge"> |
| | | <div class="recharge-button-inner"> |
| | | <div>ï¿¥{{ realParValue }}</div> |
| | | <div class="recharge-button-text">ç«å³å
å¼</div> |
| | | </div> |
| | | </nut-button> |
| | | <RechargeTipsView :tips="tips" /> |
| | | </div> |
| | | <ConfirmDialog v-model:visible="confirmDialogVisible" @ok="goPay"> |
| | | <template #tips> |
| | | 该产å为æ
¢å
模å¼ï¼0-72å°æ¶å
å°è´¦ï¼ä»æè¯·å¿ä»æ¬¾ï¼å
å¼å请ä»ç»é
读å
å¼é¡»ç¥ï¼ |
| | | </template> |
| | | <template #info> |
| | | <ConfirmDialogInfoItem label="çµç½ç±»å" content="å½å®¶çµç½" /> |
| | | <ConfirmDialogInfoItem label="çµè´¹ç±»å" content="ä½å®
" /> |
| | | <ConfirmDialogInfoItem label="å
å¼éé¢" :content="`ï¿¥${form.parValue}`" danger /> |
| | | <ConfirmDialogInfoItem label="伿 éé¢" :content="`ï¿¥${discountParValue}`" /> |
| | | <ConfirmDialogInfoItem label="å®ä»éé¢" :content="`ï¿¥${realParValue}`" danger /> |
| | | </template> |
| | | <template #warning> |
| | | åä¸çµè´¹è´¦æ·å¨å
弿é´ï¼æªå°è´¦ååå¿å¨å
¶ä»ä»»ä½å¹³å°å次å
å¼ãå æ¤é æçèµéæå¤±é¡»ç¨æ·èªè¡æ¿æ
ï¼ï¼ï¼ |
| | | </template> |
| | | </ConfirmDialog> |
| | | </Form> |
| | | </template> |
| | | |
| | | <script setup lang="ts"> |
| | | import { Form, FormItem, RadioGroup, Radio, Input, Button as NutButton } from '@nutui/nutui-taro'; |
| | | import { FormRules } from '@nutui/nutui-taro/dist/types/__VUE/form/types'; |
| | | import { reactive, ref, computed } from 'vue'; |
| | | import BlRadio from '../../components/Radio/Radio.vue'; |
| | | import { IspCodeText, IspCode } from '../../constants'; |
| | | import { useLifeRechargeContext } from '../../utils'; |
| | | import RechargeTipsView from '../../components/RechargeTipsView/RechargeTipsView.vue'; |
| | | import ConfirmDialog from '../../components/Dialog/ConfirmDialog.vue'; |
| | | import ConfirmDialogInfoItem from '../../components/Dialog/ConfirmDialogInfoItem.vue'; |
| | | import ChooseInputWithPicker from '../../components/Input/ChooseInputWithPicker.vue'; |
| | | |
| | | defineOptions({ |
| | | name: 'electricBillRecharge', |
| | | }); |
| | | |
| | | const emit = defineEmits<{ |
| | | (e: 'goPay'): void; |
| | | }>(); |
| | | |
| | | const form = reactive({ |
| | | ispCode: IspCode.yidong, |
| | | phone: '', |
| | | parValue: 100, |
| | | type: IspCodeText.yidong, |
| | | }); |
| | | |
| | | const rate = 0.96; |
| | | |
| | | const parValueList = [100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1500, 2000, 3000]; |
| | | |
| | | const realParValue = computed(() => blLifeRecharge.getRechargeParValue(form.parValue, rate)); |
| | | const discountParValue = computed(() => form.parValue - Number(realParValue.value)); |
| | | |
| | | const { blLifeRecharge } = useLifeRechargeContext(); |
| | | |
| | | const rules = reactive<FormRules>({}); |
| | | |
| | | const formRef = ref<any>(null); |
| | | |
| | | function handleSubmit() { |
| | | if (!formRef.value) return; |
| | | formRef.value.validate().then(({ valid, errors }: any) => { |
| | | if (valid) { |
| | | } |
| | | }); |
| | | } |
| | | |
| | | const tips = [ |
| | | '平尿便
¢å
æå¡ï¼è®¢åæäº¤åï¼çµè´¹å°äº0 - 72 å°æ¶å
å°è´¦ï¼è¥æªè½ææ¶å°è´¦ï¼ç³»ç»å°èªå¨åèµ·éæ¬¾ã', |
| | | 'å
弿é´ï¼è¥åä¸è´¦æ·çå
弿¬¾æªå°è´¦ï¼è¯·å¿å¨å
¶ä»å¹³å°éå¤å
å¼ï¼å ä¸è¿°æä½å¯¼è´çèµéæå¤±ï¼ç±ç¨æ·èªè¡æ¿æ
ã', |
| | | '为确ä¿å
å¼é¡ºå©è¿è¡ï¼ç®åå¹³å°ä¸æ¯æå¯¹æ¬ 款éé¢è¶
è¿1000å
çè´¦æ·è¿è¡å
å¼ï¼ä¸æ¯æ¬¡å
å¼éé¢å¿
é¡»é«äºæ¬ è´¹æ»é¢ã', |
| | | '妿¥å°éçæ¥çµï¼å¯¹æ¹ä»¥ç¼´è´¹æè¯¯æä½ççç±è¦æ±å¤ç款项ï¼å¡å¿
ç«å³æé»ï¼è°¨é²è¯éªã', |
| | | 'ä¸åæ¶ï¼è¯·æ¨å¡å¿
å确填å宿´ççå¸åæ·å·ä¿¡æ¯ãå
å¼å®æåï¼å票ç±è¿è¥åæä¾ï¼æ¨å¯ç»å½ç½ä¸è¥ä¸å
ä¸è½½å¯¹åºççµåå票ã', |
| | | ]; |
| | | |
| | | const confirmDialogVisible = ref(false); |
| | | |
| | | function recharge() { |
| | | confirmDialogVisible.value = true; |
| | | } |
| | | |
| | | function goPay() { |
| | | emit('goPay'); |
| | | } |
| | | </script> |
| | | <style lang="scss"> |
| | | .order-bill-recharge { |
| | | &.electric { |
| | | .nut-dialog { |
| | | .nut-dialog__content { |
| | | max-height: 700px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |