From 487a7a64f7b8b54700374c520fd9f73b8e6627a0 Mon Sep 17 00:00:00 2001 From: yin <3313488199@qq.com> Date: Mon, 4 May 2026 18:21:28 +0800 Subject: [PATCH] =?UTF-8?q?5=E6=9C=884=E6=97=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/order.index/orderindex.ts | 37 + .../order.pendingOrder/orderpendingOrder.ts | 25 +- src/api/pick/pick.ts | 28 + src/api/setting.warehouse/settingwarehouse.ts | 57 + src/api/storage_receiving/receiving.ts | 10 +- src/api/store/store.ts | 24 +- src/api/warehouse/warehouse.ts | 14 - src/components/ScanBox/index.vue | 34 + src/router/map.ts | 12 +- .../order/orderManagement/component/log.vue | 164 ++- .../config/order-common-config.ts | 48 +- .../order/orderManagement/exceptionOrder.vue | 27 +- .../waveOrder/WaveBatchListPanel.vue} | 440 ++++--- .../component/PendingOrderListPanel.vue | 4 +- .../order/waveOrder/config/wave-config.ts | 170 +++ src/views/order/waveOrder/groupWave.vue | 7 + src/views/order/waveOrder/index.vue | 195 +++ src/views/order/waveOrder/sandanWave.vue | 7 + workflows/api-doc-agent/config/响应.md | 83 +- workflows/api-doc-agent/config/接口.md | 35 +- workflows/api-doc-system/apidata/config.json | 29 +- workflows/api-doc-system/apidata/data.json | 168 +-- .../interface-details/interface-details.json | 1124 ++++++++++++++--- .../data/module-list/module-list.json | 154 ++- .../data/module/config/_module.lifecycle.json | 2 +- .../data/module/config/module.json | 4 +- .../module/dashboard/_module.lifecycle.json | 2 +- .../data/module/dashboard/module.json | 4 +- .../data/module/index/_module.lifecycle.json | 2 +- .../data/module/index/module.json | 65 +- .../order.archiveorder/_module.lifecycle.json | 2 +- .../module/order.archiveorder/module.json | 4 +- .../_module.lifecycle.json | 2 +- .../order.deliveryexpectionorder/module.json | 4 +- .../_module.lifecycle.json | 2 +- .../module/order.deliveryorder/module.json | 4 +- .../order.entrustorder/_module.lifecycle.json | 2 +- .../module/order.entrustorder/module.json | 4 +- .../_module.lifecycle.json | 2 +- .../module/order.expectionorder/module.json | 4 +- .../module/order.index/_module.lifecycle.json | 2 +- .../data/module/order.index/module.json | 42 +- .../_module.lifecycle.json | 2 +- .../module/order.outboundorder/module.json | 4 +- .../order.pendingorder/_module.lifecycle.json | 2 +- .../module/order.pendingorder/module.json | 92 +- .../order.revieworder/_module.lifecycle.json | 2 +- .../data/module/order.revieworder/module.json | 4 +- .../module/order.wave/_module.lifecycle.json | 12 + .../data/module/order.wave/module.json | 563 +++++++++ .../data/module/pick/_module.lifecycle.json | 12 + .../data/module/pick/module.json | 109 ++ .../data/module/print/_module.lifecycle.json | 2 +- .../data/module/print/module.json | 4 +- .../printer.station/_module.lifecycle.json | 2 +- .../data/module/printer.station/module.json | 4 +- .../setting.account/_module.lifecycle.json | 2 +- .../data/module/setting.account/module.json | 4 +- .../setting.express/_module.lifecycle.json | 2 +- .../data/module/setting.express/module.json | 4 +- .../_module.lifecycle.json | 2 +- .../setting.expressinterface/module.json | 4 +- .../setting.permission/_module.lifecycle.json | 2 +- .../module/setting.permission/module.json | 4 +- .../setting.platform/_module.lifecycle.json | 2 +- .../data/module/setting.platform/module.json | 4 +- .../_module.lifecycle.json | 2 +- .../module/setting.printtemplate/module.json | 4 +- .../setting.role/_module.lifecycle.json | 2 +- .../data/module/setting.role/module.json | 4 +- .../setting.warehouse/_module.lifecycle.json | 12 + .../data/module/setting.warehouse/module.json | 159 +++ .../data/module/stock/_module.lifecycle.json | 2 +- .../data/module/stock/module.json | 106 +- .../storage.entry/_module.lifecycle.json | 2 +- .../data/module/storage.entry/module.json | 4 +- .../storage.inventory/_module.lifecycle.json | 2 +- .../data/module/storage.inventory/module.json | 4 +- .../storage.stockout/_module.lifecycle.json | 2 +- .../data/module/storage.stockout/module.json | 4 +- .../storage_receiving/_module.lifecycle.json | 2 +- .../data/module/storage_receiving/module.json | 26 +- .../data/module/store/_module.lifecycle.json | 2 +- .../data/module/store/module.json | 36 +- .../_module.lifecycle.json | 2 +- .../module/storewarehouse.store/module.json | 4 +- .../data/module/user/_module.lifecycle.json | 2 +- .../data/module/user/module.json | 4 +- .../module/warehouse/_module.lifecycle.json | 2 +- .../data/module/warehouse/module.json | 4 +- 90 files changed, 3273 insertions(+), 1013 deletions(-) create mode 100644 src/api/pick/pick.ts create mode 100644 src/api/setting.warehouse/settingwarehouse.ts rename src/views/{wave/index.vue => order/waveOrder/WaveBatchListPanel.vue} (82%) rename src/views/{wave => order/waveOrder}/component/PendingOrderListPanel.vue (99%) create mode 100644 src/views/order/waveOrder/config/wave-config.ts create mode 100644 src/views/order/waveOrder/groupWave.vue create mode 100644 src/views/order/waveOrder/index.vue create mode 100644 src/views/order/waveOrder/sandanWave.vue create mode 100644 workflows/api-doc-system/data/module/order.wave/_module.lifecycle.json create mode 100644 workflows/api-doc-system/data/module/order.wave/module.json create mode 100644 workflows/api-doc-system/data/module/pick/_module.lifecycle.json create mode 100644 workflows/api-doc-system/data/module/pick/module.json create mode 100644 workflows/api-doc-system/data/module/setting.warehouse/_module.lifecycle.json create mode 100644 workflows/api-doc-system/data/module/setting.warehouse/module.json diff --git a/src/api/order.index/orderindex.ts b/src/api/order.index/orderindex.ts index 3eb66ef1..b493d36c 100644 --- a/src/api/order.index/orderindex.ts +++ b/src/api/order.index/orderindex.ts @@ -33,6 +33,27 @@ export type QueryOrderLogsParams = { pageSize?: number } +/** order.queryOrderLogList 请求(id / order_id / orderId 择一即可) */ +export type QueryOrderLogListParams = { + id?: string | number + order_id?: string | number + orderId?: string | number +} + +/** order.queryOrderLogList 单条日志 */ +export type OrderLogListItem = { + id: number + operation_code: string + operation_name?: string | null + operator_name?: string | null + created_at: string + external_log_type?: string | null + external_log_id?: number | string | null + platform_code?: string | null + platform_name?: string | null + message?: string | null +} + export function orderList(data: OrderListParams = {}): Promise { return request({ url: '/system', @@ -89,6 +110,21 @@ export function orderQueryOrderLogs(data: QueryOrderLogsParams): Promise { } as any) } +/** 订单操作日志(order.queryOrderLogList),响应多为顶层 list / total / code / flag */ +export function orderQueryOrderLogList(data: QueryOrderLogListParams): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.queryOrderLogList', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + /** 订单明细行(历史接口 order.detail,未纳入远端 module 清单) */ export function orderDetail(data: Record = {}): Promise { return request({ @@ -109,5 +145,6 @@ export const order = { manualOutboundOrder: orderManualOutboundOrder, badgeCount: orderBadgeCount, queryOrderLogs: orderQueryOrderLogs, + queryOrderLogList: orderQueryOrderLogList, detail: orderDetail } diff --git a/src/api/order.pendingOrder/orderpendingOrder.ts b/src/api/order.pendingOrder/orderpendingOrder.ts index 8d016581..59f6316d 100644 --- a/src/api/order.pendingOrder/orderpendingOrder.ts +++ b/src/api/order.pendingOrder/orderpendingOrder.ts @@ -110,23 +110,26 @@ export type PendingOrderAllocateStorageParams = { id?: number | string; }; +/** allocateStorage 异步受理响应(与文档一致) */ +export type PendingOrderAllocateStorageResponse = { + request_id: string; + warehouse_id: number; + message: string; +}; + export type PendingOrderAllocateStorageProgressParams = { request_id?: string; requestId?: string; }; export type PendingOrderAllocateStorageProgressResponse = { - request_id?: string; - status?: string; - progress_percent?: number; - total_count?: number; - success_count?: number; - failed_count?: number; - updated_count?: number; + request_id: string; + status: "submitted" | "running" | "success" | "failed" | "not_found"; + result?: Record; error?: string; - message?: string; + warehouse_id?: number; update_time?: string; - result?: Record; + message?: string; }; export type PendingOrderSyncOrderIdsParams = { @@ -230,7 +233,7 @@ export function orderPendingOrderAllocateExpressCode( export function orderPendingOrderAllocateStorage( data: PendingOrderAllocateStorageParams, -): Promise { +): Promise { return request({ url: "/system", method: "post", @@ -262,7 +265,7 @@ export function orderPendingOrderCancelAllocateStorage( export function orderPendingOrderAllocateStorageProgress( data: PendingOrderAllocateStorageProgressParams, -): Promise { +): Promise { return request({ url: "/system", method: "post", diff --git a/src/api/pick/pick.ts b/src/api/pick/pick.ts new file mode 100644 index 00000000..fd8fa32c --- /dev/null +++ b/src/api/pick/pick.ts @@ -0,0 +1,28 @@ +import request from '@/utils/request' + +const v = '1.0' + +/** pick.query 请求参数(与 module pick 一致) */ +export type PickQueryParams = { + waybill_code: string + full_display?: boolean +} + +/** 按运单号查询波次拣货信息(pick.query) */ +export function pickQuery(data: PickQueryParams): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'pick.query', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +export const pick = { + query: pickQuery +} diff --git a/src/api/setting.warehouse/settingwarehouse.ts b/src/api/setting.warehouse/settingwarehouse.ts new file mode 100644 index 00000000..3973dbf8 --- /dev/null +++ b/src/api/setting.warehouse/settingwarehouse.ts @@ -0,0 +1,57 @@ +import request from '@/utils/request' + +const v = '1.0' + +export type SettingWarehouseSaveSettingsParams = { + subject_config: Record + cache_warehouse_id?: number + cacheWarehouseId?: number +} + +export function settingWarehouseGetSettings(data: Record = {}): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'setting.warehouse.getSettings', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +export function settingWarehouseGetFieldMeta(): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'setting.warehouse.getFieldMeta', + v, + timestamp: new Date().getTime() + }, + data: {}, + isSystemApi: true + } as any) +} + +export function settingWarehouseSaveSettings(data: SettingWarehouseSaveSettingsParams): Promise { + return request({ + url: '/system', + method: 'post', + params: { + method: 'setting.warehouse.saveSettings', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +export const settingWarehouse = { + getSettings: settingWarehouseGetSettings, + getFieldMeta: settingWarehouseGetFieldMeta, + saveSettings: settingWarehouseSaveSettings +} diff --git a/src/api/storage_receiving/receiving.ts b/src/api/storage_receiving/receiving.ts index 9aa5ddbd..046acfb6 100644 --- a/src/api/storage_receiving/receiving.ts +++ b/src/api/storage_receiving/receiving.ts @@ -1,6 +1,14 @@ import request from '@/utils/request' const v = "1.0" +export type QueryReceivingLogsParams = { + id?: number | string + receiving_id?: number | string + page?: number + pageSize?: number + pagination?: { page?: number; pageSize?: number } +} + export function getReceivingList(data: any): Promise { return request({ url: '/system', @@ -28,7 +36,7 @@ export function getReceivingDetail(data: any): Promise { }) } -export function queryReceivingLogs(data: any): Promise { +export function queryReceivingLogs(data: QueryReceivingLogsParams = {}): Promise { return request({ url: '/system', method: 'post', diff --git a/src/api/store/store.ts b/src/api/store/store.ts index b63f6061..b1967884 100644 --- a/src/api/store/store.ts +++ b/src/api/store/store.ts @@ -1,6 +1,24 @@ import request from '@/utils/request' -const v = "1.0"; -export function createStore(data:any) { +const v = "1.0" + +/** 与文档 subject_config 子字段对齐(可整体传 subject_config 对象) */ +export type StoreSubjectConfigInput = { + max_notice_webhook_count?: number + default_express_code?: string + default_platform_code?: string + group_wave_prefix?: string + min_group_order_fetch_quantity?: number +} + +export type StoreCreateStoreParams = { + subject_config?: StoreSubjectConfigInput +} + +export type StoreCreateWarehouseParams = { + subject_config?: StoreSubjectConfigInput +} + +export function createStore(data: StoreCreateStoreParams & Record = {}) { return request({ url: '/system', method: 'post', @@ -14,7 +32,7 @@ export function createStore(data:any) { } as any) } -export function createWarehouse(data:any) { +export function createWarehouse(data: StoreCreateWarehouseParams & Record = {}) { return request({ url: '/system', method: 'post', diff --git a/src/api/warehouse/warehouse.ts b/src/api/warehouse/warehouse.ts index 39f31f8b..806dbd57 100644 --- a/src/api/warehouse/warehouse.ts +++ b/src/api/warehouse/warehouse.ts @@ -16,20 +16,6 @@ export function getWarehouseZones(data:any) { } as any) } -export function getSettings(data:any = {}) { - return request({ - url: '/system', - method: 'post', - params: { - method: 'setting.warehouse.getSettings', - v: '1.0', - timestamp: new Date().getTime() - }, - data, - isSystemApi: true - } as any) -} - export function getWarehouseTree(warehouseId:any) { return request({ url: '/system', diff --git a/src/components/ScanBox/index.vue b/src/components/ScanBox/index.vue index aeaa48e8..379b25ec 100644 --- a/src/components/ScanBox/index.vue +++ b/src/components/ScanBox/index.vue @@ -709,6 +709,23 @@ function handleCustomChange() { } } +/** select 选项可带 operator、conditionValue(用于波次分配等同一字段不同操作符) */ +function buildMappedSelectCondition(field: any, condition: any): { value: any; operator: string; type: string } | null { + if (field.type !== 'select' || !Array.isArray(field.options)) return null + const raw = condition.value + if (raw === undefined || raw === null || raw === '') return null + const selected = field.options.find((o: any) => o.value === raw) + if (!selected || typeof selected.operator !== 'string' || !selected.operator) return null + const apiValue = Object.prototype.hasOwnProperty.call(selected, 'conditionValue') + ? selected.conditionValue + : selected.value + return { + value: apiValue, + operator: selected.operator, + type: field.conditionType || 'text' + } +} + function buildAndEmitCustomCondition() { const conditions: any = {} let hasCondition = false @@ -745,6 +762,17 @@ function buildAndEmitCustomCondition() { return } + const mappedSelectEmit = buildMappedSelectCondition(field, condition) + if (mappedSelectEmit) { + conditions[field.value] = { + ...mappedSelectEmit, + field: field.value, + isMultiple: false + } + hasCondition = true + return + } + let conditionValue = condition.value // 处理多值操作符:contains / in / notin 逗号分隔 -> 数组 @@ -906,6 +934,12 @@ function buildConditionsObject() { return } + const mappedSelectObj = buildMappedSelectCondition(field, condition) + if (mappedSelectObj) { + conditions[field.value] = mappedSelectObj + return + } + let conditionValue = condition.value if (['contains', 'in', 'notin'].includes(op) && typeof conditionValue === 'string' && conditionValue) { diff --git a/src/router/map.ts b/src/router/map.ts index 95da0373..6c1b3ee0 100644 --- a/src/router/map.ts +++ b/src/router/map.ts @@ -3,12 +3,12 @@ export const componentMap: Record = { 'login/index': () => import('@/views/login/index.vue'), 'system/setting/permission/index': () => import('@/views/system/setting/permission/index.vue'), 'system/setting/index': () => import('@/views/system/setting/index.vue'), - 'system/setting/index': () => import('@/views/system/setting/index.vue'), + // 'system/setting/index': () => import('@/views/system/setting/index.vue'), 'order/index': () => import('@/views/order/orderManagement/index.vue'), /** 与后端菜单 component 字段兼容:部分环境为 order/setting */ 'order/setting': () => import('@/views/order/orderManagement/index.vue'), /** 与后端菜单 component 字段兼容:部分环境为 order/setting */ - 'order/setting': () => import('@/views/order/orderManagement/index.vue'), + // 'order/setting': () => import('@/views/order/orderManagement/index.vue'), 'auth/approve': () => import('@/views/auth/approve.vue'), 'account/index': () => import('@/views/system/setting/account/index.vue'), // 'permission/index': () => import('@/views/system/setting/permission/index.vue'), @@ -21,11 +21,13 @@ export const componentMap: Record = { 'storage/inventory': () => import('@/views/storage/inventory/index.vue'), 'storage/stockout': () => import('@/views/storage/stockout/index.vue'), 'store/index': () => import('@/views/store/index.vue'), - 'wave/index': () => import('@/views/wave/index.vue'), - 'role/index': () => import('@/views/system/setting/role/index.vue'), - 'system/setting/role/index': () => import('@/views/system/setting/role/index.vue'), + 'wave/index': () => import('@/views/order/waveOrder/index.vue'), + /** 与后端菜单 component 字段兼容 */ + 'order/waveOrder': () => import('@/views/order/waveOrder/index.vue'), 'role/index': () => import('@/views/system/setting/role/index.vue'), 'system/setting/role/index': () => import('@/views/system/setting/role/index.vue'), + // 'role/index': () => import('@/views/system/setting/role/index.vue'), + // 'system/setting/role/index': () => import('@/views/system/setting/role/index.vue'), 'system/setting/printTemplate/index': () => import('@/views/system/setting/printTemplate/index.vue'), // 'system/setting/printStation/index': () => import('@/views/system/setting/printStation/index.vue'), 'system/print/station': () => import('@/views/system/setting/printStation/index.vue'), diff --git a/src/views/order/orderManagement/component/log.vue b/src/views/order/orderManagement/component/log.vue index a0b15486..7518711b 100644 --- a/src/views/order/orderManagement/component/log.vue +++ b/src/views/order/orderManagement/component/log.vue @@ -8,30 +8,55 @@ title="刷新" :loading="loading" class="toolbar-btn" - :disabled="!orderId || !hasLogRequest" - @click="fetchLogs" + :disabled="!orderId" + @click="handleRefresh" > 刷新 - - - - + + + + + + + + + + + + + + + + - + @@ -64,11 +90,7 @@ size="800px" class="el-drawers" > - + @@ -78,16 +100,24 @@ import { computed, reactive, ref, watch } from 'vue' import { ElMessage } from 'element-plus' import { Refresh } from '@element-plus/icons-vue' import RequestData from '@/components/RequestData/index.vue' +import { orderQueryOrderLogList } from '@/api/order.index/orderindex' const props = defineProps<{ - /** 当前选中订单行(与其它订单页一致) */ + /** 当前选中订单行(与其它订单页一致,使用 id 作为 order_id) */ data?: Record | null - /** 日志查询接口;未提供时视为当前页面暂无日志接口 */ + /** + * 自定义日志查询(兼容旧 order.queryOrderLogs 分页形态)。 + * 不传时默认调用 order.queryOrderLogList,并在前端对 list 分页展示。 + */ request?: ((params: { id: string; page?: number; pageSize?: number }) => Promise) | null }>() const loading = ref(false) -const tableData = ref([]) +/** 默认接口:全量列表,前端分页 */ +const allRows = ref([]) +/** 自定义 request:服务端当前页 */ +const serverRows = ref([]) + const showRequestData = ref(false) const requestId = ref(0) const requestType = ref('') @@ -98,22 +128,61 @@ const pagination = reactive({ total: 0 }) +const useServerPagination = computed(() => typeof props.request === 'function') + const orderId = computed(() => { const id = props.data?.id if (id === undefined || id === null || id === '') return '' return String(id) }) -const hasLogRequest = computed(() => typeof props.request === 'function') +const displayRows = computed(() => { + if (useServerPagination.value) return serverRows.value + const start = (pagination.page - 1) * pagination.pageSize + return allRows.value.slice(start, start + pagination.pageSize) +}) + +function extractLogListPayload(res: any): { list: any[]; total: number } { + if (!res) return { list: [], total: 0 } + const inner = res.data && typeof res.data === 'object' && !Array.isArray(res.data) ? res.data : res + const list = Array.isArray(inner.list) + ? inner.list + : Array.isArray(res.list) + ? res.list + : [] + const totalRaw = inner.pagination?.total ?? inner.total ?? res.total + const total = + typeof totalRaw === 'number' && !Number.isNaN(totalRaw) + ? totalRaw + : list.length + return { list, total } +} + +function formatOperationLabel(row: any): string { + const name = row?.operation_name + const code = row?.operation_code + if (name && String(name).trim() && name !== code) return String(name) + if (name && String(name).trim()) return String(name) + if (code) return String(code) + return '—' +} + +function hasExternalPayload(row: any): boolean { + const id = row?.external_log_id + if (id === undefined || id === null || id === '') return false + const n = typeof id === 'number' ? id : Number(id) + return Number.isFinite(n) && n > 0 +} watch( - () => [orderId.value, hasLogRequest.value], - ([newOrderId, canQuery]) => { - if (newOrderId && canQuery) { + () => orderId.value, + (newOrderId) => { + if (newOrderId) { pagination.page = 1 - fetchLogs() + loadLogsFromServer() } else { - tableData.value = [] + allRows.value = [] + serverRows.value = [] pagination.total = 0 } }, @@ -122,34 +191,50 @@ watch( async function handlePageChange(page: number) { pagination.page = page - await fetchLogs() + if (useServerPagination.value) await loadLogsFromServer() } async function handlePageSizeChange(pageSize: number) { pagination.pageSize = pageSize pagination.page = 1 - await fetchLogs() + if (useServerPagination.value) await loadLogsFromServer() } -async function fetchLogs() { - if (!orderId.value || !hasLogRequest.value || !props.request) return +async function handleRefresh() { + pagination.page = 1 + await loadLogsFromServer() +} + +async function loadLogsFromServer() { + if (!orderId.value) return loading.value = true try { - const response: any = await props.request({ - id: orderId.value, - page: pagination.page, - pageSize: pagination.pageSize - }) - if (!response || ![1, 200].includes(response.code)) { - throw new Error(response?.message || '请求失败') + if (useServerPagination.value && props.request) { + const response: any = await props.request({ + id: orderId.value, + page: pagination.page, + pageSize: pagination.pageSize + }) + if (!response || ![1, 200].includes(response.code)) { + throw new Error(response?.message || '请求失败') + } + const { list, total } = extractLogListPayload(response) + serverRows.value = list + pagination.total = total + } else { + // 成功态已在 request 拦截器中校验(code ∈ SUCCESS_CODES) + const response: any = await orderQueryOrderLogList({ id: orderId.value }) + const { list, total } = extractLogListPayload(response) + allRows.value = list + pagination.total = total } - const d = response.data || {} - tableData.value = d.list || [] - pagination.total = d.pagination?.total ?? d.total ?? 0 } catch (error: any) { console.error('order logs query failed:', error) ElMessage.error(error?.message || '获取订单操作日志失败') + allRows.value = [] + serverRows.value = [] + pagination.total = 0 } finally { loading.value = false } @@ -178,6 +263,11 @@ function viewData(row: any) { margin-bottom: 5px; } +.cell-muted { + color: var(--el-text-color-placeholder); + font-size: 12px; +} + .el-table { flex: 1; } diff --git a/src/views/order/orderManagement/config/order-common-config.ts b/src/views/order/orderManagement/config/order-common-config.ts index c8bc4565..1f348247 100644 --- a/src/views/order/orderManagement/config/order-common-config.ts +++ b/src/views/order/orderManagement/config/order-common-config.ts @@ -398,10 +398,23 @@ export const simpleListToolbarButtons = pickToolbarButtons(simpleListToolbarButt +/** ScanBox:波次分配 → where.wave_id 为 { operator: 'eq'|'ne', value: 0 } */ +export const waveAssignmentScanField = { + label: '波次分配', + value: 'wave_id', + type: 'select', + conditionType: 'number', + options: [ + { label: '未分配波次', value: '__wave_assign_eq_0__', operator: 'eq', conditionValue: 0 }, + { label: '已分配波次', value: '__wave_assign_ne_0__', operator: 'ne', conditionValue: 0 } + ] +} + // deliveryOrder相关配置 export const deliveryAvailableFields = [ { label: '货主', value: 'store_id', type: 'select', multiple: true, options: [] }, { label: '订单号', value: 'delivery_order_code', type: 'text' }, + waveAssignmentScanField, { label: '波次号', value: 'wave_no', type: 'text' }, { label: '店铺名称', value: 'shop_nick', type: 'text' }, { label: '来源平台', value: 'sys_platform_name', type: 'select', options: [] }, @@ -501,6 +514,7 @@ export const deliveryOrderToolbarButtons = simpleListToolbarButtons // revieworder相关配置 export const reviewAvailableFields = [ { label: '发货单号', value: 'delivery_order_code', type: 'text' }, + waveAssignmentScanField, { label: '波次号', value: 'wave_no', type: 'text' }, { label: '店铺名称', value: 'shop_nick', type: 'text' }, { label: '平台编码', value: 'sys_platform_code', type: 'select', options: [] }, @@ -634,17 +648,45 @@ export const outboundToolbarButtons = pickToolbarButtons(outboundToolbarButtonKe export const pendingAvailableFields = [ { label: '货主', value: 'store_id', type: 'select', multiple: true, options: [] }, { label: '订单号', value: 'order_code', type: 'text' }, + waveAssignmentScanField, { label: '波次号', value: 'wave_no', type: 'text' }, { label: '店铺名称', value: 'shop_nick', type: 'text' }, { label: '来源平台', value: 'sys_platform_name', type: 'select', options: [] }, { label: '物流公司', value: 'logistics_name', type: 'select', options: [] }, { label: '快递单号', value: 'waybill_codes', type: 'text' }, + { label: '订单状态', value: 'status', type: 'select', options: [ + { label: '待审核', value: 'pedding' }, + { label: '已创建', value: 'created' }, + { label: '已取消', value: 'cancel' }, + { label: '错误', value: 'error' }, + { label: '售后异常', value: 'after-sales-error' }, + { label: '已完成', value: 'finished' }, + { label: '已作废', value: 'cancelled' }, + { label: '已归档', value: 'archived' }, + ] }, + { label: '储位', value: 'storage_status', type: 'select', options: [ + { label: '未分配', value: 'none' }, + { label: '分配中', value: 'padding' }, + { label: '已完成', value: 'fin' }, + { label: '错误', value: 'error' }, + ] }, + { label: '拣货状态', value: 'pick_status', type: 'select', options: [ + { label: '未拣货', value: 'none' }, + { label: '拣货中', value: 'padding' }, + { label: '已完成', value: 'fin' }, + ] }, + { label: '打包状态', value: 'pack_status', type: 'select', options: [ + { label: '未打包', value: 'none' }, + { label: '打包中', value: 'padding' }, + { label: '已完成', value: 'fin' }, + ] }, { label: '收货人', value: 'name', type: 'text' }, { label: '手机号', value: 'mobile', type: 'text' }, { label: '省份', value: 'province', type: 'text' }, { label: '城市', value: 'city', type: 'text' }, { label: '区县', value: 'area', type: 'text' }, { label: '是否紧急', value: 'is_urgency', type: 'select', options: [ { label: '是', value: 'Y' }, { label: '否', value: 'N' } ] }, + { label: '同步状态', value: 'sync_status', type: 'select', options: [ { label: '待同步', value: 'padding' }, { label: '已同步', value: 'fin' }, { label: '错误', value: 'error' } ] }, { label: '下单时间', value: 'place_order_time', type: 'daterange' }, { label: '创建时间', value: 'create_at', type: 'daterange' }, @@ -818,6 +860,7 @@ export const workbenchStatusOptions = [ export const workbenchAvailableFields = [ { label: '订单号', value: 'delivery_order_code', type: 'text' }, + waveAssignmentScanField, { label: '波次号', value: 'wave_no', type: 'text' }, { label: '买家昵称', value: 'buyer_nick', type: 'text' }, { label: '订单状态', value: 'status', type: 'select', options: workbenchStatusOptions }, @@ -868,6 +911,7 @@ export const expectionOrderAvailableFields = [ { label: '货主', value: 'store_id', type: 'select', multiple: true, options: [] }, { label: '订单号', value: 'order_code', type: 'text' }, { label: '发货单号', value: 'delivery_order_code', type: 'text' }, + waveAssignmentScanField, { label: '波次号', value: 'wave_no', type: 'text' }, { label: '物流公司', value: 'logistics_name', type: 'select', options: [] }, { label: '快递单号', value: 'express_code', type: 'text' }, @@ -896,9 +940,6 @@ export const expectionColumns = [ { prop: 'logistics_name', label: '快递', width: '120' }, { prop: 'pre_delivery_order_code', label: '前置单号', width: '140' }, { prop: 'order_flag', label: '订单标记', minWidth: '260' }, - { prop: 'sync_status', label: '同步状态', width: '100' }, - { prop: 'status', label: '订单状态', width: '100' }, - { prop: 'is_urgency', label: '紧急', width: '80' }, { prop: 'items_total', label: '商品总数', width: '100' }, { prop: 'total_amount', label: '订单金额', width: '110' }, { prop: 'pay_time', label: '支付时间', width: '165', formatter: orderTimeFormatter }, @@ -962,6 +1003,7 @@ export const archiveAvailableFields = [ { label: '货主', value: 'store_id', type: 'select', multiple: true, options: [] }, { label: '订单号', value: 'order_code', type: 'text' }, { label: '发货单号', value: 'delivery_order_code', type: 'text' }, + waveAssignmentScanField, { label: '波次号', value: 'wave_no', type: 'text' }, { label: '店铺名称', value: 'shop_nick', type: 'text' }, { label: '收货人', value: 'name', type: 'text' }, diff --git a/src/views/order/orderManagement/exceptionOrder.vue b/src/views/order/orderManagement/exceptionOrder.vue index a1ff3265..bb49441f 100644 --- a/src/views/order/orderManagement/exceptionOrder.vue +++ b/src/views/order/orderManagement/exceptionOrder.vue @@ -111,6 +111,30 @@ + + + + + + + +