diff --git a/src/api/stock.check/stock.check.ts b/src/api/stock.check/stock.check.ts index 13b36036..1f12c9a4 100644 --- a/src/api/stock.check/stock.check.ts +++ b/src/api/stock.check/stock.check.ts @@ -27,14 +27,18 @@ export type StockCheckEnvelope = { /** * 库存盘点(module folder = stock.check)接口封装。 * - * 响应封装(2026-10-02 起全部接口统一,本模块现 24 个方法): + * 响应封装(2026-10-02 起全部接口统一,本模块现 26 个方法): * `{ flag, code, message, data, timestamp }` —— 业务数据**整体在 `data` 内**(见 StockCheckEnvelope)。 * 调用侧统一 `const data = res.data ?? res`;`code=1` 为成功(request.ts 已含在 SUCCESS_CODES 内)。 * + * 静态盘点锁定(2026-10-28 文档新增 staticLockList): + * is_static=1 的任务在 approved/checking 期间锁定其商品范围内的 stock_id, + * 完成/取消后解除 —— 库存操作(移库 / 分配储位等)前置判断可调 stockCheckStaticLockList。 + * * 作业数据(workData 家族,2026-10-07 文档更新): * · workData —— 三视图(location/goods/space),服务端分页,新增 keyword / only_abnormal 入参, * **不再返回 check**(任务信息请调 detail) - * · workDataDetail —— 单条明细的作业数据(单行对象,按 scope_type 分流) + * · workDataDetail —— 单条明细的作业数据(detail_id,或 id+stock_id 商品钻取) * · workDataSpaceDetails —— space 视图服务端分页版(可只取某个库位) * * 状态机(主表 status): @@ -386,10 +390,14 @@ export type StockCheckCreateParams = { /** * 是否静态盘点:0=关闭(缺省)/ 1=开启 * - * 仅商品盘点(type=store / goods)有效;库位盘点(type=location)不显示选项、不传。 + * 仅商品盘点(type=store / goods)有效;库位盘点(type=location)**恒为 0**,传入 1 也被忽略。 + * 兼容布尔 `true` 与 `isStatic` 驼峰写法,`'true'` / `'1'` 亦视为开启,其他值视为普通盘点; + * 静态盘点定式(patternCreate)创建的任务由**服务端自动置 1**。 * 开启后审核通过会锁定移库 / 分配储位操作(拣货不受影响),盘点完成后自动解锁。 */ - isStatic?: 0 | 1 + is_static?: 0 | 1 | boolean + /** 同 `is_static`(驼峰别名,兼容写法;前端当前使用本字段) */ + isStatic?: 0 | 1 | boolean remark?: string } @@ -1233,27 +1241,153 @@ export function stockCheckWorkData< // ============ stock.check.workDataDetail ============ /** - * workDataDetail 返回的单行作业数据(**按明细范围类型分流**): - * - `scope_type=location`(库位明细) → `StockCheckWorkLocationRow` - * - `scope_type=goods`(商品明细) → `StockCheckWorkGoodsRow` + * workDataDetail 商品钻取的**库位分行**(data.rows 元素,一行一个库位) + * + * ⚠️ 数量字段仅**明盘**返回;盲盘(mode=blind)不含任何数量字段。 */ -export type StockCheckWorkDataDetailRow = StockCheckWorkLocationRow | StockCheckWorkGoodsRow - -/** stock.check.workDataDetail 请求参数(2026-10-07 新增) */ -export type StockCheckWorkDataDetailParams = { - /** 盘点明细ID(wms_stock_check_detail.id) */ - detail_id: number - /** 盘点明细ID(驼峰别名,兼容写法;detail_id 优先) */ - detailId?: number +export type StockCheckWorkDetailGoodsRow = { + /** 该库位盘点明细ID(无明细快照的库位为 null) */ + detail_id: number | null + /** 库位ID(wms_location_space.id) */ + location_id?: number | null + /** `location_id` 同义字段(可直接回传 `stock.check.report` 的 space_id) */ + space_id?: number | null + /** 库位编码 */ + location_code?: string | null + /** 该库位最近上报时间(无记录为 null) */ + checked_at?: string | null + /** 盘点人 */ + checker_name?: string | null + /** 该库位作业记录ID(按记录 id 升序) */ + record_ids?: number[] + /** 作业记录照片 */ + images?: StockCheckWorkImage[] + /** + * 该库位**当前**账面(wms_storage 可用+锁定;仅明盘) + * + * ⚠️ 静态盘点(is_static=1)时**不参与差异计算**,参与计算的是 `snapshot_quantity`。 + */ + system_quantity?: number | null + /** 该库位当前 storage 账面(与静态/普通口径无关,恒为当前库存;仅明盘) */ + storage_quantity?: number | null + /** 该库位锁定数量(仅明盘) */ + locked_quantity?: number | null + /** 该库位账面**快照**(盘点开始时的账面;仅明盘) */ + snapshot_quantity?: number | null + /** 该库位实盘合计(仅明盘) */ + checked_quantity?: number | null + /** 该库位差异 = 实盘 - 参与计算的账面(仅明盘) */ + diff_quantity?: number | null + [key: string]: unknown } +/** workDataDetail 商品钻取的商品级汇总(仅明盘返回) */ +export type StockCheckWorkDetailGoodsSummary = { + /** 参与差异计算的账面(is_static=1 取快照、=0 取当前 storage 合计) */ + system_quantity?: number | null + /** 当前 storage 账面合计(供对照) */ + storage_quantity?: number | null + /** 明细账面快照合计(供对照) */ + snapshot_quantity?: number | null + /** 实盘合计 */ + checked_quantity?: number | null + /** 差异 = 实盘 - 参与计算的账面 */ + diff_quantity?: number | null + /** 是否差异:0|1 */ + is_diff?: boolean | number | null + [key: string]: unknown +} + +/** + * workDataDetail 商品钻取结构(入参 ② `id + stock_id`,或 `detail_id` 指向商品范围行) + * + * 账面口径随任务静态标记(is_static)变化: + * · is_static=1(静态盘点)→ `system_quantity` 取**明细账面快照**(盘点基准冻结,不受盘点期间出入库影响) + * · is_static=0(普通盘点)→ `system_quantity` 取**当前** wms_storage 账面 SUM(available_quantity+locked_quantity) + * 两种口径都会额外输出 `storage_quantity`(当前 storage 账面)与 `snapshot_quantity`(明细快照)供对照, + * `system_quantity` 始终是参与差异计算的那个账面;`book_source` 标识来源(snapshot|storage)。 + */ +export type StockCheckWorkDetailGoods = { + /** 盘点任务ID */ + check_id: number + /** 商品库存ID(wms_stock_warehouse.id) */ + stock_id: number + item_code?: string | null + item_name?: string | null + spec?: string | null + store_id?: number | null + store_name?: string | null + barcode?: string | null + /** 商品图片(URL 数组) */ + images?: string[] + /** 任务是否静态盘点(0/1 或布尔) */ + is_static?: boolean | number | null + /** 账面来源:snapshot=取明细快照 / storage=取当前 storage 账面 */ + book_source?: 'snapshot' | 'storage' | string + /** 商品级汇总(**仅明盘**;盲盘不返回 summary 与任何数量字段) */ + summary?: StockCheckWorkDetailGoodsSummary + /** 按库位分行(顺序与 workData goods 视图 locations 一致) */ + rows: StockCheckWorkDetailGoodsRow[] + [key: string]: unknown +} + +/** + * workDataDetail 返回的作业数据(**按入参分流**): + * - `detail_id` 指向 `scope_type=location`(库位明细) → `StockCheckWorkLocationRow` + * - `detail_id` 指向 `scope_type=goods`(商品明细)或商品钻取 → 商品钻取结构 `StockCheckWorkDetailGoods` + * - 兼容旧描述:`scope_type=goods` 单行结构 `StockCheckWorkGoodsRow` + */ +export type StockCheckWorkDataDetailRow = + | StockCheckWorkLocationRow + | StockCheckWorkGoodsRow + | StockCheckWorkDetailGoods + +/** + * stock.check.workDataDetail 请求参数(2026-10-07 新增;2026-10-28 文档放开商品钻取) + * + * **入参二选一**: + * ① `detail_id`(盘点明细ID,兼容 `detailId`):库位明细**必传**; + * 商品范围明细也可只传本参数(服务端按该明细的商品走商品钻取) + * ② `id`(盘点任务ID)+ `stock_id`(商品库存ID,兼容 `stockId`):商品钻取用, + * goods 汇总视图行(stock.check.workData)不返回明细ID 时按此获取明细 + * + * warehouse_id 由服务端注入,前端不传。 + */ +export type StockCheckWorkDataDetailParams = + | { + /** ① 盘点明细ID(wms_stock_check_detail.id) */ + detail_id: number + /** 盘点明细ID(驼峰别名,兼容写法;detail_id 优先) */ + detailId?: number + /** 盘点任务ID(商品钻取的搭配参数,可省略) */ + id?: number + /** 商品库存ID(商品钻取的搭配参数,可省略) */ + stock_id?: number + /** 商品库存ID(驼峰别名) */ + stockId?: number + } + | { + /** ② 商品钻取:盘点任务ID */ + id: number + /** ② 商品钻取:商品库存ID(wms_stock_warehouse.id) */ + stock_id: number + /** 盘点明细ID(可选;同时传时以服务端明细为准) */ + detail_id?: number + /** 盘点明细ID(驼峰别名) */ + detailId?: number + /** 商品库存ID(驼峰别名) */ + stockId?: number + } + /** * stock.check.workDataDetail:拉取**单条盘点明细**的作业数据(workData 单行版,2026-10-07 新增) * - * - 入参只有 `detail_id`(盘点明细ID),warehouse_id 由服务端注入(前端不传) - * - 统一 success 包装,`data` 为**单行作业数据**(不是数组),行结构按明细范围类型分流: + * - 入参二选一(2026-10-28 文档):`detail_id`(库位明细必传)/ `id + stock_id`(商品钻取), + * warehouse_id 由服务端注入(前端不传) + * - 统一 success 包装,`data` 为**单行对象**(不是数组),结构按入参分流: * · 库位明细(scope_type=location)→ 结构同 workData 的 location 视图单行 - * · 商品明细(scope_type=goods) → 结构同 workData 的 goods 视图行 + * · 商品钻取(id + stock_id,或 detail_id 指向商品范围行)→ `StockCheckWorkDetailGoods` + * (商品级汇总 summary + 按库位分行 rows;账面口径随任务 is_static 区分,见该类型注释) * - 仅任务 `approved`(待盘点)/ `checking`(盘点中)可拉取(与 workData 同口径) */ export function stockCheckWorkDataDetail( @@ -1341,8 +1475,16 @@ export function stockCheckWorkDataSpaceDetails( export type StockCheckReportParams = { /** 盘点任务ID */ id: number - /** 盘点明细ID */ - detail_id: number + /** + * 盘点明细ID(**2026-10-28 文档改为可选**) + * + * - 库位明细行(scope_type=location):**必传** + * - 商品行:可选 —— 不传时服务端按 `id + stock_id + space_id` 反查该商品的库位明细 + * (先按 location_id=space_id 命中,未命中取该商品任一明细); + * 反查不到报 400「盘点明细不存在(该商品不在本任务盘点范围内,或库位盘点任务需传 detail_id)」 + * (goods 汇总视图行不再返回明细ID,此时只能走反查) + */ + detail_id?: number /** * **库位ID(wms_location_space.id)—— 必传**(2026-10-26 文档) * @@ -1695,6 +1837,13 @@ export type StockCheckFinishResponse = { profit_total: number /** 盘亏合计(商品行:实盘小于账面快照的差异绝对值,含未盘明细的账面快照数;库位行:按商品实盘小于 wms_storage 账面的差异绝对值) */ loss_total: number + /** + * 本次完成**释放的静态锁定商品ID数组**(2026-10-28 文档新增) + * + * 静态盘点(is_static=1)任务完成后解除锁定,返回被释放的 stock_id 列表; + * 非静态任务 / 无锁定商品时为空数组。 + */ + released_stock_ids?: number[] } /** @@ -1999,3 +2148,64 @@ export function stockCheckBatchDelete( isSystemApi: true } as any) } + +// ============ stock.check.staticLockList ============ + +/** staticLockList 的锁定商品行(每个 stock_id 一条) */ +export type StockCheckStaticLockRow = { + /** 商品库存ID(wms_stock_warehouse.id) */ + stock_id: number + item_code?: string | null + item_name?: string | null + /** 来源盘点任务ID数组 */ + check_ids?: number[] + /** 来源盘点单号数组 */ + check_nos?: string[] + /** 该商品在盘子任务中的库位编码数组 */ + location_codes?: string[] + [key: string]: unknown +} + +/** stock.check.staticLockList 响应(无入参,warehouse_id 服务端注入) */ +export type StockCheckStaticLockListResponse = { + warehouse_id: number + /** 锁定商品ID数组(**升序**) */ + stock_ids: number[] + /** 每个 stock_id 一条明细(来源盘点任务 / 单号 / 库位) */ + rows: StockCheckStaticLockRow[] + /** = rows.length */ + total: number + /** true = 本次命中服务端缓存(`stock_check:static_lock:{warehouseId}`,TTL 300 秒) */ + cached: boolean + /** 缓存生成时间(ISO 8601;命中缓存时为上次回源时间) */ + updated_at: string +} + +/** + * stock.check.staticLockList:拉取「静态盘点锁定中」的库存商品列表(2026-10-28 文档新增) + * + * 公共查询,供**出入库 / 移库等库存操作前置判断**该商品当前是否可动: + * - 口径:`is_static=1` 且状态为 `approved`(审核完成)/ `checking`(盘点作业中)的盘点任务, + * 取其商品范围明细(scope_type=goods)的 stock_id 去重集合 —— **审核完成即开始锁定**, + * 任务完成 / 取消后解除;提交审核前(created/submitted/rejected)与已完成/已取消均不锁定; + * 库位盘点任务 `is_static` 恒为 0,天然不参与。 + * - **前端无需传参**:warehouse_id 由服务端从当前上下文注入。 + * - 服务端按仓库缓存(默认 TTL 300 秒,Redis 优先、不可用时降级进程内缓存), + * 审核 / 完成 / 取消 / 批量删除等状态流转时主动失效;`cached` 标识本次是否命中缓存。 + * + * ⚠️ 本仓库(web 后台)目前**尚无调用方**:接入侧需自行决定命中锁定时的拦截文案与是否强制阻断。 + */ +export function stockCheckStaticLockList(): Promise< + StockCheckEnvelope +> { + return request({ + url: '/system', + method: 'post', + params: { + method: 'stock.check.staticLockList', + v, + timestamp: new Date().getTime() + }, + isSystemApi: true + } as any) +} diff --git a/src/components/AsyncExportProgressDialog.vue b/src/components/AsyncExportProgressDialog.vue index f6462869..54e1e892 100644 --- a/src/components/AsyncExportProgressDialog.vue +++ b/src/components/AsyncExportProgressDialog.vue @@ -88,16 +88,20 @@ const summaryItems = computed(() => { }) const tipText = computed(() => { - if (progressState.value === 'success') return props.message || '导出完成,可关闭窗口' + if (progressState.value === 'success') { + return `${props.message || '导出完成'},窗口将在 1.5 秒后自动关闭` + } if (progressState.value === 'running') { return '导出任务在后台执行中,关闭本窗口可停止自动刷新;重新进入本页面或再次点击导出可恢复查看结果。' } return '' }) -const footerHint = computed(() => - progressState.value === 'running' ? '导出任务在后台执行' : '任务已结束,可关闭窗口' -) +const footerHint = computed(() => { + if (progressState.value === 'running') return '导出任务在后台执行' + if (progressState.value === 'success') return '任务已完成,窗口将自动关闭' + return '任务已结束,可关闭窗口' +}) function formatDateTime(value: string | number | null | undefined) { if (!value) return '—' diff --git a/src/composables/useAsyncExportTask.ts b/src/composables/useAsyncExportTask.ts index 277f153d..d763ad8d 100644 --- a/src/composables/useAsyncExportTask.ts +++ b/src/composables/useAsyncExportTask.ts @@ -39,6 +39,8 @@ export function useAsyncExportTask(options: { }) let exportPollingTimer: number | null = null + /** 导出完成后自动关闭进度弹窗的定时器 */ + let autoCloseTimer: number | null = null /** 连续轮询失败次数(网络异常/接口非成功),达到上限后放弃,避免无限请求 */ let pollFailCount = 0 @@ -57,6 +59,24 @@ export function useAsyncExportTask(options: { const MAX_TOTAL_POLLS = 600 /** 失败重试间隔 */ const FAILURE_RETRY_DELAY = 2000 + /** 导出完成后自动关闭进度弹窗的延迟(毫秒) */ + const AUTO_CLOSE_DELAY = 1500 + + function clearAutoCloseTimer() { + if (autoCloseTimer) { + window.clearTimeout(autoCloseTimer) + autoCloseTimer = null + } + } + + /** 导出完成后延迟关闭进度弹窗(留出时间让用户看到「已完成」状态) */ + function scheduleAutoClose() { + clearAutoCloseTimer() + autoCloseTimer = window.setTimeout(() => { + autoCloseTimer = null + exportDialogVisible.value = false + }, AUTO_CLOSE_DELAY) + } function resetPollGuards() { pollFailCount = 0 @@ -66,6 +86,7 @@ export function useAsyncExportTask(options: { } function resetExportProgress() { + clearAutoCloseTimer() resetPollGuards() exportTaskProgress.taskId = '' exportTaskProgress.status = 'submitted' @@ -160,7 +181,8 @@ export function useAsyncExportTask(options: { } else { ElMessage.warning(exportTaskProgress.message || '导出完成,但未返回下载地址') } - // 完成后保留弹窗,展示完成状态,由用户手动关闭 + // 完成后先展示「已完成」状态,1.5 秒后自动关闭进度弹窗 + scheduleAutoClose() return } @@ -293,6 +315,7 @@ export function useAsyncExportTask(options: { function resumeExportTaskFromStorage() { const savedTaskId = getSavedExportTaskId() if (!savedTaskId || exportLoading.value) return + clearAutoCloseTimer() resetPollGuards() exportTaskProgress.taskId = savedTaskId exportTaskProgress.status = 'submitted' @@ -317,6 +340,9 @@ export function useAsyncExportTask(options: { // 用户在等待轮询期间主动关闭进度框:停止轮询并解除 loading, // 保留已保存的 taskId,便于之后再次进入页面时恢复查询/下载 watch(exportDialogVisible, (visible) => { + if (!visible) { + clearAutoCloseTimer() + } if (!visible && exportLoading.value && exportTaskProgress.taskId) { stopExportPolling() exportLoading.value = false @@ -326,6 +352,7 @@ export function useAsyncExportTask(options: { onBeforeUnmount(() => { stopExportPolling() + clearAutoCloseTimer() }) return { diff --git a/src/composables/useOrderAsyncExport.ts b/src/composables/useOrderAsyncExport.ts index 6cd40d4f..b650c3c6 100644 --- a/src/composables/useOrderAsyncExport.ts +++ b/src/composables/useOrderAsyncExport.ts @@ -49,8 +49,30 @@ export function useOrderAsyncExport(storageKey?: string) { }) let exportPollingTimer: number | null = null + /** 导出完成后自动关闭进度弹窗的定时器 */ + let autoCloseTimer: number | null = null + + /** 导出完成后自动关闭进度弹窗的延迟(毫秒) */ + const AUTO_CLOSE_DELAY = 1500 + + function clearAutoCloseTimer() { + if (autoCloseTimer) { + window.clearTimeout(autoCloseTimer) + autoCloseTimer = null + } + } + + /** 导出完成后延迟关闭进度弹窗(留出时间让用户看到「已完成」状态) */ + function scheduleAutoClose() { + clearAutoCloseTimer() + autoCloseTimer = window.setTimeout(() => { + autoCloseTimer = null + exportDialogVisible.value = false + }, AUTO_CLOSE_DELAY) + } function resetExportProgress() { + clearAutoCloseTimer() exportTaskProgress.taskId = '' exportTaskProgress.status = 'submitted' exportTaskProgress.progress = 0 @@ -147,7 +169,8 @@ export function useOrderAsyncExport(storageKey?: string) { } else { ElMessage.warning(exportTaskProgress.message || '导出完成,但未返回下载地址') } - // 完成后保留弹窗,展示完成状态,由用户手动关闭 + // 完成后先展示「已完成」状态,1.5 秒后自动关闭进度弹窗 + scheduleAutoClose() return } @@ -233,6 +256,7 @@ export function useOrderAsyncExport(storageKey?: string) { onBeforeUnmount(() => { stopExportPolling() + clearAutoCloseTimer() }) return { diff --git a/src/views/data/packingflow/index.vue b/src/views/data/packingflow/index.vue index ed103785..251821cd 100644 --- a/src/views/data/packingflow/index.vue +++ b/src/views/data/packingflow/index.vue @@ -285,7 +285,7 @@ :video="playingVideo" /> - + 当前状态 - + {{ statusLabel(operatingRow?.status) }} - +
@@ -1017,7 +1017,7 @@ onMounted(() => { color: #f56c6c; } -/* 设置结束时间:面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm) */ +/* 设置结束时间:面板结构 / 尺寸对齐「手工录入运单号」(TaskProgressPanel) */ .task-panel { background: #fff; color: #303133; @@ -1105,20 +1105,34 @@ onMounted(() => { .task-panel__field-label { padding-top: 7px; + + &.is-required::before { + top: 7px; + } } } } + /* 标签列固定宽度(含必填星号占位):保证各输入框左边缘对齐、长度一致 */ &__field-label { + position: relative; + flex: none; + width: 88px; + padding-left: 10px; + box-sizing: border-box; font-size: 12px; line-height: 20px; color: #606266; - flex-shrink: 0; + text-align: left; + white-space: nowrap; &.is-required::before { content: '*'; + position: absolute; + left: 0; + top: 0; + line-height: 20px; color: #f56c6c; - margin-right: 4px; } } @@ -1158,7 +1172,8 @@ onMounted(() => { &__actions { display: flex; align-items: center; - gap: 8px; + /* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */ + gap: 6px; :deep(.el-button) { margin-left: 0; diff --git a/src/views/data/returnrecord/components/ReceiveRegisterPanel.vue b/src/views/data/returnrecord/components/ReceiveRegisterPanel.vue index 8a0668f2..7c8fd3df 100644 --- a/src/views/data/returnrecord/components/ReceiveRegisterPanel.vue +++ b/src/views/data/returnrecord/components/ReceiveRegisterPanel.vue @@ -1,106 +1,109 @@ @@ -495,4 +557,200 @@ onMounted(() => { color: #909399; padding: 16px; } + +/* ================================================================ + 包装供应商弹窗面板(结构 / 尺寸对齐「手工录入运单号」) + ================================================================ */ +.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: flex-start; + min-height: 0; + padding: 4px 0 0 12px; + border: none; + border-radius: 0; + background: transparent; + + .task-panel__field-label { + padding-top: 7px; + + &.is-required::before { + top: 7px; + } + } + } + } + + /* 标签列固定宽度(含必填星号占位):保证各输入框左边缘对齐、长度一致 */ + &__field-label { + position: relative; + flex: none; + width: 88px; + padding-left: 10px; + box-sizing: border-box; + font-size: 12px; + line-height: 20px; + color: #606266; + text-align: left; + white-space: nowrap; + + &.is-required::before { + content: '*'; + position: absolute; + left: 0; + top: 0; + line-height: 20px; + color: #f56c6c; + } + } + + &__field-control { + flex: 1; + min-width: 0; + } + + &__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; + /* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */ + gap: 6px; + + :deep(.el-button) { + margin-left: 0; + margin-right: 0; + } + } +} + +/* 面板内嵌 el-form-item:去掉默认间距,错误提示改回文档流内展示 */ +.task-panel__form { + :deep(.el-form-item) { + margin-bottom: 0; + } + + :deep(.el-form-item__content) { + margin-left: 0; + line-height: 1.4; + } + + :deep(.el-form-item__error) { + position: static; + padding-top: 4px; + } +} + + + diff --git a/src/views/order/orderManagement/component/OrderExportProgressDialog.vue b/src/views/order/orderManagement/component/OrderExportProgressDialog.vue index 656dd854..ac883f7c 100644 --- a/src/views/order/orderManagement/component/OrderExportProgressDialog.vue +++ b/src/views/order/orderManagement/component/OrderExportProgressDialog.vue @@ -110,12 +110,16 @@ const metricItems = computed(() => { }) const tipText = computed(() => { - if (progressState.value === 'success') return props.message || '导出完成,可关闭窗口' + if (progressState.value === 'success') { + return `${props.message || '导出完成'},窗口将在 1.5 秒后自动关闭` + } if (progressState.value === 'running') return '导出任务在后台执行中,关闭窗口不会中断。' return '' }) -const footerHint = computed(() => - progressState.value === 'running' ? '导出任务在后台执行' : '任务已结束,可关闭窗口' -) +const footerHint = computed(() => { + if (progressState.value === 'running') return '导出任务在后台执行' + if (progressState.value === 'success') return '任务已完成,窗口将自动关闭' + return '任务已结束,可关闭窗口' +}) diff --git a/src/views/storage/entry/component/DirectInboundImportDialog.vue b/src/views/storage/entry/component/DirectInboundImportDialog.vue index ed6767dd..14a85d10 100644 --- a/src/views/storage/entry/component/DirectInboundImportDialog.vue +++ b/src/views/storage/entry/component/DirectInboundImportDialog.vue @@ -1,96 +1,160 @@ - + -
-
- - {{ reviewTargetRow.entry_order_code || '--' }} - {{ reviewTargetRow.store_name || '--' }} - - - {{ formatEntryOrderStatus(reviewTargetRow.order_status) }} - - - {{ translateEntryField('order_type', reviewTargetRow.order_type) }} - -
- -
-
收货对照预览
- +
+
+

开始入库确认

+

确认后入库单进入待入库状态,可按收货对照导入入库

+
+
-
+ + + + + - +
+
+
+ 入库单号 + {{ reviewTargetRow.entry_order_code || '--' }} +
+
+ 货主 + {{ reviewTargetRow.store_name || '--' }} +
+
+ 订单状态 + + + {{ formatEntryOrderStatus(reviewTargetRow.order_status) }} + + +
+
+ 入库类型 + {{ translateEntryField('order_type', reviewTargetRow.order_type) }} +
+ +
+ 收货对照预览 +
+ + + + + + + + + + + + + + + + + +
+
+
+ +

+ 开始入库后不可再修改入库明细;请先确认收货单已绑定且收货对照无异常。 +

+
+ +
+ 提交前请确认收货对照 +
+ 取消 + + 确定开始入库 + +
+
+
@@ -1332,4 +1374,186 @@ function handleImport() { text-decoration: underline; color: var(--el-color-primary-light-3); } + +/* ================================================================ + 开始入库确认面板(结构 / 尺寸参考「批量发货」) + ================================================================ */ +.task-panel { + background: #fff; + color: #303133; + display: flex; + flex-direction: column; + max-height: 82vh; + + &__head { + display: flex; + align-items: flex-start; + gap: 12px; + padding: 16px; + flex-shrink: 0; + } + + &__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; + } + + &:not(:disabled):hover { + color: #409eff; + } + + &:disabled { + cursor: not-allowed; + opacity: 0.5; + } + } + + &__body { + padding: 12px 16px 0; + min-height: 0; + overflow-y: auto; + } + + &__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; + } + + &__field-label { + flex: none; + width: 88px; + padding-left: 10px; + box-sizing: border-box; + font-size: 12px; + line-height: 20px; + color: #606266; + text-align: left; + white-space: nowrap; + } + + &__field-value { + font-size: 13px; + font-weight: 500; + color: #303133; + text-align: right; + } + + &__section { + display: flex; + flex-direction: column; + gap: 6px; + } + + &__section-title { + font-size: 12px; + line-height: 20px; + color: #606266; + padding-left: 2px; + } + + &__table-wrap { + border-radius: 4px; + overflow: hidden; + } + + &__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: 12px 16px 16px; + flex-shrink: 0; + } + + &__hint { + font-size: 12px; + color: #909399; + } + + &__actions { + display: flex; + align-items: center; + /* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */ + gap: 6px; + + :deep(.el-button) { + margin-left: 0; + margin-right: 0; + } + } +} + + + diff --git a/src/views/storage/inventory/component/panelstockdetail.vue b/src/views/storage/inventory/component/panelstockdetail.vue index 1ffbdc85..2bc29596 100644 --- a/src/views/storage/inventory/component/panelstockdetail.vue +++ b/src/views/storage/inventory/component/panelstockdetail.vue @@ -48,7 +48,7 @@ @@ -57,7 +57,7 @@ type="primary" plain :disabled="!canEditExpiry" - @click="openExpiryDialog" + @click="openExpiryDialog()" > 维护生产/到期日期 @@ -97,7 +97,7 @@ :close-on-click-modal="false" @closed="resetTransferDialog" > - +
@@ -177,7 +177,7 @@ @opened="handleExpiryDialogOpened" @closed="resetExpiryForm" > - +
@@ -587,6 +587,15 @@ function normalizeRow(r: any) { row.stock.is_batch_mgmt_enabled = false } row.batch_count = Number(row.batch_count || 0) + // 兜底:部分接口行只返回 wms_storage 主键 id(listByStockId 明细行为 id); + // 批次模式主列表的 id 是 'batch-' 字符串,不会被误取 + const storageId = Number(row.storage_id) + if (!Number.isFinite(storageId) || storageId <= 0) { + const rawId = Number(r.id) + if (Number.isInteger(rawId) && rawId > 0 && String(r.id).trim() === String(rawId)) { + row.storage_id = rawId + } + } return row } @@ -849,6 +858,14 @@ function getRowStorageId(row: any): number | null { /** 是否可维护日期:需要有一条含库存记录 ID 的库存明细行 */ const canEditExpiry = computed(() => getRowStorageId(activeRow.value) !== null) +/** 维护日期入口提示:按库位汇总是聚合行,天然没有库存记录 ID(接口不支持按汇总行维护) */ +const expiryTooltipText = computed(() => { + if (isSpaceView.value) { + return '「按库位汇总」为聚合行,不含库存记录 ID;请切换到「按明细」或开启批次模式后再维护日期' + } + return '请先在下方明细列表勾选一条库存记录(含库存记录 ID)' +}) + const expiryItemLabel = computed(() => { const row = expiryRow.value || {} const code = String(row.item_code || '').trim() @@ -900,16 +917,27 @@ function buildExpiryChangeText(data: any): string { .join(';') } +/** + * 判断传入的是否为库存行对象: + * `@click` 直接绑定函数时会把 MouseEvent 当第一个参数传入,用行字段探测排除掉 + */ +function isStockRowLike(value: unknown): value is Record { + if (!value || typeof value !== 'object' || Array.isArray(value)) return false + const probeKeys = ['storage_id', 'stock_id', 'production_date', 'expiry_date', 'batch_no', 'space_code'] + return probeKeys.some((key) => key in (value as Record)) +} + /** * 打开日期维护弹窗(两个入口共用): * 1. 工具栏「维护生产/到期日期」按钮:不传参,取当前勾选行; * 2. 明细表「生产日期 / 到期日期」单元格:传入该行与目标字段,弹窗打开后自动展开对应日历 */ function openExpiryDialog(row?: any, target?: 'production' | 'expiry') { - const targetRow = normalizeRow(row) || normalizeRow(activeRow.value) || {} + const passedRow = isStockRowLike(row) ? row : null + const targetRow = normalizeRow(passedRow) || normalizeRow(activeRow.value) || {} if (!getRowStorageId(targetRow)) { ElMessage.warning( - row ? '该行缺少库存记录 ID,无法维护日期' : '请先在下方明细列表勾选一条库存记录' + passedRow ? '该行缺少库存记录 ID,无法维护日期' : '请先在下方明细列表勾选一条库存记录' ) return } @@ -1140,9 +1168,11 @@ watch(targetSpace, (val) => { .expiry-clear-btn { flex-shrink: 0; + /* 输入行改为 align-items: flex-start 后,按钮需自行与日期选择器垂直居中 */ + align-self: center; } -/* 移库弹窗:面板结构 / 尺寸对齐 storage/receiving「批量驳回收货单」 */ +/* 移库弹窗:面板结构 / 尺寸对齐「手工录入运单号」(TaskProgressPanel) */ .task-panel { display: flex; flex-direction: column; @@ -1154,7 +1184,7 @@ watch(targetSpace, (val) => { display: flex; align-items: flex-start; gap: 12px; - padding: 16px 16px 8px; + padding: 16px; flex-shrink: 0; } @@ -1205,7 +1235,7 @@ watch(targetSpace, (val) => { &__body { flex: 1; min-height: 0; - padding: 6px 16px 0; + padding: 12px 16px 0; display: flex; flex-direction: column; overflow-y: auto; @@ -1230,13 +1260,17 @@ watch(targetSpace, (val) => { /* 输入行:不需要灰色容器,与上方静态信息行拉开层次 */ &--input { - align-items: center; + align-items: flex-start; min-height: 0; - padding: 4px 12px 0; + padding: 4px 0 0 12px; border: none; border-radius: 0; background: transparent; + .task-panel__field-label { + padding-top: 7px; + } + :deep(.el-input), :deep(.el-input-number), :deep(.el-date-editor) { @@ -1248,18 +1282,24 @@ watch(targetSpace, (val) => { /* 纯展示行(如识别到的库位名称):无容器,紧贴输入框 */ &--plain { min-height: 0; - padding: 0 12px; + padding: 0 0 0 12px; border: none; border-radius: 0; background: transparent; } } + /* 标签列固定宽度(含必填星号占位):保证各输入框左边缘对齐、长度一致 */ &__field-label { + position: relative; + flex: none; + width: 88px; + padding-left: 10px; + box-sizing: border-box; font-size: 12px; line-height: 20px; color: #606266; - flex-shrink: 0; + text-align: left; white-space: nowrap; } @@ -1282,7 +1322,7 @@ watch(targetSpace, (val) => { } &__form-tip { - margin: 8px 0 12px; + margin: 8px 0 0; padding: 8px 12px; border-radius: 4px; background: #f4f4f5; @@ -1294,9 +1334,9 @@ watch(targetSpace, (val) => { &__foot { display: flex; align-items: center; - justify-content: flex-end; + justify-content: space-between; gap: 12px; - padding: 12px 16px 16px; + padding: 16px; flex-shrink: 0; } @@ -1313,7 +1353,8 @@ watch(targetSpace, (val) => { &__actions { display: flex; align-items: center; - gap: 8px; + /* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */ + gap: 6px; :deep(.el-button) { margin-left: 0; diff --git a/src/views/storage/receiving/component/Product.vue b/src/views/storage/receiving/component/Product.vue index 8e5b4b0a..6ac4fa6d 100644 --- a/src/views/storage/receiving/component/Product.vue +++ b/src/views/storage/receiving/component/Product.vue @@ -284,8 +284,8 @@ :close-on-click-modal="false" @closed="resetBindForm" > - -
+ +

明细绑定

@@ -304,7 +304,6 @@
{{ field.label }}
@@ -330,8 +329,8 @@ {{ formatBindDisplayValue(field.prop) }}
- - {{ field.label }}* + + {{ field.label }} @@ -362,6 +430,7 @@ import { isCheckApiSuccess, isLocationScopeType, isStaticCheckRow, + translate, loadStoreOptions, storeOptions, buildWhereConditions, @@ -568,20 +637,18 @@ async function handleOperationAction(key: string, row: Record) { await runCheckAction(() => stockCheckSubmit({ id }), '已提交审核') break case 'auditPass': { - const staticTip = isStaticCheckRow(row) - ? ',已锁定移库/分配储位,盘点完成后自动解锁' - : '' - await runCheckAction( - () => stockCheckAudit({ id, action: 'approve' }), - `审核已通过${staticTip}` - ) + handleAuditPass(row) break } case 'auditReject': await handleAuditReject(row) break case 'finishCheck': - await runCheckAction(() => stockCheckFinish({ id }), '盘点已完成') + // 静态盘点(is_static=1)完成后后端会释放静态锁定,响应带 released_stock_ids + await runCheckAction(() => stockCheckFinish({ id }), '盘点已完成', (res) => { + const released = Number((res?.data ?? res)?.released_stock_ids?.length ?? 0) + return released > 0 ? `,已释放 ${released} 个静态锁定商品` : '' + }) break case 'cancelCheck': await runCheckAction(() => stockCheckCancel({ id }), '盘点单已取消') @@ -600,6 +667,52 @@ const rejectLoading = ref(false) const rejectReason = ref('') const rejectRow = ref | null>(null) +/** 审核通过:面板弹窗二次确认(对齐「手工录入运单号」新表单设计) */ +const auditDialogVisible = ref(false) +const auditLoading = ref(false) +const auditRow = ref | null>(null) +const auditStatic = computed(() => isStaticCheckRow(auditRow.value)) + +function handleAuditPass(row: Record) { + const id = Number(row?.id) + if (!Number.isFinite(id) || id <= 0) { + ElMessage.warning('缺少有效的盘点单ID') + return + } + auditRow.value = row + auditDialogVisible.value = true +} + +function resetAuditDialog() { + auditRow.value = null + auditLoading.value = false +} + +/** 提交审核通过:调用 stock.check.audit(action=approve) */ +async function submitAuditPass() { + const id = Number(auditRow.value?.id) + if (!Number.isFinite(id) || id <= 0) { + ElMessage.warning('缺少有效的盘点单ID') + return + } + const wasStatic = auditStatic.value + auditLoading.value = true + try { + const res: any = await stockCheckAudit({ id, action: 'approve' }) + if (!isCheckApiSuccess(res)) { + throw new Error(res?.message || '审核通过失败') + } + ElMessage.success(wasStatic ? '审核已通过,已锁定移库/分配储位,盘点完成后自动解锁' : '审核已通过') + auditDialogVisible.value = false + await reloadAndResyncDetail() + } catch (e: any) { + console.error('[stockcheck] 审核通过失败', e) + ElMessage.error(e?.message || '审核通过失败') + } finally { + auditLoading.value = false + } +} + function handleAuditReject(row: Record) { const id = Number(row?.id) if (!Number.isFinite(id) || id <= 0) { @@ -637,13 +750,17 @@ async function submitAuditReject() { } /** 统一执行状态类操作:校验结果 → 提示 → 刷新列表并同步详情 */ -async function runCheckAction(action: () => Promise, successText: string) { +async function runCheckAction( + action: () => Promise, + successText: string, + buildSuffix?: (res: any) => string +) { try { const res: any = await action() if (!isCheckApiSuccess(res)) { throw new Error(res?.message || '操作失败') } - ElMessage.success(successText) + ElMessage.success(`${successText}${buildSuffix?.(res) || ''}`) await reloadAndResyncDetail() } catch (e: any) { console.error('[stockcheck] 盘点单操作失败', e) @@ -1312,11 +1429,16 @@ onMounted(() => { } } + /* 标签列固定宽度(含必填星号占位):对齐「手工录入运单号」表单 */ &__field-label { + flex: none; + width: 88px; + padding-left: 10px; + box-sizing: border-box; font-size: 12px; line-height: 20px; color: #606266; - flex-shrink: 0; + text-align: left; white-space: nowrap; } @@ -1336,6 +1458,11 @@ onMounted(() => { font-size: 12px; line-height: 18px; color: #909399; + + &--warning { + background: #fdf6ec; + color: #e6a23c; + } } &__foot { @@ -1354,7 +1481,8 @@ onMounted(() => { &__actions { display: flex; align-items: center; - gap: 8px; + /* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */ + gap: 6px; :deep(.el-button) { margin-left: 0; @@ -1366,7 +1494,8 @@ onMounted(() => { + + diff --git a/src/views/storage/stockcheck/pages/CheckPatternDialog.vue b/src/views/storage/stockcheck/pages/CheckPatternDialog.vue index 78a75772..2a651738 100644 --- a/src/views/storage/stockcheck/pages/CheckPatternDialog.vue +++ b/src/views/storage/stockcheck/pages/CheckPatternDialog.vue @@ -15,78 +15,123 @@ @@ -260,17 +305,210 @@ async function handleSubmit() { + + diff --git a/src/views/storage/stockcheck/pages/CheckStockPickerDialog.vue b/src/views/storage/stockcheck/pages/CheckStockPickerDialog.vue index ef7c2d73..87623c0b 100644 --- a/src/views/storage/stockcheck/pages/CheckStockPickerDialog.vue +++ b/src/views/storage/stockcheck/pages/CheckStockPickerDialog.vue @@ -109,13 +109,13 @@ :height="tableHeight" @selection-change="handleSelectionChange" > - - - - - - - + + + + + + + diff --git a/src/views/storage/stockout/index.vue b/src/views/storage/stockout/index.vue index 4a8f3fe1..6e8901c2 100644 --- a/src/views/storage/stockout/index.vue +++ b/src/views/storage/stockout/index.vue @@ -401,7 +401,7 @@ destroy-on-close :close-on-click-modal="false" > - +
@@ -1466,7 +1466,7 @@ function handleImport() { font-size: 14px; } -/* 更新快递公司与运单号:面板结构 / 尺寸对齐「批量修改平台信息」(UpdateOrderMetaForm) */ +/* 更新快递公司与运单号:面板结构 / 尺寸对齐「手工录入运单号」(TaskProgressPanel) */ .task-panel { background: #fff; color: #303133; @@ -1557,17 +1557,26 @@ function handleImport() { } } - /* 多行文本行:标签与文本域顶部对齐 */ + /* 多行文本行:标签与文本域首行对齐 */ &--textarea { - padding-top: 8px; + .task-panel__field-label { + padding-top: 7px; + } } } + /* 标签列固定宽度(含必填星号占位):保证各输入框左边缘对齐、长度一致 */ &__field-label { + position: relative; + flex: none; + width: 88px; + padding-left: 10px; + box-sizing: border-box; font-size: 12px; line-height: 20px; color: #606266; - flex-shrink: 0; + text-align: left; + white-space: nowrap; } &__field-value { @@ -1606,7 +1615,8 @@ function handleImport() { &__actions { display: flex; align-items: center; - gap: 8px; + /* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */ + gap: 6px; :deep(.el-button) { margin-left: 0; diff --git a/src/views/store/shipperSigning/index.vue b/src/views/store/shipperSigning/index.vue index c8df0466..97cc600e 100644 --- a/src/views/store/shipperSigning/index.vue +++ b/src/views/store/shipperSigning/index.vue @@ -209,6 +209,77 @@
+ + + +
+
+
+

修改备注

+

设置该签约货主在本仓库内的展示名称

+
+ +
+ +
+
+
+ 签约主体 + {{ renameRow?.counterparty_name || '—' }} +
+
+ 当前备注 + {{ renameRow?.remask || '—' }} +
+ +
+ 备注名称 +
+ +
+
+
+ +

+ 备注仅在本仓库内作为该货主的显示名称,不会影响货主主体信息;留空保存将恢复为货主全称。 +

+
+ +
+ 提交前请确认备注名称无误 +
+ 取消 + + 保存 + +
+
+
+
@@ -475,6 +546,46 @@ function getAuthStatusLabel(status: number): string { return map[status] || '未知' } +// ─── 修改备注(弹窗表单,对齐「手工录入运单号」) ───────────────────────────── +const renameDialogVisible = ref(false) +const renameLoading = ref(false) +const renameRow = ref(null) +const renameForm = reactive({ remask: '' }) + +function handleRename(row: any) { + renameRow.value = row + /* 与改造前一致:默认填当前备注,没有备注时填货主全称 */ + renameForm.remask = String(row?.remask ?? row?.counterparty_name ?? '') + renameDialogVisible.value = true +} + +async function handleRenameSubmit() { + const row = renameRow.value + if (!row?.id) { + ElMessage.warning('缺少签约关系 ID,无法修改备注') + return + } + const remask = renameForm.remask.trim() + renameLoading.value = true + try { + const res = await storeWarehouseRename({ id: row.id, remask }) as any + if (res?.flag === 'success' || res?.code === 200) { + ElMessage.success('修改备注成功') + renameDialogVisible.value = false + loadList() + if (selectedRow.value && selectedRow.value.id === row.id) { + selectedRow.value.remask = remask + } + } else { + ElMessage.error(res?.message || '修改备注失败') + } + } catch { + /* 请求层已提示错误 */ + } finally { + renameLoading.value = false + } +} + // ─── 操作 ──────────────────────────────────────────────────────────────────── async function handleConfirmSign(row: any) { try { @@ -495,24 +606,6 @@ async function handleConfirmSign(row: any) { } catch { ElMessage.error('确认签约失败') } } -async function handleRename(row: any) { - try { - const { value } = await ElMessageBox.prompt('请输入新的备注名称', '修改备注', { - confirmButtonText: '确定', - cancelButtonText: '取消', - inputValue: row.remask || row.counterparty_name, - buttonSize: 'small' - }) - const res = await storeWarehouseRename({ id: row.id, remask: value }) as any - if (res?.flag === 'success' || res?.code === 200) { - ElMessage.success('修改备注成功') - loadList() - } else { - ElMessage.error(res?.message || '修改备注失败') - } - } catch { /* cancelled */ } -} - async function handleUnbind(row: any, targetStatus: number) { const actionLabel = targetStatus === 0 ? '禁用' : '启用' try { @@ -619,4 +712,189 @@ onMounted(() => { .text-danger { color: #f56c6c; } + +/* 修改备注弹窗:面板结构 / 尺寸对齐「手工录入运单号」(ManualWaybillForm) */ +.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: flex-start; + min-height: 0; + /* 右 0 让输入框右边顶到容器右边缘 */ + padding: 4px 0 0 12px; + border: none; + border-radius: 0; + background: transparent; + + .task-panel__field-label { + padding-top: 7px; + + &.is-required::before { + top: 7px; + } + } + } + } + + /* 标签列固定宽度:输入框左边缘与上方静态信息行的标签列对齐 */ + &__field-label { + position: relative; + flex: 0 0 88px; + width: 88px; + padding-left: 10px; + box-sizing: border-box; + font-size: 12px; + line-height: 20px; + color: #606266; + text-align: left; + white-space: nowrap; + + &.is-required::before { + content: '*'; + position: absolute; + left: 0; + top: 0; + line-height: 20px; + color: #f56c6c; + } + } + + &__field-value { + font-size: 13px; + font-weight: 500; + color: #303133; + text-align: right; + word-break: break-all; + } + + &__field-control { + flex: 1; + min-width: 0; + } + + &__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; + /* 与工具栏按钮组(OrderToolbarButtonGroup)保持一致:gap 6px */ + gap: 6px; + + :deep(.el-button) { + margin-left: 0; + margin-right: 0; + } + } +} + + + diff --git a/src/views/store/stores/index.vue b/src/views/store/stores/index.vue index 939679da..6230161b 100644 --- a/src/views/store/stores/index.vue +++ b/src/views/store/stores/index.vue @@ -230,10 +230,7 @@ table-size="small" :loading="balanceLogLoading" :virtual-threshold="100000" - :pagination="balanceLogTablePagination" - :page-sizes="[10, 20, 50, 100]" - @page-change="handleBalanceLogPageChange" - @page-size-change="handleBalanceLogSizeChange" + :show-pagination="false" >
+ + +
+ +
+ + +
+
+
+

修改备注

+

设置当前签约货主的备注名称

+
+ +
+ +
+
+
+ 签约主体 + + {{ renameRow?.store_name || renameRow?.counterparty_name || '—' }} + +
+
+ 当前备注 + {{ renameRow?.remask || '—' }} +
+ + +
+ 备注名称 + + + +
+
+
+ +

+ 备注仅用于本仓库内标识该签约货主,不会影响货主主体信息;留空保存将清除备注。 +

+
+ +
+ 提交前请确认备注名称无误 +
+ 取消 + + 保存 + +
+
+
+
+ -
+
新增配置 @@ -472,8 +567,9 @@ :label="col.label" :min-width="col.minWidth" :width="col.width" + align="center" /> - + - - - + + + - + @@ -1022,6 +1299,7 @@ + + + + diff --git a/src/views/video/newcamaraserver/pages/ServerFormDialog.vue b/src/views/video/newcamaraserver/pages/ServerFormDialog.vue index 95ac2083..7acacaf4 100644 --- a/src/views/video/newcamaraserver/pages/ServerFormDialog.vue +++ b/src/views/video/newcamaraserver/pages/ServerFormDialog.vue @@ -1,6 +1,6 @@