From bd7dd96c732ded6854d47bf77f65e5c64d3d15e2 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期三, 21 五月 2025 13:24:09 +0800
Subject: [PATCH] fix: 修改ui
---
packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue | 130 ++++++++++++++++++++++++-------------------
1 files changed, 73 insertions(+), 57 deletions(-)
diff --git a/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue b/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue
index c3c7a81..40844f6 100644
--- a/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue
+++ b/packages/components/src/views/electricBillRecharge/ElectricBillRechargeStep2.vue
@@ -6,71 +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" v-if="lifePayElectricRate > 0">
- {{ 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>
@@ -122,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',
@@ -141,6 +156,7 @@
(e: 'goPay', orderNo: string): void;
(e: 'paySuccess', orderNo: string): void;
(e: 'missName', userAccountId: string): void;
+ (e: 'editUserAccount', userAccountId: string): void;
}>();
const { goTo } = useElectricBillRechargeContext();
--
Gitblit v1.9.1