From 7c2bffa1a495cc4a3a263f654c08c231009c5c4e Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期四, 02 四月 2026 10:59:45 +0800
Subject: [PATCH] #i18n
---
rsf-design/src/components/core/layouts/art-breadcrumb/index.vue | 2
rsf-design/src/components/core/tables/art-table/index.vue | 7
rsf-design/src/components/core/layouts/art-menus/art-sidebar-menu/index.vue | 5
rsf-design/src/utils/router.js | 19
rsf-design/src/views/orders/asn-order/asnOrderPage.helpers.js | 26
rsf-design/src/views/orders/transfer/index.vue | 58
rsf-design/src/views/orders/delivery/modules/delivery-detail-drawer.vue | 78
rsf-design/src/router/modules/system.js | 6
rsf-design/src/views/system/common/usePrintExportPage.js | 13
rsf-design/src/views/orders/delivery/deliveryPage.helpers.js | 26
rsf-design/src/views/orders/asn-order/asnOrderTable.columns.js | 85
rsf-design/src/views/system/menu/menuPage.helpers.js | 16
rsf-design/src/views/manager/task/index.vue | 82
rsf-design/src/views/manager/task/modules/task-detail-drawer.vue | 46
rsf-design/src/views/system/role/modules/role-search.vue | 33
rsf-design/src/locales/langs/en.json | 914 +++++++++++++
rsf-design/src/views/system/role/rolePage.helpers.js | 55
rsf-design/src/components/biz/list-export-print/list-export-print.helpers.js | 4
rsf-design/src/views/orders/delivery/deliveryTable.columns.js | 33
rsf-design/src/views/orders/transfer/modules/transfer-dialog.vue | 106
rsf-design/src/router/adapters/backendMenuAdapter.js | 8
rsf-design/src/views/orders/asn-order/modules/asn-order-create-by-po-dialog.vue | 54
rsf-design/src/views/system/common/useCrudPage.js | 27
rsf-design/src/views/manager/task/taskPage.helpers.js | 21
rsf-design/src/views/basic-info/bas-station-area/modules/bas-station-area-detail-drawer.vue | 51
rsf-design/src/utils/backend-menu-title.js | 96 +
rsf-design/src/components/biz/list-export-print/list-print-preview-dialog.vue | 28
rsf-design/src/views/system/role/modules/role-edit-dialog.vue | 39
rsf-design/src/views/manager/task/taskTable.columns.js | 27
rsf-design/src/views/orders/asn-order/index.vue | 50
rsf-design/src/views/basic-info/bas-station-area/modules/bas-station-area-dialog.vue | 91
rsf-design/src/components/core/forms/art-excel-export/index.vue | 53
rsf-design/src/components/biz/list-export-print/list-print-document.js | 16
rsf-design/src/views/manager/task/modules/task-expand-panel.vue | 34
rsf-design/src/views/manager/task/modules/task-flow-step-dialog.vue | 32
rsf-design/src/views/orders/transfer/transferPage.helpers.js | 58
rsf-design/src/views/orders/delivery/index.vue | 63
rsf-design/src/views/system/role/modules/role-permission-dialog.vue | 35
rsf-design/src/views/basic-info/bas-station-area/basStationAreaTable.columns.js | 45
rsf-design/src/views/system/menu/modules/menu-dialog.vue | 62
rsf-design/src/views/system/menu/index.vue | 58
rsf-design/src/components/core/layouts/art-chat-window/index.vue | 4
rsf-design/src/views/orders/transfer/modules/transfer-detail-drawer.vue | 40
rsf-design/src/views/system/menu/menuTable.columns.js | 29
rsf-design/src/views/orders/transfer/transferTable.columns.js | 55
rsf-design/src/components/core/layouts/art-work-tab/index.vue | 2
rsf-design/src/utils/sys/requestGuard.js | 5
rsf-design/src/views/system/role/roleTable.columns.js | 97
rsf-design/src/locales/langs/zh.json | 914 +++++++++++++
rsf-design/src/views/basic-info/bas-station-area/index.vue | 90
rsf-design/src/components/biz/list-export-print/index.vue | 8
rsf-design/src/views/orders/asn-order/modules/asn-order-detail-drawer.vue | 39
rsf-design/src/views/basic-info/bas-station-area/basStationAreaPage.helpers.js | 72
rsf-design/src/views/system/role/index.vue | 14
54 files changed, 2,989 insertions(+), 942 deletions(-)
diff --git a/rsf-design/src/components/biz/list-export-print/index.vue b/rsf-design/src/components/biz/list-export-print/index.vue
index 50e72b7..4bde984 100644
--- a/rsf-design/src/components/biz/list-export-print/index.vue
+++ b/rsf-design/src/components/biz/list-export-print/index.vue
@@ -1,7 +1,7 @@
<template>
<ElSpace v-bind="attrs" wrap>
- <ElButton :disabled="disabled" @click="handleExport">瀵煎嚭</ElButton>
- <ElButton :disabled="disabled" @click="handlePrint">鎵撳嵃</ElButton>
+ <ElButton :disabled="disabled" @click="handleExport">{{ t('common.actions.export') }}</ElButton>
+ <ElButton :disabled="disabled" @click="handlePrint">{{ t('common.actions.print') }}</ElButton>
</ElSpace>
<ListPrintPreviewDialog
@@ -16,6 +16,7 @@
<script setup>
import { computed, useAttrs } from 'vue'
+ import { useI18n } from 'vue-i18n'
import ListPrintPreviewDialog from './list-print-preview-dialog.vue'
import {
buildListExportPayload,
@@ -30,9 +31,10 @@
})
const attrs = useAttrs()
+ const { t } = useI18n()
const props = defineProps({
- reportTitle: { type: String, default: '鎶ヨ〃' },
+ reportTitle: { type: String, default: '' },
selectedRows: { type: Array, default: () => [] },
queryParams: { type: Object, default: () => ({}) },
columns: { type: Array, default: () => [] },
diff --git a/rsf-design/src/components/biz/list-export-print/list-export-print.helpers.js b/rsf-design/src/components/biz/list-export-print/list-export-print.helpers.js
index 5a07f83..9f116cc 100644
--- a/rsf-design/src/components/biz/list-export-print/list-export-print.helpers.js
+++ b/rsf-design/src/components/biz/list-export-print/list-export-print.helpers.js
@@ -1,3 +1,5 @@
+import { $t } from '@/locales'
+
const DEFAULT_MAX_RESULTS = 1000
const DEFAULT_PRINT_PAGE_SIZE = 20
const HIDDEN_EXPORT_COLUMNS = new Set(['selection', 'operation'])
@@ -81,7 +83,7 @@
}
return [
- { source: '__sequence__', label: '搴忓彿', align: 'center' },
+ { source: '__sequence__', label: $t('table.index'), align: 'center' },
...normalizedColumns
]
}
diff --git a/rsf-design/src/components/biz/list-export-print/list-print-document.js b/rsf-design/src/components/biz/list-export-print/list-print-document.js
index c1c1bc6..619dafe 100644
--- a/rsf-design/src/components/biz/list-export-print/list-print-document.js
+++ b/rsf-design/src/components/biz/list-export-print/list-print-document.js
@@ -1,3 +1,5 @@
+import { $t } from '@/locales'
+
function escapeHtml(value) {
return String(value ?? '')
.replaceAll('&', '&')
@@ -35,10 +37,10 @@
function getMetaItems(meta = {}) {
return [
- { key: 'reportDate', label: '鎶ヨ〃鏃ユ湡', value: meta.reportDate ?? '--' },
- { key: 'operator', label: '鎵撳嵃浜�', value: meta.operator ?? '--' },
- { key: 'printedAt', label: '鎵撳嵃鏃堕棿', value: meta.printedAt ?? '--' },
- { key: 'count', label: '璁板綍鏁�', value: meta.count ?? '--' }
+ { key: 'reportDate', label: $t('print.reportDate'), value: meta.reportDate ?? '--' },
+ { key: 'operator', label: $t('print.operator'), value: meta.operator ?? '--' },
+ { key: 'printedAt', label: $t('print.printedAt'), value: meta.printedAt ?? '--' },
+ { key: 'count', label: $t('print.count'), value: meta.count ?? '--' }
]
}
@@ -58,9 +60,9 @@
return alignMap[column.align] ?? alignMap.left
}
-export function buildPrintDocumentHtml({ title = '鎶ヨ〃', meta = {}, rows = [], columns = [] } = {}) {
+export function buildPrintDocumentHtml({ title = '', meta = {}, rows = [], columns = [] } = {}) {
const reportStyle = getReportStyle(meta)
- const reportTitle = meta.reportTitle || title
+ const reportTitle = meta.reportTitle || title || $t('print.defaultReportTitle')
const titleClass = `${getTitleAlignClass(reportStyle.titleAlign)} ${getTitleLevelClass(reportStyle.titleLevel)}`
const orientation = getPageOrientation(reportStyle)
const showBorder = reportStyle.showBorder !== false
@@ -88,7 +90,7 @@
return `<tr>${cells}</tr>`
})
.join('')
- : `<tr><td colspan="${Math.max(columns.length, 1)}" class="empty-cell">鏆傛棤鎵撳嵃鏁版嵁</td></tr>`
+ : `<tr><td colspan="${Math.max(columns.length, 1)}" class="empty-cell">${escapeHtml($t('print.noData'))}</td></tr>`
const metaHtml = metaItems
.map(
diff --git a/rsf-design/src/components/biz/list-export-print/list-print-preview-dialog.vue b/rsf-design/src/components/biz/list-export-print/list-print-preview-dialog.vue
index e0e8f10..d9fbcfa 100644
--- a/rsf-design/src/components/biz/list-export-print/list-print-preview-dialog.vue
+++ b/rsf-design/src/components/biz/list-export-print/list-print-preview-dialog.vue
@@ -14,13 +14,13 @@
>
<div class="flex flex-wrap items-center justify-end gap-2 pb-2">
<ElRadioGroup v-model="currentShowBorder" size="small">
- <ElRadioButton :label="true">杈规寮�</ElRadioButton>
- <ElRadioButton :label="false">杈规鍏�</ElRadioButton>
+ <ElRadioButton :label="true">{{ t('print.borderOn') }}</ElRadioButton>
+ <ElRadioButton :label="false">{{ t('print.borderOff') }}</ElRadioButton>
</ElRadioGroup>
<ElRadioGroup v-model="currentOrientation" size="small">
- <ElRadioButton label="portrait">绔栫増</ElRadioButton>
- <ElRadioButton label="landscape">妯増</ElRadioButton>
+ <ElRadioButton label="portrait">{{ t('print.portrait') }}</ElRadioButton>
+ <ElRadioButton label="landscape">{{ t('print.landscape') }}</ElRadioButton>
</ElRadioGroup>
</div>
@@ -39,7 +39,7 @@
v-if="hiddenRowCount > 0"
class="mt-3 rounded-md border border-amber-200 bg-amber-50 px-2.5 py-1.5 text-[11px] leading-tight text-amber-700"
>
- 棰勮浠呭睍绀哄墠 {{ previewRows.length }} 鏉★紝鐐瑰嚮鎵撳嵃灏嗚緭鍑哄叏閮� {{ rows.length }} 鏉℃暟鎹��
+ {{ t('print.previewLimited', { previewCount: previewRows.length, totalCount: rows.length }) }}
</div>
<div :class="tableWrapClass" class="mt-4 min-h-0 flex-1 overflow-auto">
@@ -61,7 +61,7 @@
:colspan="Math.max(columns.length, 1)"
:class="emptyCellClass"
>
- 鏆傛棤鎵撳嵃鏁版嵁
+ {{ t('print.noData') }}
</td>
</tr>
<tr v-for="(row, index) in previewRows" :key="row?.id ?? index">
@@ -81,8 +81,8 @@
<template #footer>
<div class="flex items-center justify-end gap-2 print:hidden">
- <ElButton @click="visible = false">鍏抽棴</ElButton>
- <ElButton type="primary" @click="handlePrint">鎵撳嵃</ElButton>
+ <ElButton @click="visible = false">{{ t('common.actions.close') }}</ElButton>
+ <ElButton type="primary" @click="handlePrint">{{ t('common.actions.print') }}</ElButton>
</div>
</template>
</ElDialog>
@@ -90,6 +90,7 @@
<script setup>
import { computed, ref, watch } from 'vue'
+ import { useI18n } from 'vue-i18n'
import { printReportDocument } from './list-print-document.js'
defineOptions({ name: 'ListPrintPreviewDialog' })
@@ -97,12 +98,13 @@
const visible = defineModel('visible', { type: Boolean, default: false })
const props = defineProps({
- title: { type: String, default: '鎵撳嵃棰勮' },
+ title: { type: String, default: '' },
meta: { type: Object, default: () => ({}) },
rows: { type: Array, default: () => [] },
columns: { type: Array, default: () => [] },
maxPreviewRows: { type: Number, default: 50 }
})
+ const { t } = useI18n()
const meta = computed(() => (props.meta && typeof props.meta === 'object' ? props.meta : {}))
const reportStyleSource = computed(() =>
@@ -115,10 +117,10 @@
const metaItems = computed(() => {
return [
- { key: 'reportDate', label: '鎶ヨ〃鏃ユ湡', value: meta.value.reportDate },
- { key: 'operator', label: '鎵撳嵃浜�', value: meta.value.operator },
- { key: 'printedAt', label: '鎵撳嵃鏃堕棿', value: meta.value.printedAt },
- { key: 'count', label: '璁板綍鏁�', value: meta.value.count }
+ { key: 'reportDate', label: t('print.reportDate'), value: meta.value.reportDate },
+ { key: 'operator', label: t('print.operator'), value: meta.value.operator },
+ { key: 'printedAt', label: t('print.printedAt'), value: meta.value.printedAt },
+ { key: 'count', label: t('print.count'), value: meta.value.count }
]
})
const previewRows = computed(() => props.rows.slice(0, props.maxPreviewRows))
diff --git a/rsf-design/src/components/core/forms/art-excel-export/index.vue b/rsf-design/src/components/core/forms/art-excel-export/index.vue
index 47de522..ea1d955 100644
--- a/rsf-design/src/components/core/forms/art-excel-export/index.vue
+++ b/rsf-design/src/components/core/forms/art-excel-export/index.vue
@@ -1,4 +1,3 @@
-<!-- 瀵煎嚭 Excel 鏂囦欢 -->
<template>
<ElButton
:type="type"
@@ -12,19 +11,22 @@
<ElIcon class="is-loading">
<Loading />
</ElIcon>
- {{ loadingText }}
+ {{ resolvedLoadingText }}
</template>
- <slot>{{ buttonText }}</slot>
+ <slot>{{ resolvedButtonText }}</slot>
</ElButton>
</template>
<script setup>
import * as XLSX from 'xlsx'
import FileSaver from 'file-saver'
- import { ref, computed, nextTick } from 'vue'
+ import { ElMessage } from 'element-plus'
+ import { ref, computed, nextTick, readonly } from 'vue'
import { Loading } from '@element-plus/icons-vue'
import { useThrottleFn } from '@vueuse/core'
+ import { useI18n } from 'vue-i18n'
defineOptions({ name: 'ArtExcelExport' })
+ const { t } = useI18n()
const props = defineProps({
filename: {
required: false,
@@ -34,10 +36,10 @@
type: { required: false, default: 'primary' },
size: { required: false, default: 'default' },
disabled: { required: false, default: false },
- buttonText: { required: false, default: '瀵煎嚭 Excel' },
- loadingText: { required: false, default: '瀵煎嚭涓�...' },
+ buttonText: { required: false, default: '' },
+ loadingText: { required: false, default: '' },
autoIndex: { required: false, default: false },
- indexColumnTitle: { required: false, default: '搴忓彿' },
+ indexColumnTitle: { required: false, default: '' },
columns: { required: false, default: () => ({}) },
headers: { required: false, default: () => ({}) },
maxRows: { required: false, default: 1e5 },
@@ -56,15 +58,18 @@
}
const isExporting = ref(false)
const hasData = computed(() => Array.isArray(props.data) && props.data.length > 0)
+ const resolvedButtonText = computed(() => props.buttonText || t('common.actions.export'))
+ const resolvedLoadingText = computed(() => props.loadingText || t('common.actions.exporting'))
+ const resolvedIndexColumnTitle = computed(() => props.indexColumnTitle || t('table.index'))
const validateData = (data) => {
if (!Array.isArray(data)) {
- throw new ExportError('鏁版嵁蹇呴』鏄暟缁勬牸寮�', 'INVALID_DATA_TYPE')
+ throw new ExportError(t('message.exportInvalidDataType'), 'INVALID_DATA_TYPE')
}
if (data.length === 0) {
- throw new ExportError('娌℃湁鍙鍑虹殑鏁版嵁', 'NO_DATA')
+ throw new ExportError(t('message.exportNoData'), 'NO_DATA')
}
if (data.length > props.maxRows) {
- throw new ExportError(`鏁版嵁琛屾暟瓒呰繃闄愬埗锛�${props.maxRows}琛岋級`, 'EXCEED_MAX_ROWS', {
+ throw new ExportError(t('message.exportExceedMaxRows', { maxRows: props.maxRows }), 'EXCEED_MAX_ROWS', {
currentRows: data.length,
maxRows: props.maxRows
})
@@ -82,7 +87,7 @@
return value.toLocaleDateString('zh-CN')
}
if (typeof value === 'boolean') {
- return value ? '鏄�' : '鍚�'
+ return value ? t('common.status.yes') : t('common.status.no')
}
return String(value)
}
@@ -90,7 +95,7 @@
const processedData = data.map((item, index) => {
const processedItem = {}
if (props.autoIndex) {
- processedItem[props.indexColumnTitle] = String(index + 1)
+ processedItem[resolvedIndexColumnTitle.value] = String(index + 1)
}
Object.entries(item).forEach(([key, value]) => {
let columnTitle = key
@@ -131,13 +136,13 @@
if (props.workbookOptions) {
workbook.Props = {
Title: filename,
- Subject: '鏁版嵁瀵煎嚭',
+ Subject: t('message.exportWorkbookSubject'),
Author: props.workbookOptions.creator || 'Art Design Pro',
Manager: props.workbookOptions.lastModifiedBy || '',
- Company: '绯荤粺瀵煎嚭',
- Category: '鏁版嵁',
- Keywords: 'excel,export,data',
- Comments: '鐢辩郴缁熻嚜鍔ㄧ敓鎴�',
+ Company: t('message.exportWorkbookCompany'),
+ Category: t('message.exportWorkbookCategory'),
+ Keywords: t('message.exportWorkbookKeywords'),
+ Comments: t('message.exportWorkbookComments'),
CreatedDate: props.workbookOptions.created || /* @__PURE__ */ new Date(),
ModifiedDate: props.workbookOptions.modified || /* @__PURE__ */ new Date()
}
@@ -164,7 +169,11 @@
await nextTick()
return Promise.resolve()
} catch (error) {
- throw new ExportError(`Excel 瀵煎嚭澶辫触: ${error.message}`, 'EXPORT_FAILED', error)
+ throw new ExportError(
+ t('message.exportExcelFailed', { message: error.message }),
+ 'EXPORT_FAILED',
+ error
+ )
}
}
const handleExport = useThrottleFn(async () => {
@@ -177,7 +186,7 @@
emit('export-success', props.filename, props.data.length)
if (props.showSuccessMessage) {
ElMessage.success({
- message: `鎴愬姛瀵煎嚭 ${props.data.length} 鏉℃暟鎹甡,
+ message: t('message.exportSuccessWithCount', { count: props.data.length }),
duration: 3e3
})
}
@@ -185,7 +194,11 @@
const exportError =
error instanceof ExportError
? error
- : new ExportError(`瀵煎嚭澶辫触: ${error.message}`, 'UNKNOWN_ERROR', error)
+ : new ExportError(
+ t('message.exportFailedUnknown', { message: error.message }),
+ 'UNKNOWN_ERROR',
+ error
+ )
emit('export-error', exportError)
if (props.showErrorMessage) {
ElMessage.error({
diff --git a/rsf-design/src/components/core/layouts/art-breadcrumb/index.vue b/rsf-design/src/components/core/layouts/art-breadcrumb/index.vue
index f3170a4..a00f1de 100644
--- a/rsf-design/src/components/core/layouts/art-breadcrumb/index.vue
+++ b/rsf-design/src/components/core/layouts/art-breadcrumb/index.vue
@@ -95,7 +95,7 @@
await router.push(item.path)
}
} catch (error) {
- console.error('瀵艰埅澶辫触:', error)
+ console.error('Breadcrumb navigation failed:', error)
}
}
</script>
diff --git a/rsf-design/src/components/core/layouts/art-chat-window/index.vue b/rsf-design/src/components/core/layouts/art-chat-window/index.vue
index 52e8f78..2304dc4 100644
--- a/rsf-design/src/components/core/layouts/art-chat-window/index.vue
+++ b/rsf-design/src/components/core/layouts/art-chat-window/index.vue
@@ -14,7 +14,7 @@
<div class="min-w-0 flex-1">
<div class="flex flex-wrap items-center gap-2">
<h3 class="text-base font-semibold text-[var(--art-gray-900)]">{{ $t('ai.drawer.title') }}</h3>
- <ElTag v-if="streaming" type="success" effect="light" round>Streaming</ElTag>
+ <ElTag v-if="streaming" type="success" effect="light" round>{{ $t('ai.drawer.streaming') }}</ElTag>
</div>
<p class="mt-1 truncate text-xs text-[var(--art-gray-500)]">
{{ runtime?.promptName || runtime?.promptCode || DEFAULT_PROMPT_CODE }}
@@ -350,7 +350,7 @@
<div class="mt-3 flex flex-wrap items-center justify-between gap-3">
<div class="text-xs text-[var(--art-gray-500)]">
- Enter 鍙戦�侊紝Shift + Enter 鎹㈣
+ {{ $t('ai.drawer.inputHotkeyHint') }}
</div>
<div class="flex flex-wrap items-center gap-2">
diff --git a/rsf-design/src/components/core/layouts/art-menus/art-sidebar-menu/index.vue b/rsf-design/src/components/core/layouts/art-menus/art-sidebar-menu/index.vue
index 3cc1fd4..982344d 100644
--- a/rsf-design/src/components/core/layouts/art-menus/art-sidebar-menu/index.vue
+++ b/rsf-design/src/components/core/layouts/art-menus/art-sidebar-menu/index.vue
@@ -19,7 +19,7 @@
<ElTooltip
class="box-item"
effect="dark"
- :content="$t(menu.meta.title)"
+ :content="formatMenuTitle(menu.meta.title)"
placement="right"
:offset="15"
:hide-after="0"
@@ -43,7 +43,7 @@
}"
/>
<span v-if="dualMenuShowText" class="text-md text-g-700">
- {{ $t(menu.meta.title) }}
+ {{ formatMenuTitle(menu.meta.title) }}
</span>
<div v-if="menu.meta.showBadge" class="art-badge art-badge-dual" />
</div>
@@ -132,6 +132,7 @@
<script setup>
import AppConfig from '@/config'
import { handleMenuJump } from '@/utils/navigation'
+ import { formatMenuTitle } from '@/utils/router'
import SidebarSubmenu from './widget/SidebarSubmenu.vue'
diff --git a/rsf-design/src/components/core/layouts/art-work-tab/index.vue b/rsf-design/src/components/core/layouts/art-work-tab/index.vue
index aabe9c7..402911e 100644
--- a/rsf-design/src/components/core/layouts/art-work-tab/index.vue
+++ b/rsf-design/src/components/core/layouts/art-work-tab/index.vue
@@ -44,7 +44,7 @@
class="text-base mr-1 group-hover:text-theme"
:class="item.path === activeTab ? 'text-theme' : 'text-g-600'"
/>
- {{ item.customTitle || formatMenuTitle(item.title) }}
+ {{ formatMenuTitle(item.customTitle || item.title) }}
<span
v-if="list.length > 1 && !item.fixedTab"
class="inline-flex flex-cc relative ml-0.5 p-1 rounded-full tad-200 hover:bg-g-200"
diff --git a/rsf-design/src/components/core/tables/art-table/index.vue b/rsf-design/src/components/core/tables/art-table/index.vue
index 3fd2c73..92374b1 100644
--- a/rsf-design/src/components/core/tables/art-table/index.vue
+++ b/rsf-design/src/components/core/tables/art-table/index.vue
@@ -48,7 +48,7 @@
<template #empty>
<div v-if="loading"></div>
- <ElEmpty v-else :description="emptyText" :image-size="120" />
+ <ElEmpty v-else :description="resolvedEmptyText" :image-size="120" />
</template>
</ElTable>
@@ -73,6 +73,7 @@
<script setup>
import { ref, computed, nextTick, watchEffect, getCurrentInstance, useAttrs } from 'vue'
+ import { useI18n } from 'vue-i18n'
import { storeToRefs } from 'pinia'
import { useTableStore } from '@/store/modules/table'
import { useCommon } from '@/hooks/core/useCommon'
@@ -83,6 +84,7 @@
const elTableRef = ref(null)
const paginationRef = ref()
const tableHeaderRef = ref()
+ const { t } = useI18n()
const tableStore = useTableStore()
const { isBorder, isZebra, tableSize, isFullScreen, isHeaderBackground } = storeToRefs(tableStore)
const props = defineProps({
@@ -96,7 +98,7 @@
border: { required: false, default: void 0 },
size: { required: false, default: void 0 },
emptyHeight: { required: false, default: '100%' },
- emptyText: { required: false, default: '鏆傛棤鏁版嵁' },
+ emptyText: { required: false, default: '' },
showTableHeader: { required: false, default: true }
})
const instance = getCurrentInstance()
@@ -189,6 +191,7 @@
: void 0
}))
const showPagination = computed(() => props.pagination && !isEmpty.value)
+ const resolvedEmptyText = computed(() => props.emptyText || t('table.emptyText'))
const shouldRenderSlotScope = (slotScope) => {
return slotScope.$index === void 0 || slotScope.$index >= 0
}
diff --git a/rsf-design/src/locales/langs/en.json b/rsf-design/src/locales/langs/en.json
index cdbac21..a34ec06 100644
--- a/rsf-design/src/locales/langs/en.json
+++ b/rsf-design/src/locales/langs/en.json
@@ -36,7 +36,87 @@
"tips": "Prompt",
"cancel": "Cancel",
"confirm": "Confirm",
- "logOutTips": "Do you want to log out?"
+ "logOutTips": "Do you want to log out?",
+ "count": "{count} items",
+ "listSeparator": ", ",
+ "actions": {
+ "search": "Search",
+ "reset": "Reset",
+ "refresh": "Refresh",
+ "add": "Add",
+ "batchDelete": "Batch Delete",
+ "edit": "Edit",
+ "delete": "Delete",
+ "detail": "Detail",
+ "items": "Items",
+ "print": "Print",
+ "export": "Export",
+ "exporting": "Exporting...",
+ "close": "Close",
+ "complete": "Complete",
+ "expand": "Expand",
+ "collapse": "Collapse",
+ "viewAll": "View All",
+ "save": "Save",
+ "submit": "Submit"
+ },
+ "status": {
+ "enabled": "Enabled",
+ "disabled": "Disabled",
+ "normal": "Normal",
+ "frozen": "Frozen",
+ "unknown": "Unknown",
+ "yes": "Yes",
+ "no": "No"
+ },
+ "placeholder": {
+ "empty": "--"
+ }
+ },
+ "crud": {
+ "messages": {
+ "createSuccess": "Created successfully",
+ "updateSuccess": "Updated successfully",
+ "deleteSuccess": "Deleted successfully",
+ "batchDeleteSuccess": "Batch deleted successfully",
+ "submitFailed": "Submit failed",
+ "deleteFailed": "Delete failed",
+ "batchDeleteFailed": "Batch delete failed",
+ "exportSuccess": "Export succeeded",
+ "exportFailed": "Export failed",
+ "exportFailedWithStatus": "Export failed ({status})",
+ "printFailed": "Print failed",
+ "loadFailed": "Load failed"
+ },
+ "confirm": {
+ "deleteTitle": "Delete confirmation",
+ "deleteMessage": "Are you sure you want to delete {entity} \"{label}\"?",
+ "batchDeleteTitle": "Batch delete confirmation",
+ "batchDeleteMessage": "Are you sure you want to delete {count} selected {entity}?"
+ }
+ },
+ "print": {
+ "previewTitle": "Print Preview",
+ "defaultReportTitle": "Report",
+ "borderOn": "Border On",
+ "borderOff": "Border Off",
+ "portrait": "Portrait",
+ "landscape": "Landscape",
+ "reportDate": "Report Date",
+ "operator": "Operator",
+ "printedAt": "Printed At",
+ "count": "Records",
+ "previewLimited": "Preview shows the first {previewCount} records only. Printing will output all {totalCount} records.",
+ "noData": "No printable data"
+ },
+ "table": {
+ "index": "No.",
+ "unit": "Unit",
+ "id": "ID",
+ "wcs": "WCS",
+ "source": "Source",
+ "supplier": "Supplier",
+ "supplierBatch": "Supplier Batch"
},
"search": {
"placeholder": "Search page",
@@ -449,6 +529,7 @@
"assistantRole": "AI",
"thinking": "Thinking...",
"inputPlaceholder": "Type your question. Press Enter to send, Shift + Enter for a new line",
+ "inputHotkeyHint": "Enter to send, Shift + Enter for a new line",
"clearInput": "Clear Input",
"stop": "Stop",
"send": "Send",
@@ -471,7 +552,8 @@
"recentMetric": "Recent: {value}",
"elapsedMetric": "Elapsed: {value} ms",
"firstTokenMetric": "First token: {value} ms",
- "tokenMetric": "Tokens: prompt {prompt} / completion {completion} / total {total}"
+ "tokenMetric": "Tokens: prompt {prompt} / completion {completion} / total {total}",
+ "streaming": "Streaming"
}
},
"table": {
@@ -498,8 +580,834 @@
"expand": "Expand",
"index": "Index"
},
+ "index": "Index",
+ "id": "ID",
+ "operation": "Operation",
+ "status": "Status",
+ "type": "Type",
+ "source": "Source",
+ "supplier": "Supplier",
+ "supplierBatch": "Supplier Batch",
+ "remark": "Remark",
+ "updateBy": "Updated By",
+ "updateTime": "Updated At",
+ "createTime": "Created At",
+ "unit": "Unit",
+ "batch": "Batch",
+ "quantity": "Quantity",
+ "materialCode": "Material Code",
+ "materialName": "Material Name",
+ "wcs": "WCS",
+ "menuType": "Menu Type",
+ "iconPreview": "Icon Preview",
+ "componentKey": "Component Key",
+ "permissionKey": "Permission Key",
+ "sort": "Sort",
"zebra": "Zebra",
"border": "Border",
- "headerBackground": "Header BG"
+ "headerBackground": "Header BG",
+ "topLevelMenu": "Top Level Menu",
+ "emptyText": "No data"
+ },
+ "message": {
+ "requestTimeoutStopped": "Request timed out and waiting has stopped",
+ "exportTimeoutStopped": "Export request timed out and waiting has stopped",
+ "printTimeoutStopped": "Print data loading timed out and waiting has stopped",
+ "exportInvalidDataType": "Data must be an array",
+ "exportNoData": "No data available for export",
+ "exportExceedMaxRows": "Row count exceeds the limit ({maxRows} rows)",
+ "exportExcelFailed": "Excel export failed: {message}",
+ "exportSuccessWithCount": "Successfully exported {count} records",
+ "exportFailedUnknown": "Export failed: {message}",
+ "exportWorkbookSubject": "Data Export",
+ "exportWorkbookCompany": "System Export",
+ "exportWorkbookCategory": "Data",
+ "exportWorkbookKeywords": "excel,export,data",
+ "exportWorkbookComments": "Generated automatically by the system"
+ },
+ "pages": {
+ "system": {
+ "role": {
+ "entity": "Role",
+ "reportTitle": "Role Report",
+ "buttons": {
+ "add": "Add Role"
+ },
+ "search": {
+ "name": "Role Name",
+ "namePlaceholder": "Enter role name",
+ "code": "Role Code",
+ "codePlaceholder": "Enter role code",
+ "memo": "Remark",
+ "memoPlaceholder": "Enter remark",
+ "condition": "Keyword",
+ "conditionPlaceholder": "Search by keyword",
+ "status": "Status",
+ "statusPlaceholder": "Select status"
+ },
+ "table": {
+ "name": "Role Name",
+ "code": "Role Code",
+ "memo": "Remark",
+ "status": "Status",
+ "updateTime": "Updated At",
+ "createTime": "Created At",
+ "operation": "Operation"
+ },
+ "actions": {
+ "scopeMenu": "Web Permissions",
+ "scopePda": "PDA Permissions",
+ "scopeMatnr": "Material Permissions",
+ "scopeWarehouse": "Warehouse Permissions",
+ "edit": "Edit Role",
+ "delete": "Delete Role"
+ },
+ "scopes": {
+ "menu": "Web Permissions",
+ "pda": "PDA Permissions",
+ "matnr": "Material Permissions",
+ "warehouse": "Warehouse Permissions"
+ },
+ "dialog": {
+ "addTitle": "Add Role",
+ "editTitle": "Edit Role",
+ "validationName": "Please enter the role name",
+ "name": "Role Name",
+ "namePlaceholder": "Enter role name",
+ "code": "Role Code",
+ "codePlaceholder": "Enter role code",
+ "status": "Status",
+ "statusPlaceholder": "Select status",
+ "memo": "Remark",
+ "memoPlaceholder": "Enter remark"
+ },
+ "permission": {
+ "title": "Role Permissions",
+ "currentRole": "Current Role: ",
+ "unselected": "No role selected",
+ "selectAll": "Select All",
+ "clear": "Clear",
+ "saveCurrent": "Save Current Permissions",
+ "searchPlaceholder": "Search permission tree",
+ "authButton": "Button",
+ "scopeLoadTimeout": "{title} loading timed out and waiting has stopped",
+ "scopeLoadFailed": "Failed to load {title}",
+ "saveSuccess": "Permissions saved successfully",
+ "saveFailed": "Failed to save permissions"
+ }
+ },
+ "menu": {
+ "title": "Menu Management",
+ "addMenu": "Add Menu",
+ "menuName": "Menu Name",
+ "route": "Route Path",
+ "iconPreview": "Icon Preview",
+ "menuType": "Menu Type",
+ "componentKey": "Component Key",
+ "authority": "Authority",
+ "sort": "Sort",
+ "status": "Status",
+ "memo": "Remark",
+ "operation": "Operation",
+ "types": {
+ "button": "Button",
+ "directory": "Directory",
+ "menu": "Menu"
+ },
+ "addPermission": "Add Permission",
+ "deleteMenuMessage": "Are you sure you want to delete menu \"{label}\"? This action cannot be undone.",
+ "deleteAuthMessage": "Are you sure you want to delete permission \"{label}\"? This action cannot be undone.",
+ "selfParentError": "The parent menu cannot be the current menu"
+ }
+ },
+ "orders": {
+ "asnOrder": {
+ "reportTitle": "ASN Report",
+ "entity": "ASN",
+ "buttons": {
+ "createByPo": "Create by PO"
+ },
+ "search": {
+ "condition": "Keyword",
+ "conditionPlaceholder": "Enter ASN No./PO No./Supplier",
+ "code": "ASN No.",
+ "codePlaceholder": "Enter ASN No.",
+ "poCode": "PO No.",
+ "poCodePlaceholder": "Enter PO No.",
+ "wkType": "Business Type",
+ "wkTypePlaceholder": "Enter business type",
+ "exceStatus": "Document Status",
+ "supplierName": "Supplier",
+ "supplierPlaceholder": "Enter supplier",
+ "purchaseUserName": "Purchaser",
+ "purchaseUserPlaceholder": "Enter purchaser"
+ },
+ "placeholder": {
+ "condition": "Enter ASN No./PO No./Supplier",
+ "code": "Enter ASN No.",
+ "poCode": "Enter PO No.",
+ "wkType": "Enter business type",
+ "supplierName": "Enter supplier",
+ "purchaseUserName": "Enter purchaser"
+ },
+ "status": {
+ "pending": "Pending",
+ "running": "In Progress",
+ "receiving": "Received",
+ "taskRunning": "Task Running",
+ "completed": "Completed",
+ "cancelled": "Cancelled",
+ "closed": "Closed"
+ },
+ "actions": {
+ "view": "View Detail",
+ "items": "Receiving Items",
+ "print": "Print",
+ "complete": "Complete"
+ },
+ "detail": {
+ "title": "ASN Detail",
+ "baseInfo": "Basic Information",
+ "items": "Order Items",
+ "asnCode": "ASN No.",
+ "poCode": "PO No.",
+ "wkType": "Business Type",
+ "orderType": "Order Type",
+ "status": "Document Status",
+ "purchaseOrg": "Purchasing Org",
+ "purchaseUser": "Purchaser",
+ "supplier": "Supplier",
+ "anfme": "Expected Qty",
+ "qty": "Received Qty",
+ "updateTime": "Updated At",
+ "createTime": "Created At",
+ "memo": "Remark",
+ "count": "{count} items",
+ "completeTitle": "Complete Confirmation",
+ "completeConfirm": "Are you sure you want to complete ASN {code}?",
+ "completeSuccess": "ASN completed",
+ "actionFailed": "ASN action failed",
+ "detailTimeout": "ASN detail items timed out and waiting has stopped",
+ "itemsTimeout": "ASN detail items timed out and waiting has stopped"
+ },
+ "createByPoDialog": {
+ "title": "Create by PO",
+ "purchaseList": "Available PO List",
+ "purchasePreview": "PO Item Preview",
+ "purchaseSelected": "Selected: {code}",
+ "purchaseEmpty": "Select a PO from the left first",
+ "purchaseGenerateHint": "Generate ASN from {count} items of PO {code}",
+ "purchaseGenerateEmpty": "Please select an available PO",
+ "generate": "Generate ASN",
+ "refreshItems": "Refresh Items",
+ "messages": {
+ "purchaseItemsTimeout": "PO items timed out and waiting has stopped",
+ "purchaseItemsAllTimeout": "Full PO items timed out and waiting has stopped",
+ "purchaseRequired": "Please select a PO first",
+ "purchaseItemsEmpty": "The selected PO has no buildable items",
+ "createByPoSuccess": "ASN created from PO successfully",
+ "createByPoFailed": "Create ASN by PO failed"
+ },
+ "search": {
+ "condition": "Keyword",
+ "conditionPlaceholder": "Enter PO No./source/supplier",
+ "code": "PO No.",
+ "codePlaceholder": "Enter PO No.",
+ "source": "Source",
+ "sourcePlaceholder": "Enter source",
+ "supplierName": "Supplier",
+ "supplierNamePlaceholder": "Enter supplier"
+ }
+ },
+ "table": {
+ "poItemId": "PO Line No.",
+ "expectedQty": "Expected Qty",
+ "receivedQty": "Received Qty",
+ "remainingQty": "Creatable Qty",
+ "poStatus": "PO Status",
+ "purchaseQty": "Purchase Qty",
+ "generatedQty": "Generated ASN Qty",
+ "receivedQtyTotal": "Received Qty"
+ }
+ },
+ "delivery": {
+ "reportTitle": "DO Report",
+ "detailReportTitle": "DO Item Report",
+ "entity": "DO",
+ "search": {
+ "condition": "Keyword",
+ "conditionPlaceholder": "Enter No./ERP master order/platform order",
+ "code": "No.",
+ "codePlaceholder": "Enter No.",
+ "platId": "ERP Master Order ID",
+ "platIdPlaceholder": "Enter ERP master order ID",
+ "type": "Order Type",
+ "typePlaceholder": "Enter order type",
+ "wkType": "Business Type",
+ "wkTypePlaceholder": "Enter business type",
+ "source": "Order Source",
+ "sourcePlaceholder": "Enter order source",
+ "exceStatus": "Execution Status",
+ "exceStatusPlaceholder": "Enter execution status",
+ "memo": "Remark",
+ "memoPlaceholder": "Enter remark"
+ },
+ "placeholder": {
+ "condition": "Enter No./ERP master order/platform order",
+ "code": "Enter No.",
+ "platId": "Enter ERP master order ID",
+ "type": "Enter order type",
+ "wkType": "Enter business type",
+ "source": "Enter order source",
+ "exceStatus": "Enter execution status",
+ "memo": "Enter remark"
+ },
+ "status": {
+ "normal": "Normal",
+ "disabled": "Disabled",
+ "pending": "Pending",
+ "running": "Running",
+ "partial": "Partially Completed",
+ "completed": "Completed"
+ },
+ "actions": {
+ "view": "View Detail",
+ "items": "Items",
+ "delete": "Delete"
+ },
+ "detail": {
+ "title": "Handover Order Detail",
+ "baseInfo": "Basic Information",
+ "auditInfo": "Audit Information",
+ "items": "Handover Order Items",
+ "code": "Handover No.",
+ "platId": "ERP Master Order ID",
+ "platCode": "Platform Order No.",
+ "type": "Order Type",
+ "wkType": "Business Type",
+ "source": "Order Source",
+ "anfme": "Expected Qty",
+ "qty": "Received Qty",
+ "workQty": "In-progress Qty",
+ "status": "Status",
+ "exceStatus": "Execution Status",
+ "memo": "Remark",
+ "startTime": "Planned Outbound Time",
+ "endTime": "Planned Outbound End Time",
+ "createBy": "Created By",
+ "createTime": "Created At",
+ "updateBy": "Updated By",
+ "updateTime": "Updated At",
+ "count": "{count} items"
+ },
+ "table": {
+ "deliveryCode": "Handover No.",
+ "platCode": "Platform Order No.",
+ "platItemId": "Platform Line No.",
+ "matnrCode": "Material Code",
+ "maktx": "Material Name",
+ "fieldsIndex": "Dynamic Field Index",
+ "anfme": "Qty",
+ "workQty": "Working Qty",
+ "qty": "Outbound Qty",
+ "startTime": "Planned Outbound Time",
+ "endTime": "Planned Outbound End Time",
+ "nromQty": "Std. Pack",
+ "printQty": "Print Qty",
+ "splrName": "Supplier Name",
+ "splrCode": "Supplier Code",
+ "splrBatch": "Supplier Batch"
+ },
+ "messages": {
+ "itemsTimeout": "DO items timed out and waiting has stopped",
+ "detailTimeout": "DO detail timed out and waiting has stopped",
+ "detailLoadFailed": "Failed to load DO detail"
+ }
+ },
+ "transfer": {
+ "reportTitle": "Transfer Report",
+ "entity": "Transfer Order",
+ "buttons": {
+ "add": "Add Transfer",
+ "publish": "Dispatch"
+ },
+ "search": {
+ "condition": "Keyword",
+ "conditionPlaceholder": "Enter No./remark/warehouse/area",
+ "code": "Transfer No.",
+ "codePlaceholder": "Enter transfer No.",
+ "type": "Transfer Type",
+ "source": "Source",
+ "exceStatus": "Execution Status",
+ "orgWareName": "Source Warehouse",
+ "orgWareNamePlaceholder": "Enter source warehouse",
+ "tarWareName": "Target Warehouse",
+ "tarWareNamePlaceholder": "Enter target warehouse",
+ "orgAreaName": "Source Area",
+ "orgAreaNamePlaceholder": "Enter source area",
+ "tarAreaName": "Target Area",
+ "tarAreaNamePlaceholder": "Enter target area",
+ "status": "Status",
+ "memo": "Remark",
+ "memoPlaceholder": "Enter remark"
+ },
+ "status": {
+ "sourceErp": "ERP",
+ "sourceWms": "WMS Generated",
+ "sourceExcel": "Excel Import",
+ "sourceQms": "QMS",
+ "pending": "Pending",
+ "running": "Running",
+ "completed": "Completed",
+ "normal": "Normal",
+ "frozen": "Frozen"
+ },
+ "actions": {
+ "add": "Add Transfer",
+ "view": "View Detail",
+ "items": "Items",
+ "edit": "Edit",
+ "publish": "Dispatch",
+ "delete": "Delete"
+ },
+ "placeholder": {
+ "condition": "Enter No./remark/warehouse/area",
+ "code": "Enter transfer No.",
+ "orgWareName": "Enter source warehouse",
+ "tarWareName": "Enter target warehouse",
+ "orgAreaName": "Enter source area",
+ "tarAreaName": "Enter target area",
+ "memo": "Enter remark"
+ },
+ "detail": {
+ "title": "Transfer Detail",
+ "baseInfo": "Basic Information",
+ "auditInfo": "Audit Information",
+ "source": "Source",
+ "orgWareName": "Source Warehouse",
+ "tarWareName": "Target Warehouse",
+ "orgAreaName": "Source Area",
+ "tarAreaName": "Target Area",
+ "memo": "Remark",
+ "createBy": "Created By",
+ "createTime": "Created At",
+ "updateBy": "Updated By",
+ "updateTime": "Updated At",
+ "relatedOrders": "Related Orders",
+ "relatedCode": "Related Order No.",
+ "code": "Transfer No.",
+ "type": "Transfer Type",
+ "wkType": "Business Type",
+ "exceStatus": "Execution Status",
+ "status": "Status",
+ "workQty": "In-progress Qty",
+ "qty": "Completed Qty",
+ "stationId": "Station No.",
+ "businessTime": "Business Time"
+ },
+ "dialog": {
+ "titleAdd": "Add Transfer",
+ "titleEdit": "Edit Transfer",
+ "tip": "The transfer number is generated by the system. When creating a new record, only maintain the transfer type, source/target area, and remark.",
+ "code": "Transfer No.",
+ "type": "Transfer Type",
+ "orgAreaId": "Source Area",
+ "tarAreaId": "Target Area",
+ "status": "Status",
+ "memo": "Remark",
+ "placeholderCode": "Generated after saving",
+ "placeholderType": "Please select a transfer type",
+ "placeholderOrgAreaId": "Please select a source area",
+ "placeholderTarAreaId": "Please select a target area",
+ "placeholderStatus": "Please select a status",
+ "placeholderMemo": "Please enter a remark",
+ "validation": {
+ "type": "Please select a transfer type",
+ "orgAreaId": "Please select a source area",
+ "tarAreaId": "Please select a target area"
+ }
+ },
+ "messages": {
+ "detailTimeout": "Transfer detail timed out and waiting has stopped",
+ "ordersTimeout": "Transfer items timed out and waiting has stopped",
+ "ordersLoadFailed": "Failed to load transfer items",
+ "detailLoadFailed": "Failed to load transfer detail",
+ "publishConfirm": "Are you sure you want to dispatch transfer order \"{code}\"?",
+ "publishTitle": "Dispatch Confirmation",
+ "publishSuccess": "Dispatched successfully",
+ "publishFailed": "Dispatch failed",
+ "typeOptionsTimeout": "Transfer type options timed out and waiting has stopped",
+ "areaOptionsTimeout": "Area options timed out and waiting has stopped"
+ }
+ }
+ },
+ "task": {
+ "title": "Task Management",
+ "buttons": {
+ "autoRun": "Enable Auto Dispatch",
+ "pauseAutoRun": "Pause Auto Dispatch"
+ },
+ "placeholder": {
+ "condition": "Enter task No./location/pallet code",
+ "taskCode": "Enter task No.",
+ "orgLoc": "Enter source location",
+ "targLoc": "Enter target location",
+ "barcode": "Enter pallet code"
+ },
+ "search": {
+ "condition": "Keyword",
+ "conditionPlaceholder": "Enter task No./location/pallet code",
+ "taskCode": "Task No.",
+ "taskCodePlaceholder": "Enter task No.",
+ "orgLoc": "Source Location",
+ "orgLocPlaceholder": "Enter source location",
+ "targLoc": "Target Location",
+ "targLocPlaceholder": "Enter target location",
+ "barcode": "Pallet Code",
+ "barcodePlaceholder": "Enter pallet code"
+ },
+ "actions": {
+ "view": "View Detail",
+ "flowStep": "Flow Steps",
+ "complete": "Complete Task",
+ "check": "Check Outbound",
+ "pick": "Pick Outbound",
+ "top": "Pin Task",
+ "remove": "Cancel Task"
+ },
+ "detail": {
+ "title": "Task Detail",
+ "taskCode": "Task No.",
+ "baseInfo": "Basic Information",
+ "pathInfo": "Execution Path",
+ "items": "Task Items",
+ "itemsHint": "View related orders, materials, and execution records of the current task",
+ "flowStep": "Flow Steps",
+ "taskStatus": "Task Status",
+ "taskType": "Task Type",
+ "warehType": "Device Type",
+ "priority": "Priority",
+ "status": "Status",
+ "robotCode": "Robot Code",
+ "createTime": "Created At",
+ "updateTime": "Updated At",
+ "memo": "Remark",
+ "orgLoc": "Source Location",
+ "orgSite": "Source Station",
+ "targLoc": "Target Location",
+ "targSite": "Target Station",
+ "barcode": "Pallet Code"
+ },
+ "expand": {
+ "title": "Task Items",
+ "empty": "No task items",
+ "orderType": "Order Type",
+ "wkType": "Business Type",
+ "platWorkCode": "Work Order No.",
+ "platItemId": "Line No.",
+ "anfme": "Quantity"
+ },
+ "flowStepDialog": {
+ "title": "Flow Steps",
+ "currentTask": "Current Task",
+ "flowInstanceNo": "Flow Instance No.",
+ "stepCode": "Step Code",
+ "stepName": "Step Name",
+ "stepType": "Step Type",
+ "executeResult": "Execution Result",
+ "startTime": "Start Time",
+ "endTime": "End Time",
+ "timeout": "Flow steps timed out and waiting has stopped"
+ },
+ "messages": {
+ "completeConfirm": "Are you sure you want to complete task {code}?",
+ "completeSuccess": "Task completed successfully",
+ "removeConfirm": "Are you sure you want to cancel task {code}?",
+ "removeSuccess": "Task canceled successfully",
+ "checkConfirm": "Are you sure you want to execute check outbound task {code}?",
+ "checkSuccess": "Check outbound completed successfully",
+ "pickConfirm": "Are you sure you want to execute pick outbound task {code}?",
+ "pickSuccess": "Pick outbound completed successfully",
+ "topSuccess": "Task pinned successfully",
+ "actionFailed": "Task action failed",
+ "autoRunEnabled": "Auto dispatch enabled",
+ "autoRunPaused": "Auto dispatch paused",
+ "autoRunFailed": "Failed to update auto dispatch settings",
+ "detailLoadFailed": "Failed to load task items",
+ "listTimeout": "Task list timed out and waiting has stopped",
+ "autoRunTimeout": "Auto dispatch config timed out and waiting has stopped",
+ "autoRunOnSuccess": "Auto dispatch enabled",
+ "autoRunOffSuccess": "Auto dispatch paused",
+ "autoRunUpdateFailed": "Failed to update auto dispatch settings",
+ "itemsTimeout": "Task items timed out and waiting has stopped"
+ }
+ },
+ "basicInfo": {
+ "basStationArea": {
+ "reportTitle": "Station Area Report",
+ "entity": "Station Area",
+ "buttons": {
+ "add": "Add Station Area",
+ "batchDelete": "Batch Delete"
+ },
+ "actions": {
+ "add": "Add Station Area"
+ },
+ "placeholder": {
+ "condition": "Enter station area name/code/remark",
+ "timeStart": "Select start time",
+ "timeEnd": "Select end time",
+ "stationAreaName": "Enter station area name",
+ "stationAreaId": "Enter station area code",
+ "crossZoneArea": "Enter cross-zone area",
+ "wcsData": "Enter WCS data",
+ "containerType": "Enter container type",
+ "barcode": "Enter barcode",
+ "stationAlias": "Enter station alias",
+ "memo": "Enter remark"
+ },
+ "search": {
+ "condition": "Keyword",
+ "conditionPlaceholder": "Enter station area name/code/remark",
+ "timeStart": "Start Time",
+ "timeStartPlaceholder": "Select start time",
+ "timeEnd": "End Time",
+ "timeEndPlaceholder": "Select end time",
+ "stationAreaName": "Station Area Name",
+ "stationAreaNamePlaceholder": "Enter station area name",
+ "stationAreaId": "Station Area Code",
+ "stationAreaIdPlaceholder": "Enter station area code",
+ "type": "Station Type",
+ "area": "Warehouse Area",
+ "useStatus": "Usage Status",
+ "inAble": "Inbound Allowed",
+ "outAble": "Outbound Allowed",
+ "isCrossZone": "Cross Zone",
+ "crossZoneArea": "Cross-zone Area",
+ "crossZoneAreaPlaceholder": "Enter cross-zone area",
+ "isWcs": "WCS Enabled",
+ "wcsData": "WCS Data",
+ "wcsDataPlaceholder": "Enter WCS data",
+ "containerType": "Container Type",
+ "containerTypePlaceholder": "Enter container type",
+ "autoTransfer": "Auto Transfer",
+ "barcode": "Barcode",
+ "barcodePlaceholder": "Enter barcode",
+ "stationAlias": "Station Alias",
+ "stationAliasPlaceholder": "Enter station alias",
+ "status": "Status",
+ "memo": "Remark",
+ "memoPlaceholder": "Enter remark"
+ },
+ "type": {
+ "smart": "Smart Station",
+ "normal": "Normal Station"
+ },
+ "table": {
+ "crossZoneArea": "Cross-zone Area",
+ "inAble": "Inbound Allowed",
+ "outAble": "Outbound Allowed",
+ "isCrossZone": "Cross Zone"
+ },
+ "detail": {
+ "title": "Station Area Detail",
+ "baseInfo": "Basic Information",
+ "auditInfo": "Audit Information",
+ "stationAreaName": "Station Area Name",
+ "stationAreaId": "Station Area Code",
+ "type": "Station Type",
+ "area": "Warehouse Area",
+ "crossZoneArea": "Cross-zone Area",
+ "containerType": "Container Type",
+ "stationAlias": "Station Alias",
+ "inAble": "Inbound Allowed",
+ "outAble": "Outbound Allowed",
+ "isCrossZone": "Cross Zone",
+ "isWcs": "WCS Enabled",
+ "autoTransfer": "Auto Transfer",
+ "useStatus": "Usage Status",
+ "barcode": "Barcode",
+ "status": "Status",
+ "wcsData": "WCS Data",
+ "memo": "Remark",
+ "createBy": "Created By",
+ "createTime": "Created At",
+ "updateBy": "Updated By",
+ "updateTime": "Updated At"
+ },
+ "dialog": {
+ "titleAdd": "Add Station Area",
+ "titleEdit": "Edit Station Area",
+ "stationAreaName": "Station Area Name",
+ "stationAreaId": "Station Area Code",
+ "type": "Station Type",
+ "area": "Warehouse Area",
+ "crossZoneArea": "Cross-zone Area",
+ "containerType": "Container Type",
+ "stationAlias": "Station Alias",
+ "inAble": "Inbound Allowed",
+ "outAble": "Outbound Allowed",
+ "isCrossZone": "Cross Zone",
+ "isWcs": "WCS Enabled",
+ "autoTransfer": "Auto Transfer",
+ "useStatus": "Usage Status",
+ "wcsData": "WCS Data",
+ "barcode": "Barcode",
+ "status": "Status",
+ "memo": "Remark",
+ "validation": {
+ "stationAreaName": "Please enter the station area name",
+ "stationAreaId": "Please enter the station area code",
+ "type": "Please select a station type",
+ "area": "Please select a warehouse area",
+ "containerType": "Please select container types",
+ "stationAlias": "Please select station aliases"
+ }
+ },
+ "messages": {
+ "detailLoadFailed": "Failed to load station area detail",
+ "detailTimeout": "Station area detail timed out and waiting has stopped",
+ "stationAliasTimeout": "Station alias options timed out and waiting has stopped",
+ "areaOptionsTimeout": "Area options timed out and waiting has stopped",
+ "containerTypeTimeout": "Container type options timed out and waiting has stopped",
+ "useStatusTimeout": "Usage status options timed out and waiting has stopped"
+ }
+ }
+ },
+ "system": {
+ "role": {
+ "entity": "Role",
+ "reportTitle": "Role Report",
+ "buttons": {
+ "add": "Add Role"
+ },
+ "search": {
+ "name": "Role Name",
+ "namePlaceholder": "Enter role name",
+ "code": "Role Code",
+ "codePlaceholder": "Enter role code",
+ "memo": "Remark",
+ "memoPlaceholder": "Enter remark",
+ "condition": "Keyword",
+ "conditionPlaceholder": "Search by keyword",
+ "status": "Status",
+ "statusPlaceholder": "Select status"
+ },
+ "table": {
+ "name": "Role Name",
+ "code": "Role Code",
+ "memo": "Remark",
+ "status": "Status",
+ "updateTime": "Updated At",
+ "createTime": "Created At",
+ "operation": "Operation"
+ },
+ "actions": {
+ "scopeMenu": "Web Permissions",
+ "scopePda": "PDA Permissions",
+ "scopeMatnr": "Material Permissions",
+ "scopeWarehouse": "Warehouse Permissions",
+ "edit": "Edit Role",
+ "delete": "Delete Role"
+ },
+ "scopes": {
+ "menu": "Web Permissions",
+ "pda": "PDA Permissions",
+ "matnr": "Material Permissions",
+ "warehouse": "Warehouse Permissions"
+ },
+ "dialog": {
+ "addTitle": "Add Role",
+ "editTitle": "Edit Role",
+ "validationName": "Please enter the role name",
+ "name": "Role Name",
+ "namePlaceholder": "Enter role name",
+ "code": "Role Code",
+ "codePlaceholder": "Enter role code",
+ "status": "Status",
+ "statusPlaceholder": "Select status",
+ "memo": "Remark",
+ "memoPlaceholder": "Enter remark"
+ },
+ "permission": {
+ "title": "Role Permissions",
+ "currentRole": "Current Role: ",
+ "unselected": "No role selected",
+ "selectAll": "Select All",
+ "clear": "Clear",
+ "saveCurrent": "Save Current Permissions",
+ "searchPlaceholder": "Search permission tree",
+ "authButton": "Button",
+ "scopeLoadTimeout": "{title} loading timed out and waiting has stopped",
+ "scopeLoadFailed": "Failed to load {title}",
+ "saveSuccess": "Permissions saved successfully",
+ "saveFailed": "Failed to save permissions"
+ }
+ },
+ "menu": {
+ "title": "Menu Management",
+ "entities": {
+ "permission": "Permission"
+ },
+ "buttons": {
+ "add": "Add Menu"
+ },
+ "actions": {
+ "addAuth": "Add Permission",
+ "expand": "Expand",
+ "collapse": "Collapse"
+ },
+ "types": {
+ "button": "Button",
+ "directory": "Directory",
+ "menu": "Menu"
+ },
+ "search": {
+ "name": "Menu Name",
+ "route": "Route"
+ },
+ "messages": {
+ "menuSelfParent": "Parent menu cannot be the current menu",
+ "loadFailed": "Failed to load menu",
+ "loadTimeout": "Menu loading timed out and waiting has stopped",
+ "submitFailed": "Submit failed",
+ "authCount": "{count} permission keys",
+ "deleteMenuConfirm": "Are you sure you want to delete menu \"{title}\"? This action cannot be undone",
+ "deleteAuthConfirm": "Are you sure you want to delete permission \"{title}\"? This action cannot be undone"
+ },
+ "form": {
+ "typeMenu": "Menu",
+ "typeButton": "Button",
+ "titleAddMenu": "Create Menu",
+ "titleEditMenu": "Edit Menu",
+ "titleAddButton": "Create Permission",
+ "titleEditButton": "Edit Permission",
+ "menuType": "Menu Type",
+ "parentId": "Parent Menu",
+ "nameMenu": "Menu Name",
+ "nameButton": "Permission Name",
+ "route": "Route",
+ "component": "Component Key",
+ "authority": "Authority",
+ "icon": "Icon",
+ "sort": "Sort",
+ "status": "Status",
+ "memo": "Remark",
+ "placeholderParent": "Please select a parent menu",
+ "placeholderMenuName": "Please enter a menu name",
+ "placeholderButtonName": "Please enter a permission name",
+ "placeholderRoute": "Please enter a route",
+ "placeholderComponent": "Please enter a component key",
+ "placeholderAuthority": "Please enter an authority",
+ "placeholderIcon": "Please enter an icon name",
+ "placeholderStatus": "Please select a status",
+ "placeholderMemo": "Please enter a remark",
+ "validationMenuName": "Please enter a menu name",
+ "validationButtonName": "Please enter a permission name",
+ "validationRoute": "Please enter a route",
+ "validationAuthority": "Please enter an authority"
+ }
+ }
+ }
}
}
diff --git a/rsf-design/src/locales/langs/zh.json b/rsf-design/src/locales/langs/zh.json
index e6b3a50..f9e4972 100644
--- a/rsf-design/src/locales/langs/zh.json
+++ b/rsf-design/src/locales/langs/zh.json
@@ -36,7 +36,87 @@
"tips": "鎻愮ず",
"cancel": "鍙栨秷",
"confirm": "纭畾",
- "logOutTips": "鎮ㄦ槸鍚﹁閫�鍑虹櫥褰�?"
+ "logOutTips": "鎮ㄦ槸鍚﹁閫�鍑虹櫥褰�?",
+ "count": "鍏� {count} 鏉�",
+ "listSeparator": "銆�",
+ "actions": {
+ "search": "鏌ヨ",
+ "reset": "閲嶇疆",
+ "refresh": "鍒锋柊",
+ "add": "鏂板",
+ "batchDelete": "鎵归噺鍒犻櫎",
+ "edit": "缂栬緫",
+ "delete": "鍒犻櫎",
+ "detail": "璇︽儏",
+ "items": "鏄庣粏",
+ "print": "鎵撳嵃",
+ "export": "瀵煎嚭",
+ "exporting": "瀵煎嚭涓�...",
+ "close": "鍏抽棴",
+ "complete": "瀹屾垚",
+ "expand": "灞曞紑",
+ "collapse": "鏀惰捣",
+ "viewAll": "鏌ョ湅鍏ㄩ儴",
+ "save": "淇濆瓨",
+ "submit": "鎻愪氦"
+ },
+ "status": {
+ "enabled": "鍚敤",
+ "disabled": "绂佺敤",
+ "normal": "姝e父",
+ "frozen": "鍐荤粨",
+ "unknown": "鏈煡",
+ "yes": "鏄�",
+ "no": "鍚�"
+ },
+ "placeholder": {
+ "empty": "--"
+ }
+ },
+ "crud": {
+ "messages": {
+ "createSuccess": "鏂板鎴愬姛",
+ "updateSuccess": "淇敼鎴愬姛",
+ "deleteSuccess": "鍒犻櫎鎴愬姛",
+ "batchDeleteSuccess": "鎵归噺鍒犻櫎鎴愬姛",
+ "submitFailed": "鎻愪氦澶辫触",
+ "deleteFailed": "鍒犻櫎澶辫触",
+ "batchDeleteFailed": "鎵归噺鍒犻櫎澶辫触",
+ "exportSuccess": "瀵煎嚭鎴愬姛",
+ "exportFailed": "瀵煎嚭澶辫触",
+ "exportFailedWithStatus": "瀵煎嚭澶辫触锛坽status}锛�",
+ "printFailed": "鎵撳嵃澶辫触",
+ "loadFailed": "鍔犺浇澶辫触"
+ },
+ "confirm": {
+ "deleteTitle": "鍒犻櫎纭",
+ "deleteMessage": "纭畾瑕佸垹闄entity}銆寋label}銆嶅悧锛�",
+ "batchDeleteTitle": "鎵归噺鍒犻櫎纭",
+ "batchDeleteMessage": "纭畾瑕佹壒閲忓垹闄ら�変腑鐨� {count} 涓獅entity}鍚楋紵"
+ }
+ },
+ "print": {
+ "previewTitle": "鎵撳嵃棰勮",
+ "defaultReportTitle": "鎶ヨ〃",
+ "borderOn": "杈规寮�",
+ "borderOff": "杈规鍏�",
+ "portrait": "绔栫増",
+ "landscape": "妯増",
+ "reportDate": "鎶ヨ〃鏃ユ湡",
+ "operator": "鎵撳嵃浜�",
+ "printedAt": "鎵撳嵃鏃堕棿",
+ "count": "璁板綍鏁�",
+ "previewLimited": "棰勮浠呭睍绀哄墠 {previewCount} 鏉★紝鐐瑰嚮鎵撳嵃灏嗚緭鍑哄叏閮� {totalCount} 鏉℃暟鎹��",
+ "noData": "鏆傛棤鎵撳嵃鏁版嵁"
+ },
+ "table": {
+ "index": "搴忓彿",
+ "unit": "鍗曚綅",
+ "id": "ID",
+ "wcs": "WCS",
+ "source": "鏉ユ簮",
+ "supplier": "渚涘簲鍟�",
+ "supplierBatch": "渚涘簲鍟嗘壒娆�"
},
"search": {
"placeholder": "鎼滅储椤甸潰",
@@ -451,6 +531,7 @@
"assistantRole": "AI",
"thinking": "鎬濊�冧腑...",
"inputPlaceholder": "杈撳叆浣犵殑闂锛屾寜 Enter 鍙戦�侊紝Shift + Enter 鎹㈣",
+ "inputHotkeyHint": "Enter 鍙戦�侊紝Shift + Enter 鎹㈣",
"clearInput": "娓呯┖杈撳叆",
"stop": "鍋滄",
"send": "鍙戦��",
@@ -473,7 +554,8 @@
"recentMetric": "Recent: {value}",
"elapsedMetric": "鑰楁椂: {value} ms",
"firstTokenMetric": "棣栧寘: {value} ms",
- "tokenMetric": "Tokens: prompt {prompt} / completion {completion} / total {total}"
+ "tokenMetric": "Tokens: prompt {prompt} / completion {completion} / total {total}",
+ "streaming": "鐢熸垚涓�"
}
},
"table": {
@@ -500,8 +582,834 @@
"expand": "灞曞紑",
"index": "搴忓彿"
},
+ "index": "搴忓彿",
+ "id": "ID",
+ "operation": "鎿嶄綔",
+ "status": "鐘舵��",
+ "type": "绫诲瀷",
+ "source": "鏉ユ簮",
+ "supplier": "渚涘簲鍟�",
+ "supplierBatch": "渚涘簲鍟嗘壒娆�",
+ "remark": "澶囨敞",
+ "updateBy": "鏇存柊浜�",
+ "updateTime": "鏇存柊鏃堕棿",
+ "createTime": "鍒涘缓鏃堕棿",
+ "unit": "鍗曚綅",
+ "batch": "鎵规",
+ "quantity": "鏁伴噺",
+ "materialCode": "鐗╂枡缂栫爜",
+ "materialName": "鐗╂枡鍚嶇О",
+ "wcs": "WCS",
+ "menuType": "鑿滃崟绫诲瀷",
+ "iconPreview": "鍥炬爣棰勮",
+ "componentKey": "缁勪欢鏍囪瘑",
+ "permissionKey": "鏉冮檺鏍囪瘑",
+ "sort": "鎺掑簭",
"zebra": "鏂戦┈绾�",
"border": "杈规",
- "headerBackground": "琛ㄥご鑳屾櫙"
+ "headerBackground": "琛ㄥご鑳屾櫙",
+ "topLevelMenu": "椤剁骇鑿滃崟",
+ "emptyText": "鏆傛棤鏁版嵁"
+ },
+ "message": {
+ "requestTimeoutStopped": "璇锋眰瓒呮椂锛屽凡鍋滄绛夊緟",
+ "exportTimeoutStopped": "瀵煎嚭璇锋眰瓒呮椂锛屽凡鍋滄绛夊緟",
+ "printTimeoutStopped": "鎵撳嵃鏁版嵁鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟",
+ "exportInvalidDataType": "鏁版嵁蹇呴』鏄暟缁勬牸寮�",
+ "exportNoData": "娌℃湁鍙鍑虹殑鏁版嵁",
+ "exportExceedMaxRows": "鏁版嵁琛屾暟瓒呰繃闄愬埗锛坽maxRows}琛岋級",
+ "exportExcelFailed": "Excel 瀵煎嚭澶辫触: {message}",
+ "exportSuccessWithCount": "鎴愬姛瀵煎嚭 {count} 鏉℃暟鎹�",
+ "exportFailedUnknown": "瀵煎嚭澶辫触: {message}",
+ "exportWorkbookSubject": "鏁版嵁瀵煎嚭",
+ "exportWorkbookCompany": "绯荤粺瀵煎嚭",
+ "exportWorkbookCategory": "鏁版嵁",
+ "exportWorkbookKeywords": "excel,export,data",
+ "exportWorkbookComments": "鐢辩郴缁熻嚜鍔ㄧ敓鎴�"
+ },
+ "pages": {
+ "system": {
+ "role": {
+ "entity": "瑙掕壊",
+ "reportTitle": "瑙掕壊绠$悊鎶ヨ〃",
+ "buttons": {
+ "add": "鏂板瑙掕壊"
+ },
+ "search": {
+ "name": "瑙掕壊鍚嶇О",
+ "namePlaceholder": "璇疯緭鍏ヨ鑹插悕绉�",
+ "code": "瑙掕壊缂栫爜",
+ "codePlaceholder": "璇疯緭鍏ヨ鑹茬紪鐮�",
+ "memo": "澶囨敞",
+ "memoPlaceholder": "璇疯緭鍏ュ娉�",
+ "condition": "鍏抽敭瀛�",
+ "conditionPlaceholder": "杈撳叆鍏抽敭瀛楁悳绱�",
+ "status": "鐘舵��",
+ "statusPlaceholder": "璇烽�夋嫨鐘舵��"
+ },
+ "table": {
+ "name": "瑙掕壊鍚嶇О",
+ "code": "瑙掕壊缂栫爜",
+ "memo": "澶囨敞",
+ "status": "鐘舵��",
+ "updateTime": "鏇存柊鏃堕棿",
+ "createTime": "鍒涘缓鏃堕棿",
+ "operation": "鎿嶄綔"
+ },
+ "actions": {
+ "scopeMenu": "缃戦〉鏉冮檺",
+ "scopePda": "PDA鏉冮檺",
+ "scopeMatnr": "鐗╂枡鏉冮檺",
+ "scopeWarehouse": "浠撳簱鏉冮檺",
+ "edit": "缂栬緫瑙掕壊",
+ "delete": "鍒犻櫎瑙掕壊"
+ },
+ "scopes": {
+ "menu": "缃戦〉鏉冮檺",
+ "pda": "PDA鏉冮檺",
+ "matnr": "鐗╂枡鏉冮檺",
+ "warehouse": "浠撳簱鏉冮檺"
+ },
+ "dialog": {
+ "addTitle": "鏂板瑙掕壊",
+ "editTitle": "缂栬緫瑙掕壊",
+ "validationName": "璇疯緭鍏ヨ鑹插悕绉�",
+ "name": "瑙掕壊鍚嶇О",
+ "namePlaceholder": "璇疯緭鍏ヨ鑹插悕绉�",
+ "code": "瑙掕壊缂栫爜",
+ "codePlaceholder": "璇疯緭鍏ヨ鑹茬紪鐮�",
+ "status": "鐘舵��",
+ "statusPlaceholder": "璇烽�夋嫨鐘舵��",
+ "memo": "澶囨敞",
+ "memoPlaceholder": "璇疯緭鍏ュ娉�"
+ },
+ "permission": {
+ "title": "瑙掕壊鏉冮檺",
+ "currentRole": "褰撳墠瑙掕壊锛�",
+ "unselected": "鏈�夋嫨瑙掕壊",
+ "selectAll": "鍏ㄩ��",
+ "clear": "娓呯┖",
+ "saveCurrent": "淇濆瓨褰撳墠鏉冮檺",
+ "searchPlaceholder": "鎼滅储鏉冮檺鏍�",
+ "authButton": "鎸夐挳",
+ "scopeLoadTimeout": "{title}鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟",
+ "scopeLoadFailed": "鍔犺浇{title}澶辫触",
+ "saveSuccess": "鏉冮檺淇濆瓨鎴愬姛",
+ "saveFailed": "鏉冮檺淇濆瓨澶辫触"
+ }
+ },
+ "menu": {
+ "title": "鑿滃崟绠$悊",
+ "addMenu": "娣诲姞鑿滃崟",
+ "menuName": "鑿滃崟鍚嶇О",
+ "route": "璺敱鍦板潃",
+ "iconPreview": "鍥炬爣棰勮",
+ "menuType": "鑿滃崟绫诲瀷",
+ "componentKey": "缁勪欢鏍囪瘑",
+ "authority": "鏉冮檺鏍囪瘑",
+ "sort": "鎺掑簭",
+ "status": "鐘舵��",
+ "memo": "澶囨敞",
+ "operation": "鎿嶄綔",
+ "types": {
+ "button": "鎸夐挳",
+ "directory": "鐩綍",
+ "menu": "鑿滃崟"
+ },
+ "addPermission": "鏂板鏉冮檺",
+ "deleteMenuMessage": "纭畾瑕佸垹闄よ彍鍗曘�寋label}銆嶅悧锛熷垹闄ゅ悗鏃犳硶鎭㈠",
+ "deleteAuthMessage": "纭畾瑕佸垹闄ゆ潈闄愩�寋label}銆嶅悧锛熷垹闄ゅ悗鏃犳硶鎭㈠",
+ "selfParentError": "涓婄骇鑿滃崟涓嶈兘閫夋嫨褰撳墠鑿滃崟"
+ }
+ },
+ "orders": {
+ "asnOrder": {
+ "reportTitle": "鍏ュ簱閫氱煡鍗曟姤琛�",
+ "entity": "鍏ュ簱閫氱煡鍗�",
+ "buttons": {
+ "createByPo": "鎸塒O寤哄崟"
+ },
+ "search": {
+ "condition": "鍏抽敭瀛�",
+ "conditionPlaceholder": "璇疯緭鍏� ASN 鍗曞彿/PO 鍗曞彿/渚涘簲鍟�",
+ "code": "ASN鍗曞彿",
+ "codePlaceholder": "璇疯緭鍏� ASN 鍗曞彿",
+ "poCode": "PO鍗曞彿",
+ "poCodePlaceholder": "璇疯緭鍏� PO 鍗曞彿",
+ "wkType": "涓氬姟绫诲瀷",
+ "wkTypePlaceholder": "璇疯緭鍏ヤ笟鍔$被鍨�",
+ "exceStatus": "鍗曟嵁鐘舵��",
+ "supplierName": "渚涘簲鍟�",
+ "supplierPlaceholder": "璇疯緭鍏ヤ緵搴斿晢",
+ "purchaseUserName": "閲囪喘鍛�",
+ "purchaseUserPlaceholder": "璇疯緭鍏ラ噰璐憳"
+ },
+ "placeholder": {
+ "condition": "璇疯緭鍏� ASN 鍗曞彿/PO 鍗曞彿/渚涘簲鍟�",
+ "code": "璇疯緭鍏� ASN 鍗曞彿",
+ "poCode": "璇疯緭鍏� PO 鍗曞彿",
+ "wkType": "璇疯緭鍏ヤ笟鍔$被鍨�",
+ "supplierName": "璇疯緭鍏ヤ緵搴斿晢",
+ "purchaseUserName": "璇疯緭鍏ラ噰璐憳"
+ },
+ "status": {
+ "pending": "鏈墽琛�",
+ "running": "鎵ц涓�",
+ "receiving": "鏀惰揣瀹屾垚",
+ "taskRunning": "浠诲姟鎵ц涓�",
+ "completed": "宸插畬鎴�",
+ "cancelled": "鍙栨秷",
+ "closed": "宸插叧闂�"
+ },
+ "actions": {
+ "view": "鏌ョ湅璇︽儏",
+ "items": "鏀惰揣鏄庣粏",
+ "print": "鎵撳嵃",
+ "complete": "瀹屾垚"
+ },
+ "detail": {
+ "title": "鍏ュ簱閫氱煡鍗曡鎯�",
+ "baseInfo": "鍩虹淇℃伅",
+ "items": "鍗曟嵁鏄庣粏",
+ "asnCode": "ASN鍗曞彿",
+ "poCode": "PO鍗曞彿",
+ "wkType": "涓氬姟绫诲瀷",
+ "orderType": "鍗曟嵁绫诲瀷",
+ "status": "鍗曟嵁鐘舵��",
+ "purchaseOrg": "閲囪喘缁勭粐",
+ "purchaseUser": "閲囪喘鍛�",
+ "supplier": "渚涘簲鍟�",
+ "anfme": "搴旀敹鏁伴噺",
+ "qty": "宸叉敹鏁伴噺",
+ "updateTime": "鏇存柊鏃堕棿",
+ "createTime": "鍒涘缓鏃堕棿",
+ "memo": "澶囨敞",
+ "count": "鍏� {count} 鏉�",
+ "completeTitle": "瀹屾垚纭",
+ "completeConfirm": "纭畾瀹屾垚鍏ュ簱閫氱煡鍗� {code} 鍚楋紵",
+ "completeSuccess": "鍏ュ簱閫氱煡鍗曞凡瀹屾垚",
+ "actionFailed": "鍏ュ簱閫氱煡鍗曟搷浣滃け璐�",
+ "detailTimeout": "鍏ュ簱閫氱煡鍗曟槑缁嗗姞杞借秴鏃讹紝宸插仠姝㈢瓑寰�",
+ "itemsTimeout": "鍏ュ簱閫氱煡鍗曟槑缁嗗姞杞借秴鏃讹紝宸插仠姝㈢瓑寰�"
+ },
+ "createByPoDialog": {
+ "title": "鎸塒O寤哄崟",
+ "purchaseList": "鍙缓鍗� PO 鍒楄〃",
+ "purchasePreview": "PO 鏄庣粏棰勮",
+ "purchaseSelected": "褰撳墠閫夋嫨锛歿code}",
+ "purchaseEmpty": "璇峰厛鍦ㄥ乏渚ч�夋嫨涓�涓� PO 鍗�",
+ "purchaseGenerateHint": "灏嗘寜 PO {code} 鐨� {count} 鏉℃槑缁嗙敓鎴愬叆搴撻�氱煡鍗�",
+ "purchaseGenerateEmpty": "璇烽�夋嫨涓�涓彲寤哄崟鐨� PO 鍗�",
+ "generate": "鐢熸垚鍏ュ簱閫氱煡鍗�",
+ "refreshItems": "鍒锋柊鏄庣粏",
+ "messages": {
+ "purchaseItemsTimeout": "PO 鏄庣粏鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟",
+ "purchaseItemsAllTimeout": "PO 鍏ㄩ噺鏄庣粏鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟",
+ "purchaseRequired": "璇峰厛閫夋嫨涓�涓� PO 鍗�",
+ "purchaseItemsEmpty": "褰撳墠 PO 鍗曟病鏈夊彲寤哄崟鏄庣粏",
+ "createByPoSuccess": "宸叉牴鎹� PO 鍗曠敓鎴愬叆搴撻�氱煡鍗�",
+ "createByPoFailed": "鎸� PO 寤哄崟澶辫触"
+ },
+ "search": {
+ "condition": "鍏抽敭瀛�",
+ "conditionPlaceholder": "璇疯緭鍏� PO 鍗曞彿/鏉ユ簮/渚涘簲鍟�",
+ "code": "PO鍗曞彿",
+ "codePlaceholder": "璇疯緭鍏� PO 鍗曞彿",
+ "source": "鏉ユ簮",
+ "sourcePlaceholder": "璇疯緭鍏ユ潵婧�",
+ "supplierName": "渚涘簲鍟�",
+ "supplierNamePlaceholder": "璇疯緭鍏ヤ緵搴斿晢"
+ }
+ },
+ "table": {
+ "poItemId": "PO琛屽彿",
+ "expectedQty": "搴旀敹鏁伴噺",
+ "receivedQty": "宸叉敹鏁伴噺",
+ "remainingQty": "鍙缓鍗曟暟閲�",
+ "poStatus": "PO鐘舵��",
+ "purchaseQty": "閲囪喘鏁伴噺",
+ "generatedQty": "宸茬敓鎴怉SN鏁伴噺",
+ "receivedQtyTotal": "鏀惰揣鏁伴噺"
+ }
+ },
+ "delivery": {
+ "reportTitle": "DO鍗曟姤琛�",
+ "detailReportTitle": "DO鍗曟槑缁嗘姤琛�",
+ "entity": "DO鍗�",
+ "search": {
+ "condition": "鍏抽敭瀛�",
+ "conditionPlaceholder": "璇疯緭鍏ュ崟鍙�/ERP涓诲崟鏍囪瘑/骞冲彴鍗曞彿",
+ "code": "鍗曞彿",
+ "codePlaceholder": "璇疯緭鍏ュ崟鍙�",
+ "platId": "ERP涓诲崟鏍囪瘑",
+ "platIdPlaceholder": "璇疯緭鍏RP涓诲崟鏍囪瘑",
+ "type": "鍗曟嵁绫诲瀷",
+ "typePlaceholder": "璇疯緭鍏ュ崟鎹被鍨�",
+ "wkType": "涓氬姟绫诲瀷",
+ "wkTypePlaceholder": "璇疯緭鍏ヤ笟鍔$被鍨�",
+ "source": "鍗曟嵁鏉ユ簮",
+ "sourcePlaceholder": "璇疯緭鍏ュ崟鎹潵婧�",
+ "exceStatus": "鎵ц鐘舵��",
+ "exceStatusPlaceholder": "璇疯緭鍏ユ墽琛岀姸鎬�",
+ "memo": "澶囨敞",
+ "memoPlaceholder": "璇疯緭鍏ュ娉�"
+ },
+ "placeholder": {
+ "condition": "璇疯緭鍏ュ崟鍙�/ERP涓诲崟鏍囪瘑/骞冲彴鍗曞彿",
+ "code": "璇疯緭鍏ュ崟鍙�",
+ "platId": "璇疯緭鍏RP涓诲崟鏍囪瘑",
+ "type": "璇疯緭鍏ュ崟鎹被鍨�",
+ "wkType": "璇疯緭鍏ヤ笟鍔$被鍨�",
+ "source": "璇疯緭鍏ュ崟鎹潵婧�",
+ "exceStatus": "璇疯緭鍏ユ墽琛岀姸鎬�",
+ "memo": "璇疯緭鍏ュ娉�"
+ },
+ "status": {
+ "normal": "姝e父",
+ "disabled": "绂佺敤",
+ "pending": "鏈墽琛�",
+ "running": "鎵ц涓�",
+ "partial": "閮ㄥ垎瀹屾垚",
+ "completed": "宸插畬鎴�"
+ },
+ "actions": {
+ "view": "鏌ョ湅璇︽儏",
+ "items": "鏄庣粏",
+ "delete": "鍒犻櫎"
+ },
+ "detail": {
+ "title": "浜ゆ帴鍗曡鎯�",
+ "baseInfo": "鍩虹淇℃伅",
+ "auditInfo": "瀹¤淇℃伅",
+ "items": "浜ゆ帴鍗曟槑缁�",
+ "code": "浜ゆ帴鍗曞彿",
+ "platId": "ERP涓诲崟鏍囪瘑",
+ "platCode": "骞冲彴鍗曞彿",
+ "type": "鍗曟嵁绫诲瀷",
+ "wkType": "涓氬姟绫诲瀷",
+ "source": "鍗曟嵁鏉ユ簮",
+ "anfme": "搴旀敹鏁伴噺",
+ "qty": "瀹炴敹鏁伴噺",
+ "workQty": "鎵ц涓暟閲�",
+ "status": "鐘舵��",
+ "exceStatus": "鎵ц鐘舵��",
+ "memo": "澶囨敞",
+ "startTime": "璁″垝鍑哄簱鏃堕棿",
+ "endTime": "璁″垝鍑哄簱缁撴潫鏃堕棿",
+ "createBy": "鍒涘缓浜�",
+ "createTime": "鍒涘缓鏃堕棿",
+ "updateBy": "鏇存柊浜�",
+ "updateTime": "鏇存柊鏃堕棿",
+ "count": "鍏� {count} 鏉�"
+ },
+ "table": {
+ "deliveryCode": "浜ゆ帴鍗曞彿",
+ "platCode": "骞冲彴鍗曞彿",
+ "platItemId": "骞冲彴琛屽彿",
+ "matnrCode": "鐗╂枡缂栫爜",
+ "maktx": "鐗╂枡鍚嶇О",
+ "fieldsIndex": "鍔ㄦ�佸瓧娈电储寮�",
+ "anfme": "鏁伴噺",
+ "workQty": "鎵ц鏁伴噺",
+ "qty": "宸插嚭鏁伴噺",
+ "startTime": "璁″垝鍑哄簱鏃堕棿",
+ "endTime": "璁″垝鍑哄簱缁撴潫鏃堕棿",
+ "nromQty": "鏍囧噯鍖呰",
+ "printQty": "鎵撳嵃鏁伴噺",
+ "splrName": "渚涘簲鍟嗗悕绉�",
+ "splrCode": "渚涘簲鍟嗙紪鐮�",
+ "splrBatch": "渚涘簲鍟嗘壒娆�"
+ },
+ "messages": {
+ "itemsTimeout": "DO鍗曟槑缁嗗姞杞借秴鏃讹紝宸插仠姝㈢瓑寰�",
+ "detailTimeout": "DO鍗曡鎯呭姞杞借秴鏃讹紝宸插仠姝㈢瓑寰�",
+ "detailLoadFailed": "DO鍗曡鎯呭姞杞藉け璐�"
+ }
+ },
+ "transfer": {
+ "reportTitle": "璋冩嫧鍗曟姤琛�",
+ "entity": "璋冩嫧鍗�",
+ "buttons": {
+ "add": "鏂板璋冩嫧鍗�",
+ "publish": "涓嬪彂鎵ц"
+ },
+ "search": {
+ "condition": "鍏抽敭瀛�",
+ "conditionPlaceholder": "璇疯緭鍏ュ崟鍙�/澶囨敞/浠撳簱/搴撳尯",
+ "code": "璋冩嫧鍗曞彿",
+ "codePlaceholder": "璇疯緭鍏ヨ皟鎷ㄥ崟鍙�",
+ "type": "璋冩嫧绫诲瀷",
+ "source": "鏉ユ簮",
+ "exceStatus": "鎵ц鐘舵��",
+ "orgWareName": "婧愪粨搴�",
+ "orgWareNamePlaceholder": "璇疯緭鍏ユ簮浠撳簱",
+ "tarWareName": "鐩爣浠撳簱",
+ "tarWareNamePlaceholder": "璇疯緭鍏ョ洰鏍囦粨搴�",
+ "orgAreaName": "婧愬簱鍖�",
+ "orgAreaNamePlaceholder": "璇疯緭鍏ユ簮搴撳尯",
+ "tarAreaName": "鐩爣搴撳尯",
+ "tarAreaNamePlaceholder": "璇疯緭鍏ョ洰鏍囧簱鍖�",
+ "status": "鐘舵��",
+ "memo": "澶囨敞",
+ "memoPlaceholder": "璇疯緭鍏ュ娉�"
+ },
+ "status": {
+ "sourceErp": "ERP绯荤粺",
+ "sourceWms": "WMS绯荤粺鐢熸垚",
+ "sourceExcel": "EXCEL瀵煎叆",
+ "sourceQms": "QMS绯荤粺",
+ "pending": "鏈墽琛�",
+ "running": "鎵ц涓�",
+ "completed": "鎵ц瀹屾垚",
+ "normal": "姝e父",
+ "frozen": "鍐荤粨"
+ },
+ "actions": {
+ "add": "鏂板璋冩嫧鍗�",
+ "view": "鏌ョ湅璇︽儏",
+ "items": "鏄庣粏",
+ "edit": "缂栬緫",
+ "publish": "涓嬪彂鎵ц",
+ "delete": "鍒犻櫎"
+ },
+ "placeholder": {
+ "condition": "璇疯緭鍏ュ崟鍙�/澶囨敞/浠撳簱/搴撳尯",
+ "code": "璇疯緭鍏ヨ皟鎷ㄥ崟鍙�",
+ "orgWareName": "璇疯緭鍏ユ簮浠撳簱",
+ "tarWareName": "璇疯緭鍏ョ洰鏍囦粨搴�",
+ "orgAreaName": "璇疯緭鍏ユ簮搴撳尯",
+ "tarAreaName": "璇疯緭鍏ョ洰鏍囧簱鍖�",
+ "memo": "璇疯緭鍏ュ娉�"
+ },
+ "detail": {
+ "title": "璋冩嫧鍗曡鎯�",
+ "baseInfo": "鍩虹淇℃伅",
+ "auditInfo": "瀹¤淇℃伅",
+ "source": "鏉ユ簮",
+ "orgWareName": "婧愪粨搴�",
+ "tarWareName": "鐩爣浠撳簱",
+ "orgAreaName": "婧愬簱鍖�",
+ "tarAreaName": "鐩爣搴撳尯",
+ "memo": "澶囨敞",
+ "createBy": "鍒涘缓浜�",
+ "createTime": "鍒涘缓鏃堕棿",
+ "updateBy": "鏇存柊浜�",
+ "updateTime": "鏇存柊鏃堕棿",
+ "relatedOrders": "鍏宠仈鍗曟嵁",
+ "relatedCode": "鍏宠仈鍗曞彿",
+ "code": "璋冩嫧鍗曞彿",
+ "type": "璋冩嫧绫诲瀷",
+ "wkType": "涓氬姟绫诲瀷",
+ "exceStatus": "鎵ц鐘舵��",
+ "status": "鐘舵��",
+ "workQty": "鎵ц涓暟閲�",
+ "qty": "宸插畬鎴愭暟閲�",
+ "stationId": "绔欑偣缂栧彿",
+ "businessTime": "涓氬姟鏃堕棿"
+ },
+ "dialog": {
+ "titleAdd": "鏂板璋冩嫧鍗�",
+ "titleEdit": "缂栬緫璋冩嫧鍗�",
+ "tip": "璋冩嫧鍗曞彿鐢辩郴缁熺敓鎴愶紝鏂板鏃跺彧闇�缁存姢璋冩嫧绫诲瀷銆佹簮/鐩爣搴撳尯鍜屽娉ㄣ��",
+ "code": "璋冩嫧鍗曞彿",
+ "type": "璋冩嫧绫诲瀷",
+ "orgAreaId": "婧愬簱鍖�",
+ "tarAreaId": "鐩爣搴撳尯",
+ "status": "鐘舵��",
+ "memo": "澶囨敞",
+ "placeholderCode": "淇濆瓨鍚庤嚜鍔ㄧ敓鎴�",
+ "placeholderType": "璇烽�夋嫨璋冩嫧绫诲瀷",
+ "placeholderOrgAreaId": "璇烽�夋嫨婧愬簱鍖�",
+ "placeholderTarAreaId": "璇烽�夋嫨鐩爣搴撳尯",
+ "placeholderStatus": "璇烽�夋嫨鐘舵��",
+ "placeholderMemo": "璇疯緭鍏ュ娉�",
+ "validation": {
+ "type": "璇烽�夋嫨璋冩嫧绫诲瀷",
+ "orgAreaId": "璇烽�夋嫨婧愬簱鍖�",
+ "tarAreaId": "璇烽�夋嫨鐩爣搴撳尯"
+ }
+ },
+ "messages": {
+ "detailTimeout": "璋冩嫧鍗曡鎯呭姞杞借秴鏃讹紝宸插仠姝㈢瓑寰�",
+ "ordersTimeout": "璋冩嫧鍗曟槑缁嗗姞杞借秴鏃讹紝宸插仠姝㈢瓑寰�",
+ "ordersLoadFailed": "璋冩嫧鍗曟槑缁嗗姞杞藉け璐�",
+ "detailLoadFailed": "璋冩嫧鍗曡鎯呭姞杞藉け璐�",
+ "publishConfirm": "纭畾瑕佷笅鍙戣皟鎷ㄥ崟銆寋code}銆嶅悧锛�",
+ "publishTitle": "涓嬪彂纭",
+ "publishSuccess": "涓嬪彂鎵ц鎴愬姛",
+ "publishFailed": "涓嬪彂鎵ц澶辫触",
+ "typeOptionsTimeout": "璋冩嫧绫诲瀷閫夐」鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟",
+ "areaOptionsTimeout": "搴撳尯閫夐」鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟"
+ }
+ }
+ },
+ "task": {
+ "title": "浠诲姟绠$悊",
+ "buttons": {
+ "autoRun": "鑷姩涓嬪彂浠诲姟",
+ "pauseAutoRun": "鏆傚仠鑷姩涓嬪彂"
+ },
+ "placeholder": {
+ "condition": "璇疯緭鍏ヤ换鍔″彿/搴撲綅/鎵樼洏鐮�",
+ "taskCode": "璇疯緭鍏ヤ换鍔″彿",
+ "orgLoc": "璇疯緭鍏ユ簮搴撲綅",
+ "targLoc": "璇疯緭鍏ョ洰鏍囧簱浣�",
+ "barcode": "璇疯緭鍏ユ墭鐩樼爜"
+ },
+ "search": {
+ "condition": "鍏抽敭瀛�",
+ "conditionPlaceholder": "璇疯緭鍏ヤ换鍔″彿/搴撲綅/鎵樼洏鐮�",
+ "taskCode": "浠诲姟鍙�",
+ "taskCodePlaceholder": "璇疯緭鍏ヤ换鍔″彿",
+ "orgLoc": "婧愬簱浣�",
+ "orgLocPlaceholder": "璇疯緭鍏ユ簮搴撲綅",
+ "targLoc": "鐩爣搴撲綅",
+ "targLocPlaceholder": "璇疯緭鍏ョ洰鏍囧簱浣�",
+ "barcode": "鎵樼洏鐮�",
+ "barcodePlaceholder": "璇疯緭鍏ユ墭鐩樼爜"
+ },
+ "actions": {
+ "view": "鏌ョ湅璇︽儏",
+ "flowStep": "娴佺▼姝ラ",
+ "complete": "瀹屾垚浠诲姟",
+ "check": "鐩樼偣鍑哄簱",
+ "pick": "鎷f枡鍑哄簱",
+ "top": "浠诲姟缃《",
+ "remove": "鍙栨秷浠诲姟"
+ },
+ "detail": {
+ "title": "浠诲姟璇︽儏",
+ "taskCode": "浠诲姟鍙�",
+ "baseInfo": "浠诲姟鍩虹淇℃伅",
+ "pathInfo": "鎵ц璺緞",
+ "items": "浠诲姟鏄庣粏",
+ "itemsHint": "鏌ョ湅褰撳墠浠诲姟鍏宠仈鐨勪笟鍔″崟鎹�佺墿鏂欏拰鎵ц璁板綍",
+ "flowStep": "娴佺▼姝ラ",
+ "taskStatus": "浠诲姟鐘舵��",
+ "taskType": "浠诲姟绫诲瀷",
+ "warehType": "璁惧绫诲瀷",
+ "priority": "浼樺厛绾�",
+ "status": "鐘舵��",
+ "robotCode": "鏈哄櫒浜虹紪鐮�",
+ "createTime": "鍒涘缓鏃堕棿",
+ "updateTime": "鏇存柊鏃堕棿",
+ "memo": "澶囨敞",
+ "orgLoc": "婧愬簱浣�",
+ "orgSite": "婧愮珯鐐�",
+ "targLoc": "鐩爣搴撲綅",
+ "targSite": "鐩爣绔欑偣",
+ "barcode": "鎵樼洏鐮�"
+ },
+ "expand": {
+ "title": "浠诲姟鏄庣粏",
+ "empty": "鏆傛棤浠诲姟鏄庣粏",
+ "orderType": "鍗曟嵁绫诲瀷",
+ "wkType": "涓氬姟绫诲瀷",
+ "platWorkCode": "宸ュ崟鍙�",
+ "platItemId": "琛屽彿",
+ "anfme": "鏁伴噺"
+ },
+ "flowStepDialog": {
+ "title": "娴佺▼姝ラ",
+ "currentTask": "褰撳墠浠诲姟",
+ "flowInstanceNo": "娴佺▼瀹炰緥鍙�",
+ "stepCode": "姝ラ缂栫爜",
+ "stepName": "姝ラ鍚嶇О",
+ "stepType": "姝ラ绫诲瀷",
+ "executeResult": "鎵ц缁撴灉",
+ "startTime": "寮�濮嬫椂闂�",
+ "endTime": "缁撴潫鏃堕棿",
+ "timeout": "娴佺▼姝ラ鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟"
+ },
+ "messages": {
+ "completeConfirm": "纭畾瀹屾垚浠诲姟 {code} 鍚楋紵",
+ "completeSuccess": "浠诲姟瀹屾垚鎴愬姛",
+ "removeConfirm": "纭畾鍙栨秷浠诲姟 {code} 鍚楋紵",
+ "removeSuccess": "浠诲姟鍙栨秷鎴愬姛",
+ "checkConfirm": "纭畾鎵ц鐩樼偣鍑哄簱浠诲姟 {code} 鍚楋紵",
+ "checkSuccess": "鐩樼偣鍑哄簱鎴愬姛",
+ "pickConfirm": "纭畾鎵ц鎷f枡鍑哄簱浠诲姟 {code} 鍚楋紵",
+ "pickSuccess": "鎷f枡鍑哄簱鎴愬姛",
+ "topSuccess": "浠诲姟缃《鎴愬姛",
+ "actionFailed": "浠诲姟鎿嶄綔澶辫触",
+ "autoRunEnabled": "宸插紑鍚嚜鍔ㄤ笅鍙戜换鍔�",
+ "autoRunPaused": "宸叉殏鍋滆嚜鍔ㄤ笅鍙戜换鍔�",
+ "autoRunFailed": "鑷姩涓嬪彂閰嶇疆鏇存柊澶辫触",
+ "detailLoadFailed": "浠诲姟鏄庣粏鍔犺浇澶辫触",
+ "listTimeout": "浠诲姟鍒楄〃鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟",
+ "autoRunTimeout": "鑷姩涓嬪彂閰嶇疆鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟",
+ "autoRunOnSuccess": "宸插紑鍚嚜鍔ㄤ笅鍙戜换鍔�",
+ "autoRunOffSuccess": "宸叉殏鍋滆嚜鍔ㄤ笅鍙戜换鍔�",
+ "autoRunUpdateFailed": "鑷姩涓嬪彂閰嶇疆鏇存柊澶辫触",
+ "itemsTimeout": "浠诲姟鏄庣粏鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟"
+ }
+ },
+ "basicInfo": {
+ "basStationArea": {
+ "reportTitle": "绔欑偣鍖哄煙鎶ヨ〃",
+ "entity": "绔欑偣鍖哄煙",
+ "buttons": {
+ "add": "鏂板绔欑偣鍖哄煙",
+ "batchDelete": "鎵归噺鍒犻櫎"
+ },
+ "actions": {
+ "add": "鏂板绔欑偣鍖哄煙"
+ },
+ "placeholder": {
+ "condition": "璇疯緭鍏ョ珯鐐瑰尯鍩熷悕绉�/缂栧彿/澶囨敞",
+ "timeStart": "璇烽�夋嫨寮�濮嬫椂闂�",
+ "timeEnd": "璇烽�夋嫨缁撴潫鏃堕棿",
+ "stationAreaName": "璇疯緭鍏ョ珯鐐瑰尯鍩熷悕绉�",
+ "stationAreaId": "璇疯緭鍏ョ珯鐐瑰尯鍩熺紪鍙�",
+ "crossZoneArea": "璇疯緭鍏ヨ法鍖哄尯鍩�",
+ "wcsData": "璇疯緭鍏CS鏁版嵁",
+ "containerType": "璇疯緭鍏ュ鍣ㄧ被鍨�",
+ "barcode": "璇疯緭鍏ユ潯鐮�",
+ "stationAlias": "璇疯緭鍏ョ珯鐐瑰埆鍚�",
+ "memo": "璇疯緭鍏ュ娉�"
+ },
+ "search": {
+ "condition": "鍏抽敭瀛�",
+ "conditionPlaceholder": "璇疯緭鍏ョ珯鐐瑰尯鍩熷悕绉�/缂栧彿/澶囨敞",
+ "timeStart": "寮�濮嬫椂闂�",
+ "timeStartPlaceholder": "璇烽�夋嫨寮�濮嬫椂闂�",
+ "timeEnd": "缁撴潫鏃堕棿",
+ "timeEndPlaceholder": "璇烽�夋嫨缁撴潫鏃堕棿",
+ "stationAreaName": "绔欑偣鍖哄煙鍚嶇О",
+ "stationAreaNamePlaceholder": "璇疯緭鍏ョ珯鐐瑰尯鍩熷悕绉�",
+ "stationAreaId": "绔欑偣鍖哄煙缂栧彿",
+ "stationAreaIdPlaceholder": "璇疯緭鍏ョ珯鐐瑰尯鍩熺紪鍙�",
+ "type": "绔欑偣绫诲瀷",
+ "area": "鎵�灞炲簱鍖�",
+ "useStatus": "浣跨敤鐘舵��",
+ "inAble": "鍙叆",
+ "outAble": "鍙嚭",
+ "isCrossZone": "鏄惁璺ㄥ尯",
+ "crossZoneArea": "璺ㄥ尯鍖哄煙",
+ "crossZoneAreaPlaceholder": "璇疯緭鍏ヨ法鍖哄尯鍩�",
+ "isWcs": "鏄惁WCS",
+ "wcsData": "WCS鏁版嵁",
+ "wcsDataPlaceholder": "璇疯緭鍏CS鏁版嵁",
+ "containerType": "瀹瑰櫒绫诲瀷",
+ "containerTypePlaceholder": "璇疯緭鍏ュ鍣ㄧ被鍨�",
+ "autoTransfer": "鑷姩璋冩嫧",
+ "barcode": "鏉$爜",
+ "barcodePlaceholder": "璇疯緭鍏ユ潯鐮�",
+ "stationAlias": "绔欑偣鍒悕",
+ "stationAliasPlaceholder": "璇疯緭鍏ョ珯鐐瑰埆鍚�",
+ "status": "鐘舵��",
+ "memo": "澶囨敞",
+ "memoPlaceholder": "璇疯緭鍏ュ娉�"
+ },
+ "type": {
+ "smart": "鏅鸿兘绔欑偣",
+ "normal": "鏅�氱珯鐐�"
+ },
+ "table": {
+ "crossZoneArea": "璺ㄥ尯鍖哄煙",
+ "inAble": "鍙叆",
+ "outAble": "鍙嚭",
+ "isCrossZone": "鏄惁璺ㄥ尯"
+ },
+ "detail": {
+ "title": "绔欑偣鍖哄煙璇︽儏",
+ "baseInfo": "鍩虹淇℃伅",
+ "auditInfo": "瀹¤淇℃伅",
+ "stationAreaName": "绔欑偣鍖哄煙鍚嶇О",
+ "stationAreaId": "绔欑偣鍖哄煙缂栧彿",
+ "type": "绔欑偣绫诲瀷",
+ "area": "鎵�灞炲簱鍖�",
+ "crossZoneArea": "鍙法鍖哄簱鍖�",
+ "containerType": "瀹瑰櫒绫诲瀷",
+ "stationAlias": "绔欑偣鍒悕",
+ "inAble": "鍙叆",
+ "outAble": "鍙嚭",
+ "isCrossZone": "鏄惁璺ㄥ尯",
+ "isWcs": "鏄惁WCS",
+ "autoTransfer": "鑷姩璋冩嫧",
+ "useStatus": "浣跨敤鐘舵��",
+ "barcode": "鏉$爜",
+ "status": "鐘舵��",
+ "wcsData": "WCS鏁版嵁",
+ "memo": "澶囨敞",
+ "createBy": "鍒涘缓浜�",
+ "createTime": "鍒涘缓鏃堕棿",
+ "updateBy": "鏇存柊浜�",
+ "updateTime": "鏇存柊鏃堕棿"
+ },
+ "dialog": {
+ "titleAdd": "鏂板绔欑偣鍖哄煙",
+ "titleEdit": "缂栬緫绔欑偣鍖哄煙",
+ "stationAreaName": "绔欑偣鍖哄煙鍚嶇О",
+ "stationAreaId": "绔欑偣鍖哄煙缂栧彿",
+ "type": "绔欑偣绫诲瀷",
+ "area": "鎵�灞炲簱鍖�",
+ "crossZoneArea": "鍙法鍖哄簱鍖�",
+ "containerType": "瀹瑰櫒绫诲瀷",
+ "stationAlias": "绔欑偣鍒悕",
+ "inAble": "鍙叆",
+ "outAble": "鍙嚭",
+ "isCrossZone": "鏄惁璺ㄥ尯",
+ "isWcs": "鏄惁WCS",
+ "autoTransfer": "鑷姩璋冩嫧",
+ "useStatus": "浣跨敤鐘舵��",
+ "wcsData": "WCS鏁版嵁",
+ "barcode": "鏉$爜",
+ "status": "鐘舵��",
+ "memo": "澶囨敞",
+ "validation": {
+ "stationAreaName": "璇疯緭鍏ョ珯鐐瑰尯鍩熷悕绉�",
+ "stationAreaId": "璇疯緭鍏ョ珯鐐瑰尯鍩熺紪鍙�",
+ "type": "璇烽�夋嫨绔欑偣绫诲瀷",
+ "area": "璇烽�夋嫨鎵�灞炲簱鍖�",
+ "containerType": "璇烽�夋嫨瀹瑰櫒绫诲瀷",
+ "stationAlias": "璇烽�夋嫨绔欑偣鍒悕"
+ }
+ },
+ "messages": {
+ "detailLoadFailed": "鑾峰彇绔欑偣鍖哄煙璇︽儏澶辫触",
+ "detailTimeout": "绔欑偣鍖哄煙璇︽儏鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟",
+ "stationAliasTimeout": "绔欑偣鍒悕閫夐」鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟",
+ "areaOptionsTimeout": "搴撳尯閫夐」鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟",
+ "containerTypeTimeout": "瀹瑰櫒绫诲瀷閫夐」鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟",
+ "useStatusTimeout": "浣跨敤鐘舵�侀�夐」鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟"
+ }
+ }
+ },
+ "system": {
+ "role": {
+ "entity": "瑙掕壊",
+ "reportTitle": "瑙掕壊绠$悊鎶ヨ〃",
+ "buttons": {
+ "add": "鏂板瑙掕壊"
+ },
+ "search": {
+ "name": "瑙掕壊鍚嶇О",
+ "namePlaceholder": "璇疯緭鍏ヨ鑹插悕绉�",
+ "code": "瑙掕壊缂栫爜",
+ "codePlaceholder": "璇疯緭鍏ヨ鑹茬紪鐮�",
+ "memo": "澶囨敞",
+ "memoPlaceholder": "璇疯緭鍏ュ娉�",
+ "condition": "鍏抽敭瀛�",
+ "conditionPlaceholder": "杈撳叆鍏抽敭瀛楁悳绱�",
+ "status": "鐘舵��",
+ "statusPlaceholder": "璇烽�夋嫨鐘舵��"
+ },
+ "table": {
+ "name": "瑙掕壊鍚嶇О",
+ "code": "瑙掕壊缂栫爜",
+ "memo": "澶囨敞",
+ "status": "鐘舵��",
+ "updateTime": "鏇存柊鏃堕棿",
+ "createTime": "鍒涘缓鏃堕棿",
+ "operation": "鎿嶄綔"
+ },
+ "actions": {
+ "scopeMenu": "缃戦〉鏉冮檺",
+ "scopePda": "PDA鏉冮檺",
+ "scopeMatnr": "鐗╂枡鏉冮檺",
+ "scopeWarehouse": "浠撳簱鏉冮檺",
+ "edit": "缂栬緫瑙掕壊",
+ "delete": "鍒犻櫎瑙掕壊"
+ },
+ "scopes": {
+ "menu": "缃戦〉鏉冮檺",
+ "pda": "PDA鏉冮檺",
+ "matnr": "鐗╂枡鏉冮檺",
+ "warehouse": "浠撳簱鏉冮檺"
+ },
+ "dialog": {
+ "addTitle": "鏂板瑙掕壊",
+ "editTitle": "缂栬緫瑙掕壊",
+ "validationName": "璇疯緭鍏ヨ鑹插悕绉�",
+ "name": "瑙掕壊鍚嶇О",
+ "namePlaceholder": "璇疯緭鍏ヨ鑹插悕绉�",
+ "code": "瑙掕壊缂栫爜",
+ "codePlaceholder": "璇疯緭鍏ヨ鑹茬紪鐮�",
+ "status": "鐘舵��",
+ "statusPlaceholder": "璇烽�夋嫨鐘舵��",
+ "memo": "澶囨敞",
+ "memoPlaceholder": "璇疯緭鍏ュ娉�"
+ },
+ "permission": {
+ "title": "瑙掕壊鏉冮檺",
+ "currentRole": "褰撳墠瑙掕壊锛�",
+ "unselected": "鏈�夋嫨瑙掕壊",
+ "selectAll": "鍏ㄩ��",
+ "clear": "娓呯┖",
+ "saveCurrent": "淇濆瓨褰撳墠鏉冮檺",
+ "searchPlaceholder": "鎼滅储鏉冮檺鏍�",
+ "authButton": "鎸夐挳",
+ "scopeLoadTimeout": "{title}鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟",
+ "scopeLoadFailed": "鍔犺浇{title}澶辫触",
+ "saveSuccess": "鏉冮檺淇濆瓨鎴愬姛",
+ "saveFailed": "鏉冮檺淇濆瓨澶辫触"
+ }
+ },
+ "menu": {
+ "title": "鑿滃崟绠$悊",
+ "entities": {
+ "permission": "鏉冮檺"
+ },
+ "buttons": {
+ "add": "娣诲姞鑿滃崟"
+ },
+ "actions": {
+ "addAuth": "鏂板鏉冮檺",
+ "expand": "灞曞紑",
+ "collapse": "鏀惰捣"
+ },
+ "types": {
+ "button": "鎸夐挳",
+ "directory": "鐩綍",
+ "menu": "鑿滃崟"
+ },
+ "search": {
+ "name": "鑿滃崟鍚嶇О",
+ "route": "璺敱鍦板潃"
+ },
+ "messages": {
+ "menuSelfParent": "涓婄骇鑿滃崟涓嶈兘閫夋嫨褰撳墠鑿滃崟",
+ "loadFailed": "鑾峰彇鑿滃崟澶辫触",
+ "loadTimeout": "鑿滃崟鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟",
+ "submitFailed": "鎻愪氦澶辫触",
+ "authCount": "{count} 涓潈闄愭爣璇�",
+ "deleteMenuConfirm": "纭畾瑕佸垹闄よ彍鍗曘�寋title}銆嶅悧锛熷垹闄ゅ悗鏃犳硶鎭㈠",
+ "deleteAuthConfirm": "纭畾瑕佸垹闄ゆ潈闄愩�寋title}銆嶅悧锛熷垹闄ゅ悗鏃犳硶鎭㈠"
+ },
+ "form": {
+ "typeMenu": "鑿滃崟",
+ "typeButton": "鎸夐挳",
+ "titleAddMenu": "鏂板缓鑿滃崟",
+ "titleEditMenu": "缂栬緫鑿滃崟",
+ "titleAddButton": "鏂板缓鎸夐挳",
+ "titleEditButton": "缂栬緫鎸夐挳",
+ "menuType": "鑿滃崟绫诲瀷",
+ "parentId": "涓婄骇鑿滃崟",
+ "nameMenu": "鑿滃崟鍚嶇О",
+ "nameButton": "鏉冮檺鍚嶇О",
+ "route": "璺敱鍦板潃",
+ "component": "缁勪欢鏍囪瘑",
+ "authority": "鏉冮檺鏍囪瘑",
+ "icon": "鍥炬爣",
+ "sort": "鎺掑簭",
+ "status": "鐘舵��",
+ "memo": "澶囨敞",
+ "placeholderParent": "璇烽�夋嫨涓婄骇鑿滃崟",
+ "placeholderMenuName": "璇疯緭鍏ヨ彍鍗曞悕绉�",
+ "placeholderButtonName": "璇疯緭鍏ユ潈闄愬悕绉�",
+ "placeholderRoute": "璇疯緭鍏ヨ矾鐢卞湴鍧�",
+ "placeholderComponent": "璇疯緭鍏ョ粍浠舵爣璇�",
+ "placeholderAuthority": "璇疯緭鍏ユ潈闄愭爣璇�",
+ "placeholderIcon": "璇疯緭鍏ュ浘鏍囧悕绉�",
+ "placeholderStatus": "璇烽�夋嫨鐘舵��",
+ "placeholderMemo": "璇疯緭鍏ュ娉�",
+ "validationMenuName": "璇疯緭鍏ヨ彍鍗曞悕绉�",
+ "validationButtonName": "璇疯緭鍏ユ潈闄愬悕绉�",
+ "validationRoute": "璇疯緭鍏ヨ矾鐢卞湴鍧�",
+ "validationAuthority": "璇疯緭鍏ユ潈闄愭爣璇�"
+ }
+ }
+ }
}
}
diff --git a/rsf-design/src/router/adapters/backendMenuAdapter.js b/rsf-design/src/router/adapters/backendMenuAdapter.js
index fae5b8a..5778434 100644
--- a/rsf-design/src/router/adapters/backendMenuAdapter.js
+++ b/rsf-design/src/router/adapters/backendMenuAdapter.js
@@ -231,7 +231,7 @@
function buildMeta(node) {
const meta = {
- title: normalizeTitle(node.name || node.meta?.title || '')
+ title: normalizeTitle(node.name || node.meta?.title || '', node.component)
}
const metaSource = node.meta && typeof node.meta === 'object' ? node.meta : node
const supportedKeys = [
@@ -255,11 +255,11 @@
return meta
}
-function normalizeTitle(title) {
+function normalizeTitle(title, componentKey) {
if (typeof title !== 'string') {
- return ''
+ return resolveBackendMenuTitle('', componentKey)
}
- return resolveBackendMenuTitle(title)
+ return resolveBackendMenuTitle(title, componentKey)
}
function normalizeIcon(icon) {
diff --git a/rsf-design/src/router/modules/system.js b/rsf-design/src/router/modules/system.js
index 982b466..4633c14 100644
--- a/rsf-design/src/router/modules/system.js
+++ b/rsf-design/src/router/modules/system.js
@@ -52,9 +52,9 @@
keepAlive: true,
roles: ['R_SUPER'],
authList: [
- { title: '鏂板', authMark: 'add' },
- { title: '缂栬緫', authMark: 'edit' },
- { title: '鍒犻櫎', authMark: 'delete' }
+ { title: 'common.actions.add', authMark: 'add' },
+ { title: 'common.actions.edit', authMark: 'edit' },
+ { title: 'common.actions.delete', authMark: 'delete' }
]
}
}
diff --git a/rsf-design/src/utils/backend-menu-title.js b/rsf-design/src/utils/backend-menu-title.js
index 8db1f59..0f363bc 100644
--- a/rsf-design/src/utils/backend-menu-title.js
+++ b/rsf-design/src/utils/backend-menu-title.js
@@ -125,31 +125,89 @@
'menu.whMat': '搴撳尯鐗╂枡鍏崇郴'
}
-export function resolveBackendMenuTitle(title) {
- if (typeof title !== 'string') {
+const DASHBOARD_MENU_KEYS = new Set(['menus.dashboard.title', 'menus.dashboard.console'])
+const BACKEND_MENU_TITLE_KEY_MAP = Object.entries(LEGACY_BACKEND_MENU_TITLES).reduce(
+ (accumulator, [key, value]) => {
+ accumulator[key] = key
+ accumulator[value] = key
+ return accumulator
+ },
+ {
+ '浠〃鐩�': 'menus.dashboard.title',
+ '宸ヤ綔鍙�': 'menus.dashboard.console',
+ 'menus.dashboard.title': 'menus.dashboard.title',
+ 'menus.dashboard.console': 'menus.dashboard.console'
+ }
+)
+
+function normalizeComponentMenuKey(componentKey) {
+ if (typeof componentKey !== 'string') {
return ''
}
- const trimmedTitle = title.trim()
- if (!trimmedTitle) {
+ const normalizedComponentKey = componentKey.trim()
+ if (!normalizedComponentKey) {
return ''
}
- if (LEGACY_BACKEND_MENU_TITLES[trimmedTitle]) {
- return LEGACY_BACKEND_MENU_TITLES[trimmedTitle]
+ if (normalizedComponentKey === 'console') {
+ return 'menus.dashboard.console'
}
- if (trimmedTitle.startsWith('menus.')) {
- const legacyMenuKey = `menu.${trimmedTitle.slice('menus.'.length)}`
- if (LEGACY_BACKEND_MENU_TITLES[legacyMenuKey]) {
- return LEGACY_BACKEND_MENU_TITLES[legacyMenuKey]
- }
- return trimmedTitle.split('.').pop() || trimmedTitle
- }
-
- if (trimmedTitle.startsWith('menu.')) {
- return trimmedTitle.split('.').pop() || trimmedTitle
- }
-
- return trimmedTitle
+ return `menu.${normalizedComponentKey}`
}
+
+function normalizeMenuKey(menuKey) {
+ if (!menuKey) {
+ return ''
+ }
+
+ if (DASHBOARD_MENU_KEYS.has(menuKey)) {
+ return menuKey
+ }
+
+ if (menuKey.startsWith('menus.')) {
+ const leaf = menuKey.slice('menus.'.length)
+ const aliasKey = `menu.${leaf}`
+ if (Object.prototype.hasOwnProperty.call(LEGACY_BACKEND_MENU_TITLES, aliasKey)) {
+ return aliasKey
+ }
+ }
+
+ return menuKey
+}
+
+function containsHan(value) {
+ return /[\u3400-\u9fff]/.test(value)
+}
+
+export function resolveBackendMenuTitle(title, componentKey = '') {
+ const trimmedTitle = typeof title === 'string' ? title.trim() : ''
+
+ if (trimmedTitle) {
+ if (trimmedTitle.startsWith('menu.') || trimmedTitle.startsWith('menus.')) {
+ const normalizedExistingKey = normalizeMenuKey(trimmedTitle)
+ if (normalizedExistingKey) {
+ return normalizedExistingKey
+ }
+ }
+
+ const mappedKey = BACKEND_MENU_TITLE_KEY_MAP[trimmedTitle]
+ if (mappedKey) {
+ return normalizeMenuKey(mappedKey)
+ }
+ }
+
+ const componentMenuKey = normalizeMenuKey(normalizeComponentMenuKey(componentKey))
+ if (componentMenuKey) {
+ return componentMenuKey
+ }
+
+ if (trimmedTitle && !containsHan(trimmedTitle)) {
+ return trimmedTitle
+ }
+
+ return ''
+}
+
+export { LEGACY_BACKEND_MENU_TITLES }
diff --git a/rsf-design/src/utils/router.js b/rsf-design/src/utils/router.js
index 7c5d64f..a12a47d 100644
--- a/rsf-design/src/utils/router.js
+++ b/rsf-design/src/utils/router.js
@@ -20,19 +20,16 @@
}
const formatMenuTitle = (title) => {
if (title) {
+ if (i18n.global.te(title)) {
+ return $t(title)
+ }
if (title.startsWith('menus.') || title.startsWith('menu.')) {
- if (i18n.global.te(title)) {
- return $t(title)
- } else {
- const fallbackTitle =
- title.startsWith('menus.') && title.split('.').pop()
- ? `menu.${title.split('.').pop()}`
- : ''
- if (fallbackTitle && i18n.global.te(fallbackTitle)) {
- return $t(fallbackTitle)
- }
- return title.split('.').pop() || title
+ const leaf = title.startsWith('menus.') ? title.slice('menus.'.length) : ''
+ const aliasTitle = leaf ? `menu.${leaf}` : ''
+ if (aliasTitle && i18n.global.te(aliasTitle)) {
+ return $t(aliasTitle)
}
+ return ''
}
return title
}
diff --git a/rsf-design/src/utils/sys/requestGuard.js b/rsf-design/src/utils/sys/requestGuard.js
index c98bc04..2a9ec2f 100644
--- a/rsf-design/src/utils/sys/requestGuard.js
+++ b/rsf-design/src/utils/sys/requestGuard.js
@@ -1,7 +1,8 @@
import { ElMessage } from 'element-plus'
+import { $t } from '@/locales'
const DEFAULT_REQUEST_GUARD_TIMEOUT = 8e3
-const DEFAULT_REQUEST_TIMEOUT_MESSAGE = '璇锋眰瓒呮椂锛屽凡鍋滄绛夊緟'
+const DEFAULT_REQUEST_TIMEOUT_MESSAGE = () => $t('message.requestTimeoutStopped')
function withRequestGuard(task, fallbackValue, options = {}) {
const { timeoutMs = DEFAULT_REQUEST_GUARD_TIMEOUT, onFallback } = options
@@ -31,7 +32,7 @@
function guardRequestWithMessage(task, fallbackValue, options = {}) {
const {
timeoutMs = DEFAULT_REQUEST_GUARD_TIMEOUT,
- timeoutMessage = DEFAULT_REQUEST_TIMEOUT_MESSAGE,
+ timeoutMessage = DEFAULT_REQUEST_TIMEOUT_MESSAGE(),
errorMessage,
resolveErrorMessage
} = options
diff --git a/rsf-design/src/views/basic-info/bas-station-area/basStationAreaPage.helpers.js b/rsf-design/src/views/basic-info/bas-station-area/basStationAreaPage.helpers.js
index c6c0c9b..d6b337f 100644
--- a/rsf-design/src/views/basic-info/bas-station-area/basStationAreaPage.helpers.js
+++ b/rsf-design/src/views/basic-info/bas-station-area/basStationAreaPage.helpers.js
@@ -1,24 +1,26 @@
+import { $t } from '@/locales'
+
const STATUS_META = {
- 1: { text: '姝e父', type: 'success', bool: true },
- 0: { text: '鍐荤粨', type: 'danger', bool: false }
+ 1: { text: $t('common.status.normal'), type: 'success', bool: true },
+ 0: { text: $t('common.status.frozen'), type: 'danger', bool: false }
}
const TYPE_OPTIONS = [
- { label: '鏅鸿兘绔欑偣', value: 0 },
- { label: '鏅�氱珯鐐�', value: 1 }
+ { label: $t('pages.basicInfo.basStationArea.type.smart'), value: 0 },
+ { label: $t('pages.basicInfo.basStationArea.type.normal'), value: 1 }
]
const BINARY_OPTIONS = [
- { label: '鍚�', value: 0 },
- { label: '鏄�', value: 1 }
+ { label: $t('common.status.no'), value: 0 },
+ { label: $t('common.status.yes'), value: 1 }
]
const STATUS_OPTIONS = [
- { label: '姝e父', value: 1 },
- { label: '鍐荤粨', value: 0 }
+ { label: $t('common.status.normal'), value: 1 },
+ { label: $t('common.status.frozen'), value: 0 }
]
-export const BAS_STATION_AREA_REPORT_TITLE = '绔欑偣鍖哄煙鎶ヨ〃'
+export const BAS_STATION_AREA_REPORT_TITLE = $t('pages.basicInfo.basStationArea.reportTitle')
export const BAS_STATION_AREA_REPORT_STYLE = {
titleAlign: 'center',
titleLevel: 'strong',
@@ -40,13 +42,13 @@
}
function normalizeBooleanText(value) {
- if (value === 1 || value === '1' || value === true || value === '鏄�') {
- return '鏄�'
+ if (value === 1 || value === '1' || value === true || value === $t('common.status.yes')) {
+ return $t('common.status.yes')
}
- if (value === 0 || value === '0' || value === false || value === '鍚�') {
- return '鍚�'
+ if (value === 0 || value === '0' || value === false || value === $t('common.status.no')) {
+ return $t('common.status.no')
}
- return normalizeText(value) || '--'
+ return normalizeText(value) || $t('common.placeholder.empty')
}
function normalizeIdArray(values = []) {
@@ -91,7 +93,7 @@
})
.filter(Boolean)
- return labels.length ? labels.join('銆�') : '--'
+ return labels.length ? labels.join($t('common.listSeparator')) : $t('common.placeholder.empty')
}
function getStatusMeta(status) {
@@ -101,7 +103,7 @@
if (status === false || Number(status) === 0) {
return STATUS_META[0]
}
- return { text: '鏈煡', type: 'info', bool: false }
+ return { text: $t('common.status.unknown'), type: 'info', bool: false }
}
export function createBasStationAreaSearchState() {
@@ -187,7 +189,7 @@
}
return {
value: Number(value),
- label: normalizeText(item.name || item.areaName || item.code || item.areaCode || `搴撳尯 ${value}`)
+ label: normalizeText(item.name || item.areaName || item.code || item.areaCode || `${$t('menu.warehouseAreas')} ${value}`)
}
})
.filter(Boolean)
@@ -209,7 +211,7 @@
}
return {
value: Number(value),
- label: normalizeText(item.stationName || item.stationId || item.name || `绔欑偣 ${value}`)
+ label: normalizeText(item.stationName || item.stationId || item.name || `${$t('menu.basStation')} ${value}`)
}
})
.filter(Boolean)
@@ -426,32 +428,36 @@
return {
...record,
id: normalizeIdValue(record.id),
- stationAreaName: normalizeText(record.stationAreaName) || '--',
- stationAreaId: normalizeText(record.stationAreaId) || '--',
+ stationAreaName: normalizeText(record.stationAreaName) || $t('common.placeholder.empty'),
+ stationAreaId: normalizeText(record.stationAreaId) || $t('common.placeholder.empty'),
type: normalizeIdValue(record.type),
typeText: normalizeText(
record.type$ || record.typeText || resolvers.resolveTypeLabel?.(typeValue) || typeValue
- ) || '--',
+ ) || $t('common.placeholder.empty'),
inAble: normalizeIdValue(record.inAble),
inAbleText: normalizeBooleanText(record.inAble),
outAble: normalizeIdValue(record.outAble),
outAbleText: normalizeBooleanText(record.outAble),
useStatus: normalizeText(record.useStatus),
- useStatusText: normalizeText(record.useStatus$ || record.useStatusText || resolvers.resolveUseStatusLabel?.(record.useStatus) || record.useStatus) || '--',
+ useStatusText:
+ normalizeText(record.useStatus$ || record.useStatusText || resolvers.resolveUseStatusLabel?.(record.useStatus) || record.useStatus) ||
+ $t('common.placeholder.empty'),
area: normalizeIdValue(areaId),
- areaText: normalizeText(record.area$ || record.areaText || resolvers.resolveAreaLabel?.(areaId) || '') || '--',
+ areaText: normalizeText(record.area$ || record.areaText || resolvers.resolveAreaLabel?.(areaId) || '') || $t('common.placeholder.empty'),
isCrossZone: normalizeIdValue(record.isCrossZone),
isCrossZoneText: normalizeBooleanText(record.isCrossZone),
crossZoneArea: crossZoneAreaIds,
crossZoneAreaText:
- resolveOptionText(crossZoneAreaIds, resolvers.resolveCrossZoneAreaLabel, record.crossZoneAreaText || []) || '--',
+ resolveOptionText(crossZoneAreaIds, resolvers.resolveCrossZoneAreaLabel, record.crossZoneAreaText || []) ||
+ $t('common.placeholder.empty'),
isWcs: normalizeIdValue(record.isWcs),
isWcsText: normalizeBooleanText(record.isWcs),
- wcsData: normalizeText(record.wcsData) || '--',
+ wcsData: normalizeText(record.wcsData) || $t('common.placeholder.empty'),
containerType: containerTypeIds,
containerTypeText:
- resolveOptionText(containerTypeIds, resolvers.resolveContainerTypeLabel, record.containerTypesText || []) || '--',
- barcode: normalizeText(record.barcode) || '--',
+ resolveOptionText(containerTypeIds, resolvers.resolveContainerTypeLabel, record.containerTypesText || []) ||
+ $t('common.placeholder.empty'),
+ barcode: normalizeText(record.barcode) || $t('common.placeholder.empty'),
autoTransfer: normalizeIdValue(record.autoTransfer),
autoTransferText: normalizeBooleanText(record.autoTransfer),
stationAlias: stationAliasIds,
@@ -460,16 +466,16 @@
stationAliasIds,
resolvers.resolveStationAliasLabel,
stationAliasNames.length ? stationAliasNames : record.stationAliasText || []
- ) || '--',
+ ) || $t('common.placeholder.empty'),
status: normalizeIdValue(record.status),
statusText: statusMeta.text,
statusType: statusMeta.type,
statusBool: record.statusBool !== void 0 ? Boolean(record.statusBool) : statusMeta.bool,
- memo: normalizeText(record.memo) || '--',
- createByText: normalizeText(record.createBy$ || record.createByText || ''),
- createTimeText: normalizeText(record.createTime$ || record.createTime || ''),
- updateByText: normalizeText(record.updateBy$ || record.updateByText || ''),
- updateTimeText: normalizeText(record.updateTime$ || record.updateTime || '')
+ memo: normalizeText(record.memo) || $t('common.placeholder.empty'),
+ createByText: normalizeText(record.createBy$ || record.createByText || '') || $t('common.placeholder.empty'),
+ createTimeText: normalizeText(record.createTime$ || record.createTime || '') || $t('common.placeholder.empty'),
+ updateByText: normalizeText(record.updateBy$ || record.updateByText || '') || $t('common.placeholder.empty'),
+ updateTimeText: normalizeText(record.updateTime$ || record.updateTime || '') || $t('common.placeholder.empty')
}
}
diff --git a/rsf-design/src/views/basic-info/bas-station-area/basStationAreaTable.columns.js b/rsf-design/src/views/basic-info/bas-station-area/basStationAreaTable.columns.js
index ce1c6aa..761091b 100644
--- a/rsf-design/src/views/basic-info/bas-station-area/basStationAreaTable.columns.js
+++ b/rsf-design/src/views/basic-info/bas-station-area/basStationAreaTable.columns.js
@@ -1,5 +1,6 @@
import { h } from 'vue'
import { ElTag } from 'element-plus'
+import { $t } from '@/locales'
import ArtButtonMore from '@/components/core/forms/art-button-more/index.vue'
import { getBasStationAreaStatusOptions } from './basStationAreaPage.helpers'
@@ -10,14 +11,14 @@
canEdit = true,
canDelete = true
} = {}) {
- const operations = [{ key: 'view', label: '璇︽儏', icon: 'ri:eye-line' }]
+ const operations = [{ key: 'view', label: $t('common.actions.detail'), icon: 'ri:eye-line' }]
if (canEdit && handleEdit) {
- operations.push({ key: 'edit', label: '缂栬緫', icon: 'ri:pencil-line' })
+ operations.push({ key: 'edit', label: $t('common.actions.edit'), icon: 'ri:pencil-line' })
}
if (canDelete && handleDelete) {
- operations.push({ key: 'delete', label: '鍒犻櫎', icon: 'ri:delete-bin-5-line', color: 'var(--art-error)' })
+ operations.push({ key: 'delete', label: $t('common.actions.delete'), icon: 'ri:delete-bin-5-line', color: 'var(--art-error)' })
}
return [
@@ -28,111 +29,111 @@
},
{
type: 'globalIndex',
- label: '搴忓彿',
+ label: $t('table.index'),
width: 72,
align: 'center'
},
{
prop: 'stationAreaId',
- label: '绔欑偣鍖哄煙缂栧彿',
+ label: $t('pages.basicInfo.basStationArea.search.stationAreaId'),
minWidth: 150,
showOverflowTooltip: true,
formatter: (row) => row.stationAreaId || '--'
},
{
prop: 'stationAreaName',
- label: '绔欑偣鍖哄煙鍚嶇О',
+ label: $t('pages.basicInfo.basStationArea.search.stationAreaName'),
minWidth: 180,
showOverflowTooltip: true,
formatter: (row) => row.stationAreaName || '--'
},
{
prop: 'typeText',
- label: '绔欑偣绫诲瀷',
+ label: $t('pages.basicInfo.basStationArea.search.type'),
width: 120,
align: 'center',
formatter: (row) => row.typeText || '--'
},
{
prop: 'areaText',
- label: '鎵�灞炲簱鍖�',
+ label: $t('pages.basicInfo.basStationArea.search.area'),
minWidth: 150,
showOverflowTooltip: true,
formatter: (row) => row.areaText || '--'
},
{
prop: 'crossZoneAreaText',
- label: '鍙法鍖哄尯鍩�',
+ label: $t('pages.basicInfo.basStationArea.table.crossZoneArea'),
minWidth: 180,
showOverflowTooltip: true,
formatter: (row) => row.crossZoneAreaText || '--'
},
{
prop: 'containerTypeText',
- label: '瀹瑰櫒绫诲瀷',
+ label: $t('pages.basicInfo.basStationArea.search.containerType'),
minWidth: 160,
showOverflowTooltip: true,
formatter: (row) => row.containerTypeText || '--'
},
{
prop: 'stationAliasText',
- label: '绔欑偣鍒悕',
+ label: $t('pages.basicInfo.basStationArea.search.stationAlias'),
minWidth: 180,
showOverflowTooltip: true,
formatter: (row) => row.stationAliasText || '--'
},
{
prop: 'inAbleText',
- label: '鍙叆',
+ label: $t('pages.basicInfo.basStationArea.table.inAble'),
width: 84,
align: 'center',
formatter: (row) => row.inAbleText || '--'
},
{
prop: 'outAbleText',
- label: '鍙嚭',
+ label: $t('pages.basicInfo.basStationArea.table.outAble'),
width: 84,
align: 'center',
formatter: (row) => row.outAbleText || '--'
},
{
prop: 'isCrossZoneText',
- label: '璺ㄥ尯',
+ label: $t('pages.basicInfo.basStationArea.table.isCrossZone'),
width: 84,
align: 'center',
formatter: (row) => row.isCrossZoneText || '--'
},
{
prop: 'isWcsText',
- label: 'WCS',
+ label: $t('table.wcs'),
width: 84,
align: 'center',
formatter: (row) => row.isWcsText || '--'
},
{
prop: 'autoTransferText',
- label: '鑷姩璋冩嫧',
+ label: $t('pages.basicInfo.basStationArea.search.autoTransfer'),
width: 100,
align: 'center',
formatter: (row) => row.autoTransferText || '--'
},
{
prop: 'useStatusText',
- label: '浣跨敤鐘舵��',
+ label: $t('pages.basicInfo.basStationArea.search.useStatus'),
minWidth: 120,
showOverflowTooltip: true,
formatter: (row) => row.useStatusText || '--'
},
{
prop: 'barcode',
- label: '鏉$爜',
+ label: $t('pages.basicInfo.basStationArea.search.barcode'),
minWidth: 150,
showOverflowTooltip: true,
formatter: (row) => row.barcode || '--'
},
{
prop: 'status',
- label: '鐘舵��',
+ label: $t('pages.basicInfo.basStationArea.search.status'),
width: 96,
align: 'center',
formatter: (row) => {
@@ -144,21 +145,21 @@
},
{
prop: 'updateTimeText',
- label: '鏇存柊鏃堕棿',
+ label: $t('table.updateTime'),
minWidth: 170,
showOverflowTooltip: true,
formatter: (row) => row.updateTimeText || '--'
},
{
prop: 'memo',
- label: '澶囨敞',
+ label: $t('pages.basicInfo.basStationArea.search.memo'),
minWidth: 180,
showOverflowTooltip: true,
formatter: (row) => row.memo || '--'
},
{
prop: 'operation',
- label: '鎿嶄綔',
+ label: $t('table.operation'),
width: 120,
align: 'center',
fixed: 'right',
diff --git a/rsf-design/src/views/basic-info/bas-station-area/index.vue b/rsf-design/src/views/basic-info/bas-station-area/index.vue
index 9ec13a5..a3d8b83 100644
--- a/rsf-design/src/views/basic-info/bas-station-area/index.vue
+++ b/rsf-design/src/views/basic-info/bas-station-area/index.vue
@@ -12,9 +12,9 @@
<ArtTableHeader v-model:columns="columnChecks" :loading="loading" @refresh="refreshData">
<template #left>
<ElSpace wrap>
- <ElButton v-auth="'add'" @click="handleShowDialog('add')" v-ripple
- >鏂板绔欑偣鍖哄煙</ElButton
- >
+ <ElButton v-auth="'add'" @click="handleShowDialog('add')" v-ripple>
+ {{ t('pages.basicInfo.basStationArea.actions.add') }}
+ </ElButton>
<ElButton
v-auth="'delete'"
type="danger"
@@ -22,7 +22,7 @@
@click="handleBatchDelete"
v-ripple
>
- 鎵归噺鍒犻櫎
+ {{ t('common.actions.batchDelete') }}
</ElButton>
<ListExportPrint
class="inline-flex"
@@ -77,6 +77,7 @@
<script setup>
import { computed, onMounted, ref } from 'vue'
import { ElMessage } from 'element-plus'
+ import { useI18n } from 'vue-i18n'
import ListExportPrint from '@/components/biz/list-export-print/index.vue'
import { useAuth } from '@/hooks/core/useAuth'
import { useTable } from '@/hooks/core/useTable'
@@ -126,6 +127,7 @@
const { hasAuth } = useAuth()
const userStore = useUserStore()
+ const { t } = useI18n()
const searchForm = ref(createBasStationAreaSearchState())
const detailDrawerVisible = ref(false)
@@ -192,56 +194,56 @@
const searchItems = computed(() => [
{
- label: '鍏抽敭瀛�',
+ label: t('pages.basicInfo.basStationArea.search.condition'),
key: 'condition',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ョ珯鐐瑰尯鍩熷悕绉�/缂栧彿/澶囨敞'
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.condition')
}
},
{
- label: '寮�濮嬫椂闂�',
+ label: t('pages.basicInfo.basStationArea.search.timeStart'),
key: 'timeStart',
type: 'date',
props: {
clearable: true,
type: 'date',
valueFormat: 'YYYY-MM-DD',
- placeholder: '璇烽�夋嫨寮�濮嬫椂闂�'
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.timeStart')
}
},
{
- label: '缁撴潫鏃堕棿',
+ label: t('pages.basicInfo.basStationArea.search.timeEnd'),
key: 'timeEnd',
type: 'date',
props: {
clearable: true,
type: 'date',
valueFormat: 'YYYY-MM-DD',
- placeholder: '璇烽�夋嫨缁撴潫鏃堕棿'
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.timeEnd')
}
},
{
- label: '绔欑偣鍖哄煙鍚嶇О',
+ label: t('pages.basicInfo.basStationArea.search.stationAreaName'),
key: 'stationAreaName',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ョ珯鐐瑰尯鍩熷悕绉�'
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.stationAreaName')
}
},
{
- label: '绔欑偣鍖哄煙缂栧彿',
+ label: t('pages.basicInfo.basStationArea.search.stationAreaId'),
key: 'stationAreaId',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ョ珯鐐瑰尯鍩熺紪鍙�'
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.stationAreaId')
}
},
{
- label: '绔欑偣绫诲瀷',
+ label: t('pages.basicInfo.basStationArea.search.type'),
key: 'type',
type: 'select',
props: {
@@ -250,7 +252,7 @@
}
},
{
- label: '鎵�灞炲簱鍖�',
+ label: t('pages.basicInfo.basStationArea.search.area'),
key: 'area',
type: 'select',
props: {
@@ -260,7 +262,7 @@
}
},
{
- label: '浣跨敤鐘舵��',
+ label: t('pages.basicInfo.basStationArea.search.useStatus'),
key: 'useStatus',
type: 'select',
props: {
@@ -270,7 +272,7 @@
}
},
{
- label: '鍙叆',
+ label: t('pages.basicInfo.basStationArea.search.inAble'),
key: 'inAble',
type: 'select',
props: {
@@ -279,7 +281,7 @@
}
},
{
- label: '鍙嚭',
+ label: t('pages.basicInfo.basStationArea.search.outAble'),
key: 'outAble',
type: 'select',
props: {
@@ -288,7 +290,7 @@
}
},
{
- label: '鏄惁璺ㄥ尯',
+ label: t('pages.basicInfo.basStationArea.search.isCrossZone'),
key: 'isCrossZone',
type: 'select',
props: {
@@ -297,16 +299,16 @@
}
},
{
- label: '璺ㄥ尯鍖哄煙',
+ label: t('pages.basicInfo.basStationArea.search.crossZoneArea'),
key: 'crossZoneArea',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ヨ法鍖哄尯鍩�'
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.crossZoneArea')
}
},
{
- label: '鏄惁WCS',
+ label: t('pages.basicInfo.basStationArea.search.isWcs'),
key: 'isWcs',
type: 'select',
props: {
@@ -315,25 +317,25 @@
}
},
{
- label: 'WCS鏁版嵁',
+ label: t('pages.basicInfo.basStationArea.search.wcsData'),
key: 'wcsData',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏CS鏁版嵁'
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.wcsData')
}
},
{
- label: '瀹瑰櫒绫诲瀷',
+ label: t('pages.basicInfo.basStationArea.search.containerType'),
key: 'containerType',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ュ鍣ㄧ被鍨�'
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.containerType')
}
},
{
- label: '鑷姩璋冩嫧',
+ label: t('pages.basicInfo.basStationArea.search.autoTransfer'),
key: 'autoTransfer',
type: 'select',
props: {
@@ -342,25 +344,25 @@
}
},
{
- label: '鏉$爜',
+ label: t('pages.basicInfo.basStationArea.search.barcode'),
key: 'barcode',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ユ潯鐮�'
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.barcode')
}
},
{
- label: '绔欑偣鍒悕',
+ label: t('pages.basicInfo.basStationArea.search.stationAlias'),
key: 'stationAlias',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ョ珯鐐瑰埆鍚�'
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.stationAlias')
}
},
{
- label: '鐘舵��',
+ label: t('pages.basicInfo.basStationArea.search.status'),
key: 'status',
type: 'select',
props: {
@@ -369,12 +371,12 @@
}
},
{
- label: '澶囨敞',
+ label: t('pages.basicInfo.basStationArea.search.memo'),
key: 'memo',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ュ娉�'
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.memo')
}
}
])
@@ -387,7 +389,7 @@
fetchBasStationAreaDetail(row.id),
{},
{
- timeoutMessage: '绔欑偣鍖哄煙璇︽儏鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟'
+ timeoutMessage: t('pages.basicInfo.basStationArea.messages.detailTimeout')
}
)
detailData.value = normalizeBasStationAreaDetailRecord(detail, {
@@ -401,7 +403,7 @@
} catch (error) {
detailDrawerVisible.value = false
detailData.value = {}
- ElMessage.error(error?.message || '鑾峰彇绔欑偣鍖哄煙璇︽儏澶辫触')
+ ElMessage.error(error?.message || t('pages.basicInfo.basStationArea.messages.detailLoadFailed'))
} finally {
detailLoading.value = false
}
@@ -430,7 +432,7 @@
),
{ records: [] },
{
- timeoutMessage: '绔欑偣鍒悕閫夐」鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟'
+ timeoutMessage: t('pages.basicInfo.basStationArea.messages.stationAliasTimeout')
}
)
stationOptions.value = resolveBasStationAreaStationOptions(
@@ -457,12 +459,12 @@
fetchBasStationAreaDetail(row.id),
{},
{
- timeoutMessage: '绔欑偣鍖哄煙璇︽儏鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟'
+ timeoutMessage: t('pages.basicInfo.basStationArea.messages.detailTimeout')
}
)
await handleShowDialog('edit', detail)
} catch (error) {
- ElMessage.error(error?.message || '鑾峰彇绔欑偣鍖哄煙璇︽儏澶辫触')
+ ElMessage.error(error?.message || t('pages.basicInfo.basStationArea.messages.detailLoadFailed'))
}
}
@@ -531,7 +533,7 @@
saveRequest: fetchSaveBasStationArea,
updateRequest: fetchUpdateBasStationArea,
deleteRequest: fetchDeleteBasStationArea,
- entityName: '绔欑偣鍖哄煙',
+ entityName: t('pages.basicInfo.basStationArea.entity'),
resolveRecordLabel: (record) => record?.stationAreaName || record?.stationAreaId || record?.id,
refreshCreate,
refreshUpdate,
@@ -605,7 +607,7 @@
async function loadAreaOptions() {
const response = await guardRequestWithMessage(fetchWarehouseAreasList(), [], {
- timeoutMessage: '搴撳尯閫夐」鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟'
+ timeoutMessage: t('pages.basicInfo.basStationArea.messages.areaOptionsTimeout')
})
const options = resolveBasStationAreaWarehouseAreaOptions(
defaultResponseAdapter(response).records
@@ -623,7 +625,7 @@
status: 1
}),
{ records: [] },
- { timeoutMessage: '瀹瑰櫒绫诲瀷閫夐」鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟' }
+ { timeoutMessage: t('pages.basicInfo.basStationArea.messages.containerTypeTimeout') }
)
containerTypeOptions.value = resolveBasStationAreaContainerTypeOptions(
defaultResponseAdapter(response).records
@@ -639,7 +641,7 @@
status: 1
}),
{ records: [] },
- { timeoutMessage: '浣跨敤鐘舵�侀�夐」鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟' }
+ { timeoutMessage: t('pages.basicInfo.basStationArea.messages.useStatusTimeout') }
)
useStatusOptions.value = resolveBasStationAreaUseStatusOptions(
defaultResponseAdapter(response).records
diff --git a/rsf-design/src/views/basic-info/bas-station-area/modules/bas-station-area-detail-drawer.vue b/rsf-design/src/views/basic-info/bas-station-area/modules/bas-station-area-detail-drawer.vue
index ebd2c7c..204f21a 100644
--- a/rsf-design/src/views/basic-info/bas-station-area/modules/bas-station-area-detail-drawer.vue
+++ b/rsf-design/src/views/basic-info/bas-station-area/modules/bas-station-area-detail-drawer.vue
@@ -1,7 +1,7 @@
<template>
<ElDrawer
:model-value="visible"
- title="绔欑偣鍖哄煙璇︽儏"
+ :title="t('pages.basicInfo.basStationArea.detail.title')"
size="960px"
destroy-on-close
@update:model-value="handleVisibleChange"
@@ -11,35 +11,35 @@
<ElSkeleton :rows="12" animated />
</div>
<div v-else class="space-y-4">
- <ElDescriptions title="鍩虹淇℃伅" :column="2" border>
- <ElDescriptionsItem label="绔欑偣鍖哄煙鍚嶇О">{{ detail.stationAreaName || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="绔欑偣鍖哄煙缂栧彿">{{ detail.stationAreaId || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="绔欑偣绫诲瀷">{{ detail.typeText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鎵�灞炲簱鍖�">{{ detail.areaText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鍙法鍖哄簱鍖�" :span="2">{{ detail.crossZoneAreaText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="瀹瑰櫒绫诲瀷" :span="2">{{ detail.containerTypeText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="绔欑偣鍒悕" :span="2">{{ detail.stationAliasText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鍙叆">{{ detail.inAbleText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鍙嚭">{{ detail.outAbleText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鏄惁璺ㄥ尯">{{ detail.isCrossZoneText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鏄惁WCS">{{ detail.isWcsText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鑷姩璋冩嫧">{{ detail.autoTransferText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="浣跨敤鐘舵��">{{ detail.useStatusText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鏉$爜">{{ detail.barcode || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鐘舵��">
+ <ElDescriptions :title="t('pages.basicInfo.basStationArea.detail.baseInfo')" :column="2" border>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.stationAreaName')">{{ detail.stationAreaName || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.stationAreaId')">{{ detail.stationAreaId || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.type')">{{ detail.typeText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.area')">{{ detail.areaText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.crossZoneArea')" :span="2">{{ detail.crossZoneAreaText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.containerType')" :span="2">{{ detail.containerTypeText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.stationAlias')" :span="2">{{ detail.stationAliasText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.inAble')">{{ detail.inAbleText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.outAble')">{{ detail.outAbleText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.isCrossZone')">{{ detail.isCrossZoneText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.isWcs')">{{ detail.isWcsText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.autoTransfer')">{{ detail.autoTransferText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.useStatus')">{{ detail.useStatusText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.barcode')">{{ detail.barcode || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.status')">
<ElTag :type="detail.statusType || 'info'" effect="light">
{{ detail.statusText || '--' }}
</ElTag>
</ElDescriptionsItem>
- <ElDescriptionsItem label="WCS鏁版嵁" :span="2">{{ detail.wcsData || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="澶囨敞" :span="2">{{ detail.memo || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.wcsData')" :span="2">{{ detail.wcsData || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.memo')" :span="2">{{ detail.memo || '--' }}</ElDescriptionsItem>
</ElDescriptions>
- <ElDescriptions title="瀹¤淇℃伅" :column="2" border>
- <ElDescriptionsItem label="鍒涘缓浜�">{{ detail.createByText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鍒涘缓鏃堕棿">{{ detail.createTimeText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鏇存柊浜�">{{ detail.updateByText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鏇存柊鏃堕棿">{{ detail.updateTimeText || '--' }}</ElDescriptionsItem>
+ <ElDescriptions :title="t('pages.basicInfo.basStationArea.detail.auditInfo')" :column="2" border>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.createBy')">{{ detail.createByText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.createTime')">{{ detail.createTimeText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.updateBy')">{{ detail.updateByText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.basicInfo.basStationArea.detail.updateTime')">{{ detail.updateTimeText || '--' }}</ElDescriptionsItem>
</ElDescriptions>
</div>
</ElScrollbar>
@@ -48,6 +48,7 @@
<script setup>
import { computed } from 'vue'
+ import { useI18n } from 'vue-i18n'
const props = defineProps({
visible: { type: Boolean, default: false },
@@ -56,6 +57,7 @@
})
const emit = defineEmits(['update:visible'])
+ const { t } = useI18n()
const visible = computed({
get: () => props.visible,
@@ -66,4 +68,3 @@
visible.value = value
}
</script>
-
diff --git a/rsf-design/src/views/basic-info/bas-station-area/modules/bas-station-area-dialog.vue b/rsf-design/src/views/basic-info/bas-station-area/modules/bas-station-area-dialog.vue
index 698219f..03f889c 100644
--- a/rsf-design/src/views/basic-info/bas-station-area/modules/bas-station-area-dialog.vue
+++ b/rsf-design/src/views/basic-info/bas-station-area/modules/bas-station-area-dialog.vue
@@ -22,8 +22,8 @@
<template #footer>
<span class="dialog-footer">
- <ElButton @click="handleCancel">鍙栨秷</ElButton>
- <ElButton type="primary" @click="handleSubmit">纭畾</ElButton>
+ <ElButton @click="handleCancel">{{ t('common.cancel') }}</ElButton>
+ <ElButton type="primary" @click="handleSubmit">{{ t('common.confirm') }}</ElButton>
</span>
</template>
</ElDialog>
@@ -31,6 +31,7 @@
<script setup>
import { computed, nextTick, reactive, ref, watch } from 'vue'
+ import { useI18n } from 'vue-i18n'
import ArtForm from '@/components/core/forms/art-form/index.vue'
import {
buildBasStationAreaDialogModel,
@@ -51,68 +52,71 @@
})
const emit = defineEmits(['update:visible', 'submit'])
+ const { t } = useI18n()
const formRef = ref()
const form = reactive(createBasStationAreaFormState())
const isEdit = computed(() => props.dialogType === 'edit')
- const dialogTitle = computed(() => (isEdit.value ? '缂栬緫绔欑偣鍖哄煙' : '鏂板绔欑偣鍖哄煙'))
+ const dialogTitle = computed(() =>
+ t(isEdit.value ? 'pages.basicInfo.basStationArea.dialog.titleEdit' : 'pages.basicInfo.basStationArea.dialog.titleAdd')
+ )
const rules = computed(() => ({
- stationAreaName: [{ required: true, message: '璇疯緭鍏ョ珯鐐瑰尯鍩熷悕绉�', trigger: 'blur' }],
- stationAreaId: [{ required: true, message: '璇疯緭鍏ョ珯鐐瑰尯鍩熺紪鍙�', trigger: 'blur' }],
- type: [{ required: true, message: '璇烽�夋嫨绔欑偣绫诲瀷', trigger: 'change' }],
- area: [{ required: true, message: '璇烽�夋嫨鎵�灞炲簱鍖�', trigger: 'change' }],
- containerType: [{ type: 'array', required: true, message: '璇烽�夋嫨瀹瑰櫒绫诲瀷', trigger: 'change' }],
- stationAlias: [{ type: 'array', required: true, message: '璇烽�夋嫨绔欑偣鍒悕', trigger: 'change' }]
+ stationAreaName: [{ required: true, message: t('pages.basicInfo.basStationArea.dialog.validation.stationAreaName'), trigger: 'blur' }],
+ stationAreaId: [{ required: true, message: t('pages.basicInfo.basStationArea.dialog.validation.stationAreaId'), trigger: 'blur' }],
+ type: [{ required: true, message: t('pages.basicInfo.basStationArea.dialog.validation.type'), trigger: 'change' }],
+ area: [{ required: true, message: t('pages.basicInfo.basStationArea.dialog.validation.area'), trigger: 'change' }],
+ containerType: [{ type: 'array', required: true, message: t('pages.basicInfo.basStationArea.dialog.validation.containerType'), trigger: 'change' }],
+ stationAlias: [{ type: 'array', required: true, message: t('pages.basicInfo.basStationArea.dialog.validation.stationAlias'), trigger: 'change' }]
}))
const formItems = computed(() => [
{
- label: '绔欑偣鍖哄煙鍚嶇О',
+ label: t('pages.basicInfo.basStationArea.dialog.stationAreaName'),
key: 'stationAreaName',
type: 'input',
props: {
- placeholder: '璇疯緭鍏ョ珯鐐瑰尯鍩熷悕绉�',
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.stationAreaName'),
clearable: true
}
},
{
- label: '绔欑偣鍖哄煙缂栧彿',
+ label: t('pages.basicInfo.basStationArea.dialog.stationAreaId'),
key: 'stationAreaId',
type: 'input',
props: {
- placeholder: '璇疯緭鍏ョ珯鐐瑰尯鍩熺紪鍙�',
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.stationAreaId'),
clearable: true
}
},
{
- label: '绔欑偣绫诲瀷',
+ label: t('pages.basicInfo.basStationArea.dialog.type'),
key: 'type',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨绔欑偣绫诲瀷',
+ placeholder: t('pages.basicInfo.basStationArea.search.type'),
clearable: true,
options: getBasStationAreaTypeOptions()
}
},
{
- label: '鎵�灞炲簱鍖�',
+ label: t('pages.basicInfo.basStationArea.dialog.area'),
key: 'area',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨鎵�灞炲簱鍖�',
+ placeholder: t('pages.basicInfo.basStationArea.search.area'),
clearable: true,
filterable: true,
options: props.areaOptions || []
}
},
{
- label: '鍙法鍖哄簱鍖�',
+ label: t('pages.basicInfo.basStationArea.dialog.crossZoneArea'),
key: 'crossZoneArea',
type: 'select',
span: 24,
props: {
- placeholder: '璇烽�夋嫨鍙法鍖哄簱鍖�',
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.crossZoneArea'),
clearable: true,
multiple: true,
collapseTags: true,
@@ -121,12 +125,12 @@
}
},
{
- label: '瀹瑰櫒绫诲瀷',
+ label: t('pages.basicInfo.basStationArea.dialog.containerType'),
key: 'containerType',
type: 'select',
span: 24,
props: {
- placeholder: '璇烽�夋嫨瀹瑰櫒绫诲瀷',
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.containerType'),
clearable: true,
multiple: true,
collapseTags: true,
@@ -135,12 +139,12 @@
}
},
{
- label: '绔欑偣鍒悕',
+ label: t('pages.basicInfo.basStationArea.dialog.stationAlias'),
key: 'stationAlias',
type: 'select',
span: 24,
props: {
- placeholder: '璇烽�夋嫨绔欑偣鍒悕',
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.stationAlias'),
clearable: true,
multiple: true,
collapseTags: true,
@@ -149,106 +153,106 @@
}
},
{
- label: '鍙叆',
+ label: t('pages.basicInfo.basStationArea.dialog.inAble'),
key: 'inAble',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨鍙叆',
+ placeholder: t('pages.basicInfo.basStationArea.search.inAble'),
clearable: true,
options: getBasStationAreaBinaryOptions()
}
},
{
- label: '鍙嚭',
+ label: t('pages.basicInfo.basStationArea.dialog.outAble'),
key: 'outAble',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨鍙嚭',
+ placeholder: t('pages.basicInfo.basStationArea.search.outAble'),
clearable: true,
options: getBasStationAreaBinaryOptions()
}
},
{
- label: '鏄惁璺ㄥ尯',
+ label: t('pages.basicInfo.basStationArea.dialog.isCrossZone'),
key: 'isCrossZone',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨鏄惁璺ㄥ尯',
+ placeholder: t('pages.basicInfo.basStationArea.search.isCrossZone'),
clearable: true,
options: getBasStationAreaBinaryOptions()
}
},
{
- label: '鏄惁WCS',
+ label: t('pages.basicInfo.basStationArea.dialog.isWcs'),
key: 'isWcs',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨鏄惁WCS',
+ placeholder: t('pages.basicInfo.basStationArea.search.isWcs'),
clearable: true,
options: getBasStationAreaBinaryOptions()
}
},
{
- label: '鑷姩璋冩嫧',
+ label: t('pages.basicInfo.basStationArea.dialog.autoTransfer'),
key: 'autoTransfer',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨鑷姩璋冩嫧',
+ placeholder: t('pages.basicInfo.basStationArea.search.autoTransfer'),
clearable: true,
options: getBasStationAreaBinaryOptions()
}
},
{
- label: '浣跨敤鐘舵��',
+ label: t('pages.basicInfo.basStationArea.dialog.useStatus'),
key: 'useStatus',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨浣跨敤鐘舵��',
+ placeholder: t('pages.basicInfo.basStationArea.search.useStatus'),
clearable: true,
filterable: true,
options: props.useStatusOptions || []
}
},
{
- label: 'WCS鏁版嵁',
+ label: t('pages.basicInfo.basStationArea.dialog.wcsData'),
key: 'wcsData',
type: 'input',
span: 24,
props: {
type: 'textarea',
rows: 3,
- placeholder: '璇疯緭鍏CS鏁版嵁',
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.wcsData'),
clearable: true
}
},
{
- label: '鏉$爜',
+ label: t('pages.basicInfo.basStationArea.dialog.barcode'),
key: 'barcode',
type: 'input',
props: {
- placeholder: '璇疯緭鍏ユ潯鐮�',
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.barcode'),
clearable: true
}
},
{
- label: '鐘舵��',
+ label: t('pages.basicInfo.basStationArea.dialog.status'),
key: 'status',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨鐘舵��',
+ placeholder: t('pages.basicInfo.basStationArea.search.status'),
clearable: true,
options: getBasStationAreaStatusOptions()
}
},
{
- label: '澶囨敞',
+ label: t('pages.basicInfo.basStationArea.dialog.memo'),
key: 'memo',
type: 'input',
span: 24,
props: {
type: 'textarea',
rows: 3,
- placeholder: '璇疯緭鍏ュ娉�',
+ placeholder: t('pages.basicInfo.basStationArea.placeholder.memo'),
clearable: true
}
}
@@ -304,4 +308,3 @@
{ deep: true }
)
</script>
-
diff --git a/rsf-design/src/views/manager/task/index.vue b/rsf-design/src/views/manager/task/index.vue
index 08fc6cf..261a216 100644
--- a/rsf-design/src/views/manager/task/index.vue
+++ b/rsf-design/src/views/manager/task/index.vue
@@ -19,7 +19,7 @@
:loading="autoRunLoading"
@click="handleToggleAutoRun(true)"
>
- 鑷姩涓嬪彂浠诲姟
+ {{ t('pages.task.buttons.autoRun') }}
</ElButton>
<ElButton
v-else
@@ -28,7 +28,7 @@
:loading="autoRunLoading"
@click="handleToggleAutoRun(false)"
>
- 鏆傚仠鑷姩涓嬪彂
+ {{ t('pages.task.buttons.pauseAutoRun') }}
</ElButton>
</ElSpace>
</template>
@@ -67,6 +67,7 @@
<script setup>
import { ElMessage } from 'element-plus'
import { computed, h, onMounted, onUnmounted, reactive, ref } from 'vue'
+ import { useI18n } from 'vue-i18n'
import { useTableColumns } from '@/hooks/core/useTableColumns'
import { guardRequestWithMessage } from '@/utils/sys/requestGuard'
import {
@@ -93,6 +94,7 @@
} from './taskPage.helpers'
defineOptions({ name: 'Task' })
+ const { t } = useI18n()
const loading = ref(false)
const tableData = ref([])
@@ -121,106 +123,106 @@
const searchItems = computed(() => [
{
- label: '鍏抽敭瀛�',
+ label: t('pages.task.search.condition'),
key: 'condition',
type: 'input',
- props: { clearable: true, placeholder: '璇疯緭鍏ヤ换鍔″彿/搴撲綅/鎵樼洏鐮�' }
+ props: { clearable: true, placeholder: t('pages.task.placeholder.condition') }
},
{
- label: '浠诲姟鍙�',
+ label: t('pages.task.search.taskCode'),
key: 'taskCode',
type: 'input',
- props: { clearable: true, placeholder: '璇疯緭鍏ヤ换鍔″彿' }
+ props: { clearable: true, placeholder: t('pages.task.placeholder.taskCode') }
},
{
- label: '婧愬簱浣�',
+ label: t('pages.task.search.orgLoc'),
key: 'orgLoc',
type: 'input',
- props: { clearable: true, placeholder: '璇疯緭鍏ユ簮搴撲綅' }
+ props: { clearable: true, placeholder: t('pages.task.placeholder.orgLoc') }
},
{
- label: '鐩爣搴撲綅',
+ label: t('pages.task.search.targLoc'),
key: 'targLoc',
type: 'input',
- props: { clearable: true, placeholder: '璇疯緭鍏ョ洰鏍囧簱浣�' }
+ props: { clearable: true, placeholder: t('pages.task.placeholder.targLoc') }
},
{
- label: '鎵樼洏鐮�',
+ label: t('pages.task.search.barcode'),
key: 'barcode',
type: 'input',
- props: { clearable: true, placeholder: '璇疯緭鍏ユ墭鐩樼爜' }
+ props: { clearable: true, placeholder: t('pages.task.placeholder.barcode') }
}
])
const detailColumns = computed(() => [
{
type: 'globalIndex',
- label: '搴忓彿',
+ label: t('table.index'),
width: 72,
align: 'center'
},
{
prop: 'orderTypeLabel',
- label: '鍗曟嵁绫诲瀷',
+ label: t('pages.orders.delivery.detail.type'),
minWidth: 120,
showOverflowTooltip: true
},
{
prop: 'wkTypeLabel',
- label: '涓氬姟绫诲瀷',
+ label: t('pages.orders.delivery.detail.wkType'),
minWidth: 120,
showOverflowTooltip: true
},
{
prop: 'platWorkCode',
- label: '宸ュ崟鍙�',
+ label: t('pages.orders.transfer.detail.relatedCode'),
minWidth: 150,
showOverflowTooltip: true
},
{
prop: 'platItemId',
- label: '琛屽彿',
+ label: t('pages.orders.delivery.table.platItemId'),
minWidth: 100,
showOverflowTooltip: true
},
{
prop: 'matnrCode',
- label: '鐗╂枡缂栫爜',
+ label: t('pages.orders.delivery.table.matnrCode'),
minWidth: 150,
showOverflowTooltip: true
},
{
prop: 'maktx',
- label: '鐗╂枡鍚嶇О',
+ label: t('pages.orders.delivery.table.maktx'),
minWidth: 220,
showOverflowTooltip: true
},
{
prop: 'batch',
- label: '鎵规',
+ label: t('table.batch'),
minWidth: 140,
showOverflowTooltip: true
},
{
prop: 'unit',
- label: '鍗曚綅',
+ label: t('table.unit'),
width: 100
},
{
prop: 'anfme',
- label: '鏁伴噺',
+ label: t('pages.orders.delivery.table.anfme'),
width: 100,
align: 'right'
},
{
prop: 'updateByText',
- label: '鏇存柊浜�',
+ label: t('pages.orders.delivery.detail.updateBy'),
minWidth: 120,
showOverflowTooltip: true
},
{
prop: 'updateTimeText',
- label: '鏇存柊鏃堕棿',
+ label: t('pages.orders.delivery.detail.updateTime'),
minWidth: 180,
showOverflowTooltip: true
}
@@ -255,24 +257,24 @@
}
if (action.key === 'complete') {
- await confirmTaskAction(`纭畾瀹屾垚浠诲姟 ${row.taskCode || ''} 鍚楋紵`)
+ await confirmTaskAction(t('pages.task.messages.completeConfirm', { code: row.taskCode || '' }))
await fetchCompleteTask(row.id)
- ElMessage.success('浠诲姟瀹屾垚鎴愬姛')
+ ElMessage.success(t('pages.task.messages.completeSuccess'))
} else if (action.key === 'remove') {
- await confirmTaskAction(`纭畾鍙栨秷浠诲姟 ${row.taskCode || ''} 鍚楋紵`)
+ await confirmTaskAction(t('pages.task.messages.removeConfirm', { code: row.taskCode || '' }))
await fetchRemoveTask(row.id)
- ElMessage.success('浠诲姟鍙栨秷鎴愬姛')
+ ElMessage.success(t('pages.task.messages.removeSuccess'))
} else if (action.key === 'check') {
- await confirmTaskAction(`纭畾鎵ц鐩樼偣鍑哄簱浠诲姟 ${row.taskCode || ''} 鍚楋紵`)
+ await confirmTaskAction(t('pages.task.messages.checkConfirm', { code: row.taskCode || '' }))
await fetchCheckTask(row.id)
- ElMessage.success('鐩樼偣鍑哄簱鎴愬姛')
+ ElMessage.success(t('pages.task.messages.checkSuccess'))
} else if (action.key === 'pick') {
- await confirmTaskAction(`纭畾鎵ц鎷f枡鍑哄簱浠诲姟 ${row.taskCode || ''} 鍚楋紵`)
+ await confirmTaskAction(t('pages.task.messages.pickConfirm', { code: row.taskCode || '' }))
await fetchPickTask(row.id)
- ElMessage.success('鎷f枡鍑哄簱鎴愬姛')
+ ElMessage.success(t('pages.task.messages.pickSuccess'))
} else if (action.key === 'top') {
await fetchTopTask(row.id)
- ElMessage.success('浠诲姟缃《鎴愬姛')
+ ElMessage.success(t('pages.task.messages.topSuccess'))
}
await loadPageData()
@@ -283,7 +285,7 @@
if (error === 'cancel') {
return
}
- ElMessage.error(error?.message || '浠诲姟鎿嶄綔澶辫触')
+ ElMessage.error(error?.message || t('pages.task.messages.actionFailed'))
}
}
@@ -322,7 +324,7 @@
current: pagination.current,
size: pagination.size
},
- { timeoutMessage: '浠诲姟鍒楄〃鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟' }
+ { timeoutMessage: t('pages.task.messages.listTimeout') }
)
tableData.value = Array.isArray(response?.records)
? response.records.map((record) => normalizeTaskRow(record))
@@ -337,7 +339,7 @@
autoRunLoading.value = true
try {
const response = await guardRequestWithMessage(fetchTaskAutoRunFlag(), { val: false }, {
- timeoutMessage: '鑷姩涓嬪彂閰嶇疆鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟'
+ timeoutMessage: t('pages.task.messages.autoRunTimeout')
})
const rawValue = response?.val
autoRunEnabled.value =
@@ -352,9 +354,9 @@
try {
await fetchUpdateTaskAutoRunFlag(enabled)
autoRunEnabled.value = enabled
- ElMessage.success(enabled ? '宸插紑鍚嚜鍔ㄤ笅鍙戜换鍔�' : '宸叉殏鍋滆嚜鍔ㄤ笅鍙戜换鍔�')
+ ElMessage.success(enabled ? t('pages.task.messages.autoRunOnSuccess') : t('pages.task.messages.autoRunOffSuccess'))
} catch (error) {
- ElMessage.error(error?.message || '鑷姩涓嬪彂閰嶇疆鏇存柊澶辫触')
+ ElMessage.error(error?.message || t('pages.task.messages.autoRunUpdateFailed'))
} finally {
autoRunLoading.value = false
}
@@ -379,7 +381,7 @@
current: detailPagination.current,
size: detailPagination.size
},
- { timeoutMessage: '浠诲姟鏄庣粏鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟' }
+ { timeoutMessage: t('pages.task.messages.itemsTimeout') }
)
detailData.value = normalizeTaskRow(activeTaskRow.value)
@@ -389,7 +391,7 @@
updatePaginationState(detailPagination, taskItemResponse, detailPagination.current, detailPagination.size)
} catch (error) {
detailTableData.value = []
- ElMessage.error(error?.message || '浠诲姟鏄庣粏鍔犺浇澶辫触')
+ ElMessage.error(error?.message || t('pages.task.messages.detailLoadFailed'))
} finally {
detailLoading.value = false
}
diff --git a/rsf-design/src/views/manager/task/modules/task-detail-drawer.vue b/rsf-design/src/views/manager/task/modules/task-detail-drawer.vue
index 53cee56..293108f 100644
--- a/rsf-design/src/views/manager/task/modules/task-detail-drawer.vue
+++ b/rsf-design/src/views/manager/task/modules/task-detail-drawer.vue
@@ -1,7 +1,7 @@
<template>
<ElDrawer
:model-value="visible"
- title="浠诲姟璇︽儏"
+ :title="t('pages.task.detail.title')"
size="85%"
@update:model-value="handleVisibleChange"
>
@@ -10,7 +10,7 @@
<ElCard shadow="never" class="border border-[var(--el-border-color-lighter)]">
<template #header>
<div class="flex items-center justify-between">
- <span class="font-medium text-[var(--art-text-gray-900)]">浠诲姟鍩虹淇℃伅</span>
+ <span class="font-medium text-[var(--art-text-gray-900)]">{{ t('pages.task.detail.baseInfo') }}</span>
<ElTag size="small" effect="plain" type="primary">
{{ detail.taskCode || '--' }}
</ElTag>
@@ -18,45 +18,45 @@
</template>
<ElDescriptions :column="2" border>
- <ElDescriptionsItem label="浠诲姟鐘舵��">{{ detail.taskStatusLabel || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="浠诲姟绫诲瀷">{{ detail.taskTypeLabel || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="璁惧绫诲瀷">{{ detail.warehTypeLabel || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="浼樺厛绾�">{{ detail.sort ?? '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鐘舵��">{{ detail.statusText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鏈哄櫒浜虹紪鐮�">{{ detail.robotCode || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鍒涘缓鏃堕棿">{{ detail.createTimeText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鏇存柊鏃堕棿">{{ detail.updateTimeText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="澶囨敞" :span="2">{{ detail.memo || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.task.detail.taskStatus')">{{ detail.taskStatusLabel || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.task.detail.taskType')">{{ detail.taskTypeLabel || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.task.detail.warehType')">{{ detail.warehTypeLabel || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.task.detail.priority')">{{ detail.sort ?? '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.task.detail.status')">{{ detail.statusText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.task.detail.robotCode')">{{ detail.robotCode || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.task.detail.createTime')">{{ detail.createTimeText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.task.detail.updateTime')">{{ detail.updateTimeText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.task.detail.memo')" :span="2">{{ detail.memo || '--' }}</ElDescriptionsItem>
</ElDescriptions>
</ElCard>
<ElCard shadow="never" class="border border-[var(--el-border-color-lighter)]">
<template #header>
<div class="flex items-center justify-between">
- <span class="font-medium text-[var(--art-text-gray-900)]">鎵ц璺緞</span>
- <ElButton text type="primary" @click="$emit('flow-step')">娴佺▼姝ラ</ElButton>
+ <span class="font-medium text-[var(--art-text-gray-900)]">{{ t('pages.task.detail.pathInfo') }}</span>
+ <ElButton text type="primary" @click="$emit('flow-step')">{{ t('pages.task.detail.flowStep') }}</ElButton>
</div>
</template>
<ElDescriptions :column="1" border>
- <ElDescriptionsItem label="婧愬簱浣�">{{ detail.orgLoc || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="婧愮珯鐐�">{{ detail.orgSiteLabel || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鐩爣搴撲綅">{{ detail.targLoc || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鐩爣绔欑偣">{{ detail.targSiteLabel || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鎵樼洏鐮�">{{ detail.barcode || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.task.detail.orgLoc')">{{ detail.orgLoc || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.task.detail.orgSite')">{{ detail.orgSiteLabel || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.task.detail.targLoc')">{{ detail.targLoc || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.task.detail.targSite')">{{ detail.targSiteLabel || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.task.detail.barcode')">{{ detail.barcode || '--' }}</ElDescriptionsItem>
</ElDescriptions>
</ElCard>
</div>
<div class="flex items-center justify-between">
<div>
- <div class="text-sm font-medium text-[var(--art-text-gray-900)]">浠诲姟鏄庣粏</div>
+ <div class="text-sm font-medium text-[var(--art-text-gray-900)]">{{ t('pages.task.detail.items') }}</div>
<div class="mt-1 text-xs text-[var(--art-text-gray-500)]">
- 鏌ョ湅褰撳墠浠诲姟鍏宠仈鐨勪笟鍔″崟鎹�佺墿鏂欏拰鎵ц璁板綍
+ {{ t('pages.task.detail.itemsHint') }}
</div>
</div>
<div class="flex items-center gap-2">
- <ElButton :loading="loading" @click="$emit('refresh')">鍒锋柊</ElButton>
+ <ElButton :loading="loading" @click="$emit('refresh')">{{ t('common.actions.refresh') }}</ElButton>
</div>
</div>
@@ -73,6 +73,10 @@
</template>
<script setup>
+ import { useI18n } from 'vue-i18n'
+
+ const { t } = useI18n()
+
defineProps({
visible: { type: Boolean, default: false },
loading: { type: Boolean, default: false },
diff --git a/rsf-design/src/views/manager/task/modules/task-expand-panel.vue b/rsf-design/src/views/manager/task/modules/task-expand-panel.vue
index 9028100..80fa06f 100644
--- a/rsf-design/src/views/manager/task/modules/task-expand-panel.vue
+++ b/rsf-design/src/views/manager/task/modules/task-expand-panel.vue
@@ -1,15 +1,15 @@
<template>
<div class="rounded-xl bg-[var(--el-fill-color-blank)] px-4 py-4">
<div class="mb-3 flex items-center justify-between">
- <div class="text-sm font-medium text-[var(--art-gray-900)]">浠诲姟鏄庣粏</div>
- <ElButton text size="small" :loading="loading" @click="loadData">鍒锋柊</ElButton>
+ <div class="text-sm font-medium text-[var(--art-gray-900)]">{{ t('pages.task.expand.title') }}</div>
+ <ElButton text size="small" :loading="loading" @click="loadData">{{ t('common.actions.refresh') }}</ElButton>
</div>
<ArtTable
:loading="loading"
:data="rows"
:columns="columns"
- empty-text="鏆傛棤浠诲姟鏄庣粏"
+ :empty-text="t('pages.task.expand.empty')"
:empty-height="'220px'"
/>
</div>
@@ -17,6 +17,7 @@
<script setup>
import { onMounted, ref, watch } from 'vue'
+ import { useI18n } from 'vue-i18n'
import { guardRequestWithMessage } from '@/utils/sys/requestGuard'
import { fetchTaskItemPage } from '@/api/task'
import { normalizeTaskItemRow } from '../taskPage.helpers'
@@ -30,76 +31,77 @@
const loading = ref(false)
const rows = ref([])
+ const { t } = useI18n()
const columns = [
{
type: 'globalIndex',
- label: '搴忓彿',
+ label: t('table.index'),
width: 72,
align: 'center'
},
{
prop: 'orderTypeLabel',
- label: '鍗曟嵁绫诲瀷',
+ label: t('pages.task.expand.orderType'),
minWidth: 120,
showOverflowTooltip: true
},
{
prop: 'wkTypeLabel',
- label: '涓氬姟绫诲瀷',
+ label: t('pages.task.expand.wkType'),
minWidth: 120,
showOverflowTooltip: true
},
{
prop: 'platWorkCode',
- label: '宸ュ崟鍙�',
+ label: t('pages.task.expand.platWorkCode'),
minWidth: 150,
showOverflowTooltip: true
},
{
prop: 'platItemId',
- label: '琛屽彿',
+ label: t('pages.task.expand.platItemId'),
minWidth: 100,
showOverflowTooltip: true
},
{
prop: 'matnrCode',
- label: '鐗╂枡缂栫爜',
+ label: t('table.materialCode'),
minWidth: 150,
showOverflowTooltip: true
},
{
prop: 'maktx',
- label: '鐗╂枡鍚嶇О',
+ label: t('table.materialName'),
minWidth: 220,
showOverflowTooltip: true
},
{
prop: 'batch',
- label: '鎵规',
+ label: t('table.batch'),
minWidth: 140,
showOverflowTooltip: true
},
{
prop: 'unit',
- label: '鍗曚綅',
+ label: t('table.unit'),
width: 100
},
{
prop: 'anfme',
- label: '鏁伴噺',
+ label: t('pages.task.expand.anfme'),
width: 100,
align: 'right'
},
{
prop: 'updateByText',
- label: '鏇存柊浜�',
+ label: t('table.updateBy'),
minWidth: 120,
showOverflowTooltip: true
},
{
prop: 'updateTimeText',
- label: '鏇存柊鏃堕棿',
+ label: t('table.updateTime'),
minWidth: 180,
showOverflowTooltip: true
}
@@ -120,7 +122,7 @@
pageSize: 50
}),
{ records: [] },
- { timeoutMessage: '浠诲姟鏄庣粏鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟' }
+ { timeoutMessage: t('pages.task.messages.itemsTimeout') }
)
rows.value = Array.isArray(response?.records)
? response.records.map((record) => normalizeTaskItemRow(record))
diff --git a/rsf-design/src/views/manager/task/modules/task-flow-step-dialog.vue b/rsf-design/src/views/manager/task/modules/task-flow-step-dialog.vue
index 98b15bf..11c5b2d 100644
--- a/rsf-design/src/views/manager/task/modules/task-flow-step-dialog.vue
+++ b/rsf-design/src/views/manager/task/modules/task-flow-step-dialog.vue
@@ -4,16 +4,16 @@
width="80%"
top="6vh"
destroy-on-close
- title="娴佺▼姝ラ"
+ :title="t('pages.task.flowStepDialog.title')"
@update:model-value="emit('update:visible', $event)"
>
<div class="flex flex-col gap-4">
<div class="rounded-xl border border-[var(--el-border-color-lighter)] bg-[var(--el-fill-color-blank)] px-4 py-3">
- <div class="text-sm text-[var(--art-gray-500)]">褰撳墠浠诲姟</div>
+ <div class="text-sm text-[var(--art-gray-500)]">{{ t('pages.task.flowStepDialog.currentTask') }}</div>
<div class="mt-1 flex flex-wrap items-center gap-x-6 gap-y-2 text-sm text-[var(--art-gray-900)]">
- <span>浠诲姟鍙凤細{{ taskRow?.taskCode || '--' }}</span>
- <span>浠诲姟鐘舵�侊細{{ taskRow?.taskStatusLabel || '--' }}</span>
- <span>浠诲姟绫诲瀷锛歿{ taskRow?.taskTypeLabel || '--' }}</span>
+ <span>{{ t('pages.task.detail.taskCode') }}锛歿{ taskRow?.taskCode || '--' }}</span>
+ <span>{{ t('pages.task.detail.taskStatus') }}锛歿{ taskRow?.taskStatusLabel || '--' }}</span>
+ <span>{{ t('pages.task.detail.taskType') }}锛歿{ taskRow?.taskTypeLabel || '--' }}</span>
</div>
</div>
@@ -31,6 +31,7 @@
<script setup>
import { computed, reactive, ref, watch } from 'vue'
+ import { useI18n } from 'vue-i18n'
import { guardRequestWithMessage } from '@/utils/sys/requestGuard'
import { fetchFlowStepInstancePage } from '@/api/flow-step-instance'
import { normalizeFlowStepInstanceRow } from '@/views/system/flow-step-instance/flowStepInstancePage.helpers'
@@ -47,6 +48,7 @@
})
const emit = defineEmits(['update:visible'])
+ const { t } = useI18n()
const loading = ref(false)
const rows = ref([])
@@ -59,55 +61,55 @@
const columns = computed(() => [
{
type: 'globalIndex',
- label: '搴忓彿',
+ label: t('table.index'),
width: 72,
align: 'center'
},
{
prop: 'flowInstanceNo',
- label: '娴佺▼瀹炰緥鍙�',
+ label: t('pages.task.flowStepDialog.flowInstanceNo'),
minWidth: 160,
showOverflowTooltip: true
},
{
prop: 'stepCode',
- label: '姝ラ缂栫爜',
+ label: t('pages.task.flowStepDialog.stepCode'),
minWidth: 140,
showOverflowTooltip: true
},
{
prop: 'stepName',
- label: '姝ラ鍚嶇О',
+ label: t('pages.task.flowStepDialog.stepName'),
minWidth: 180,
showOverflowTooltip: true
},
{
prop: 'stepType',
- label: '姝ラ绫诲瀷',
+ label: t('pages.task.flowStepDialog.stepType'),
minWidth: 140,
showOverflowTooltip: true
},
{
prop: 'executeResult',
- label: '鎵ц缁撴灉',
+ label: t('pages.task.flowStepDialog.executeResult'),
minWidth: 140,
showOverflowTooltip: true
},
{
prop: 'statusText',
- label: '鐘舵��',
+ label: t('table.status'),
width: 120,
showOverflowTooltip: true
},
{
prop: 'startTimeText',
- label: '寮�濮嬫椂闂�',
+ label: t('pages.task.flowStepDialog.startTime'),
minWidth: 180,
showOverflowTooltip: true
},
{
prop: 'endTimeText',
- label: '缁撴潫鏃堕棿',
+ label: t('pages.task.flowStepDialog.endTime'),
minWidth: 180,
showOverflowTooltip: true
}
@@ -138,7 +140,7 @@
current: pagination.current,
size: pagination.size
},
- { timeoutMessage: '娴佺▼姝ラ鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟' }
+ { timeoutMessage: t('pages.task.flowStepDialog.timeout') }
)
rows.value = Array.isArray(response?.records)
? response.records.map((record) => normalizeFlowStepInstanceRow(record))
diff --git a/rsf-design/src/views/manager/task/taskPage.helpers.js b/rsf-design/src/views/manager/task/taskPage.helpers.js
index bf7eb7c..c002b57 100644
--- a/rsf-design/src/views/manager/task/taskPage.helpers.js
+++ b/rsf-design/src/views/manager/task/taskPage.helpers.js
@@ -1,4 +1,5 @@
import { ElMessageBox } from 'element-plus'
+import { $t } from '@/locales'
function normalizeText(value) {
return String(value ?? '').trim()
@@ -97,19 +98,19 @@
return [
{
key: 'view',
- label: '鏌ョ湅璇︽儏',
+ label: $t('pages.task.actions.view'),
icon: 'ri:eye-line'
},
{
key: 'flowStep',
- label: '娴佺▼姝ラ',
+ label: $t('pages.task.actions.flowStep'),
icon: 'ri:node-tree'
},
...(row.canComplete
? [
{
key: 'complete',
- label: '瀹屾垚浠诲姟',
+ label: $t('pages.task.actions.complete'),
icon: 'ri:checkbox-circle-line',
auth: 'update'
}
@@ -119,7 +120,7 @@
? [
{
key: 'check',
- label: '鐩樼偣鍑哄簱',
+ label: $t('pages.task.actions.check'),
icon: 'ri:file-check-line',
auth: 'update'
}
@@ -129,7 +130,7 @@
? [
{
key: 'pick',
- label: '鎷f枡鍑哄簱',
+ label: $t('pages.task.actions.pick'),
icon: 'ri:paint-line',
auth: 'update'
}
@@ -139,7 +140,7 @@
? [
{
key: 'top',
- label: '浠诲姟缃《',
+ label: $t('pages.task.actions.top'),
icon: 'ri:pushpin-line',
auth: 'update'
}
@@ -149,7 +150,7 @@
? [
{
key: 'remove',
- label: '鍙栨秷浠诲姟',
+ label: $t('pages.task.actions.remove'),
icon: 'ri:close-circle-line',
color: '#f56c6c',
auth: 'delete'
@@ -160,9 +161,9 @@
}
export async function confirmTaskAction(message) {
- await ElMessageBox.confirm(message, '鎻愮ず', {
+ await ElMessageBox.confirm(message, $t('crud.confirm.deleteTitle'), {
type: 'warning',
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷'
+ confirmButtonText: $t('common.confirm'),
+ cancelButtonText: $t('common.cancel')
})
}
diff --git a/rsf-design/src/views/manager/task/taskTable.columns.js b/rsf-design/src/views/manager/task/taskTable.columns.js
index d924763..dfb53a0 100644
--- a/rsf-design/src/views/manager/task/taskTable.columns.js
+++ b/rsf-design/src/views/manager/task/taskTable.columns.js
@@ -1,4 +1,5 @@
import { h } from 'vue'
+import { $t } from '@/locales'
import ArtButtonMore from '@/components/core/forms/art-button-more/index.vue'
import { getTaskActionList } from './taskPage.helpers'
@@ -15,79 +16,79 @@
: []),
{
prop: 'taskCode',
- label: '浠诲姟鍙�',
+ label: $t('pages.task.search.taskCode'),
minWidth: 170,
showOverflowTooltip: true
},
{
prop: 'taskStatusLabel',
- label: '浠诲姟鐘舵��',
+ label: $t('table.status'),
minWidth: 140,
showOverflowTooltip: true
},
{
prop: 'taskTypeLabel',
- label: '浠诲姟绫诲瀷',
+ label: $t('table.type'),
minWidth: 140,
showOverflowTooltip: true
},
{
prop: 'warehTypeLabel',
- label: '璁惧绫诲瀷',
+ label: $t('pages.task.detail.warehType'),
minWidth: 120,
showOverflowTooltip: true
},
{
prop: 'orgLoc',
- label: '婧愬簱浣�',
+ label: $t('pages.task.search.orgLoc'),
minWidth: 140,
showOverflowTooltip: true
},
{
prop: 'orgSiteLabel',
- label: '婧愮珯鐐�',
+ label: $t('pages.task.detail.orgSite'),
minWidth: 160,
showOverflowTooltip: true
},
{
prop: 'targLoc',
- label: '鐩爣搴撲綅',
+ label: $t('pages.task.search.targLoc'),
minWidth: 140,
showOverflowTooltip: true
},
{
prop: 'targSiteLabel',
- label: '鐩爣绔欑偣',
+ label: $t('pages.task.detail.targSite'),
minWidth: 160,
showOverflowTooltip: true
},
{
prop: 'barcode',
- label: '鎵樼洏鐮�',
+ label: $t('pages.task.search.barcode'),
minWidth: 150,
showOverflowTooltip: true
},
{
prop: 'robotCode',
- label: '鏈哄櫒浜虹紪鐮�',
+ label: $t('pages.task.detail.robotCode'),
minWidth: 150,
showOverflowTooltip: true
},
{
prop: 'sort',
- label: '浼樺厛绾�',
+ label: $t('pages.task.detail.priority'),
width: 100,
align: 'right'
},
{
prop: 'updateTimeText',
- label: '鏇存柊鏃堕棿',
+ label: $t('table.updateTime'),
minWidth: 180,
showOverflowTooltip: true
},
{
prop: 'operation',
- label: '鎿嶄綔',
+ label: $t('table.operation'),
width: 120,
align: 'center',
fixed: 'right',
diff --git a/rsf-design/src/views/orders/asn-order/asnOrderPage.helpers.js b/rsf-design/src/views/orders/asn-order/asnOrderPage.helpers.js
index 6bf4f06..3c58d73 100644
--- a/rsf-design/src/views/orders/asn-order/asnOrderPage.helpers.js
+++ b/rsf-design/src/views/orders/asn-order/asnOrderPage.helpers.js
@@ -1,4 +1,6 @@
-export const ASN_ORDER_REPORT_TITLE = '鍏ュ簱閫氱煡鍗曟姤琛�'
+import { $t } from '@/locales'
+
+export const ASN_ORDER_REPORT_TITLE = $t('pages.orders.asnOrder.reportTitle')
export const ASN_ORDER_REPORT_STYLE = {
titleAlign: 'center',
titleLevel: 'strong',
@@ -8,13 +10,13 @@
}
const ASN_ORDER_STATUS_MAP = {
- 0: { label: '鏈墽琛�', tagType: 'info' },
- 1: { label: '鎵ц涓�', tagType: 'warning' },
- 2: { label: '鏀惰揣瀹屾垚', tagType: 'success' },
- 3: { label: '浠诲姟鎵ц涓�', tagType: 'warning' },
- 4: { label: '宸插畬鎴�', tagType: 'success' },
- 8: { label: '鍙栨秷', tagType: 'danger' },
- 9: { label: '宸插叧闂�', tagType: 'info' }
+ 0: { label: $t('pages.orders.asnOrder.status.pending'), tagType: 'info' },
+ 1: { label: $t('pages.orders.asnOrder.status.running'), tagType: 'warning' },
+ 2: { label: $t('pages.orders.asnOrder.status.receiving'), tagType: 'success' },
+ 3: { label: $t('pages.orders.asnOrder.status.taskRunning'), tagType: 'warning' },
+ 4: { label: $t('pages.orders.asnOrder.status.completed'), tagType: 'success' },
+ 8: { label: $t('pages.orders.asnOrder.status.cancelled'), tagType: 'danger' },
+ 9: { label: $t('pages.orders.asnOrder.status.closed'), tagType: 'info' }
}
function normalizeText(value) {
@@ -241,22 +243,22 @@
return [
{
key: 'view',
- label: '鏌ョ湅璇︽儏',
+ label: $t('pages.orders.asnOrder.actions.view'),
icon: 'ri:eye-line'
},
{
key: 'items',
- label: '鏀惰揣鏄庣粏',
+ label: $t('pages.orders.asnOrder.actions.items'),
icon: 'ri:list-check-3'
},
{
key: 'print',
- label: '鎵撳嵃',
+ label: $t('pages.orders.asnOrder.actions.print'),
icon: 'ri:printer-line'
},
{
key: 'complete',
- label: '瀹屾垚',
+ label: $t('pages.orders.asnOrder.actions.complete'),
icon: 'ri:check-line',
color: 'var(--el-color-success)',
disabled: !normalizedRow.canComplete
diff --git a/rsf-design/src/views/orders/asn-order/asnOrderTable.columns.js b/rsf-design/src/views/orders/asn-order/asnOrderTable.columns.js
index 8ddfbc8..d3fb242 100644
--- a/rsf-design/src/views/orders/asn-order/asnOrderTable.columns.js
+++ b/rsf-design/src/views/orders/asn-order/asnOrderTable.columns.js
@@ -1,5 +1,6 @@
import { h } from 'vue'
import { ElButton, ElTag } from 'element-plus'
+import { $t } from '@/locales'
import ArtButtonMore from '@/components/core/forms/art-button-more/index.vue'
import ArtButtonTable from '@/components/core/forms/art-button-table/index.vue'
import { getAsnOrderActionList } from './asnOrderPage.helpers'
@@ -13,55 +14,55 @@
},
{
type: 'globalIndex',
- label: '搴忓彿',
+ label: $t('table.index'),
width: 72,
align: 'center'
},
{
prop: 'code',
- label: 'ASN鍗曞彿',
+ label: $t('pages.orders.asnOrder.search.code'),
minWidth: 170,
showOverflowTooltip: true
},
{
prop: 'poCode',
- label: 'PO鍗曞彿',
+ label: $t('pages.orders.asnOrder.search.poCode'),
minWidth: 170,
showOverflowTooltip: true
},
{
prop: 'wkTypeLabel',
- label: '涓氬姟绫诲瀷',
+ label: $t('pages.orders.asnOrder.search.wkType'),
minWidth: 130,
showOverflowTooltip: true
},
{
prop: 'anfme',
- label: '搴旀敹鏁伴噺',
+ label: $t('pages.orders.asnOrder.detail.anfme'),
width: 110,
align: 'right'
},
{
prop: 'qty',
- label: '宸叉敹鏁伴噺',
+ label: $t('pages.orders.asnOrder.detail.qty'),
width: 110,
align: 'right'
},
{
prop: 'supplierName',
- label: '渚涘簲鍟�',
+ label: $t('pages.orders.asnOrder.search.supplierName'),
minWidth: 180,
showOverflowTooltip: true
},
{
prop: 'purchaseUserName',
- label: '閲囪喘鍛�',
+ label: $t('pages.orders.asnOrder.search.purchaseUserName'),
minWidth: 120,
showOverflowTooltip: true
},
{
prop: 'exceStatusText',
- label: '鍗曟嵁鐘舵��',
+ label: $t('pages.orders.asnOrder.search.exceStatus'),
width: 120,
formatter: (row) =>
h(
@@ -72,13 +73,13 @@
},
{
prop: 'updateTimeText',
- label: '鏇存柊鏃堕棿',
+ label: $t('pages.orders.asnOrder.detail.updateTime'),
minWidth: 170,
showOverflowTooltip: true
},
{
prop: 'operation',
- label: '鎿嶄綔',
+ label: $t('table.operation'),
width: 120,
align: 'center',
fixed: 'right',
@@ -95,59 +96,59 @@
return [
{
type: 'globalIndex',
- label: '搴忓彿',
+ label: $t('table.index'),
width: 72,
align: 'center'
},
{
prop: 'matnrCode',
- label: '鐗╂枡缂栫爜',
+ label: $t('table.materialCode'),
minWidth: 150,
showOverflowTooltip: true
},
{
prop: 'maktx',
- label: '鐗╂枡鍚嶇О',
+ label: $t('table.materialName'),
minWidth: 220,
showOverflowTooltip: true
},
{
prop: 'platItemId',
- label: 'PO琛屽彿',
+ label: $t('pages.orders.asnOrder.table.poItemId'),
width: 110
},
{
prop: 'splrBatch',
- label: '渚涘簲鍟嗘壒娆�',
+ label: $t('table.supplierBatch'),
minWidth: 140,
showOverflowTooltip: true
},
{
prop: 'splrName',
- label: '渚涘簲鍟�',
+ label: $t('table.supplier'),
minWidth: 180,
showOverflowTooltip: true
},
{
prop: 'stockUnit',
- label: '鍗曚綅',
+ label: $t('table.unit'),
width: 100
},
{
prop: 'anfme',
- label: '搴旀敹鏁伴噺',
+ label: $t('pages.orders.asnOrder.table.expectedQty'),
width: 110,
align: 'right'
},
{
prop: 'qty',
- label: '宸叉敹鏁伴噺',
+ label: $t('pages.orders.asnOrder.table.receivedQty'),
width: 110,
align: 'right'
},
{
prop: 'memo',
- label: '澶囨敞',
+ label: $t('table.remark'),
minWidth: 180,
showOverflowTooltip: true
}
@@ -158,55 +159,55 @@
return [
{
type: 'globalIndex',
- label: '搴忓彿',
+ label: $t('table.index'),
width: 72,
align: 'center'
},
{
prop: 'code',
- label: 'PO鍗曞彿',
+ label: $t('pages.orders.asnOrder.search.poCode'),
minWidth: 170,
showOverflowTooltip: true
},
{
prop: 'wkTypeLabel',
- label: '涓氬姟绫诲瀷',
+ label: $t('pages.orders.asnOrder.search.wkType'),
minWidth: 130,
showOverflowTooltip: true
},
{
prop: 'source',
- label: '鏉ユ簮',
+ label: $t('table.source'),
minWidth: 140,
showOverflowTooltip: true
},
{
prop: 'supplierName',
- label: '渚涘簲鍟�',
+ label: $t('pages.orders.asnOrder.search.supplierName'),
minWidth: 180,
showOverflowTooltip: true
},
{
prop: 'purchaseUserName',
- label: '閲囪喘鍛�',
+ label: $t('pages.orders.asnOrder.search.purchaseUserName'),
minWidth: 120,
showOverflowTooltip: true
},
{
prop: 'remainingQty',
- label: '鍙缓鍗曟暟閲�',
+ label: $t('pages.orders.asnOrder.table.remainingQty'),
width: 120,
align: 'right'
},
{
prop: 'exceStatusText',
- label: 'PO鐘舵��',
+ label: $t('pages.orders.asnOrder.table.poStatus'),
minWidth: 120,
showOverflowTooltip: true
},
{
prop: 'operation',
- label: '鎿嶄綔',
+ label: $t('table.operation'),
width: 120,
align: 'center',
fixed: 'right',
@@ -223,65 +224,65 @@
return [
{
type: 'globalIndex',
- label: '搴忓彿',
+ label: $t('table.index'),
width: 72,
align: 'center'
},
{
prop: 'platItemId',
- label: 'PO琛屽彿',
+ label: $t('pages.orders.asnOrder.table.poItemId'),
width: 110
},
{
prop: 'matnrCode',
- label: '鐗╂枡缂栫爜',
+ label: $t('table.materialCode'),
minWidth: 150,
showOverflowTooltip: true
},
{
prop: 'maktx',
- label: '鐗╂枡鍚嶇О',
+ label: $t('table.materialName'),
minWidth: 220,
showOverflowTooltip: true
},
{
prop: 'splrName',
- label: '渚涘簲鍟�',
+ label: $t('table.supplier'),
minWidth: 180,
showOverflowTooltip: true
},
{
prop: 'splrBatch',
- label: '渚涘簲鍟嗘壒娆�',
+ label: $t('table.supplierBatch'),
minWidth: 140,
showOverflowTooltip: true
},
{
prop: 'unit',
- label: '鍗曚綅',
+ label: $t('table.unit'),
width: 100
},
{
prop: 'anfme',
- label: '閲囪喘鏁伴噺',
+ label: $t('pages.orders.asnOrder.table.purchaseQty'),
width: 110,
align: 'right'
},
{
prop: 'qty',
- label: '宸茬敓鎴怉SN鏁伴噺',
+ label: $t('pages.orders.asnOrder.table.generatedQty'),
width: 130,
align: 'right'
},
{
prop: 'nromQty',
- label: '鏀惰揣鏁伴噺',
+ label: $t('pages.orders.asnOrder.table.receivedQtyTotal'),
width: 110,
align: 'right'
},
{
prop: 'selectAction',
- label: '鎿嶄綔鎻愮ず',
+ label: $t('table.operation'),
minWidth: 120,
formatter: () =>
h(
@@ -291,7 +292,7 @@
type: 'primary',
class: '!px-0'
},
- () => '闅� PO 鍏ㄩ噺寤哄崟'
+ () => $t('pages.orders.asnOrder.buttons.createByPo')
)
}
]
diff --git a/rsf-design/src/views/orders/asn-order/index.vue b/rsf-design/src/views/orders/asn-order/index.vue
index c771230..46584e1 100644
--- a/rsf-design/src/views/orders/asn-order/index.vue
+++ b/rsf-design/src/views/orders/asn-order/index.vue
@@ -12,7 +12,7 @@
<ArtTableHeader v-model:columns="columnChecks" :loading="loading" @refresh="refreshData">
<template #left>
<ElSpace wrap>
- <ElButton type="primary" @click="poDialogVisible = true">鎸塒O寤哄崟</ElButton>
+ <ElButton type="primary" @click="poDialogVisible = true">{{ t('pages.orders.asnOrder.buttons.createByPo') }}</ElButton>
<ListExportPrint
:preview-visible="previewVisible"
@update:previewVisible="handlePreviewVisibleChange"
@@ -61,6 +61,7 @@
<script setup>
import { computed, reactive, ref } from 'vue'
import { useRouter } from 'vue-router'
+ import { useI18n } from 'vue-i18n'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useUserStore } from '@/store/modules/user'
import { useTable } from '@/hooks/core/useTable'
@@ -99,6 +100,7 @@
const userStore = useUserStore()
const router = useRouter()
+ const { t } = useI18n()
const reportTitle = ASN_ORDER_REPORT_TITLE
const searchForm = ref(createAsnOrderSearchState())
const selectedRows = ref([])
@@ -120,43 +122,43 @@
const detailColumns = computed(() => createAsnOrderDetailItemColumns())
const searchItems = computed(() => [
{
- label: '鍏抽敭瀛�',
+ label: t('pages.orders.asnOrder.search.condition'),
key: 'condition',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏� ASN 鍗曞彿/PO 鍗曞彿/渚涘簲鍟�'
+ placeholder: t('pages.orders.asnOrder.placeholder.condition')
}
},
{
- label: 'ASN鍗曞彿',
+ label: t('pages.orders.asnOrder.search.code'),
key: 'code',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏� ASN 鍗曞彿'
+ placeholder: t('pages.orders.asnOrder.placeholder.code')
}
},
{
- label: 'PO鍗曞彿',
+ label: t('pages.orders.asnOrder.search.poCode'),
key: 'poCode',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏� PO 鍗曞彿'
+ placeholder: t('pages.orders.asnOrder.placeholder.poCode')
}
},
{
- label: '涓氬姟绫诲瀷',
+ label: t('pages.orders.asnOrder.search.wkType'),
key: 'wkType',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ヤ笟鍔$被鍨�'
+ placeholder: t('pages.orders.asnOrder.placeholder.wkType')
}
},
{
- label: '鍗曟嵁鐘舵��',
+ label: t('pages.orders.asnOrder.search.exceStatus'),
key: 'exceStatus',
type: 'select',
props: {
@@ -165,21 +167,21 @@
}
},
{
- label: '渚涘簲鍟�',
+ label: t('pages.orders.asnOrder.search.supplierName'),
key: 'supplierName',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ヤ緵搴斿晢'
+ placeholder: t('pages.orders.asnOrder.placeholder.supplierName')
}
},
{
- label: '閲囪喘鍛�',
+ label: t('pages.orders.asnOrder.search.purchaseUserName'),
key: 'purchaseUserName',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ラ噰璐憳'
+ placeholder: t('pages.orders.asnOrder.placeholder.purchaseUserName')
}
}
])
@@ -220,13 +222,17 @@
}
if (action.key === 'complete') {
- await ElMessageBox.confirm(`纭畾瀹屾垚鍏ュ簱閫氱煡鍗� ${row.code || ''} 鍚楋紵`, '瀹屾垚纭', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- })
+ await ElMessageBox.confirm(
+ t('pages.orders.asnOrder.detail.completeConfirm', { code: row.code || '' }),
+ t('pages.orders.asnOrder.detail.completeTitle'),
+ {
+ confirmButtonText: t('common.confirm'),
+ cancelButtonText: t('common.cancel'),
+ type: 'warning'
+ }
+ )
await fetchCompleteAsnOrder(row.id)
- ElMessage.success('鍏ュ簱閫氱煡鍗曞凡瀹屾垚')
+ ElMessage.success(t('pages.orders.asnOrder.detail.completeSuccess'))
await refreshData()
if (detailDrawerVisible.value && activeOrderId.value === row.id) {
await loadDetailResources()
@@ -236,7 +242,7 @@
if (error === 'cancel' || error?.message === 'cancel') {
return
}
- ElMessage.error(error?.message || '鍏ュ簱閫氱煡鍗曟搷浣滃け璐�')
+ ElMessage.error(error?.message || t('pages.orders.asnOrder.detail.actionFailed'))
}
}
@@ -296,7 +302,7 @@
size: detailPagination.size
},
{
- timeoutMessage: '鍏ュ簱閫氱煡鍗曟槑缁嗗姞杞借秴鏃讹紝宸插仠姝㈢瓑寰�'
+ timeoutMessage: t('pages.orders.asnOrder.detail.itemsTimeout')
}
)
diff --git a/rsf-design/src/views/orders/asn-order/modules/asn-order-create-by-po-dialog.vue b/rsf-design/src/views/orders/asn-order/modules/asn-order-create-by-po-dialog.vue
index f5339e0..578c02c 100644
--- a/rsf-design/src/views/orders/asn-order/modules/asn-order-create-by-po-dialog.vue
+++ b/rsf-design/src/views/orders/asn-order/modules/asn-order-create-by-po-dialog.vue
@@ -1,7 +1,7 @@
<template>
<ElDialog
:model-value="visible"
- title="鎸塒O寤哄崟"
+ :title="t('pages.orders.asnOrder.createByPoDialog.title')"
width="90%"
top="4vh"
destroy-on-close
@@ -20,8 +20,8 @@
<ElCard class="art-table-card" shadow="never">
<template #header>
<div class="flex items-center justify-between gap-3">
- <div class="text-sm font-medium">鍙缓鍗� PO 鍒楄〃</div>
- <ElButton :loading="purchaseLoading" @click="refreshPurchaseData">鍒锋柊</ElButton>
+ <div class="text-sm font-medium">{{ t('pages.orders.asnOrder.createByPoDialog.purchaseList') }}</div>
+ <ElButton :loading="purchaseLoading" @click="refreshPurchaseData">{{ t('common.actions.refresh') }}</ElButton>
</div>
</template>
@@ -39,12 +39,12 @@
<template #header>
<div class="flex items-center justify-between gap-3">
<div class="flex flex-col">
- <span class="text-sm font-medium">PO 鏄庣粏棰勮</span>
+ <span class="text-sm font-medium">{{ t('pages.orders.asnOrder.createByPoDialog.purchasePreview') }}</span>
<span class="text-xs text-[var(--art-gray-600)]">
{{
selectedPurchase.code
- ? `褰撳墠閫夋嫨锛�${selectedPurchase.code}`
- : '璇峰厛鍦ㄥ乏渚ч�夋嫨涓�涓� PO 鍗�'
+ ? t('pages.orders.asnOrder.createByPoDialog.purchaseSelected', { code: selectedPurchase.code })
+ : t('pages.orders.asnOrder.createByPoDialog.purchaseEmpty')
}}
</span>
</div>
@@ -53,7 +53,7 @@
:loading="itemLoading"
@click="reloadSelectedPurchaseItems"
>
- 鍒锋柊鏄庣粏
+ {{ t('pages.orders.asnOrder.createByPoDialog.refreshItems') }}
</ElButton>
</div>
</template>
@@ -68,19 +68,19 @@
<div class="text-xs text-[var(--art-gray-600)]">
{{
selectedPurchase.id
- ? `灏嗘寜 PO ${selectedPurchase.code} 鐨� ${purchaseItems.length} 鏉℃槑缁嗙敓鎴愬叆搴撻�氱煡鍗昤
- : '璇烽�夋嫨涓�涓彲寤哄崟鐨� PO 鍗�'
+ ? t('pages.orders.asnOrder.createByPoDialog.purchaseGenerateHint', { code: selectedPurchase.code, count: purchaseItems.length })
+ : t('pages.orders.asnOrder.createByPoDialog.purchaseGenerateEmpty')
}}
</div>
<ElSpace>
- <ElButton @click="handleVisibleChange(false)">鍙栨秷</ElButton>
+ <ElButton @click="handleVisibleChange(false)">{{ t('common.cancel') }}</ElButton>
<ElButton
type="primary"
:loading="submitLoading"
:disabled="!selectedPurchase.id"
@click="handleConfirm"
>
- 鐢熸垚鍏ュ簱閫氱煡鍗�
+ {{ t('pages.orders.asnOrder.createByPoDialog.generate') }}
</ElButton>
</ElSpace>
</div>
@@ -91,6 +91,7 @@
<script setup>
import { computed, ref, watch } from 'vue'
import { ElMessage } from 'element-plus'
+ import { useI18n } from 'vue-i18n'
import { useTable } from '@/hooks/core/useTable'
import { guardRequestWithMessage } from '@/utils/sys/requestGuard'
import {
@@ -122,6 +123,7 @@
})
const emit = defineEmits(['update:visible', 'success'])
+ const { t } = useI18n()
const searchForm = ref(createPurchaseFilterSearchState())
const selectedPurchase = ref({})
@@ -131,39 +133,39 @@
const searchItems = computed(() => [
{
- label: '鍏抽敭瀛�',
+ label: t('pages.orders.asnOrder.createByPoDialog.search.condition'),
key: 'condition',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏� PO 鍗曞彿/鏉ユ簮/渚涘簲鍟�'
+ placeholder: t('pages.orders.asnOrder.createByPoDialog.search.conditionPlaceholder')
}
},
{
- label: 'PO鍗曞彿',
+ label: t('pages.orders.asnOrder.createByPoDialog.search.code'),
key: 'code',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏� PO 鍗曞彿'
+ placeholder: t('pages.orders.asnOrder.createByPoDialog.search.codePlaceholder')
}
},
{
- label: '鏉ユ簮',
+ label: t('pages.orders.asnOrder.createByPoDialog.search.source'),
key: 'source',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ユ潵婧�'
+ placeholder: t('pages.orders.asnOrder.createByPoDialog.search.sourcePlaceholder')
}
},
{
- label: '渚涘簲鍟�',
+ label: t('pages.orders.asnOrder.createByPoDialog.search.supplierName'),
key: 'supplierName',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ヤ緵搴斿晢'
+ placeholder: t('pages.orders.asnOrder.createByPoDialog.search.supplierNamePlaceholder')
}
}
])
@@ -250,8 +252,8 @@
current: 1,
size: 200
},
- {
- timeoutMessage: 'PO 鏄庣粏鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟'
+ {
+ timeoutMessage: t('pages.orders.asnOrder.createByPoDialog.messages.purchaseItemsTimeout')
}
)
@@ -272,7 +274,7 @@
size: total
},
{
- timeoutMessage: 'PO 鍏ㄩ噺鏄庣粏鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟'
+ timeoutMessage: t('pages.orders.asnOrder.createByPoDialog.messages.purchaseItemsAllTimeout')
}
)
purchaseItems.value = Array.isArray(fullPage?.records)
@@ -313,11 +315,11 @@
async function handleConfirm() {
if (!selectedPurchase.value?.id) {
- ElMessage.warning('璇峰厛閫夋嫨涓�涓� PO 鍗�')
+ ElMessage.warning(t('pages.orders.asnOrder.createByPoDialog.messages.purchaseRequired'))
return
}
if (!purchaseItems.value.length) {
- ElMessage.warning('褰撳墠 PO 鍗曟病鏈夊彲寤哄崟鏄庣粏')
+ ElMessage.warning(t('pages.orders.asnOrder.createByPoDialog.messages.purchaseItemsEmpty'))
return
}
@@ -327,11 +329,11 @@
purchaseId: selectedPurchase.value.id,
items: purchaseItems.value.map((item) => ({ ...item }))
})
- ElMessage.success('宸叉牴鎹� PO 鍗曠敓鎴愬叆搴撻�氱煡鍗�')
+ ElMessage.success(t('pages.orders.asnOrder.createByPoDialog.messages.createByPoSuccess'))
emit('success')
handleVisibleChange(false)
} catch (error) {
- ElMessage.error(error?.message || '鎸� PO 寤哄崟澶辫触')
+ ElMessage.error(error?.message || t('pages.orders.asnOrder.createByPoDialog.messages.createByPoFailed'))
} finally {
submitLoading.value = false
}
diff --git a/rsf-design/src/views/orders/asn-order/modules/asn-order-detail-drawer.vue b/rsf-design/src/views/orders/asn-order/modules/asn-order-detail-drawer.vue
index a5534ca..903e6d1 100644
--- a/rsf-design/src/views/orders/asn-order/modules/asn-order-detail-drawer.vue
+++ b/rsf-design/src/views/orders/asn-order/modules/asn-order-detail-drawer.vue
@@ -1,35 +1,35 @@
<template>
<ElDrawer
:model-value="visible"
- title="鍏ュ簱閫氱煡鍗曡鎯�"
+ :title="t('pages.orders.asnOrder.detail.title')"
size="1180px"
destroy-on-close
@update:model-value="handleVisibleChange"
>
<ElScrollbar class="h-[calc(100vh-180px)] pr-1">
<div class="space-y-4">
- <ElDescriptions title="鍩虹淇℃伅" :column="4" border>
- <ElDescriptionsItem label="ASN鍗曞彿">{{ detail.code || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="PO鍗曞彿">{{ detail.poCode || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="涓氬姟绫诲瀷">{{ detail.wkTypeLabel || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鍗曟嵁绫诲瀷">{{ detail.orderTypeLabel || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鍗曟嵁鐘舵��">{{ detail.exceStatusText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="閲囪喘缁勭粐">{{ detail.purchaseOrgName || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="閲囪喘鍛�">{{ detail.purchaseUserName || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="渚涘簲鍟�">{{ detail.supplierName || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="搴旀敹鏁伴噺">{{ detail.anfme ?? 0 }}</ElDescriptionsItem>
- <ElDescriptionsItem label="宸叉敹鏁伴噺">{{ detail.qty ?? 0 }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鏇存柊鏃堕棿">{{ detail.updateTimeText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鍒涘缓鏃堕棿">{{ detail.createTimeText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="澶囨敞" :span="4">{{ detail.memo || '--' }}</ElDescriptionsItem>
+ <ElDescriptions :title="t('pages.orders.asnOrder.detail.baseInfo')" :column="4" border>
+ <ElDescriptionsItem :label="t('pages.orders.asnOrder.detail.asnCode')">{{ detail.code || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.asnOrder.detail.poCode')">{{ detail.poCode || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.asnOrder.detail.wkType')">{{ detail.wkTypeLabel || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.asnOrder.detail.orderType')">{{ detail.orderTypeLabel || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.asnOrder.detail.status')">{{ detail.exceStatusText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.asnOrder.detail.purchaseOrg')">{{ detail.purchaseOrgName || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.asnOrder.detail.purchaseUser')">{{ detail.purchaseUserName || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.asnOrder.detail.supplier')">{{ detail.supplierName || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.asnOrder.detail.anfme')">{{ detail.anfme ?? 0 }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.asnOrder.detail.qty')">{{ detail.qty ?? 0 }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.asnOrder.detail.updateTime')">{{ detail.updateTimeText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.asnOrder.detail.createTime')">{{ detail.createTimeText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.asnOrder.detail.memo')" :span="4">{{ detail.memo || '--' }}</ElDescriptionsItem>
</ElDescriptions>
<div class="space-y-3">
<div class="flex items-center justify-between">
- <div class="text-sm font-medium text-[var(--art-gray-900)]">鍗曟嵁鏄庣粏</div>
+ <div class="text-sm font-medium text-[var(--art-gray-900)]">{{ t('pages.orders.asnOrder.detail.items') }}</div>
<div class="flex items-center gap-3">
- <ElTag effect="plain">鍏� {{ data.length }} 鏉�</ElTag>
- <ElButton :loading="loading" @click="$emit('refresh')">鍒锋柊</ElButton>
+ <ElTag effect="plain">{{ t('pages.orders.asnOrder.detail.count', { count: data.length }) }}</ElTag>
+ <ElButton :loading="loading" @click="$emit('refresh')">{{ t('common.actions.refresh') }}</ElButton>
</div>
</div>
@@ -48,7 +48,10 @@
</template>
<script setup>
+ import { useI18n } from 'vue-i18n'
+
defineOptions({ name: 'AsnOrderDetailDrawer' })
+ const { t } = useI18n()
defineProps({
visible: { type: Boolean, default: false },
diff --git a/rsf-design/src/views/orders/delivery/deliveryPage.helpers.js b/rsf-design/src/views/orders/delivery/deliveryPage.helpers.js
index e993d8e..b6fd8a2 100644
--- a/rsf-design/src/views/orders/delivery/deliveryPage.helpers.js
+++ b/rsf-design/src/views/orders/delivery/deliveryPage.helpers.js
@@ -1,16 +1,18 @@
+import { $t } from '@/locales'
+
const DELIVERY_STATUS_META = {
- 1: { text: '姝e父', type: 'success', bool: true },
- 0: { text: '绂佺敤', type: 'danger', bool: false }
+ 1: { text: $t('pages.orders.delivery.status.normal'), type: 'success', bool: true },
+ 0: { text: $t('pages.orders.delivery.status.disabled'), type: 'danger', bool: false }
}
const DELIVERY_EXCE_STATUS_META = {
- 0: { text: '鏈墽琛�', type: 'info' },
- 1: { text: '鎵ц涓�', type: 'warning' },
- 2: { text: '閮ㄥ垎瀹屾垚', type: 'primary' },
- 3: { text: '宸插畬鎴�', type: 'success' }
+ 0: { text: $t('pages.orders.delivery.status.pending'), type: 'info' },
+ 1: { text: $t('pages.orders.delivery.status.running'), type: 'warning' },
+ 2: { text: $t('pages.orders.delivery.status.partial'), type: 'primary' },
+ 3: { text: $t('pages.orders.delivery.status.completed'), type: 'success' }
}
-export const DELIVERY_REPORT_TITLE = 'DO鍗曟姤琛�'
+export const DELIVERY_REPORT_TITLE = $t('pages.orders.delivery.reportTitle')
export const DELIVERY_REPORT_STYLE = {
titleAlign: 'center',
titleLevel: 'strong',
@@ -38,7 +40,7 @@
if (status === false || Number(status) === 0) {
return DELIVERY_STATUS_META[0]
}
- return { text: '鏈煡', type: 'info', bool: false }
+ return { text: $t('common.status.unknown'), type: 'info', bool: false }
}
function normalizeExceStatusMeta(exceStatus, exceStatusText) {
@@ -229,7 +231,7 @@
orientation = DELIVERY_REPORT_STYLE.orientation
} = {}) {
return {
- reportTitle: 'DO鍗曟槑缁嗘姤琛�',
+ reportTitle: $t('pages.orders.delivery.detailReportTitle'),
reportDate: previewMeta.reportDate,
printedAt: previewMeta.printedAt,
operator: previewMeta.operator,
@@ -246,12 +248,12 @@
const actions = [
{
key: 'view',
- label: '鏌ョ湅璇︽儏',
+ label: $t('pages.orders.delivery.actions.view'),
icon: 'ri:eye-line'
},
{
key: 'items',
- label: '鏄庣粏',
+ label: $t('pages.orders.delivery.actions.items'),
icon: 'ri:list-check-3'
}
]
@@ -259,7 +261,7 @@
if (Number(normalizedRow.exceStatus) === 0) {
actions.push({
key: 'delete',
- label: '鍒犻櫎',
+ label: $t('pages.orders.delivery.actions.delete'),
icon: 'ri:delete-bin-5-line',
color: 'var(--art-error)'
})
diff --git a/rsf-design/src/views/orders/delivery/deliveryTable.columns.js b/rsf-design/src/views/orders/delivery/deliveryTable.columns.js
index 38951ff..7a07112 100644
--- a/rsf-design/src/views/orders/delivery/deliveryTable.columns.js
+++ b/rsf-design/src/views/orders/delivery/deliveryTable.columns.js
@@ -1,78 +1,79 @@
import { h } from 'vue'
import { ElTag } from 'element-plus'
+import { $t } from '@/locales'
import ArtButtonMore from '@/components/core/forms/art-button-more/index.vue'
import { getDeliveryActionList } from './deliveryPage.helpers.js'
export function createDeliveryTableColumns({ handleActionClick } = {}) {
return [
{ type: 'selection', width: 48, align: 'center' },
- { type: 'globalIndex', label: '搴忓彿', width: 72, align: 'center' },
+ { type: 'globalIndex', label: $t('table.index'), width: 72, align: 'center' },
{
prop: 'code',
- label: '鍗曞彿',
+ label: $t('pages.orders.delivery.search.code'),
minWidth: 170,
showOverflowTooltip: true,
formatter: (row) => row.code || '--'
},
{
prop: 'platId',
- label: 'ERP涓诲崟鏍囪瘑',
+ label: $t('pages.orders.delivery.search.platId'),
minWidth: 150,
showOverflowTooltip: true,
formatter: (row) => row.platId || '--'
},
{
prop: 'typeLabel',
- label: '鍗曟嵁绫诲瀷',
+ label: $t('pages.orders.delivery.search.type'),
minWidth: 120,
showOverflowTooltip: true,
formatter: (row) => row.typeLabel || '--'
},
{
prop: 'wkTypeLabel',
- label: '涓氬姟绫诲瀷',
+ label: $t('pages.orders.delivery.search.wkType'),
minWidth: 120,
showOverflowTooltip: true,
formatter: (row) => row.wkTypeLabel || '--'
},
{
prop: 'source',
- label: '鍗曟嵁鏉ユ簮',
+ label: $t('pages.orders.delivery.search.source'),
minWidth: 140,
showOverflowTooltip: true,
formatter: (row) => row.source || '--'
},
{
prop: 'anfme',
- label: '搴旀敹鏁伴噺',
+ label: $t('pages.orders.delivery.table.anfme'),
width: 110,
align: 'right',
formatter: (row) => row.anfme ?? '--'
},
{
prop: 'workQty',
- label: '鎵ц涓暟閲�',
+ label: $t('pages.orders.delivery.table.workQty'),
width: 110,
align: 'right',
formatter: (row) => row.workQty ?? '--'
},
{
prop: 'qty',
- label: '瀹炴敹鏁伴噺',
+ label: $t('pages.orders.delivery.table.qty'),
width: 110,
align: 'right',
formatter: (row) => row.qty ?? '--'
},
{
prop: 'platCode',
- label: '骞冲彴鍗曞彿',
+ label: $t('pages.orders.delivery.table.platCode'),
minWidth: 140,
showOverflowTooltip: true,
formatter: (row) => row.platCode || '--'
},
{
prop: 'status',
- label: '鐘舵��',
+ label: $t('pages.orders.transfer.search.status'),
width: 96,
align: 'center',
formatter: (row) =>
@@ -80,7 +81,7 @@
},
{
prop: 'exceStatusText',
- label: '鎵ц鐘舵��',
+ label: $t('pages.orders.delivery.search.exceStatus'),
minWidth: 120,
showOverflowTooltip: true,
formatter: (row) =>
@@ -88,28 +89,28 @@
},
{
prop: 'startTimeText',
- label: '璁″垝鍑哄簱鏃堕棿',
+ label: $t('pages.orders.delivery.table.startTime'),
minWidth: 170,
showOverflowTooltip: true,
formatter: (row) => row.startTimeText || '--'
},
{
prop: 'endTimeText',
- label: '璁″垝鍑哄簱缁撴潫鏃堕棿',
+ label: $t('pages.orders.delivery.table.endTime'),
minWidth: 170,
showOverflowTooltip: true,
formatter: (row) => row.endTimeText || '--'
},
{
prop: 'memo',
- label: '澶囨敞',
+ label: $t('pages.orders.delivery.search.memo'),
minWidth: 180,
showOverflowTooltip: true,
formatter: (row) => row.memo || '--'
},
{
prop: 'operation',
- label: '鎿嶄綔',
+ label: $t('table.operation'),
width: 120,
align: 'center',
fixed: 'right',
diff --git a/rsf-design/src/views/orders/delivery/index.vue b/rsf-design/src/views/orders/delivery/index.vue
index f3ec265..ef9ee74 100644
--- a/rsf-design/src/views/orders/delivery/index.vue
+++ b/rsf-design/src/views/orders/delivery/index.vue
@@ -56,6 +56,7 @@
<script setup>
import { computed, reactive, ref } from 'vue'
import { useRouter } from 'vue-router'
+ import { useI18n } from 'vue-i18n'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useUserStore } from '@/store/modules/user'
import { useTable } from '@/hooks/core/useTable'
@@ -89,7 +90,8 @@
const userStore = useUserStore()
const router = useRouter()
- const reportTitle = 'DO鍗曟姤琛�'
+ const { t } = useI18n()
+ const reportTitle = t('pages.orders.delivery.reportTitle')
const searchForm = ref(createDeliverySearchState())
const selectedRows = ref([])
const detailDrawerVisible = ref(false)
@@ -107,75 +109,75 @@
const reportQueryParams = computed(() => buildDeliverySearchParams(searchForm.value))
const searchItems = computed(() => [
{
- label: '鍏抽敭瀛�',
+ label: t('pages.orders.delivery.search.condition'),
key: 'condition',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ュ崟鍙�/ERP涓诲崟鏍囪瘑/骞冲彴鍗曞彿'
+ placeholder: t('pages.orders.delivery.placeholder.condition')
}
},
{
- label: '鍗曞彿',
+ label: t('pages.orders.delivery.search.code'),
key: 'code',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ュ崟鍙�'
+ placeholder: t('pages.orders.delivery.placeholder.code')
}
},
{
- label: 'ERP涓诲崟鏍囪瘑',
+ label: t('pages.orders.delivery.search.platId'),
key: 'platId',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏RP涓诲崟鏍囪瘑'
+ placeholder: t('pages.orders.delivery.placeholder.platId')
}
},
{
- label: '鍗曟嵁绫诲瀷',
+ label: t('pages.orders.delivery.search.type'),
key: 'type',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ュ崟鎹被鍨�'
+ placeholder: t('pages.orders.delivery.placeholder.type')
}
},
{
- label: '涓氬姟绫诲瀷',
+ label: t('pages.orders.delivery.search.wkType'),
key: 'wkType',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ヤ笟鍔$被鍨�'
+ placeholder: t('pages.orders.delivery.placeholder.wkType')
}
},
{
- label: '鍗曟嵁鏉ユ簮',
+ label: t('pages.orders.delivery.search.source'),
key: 'source',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ュ崟鎹潵婧�'
+ placeholder: t('pages.orders.delivery.placeholder.source')
}
},
{
- label: '鎵ц鐘舵��',
+ label: t('pages.orders.delivery.search.exceStatus'),
key: 'exceStatus',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ユ墽琛岀姸鎬�'
+ placeholder: t('pages.orders.delivery.placeholder.exceStatus')
}
},
{
- label: '澶囨敞',
+ label: t('pages.orders.delivery.search.memo'),
key: 'memo',
type: 'input',
props: {
clearable: true,
- placeholder: '璇疯緭鍏ュ娉�'
+ placeholder: t('pages.orders.delivery.placeholder.memo')
}
}
])
@@ -202,7 +204,7 @@
})
),
{ records: [] },
- { timeoutMessage: '浜ゆ帴鍗曟槑缁嗗姞杞借秴鏃讹紝宸插仠姝㈢瓑寰�' }
+ { timeoutMessage: t('pages.orders.delivery.messages.itemsTimeout') }
)
const normalizedResponse = defaultResponseAdapter(response)
detailItemRows.value = normalizedResponse.records.map((item) => normalizeDeliveryItemRow(item))
@@ -220,7 +222,7 @@
const detail = await guardRequestWithMessage(
fetchGetDeliveryDetail(row.id),
{},
- { timeoutMessage: '浜ゆ帴鍗曡鎯呭姞杞借秴鏃讹紝宸插仠姝㈢瓑寰�' }
+ { timeoutMessage: t('pages.orders.delivery.messages.detailTimeout') }
)
detailData.value = normalizeDeliveryRow(detail)
} finally {
@@ -240,23 +242,30 @@
await loadDetailItems(row.id)
} catch (error) {
detailDrawerVisible.value = false
- ElMessage.error(error?.message || '鑾峰彇浜ゆ帴鍗曡鎯呭け璐�')
+ ElMessage.error(error?.message || t('pages.orders.delivery.messages.detailLoadFailed'))
}
}
async function handleDelete(row) {
try {
- await ElMessageBox.confirm(`纭畾瑕佸垹闄や氦鎺ュ崟銆�${row.code || row.id}銆嶅悧锛焋, '鍒犻櫎纭', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- })
+ await ElMessageBox.confirm(
+ t('crud.confirm.deleteMessage', {
+ entity: t('pages.orders.delivery.entity'),
+ label: row.code || row.id
+ }),
+ t('crud.confirm.deleteTitle'),
+ {
+ confirmButtonText: t('common.confirm'),
+ cancelButtonText: t('common.cancel'),
+ type: 'warning'
+ }
+ )
await fetchDeleteDelivery(row.id)
- ElMessage.success('鍒犻櫎鎴愬姛')
+ ElMessage.success(t('crud.messages.deleteSuccess'))
await refreshRemove()
} catch (error) {
if (error !== 'cancel') {
- ElMessage.error(error?.message || '鍒犻櫎澶辫触')
+ ElMessage.error(error?.message || t('crud.messages.deleteFailed'))
}
}
}
diff --git a/rsf-design/src/views/orders/delivery/modules/delivery-detail-drawer.vue b/rsf-design/src/views/orders/delivery/modules/delivery-detail-drawer.vue
index 920a6ee..c4d9981 100644
--- a/rsf-design/src/views/orders/delivery/modules/delivery-detail-drawer.vue
+++ b/rsf-design/src/views/orders/delivery/modules/delivery-detail-drawer.vue
@@ -1,7 +1,7 @@
<template>
<ElDrawer
:model-value="visible"
- title="浜ゆ帴鍗曡鎯�"
+ :title="t('pages.orders.delivery.detail.title')"
size="1180px"
destroy-on-close
@update:model-value="handleVisibleChange"
@@ -11,42 +11,42 @@
<ElSkeleton :rows="12" animated />
</div>
<div v-else class="space-y-4">
- <ElDescriptions title="鍩虹淇℃伅" :column="2" border>
- <ElDescriptionsItem label="浜ゆ帴鍗曞彿">{{ detail.code || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="ERP涓诲崟鏍囪瘑">{{ detail.platId || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="骞冲彴鍗曞彿">{{ detail.platCode || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鍗曟嵁绫诲瀷">{{ detail.typeLabel || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="涓氬姟绫诲瀷">{{ detail.wkTypeLabel || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鍗曟嵁鏉ユ簮">{{ detail.source || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="搴旀敹鏁伴噺">{{ detail.anfme ?? '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="瀹炴敹鏁伴噺">{{ detail.qty ?? '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鎵ц涓暟閲�">{{ detail.workQty ?? '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鐘舵��">
+ <ElDescriptions :title="t('pages.orders.delivery.detail.baseInfo')" :column="2" border>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.code')">{{ detail.code || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.platId')">{{ detail.platId || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.platCode')">{{ detail.platCode || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.type')">{{ detail.typeLabel || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.wkType')">{{ detail.wkTypeLabel || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.source')">{{ detail.source || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.anfme')">{{ detail.anfme ?? '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.qty')">{{ detail.qty ?? '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.workQty')">{{ detail.workQty ?? '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.status')">
<ElTag :type="detail.statusType || 'info'" effect="light">
{{ detail.statusText || '--' }}
</ElTag>
</ElDescriptionsItem>
- <ElDescriptionsItem label="鎵ц鐘舵��">
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.exceStatus')">
<ElTag :type="detail.exceStatusTagType || 'info'" effect="light">
{{ detail.exceStatusText || '--' }}
</ElTag>
</ElDescriptionsItem>
- <ElDescriptionsItem label="澶囨敞" :span="2">{{ detail.memo || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="璁″垝鍑哄簱鏃堕棿">{{ detail.startTimeText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="璁″垝鍑哄簱缁撴潫鏃堕棿">{{ detail.endTimeText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.memo')" :span="2">{{ detail.memo || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.startTime')">{{ detail.startTimeText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.endTime')">{{ detail.endTimeText || '--' }}</ElDescriptionsItem>
</ElDescriptions>
- <ElDescriptions title="瀹¤淇℃伅" :column="2" border>
- <ElDescriptionsItem label="鍒涘缓浜�">{{ detail.createByText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鍒涘缓鏃堕棿">{{ detail.createTimeText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鏇存柊浜�">{{ detail.updateByText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鏇存柊鏃堕棿">{{ detail.updateTimeText || '--' }}</ElDescriptionsItem>
+ <ElDescriptions :title="t('pages.orders.delivery.detail.auditInfo')" :column="2" border>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.createBy')">{{ detail.createByText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.createTime')">{{ detail.createTimeText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.updateBy')">{{ detail.updateByText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.delivery.detail.updateTime')">{{ detail.updateTimeText || '--' }}</ElDescriptionsItem>
</ElDescriptions>
<div class="space-y-3">
<div class="flex items-center justify-between">
- <div class="text-sm font-medium text-[var(--art-gray-900)]">浜ゆ帴鍗曟槑缁�</div>
- <ElTag effect="plain">鍏� {{ itemRows.length }} 鏉�</ElTag>
+ <div class="text-sm font-medium text-[var(--art-gray-900)]">{{ t('pages.orders.delivery.detail.items') }}</div>
+ <ElTag effect="plain">{{ t('pages.orders.delivery.detail.count', { count: itemRows.length }) }}</ElTag>
</div>
<ArtTable
:loading="itemsLoading"
@@ -64,9 +64,11 @@
<script setup>
import { computed } from 'vue'
+ import { useI18n } from 'vue-i18n'
import ArtTable from '@/components/core/tables/art-table/index.vue'
defineOptions({ name: 'DeliveryDetailDrawer' })
+ const { t } = useI18n()
const props = defineProps({
visible: { type: Boolean, default: false },
@@ -80,88 +82,88 @@
const emit = defineEmits(['update:visible', 'size-change', 'current-change'])
const itemColumns = [
- { type: 'globalIndex', label: '搴忓彿', width: 72, align: 'center' },
+ { type: 'globalIndex', label: t('table.index'), width: 72, align: 'center' },
{
prop: 'deliveryCode',
- label: '浜ゆ帴鍗曞彿',
+ label: t('pages.orders.delivery.table.deliveryCode'),
minWidth: 160,
showOverflowTooltip: true
},
{
prop: 'platItemId',
- label: '骞冲彴琛屽彿',
+ label: t('pages.orders.delivery.table.platItemId'),
minWidth: 130,
showOverflowTooltip: true
},
{
prop: 'matnrCode',
- label: '鐗╂枡缂栫爜',
+ label: t('pages.orders.delivery.table.matnrCode'),
minWidth: 150,
showOverflowTooltip: true
},
{
prop: 'maktx',
- label: '鐗╂枡鍚嶇О',
+ label: t('pages.orders.delivery.table.maktx'),
minWidth: 220,
showOverflowTooltip: true
},
{
prop: 'fieldsIndex',
- label: '鍔ㄦ�佸瓧娈电储寮�',
+ label: t('pages.orders.delivery.table.fieldsIndex'),
minWidth: 150,
showOverflowTooltip: true
},
{
prop: 'unit',
- label: '鍗曚綅',
+ label: t('table.unit'),
width: 90,
align: 'center'
},
{
prop: 'anfme',
- label: '鏁伴噺',
+ label: t('pages.orders.delivery.table.anfme'),
width: 110,
align: 'right'
},
{
prop: 'workQty',
- label: '鎵ц鏁伴噺',
+ label: t('pages.orders.delivery.table.workQty'),
width: 110,
align: 'right'
},
{
prop: 'qty',
- label: '宸插嚭鏁伴噺',
+ label: t('pages.orders.delivery.table.qty'),
width: 110,
align: 'right'
},
{
prop: 'nromQty',
- label: '鏍囧噯鍖呰',
+ label: t('pages.orders.delivery.table.nromQty'),
width: 110,
align: 'right'
},
{
prop: 'printQty',
- label: '鎵撳嵃鏁伴噺',
+ label: t('pages.orders.delivery.table.printQty'),
width: 110,
align: 'right'
},
{
prop: 'splrName',
- label: '渚涘簲鍟嗗悕绉�',
+ label: t('pages.orders.delivery.table.splrName'),
minWidth: 180,
showOverflowTooltip: true
},
{
prop: 'splrCode',
- label: '渚涘簲鍟嗙紪鐮�',
+ label: t('pages.orders.delivery.table.splrCode'),
minWidth: 140,
showOverflowTooltip: true
},
{
prop: 'splrBatch',
- label: '渚涘簲鍟嗘壒娆�',
+ label: t('pages.orders.delivery.table.splrBatch'),
minWidth: 140,
showOverflowTooltip: true
}
diff --git a/rsf-design/src/views/orders/transfer/index.vue b/rsf-design/src/views/orders/transfer/index.vue
index 8a42133..618f804 100644
--- a/rsf-design/src/views/orders/transfer/index.vue
+++ b/rsf-design/src/views/orders/transfer/index.vue
@@ -12,7 +12,7 @@
<ArtTableHeader v-model:columns="columnChecks" :loading="loading" @refresh="refreshData">
<template #left>
<ElSpace wrap>
- <ElButton v-if="canCreate" type="primary" @click="showDialog('add')" v-ripple>鏂板璋冩嫧鍗�</ElButton>
+ <ElButton v-if="canCreate" type="primary" @click="showDialog('add')" v-ripple>{{ t('pages.orders.transfer.actions.add') }}</ElButton>
<ElButton
v-if="canDelete"
type="danger"
@@ -20,7 +20,7 @@
@click="handleBatchDelete"
v-ripple
>
- 鎵归噺鍒犻櫎
+ {{ t('common.actions.batchDelete') }}
</ElButton>
<ListExportPrint
class="inline-flex"
@@ -78,6 +78,7 @@
<script setup>
import { computed, onMounted, reactive, ref } from 'vue'
import { useRouter } from 'vue-router'
+ import { useI18n } from 'vue-i18n'
import { ElMessage, ElMessageBox } from 'element-plus'
import { useAuth } from '@/hooks/core/useAuth'
import { useUserStore } from '@/store/modules/user'
@@ -131,6 +132,7 @@
const { hasAuth } = useAuth()
const userStore = useUserStore()
const router = useRouter()
+ const { t } = useI18n()
const reportTitle = TRANSFER_REPORT_TITLE
const searchForm = ref(createTransferSearchState())
@@ -157,37 +159,37 @@
const reportQueryParams = computed(() => buildTransferSearchParams(searchForm.value))
const searchItems = computed(() => [
- { label: '鍏抽敭瀛�', key: 'condition', type: 'input', props: { clearable: true, placeholder: '璇疯緭鍏ュ崟鍙�/澶囨敞/浠撳簱/搴撳尯' } },
- { label: '璋冩嫧鍗曞彿', key: 'code', type: 'input', props: { clearable: true, placeholder: '璇疯緭鍏ヨ皟鎷ㄥ崟鍙�' } },
+ { label: t('pages.orders.transfer.search.condition'), key: 'condition', type: 'input', props: { clearable: true, placeholder: t('pages.orders.transfer.placeholder.condition') } },
+ { label: t('pages.orders.transfer.search.code'), key: 'code', type: 'input', props: { clearable: true, placeholder: t('pages.orders.transfer.placeholder.code') } },
{
- label: '璋冩嫧绫诲瀷',
+ label: t('pages.orders.transfer.search.type'),
key: 'type',
type: 'select',
props: { clearable: true, filterable: true, options: typeOptions.value }
},
{
- label: '鏉ユ簮',
+ label: t('pages.orders.transfer.search.source'),
key: 'source',
type: 'select',
props: { clearable: true, options: getTransferSourceOptions() }
},
{
- label: '鎵ц鐘舵��',
+ label: t('pages.orders.transfer.search.exceStatus'),
key: 'exceStatus',
type: 'select',
props: { clearable: true, options: getTransferExceStatusOptions() }
},
- { label: '婧愪粨搴�', key: 'orgWareName', type: 'input', props: { clearable: true, placeholder: '璇疯緭鍏ユ簮浠撳簱' } },
- { label: '鐩爣浠撳簱', key: 'tarWareName', type: 'input', props: { clearable: true, placeholder: '璇疯緭鍏ョ洰鏍囦粨搴�' } },
- { label: '婧愬簱鍖�', key: 'orgAreaName', type: 'input', props: { clearable: true, placeholder: '璇疯緭鍏ユ簮搴撳尯' } },
- { label: '鐩爣搴撳尯', key: 'tarAreaName', type: 'input', props: { clearable: true, placeholder: '璇疯緭鍏ョ洰鏍囧簱鍖�' } },
+ { label: t('pages.orders.transfer.search.orgWareName'), key: 'orgWareName', type: 'input', props: { clearable: true, placeholder: t('pages.orders.transfer.placeholder.orgWareName') } },
+ { label: t('pages.orders.transfer.search.tarWareName'), key: 'tarWareName', type: 'input', props: { clearable: true, placeholder: t('pages.orders.transfer.placeholder.tarWareName') } },
+ { label: t('pages.orders.transfer.search.orgAreaName'), key: 'orgAreaName', type: 'input', props: { clearable: true, placeholder: t('pages.orders.transfer.placeholder.orgAreaName') } },
+ { label: t('pages.orders.transfer.search.tarAreaName'), key: 'tarAreaName', type: 'input', props: { clearable: true, placeholder: t('pages.orders.transfer.placeholder.tarAreaName') } },
{
- label: '鐘舵��',
+ label: t('pages.orders.transfer.search.status'),
key: 'status',
type: 'select',
props: { clearable: true, options: getTransferStatusOptions() }
},
- { label: '澶囨敞', key: 'memo', type: 'input', props: { clearable: true, placeholder: '璇疯緭鍏ュ娉�' } }
+ { label: t('pages.orders.transfer.search.memo'), key: 'memo', type: 'input', props: { clearable: true, placeholder: t('pages.orders.transfer.placeholder.memo') } }
])
function handleSelectionChange(rows) {
@@ -201,7 +203,7 @@
const response = await guardRequestWithMessage(
fetchTransferDetail(transferId),
{},
- { timeoutMessage: '璋冩嫧鍗曡鎯呭姞杞借秴鏃讹紝宸插仠姝㈢瓑寰�' }
+ { timeoutMessage: t('pages.orders.transfer.messages.detailTimeout') }
)
detailData.value = normalizeTransferDetailRecord(response)
} finally {
@@ -221,7 +223,7 @@
})
),
{ records: [], total: 0, current: detailOrderPagination.current, size: detailOrderPagination.size },
- { timeoutMessage: '鍏宠仈鍗曟嵁鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟' }
+ { timeoutMessage: t('pages.orders.transfer.messages.ordersTimeout') }
)
const normalized = defaultResponseAdapter(response)
detailOrderRows.value = normalized.records.map((item) => normalizeTransferOrderRow(item))
@@ -231,7 +233,7 @@
} catch (error) {
detailOrderRows.value = []
detailOrderPagination.total = 0
- ElMessage.error(error?.message || '鑾峰彇鍏宠仈鍗曟嵁澶辫触')
+ ElMessage.error(error?.message || t('pages.orders.transfer.messages.ordersLoadFailed'))
} finally {
detailOrdersLoading.value = false
}
@@ -252,7 +254,7 @@
detailDrawerVisible.value = false
detailData.value = {}
detailOrderRows.value = []
- ElMessage.error(error?.message || '鑾峰彇璋冩嫧鍗曡鎯呭け璐�')
+ ElMessage.error(error?.message || t('pages.orders.transfer.messages.detailLoadFailed'))
}
}
@@ -261,26 +263,26 @@
const detail = await guardRequestWithMessage(
fetchTransferDetail(row.id),
{},
- { timeoutMessage: '璋冩嫧鍗曡鎯呭姞杞借秴鏃讹紝宸插仠姝㈢瓑寰�' }
+ { timeoutMessage: t('pages.orders.transfer.messages.detailTimeout') }
)
showDialog('edit', detail)
} catch (error) {
- ElMessage.error(error?.message || '鑾峰彇璋冩嫧鍗曡鎯呭け璐�')
+ ElMessage.error(error?.message || t('pages.orders.transfer.messages.detailLoadFailed'))
}
}
async function handlePublish(row) {
try {
- await ElMessageBox.confirm(`纭畾瑕佷笅鍙戣皟鎷ㄥ崟銆�${row.code || row.id}銆嶅悧锛焋, '涓嬪彂纭', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
+ await ElMessageBox.confirm(t('pages.orders.transfer.messages.publishConfirm', { code: row.code || row.id }), t('pages.orders.transfer.messages.publishTitle'), {
+ confirmButtonText: t('common.confirm'),
+ cancelButtonText: t('common.cancel'),
type: 'warning'
})
const response = await fetchTransferPubOutStock({ id: row.id })
if (response?.code !== 200 && response?.success !== true) {
- throw new Error(response?.message || '涓嬪彂鎵ц澶辫触')
+ throw new Error(response?.message || t('pages.orders.transfer.messages.publishFailed'))
}
- ElMessage.success(response?.message || '涓嬪彂鎵ц鎴愬姛')
+ ElMessage.success(response?.message || t('pages.orders.transfer.messages.publishSuccess'))
await refreshData()
if (detailDrawerVisible.value && activeTransferId.value === row.id) {
await loadTransferDetail(row.id)
@@ -288,7 +290,7 @@
}
} catch (error) {
if (error === 'cancel' || error?.message === 'cancel') return
- ElMessage.error(error?.message || '涓嬪彂鎵ц澶辫触')
+ ElMessage.error(error?.message || t('pages.orders.transfer.messages.publishFailed'))
}
}
@@ -368,7 +370,7 @@
saveRequest: fetchSaveTransfer,
updateRequest: fetchUpdateTransfer,
deleteRequest: fetchDeleteTransfer,
- entityName: '璋冩嫧鍗�',
+ entityName: t('pages.orders.transfer.entity'),
resolveRecordLabel: (record) => record?.code || record?.id,
refreshCreate,
refreshUpdate,
@@ -387,7 +389,7 @@
const response = await guardRequestWithMessage(
fetchDictDataPage({ current: 1, pageSize: 200, dictTypeCode: 'sys_transfer_type', status: 1 }),
{ records: [] },
- { timeoutMessage: '璋冩嫧绫诲瀷閫夐」鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟' }
+ { timeoutMessage: t('pages.orders.transfer.messages.typeOptionsTimeout') }
)
typeOptions.value = resolveTransferTypeOptions(defaultResponseAdapter(response).records)
}
@@ -396,7 +398,7 @@
const response = await guardRequestWithMessage(
fetchWarehouseAreasList(),
{ records: [] },
- { timeoutMessage: '搴撳尯閫夐」鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟' }
+ { timeoutMessage: t('pages.orders.transfer.messages.areaOptionsTimeout') }
)
areaOptions.value = resolveTransferAreaOptions(defaultResponseAdapter(response).records)
}
diff --git a/rsf-design/src/views/orders/transfer/modules/transfer-detail-drawer.vue b/rsf-design/src/views/orders/transfer/modules/transfer-detail-drawer.vue
index 21fe181..0cff854 100644
--- a/rsf-design/src/views/orders/transfer/modules/transfer-detail-drawer.vue
+++ b/rsf-design/src/views/orders/transfer/modules/transfer-detail-drawer.vue
@@ -1,7 +1,7 @@
<template>
<ElDrawer
:model-value="visible"
- title="璋冩嫧鍗曡鎯�"
+ :title="t('pages.orders.transfer.detail.title')"
size="1200px"
destroy-on-close
@update:model-value="handleVisibleChange"
@@ -11,42 +11,42 @@
<ElSkeleton :rows="12" animated />
</div>
<div v-else class="space-y-4">
- <ElDescriptions title="鍩虹淇℃伅" :column="2" border>
- <ElDescriptionsItem label="璋冩嫧鍗曞彿">{{ detail.code || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="璋冩嫧绫诲瀷">{{ detail.typeLabel || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鏉ユ簮">
+ <ElDescriptions :title="t('pages.orders.transfer.detail.baseInfo')" :column="2" border>
+ <ElDescriptionsItem :label="t('pages.orders.transfer.detail.code')">{{ detail.code || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.transfer.detail.type')">{{ detail.typeLabel || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.transfer.detail.source')">
<ElTag :type="detail.sourceTagType || 'info'" effect="light">
{{ detail.sourceText || '--' }}
</ElTag>
</ElDescriptionsItem>
- <ElDescriptionsItem label="鎵ц鐘舵��">
+ <ElDescriptionsItem :label="t('pages.orders.transfer.detail.exceStatus')">
<ElTag :type="detail.exceStatusTagType || 'info'" effect="light">
{{ detail.exceStatusText || '--' }}
</ElTag>
</ElDescriptionsItem>
- <ElDescriptionsItem label="婧愪粨搴�">{{ detail.orgWareName || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鐩爣浠撳簱">{{ detail.tarWareName || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="婧愬簱鍖�">{{ detail.orgAreaName || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鐩爣搴撳尯">{{ detail.tarAreaName || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鐘舵��">
+ <ElDescriptionsItem :label="t('pages.orders.transfer.detail.orgWareName')">{{ detail.orgWareName || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.transfer.detail.tarWareName')">{{ detail.tarWareName || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.transfer.detail.orgAreaName')">{{ detail.orgAreaName || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.transfer.detail.tarAreaName')">{{ detail.tarAreaName || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.transfer.detail.status')">
<ElTag :type="detail.statusType || 'info'" effect="light">
{{ detail.statusText || '--' }}
</ElTag>
</ElDescriptionsItem>
- <ElDescriptionsItem label="澶囨敞" :span="2">{{ detail.memo || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.transfer.detail.memo')" :span="2">{{ detail.memo || '--' }}</ElDescriptionsItem>
</ElDescriptions>
- <ElDescriptions title="瀹¤淇℃伅" :column="2" border>
- <ElDescriptionsItem label="鍒涘缓浜�">{{ detail.createByText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鍒涘缓鏃堕棿">{{ detail.createTimeText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鏇存柊浜�">{{ detail.updateByText || '--' }}</ElDescriptionsItem>
- <ElDescriptionsItem label="鏇存柊鏃堕棿">{{ detail.updateTimeText || '--' }}</ElDescriptionsItem>
+ <ElDescriptions :title="t('pages.orders.transfer.detail.auditInfo')" :column="2" border>
+ <ElDescriptionsItem :label="t('pages.orders.transfer.detail.createBy')">{{ detail.createByText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.transfer.detail.createTime')">{{ detail.createTimeText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.transfer.detail.updateBy')">{{ detail.updateByText || '--' }}</ElDescriptionsItem>
+ <ElDescriptionsItem :label="t('pages.orders.transfer.detail.updateTime')">{{ detail.updateTimeText || '--' }}</ElDescriptionsItem>
</ElDescriptions>
<div class="space-y-3">
<div class="flex items-center justify-between">
- <div class="text-sm font-medium text-[var(--art-gray-900)]">鍏宠仈鍗曟嵁</div>
- <ElTag effect="plain">鍏� {{ orderRows.length }} 鏉�</ElTag>
+ <div class="text-sm font-medium text-[var(--art-gray-900)]">{{ t('pages.orders.transfer.detail.relatedOrders') }}</div>
+ <ElTag effect="plain">{{ t('common.count', { count: orderRows.length }) }}</ElTag>
</div>
<ArtTable
:loading="ordersLoading"
@@ -64,6 +64,7 @@
<script setup>
import { computed } from 'vue'
+ import { useI18n } from 'vue-i18n'
import ArtTable from '@/components/core/tables/art-table/index.vue'
import { createTransferOrderTableColumns } from '../transferTable.columns.js'
@@ -79,6 +80,7 @@
})
const emit = defineEmits(['update:visible', 'size-change', 'current-change'])
+ const { t } = useI18n()
const orderColumns = createTransferOrderTableColumns()
diff --git a/rsf-design/src/views/orders/transfer/modules/transfer-dialog.vue b/rsf-design/src/views/orders/transfer/modules/transfer-dialog.vue
index 9b14805..43e6a52 100644
--- a/rsf-design/src/views/orders/transfer/modules/transfer-dialog.vue
+++ b/rsf-design/src/views/orders/transfer/modules/transfer-dialog.vue
@@ -1,40 +1,6 @@
-<template>
- <ElDialog
- :title="dialogTitle"
- :model-value="visible"
- width="760px"
- align-center
- destroy-on-close
- @update:model-value="handleCancel"
- @closed="handleClosed"
- >
- <div class="mb-3 rounded-lg border border-[var(--art-border-color)] bg-[var(--art-bg-color)] px-3 py-2 text-xs text-[var(--art-text-gray-600)]">
- 璋冩嫧鍗曞彿鐢辩郴缁熺敓鎴愶紝鏂板鏃跺彧闇�缁存姢璋冩嫧绫诲瀷銆佹簮/鐩爣搴撳尯鍜屽娉ㄣ��
- </div>
-
- <ArtForm
- ref="formRef"
- v-model="form"
- :items="formItems"
- :rules="rules"
- :span="12"
- :gutter="20"
- label-width="110px"
- :show-reset="false"
- :show-submit="false"
- />
-
- <template #footer>
- <span class="dialog-footer">
- <ElButton @click="handleCancel">鍙栨秷</ElButton>
- <ElButton type="primary" :loading="submitLoading" @click="handleSubmit">纭畾</ElButton>
- </span>
- </template>
- </ElDialog>
-</template>
-
<script setup>
import { computed, nextTick, reactive, ref, watch } from 'vue'
+ import { useI18n } from 'vue-i18n'
import ArtForm from '@/components/core/forms/art-form/index.vue'
import {
buildTransferDialogModel,
@@ -54,79 +20,82 @@
const emit = defineEmits(['update:visible', 'submit'])
const formRef = ref()
const form = reactive(createTransferFormState())
+ const { t } = useI18n()
const isEdit = computed(() => props.dialogType === 'edit')
- const dialogTitle = computed(() => (isEdit.value ? '缂栬緫璋冩嫧鍗�' : '鏂板璋冩嫧鍗�'))
+ const dialogTitle = computed(() =>
+ isEdit.value ? t('pages.orders.transfer.dialog.titleEdit') : t('pages.orders.transfer.dialog.titleAdd')
+ )
const rules = computed(() => ({
- type: [{ required: true, message: '璇烽�夋嫨璋冩嫧绫诲瀷', trigger: 'change' }],
- orgAreaId: [{ required: true, message: '璇烽�夋嫨婧愬簱鍖�', trigger: 'change' }],
- tarAreaId: [{ required: true, message: '璇烽�夋嫨鐩爣搴撳尯', trigger: 'change' }]
+ type: [{ required: true, message: t('pages.orders.transfer.dialog.validation.type'), trigger: 'change' }],
+ orgAreaId: [{ required: true, message: t('pages.orders.transfer.dialog.validation.orgAreaId'), trigger: 'change' }],
+ tarAreaId: [{ required: true, message: t('pages.orders.transfer.dialog.validation.tarAreaId'), trigger: 'change' }]
}))
const formItems = computed(() => [
{
- label: '璋冩嫧鍗曞彿',
+ label: t('pages.orders.transfer.dialog.code'),
key: 'code',
type: 'input',
span: 24,
props: {
disabled: true,
- placeholder: '淇濆瓨鍚庤嚜鍔ㄧ敓鎴�'
+ placeholder: t('pages.orders.transfer.dialog.placeholderCode')
}
},
{
- label: '璋冩嫧绫诲瀷',
+ label: t('pages.orders.transfer.dialog.type'),
key: 'type',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨璋冩嫧绫诲瀷',
+ placeholder: t('pages.orders.transfer.dialog.placeholderType'),
clearable: true,
filterable: true,
options: props.typeOptions
}
},
{
- label: '婧愬簱鍖�',
+ label: t('pages.orders.transfer.dialog.orgAreaId'),
key: 'orgAreaId',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨婧愬簱鍖�',
+ placeholder: t('pages.orders.transfer.dialog.placeholderOrgAreaId'),
clearable: true,
filterable: true,
options: props.areaOptions
}
},
{
- label: '鐩爣搴撳尯',
+ label: t('pages.orders.transfer.dialog.tarAreaId'),
key: 'tarAreaId',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨鐩爣搴撳尯',
+ placeholder: t('pages.orders.transfer.dialog.placeholderTarAreaId'),
clearable: true,
filterable: true,
options: props.areaOptions
}
},
{
- label: '鐘舵��',
+ label: t('pages.orders.transfer.dialog.status'),
key: 'status',
type: 'select',
props: {
- placeholder: '璇烽�夋嫨鐘舵��',
+ placeholder: t('pages.orders.transfer.dialog.placeholderStatus'),
clearable: true,
options: getTransferStatusOptions()
}
},
{
- label: '澶囨敞',
+ label: t('pages.orders.transfer.dialog.memo'),
key: 'memo',
type: 'input',
span: 24,
props: {
type: 'textarea',
rows: 3,
- placeholder: '璇疯緭鍏ュ娉�',
+ placeholder: t('pages.orders.transfer.dialog.placeholderMemo'),
clearable: true
}
}
@@ -182,3 +151,38 @@
{ deep: true }
)
</script>
+
+<template>
+ <ElDialog
+ :title="dialogTitle"
+ :model-value="visible"
+ width="760px"
+ align-center
+ destroy-on-close
+ @update:model-value="handleCancel"
+ @closed="handleClosed"
+ >
+ <div class="mb-3 rounded-lg border border-[var(--art-border-color)] bg-[var(--art-bg-color)] px-3 py-2 text-xs text-[var(--art-text-gray-600)]">
+ {{ t('pages.orders.transfer.dialog.tip') }}
+ </div>
+
+ <ArtForm
+ ref="formRef"
+ v-model="form"
+ :items="formItems"
+ :rules="rules"
+ :span="12"
+ :gutter="20"
+ label-width="110px"
+ :show-reset="false"
+ :show-submit="false"
+ />
+
+ <template #footer>
+ <span class="dialog-footer">
+ <ElButton @click="handleCancel">{{ t('common.cancel') }}</ElButton>
+ <ElButton type="primary" :loading="submitLoading" @click="handleSubmit">{{ t('common.confirm') }}</ElButton>
+ </span>
+ </template>
+ </ElDialog>
+</template>
diff --git a/rsf-design/src/views/orders/transfer/transferPage.helpers.js b/rsf-design/src/views/orders/transfer/transferPage.helpers.js
index 0d11a6a..d3fdeb3 100644
--- a/rsf-design/src/views/orders/transfer/transferPage.helpers.js
+++ b/rsf-design/src/views/orders/transfer/transferPage.helpers.js
@@ -1,22 +1,24 @@
+import { $t } from '@/locales'
+
const TRANSFER_SOURCE_META = {
- 1: { text: 'ERP绯荤粺', type: 'info' },
- 2: { text: 'WMS绯荤粺鐢熸垚', type: 'primary' },
- 3: { text: 'EXCEL瀵煎叆', type: 'warning' },
- 4: { text: 'QMS绯荤粺', type: 'success' }
+ 1: { text: $t('pages.orders.transfer.status.sourceErp'), type: 'info' },
+ 2: { text: $t('pages.orders.transfer.status.sourceWms'), type: 'primary' },
+ 3: { text: $t('pages.orders.transfer.status.sourceExcel'), type: 'warning' },
+ 4: { text: $t('pages.orders.transfer.status.sourceQms'), type: 'success' }
}
const TRANSFER_EXCE_STATUS_META = {
- 0: { text: '鏈墽琛�', type: 'info' },
- 1: { text: '鎵ц涓�', type: 'warning' },
- 2: { text: '鎵ц瀹屾垚', type: 'success' }
+ 0: { text: $t('pages.orders.transfer.status.pending'), type: 'info' },
+ 1: { text: $t('pages.orders.transfer.status.running'), type: 'warning' },
+ 2: { text: $t('pages.orders.transfer.status.completed'), type: 'success' }
}
const TRANSFER_STATUS_META = {
- 1: { text: '姝e父', type: 'success', bool: true },
- 0: { text: '鍐荤粨', type: 'danger', bool: false }
+ 1: { text: $t('pages.orders.transfer.status.normal'), type: 'success', bool: true },
+ 0: { text: $t('pages.orders.transfer.status.frozen'), type: 'danger', bool: false }
}
-export const TRANSFER_REPORT_TITLE = '璋冩嫧鍗曟姤琛�'
+export const TRANSFER_REPORT_TITLE = $t('pages.orders.transfer.reportTitle')
export const TRANSFER_REPORT_STYLE = {
titleAlign: 'center',
titleLevel: 'strong',
@@ -102,25 +104,25 @@
export function getTransferSourceOptions() {
return [
- { label: 'ERP绯荤粺', value: 1 },
- { label: 'WMS绯荤粺鐢熸垚', value: 2 },
- { label: 'EXCEL瀵煎叆', value: 3 },
- { label: 'QMS绯荤粺', value: 4 }
+ { label: $t('pages.orders.transfer.status.sourceErp'), value: 1 },
+ { label: $t('pages.orders.transfer.status.sourceWms'), value: 2 },
+ { label: $t('pages.orders.transfer.status.sourceExcel'), value: 3 },
+ { label: $t('pages.orders.transfer.status.sourceQms'), value: 4 }
]
}
export function getTransferStatusOptions() {
return [
- { label: '姝e父', value: 1 },
- { label: '鍐荤粨', value: 0 }
+ { label: $t('pages.orders.transfer.status.normal'), value: 1 },
+ { label: $t('pages.orders.transfer.status.frozen'), value: 0 }
]
}
export function getTransferExceStatusOptions() {
return [
- { label: '鏈墽琛�', value: 0 },
- { label: '鎵ц涓�', value: 1 },
- { label: '鎵ц瀹屾垚', value: 2 }
+ { label: $t('pages.orders.transfer.status.pending'), value: 0 },
+ { label: $t('pages.orders.transfer.status.running'), value: 1 },
+ { label: $t('pages.orders.transfer.status.completed'), value: 2 }
]
}
@@ -217,7 +219,7 @@
}
export function normalizeTransferRow(record = {}) {
- const statusMeta = metaByValue(record.statusBool ?? record.status, TRANSFER_STATUS_META, '鏈煡')
+ const statusMeta = metaByValue(record.statusBool ?? record.status, TRANSFER_STATUS_META, $t('common.status.unknown'))
const exceStatusMeta = metaByValue(record.exceStatus, TRANSFER_EXCE_STATUS_META, record.exceStatusText)
const sourceMeta = metaByValue(record.source, TRANSFER_SOURCE_META, record.sourceText)
return {
@@ -249,7 +251,7 @@
}
export function normalizeTransferOrderRow(record = {}) {
- const statusMeta = metaByValue(record.statusBool ?? record.status, TRANSFER_STATUS_META, '鏈煡')
+ const statusMeta = metaByValue(record.statusBool ?? record.status, TRANSFER_STATUS_META, $t('common.status.unknown'))
const exceStatusMeta = metaByValue(record.exceStatus, TRANSFER_EXCE_STATUS_META, record.exceStatusText)
return {
...record,
@@ -305,13 +307,13 @@
export function getTransferActionList(row = {}) {
const normalizedRow = normalizeTransferRow(row)
const actions = [
- { key: 'view', label: '鏌ョ湅璇︽儏', icon: 'ri:eye-line' },
- { key: 'items', label: '鏄庣粏', icon: 'ri:list-check-3' },
- { key: 'edit', label: '缂栬緫', icon: 'ri:pencil-line' }
+ { key: 'view', label: $t('pages.orders.transfer.actions.view'), icon: 'ri:eye-line' },
+ { key: 'items', label: $t('pages.orders.transfer.actions.items'), icon: 'ri:list-check-3' },
+ { key: 'edit', label: $t('pages.orders.transfer.actions.edit'), icon: 'ri:pencil-line' }
]
if (Number(normalizedRow.exceStatus) === 0) {
- actions.push({ key: 'publish', label: '涓嬪彂鎵ц', icon: 'ri:send-plane-line' })
- actions.push({ key: 'delete', label: '鍒犻櫎', icon: 'ri:delete-bin-5-line', color: 'var(--art-error)' })
+ actions.push({ key: 'publish', label: $t('pages.orders.transfer.actions.publish'), icon: 'ri:send-plane-line' })
+ actions.push({ key: 'delete', label: $t('pages.orders.transfer.actions.delete'), icon: 'ri:delete-bin-5-line', color: 'var(--art-error)' })
}
return actions
}
@@ -325,7 +327,7 @@
if (value === void 0) return null
return {
value,
- label: normalizeText(item.name || item.areaName || item.code || item.warehouseId$ || item.warehouseName || `搴撳尯 ${value}`),
+ label: normalizeText(item.name || item.areaName || item.code || item.warehouseId$ || item.warehouseName || `${$t('menu.warehouseAreas')} ${value}`),
raw: item
}
})
@@ -341,7 +343,7 @@
if (value === void 0) return null
return {
value,
- label: normalizeText(item.label || item.name || item.dictLabel || `绫诲瀷 ${value}`)
+ label: normalizeText(item.label || item.name || item.dictLabel || `${$t('pages.orders.transfer.dialog.type')} ${value}`)
}
})
.filter(Boolean)
diff --git a/rsf-design/src/views/orders/transfer/transferTable.columns.js b/rsf-design/src/views/orders/transfer/transferTable.columns.js
index 3c86829..189e1c8 100644
--- a/rsf-design/src/views/orders/transfer/transferTable.columns.js
+++ b/rsf-design/src/views/orders/transfer/transferTable.columns.js
@@ -1,29 +1,30 @@
import { h } from 'vue'
import { ElTag } from 'element-plus'
+import { $t } from '@/locales'
import ArtButtonMore from '@/components/core/forms/art-button-more/index.vue'
import { getTransferActionList } from './transferPage.helpers.js'
export function createTransferTableColumns({ handleActionClick } = {}) {
return [
{ type: 'selection', width: 48, align: 'center' },
- { type: 'globalIndex', label: '搴忓彿', width: 72, align: 'center' },
+ { type: 'globalIndex', label: $t('table.index'), width: 72, align: 'center' },
{
prop: 'code',
- label: '璋冩嫧鍗曞彿',
+ label: $t('pages.orders.transfer.search.code'),
minWidth: 170,
showOverflowTooltip: true,
formatter: (row) => row.code || '--'
},
{
prop: 'typeLabel',
- label: '璋冩嫧绫诲瀷',
+ label: $t('pages.orders.transfer.search.type'),
minWidth: 120,
showOverflowTooltip: true,
formatter: (row) => row.typeLabel || '--'
},
{
prop: 'sourceText',
- label: '鏉ユ簮',
+ label: $t('pages.orders.transfer.search.source'),
minWidth: 120,
showOverflowTooltip: true,
formatter: (row) =>
@@ -31,42 +32,42 @@
},
{
prop: 'orgWareName',
- label: '婧愪粨搴�',
+ label: $t('pages.orders.transfer.search.orgWareName'),
minWidth: 160,
showOverflowTooltip: true,
formatter: (row) => row.orgWareName || '--'
},
{
prop: 'tarWareName',
- label: '鐩爣浠撳簱',
+ label: $t('pages.orders.transfer.search.tarWareName'),
minWidth: 160,
showOverflowTooltip: true,
formatter: (row) => row.tarWareName || '--'
},
{
prop: 'orgAreaName',
- label: '婧愬簱鍖�',
+ label: $t('pages.orders.transfer.search.orgAreaName'),
minWidth: 160,
showOverflowTooltip: true,
formatter: (row) => row.orgAreaName || '--'
},
{
prop: 'tarAreaName',
- label: '鐩爣搴撳尯',
+ label: $t('pages.orders.transfer.search.tarAreaName'),
minWidth: 160,
showOverflowTooltip: true,
formatter: (row) => row.tarAreaName || '--'
},
{
prop: 'exceStatusText',
- label: '鎵ц鐘舵��',
+ label: $t('pages.orders.transfer.search.exceStatus'),
minWidth: 120,
formatter: (row) =>
h(ElTag, { type: row.exceStatusTagType || 'info', effect: 'light' }, () => row.exceStatusText || '--')
},
{
prop: 'statusText',
- label: '鐘舵��',
+ label: $t('pages.orders.transfer.search.status'),
width: 96,
align: 'center',
formatter: (row) =>
@@ -74,28 +75,28 @@
},
{
prop: 'updateTimeText',
- label: '鏇存柊鏃堕棿',
+ label: $t('table.updateTime'),
minWidth: 170,
showOverflowTooltip: true,
formatter: (row) => row.updateTimeText || '--'
},
{
prop: 'createTimeText',
- label: '鍒涘缓鏃堕棿',
+ label: $t('table.createTime'),
minWidth: 170,
showOverflowTooltip: true,
formatter: (row) => row.createTimeText || '--'
},
{
prop: 'memo',
- label: '澶囨敞',
+ label: $t('pages.orders.transfer.search.memo'),
minWidth: 180,
showOverflowTooltip: true,
formatter: (row) => row.memo || '--'
},
{
prop: 'operation',
- label: '鎿嶄綔',
+ label: $t('table.operation'),
width: 120,
align: 'center',
fixed: 'right',
@@ -110,45 +111,45 @@
export function createTransferOrderTableColumns() {
return [
- { type: 'globalIndex', label: '搴忓彿', width: 72, align: 'center' },
+ { type: 'globalIndex', label: $t('table.index'), width: 72, align: 'center' },
{
prop: 'code',
- label: '鍏宠仈鍗曞彿',
+ label: $t('pages.orders.transfer.detail.relatedCode'),
minWidth: 170,
showOverflowTooltip: true,
formatter: (row) => row.code || '--'
},
{
prop: 'poCode',
- label: '璋冩嫧鍗曞彿',
+ label: $t('pages.orders.transfer.detail.code'),
minWidth: 170,
showOverflowTooltip: true,
formatter: (row) => row.poCode || '--'
},
{
prop: 'typeLabel',
- label: '鍗曟嵁绫诲瀷',
+ label: $t('pages.orders.transfer.detail.type'),
minWidth: 120,
showOverflowTooltip: true,
formatter: (row) => row.typeLabel || '--'
},
{
prop: 'wkTypeLabel',
- label: '涓氬姟绫诲瀷',
+ label: $t('pages.orders.transfer.detail.wkType'),
minWidth: 120,
showOverflowTooltip: true,
formatter: (row) => row.wkTypeLabel || '--'
},
{
prop: 'exceStatusText',
- label: '鎵ц鐘舵��',
+ label: $t('pages.orders.transfer.detail.exceStatus'),
minWidth: 120,
formatter: (row) =>
h(ElTag, { type: row.exceStatusTagType || 'info', effect: 'light' }, () => row.exceStatusText || '--')
},
{
prop: 'statusText',
- label: '鐘舵��',
+ label: $t('pages.orders.transfer.detail.status'),
width: 96,
align: 'center',
formatter: (row) =>
@@ -156,42 +157,42 @@
},
{
prop: 'anfme',
- label: '鏁伴噺',
+ label: $t('table.quantity'),
width: 110,
align: 'right',
formatter: (row) => row.anfme ?? '--'
},
{
prop: 'workQty',
- label: '鎵ц鏁伴噺',
+ label: $t('pages.orders.transfer.detail.workQty'),
width: 110,
align: 'right',
formatter: (row) => row.workQty ?? '--'
},
{
prop: 'qty',
- label: '宸插畬鎴愭暟閲�',
+ label: $t('pages.orders.transfer.detail.qty'),
width: 110,
align: 'right',
formatter: (row) => row.qty ?? '--'
},
{
prop: 'stationId',
- label: '绔欑偣',
+ label: $t('pages.orders.transfer.detail.stationId'),
minWidth: 120,
showOverflowTooltip: true,
formatter: (row) => row.stationId || '--'
},
{
prop: 'businessTimeText',
- label: '涓氬姟鏃堕棿',
+ label: $t('pages.orders.transfer.detail.businessTime'),
minWidth: 170,
showOverflowTooltip: true,
formatter: (row) => row.businessTimeText || '--'
},
{
prop: 'createTimeText',
- label: '鍒涘缓鏃堕棿',
+ label: $t('table.createTime'),
minWidth: 170,
showOverflowTooltip: true,
formatter: (row) => row.createTimeText || '--'
diff --git a/rsf-design/src/views/system/common/useCrudPage.js b/rsf-design/src/views/system/common/useCrudPage.js
index 2c2b7e8..e0b3b00 100644
--- a/rsf-design/src/views/system/common/useCrudPage.js
+++ b/rsf-design/src/views/system/common/useCrudPage.js
@@ -1,5 +1,6 @@
import { ref } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
+import { $t } from '@/locales'
export function useCrudPage({
createEmptyModel,
@@ -43,35 +44,35 @@
try {
if (dialogType.value === 'edit') {
await updateRequest(payload)
- ElMessage.success('淇敼鎴愬姛')
+ ElMessage.success($t('crud.messages.updateSuccess'))
closeDialog()
await refreshUpdate?.()
return
}
await saveRequest(payload)
- ElMessage.success('鏂板鎴愬姛')
+ ElMessage.success($t('crud.messages.createSuccess'))
closeDialog()
await refreshCreate?.()
} catch (error) {
- ElMessage.error(error?.message || '鎻愪氦澶辫触')
+ ElMessage.error(error?.message || $t('crud.messages.submitFailed'))
}
}
const handleDelete = async (record) => {
try {
const recordLabel = resolveRecordLabel?.(record) || record?.id
- await ElMessageBox.confirm(`纭畾瑕佸垹闄�${entityName}銆�${recordLabel}銆嶅悧锛焋, '鍒犻櫎纭', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
+ await ElMessageBox.confirm($t('crud.confirm.deleteMessage', { entity: entityName, label: recordLabel }), $t('crud.confirm.deleteTitle'), {
+ confirmButtonText: $t('common.confirm'),
+ cancelButtonText: $t('common.cancel'),
type: 'warning'
})
await deleteRequest(record.id)
- ElMessage.success('鍒犻櫎鎴愬姛')
+ ElMessage.success($t('crud.messages.deleteSuccess'))
await refreshRemove?.()
} catch (error) {
if (error !== 'cancel') {
- ElMessage.error(error?.message || '鍒犻櫎澶辫触')
+ ElMessage.error(error?.message || $t('crud.messages.deleteFailed'))
}
}
}
@@ -84,18 +85,18 @@
if (!ids.length) return
try {
- await ElMessageBox.confirm(`纭畾瑕佹壒閲忓垹闄ら�変腑鐨� ${ids.length} 涓�${entityName}鍚楋紵`, '鎵归噺鍒犻櫎纭', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
+ await ElMessageBox.confirm($t('crud.confirm.batchDeleteMessage', { count: ids.length, entity: entityName }), $t('crud.confirm.batchDeleteTitle'), {
+ confirmButtonText: $t('common.confirm'),
+ cancelButtonText: $t('common.cancel'),
type: 'warning'
})
await deleteRequest(ids.join(','))
- ElMessage.success('鎵归噺鍒犻櫎鎴愬姛')
+ ElMessage.success($t('crud.messages.batchDeleteSuccess'))
selectedRows.value = []
await refreshRemove?.()
} catch (error) {
if (error !== 'cancel') {
- ElMessage.error(error?.message || '鎵归噺鍒犻櫎澶辫触')
+ ElMessage.error(error?.message || $t('crud.messages.batchDeleteFailed'))
}
}
}
diff --git a/rsf-design/src/views/system/common/usePrintExportPage.js b/rsf-design/src/views/system/common/usePrintExportPage.js
index 49fdd41..c2242c8 100644
--- a/rsf-design/src/views/system/common/usePrintExportPage.js
+++ b/rsf-design/src/views/system/common/usePrintExportPage.js
@@ -1,6 +1,7 @@
import { ref } from 'vue'
import { ElMessage } from 'element-plus'
import { guardRequestWithMessage } from '@/utils/sys/requestGuard'
+import { $t } from '@/locales'
export function usePrintExportPage({
downloadFileName,
@@ -27,13 +28,13 @@
try {
const response = await guardRequestWithMessage(requestExport(payload), null, {
timeoutMs,
- timeoutMessage: '瀵煎嚭璇锋眰瓒呮椂锛屽凡鍋滄绛夊緟'
+ timeoutMessage: $t('message.exportTimeoutStopped')
})
if (!response) {
return
}
if (!response.ok) {
- throw new Error(`瀵煎嚭澶辫触 (${response.status})`)
+ throw new Error($t('crud.messages.exportFailedWithStatus', { status: response.status }))
}
const blob = await response.blob()
@@ -45,9 +46,9 @@
link.click()
link.remove()
window.URL.revokeObjectURL(downloadUrl)
- ElMessage.success('瀵煎嚭鎴愬姛')
+ ElMessage.success($t('crud.messages.exportSuccess'))
} catch (error) {
- ElMessage.error(error?.message || '瀵煎嚭澶辫触')
+ ElMessage.error(error?.message || $t('crud.messages.exportFailed'))
}
}
@@ -62,7 +63,7 @@
try {
const records = await guardRequestWithMessage(resolvePrintRecords(payload), null, {
timeoutMs,
- timeoutMessage: '鎵撳嵃鏁版嵁鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟'
+ timeoutMessage: $t('message.printTimeoutStopped')
})
if (activePrintToken.value !== token) {
return
@@ -79,7 +80,7 @@
if (activePrintToken.value !== token) {
return
}
- ElMessage.error(error?.message || '鎵撳嵃澶辫触')
+ ElMessage.error(error?.message || $t('crud.messages.printFailed'))
}
}
diff --git a/rsf-design/src/views/system/menu/index.vue b/rsf-design/src/views/system/menu/index.vue
index e53a4dd..3a06c1b 100644
--- a/rsf-design/src/views/system/menu/index.vue
+++ b/rsf-design/src/views/system/menu/index.vue
@@ -1,4 +1,3 @@
-<!-- 鑿滃崟绠$悊椤甸潰 -->
<template>
<div class="menu-page art-full-height">
<ArtSearchBar
@@ -17,9 +16,9 @@
@refresh="handleRefresh"
>
<template #left>
- <ElButton v-auth="'add'" @click="handleAddMenu" v-ripple>娣诲姞鑿滃崟</ElButton>
+ <ElButton v-auth="'add'" @click="handleAddMenu" v-ripple>{{ t('pages.system.menu.buttons.add') }}</ElButton>
<ElButton @click="toggleExpand" v-ripple>
- {{ isExpanded ? '鏀惰捣' : '灞曞紑' }}
+ {{ isExpanded ? t('pages.system.menu.actions.collapse') : t('pages.system.menu.actions.expand') }}
</ElButton>
</template>
</ArtTableHeader>
@@ -48,6 +47,8 @@
</template>
<script setup>
+ import { computed, nextTick, onMounted, reactive, ref } from 'vue'
+ import { useI18n } from 'vue-i18n'
import MenuDialog from './modules/menu-dialog.vue'
import { formatMenuTitle } from '@/utils/router'
@@ -71,6 +72,7 @@
} from './menuPage.helpers'
defineOptions({ name: 'Menus' })
+ const { t } = useI18n()
const loading = ref(false)
const isExpanded = ref(false)
@@ -89,13 +91,13 @@
const formItems = computed(() => [
{
- label: '鑿滃崟鍚嶇О',
+ label: t('pages.system.menu.search.name'),
key: 'name',
type: 'input',
props: { clearable: true }
},
{
- label: '璺敱鍦板潃',
+ label: t('pages.system.menu.search.route'),
key: 'route',
type: 'input',
props: { clearable: true }
@@ -106,7 +108,7 @@
loading.value = true
try {
const list = await guardRequestWithMessage(fetchGetMenuList({}), null, {
- timeoutMessage: '鑿滃崟鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟'
+ timeoutMessage: t('pages.system.menu.messages.loadTimeout')
})
if (list === null) {
tableData.value = []
@@ -116,7 +118,7 @@
tableData.value = Array.isArray(list) ? list : []
menuTreeOptions.value = buildMenuTreeOptions(tableData.value, formatMenuTitle)
} catch (error) {
- ElMessage.error(error?.message || '鑾峰彇鑿滃崟澶辫触')
+ ElMessage.error(error?.message || t('pages.system.menu.messages.loadFailed'))
} finally {
loading.value = false
}
@@ -183,59 +185,67 @@
async function handleSubmit(formData) {
const payload = buildMenuSubmitPayload(formData)
if (payload.id && payload.id === payload.parentId) {
- ElMessage.error('涓婄骇鑿滃崟涓嶈兘閫夋嫨褰撳墠鑿滃崟')
+ ElMessage.error(t('pages.system.menu.messages.menuSelfParent'))
return
}
try {
if (payload.id) {
await fetchUpdateMenu(payload)
- ElMessage.success('淇敼鎴愬姛')
+ ElMessage.success(t('crud.messages.updateSuccess'))
} else {
await fetchSaveMenu(payload)
- ElMessage.success('鏂板鎴愬姛')
+ ElMessage.success(t('crud.messages.createSuccess'))
}
closeDialog()
await loadMenuResources()
} catch (error) {
- ElMessage.error(error?.message || '鎻愪氦澶辫触')
+ ElMessage.error(error?.message || t('pages.system.menu.messages.submitFailed'))
}
}
async function handleDeleteMenu(row) {
try {
await ElMessageBox.confirm(
- `纭畾瑕佸垹闄よ彍鍗曘��${getMenuDisplayTitle(row, formatMenuTitle)}銆嶅悧锛熷垹闄ゅ悗鏃犳硶鎭㈠`,
- '鍒犻櫎纭',
+ t('pages.system.menu.messages.deleteMenuConfirm', {
+ title: getMenuDisplayTitle(row, formatMenuTitle)
+ }),
+ t('crud.confirm.deleteTitle'),
{
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
+ confirmButtonText: t('common.confirm'),
+ cancelButtonText: t('common.cancel'),
type: 'warning'
}
)
await fetchDeleteMenu(row.id)
- ElMessage.success('鍒犻櫎鎴愬姛')
+ ElMessage.success(t('crud.messages.deleteSuccess'))
await loadMenuResources()
} catch (error) {
if (error !== 'cancel') {
- ElMessage.error(error?.message || '鍒犻櫎澶辫触')
+ ElMessage.error(error?.message || t('crud.messages.deleteFailed'))
}
}
}
async function handleDeleteAuth(row) {
try {
- await ElMessageBox.confirm(`纭畾瑕佸垹闄ゆ潈闄愩��${row.name || row.authority || row.id}銆嶅悧锛熷垹闄ゅ悗鏃犳硶鎭㈠`, '鍒犻櫎纭', {
- confirmButtonText: '纭畾',
- cancelButtonText: '鍙栨秷',
- type: 'warning'
- })
+ await ElMessageBox.confirm(
+ t('pages.system.menu.messages.deleteAuthConfirm', {
+ title: row.name || row.authority || row.id
+ }),
+ t('crud.confirm.deleteTitle'),
+ {
+ confirmButtonText: t('common.confirm'),
+ cancelButtonText: t('common.cancel'),
+ type: 'warning'
+ }
+ )
await fetchDeleteMenu(row.id)
- ElMessage.success('鍒犻櫎鎴愬姛')
+ ElMessage.success(t('crud.messages.deleteSuccess'))
await loadMenuResources()
} catch (error) {
if (error !== 'cancel') {
- ElMessage.error(error?.message || '鍒犻櫎澶辫触')
+ ElMessage.error(error?.message || t('crud.messages.deleteFailed'))
}
}
}
diff --git a/rsf-design/src/views/system/menu/menuPage.helpers.js b/rsf-design/src/views/system/menu/menuPage.helpers.js
index 20e605c..642991e 100644
--- a/rsf-design/src/views/system/menu/menuPage.helpers.js
+++ b/rsf-design/src/views/system/menu/menuPage.helpers.js
@@ -1,3 +1,5 @@
+import { $t } from '@/locales'
+
export function createMenuSearchState() {
return {
name: '',
@@ -22,7 +24,7 @@
if (!title) {
return ''
}
- return String(title).split('.').pop() || String(title)
+ return String(title).trim()
}
export function getMenuDisplayTitle(row = {}, titleFormatter = defaultMenuTitleFormatter) {
@@ -44,15 +46,15 @@
}
export function getMenuTypeText(row = {}) {
- if (row.meta?.isAuthButton || Number(row.type) === 1) return '鎸夐挳'
- if (hasNestedMenus(row)) return '鐩綍'
- return '鑿滃崟'
+ if (row.meta?.isAuthButton || Number(row.type) === 1) return $t('pages.system.menu.types.button')
+ if (hasNestedMenus(row)) return $t('pages.system.menu.types.directory')
+ return $t('pages.system.menu.types.menu')
}
export function getMenuStatusMeta(status) {
return normalizeMenuNumber(status, 1) === 1
- ? { text: '鍚敤', type: 'success' }
- : { text: '绂佺敤', type: 'danger' }
+ ? { text: $t('common.status.enabled'), type: 'success' }
+ : { text: $t('common.status.disabled'), type: 'danger' }
}
export function normalizeMenuTreeOptions(nodes = [], titleFormatter = defaultMenuTitleFormatter) {
@@ -70,7 +72,7 @@
export function buildMenuTreeOptions(tree = [], titleFormatter = defaultMenuTitleFormatter) {
return [
{
- label: '椤剁骇鑿滃崟',
+ label: $t('table.topLevelMenu'),
value: 0,
children: normalizeMenuTreeOptions(tree, titleFormatter)
}
diff --git a/rsf-design/src/views/system/menu/menuTable.columns.js b/rsf-design/src/views/system/menu/menuTable.columns.js
index e98239c..74ee2bc 100644
--- a/rsf-design/src/views/system/menu/menuTable.columns.js
+++ b/rsf-design/src/views/system/menu/menuTable.columns.js
@@ -1,5 +1,6 @@
import { h } from 'vue'
import { ElTag } from 'element-plus'
+import { $t } from '@/locales'
import ArtSvgIcon from '@/components/core/base/art-svg-icon/index.vue'
import ArtButtonTable from '@/components/core/forms/art-button-table/index.vue'
import {
@@ -21,13 +22,13 @@
return [
{
prop: 'meta.title',
- label: '鑿滃崟鍚嶇О',
+ label: $t('pages.system.menu.search.name'),
minWidth: 180,
formatter: (row) => getMenuDisplayTitle(row, titleFormatter)
},
{
prop: 'meta.icon',
- label: '鍥炬爣棰勮',
+ label: $t('table.iconPreview'),
width: 96,
align: 'center',
formatter: (row) => {
@@ -47,14 +48,14 @@
},
{
prop: 'type',
- label: '鑿滃崟绫诲瀷',
+ label: $t('table.menuType'),
width: 110,
formatter: (row) =>
h(ElTag, { type: getMenuTypeTag(row), effect: 'light' }, () => getMenuTypeText(row))
},
{
prop: 'route',
- label: '璺敱',
+ label: $t('pages.system.menu.search.route'),
minWidth: 180,
formatter: (row) => {
if (row.meta?.isAuthButton) return ''
@@ -63,7 +64,7 @@
},
{
prop: 'component',
- label: '缁勪欢鏍囪瘑',
+ label: $t('table.componentKey'),
minWidth: 160,
showOverflowTooltip: true,
formatter: (row) => {
@@ -73,30 +74,32 @@
},
{
prop: 'authority',
- label: '鏉冮檺鏍囪瘑',
+ label: $t('table.permissionKey'),
minWidth: 180,
formatter: (row) => {
if (row.meta?.isAuthButton) {
return row.authority || row.meta?.authMark || ''
}
if (!row.meta?.authList?.length) return row.authority || ''
- return `${row.meta.authList.length} 涓潈闄愭爣璇哷
+ return $t('pages.system.menu.messages.authCount', {
+ count: row.meta.authList.length
+ })
}
},
{
prop: 'sort',
- label: '鎺掑簭',
+ label: $t('table.sort'),
width: 90
},
{
prop: 'id',
- label: 'ID',
+ label: $t('table.id'),
width: 96,
align: 'center'
},
{
prop: 'status',
- label: '鐘舵��',
+ label: $t('table.status'),
width: 100,
formatter: (row) => {
const statusMeta = getMenuStatusMeta(row.status)
@@ -105,14 +108,14 @@
},
{
prop: 'memo',
- label: '澶囨敞',
+ label: $t('table.remark'),
minWidth: 180,
showOverflowTooltip: true,
formatter: (row) => row.memo || '-'
},
{
prop: 'operation',
- label: '鎿嶄綔',
+ label: $t('table.operation'),
width: 180,
align: 'center',
formatter: (row) => {
@@ -133,7 +136,7 @@
h(ArtButtonTable, {
type: 'add',
onClick: () => handleAddAuth(row),
- title: '鏂板鏉冮檺'
+ title: $t('pages.system.menu.actions.addAuth')
}),
h(ArtButtonTable, {
type: 'edit',
diff --git a/rsf-design/src/views/system/menu/modules/menu-dialog.vue b/rsf-design/src/views/system/menu/modules/menu-dialog.vue
index c2a5dc9..eb0e103 100644
--- a/rsf-design/src/views/system/menu/modules/menu-dialog.vue
+++ b/rsf-design/src/views/system/menu/modules/menu-dialog.vue
@@ -21,22 +21,23 @@
>
<template #menuType>
<ElRadioGroup v-model="form.menuType" :disabled="disableMenuType">
- <ElRadioButton value="menu">鑿滃崟</ElRadioButton>
- <ElRadioButton value="button">鎸夐挳</ElRadioButton>
+ <ElRadioButton value="menu">{{ t('pages.system.menu.form.typeMenu') }}</ElRadioButton>
+ <ElRadioButton value="button">{{ t('pages.system.menu.form.typeButton') }}</ElRadioButton>
</ElRadioGroup>
</template>
</ArtForm>
<template #footer>
<span class="dialog-footer">
- <ElButton @click="handleCancel">鍙栨秷</ElButton>
- <ElButton type="primary" @click="handleSubmit">纭畾</ElButton>
+ <ElButton @click="handleCancel">{{ t('common.cancel') }}</ElButton>
+ <ElButton type="primary" @click="handleSubmit">{{ t('common.confirm') }}</ElButton>
</span>
</template>
</ElDialog>
</template>
<script setup>
+ import { useI18n } from 'vue-i18n'
import ArtForm from '@/components/core/forms/art-form/index.vue'
const createMenuFormState = () => ({
@@ -62,30 +63,35 @@
})
const emit = defineEmits(['update:visible', 'submit'])
+ const { t } = useI18n()
const formRef = ref()
const form = reactive(createMenuFormState())
const isEdit = computed(() => Boolean(form.id))
- const dialogTitle = computed(() => `${isEdit.value ? '缂栬緫' : '鏂板缓'}${form.menuType === 'button' ? '鎸夐挳' : '鑿滃崟'}`)
+ const dialogTitle = computed(() =>
+ form.menuType === 'button'
+ ? t(isEdit.value ? 'pages.system.menu.form.titleEditButton' : 'pages.system.menu.form.titleAddButton')
+ : t(isEdit.value ? 'pages.system.menu.form.titleEditMenu' : 'pages.system.menu.form.titleAddMenu')
+ )
const disableMenuType = computed(() => props.lockType || isEdit.value)
const rules = computed(() => ({
- name: [{ required: true, message: form.menuType === 'button' ? '璇疯緭鍏ユ潈闄愬悕绉�' : '璇疯緭鍏ヨ彍鍗曞悕绉�', trigger: 'blur' }],
+ name: [{ required: true, message: form.menuType === 'button' ? t('pages.system.menu.form.validationButtonName') : t('pages.system.menu.form.validationMenuName'), trigger: 'blur' }],
route:
form.menuType === 'menu'
- ? [{ required: true, message: '璇疯緭鍏ヨ矾鐢卞湴鍧�', trigger: 'blur' }]
+ ? [{ required: true, message: t('pages.system.menu.form.validationRoute'), trigger: 'blur' }]
: [],
authority:
form.menuType === 'button'
- ? [{ required: true, message: '璇疯緭鍏ユ潈闄愭爣璇�', trigger: 'blur' }]
+ ? [{ required: true, message: t('pages.system.menu.form.validationAuthority'), trigger: 'blur' }]
: []
}))
const formItems = computed(() => {
const items = [
- { label: '鑿滃崟绫诲瀷', key: 'menuType', span: 24 },
+ { label: t('pages.system.menu.form.menuType'), key: 'menuType', span: 24 },
{
- label: '涓婄骇鑿滃崟',
+ label: t('pages.system.menu.form.parentId'),
key: 'parentId',
type: 'treeselect',
span: 24,
@@ -96,19 +102,19 @@
value: 'value',
children: 'children'
},
- placeholder: '璇烽�夋嫨涓婄骇鑿滃崟',
+ placeholder: t('pages.system.menu.form.placeholderParent'),
checkStrictly: true,
clearable: false,
defaultExpandAll: true
}
},
{
- label: form.menuType === 'button' ? '鏉冮檺鍚嶇О' : '鑿滃崟鍚嶇О',
+ label: form.menuType === 'button' ? t('pages.system.menu.form.nameButton') : t('pages.system.menu.form.nameMenu'),
key: 'name',
type: 'input',
span: 24,
props: {
- placeholder: form.menuType === 'button' ? '璇疯緭鍏ユ潈闄愬悕绉�' : '璇疯緭鍏ヨ彍鍗曞悕绉�',
+ placeholder: form.menuType === 'button' ? t('pages.system.menu.form.placeholderButtonName') : t('pages.system.menu.form.placeholderMenuName'),
clearable: true
}
}
@@ -117,22 +123,22 @@
if (form.menuType === 'menu') {
items.push(
{
- label: '璺敱鍦板潃',
+ label: t('pages.system.menu.form.route'),
key: 'route',
type: 'input',
span: 24,
props: {
- placeholder: '璇疯緭鍏ヨ矾鐢卞湴鍧�',
+ placeholder: t('pages.system.menu.form.placeholderRoute'),
clearable: true
}
},
{
- label: '缁勪欢鏍囪瘑',
+ label: t('pages.system.menu.form.component'),
key: 'component',
type: 'input',
span: 24,
props: {
- placeholder: '璇疯緭鍏ョ粍浠舵爣璇�',
+ placeholder: t('pages.system.menu.form.placeholderComponent'),
clearable: true
}
}
@@ -141,27 +147,27 @@
items.push(
{
- label: '鏉冮檺鏍囪瘑',
+ label: t('pages.system.menu.form.authority'),
key: 'authority',
type: 'input',
span: 24,
props: {
- placeholder: '璇疯緭鍏ユ潈闄愭爣璇�',
+ placeholder: t('pages.system.menu.form.placeholderAuthority'),
clearable: true
}
},
{
- label: '鍥炬爣',
+ label: t('pages.system.menu.form.icon'),
key: 'icon',
type: 'input',
span: 24,
props: {
- placeholder: '璇疯緭鍏ュ浘鏍囧悕绉�',
+ placeholder: t('pages.system.menu.form.placeholderIcon'),
clearable: true
}
},
{
- label: '鎺掑簭',
+ label: t('pages.system.menu.form.sort'),
key: 'sort',
type: 'number',
span: 24,
@@ -172,27 +178,27 @@
}
},
{
- label: '鐘舵��',
+ label: t('pages.system.menu.form.status'),
key: 'status',
type: 'select',
span: 24,
props: {
- placeholder: '璇烽�夋嫨鐘舵��',
+ placeholder: t('pages.system.menu.form.placeholderStatus'),
options: [
- { label: '鍚敤', value: 1 },
- { label: '绂佺敤', value: 0 }
+ { label: t('common.status.enabled'), value: 1 },
+ { label: t('common.status.disabled'), value: 0 }
]
}
},
{
- label: '澶囨敞',
+ label: t('pages.system.menu.form.memo'),
key: 'memo',
type: 'input',
span: 24,
props: {
type: 'textarea',
rows: 3,
- placeholder: '璇疯緭鍏ュ娉�',
+ placeholder: t('pages.system.menu.form.placeholderMemo'),
clearable: true
}
}
diff --git a/rsf-design/src/views/system/role/index.vue b/rsf-design/src/views/system/role/index.vue
index c703b2f..ae3cf8b 100644
--- a/rsf-design/src/views/system/role/index.vue
+++ b/rsf-design/src/views/system/role/index.vue
@@ -17,7 +17,7 @@
>
<template #left>
<ElSpace wrap>
- <ElButton v-auth="'add'" @click="showDialog('add')" v-ripple>鏂板瑙掕壊</ElButton>
+ <ElButton v-auth="'add'" @click="showDialog('add')" v-ripple>{{ t('pages.system.role.buttons.add') }}</ElButton>
<ElButton
v-auth="'delete'"
type="danger"
@@ -25,7 +25,7 @@
@click="handleBatchDelete"
v-ripple
>
- 鎵归噺鍒犻櫎
+ {{ t('common.actions.batchDelete') }}
</ElButton>
<span v-auth="'query'" class="inline-flex">
<ListExportPrint
@@ -76,6 +76,7 @@
<script setup>
import { useUserStore } from '@/store/modules/user'
+ import { useI18n } from 'vue-i18n'
import {
fetchExportRoleReport,
fetchDeleteRole,
@@ -102,21 +103,22 @@
buildRoleSavePayload,
buildRoleSearchParams,
createRoleSearchState,
+ getRoleReportTitle,
getRolePaginationKey,
normalizeRoleListRow,
ROLE_REPORT_STYLE,
- ROLE_REPORT_TITLE,
resolveRoleReportColumns
} from './rolePage.helpers'
defineOptions({ name: 'Role' })
+ const { t } = useI18n()
const searchForm = ref(createRoleSearchState())
const showSearchBar = ref(false)
const permissionDialogVisible = ref(false)
const permissionScopeType = ref('menu')
const userStore = useUserStore()
- const reportTitle = ROLE_REPORT_TITLE
+ const reportTitle = computed(() => getRoleReportTitle())
const reportQueryParams = computed(() => buildRoleSearchParams(searchForm.value))
const roleActionHandlers = {
'scope-menu': (row) => openScopeDialog('menu', row),
@@ -186,7 +188,7 @@
saveRequest: fetchSaveRole,
updateRequest: fetchUpdateRole,
deleteRequest: fetchDeleteRole,
- entityName: '瑙掕壊',
+ entityName: t('pages.system.role.entity'),
resolveRecordLabel: (record) => record?.name || record?.code || record?.id,
refreshCreate,
refreshUpdate,
@@ -196,7 +198,7 @@
const buildPreviewDialogMeta = (rows) => {
const now = new Date()
return {
- reportTitle,
+ reportTitle: reportTitle.value,
reportDate: now.toLocaleDateString('zh-CN'),
printedAt: now.toLocaleString('zh-CN', { hour12: false }),
operator: userStore.getUserInfo?.name || userStore.getUserInfo?.username || '',
diff --git a/rsf-design/src/views/system/role/modules/role-edit-dialog.vue b/rsf-design/src/views/system/role/modules/role-edit-dialog.vue
index fbb5d54..fbec2b9 100644
--- a/rsf-design/src/views/system/role/modules/role-edit-dialog.vue
+++ b/rsf-design/src/views/system/role/modules/role-edit-dialog.vue
@@ -21,8 +21,8 @@
<template #footer>
<span class="dialog-footer">
- <ElButton @click="handleCancel">鍙栨秷</ElButton>
- <ElButton type="primary" @click="handleSubmit">纭畾</ElButton>
+ <ElButton @click="handleCancel">{{ t('common.cancel') }}</ElButton>
+ <ElButton type="primary" @click="handleSubmit">{{ t('common.confirm') }}</ElButton>
</span>
</template>
</ElDialog>
@@ -31,6 +31,7 @@
<script setup>
import ArtForm from '@/components/core/forms/art-form/index.vue'
import { buildRoleDialogModel, createRoleFormState, getRoleStatusOptions } from '../rolePage.helpers'
+ import { useI18n } from 'vue-i18n'
const props = defineProps({
visible: { required: false, default: false },
@@ -41,12 +42,15 @@
const emit = defineEmits(['update:visible', 'submit'])
const formRef = ref()
const form = reactive(createRoleFormState())
+ const { t } = useI18n()
const isEdit = computed(() => props.dialogType === 'edit')
- const dialogTitle = computed(() => (isEdit.value ? '缂栬緫瑙掕壊' : '鏂板瑙掕壊'))
+ const dialogTitle = computed(() =>
+ isEdit.value ? t('pages.system.role.dialog.editTitle') : t('pages.system.role.dialog.addTitle')
+ )
const rules = computed(() => ({
- name: [{ required: true, message: '璇疯緭鍏ヨ鑹插悕绉�', trigger: 'blur' }]
+ name: [{ required: true, message: t('pages.system.role.dialog.validationName'), trigger: 'blur' }]
}))
function createInputFormItem(label, key, placeholder, extraProps = {}, extraConfig = {}) {
@@ -79,10 +83,29 @@
}
const formItems = computed(() => [
- createInputFormItem('瑙掕壊鍚嶇О', 'name', '璇疯緭鍏ヨ鑹插悕绉�'),
- createInputFormItem('瑙掕壊缂栫爜', 'code', '璇疯緭鍏ヨ鑹茬紪鐮�'),
- createSelectFormItem('鐘舵��', 'status', '璇烽�夋嫨鐘舵��', getRoleStatusOptions()),
- createInputFormItem('澶囨敞', 'memo', '璇疯緭鍏ュ娉�', { type: 'textarea', rows: 3 }, { span: 24 })
+ createInputFormItem(
+ t('pages.system.role.dialog.name'),
+ 'name',
+ t('pages.system.role.dialog.namePlaceholder')
+ ),
+ createInputFormItem(
+ t('pages.system.role.dialog.code'),
+ 'code',
+ t('pages.system.role.dialog.codePlaceholder')
+ ),
+ createSelectFormItem(
+ t('pages.system.role.dialog.status'),
+ 'status',
+ t('pages.system.role.dialog.statusPlaceholder'),
+ getRoleStatusOptions()
+ ),
+ createInputFormItem(
+ t('pages.system.role.dialog.memo'),
+ 'memo',
+ t('pages.system.role.dialog.memoPlaceholder'),
+ { type: 'textarea', rows: 3 },
+ { span: 24 }
+ )
])
const resetForm = () => {
diff --git a/rsf-design/src/views/system/role/modules/role-permission-dialog.vue b/rsf-design/src/views/system/role/modules/role-permission-dialog.vue
index ccc6c63..8d8909a 100644
--- a/rsf-design/src/views/system/role/modules/role-permission-dialog.vue
+++ b/rsf-design/src/views/system/role/modules/role-permission-dialog.vue
@@ -1,14 +1,14 @@
<template>
<ElDrawer
:model-value="visible"
- title="瑙掕壊鏉冮檺"
+ :title="t('pages.system.role.permission.title')"
size="860px"
destroy-on-close
@update:model-value="handleVisibleChange"
@closed="handleClosed"
>
<div class="mb-4 text-sm text-[var(--art-text-secondary)]">
- 褰撳墠瑙掕壊锛歿{ roleLabel }}
+ {{ t('pages.system.role.permission.currentRole') }}{{ roleLabel }}
</div>
<ElTabs v-model="activeScopeType" class="role-scope-tabs">
@@ -24,21 +24,21 @@
<div v-else class="space-y-3">
<div class="flex items-center justify-between gap-3">
<ElSpace wrap>
- <ElButton @click="handleSelectAll(config.scopeType)">鍏ㄩ��</ElButton>
- <ElButton @click="handleClear(config.scopeType)">娓呯┖</ElButton>
+ <ElButton @click="handleSelectAll(config.scopeType)">{{ t('pages.system.role.permission.selectAll') }}</ElButton>
+ <ElButton @click="handleClear(config.scopeType)">{{ t('pages.system.role.permission.clear') }}</ElButton>
</ElSpace>
- <ElButton type="primary" @click="handleSave(config.scopeType)">淇濆瓨褰撳墠鏉冮檺</ElButton>
+ <ElButton type="primary" @click="handleSave(config.scopeType)">{{ t('pages.system.role.permission.saveCurrent') }}</ElButton>
</div>
<div class="flex items-center gap-3">
<ElInput
v-model.trim="scopeState[config.scopeType].condition"
clearable
- placeholder="鎼滅储鏉冮檺鏍�"
+ :placeholder="t('pages.system.role.permission.searchPlaceholder')"
@clear="handleSearch(config.scopeType)"
@keyup.enter="handleSearch(config.scopeType)"
/>
- <ElButton @click="handleSearch(config.scopeType)">鎼滅储</ElButton>
+ <ElButton @click="handleSearch(config.scopeType)">{{ t('common.actions.search') }}</ElButton>
</div>
<ElScrollbar height="56vh">
@@ -56,7 +56,7 @@
<div class="flex items-center gap-2">
<span>{{ resolveScopeNodeLabel(data) }}</span>
<ElTag v-if="data.isAuthButton" type="info" effect="plain" size="small">
- 鎸夐挳
+ {{ t('pages.system.role.permission.authButton') }}
</ElTag>
</div>
</template>
@@ -78,8 +78,10 @@
} from '../rolePage.helpers'
import { fetchGetRoleScopeList, fetchGetRoleScopeTree, fetchUpdateRoleScope } from '@/api/system-manage'
import { resolveBackendMenuTitle } from '@/utils/backend-menu-title'
+ import { formatMenuTitle } from '@/utils/router'
import { guardRequestWithMessage } from '@/utils/sys/requestGuard'
import { ElMessage } from 'element-plus'
+ import { useI18n } from 'vue-i18n'
const props = defineProps({
visible: { required: false, default: false },
@@ -88,6 +90,7 @@
})
const emit = defineEmits(['update:visible', 'success'])
+ const { t } = useI18n()
const scopeConfigs = ['menu', 'pda', 'matnr', 'warehouse'].map((scopeType) => getRoleScopeConfig(scopeType))
const activeScopeType = ref(props.scopeType || 'menu')
@@ -103,7 +106,7 @@
set: (value) => emit('update:visible', value)
})
- const roleLabel = computed(() => props.roleData?.name || props.roleData?.code || '鏈�夋嫨瑙掕壊')
+ const roleLabel = computed(() => props.roleData?.name || props.roleData?.code || t('pages.system.role.permission.unselected'))
function createScopeTabState() {
return {
@@ -138,7 +141,7 @@
Promise.all([selectionRequest, treeRequest]),
null,
{
- timeoutMessage: `${config.title}鍔犺浇瓒呮椂锛屽凡鍋滄绛夊緟`
+ timeoutMessage: t('pages.system.role.permission.scopeLoadTimeout', { title: config.title })
}
)
if (!guardedResult) {
@@ -154,7 +157,7 @@
state.halfCheckedKeys = []
state.loaded = true
} catch (error) {
- ElMessage.error(error?.message || `鍔犺浇${config.title}澶辫触`)
+ ElMessage.error(error?.message || t('pages.system.role.permission.scopeLoadFailed', { title: config.title }))
} finally {
state.loading = false
nextTick(() => {
@@ -215,11 +218,11 @@
scopeState[scopeType].halfCheckedKeys
)
)
- ElMessage.success('鏉冮檺淇濆瓨鎴愬姛')
+ ElMessage.success(t('pages.system.role.permission.saveSuccess'))
emit('success')
visible.value = false
} catch (error) {
- ElMessage.error(error?.message || '鏉冮檺淇濆瓨澶辫触')
+ ElMessage.error(error?.message || t('pages.system.role.permission.saveFailed'))
}
}
@@ -236,7 +239,11 @@
if (!rawLabel) {
return ''
}
- return resolveBackendMenuTitle(rawLabel)
+ if (activeScopeType.value === 'menu') {
+ const resolvedTitle = resolveBackendMenuTitle(rawLabel, data?.component || '')
+ return resolvedTitle ? formatMenuTitle(resolvedTitle) : ''
+ }
+ return rawLabel
}
const handleClosed = () => {
diff --git a/rsf-design/src/views/system/role/modules/role-search.vue b/rsf-design/src/views/system/role/modules/role-search.vue
index dd19870..b1b8d13 100644
--- a/rsf-design/src/views/system/role/modules/role-search.vue
+++ b/rsf-design/src/views/system/role/modules/role-search.vue
@@ -11,6 +11,7 @@
<script setup>
import { createRoleSearchState, getRoleStatusOptions } from '../rolePage.helpers'
+ import { useI18n } from 'vue-i18n'
const props = defineProps({
modelValue: { required: true }
@@ -18,6 +19,7 @@
const emit = defineEmits(['update:modelValue', 'search', 'reset'])
const searchBarRef = ref()
+ const { t } = useI18n()
const formData = computed({
get: () => props.modelValue,
@@ -50,11 +52,32 @@
}
const formItems = computed(() => [
- createInputSearchItem('瑙掕壊鍚嶇О', 'name', '璇疯緭鍏ヨ鑹插悕绉�'),
- createInputSearchItem('瑙掕壊缂栫爜', 'code', '璇疯緭鍏ヨ鑹茬紪鐮�'),
- createInputSearchItem('澶囨敞', 'memo', '璇疯緭鍏ュ娉�'),
- createInputSearchItem('鍏抽敭瀛�', 'condition', '杈撳叆鍏抽敭瀛楁悳绱�'),
- createSelectSearchItem('鐘舵��', 'status', '璇烽�夋嫨鐘舵��', getRoleStatusOptions())
+ createInputSearchItem(
+ t('pages.system.role.search.name'),
+ 'name',
+ t('pages.system.role.search.namePlaceholder')
+ ),
+ createInputSearchItem(
+ t('pages.system.role.search.code'),
+ 'code',
+ t('pages.system.role.search.codePlaceholder')
+ ),
+ createInputSearchItem(
+ t('pages.system.role.search.memo'),
+ 'memo',
+ t('pages.system.role.search.memoPlaceholder')
+ ),
+ createInputSearchItem(
+ t('pages.system.role.search.condition'),
+ 'condition',
+ t('pages.system.role.search.conditionPlaceholder')
+ ),
+ createSelectSearchItem(
+ t('pages.system.role.search.status'),
+ 'status',
+ t('pages.system.role.search.statusPlaceholder'),
+ getRoleStatusOptions()
+ )
])
function handleReset() {
diff --git a/rsf-design/src/views/system/role/rolePage.helpers.js b/rsf-design/src/views/system/role/rolePage.helpers.js
index aa4c451..791f914 100644
--- a/rsf-design/src/views/system/role/rolePage.helpers.js
+++ b/rsf-design/src/views/system/role/rolePage.helpers.js
@@ -1,12 +1,9 @@
-const ROLE_STATUS_META = {
- 1: { type: 'success', text: '姝e父', bool: true },
- 0: { type: 'danger', text: '绂佺敤', bool: false }
-}
+import { $t } from '@/locales'
-const ROLE_STATUS_OPTIONS = [
- { label: '姝e父', value: 1 },
- { label: '绂佺敤', value: 0 }
-]
+const ROLE_STATUS_META = {
+ 1: { type: 'success', key: 'common.status.normal', bool: true },
+ 0: { type: 'danger', key: 'common.status.disabled', bool: false }
+}
export function createRoleSearchState() {
return {
@@ -37,7 +34,10 @@
}
export function getRoleStatusOptions() {
- return ROLE_STATUS_OPTIONS.map((option) => ({ ...option }))
+ return [
+ { label: $t('common.status.normal'), value: 1 },
+ { label: $t('common.status.disabled'), value: 0 }
+ ]
}
export function buildRoleSearchParams(params = {}) {
@@ -69,19 +69,21 @@
}
const ROLE_REPORT_COLUMNS = [
- { source: 'name', label: '瑙掕壊鍚嶇О' },
- { source: 'code', label: '瑙掕壊缂栫爜' },
- { source: 'statusText', label: '鐘舵��' },
- { source: 'memo', label: '澶囨敞' },
- { source: 'createTimeText', label: '鍒涘缓鏃堕棿' },
- { source: 'updateTimeText', label: '鏇存柊鏃堕棿' }
+ { source: 'name', labelKey: 'pages.system.role.table.name' },
+ { source: 'code', labelKey: 'pages.system.role.table.code' },
+ { source: 'statusText', labelKey: 'pages.system.role.table.status' },
+ { source: 'memo', labelKey: 'pages.system.role.table.memo' },
+ { source: 'createTimeText', labelKey: 'pages.system.role.table.createTime' },
+ { source: 'updateTimeText', labelKey: 'pages.system.role.table.updateTime' }
]
const ROLE_REPORT_SOURCE_ALIAS = {
status: 'statusText'
}
-export const ROLE_REPORT_TITLE = '瑙掕壊绠$悊鎶ヨ〃'
+export function getRoleReportTitle() {
+ return $t('pages.system.role.reportTitle')
+}
export const ROLE_REPORT_STYLE = {
titleAlign: 'center',
@@ -89,7 +91,10 @@
}
export function getRoleReportColumns() {
- return ROLE_REPORT_COLUMNS.map((column) => ({ ...column }))
+ return ROLE_REPORT_COLUMNS.map((column) => ({
+ source: column.source,
+ label: $t(column.labelKey)
+ }))
}
export function resolveRoleReportColumns(columns = []) {
@@ -116,7 +121,7 @@
const allowedColumn = allowedColumns.get(source)
return {
source,
- label: column.label || allowedColumn.label
+ label: column.label || $t(allowedColumn.labelKey)
}
})
.filter(Boolean)
@@ -137,7 +142,7 @@
titleLevel = ROLE_REPORT_STYLE.titleLevel
} = {}) {
return {
- reportTitle: ROLE_REPORT_TITLE,
+ reportTitle: getRoleReportTitle(),
reportDate: previewMeta.reportDate,
printedAt: previewMeta.printedAt,
operator: previewMeta.operator,
@@ -168,7 +173,7 @@
return {
...record,
statusBool: record.statusBool !== void 0 ? Boolean(record.statusBool) : statusMeta.bool,
- statusText: statusMeta.text,
+ statusText: $t(statusMeta.key),
statusType: statusMeta.type,
createTimeText: normalizeText(record.createTime$ || record.createTime),
updateTimeText: normalizeText(record.updateTime$ || record.updateTime)
@@ -182,32 +187,32 @@
if (status === false || status === 0 || status === '0') {
return ROLE_STATUS_META[0]
}
- return { type: 'info', text: '鏈煡', bool: false }
+ return { type: 'info', key: 'common.status.unknown', bool: false }
}
export function getRoleScopeConfig(scopeType) {
const configMap = {
menu: {
scopeType: 'menu',
- title: '缃戦〉鏉冮檺',
+ title: $t('pages.system.role.scopes.menu'),
listUrl: '/role/scope/list',
treeUrl: '/menu/tree'
},
pda: {
scopeType: 'pda',
- title: 'PDA鏉冮檺',
+ title: $t('pages.system.role.scopes.pda'),
listUrl: '/rolePda/scope/list',
treeUrl: '/menuPda/tree'
},
matnr: {
scopeType: 'matnr',
- title: '鐗╂枡鏉冮檺',
+ title: $t('pages.system.role.scopes.matnr'),
listUrl: '/roleMatnr/scope/list',
treeUrl: '/menuMatnrGroup/tree'
},
warehouse: {
scopeType: 'warehouse',
- title: '浠撳簱鏉冮檺',
+ title: $t('pages.system.role.scopes.warehouse'),
listUrl: '/roleWarehouse/scope/list',
treeUrl: '/menuWarehouse/tree'
}
diff --git a/rsf-design/src/views/system/role/roleTable.columns.js b/rsf-design/src/views/system/role/roleTable.columns.js
index d9756f1..4f436f4 100644
--- a/rsf-design/src/views/system/role/roleTable.columns.js
+++ b/rsf-design/src/views/system/role/roleTable.columns.js
@@ -1,47 +1,50 @@
import { h } from 'vue'
import ArtButtonMore from '@/components/core/forms/art-button-more/index.vue'
import { ElTag } from 'element-plus'
+import { $t } from '@/locales'
import { getRoleStatusMeta } from './rolePage.helpers'
-const ROLE_MORE_ACTIONS = [
- {
- key: 'scope-menu',
- label: '缃戦〉鏉冮檺',
- icon: 'ri:layout-2-line',
- auth: 'edit'
- },
- {
- key: 'scope-pda',
- label: 'PDA鏉冮檺',
- icon: 'ri:smartphone-line',
- auth: 'edit'
- },
- {
- key: 'scope-matnr',
- label: '鐗╂枡鏉冮檺',
- icon: 'ri:archive-line',
- auth: 'edit'
- },
- {
- key: 'scope-warehouse',
- label: '浠撳簱鏉冮檺',
- icon: 'ri:store-2-line',
- auth: 'edit'
- },
- {
- key: 'edit',
- label: '缂栬緫瑙掕壊',
- icon: 'ri:edit-2-line',
- auth: 'edit'
- },
- {
- key: 'delete',
- label: '鍒犻櫎瑙掕壊',
- icon: 'ri:delete-bin-4-line',
- color: '#f56c6c',
- auth: 'delete'
- }
-]
+function createRoleMoreActions() {
+ return [
+ {
+ key: 'scope-menu',
+ label: $t('pages.system.role.actions.scopeMenu'),
+ icon: 'ri:layout-2-line',
+ auth: 'edit'
+ },
+ {
+ key: 'scope-pda',
+ label: $t('pages.system.role.actions.scopePda'),
+ icon: 'ri:smartphone-line',
+ auth: 'edit'
+ },
+ {
+ key: 'scope-matnr',
+ label: $t('pages.system.role.actions.scopeMatnr'),
+ icon: 'ri:archive-line',
+ auth: 'edit'
+ },
+ {
+ key: 'scope-warehouse',
+ label: $t('pages.system.role.actions.scopeWarehouse'),
+ icon: 'ri:store-2-line',
+ auth: 'edit'
+ },
+ {
+ key: 'edit',
+ label: $t('pages.system.role.actions.edit'),
+ icon: 'ri:edit-2-line',
+ auth: 'edit'
+ },
+ {
+ key: 'delete',
+ label: $t('pages.system.role.actions.delete'),
+ icon: 'ri:delete-bin-4-line',
+ color: '#f56c6c',
+ auth: 'delete'
+ }
+ ]
+}
function createTextColumn(prop, label, minWidth, extra = {}) {
return {
@@ -68,27 +71,27 @@
export function createRoleTableColumns(handleActionClick) {
return [
{ type: 'selection', width: 52, fixed: 'left' },
- createTextColumn('name', '瑙掕壊鍚嶇О', 140),
- createTextColumn('code', '瑙掕壊缂栫爜', 140),
- createTextColumn('memo', '澶囨敞', 180),
- createTagColumn('status', '鐘舵��', 120, (row) => getRoleStatusMeta(row.statusBool ?? row.status)),
- createTextColumn('updateTimeText', '鏇存柊鏃堕棿', 180, {
+ createTextColumn('name', $t('pages.system.role.table.name'), 140),
+ createTextColumn('code', $t('pages.system.role.table.code'), 140),
+ createTextColumn('memo', $t('pages.system.role.table.memo'), 180),
+ createTagColumn('status', $t('pages.system.role.table.status'), 120, (row) => getRoleStatusMeta(row.statusBool ?? row.status)),
+ createTextColumn('updateTimeText', $t('pages.system.role.table.updateTime'), 180, {
sortable: true,
formatter: (row) => row.updateTimeText || '-'
}),
- createTextColumn('createTimeText', '鍒涘缓鏃堕棿', 180, {
+ createTextColumn('createTimeText', $t('pages.system.role.table.createTime'), 180, {
sortable: true,
formatter: (row) => row.createTimeText || '-'
}),
{
prop: 'operation',
- label: '鎿嶄綔',
+ label: $t('pages.system.role.table.operation'),
width: 120,
align: 'center',
fixed: 'right',
formatter: (row) =>
h(ArtButtonMore, {
- list: ROLE_MORE_ACTIONS,
+ list: createRoleMoreActions(),
onClick: (item) => handleActionClick(item, row)
})
}
--
Gitblit v1.9.1