@@ -205,7 +222,6 @@ import {
type EntryDetailItem,
type EntryOrderDetail,
type ReceivingCompareResponse,
- type ReceivingCompareItem,
type ReceivingCompareRow,
} from '@/api/storage.entry/entry'
import {
@@ -317,26 +333,6 @@ const entryOrderStatusLabel = computed(() => {
const entryOrderStatusTag = computed(() => getEntryOrderStatusTagType(props.row?.order_status))
-const entryRemark = computed(() => {
- const remark = props.row?.remark
- return remark !== null && remark !== undefined && String(remark).trim() ? String(remark).trim() : ''
-})
-
-const entryExpressCode = computed(() => {
- const code = props.row?.express_code
- return code !== null && code !== undefined && String(code).trim() ? String(code).trim() : ''
-})
-
-const entryLogisticsName = computed(() => {
- const name = props.row?.logistics_name
- return name !== null && name !== undefined && String(name).trim() ? String(name).trim() : ''
-})
-
-const entryPurchaseOrderCode = computed(() => {
- const code = props.row?.purchase_order_code
- return code !== null && code !== undefined && String(code).trim() ? String(code).trim() : ''
-})
-
const entryTotalQuantity = computed(() => {
// 1) 优先:接口在 entryOrder 外层返回的 total_quantity
if (entryTotalQuantityRaw.value !== null && entryTotalQuantityRaw.value !== undefined) {
@@ -373,6 +369,21 @@ const canSubmitBind = computed(
!receivingListLoading.value
)
+/** 页脚提示:随选择与对照结果变化 */
+const bindHintText = computed(() => {
+ if (!entryStoreId.value) return '当前入库单缺少货主信息'
+ if (!selectedReceivingRows.value.length) return '请选择需要绑定的收货单'
+ if (compareLoading.value) return '正在对照商品…'
+ return isEntryFullyCovered.value ? '已覆盖当前入库单全部商品' : '部分入库商品尚未匹配到收货商品'
+})
+
+const hintWarning = computed(
+ () =>
+ selectedReceivingRows.value.length > 0 &&
+ !isEntryFullyCovered.value &&
+ !compareLoading.value
+)
+
function isApiSuccess(res: { code?: number; flag?: string } | null | undefined): boolean {
if (!res) return false
if (res.code === 200 || res.code === 1) return true
@@ -856,86 +867,232 @@ watch(
diff --git a/src/views/storage/entry/component/DirectInboundImportDialog.vue b/src/views/storage/entry/component/DirectInboundImportDialog.vue
index 4035b386..ed6767dd 100644
--- a/src/views/storage/entry/component/DirectInboundImportDialog.vue
+++ b/src/views/storage/entry/component/DirectInboundImportDialog.vue
@@ -1,8 +1,10 @@
-
-
-
+
+
+
-
- 取消
-
- 确认导入
-
+
+ 取消
+
+ 确认导入
+
+
@@ -229,6 +259,8 @@
:loading="spaceLoading"
:show-selection="true"
:multiple-selection="spaceSelection"
+ :show-pagination="false"
+ default-align="center"
:pagination="{
currentPage: spacePagination.page,
pageSize: spacePagination.pageSize,
@@ -242,14 +274,26 @@
]"
@selection-change="handleSpaceSelectionChange"
@row-click="handleSpaceRowClick"
- @page-change="querySpaces"
- @page-size-change="onSpacePageSizeChange"
/>
- 取消
- 使用选中库位
+
@@ -313,6 +357,20 @@ const pagedParsedRows = computed(() => {
return parsedRows.value.slice(start, start + parsedPageSize.value)
})
+/** 批量导入预览列:结构 / 尺寸对齐 storage/receiving「批量导入商品」 */
+const batchImportColumns = [
+ { prop: 'rowIndex', label: 'Excel行', width: '80' },
+ { prop: 'stock_id', label: 'SKU', width: '110' },
+ { prop: 'warehouse_item_code', label: '商品编码', minWidth: '150' },
+ { prop: 'warehouse_item_name', label: '商品名称', minWidth: '170' },
+ { prop: 'remaining_quantity', label: '剩余可入', width: '90' },
+ { prop: 'quantity', label: '入库数量', width: '120' },
+ { prop: 'inbound_type', label: '入库方式', width: '110' },
+ { prop: 'space_keyword', label: '库位', width: '190' },
+ { prop: 'remark', label: '备注', minWidth: '150' },
+ { prop: 'operation', label: '操作', width: '70', fixed: 'right' },
+]
+
const singleForm = reactive({
quantity: 1,
inbound_type: 'import' as 'import' | 'pda',
@@ -521,6 +579,10 @@ function onSpacePageSizeChange(size: number) {
void querySpaces(1)
}
+function onSpacePageChange(page: number) {
+ void querySpaces(page)
+}
+
async function querySpaces(page = 1) {
spaceLoading.value = true
try {
@@ -785,31 +847,180 @@ async function handleSubmit() {
}
}
-.batch-import-panel {
- .batch-tip {
- margin-bottom: 12px;
+/* 批量导入入库面板:结构 / 尺寸对齐 storage/receiving「批量导入商品」 */
+.task-panel {
+ display: flex;
+ flex-direction: column;
+ max-height: calc(100vh - 96px);
+ background: #fff;
+ color: #303133;
+
+ &__head {
+ display: flex;
+ align-items: flex-start;
+ gap: 12px;
+ padding: 16px 16px 8px;
+ flex-shrink: 0;
}
- .batch-toolbar {
+ &__titles {
+ flex: 1;
+ min-width: 0;
+
+ h2 {
+ margin: 0;
+ font-size: 18px;
+ line-height: 24px;
+ font-weight: 400;
+ color: #303133;
+ }
+
+ p {
+ margin: 4px 0 0;
+ font-size: 12px;
+ line-height: 18px;
+ color: #909399;
+ }
+ }
+
+ &__close {
+ width: 24px;
+ height: 24px;
+ flex: none;
+ display: inline-flex;
+ align-items: center;
+ justify-content: center;
+ border: none;
+ border-radius: 4px;
+ background: transparent;
+ color: #909399;
+ cursor: pointer;
+ transition: color 0.2s;
+
+ svg {
+ width: 12px;
+ height: 12px;
+ }
+
+ &:hover {
+ color: #409eff;
+ }
+ }
+
+ &__body {
+ flex: 1;
+ min-height: 0;
+ padding: 6px 16px 0;
+ display: flex;
+ flex-direction: column;
+ overflow-y: auto;
+ }
+
+ /* 工具栏:按钮间距 6px,与 OrderToolbarButtonGroup 一致 */
+ &__toolbar {
+ display: flex;
+ align-items: center;
+ gap: 12px;
+ flex-shrink: 0;
+ }
+
+ &__toolbar-main {
+ display: flex;
+ align-items: center;
+ flex-wrap: wrap;
+ gap: 6px;
+ min-width: 0;
+
+ :deep(.el-button) {
+ margin-left: 0;
+ margin-right: 0;
+ }
+ }
+
+ &__file-hint {
+ margin-left: auto;
+ min-width: 0;
+ max-width: 40%;
+ font-size: 12px;
+ line-height: 20px;
+ color: #909399;
+ white-space: nowrap;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+
+ &__section {
+ display: flex;
+ flex-direction: column;
+ gap: 6px;
+ margin-top: 10px;
+ flex-shrink: 0;
+ }
+
+ &__foot {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ gap: 12px;
+ padding: 12px 16px 16px;
+ flex-shrink: 0;
+ }
+
+ &__actions {
display: flex;
align-items: center;
gap: 8px;
- margin-bottom: 12px;
+
+ :deep(.el-button) {
+ margin-left: 0;
+ margin-right: 0;
+ }
+ }
+}
+
+/* 表格固定高度:数据少也保持同样大小,超出容器时表格内部滚动(短屏自适应) */
+.batch-import-table {
+ height: min(450px, calc(100vh - 280px));
+ border-radius: 4px;
+ overflow: hidden;
+}
+
+/* 分页位于页脚按钮左侧;尺寸 / 选择器宽度对齐 UpperTable 默认分页 */
+.batch-import-pagination,
+.space-picker-pagination {
+ flex: none;
+ margin-right: 4px;
+
+ :deep(.el-pagination) {
+ flex-wrap: wrap;
+ justify-content: flex-end;
+ --el-pagination-button-width: 28px;
+ --el-pagination-button-height: 28px;
}
- .file-name {
- font-size: 12px;
- color: #606266;
+ :deep(.el-pagination__total),
+ :deep(.el-pagination__sizes) {
+ display: inline-flex !important;
+ margin-right: 8px;
+ }
+
+ :deep(.el-select--small) {
+ width: 80px;
+ }
+
+ :deep(.el-input__wrapper) {
+ padding: 0 4px;
}
}
.batch-cell-action {
display: flex;
align-items: center;
+ justify-content: center;
gap: 6px;
+ min-width: 0;
.space-keyword-text {
- flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
@@ -833,4 +1044,34 @@ async function handleSubmit() {
.picker-table-wrap {
height: 440px;
}
+
+/* 选择系统库位:分页与按钮同行(对齐「批量导入商品」页脚) */
+.picker-footer {
+ display: flex;
+ align-items: center;
+ justify-content: flex-end;
+ gap: 8px;
+
+ :deep(.el-button) {
+ margin-left: 0;
+ margin-right: 0;
+ }
+}
+
+
+
diff --git a/src/views/storage/entry/component/UnbindReceivingToEntryDialog.vue b/src/views/storage/entry/component/UnbindReceivingToEntryDialog.vue
index bcd79e2f..3c17a5c3 100644
--- a/src/views/storage/entry/component/UnbindReceivingToEntryDialog.vue
+++ b/src/views/storage/entry/component/UnbindReceivingToEntryDialog.vue
@@ -1,62 +1,69 @@
-
-
-
-
- 入库单号
- {{ entryOrderCode }}
-
-
- 入库单ID
- {{ entryOrderId }}
-
-
- 货主
- {{ entryStoreName }}
-
-
- 订单状态
- {{ entryOrderStatusLabel }}
-
-
+
+
+
-
-
- 解除绑定将释放所选收货单与本入库单的主表关联,并按数量台账回滚其已入库进度;仅「已创建 / 待入库」状态的入库单可解绑。
-
-
+
+
+
+
+ 入库单号
+ {{ entryOrderCode || '—' }}
+
+
+ 货主
+ {{ entryStoreName || '—' }}
+
+
+ 状态
+
+ {{ entryOrderStatusLabel }}
+
+ —
+
+
-
-
-
-
-
+
+ 仅「已创建 / 待入库」状态的入库单可解绑;解绑后不可撤销,请谨慎操作。
+
-
-
+
+
+
+
-
- 勾选已绑定的收货单,确认后将调用接口解除绑定并回滚入库进度。
-
-
-
+
-
-
-
- {{ resultSummaryText }}
-
-
-
失败明细({{ resultFailedRows.length }})
-
-
{{ item.receiving_number || ('收货单#' + item.receiving_id) }}
-
{{ item.error_code_label }}
-
{{ item.message || '解绑失败' }}
+
+
+
+ {{ resultSummaryText }}
-
-
-
成功明细({{ resultSuccessRows.length }})
-
-
{{ item.receiving_number || ('收货单#' + item.receiving_id) }}
-
已解绑
-
- 释放明细 {{ item.released_detail_count ?? 0 }} 条,回滚入库 {{ formatRollback(item.rolled_back_quantity) }}
-
+
+
+ 失败明细({{ resultFailedRows.length }})
+
+
+ {{ item.receiving_number || ('收货单#' + item.receiving_id) }}
+ {{ item.error_code_label }}
+ {{ item.message || '解绑失败' }}
+
+
+
+
+ 成功明细({{ resultSuccessRows.length }})
+
+
+ {{ item.receiving_number || ('收货单#' + item.receiving_id) }}
+ 已解绑
+
+ 释放明细 {{ item.released_detail_count ?? 0 }} 条,回滚入库
+ {{ formatRollback(item.rolled_back_quantity) }}
+
+
-
-
-
- {{ resultVisible ? '关闭' : '取消' }}
-
-
- 确认解绑
-
-
+
+
+
+
diff --git a/src/views/storage/inventory/component/SpaceStockDialog.vue b/src/views/storage/inventory/component/SpaceStockDialog.vue
index f417092b..ad01d870 100644
--- a/src/views/storage/inventory/component/SpaceStockDialog.vue
+++ b/src/views/storage/inventory/component/SpaceStockDialog.vue
@@ -1,77 +1,146 @@
-
-
- 查询
-
- 刷新
-
-
+
+
+
-
-
- 单条 wms_storage 记录移库;移库数量不填则全量移库。
-
-
- 按原库位 + 商品合并移库,自动合并该库位下该商品的所有库存;不适用于开启批次管理且多批次的商品。
-
-