From 1910e9f27373b8b4da75f076762025ceb3419965 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期四, 12 六月 2025 15:40:50 +0800
Subject: [PATCH] fix: 暂时隐藏电信充值通道
---
packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue | 140 +++++++++++++++++++++++++++-------------------
1 files changed, 83 insertions(+), 57 deletions(-)
diff --git a/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue b/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue
index ab56c15..40844f6 100644
--- a/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue
+++ b/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue
@@ -6,69 +6,84 @@
label-position="top"
class="order-bill-recharge electric"
>
- <NutFormItem class="bole-form-item" prop="currentUserAccountId">
- <NutRadioGroup
- v-model="form.currentUserAccountId"
- direction="horizontal"
- class="par-account-list"
- v-if="userAccountAllList.length > 0"
- @change="handleUserAccountChange"
- >
- <NutRadio :label="item.id" shape="button" v-for="item in userAccountAllList" :key="item.id"
- >{{ item.city }}-{{ item.content }}</NutRadio
+ <Chunk borderRadiusSmall :hasPaddingBottom="false">
+ <NutFormItem class="bole-form-item user-account-form-item" prop="currentUserAccountId">
+ <NutRadioGroup
+ v-model="form.currentUserAccountId"
+ direction="horizontal"
+ class="par-account-list"
+ v-if="userAccountAllList.length > 0"
+ @change="handleUserAccountChange"
>
- </NutRadioGroup>
- <AccountCard
- v-if="userAccountAllList.length > 0"
- title="鍏呭�兼埛鍙�"
- :content="`${form.city} ${form.electricAccount}`"
- :remark="form.remark"
- >
- <template #action>
- <div class="account-card-action" @click="handleAddUserAccount">鏂板</div>
- </template>
- </AccountCard>
- <AccountAddCard text="鏂板鎴峰彿" v-else @click="handleAddUserAccount" />
- </NutFormItem>
+ <NutRadio
+ :label="item.id"
+ shape="button"
+ v-for="item in userAccountAllList"
+ :key="item.id"
+ >{{ item.city }}-{{ item.content }}</NutRadio
+ >
+ </NutRadioGroup>
+ <AccountCardV2
+ v-if="userAccountAllList.length > 0"
+ :content="`${form.city}-${form.electricAccount}`"
+ :remark="form.remark"
+ :showEditBtn="!!form.currentUserAccountId"
+ @add="handleAddUserAccount"
+ @edit="emit('editUserAccount', form.currentUserAccountId)"
+ >
+ </AccountCardV2>
+ <AccountAddCardV2
+ content="鍘绘坊鍔犲厖鍊兼埛鍙�"
+ remark="娣诲姞鎴峰彿灏嗕繚瀛樺湪鐢熸椿缂磋垂杩涜绠$悊"
+ tip="娣诲姞姝g‘鎴峰彿"
+ v-else
+ @add="handleAddUserAccount"
+ />
+ </NutFormItem>
+ </Chunk>
- <NutFormItem
- v-if="!!form.province"
- 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, lifePayElectricRate) }}鍏�
+ <Chunk borderRadiusSmall :hasPaddingBottom="false" title="閫夋嫨鍏呭�奸噾棰�" v-if="!!form.province">
+ <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, lifePayElectricRate) }}鍏�
+ </div>
+ </div>
+ <div class="discountTag" v-if="lifePayElectricRate > 0">
+ {{ lifePayElectricRate }}鎶�
+ </div>
+ <img :src="IconSelect" class="discount-icon" />
</div>
- <div class="discountTag">{{ lifePayElectricRate }}鎶�</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>
@@ -120,12 +135,14 @@
import ConfirmDialogInfoItem from '../../components/Dialog/ConfirmDialogInfoItem.vue';
import { useGetRate, useGetElectricParValue, useSetUserAccountBySelect } from '../../hooks';
import { FormValidator, initLifePayType } from '../../utils';
-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 { useElectricBillRechargeContext, ElectricUserAccountExtraProperties } from './context';
import SelectPayTypeFormItem from '../../components/SelectPayTypeFormItem/SelectPayTypeFormItem.vue';
import { useSelectPayType, useGetPayStatusByOrderNo } from '../../hooks/selectPayType';
import { RechargeProps } from '../PhoneBillRecharge/types';
+import Chunk from '../../components/Layout/Chunk.vue';
+import IconSelect from '../../assets/recharge/icon-select.png';
defineOptions({
name: 'ElectricBillRechargeStep2',
@@ -138,6 +155,8 @@
const emit = defineEmits<{
(e: 'goPay', orderNo: string): void;
(e: 'paySuccess', orderNo: string): void;
+ (e: 'missName', userAccountId: string): void;
+ (e: 'editUserAccount', userAccountId: string): void;
}>();
const { goTo } = useElectricBillRechargeContext();
@@ -153,6 +172,7 @@
currentUserAccountId: '',
remark: '',
lifePayType: initLifePayType(props.isInWeChat, props.isInAlipay),
+ name: '',
});
const { userAccountAllList, handleUserAccountChange } = useSetUserAccountBySelect({
@@ -170,6 +190,7 @@
form.electricAccountType = currentUserAccountExtraProperties.electricAccountType;
form.sixID = currentUserAccountExtraProperties.sixID;
form.remark = currentUserAccount.remark;
+ form.name = currentUserAccountExtraProperties.name ?? '';
const electricParValueItem = electricParValueList.value.find(
(x) => x.cityName === form.province
);
@@ -216,6 +237,10 @@
if (!formRef.value) return;
formRef.value.validate().then(({ valid, errors }: any) => {
if (valid) {
+ if (!form.name) {
+ emit('missName', form.currentUserAccountId);
+ return;
+ }
recharge();
}
});
@@ -231,7 +256,7 @@
isInWeChat: toRef(props, 'isInWeChat'),
isH5: toRef(props, 'isH5'),
appId: toRef(props, 'appId'),
- getOpenId: props.getOpenId,
+ getOpenId: toRef(props, 'getOpenId'),
});
const currentOrderNo = ref('');
@@ -242,13 +267,14 @@
userId: blLifeRecharge.accountModel.userId,
channelId: blLifeRecharge.accountModel.channlesNum,
productData: {
- parValue: props.isDev ? 0.1 : form.parValue,
+ parValue: form.parValue,
electricType: form.electricType,
electricAccountType: form.electricAccountType,
electricAccount: form.electricAccount,
province: form.province,
city: form.city,
sixID: form.sixID,
+ // name: form.name,
},
};
let res = await blLifeRecharge.services.createLifePayElectricOrder(params);
--
Gitblit v1.9.1