Merge branch 'invoice-check' into dev

This commit is contained in:
sophie committed 2026-09-08 10:53:03 +08:00
commit 9570197378
104 files changed
+5844 -4271

No files matched your search

@@ -2,7 +2,7 @@
* app/router/routes/workspace.routes.ts
* 工作台路由表:/workspace 布局壳 + 各业务子页面懒加载。
* 依赖:vue-router、contract-payment 权限常量;meta.title 存 i18n key(workspace.*),由 guards 解析为 document.title。
* 逻辑:WorkspaceLayout 嵌套应用首页、知识库、排程、反馈等子页;合同付款子路由用 requiresFeaturePermission 而非 requiresAdmin。
* 逻辑:WorkspaceLayout 嵌套应用首页、知识库、排程、反馈等子页;合同付款子路由用 requiresFeaturePermission 而非 requiresAdmin;立账凭证明细为 accounting-voucher-check/runs/:runId。
*/
import type { RouteRecordRaw } from 'vue-router';
import { CONTRACT_PAYMENT_ACCESS_PERMISSION } from '@/features/contract-payment/constants';
@@ -84,6 +84,12 @@ export const workspaceRoutes: RouteRecordRaw[] = [
component: () => import('@/features/workspace/pages/AccountingVoucherCheckPage.vue'),
meta: { title: 'workspace.nav.accountingVoucherCheck', requiresAdmin: true },
},
{
path: 'accounting-voucher-check/runs/:runId',
name: 'workspace-accounting-voucher-check-detail',
component: () => import('@/features/workspace/pages/AccountingVoucherCheckDetailPage.vue'),
meta: { title: 'workspace.voucherCheck.detailTitle', requiresAdmin: true },
},
{
path: 'contract-payment',
name: 'workspace-contract-payment',
@@ -3,6 +3,7 @@
* 常用问题 / FAQ 缓存创建与编辑居中弹窗。
* 依赖:QuestionFormState、admin 通用 modal 样式。
* 逻辑:QuestionsPage 打开本组件;提交时 emit save,由 composable 调 API。
* is_enabled 仅控制工作台首页入口;cache_enabled 单独控制聊天是否跳过 Dify。
*/
<script setup lang="ts">
import { computed } from 'vue';
@@ -86,13 +87,16 @@ const isStale = computed(() => Boolean(props.form.stale_at));
<label class="label-field">{{ t('admin.question.fields.sortOrder') }}</label>
<input v-model.number="form.sort_order" type="number" class="input-field text-sm" />
</div>
<div class="md:col-span-2 flex flex-wrap gap-6">
<label class="inline-flex items-center gap-2 text-sm text-secondary cursor-pointer">
<input v-model="form.is_enabled" type="checkbox" class="accent-brand-600" />
<span>{{ t('admin.question.fields.isEnabled') }}</span>
<div class="md:col-span-2 space-y-3">
<label class="flex items-start gap-2 text-sm text-secondary cursor-pointer">
<input v-model="form.is_enabled" type="checkbox" class="mt-0.5 accent-brand-600" />
<span>
<span class="block">{{ t('admin.question.fields.isEnabled') }}</span>
<span class="block text-xs text-muted mt-0.5">{{ t('admin.question.fields.isEnabledHelp') }}</span>
</span>
</label>
<label class="inline-flex items-center gap-2 text-sm text-secondary cursor-pointer">
<input v-model="form.cache_enabled" type="checkbox" class="accent-brand-600" />
<label class="flex items-start gap-2 text-sm text-secondary cursor-pointer">
<input v-model="form.cache_enabled" type="checkbox" class="mt-0.5 accent-brand-600" />
<span>{{ t('admin.question.fields.cacheEnabled') }}</span>
</label>
</div>
@@ -1,6 +1,8 @@
/**
* features/admin/modules/wecom/composables/useWecomAdmin.ts
* 企业微信:绑定、系统配置、通知、登录审计。
* 依赖:admin.api、useMessage、wecom 展示工具、PaginationBar 所需的审计分页状态。
* 逻辑:绑定走服务端分页;登录审计仍一次拉取最近 200 条,由前端切片分页。
*/
import { computed, ref, watch } from 'vue';
import { useI18n } from 'vue-i18n';
@@ -60,7 +62,24 @@ export function useWecomAdmin() {
let wecomBindUserCloseTimer: ReturnType<typeof setTimeout> | null = null;
const wecomAuditSourceFilter = ref<'all' | 'wecom' | 'password'>('all');
const wecomAuditStatusFilter = ref<'all' | 'success' | 'failed'>('all');
const wecomAuditsPage = ref(1);
const wecomAuditsPageSize = ref(20);
const wecomAuditsPageSizeOptions = [10, 20, 50, 100] as const;
const filteredWecomLoginAudits = computed(() => wecomLoginAudits.value);
const wecomAuditsTotal = computed(() => filteredWecomLoginAudits.value.length);
/**
* 对已拉取的审计列表做前端切片,不请求后端分页。
* 核心逻辑:按 pageSize 计算安全页码后 slice,避免筛选后落到空页。
*/
const pagedWecomLoginAudits = computed(() => {
const size = Math.max(1, Number(wecomAuditsPageSize.value) || 20);
const total = wecomAuditsTotal.value;
const pages = Math.max(1, Math.ceil(total / size));
const page = Math.min(Math.max(1, wecomAuditsPage.value), pages);
const start = (page - 1) * size;
return filteredWecomLoginAudits.value.slice(start, start + size);
});
const wecomNotifySettings = ref<WecomNotifySettings>({
enabled: true,
base_url: '',
@@ -158,6 +177,10 @@ export function useWecomAdmin() {
void loadWecomBindings();
};
/**
* 拉取登录审计(后端固定最近 200 条,前端再分页)。
* 核心逻辑:带上 source/status 筛选调用 listAdminWecomLoginAudits。
*/
const loadWecomAudits = async (): Promise<void> => {
try {
const params = new URLSearchParams({ limit: '200' });
@@ -466,6 +489,7 @@ export function useWecomAdmin() {
});
watch([wecomAuditSourceFilter, wecomAuditStatusFilter], () => {
wecomAuditsPage.value = 1;
void loadWecomAudits();
});
@@ -487,7 +511,12 @@ export function useWecomAdmin() {
wecomBoundOnly,
wecomAuditSourceFilter,
wecomAuditStatusFilter,
wecomAuditsPage,
wecomAuditsPageSize,
wecomAuditsPageSizeOptions,
wecomAuditsTotal,
filteredWecomLoginAudits,
pagedWecomLoginAudits,
wecomNotifySettings,
wecomNotifyEventsText,
wecomNotifyMetrics,
@@ -2,10 +2,13 @@
/**
* features/admin/modules/wecom/pages/WecomAuditsPage.vue
* 企微与密码登录审计列表。
* 依赖:WECOM_ADMIN_KEY、PaginationBar、formatLocalDateTime。
* 逻辑:表格渲染当前页切片;分页条对已拉取的最近 200 条做前端翻页。
*/
import { inject } from 'vue';
import { useI18n } from 'vue-i18n';
import { Download } from 'lucide-vue-next';
import PaginationBar from '@/shared/components/PaginationBar.vue';
import { formatLocalDateTime } from '@/shared/utils/dateTime';
import { WECOM_ADMIN_KEY } from '../wecom.context';
@@ -13,7 +16,12 @@ const { t } = useI18n();
const {
wecomAuditSourceFilter,
wecomAuditStatusFilter,
wecomAuditsPage,
wecomAuditsPageSize,
wecomAuditsPageSizeOptions,
wecomAuditsTotal,
filteredWecomLoginAudits,
pagedWecomLoginAudits,
exportWecomAudits,
getWecomAuditReasonText,
getWecomAuditMetaText,
@@ -57,7 +65,7 @@ const {
<tr v-if="filteredWecomLoginAudits.length === 0">
<td colspan="6" class="px-4 admin-table-empty">{{ t('admin.wecom.noAuditData') }}</td>
</tr>
<tr v-for="row in filteredWecomLoginAudits" :key="row.id">
<tr v-for="row in pagedWecomLoginAudits" :key="row.id">
<td class="px-4 py-3 text-xs text-muted whitespace-nowrap" :title="row.created_at || '-'">{{ formatLocalDateTime(row.created_at) }}</td>
<td class="px-4 py-3 text-xs text-secondary">{{ t('admin.wecom.sources.' + row.source) }}</td>
<td class="px-4 py-3 text-xs text-secondary">{{ row.username || '-' }}</td>
@@ -82,5 +90,13 @@ const {
</tbody>
</table>
</div>
<div class="px-4 pb-4 pt-2">
<PaginationBar
v-model:page="wecomAuditsPage"
v-model:page-size="wecomAuditsPageSize"
:total="wecomAuditsTotal"
:page-size-options="[...wecomAuditsPageSizeOptions]"
/>
</div>
</div>
</template>
@@ -2,11 +2,12 @@
/**
* features/admin/modules/wecom/pages/WecomSettingsPage.vue
* 企微系统配置、通知与集成复制。
* 依赖:WECOM_ADMIN_KEY、lucide CircleHelp。
* 逻辑:绑定概览卡片只在绑定管理页展示,本页仅编辑系统/通知配置。
*/
import { inject } from 'vue';
import { useI18n } from 'vue-i18n';
import { CircleHelp } from 'lucide-vue-next';
import WecomOverviewCards from '../components/WecomOverviewCards.vue';
import { WECOM_ADMIN_KEY } from '../wecom.context';
const { t } = useI18n();
@@ -28,8 +29,6 @@ const {
<template>
<div class="space-y-6">
<WecomOverviewCards />
<div class="card shadow-sm p-5 space-y-4">
<h3 class="font-semibold text-primary">{{ t('admin.wecom.systemSettings') }}</h3>
<div class="grid grid-cols-1 md:grid-cols-2 gap-3">
@@ -1,82 +1,101 @@
/**
* features/workspace/api/voucherCheck.api.ts
* 用途:工作台立账凭证检核记录查询 API 客户端。
* 用途:工作台立账凭证检核任务列表、批次明细、企微发送记录与强制重检 API 客户端。
* 依赖:@/shared/api/client、getAuthHeaders。
* 逻辑:AccountingVoucherCheckView 调用;对应 /api/workspace/accounting-voucher-check/*。
* 逻辑:AccountingVoucherCheckView / DetailView 调用;对应 /api/workspace/accounting-voucher-check/* 与排程 Excel 下载。
*/
import { requestJson } from '@/shared/api/client';
import { getAuthHeaders } from '@/shared/utils/auth';
export interface VoucherCheckStateItem {
export interface VoucherCheckRunItem {
id: number;
scope_code: string;
schedule_run_id?: number | null;
run_no: string;
profile_code: string;
period_month: string | null;
invoice_no: string;
invoice_date?: string | null;
mode: string;
status: string;
folder_path?: string | null;
folder_exists?: boolean;
matched_files?: Record<string, string>;
missing_materials?: Array<{ code?: string; name?: string }>;
last_checked_at?: string | null;
last_missing_notified_on?: string | null;
subject_count: number;
missing_file_count: number;
missing_invoice_count: number;
technical_error_count: number;
staged_file_count: number;
finished_at?: string | null;
error_message?: string | null;
}
export interface VoucherCheckStatesResponse {
scope_code: string;
period: string;
export interface VoucherCheckRunsResponse {
page: number;
page_size: number;
total: number;
items: VoucherCheckStateItem[];
items: VoucherCheckRunItem[];
}
export interface VoucherCheckRunInvoiceItem {
id: number;
invoice_no: string;
result: string;
status_label?: string | null;
missing_materials?: Array<{ code?: string; name?: string }>;
missing_count?: number | null;
cells?: Record<string, string>;
checked_at?: string | null;
}
export interface VoucherCheckFileTypeSummary {
rule_code: string;
rule_name: string;
missing_file_count: number;
missing_invoice_count: number;
missing_ratio: number;
}
export interface VoucherCheckRunItemsResponse {
run_id: number;
engine_run_id?: number;
run_no: string;
page: number;
page_size: number;
total: number;
items: Array<{
id: number;
invoice_no: string;
invoice_date?: string | null;
result: string;
folder_path?: string | null;
folder_exists?: boolean;
matched_files?: Record<string, string>;
missing_materials?: Array<{ code?: string; name?: string }>;
error_code?: string | null;
error_message?: string | null;
checked_at?: string | null;
}>;
items: VoucherCheckRunInvoiceItem[];
subject_count?: number;
by_file_type?: VoucherCheckFileTypeSummary[];
}
export interface VoucherCheckForceRunResponse {
schedule_task_id: number;
schedule_run_id: number;
run_no: string;
job_id: number;
mode: string;
status: string;
}
/**
* 按月份/状态/发票号筛选最新检核状态。
* 分页查询检核任务列表。
*/
export function listVoucherCheckStates(params: {
export function listVoucherCheckRuns(params: {
period?: string;
profile_code?: string;
status?: string;
invoice_no?: string;
page?: number;
page_size?: number;
}) {
const q = new URLSearchParams();
if (params.period) q.set('period', params.period);
if (params.profile_code) q.set('profile_code', params.profile_code);
if (params.status) q.set('status', params.status);
if (params.invoice_no) q.set('invoice_no', params.invoice_no);
if (params.page) q.set('page', String(params.page));
if (params.page_size) q.set('page_size', String(params.page_size));
const qs = q.toString();
return requestJson<VoucherCheckStatesResponse>(
`/api/workspace/accounting-voucher-check/states${qs ? `?${qs}` : ''}`,
return requestJson<VoucherCheckRunsResponse>(
`/api/workspace/accounting-voucher-check/runs${qs ? `?${qs}` : ''}`,
{ headers: getAuthHeaders() },
);
}
/**
* 分页查询指定批次明细。
* 分页查询指定排程批次的 invoice 明细,可按 result 过滤状态;同时返回 by_file_type。
*/
export function listVoucherCheckRunItems(runId: number, params?: { result?: string; page?: number; page_size?: number }) {
const q = new URLSearchParams();
@@ -89,3 +108,92 @@ export function listVoucherCheckRunItems(runId: number, params?: { result?: stri
{ headers: getAuthHeaders() },
);
}
export interface VoucherCheckNotificationItem {
id: number;
run_id: number;
schedule_run_id?: number | null;
run_no?: string | null;
period_month?: string | null;
subject_count: number;
missing_file_count: number;
missing_invoice_count: number;
send_status: string;
skip_reason?: string | null;
excel_filename?: string | null;
has_excel?: boolean;
recipient_names?: string[];
sent_at?: string | null;
created_at?: string | null;
}
export interface VoucherCheckNotificationsResponse {
page: number;
page_size: number;
total: number;
items: VoucherCheckNotificationItem[];
}
/**
* 分页查询企微缺件汇总发送记录。
*/
export function listVoucherCheckNotifications(params?: {
period?: string;
send_status?: string;
page?: number;
page_size?: number;
}) {
const q = new URLSearchParams();
if (params?.period) q.set('period', params.period);
if (params?.send_status) q.set('send_status', params.send_status);
if (params?.page) q.set('page', String(params.page));
if (params?.page_size) q.set('page_size', String(params.page_size));
const qs = q.toString();
return requestJson<VoucherCheckNotificationsResponse>(
`/api/workspace/accounting-voucher-check/notifications${qs ? `?${qs}` : ''}`,
{ headers: getAuthHeaders() },
);
}
/**
* 下载该排程批次的检核结果 Excel。
* @param scheduleRunId - ScheduleRun.id
* @param filename - 回退文件名(无 Content-Disposition 时使用)
*/
export async function downloadVoucherCheckExcel(scheduleRunId: number, filename?: string | null) {
const res = await fetch(`/api/workspace/schedule-runs/${scheduleRunId}/excel`, { headers: getAuthHeaders() });
if (!res.ok) {
throw new Error('excel');
}
const blob = await res.blob();
const url = URL.createObjectURL(blob);
const link = document.createElement('a');
link.href = url;
const disposition = res.headers.get('content-disposition') || '';
const encoded = disposition.match(/filename\*=UTF-8''([^;]+)/i)?.[1];
const plain = disposition.match(/filename="?([^";]+)"?/i)?.[1];
const raw = encoded || plain || filename || 'voucher_check.xlsx';
try {
link.download = decodeURIComponent(raw);
} catch {
link.download = raw;
}
document.body.appendChild(link);
link.click();
document.body.removeChild(link);
URL.revokeObjectURL(url);
}
/**
* 强制重检上一个自然月(不走增量跳过)。
*/
export function triggerVoucherCheckForceAll() {
return requestJson<VoucherCheckForceRunResponse>(
'/api/workspace/accounting-voucher-check/runs',
{
method: 'POST',
headers: { ...getAuthHeaders(), 'Content-Type': 'application/json' },
body: JSON.stringify({ mode: 'force_all' }),
},
);
}
@@ -4,6 +4,7 @@
* 工作台左侧导航:子路由链接、货代/合同付款二级菜单、关联服务入口、返回聊天与退出登录。
* 依赖:WORKSPACE_PATHS、workspace.context、ExternalSystemLinks、auth.store、contract-payment 权限常量。
* 逻辑:底部关联服务复用 ws-nav-btn,与返回聊天/退出登录对齐;合同付款菜单仅在具备 contract_payment.access 时展示。
* 矮屏时中间导航独立滚动,底部返回聊天/退出登录始终留在视口内。
*/
import { computed, inject, onBeforeUnmount, onMounted, ref, watch } from 'vue';
import { useRoute } from 'vue-router';
@@ -45,7 +46,7 @@ const primaryLinkItems = [
] as const;
const secondaryLinkItems = [
{ path: WORKSPACE_PATHS.accountingVoucherCheck, labelKey: 'workspace.nav.accountingVoucherCheck', icon: ClipboardCheck, match: ['workspace-accounting-voucher-check'] },
{ path: WORKSPACE_PATHS.accountingVoucherCheck, labelKey: 'workspace.nav.accountingVoucherCheck', icon: ClipboardCheck, match: ['workspace-accounting-voucher-check', 'workspace-accounting-voucher-check-detail'] },
{ path: WORKSPACE_PATHS.feedback, labelKey: 'workspace.nav.feedback', icon: Edit, match: ['workspace-feedback'] },
{ path: WORKSPACE_PATHS.updates, labelKey: 'workspace.nav.updates', icon: Megaphone, match: ['workspace-updates'] },
] as const;
@@ -102,9 +103,9 @@ onBeforeUnmount(() => {
</script>
<template>
<aside class="lg:sticky lg:top-0 lg:h-screen">
<aside class="lg:h-full lg:min-h-0">
<div
class="flex h-full flex-col border-r border-default bg-surface shadow-sm transition-all duration-200"
class="flex h-full min-h-0 flex-col border-r border-default bg-surface shadow-sm transition-all duration-200"
:class="collapsed ? 'px-3 py-4' : 'px-4 py-4'"
>
<template v-if="collapsed">
@@ -118,7 +119,7 @@ onBeforeUnmount(() => {
</button>
</template>
<div class="border-b border-subtle pb-4">
<div class="shrink-0 border-b border-subtle pb-4">
<div class="flex items-center gap-3" :class="collapsed ? 'justify-center' : ''">
<div class="flex h-10 w-10 shrink-0 items-center justify-center rounded-full bg-gradient-to-br from-brand-500 via-brand-600 to-sky-600 text-sm font-bold text-white shadow-sm shadow-brand-500/25">
AI
@@ -141,7 +142,7 @@ onBeforeUnmount(() => {
</div>
</div>
<div class="flex-1 py-4">
<div class="min-h-0 flex-1 overflow-y-auto py-4">
<nav class="space-y-2">
<RouterLink
v-for="item in primaryLinkItems"
@@ -270,7 +271,7 @@ onBeforeUnmount(() => {
</nav>
</div>
<div class="border-t border-subtle pt-4">
<div class="shrink-0 border-t border-subtle pt-4">
<div class="space-y-2">
<ExternalSystemLinks
:compact="Boolean(collapsed)"
@@ -1,6 +1,7 @@
/**
* features/workspace/constants/routes.ts
* 工作台子路由 path 常量,以及旧 ?view= 查询参数到新 path 的映射。
* 立账凭证批次明细:accountingVoucherCheckDetail(scheduleRunId)。
*/
export const WORKSPACE_PATHS = {
root: '/workspace',
@@ -15,6 +16,7 @@ export const WORKSPACE_PATHS = {
shippingNoticeTasks: '/workspace/shipping-notice/tasks',
shippingNoticeMyTasks: '/workspace/shipping-notice/my-tasks',
accountingVoucherCheck: '/workspace/accounting-voucher-check',
accountingVoucherCheckDetail: (runId: number | string) => `/workspace/accounting-voucher-check/runs/${runId}`,
contractPayment: '/workspace/contract-payment',
contractPaymentReview: '/workspace/contract-payment/review',
contractPaymentWeeklyBatches: '/workspace/contract-payment/weekly-batches',
@@ -0,0 +1,13 @@
<script setup lang="ts">
/**
* features/workspace/pages/AccountingVoucherCheckDetailPage.vue
* 用途:立账凭证检核批次明细工作台页面壳。
* 依赖:AccountingVoucherCheckDetailView。
* 逻辑:路由懒加载入口。
*/
import AccountingVoucherCheckDetailView from '../views/AccountingVoucherCheckDetailView.vue';
</script>
<template>
<AccountingVoucherCheckDetailView />
</template>
@@ -0,0 +1,68 @@
/**
* features/workspace/utils/voucherCheck.display.ts
* 用途:立账凭证检核列表与明细页共用的状态文案、缺件列表、缺件数、缺失占比与企微发送状态展示。
* 依赖:vue-i18n 的 t()。
* 逻辑:AccountingVoucherCheckView / AccountingVoucherCheckDetailView 调用。
*/
/**
* 将检核状态码映射为工作台 i18n 文案。
* 核心逻辑:兼容引擎状态与旧 run_items 结论值;未知码原样返回。
* @param t - i18n 翻译函数
* @param value - 批次或 invoice 行状态
*/
export function voucherCheckStatusLabel(t: (key: string) => string, value: string): string {
if (value === 'complete' || value === 'completed') return t('workspace.voucherCheck.statusComplete');
if (value === 'missing') return t('workspace.voucherCheck.statusMissing');
if (value === 'skipped') return t('workspace.voucherCheck.statusSkipped');
if (value === 'technical_error' || value === 'technical_failed') return t('workspace.voucherCheck.statusTechError');
if (value === 'failed') return t('workspace.voucherCheck.statusTechError');
if (value === 'pending') return t('workspace.voucherCheck.statusPending');
return value || '-';
}
/**
* 将企微汇总发送状态码映射为工作台文案。
* @param t - i18n 翻译函数
* @param value - send_status
*/
export function voucherCheckNotifyStatusLabel(t: (key: string) => string, value: string): string {
if (value === 'sent') return t('workspace.voucherCheck.notifyStatusSent');
if (value === 'failed') return t('workspace.voucherCheck.notifyStatusFailed');
if (value === 'skipped_no_missing') return t('workspace.voucherCheck.notifyStatusNoMissing');
if (value === 'skipped_no_recipients') return t('workspace.voucherCheck.notifyStatusNoRecipients');
if (value === 'skipped_disabled') return t('workspace.voucherCheck.notifyStatusDisabled');
return value || '-';
}
/**
* 将缺件材料列表拼成展示文本。
* @param list - 缺件 code/name
*/
export function formatVoucherCheckMissing(list?: Array<{ code?: string; name?: string }>): string {
if (!list?.length) return '-';
return list.map((x) => x.name || x.code || '').filter(Boolean).join('、');
}
/**
* 取 invoice 行的缺件数;优先用后端 missing_count,否则数 missing_materials。
* @param row - 批次明细行
*/
export function voucherCheckMissingCount(row: {
missing_count?: number | null;
missing_materials?: Array<{ code?: string; name?: string }>;
}): number {
if (typeof row.missing_count === 'number' && Number.isFinite(row.missing_count)) {
return row.missing_count;
}
return row.missing_materials?.length ?? 0;
}
/**
* 将缺失占比格式化为百分数。
* @param ratio - 0–1 之间的比例
*/
export function formatVoucherCheckMissingRatio(ratio?: number | null): string {
const value = typeof ratio === 'number' && Number.isFinite(ratio) ? ratio : 0;
return `${(value * 100).toFixed(1)}%`;
}
@@ -0,0 +1,281 @@
<script setup lang="ts">
/**
* features/workspace/views/AccountingVoucherCheckDetailView.vue
* 用途:立账凭证检核批次明细独立页,支持按 invoice 或按文件类型汇总。
* 依赖:voucherCheck.api、PaginationBar、vue-router、vue-i18n、useMessage、voucherCheck.display。
* 逻辑:路由 /workspace/accounting-voucher-check/runs/:runId;标题下用下划线 Tab 切换汇总维度;状态筛选仅在按 invoice 时出现。
*/
import { computed, onMounted, ref, watch } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { ArrowLeft, Loader2, Search } from 'lucide-vue-next';
import PaginationBar from '@/shared/components/PaginationBar.vue';
import { useMessage } from '@/shared/composables/useMessage';
import { WORKSPACE_PATHS } from '../constants/routes';
import {
listVoucherCheckRunItems,
type VoucherCheckFileTypeSummary,
type VoucherCheckRunInvoiceItem,
} from '../api/voucherCheck.api';
import {
formatVoucherCheckMissing,
formatVoucherCheckMissingRatio,
voucherCheckMissingCount,
voucherCheckStatusLabel,
} from '../utils/voucherCheck.display';
const { t } = useI18n();
const msg = useMessage();
const route = useRoute();
const router = useRouter();
const loading = ref(false);
const items = ref<VoucherCheckRunInvoiceItem[]>([]);
const fileTypeRows = ref<VoucherCheckFileTypeSummary[]>([]);
const total = ref(0);
const page = ref(1);
const pageSize = ref(50);
const statusFilter = ref('');
const runNo = ref('');
const viewMode = ref<'invoice' | 'fileType'>('invoice');
const scheduleRunId = computed(() => {
const raw = route.params.runId;
const id = Number(Array.isArray(raw) ? raw[0] : raw);
return Number.isFinite(id) && id > 0 ? id : 0;
});
const titleRunId = computed(() => {
const q = route.query.runNo;
if (typeof q === 'string' && q.trim()) return q.trim();
return runNo.value || String(scheduleRunId.value || '');
});
const statusOptions = computed(() => [
{ value: '', label: t('workspace.voucherCheck.statusAll') },
{ value: 'missing', label: t('workspace.voucherCheck.statusMissing') },
{ value: 'complete', label: t('workspace.voucherCheck.statusComplete') },
{ value: 'technical_error', label: t('workspace.voucherCheck.statusTechError') },
]);
const pages = computed(() => Math.max(1, Math.ceil((total.value || 0) / Math.max(1, pageSize.value))));
/**
* 加载当前排程批次明细;invoice 行分页,文件类型汇总为整批快照。
*/
async function loadItems() {
if (!scheduleRunId.value) {
items.value = [];
fileTypeRows.value = [];
total.value = 0;
return;
}
loading.value = true;
try {
const data = await listVoucherCheckRunItems(scheduleRunId.value, {
result: statusFilter.value || undefined,
page: page.value,
page_size: pageSize.value,
});
items.value = data.items || [];
fileTypeRows.value = data.by_file_type || [];
total.value = data.total || 0;
runNo.value = data.run_no || '';
} catch (e: any) {
items.value = [];
fileTypeRows.value = [];
total.value = 0;
msg.error(e?.message || t('workspace.voucherCheck.loadFailed'));
} finally {
loading.value = false;
}
}
/**
* 状态筛选变更时回到第一页再查询。
*/
function applyStatusFilter() {
page.value = 1;
void loadItems();
}
/**
* 切换 invoice / 文件类型汇总视图。
* @param mode - 明细聚合维度
*/
function setViewMode(mode: 'invoice' | 'fileType') {
viewMode.value = mode;
}
/**
* 返回立账凭证检核任务列表。
*/
function backToList() {
void router.push(WORKSPACE_PATHS.accountingVoucherCheck);
}
/**
* invoice 行状态徽标样式。
* @param result - 引擎结论码
*/
function statusBadgeClass(result: string): string {
if (result === 'missing') return 'bg-rose-50 text-rose-700';
if (result === 'complete' || result === 'completed') return 'bg-emerald-50 text-emerald-700';
if (result === 'technical_error' || result === 'technical_failed' || result === 'failed') {
return 'bg-surface-soft text-secondary';
}
return 'bg-surface-soft text-secondary';
}
onMounted(() => {
void loadItems();
});
watch(scheduleRunId, () => {
page.value = 1;
statusFilter.value = '';
viewMode.value = 'invoice';
void loadItems();
});
</script>
<template>
<div class="space-y-5 animate-fade-in-up">
<header class="flex flex-wrap items-start justify-between gap-3">
<div class="space-y-1">
<h1 class="text-2xl font-bold text-primary">
{{ $t('workspace.voucherCheck.runItemsTitle', { runId: titleRunId }) }}
</h1>
<p class="text-sm text-muted">{{ $t('workspace.voucherCheck.detailSubtitle') }}</p>
</div>
<button
type="button"
class="inline-flex items-center gap-1.5 rounded-xl border border-default px-3 py-1.5 text-sm font-medium text-secondary transition-colors hover:bg-surface-soft"
@click="backToList"
>
<ArrowLeft class="h-3.5 w-3.5" />
{{ $t('workspace.voucherCheck.backToList') }}
</button>
</header>
<div class="flex gap-1 border-b border-default" role="tablist">
<button
type="button"
role="tab"
class="px-4 py-2.5 text-sm font-medium border-b-2 -mb-px transition-colors"
:class="viewMode === 'invoice' ? 'border-brand-600 text-brand-600' : 'border-transparent text-muted hover:text-secondary'"
:aria-selected="viewMode === 'invoice'"
@click="setViewMode('invoice')"
>
{{ $t('workspace.voucherCheck.viewByInvoice') }}
</button>
<button
type="button"
role="tab"
class="px-4 py-2.5 text-sm font-medium border-b-2 -mb-px transition-colors"
:class="viewMode === 'fileType' ? 'border-brand-600 text-brand-600' : 'border-transparent text-muted hover:text-secondary'"
:aria-selected="viewMode === 'fileType'"
@click="setViewMode('fileType')"
>
{{ $t('workspace.voucherCheck.viewByFileType') }}
</button>
</div>
<section
v-if="viewMode === 'invoice'"
class="flex flex-wrap items-end gap-3 rounded-2xl border border-default/80 bg-surface/70 px-4 py-3 shadow-sm"
>
<label class="flex flex-col gap-1 text-xs font-medium text-muted">
{{ $t('workspace.voucherCheck.status') }}
<select v-model="statusFilter" class="rounded-xl border border-default bg-surface px-3 py-1.5 text-sm text-primary">
<option v-for="opt in statusOptions" :key="opt.value || 'all'" :value="opt.value">{{ opt.label }}</option>
</select>
</label>
<button
type="button"
class="inline-flex items-center gap-1 rounded-xl bg-brand-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-brand-700"
@click="applyStatusFilter"
>
<Search class="h-3.5 w-3.5" />
{{ $t('workspace.voucherCheck.search') }}
</button>
</section>
<section class="overflow-hidden rounded-2xl border border-default bg-surface">
<div v-if="loading" class="flex items-center justify-center gap-2 py-16 text-sm text-muted">
<Loader2 class="h-4 w-4 animate-spin" />
{{ $t('workspace.voucherCheck.loading') }}
</div>
<template v-else-if="viewMode === 'fileType'">
<div v-if="!fileTypeRows.length" class="py-16 text-center text-sm text-muted">
{{ $t('workspace.voucherCheck.fileTypeEmpty') }}
</div>
<div v-else class="overflow-auto scrollbar-thin">
<table class="w-full min-w-[640px] text-left text-sm">
<thead class="sticky top-0 z-10">
<tr class="border-b border-subtle bg-surface-soft text-xs font-semibold text-secondary">
<th class="bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.fileType') }}</th>
<th class="bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.missingFiles') }}</th>
<th class="bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.involvedInvoiceCount') }}</th>
<th class="bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.missingRatio') }}</th>
</tr>
</thead>
<tbody>
<tr v-for="row in fileTypeRows" :key="row.rule_code" class="border-b border-subtle hover:bg-surface-soft/50">
<td class="px-4 py-3 font-medium text-primary">{{ row.rule_name || row.rule_code }}</td>
<td class="px-4 py-3 text-muted">{{ row.missing_file_count }}</td>
<td class="px-4 py-3 text-muted">{{ row.missing_invoice_count }}</td>
<td class="px-4 py-3 text-muted">{{ formatVoucherCheckMissingRatio(row.missing_ratio) }}</td>
</tr>
</tbody>
</table>
</div>
</template>
<template v-else>
<div v-if="!items.length" class="py-16 text-center text-sm text-muted">
{{ $t('workspace.voucherCheck.detailEmpty') }}
</div>
<div v-else class="max-h-[calc(100vh-18rem)] overflow-auto scrollbar-thin">
<table class="w-full min-w-[720px] text-left text-sm">
<thead class="sticky top-0 z-10">
<tr class="border-b border-subtle bg-surface-soft text-xs font-semibold text-secondary">
<th class="bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.invoiceNo') }}</th>
<th class="bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.status') }}</th>
<th class="bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.missingCount') }}</th>
<th class="bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.missing') }}</th>
</tr>
</thead>
<tbody>
<tr v-for="(row, idx) in items" :key="`${row.invoice_no}-${idx}`" class="border-b border-subtle hover:bg-surface-soft/50">
<td class="px-4 py-3 font-medium text-primary">{{ row.invoice_no }}</td>
<td class="px-4 py-3">
<span
class="inline-flex rounded-full px-2.5 py-1 text-xs font-semibold"
:class="statusBadgeClass(row.result)"
>
{{ voucherCheckStatusLabel(t, row.result) }}
</span>
</td>
<td class="px-4 py-3 text-muted">{{ voucherCheckMissingCount(row) }}</td>
<td class="px-4 py-3 text-muted">{{ formatVoucherCheckMissing(row.missing_materials) }}</td>
</tr>
</tbody>
</table>
</div>
</template>
</section>
<PaginationBar
v-if="viewMode === 'invoice'"
v-model:page="page"
v-model:page-size="pageSize"
:total="total"
:pages="pages"
:visible="total > 0 || !!statusFilter"
@update:page="() => loadItems()"
@update:page-size="() => loadItems()"
/>
</div>
</template>
@@ -1,67 +1,209 @@
<script setup lang="ts">
/**
* features/workspace/views/AccountingVoucherCheckView.vue
* 用途:立账凭证检核记录页——按月筛选最新状态与缺资料票。
* 依赖:voucherCheck.api、vue-i18n、useMessage。
* 逻辑:路由 /workspace/accounting-voucher-check;企微 textcard 也可跳转至此。
* 用途:立账凭证检核任务列表——按资料所属期间查看批次统计。
* 依赖:voucherCheck.api、vue-i18n、useMessage、DeleteConfirmDialog、PaginationBar、formatLocalDateTime、voucherCheck.display。
* 逻辑:路由 /workspace/accounting-voucher-check;Tab 切换检核任务与企微发送记录;查看详情进入独立明细页;企微 ?run_id= 重定向到明细路由。
*/
import { computed, onMounted, ref, watch } from 'vue';
import { useRoute } from 'vue-router';
import { computed, onMounted, onUnmounted, ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n';
import { Loader2, RefreshCw, Search } from 'lucide-vue-next';
import { Download, Loader2, RefreshCw, RotateCcw, Search } from 'lucide-vue-next';
import DeleteConfirmDialog from '@/shared/components/DeleteConfirmDialog.vue';
import PaginationBar from '@/shared/components/PaginationBar.vue';
import { useMessage } from '@/shared/composables/useMessage';
import { formatLocalDateTime } from '@/shared/utils/dateTime';
import { WORKSPACE_PATHS } from '../constants/routes';
import {
listVoucherCheckRunItems,
listVoucherCheckStates,
type VoucherCheckStateItem,
downloadVoucherCheckExcel,
listVoucherCheckNotifications,
listVoucherCheckRuns,
triggerVoucherCheckForceAll,
type VoucherCheckNotificationItem,
type VoucherCheckRunItem,
} from '../api/voucherCheck.api';
import { voucherCheckNotifyStatusLabel, voucherCheckStatusLabel } from '../utils/voucherCheck.display';
const { t } = useI18n();
const msg = useMessage();
const route = useRoute();
const router = useRouter();
const loading = ref(false);
const items = ref<VoucherCheckStateItem[]>([]);
const forcing = ref(false);
const showForceConfirm = ref(false);
const items = ref<VoucherCheckRunItem[]>([]);
const total = ref(0);
const page = ref(1);
const pageSize = 50;
const pageSize = ref(50);
const period = ref('');
const status = ref('');
const invoiceNo = ref('');
const runIdFilter = ref<number | null>(null);
const runItems = ref<Awaited<ReturnType<typeof listVoucherCheckRunItems>>['items']>([]);
const listTab = ref<'tasks' | 'notifications'>('tasks');
const notifyLoading = ref(false);
const notifyItems = ref<VoucherCheckNotificationItem[]>([]);
const notifyTotal = ref(0);
const notifyPage = ref(1);
const notifyPageSize = ref(50);
const notifyStatus = ref('');
let forcePollTimer: ReturnType<typeof setInterval> | null = null;
/**
* 默认检核月份(当前自然月 YYYY-MM)。
* 默认资料所属期间为上一个自然月 YYYY-MM。
*/
function currentPeriod(): string {
function previousPeriod(): string {
const d = new Date();
d.setDate(1);
d.setMonth(d.getMonth() - 1);
const m = String(d.getMonth() + 1).padStart(2, '0');
return `${d.getFullYear()}-${m}`;
}
const statusOptions = computed(() => [
{ value: '', label: t('workspace.voucherCheck.statusAll') },
{ value: 'complete', label: t('workspace.voucherCheck.statusComplete') },
{ value: 'missing', label: t('workspace.voucherCheck.statusMissing') },
{ value: 'completed', label: t('workspace.voucherCheck.statusComplete') },
{ value: 'technical_failed', label: t('workspace.voucherCheck.statusTechError') },
]);
const notifyStatusOptions = computed(() => [
{ value: '', label: t('workspace.voucherCheck.notifyStatusAll') },
{ value: 'sent', label: t('workspace.voucherCheck.notifyStatusSent') },
{ value: 'failed', label: t('workspace.voucherCheck.notifyStatusFailed') },
{ value: 'skipped_no_missing', label: t('workspace.voucherCheck.notifyStatusNoMissing') },
{ value: 'skipped_no_recipients', label: t('workspace.voucherCheck.notifyStatusNoRecipients') },
{ value: 'skipped_disabled', label: t('workspace.voucherCheck.notifyStatusDisabled') },
]);
const pages = computed(() =>
Math.max(1, Math.ceil((total.value || 0) / Math.max(1, pageSize.value))),
);
const notifyPages = computed(() =>
Math.max(1, Math.ceil((notifyTotal.value || 0) / Math.max(1, notifyPageSize.value))),
);
/**
* 加载最新状态列表。
* 加载企微缺件汇总发送记录。
*/
async function loadStates() {
async function loadNotifications() {
notifyLoading.value = true;
try {
const data = await listVoucherCheckNotifications({
period: period.value || undefined,
send_status: notifyStatus.value || undefined,
page: notifyPage.value,
page_size: notifyPageSize.value,
});
notifyItems.value = data.items || [];
notifyTotal.value = data.total || 0;
} catch (e: any) {
msg.error(e?.message || t('workspace.voucherCheck.notifyLoadFailed'));
} finally {
notifyLoading.value = false;
}
}
/**
* 切换检核任务 / 企微发送记录。
* @param tab - 列表页 Tab
*/
function setListTab(tab: 'tasks' | 'notifications') {
if (listTab.value === tab) return;
listTab.value = tab;
if (tab === 'notifications') {
notifyPage.value = 1;
void loadNotifications();
return;
}
page.value = 1;
void loadRuns();
}
/**
* 当前 Tab 按筛选条件查询。
*/
function searchCurrentTab() {
if (listTab.value === 'tasks') {
page.value = 1;
void loadRuns();
return;
}
notifyPage.value = 1;
void loadNotifications();
}
/**
* 当前 Tab 刷新列表,不重置页码。
*/
function refreshCurrentTab() {
if (listTab.value === 'tasks') {
void loadRuns();
return;
}
void loadNotifications();
}
/**
* 下载该发送记录对应批次的 Excel。
* @param row - 企微发送记录
*/
async function downloadNotifyExcel(row: VoucherCheckNotificationItem) {
if (!row.schedule_run_id || !row.has_excel) return;
try {
await downloadVoucherCheckExcel(row.schedule_run_id, row.excel_filename);
} catch {
msg.error(t('workspace.voucherCheck.downloadExcelFailed'));
}
}
/**
* 企微发送状态徽标样式。
* @param value - send_status
*/
function notifyBadgeClass(value: string): string {
if (value === 'sent') return 'bg-emerald-50 text-emerald-700';
if (value === 'failed') return 'bg-rose-50 text-rose-700';
return 'bg-surface-soft text-secondary';
}
/**
* 将接收人姓名拼成展示文本。
* @param names - 系统用户姓名
*/
function formatRecipientNames(names?: string[]): string {
if (!names?.length) return '-';
return names.join('、');
}
/**
* 从发送记录跳转对应批次明细。
* @param row - 企微发送记录
*/
function openNotifyDetail(row: VoucherCheckNotificationItem) {
if (!row.schedule_run_id) {
msg.error(t('workspace.voucherCheck.loadFailed'));
return;
}
void router.push({
path: WORKSPACE_PATHS.accountingVoucherCheckDetail(row.schedule_run_id),
query: row.run_no ? { runNo: row.run_no } : undefined,
});
}
/**
* 加载检核任务列表。
*/
async function loadRuns() {
loading.value = true;
try {
const data = await listVoucherCheckStates({
const data = await listVoucherCheckRuns({
period: period.value || undefined,
status: status.value || undefined,
invoice_no: invoiceNo.value || undefined,
page: page.value,
page_size: pageSize,
page_size: pageSize.value,
});
items.value = data.items || [];
total.value = data.total || 0;
if (data.period && !period.value) period.value = data.period;
} catch (e: any) {
msg.error(e?.message || t('workspace.voucherCheck.loadFailed'));
} finally {
@@ -70,186 +212,315 @@ async function loadStates() {
}
/**
* 若 URL 带 run_id,额外加载该批次明细。
* 企微卡片若仍带 ?run_id=,转到独立明细页,避免在列表上方展开。
*/
async function loadRunItemsIfNeeded() {
function redirectLegacyRunQuery() {
const raw = route.query.run_id;
const id = Number(Array.isArray(raw) ? raw[0] : raw);
if (!Number.isFinite(id) || id <= 0) {
runIdFilter.value = null;
runItems.value = [];
if (!Number.isFinite(id) || id <= 0) return false;
void router.replace(WORKSPACE_PATHS.accountingVoucherCheckDetail(id));
return true;
}
/**
* 打开批次 invoice 明细独立页。
* @param row - 列表中的检核批次
*/
function openRunDetail(row: VoucherCheckRunItem) {
if (!row.schedule_run_id) {
msg.error(t('workspace.voucherCheck.loadFailed'));
return;
}
runIdFilter.value = id;
try {
const data = await listVoucherCheckRunItems(id, { page: 1, page_size: 100 });
runItems.value = data.items || [];
} catch (e: any) {
msg.error(e?.message || t('workspace.voucherCheck.loadFailed'));
void router.push({
path: WORKSPACE_PATHS.accountingVoucherCheckDetail(row.schedule_run_id),
query: row.run_no ? { runNo: row.run_no } : undefined,
});
}
/**
* 停止强制重检后的列表轮询。
*/
function stopForcePoll() {
if (forcePollTimer) {
clearInterval(forcePollTimer);
forcePollTimer = null;
}
}
function statusLabel(value: string) {
if (value === 'complete') return t('workspace.voucherCheck.statusComplete');
if (value === 'missing') return t('workspace.voucherCheck.statusMissing');
if (value === 'skipped') return t('workspace.voucherCheck.statusSkipped');
if (value === 'technical_error') return t('workspace.voucherCheck.statusTechError');
return value || '-';
/**
* 打开强制重检确认框;用公共 DeleteConfirmDialog 替代原生 window.confirm。
*/
function openForceRecheck() {
if (forcing.value) return;
showForceConfirm.value = true;
}
function formatMissing(list?: Array<{ code?: string; name?: string }>) {
if (!list?.length) return '-';
return list.map((x) => x.name || x.code || '').filter(Boolean).join('、');
/**
* 确认后入队强制重检上一个月:不跳过已归档记录,期间取执行日的上一个自然月。
*/
async function forceRecheck() {
if (forcing.value) return;
forcing.value = true;
try {
const data = await triggerVoucherCheckForceAll();
msg.success(t('workspace.voucherCheck.forceQueued', { runNo: data.run_no }));
await loadRuns();
stopForcePoll();
const started = Date.now();
forcePollTimer = setInterval(() => {
void loadRuns();
if (Date.now() - started > 120_000) stopForcePoll();
}, 5000);
} catch (e: any) {
msg.error(e?.message || t('workspace.voucherCheck.forceFailed'));
} finally {
forcing.value = false;
}
}
onMounted(async () => {
period.value = currentPeriod();
if (redirectLegacyRunQuery()) return;
period.value = previousPeriod();
const qStatus = route.query.status;
if (typeof qStatus === 'string' && qStatus) status.value = qStatus;
await Promise.all([loadStates(), loadRunItemsIfNeeded()]);
await loadRuns();
});
watch(
() => route.query.run_id,
() => {
void loadRunItemsIfNeeded();
},
);
onUnmounted(() => {
stopForcePoll();
});
</script>
<template>
<div class="mx-auto flex h-full w-full max-w-6xl flex-col gap-4 p-4 md:p-6">
<div class="space-y-5 animate-fade-in-up">
<header class="space-y-1">
<h1 class="text-xl font-semibold text-slate-800">{{ $t('workspace.voucherCheck.title') }}</h1>
<p class="text-sm text-slate-500">{{ $t('workspace.voucherCheck.subtitle') }}</p>
<h1 class="text-2xl font-bold text-primary">{{ $t('workspace.voucherCheck.title') }}</h1>
<p class="text-sm text-muted">{{ $t('workspace.voucherCheck.subtitle') }}</p>
</header>
<section class="flex flex-wrap items-end gap-3 rounded-xl border border-slate-200 bg-white p-3">
<label class="flex flex-col gap-1 text-xs text-slate-500">
<div class="flex gap-1 border-b border-default" role="tablist">
<button
type="button"
role="tab"
class="px-4 py-2.5 text-sm font-medium border-b-2 -mb-px transition-colors"
:class="listTab === 'tasks' ? 'border-brand-600 text-brand-600' : 'border-transparent text-muted hover:text-secondary'"
:aria-selected="listTab === 'tasks'"
@click="setListTab('tasks')"
>
{{ $t('workspace.voucherCheck.tabTasks') }}
</button>
<button
type="button"
role="tab"
class="px-4 py-2.5 text-sm font-medium border-b-2 -mb-px transition-colors"
:class="listTab === 'notifications' ? 'border-brand-600 text-brand-600' : 'border-transparent text-muted hover:text-secondary'"
:aria-selected="listTab === 'notifications'"
@click="setListTab('notifications')"
>
{{ $t('workspace.voucherCheck.tabNotifications') }}
</button>
</div>
<section class="flex flex-wrap items-end gap-3 rounded-2xl border border-default/80 bg-surface/70 px-4 py-3 shadow-sm">
<label class="flex flex-col gap-1 text-xs font-medium text-muted">
{{ $t('workspace.voucherCheck.period') }}
<input v-model="period" type="month" class="rounded-lg border border-slate-200 px-3 py-2 text-sm text-slate-800" />
<input v-model="period" type="month" class="rounded-xl border border-default bg-surface px-3 py-1.5 text-sm text-primary" />
</label>
<label class="flex flex-col gap-1 text-xs text-slate-500">
<label v-if="listTab === 'tasks'" class="flex flex-col gap-1 text-xs font-medium text-muted">
{{ $t('workspace.voucherCheck.status') }}
<select v-model="status" class="rounded-lg border border-slate-200 px-3 py-2 text-sm text-slate-800">
<select v-model="status" class="rounded-xl border border-default bg-surface px-3 py-1.5 text-sm text-primary">
<option v-for="opt in statusOptions" :key="opt.value || 'all'" :value="opt.value">{{ opt.label }}</option>
</select>
</label>
<label class="flex min-w-[12rem] flex-1 flex-col gap-1 text-xs text-slate-500">
{{ $t('workspace.voucherCheck.invoiceNo') }}
<input
v-model="invoiceNo"
type="text"
class="rounded-lg border border-slate-200 px-3 py-2 text-sm text-slate-800"
:placeholder="$t('workspace.voucherCheck.invoicePlaceholder')"
@keyup.enter="page = 1; loadStates()"
/>
<label v-else class="flex flex-col gap-1 text-xs font-medium text-muted">
{{ $t('workspace.voucherCheck.notifyStatus') }}
<select v-model="notifyStatus" class="rounded-xl border border-default bg-surface px-3 py-1.5 text-sm text-primary">
<option v-for="opt in notifyStatusOptions" :key="opt.value || 'all'" :value="opt.value">{{ opt.label }}</option>
</select>
</label>
<button
type="button"
class="inline-flex items-center gap-1 rounded-lg bg-sky-600 px-3 py-2 text-sm font-medium text-white hover:bg-sky-700"
@click="page = 1; loadStates()"
class="inline-flex items-center gap-1 rounded-xl bg-brand-600 px-3 py-1.5 text-sm font-medium text-white transition-colors hover:bg-brand-700"
@click="searchCurrentTab"
>
<Search class="h-4 w-4" />
<Search class="h-3.5 w-3.5" />
{{ $t('workspace.voucherCheck.search') }}
</button>
<button
type="button"
class="inline-flex items-center gap-1 rounded-lg border border-slate-200 px-3 py-2 text-sm text-slate-700 hover:bg-slate-50"
@click="loadStates()"
class="inline-flex items-center gap-1 rounded-xl border border-default px-3 py-1.5 text-sm font-medium text-secondary transition-colors hover:bg-surface-soft"
@click="refreshCurrentTab"
>
<RefreshCw class="h-4 w-4" />
<RefreshCw class="h-3.5 w-3.5" />
{{ $t('workspace.voucherCheck.refresh') }}
</button>
<button
v-if="listTab === 'tasks'"
type="button"
class="ml-auto inline-flex items-center gap-1 rounded-xl border border-amber-300 bg-amber-50 px-3 py-1.5 text-sm font-medium text-amber-900 transition-colors hover:bg-amber-100 disabled:opacity-50"
:disabled="forcing"
@click="openForceRecheck()"
>
<Loader2 v-if="forcing" class="h-3.5 w-3.5 animate-spin" />
<RotateCcw v-else class="h-3.5 w-3.5" />
{{ $t('workspace.voucherCheck.forceRecheck') }}
</button>
</section>
<section v-if="runIdFilter" class="rounded-xl border border-amber-200 bg-amber-50/60 p-3">
<h2 class="mb-2 text-sm font-semibold text-amber-900">
{{ $t('workspace.voucherCheck.runItemsTitle', { runId: runIdFilter }) }}
</h2>
<div class="overflow-x-auto">
<table class="min-w-full text-left text-sm">
<thead class="text-xs text-slate-500">
<tr>
<th class="px-2 py-1">{{ $t('workspace.voucherCheck.invoiceNo') }}</th>
<th class="px-2 py-1">{{ $t('workspace.voucherCheck.result') }}</th>
<th class="px-2 py-1">{{ $t('workspace.voucherCheck.missing') }}</th>
<section v-if="listTab === 'tasks'" class="overflow-hidden rounded-2xl border border-default bg-surface">
<div v-if="loading" class="flex items-center justify-center gap-2 py-16 text-sm text-muted">
<Loader2 class="h-4 w-4 animate-spin" />
{{ $t('workspace.voucherCheck.loading') }}
</div>
<div v-else-if="!items.length" class="rounded-2xl border border-dashed border-transparent py-16 text-center text-sm text-muted">
{{ $t('workspace.voucherCheck.empty') }}
</div>
<div v-else class="max-h-[calc(100vh-17rem)] overflow-auto scrollbar-thin">
<table class="w-full min-w-[960px] text-left text-sm">
<thead class="sticky top-0 z-10">
<tr class="border-b border-subtle bg-surface-soft text-xs font-semibold text-secondary">
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.runNo') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.period') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.subjectCount') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.missingInvoices') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.missingFiles') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.status') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.checkedAt') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.failureReason') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3"></th>
</tr>
</thead>
<tbody>
<tr v-for="row in runItems" :key="row.id" class="border-t border-amber-100">
<td class="px-2 py-1.5 font-medium text-slate-800">{{ row.invoice_no }}</td>
<td class="px-2 py-1.5">{{ statusLabel(row.result) }}</td>
<td class="px-2 py-1.5 text-slate-600">{{ formatMissing(row.missing_materials) }}</td>
<tr v-for="row in items" :key="row.id" class="border-b border-subtle transition-colors hover:bg-surface-soft/50">
<td class="whitespace-nowrap px-4 py-3 font-medium text-primary">{{ row.run_no }}</td>
<td class="whitespace-nowrap px-4 py-3 text-muted">{{ row.period_month || '-' }}</td>
<td class="whitespace-nowrap px-4 py-3 text-muted">{{ row.subject_count }}</td>
<td class="whitespace-nowrap px-4 py-3 text-muted">{{ row.missing_invoice_count }}</td>
<td class="whitespace-nowrap px-4 py-3 text-muted">{{ row.missing_file_count }}</td>
<td class="whitespace-nowrap px-4 py-3">
<span
class="inline-flex rounded-full px-2.5 py-1 text-xs font-semibold"
:class="row.status === 'missing' ? 'bg-rose-50 text-rose-700' : row.status === 'completed' ? 'bg-emerald-50 text-emerald-700' : 'bg-surface-soft text-secondary'"
>
{{ voucherCheckStatusLabel(t, row.status) }}
</span>
</td>
<td class="whitespace-nowrap px-4 py-3 text-muted">{{ formatLocalDateTime(row.finished_at) }}</td>
<td class="max-w-64 truncate px-4 py-3 text-rose-700" :title="row.error_message || ''">{{ row.error_message || '-' }}</td>
<td class="whitespace-nowrap px-4 py-3">
<button
type="button"
class="text-sm font-medium text-brand-700 hover:underline"
@click="openRunDetail(row)"
>
{{ $t('workspace.voucherCheck.viewDetail') }}
</button>
</td>
</tr>
</tbody>
</table>
</div>
</section>
<section class="min-h-0 flex-1 overflow-hidden rounded-xl border border-slate-200 bg-white">
<div v-if="loading" class="flex items-center justify-center gap-2 py-16 text-sm text-slate-500">
<section v-else class="overflow-hidden rounded-2xl border border-default bg-surface">
<div v-if="notifyLoading" class="flex items-center justify-center gap-2 py-16 text-sm text-muted">
<Loader2 class="h-4 w-4 animate-spin" />
{{ $t('workspace.voucherCheck.loading') }}
</div>
<div v-else-if="!items.length" class="py-16 text-center text-sm text-slate-500">
{{ $t('workspace.voucherCheck.empty') }}
<div v-else-if="!notifyItems.length" class="rounded-2xl border border-dashed border-transparent py-16 text-center text-sm text-muted">
{{ $t('workspace.voucherCheck.notifyEmpty') }}
</div>
<div v-else class="max-h-full overflow-auto">
<table class="min-w-full text-left text-sm">
<thead class="sticky top-0 bg-slate-50 text-xs text-slate-500">
<tr>
<th class="px-3 py-2">{{ $t('workspace.voucherCheck.invoiceNo') }}</th>
<th class="px-3 py-2">{{ $t('workspace.voucherCheck.invoiceDate') }}</th>
<th class="px-3 py-2">{{ $t('workspace.voucherCheck.status') }}</th>
<th class="px-3 py-2">{{ $t('workspace.voucherCheck.folder') }}</th>
<th class="px-3 py-2">{{ $t('workspace.voucherCheck.missing') }}</th>
<th class="px-3 py-2">{{ $t('workspace.voucherCheck.checkedAt') }}</th>
<div v-else class="max-h-[calc(100vh-17rem)] overflow-auto scrollbar-thin">
<table class="w-full min-w-[1180px] text-left text-sm">
<thead class="sticky top-0 z-10">
<tr class="border-b border-subtle bg-surface-soft text-xs font-semibold text-secondary">
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.runNo') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.period') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.subjectCount') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.missingInvoices') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.missingFiles') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.notifyStatus') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.notifySkipReason') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.notifyRecipients') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.notifySentAt') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3">{{ $t('workspace.voucherCheck.notifyExcel') }}</th>
<th class="whitespace-nowrap bg-surface-soft px-4 py-3"></th>
</tr>
</thead>
<tbody>
<tr v-for="row in items" :key="row.id" class="border-t border-slate-100 hover:bg-slate-50/80">
<td class="px-3 py-2 font-medium text-slate-800">{{ row.invoice_no }}</td>
<td class="px-3 py-2 text-slate-600">{{ row.invoice_date || '-' }}</td>
<td class="px-3 py-2">
<tr v-for="row in notifyItems" :key="row.id" class="border-b border-subtle transition-colors hover:bg-surface-soft/50">
<td class="whitespace-nowrap px-4 py-3 font-medium text-primary">{{ row.run_no || '-' }}</td>
<td class="whitespace-nowrap px-4 py-3 text-muted">{{ row.period_month || '-' }}</td>
<td class="whitespace-nowrap px-4 py-3 text-muted">{{ row.subject_count }}</td>
<td class="whitespace-nowrap px-4 py-3 text-muted">{{ row.missing_invoice_count }}</td>
<td class="whitespace-nowrap px-4 py-3 text-muted">{{ row.missing_file_count }}</td>
<td class="whitespace-nowrap px-4 py-3">
<span
class="inline-flex rounded-full px-2 py-0.5 text-xs font-medium"
:class="row.status === 'complete' ? 'bg-emerald-50 text-emerald-700' : 'bg-rose-50 text-rose-700'"
class="inline-flex rounded-full px-2.5 py-1 text-xs font-semibold"
:class="notifyBadgeClass(row.send_status)"
>
{{ statusLabel(row.status) }}
{{ voucherCheckNotifyStatusLabel(t, row.send_status) }}
</span>
</td>
<td class="max-w-[16rem] truncate px-3 py-2 text-slate-600" :title="row.folder_path || ''">
{{ row.folder_path || '-' }}
<td class="max-w-56 truncate px-4 py-3 text-muted" :title="row.skip_reason || ''">{{ row.skip_reason || '-' }}</td>
<td class="max-w-48 truncate px-4 py-3 text-muted" :title="formatRecipientNames(row.recipient_names)">{{ formatRecipientNames(row.recipient_names) }}</td>
<td class="whitespace-nowrap px-4 py-3 text-muted">{{ formatLocalDateTime(row.sent_at || row.created_at) }}</td>
<td class="whitespace-nowrap px-4 py-3">
<button
v-if="row.has_excel && row.schedule_run_id"
type="button"
class="inline-flex items-center gap-1 text-sm font-medium text-brand-700 hover:underline"
@click="downloadNotifyExcel(row)"
>
<Download class="h-3.5 w-3.5" />
{{ $t('workspace.voucherCheck.downloadExcel') }}
</button>
<span v-else class="text-muted">-</span>
</td>
<td class="whitespace-nowrap px-4 py-3">
<button
type="button"
class="text-sm font-medium text-brand-700 hover:underline disabled:text-muted disabled:no-underline"
:disabled="!row.schedule_run_id"
@click="openNotifyDetail(row)"
>
{{ $t('workspace.voucherCheck.viewDetail') }}
</button>
</td>
<td class="px-3 py-2 text-slate-600">{{ formatMissing(row.missing_materials) }}</td>
<td class="px-3 py-2 text-slate-600">{{ row.last_checked_at || '-' }}</td>
</tr>
</tbody>
</table>
</div>
<div class="flex items-center justify-between border-t border-slate-100 px-3 py-2 text-xs text-slate-500">
<span>{{ $t('workspace.voucherCheck.totalCount', { total }) }}</span>
<div class="flex items-center gap-2">
<button
type="button"
class="rounded border border-slate-200 px-2 py-1 disabled:opacity-40"
:disabled="page <= 1 || loading"
@click="page -= 1; loadStates()"
>
{{ $t('workspace.voucherCheck.prevPage') }}
</button>
<span>{{ page }}</span>
<button
type="button"
class="rounded border border-slate-200 px-2 py-1 disabled:opacity-40"
:disabled="page * pageSize >= total || loading"
@click="page += 1; loadStates()"
>
{{ $t('workspace.voucherCheck.nextPage') }}
</button>
</div>
</div>
</section>
<PaginationBar
v-if="listTab === 'tasks'"
v-model:page="page"
v-model:page-size="pageSize"
:total="total"
:pages="pages"
:visible="total > 0 || !!status"
@update:page="() => loadRuns()"
@update:page-size="() => loadRuns()"
/>
<PaginationBar
v-else
v-model:page="notifyPage"
v-model:page-size="notifyPageSize"
:total="notifyTotal"
:pages="notifyPages"
:visible="notifyTotal > 0 || !!notifyStatus"
@update:page="() => loadNotifications()"
@update:page-size="() => loadNotifications()"
/>
<DeleteConfirmDialog
v-model="showForceConfirm"
:title="t('workspace.voucherCheck.forceRecheck')"
:message="t('workspace.voucherCheck.forceConfirm')"
:confirm-loading="forcing"
confirm-tone="primary"
@confirm="forceRecheck"
/>
</div>
</template>
@@ -2,6 +2,8 @@
/**
* features/workspace/views/WorkspaceLayout.vue
* 工作台布局壳:初始化 composable、侧边栏、子路由出口与全局弹窗。
* 依赖:useWorkspace、WorkspaceSidebar、WorkspaceModals、lucide 图标。
* 逻辑:桌面端(lg)锁视口高度,侧栏与主区各自滚动,避免矮屏把底部按钮裁掉。
*/
import { provide } from 'vue';
import { LayoutGrid, Bot, User } from 'lucide-vue-next';
@@ -22,12 +24,15 @@ const mobileTabs = [
</script>
<template>
<div class="page-shell min-h-screen font-sans animate-fade-in">
<div
class="page-shell font-sans animate-fade-in"
:class="ws.isMobile ? 'min-h-screen' : 'min-h-screen lg:h-screen lg:overflow-hidden'"
>
<div v-if="ws.isLoading" class="animate-pulse p-8 space-y-8">
<div class="h-48 bg-surface-strong rounded-2xl"></div>
</div>
<div v-else>
<div v-else class="lg:h-full lg:min-h-0">
<header v-if="ws.isMobile" class="sticky top-0 z-30 flex items-center justify-between border-b border-default bg-surface px-4 py-2.5">
<div class="flex items-center gap-2">
<button
@@ -43,12 +48,15 @@ const mobileTabs = [
</header>
<div
class="grid min-h-screen gap-0 transition-[grid-template-columns] duration-200"
class="grid min-h-screen gap-0 transition-[grid-template-columns] duration-200 lg:h-full lg:min-h-0"
:class="ws.isMobile ? '' : (ws.isSidebarCollapsed ? 'lg:grid-cols-[72px_minmax(0,1fr)]' : 'lg:grid-cols-[280px_minmax(0,1fr)]')"
>
<WorkspaceSidebar v-if="!ws.isMobile" :collapsed="ws.isSidebarCollapsed" />
<section class="ws-main" :class="ws.isMobile ? 'pb-20' : ''">
<section
class="ws-main min-h-0"
:class="ws.isMobile ? 'pb-20' : 'lg:overflow-y-auto lg:pb-8'"
>
<RouterView />
</section>
</div>
+5 -8
View File
@@ -1552,7 +1552,8 @@
"answerPlaceholder": "Full answer returned directly on cache hit…",
"cacheEnabled": "Enable FAQ cache (skip Dify)",
"isEnabled": "Show on workspace",
"cacheHelp": "When enabled, matched queries return the preset answer below without calling Dify.",
"isEnabledHelp": "Only controls the homepage shortcut. It does not affect whether chat returns the cached answer.",
"cacheHelp": "When enabled, matched queries return the preset answer below without calling Dify. Independent of the homepage shortcut.",
"expiresAt": "Expires At",
"expiresAtHelp": "Optional. After expiry the entry will not match. Leave empty for no expiry."
},
@@ -2358,15 +2359,11 @@
"difySystemPromptHint": "Available when a Dify Agent is enabled. Saved as system_prompt in the Workflow; LLM nodes must reference this variable.",
"difySystemPromptPlaceholder": "e.g. You are a material compliance assistant. Based on record test data, return JSON with dify_result (pass/fail/manual review) and dify_message.",
"platformJobAccountingVoucherCheck": "Accounting voucher check",
"accountingVoucherCheckHint": "Fetch the current-month ERP invoice list and scan the share for required filenames (no file content reading).",
"accountingVoucherCheckHint": "Every Tuesday, check the previous calendar month of sales invoice attachments: load the ERP invoice list, scan document-library type folders, and archive by invoice (skip same names).",
"voucherCheckScope": "Ledger scope",
"voucherCheckDirTemplate": "Directory template",
"voucherCheckDirTemplateHelp": "Only {root}/{YYYY}/{MM}/{invoice_no} placeholders are allowed",
"voucherCheckRequiredFiles": "Required materials",
"voucherCheckCaseSensitive": "Case-sensitive filenames",
"voucherCheckProfile": "Business profile",
"voucherCheckNotifyMissing": "Notify on missing materials",
"voucherCheckNotifyFailure": "Failure alert",
"voucherCheckSameDayDedup": "Same-invoice same-day dedup"
"voucherCheckNotifyFailure": "Failure alert"
},
"testRun": {
"title": "Test run — {name}",
+4 -96
View File
@@ -3565,104 +3565,12 @@
"hints": "Notes:"
},
"voucherCheck": {
"total": "Month total",
"total": "Invoices",
"scanned": "To scan",
"skipped": "Skipped",
"complete": "Complete",
"missing": "Missing"
},
"transfer": {
"fileProgressTitle": "Receipt file preparation",
"stageFileReady": "File ready",
"stageWaitingRpa": "RPA fetching",
"stageFailed": "Failed",
"precheckTitle": "Transfer precheck",
"businessDate": "Business date",
"executableCount": "Executable",
"notMaturedCount": "Same-day receipt",
"blockedCount": "Blocked",
"estimatedQuantity": "Est. transfer qty",
"estimatedErpWrites": "Est. ERP documents",
"selectedCount": "{count} selected",
"generateTransfer": "Generate transfer order",
"colSource": "Source",
"colMaterial": "Material",
"colName": "Name",
"colSpec": "Spec",
"colInvoice": "Invoice",
"colFromWarehouse": "From warehouse",
"colFromQty": "From qty",
"colToWarehouse": "To warehouse",
"colToQty": "To qty",
"colResult": "Result",
"resultExecutable": "Executable",
"resultNotMatured": "Same-day receipt",
"resultBlocked": "Blocked",
"resultUnknown": "Result unknown",
"runProgress": "Transfer run progress",
"runExecuting": "Executing",
"runSuccess": "Completed",
"runPartialFailed": "Partially failed",
"runFailed": "Failed",
"runCancelled": "Cancelled",
"refreshProgress": "Refresh",
"resultTitle": "Transfer result",
"materialCount": "{count} materials",
"posted": "Posted",
"noDocuments": "No ERP document generated",
"exceptionsTitle": "No ERP document generated",
"exceptionBusinessFailed": "Business failed",
"exceptionTechnicalFailed": "Technical failed",
"exceptionPrecheckExpired": "Precheck expired",
"downloadReceiptFiles": "Download receipt files",
"downloadErpInventory": "Download ERP inventory",
"downloadExceptions": "Download exceptions Excel",
"backlogTitle": "Backlog exceptions",
"retryErp": "Re-query ERP",
"manualClose": "Mark as no further action",
"manualCloseTitle": "Mark as no further action",
"manualCloseHint": "Auto schedule will skip it; history and audit are kept permanently.",
"closeReasonPlaceholder": "Enter a reason (required)",
"confirmClose": "Confirm close",
"cancel": "Cancel",
"agingNormal": "Normal",
"agingWarn": "Due soon (3d)",
"agingEscalate": "Escalated (5d)",
"agingCritical": "Critical backlog (7d+)",
"statusClosed": "Manually closed",
"resultUnknownReadonly": "Read-only; verify per SOP",
"noBacklog": "No backlog exceptions",
"sourceSelectTitle": "Select receipt source instances",
"sourceSelectHint": "DBS / Crane are platform groups; select the actual source instances to process.",
"selectAll": "Select all",
"selectEnabledAll": "Select all enabled",
"clearSources": "Clear",
"selectedSourceCount": "Selected {count} source instances",
"needSelectSource": "Select at least one enabled source instance",
"confirmScopeAndPrecheck": "Confirm scope & precheck",
"homeWelcome": "Hello, you are in",
"homeTodayLabel": "Today's tasks",
"homeTodayAction": "Start today's transfer precheck",
"homeTodayHint": "After selecting source instances, the system uses yesterday as the business date by default.",
"homeHistoryLabel": "Pending tasks",
"homeRecoverable": "Recoverable exceptions",
"homeRecoverableHint": "Re-query ERP stock before continuing",
"homeClosed": "Manually closed",
"homeClosedHint": "View reason and restore processing",
"homeUnknown": "Unknown result",
"homeUnknownHint": "Read-only; verify ERP facts offline",
"homeBack": "Back to home",
"retryReceipt": "Retry receipt RPA",
"retrying": "Retrying…",
"fileReady": "File ready",
"fileFetching": "Fetching",
"fileFailed": "Fetch failed",
"fileNone": "Pending",
"needReadyFile": "A selected source has no receipt file / is fetching / failed. Retry receipt RPA first.",
"selectVisible": "Select visible",
"selectRetryable": "Select retryable",
"batchRetry": "Batch retry RPA",
"selectedRetryableCount": "{count} retryable",
"noRetryable": "No selected source needs retry (already ready or fetching)"
"missing": "Missing invoices",
"missingFiles": "Missing files",
"missingInvoices": "Missing invoices"
}
}
+8 -4
View File
@@ -512,11 +512,15 @@
"SHIPPING.REVIEW_INVENTORY_SOURCE_UNRESOLVED": "Inventory source is not uniquely resolved. Complete inventory-source review before creating a formal order.",
"VOUCHER_CHECK_CONFIG_INVALID": "Accounting voucher check configuration is invalid.",
"VOUCHER_CHECK_INVOICE_REQUIRED": "Invoice number is required.",
"VOUCHER_CHECK_INVOICE_NOT_IN_PERIOD": "The invoice is not in the current-month ERP set.",
"VOUCHER_CHECK_INVOICE_PATH_INVALID": "Invoice number contains illegal path characters.",
"VOUCHER_CHECK_SHARE_UNAVAILABLE": "Shared folder is unavailable. Check the mount and health marker.",
"VOUCHER_CHECK_INVOICE_NOT_IN_PERIOD": "The invoice is not in the previous-month ERP set.",
"VOUCHER_CHECK_ERP_UNAVAILABLE": "ERP (Oracle) is unavailable. Please try again later.",
"VOUCHER_CHECK_RUN_NOT_FOUND": "Voucher check run or invoice state was not found.",
"VOUCHER_CHECK_DMS_UNAVAILABLE": "The sales invoice attachment library is unavailable. Please try again later.",
"VOUCHER_CHECK_ADAPTER_NOT_WIRED": "This document source is not wired yet.",
"VOUCHER_CHECK_ARCHIVE_NOT_WIRED": "Document library copy/create-folder API is not wired yet.",
"VOUCHER_CHECK_ARCHIVE_FAILED": "Failed to create a folder or copy a file in the document library.",
"VOUCHER_CHECK_RUN_NOT_FOUND": "The voucher check run was not found.",
"VOUCHER_CHECK_RUN_IN_PROGRESS": "An accounting voucher check is already queued or running. Try again later.",
"VOUCHER_CHECK_SCHEDULE_NOT_FOUND": "The accounting voucher check schedule was not found.",
"VOUCHER_CHECK_PERSIST_FAILED": "Failed to persist voucher check results.",
"TRANSFER_PERMISSION_DENIED": "No in-transit transfer permission.",
"TRANSFER_RECEIPT_NOT_MATURED": "Same-day receipt is not matured yet.",
+53 -13
View File
@@ -781,30 +781,70 @@
"localAccountDisabled": "This local account is disabled. Please contact the administrator."
},
"voucherCheck": {
"title": "Accounting Voucher Check Records",
"subtitle": "View completeness of required voucher materials for the current calendar month. Existence check only — no amount or supplier matching.",
"period": "Period",
"title": "Accounting voucher check tasks",
"subtitle": "Every Tuesday the job incrementally checks the previous calendar month, scans sales invoice attachment folders, archives by invoice, and summarizes missing files.",
"period": "Document period",
"status": "Status",
"statusAll": "All",
"statusComplete": "Complete",
"statusMissing": "Missing",
"statusSkipped": "Skipped",
"statusTechError": "Technical error",
"invoiceNo": "Invoice No.",
"invoiceDate": "Invoice Date",
"invoicePlaceholder": "Filter by invoice number",
"folder": "Share path",
"missing": "Missing materials",
"checkedAt": "Checked at",
"statusTechError": "Technical failure",
"statusPending": "Pending",
"invoiceNo": "invoice",
"invoiceDate": "Invoice date",
"invoicePlaceholder": "Filter by invoice",
"folder": "Type folder",
"missing": "Missing files",
"missingCount": "Missing count",
"checkedAt": "Run time",
"result": "Result",
"search": "Search",
"refresh": "Refresh",
"loading": "Loading…",
"empty": "No check records yet",
"loadFailed": "Failed to load voucher check records",
"empty": "No check batches yet",
"loadFailed": "Failed to load voucher check tasks",
"totalCount": "{total} records",
"prevPage": "Previous",
"nextPage": "Next",
"runItemsTitle": "Run {runId} details"
"runItemsTitle": "Batch {runId} details",
"detailTitle": "Batch details",
"detailSubtitle": "Review this batch by invoice or by file type.",
"detailEmpty": "No invoice details for this batch",
"fileTypeEmpty": "No file-type summary for this batch",
"viewByInvoice": "By invoice",
"viewByFileType": "By file type",
"fileType": "File type",
"involvedInvoiceCount": "Invoices involved",
"missingRatio": "Missing rate",
"backToList": "Back to list",
"runNo": "Batch no.",
"profile": "Profile",
"subjectCount": "Total invoices",
"missingFiles": "Missing files",
"missingInvoices": "Missing invoice count",
"viewDetail": "View details",
"forceRecheck": "Force recheck last month",
"failureReason": "Failure reason",
"forceConfirm": "This will fully recheck the previous calendar month. Already archived files will not be skipped, and the period filter above is ignored. Continue?",
"forceQueued": "Force recheck queued ({runNo}). The list will refresh when it finishes.",
"forceFailed": "Failed to queue the force recheck",
"tabTasks": "Check tasks",
"tabNotifications": "WeCom send log",
"notifyEmpty": "No WeCom send records yet",
"notifyLoadFailed": "Failed to load send records",
"notifyStatus": "Send status",
"notifyStatusAll": "All",
"notifyStatusSent": "Sent",
"notifyStatusFailed": "Send failed",
"notifyStatusNoMissing": "Not sent — no missing files",
"notifyStatusNoRecipients": "Not sent — no recipients",
"notifyStatusDisabled": "Notifications disabled",
"notifySkipReason": "Skip reason",
"notifySentAt": "Sent at",
"notifyRecipients": "Recipients",
"notifyExcel": "Excel",
"downloadExcel": "Download Excel",
"downloadExcelFailed": "Failed to download Excel"
}
}
+5 -8
View File
@@ -1552,7 +1552,8 @@
"answerPlaceholder": "คำตอบเต็มที่ส่งกลับเมื่อ cache hit…",
"cacheEnabled": "เปิด FAQ cache (ข้าม Dify)",
"isEnabled": "แสดงในหน้า workspace",
"cacheHelp": "เมื่อเปิดใช้ คำถามที่จับคู่ได้จะส่งคำตอบด้านล่างโดยไม่เรียก Dify",
"isEnabledHelp": "ควบคุมเฉพาะทางลัดบนหน้าแรก ไม่มีผลว่าแชทจะตอบจาก cache หรือไม่",
"cacheHelp": "เมื่อเปิดใช้ คำถามที่จับคู่ได้จะส่งคำตอบด้านล่างโดยไม่เรียก Dify ไม่ขึ้นกับว่าจะแสดงบนหน้าแรกหรือไม่",
"expiresAt": "หมดอายุเมื่อ",
"expiresAtHelp": "ไม่บังคับ หลังหมดอายุจะไม่จับคู่ ปล่อยว่างหากไม่มีวันหมดอายุ"
},
@@ -2236,15 +2237,11 @@
"difySystemPromptHint": "ใช้ได้เมื่อเปิดใช้ Dify Agent จะบันทึกเป็น system_prompt ใน Workflow; โหนด LLM ต้องอ้างอิงตัวแปรนี้",
"difySystemPromptPlaceholder": "เช่น คุณเป็นผู้ช่วยตรวจสอบความสอดคล้องของวัสดุ จากข้อมูล record ให้คืน JSON: dify_result (ผ่าน/ไม่ผ่าน/ตรวจด้วยมือ) และ dify_message",
"platformJobAccountingVoucherCheck": "ตรวจสอบเอกสารบัญชี",
"accountingVoucherCheckHint": "ดึงรายการใบแจ้งหนี้ ERP ของเดือนปัจจุบัน และสแกนไฟล์ที่ต้องมีบนแชร์ (ไม่อ่านเนื้อหาไฟล์)",
"accountingVoucherCheckHint": "ทุกวันอังคาร ตรวจเอกสารใบแจ้งหนี้ขายของเดือนก่อน: ดึงรายการใบแจ้งหนี้จาก ERP สแกนโฟลเดอร์ประเภทในคลังเอกสาร แล้วจัดเก็บตาม invoice (ข้ามชื่อซ้ำ)",
"voucherCheckScope": "ชุดบัญชี",
"voucherCheckDirTemplate": "เทมเพลตโฟลเดอร์",
"voucherCheckDirTemplateHelp": "อนุญาตเฉพาะ {root}/{YYYY}/{MM}/{invoice_no}",
"voucherCheckRequiredFiles": "เอกสารที่ต้องมี",
"voucherCheckCaseSensitive": "แยกตัวพิมพ์เล็ก/ใหญ่ในชื่อไฟล์",
"voucherCheckProfile": "โปรไฟล์ฝ่ายธุรกิจ",
"voucherCheckNotifyMissing": "แจ้งเตือนเมื่อขาดเอกสาร",
"voucherCheckNotifyFailure": "แจ้งเตือนเมื่อล้มเหลว",
"voucherCheckSameDayDedup": "ไม่แจ้งซ้ำใบเดียวกันในวันเดียวกัน"
"voucherCheckNotifyFailure": "แจ้งเตือนเมื่อล้มเหลว"
},
"status": {
"all": "ทุกสถานะ",
+4 -96
View File
@@ -3565,104 +3565,12 @@
"hints": "หมายเหตุ:"
},
"voucherCheck": {
"total": "ทั้งหมดเดือนนี้",
"total": "จำนวน invoice",
"scanned": "รอดตรวจ",
"skipped": "ข้าม",
"complete": "ครบ",
"missing": "ขาดเอกสาร"
},
"transfer": {
"fileProgressTitle": "การเตรียมไฟล์รับของ",
"stageFileReady": "ไฟล์พร้อม",
"stageWaitingRpa": "RPA กำลังดึงข้อมูล",
"stageFailed": "ล้มเหลว",
"precheckTitle": "ตรวจสอบก่อนโอน",
"businessDate": "วันที่ธุรกิจ",
"executableCount": "ดำเนินการได้",
"notMaturedCount": "รับของวันนี้",
"blockedCount": "ถูกบล็อก",
"estimatedQuantity": "จำนวนโอนโดยประมาณ",
"estimatedErpWrites": "เอกสาร ERP โดยประมาณ",
"selectedCount": "เลือก {count} รายการ",
"generateTransfer": "สร้างใบโอนทันที",
"colSource": "แหล่งรับของ",
"colMaterial": "รหัสวัสดุ",
"colName": "ชื่อ",
"colSpec": "สเปก",
"colInvoice": "Invoice",
"colFromWarehouse": "คลังต้นทาง",
"colFromQty": "จำนวนต้นทาง",
"colToWarehouse": "คลังปลายทาง",
"colToQty": "จำนวนปลายทาง",
"colResult": "ผลตรวจ",
"resultExecutable": "ดำเนินการได้",
"resultNotMatured": "รับของวันนี้",
"resultBlocked": "ถูกบล็อก",
"resultUnknown": "ผลไม่ทราบ",
"runProgress": "ความคืบหน้าการโอน",
"runExecuting": "กำลังดำเนินการ",
"runSuccess": "เสร็จสิ้น",
"runPartialFailed": "ล้มเหลวบางส่วน",
"runFailed": "ล้มเหลว",
"runCancelled": "ยกเลิกแล้ว",
"refreshProgress": "รีเฟรช",
"resultTitle": "ผลการโอน",
"materialCount": "{count} รายการวัสดุ",
"posted": "ผ่านรายการแล้ว",
"noDocuments": "ไม่มีการสร้างเอกสาร ERP",
"exceptionsTitle": "ไม่มีการสร้างเอกสาร ERP",
"exceptionBusinessFailed": "ธุรกิจล้มเหลว",
"exceptionTechnicalFailed": "เทคนิคล้มเหลว",
"exceptionPrecheckExpired": "ตรวจสอบหมดอายุ",
"downloadReceiptFiles": "ดาวน์โหลดไฟล์รับของ",
"downloadErpInventory": "ดาวน์โหลดสต็อก ERP",
"downloadExceptions": "ดาวน์โหลด Excel ข้อผิดพลาด",
"backlogTitle": "รายการค้างดำเนินการ",
"retryErp": "สอบถาม ERP อีกครั้ง",
"manualClose": "ทำเครื่องหมายไม่ต้องดำเนินการ",
"manualCloseTitle": "ทำเครื่องหมายไม่ต้องดำเนินการ",
"manualCloseHint": "หลังปิดระบบอัตโนมัติจะไม่ประมวลผลอีก ประวัติและการตรวจสอบคงอยู่ถาวร",
"closeReasonPlaceholder": "กรอกเหตุผล (จำเป็น)",
"confirmClose": "ยืนยันการปิด",
"cancel": "ยกเลิก",
"agingNormal": "ปกติ",
"agingWarn": "ใกล้ครบกำหนด (3 วัน)",
"agingEscalate": "ยกระดับ (5 วัน)",
"agingCritical": "ค้างสะสมรุนแรง (7 วัน+)",
"statusClosed": "ปิดด้วยมือแล้ว",
"resultUnknownReadonly": "อ่านอย่างเดียว ตรวจตาม SOP",
"noBacklog": "ไม่มีรายการค้างดำเนินการ",
"sourceSelectTitle": "เลือกแหล่งรับของ",
"sourceSelectHint": "DBS / Crane เป็นเพียงกลุ่มแพลตฟอร์ม กรุณาเลือกแหล่งรับของจริงที่ต้องการดำเนินการ",
"selectAll": "เลือกทั้งหมด",
"selectEnabledAll": "เลือกที่เปิดใช้งานทั้งหมด",
"clearSources": "ล้างข้อมูล",
"selectedSourceCount": "เลือกแล้ว {count} แหล่งรับ",
"needSelectSource": "กรุณาเลือกแหล่งรับที่เปิดใช้งานอย่างน้อยหนึ่งรายการ",
"confirmScopeAndPrecheck": "ยืนยันขอบเขตและตรวจสอบ",
"homeWelcome": "สวัสดี คุณได้เข้าสู่",
"homeTodayLabel": "งานวันนี้",
"homeTodayAction": "เริ่มการตรวจสอบการโอนย้ายวันนี้",
"homeTodayHint": "หลังจากเลือกแหล่งรับ ระบบจะใช้เมื่อวานเป็นวันที่ทำรายการโดยค่าเริ่มต้น",
"homeHistoryLabel": "งานค้าง",
"homeRecoverable": "รายการผิดปกติที่กู้คืนได้",
"homeRecoverableHint": "สามารถสอบถามสต็อก ERP ใหม่ก่อนดำเนินการต่อ",
"homeClosed": "ปิดด้วยตนเองแล้ว",
"homeClosedHint": "สามารถดูสาเหตุและกู้คืนการดำเนินการได้",
"homeUnknown": "ผลลัพธ์ไม่ทราบ",
"homeUnknownHint": "อ่านอย่างเดียว ต้องตรวจสอบข้อเท็จจริง ERP ภายนอก",
"homeBack": "กลับหน้าหลัก",
"retryReceipt": "ลองใหม่ RPA รับของ",
"retrying": "กำลังลองใหม่…",
"fileReady": "ไฟล์พร้อมแล้ว",
"fileFetching": "กำลังดึง",
"fileFailed": "ดึงล้มเหลว",
"fileNone": "รอดำเนินการ",
"needReadyFile": "แหล่งที่เลือกไม่มีไฟล์รับของ / กำลังดึง / ล้มเหลว โปรดลอง RPA รับของก่อน",
"selectVisible": "เลือกที่เห็นทั้งหมด",
"selectRetryable": "เลือกที่ลองใหม่ได้",
"batchRetry": "ลองใหม่เป็นชุด",
"selectedRetryableCount": "ลองใหม่ได้ {count} รายการ",
"noRetryable": "ไม่มีแหล่งที่เลือกต้องลองใหม่ (พร้อมแล้วหรือกำลังดึง)"
"missing": "invoice ที่ขาด",
"missingFiles": "ไฟล์ที่ขาด",
"missingInvoices": "invoice ที่ขาด"
}
}
+8 -4
View File
@@ -512,11 +512,15 @@
"SHIPPING.REVIEW_INVENTORY_SOURCE_UNRESOLVED": "ยังไม่ยืนยันแหล่งสต็อกแบบเฉพาะเจาะจง ไม่สามารถสร้างคำสั่งอย่างเป็นทางการได้ กรุณาตรวจสอบแหล่งสต็อกก่อน",
"VOUCHER_CHECK_CONFIG_INVALID": "การตั้งค่าการตรวจสอบเอกสารบัญชีไม่ถูกต้อง",
"VOUCHER_CHECK_INVOICE_REQUIRED": "ต้องระบุเลขที่ใบแจ้งหนี้",
"VOUCHER_CHECK_INVOICE_NOT_IN_PERIOD": "ใบแจ้งหนี้ไม่อยู่ในชุด ERP ของเดือนปัจจุบัน",
"VOUCHER_CHECK_INVOICE_PATH_INVALID": "เลขที่ใบแจ้งหนี้มีอักขระเส้นทางที่ไม่ถูกต้อง",
"VOUCHER_CHECK_SHARE_UNAVAILABLE": "โฟลเดอร์แชร์ใช้ไม่ได้ โปรดตรวจสอบการเมานต์และไฟล์สุขภาพ",
"VOUCHER_CHECK_INVOICE_NOT_IN_PERIOD": "ใบแจ้งหนี้ไม่อยู่ในชุด ERP ของเดือนที่แล้ว",
"VOUCHER_CHECK_ERP_UNAVAILABLE": "ERP (Oracle) ใช้ไม่ได้ โปรดลองใหม่ภายหลัง",
"VOUCHER_CHECK_RUN_NOT_FOUND": "ไม่พบรอบการตรวจหรือสถานะใบแจ้งหนี้",
"VOUCHER_CHECK_DMS_UNAVAILABLE": "คลังเอกสารใบแจ้งหนี้ขายใช้ไม่ได้ โปรดลองใหม่ภายหลัง",
"VOUCHER_CHECK_ADAPTER_NOT_WIRED": "แหล่งเอกสารนี้ยังไม่ได้ต่อระบบ",
"VOUCHER_CHECK_ARCHIVE_NOT_WIRED": "API คัดลอก/สร้างโฟลเดอร์ของคลังเอกสารยังไม่ได้ต่อระบบ",
"VOUCHER_CHECK_ARCHIVE_FAILED": "สร้างโฟลเดอร์หรือคัดลอกไฟล์ในคลังเอกสารไม่สำเร็จ",
"VOUCHER_CHECK_RUN_NOT_FOUND": "ไม่พบรอบการตรวจเอกสารบัญชี",
"VOUCHER_CHECK_RUN_IN_PROGRESS": "งานตรวจเอกสารบัญชียังอยู่ในคิวหรือกำลังทำงาน โปรดลองใหม่ภายหลัง",
"VOUCHER_CHECK_SCHEDULE_NOT_FOUND": "ไม่พบตารางงานตรวจเอกสารบัญชี",
"VOUCHER_CHECK_PERSIST_FAILED": "บันทึกผลการตรวจไม่สำเร็จ",
"TRANSFER_PERMISSION_DENIED": "ไม่มีสิทธิ์โอนระหว่างคลัง",
"TRANSFER_RECEIPT_NOT_MATURED": "การรับของวันนี้ยังไม่พร้อมดำเนินการ",
+52 -12
View File
@@ -717,30 +717,70 @@
"untitled": "บทสนทนาไม่มีชื่อ"
},
"voucherCheck": {
"title": "บันทึกตรวจสอบเอกสารบัญชี",
"subtitle": "ดูสถานะครบ/ขาดเอกสารใบแจ้งหนี้ของเดือนปฏิทินปัจจุบัน ตรวจสอบเฉพาะการมีอยู่ของไฟล์ ไม่เทียบยอดหรือผู้ขาย",
"period": "เดือนที่ตรวจ",
"title": "งานตรวจเอกสารบัญชี",
"subtitle": "ทุกวันอังคารตรวจเดือนปฏิทินก่อนหน้าแบบเพิ่มส่วน แสกนโฟลเดอร์เอกสารขาย แล้วจัดเก็บตาม invoice พร้อมสรุปไฟล์ที่ขาด",
"period": "ช่วงเอกสาร",
"status": "สถานะ",
"statusAll": "ทั้งหมด",
"statusComplete": "ครบ",
"statusMissing": "ขาดเอกสาร",
"statusSkipped": "ข้าม",
"statusTechError": "ข้อผิดพลาดทางเทคนิค",
"invoiceNo": "เลขที่ใบแจ้งหนี้",
"statusTechError": "ล้มเหลวทางเทคนิค",
"statusPending": "รอดำเนินการ",
"invoiceNo": "invoice",
"invoiceDate": "วันที่ใบแจ้งหนี้",
"invoicePlaceholder": "กรองด้วยเลขที่ใบแจ้งหนี้",
"folder": "เส้นทางแชร์",
"missing": "เอกสารที่ขาด",
"checkedAt": "เวลาที่ตรวจ",
"invoicePlaceholder": "กรองด้วย invoice",
"folder": "โฟลเดอร์ประเภท",
"missing": "ไฟล์ที่ขาด",
"missingCount": "จำนวนที่ขาด",
"checkedAt": "เวลาที่รัน",
"result": "ผลลัพธ์",
"search": "ค้นหา",
"refresh": "รีเฟรช",
"loading": "กำลังโหลด…",
"empty": "ยังไม่มีบันทึกการตรวจ",
"loadFailed": "โหลดบันทึกตรวจสอบไม่สำเร็จ",
"empty": "ยังไม่มีรอบการตรวจ",
"loadFailed": "โหลดงานตรวจไม่สำเร็จ",
"totalCount": "ทั้งหมด {total} รายการ",
"prevPage": "ก่อนหน้า",
"nextPage": "ถัดไป",
"runItemsTitle": "รายละเอียดรอบ {runId}"
"runItemsTitle": "รายละเอียดรอบ {runId}",
"detailTitle": "รายละเอียดรอบ",
"detailSubtitle": "ดูผลตรวจของรอบนี้ตาม invoice หรือตามประเภทไฟล์",
"detailEmpty": "รอบนี้ยังไม่มีรายละเอียด invoice",
"fileTypeEmpty": "รอบนี้ยังไม่มีสรุปตามประเภทไฟล์",
"viewByInvoice": "ตาม invoice",
"viewByFileType": "ตามประเภทไฟล์",
"fileType": "ประเภทไฟล์",
"involvedInvoiceCount": "จำนวน invoice ที่เกี่ยวข้อง",
"missingRatio": "สัดส่วนที่ขาด",
"backToList": "กลับไปรายการ",
"runNo": "เลขรอบ",
"profile": "ฝ่ายธุรกิจ",
"subjectCount": "จำนวน invoice ทั้งหมด",
"missingFiles": "จำนวนไฟล์ที่ขาด",
"missingInvoices": "จำนวน invoice ที่ขาดเอกสาร",
"viewDetail": "ดูรายละเอียด",
"forceRecheck": "ตรวจเดือนที่แล้วใหม่ทั้งชุด",
"failureReason": "สาเหตุที่ล้มเหลว",
"forceConfirm": "ระบบจะตรวจเดือนปฏิทินก่อนหน้าทั้งชุด ไม่ข้ามไฟล์ที่จัดเก็บแล้ว และไม่ใช้ช่วงที่กรองด้านบน ต้องการเริ่มหรือไม่?",
"forceQueued": "จัดคิวตรวจใหม่แล้ว ({runNo}) รายการจะรีเฟรชเมื่อเสร็จ",
"forceFailed": "จัดคิวตรวจใหม่ไม่สำเร็จ",
"tabTasks": "งานตรวจ",
"tabNotifications": "ประวัติส่ง WeCom",
"notifyEmpty": "ยังไม่มีประวัติส่ง WeCom",
"notifyLoadFailed": "โหลดประวัติส่งไม่สำเร็จ",
"notifyStatus": "สถานะการส่ง",
"notifyStatusAll": "ทั้งหมด",
"notifyStatusSent": "ส่งแล้ว",
"notifyStatusFailed": "ส่งไม่สำเร็จ",
"notifyStatusNoMissing": "ไม่ส่ง เพราะไม่มีไฟล์ขาด",
"notifyStatusNoRecipients": "ไม่ส่ง เพราะไม่มีผู้รับ",
"notifyStatusDisabled": "ปิดการแจ้งเตือน",
"notifySkipReason": "เหตุผลที่ไม่ได้ส่ง",
"notifySentAt": "เวลาที่ส่ง",
"notifyRecipients": "ผู้รับ",
"notifyExcel": "Excel",
"downloadExcel": "ดาวน์โหลด Excel",
"downloadExcelFailed": "ดาวน์โหลด Excel ไม่สำเร็จ"
}
}
+5 -8
View File
@@ -1686,7 +1686,8 @@
"answerPlaceholder": "填写命中后直接返回给用户的完整回答…",
"cacheEnabled": "启用 FAQ 缓存(跳过 Dify)",
"isEnabled": "在前台展示",
"cacheHelp": "开启后,匹配成功的问题将直接返回下方标准答案,不再调用 Dify。",
"isEnabledHelp": "仅控制工作台首页是否出现快捷入口,不影响聊天是否直答。",
"cacheHelp": "开启后,匹配成功的问题将直接返回下方标准答案,不再调用 Dify。与是否在前台展示无关。",
"expiresAt": "过期时间",
"expiresAtHelp": "可选。到期后不再命中缓存,留空表示长期有效。"
},
@@ -2470,15 +2471,11 @@
"difySystemPromptHint": "仅在启用 Dify Agent 时可配置。保存后将作为 system_prompt 传入 Workflow;编排中 LLM 节点需引用该变量。",
"difySystemPromptPlaceholder": "例如:你是物料合规判定助手。根据 record 中的检测数据判定是否合格,仅返回 JSON:dify_result(合格/不合格/人工判定)与 dify_message。",
"platformJobAccountingVoucherCheck": "立账凭证检核",
"accountingVoucherCheckHint": "按当前自然月拉取 ERP 发票清单,扫描共享盘必检材料是否存在(不读文件内容)。",
"accountingVoucherCheckHint": "每周二检核上一个自然月的销售开票附件:拉取 ERP 发票清单,扫描文档库类型目录并按 invoice 归档(同名跳过)。",
"voucherCheckScope": "账套",
"voucherCheckDirTemplate": "目录模板",
"voucherCheckDirTemplateHelp": "仅允许 {root}/{YYYY}/{MM}/{invoice_no}",
"voucherCheckRequiredFiles": "必检材料",
"voucherCheckCaseSensitive": "文件名区分大小写",
"voucherCheckProfile": "业务方 Profile",
"voucherCheckNotifyMissing": "缺资料通知",
"voucherCheckNotifyFailure": "失败告警",
"voucherCheckSameDayDedup": "同票同日去重"
"voucherCheckNotifyFailure": "失败告警"
},
"testRun": {
"title": "测试执行 — {name}",
+5 -97
View File
@@ -3639,104 +3639,12 @@
"hints": "提示:"
},
"voucherCheck": {
"total": "当月总数",
"total": "主体总数",
"scanned": "本次待检",
"skipped": "跳过",
"complete": "齐全",
"missing": "缺资料"
},
"transfer": {
"fileProgressTitle": "收料文件准备",
"stageFileReady": "文件就绪",
"stageWaitingRpa": "RPA 抓取中",
"stageFailed": "失败",
"precheckTitle": "调拨预检",
"businessDate": "业务日期",
"executableCount": "可执行",
"notMaturedCount": "当天收料",
"blockedCount": "阻断",
"estimatedQuantity": "预计调拨数量",
"estimatedErpWrites": "预计 ERP 单据",
"selectedCount": "已选 {count} 张",
"generateTransfer": "直接生成调拨单",
"colSource": "收料来源",
"colMaterial": "料号",
"colName": "品名",
"colSpec": "规格",
"colInvoice": "Invoice",
"colFromWarehouse": "拨出仓库",
"colFromQty": "拨出数量",
"colToWarehouse": "拨入仓库",
"colToQty": "拨入数量",
"colResult": "预检结果",
"resultExecutable": "可执行",
"resultNotMatured": "当天收料",
"resultBlocked": "已阻断",
"resultUnknown": "结果未知",
"runProgress": "调拨执行进度",
"runExecuting": "执行中",
"runSuccess": "已完成",
"runPartialFailed": "部分失败",
"runFailed": "失败",
"runCancelled": "已取消",
"refreshProgress": "刷新进度",
"resultTitle": "调拨结果",
"materialCount": "{count} 项物料",
"posted": "已过账",
"noDocuments": "本次未生成 ERP 单据",
"exceptionsTitle": "未生成 ERP 单据",
"exceptionBusinessFailed": "业务失败",
"exceptionTechnicalFailed": "技术失败",
"exceptionPrecheckExpired": "预检失效",
"downloadReceiptFiles": "下载收料来源文件",
"downloadErpInventory": "下载 ERP 库存表",
"downloadExceptions": "下载异常 Excel",
"backlogTitle": "待处理异常",
"retryErp": "重新查询 ERP",
"manualClose": "标记无需继续处理",
"manualCloseTitle": "标记无需继续处理",
"manualCloseHint": "关闭后自动排程不再处理;历史与审计永久保留。",
"closeReasonPlaceholder": "请输入关闭原因(必填)",
"confirmClose": "确认关闭",
"cancel": "取消",
"agingNormal": "普通待办",
"agingWarn": "即将超期(3 天)",
"agingEscalate": "升级(5 天)",
"agingCritical": "严重积压(7 天+)",
"statusClosed": "已人工关闭",
"resultUnknownReadonly": "只读,按 SOP 人工核实",
"noBacklog": "暂无待处理异常",
"sourceSelectTitle": "选择收料来源实例",
"sourceSelectHint": "DBS、Crane 仅为平台分组;请勾选实际需要处理的来源实例。",
"selectAll": "全选",
"selectEnabledAll": "全选已启用",
"clearSources": "清空",
"selectedSourceCount": "已选 {count} 个来源实例",
"needSelectSource": "请至少选择一个已启用来源实例",
"confirmScopeAndPrecheck": "确认范围并预检",
"homeWelcome": "你好,您已进入",
"homeTodayLabel": "今日待办",
"homeTodayAction": "发起今日调拨预检",
"homeTodayHint": "选择来源实例后,系统默认以昨天为业务日期处理可成熟收料。",
"homeHistoryLabel": "历史待办",
"homeRecoverable": "可恢复异常",
"homeRecoverableHint": "可重新查询 ERP 库存后继续处理",
"homeClosed": "已人工关闭",
"homeClosedHint": "可查看原因并恢复处理",
"homeUnknown": "结果未知",
"homeUnknownHint": "只读,需线下核实 ERP 事实",
"homeBack": "返回首页",
"retryReceipt": "重试收料 RPA",
"retrying": "重试中…",
"fileReady": "文件已就绪",
"fileFetching": "抓取中",
"fileFailed": "抓取失败",
"fileNone": "待抓取",
"needReadyFile": "所选来源存在无收料文件/或抓取中/或失败,请先重试收料 RPA",
"selectVisible": "全选可见",
"selectRetryable": "只选可重试",
"batchRetry": "批量重试 RPA",
"selectedRetryableCount": "其中 {count} 个可重试",
"noRetryable": "所选来源均无需重试(已就绪或抓取中)"
"complete": "完整",
"missing": "缺件 invoice",
"missingFiles": "缺件文件",
"missingInvoices": "缺件 invoice"
}
}
+8 -4
View File
@@ -512,11 +512,15 @@
"SHIPPING.REVIEW_INVENTORY_SOURCE_UNRESOLVED": "库存源尚未唯一确定,不能创建正式订单。请先完成库存源复核。",
"VOUCHER_CHECK_CONFIG_INVALID": "立账凭证检核配置无效。",
"VOUCHER_CHECK_INVOICE_REQUIRED": "请提供发票号。",
"VOUCHER_CHECK_INVOICE_NOT_IN_PERIOD": "指定发票不在当前月 ERP 集合中。",
"VOUCHER_CHECK_INVOICE_PATH_INVALID": "发票号含非法路径字符。",
"VOUCHER_CHECK_SHARE_UNAVAILABLE": "共享盘不可用,请检查挂载与健康标记。",
"VOUCHER_CHECK_INVOICE_NOT_IN_PERIOD": "指定发票不在上一个月 ERP 集合中。",
"VOUCHER_CHECK_ERP_UNAVAILABLE": "ERP(Oracle)不可用,请稍后重试。",
"VOUCHER_CHECK_RUN_NOT_FOUND": "检核批次或发票状态不存在。",
"VOUCHER_CHECK_DMS_UNAVAILABLE": "销售开票附件文档库不可用,请稍后重试。",
"VOUCHER_CHECK_ADAPTER_NOT_WIRED": "该资料获取方式尚未接线。",
"VOUCHER_CHECK_ARCHIVE_NOT_WIRED": "文档库复制/建文件夹接口尚未接线。",
"VOUCHER_CHECK_ARCHIVE_FAILED": "文档库建文件夹或复制失败。",
"VOUCHER_CHECK_RUN_NOT_FOUND": "检核批次不存在。",
"VOUCHER_CHECK_RUN_IN_PROGRESS": "立账凭证检核正在执行或排队中,请稍后再试。",
"VOUCHER_CHECK_SCHEDULE_NOT_FOUND": "未找到立账凭证检核排程任务。",
"VOUCHER_CHECK_PERSIST_FAILED": "检核结果落库失败。",
"TRANSFER_PERMISSION_DENIED": "无在途调拨权限。",
"TRANSFER_RECEIPT_NOT_MATURED": "当天收料尚未成熟,不可查询或调拨。",
+55 -15
View File
@@ -780,31 +780,71 @@
"casdoorNotMatchedNeedLocalUser": "Casdoor 登录成功,但未匹配到本地账号。请让管理员在本地用户表创建同名 username 或相同 email 的账号。",
"localAccountDisabled": "该本地账号已被禁用,请联系管理员启用后再登录。"
},
"voucherCheck": {
"title": "立账凭证检核记录",
"subtitle": "按当前自然月查看发票材料齐全/缺资料状态;只判文件是否存在,不核对金额与供应商。",
"period": "检核月份",
"voucherCheck": {
"title": "立账凭证检核任务",
"subtitle": "每周二增量检核上一个自然月;扫描销售开票附件类型目录后按 invoice 归档,并汇总缺件。",
"period": "资料所属期间",
"status": "状态",
"statusAll": "全部",
"statusComplete": "齐全",
"statusMissing": "缺资料",
"statusComplete": "完整",
"statusMissing": "缺件",
"statusSkipped": "跳过",
"statusTechError": "技术异常",
"invoiceNo": "发票号",
"statusTechError": "技术失败",
"statusPending": "待处理",
"invoiceNo": "invoice",
"invoiceDate": "发票日期",
"invoicePlaceholder": "输入发票号筛选",
"folder": "共享盘路径",
"missing": "缺失材料",
"checkedAt": "检核时间",
"invoicePlaceholder": "输入 invoice 筛选",
"folder": "类型目录",
"missing": "缺失文件",
"missingCount": "缺件数",
"checkedAt": "执行时间",
"result": "结论",
"search": "查询",
"refresh": "刷新",
"loading": "加载中…",
"empty": "暂无检核记录",
"loadFailed": "加载检核记录失败",
"empty": "暂无检核批次",
"loadFailed": "加载检核任务失败",
"totalCount": "共 {total} 条",
"prevPage": "上一页",
"nextPage": "下一页",
"runItemsTitle": "批次 {runId} 明细"
"runItemsTitle": "批次 {runId} 明细",
"detailTitle": "批次明细",
"detailSubtitle": "可按 invoice 或文件类型查看本批检核结论与缺件汇总。",
"detailEmpty": "该批次暂无 invoice 明细",
"fileTypeEmpty": "该批次暂无文件类型汇总",
"viewByInvoice": "按 invoice",
"viewByFileType": "按文件类型",
"fileType": "文件类型",
"involvedInvoiceCount": "涉及 invoice 数",
"missingRatio": "缺失占比",
"backToList": "返回列表",
"runNo": "批次号",
"profile": "业务方",
"subjectCount": "invoice总数",
"missingFiles": "缺件文件数",
"missingInvoices": "invoice缺件数",
"viewDetail": "查看详情",
"forceRecheck": "强制重检上月",
"failureReason": "失败原因",
"forceConfirm": "将全量重检上一个自然月,不跳过已归档记录,也不使用上方筛选的期间。确定开始?",
"forceQueued": "已入队强制重检({runNo}),完成后列表会自动刷新。",
"forceFailed": "强制重检入队失败",
"tabTasks": "检核任务",
"tabNotifications": "企微发送记录",
"notifyEmpty": "暂无企业微信发送记录",
"notifyLoadFailed": "加载发送记录失败",
"notifyStatus": "发送状态",
"notifyStatusAll": "全部",
"notifyStatusSent": "已发送",
"notifyStatusFailed": "发送失败",
"notifyStatusNoMissing": "无缺件未发送",
"notifyStatusNoRecipients": "未配置接收人",
"notifyStatusDisabled": "通知已关闭",
"notifySkipReason": "未发送原因",
"notifySentAt": "发送时间",
"notifyRecipients": "接收人",
"notifyExcel": "Excel",
"downloadExcel": "下载 Excel",
"downloadExcelFailed": "下载 Excel 失败"
}
}
+5 -8
View File
@@ -1557,7 +1557,8 @@
"answerPlaceholder": "填寫命中後直接返回給使用者的完整回答…",
"cacheEnabled": "啟用 FAQ 快取(跳過 Dify)",
"isEnabled": "在前台展示",
"cacheHelp": "開啟後,匹配成功的問題將直接返回下方標準答案,不再呼叫 Dify。",
"isEnabledHelp": "僅控制工作台首頁是否出現快捷入口,不影響聊天是否直答。",
"cacheHelp": "開啟後,匹配成功的問題將直接返回下方標準答案,不再呼叫 Dify。與是否在前台展示無關。",
"expiresAt": "過期時間",
"expiresAtHelp": "可選。到期後不再命中快取,留空表示長期有效。"
},
@@ -2241,15 +2242,11 @@
"difySystemPromptHint": "僅在啟用 Dify Agent 時可配置。保存後將作為 system_prompt 傳入 Workflow;編排中 LLM 節點需引用該變數。",
"difySystemPromptPlaceholder": "例如:你是物料合規判定助手。根據 record 中的檢測資料判定是否合格,僅返回 JSON:dify_result(合格/不合格/人工判定)與 dify_message。",
"platformJobAccountingVoucherCheck": "立帳憑證檢核",
"accountingVoucherCheckHint": "依當前自然月拉取 ERP 發票清單,掃描共用磁碟必檢材料是否存在(不讀檔案內容)。",
"accountingVoucherCheckHint": "每週二檢核上一個自然月的銷售開票附件:拉取 ERP 發票清單,掃描文件庫類型目錄並依 invoice 歸檔(同名略過)。",
"voucherCheckScope": "帳套",
"voucherCheckDirTemplate": "目錄範本",
"voucherCheckDirTemplateHelp": "僅允許 {root}/{YYYY}/{MM}/{invoice_no}",
"voucherCheckRequiredFiles": "必檢材料",
"voucherCheckCaseSensitive": "檔名區分大小寫",
"voucherCheckProfile": "業務方 Profile",
"voucherCheckNotifyMissing": "缺資料通知",
"voucherCheckNotifyFailure": "失敗告警",
"voucherCheckSameDayDedup": "同票同日去重"
"voucherCheckNotifyFailure": "失敗告警"
},
"status": {
"all": "全部狀態",
+5 -97
View File
@@ -3565,104 +3565,12 @@
"hints": "提示:"
},
"voucherCheck": {
"total": "當月總數",
"total": "主體總數",
"scanned": "本次待檢",
"skipped": "跳過",
"complete": "齊全",
"missing": "缺資料"
},
"transfer": {
"fileProgressTitle": "收料檔案準備",
"stageFileReady": "檔案就緒",
"stageWaitingRpa": "RPA 擷取中",
"stageFailed": "失敗",
"precheckTitle": "調撥預檢",
"businessDate": "業務日期",
"executableCount": "可執行",
"notMaturedCount": "當天收料",
"blockedCount": "阻斷",
"estimatedQuantity": "預計調撥數量",
"estimatedErpWrites": "預計 ERP 單據",
"selectedCount": "已選 {count} 張",
"generateTransfer": "直接產生調撥單",
"colSource": "收料來源",
"colMaterial": "料號",
"colName": "品名",
"colSpec": "規格",
"colInvoice": "Invoice",
"colFromWarehouse": "撥出倉庫",
"colFromQty": "撥出數量",
"colToWarehouse": "撥入倉庫",
"colToQty": "撥入數量",
"colResult": "預檢結果",
"resultExecutable": "可執行",
"resultNotMatured": "當天收料",
"resultBlocked": "已阻斷",
"resultUnknown": "結果未知",
"runProgress": "調撥執行進度",
"runExecuting": "執行中",
"runSuccess": "已完成",
"runPartialFailed": "部分失敗",
"runFailed": "失敗",
"runCancelled": "已取消",
"refreshProgress": "重新整理進度",
"resultTitle": "調撥結果",
"materialCount": "{count} 項物料",
"posted": "已過帳",
"noDocuments": "本次未產生 ERP 單據",
"exceptionsTitle": "未產生 ERP 單據",
"exceptionBusinessFailed": "業務失敗",
"exceptionTechnicalFailed": "技術失敗",
"exceptionPrecheckExpired": "預檢失效",
"downloadReceiptFiles": "下載收料來源檔案",
"downloadErpInventory": "下載 ERP 庫存表",
"downloadExceptions": "下載異常 Excel",
"backlogTitle": "待處理異常",
"retryErp": "重新查詢 ERP",
"manualClose": "標記無需繼續處理",
"manualCloseTitle": "標記無需繼續處理",
"manualCloseHint": "關閉後自動排程不再處理;歷史與稽核永久保留。",
"closeReasonPlaceholder": "請輸入關閉原因(必填)",
"confirmClose": "確認關閉",
"cancel": "取消",
"agingNormal": "一般待辦",
"agingWarn": "即將逾期(3 天)",
"agingEscalate": "升級(5 天)",
"agingCritical": "嚴重積壓(7 天+)",
"statusClosed": "已人工關閉",
"resultUnknownReadonly": "唯讀,依 SOP 人工核實",
"noBacklog": "暫無待處理異常",
"sourceSelectTitle": "選擇收料來源實例",
"sourceSelectHint": "DBS、Crane 僅為平台分組;請勾選實際需要處理的來源實例。",
"selectAll": "全選",
"selectEnabledAll": "全選已啟用",
"clearSources": "清空",
"selectedSourceCount": "已選 {count} 個來源實例",
"needSelectSource": "請至少選擇一個已啟用來源實例",
"confirmScopeAndPrecheck": "確認範圍並預檢",
"homeWelcome": "你好,您已進入",
"homeTodayLabel": "今日待辦",
"homeTodayAction": "發起今日調撥預檢",
"homeTodayHint": "選擇來源實例後,系統預設以昨天為業務日期處理可成熟收料。",
"homeHistoryLabel": "歷史待辦",
"homeRecoverable": "可恢復異常",
"homeRecoverableHint": "可重新查詢 ERP 庫存後繼續處理",
"homeClosed": "已人工關閉",
"homeClosedHint": "可查看原因並恢復處理",
"homeUnknown": "結果未知",
"homeUnknownHint": "唯讀,需線下核實 ERP 事實",
"homeBack": "返回首頁",
"retryReceipt": "重試收料 RPA",
"retrying": "重試中…",
"fileReady": "檔案已就緒",
"fileFetching": "抓取中",
"fileFailed": "抓取失敗",
"fileNone": "待抓取",
"needReadyFile": "所選來源存在無收料檔案/或抓取中/或失敗,請先重試收料 RPA",
"selectVisible": "全選可見",
"selectRetryable": "只選可重試",
"batchRetry": "批次重試 RPA",
"selectedRetryableCount": "其中 {count} 個可重試",
"noRetryable": "所選來源均無需重試(已就緒或抓取中)"
"complete": "完整",
"missing": "缺件 invoice",
"missingFiles": "缺件檔案",
"missingInvoices": "缺件 invoice"
}
}
+8 -4
View File
@@ -512,11 +512,15 @@
"SHIPPING.REVIEW_INVENTORY_SOURCE_UNRESOLVED": "庫存源尚未唯一確定,不能建立正式訂單。請先完成庫存源複核。",
"VOUCHER_CHECK_CONFIG_INVALID": "立帳憑證檢核設定無效。",
"VOUCHER_CHECK_INVOICE_REQUIRED": "請提供發票號。",
"VOUCHER_CHECK_INVOICE_NOT_IN_PERIOD": "指定發票不在當前月 ERP 集合中。",
"VOUCHER_CHECK_INVOICE_PATH_INVALID": "發票號含非法路徑字元。",
"VOUCHER_CHECK_SHARE_UNAVAILABLE": "共用磁碟不可用,請檢查掛載與健康標記。",
"VOUCHER_CHECK_INVOICE_NOT_IN_PERIOD": "指定發票不在上一月 ERP 集合中。",
"VOUCHER_CHECK_ERP_UNAVAILABLE": "ERP(Oracle)不可用,請稍後重試。",
"VOUCHER_CHECK_RUN_NOT_FOUND": "檢核批次或發票狀態不存在。",
"VOUCHER_CHECK_DMS_UNAVAILABLE": "銷售開票附件文件庫不可用,請稍後重試。",
"VOUCHER_CHECK_ADAPTER_NOT_WIRED": "該資料取得方式尚未接線。",
"VOUCHER_CHECK_ARCHIVE_NOT_WIRED": "文件庫複製/建立資料夾介面尚未接線。",
"VOUCHER_CHECK_ARCHIVE_FAILED": "文件庫建立資料夾或複製失敗。",
"VOUCHER_CHECK_RUN_NOT_FOUND": "檢核批次不存在。",
"VOUCHER_CHECK_RUN_IN_PROGRESS": "立帳憑證檢核正在執行或排隊中,請稍後再試。",
"VOUCHER_CHECK_SCHEDULE_NOT_FOUND": "找不到立帳憑證檢核排程任務。",
"VOUCHER_CHECK_PERSIST_FAILED": "檢核結果寫入失敗。",
"TRANSFER_PERMISSION_DENIED": "無在途調撥權限。",
"TRANSFER_RECEIPT_NOT_MATURED": "當天收料尚未成熟,不可查詢或調撥。",
+54 -14
View File
@@ -781,30 +781,70 @@
"localAccountDisabled": "該本地賬號已被禁用,請聯繫管理員啟用後再登錄。"
},
"voucherCheck": {
"title": "立帳憑證檢核紀錄",
"subtitle": "依當前自然月查看發票材料齊全/缺資料狀態;只判斷檔案是否存在,不核對金額與供應商。",
"period": "檢核月份",
"title": "立帳憑證檢核任務",
"subtitle": "每週二增量檢核上一個自然月;掃描銷售開票附件類型目錄後按 invoice 歸檔,並彙總缺件。",
"period": "資料所屬期間",
"status": "狀態",
"statusAll": "全部",
"statusComplete": "齊全",
"statusMissing": "缺資料",
"statusComplete": "完整",
"statusMissing": "缺件",
"statusSkipped": "跳過",
"statusTechError": "技術異常",
"invoiceNo": "發票號",
"statusTechError": "技術失敗",
"statusPending": "待處理",
"invoiceNo": "invoice",
"invoiceDate": "發票日期",
"invoicePlaceholder": "輸入發票號篩選",
"folder": "共用磁碟路徑",
"missing": "缺失材料",
"checkedAt": "檢核時間",
"invoicePlaceholder": "輸入 invoice 篩選",
"folder": "類型目錄",
"missing": "缺失檔案",
"missingCount": "缺件數",
"checkedAt": "執行時間",
"result": "結論",
"search": "查詢",
"refresh": "重新整理",
"loading": "載入中…",
"empty": "暫無檢核紀錄",
"loadFailed": "載入檢核紀錄失敗",
"empty": "暫無檢核批次",
"loadFailed": "載入檢核任務失敗",
"totalCount": "共 {total} 筆",
"prevPage": "上一頁",
"nextPage": "下一頁",
"runItemsTitle": "批次 {runId} 明細"
"runItemsTitle": "批次 {runId} 明細",
"detailTitle": "批次明細",
"detailSubtitle": "可依 invoice 或檔案類型查看本批檢核結論與缺件彙總。",
"detailEmpty": "此批次暫無 invoice 明細",
"fileTypeEmpty": "此批次暫無檔案類型彙總",
"viewByInvoice": "依 invoice",
"viewByFileType": "依檔案類型",
"fileType": "檔案類型",
"involvedInvoiceCount": "涉及 invoice 數",
"missingRatio": "缺失占比",
"backToList": "返回列表",
"runNo": "批次號",
"profile": "業務方",
"subjectCount": "invoice總數",
"missingFiles": "缺件檔案數",
"missingInvoices": "invoice缺件數",
"viewDetail": "查看詳情",
"forceRecheck": "強制重檢上月",
"failureReason": "失敗原因",
"forceConfirm": "將全量重檢上一個自然月,不跳過已歸檔紀錄,也不使用上方篩選的期間。確定開始?",
"forceQueued": "已排入強制重檢({runNo}),完成後列表會自動重新整理。",
"forceFailed": "強制重檢排入失敗",
"tabTasks": "檢核任務",
"tabNotifications": "企微發送紀錄",
"notifyEmpty": "暫無企業微信發送紀錄",
"notifyLoadFailed": "載入發送紀錄失敗",
"notifyStatus": "發送狀態",
"notifyStatusAll": "全部",
"notifyStatusSent": "已發送",
"notifyStatusFailed": "發送失敗",
"notifyStatusNoMissing": "無缺件未發送",
"notifyStatusNoRecipients": "未設定接收人",
"notifyStatusDisabled": "通知已關閉",
"notifySkipReason": "未發送原因",
"notifySentAt": "發送時間",
"notifyRecipients": "接收人",
"notifyExcel": "Excel",
"downloadExcel": "下載 Excel",
"downloadExcelFailed": "下載 Excel 失敗"
}
}
@@ -4,6 +4,7 @@
* 用途:通用偏移分页条(摘要、每页条数、页码按钮)。
* 依赖:buildOffsetPageButtons、common.pagination i18n、components-ds 样式类。
* 逻辑:父组件 v-model:page / v-model:page-size,服务端或客户端分页均可复用。
* 每页条数用自定义 SVG 箭头,并隐藏系统原生/::picker-icon,避免 Windows 下双箭头。
*/
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
@@ -95,10 +96,10 @@ const onPageSizeChange = (size: number): void => {
<div class="flex flex-wrap items-center gap-2">
<label class="flex items-center gap-2 text-xs text-secondary">
<span>{{ t('common.pagination.perPage') }}</span>
<span class="relative inline-flex items-center">
<span class="pagination-page-size relative inline-flex items-center">
<select
:value="pageSize"
class="admin-table-filter-input appearance-none pl-2 pr-7 py-1 text-xs leading-5"
class="admin-table-filter-input appearance-none bg-none pl-2 pr-7 py-1 text-xs leading-5"
@change="onPageSizeChange(Number(($event.target as HTMLSelectElement).value))"
>
<option v-for="size in pageSizeOptions" :key="`page-size-${size}`" :value="size">
@@ -154,3 +155,25 @@ const onPageSizeChange = (size: number): void => {
</div>
</div>
</template>
<style scoped>
/**
* 隐藏系统原生下拉箭头(含 Chromium ::picker-icon / Edge ::-ms-expand)。
* 只保留模板里的自定义 SVG,避免 Windows 下两个箭头叠在一起。
*/
.pagination-page-size select {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-image: none;
}
.pagination-page-size select::-ms-expand {
display: none;
}
.pagination-page-size select::picker-icon {
display: none;
content: none;
}
</style>