wupengfei
2 天以前 697b0b83320f5bb420abc9b22461fc0c64b9c770
feat: 微信
2个文件已修改
611 ■■■■■ 已修改文件
src/views/EnterpriseManage/components/WeChatPayWalletBanksSelect.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/EnterpriseManage/components/WechatConfigureView.vue 609 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/EnterpriseManage/components/WeChatPayWalletBanksSelect.vue
@@ -43,7 +43,7 @@
    try {
      let params: API.GetEnterpriseWeChatPayWalletBanksQuery = {
        pageModel: {
          rows: pageSize,
          rows: 200,
          page: pageIndex,
        },
        bank_account_type: 0,
src/views/EnterpriseManage/components/WechatConfigureView.vue
@@ -18,7 +18,6 @@
          v-model.trim="form.contact_type"
          :value-enum="EnumWeChatPayApplymentContactTypeText"
          :button-style="false"
          :convertEnumValue="false"
        />
      </ProFormItemV2>
      <ProFormItemV2
@@ -77,17 +76,39 @@
          ></ProFormImageUpload>
        </ProFormItemV2>
        <ProFormItemV2
          label="证件有效期:"
          prop="contact_period"
          :check-rules="[{ type: 'array', message: '请选择证件有效期' }]"
          label="证件有效期开始时间:"
          prop="contact_period_begin"
          :check-rules="[{ message: '请选择证件有效期开始时间' }]"
        >
          <ProFormDatePicker v-model="form.contact_period_begin" type="date"></ProFormDatePicker>
        </ProFormItemV2>
        <ProFormItemV2 label="证件有效期是否为长期:" prop="contact_period_isLong">
          <ProFormRadio
            v-model.trim="form.contact_period_isLong"
            :value-enum="BooleanOptions"
            :button-style="false"
          />
        </ProFormItemV2>
        <ProFormItemV2
          v-if="!form.contact_period_isLong"
          label="证件有效期结束时间:"
          prop="contact_period_end"
          :check-rules="[
            {
              message: '请选择证件有效期结束时间',
              validator: (rule, value, callback) => {
                if (dayjs(value).isAfter(dayjs(form.contact_period_begin))) {
                  callback();
                }
                callback(new Error('结束时间不能小于开始时间'));
              },
            },
          ]"
        >
          <ProFormDatePicker
            v-model="form.contact_period"
            type="daterange"
            range-separator="~"
            start-placeholder="起始日期"
            end-placeholder="到期日期"
            clearable
            v-model="form.contact_period_end"
            type="date"
            placeholder="请选择证件有效期结束时间"
          ></ProFormDatePicker>
        </ProFormItemV2>
        <ProFormItemV2
@@ -100,7 +121,7 @@
              v-model:file-url="form.business_authorization_letter"
              :limit="1"
              :limitFileSize="10"
              accept="png,jpg,jpeg,pdf"
              accept="jpg/jpeg,png"
            ></ProFormUpload>
            <el-button style="margin-left: 10px" type="primary" link @click="downloadTemplate"
              >模板下载</el-button
@@ -151,7 +172,7 @@
            v-model:file-url="form.license_copy"
            :limitFileCount="1"
            :on-success="handleLicenseUrlChange"
            accept="jpg/jpeg,png,pdf"
            accept="jpg/jpeg,png"
          ></ProFormUpload>
        </ProFormItemV2>
        <ProFormItemV2
@@ -265,17 +286,39 @@
          />
        </ProFormItemV2>
        <ProFormItemV2
          label="证件有效期:"
          prop="cert_period"
          :check-rules="[{ type: 'array', message: '请选择证件有效期' }]"
          label="证件有效期开始时间:"
          prop="cert_period_begin"
          :check-rules="[{ message: '请选择证件有效期开始时间' }]"
        >
          <ProFormDatePicker v-model="form.cert_period_begin" type="date"></ProFormDatePicker>
        </ProFormItemV2>
        <ProFormItemV2 label="证件有效期是否为长期:" prop="cert_period_isLong">
          <ProFormRadio
            v-model.trim="form.cert_period_isLong"
            :value-enum="BooleanOptions"
            :button-style="false"
          />
        </ProFormItemV2>
        <ProFormItemV2
          v-if="!form.cert_period_isLong"
          label="证件有效期结束时间:"
          prop="cert_period_end"
          :check-rules="[
            {
              message: '请选择证件有效期结束时间',
              validator: (rule, value, callback) => {
                if (dayjs(value).isAfter(dayjs(form.cert_period_begin))) {
                  callback();
                }
                callback(new Error('结束时间不能小于开始时间'));
              },
            },
          ]"
        >
          <ProFormDatePicker
            v-model="form.cert_period"
            type="daterange"
            range-separator="~"
            start-placeholder="起始日期"
            end-placeholder="到期日期"
            clearable
            v-model="form.cert_period_end"
            type="date"
            placeholder="请选择证件有效期结束时间"
          ></ProFormDatePicker>
        </ProFormItemV2>
      </template>
@@ -318,7 +361,7 @@
            v-model:file-url="form.authorize_letter_copy"
            :limit="1"
            :limitFileSize="10"
            accept="png,jpg,jpeg,pdf"
            accept="jpg/jpeg,png"
          ></ProFormUpload>
          <el-button style="margin-left: 10px" type="primary" link @click="downloadFRTemplate"
            >模板下载</el-button
