Handy_Cao hai 1 ano
pai
achega
63e02d2c68
Modificáronse 1 ficheiros con 7 adicións e 6 borrados
  1. 7 6
      src/packages/zrwyt/views/account/certification/Index.vue

+ 7 - 6
src/packages/zrwyt/views/account/certification/Index.vue

@@ -6,7 +6,7 @@
         <Form ref="formRef" class="g-form__container" @submit="onCheckCardNum" :loading="loading">
             <!-- 个人 -->
             <CellGroup v-if="getUserInfoType() === 1" inset>
-                <Field v-model="person.realName" :readonly="isReadonly && customername != ''" name="realName" label="姓名" placeholder="请输入用户姓名" :rules="PFormRules.realName" />
+                <Field v-model="person.realName" :readonly="isReadonly && realName != ''" name="realName" label="姓名" placeholder="请输入用户姓名" :rules="PFormRules.realName" />
                 <Field v-model="person.mobile" name="mobile" readonly label="预留手机号" :rules="PFormRules.mobile"/>
                 <Field name="bankId" label="开户银行" :rules="PFormRules.bankId" is-link>
                     <template #input>
@@ -30,7 +30,7 @@
             </CellGroup>
             <!-- 企业 -->
             <CellGroup inset v-else>
-                <Field v-model="company.realName" :readonly="isReadonly && customername != ''" name="realName" label="法人姓名" placeholder="请输入法人姓名" :rules="CFormRules.realName" />
+                <Field v-model="company.realName" :readonly="isReadonly && realName != ''" name="realName" label="法人姓名" placeholder="请输入法人姓名" :rules="CFormRules.realName" />
                 <Field v-model="company.mobile" name="mobile" readonly label="法人手机号" />
                 <Field v-model="company.companyName" name="companyName" label="企业名称" placeholder="请输入企业名称" :rules="CFormRules.companyName" />
                 <Field v-model="company.creditCode" name="creditCode" label="信用代码" placeholder="请输入社会统一信用代码" :rules="CFormRules.creditCode" />
@@ -59,7 +59,7 @@ import { shallowRef, onMounted, ref, defineAsyncComponent } from 'vue'
 import { useComponent } from '@/hooks/component'
 import { CellGroup, Button, Field, Form, FormInstance, showFailToast, FieldRule, Image, Cell } from 'vant'
 import { fullloading, dialog } from '@/utils/vant';
-import { getFileUrl, getIdCardAge } from '@/filters';
+import { getIdCardAge } from '@/filters';
 import { useRequest } from '@/hooks/request'
 import { queryTencentUsereSignRecords, requestCheckCardNum } from '@/services/api/account';
 import { useRequestBankCard4 } from '@/business/user/account';
@@ -95,6 +95,7 @@ const serialNo = ref<string>('')
 /// 是否只读
 const isReadonly = ref(false)
 const bankaccount = ref('')
+const realName = ref('')
 
 /// 查询托管银行信息
 useRequest(queryBankAccountSign, {
@@ -106,6 +107,9 @@ useRequest(queryBankAccountSign, {
             person.value.bankCard = decryptAES(res.data[0].bankaccountno2)
             person.value.bankId = res.data[0].bankid
             bankaccount.value = res.data[0].bankaccountno2
+            const { bankaccountname } = res.data[0]
+            realName.value = bankaccountname != '' ? bankaccountname : customername
+            person.value.realName = realName.value
         }
     }
 })
@@ -286,13 +290,10 @@ onMounted(() => {
     if (getUserInfoType() === 1) {
         person.value.idCardNo = decryptAES(cardnum)
         person.value.mobile = mobile2
-        person.value.realName = customername
     } else {
         // 企业
         company.value.mobile = mobile2
-        company.value.realName = customername
         company.value.idCardNo = decryptAES(cardnum)
-        company.value.bankCard = decryptAES(bankaccount.value)
     }
 })
 </script>