feat:仓储管理-备件入库模块

master
zhongwenkai 1 week ago
parent b00ba145c8
commit 93329264fb

@ -61,3 +61,12 @@ export function getSimpleUserList() {
method: 'get'
})
}
// 仓库库区列表根据仓库ID获取
export function getWarehouseAreaSimpleList(warehouseId) {
return request({
url: '/admin-api/erp/warehouse-area/simple-list',
method: 'get',
params: { warehouseId }
})
}

@ -0,0 +1,13 @@
import request from '@/utils/request'
// 备件列表(分页查询全部产品,前端按 categoryType=5 过滤备件)
export function getSparepartSimpleList(pageNo = 1) {
return request({
url: '/admin-api/erp/product/page',
method: 'get',
params: {
pageNo,
pageSize: 100
}
})
}

@ -0,0 +1,36 @@
import request from '@/utils/request'
// 备件入库单创建
export function createSparepartInbound(data) {
return request({
url: '/admin-api/erp/stock-in/create',
method: 'post',
data: { ...data, inType: '备件入库' }
})
}
// 备件入库单分页查询(待入库/待审核)
export function getSparepartInboundPage(params = {}) {
return request({
url: '/admin-api/erp/stock-in/page',
method: 'get',
params: { ...params, inType: '备件入库' }
})
}
// 备件入库单审核status: 20=通过, 1=驳回)
export function auditSparepartInbound(data) {
return request({
url: '/admin-api/erp/stock-in/audit',
method: 'put',
data
})
}
// 备件入库单删除
export function deleteSparepartInbound(id) {
return request({
url: '/admin-api/erp/stock-in/delete',
method: 'delete',
params: { ids: String(id) }
})
}

