From e8b3eda8955466573ce4de18609bc8d221717c38 Mon Sep 17 00:00:00 2001 From: yin <3313488199@qq.com> Date: Fri, 23 Oct 2026 18:00:35 +0800 Subject: [PATCH] 1 --- .../task-progress/TaskProgressPanel.vue | 2 + .../UnifiedTaskProgressDialog.vue | 3 + .../config/components/DetailPanel.vue | 12 +- src/views/afterSale/typelist/index.vue | 9 + src/views/data/packingflow/index.vue | 25 +- src/views/express/returnUnpack/index.vue | 29 +- .../waybill/config/components/DetailPanel.vue | 14 +- src/views/express/waybill/index.vue | 4 +- .../component/BatchImportDialog.vue | 451 ++++++++++--- .../order/orderManagement/exceptionOrder.vue | 1 + .../form/StorageAllocateForm.vue | 40 +- .../orderManagement/form/SyncOrderIdsForm.vue | 205 +++++- .../order/orderManagement/pendingOrder.vue | 1 + .../waveOrder/GroupWaveBatchListPanel.vue | 79 ++- .../component/PendingOrderListPanel.vue | 1 + src/views/stock/external_stock/index.vue | 22 +- .../component/BindReceivingToEntryDialog.vue | 567 ++++++++++------- .../component/DirectInboundImportDialog.vue | 467 ++++++++++---- .../UnbindReceivingToEntryDialog.vue | 410 ++++++++---- .../inventory/component/SpaceStockDialog.vue | 541 +++++++++++++--- .../inventory/component/panelstockdetail.vue | 598 +++++++++++++----- .../log/component/TransactionDetail.vue | 47 +- src/views/storage/log/index.vue | 4 +- .../component/ProductflowDetail.vue | 47 +- src/views/storage/productflow/index.vue | 17 +- src/views/storage/productflow/store/index.vue | 74 ++- .../storage/receiving/component/Product.vue | 268 ++++++-- .../storage/receiving/receiving-config.ts | 42 +- src/views/storage/report/store.vue | 23 +- .../config/components/CheckItemsPanel.vue | 1 + .../config/components/CheckRecordsPanel.vue | 20 +- .../config/components/CheckReportDialog.vue | 323 ++++++++-- .../config/components/DetailPanel.vue | 25 +- src/views/storage/stockcheck/index.vue | 327 +++++++++- .../pages/CheckStockPickerDialog.vue | 532 +++++++++++----- 35 files changed, 3958 insertions(+), 1273 deletions(-) diff --git a/src/components/task-progress/TaskProgressPanel.vue b/src/components/task-progress/TaskProgressPanel.vue index fa05b573..b53bf80f 100644 --- a/src/components/task-progress/TaskProgressPanel.vue +++ b/src/components/task-progress/TaskProgressPanel.vue @@ -33,6 +33,8 @@ {{ field.value ?? '—' }} + +

{{ formTip }}

diff --git a/src/components/task-progress/UnifiedTaskProgressDialog.vue b/src/components/task-progress/UnifiedTaskProgressDialog.vue index 3fb52f38..d16e9d7e 100644 --- a/src/components/task-progress/UnifiedTaskProgressDialog.vue +++ b/src/components/task-progress/UnifiedTaskProgressDialog.vue @@ -12,6 +12,9 @@ @closed="emit('closed')" > + @@ -165,3 +168,18 @@ function handleToggleField(field: ProgressFormField) { } } + + diff --git a/src/views/order/orderManagement/form/SyncOrderIdsForm.vue b/src/views/order/orderManagement/form/SyncOrderIdsForm.vue index 7766babf..9be2cd8a 100644 --- a/src/views/order/orderManagement/form/SyncOrderIdsForm.vue +++ b/src/views/order/orderManagement/form/SyncOrderIdsForm.vue @@ -22,24 +22,65 @@ @closed="emit('closed')" @submit="emit('submit')" > + + + + diff --git a/src/views/order/orderManagement/pendingOrder.vue b/src/views/order/orderManagement/pendingOrder.vue index 7dedc2b3..f410443b 100644 --- a/src/views/order/orderManagement/pendingOrder.vue +++ b/src/views/order/orderManagement/pendingOrder.vue @@ -252,6 +252,7 @@ @@ -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 @@ + + 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 @@ + + diff --git a/src/views/storage/inventory/component/panelstockdetail.vue b/src/views/storage/inventory/component/panelstockdetail.vue index ad0634bc..1ffbdc85 100644 --- a/src/views/storage/inventory/component/panelstockdetail.vue +++ b/src/views/storage/inventory/component/panelstockdetail.vue @@ -88,125 +88,210 @@ -

