fix: remove duplicate permissionMap declaration and eliminate infinite polling interval in stocktake page

This commit is contained in:
DXC
2026-03-23 11:03:55 +08:00
parent 6dfc540dc1
commit 2574da03e5
2 changed files with 0 additions and 48 deletions

View File

@ -808,40 +808,6 @@ const stockColumns = [
]
const allColumns = [...baseColumns, ...stockColumns]
// 列与权限Code的映射关系数据库中的code
const permissionMap: Record<string, string> = {
id: 'inbound_semi:id',
base_id: 'inbound_semi:base_id',
company_name: 'inbound_semi:company_name',
material_name: 'inbound_semi:material_name',
category: 'inbound_semi:category',
material_type: 'inbound_semi:material_type',
spec_model: 'inbound_semi:spec_model',
unit: 'inbound_semi:unit',
sku: 'inbound_semi:sku',
inbound_date: 'inbound_semi:inbound_date',
barcode: 'inbound_semi:barcode',
sn_bn: 'inbound_semi:sn_bn',
status: 'inbound_semi:status',
quality_status: 'inbound_semi:quality_status',
qty_inbound: 'inbound_semi:qty_inbound',
qty_stock: 'inbound_semi:qty_stock',
qty_available: 'inbound_semi:qty_available',
warehouse_loc: 'inbound_semi:warehouse_loc',
bom_code: 'inbound_semi:bom_code',
bom_version: 'inbound_semi:bom_version',
work_order_code: 'inbound_semi:work_order_code',
raw_material_cost: 'inbound_semi:raw_material_cost',
unit_total_cost: 'inbound_semi:unit_total_cost',
total_price: 'inbound_semi:total_price',
production_manager: 'inbound_semi:production_manager',
production_start_time: 'inbound_semi:production_start_time',
production_end_time: 'inbound_semi:production_end_time',
arrival_photo: 'inbound_semi:arrival_photo',
quality_report_link: 'inbound_semi:quality_report_link',
detail_link: 'inbound_semi:detail_link',
}
// 根据用户权限初始化列显示状态
// 初始化列显示状态(移除权限限制,添加 localStorage 支持)
const initColumnPermissions = () => {

View File

@ -473,9 +473,6 @@ const inputQty = ref<number | undefined>(undefined)
const inputRemark = ref('')
const qtyInputRef = ref()
// ★ 新增: 多人协同心跳刷新定时器
let syncTimer: any = null
// ★ 新增: 静默刷新数据不弹loading
const syncData = async () => {
try {
@ -592,19 +589,8 @@ async function fetchBorrowedQuantities(items: StockItem[]): Promise<void> {
onMounted(async () => {
await checkServerDraft()
// ★ 启动多人协同心跳轮询每5秒静默刷新
syncTimer = setInterval(() => {
syncData()
}, 5000)
})
// ★ 新增: 组件卸载时清除定时器
onUnmounted(() => {
if (syncTimer) {
clearInterval(syncTimer)
syncTimer = null
}
})
const checkServerDraft = async () => {
try {