@ -749,7 +749,7 @@ export default {
barCode: '物料条码',
name: '物料名称',
category: '物料分类',
unit: '单位',
unit: '库存单位',
standard: '规格',
expiryDay: '保质期天数',
status: '状态',
@ -787,7 +787,7 @@ export default {
code: 'BOM编码',
version: '版本',
product: '产品',
unit: '单位',
unit: '库存单位',
yieldRate: '良品率',
isEnable: '是否启用',
enableYes: '是',
@ -1364,5 +1364,46 @@ export default {
validatorRepairStatusRequired: '请选择维修结果',
validatorFinishDateRequired: '请选择完成日期',
validatorConfirmDateRequired: '请选择验收日期'
},
sparepartInbound: {
moduleName: '备件入库',
tabPending: '待提交',
tabAuditing: '待审核',
searchPlaceholder: '搜索入库单号',
sparepartInfo: '备件信息',
inboundTime: '入库时间',
creator: '创建人',
quantity: '数量',
reviewer: '审核人',
approve: '已通过',
reject: '驳回',
confirmApprove: '确定审核通过该入库单吗?',
confirmReject: '确定驳回该入库单吗?',
approveSuccess: '审核通过',
rejectSuccess: '已驳回',
deleteSuccess: '删除成功',
empty: '暂无入库单据',
createTitle: '新增备件入库',
scanSparepart: '扫备件码',
selectSparepart: '选择备件',
searchSparepartPlaceholder: '搜索备件编码/名称',
sparepartCode: '备件编码',
category: '分类',
spec: '规格',
unit: '库存单位',
purchaseUnit: '采购单位',
convertRatio: '换算关系',
defaultWarehouse: '默认仓库/库区',
selectSparepart: '选择备件',
selectedSpareparts: '已选备件',
noSelectedSparepart: '请扫码或选择备件',
alreadySelected: '该备件已添加',
confirmRemove: '确定移除此备件吗?',
currentStock: '当前库存',
minStockUnit: '最小库存单位',
inboundQuantity: '入库数量',
qtyPlaceholder: '请输入',
noSparepartData: '暂无备件数据',
validatorSparepartRequired: '请选择备件'
}
}

@ -365,6 +365,30 @@
"navigationStyle": "custom"
}
},
{
"path": "sparepartInbound/index",
"style": {
"navigationBarTitleText": "备件入库",
"navigationStyle": "custom"
}
},
{
"path": "sparepartInbound/create",
"style": {
"navigationBarTitleText": "新增备件入库",
"navigationStyle": "custom"
}
},
{
"path": "sparepartInbound/sparepartSelect",
"style": {
"navigationBarTitleText": "选择备件",
"navigationStyle": "custom"
}
},
{
"path": "keypart/index",
"style": {

File diff suppressed because it is too large Load Diff

@ -0,0 +1,594 @@
<template>
<view class="page-container">
<NavBar :title="t('sparepartInbound.moduleName')" />
<!-- 搜索栏 -->
<view class="filter-bar">
<view class="keyword-box">
<input
v-model="searchKeyword"
class="keyword-input"
:placeholder="t('sparepartInbound.searchPlaceholder')"
confirm-type="search"
@input="handleKeywordInput"
@confirm="handleSearch"
/>
</view>
<picker mode="selector" :range="statusLabels" :value="statusIndex" @change="onStatusChange">
<view class="status-box">
<text class="status-box-text">{{ currentStatusLabel }}</text>
<uni-icons type="bottom" size="14" color="#9ca3af"></uni-icons>
</view>
</picker>
<view class="reset-filter-btn" @click="resetFilters">{{ t('functionCommon.reset') }}</view>
</view>
<!-- 列表 -->
<scroll-view
scroll-y
class="list-scroll"
:scroll-top="scrollTop"
@scroll="onScroll"
@scrolltolower="loadMore"
:lower-threshold="80"
>
<view class="list-wrap">
<view
v-for="item in list"
:key="item.id"
class="task-card"
@click="openDetail(item)"
>
<view class="card-header">
<view class="header-main">
<view class="header-left">
<text class="task-no">{{ textValue(item.no) }}</text>
</view>
<view class="header-tags">
<text :class="['record-tag', statusClass(item.status)]">{{ statusText(item.status) }}</text>
</view>
</view>
</view>
<view class="card-body">
<view class="row">
<text class="label">{{ t('sparepartInbound.sparepartInfo') }}</text>
<text class="value">{{ textValue(item.productNames) }}</text>
</view>
<view class="row">
<text class="label">{{ t('sparepartInbound.inboundTime') }}</text>
<text class="value">{{ formatDateTime(item.inTime || item.createTime) }}</text>
</view>
<view class="row">
<text class="label">{{ t('sparepartInbound.creator') }}</text>
<text class="value">{{ textValue(item.creatorName || item.creator) }}</text>
</view>
<view class="row">
<text class="label">{{ t('sparepartInbound.quantity') }}</text>
<text class="value highlight">{{ textValue(item.totalCount) }}</text>
</view>
<view class="row">
<text class="label">{{ t('sparepartInbound.reviewer') }}</text>
<text class="value">{{ textValue(item.auditUserName) }}</text>
</view>
</view>
<!-- 操作按钮待审核状态显示 -->
<view v-if="Number(item.status) === 10" class="card-actions">
<view class="action-btn approve-btn" @click.stop="handleApprove(item)">{{ t('sparepartInbound.approve') }}</view>
<view class="action-btn reject-btn" @click.stop="handleReject(item)">{{ t('sparepartInbound.reject') }}</view>
</view>
</view>
<view v-if="loading && pageNo === 1" class="hint">{{ t('functionCommon.loading') }}</view>
<view v-else-if="!list.length" class="hint">{{ t('sparepartInbound.empty') }}</view>
<view v-else-if="loadingMore" class="hint">{{ t('functionCommon.loadingMore') }}</view>
<view v-else-if="finished" class="hint">{{ t('functionCommon.noMoreData') }}</view>
</view>
</scroll-view>
<!-- 回顶部 -->
<view v-if="showGoTop" class="go-top-btn" @click="goTop">
<uni-icons type="arrow-up" size="20" color="#1f4b79"></uni-icons>
</view>
<!-- 新增按钮 -->
<view class="add-btn" @click="goAdd">
<text class="add-icon">+</text>
</view>
</view>
</template>
<script setup>
import { computed, nextTick, ref } from 'vue'
import { onShow, onUnload } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import NavBar from '@/components/common/NavBar.vue'
import { getSparepartInboundPage, auditSparepartInbound } from '@/api/mes/sparepartInbound'
const { t } = useI18n()
const selectedStatus = ref('')
const searchKeyword = ref('')
const statusOptions = computed(() => [
{ label: t('functionCommon.all'), value: '' },
{ label: t('sparepartInbound.tabPending'), value: '0' },
{ label: t('sparepartInbound.tabAuditing'), value: '10' },
{ label: t('sparepartInbound.approve'), value: '20' }
])
const statusLabels = computed(() => statusOptions.value.map((item) => item.label))
const statusIndex = computed(() => {
const index = statusOptions.value.findIndex((item) => item.value === selectedStatus.value)
return index >= 0 ? index : 0
})
const currentStatusLabel = computed(() => {
const current = statusOptions.value.find((item) => item.value === selectedStatus.value)
return current ? current.label : t('functionCommon.all')
})
const list = ref([])
const loading = ref(false)
const loadingMore = ref(false)
const finished = ref(false)
const pageNo = ref(1)
const pageSize = ref(10)
const scrollTop = ref(0)
const showGoTop = ref(false)
let searchTimer = null
function textValue(v) {
if (v === 0) return '0'
if (v == null) return '-'
const s = String(v).trim()
return s || '-'
}
function formatDateTime(value) {
if (!value) return '-'
if (Array.isArray(value) && value.length >= 3) {
const [year, month, day, hour = 0, minute = 0, second = 0] = value
const pad = (n) => String(n).padStart(2, '0')
return `${year}-${pad(month)}-${pad(day)} ${pad(hour)}:${pad(minute)}:${pad(second)}`
}
const date = new Date(Number(value))
if (Number.isNaN(date.getTime())) return String(value)
const pad = (n) => String(n).padStart(2, '0')
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())} ${pad(date.getHours())}:${pad(date.getMinutes())}`
}
const STATUS_MAP = { 0: '待入库', 10: '待审核', 20: '已通过', 1: '已驳回' }
function statusText(s) {
const num = Number(s)
return STATUS_MAP[num] || textValue(num)
}
function statusClass(s) {
const num = Number(s)
if (num === 0) return 'text-warning'
if (num === 10) return 'text-primary'
if (num === 20) return 'text-success'
if (num === 1) return 'text-danger'
return ''
}
function normalizePageData(res) {
const root = res && res.data !== undefined ? res.data : res
const candidateList = root?.list || root?.rows || root?.records || root?.data?.list || root?.data?.rows || []
const candidateTotal = root?.total ?? root?.data?.total ?? (Array.isArray(candidateList) ? candidateList.length : 0)
return {
list: Array.isArray(candidateList) ? candidateList : [],
total: Number(candidateTotal || 0)
}
}
async function fetchList(reset) {
if (reset) {
pageNo.value = 1
finished.value = false
}
if (pageNo.value === 1) {
loading.value = true
} else {
loadingMore.value = true
}
try {
const params = {
pageNo: pageNo.value,
pageSize: pageSize.value,
no: searchKeyword.value.trim() || undefined,
status: selectedStatus.value || undefined
}
const res = await getSparepartInboundPage(params)
const page = normalizePageData(res)
list.value = reset ? page.list : [...list.value, ...page.list]
finished.value = list.value.length >= page.total || page.list.length < pageSize.value
} catch (e) {
if (!reset) pageNo.value = Math.max(1, pageNo.value - 1)
uni.showToast({ title: t('functionCommon.loadFailed'), icon: 'none' })
} finally {
loading.value = false
loadingMore.value = false
}
}
function onStatusChange(event) {
const index = Number(event?.detail?.value || 0)
selectedStatus.value = statusOptions.value[index]?.value ?? ''
fetchList(true)
}
function handleSearch() {
clearSearchTimer()
uni.hideKeyboard()
fetchList(true)
}
function handleKeywordInput() {
clearSearchTimer()
searchTimer = setTimeout(() => {
fetchList(true)
}, 300)
}
function resetFilters() {
clearSearchTimer()
searchKeyword.value = ''
selectedStatus.value = ''
fetchList(true)
}
async function loadMore() {
if (loading.value || loadingMore.value || finished.value) return
pageNo.value += 1
await fetchList(false)
}
function openDetail(item) {
if (!item?.id) {
uni.showToast({ title: t('functionCommon.noIdView'), icon: 'none' })
return
}
uni.navigateTo({
url: `/pages_function/pages/sparepartInbound/detail?id=${encodeURIComponent(String(item.id))}`
})
}
async function handleApprove(item) {
if (!item?.id) return
uni.showModal({
title: t('functionCommon.confirmTitle'),
content: t('sparepartInbound.confirmApprove'),
confirmColor: '#16a34a',
success: async (res) => {
if (res.confirm) {
try {
await auditSparepartInbound({ id: item.id, status: 20 })
uni.showToast({ title: t('sparepartInbound.approveSuccess'), icon: 'success' })
fetchList(true)
} catch (e) {
uni.showToast({ title: t('functionCommon.saveFailed'), icon: 'none' })
}
}
}
})
}
async function handleReject(item) {
if (!item?.id) return
uni.showModal({
title: t('functionCommon.confirmTitle'),
content: t('sparepartInbound.confirmReject'),
confirmColor: '#dc2626',
success: async (res) => {
if (res.confirm) {
try {
await auditSparepartInbound({ id: item.id, status: 1 })
uni.showToast({ title: t('sparepartInbound.rejectSuccess'), icon: 'success' })
fetchList(true)
} catch (e) {
uni.showToast({ title: t('functionCommon.saveFailed'), icon: 'none' })
}
}
}
})
}
function onScroll(event) {
showGoTop.value = (event?.detail?.scrollTop || 0) > 600
}
function goTop() {
scrollTop.value = 0
}
function goAdd() {
uni.navigateTo({
url: '/pages_function/pages/sparepartInbound/create'
})
}
function clearSearchTimer() {
if (searchTimer) {
clearTimeout(searchTimer)
searchTimer = null
}
}
onShow(() => {
fetchList(true)
})
onUnload(() => {
clearSearchTimer()
})
</script>
<style lang="scss" scoped>
.page-container {
min-height: 100vh;
background: #f4f5f7;
}
/* ====== 搜索栏 ====== */
.filter-bar {
display: flex;
align-items: center;
gap: 12rpx;
padding: 18rpx 24rpx;
background: #fff;
}
.keyword-box {
flex: 1;
min-width: 0;
height: 66rpx;
padding: 0 28rpx;
background: #f4f5f7;
border: 1rpx solid #e5e7eb;
border-radius: 12rpx;
display: flex;
align-items: center;
}
.keyword-input {
width: 100%;
font-size: 24rpx;
color: #374151;
}
.status-box {
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
height: 66rpx;
padding: 0 28rpx;
min-width: 160rpx;
background: #fff;
border: 1rpx solid #e5e7eb;
border-radius: 12rpx;
}
.status-box-text {
font-size: 24rpx;
color: #374151;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.reset-filter-btn {
height: 66rpx;
line-height: 66rpx;
padding: 0 28rpx;
font-size: 24rpx;
color: #4b5563;
background: #fff;
border: 1rpx solid #e5e7eb;
border-radius: 12rpx;
flex-shrink: 0;
}
/* ====== 列表 ====== */
.list-scroll {
height: calc(100vh - 194rpx);
}
.list-wrap {
padding: 0 24rpx 60rpx;
}
.task-card {
position: relative;
margin-top: 20rpx;
padding: 28rpx;
background: #fff;
border-radius: 22rpx;
box-shadow: 0 8rpx 28rpx rgba(15, 23, 42, 0.06);
}
.card-header {
margin-bottom: 18rpx;
}
.header-main {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16rpx;
}
.header-left {
min-width: 0;
flex: 1;
}
.task-no {
font-size: 32rpx;
font-weight: 700;
color: #0f172a;
}
.header-tags {
display: flex;
align-items: center;
gap: 12rpx;
flex-shrink: 0;
}
.record-tag {
padding: 8rpx 18rpx;
border-radius: 999rpx;
font-size: 22rpx;
line-height: 1;
background: #e2e8f0;
color: #64748b;
}
.card-body .row {
display: flex;
justify-content: space-between;
align-items: flex-start;
gap: 20rpx;
margin-top: 12rpx;
&:first-child {
margin-top: 0;
}
}
.label {
width: 140rpx;
font-size: 25rpx;
color: #94a3b8;
flex-shrink: 0;
}
.value {
flex: 1;
text-align: right;
font-size: 27rpx;
color: #334155;
line-height: 1.5;
&.highlight {
color: #1f4b79;
font-weight: 600;
}
}
/* ====== 操作按钮 ====== */
.card-actions {
display: flex;
gap: 16rpx;
margin-top: 20rpx;
padding-top: 20rpx;
border-top: 1rpx solid #f0f0f0;
}
.action-btn {
flex: 1;
height: 64rpx;
line-height: 64rpx;
text-align: center;
border-radius: 10rpx;
font-size: 26rpx;
font-weight: 500;
&.approve-btn {
background: #dcfce7;
color: #16a34a;
}
&.reject-btn {
background: #fee2e2;
color: #dc2626;
}
&:active {
opacity: 0.8;
}
}
/* ====== 状态标签颜色 ====== */
.text-success {
color: #16a34a;
}
.text-danger {
color: #dc2626;
}
.text-warning {
color: #d97706;
}
.text-primary {
color: #2563eb;
}
.record-tag.text-success {
color: #15803d;
background: #dcfce7;
}
.record-tag.text-danger {
color: #dc2626;
background: #fee2e2;
}
.record-tag.text-warning {
color: #d97706;
background: #fef3c7;
}
.record-tag.text-primary {
color: #1d4ed8;
background: #dbeafe;
}
/* ====== 提示 ====== */
.hint {
padding: 36rpx 0;
text-align: center;
color: #94a3b8;
font-size: 26rpx;
}
/* ====== 回顶部 ====== */
.go-top-btn {
position: fixed;
right: 28rpx;
bottom: calc(140rpx + env(safe-area-inset-bottom));
width: 92rpx;
height: 92rpx;
border-radius: 46rpx;
background: rgba(255, 255, 255, 0.96);
box-shadow: 0 8rpx 24rpx rgba(15, 23, 42, 0.12);
display: flex;
align-items: center;
justify-content: center;
}
/* ====== 新增按钮 ====== */
.add-btn {
position: fixed;
right: 28rpx;
bottom: calc(56rpx + env(safe-area-inset-bottom));
width: 92rpx;
height: 92rpx;
border-radius: 46rpx;
background: #1f4b79;
box-shadow: 0 14rpx 30rpx rgba(24, 63, 108, 0.24);
display: flex;
align-items: center;
justify-content: center;
}
.add-icon {
color: #ffffff;
font-size: 64rpx;
line-height: 1;
margin-top: -4rpx;
}
</style>

@ -0,0 +1,295 @@
<template>
<view class="page-container">
<NavBar :title="t('sparepartInbound.selectSparepart')" />
<!-- 搜索区 -->
<view class="search-bar">
<view class="search-input-wrap">
<text class="search-icon iconfont icon-search"></text>
<input class="search-input" v-model="searchText" :placeholder="t('sparepartInbound.searchSparepartPlaceholder')" @input="onSearch" placeholder-class="search-placeholder" />
<text v-if="searchText" class="search-clear" @click="clearSearch"></text>
</view>
</view>
<!-- 备件列表 -->
<scroll-view scroll-y class="sparepart-list" v-if="filteredList.length > 0">
<view
v-for="item in filteredList"
:key="item.id"
class="sparepart-card"
:class="{ active: selectedId === item.id }"
@click="selectedId = item.id"
>
<view class="sparepart-card-header">
<text class="sparepart-name">{{ textValue(item.name) }}</text>
</view>
<view class="sparepart-card-body">
<view class="sparepart-info-row">
<text class="info-label">{{ t('sparepartInbound.sparepartCode') }}</text>
<text class="info-value">{{ textValue(item.barCode) }}</text>
</view>
<view class="sparepart-info-row">
<text class="info-label">{{ t('sparepartInbound.spec') }}</text>
<text class="info-value">{{ textValue(item.standard || item.deviceSpec) }}</text>
</view>
<view class="sparepart-info-row">
<text class="info-label">{{ t('sparepartInbound.category') }}</text>
<text class="info-value">{{ textValue(item.categoryName) }}</text>
</view>
<view class="sparepart-info-row">
<text class="info-label">{{ t('sparepartInbound.unit') }}</text>
<text class="info-value">{{ textValue(item.unitName) }}</text>
</view>
<view class="sparepart-info-row">
<text class="info-label">{{ t('sparepartInbound.purchaseUnit') }}</text>
<text class="info-value">{{ textValue(item.purchaseUnitName) }}</text>
</view>
<view class="sparepart-info-row">
<text class="info-label">{{ t('sparepartInbound.convertRatio') }}</text>
<text class="info-value">1{{ textValue(item.purchaseUnitName) }}={{ textValue(item.purchaseUnitConvertQuantity) }}{{ textValue(item.unitName) }}</text>
</view>
</view>
</view>
</scroll-view>
<!-- 空状态 -->
<view v-else class="empty-wrap">
<text v-if="loading" class="empty-text">{{ t('functionCommon.loading') }}</text>
<text v-else class="empty-text">{{ t('sparepartInbound.noSparepartData') }}</text>
</view>
<!-- 底部确认按钮 -->
<view class="bottom-actions">
<view class="bottom-btn confirm-btn" @click="handleConfirm">
{{ t('functionCommon.confirm') }}
</view>
</view>
</view>
</template>
<script setup>
import { ref, computed } from 'vue'
import { onShow } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import NavBar from '@/components/common/NavBar.vue'
import { getSparepartSimpleList } from '@/api/mes/sparepart'
const { t } = useI18n()
const sparepartList = ref([])
const selectedId = ref(null)
const searchText = ref('')
const loading = ref(false)
function textValue(v) {
if (v === 0) return '0'
if (v == null) return '-'
const s = String(v).trim()
return s || '-'
}
const filteredList = computed(() => {
let list = sparepartList.value
const keyword = searchText.value.trim().toLowerCase()
if (keyword) {
list = list.filter(item => {
return (item.name || '').toLowerCase().includes(keyword) ||
(item.barCode || '').toLowerCase().includes(keyword) ||
(item.standard || '').toLowerCase().includes(keyword)
})
}
return list
})
function onSearch() {}
function clearSearch() {
searchText.value = ''
}
async function loadSpareparts() {
loading.value = true
try {
const raw = []
let page = 1
const maxPages = 5
while (page <= maxPages) {
const res = await getSparepartSimpleList(page)
let root = res && res.data !== undefined ? res.data : res
let pageList = Array.isArray(root)
? root
: Array.isArray(root?.list) ? root.list
: Array.isArray(root?.rows) ? root.rows
: []
if (!pageList.length) break
raw.push(...pageList)
if (pageList.length < 100) break
page++
}
// "33"
sparepartList.value = raw.filter(item => item.categoryName === '33')
console.log('[sparepartSelect] 加载全部物料:', raw.length)
} catch (e) {
console.error('loadSpareparts error', e)
uni.showToast({ title: t('functionCommon.loadFailed'), icon: 'none' })
} finally {
loading.value = false
}
}
function handleConfirm() {
if (!selectedId.value) {
uni.showToast({ title: t('sparepartInbound.validatorSparepartRequired'), icon: 'none' })
return
}
const item = sparepartList.value.find((d) => d.id === selectedId.value)
// globalData onShow
getApp().globalData._sparepartSelectResult = item || null
uni.navigateBack()
}
onShow(async () => {
await loadSpareparts()
})
</script>
<style lang="scss" scoped>
.page-container {
min-height: 100vh;
background: #f5f6f8;
padding-bottom: 140rpx;
}
/* 搜索栏 */
.search-bar {
padding: 16rpx 24rpx;
background: #fff;
}
.search-input-wrap {
display: flex;
align-items: center;
height: 72rpx;
padding: 0 16rpx;
background: #f5f6f8;
border-radius: 36rpx;
}
.search-icon {
font-size: 32rpx;
color: #999;
margin-right: 12rpx;
}
.search-input {
flex: 1;
font-size: 28rpx;
color: #333;
}
.search-placeholder {
color: #bbb;
}
.search-clear {
font-size: 28rpx;
color: #999;
padding: 8rpx;
}
/* 备件列表 */
.sparepart-list {
padding: 16rpx 24rpx;
}
.sparepart-card {
background: #fff;
border-radius: 14rpx;
padding: 24rpx;
margin-bottom: 16rpx;
border: 2rpx solid transparent;
&.active {
border-color: #2563eb;
background: #f0f5ff;
}
}
.sparepart-card-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 16rpx;
}
.sparepart-name {
font-size: 30rpx;
font-weight: 700;
color: #1a1a1a;
}
.sparepart-card-body {
border-top: 1rpx solid #f0f0f0;
padding-top: 16rpx;
}
.sparepart-info-row {
display: flex;
align-items: center;
margin-bottom: 10rpx;
&:last-child {
margin-bottom: 0;
}
}
.info-label {
width: 140rpx;
font-size: 24rpx;
color: #999;
flex-shrink: 0;
}
.info-value {
font-size: 26rpx;
color: #333;
}
/* 空状态 */
.empty-wrap {
padding: 120rpx 0;
text-align: center;
}
.empty-text {
font-size: 28rpx;
color: #999;
}
/* 底部确认按钮 */
.bottom-actions {
position: fixed;
left: 0;
right: 0;
bottom: 0;
padding: 18rpx 24rpx calc(18rpx + env(safe-area-inset-bottom));
background: #fff;
box-shadow: 0 -4rpx 20rpx rgba(0, 0, 0, 0.06);
z-index: 99;
}
.bottom-btn {
width: 100%;
height: 84rpx;
line-height: 84rpx;
text-align: center;
border-radius: 16rpx;
font-size: 30rpx;
font-weight: 600;
}
.confirm-btn {
background: #1f4b79;
color: #fff;
}
</style>

@ -87,6 +87,10 @@ const MENU_ROUTE_MAP = {
mold: '/pages_function/pages/mold/index',
equipment: '/pages_function/pages/equipment/index',
spare: '/pages_function/pages/spare/index',
sparepartInbound: '/pages_function/pages/sparepartInbound/index',
sparepartinbound: '/pages_function/pages/sparepartInbound/index',
sparepartIn: '/pages_function/pages/sparepartInbound/index',
'备件入库': '/pages_function/pages/sparepartInbound/index',
keypart: '/pages_function/pages/keypart/index',
product: '/pages_function/pages/product/index'
}

Loading…
Cancel
Save