- 单条 wms_storage 记录移库;移库数量不填则全量移库。 -

-

- 按原库位 + 商品合并移库,自动合并该库位下该商品的所有库存;不适用于开启批次管理且多批次的商品。 -

-
- -
- 目标库位名称: {{ spaceName }} - 未找到库位 + +
+
+
+

{{ dialogTitle }}

+

{{ transferSubtitle }}

+
+ +
+ +
+
+
+ 商品 + {{ transferItemLabel }} +
+
+ 原库位 + {{ transferFromSpaceLabel }} +
+
+ 可移数量 + {{ transferAvailableLabel }} +
+ +
+ 目标库位 + +
+
+ 库位名称 + + {{ transferTargetSpaceLabel }} + +
+
+ 移库数量 + +
+
+ +

{{ transferTipText }}

- + +
+ {{ transferHintText }} +
+ 取消 + + {{ confirmButtonText }} + +
+
- - - {{ expiryRow?.storage_id ?? '--' }} - {{ expiryRow?.batch_no || '--' }} - {{ expiryItemLabel }} - {{ expiryRow?.space_code || '--' }} - + +
+
+
+

维护生产日期 / 到期日期

+

不改动=保持库内原值,改选=下发新日期,清空输入框=下发 null 置空

+
+ +
-

- 输入框已回显库内当前日期:不改动=保持原值(不下发);改选日期=下发新日期;点「清空」清空输入框=下发 null 置空。两个日期至少改一项,且生产日期不得晚于到期日期。 -

+
+
+
+ 库存记录ID + {{ expiryRow?.storage_id ?? '—' }} +
+
+ 商品 + {{ expiryItemLabel }} +
+
+ 批次号 + {{ expiryRow?.batch_no || '—' }} +
+
+ 库位 + {{ expiryRow?.space_code || '—' }} +
- - -
- +
+ 生产日期 + + + 清空 + +
+
+ 库内生产日期 + + {{ formatExpiryValue(expiryRow?.production_date) }} + +
+ +
+ 到期日期 + + + 清空 + +
+
+ 库内到期日期 + + {{ formatExpiryValue(expiryRow?.expiry_date) }} + +
+
+ +

+ 两个日期至少改一项;生产日期不得晚于到期日期;清空输入框将下发 null 置空该字段。 +

