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/views/orders/transfer/transferPage.helpers.js | 58 ++++++++++++++++++++++++++++++----------------------------
1 files changed, 30 insertions(+), 28 deletions(-)
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)
--
Gitblit v1.9.1