@@ -337,23 +380,21 @@
          prop="id_card_copy"
          :check-rules="[{ type: 'upload', message: '请上传身份证人像面' }]"
        >
          <ProFormUpload
          <ProFormImageUpload
            v-model:file-url="form.id_card_copy"
            :limitFileCount="1"
            :limit-file-count="1"
            :on-success="handleFrontImgUrlChange"
            accept="jpg/jpeg,png,pdf"
          ></ProFormUpload>
          ></ProFormImageUpload>
        </ProFormItemV2>
        <ProFormItemV2
          label="身份证国徽面:"
          prop="id_card_national"
          :check-rules="[{ type: 'upload', message: '请上传身份证国徽面' }]"
        >
          <ProFormUpload
          <ProFormImageUpload
            v-model:file-url="form.id_card_national"
            :limitFileCount="1"
            accept="jpg/jpeg,png,pdf"
          ></ProFormUpload>
            :limit-file-count="1"
          ></ProFormImageUpload>
        </ProFormItemV2>
        <ProFormItemV2
          label="身份证姓名:"
@@ -376,17 +417,51 @@
          <ProFormText v-model.trim="form.id_card_number" placeholder="请输入身份证号码" />
        </ProFormItemV2>
        <ProFormItemV2
          label="身份证有效期:"
          prop="id_card_period"
          :checkRules="[{ message: '请选择身份证有效期', type: 'array' }]"
          v-if="form.subject_type === EnumWeChatPayApplymentSubjectType.SUBJECT_TYPE_ENTERPRISE"
          label="身份证居住地址:"
          prop="id_card_address"
          :checkRules="[{ message: '请输入身份证居住地址' }]"
        >
          <ProFormText v-model.trim="form.id_card_address" placeholder="请输入身份证居住地址" />
        </ProFormItemV2>
        <ProFormItemV2
          label="身份证有效期开始时间:"
          prop="card_period_begin"
          :checkRules="[{ message: '请选择身份证有效期开始时间' }]"
        >
          <ProFormDatePicker
            v-model="form.id_card_period"
            type="daterange"
            range-separator="~"
            start-placeholder="起始日期"
            end-placeholder="到期日期"
            clearable
            v-model="form.card_period_begin"
            type="date"
            placeholder="请选择身份证有效期开始时间"
          ></ProFormDatePicker>
        </ProFormItemV2>
        <ProFormItemV2 label="身份证有效期是否为长期:" prop="card_period_isLong">
          <ProFormRadio
            v-model.trim="form.card_period_isLong"
            :value-enum="BooleanOptions"
            :button-style="false"
          />
        </ProFormItemV2>
        <ProFormItemV2
          v-if="!form.card_period_isLong"
          label="身份证有效期结束时间:"
          prop="card_period_end"
          :checkRules="[
            {
              message: '请选择身份证有效期结束时间',
              validator: (rule, value, callback) => {
                if (dayjs(value).isAfter(dayjs(form.card_period_begin))) {
                  callback();
                }
                callback(new Error('结束时间不能小于开始时间'));
              },
            },
          ]"
        >
          <ProFormDatePicker
            v-model="form.card_period_end"
            type="date"
            placeholder="请选择身份证有效期结束时间"
          ></ProFormDatePicker>
        </ProFormItemV2>
      </template>
@@ -405,7 +480,7 @@
          <ProFormUpload
            v-model:file-url="form.id_doc_copy"
            :limitFileCount="1"
            accept="jpg/jpeg,png,pdf"
            accept="jpg/jpeg,png"
          ></ProFormUpload>
        </ProFormItemV2>
@@ -430,17 +505,39 @@
          <ProFormText v-model.trim="form.id_doc_number" placeholder="请输入证件号码" />
        </ProFormItemV2>
        <ProFormItemV2
          label="证件有效期:"
          prop="id_doc_period"
          :checkRules="[{ message: '请选择证件有效期', type: 'array' }]"
          label="证件有效期开始时间:"
          prop="doc_period_begin"
          :checkRules="[{ message: '请选择证件有效期开始时间' }]"
        >
          <ProFormDatePicker v-model="form.doc_period_begin" type="date"></ProFormDatePicker>
        </ProFormItemV2>
        <ProFormItemV2 label="证件有效期是否为长期:" prop="doc_period_isLong">
          <ProFormRadio
            v-model.trim="form.doc_period_isLong"
            :value-enum="BooleanOptions"
            :button-style="false"
          />
        </ProFormItemV2>
        <ProFormItemV2
          v-if="!form.doc_period_isLong"
          label="证件有效期结束时间:"
          prop="doc_period_end"
          :checkRules="[
            {
              message: '请选择证件有效期结束时间',
              validator: (rule, value, callback) => {
                if (dayjs(value).isAfter(dayjs(form.doc_period_begin))) {
                  callback();
                }
                callback(new Error('结束时间不能小于开始时间'));
              },
            },
          ]"
        >
          <ProFormDatePicker
            v-model="form.id_doc_period"
            type="daterange"
            range-separator="~"
            start-placeholder="起始日期"
            end-placeholder="到期日期"
            clearable
            v-model="form.doc_period_end"
            type="date"
            placeholder="请选择证件有效期结束时间"
          ></ProFormDatePicker>
        </ProFormItemV2>
      </template>
