diff --git a/src/locales/zh-CN.js b/src/locales/zh-CN.js index ef09024..1a932ee 100644 --- a/src/locales/zh-CN.js +++ b/src/locales/zh-CN.js @@ -755,7 +755,7 @@ export default { basicInfo: '基础信息', barCode: '物料条码', name: '物料名称', - category: '物料分类', + category: '物料小类', unit: '库存单位', standard: '规格', expiryDay: '保质期天数', @@ -1467,7 +1467,7 @@ export default { count: '基本数量', stockDisplay: '库存展示', unit: '单位', - category: '物料分类', + category: '物料小类', packagingRule: '包装/换算规则', recentInTime: '最近入库', recentOutTime: '最近出库', diff --git a/src/pages.json b/src/pages.json index af11d13..693ab5e 100644 --- a/src/pages.json +++ b/src/pages.json @@ -423,6 +423,13 @@ "navigationStyle": "custom" } }, + { + "path": "sparepartInventory/detail", + "style": { + "navigationBarTitleText": "备件详情", + "navigationStyle": "custom" + } + }, { "path": "keypart/index", diff --git a/src/pages_function/pages/sparepartInventory/detail.vue b/src/pages_function/pages/sparepartInventory/detail.vue new file mode 100644 index 0000000..e572aaf --- /dev/null +++ b/src/pages_function/pages/sparepartInventory/detail.vue @@ -0,0 +1,306 @@ + + + + + diff --git a/src/pages_function/pages/sparepartInventory/index.vue b/src/pages_function/pages/sparepartInventory/index.vue index 8cc570e..460e9c6 100644 --- a/src/pages_function/pages/sparepartInventory/index.vue +++ b/src/pages_function/pages/sparepartInventory/index.vue @@ -29,16 +29,19 @@ :lower-threshold="80" > - + {{ textValue(item.barCode) }} - {{ textValue(item.categoryName) }} {{ t('sparepartInventory.productName') }} {{ textValue(item.productName) }} + + {{ t('sparepartInventory.category') }} + {{ textValue(item.categoryName) }} + {{ t('sparepartInventory.warehouse') }} {{ textValue(item.warehouseName) }} @@ -297,6 +300,15 @@ async function resetWarehouse() { await fetchList(true) } +function openDetail(item) { + if (!item?.productId) return + // 把完整数据存到 globalData,详情页直接读取 + getApp().globalData._sparepartInventoryDetail = item + uni.navigateTo({ + url: `/pages_function/pages/sparepartInventory/detail?id=${item.productId}&warehouseId=${item.warehouseId || ''}&areaId=${item.areaId || ''}` + }) +} + async function loadMore() { // 有关键词搜索时不触发分页加载(全量数据已一次性取回) if (searchKeyword.value.trim()) return @@ -447,17 +459,6 @@ function formatDateTime(value) { font-weight: 700; } -.category-chip { - flex-shrink: 0; - padding: 8rpx 18rpx; - border-radius: 999rpx; - font-size: 24rpx; - font-weight: 600; - line-height: 1.2; - color: #15803d; - background: #dcfce7; -} - .info-row { display: flex; align-items: center;