完善财务对账渠道与日期展示
This commit is contained in:
@@ -513,6 +513,11 @@ export function displayResourceField(
|
||||
? numericValue.toFixed(field.displayPrecision)
|
||||
: String(value);
|
||||
}
|
||||
// 纯日期字段不展示后端序列化附带的时间和时区部分。
|
||||
if (field.type === 'date') {
|
||||
const date = dayjs(String(value));
|
||||
return date.isValid() ? date.format('YYYY-MM-DD') : String(value);
|
||||
}
|
||||
// 日期时间应以字段类型为准,避免 period_start 等非 `_at` 字段回显原始 RFC3339 文本。
|
||||
if (field.type === 'datetime') {
|
||||
const date = dayjs(String(value));
|
||||
|
||||
@@ -869,7 +869,17 @@ export const resources: ResourceUiDefinition[] = [
|
||||
},
|
||||
}), f('period_start', { required: true }), f('period_end', { required: true })]),
|
||||
define('fin_reconciliation', '财务对账', 'readonly', [
|
||||
f('reconciliation_status'), f('channel'), f('bill_date'), f('difference_amount'),
|
||||
f('reconciliation_status'),
|
||||
f('channel', {
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: '余额支付', value: 'wallet' },
|
||||
{ label: '支付宝', value: 'alipay' },
|
||||
{ label: '微信支付', value: 'wechat' },
|
||||
],
|
||||
unknownValueLabel: '未知对账渠道',
|
||||
}),
|
||||
f('bill_date'), f('difference_amount'),
|
||||
]),
|
||||
define('cms_content', '内容', 'writable', [f('content_type', { required: true }), f('title', { required: true }), f('body', { required: true }), f('version_no'), f('publish_status')]),
|
||||
define('cs_ticket', '客服工单', 'writable', [relation('user_account_identity', '/user_account', true), f('ticket_no', { required: true }), f('category', { required: true }), f('priority', { required: true })]),
|
||||
|
||||
Reference in New Issue
Block a user