@@ -457,7 +554,7 @@
        </div>
        <div v-for="(item, index) in form.ubo_info_list" :key="index">
          <ProFormItemV2
            :label="`第${index + 1}个受益人证件类型:`"
            :label="`受益人证件类型:`"
            :prop="`ubo_info_list.${index}.ubo_id_doc_type`"
            :checkRules="[{ message: '请选择证件类型' }]"
          >
@@ -469,7 +566,7 @@
            </ProFormSelect>
          </ProFormItemV2>
          <ProFormItemV2
            :label="`第${index + 1}个受益人证件正面照片:`"
            :label="`受益人证件正面照片:`"
            :prop="`ubo_info_list.${index}.ubo_id_doc_copy`"
            :check-rules="[{ type: 'upload', message: '请上传证件正面照片' }]"
          >
@@ -479,7 +576,21 @@
            ></ProFormImageUpload>
          </ProFormItemV2>
          <ProFormItemV2
            :label="`第${index + 1}个受益人证件姓名:`"
            v-if="
              item.ubo_id_doc_type !==
              EnumWeChatPayApplymentIdDocType.IDENTIFICATION_TYPE_OVERSEA_PASSPORT
            "
            :label="`受益人证件反面照片:`"
            :prop="`ubo_info_list.${index}.ubo_id_doc_copy_back`"
            :check-rules="[{ type: 'upload', message: '请上传证件反面照片' }]"
          >
            <ProFormImageUpload
              v-model:file-url="item.ubo_id_doc_copy_back"
              :limit-file-count="1"
            ></ProFormImageUpload>
          </ProFormItemV2>
          <ProFormItemV2
            :label="`受益人证件姓名:`"
            :prop="`ubo_info_list.${index}.ubo_id_doc_name`"
            :checkRules="[{ message: '请输入证件姓名' }]"
          >
@@ -492,31 +603,60 @@
            />
          </ProFormItemV2>
          <ProFormItemV2
            :label="`第${index + 1}个受益人证件号码:`"
            :label="`受益人证件号码:`"
            :prop="`ubo_info_list.${index}.ubo_id_doc_number`"
            :checkRules="[{ message: '请输入证件号码' }]"
          >
            <ProFormText v-model.trim="item.ubo_id_doc_number" placeholder="请输入证件号码" />
          </ProFormItemV2>
          <ProFormItemV2
            :label="`第${index + 1}个受益人证件居住地址:`"
            :label="`受益人证件居住地址:`"
            :prop="`ubo_info_list.${index}.ubo_id_doc_address`"
            :checkRules="[{ message: '请输入证件居住地址' }]"
          >
            <ProFormText v-model.trim="item.ubo_id_doc_address" placeholder="请输入证件居住地址" />
          </ProFormItemV2>
          <ProFormItemV2
            :label="`第${index + 1}个受益人证件有效期:`"
            :prop="`ubo_info_list.${index}.ubo_period`"
            :checkRules="[{ message: '请选择证件有效期', type: 'array' }]"
            :label="`证件有效期开始时间:`"
            :prop="`ubo_info_list.${index}.ubo_period_begin`"
            :checkRules="[{ message: '请选择证件有效期开始时间' }]"
          >
            <ProFormDatePicker
              v-model="item.ubo_period"
              type="daterange"
              range-separator="~"
              start-placeholder="起始日期"
              end-placeholder="到期日期"
              clearable
              v-model="item.ubo_period_begin"
              type="date"
              placeholder="请选择证件有效期开始时间"
            ></ProFormDatePicker>
          </ProFormItemV2>
          <ProFormItemV2
            label="证件有效期是否为长期:"
            :prop="`ubo_info_list.${index}.ubo_period_isLong`"
          >
            <ProFormRadio
              v-model.trim="item.ubo_period_isLong"
              :value-enum="BooleanOptions"
              :button-style="false"
            />
          </ProFormItemV2>
          <ProFormItemV2
            v-if="!item.ubo_period_isLong"
            :label="`证件有效期结束时间:`"
            :prop="`ubo_info_list.${index}.ubo_period_end`"
            :checkRules="[
              {
                message: '请选择证件有效期结束时间',
                validator: (rule, value, callback) => {
                  if (dayjs(value).isAfter(dayjs(item.ubo_period_begin))) {
                    callback();
                  }
                  callback(new Error('结束时间不能小于开始时间'));
                },
              },
            ]"
          >
            <ProFormDatePicker
              v-model="item.ubo_period_end"
              type="date"
              placeholder="请选择证件有效期结束时间"
            ></ProFormDatePicker>
          </ProFormItemV2>
          <el-button type="primary" link @click="deleteUboInfo(index)">删除</el-button>
