diff --git a/src/api/aftersale/index.ts b/src/api/aftersale/index.ts index 401e5675..63ce5455 100644 --- a/src/api/aftersale/index.ts +++ b/src/api/aftersale/index.ts @@ -356,6 +356,123 @@ export interface AfterSaleBatchCloseFailedItem { reason: string } +/** 售后类型/子类型列表分页信息(含 hasPrevious/hasNext) */ +export interface AfterSaleMetaPagination { + page: number + pageSize: number + total: number + totalPages: number + hasPrevious?: boolean + hasNext?: boolean +} + +/** 售后类型:系统级 warehouse_id=null、is_system=1;仓库自定义 is_system=0 */ +export interface AfterSaleTypeItem { + id: number + warehouse_id: number | null + type: string + name: string + is_system: 0 | 1 + is_enabled: 0 | 1 + sort_order: number + created_at?: string + updated_at?: string +} + +/** 售后子类型:系统级 warehouse_id=null、is_system=1;仓库自定义 is_system=0 */ +export interface AfterSaleSubTypeItem { + id: number + warehouse_id: number | null + type: string + sub_type: string + name: string + is_system: 0 | 1 + is_enabled: 0 | 1 + sort_order: number + created_at?: string + updated_at?: string +} + +/** 售后子类型按 type 分组项(subTypeList 传 group=true 时返回) */ +export interface AfterSaleSubTypeGroup { + type: string + name: string + items: AfterSaleSubTypeItem[] +} + +/** 售后类型/子类型列表查询参数 */ +export interface AfterSaleMetaListParams { + pagination?: { page?: number; pageSize?: number } + where?: Record + sort?: { sortField?: string; sortOrder?: 'asc' | 'desc' | 'ASC' | 'DESC' } +} + +/** 售后子类型列表查询参数(额外支持 group 分组) */ +export interface AfterSaleSubTypeListParams extends AfterSaleMetaListParams { + /** 是否按 type 分组返回 groups(true 时额外返回 groups 数组) */ + group?: boolean +} + +/** 创建仓库自定义售后类型参数(warehouse_id 由服务端注入,无需传递) */ +export interface AfterSaleTypeCreateParams { + /** 类型编码:仅 /^[a-z0-9_]+$/,长度≤20,不可与系统级编码重复 */ + type: string + /** 类型名称,长度≤50 */ + name: string + /** 排序值,越小越靠前,默认 0 */ + sort_order?: number + /** 是否启用:1=启用(默认),0=停用 */ + is_enabled?: 0 | 1 +} + +/** 更新仓库自定义售后类型参数(type 编码不可变) */ +export interface AfterSaleTypeUpdateParams { + id: number + name?: string + is_enabled?: 0 | 1 + sort_order?: number +} + +/** 创建仓库自定义售后子类型参数(所属 type 必须已存在且启用) */ +export interface AfterSaleSubTypeCreateParams { + /** 所属类型编码 */ + type: string + /** 子类型编码:仅 /^[a-z0-9_]+$/,长度≤50 */ + sub_type: string + /** 子类型名称,长度≤50 */ + name: string + sort_order?: number + is_enabled?: 0 | 1 +} + +/** 更新仓库自定义售后子类型参数(type 与 sub_type 编码均不可变) */ +export interface AfterSaleSubTypeUpdateParams { + id: number + name?: string + is_enabled?: 0 | 1 + sort_order?: number +} + +/** afterSale.typeList 响应 */ +export interface AfterSaleTypeListResponse { + list: AfterSaleTypeItem[] + pagination: AfterSaleMetaPagination +} + +/** afterSale.subTypeList 响应 */ +export interface AfterSaleSubTypeListResponse { + list: AfterSaleSubTypeItem[] + pagination: AfterSaleMetaPagination + /** group=true 时返回:按 type 分组(基于全量过滤结果,不受分页影响) */ + groups?: AfterSaleSubTypeGroup[] +} + +/** afterSale.typeDelete / afterSale.subTypeDelete 响应 */ +export interface AfterSaleMetaDeleteResponse { + id: number + deleted: boolean +} + // ==================== API 方法 ==================== /** 2.1 工作列表 afterSale.workList */ @@ -554,3 +671,156 @@ export function afterSaleBatchClose(data: AfterSaleBatchCloseParams) { isSystemApi: true } as any) } + +/** + * 2.14 售后类型列表 afterSale.typeList + * 返回系统级(warehouse_id=null、is_system=1)+ 当前仓库自定义(is_system=0)合并列表, + * 默认 sort_order ASC, id ASC;pageSize 上限 500 + */ +export function afterSaleTypeList( + data: AfterSaleMetaListParams = {} +): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'afterSale.typeList', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +/** + * 2.15 创建仓库自定义售后类型 afterSale.typeCreate + * warehouse_id 由服务端从当前仓库上下文注入 + */ +export function afterSaleTypeCreate(data: AfterSaleTypeCreateParams): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'afterSale.typeCreate', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +/** + * 2.16 更新仓库自定义售后类型 afterSale.typeUpdate + * 仅命中 id + 当前仓库 + is_system=0;type 编码不可变 + */ +export function afterSaleTypeUpdate(data: AfterSaleTypeUpdateParams): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'afterSale.typeUpdate', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +/** + * 2.17 删除仓库自定义售后类型 afterSale.typeDelete + * 系统级类型禁止删除;该类型下存在当前仓库自定义子类型时拒绝删除 + */ +export function afterSaleTypeDelete(id: number): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'afterSale.typeDelete', + v, + timestamp: Date.now() + }, + data: { id }, + isSystemApi: true + } as any) +} + +/** + * 2.18 售后子类型列表 afterSale.subTypeList + * group=true 时额外返回 groups(按 type 分组,基于全量过滤结果、不受分页影响) + */ +export function afterSaleSubTypeList( + data: AfterSaleSubTypeListParams = {} +): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'afterSale.subTypeList', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +/** + * 2.19 创建仓库自定义售后子类型 afterSale.subTypeCreate + * 所属 type 必须已存在(系统级或当前仓库自定义)且处于启用状态 + */ +export function afterSaleSubTypeCreate( + data: AfterSaleSubTypeCreateParams +): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'afterSale.subTypeCreate', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +/** + * 2.20 更新仓库自定义售后子类型 afterSale.subTypeUpdate + * 仅命中 id + 当前仓库 + is_system=0;type 与 sub_type 编码均不可变 + */ +export function afterSaleSubTypeUpdate( + data: AfterSaleSubTypeUpdateParams +): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'afterSale.subTypeUpdate', + v, + timestamp: Date.now() + }, + data, + isSystemApi: true + } as any) +} + +/** + * 2.21 删除仓库自定义售后子类型 afterSale.subTypeDelete + * 系统级子类型禁止删除;已被当前仓库售后单引用时拒绝删除 + */ +export function afterSaleSubTypeDelete(id: number): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'afterSale.subTypeDelete', + v, + timestamp: Date.now() + }, + data: { id }, + isSystemApi: true + } as any) +} diff --git a/src/api/setting.warehouse/settingwarehouse.ts b/src/api/setting.warehouse/settingwarehouse.ts index 7a0313f5..31ea1efd 100644 --- a/src/api/setting.warehouse/settingwarehouse.ts +++ b/src/api/setting.warehouse/settingwarehouse.ts @@ -24,6 +24,43 @@ export const DEFAULT_AUTO_OUTBOUND_RULES: Required = { + enabled: false, + notice_time: '08:30', + min_hours: 24, + max_hours: 48, + notice_template: '', + store_notice_template: '' +} + +/** receiving_pending_inbound_notice 中的纯文本字段 */ +export const RECEIVING_PENDING_INBOUND_NOTICE_TEXT_KEYS = [ + 'notice_template', + 'store_notice_template' +] as const + /** 仓库默认发件人/地址(subject_config 内,文档默认空字符串) */ export type SettingWarehouseSenderConfig = { sender_name?: string @@ -84,6 +121,11 @@ export type SettingWarehouseSubjectConfig = SettingWarehouseSenderConfig & { allocate_start_time?: string /** 截单时间,格式 HH:mm,默认 18:00,范围 00:00-23:59;作为最后允许自动分配的时间,开始时间晚于截单时间时截单时间视为次日(跨天窗口) */ cutoff_order_time?: string + /** + * 收货未入库提醒配置(默认关闭)。开启后每天按 notice_time 扫描「创建时间超过 min_hours 且不足 max_hours + * 仍未完成入库」的收货单:绑定货主的通知货主收货群(未配群回退仓库客服群),未绑定货主的通知仓库客服群 + */ + receiving_pending_inbound_notice?: SettingWarehouseReceivingPendingInboundNotice [key: string]: unknown } @@ -184,6 +226,45 @@ export function normalizeWarehouseSubjectConfig( const cutoffTime = String(base.cutoff_order_time ?? '') base.cutoff_order_time = HHmmPattern.test(cutoffTime) ? cutoffTime : '18:00' + // 收货未入库提醒(enabled flag 兼容 boolean / 数字 / 字符串;notice_time 非法回退 08:30; + // min_hours 默认 24;max_hours 默认 48 且必须大于 min_hours) + const noticeRaw = base.receiving_pending_inbound_notice + const notice = + noticeRaw && typeof noticeRaw === 'object' && !Array.isArray(noticeRaw) + ? { ...(noticeRaw as Record) } + : ({} as Record) + + const noticeEnabled = notice.enabled + notice.enabled = + noticeEnabled === true || noticeEnabled === 1 || noticeEnabled === '1' + + const noticeTime = String(notice.notice_time ?? '') + notice.notice_time = HHmmPattern.test(noticeTime) + ? noticeTime + : DEFAULT_RECEIVING_PENDING_INBOUND_NOTICE.notice_time + + const minHours = Number(notice.min_hours) + notice.min_hours = + Number.isFinite(minHours) && minHours > 0 + ? Math.trunc(minHours) + : DEFAULT_RECEIVING_PENDING_INBOUND_NOTICE.min_hours + + const maxHours = Number(notice.max_hours) + notice.max_hours = + Number.isFinite(maxHours) && maxHours > (notice.min_hours as number) + ? Math.trunc(maxHours) + : Math.max( + DEFAULT_RECEIVING_PENDING_INBOUND_NOTICE.max_hours, + (notice.min_hours as number) + 1 + ) + + for (const key of RECEIVING_PENDING_INBOUND_NOTICE_TEXT_KEYS) { + if (typeof notice[key] !== 'string') notice[key] = '' + } + + base.receiving_pending_inbound_notice = + notice as SettingWarehouseReceivingPendingInboundNotice + return base as SettingWarehouseSubjectConfig } diff --git a/src/components/Breadcrumb/index.vue b/src/components/Breadcrumb/index.vue index 2a632b16..1d0bee34 100644 --- a/src/components/Breadcrumb/index.vue +++ b/src/components/Breadcrumb/index.vue @@ -13,19 +13,15 @@ import { ref, watch, onMounted } from 'vue' import { useRoute, useRouter } from 'vue-router' import { compile } from 'path-to-regexp' -import { useI18n } from 'vue-i18n' +import { tMenu } from '@/lang/index' -const { t, te } = useI18n() const levelList = ref([]) const route = useRoute() const router = useRouter() const generateTitle = (title: string, name: any) => { - // Use name as key if available - if (name && te('menu.' + name)) { - return t('menu.' + name) - } - return title + // 优先用路由 name 查菜单词条(含 menu. 为对象时的 _self 兜底),否则回退 meta.title + return (name ? tMenu(name, false) : '') || title } const getBreadcrumb = () => { diff --git a/src/lang/en-US.ts b/src/lang/en-US.ts index aaadfc90..a6b28c0b 100644 --- a/src/lang/en-US.ts +++ b/src/lang/en-US.ts @@ -80,7 +80,10 @@ export default { 'returnReceived':'Return Received', 'returnUnpack':'Return Unpack', 'returnwaybill':'Return Waybill', - 'generalreport':'General Report' + 'generalreport':'General Report', + 'afterSale':'After Sale', + 'afterSaletypeList':'AfterSale TypeList', + 'afterSalelist':'AfterSale List' }, "login": { "title": "Login", diff --git a/src/lang/index.ts b/src/lang/index.ts index 8b0d4a6a..fe95051b 100644 --- a/src/lang/index.ts +++ b/src/lang/index.ts @@ -197,6 +197,39 @@ const i18n = createI18n({ } }) +/** + * 菜单标题兜底解析(侧边栏 / 标签页 / 面包屑 / 浏览器标题统一入口) + * + * 背景:后台 i18n 以「扁平键名」存储,返回时会把键名里的 "." 展开成嵌套结构。 + * 若历史上存在 menu..<子键>(如 menu.afterSale.list / .detail / .typeList), + * 则 menu. 会被撑成对象,$t('menu.') 只能把 key 原样返回 + * (表现为导航栏显示 menu.afterSale)。 + * + * 解析优先级: + * 1) menu. 命中字符串且不等于 key(值 = key 的是自动采集占位符)→ 直接用 + * 2) menu. 命中对象 → 取 menu.._self(后台「节点自身标签」约定) + * 3) 兜底:fallbackToName ? 菜单名本身 : '' + * + * 与 $t 一样,直接写在模板/计算属性里即可跟随语言切换响应。 + */ +export function tMenu(title: unknown, fallbackToName = true): string { + const name = String(title ?? '').replace(/_Child$/, '').trim() + if (!name) return '' + const key = `menu.${name}` + + // 先调 t():保留「缺失键自动采集上报」的原有行为(见 missing 回调) + const value = i18n.global.t(key) as unknown + if (typeof value === 'string' && value !== key) return value + + const selfKey = `${key}._self` + if (i18n.global.te(selfKey)) { + const selfValue = i18n.global.t(selfKey) as unknown + if (typeof selfValue === 'string' && selfValue !== selfKey) return selfValue + } + + return fallbackToName ? name : '' +} + /** * 递归深度合并对象 */ diff --git a/src/lang/zh-CN.ts b/src/lang/zh-CN.ts index da7f7646..215d5d65 100644 --- a/src/lang/zh-CN.ts +++ b/src/lang/zh-CN.ts @@ -83,7 +83,10 @@ export default { 'returnReceived':'退回收件', 'returnUnpack':'退回拆包', 'returnwaybill':'退回运单', - 'generalreport':'通用报表' + 'generalreport':'通用报表', + 'afterSale':'售后', + 'afterSaletypeList':'售后类型列表', + 'afterSalelist':'售后列表', }, "login": { "title": "登录", diff --git a/src/layout/component/Navbar.vue b/src/layout/component/Navbar.vue index d5da9eb9..eafdc283 100644 --- a/src/layout/component/Navbar.vue +++ b/src/layout/component/Navbar.vue @@ -35,7 +35,7 @@ @@ -67,7 +67,7 @@ - {{ $t('menu.Profile') }} + {{ tMenu('Profile') }} @@ -102,6 +102,7 @@ import LangSelect from '@/components/LangSelect/index.vue' import TopMenu from './TopMenu.vue' import dayjs from 'dayjs' import { useFullscreen } from '@vueuse/core' +import { tMenu } from '@/lang/index' import { afterSaleWorkCount, afterSaleWorkList } from '@/api/aftersale/index' const { isFullscreen, toggle } = useFullscreen() diff --git a/src/layout/component/Sidebar/Item.vue b/src/layout/component/Sidebar/Item.vue index 23ef78a0..ba686967 100644 --- a/src/layout/component/Sidebar/Item.vue +++ b/src/layout/component/Sidebar/Item.vue @@ -2,12 +2,13 @@
- {{ $t("menu." + title) }} + {{ tMenu(title) }}
+ diff --git a/src/views/afterSale/typelist/components/OperationCellRenderer.vue b/src/views/afterSale/typelist/components/OperationCellRenderer.vue new file mode 100644 index 00000000..d2515d24 --- /dev/null +++ b/src/views/afterSale/typelist/components/OperationCellRenderer.vue @@ -0,0 +1,175 @@ + + + + + + diff --git a/src/views/afterSale/typelist/components/TabArea.vue b/src/views/afterSale/typelist/components/TabArea.vue new file mode 100644 index 00000000..288ec6f1 --- /dev/null +++ b/src/views/afterSale/typelist/components/TabArea.vue @@ -0,0 +1,132 @@ + + + + + diff --git a/src/views/afterSale/typelist/config/components/DetailPanel.vue b/src/views/afterSale/typelist/config/components/DetailPanel.vue new file mode 100644 index 00000000..b024f3d2 --- /dev/null +++ b/src/views/afterSale/typelist/config/components/DetailPanel.vue @@ -0,0 +1,179 @@ + + + + + + diff --git a/src/views/afterSale/typelist/config/components/LogPanel.vue b/src/views/afterSale/typelist/config/components/LogPanel.vue new file mode 100644 index 00000000..3a79695a --- /dev/null +++ b/src/views/afterSale/typelist/config/components/LogPanel.vue @@ -0,0 +1,194 @@ + + + + + + diff --git a/src/views/afterSale/typelist/config/template-config.ts b/src/views/afterSale/typelist/config/template-config.ts new file mode 100644 index 00000000..02160001 --- /dev/null +++ b/src/views/afterSale/typelist/config/template-config.ts @@ -0,0 +1,866 @@ +/** + * 【页面模板】配置文件 v2 — 基于 waveOrder2 架构设计 + * + * ===== 核心设计 ===== + * + * 1. FIELD_DICT — 全局字段预设表,每个字段拥有唯一翻译(label)和完整元数据 + * 2. VALUE_MAPS — 值翻译映射表(select options 和 tag 翻译共用) + * 3. TAG_RESOLVERS — 标签颜色解析器(集中管理 tag 颜色逻辑) + * 4. 各标签页通过 key 引用所需字段(scanBoxFieldKeys / tableColumnKeys) + * 5. resolveTabConfig() — 加载时将 key 列表展开为完整配置 + * + * ===== 快速上手 ===== + * 1. 复制整个 views/mode/ 文件夹,重命名为你的页面名 + * 2. 在 FIELD_DICT 中添加你需要的字段定义 + * 3. 在 tabPages 中配置标签页(引用 FIELD_DICT 的 key) + * 4. 在 TabPageApiConfig 中接入真实接口 + * 5. 在 router/map.ts 中添加路由 + */ + +import type { Component } from 'vue' +import DetailPanel from './components/DetailPanel.vue' +import LogPanel from './components/LogPanel.vue' +import { afterSaleTypeList, afterSaleSubTypeList } from '@/api/aftersale/index' + +// ============================================================ +// 〇、全局页面配置 +// ============================================================ +export const PAGE_CONFIG = { + /** 是否显示顶部多标签栏 */ + showTabArea: true, + /** 单页模式:不显示标签栏,仅一个标签页内容 */ + singlePage: false, + /** 是否启用详情面板(底部分栏 + 显示/隐藏详情按钮),false 时表格占满全高 */ + enableDetailPanel: true +} + +// ============================================================ +// 〇-A、组件注册表 — 所有可复用组件在此注册 +// ============================================================ +export const COMPONENT_REGISTRY: Record = { + DetailPanel, + LogPanel +} + +// ============================================================ +// 〇-B、SCANBOX_GROUPS — ScanBox 分组名称 +// ============================================================ +export const SCANBOX_GROUPS = { + basic: '基础信息', + process: '流程状态', + time: '时间范围', + custom: '自定义字段' +} as const + +// ============================================================ +// 一、FIELD_DICT — 全局字段预设表(唯一真相来源) +// ============================================================ +// 每个字段拥有: +// label — 唯一翻译文本 +// scanBox — ScanBox 渲染配置(type/options/group) +// table — 表格列配置(minWidth/fixed/align/sortable) +// slot — 单元格渲染配置(tag/tagResolver/translateField) +// detailLabel — 明细面板中的标签文本(可选,默认用 label) +// filterParamMap — ScanBox 筛选值 → API 传参值映射 + +export interface FieldDefinition { + key: string + label: string + scanBox: { + type: 'text' | 'select' | 'daterange' | 'number' + group?: string + options?: { label: string; value: any }[] + } | null + table: { + minWidth?: number + width?: number + fixed?: 'left' | 'right' | boolean + align?: 'left' | 'center' | 'right' + sortable?: boolean + showOverflowTooltip?: boolean + copyAction?: 'copy' | 'copyQr' + copyValue?: (row: any) => any + } | null + slot: { + type: 'tag' | 'text' | 'default' | 'operation' + tagType?: string | Record + tagResolver?: string + translateField?: string + format?: 'datetime' + } | null + detailLabel?: string + filterParamMap?: Record +} + +/** + * ScanBox 字段渲染覆盖(按标签页覆写 label / type / options) + * 用于同一字段在不同标签页语义不同的场景,如 type:类型页签=类型编码(文本),子类型页签=所属类型(下拉) + */ +export interface ScanBoxFieldOverride { + label?: string + type?: 'text' | 'select' | 'daterange' | 'number' + options?: { label: string; value: any }[] +} + +// ============================================================ +// VALUE_MAPS — 值翻译映射(select options 和 tag 翻译共用) +// ============================================================ +export const VALUE_MAPS: Record> = { + /** 数据来源:1=系统级(全部仓库可见,不可改删),0=当前仓库自定义 */ + is_system: { '1': '系统级', '0': '仓库自定义' }, + /** 启用状态:1=启用,0=停用 */ + is_enabled: { '1': '启用', '0': '停用' } +} + +/** 从 VALUE_MAPS 衍生 options(优先取中文值作为 option value) */ +export function getOptions(field: string): { label: string; value: string }[] { + const map = VALUE_MAPS[field] + if (!map) return [] + const seen = new Set() + const opts: { label: string; value: string }[] = [] + const chineseKeys: [string, string][] = [] + const otherKeys: [string, string][] = [] + for (const [v, l] of Object.entries(map)) { + if (/^[\u4e00-\u9fa5]/.test(v)) { + chineseKeys.push([v, l]) + } else { + otherKeys.push([v, l]) + } + } + for (const [v, l] of [...chineseKeys, ...otherKeys]) { + if (!seen.has(l)) { + seen.add(l) + opts.push({ label: l, value: v }) + } + } + return opts +} + +/** 翻译 value → label */ +export function translate(field: string, value: any): string { + const map = VALUE_MAPS[field] + if (!map) return String(value ?? '—') + return map[String(value)] ?? String(value ?? '—') +} + +/** 格式化时间戳为 YYYY-MM-DD HH:mm:ss */ +export function formatTime(value: any): string { + if (!value) return '—' + try { + const d = new Date(value) + if (isNaN(d.getTime())) return String(value) + const pad = (n: number) => String(n).padStart(2, '0') + return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}` + } catch { + return String(value) + } +} + +// ============================================================ +// TAG_RESOLVERS — 标签颜色解析器 +// ============================================================ +// 颜色规则:未xx=info(灰) 已xx=success(绿) xx中/部分xx=warning(黄) 错误=danger(红) +export const TAG_RESOLVERS: Record string> = { + /** 数据来源:系统级=warning(橙),仓库自定义=info(灰) */ + resolveIsSystemTag(v) { + if (v === undefined || v === null || v === '') return 'info' + return String(v) === '1' ? 'warning' : 'info' + }, + /** 启用状态:启用=success(绿),停用=info(灰) */ + resolveIsEnabledTag(v) { + if (v === undefined || v === null || v === '') return 'info' + return String(v) === '1' ? 'success' : 'info' + } +} + +// ============================================================ +// 二、FIELD_DICT 实例 — 在此定义页面所需的所有字段 +// ============================================================ +export const FIELD_DICT: Record = { + /** 类型编码(系统级 / 当前仓库自定义,仅小写字母数字下划线) */ + type: { + key: 'type', + label: '类型编码', + scanBox: { type: 'text', group: SCANBOX_GROUPS.basic }, + table: { minWidth: 140, fixed: 'left', copyAction: 'copy', showOverflowTooltip: true }, + slot: null, + detailLabel: '类型编码' + }, + /** 子类型编码(所属 type 下的编码) */ + sub_type: { + key: 'sub_type', + label: '子类型编码', + scanBox: { type: 'text', group: SCANBOX_GROUPS.basic }, + table: { minWidth: 160, fixed: 'left', copyAction: 'copy', showOverflowTooltip: true }, + slot: null, + detailLabel: '子类型编码' + }, + /** 所属类型名称(虚拟字段:由 afterSale.typeList 结果补全,见 enrichSubTypeRows) */ + type_name: { + key: 'type_name', + label: '所属类型', + scanBox: null, + table: { minWidth: 140, showOverflowTooltip: true }, + slot: null, + detailLabel: '所属类型' + }, + name: { + key: 'name', + label: '名称', + scanBox: { type: 'text', group: SCANBOX_GROUPS.basic }, + table: { minWidth: 150, showOverflowTooltip: true }, + slot: null, + detailLabel: '名称' + }, + /** 数据来源:系统级(warehouse_id=null)不可改删 */ + is_system: { + key: 'is_system', + label: '来源', + scanBox: { type: 'select', group: SCANBOX_GROUPS.process, options: getOptions('is_system') }, + table: { minWidth: 110, align: 'center' }, + slot: { type: 'tag', tagResolver: 'resolveIsSystemTag', translateField: 'is_system' }, + detailLabel: '来源', + filterParamMap: { '1': 1, '0': 0 } + }, + /** 启用状态:1=启用,0=停用 */ + is_enabled: { + key: 'is_enabled', + label: '状态', + scanBox: { type: 'select', group: SCANBOX_GROUPS.process, options: getOptions('is_enabled') }, + table: { minWidth: 100, align: 'center' }, + slot: { type: 'tag', tagResolver: 'resolveIsEnabledTag', translateField: 'is_enabled' }, + detailLabel: '状态', + filterParamMap: { '1': 1, '0': 0 } + }, + /** 排序值:越小越靠前 */ + sort_order: { + key: 'sort_order', + label: '排序', + scanBox: { type: 'number', group: SCANBOX_GROUPS.basic }, + table: { minWidth: 80, align: 'center', sortable: true }, + slot: null, + detailLabel: '排序' + }, + created_at: { + key: 'created_at', + label: '创建时间', + scanBox: { type: 'daterange', group: SCANBOX_GROUPS.time }, + table: { minWidth: 170, sortable: true }, + slot: { type: 'text', format: 'datetime' }, + detailLabel: '创建时间' + }, + updated_at: { + key: 'updated_at', + label: '更新时间', + scanBox: { type: 'daterange', group: SCANBOX_GROUPS.time }, + table: { minWidth: 170, sortable: true }, + slot: { type: 'text', format: 'datetime' }, + detailLabel: '更新时间' + }, + /** 操作列(虚拟字段,仅用于表格列渲染) */ + operation: { + key: 'operation', + label: '操作', + scanBox: null, + table: { minWidth: 180, fixed: 'right', align: 'center' }, + slot: { type: 'operation' } + } +} + +// ============================================================ +// 三、ColumnSlotConfig — 列单元格渲染配置 +// ============================================================ +export interface ColumnSlotConfig { + type: 'tag' | 'text' | 'default' | 'operation' + tagType?: string | Record + tagResolver?: string + translateField?: string + format?: 'datetime' +} + +// ============================================================ +// 三-A、OperationButtonConfig — 操作列按钮配置 +// ============================================================ +export interface OperationButtonConfig { + key: string + label: string + type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | '' + actionType: 'form' | 'action' + formKey?: string + formTitle?: string + formWidth?: string + paramMap?: Record + extraParams?: Record + disabledOnField?: string + confirmMessage?: string + confirmTitle?: string + confirmType?: 'warning' | 'danger' | 'info' + confirmButtonText?: string +} + +// ============================================================ +// 四、DetailFieldConfig / DetailSectionConfig — 明细面板配置 +// ============================================================ +export interface DetailFieldConfig { + key: string + label?: string + span?: number + renderType?: 'text' | 'tag' | 'pre' + tagType?: string | Record + tagResolver?: string + translateField?: string +} + +export interface DetailSectionConfig { + title: string + columnCount: number + fields: DetailFieldConfig[] +} + +export interface DetailTabConfig { + name: string + label: string + componentKey: string + component?: Component +} + +// ============================================================ +// 五、TabPageApiConfig — 标签页接口插槽配置 +// ============================================================ +export type ApiMethod = (...args: any[]) => Promise +export type ApiSource = 'api' | 'list' +export type ComponentApiConfig = { source: 'list' } | ApiMethod + +export interface TabPageApiConfig { + /** 列表查询接口 */ + list: ApiMethod + /** 明细面板接口(可选,不配则用 row 数据) */ + detail?: ComponentApiConfig + /** 操作日志接口(可选) */ + log?: ComponentApiConfig + /** 导出接口(可选) */ + export?: ApiMethod + /** 导出进度查询接口(可选) */ + exportProgress?: ApiMethod + /** ScanBox 下拉选项数据源接口(可选) */ + scanBoxOptions?: Record + /** 工具栏按钮 → API 方法映射(可选) */ + toolbar?: Record + /** 列表响应解析器 */ + parseListResponse?: (res: any) => { list: any[]; total: number } + /** 构建列表请求参数 */ + buildListParams?: (params: { + pagination: { page: number; pageSize: number } + conditions: Record + sort?: { prop: string; order: string } + }) => Record +} + +// ============================================================ +// 六、TabPageRawConfig — 标签页声明配置(仅用 key 引用) +// ============================================================ +export interface TabPageRawConfig { + name: string + label: string + scanBoxCacheKey: string + /** ScanBox 需要的字段 key 列表(从 FIELD_DICT 中查找) */ + scanBoxFieldKeys: string[] + /** ScanBox 字段渲染覆盖(key → 覆写 label/type/options) */ + scanBoxOverrides?: Record + /** 表格需要的列 key 列表(从 FIELD_DICT 中查找) */ + tableColumnKeys: string[] + upperTableDefaults: { + title: string + enableColumnConfig?: boolean + showIndex?: boolean + showSelection?: boolean + emptyText?: string + } + /** 明细面板标签页配置 */ + detailTabs?: { name: string; label: string; componentKey: string }[] + /** 明细面板分区配置(字段 key 列表,resolveTabConfig 展开) */ + detailSections: { + title: string + columnCount: number + fieldKeys: string[] + }[] + /** 接口配置(有 api 时启用真实接口) */ + api?: TabPageApiConfig + /** 操作列按钮配置(需 tableColumnKeys 包含 'operation') */ + operationButtons?: OperationButtonConfig[] +} + +// ============================================================ +// 七、TabPageConfig — 展开后的完整配置(给 index.vue 使用) +// ============================================================ +export interface TabPageConfig { + name: string + label: string + scanBoxCacheKey: string + scanBoxFields: Record[] + upperTable: { + title: string + enableColumnConfig: boolean + showIndex: boolean + showSelection: boolean + emptyText: string + columns: Record[] + } + columnSlots: Record + detailConfig: DetailSectionConfig[] + detailTabs: DetailTabConfig[] + api?: TabPageApiConfig + operationButtons?: OperationButtonConfig[] +} + +// ============================================================ +// 八、resolveTabConfig — 加载时将 RawConfig 展开为完整配置 +// ============================================================ +export function resolveTabConfig(raw: TabPageRawConfig): TabPageConfig { + // 展开 ScanBox 字段(支持按标签页覆盖 label/type/options) + const scanBoxFields: Record[] = [] + for (const key of raw.scanBoxFieldKeys) { + const def = FIELD_DICT[key] + if (!def || !def.scanBox) continue + const override = raw.scanBoxOverrides?.[key] + const options = override?.options ?? def.scanBox.options + scanBoxFields.push({ + label: override?.label ?? def.label, + value: def.key, + type: override?.type ?? def.scanBox.type, + options: options ? [...options] : undefined, + group: def.scanBox.group, + required: (def.scanBox as any).required + }) + } + + // 展开表格列 + const columns: Record[] = [] + for (const key of raw.tableColumnKeys) { + const def = FIELD_DICT[key] + if (!def || !def.table) continue + columns.push({ + prop: def.key, + label: def.label, + ...def.table + }) + } + + // 展开列插槽 + const columnSlots: Record = {} + for (const key of raw.tableColumnKeys) { + const def = FIELD_DICT[key] + if (!def || !def.slot) continue + columnSlots[def.key] = { ...def.slot } + } + + // 展开明细面板配置 + const detailConfig: DetailSectionConfig[] = raw.detailSections.map((sec) => ({ + title: sec.title, + columnCount: sec.columnCount, + fields: sec.fieldKeys + .map((key): DetailFieldConfig | null => { + const def = FIELD_DICT[key] + if (!def) return null + return { + key: def.key, + label: def.detailLabel ?? def.label, + translateField: def.slot?.translateField, + tagResolver: def.slot?.tagResolver, + tagType: def.slot?.tagType, + renderType: def.slot?.type === 'tag' ? 'tag' : 'text' + } + }) + .filter((f): f is DetailFieldConfig => f !== null) + })) + + // 展开明细标签页(解析 componentKey → Component) + const detailTabs: DetailTabConfig[] = raw.detailTabs + ? raw.detailTabs.map((tab) => ({ + name: tab.name, + label: tab.label, + componentKey: tab.componentKey, + component: COMPONENT_REGISTRY[tab.componentKey] + })) + : [{ name: 'detail', label: '明细', componentKey: 'DetailPanel', component: COMPONENT_REGISTRY['DetailPanel'] }] + + return { + name: raw.name, + label: raw.label, + scanBoxCacheKey: raw.scanBoxCacheKey, + scanBoxFields, + upperTable: { + title: raw.upperTableDefaults.title, + enableColumnConfig: raw.upperTableDefaults.enableColumnConfig ?? true, + showIndex: raw.upperTableDefaults.showIndex ?? true, + showSelection: raw.upperTableDefaults.showSelection ?? true, + emptyText: raw.upperTableDefaults.emptyText ?? '暂无数据', + columns + }, + columnSlots, + detailConfig, + detailTabs, + api: raw.api, + operationButtons: raw.operationButtons + } +} + +// ============================================================ +// 九、buildWhereConditions — 将 ScanBox 条件转为 API where 参数 +// ============================================================ +export function buildWhereConditions(rawConditions: Record): Record { + const where: Record = {} + for (const [key, cond] of Object.entries(rawConditions || {})) { + let value: any = undefined + if (cond && typeof cond === 'object' && 'operator' in cond) { + value = (cond as any).value + } else if (cond !== undefined && cond !== null && cond !== '') { + value = Array.isArray(cond) ? cond[0] ?? '' : cond + } + if (value === undefined || value === null || value === '' || (Array.isArray(value) && value.length === 0)) { + continue + } + const def = FIELD_DICT[key] + if (def?.filterParamMap) { + const mapped = def.filterParamMap[String(value)] + if (mapped !== undefined) { + where[key] = mapped + continue + } + } + where[key] = value + } + return where +} + +// ============================================================ +// 九-A、接口响应 / 排序 / 售后类型下拉 辅助 +// ============================================================ + +/** 统一判断接口响应是否成功(项目约定:code 1/200/20000 或 flag=success) */ +export function isApiSuccess(res: any): boolean { + if (!res) return false + return ( + res.flag === 'success' || + res.code === 1 || + res.code === 200 || + res.code === 20000 + ) +} + +/** el-table 排序方向 → 接口 sortOrder */ +export function toApiSortOrder(order?: string): 'ASC' | 'DESC' { + return order === 'ascending' ? 'ASC' : 'DESC' +} + +/** + * 售后类型下拉选项缓存 + * 由 index.vue 调用 afterSale.typeList 后写入,供子类型页签的「所属类型」筛选与表单下拉复用 + */ +export const afterSaleTypeOptionState: { + options: { label: string; value: string }[] + nameMap: Record +} = { + options: [], + nameMap: {} +} + +/** 写入售后类型下拉选项缓存 */ +export function setAfterSaleTypeOptions(list: any[]): void { + const options: { label: string; value: string }[] = [] + const nameMap: Record = {} + for (const item of list || []) { + const code = String(item?.type ?? '') + if (!code) continue + const name = String(item?.name ?? code) + options.push({ label: `${name}(${code})`, value: code }) + nameMap[code] = name + } + afterSaleTypeOptionState.options = options + afterSaleTypeOptionState.nameMap = nameMap +} + +/** 按类型编码取类型名称(typeList 未加载时回退编码本身) */ +export function resolveTypeName(type?: string | null): string { + if (!type) return '—' + return afterSaleTypeOptionState.nameMap[String(type)] ?? String(type) +} + +/** 子类型行补全虚拟字段 type_name(依赖 afterSale.typeList 缓存) */ +export function enrichSubTypeRows(list: any[]): any[] { + return (list || []).map((item) => ({ + ...item, + type_name: resolveTypeName(item?.type) + })) +} + +// ============================================================ +// 十、工具栏按钮系统 +// ============================================================ +// 按钮分为三类: +// common — 公共按钮(刷新、导出) +// function — 功能按钮(打开表单/确认窗口) +// basic — 基础操作(字段设置、隐藏详情) + +export interface ToolbarButtonConfig { + key: string + label: string + category: 'common' | 'function' | 'basic' + size?: '' | 'default' | 'small' | 'large' + type?: '' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + plain?: boolean + loadingKey?: string + disabledKey?: string + action: string + dynamicLabelKey?: string + onlyForTabs?: string[] + buttonType?: 'default' | 'dropdown' + dropdownOptions?: Array<{ label: string; action: string; divided?: boolean }> + formKey?: string +} + +export const TOOLBAR_BUTTONS: Record = { + // ===== 公共按钮 ===== + refresh: { + key: 'refresh', + label: '刷新', + category: 'common', + type: 'primary', + size: 'small', + loadingKey: 'loading', + action: 'loadData' + }, + // ===== 功能按钮 ===== + createType: { + key: 'createType', + label: '新增类型', + category: 'function', + type: 'primary', + size: 'small', + action: 'createType', + onlyForTabs: ['type'] + }, + createSubType: { + key: 'createSubType', + label: '新增子类型', + category: 'function', + type: 'primary', + size: 'small', + action: 'createSubType', + onlyForTabs: ['subType'] + }, + // ===== 基础操作 ===== + columnConfig: { + key: 'columnConfig', + label: '字段设置', + category: 'basic', + size: 'small', + action: 'openColumnConfigPanel' + }, + toggleDetail: { + key: 'toggleDetail', + label: '显示详情', + category: 'basic', + dynamicLabelKey: 'detailToggleLabel', + size: 'small', + action: 'toggleDetailVisible' + } +} + +/** 按标签页名称获取工具栏按钮列表(自动根据 PAGE_CONFIG 过滤) */ +export function getTabToolbarButtons(tabName: string): ToolbarButtonConfig[] { + return Object.values(TOOLBAR_BUTTONS).filter((btn) => { + if (btn.onlyForTabs && !btn.onlyForTabs.includes(tabName)) return false + // 详情面板禁用时,隐藏「显示/隐藏详情」按钮 + if (!PAGE_CONFIG.enableDetailPanel && btn.key === 'toggleDetail') return false + return true + }) +} + +// ============================================================ +// 十一、批量操作配置(可选,接入 BatchOperationForm 时使用) +// ============================================================ +export interface BatchOperationConfig { + action: string + title: string + confirmText: string + confirmType?: 'warning' | 'error' | 'info' | 'success' + confirmButtonText: string + successText: string + failText: string + apiMethod: (...args: any[]) => Promise + payloadKey?: string + idField?: string | string[] + payloadBuilder?: (rows: Record[]) => Record + useProgress?: boolean + progressApiMethod?: (...args: any[]) => Promise +} + +/** ★ 在此配置批量操作 */ +export const BATCH_OPERATION_CONFIGS: Record = { + // batchExample: { + // action: 'batchExample', + // title: '批量操作示例', + // confirmText: '确定对选中的 {count} 项执行操作吗?', + // confirmType: 'warning', + // confirmButtonText: '确认操作', + // successText: '批量操作成功', + // failText: '批量操作失败', + // apiMethod: yourBatchApi, + // payloadKey: 'ids', + // idField: 'id' + // } +} + +// ============================================================ +// 十二、标签页注册表 — 在此定义你的页面标签页 +// ============================================================ +export const tabPages: TabPageRawConfig[] = [ + // ===== 售后类型(afterSale.typeList / typeCreate / typeUpdate / typeDelete) ===== + { + name: 'type', + label: '售后类型', + scanBoxCacheKey: 'afterSale-typelist-type', + scanBoxFieldKeys: ['type', 'name', 'is_system', 'is_enabled', 'sort_order', 'created_at'], + tableColumnKeys: ['type', 'name', 'is_system', 'is_enabled', 'sort_order', 'created_at', 'updated_at', 'operation'], + upperTableDefaults: { + title: '售后类型', + showIndex: true, + showSelection: false, + emptyText: '暂无售后类型,可点击「新增类型」创建仓库自定义类型' + }, + detailTabs: [ + { name: 'detail', label: '明细', componentKey: 'DetailPanel' } + ], + detailSections: [ + { + title: '基础信息', + columnCount: 3, + fieldKeys: ['type', 'name', 'is_system', 'is_enabled', 'sort_order'] + }, + { + title: '时间信息', + columnCount: 2, + fieldKeys: ['created_at', 'updated_at'] + } + ], + api: { + list: afterSaleTypeList, + detail: { source: 'list' }, + parseListResponse(res) { + const data = res?.data ?? res ?? {} + const list = Array.isArray(data.list) ? data.list : [] + return { list, total: Number(data.pagination?.total ?? list.length) } + }, + buildListParams({ pagination, conditions, sort }) { + const where = buildWhereConditions(conditions) + return { + pagination: { page: pagination.page, pageSize: pagination.pageSize }, + ...(Object.keys(where).length ? { where } : {}), + ...(sort?.prop && sort?.order + ? { sort: { sortField: sort.prop, sortOrder: toApiSortOrder(sort.order) } } + : {}) + } + } + }, + operationButtons: [ + { + key: 'edit', + label: '编辑', + actionType: 'action', + type: 'primary' + }, + { + key: 'delete', + label: '删除', + actionType: 'action', + type: 'danger', + confirmTitle: '提示', + confirmMessage: '确认删除该售后类型吗?删除后不可恢复;系统级类型不可删除,且该类型下存在自定义子类型时会删除失败', + confirmType: 'warning', + confirmButtonText: '确认删除' + } + ] + }, + + // ===== 售后子类型(afterSale.subTypeList / subTypeCreate / subTypeUpdate / subTypeDelete) ===== + { + name: 'subType', + label: '售后子类型', + scanBoxCacheKey: 'afterSale-typelist-subtype', + scanBoxFieldKeys: ['type', 'sub_type', 'name', 'is_system', 'is_enabled', 'sort_order', 'created_at'], + // 子类型页签的「所属类型」改为下拉(选项由 afterSale.typeList 动态注入) + scanBoxOverrides: { + type: { + label: '所属类型', + type: 'select', + options: [] + } + }, + tableColumnKeys: ['type_name', 'sub_type', 'name', 'is_system', 'is_enabled', 'sort_order', 'created_at', 'updated_at', 'operation'], + upperTableDefaults: { + title: '售后子类型', + showIndex: true, + showSelection: false, + emptyText: '暂无售后子类型,可点击「新增子类型」创建仓库自定义子类型' + }, + detailTabs: [ + { name: 'detail', label: '明细', componentKey: 'DetailPanel' } + ], + detailSections: [ + { + title: '基础信息', + columnCount: 3, + fieldKeys: ['type_name', 'sub_type', 'name', 'is_system', 'is_enabled', 'sort_order'] + }, + { + title: '时间信息', + columnCount: 2, + fieldKeys: ['created_at', 'updated_at'] + } + ], + api: { + list: afterSaleSubTypeList, + detail: { source: 'list' }, + parseListResponse(res) { + const data = res?.data ?? res ?? {} + const list = Array.isArray(data.list) ? data.list : [] + return { list: enrichSubTypeRows(list), total: Number(data.pagination?.total ?? list.length) } + }, + buildListParams({ pagination, conditions, sort }) { + const where = buildWhereConditions(conditions) + return { + pagination: { page: pagination.page, pageSize: pagination.pageSize }, + ...(Object.keys(where).length ? { where } : {}), + ...(sort?.prop && sort?.order + ? { sort: { sortField: sort.prop, sortOrder: toApiSortOrder(sort.order) } } + : {}) + } + } + }, + operationButtons: [ + { + key: 'edit', + label: '编辑', + actionType: 'action', + type: 'primary' + }, + { + key: 'delete', + label: '删除', + actionType: 'action', + type: 'danger', + confirmTitle: '提示', + confirmMessage: '确认删除该售后子类型吗?删除后不可恢复;系统级子类型不可删除,且已被售后单引用时会删除失败', + confirmType: 'warning', + confirmButtonText: '确认删除' + } + ] + } +] + +// ============================================================ +// 十三、向后兼容导出 +// ============================================================ +export const templateTabs = tabPages.map((t) => ({ name: t.name, label: t.label, scanBoxCacheKey: t.scanBoxCacheKey })) + diff --git a/src/views/afterSale/typelist/index.vue b/src/views/afterSale/typelist/index.vue new file mode 100644 index 00000000..d6b05095 --- /dev/null +++ b/src/views/afterSale/typelist/index.vue @@ -0,0 +1,801 @@ + + + + + + diff --git a/src/views/afterSale/typelist/pages/ExampleFormDialog.vue b/src/views/afterSale/typelist/pages/ExampleFormDialog.vue new file mode 100644 index 00000000..945481b8 --- /dev/null +++ b/src/views/afterSale/typelist/pages/ExampleFormDialog.vue @@ -0,0 +1,107 @@ + + + + + + diff --git a/src/views/afterSale/typelist/pages/TypeFormDialog.vue b/src/views/afterSale/typelist/pages/TypeFormDialog.vue new file mode 100644 index 00000000..35acab70 --- /dev/null +++ b/src/views/afterSale/typelist/pages/TypeFormDialog.vue @@ -0,0 +1,304 @@ + + + + + + diff --git a/src/views/data/packingflow/index.vue b/src/views/data/packingflow/index.vue index 8b8e4068..18bab860 100644 --- a/src/views/data/packingflow/index.vue +++ b/src/views/data/packingflow/index.vue @@ -124,67 +124,113 @@
-
- - {{ detail.id ?? '—' }} - {{ detail.order_id ?? '—' }} - {{ detail.wave_no || '—' }} - {{ detail.wave_id || '—' }} - {{ detail.warehouse_id ?? '—' }} - {{ detail.workbench_id ?? '—' }} - {{ detail.workbench_name || '—' }} - {{ detail.workbench_type || '—' }} - {{ detail.workbench_barcode || '—' }} - {{ detail.pack_quantity ?? '—' }} - {{ detail.item_quantity ?? '—' }} - {{ detail.sku_count ?? '—' }} - {{ detail.operator_text || '—' }} - - - {{ packModeLabel(detail.pack_mode) }} - - - - - {{ statusLabel(detail.status) }} - - - {{ (detail.device_ids || []).join(',') || '—' }} - - - {{ hasVideoConfig[resolveHasVideoVal(detail)]?.text || '—' }} - - - - - {{ videoEnableConfig[resolveVideoEnableVal(detail)]?.text || '—' }} - - - {{ detail.remark || '—' }} - - - — - - - - — - - {{ detail.start_time || '—' }} - {{ detail.end_time || '—' }} - {{ detail.create_time || '—' }} - {{ detail.update_time || '—' }} - +
+ +
+
任务信息
+ + {{ detail.id ?? '—' }} + {{ detail.order_id ?? '—' }} + {{ detail.wave_no || '—' }} + {{ detail.wave_id || '—' }} + {{ detail.warehouse_id ?? '—' }} + + + {{ statusLabel(detail.status) }} + + + + + {{ packModeLabel(detail.pack_mode) }} + + + {{ detail.operator_text || '—' }} + +
+ + +
+
工作台信息
+ + {{ detail.workbench_id ?? '—' }} + {{ detail.workbench_name || '—' }} + {{ detail.workbench_type || '—' }} + {{ detail.workbench_barcode || '—' }} + +
+ + +
+
打包统计
+ + {{ detail.pack_quantity ?? '—' }} + {{ detail.item_quantity ?? '—' }} + {{ detail.sku_count ?? '—' }} + +
+ + +
+
录像信息
+ + + + {{ hasVideoConfig[resolveHasVideoVal(detail)]?.text || '—' }} + + + + + {{ videoEnableConfig[resolveVideoEnableVal(detail)]?.text || '—' }} + + + {{ (detail.device_ids || []).join(',') || '—' }} + +
+ + +
+
运单信息
+ + + + — + + + + — + + +
+ + +
+
时间信息
+ + {{ detail.start_time || '—' }} + {{ detail.end_time || '—' }} + {{ detail.create_time || '—' }} + {{ detail.update_time || '—' }} + +
+ + +
+
备注
+ + {{ detail.remark || '—' }} + +