li.shaoyi 1 anno fa
parent
commit
4c698a7677

+ 2 - 0
src/packages/mobile/views/account/authresult/Index.vue

@@ -9,6 +9,8 @@
                 <Cell :title="$t('user.authentication.cardtype')"
                     :value="getCertificateTypeCodeName(userInfo.cardtypeid)" />
                 <Cell :title="$t('user.authentication.cardnum')" :value="userInfo.cardnum" />
+                <Cell title="银行名称" :value="userInfo.bankbankname" />
+                <Cell title="银行卡号" :value="userInfo.bankaccount" />
                 <Cell :title="$t('user.authentication.cardfrontphoto')">
                     <Image fit="contain" :src="getFileUrl(userInfo.cardfrontphotourl)" width="100" height="100" />
                 </Cell>

+ 44 - 12
src/packages/mobile/views/account/certification/Index.vue

@@ -5,38 +5,52 @@
         </template>
         <Form ref="formRef" class="g-form__container" @submit="onSubmit">
             <CellGroup inset>
-                <Field v-model="formData.username" name="username" :label="$t('user.authentication.customername')" :placeholder="$t('user.authentication.pleaseentertheusername')"
-                    :rules="formRules.username" />
+                <Field v-model="formData.username" name="username" :label="$t('user.authentication.customername')"
+                    :placeholder="$t('user.authentication.pleaseentertheusername')" :rules="formRules.username" />
                 <Field name="cardtype" :label="$t('user.authentication.cardtype')" :rules="formRules.cardtype" is-link>
                     <template #input>
-                        <app-select v-model="formData.cardtype" :placeholder="$t('user.authentication.pleaseselectthecardtype')"
+                        <app-select v-model="formData.cardtype"
+                            :placeholder="$t('user.authentication.pleaseselectthecardtype')"
                             :options="getCerTypePersonList()" />
                     </template>
                 </Field>
-                <Field v-model="formData.cardnum" name="cardnum" :label="$t('user.authentication.cardnum')" 
-                   :placeholder="$t('user.authentication.pleaseenterthecardnum')" :rules="formRules.cardnum" />
-                <Field name="cardfrontphotourl" :label="$t('user.authentication.cardfrontphoto')" :rules="formRules.cardfrontphotourl">
+                <Field v-model="formData.cardnum" name="cardnum" :label="$t('user.authentication.cardnum')"
+                    :placeholder="$t('user.authentication.pleaseenterthecardnum')" :rules="formRules.cardnum" />
+                <Field name="bankid" label="开户银行" :rules="formRules.bankid" is-link>
+                    <template #input>
+                        <app-select v-model="formData.bankid" placeholder="请选择开户银行" :options="banklist"
+                            :optionProps="{ label: 'bankname', value: 'bankid' }" />
+                    </template>
+                </Field>
+                <Field label="银行卡号" v-model="formData.bankaccount" name="bankaccount" placeholder="请输入银行卡号"
+                    :rules="formRules.bankaccount" />
+                <Field name="cardfrontphotourl" :label="$t('user.authentication.cardfrontphoto')"
+                    :rules="formRules.cardfrontphotourl">
                     <template #input>
                         <app-uploader @success="b_afterRead" />
                     </template>
                 </Field>
-                <Field name="cardbackphotourl" v-if="showCardBackPhoto === '1'" :label="$t('user.authentication.cardbackphoto')" :rules="formRules.cardbackphotourl">
+                <Field name="cardbackphotourl" v-if="showCardBackPhoto === '1'"
+                    :label="$t('user.authentication.cardbackphoto')" :rules="formRules.cardbackphotourl">
                     <template #input>
                         <app-uploader @success="f_afterRead" />
                     </template>
                 </Field>
-                <Field name="halfbodyphotourl" v-if="showHalfBodyPhoto === '1'" :label="halfBodyPhotoTitle" :rules="formRules.halfbodyphotourl">
+                <Field name="halfbodyphotourl" v-if="showHalfBodyPhoto === '1'" :label="halfBodyPhotoTitle"
+                    :rules="formRules.halfbodyphotourl">
                     <template #input>
                         <app-uploader @success="h_afterRead" />
                     </template>
                 </Field>
