规范气站与配送点提现渠道

This commit is contained in:
czl231
2026-08-19 23:43:02 +08:00
parent 2f5b934037
commit b93202274d
13 changed files with 148 additions and 12 deletions

View File

@@ -75,7 +75,7 @@ export type ResourceField = {
listDisplayIdentityCopy?: boolean;
listHidden?: boolean;
displayPrecision?: number;
options?: Array<{ label: string; value: string | number }>;
options?: Array<{ label: string; value: string | number; disabled?: boolean }>;
defaultValue?: string | number | boolean;
readonly?: boolean;
readonlyOnCreate?: boolean;
@@ -400,6 +400,19 @@ function define(
const reason = [f('reason', { required: true })];
/** 提现渠道保留未来选项,但当前仅开放银行卡提现。 */
const withdrawalChannelField = f('channel', {
required: true,
type: 'select',
defaultValue: 'bank',
unknownValueLabel: '未知提现渠道',
options: [
{ label: '银行卡提现', value: 'bank' },
{ label: '支付宝提现', value: 'alipay', disabled: true },
{ label: '微信提现', value: 'wechat', disabled: true },
],
});
const platformResources: ResourceUiDefinition[] = [
{ ...define('gas_basic', '气站管理', 'writable', [f('code', { required: true }), f('name', { required: true }), f('credit_code'), f('principal'), f('address'), f('longitude'), f('latitude')]), accountManagement: { resource: '/gas_account', relationKey: 'gas_basic_identity', title: '气站账户' }, walletOwnerType: 'gas' },
define('gas_account', '气站账户', 'writable', [f('username', { required: true }), f('password', { required: true }), f('display_name'), fixedAdminRole('气站管理员'), relation('gas_basic_identity', '/gas_basic', true)]),
@@ -540,7 +553,7 @@ const gasOverrides: ResourceUiDefinition[] = [
define('payment_order', '支付记录', 'readonly', []),
define('wallet_record', '钱包流水', 'readonly', []),
define('payment_refund', '退款记录', 'readonly', []),
define('wallet_apply_cash', '提现申请', 'append_only', [relation('wallet_bank_identity', '/wallet_bank'), f('request_no', { required: true }), f('amount', { required: true }), f('channel', { required: true }), f('remark')]),
define('wallet_apply_cash', '提现申请', 'append_only', [relation('wallet_bank_identity', '/wallet_bank'), f('request_no', { required: true }), f('amount', { required: true }), withdrawalChannelField, f('remark')]),
define('fin_settlement', '财务结算', 'readonly', []),
define('fin_reconciliation', '财务对账', 'readonly', []),
define('cs_ticket', '客服工单', 'writable', [relation('user_account_identity', '/user_account', true), f('ticket_no', { required: true }), f('category', { required: true }), f('priority', { required: true })]),

View File

@@ -1,6 +1,6 @@
<!--
功能渲染标准资源的新建编辑和业务动作字段控件
版本v1.4.1
版本v1.4.2
-->
<template>
<div class="field-grid">
@@ -78,8 +78,13 @@
allow-clear
@change="(value: unknown) => emit('change-relation', field, value)"
>
<a-option v-for="option in selectOptions(field)" :key="option.value" :value="option.value">
{{ option.label }}
<a-option
v-for="option in selectOptions(field)"
:key="option.value"
:value="option.value"
:disabled="option.disabled"
>
{{ option.label }}{{ option.disabled ? '(暂未开通)' : '' }}
</a-option>
</a-select>
<div v-else-if="field.type === 'identity' || field.type === 'identity-list'" class="relation-control">