Sfoglia il codice sorgente

feat: 前端进件API + 概览页进件步骤卡片

- account.ts: uploadImage, createOnboard, queryOnboard, cancelOnboard
- AccountOverview: 新增「提交进件资料」卡片(签约→进件→开通)
- 开通专户按钮条件改为 onboard_status === VALID
- handleGoTab 增加 onboard 路由
alphaH 1 giorno fa
parent
commit
aa5491d4ae

+ 47 - 0
frontend/src/api/module_payment/account.ts

@@ -51,6 +51,53 @@ export const AccountAPI = {
     });
   },
 
+  // ========== 进件 ==========
+
+  uploadImage(file: File, enterpriseId: string) {
+    const fd = new FormData();
+    fd.append("file", file);
+    fd.append("enterprise_id", enterpriseId);
+    return request<ApiResponse<{ image_id: string }>>({
+      url: `${API_PATH}/onboard/upload`,
+      method: "post",
+      data: fd,
+      headers: { "Content-Type": "multipart/form-data" },
+    });
+  },
+
+  createOnboard(data: {
+    enterprise_id: string;
+    scene_code: string;
+    scene_directions: string;
+    scene_image: string;
+    sites?: string;
+    alipay_user_id: string;
+  }) {
+    return request<ApiResponse<{ order_id: string; out_biz_no: string; status: string }>>({
+      url: `${API_PATH}/onboard/create`,
+      method: "post",
+      data,
+    });
+  },
+
+  queryOnboard(enterpriseId: string, orderId: string) {
+    return request<ApiResponse<{ order_id: string; status: string }>>({
+      url: `${API_PATH}/onboard/query`,
+      method: "get",
+      params: { enterprise_id: enterpriseId, order_id: orderId },
+    });
+  },
+
+  cancelOnboard(data: { enterprise_id: string; order_id: string }) {
+    return request<ApiResponse>({
+      url: `${API_PATH}/onboard/cancel`,
+      method: "post",
+      data,
+    });
+  },
+
+  // ========== 签约查询 ==========
+
   queryAgreement(enterpriseId: string, externalAgreementNo: string) {
     return request<ApiResponse<{ agreement_no: string; status: string }>>({
       url: `${API_PATH}/agreement/query`,

+ 27 - 2
frontend/src/views/module_payment/account/components/AccountOverview.vue

@@ -61,7 +61,31 @@
 
         <div
           class="action-item"
-          :class="{ disabled: authorizeStatus === 'AUTHORIZED' || !!accountData.account_book_id }"
+          :class="{ disabled: authorizeStatus !== 'AUTHORIZED' || !!accountData.account_book_id }"
+        >
+          <div class="action-icon">
+            <el-icon :size="32"><Upload /></el-icon>
+          </div>
+          <div class="action-title">提交进件资料</div>
+          <div class="action-desc">
+            <template v-if="accountData.onboard_status === 'VALID'">审核已通过</template>
+            <template v-else-if="accountData.onboard_status === 'INVALID'">审核未通过</template>
+            <template v-else-if="authorizeStatus !== 'AUTHORIZED'">需先签约</template>
+            <template v-else>提交资料</template>
+          </div>
+          <el-button
+            v-hasPerm="['module_payment:account:authorize']"
+            type="primary"
+            :disabled="authorizeStatus !== 'AUTHORIZED' || !!accountData.account_book_id"
+            @click="$emit('goTab', 'onboard')"
+          >
+            {{ accountData.onboard_status === 'VALID' ? '已通过' : '去提交' }}
+          </el-button>
+        </div>
+
+        <div
+          class="action-item"
+          :class="{ disabled: accountData.onboard_status !== 'VALID' || !!accountData.account_book_id }"
         >
           <div class="action-icon">
             <el-icon :size="32"><Coin /></el-icon>
@@ -277,7 +301,7 @@
 <script setup lang="ts">
 import { useEnterpriseStore } from "@/store/modules/enterprise.store";
 import AccountAPI from "@/api/module_payment/account";
-import { Refresh, Document, Coin, Wallet, Money } from "@element-plus/icons-vue";
+import { Refresh, Document, Coin, Wallet, Money, Upload } from "@element-plus/icons-vue";
 import { ref, computed, watch } from "vue";
 import en from "@/lang/package/en";
 
@@ -299,6 +323,7 @@ const accountData = ref<{
   status?: string;
   balance?: number;
   scene?: string;
+  onboard_status?: string;
 }>({});
 const recentTransfers = ref<any[]>([]);
 const transferAmount = ref<{

+ 3 - 0
frontend/src/views/module_payment/account/index.vue

@@ -1678,6 +1678,7 @@ function handleOverviewRefresh(data: any) {
       account_book_id: data.account_book_id || "",
       status: data.status || "",
       balance: data.balance || 0,
+      onboard_status: data.onboard_status || "PENDING",
     };
     authorizeStatus.value = data.authorize_status || "PENDING";
   }
@@ -1687,6 +1688,8 @@ async function handleGoTab(tab: string) {
   console.log("goTab => ", tab);
   if (tab === "authorize") {
     await handleAuthorize();
+  } else if (tab === "onboard") {
+    activeTab.value = tab;
   } else if (tab === "create") {
     await handleCreate();
   } else if (tab === "deposit") {

+ 1 - 0
logs/payment-platform-error.log

@@ -839,3 +839,4 @@ Caused by: org.postgresql.util.PSQLException: ERROR: column "onboard_status" doe
 	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
 	at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:425)
 	... 131 common frames omitted
+2026-07-15 14:09:15.670 [tomcat-handler-8] ERROR sdk.biz.err - ErrorScene^_^40004^_^EXPAND_INDIRECT_VERIFY_FAIL^_^null^_^Windows 10^_^2026-07-15 14:09:15^_^ProtocalMustParams:charset=UTF-8&method=alipay.fund.accountbook.create&sign=K9wbVw8UOUzsWbAX8inUsZVNuaD5idS0jpiGOux3vj9oUVum8b3rROOoayg042uty8gjWWIdpA0LvtzGpWbtrrgCdPaHcPAUGufBBCn/WDDKRYWOwLHrFm8KI0L/YH9TUcHFFhwKTCU8PR9+IRJjsUMziTgCzgrH/fJBOUKCsYXf+XcVNWJG6pl2Br8Ynn7i3NdoOmYkIlmKwWp1Guyr43Vmeo9Zfhp4gOl/gu/8IJBEyyAFwf4kb2Sqjt4sImQUx/hhibC2tFwtiElQPAF0OTpC2Ae68X5umzUSmTDloU4rL8y1hnbDmNaFyNfnG/fKJnCHZsGAJJARBWxjX5wtDQ==&version=1.0&app_id=2021006160682088&sign_type=RSA2&timestamp=2026-07-15 14:09:15^_^ProtocalOptParams:alipay_sdk=alipay-sdk-java-4.40.865.ALL&format=JSON^_^ApplicationParams:traceId=219945d417840957557934487edad4&biz_content={"ext_info":"{\"agreement_no\":\"20265515324430130114\"}","merchant_user_id":"2088780324708456","merchant_user_type":"BUSINESS_ORGANIZATION","scene_code":"SATF_FUND_BOOK"}^_^Body:{"alipay_fund_accountbook_create_response":{"msg":"Business Failed","code":"40004","sub_msg":"经校验,缺乏进件信息,请调用进件接口补充进件信息","sub_code":"EXPAND_INDIRECT_VERIFY_FAIL"},"sign":"IEJZaxcmhSpx0PLMYtVv/9Sm7TjgLQFdvD8pEwyVm+kzawlETTwNBbrRUtunI+P+nBrhvpa7iIi/m2iRTRfC7LCl3BrMZTUgPsM4aq4eozhCvP1TQ8mfzUVCtlI7INe6F65OzrQdC/YEjxxJ6JrjDa9SF2vGfyaTv1PeCnHTUbdAQP2gx6zNXWZ8RZnQBv7JStuYtsOWODfOfeSxbktgGhmaeA8CzOV6Aib0YukNbxq6uJw+iHecpR6hQO9I8bh6aRLfFeGlGxebgPiuxFZ8nrvEvZL7dIkuEwV44w2Jbulwriwr2ryAE3DAUdpUPgw10/ZjeoiG8IBIq9E9O1ax3g=="}^_^9ms,202ms,13ms^_^trace_id:219945d417840957557934487edad4

+ 31 - 0
logs/payment-platform.log

@@ -1475,3 +1475,34 @@ Caused by: org.postgresql.util.PSQLException: ERROR: column "onboard_status" doe
 	... 131 common frames omitted
 2026-07-15 14:08:41.111 [SpringApplicationShutdownHook] INFO  c.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ...
 2026-07-15 14:08:41.113 [SpringApplicationShutdownHook] INFO  c.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed
+2026-07-15 14:08:45.748 [background-preinit] INFO  o.h.validator.internal.util.Version - HV000001: Hibernate Validator 8.0.1.Final
+2026-07-15 14:08:45.811 [main] INFO  c.p.platform.PaymentApplication - Starting PaymentApplication using Java 21.0.11 with PID 31092 (D:\project2\payment-platform\java\target\classes started by 1 in D:\project2\payment-platform)
+2026-07-15 14:08:45.811 [main] INFO  c.p.platform.PaymentApplication - The following 1 profile is active: "dev"
+2026-07-15 14:08:46.955 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode
+2026-07-15 14:08:46.957 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data Redis repositories in DEFAULT mode.
+2026-07-15 14:08:47.006 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 38 ms. Found 0 Redis repository interfaces.
+2026-07-15 14:08:47.567 [main] INFO  o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port 8001 (http)
+2026-07-15 14:08:47.577 [main] INFO  o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8001"]
+2026-07-15 14:08:47.578 [main] INFO  o.a.catalina.core.StandardService - Starting service [Tomcat]
+2026-07-15 14:08:47.578 [main] INFO  o.a.catalina.core.StandardEngine - Starting Servlet engine: [Apache Tomcat/10.1.20]
+2026-07-15 14:08:47.628 [main] INFO  o.a.c.c.C.[.[localhost].[/api/v1] - Initializing Spring embedded WebApplicationContext
+2026-07-15 14:08:47.628 [main] INFO  o.s.b.w.s.c.ServletWebServerApplicationContext - Root WebApplicationContext: initialization completed in 1505 ms
+2026-07-15 14:08:47.655 [main] INFO  c.a.d.s.b.a.DruidDataSourceAutoConfigure - Init DruidDataSource
+2026-07-15 14:08:48.977 [main] INFO  c.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited
+2026-07-15 14:08:49.688 [main] WARN  c.p.p.c.alipay.AlipayClientFactory - 支付宝默认配置不完整,将仅使用服务商/租户专属客户端
+2026-07-15 14:08:49.831 [main] INFO  c.p.platform.core.oss.OssService - OSS client initialized: bucket=hunanxiaojunzioss, endpoint=oss-cn-beijing.aliyuncs.com
+2026-07-15 14:08:50.131 [main] INFO  c.p.p.m.p.e.s.EnterpriseNameSyncScheduler - [企业名称同步] 调度器启动
+2026-07-15 14:08:50.395 [main] INFO  c.p.p.m.p.n.s.NotificationService - 已注册 7 个通知处理器: [AccountHandler, BillHandler, EmployeeHandler, EnterpriseHandler, InstitutionHandler, OrderHandler, VoucherHandler]
+2026-07-15 14:08:50.911 [main] INFO  o.s.s.web.DefaultSecurityFilterChain - Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@e75bae7, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@3531509c, org.springframework.security.web.context.SecurityContextHolderFilter@491f3fb0, org.springframework.security.web.header.HeaderWriterFilter@623a891d, org.springframework.web.filter.CorsFilter@23169374, org.springframework.security.web.authentication.logout.LogoutFilter@6939f18a, com.payment.platform.core.security.JwtAuthFilter@531bec12, com.payment.platform.core.security.TenantApiKeyAuthFilter@2f29e630, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@58a0f75b, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@2b569858, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@4f2b1a2f, org.springframework.security.web.session.SessionManagementFilter@756030e2, org.springframework.security.web.access.ExceptionTranslationFilter@721fc228, org.springframework.security.web.access.intercept.AuthorizationFilter@4f9e9c21]
+2026-07-15 14:08:51.333 [main] INFO  o.a.coyote.http11.Http11NioProtocol - Starting ProtocolHandler ["http-nio-8001"]
+2026-07-15 14:08:51.350 [main] INFO  o.s.b.w.e.tomcat.TomcatWebServer - Tomcat started on port 8001 (http) with context path '/api/v1'
+2026-07-15 14:08:51.494 [main] INFO  c.p.platform.PaymentApplication - Started PaymentApplication in 6.358 seconds (process running for 6.928)
+2026-07-15 14:08:53.264 [main] INFO  c.p.p.core.config.AppStartupRunner - 系统配置缓存初始化完成
+2026-07-15 14:08:54.774 [main] INFO  c.p.p.core.config.AppStartupRunner - 数据字典缓存初始化完成 (10 个字典类型)
+2026-07-15 14:09:01.949 [tomcat-handler-0] INFO  o.a.c.c.C.[.[localhost].[/api/v1] - Initializing Spring DispatcherServlet 'dispatcherServlet'
+2026-07-15 14:09:01.950 [tomcat-handler-0] INFO  o.s.web.servlet.DispatcherServlet - Initializing Servlet 'dispatcherServlet'
+2026-07-15 14:09:01.951 [tomcat-handler-0] INFO  o.s.web.servlet.DispatcherServlet - Completed initialization in 1 ms
+2026-07-15 14:09:11.728 [tomcat-handler-7] INFO  c.p.p.c.alipay.AlipayClientFactory - 服务商[3]客户端创建成功, appId=2021006160682088, name=跨境服务商
+2026-07-15 14:09:15.363 [tomcat-handler-8] INFO  sdk.biz.info - Summary^_^10000^_^null^_^ProtocalMustParams:charset=UTF-8&method=alipay.user.agreement.query&sign=Auiki6jsgzWWm45cr9U1XPar8sDYikj2fUOaveT7drmQcx/l78e0A9POV6XeExsmKKpgpz/+/LEUrnHQoNK79mqPJNhFN6EsJysXc5aGCYKWIscr5X9FvRgG6RgyNNRdMnTugrV9Q6AoZ67LRgLDZVA0Xa5sd9R8U+9tz1q/mcnJE00mJtkxyPeK/iFw+CDm3hexzRPliwLiPFz+FpIlvEOUGmHj17dSYbfwolocK7VRATEIV+r8RFaYKrS0Z8YDInG4O5g9d3H4d9nvtdD+CWrHgCmGCZch3OnHV6wui2duFD4utIVkvjifPr41Bebt+VFg2z/azNKJB1jZP0tNvA==&version=1.0&app_id=2021006160682088&sign_type=RSA2&timestamp=2026-07-15 14:09:14^_^ProtocalOptParams:alipay_sdk=alipay-sdk-java-4.40.865.ALL&format=JSON^_^ApplicationParams:traceId=219945d417840957555154451edad4&biz_content={"external_agreement_no":"2088780324708456_agreement","personal_product_code":"FUND_SAFT_SIGN_WITHHOLDING_P","sign_scene":"INDUSTRY|SATF_ACC","third_party_type":"PARTNER"}^_^9ms,370ms,18ms^_^trace_id:219945d417840957555154451edad4
+2026-07-15 14:09:15.670 [tomcat-handler-8] ERROR sdk.biz.err - ErrorScene^_^40004^_^EXPAND_INDIRECT_VERIFY_FAIL^_^null^_^Windows 10^_^2026-07-15 14:09:15^_^ProtocalMustParams:charset=UTF-8&method=alipay.fund.accountbook.create&sign=K9wbVw8UOUzsWbAX8inUsZVNuaD5idS0jpiGOux3vj9oUVum8b3rROOoayg042uty8gjWWIdpA0LvtzGpWbtrrgCdPaHcPAUGufBBCn/WDDKRYWOwLHrFm8KI0L/YH9TUcHFFhwKTCU8PR9+IRJjsUMziTgCzgrH/fJBOUKCsYXf+XcVNWJG6pl2Br8Ynn7i3NdoOmYkIlmKwWp1Guyr43Vmeo9Zfhp4gOl/gu/8IJBEyyAFwf4kb2Sqjt4sImQUx/hhibC2tFwtiElQPAF0OTpC2Ae68X5umzUSmTDloU4rL8y1hnbDmNaFyNfnG/fKJnCHZsGAJJARBWxjX5wtDQ==&version=1.0&app_id=2021006160682088&sign_type=RSA2&timestamp=2026-07-15 14:09:15^_^ProtocalOptParams:alipay_sdk=alipay-sdk-java-4.40.865.ALL&format=JSON^_^ApplicationParams:traceId=219945d417840957557934487edad4&biz_content={"ext_info":"{\"agreement_no\":\"20265515324430130114\"}","merchant_user_id":"2088780324708456","merchant_user_type":"BUSINESS_ORGANIZATION","scene_code":"SATF_FUND_BOOK"}^_^Body:{"alipay_fund_accountbook_create_response":{"msg":"Business Failed","code":"40004","sub_msg":"经校验,缺乏进件信息,请调用进件接口补充进件信息","sub_code":"EXPAND_INDIRECT_VERIFY_FAIL"},"sign":"IEJZaxcmhSpx0PLMYtVv/9Sm7TjgLQFdvD8pEwyVm+kzawlETTwNBbrRUtunI+P+nBrhvpa7iIi/m2iRTRfC7LCl3BrMZTUgPsM4aq4eozhCvP1TQ8mfzUVCtlI7INe6F65OzrQdC/YEjxxJ6JrjDa9SF2vGfyaTv1PeCnHTUbdAQP2gx6zNXWZ8RZnQBv7JStuYtsOWODfOfeSxbktgGhmaeA8CzOV6Aib0YukNbxq6uJw+iHecpR6hQO9I8bh6aRLfFeGlGxebgPiuxFZ8nrvEvZL7dIkuEwV44w2Jbulwriwr2ryAE3DAUdpUPgw10/ZjeoiG8IBIq9E9O1ax3g=="}^_^9ms,202ms,13ms^_^trace_id:219945d417840957557934487edad4
+2026-07-15 14:09:15.712 [tomcat-handler-8] WARN  c.p.p.c.e.GlobalExceptionHandler - 业务异常 [/api/v1/payment/account] 400: 开通资金记账本失败: Business Failed