@@ -738,6 +878,36 @@
          ></ProFormUpload>
        </ProFormItemV2>
      </template>
      <template
        v-if="
          form.sales_scenes_type.includes(EnumWeChatPayApplymentSalesScenesType.SALES_SCENES_WEB)
        "
      >
        <ProFormItemV2
          label="互联网网站域名:"
          prop="domain"
          :checkRules="[{ message: '请输入互联网网站域名' }]"
        >
          <ProFormText v-model.trim="form.domain" placeholder="请输入互联网网站域名" />
        </ProFormItemV2>
        <ProFormItemV2 label="网站授权函:" prop="web_authorisation">
          <div style="display: flex">
            <ProFormUpload
              v-model:file-url="form.web_authorisation"
              :limit="1"
              :limitFileSize="10"
              accept="jpg/jpeg,png,pdf"
            ></ProFormUpload>
            <el-button
              style="margin-left: 10px"
              type="primary"
              link
              @click="downloadWebAuthorisationTemplate"
              >模板下载</el-button
            >
          </div>
        </ProFormItemV2>
      </template>
      <template
        v-if="
@@ -794,37 +964,6 @@
            :limitFileCount="4"
            accept="jpg/jpeg,png"
          ></ProFormUpload>
        </ProFormItemV2>
      </template>
      <template
        v-if="
          form.sales_scenes_type.includes(EnumWeChatPayApplymentSalesScenesType.SALES_SCENES_WEB)
        "
      >
        <ProFormItemV2
          label="互联网网站域名:"
          prop="domain"
          :checkRules="[{ message: '请输入互联网网站域名' }]"
        >
          <ProFormText v-model.trim="form.domain" placeholder="请输入互联网网站域名" />
        </ProFormItemV2>
        <ProFormItemV2 label="网站授权函:" prop="web_authorisation">
          <div style="display: flex">
            <ProFormUpload
              v-model:file-url="form.web_authorisation"
              :limit="1"
              :limitFileSize="10"
              accept="png,jpg,jpeg,pdf"
            ></ProFormUpload>
            <el-button
              style="margin-left: 10px"
              type="primary"
              link
              @click="downloadWebAuthorisationTemplate"
              >模板下载</el-button
            >
          </div>
        </ProFormItemV2>
      </template>
@@ -905,7 +1044,6 @@
        prop="bank_alias"
        :checkRules="[{ message: '请输入开户银行' }]"
      >
        <!-- <ProFormText v-model.trim="form.account_bank" placeholder="请输入开户银行" /> -->
        <WeChatPayWalletBanksSelect
          v-model:bank_alias="form.bank_alias"
          v-model:account_bank="form.account_bank"
@@ -914,32 +1052,14 @@
          v-model:need_bank_branch="form.need_bank_branch"
          placeholder="请输入开户银行"
          clearable
          filterable
        />
      </ProFormItemV2>
      <!-- <ProFormItemV2
        label="开户银行省市编码:"
        prop="bank_address_code"
        :checkRules="[{ message: '请输入开户银行省市编码' }]"
      >
        <div style="display: flex; width: 100%">
          <ProFormText v-model.trim="form.bank_address_code" placeholder="请输入开户银行省市编码" />
          <el-button type="primary" link @click="downloadAddressCodeTemplate"
            >省市编码模板</el-button
          >
        </div>
      </ProFormItemV2> -->
      <template v-if="form.need_bank_branch">
        <!-- <ProFormItemV2
          label="开户银行银行号:"
          prop="bank_branch_id"
          :checkRules="[{ message: '请输入开户银行银行号' }]"
        >
          <ProFormText v-model.trim="form.bank_branch_id" placeholder="请输入开户银行银行号" />
        </ProFormItemV2> -->
        <ProFormItemV2
          label="开户支行省市编码:"
          prop="bank_branch_area"
          :checkRules="[{ message: '请输入开户银行银行号', type: 'array' }]"
          :checkRules="[{ message: '请输入开户银行银行号' }]"
        >
          <WeChatPayWalletBankBranchAreaCascader v-model:areaList="form.bank_branch_area" />
        </ProFormItemV2>
