diff --git a/src/api/mes/sparepart.js b/src/api/mes/sparepart.js
index 7b7ba32..1afc49a 100644
--- a/src/api/mes/sparepart.js
+++ b/src/api/mes/sparepart.js
@@ -11,3 +11,12 @@ export function getSparepartSimpleList(pageNo = 1) {
}
})
}
+
+// 备件详情(含供应商、图片等完整信息)
+export function getSparepartDetail(id) {
+ return request({
+ url: '/admin-api/erp/product/get',
+ method: 'get',
+ params: { id }
+ })
+}
diff --git a/src/api/mes/sparepartOutbound.js b/src/api/mes/sparepartOutbound.js
new file mode 100644
index 0000000..5325f84
--- /dev/null
+++ b/src/api/mes/sparepartOutbound.js
@@ -0,0 +1,28 @@
+import request from '@/utils/request'
+
+// 备件出库单分页查询
+export function getSparepartOutboundPage(params = {}) {
+ return request({
+ url: '/admin-api/erp/stock-out/page',
+ method: 'get',
+ params: { ...params, outType: '备件出库' }
+ })
+}
+
+// 备件出库单审核(status: 20=通过, 1=驳回)
+export function auditSparepartOutbound(data) {
+ return request({
+ url: '/admin-api/erp/stock-out/audit',
+ method: 'put',
+ data
+ })
+}
+
+// 备件出库单删除
+export function deleteSparepartOutbound(id) {
+ return request({
+ url: '/admin-api/erp/stock-out/delete',
+ method: 'delete',
+ params: { ids: String(id) }
+ })
+}
diff --git a/src/components/common/PermissionMenuPage.vue b/src/components/common/PermissionMenuPage.vue
index 8e1b115..314a4e5 100644
--- a/src/components/common/PermissionMenuPage.vue
+++ b/src/components/common/PermissionMenuPage.vue
@@ -37,7 +37,7 @@
- {{ translateLiteral(module.name) }}
+ {{ getDisplayName(module) }}
@@ -60,9 +60,9 @@
size="24"
:color="getModuleColor(moduleIndex)"
>
- {{ getMenuSymbol(entry.name, entryIndex) }}
+ {{ getMenuSymbol(getDisplayName(entry), entryIndex) }}
- {{ translateLiteral(entry.name) }}
+ {{ getDisplayName(entry) }}
@@ -77,10 +77,10 @@
+
+
diff --git a/src/pages_function/pages/sparepartOutbound/index.vue b/src/pages_function/pages/sparepartOutbound/index.vue
new file mode 100644
index 0000000..985b2a6
--- /dev/null
+++ b/src/pages_function/pages/sparepartOutbound/index.vue
@@ -0,0 +1,594 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ currentStatusLabel }}
+
+
+
+ {{ t('functionCommon.reset') }}
+
+
+
+
+
+
+
+
+
+ {{ t('sparepartOutbound.sparepartInfo') }}
+ {{ textValue(item.productNames) }}
+
+
+ {{ t('sparepartOutbound.outboundTime') }}
+ {{ formatDateTime(item.outTime || item.createTime) }}
+
+
+ {{ t('sparepartOutbound.creator') }}
+ {{ textValue(item.creatorName || item.creator) }}
+
+
+ {{ t('sparepartOutbound.quantity') }}
+ {{ textValue(item.totalCount) }}
+
+
+ {{ t('sparepartOutbound.reviewer') }}
+ {{ textValue(item.auditUserName) }}
+
+
+
+
+ {{ t('sparepartOutbound.approve') }}
+ {{ t('sparepartOutbound.reject') }}
+
+
+
+ {{ t('functionCommon.loading') }}
+ {{ t('sparepartOutbound.empty') }}
+ {{ t('functionCommon.loadingMore') }}
+ {{ t('functionCommon.noMoreData') }}
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
diff --git a/src/pages_mine/pages/setting/index.vue b/src/pages_mine/pages/setting/index.vue
index e749f95..503daab 100644
--- a/src/pages_mine/pages/setting/index.vue
+++ b/src/pages_mine/pages/setting/index.vue
@@ -178,7 +178,7 @@ function dialogClose() {
.server-address-text {
max-width: 400rpx;
- text-align: right;
+ // text-align: right;
word-break: break-all;
}
diff --git a/src/utils/permissionMenu.js b/src/utils/permissionMenu.js
index ef56ef7..60de1a1 100644
--- a/src/utils/permissionMenu.js
+++ b/src/utils/permissionMenu.js
@@ -1,3 +1,4 @@
+import { getCurrentLocale } from '@/locales'
const DIRECT_ROUTE_PREFIXES = ['pages/', 'page_', 'pages_']
@@ -88,6 +89,8 @@ const MENU_ROUTE_MAP = {
equipment: '/pages_function/pages/equipment/index',
spare: '/pages_function/pages/spare/index',
sparepartInbound: '/pages_function/pages/sparepartInbound/index',
+ sparepartoutbound: '/pages_function/pages/sparepartOutbound/index',
+ '备件出库': '/pages_function/pages/sparepartOutbound/index',
sparepartinbound: '/pages_function/pages/sparepartInbound/index',
sparepartIn: '/pages_function/pages/sparepartInbound/index',
'备件入库': '/pages_function/pages/sparepartInbound/index',
@@ -189,7 +192,7 @@ export function getConfigurableNavMenus(menus) {
export function buildNavMenuViewModels(menus) {
return getConfigurableNavMenus(menus).map((menu, index) => {
- const displayName = String(menu.name || menu.enName || '').trim() || `菜单${index + 1}`
+ const displayName = getLocalizedMenuName(menu, `菜单${index + 1}`)
return {
...menu,
displayName,
@@ -332,13 +335,22 @@ export function getMenuSymbol(name, index) {
return MENU_SYMBOLS[index % MENU_SYMBOLS.length]
}
+export function getLocalizedMenuName(menu, fallback = '') {
+ const name = String(menu?.name || '').trim()
+ const enName = String(menu?.enName || '').trim()
+ if (getCurrentLocale() === 'en-US') {
+ return enName || name || fallback
+ }
+ return name || enName || fallback
+}
+
export function syncTabBarMenus(menus, options = {}) {
const reportMenu = findTabMenuByPage(menus, 'pages/report')
const workMenu = findTabMenuByPage(menus, 'pages/work')
return [
options.homeText || '首页',
- reportMenu?.name || options.reportFallback || '报表',
- workMenu?.name || reportMenu?.name || options.workFallback || '管理',
+ getLocalizedMenuName(reportMenu, options.reportFallback || '报表'),
+ getLocalizedMenuName(workMenu, getLocalizedMenuName(reportMenu, options.workFallback || '管理')),
options.mineText || '我的'
]
}