+
+ +
+ {{ expiryHintText }} +
+ 取消 - 清空 + 确认维护
- - - -
- - - 清空 - -
-
- - - - - +
+
{ return true }) +/* ───────────────── 移库弹窗:面板展示与提示 ───────────────── */ + +/** 商品:名称(编码) */ +const transferItemLabel = computed(() => { + const row = activeRow.value || {} + const name = String(row.item_name || row.stock?.item_name || '').trim() + const code = String(row.item_code || row.stock?.item_code || '').trim() + if (name && code) return `${name}(${code})` + return name || code || '—' +}) + +/** 原库位 */ +const transferFromSpaceLabel = computed(() => { + const row = activeRow.value || {} + return String(row.space_code || '—') +}) + +/** 可移数量:可用 → 总数量 → 实物数 依次兜底 */ +const transferAvailableLabel = computed(() => { + const row = activeRow.value || {} + const qty = row.available_quantity ?? row.quantity ?? row.physical_quantity + return qty === null || qty === undefined || qty === '' ? '—' : String(qty) +}) + +/** 副标题:说明当前移库模式 */ +const transferSubtitle = computed(() => + transferMode.value === 'product' + ? '按原库位 + 商品合并移库,自动合并该库位下该商品的全部库存' + : '单条库存记录移库,数量不填则整条全量移库' +) + +/** 底部说明:模式差异与注意事项 */ +const transferTipText = computed(() => + transferMode.value === 'product' + ? '开启批次管理且存在多批次的商品不支持按商品移库;移库数量为必填项。' + : '目标库位支持库位编码或库位 ID;移库数量不填则按整条库存记录全量移库。' +) + +/** 目标库位名称:未输入 / 识别中 / 未找到 / 已识别 */ +const transferTargetSpaceLabel = computed(() => { + if (!String(targetSpace.value ?? '').trim()) return '—' + if (spaceName.value) return spaceName.value + return targetSpaceError.value ? '未找到库位' : '识别中…' +}) + +const transferTargetSpaceInvalid = computed( + () => !!targetSpaceError.value && !!String(targetSpace.value ?? '').trim() +) + +/** 页脚提示:随输入状态变化 */ +const transferHintText = computed(() => { + if (!String(targetSpace.value ?? '').trim()) return '请输入或扫码目标库位' + if (transferTargetSpaceInvalid.value) return '目标库位不存在,请重新输入' + if (transferMode.value === 'product' && !transferQty.value) return '按商品移库需填写移库数量' + return '提交前请确认目标库位与移库数量' +}) + function normalizeRow(r: any) { if (!r) return null const row = { ...r } @@ -689,6 +831,15 @@ const hasExpiryChange = computed( resolveExpiryFieldPayload(expiryForm.expiryDate, expiryRow.value?.expiry_date) !== undefined ) +/** 页脚提示:未改动 / 日期先后不合法 / 可提交 */ +const expiryHintText = computed(() => { + if (!hasExpiryChange.value) return '尚未修改日期,请至少调整一项' + const production = String(expiryForm.productionDate || '').trim() + const expiry = String(expiryForm.expiryDate || '').trim() + if (production && expiry && production > expiry) return '生产日期不能晚于到期日期' + return '提交后将更新该库存记录的日期' +}) + /** 行上的库存记录 ID(无则返回 null,用于判断该行是否可维护日期) */ function getRowStorageId(row: any): number | null { const id = Number(row?.storage_id) @@ -979,76 +1130,213 @@ watch(targetSpace, (val) => { display: inline-block; } - .transfer-hint { - margin: 0 0 12px; - font-size: 12px; - color: #909399; - line-height: 1.5; +} + +/* 日期维护弹窗:日期选择器与「清空」按钮的宽度约束 */ +.expiry-date-picker { + flex: 1; + min-width: 0; +} + +.expiry-clear-btn { + flex-shrink: 0; +} + +/* 移库弹窗:面板结构 / 尺寸对齐 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; } - .transfer-form { + &__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; + } + + &__form { display: flex; flex-direction: column; gap: 8px; } - .target-space-tip { - min-height: 22px; - font-size: 12px; - } - - .target-space-error { - color: #f56c6c; - } - - .expiry-context { - margin-bottom: 12px; - } - - .expiry-hint { - margin: 0 0 12px; - font-size: 12px; - color: #909399; - line-height: 1.5; - } - - .expiry-form { - .expiry-field { - display: flex; - align-items: center; - gap: 12px; - flex-wrap: wrap; - width: 100%; - } - - .expiry-date-picker { - flex: 1; - min-width: 0; - } - - .expiry-clear-btn { - flex-shrink: 0; - } - } - - .expiry-preview { + &__field { display: flex; - gap: 8px; - padding: 8px 10px; + align-items: center; + justify-content: space-between; + gap: 16px; + min-height: 40px; + padding: 8px 12px; + border: 1px solid #ebeef5; border-radius: 4px; - background: #f5f7fa; - font-size: 12px; - color: #606266; - line-height: 1.6; + background: #fafafa; - .expiry-preview-label { - flex-shrink: 0; + /* 输入行:不需要灰色容器,与上方静态信息行拉开层次 */ + &--input { + align-items: center; + min-height: 0; + padding: 4px 12px 0; + border: none; + border-radius: 0; + background: transparent; + + :deep(.el-input), + :deep(.el-input-number), + :deep(.el-date-editor) { + flex: 1; + min-width: 0; + } + } + + /* 纯展示行(如识别到的库位名称):无容器,紧贴输入框 */ + &--plain { + min-height: 0; + padding: 0 12px; + border: none; + border-radius: 0; + background: transparent; + } + } + + &__field-label { + font-size: 12px; + line-height: 20px; + color: #606266; + flex-shrink: 0; + white-space: nowrap; + } + + &__field-value { + font-size: 13px; + font-weight: 500; + color: #303133; + text-align: right; + word-break: break-all; + + &.is-danger { + color: #f56c6c; + } + + /* 只作参考的库内原值,弱化展示 */ + &.is-muted { + font-weight: 400; color: #909399; } + } - .expiry-preview-text { - word-break: break-all; + &__form-tip { + margin: 8px 0 12px; + padding: 8px 12px; + border-radius: 4px; + background: #f4f4f5; + font-size: 12px; + line-height: 18px; + color: #909399; + } + + &__foot { + display: flex; + align-items: center; + justify-content: flex-end; + gap: 12px; + padding: 12px 16px 16px; + flex-shrink: 0; + } + + &__hint { + margin-right: auto; + min-width: 0; + font-size: 12px; + color: #909399; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + } + + &__actions { + display: flex; + align-items: center; + gap: 8px; + + :deep(.el-button) { + margin-left: 0; + margin-right: 0; } } } + + diff --git a/src/views/storage/log/component/TransactionDetail.vue b/src/views/storage/log/component/TransactionDetail.vue index 341f23d7..c5118e9d 100644 --- a/src/views/storage/log/component/TransactionDetail.vue +++ b/src/views/storage/log/component/TransactionDetail.vue @@ -49,32 +49,43 @@ defineProps<{ diff --git a/src/views/storage/log/index.vue b/src/views/storage/log/index.vue index ee49e846..d92cd898 100644 --- a/src/views/storage/log/index.vue +++ b/src/views/storage/log/index.vue @@ -494,8 +494,8 @@ function handleExportAction(action: string) { + + diff --git a/src/views/storage/stockcheck/config/components/DetailPanel.vue b/src/views/storage/stockcheck/config/components/DetailPanel.vue index 84cc5589..3d2d927d 100644 --- a/src/views/storage/stockcheck/config/components/DetailPanel.vue +++ b/src/views/storage/stockcheck/config/components/DetailPanel.vue @@ -139,22 +139,22 @@ function resolveTagType(field: DetailFieldConfig, value: any): string { /* ut-status-text 系列状态文字颜色类定义在 order-sub.scss 里(scoped 样式需要本组件自行引入) */ @use "../../../../order/orderManagement/styles/order-sub.scss"; -/* 面板自带内边距 8px 0(左右由宿主 .detail-container 的 padding: 0 10px 提供), - 合计内容缩进 10px,对齐 express/waybill 的 DetailPanel / stock/external_stock「基本信息」 */ +/* 面板自带内边距(宿主 .detail-container 为 padding: 0 10px), + 与 order/waveOrder「波次明细」面板(WaveBatchDetailPanel)完全一致 */ .detail-panel { - flex: 1; - min-height: 0; height: 100%; - padding: 8px 0; + overflow-y: auto; + padding: 6px 10px 8px; box-sizing: border-box; - overflow: auto; } .empty-tip { - text-align: center; - font-size: 13px; + height: 100%; + display: flex; + align-items: center; + justify-content: center; color: #909399; - padding: 40px 0; + font-size: 13px; } .section { @@ -177,10 +177,15 @@ function resolveTagType(field: DetailFieldConfig, value: any): string { .detail-descriptions { :deep(.el-descriptions__label) { - width: 120px; + width: 110px; + min-width: 110px; background: #fafbfc; font-weight: 500; } + + :deep(.el-descriptions__content) { + word-break: break-word; + } } .order-list-pre { diff --git a/src/views/storage/stockcheck/index.vue b/src/views/storage/stockcheck/index.vue index 9503b68a..d0d687d5 100644 --- a/src/views/storage/stockcheck/index.vue +++ b/src/views/storage/stockcheck/index.vue @@ -147,15 +147,17 @@
- +
+ +
@@ -270,6 +272,66 @@ :meta="detailExportTaskProgress" :update-time="detailExportTaskProgress.updateTime" /> + + +
+
+
+

驳回盘点单

+

驳回后盘点单退回可重新编辑状态

+
+ +
+ +
+
+
+ 盘点单号 + {{ rejectRow?.check_no || '—' }} +
+
+ 驳回原因 + +
+
+

+ 驳回原因将写入盘点单备注;留空则保留原备注。 +

+
+ +
+ 提交前请确认盘点单状态 +
+ 取消 + + 确定驳回 + +
+
+
+
@@ -524,31 +586,46 @@ async function handleOperationAction(key: string, row: Record) { } } -/** 审核驳回:弹输入框收驳回原因(文档:reason 可选,缺省保留原备注) */ -async function handleAuditReject(row: Record) { +/** 审核驳回:面板弹窗收驳回原因(reason 可选,留空保留原备注) */ +const rejectDialogVisible = ref(false) +const rejectLoading = ref(false) +const rejectReason = ref('') +const rejectRow = ref | null>(null) + +function handleAuditReject(row: Record) { const id = Number(row?.id) - let reason = '' - try { - const res = await ElMessageBox.prompt( - '驳回原因将写入盘点单备注(可留空,留空则保留原备注)', - `驳回盘点单 ${row?.check_no ?? ''}`, - { - confirmButtonText: '确定驳回', - cancelButtonText: '取消', - inputType: 'textarea', - inputPlaceholder: '可留空', - type: 'warning', - buttonSize: 'small' - } - ) - reason = String(res.value ?? '').trim() - } catch { - return // 用户取消 + if (!Number.isFinite(id) || id <= 0) { + ElMessage.warning('缺少有效的盘点单ID') + return + } + rejectRow.value = row + rejectReason.value = '' + rejectDialogVisible.value = true +} + +/** 提交驳回:调用 stock.check.audit(action=reject) */ +async function submitAuditReject() { + const id = Number(rejectRow.value?.id) + if (!Number.isFinite(id) || id <= 0) { + ElMessage.warning('缺少有效的盘点单ID') + return + } + const reason = String(rejectReason.value ?? '').trim() + rejectLoading.value = true + try { + const res: any = await stockCheckAudit({ id, action: 'reject', ...(reason ? { reason } : {}) }) + if (!isCheckApiSuccess(res)) { + throw new Error(res?.message || '驳回失败') + } + ElMessage.success('已驳回') + rejectDialogVisible.value = false + await reloadAndResyncDetail() + } catch (e: any) { + console.error('[stockcheck] 驳回盘点单失败', e) + ElMessage.error(e?.message || '驳回失败') + } finally { + rejectLoading.value = false } - await runCheckAction( - () => stockCheckAudit({ id, action: 'reject', ...(reason ? { reason } : {}) }), - '已驳回' - ) } /** 统一执行状态类操作:校验结果 → 提示 → 刷新列表并同步详情 */ @@ -1030,10 +1107,21 @@ onMounted(() => { /* 布局样式对齐 order/orderManagement(order-sub.scss) */ @use "../../order/orderManagement/styles/order-sub.scss"; -/* 详情区外壳与 stock/external_stock 一致:不留上/下间距,左右 10px, - 由各详情面板自身 padding 控制上下留白 */ +/* 详情区外壳与 order/waveOrder「团购波次」一致:不留上/下间距(波次明细/盘点单信息面板 + 自带 padding: 6px 10px 8px),只留左右 10px,内容滚动交给详情面板 */ .order-sub-container .main-content .lower-level .detail-container { padding: 0 10px; + overflow: auto; +} + +.detail-page { + height: 100%; + overflow-x: hidden; + overflow-y: auto; +} + +.order-detail-wrapper { + height: 100%; } /* ================================================================ @@ -1111,4 +1199,175 @@ onMounted(() => { font-size: 13px; color: #909399; } + +/* ================================================================ + 8. 驳回盘点单面板(结构 / 尺寸对齐批量驳回收货单) + ================================================================ */ +.task-panel { + background: #fff; + color: #303133; + + &__head { + display: flex; + align-items: flex-start; + gap: 12px; + padding: 16px; + } + + &__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 { + padding: 12px 16px 0; + } + + &__form { + display: flex; + flex-direction: column; + gap: 8px; + } + + &__field { + display: flex; + align-items: center; + justify-content: space-between; + gap: 16px; + min-height: 40px; + padding: 8px 12px; + border: 1px solid #ebeef5; + border-radius: 4px; + background: #fafafa; + + /* 驳回原因输入行:不需要灰色容器,与上方静态信息行拉开层次 */ + &--input { + align-items: center; + min-height: 0; + padding: 4px 0 0 12px; + border: none; + border-radius: 0; + background: transparent; + + .el-input, + .el-textarea { + flex: 1; + min-width: 0; + } + } + + &--textarea { + align-items: flex-start; + + .task-panel__field-label { + padding-top: 7px; + } + } + } + + &__field-label { + font-size: 12px; + line-height: 20px; + color: #606266; + flex-shrink: 0; + white-space: nowrap; + } + + &__field-value { + font-size: 13px; + font-weight: 500; + color: #303133; + text-align: right; + word-break: break-all; + } + + &__form-tip { + margin: 8px 0 0; + padding: 8px 12px; + border-radius: 4px; + background: #f4f4f5; + font-size: 12px; + line-height: 18px; + color: #909399; + } + + &__foot { + display: flex; + align-items: center; + justify-content: space-between; + gap: 12px; + padding: 16px; + } + + &__hint { + font-size: 12px; + color: #909399; + } + + &__actions { + display: flex; + align-items: center; + gap: 8px; + + :deep(.el-button) { + margin-left: 0; + margin-right: 0; + } + } +} + + + diff --git a/src/views/storage/stockcheck/pages/CheckStockPickerDialog.vue b/src/views/storage/stockcheck/pages/CheckStockPickerDialog.vue index 8862b09b..00330cbd 100644 --- a/src/views/storage/stockcheck/pages/CheckStockPickerDialog.vue +++ b/src/views/storage/stockcheck/pages/CheckStockPickerDialog.vue @@ -19,149 +19,153 @@ @@ -753,34 +782,184 @@ watch( -.dialog-footer { - display: flex; - align-items: center; - justify-content: space-between; - gap: 12px; +