-                <Field v-if="modifyremark != ''" v-model="modifyremark" readonly name="modifyremark" :label="$t('user.authentication.modifyremark')" />
+                <Field v-if="modifyremark != ''" v-model="modifyremark" readonly name="modifyremark"
+                    :label="$t('user.authentication.modifyremark')" />
             </CellGroup>
         </Form>
         <img src="../../../assets/images/certification.png" />
         <template #footer>
             <div class="g-form__footer inset">
-                <Button type="danger" @click="formRef?.submit" round block>{{ $t('user.authentication.submit') }}</Button>
+                <Button type="danger" @click="formRef?.submit" round block>{{ $t('user.authentication.submit')
+                    }}</Button>
             </div>
         </template>
     </app-view>
@@ -53,6 +67,7 @@ import { getIdCardAge } from '@/filters'
 import { validateRules } from '@/constants/regex'
 import { useRequest } from '@/hooks/request'
 import { getWskhOpenAccountConfigs } from '@/services/api/account'
+import { useQueryCusBankSignBank } from '@/business/bank'
 import { i18n } from '@/stores'
 import AppUploader from '@mobile/components/base/uploader/index.vue'
 import AppSelect from '@mobile/components/base/select/index.vue'
@@ -60,12 +75,14 @@ import AppSelect from '@mobile/components/base/select/index.vue'
 const formRef = shallowRef<FormInstance>()
 const { formData, formSubmit, modifyremark } = addAuthReq()
 const { router } = useNavigation()
-const { global: { t }} = i18n
+const { global: { t } } = i18n
 
 const showHalfBodyPhoto = shallowRef('0')
 const showCardBackPhoto = shallowRef('0')
 const halfBodyPhotoTitle = shallowRef(t('user.authentication.halfbodyphoto'))
 
+const { banklist } = useQueryCusBankSignBank()
+
 // 获取网上开户配置
 useRequest(getWskhOpenAccountConfigs, {
     params: {
@@ -92,7 +109,7 @@ const h_afterRead = (filePath: string) => {
 }
 
 // 表单验证规则
-const formRules: { [key in keyof Model.AddAuthReq]?: FieldRule[] } = {
+const formRules: { [key:string]: FieldRule[] } = {
     username: [{
         required: true,
         message: t("user.authentication.pleaseentertheusername"),
@@ -122,6 +139,21 @@ const formRules: { [key in keyof Model.AddAuthReq]?: FieldRule[] } = {
         required: true,
         message: t("user.authentication.pleaseuploadthecardfrontphoto"),
     }],
+    bankid: [{
+        message: '请选择开户银行',
+        validator: () => {
+            return !!formData.bankid
+        }
+    }],
+    bankaccount: [{
+        message: '请输入银行卡号',
+        validator: (val) => {
+            if (validateRules.bankcardno.validate(val)) {
+                return true
+            }
+            return validateRules.bankcardno.message
+        }
+    }],
 }
 
 const onSubmit = () => {

+ 7 - 5
src/types/model/user.d.ts

@@ -247,6 +247,8 @@ declare namespace Model {
         mobile?: string
         // 用户类型
         userinfotype?: number;
+        bankid?; //银行编码
+        bankaccount?; //银行帐号
     }
 
     interface AddAuthRsp {
@@ -330,8 +332,8 @@ declare namespace Model {
         userId?: number
     }
 
-     /// 通过合同名和模板 id 直接发起签署流程 -请求
-     interface CreateFlowByTemplateDirectlyReq {
+    /// 通过合同名和模板 id 直接发起签署流程 -请求
+    interface CreateFlowByTemplateDirectlyReq {
         /// 用户类型 1-个人 2-企业
         userType?: number
         /// 用户电子签记录表ID
@@ -341,7 +343,7 @@ declare namespace Model {
         /// 个人信息
         personInfo?: PersonInfo
     }
-    
+
     interface PersonInfo {
         /// 身份证号码,目前只支持身份证
         idCardNumber?: string
@@ -366,7 +368,7 @@ declare namespace Model {
         /// 合同签署小程序URL
         signUrl: string
     }
-    
+
     /// 按用户 ID 和机构 ID 创建机构交易协议申请信息 - 请求
     interface InitMdUserSwapProtocolReq {
         /// 所属会员ID
@@ -475,7 +477,7 @@ declare namespace Model {
     /** 爱签创建合同 请求 */
     interface CreateContractReq {
         // 用户电子签记录表记录ID
-        recordId?: number   
+        recordId?: number
     }
 
     /** 爱签创建合同 响应 */