|
|
@@ -21,7 +21,14 @@
|
|
|
<el-table-column prop="participant_name" label="主体名称" min-width="140">
|
|
|
<template #default="{ row }">{{ row.participant_name || "-" }}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop="participant_id" label="支付宝UID" min-width="160" />
|
|
|
+ <el-table-column label="主体账号" min-width="170">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <div>{{ row.participant_id || "-" }}</div>
|
|
|
+ <div v-if="row.participant_id_type" class="sub-text">
|
|
|
+ {{ participantTypeText(row.participant_id_type) }}
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="服务商" min-width="140">
|
|
|
<template #default="{ row }">
|
|
|
{{ providerName(row.service_provider_id) }}
|
|
|
@@ -88,14 +95,25 @@
|
|
|
<el-form-item label="主体名称" prop="participant_name">
|
|
|
<el-input
|
|
|
v-model="form.participant_name"
|
|
|
- placeholder="如:张三(个人)/ 某某公司"
|
|
|
+ placeholder="姓名/企业名称(须与账号实名一致)"
|
|
|
style="max-width: 360px"
|
|
|
/>
|
|
|
+ <div class="form-item-tip">须与账号实名一致(个人填真实姓名,企业填注册名称)</div>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item label="主体类型" prop="participant_id_type">
|
|
|
+ <el-select v-model="form.participant_id_type" style="max-width: 360px">
|
|
|
+ <el-option
|
|
|
+ v-for="o in PARTICIPANT_TYPE_OPTIONS"
|
|
|
+ :key="o.value"
|
|
|
+ :label="o.label"
|
|
|
+ :value="o.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="支付宝账号" prop="participant_id">
|
|
|
<el-input
|
|
|
v-model="form.participant_id"
|
|
|
- placeholder="支付宝用户ID(2088开头)"
|
|
|
+ :placeholder="PARTICIPANT_ID_PLACEHOLDER[form.participant_id_type]"
|
|
|
style="max-width: 360px"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
@@ -108,9 +126,6 @@
|
|
|
>
|
|
|
<el-option v-for="p in providerOptions" :key="p.id" :label="p.name" :value="p.id" />
|
|
|
</el-select>
|
|
|
- <div class="form-item-tip">
|
|
|
- 无法自动获取服务商时手动选择(与新增企业页一致)
|
|
|
- </div>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
<template #footer>
|
|
|
@@ -208,9 +223,23 @@ onMounted(async () => {
|
|
|
|
|
|
const applyVisible = ref(false);
|
|
|
const formRef = ref<FormInstance>();
|
|
|
+/** 授权主体类型(AuthParticipantInfo.participantIdType 文档枚举) */
|
|
|
+const PARTICIPANT_TYPE_OPTIONS = [
|
|
|
+ { value: "ALIPAY_USER_ID", label: "支付宝账号ID(2088开头)" },
|
|
|
+ { value: "ALIPAY_LOGON_ID", label: "支付宝账号(手机号或邮箱)" },
|
|
|
+ { value: "ALIPAY_OPEN_ID", label: "应用OpenID" },
|
|
|
+];
|
|
|
+const PARTICIPANT_ID_PLACEHOLDER: Record<string, string> = {
|
|
|
+ ALIPAY_USER_ID: "支付宝账号ID(2088开头)",
|
|
|
+ ALIPAY_LOGON_ID: "手机号或邮箱",
|
|
|
+ ALIPAY_OPEN_ID: "应用OpenID",
|
|
|
+};
|
|
|
+const participantTypeText = (type?: string) =>
|
|
|
+ PARTICIPANT_TYPE_OPTIONS.find((o) => o.value === type)?.label || type || "-";
|
|
|
const form = reactive({
|
|
|
participant_name: "",
|
|
|
participant_id: "",
|
|
|
+ participant_id_type: "ALIPAY_USER_ID",
|
|
|
service_provider_id: null as number | null,
|
|
|
});
|
|
|
const rules: FormRules = {
|
|
|
@@ -232,6 +261,7 @@ async function handleApply() {
|
|
|
const res = await BatchPayAPI.authorizeApply({
|
|
|
participant_name: form.participant_name.trim(),
|
|
|
participant_id: form.participant_id.trim(),
|
|
|
+ participant_id_type: form.participant_id_type,
|
|
|
service_provider_id: form.service_provider_id!,
|
|
|
});
|
|
|
applyVisible.value = false;
|
|
|
@@ -363,6 +393,12 @@ async function handleRefresh(row: BatchAuthorizeVO) {
|
|
|
color: #909399;
|
|
|
}
|
|
|
|
|
|
+.sub-text {
|
|
|
+ font-size: 12px;
|
|
|
+ color: #909399;
|
|
|
+ line-height: 1.4;
|
|
|
+}
|
|
|
+
|
|
|
.qrcode-wrapper {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|