diff --git a/src/api/order.wave/orderwave.ts b/src/api/order.wave/orderwave.ts index 9f0b6321..4b35e7f4 100644 --- a/src/api/order.wave/orderwave.ts +++ b/src/api/order.wave/orderwave.ts @@ -24,6 +24,50 @@ export type WaveBatchListResponse = { pagination: WaveListPagination } +export type WavePickTaskListParams = { + warehouse_id: number + pagination?: { + page?: number + pageSize?: number + current?: number + size?: number + } + page_no?: number + page_size?: number + status?: number | string | Array + review_status?: number + pick_mode?: number + source?: string + pick_user_id?: number + review_user_id?: number + task_no?: string + cart_id?: number + keyword?: string + start_time_start?: string + start_time_end?: string + where?: Record + strategy_id?: number +} + +export type WavePickTaskListResponse = { + list: Array> + total?: number + page?: number + page_size?: number +} + +export type WavePickTaskCancelParams = { + task_ids: Array +} + +export type WavePickTaskCancelResponse = { + cancelled_count?: number + task_ids?: Array + task_nos?: Array + task_id?: number | string + task_no?: string +} + export type WaveGroupOrderFetchListParams = { pagination?: { page?: number @@ -487,6 +531,38 @@ export function orderWaveBatchList( } as any) } +export function orderWaveWavePickTaskList( + data: WavePickTaskListParams +): Promise }> { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.wave.wavePickTaskList', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + +export function orderWaveWavePickTaskCancel( + data: WavePickTaskCancelParams +): Promise }> { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.wave.wavePickTaskCancel', + v, + timestamp: new Date().getTime() + }, + data, + isSystemApi: true + } as any) +} + export function orderWaveGroupOrderFetchList( data: WaveGroupOrderFetchListParams = {} ): Promise }> { @@ -574,7 +650,7 @@ export function orderWaveWaveStrategyFetchAdmin( url: '/system', method: 'post', params: { - method: 'order.wave.waveStrategyFetchAdmin', + method: 'order.wave.waveStrategyFetchPda', v, timestamp: new Date().getTime() }, @@ -870,6 +946,8 @@ export function orderWaveBatchRemoveOrders( export const orderWave = { batchList: orderWaveBatchList, + wavePickTaskList: orderWaveWavePickTaskList, + wavePickTaskCancel: orderWaveWavePickTaskCancel, groupOrderFetchList: orderWaveGroupOrderFetchList, waveStrategyList: orderWaveWaveStrategyList, waveStrategyCreate: orderWaveWaveStrategyCreate, diff --git a/src/views/order/waveOrder/GroupWaveBatchListPanel.vue b/src/views/order/waveOrder/GroupWaveBatchListPanel.vue index b18d0403..4e02dda8 100644 --- a/src/views/order/waveOrder/GroupWaveBatchListPanel.vue +++ b/src/views/order/waveOrder/GroupWaveBatchListPanel.vue @@ -37,6 +37,14 @@ +
+ 显示库内抓取波次 + +
@@ -942,6 +950,7 @@ const groupOrderTableRef = ref(null) const singleOrderTableRef = ref(null) const scrollContainerRef = ref(null) const loading = ref(false) +const showInternalSourceWaves = ref(false) const batchAutoGroupingLoading = ref(false) const batchFinishAutoGroupingLoading = ref(false) const batchCancelLoading = ref(false) @@ -1337,7 +1346,11 @@ async function loadData() { loading.value = true const start = Date.now() try { - const where = sanitizeWaveWhere(buildWhereConditions(scanBox.value?.getConditions?.() || {})) + const rawWhere = buildWhereConditions(scanBox.value?.getConditions?.() || {}) + if (!showInternalSourceWaves.value) { + rawWhere.source = 0 + } + const where = sanitizeWaveWhere(rawWhere) if (where.wave_type === undefined || where.wave_type === null || where.wave_type === '') { where.wave_type = currentWaveType.value } @@ -1389,6 +1402,11 @@ function handlePageSizeChange(size: number) { loadData() } +function handleSourceFilterChange() { + pagination.currentPage = 1 + void loadData() +} + function buildWhereConditions(rawConditions: Record) { const where: Record = {} Object.keys(rawConditions || {}).forEach((key) => { @@ -3564,6 +3582,24 @@ async function submitFallbackOrderFetchByIds() { .order-sub-container .main-content { .toolbar { + display: flex; + align-items: center; + justify-content: space-between; + + .toolbar-right { + display: flex; + align-items: center; + gap: 6px; + flex-shrink: 0; + padding-left: 8px; + } + + .toolbar-switch-label { + font-size: 12px; + color: var(--el-text-color-regular); + white-space: nowrap; + } + .toolbar-left { cursor: grab; diff --git a/src/views/order/waveOrder/SandanWaveBatchListPanel.vue b/src/views/order/waveOrder/SandanWaveBatchListPanel.vue index 3b7a9cfb..a2313501 100644 --- a/src/views/order/waveOrder/SandanWaveBatchListPanel.vue +++ b/src/views/order/waveOrder/SandanWaveBatchListPanel.vue @@ -37,6 +37,14 @@
+
+ 显示库内抓取波次 + +
@@ -942,6 +950,7 @@ const groupOrderTableRef = ref(null) const singleOrderTableRef = ref(null) const scrollContainerRef = ref(null) const loading = ref(false) +const showInternalSourceWaves = ref(false) const batchAutoGroupingLoading = ref(false) const batchFinishAutoGroupingLoading = ref(false) const batchCancelLoading = ref(false) @@ -1337,7 +1346,11 @@ async function loadData() { loading.value = true const start = Date.now() try { - const where = sanitizeWaveWhere(buildWhereConditions(scanBox.value?.getConditions?.() || {})) + const rawWhere = buildWhereConditions(scanBox.value?.getConditions?.() || {}) + if (!showInternalSourceWaves.value) { + rawWhere.source = 0 + } + const where = sanitizeWaveWhere(rawWhere) if (where.wave_type === undefined || where.wave_type === null || where.wave_type === '') { where.wave_type = currentWaveType.value } @@ -1389,6 +1402,11 @@ function handlePageSizeChange(size: number) { loadData() } +function handleSourceFilterChange() { + pagination.currentPage = 1 + void loadData() +} + function buildWhereConditions(rawConditions: Record) { const where: Record = {} Object.keys(rawConditions || {}).forEach((key) => { @@ -3564,6 +3582,24 @@ async function submitFallbackOrderFetchByIds() { .order-sub-container .main-content { .toolbar { + display: flex; + align-items: center; + justify-content: space-between; + + .toolbar-right { + display: flex; + align-items: center; + gap: 6px; + flex-shrink: 0; + padding-left: 8px; + } + + .toolbar-switch-label { + font-size: 12px; + color: var(--el-text-color-regular); + white-space: nowrap; + } + .toolbar-left { cursor: grab; diff --git a/src/views/order/waveOrder/WavePickTaskListPanel.vue b/src/views/order/waveOrder/WavePickTaskListPanel.vue new file mode 100644 index 00000000..b65c76f2 --- /dev/null +++ b/src/views/order/waveOrder/WavePickTaskListPanel.vue @@ -0,0 +1,648 @@ + + + + + diff --git a/src/views/order/waveOrder/config/wave-config.ts b/src/views/order/waveOrder/config/wave-config.ts index d590d9cc..c19e9b69 100644 --- a/src/views/order/waveOrder/config/wave-config.ts +++ b/src/views/order/waveOrder/config/wave-config.ts @@ -144,7 +144,8 @@ export const waveWhereAllowedFieldList = [ 'total_orders_min', 'total_orders_max', 'processed_orders_min', - 'processed_orders_max' + 'processed_orders_max', + 'source' ] as const export const waveWhereAllowedFields = new Set(waveWhereAllowedFieldList) diff --git a/src/views/order/waveOrder/index.vue b/src/views/order/waveOrder/index.vue index cf90d14b..02e4c1d9 100644 --- a/src/views/order/waveOrder/index.vue +++ b/src/views/order/waveOrder/index.vue @@ -30,6 +30,7 @@ import { useRoute, useRouter } from 'vue-router' import { useSettingsStore } from '@/stores/modules/settings' import GroupWaveBatchListPanel from './GroupWaveBatchListPanel.vue' import SandanWaveBatchListPanel from './SandanWaveBatchListPanel.vue' +import WavePickTaskListPanel from './WavePickTaskListPanel.vue' import { safeInvoke } from '@/utils/safe-invoke' const route = useRoute() @@ -49,7 +50,8 @@ type WaveTabItem = { const tabs = ref([ { name: 'groupWave', label: '团购波次', component: markRaw(GroupWaveBatchListPanel) }, - { name: 'sandanWave', label: '散单波次', component: markRaw(SandanWaveBatchListPanel) } + { name: 'sandanWave', label: '散单波次', component: markRaw(SandanWaveBatchListPanel) }, + { name: 'pickTaskWave', label: '拣货中任务', component: markRaw(WavePickTaskListPanel) } ]) /**