From 9453bef1fc4a3121b28ffa6617f0fbfc81d9f634 Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期一, 19 五月 2025 17:35:11 +0800
Subject: [PATCH] fix: 修改首页ui

---
 packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue |   82 ++++++++++++++++++-----------------------
 1 files changed, 36 insertions(+), 46 deletions(-)

diff --git a/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue b/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue
index 591d4cb..1319215 100644
--- a/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue
+++ b/packages/components/src/views/PhoneBillRecharge/PhoneBillRechargeStep2.vue
@@ -6,34 +6,36 @@
     label-position="top"
     class="order-bill-recharge phone"
   >
-    <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.content }}</NutRadio
+    <Chunk borderRadiusSmall>
+      <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"
         >
-      </NutRadioGroup>
-      <AccountCard
-        v-if="userAccountAllList.length > 0"
-        title="鍏呭�兼墜鏈哄彿"
-        :content="form.phone"
-        :remark="form.remark"
-      >
-        <template #action>
-          <div class="account-card-action" @click="handleAddUserAccount">鏂板</div>
-        </template>
-      </AccountCard>
-      <AccountAddCard v-else @click="handleAddUserAccount" />
-    </NutFormItem>
+          <NutRadio
+            :label="item.id"
+            shape="button"
+            v-for="item in userAccountAllList"
+            :key="item.id"
+            >{{ item.content }}</NutRadio
+          >
+        </NutRadioGroup>
+        <AccountCard
+          v-if="userAccountAllList.length > 0"
+          title="鍏呭�兼墜鏈哄彿"
+          :content="form.phone"
+          :remark="form.remark"
+        >
+          <template #action>
+            <div class="account-card-action" @click="handleAddUserAccount">鏂板</div>
+          </template>
+        </AccountCard>
+        <AccountAddCard v-else @click="handleAddUserAccount" />
+      </NutFormItem>
+    </Chunk>
 
     <NutFormItem label="閫夋嫨鍏呭�奸噾棰�" class="bole-form-item" prop="parValue" required>
       <NutRadioGroup v-model="form.parValue" direction="horizontal" class="parValue-radio-group">
@@ -55,7 +57,7 @@
                 {{ blLifeRecharge.getRechargeParValue(item, lifePayPhoneRate) }}鍏�
               </div>
             </div>
-            <div class="discountTag">{{ lifePayPhoneRate }}鎶�</div>
+            <div class="discountTag" v-if="lifePayPhoneRate > 0">{{ lifePayPhoneRate }}鎶�</div>
           </div>
         </NutRadio>
       </NutRadioGroup>
@@ -83,12 +85,6 @@
       </template>
     </ConfirmDialog>
     <NutToast :msg="state.msg" v-model:visible="state.show" type="warn" cover />
-    <NutDialog
-      title="鎻愮ず"
-      :content="dialogState.msg"
-      v-model:visible="dialogState.visible"
-      @ok="onOk"
-    />
   </NutForm>
 </template>
 
@@ -121,6 +117,7 @@
 import SelectPayTypeFormItem from '../../components/SelectPayTypeFormItem/SelectPayTypeFormItem.vue';
 import { useSelectPayType, useGetPayStatusByOrderNo } from '../../hooks/selectPayType';
 import { RechargeProps } from './types';
+import Chunk from '../../components/Layout/Chunk.vue';
 
 defineOptions({
   name: 'PhoneBillRechargeStep2',
@@ -131,11 +128,6 @@
 });
 
 const { goTo } = usePhoneBillRechargeContext();
-
-const dialogState = reactive({
-  visible: false,
-  msg: '',
-});
 
 const form = reactive({
   ispCode: '',
@@ -171,6 +163,7 @@
 const emit = defineEmits<{
   (e: 'goPay', orderNo: string): void;
   (e: 'paySuccess', orderNo: string): void;
+  (e: 'missName', userAccountId: string): void;
 }>();
 
 const { lifePayPhoneRate } = useGetRate();
@@ -206,17 +199,14 @@
 
 const formRef = ref<any>(null);
 
-function onOk() {}
-
 function handleSubmit() {
-  if (!form.name) {
-    dialogState.visible = true;
-    dialogState.msg = '璇峰厛瀹屽杽鎵嬫満鍙锋墍灞炴満涓诲鍚�';
-    return;
-  }
   if (!formRef.value) return;
   formRef.value.validate().then(({ valid, errors }: any) => {
     if (valid) {
+      if (!form.name) {
+        emit('missName', form.currentUserAccountId);
+        return;
+      }
       recharge();
     }
   });

--
Gitblit v1.9.1