From 8f7bae4a2b70bb3aeb1c2289a7f5dd6a826e88de Mon Sep 17 00:00:00 2001
From: zhengyiming <540361168@qq.com>
Date: 星期二, 01 四月 2025 09:55:38 +0800
Subject: [PATCH] fix: 四期需求

---
 packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue b/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue
index 4a4c43f..36439cc 100644
--- a/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue
+++ b/packages/components/src/views/GasBillRecharge/GasBillRechargeStep3.vue
@@ -136,6 +136,7 @@
 const emit = defineEmits<{
   (e: 'goPay', orderNo: string): void;
   (e: 'paySuccess', orderNo: string): void;
+  (e: 'missName', userAccountId: string): void;
 }>();
 
 const { goTo } = useGasBillRechargeContext();
@@ -155,6 +156,7 @@
   remark: '',
   areaList: [] as string[],
   lifePayType: initLifePayType(props.isInWeChat, props.isInAlipay),
+  name: '',
 });
 
 const { userAccountAllList, handleUserAccountChange } = useSetUserAccountBySelect({
@@ -169,6 +171,7 @@
     form.gasOrgType = currentUserAccount.operators;
 
     form.remark = currentUserAccount.remark;
+    form.name = currentUserAccountExtraProperties.name ?? '';
     const gasParValueItem = gasParValueList.value.find((x) => x.gasOrgCode === form.gasOrgType);
     if (gasParValueItem && gasParValueItem.parValue.every((x) => Number(x) !== form.parValue)) {
       form.parValue = 0;
@@ -208,6 +211,10 @@
   if (!formRef.value) return;
   formRef.value.validate().then(({ valid, errors }: any) => {
     if (valid) {
+      if (!form.name) {
+        emit('missName', form.currentUserAccountId);
+        return;
+      }
       recharge();
     }
   });
@@ -220,7 +227,7 @@
 }
 
 const { state, invokeAliPay, invokeWeixinPay } = useSelectPayType({
-  getOpenId: props.getOpenId,
+  getOpenId: toRef(props, 'getOpenId'),
   isInWeChat: toRef(props, 'isInWeChat'),
   isH5: toRef(props, 'isH5'),
   appId: toRef(props, 'appId'),
@@ -239,6 +246,7 @@
         gasAccount: form.gasAccount,
         province: form.areaList?.[0] ?? '',
         city: form.areaList?.[1] ?? '',
+        // name: form.name,
       },
     };
     let res = await blLifeRecharge.services.createLifePayGasOrder(params);

--
Gitblit v1.9.1