|  |  |  | 
|---|
|  |  |  | <template> | 
|---|
|  |  |  | <LoadingLayout :loading="isLoading"> | 
|---|
|  |  |  | <ProForm :model="form" ref="dialogForm" label-width="210px"> | 
|---|
|  |  |  | <ProForm :model="form" ref="dialogForm" label-width="210px" :is-read="isDetail"> | 
|---|
|  |  |  | <ProFormItemV2 | 
|---|
|  |  |  | label="业务申请编号:" | 
|---|
|  |  |  | prop="business_code" | 
|---|
|  |  |  | 
|---|
|  |  |  | :limitFileSize="10" | 
|---|
|  |  |  | accept="jpg/jpeg,png" | 
|---|
|  |  |  | ></ProFormUpload> | 
|---|
|  |  |  | <el-button style="margin-left: 10px" type="primary" link @click="downloadTemplate" | 
|---|
|  |  |  | <el-button | 
|---|
|  |  |  | v-if="!isDetail" | 
|---|
|  |  |  | style="margin-left: 10px" | 
|---|
|  |  |  | type="primary" | 
|---|
|  |  |  | link | 
|---|
|  |  |  | @click="downloadTemplate" | 
|---|
|  |  |  | >模板下载</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | v-model="form.subject_type" | 
|---|
|  |  |  | :valueEnum="EnumWeChatPayApplymentSubjectTypeText" | 
|---|
|  |  |  | placeholder="请选择主体类型" | 
|---|
|  |  |  | @change="handleSubjectTypeChange" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </ProFormSelect> | 
|---|
|  |  |  | </ProFormItemV2> | 
|---|
|  |  |  | 
|---|
|  |  |  | :limitFileSize="10" | 
|---|
|  |  |  | accept="jpg/jpeg,png" | 
|---|
|  |  |  | ></ProFormUpload> | 
|---|
|  |  |  | <el-button style="margin-left: 10px" type="primary" link @click="downloadFRTemplate" | 
|---|
|  |  |  | <el-button | 
|---|
|  |  |  | v-if="!isDetail" | 
|---|
|  |  |  | style="margin-left: 10px" | 
|---|
|  |  |  | type="primary" | 
|---|
|  |  |  | link | 
|---|
|  |  |  | @click="downloadFRTemplate" | 
|---|
|  |  |  | >模板下载</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <div class="ubo-info-list-top"> | 
|---|
|  |  |  | <div class="ubo-info-list-title">最终受益人信息列表</div> | 
|---|
|  |  |  | <div class="ubo-info-list-btn"> | 
|---|
|  |  |  | <div class="ubo-info-list-btn" v-if="!isDetail"> | 
|---|
|  |  |  | <el-button type="primary" link @click="addUboInfo">添加</el-button> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | placeholder="请选择证件有效期结束时间" | 
|---|
|  |  |  | ></ProFormDatePicker> | 
|---|
|  |  |  | </ProFormItemV2> | 
|---|
|  |  |  | <el-button type="primary" link @click="deleteUboInfo(index)">删除</el-button> | 
|---|
|  |  |  | <el-button v-if="!isDetail" type="primary" link @click="deleteUboInfo(index)" | 
|---|
|  |  |  | >删除</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | v-model.trim="form.biz_address_code" | 
|---|
|  |  |  | placeholder="请输入线下场所省市编码" | 
|---|
|  |  |  | /> | 
|---|
|  |  |  | <el-button type="primary" link @click="downloadAddressCodeTemplate" | 
|---|
|  |  |  | <el-button v-if="!isDetail" type="primary" link @click="downloadAddressCodeTemplate" | 
|---|
|  |  |  | >省市编码模板</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | v-model:file-url="form.web_authorisation" | 
|---|
|  |  |  | :limit="1" | 
|---|
|  |  |  | :limitFileSize="10" | 
|---|
|  |  |  | accept="jpg/jpeg,png,pdf" | 
|---|
|  |  |  | accept="jpg/jpeg,png" | 
|---|
|  |  |  | ></ProFormUpload> | 
|---|
|  |  |  | <el-button | 
|---|
|  |  |  | v-if="!isDetail" | 
|---|
|  |  |  | style="margin-left: 10px" | 
|---|
|  |  |  | type="primary" | 
|---|
|  |  |  | link | 
|---|
|  |  |  | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <div style="display: flex; width: 100%"> | 
|---|
|  |  |  | <ProFormText v-model.trim="form.settlement_id" placeholder="请输入入驻结算规则ID" /> | 
|---|
|  |  |  | <el-button style="margin-left: 10px" type="primary" link @click="openOuterSettleRule" | 
|---|
|  |  |  | <el-button | 
|---|
|  |  |  | v-if="!isDetail" | 
|---|
|  |  |  | style="margin-left: 10px" | 
|---|
|  |  |  | type="primary" | 
|---|
|  |  |  | link | 
|---|
|  |  |  | @click="openOuterSettleRule" | 
|---|
|  |  |  | >费率结算规则对照表</el-button | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </div> | 
|---|
|  |  |  | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <ProFormSelect | 
|---|
|  |  |  | v-model="form.bank_account_type" | 
|---|
|  |  |  | :valueEnum="EnumWeChatPayApplymentBankAccountTypeText" | 
|---|
|  |  |  | :valueEnum="bank_account_typeList" | 
|---|
|  |  |  | placeholder="请选择结算银行账户类型" | 
|---|
|  |  |  | @change="handleBankAccountTypeChange" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | </ProFormSelect> | 
|---|
|  |  |  | </ProFormItemV2> | 
|---|
|  |  |  | 
|---|
|  |  |  | prop="bank_alias" | 
|---|
|  |  |  | :checkRules="[{ message: '请输入开户银行' }]" | 
|---|
|  |  |  | > | 
|---|
|  |  |  | <div v-if="isDetail">{{ form.bank_alias }}</div> | 
|---|
|  |  |  | <WeChatPayWalletBanksSelect | 
|---|
|  |  |  | v-else | 
|---|
|  |  |  | v-model:bank_alias="form.bank_alias" | 
|---|
|  |  |  | v-model:account_bank="form.account_bank" | 
|---|
|  |  |  | v-model:account_bank_code="form.account_bank_code" | 
|---|
|  |  |  | v-model:bank_alias_code="form.bank_alias_code" | 
|---|
|  |  |  | v-model:need_bank_branch="form.need_bank_branch" | 
|---|
|  |  |  | v-model:bank_branch_id="form.bank_branch_id" | 
|---|
|  |  |  | :bank_account_type="form.bank_account_type" | 
|---|
|  |  |  | placeholder="请输入开户银行" | 
|---|
|  |  |  | clearable | 
|---|
|  |  |  | 
|---|
|  |  |  | ProFormRadio, | 
|---|
|  |  |  | ProFormDatePicker, | 
|---|
|  |  |  | ProFormImageUpload, | 
|---|
|  |  |  | useFormDialog, | 
|---|
|  |  |  | } from '@bole-core/components'; | 
|---|
|  |  |  | import * as enterpriseWalletServices from '@/services/api/enterpriseWallet'; | 
|---|
|  |  |  | import { useQuery } from '@tanstack/vue-query'; | 
|---|
|  |  |  | 
|---|
|  |  |  | EnumWeChatPayApplymentSalesScenesType, | 
|---|
|  |  |  | EnumWeChatPayApplymentSalesScenesTypeText, | 
|---|
|  |  |  | EnumWeChatPayApplymentBankAccountTypeText, | 
|---|
|  |  |  | EnumWeChatPayApplymentBankAccountTypeTextForGTH, | 
|---|
|  |  |  | BooleanOptions, | 
|---|
|  |  |  | } from '@/constants'; | 
|---|
|  |  |  | import { convertApi2FormUrlOnlyOne, downloadFileByUrl, format, convertApi2FormUrls } from '@/utils'; | 
|---|
|  |  |  | 
|---|
|  |  |  | const dialogForm = ref<FormInstance>(); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const form = reactive({ | 
|---|
|  |  |  | applyment_state: '' as any as EnumWeChatPayApplymentState, | 
|---|
|  |  |  | business_code: '', | 
|---|
|  |  |  | contact_type: '' as any as EnumWeChatPayApplymentContactType, | 
|---|
|  |  |  | contact_name: '', | 
|---|
|  |  |  | 
|---|
|  |  |  | bank_branch_area: [] as number[], | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const isDetail = computed( | 
|---|
|  |  |  | () => form.applyment_state === EnumWeChatPayApplymentState.APPLYMENT_STATE_FINISHED | 
|---|
|  |  |  | ); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const EnumWeChatPayApplymentCertTypeTextList = computed(() => { | 
|---|
|  |  |  | if (form.subject_type === EnumWeChatPayApplymentSubjectType.SUBJECT_TYPE_INSTITUTIONS) { | 
|---|
|  |  |  | return EnumWeChatPayApplymentCertTypeTextForSYDW; | 
|---|
|  |  |  | 
|---|
|  |  |  | return EnumWeChatPayApplymentIdDocTypeText; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const bank_account_typeList = computed(() => { | 
|---|
|  |  |  | if (form.subject_type === EnumWeChatPayApplymentSubjectType.SUBJECT_TYPE_INDIVIDUAL) { | 
|---|
|  |  |  | return EnumWeChatPayApplymentBankAccountTypeTextForGTH; | 
|---|
|  |  |  | } | 
|---|
|  |  |  | return EnumWeChatPayApplymentBankAccountTypeText; | 
|---|
|  |  |  | }); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | const { isLoading, refetch } = useQuery({ | 
|---|
|  |  |  | queryKey: [ | 
|---|
|  |  |  | 'enterpriseWalletServices/getEnterpriseWallet', | 
|---|
|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | onSuccess(data) { | 
|---|
|  |  |  | form.applyment_state = data.applyment_state; | 
|---|
|  |  |  | form.business_code = data.business_code ?? ''; | 
|---|
|  |  |  | form.contact_type = data.contact_info?.contact_type; | 
|---|
|  |  |  | form.contact_name = data.contact_info?.contact_name ?? ''; | 
|---|
|  |  |  | 
|---|
|  |  |  | ); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function handleSubjectTypeChange() { | 
|---|
|  |  |  | form.cert_type = '' as any as EnumWeChatPayApplymentCertType; | 
|---|
|  |  |  | form.id_holder_type = '' as any as EnumWeChatPayApplymentIdHolderType; | 
|---|
|  |  |  | form.id_doc_type = '' as any as EnumWeChatPayApplymentIdDocType; | 
|---|
|  |  |  | form.bank_account_type = EnumWeChatPayApplymentBankAccountType.BANK_ACCOUNT_TYPE_CORPORATE; | 
|---|
|  |  |  | handleBankAccountTypeChange(); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | function handleBankAccountTypeChange() { | 
|---|
|  |  |  | form.bank_alias = ''; | 
|---|
|  |  |  | form.account_bank = ''; | 
|---|
|  |  |  | form.account_bank_code = '' as any as number; | 
|---|
|  |  |  | form.bank_alias_code = ''; | 
|---|
|  |  |  | form.need_bank_branch = false; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | defineExpose({ | 
|---|
|  |  |  | onConfirm: openEnterpriseWeChatPayWallet, | 
|---|
|  |  |  | }); | 
|---|