From 67bc5b6c5d568f04b3ad3b9dd49ecbbc31fe7e7b Mon Sep 17 00:00:00 2001 From: dxc Date: Thu, 11 Jun 2026 17:36:34 +0800 Subject: [PATCH] V3.45 --- inventory-web/src/App.vue | 2 +- inventory-web/src/views/stock/inbound/product.vue | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/inventory-web/src/App.vue b/inventory-web/src/App.vue index a73c841..eea1915 100644 --- a/inventory-web/src/App.vue +++ b/inventory-web/src/App.vue @@ -239,7 +239,7 @@ const handleLogout = () => { diff --git a/inventory-web/src/views/stock/inbound/product.vue b/inventory-web/src/views/stock/inbound/product.vue index 641b33e..c31848a 100644 --- a/inventory-web/src/views/stock/inbound/product.vue +++ b/inventory-web/src/views/stock/inbound/product.vue @@ -749,6 +749,7 @@ const allColumns = [ { prop: 'company_name', label: '所属公司', minWidth: '100', sortable: true }, // [新增] { prop: 'material_name', label: '名称', minWidth: '140', sortable: true }, { prop: 'sku', label: 'SKU', minWidth: '110', sortable: true }, + { prop: 'warehouse_loc', label: '库位', minWidth: '120', sortable: true }, { prop: 'serial_number', label: '序列号', minWidth: '130', sortable: true }, { prop: 'qty_stock', label: '库存', minWidth: '90', sortable: true }, { prop: 'status', label: '状态', minWidth: '90', sortable: true }, @@ -1397,7 +1398,7 @@ const submitForm = async () => { const res: any = await createProductInbound(payload) ElMessage.success('入库成功') const newItem = res.data - if (newItem) { ElMessage.info('发送打印...'); try { await executePrint({ ...newItem, copies: form.print_copies }); ElMessage.success(`指令已发送 (x${form.print_copies})`) } catch (e: any) { ElMessage.warning('打印失败') } } + if (newItem) { ElMessage.info('发送打印...'); try { const printPayload = { ...newItem, warehouse_loc: form.warehouse_location || newItem.warehouse_location || newItem.warehouse_loc || '未分配', copies: form.print_copies }; await executePrint(printPayload); ElMessage.success(`指令已发送 (x${form.print_copies})`) } catch (e: any) { ElMessage.warning('打印失败') } } } else { await updateProductInbound(form.id!, payload); ElMessage.success('更新成功') } visible.value = false; fetchData() } catch(error:any) { @@ -1447,7 +1448,7 @@ const handleBeforeRemove = (uploadFile, uploadFiles) => { const handlePrint = async (row: any) => { printVisible.value = true; printLoading.value = true; previewUrl.value = '' - currentPrintData.value = { global_print_id: row.global_print_id, material_name: row.material_name, spec_model: row.spec_model, category: row.category, material_type: row.material_type, warehouse_loc: row.warehouse_loc, serial_number: row.serial_number, sku: row.sku } + currentPrintData.value = { global_print_id: row.global_print_id, material_name: row.material_name, spec_model: row.spec_model, category: row.category, material_type: row.material_type, warehouse_loc: row.warehouse_location || row.warehouse_loc || '未分配', serial_number: row.serial_number, sku: row.sku } try { const res: any = await getLabelPreview(currentPrintData.value); previewUrl.value = res.data } catch (e) { ElMessage.error('预览失败') } finally { printLoading.value = false } } const confirmPrint = async () => { printing.value = true; try { await executePrint({ ...currentPrintData.value, copies: printCopies.value }); ElMessage.success(`已发送 (x${printCopies.value})`); printVisible.value = false } catch (e: any) { ElMessage.error('打印失败') } finally { printing.value = false } }