@@ -969,7 +1089,7 @@
</template>
<script setup lang="ts">
import { FormInstance, ModelValueType } from 'element-plus';
import { FormInstance } from 'element-plus';
import {
  ProForm,
  ProFormItemV2,
@@ -978,11 +1098,9 @@
  UploadUserFile,
  ProFormSelect,
  ProFormUpload,
  useFormDialog,
  ProFormRadio,
  ProFormDatePicker,
  ProFormImageUpload,
  ProFormInputNumber,
} from '@bole-core/components';
import * as enterpriseWalletServices from '@/services/api/enterpriseWallet';
import { useQuery } from '@tanstack/vue-query';
@@ -1003,18 +1121,14 @@
  EnumWeChatPayApplymentSalesScenesType,
  EnumWeChatPayApplymentSalesScenesTypeText,
  EnumWeChatPayApplymentBankAccountTypeText,
  BooleanOptions,
} from '@/constants';
import {
  convertApi2FormUrl,
  convertApi2FormUrlOnlyOne,
  downloadFileByUrl,
  format,
  convertApi2FormUrls,
} from '@/utils';
import { convertApi2FormUrlOnlyOne, downloadFileByUrl, format, convertApi2FormUrls } from '@/utils';
import { Message } from '@bole-core/core';
import WeChatPayWalletBanksSelect from './WeChatPayWalletBanksSelect.vue';
import WeChatPayWalletBankBranchsSelect from './WeChatPayWalletBankBranchsSelect.vue';
import WeChatPayWalletBankBranchAreaCascader from './WeChatPayWalletBankBranchAreaCascader.vue';
import dayjs from 'dayjs';
defineOptions({
  name: 'WechatConfigureView',
@@ -1027,10 +1141,13 @@
type UboInfo = {
  ubo_id_doc_type: EnumWeChatPayApplymentIdDocType;
  ubo_id_doc_copy: UploadUserFile[];
  ubo_id_doc_copy_back: UploadUserFile[];
  ubo_id_doc_name: string;
  ubo_id_doc_number: string;
  ubo_id_doc_address: string;
  ubo_period: ModelValueType;
  ubo_period_begin: string;
  ubo_period_end: string;
  ubo_period_isLong: boolean;
};
const props = withDefaults(defineProps<Props>(), {});
@@ -1039,13 +1156,15 @@
const form = reactive({
  business_code: '',
  contact_type: EnumWeChatPayApplymentContactType.LEGAL,
  contact_type: '' as any as EnumWeChatPayApplymentContactType,
  contact_name: '',
  contact_id_doc_type: '' as any as EnumWeChatPayApplymentIdDocType,
  contact_id_number: '',
  contact_id_doc_copy: [] as UploadUserFile[],
  contact_id_doc_copy_back: [] as UploadUserFile[],
  contact_period: [] as ModelValueType,
  contact_period_begin: '',
  contact_period_end: '',
  contact_period_isLong: false,
  business_authorization_letter: [] as UploadUserFile[],
  mobile_phone: '',
  contact_email: '',
@@ -1060,7 +1179,9 @@
  cert_merchant_name: '',
  cert_company_address: '',
  cert_legal_person: '',
  cert_period: [] as ModelValueType,
  cert_period_begin: '',
  cert_period_end: '',
  cert_period_isLong: false,
  id_holder_type: '' as any as EnumWeChatPayApplymentIdHolderType,
  id_doc_type: '' as any as EnumWeChatPayApplymentIdDocType,
  authorize_letter_copy: [] as UploadUserFile[],
@@ -1069,11 +1190,15 @@
  id_card_name: '',
  id_card_number: '',
  id_card_address: '',
  id_card_period: [] as ModelValueType,
  card_period_begin: '',
  card_period_end: '',
  card_period_isLong: false,
  id_doc_copy: [] as UploadUserFile[],
  id_doc_name: '',
  id_doc_number: '',
  id_doc_period: [] as ModelValueType,
  doc_period_begin: '',
  doc_period_end: '',
  doc_period_isLong: false,
  ubo_info_list: [] as UboInfo[],
  merchant_shortname: '',
  service_phone: '',
@@ -1166,10 +1291,11 @@
    form.contact_id_doc_copy_back = convertApi2FormUrlOnlyOne(
      data.contact_info?.contact_id_doc_copy_back ?? ''
    );
    form.contact_period = [
      format(data.contact_info?.contact_period_begin, 'YYYY-MM-DD'),
      format(data.contact_info?.contact_period_end, 'YYYY-MM-DD'),
    ];
    form.contact_period_begin = format(data.contact_info?.contact_period_begin, 'YYYY-MM-DD');
    form.contact_period_isLong = !dayjs(data.contact_info?.contact_period_end).isValid();
    form.contact_period_end = dayjs(data.contact_info?.contact_period_end).isValid()
      ? format(data.contact_info?.contact_period_end, 'YYYY-MM-DD')
      : data.contact_info?.contact_period_end;
    form.business_authorization_letter = convertApi2FormUrlOnlyOne(
      data.contact_info?.business_authorization_letter ?? ''
    );
@@ -1190,10 +1316,14 @@
    form.cert_merchant_name = data.subject_info?.certificate_info?.merchant_name ?? '';
    form.cert_company_address = data.subject_info?.certificate_info?.company_address ?? '';
    form.cert_legal_person = data.subject_info?.certificate_info?.legal_person ?? '';
    form.cert_period = [
      format(data.subject_info?.certificate_info?.period_begin, 'YYYY-MM-DD'),
      format(data.subject_info?.certificate_info?.period_end, 'YYYY-MM-DD'),
    ];
    form.cert_period_begin = format(
      data.subject_info?.certificate_info?.period_begin,
      'YYYY-MM-DD'
    );
    form.cert_period_isLong = !dayjs(data.subject_info?.certificate_info?.period_end).isValid();
    form.cert_period_end = dayjs(data.subject_info?.certificate_info?.period_end).isValid()
      ? format(data.subject_info?.certificate_info?.period_end, 'YYYY-MM-DD')
      : data.subject_info?.certificate_info?.period_end;
    form.id_holder_type = data.subject_info?.identity_info?.id_holder_type;
    form.id_doc_type = data.subject_info?.identity_info?.id_doc_type;
    form.authorize_letter_copy = convertApi2FormUrlOnlyOne(
@@ -1206,32 +1336,63 @@
      data.subject_info?.identity_info?.id_card_info?.id_card_national ?? ''
    );
    form.id_card_name = data.subject_info?.identity_info?.id_card_info?.id_card_name ?? '';
    form.id_card_number = data.subject_info?.identity_info?.id_card_info?.id_card_number ?? '';
    form.id_card_address = data.subject_info?.identity_info?.id_card_info?.id_card_address ?? '';
    form.card_period_begin = format(
      data.subject_info?.identity_info?.id_card_info?.card_period_begin,
      'YYYY-MM-DD'
    );
    form.card_period_isLong = !dayjs(
      data.subject_info?.identity_info?.id_card_info?.card_period_end
    ).isValid();
    form.card_period_end = dayjs(
      data.subject_info?.identity_info?.id_card_info?.card_period_end
    ).isValid()
      ? format(data.subject_info?.identity_info?.id_card_info?.card_period_end, 'YYYY-MM-DD')
      : data.subject_info?.identity_info?.id_card_info?.card_period_end;
    form.id_doc_copy = convertApi2FormUrlOnlyOne(
      data.subject_info?.identity_info?.id_doc_info?.id_doc_copy ?? ''
    );
    form.id_doc_name = data.subject_info?.identity_info?.id_doc_info?.id_doc_name ?? '';
    form.id_doc_number = data.subject_info?.identity_info?.id_doc_info?.id_doc_number ?? '';
    form.id_doc_period = [
      format(data.subject_info?.identity_info?.id_doc_info?.doc_period_begin, 'YYYY-MM-DD'),
      format(data.subject_info?.identity_info?.id_doc_info?.doc_period_end, 'YYYY-MM-DD'),
    ];
    form.doc_period_begin = format(
      data.subject_info?.identity_info?.id_doc_info?.doc_period_begin,
      'YYYY-MM-DD'
    );
    form.doc_period_isLong = !dayjs(
      data.subject_info?.identity_info?.id_doc_info?.doc_period_end
    ).isValid();
    form.doc_period_end = dayjs(
      data.subject_info?.identity_info?.id_doc_info?.doc_period_end
    ).isValid()
      ? format(data.subject_info?.identity_info?.id_doc_info?.doc_period_end, 'YYYY-MM-DD')
      : data.subject_info?.identity_info?.id_doc_info?.doc_period_end;
    form.ubo_info_list =
      data.subject_info?.ubo_info_list?.length > 0
        ? data.subject_info?.ubo_info_list.map((x) => ({
            ubo_id_doc_type: x.ubo_id_doc_type,
            ubo_id_doc_copy: convertApi2FormUrlOnlyOne(x.ubo_id_doc_copy ?? ''),
            ubo_id_doc_copy_back: convertApi2FormUrlOnlyOne(x.ubo_id_doc_copy_back ?? ''),
            ubo_id_doc_name: x.ubo_id_doc_name,
            ubo_id_doc_number: x.ubo_id_doc_number,
            ubo_id_doc_address: x.ubo_id_doc_address,
            ubo_period: [
              format(x.ubo_period_begin, 'YYYY-MM-DD'),
              format(x.ubo_period_end, 'YYYY-MM-DD'),
            ],
            ubo_period_begin: format(x.ubo_period_begin, 'YYYY-MM-DD'),
            ubo_period_isLong: !dayjs(x.ubo_period_end).isValid(),
            ubo_period_end: dayjs(x.ubo_period_end).isValid()
              ? format(x.ubo_period_end, 'YYYY-MM-DD')
              : x.ubo_period_end,
          }))
        : [
            {
              ubo_id_doc_type: '' as any as EnumWeChatPayApplymentIdDocType,
              ubo_id_doc_copy: [],
              ubo_id_doc_copy_back: [],
              ubo_id_doc_name: '',
              ubo_id_doc_number: '',
              ubo_id_doc_address: '',
              ubo_period: [],
              ubo_period_begin: '',
              ubo_period_end: '',
              ubo_period_isLong: false,
            },
          ];
    form.merchant_shortname = data.business_info?.merchant_shortname ?? '';
@@ -1297,10 +1458,13 @@
  form.ubo_info_list.push({
    ubo_id_doc_type: '' as any as EnumWeChatPayApplymentIdDocType,
    ubo_id_doc_copy: [],
    ubo_id_doc_copy_back: [],
    ubo_id_doc_name: '',
    ubo_id_doc_number: '',
    ubo_id_doc_address: '',
    ubo_period: [],
    ubo_period_begin: '',
    ubo_period_end: '',
    ubo_period_isLong: false,
  });
}
@@ -1400,14 +1564,10 @@
      params.contact_info.contact_id_number = form.contact_id_number;
      params.contact_info.contact_id_doc_copy = form.contact_id_doc_copy?.[0]?.path;
      params.contact_info.contact_id_doc_copy_back = form.contact_id_doc_copy_back?.[0]?.path;
      params.contact_info.contact_period_begin = format(
        form.contact_period[0],
        'YYYY-MM-DD 00:00:00'
      );
      params.contact_info.contact_period_end = format(
        form.contact_period[1],
        'YYYY-MM-DD 23:59:59'
      );
      params.contact_info.contact_period_begin = format(form.contact_period_begin, 'YYYY-MM-DD');
      params.contact_info.contact_period_end = form.contact_period_isLong
        ? '长期'
        : format(form.contact_period_end, 'YYYY-MM-DD');
      params.contact_info.business_authorization_letter =
        form.business_authorization_letter?.[0]?.path;
    }
@@ -1415,10 +1575,12 @@
      form.subject_type === EnumWeChatPayApplymentSubjectType.SUBJECT_TYPE_INDIVIDUAL ||
      form.subject_type === EnumWeChatPayApplymentSubjectType.SUBJECT_TYPE_ENTERPRISE
    ) {
      params.subject_info.business_license_info.license_copy = form.license_copy?.[0]?.path;
      params.subject_info.business_license_info.merchant_name = form.merchant_name;
      params.subject_info.business_license_info.license_number = form.license_number;
      params.subject_info.business_license_info.legal_person = form.legal_person;
      params.subject_info.business_license_info = {
        license_copy: form.license_copy?.[0]?.path,
        merchant_name: form.merchant_name,
        license_number: form.license_number,
        legal_person: form.legal_person,
      };
    }
    if (
      form.subject_type === EnumWeChatPayApplymentSubjectType.SUBJECT_TYPE_GOVERNMENT ||
@@ -1432,13 +1594,12 @@
      params.subject_info.certificate_info.company_address = form.cert_company_address;
      params.subject_info.certificate_info.legal_person = form.cert_legal_person;
      params.subject_info.certificate_info.period_begin = format(
        form.cert_period[0],
        'YYYY-MM-DD 00:00:00'
        form.cert_period_begin,
        'YYYY-MM-DD'
      );
      params.subject_info.certificate_info.period_end = format(
        form.cert_period[1],
        'YYYY-MM-DD 23:59:59'
      );
      params.subject_info.certificate_info.period_end = form.cert_period_isLong
        ? '长期'
        : format(form.cert_period_end, 'YYYY-MM-DD');
    }
    if (form.id_holder_type === EnumWeChatPayApplymentIdHolderType.LEGAL) {
      params.subject_info.identity_info.id_doc_type = form.id_doc_type;
@@ -1451,35 +1612,32 @@
      form.id_holder_type === EnumWeChatPayApplymentIdHolderType.LEGAL &&
      form.id_doc_type === EnumWeChatPayApplymentIdDocType.IDENTIFICATION_TYPE_IDCARD
    ) {
      params.subject_info.identity_info.id_card_info.id_card_copy = form.id_card_copy?.[0]?.path;
      params.subject_info.identity_info.id_card_info.id_card_national =
        form.id_card_national?.[0]?.path;
      params.subject_info.identity_info.id_card_info.id_card_name = form.id_card_name;
      params.subject_info.identity_info.id_card_info.id_card_number = form.id_card_number;
      params.subject_info.identity_info.id_card_info.card_period_begin = format(
        form.id_card_period[0],
        'YYYY-MM-DD 00:00:00'
      );
      params.subject_info.identity_info.id_card_info.card_period_end = format(
        form.id_card_period[1],
        'YYYY-MM-DD 23:59:59'
      );
      params.subject_info.identity_info.id_card_info = {
        id_card_copy: form.id_card_copy?.[0]?.path,
        id_card_national: form.id_card_national?.[0]?.path,
        id_card_name: form.id_card_name,
        id_card_number: form.id_card_number,
        card_period_begin: format(form.card_period_begin, 'YYYY-MM-DD'),
        card_period_end: form.card_period_isLong
          ? '长期'
          : format(form.card_period_end, 'YYYY-MM-DD'),
        id_card_address:
          form.subject_type === EnumWeChatPayApplymentSubjectType.SUBJECT_TYPE_ENTERPRISE
            ? form.id_card_address
            : '',
      };
    }
    if (
      form.id_holder_type === EnumWeChatPayApplymentIdHolderType.LEGAL &&
      form.id_doc_type !== EnumWeChatPayApplymentIdDocType.IDENTIFICATION_TYPE_IDCARD
    ) {
      params.subject_info.identity_info.id_doc_info.id_doc_copy = form.id_doc_copy?.[0]?.path;
      params.subject_info.identity_info.id_doc_info.id_doc_name = form.id_doc_name;
      params.subject_info.identity_info.id_doc_info.id_doc_number = form.id_doc_number;
      params.subject_info.identity_info.id_doc_info.doc_period_begin = format(
        form.id_doc_period[0],
        'YYYY-MM-DD 00:00:00'
      );
      params.subject_info.identity_info.id_doc_info.doc_period_end = format(
        form.id_doc_period[1],
        'YYYY-MM-DD 23:59:59'
      );
      params.subject_info.identity_info.id_doc_info = {
        id_doc_copy: form.id_doc_copy?.[0]?.path,
        id_doc_name: form.id_doc_name,
        id_doc_number: form.id_doc_number,
        doc_period_begin: format(form.doc_period_begin, 'YYYY-MM-DD'),
        doc_period_end: form.doc_period_isLong ? '长期' : format(form.doc_period_end, 'YYYY-MM-DD'),
      };
    }
    if (form.subject_type === EnumWeChatPayApplymentSubjectType.SUBJECT_TYPE_ENTERPRISE) {
      params.subject_info.ubo_info_list =
@@ -1487,63 +1645,70 @@
          ? form.ubo_info_list.map((x) => ({
              ubo_id_doc_type: x.ubo_id_doc_type,
              ubo_id_doc_copy: x.ubo_id_doc_copy?.[0]?.path,
              ubo_id_doc_copy_back: x.ubo_id_doc_copy_back?.[0]?.path,
              ubo_id_doc_name: x.ubo_id_doc_name,
              ubo_id_doc_number: x.ubo_id_doc_number,
              ubo_id_doc_address: x.ubo_id_doc_address,
              ubo_period_begin: format(x.ubo_period[0], 'YYYY-MM-DD 00:00:00'),
              ubo_period_end: format(x.ubo_period[1], 'YYYY-MM-DD 23:59:59'),
              ubo_period_begin: format(x.ubo_period_begin, 'YYYY-MM-DD'),
              ubo_period_end: x.ubo_period_isLong ? '长期' : format(x.ubo_period_end, 'YYYY-MM-DD'),
            }))
          : [];
    }
    if (form.sales_scenes_type.includes(EnumWeChatPayApplymentSalesScenesType.SALES_SCENES_STORE)) {
      params.business_info.sales_info.biz_store_info.biz_store_name = form.biz_store_name;
      params.business_info.sales_info.biz_store_info.biz_address_code = form.biz_address_code;
      params.business_info.sales_info.biz_store_info.biz_store_address = form.biz_store_address;
      params.business_info.sales_info.biz_store_info.store_entrance_pic =
        form.store_entrance_pic?.length > 0 ? form.store_entrance_pic?.map((x) => x.path) : [];
      params.business_info.sales_info.biz_store_info.indoor_pic =
        form.indoor_pic?.length > 0 ? form.indoor_pic?.map((x) => x.path) : [];
      params.business_info.sales_info.biz_store_info = {
        biz_store_name: form.biz_store_name,
        biz_address_code: form.biz_address_code,
        biz_store_address: form.biz_store_address,
        store_entrance_pic:
          form.store_entrance_pic?.length > 0 ? form.store_entrance_pic?.map((x) => x.path) : [],
        indoor_pic: form.indoor_pic?.length > 0 ? form.indoor_pic?.map((x) => x.path) : [],
      };
    }
    if (form.sales_scenes_type.includes(EnumWeChatPayApplymentSalesScenesType.SALES_SCENES_MP)) {
      params.business_info.sales_info.mp_info.mp_appid = form.mp_appid;
      params.business_info.sales_info.mp_info.mp_sub_appid = form.mp_sub_appid;
      params.business_info.sales_info.mp_info.mp_pics =
        form.mp_pics?.length > 0 ? form.mp_pics?.map((x) => x.path) : [];
      params.business_info.sales_info.mp_info = {
        mp_appid: form.mp_appid,
        mp_sub_appid: form.mp_sub_appid,
        mp_pics: form.mp_pics?.length > 0 ? form.mp_pics?.map((x) => x.path) : [],
      };
    }
    if (
      form.sales_scenes_type.includes(
        EnumWeChatPayApplymentSalesScenesType.SALES_SCENES_MINI_PROGRAM
      )
    ) {
      params.business_info.sales_info.mini_program_info.mini_program_appid =
        form.mini_program_appid;
      params.business_info.sales_info.mini_program_info.mini_program_sub_appid =
        form.mini_program_sub_appid;
      params.business_info.sales_info.mini_program_info.mini_program_pics =
        form.mini_program_pics?.length > 0 ? form.mini_program_pics?.map((x) => x.path) : [];
      params.business_info.sales_info.mini_program_info = {
        mini_program_appid: form.mini_program_appid,
        mini_program_sub_appid: form.mini_program_sub_appid,
        mini_program_pics:
          form.mini_program_pics?.length > 0 ? form.mini_program_pics?.map((x) => x.path) : [],
      };
    }
    if (form.sales_scenes_type.includes(EnumWeChatPayApplymentSalesScenesType.SALES_SCENES_APP)) {
      params.business_info.sales_info.app_info.app_appid = form.app_appid;
      params.business_info.sales_info.app_info.app_sub_appid = form.app_sub_appid;
      params.business_info.sales_info.app_info.app_pics =
        form.app_pics?.length > 0 ? form.app_pics?.map((x) => x.path) : [];
      params.business_info.sales_info.app_info = {
        app_appid: form.app_appid,
        app_sub_appid: form.app_sub_appid,
        app_pics: form.app_pics?.length > 0 ? form.app_pics?.map((x) => x.path) : [],
      };
    }
    if (form.sales_scenes_type.includes(EnumWeChatPayApplymentSalesScenesType.SALES_SCENES_WEB)) {
      params.business_info.sales_info.web_info.domain = form.domain;
      params.business_info.sales_info.web_info.web_authorisation =
        form.web_authorisation?.[0]?.path;
      params.business_info.sales_info.web_info = {
        domain: form.domain,
        web_authorisation: form.web_authorisation?.[0]?.path,
      };
    }
    if (
      form.sales_scenes_type.includes(EnumWeChatPayApplymentSalesScenesType.SALES_SCENES_WEWORK)
    ) {
      params.business_info.sales_info.wework_info.sub_corp_id = form.sub_corp_id;
      params.business_info.sales_info.wework_info.wework_pics =
        form.wework_pics?.length > 0 ? form.wework_pics?.map((x) => x.path) : [];
      params.business_info.sales_info.wework_info = {
        sub_corp_id: form.sub_corp_id,
        wework_pics: form.wework_pics?.length > 0 ? form.wework_pics?.map((x) => x.path) : [],
      };
    }
    let res = await enterpriseWalletServices.openEnterpriseWeChatPayWallet(params);
    return res;
  } catch (error) {}
  } catch (error) {
    console.log('error: ', error);
  }
}
function downloadFRTemplate() {