This commit is contained in:
yin 2026-04-28 18:22:32 +08:00
parent ea900c810f
commit d022634749
80 changed files with 1843 additions and 1752 deletions

View File

@ -221,4 +221,18 @@ export function recognizeLicensePlate(data:any){
data: data,
isSystemApi: true
} as any)
}
export function getLocationTypeList(data?: Record<string, unknown>) {
return request({
url: '/system',
method: 'post',
params: {
method: 'index.getLocationTypeList',
v: '1.0',
timestamp: new Date().getTime()
},
data: data ?? {},
isSystemApi: true
} as any)
}

View File

@ -297,3 +297,31 @@ export function getAreaRacks(area_id: any) {
isSystemApi: true
} as any)
}
export function exportRackSpaces(id: number | string) {
return request({
url: '/system',
method: 'post',
params: {
method: 'warehouse.exportRackSpaces',
v: '1.0',
timestamp: new Date().getTime()
},
data: { id },
isSystemApi: true
} as any)
}
export function batchUpdateSpaceInfo(data: { items: Array<Record<string, unknown>> }) {
return request({
url: '/system',
method: 'post',
params: {
method: 'warehouse.batchUpdateSpaceInfo',
v: '1.0',
timestamp: new Date().getTime()
},
data,
isSystemApi: true
} as any)
}

View File

@ -5,7 +5,7 @@
<el-table
v-loading="loading"
ref="tableRef"
:data="data"
:data="tableRenderData"
:highlight-current-row="highlightCurrentRow"
:row-key="rowKey"
:current-row-key="currentRowKey"
@ -21,6 +21,8 @@
:empty-text="emptyText"
:fit="fit"
:tooltip-effect="tooltipEffect"
:row-class-name="getRowClassName"
:row-style="getRowStyle"
height="100%"
>
<!-- 自定义选择列 -->
@ -38,6 +40,10 @@
<!-- 单元格 -->
<template #default="scope">
<template v-if="isVirtualSpacerRow(scope.row)">
<span class="virtual-spacer-cell"></span>
</template>
<template v-else>
<div class="custom-selection-cell" @click.stop="toggleRowSelection(scope.row)">
<el-checkbox
:model-value="isRowSelected(scope.row)"
@ -45,6 +51,7 @@
@click.stop="toggleRowSelection(scope.row)"
/>
</div>
</template>
</template>
</el-table-column>
@ -73,6 +80,10 @@
:filter-placement="column.filterPlacement"
>
<template #default="scope">
<template v-if="isVirtualSpacerRow(scope.row)">
<span class="virtual-spacer-cell"></span>
</template>
<template v-else>
<slot :name="`column-${column.prop}`" :row="scope.row" :index="scope.$index">
<template v-if="column.formatter">
<span v-html="column.formatter(scope.row, scope.column, scope.row[scope.column.property], scope.$index)"></span>
@ -97,6 +108,7 @@
</template>
<span v-else>{{ scope.row[column.prop] }}</span>
</slot>
</template>
</template>
</el-table-column>
</template>
@ -192,7 +204,7 @@
</template>
<script setup lang="ts">
import { ref, computed, watch, onMounted } from 'vue'
import { ref, computed, watch, onMounted, onBeforeUnmount, nextTick } from 'vue'
import { Box } from '@element-plus/icons-vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import type { UploadFile } from 'element-plus'
@ -407,6 +419,18 @@ const checkboxUpdateKey = ref<number | null>(null)
const columnConfigDialogVisible = ref(false)
const editableColumnConfigs = ref<ColumnConfigItem[]>([])
const columnConfigMap = ref<Record<string, ColumnConfigItem>>({})
const tableContainer = ref<HTMLElement | null>(null)
const bodyScrollEl = ref<HTMLElement | null>(null)
const virtualScrollTop = ref(0)
const virtualViewportHeight = ref(0)
const virtualBufferRows = 12
const virtualThreshold = 80
type VirtualSpacerRow = {
__virtualSpacer: true
__virtualSpacerType: 'top' | 'bottom'
__virtualSpacerHeight: number
}
const normalizedColumns = computed<ColumnItem[]>(() => {
return (props.columns || []).filter((column: ColumnItem) => !!column?.prop)
@ -455,6 +479,59 @@ const displayColumns = computed(() => {
})
// Computed
const virtualRowHeight = computed(() => {
if (props.tableSize === 'large') return 49
if (props.tableSize === 'default') return 41
return 33
})
const shouldUseVirtual = computed(() => {
return props.data.length >= virtualThreshold
})
const virtualVisibleCount = computed(() => {
if (!virtualViewportHeight.value) return props.pagination.pageSize || 20
return Math.ceil(virtualViewportHeight.value / virtualRowHeight.value) + virtualBufferRows * 2
})
const virtualStartIndex = computed(() => {
if (!shouldUseVirtual.value) return 0
return Math.max(0, Math.floor(virtualScrollTop.value / virtualRowHeight.value) - virtualBufferRows)
})
const virtualEndIndex = computed(() => {
if (!shouldUseVirtual.value) return props.data.length
return Math.min(props.data.length, virtualStartIndex.value + virtualVisibleCount.value)
})
const virtualTopPadding = computed(() => {
if (!shouldUseVirtual.value) return 0
return virtualStartIndex.value * virtualRowHeight.value
})
const virtualBottomPadding = computed(() => {
if (!shouldUseVirtual.value) return 0
return Math.max(0, (props.data.length - virtualEndIndex.value) * virtualRowHeight.value)
})
const virtualVisibleRows = computed(() => {
if (!shouldUseVirtual.value) return props.data
return props.data.slice(virtualStartIndex.value, virtualEndIndex.value)
})
const tableRenderData = computed(() => {
if (!shouldUseVirtual.value) return props.data
const rows: any[] = []
if (virtualTopPadding.value > 0) {
rows.push(createVirtualSpacerRow('top', virtualTopPadding.value))
}
rows.push(...virtualVisibleRows.value)
if (virtualBottomPadding.value > 0) {
rows.push(createVirtualSpacerRow('bottom', virtualBottomPadding.value))
}
return rows
})
const total = computed(() => {
return props.pagination.total || props.data.length
})
@ -490,6 +567,7 @@ const selectedCount = computed(() => {
// Watchers
watch(() => props.data, () => {
clearSelection()
syncVirtualViewport()
}, { deep: true })
watch(
@ -515,6 +593,11 @@ onMounted(() => {
if (props.defaultSelected.length > 0) {
setSelectionFromExternal(props.defaultSelected)
}
bindBodyScroll()
})
onBeforeUnmount(() => {
unbindBodyScroll()
})
// Methods
@ -785,18 +868,79 @@ async function handleRepairColumnConfig() {
}
function getRowKey(row: any) {
if (isVirtualSpacerRow(row)) {
return `virtual-${row.__virtualSpacerType}`
}
if (typeof props.rowKey === 'function') {
return props.rowKey(row)
}
return row[props.rowKey]
}
function createVirtualSpacerRow(type: 'top' | 'bottom', height: number): VirtualSpacerRow {
return {
__virtualSpacer: true,
__virtualSpacerType: type,
__virtualSpacerHeight: height
}
}
function isVirtualSpacerRow(row: any): row is VirtualSpacerRow {
return !!row && row.__virtualSpacer === true
}
function getRowClassName({ row }: { row: any }) {
if (isVirtualSpacerRow(row)) return 'virtual-spacer-row'
return ''
}
function getRowStyle({ row }: { row: any }) {
if (!isVirtualSpacerRow(row)) return {}
return {
height: `${row.__virtualSpacerHeight}px`
}
}
function handleBodyScroll() {
if (!bodyScrollEl.value) return
virtualScrollTop.value = bodyScrollEl.value.scrollTop || 0
virtualViewportHeight.value = bodyScrollEl.value.clientHeight || 0
}
function unbindBodyScroll() {
if (!bodyScrollEl.value) return
bodyScrollEl.value.removeEventListener('scroll', handleBodyScroll)
}
function bindBodyScroll() {
nextTick(() => {
unbindBodyScroll()
if (!tableRef.value?.$el) return
const tableEl = tableRef.value.$el as HTMLElement
const scrollWrap = tableEl.querySelector('.el-scrollbar__wrap') as HTMLElement | null
bodyScrollEl.value = scrollWrap
if (!bodyScrollEl.value) return
bodyScrollEl.value.addEventListener('scroll', handleBodyScroll, { passive: true })
handleBodyScroll()
})
}
function syncVirtualViewport() {
nextTick(() => {
if (!shouldUseVirtual.value) {
virtualScrollTop.value = 0
}
bindBodyScroll()
})
}
function isRowSelected(row: any) {
const rowKey = getRowKey(row)
return selectedRowKeys.value.has(rowKey)
}
function toggleRowSelection(row: any, selected: boolean | null = null) {
if (isVirtualSpacerRow(row)) return
const rowKey = getRowKey(row)
const currentlySelected = selectedRowKeys.value.has(rowKey)
const shouldSelect = selected !== null ? selected : !currentlySelected
@ -904,10 +1048,12 @@ function setSelectionFromExternal(rows: any[]) {
}
function handleCurrentChange(currentRow: any, oldCurrentRow: any) {
if (isVirtualSpacerRow(currentRow)) return
emit('current-change', currentRow, oldCurrentRow)
}
function handleRowClick(row: any, column: any, event: any) {
if (isVirtualSpacerRow(row)) return
const target = event.target
const isCheckbox = target.classList.contains('el-checkbox') ||
target.closest('.el-checkbox') ||
@ -920,6 +1066,7 @@ function handleRowClick(row: any, column: any, event: any) {
}
function handleRowContextMenu(row: any, column: any, event: any) {
if (isVirtualSpacerRow(row)) return
emit('row-contextmenu', row, column, event)
}
@ -1002,6 +1149,14 @@ defineExpose({
clearFilter,
getSummaries
})
watch(
() => [props.tableSize, props.showHeader, props.showPagination, props.loading],
() => {
syncVirtualViewport()
},
{ deep: true }
)
</script>
<style scoped>
@ -1108,6 +1263,19 @@ defineExpose({
pointer-events: none; /* 让父元素处理点击事件 */
}
:deep(.virtual-spacer-row td) {
padding: 0 !important;
border: 0 !important;
background: transparent !important;
}
.virtual-spacer-cell {
display: block;
width: 100%;
height: 100%;
pointer-events: none;
}
.column-config-toolbar {
display: flex;
gap: 8px;

View File

@ -184,6 +184,16 @@ export interface ToolbarButtonConfig {
action: string
}
export interface ToolbarApiActionConfig {
action: string
apiMethod: string
payloadKey?: string
confirmText?: string
confirmType?: 'warning' | 'error' | 'info' | 'success'
successText: string
failText: string
}
export const ORDER_TOOLBAR_BUTTONS: Record<string, ToolbarButtonConfig> = {
refresh: { key: 'refresh', label: '刷新', type: 'primary', size: 'small', action: 'loadData' },
export: { key: 'export', label: '导出', size: 'small', loadingKey: 'exportLoading', action: 'handleExport' },
@ -204,40 +214,54 @@ export const ORDER_TOOLBAR_BUTTONS: Record<string, ToolbarButtonConfig> = {
batchReview: { key: 'batchReview', label: '批量审核通过', size: 'small', type: 'success', loadingKey: 'reviewSubmitting', disabledKey: 'hasNoSelection', action: 'handleBatchReview' }
}
export const pendingToolbarButtonKeys = [
'refresh',
'export',
'columnConfig',
'toggleDetail',
'reverseReview',
'markPendingOutbound',
'allocateStorage',
'cancelAllocateStorage',
'allocateExpress',
'updateExpress',
'updatePlatform',
'manualCreate',
'excelImportCreate',
'cloneOrder',
'syncOrderIds',
'cancelOrder'
]
export const reviewToolbarButtonKeys = [
'refresh',
'export',
'columnConfig',
'toggleDetail',
'manualCreate',
'batchReview'
]
export function pickToolbarButtons(keys: string[]) {
return keys
.map((key) => ORDER_TOOLBAR_BUTTONS[key])
.filter((button): button is ToolbarButtonConfig => Boolean(button))
}
export const PENDING_TOOLBAR_API_ACTIONS: ToolbarApiActionConfig[] = [
{
action: 'handleReverseReview',
apiMethod: 'reverseReviewOrder',
payloadKey: 'ids',
confirmText: '确定将选中的 {count} 条订单反审回待审核吗?',
confirmType: 'warning',
successText: '反审成功',
failText: '反审失败'
},
{
action: 'handleMarkPendingOutbound',
apiMethod: 'markPendingOutboundOrder',
payloadKey: 'ids',
confirmText: '确定将选中的 {count} 条订单标记为待出库吗?',
confirmType: 'warning',
successText: '标记待出库成功',
failText: '标记待出库失败'
},
{
action: 'handleCancelOrder',
apiMethod: 'cancelOrder',
payloadKey: 'ids',
confirmText: '确定取消选中的 {count} 条订单吗?',
confirmType: 'error',
successText: '取消订单成功',
failText: '取消订单失败'
}
]
export const REVIEW_TOOLBAR_API_ACTIONS: ToolbarApiActionConfig[] = [
{
action: 'handleBatchReview',
apiMethod: 'reviewOrder',
payloadKey: 'ids',
confirmText: '确定审核通过选中的 {count} 条订单吗?',
confirmType: 'warning',
successText: '审核成功',
failText: '订单审核失败,请稍后重试'
}
]
export function getTagType(field: string, value: any) {
if (COMMON_TAG_TYPES[field] && COMMON_TAG_TYPES[field][value] !== undefined) {
return COMMON_TAG_TYPES[field][value]
@ -514,6 +538,20 @@ export const reviewOrderbuttonList: any[] = [
}
]
export const reviewToolbarButtonKeys = [
'refresh',
'export',
'columnConfig',
'toggleDetail',
'manualCreate',
'batchReview'
]
/** 页面级按钮列表:reviewOrder 直接消费,避免页面内重复拼装 */
export const reviewToolbarButtons = pickToolbarButtons(reviewToolbarButtonKeys)
// pendingOrder相关配置
export const pendingAvailableFields = [
@ -652,9 +690,33 @@ export const pendingOrderbuttonList: any[] = [
}
]
export const pendingToolbarButtonKeys = [
'refresh',
'export',
'columnConfig',
'toggleDetail',
'reverseReview',
'markPendingOutbound',
'allocateStorage',
'cancelAllocateStorage',
'allocateExpress',
'updateExpress',
'updatePlatform',
'manualCreate',
'excelImportCreate',
'cloneOrder',
'syncOrderIds',
'cancelOrder'
]
/** 页面级按钮列表:pendingOrder 直接消费,避免页面内重复拼装 */
export const pendingToolbarButtons = pickToolbarButtons(pendingToolbarButtonKeys)
export const outboundAvailableFields = pendingAvailableFields
export const outboundColumns = pendingCloums
// orderWorkbench相关配置
export const workbenchStatusOptions = [
{ label: '待处理', value: 'pedding' },
@ -861,3 +923,5 @@ export const archiveOrderDetail = [
{ prop: 'create_at', label: '创建时间' },
{ prop: 'updated_at', label: '归档/更新时间' },
]

View File

@ -0,0 +1,38 @@
<template>
<el-dialog
v-model="visible"
title="批量分配快递号"
width="420px"
align-center
destroy-on-close
@closed="emit('closed')"
>
<p class="allocate-confirm-text">是否确认分配?</p>
<template #footer>
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" :loading="loading" @click="emit('submit')">确认</el-button>
</template>
</el-dialog>
</template>
<script setup lang="ts">
const visible = defineModel<boolean>({ default: false })
defineProps<{
loading: boolean
}>()
const emit = defineEmits<{
(e: 'submit'): void
(e: 'closed'): void
}>()
</script>
<style scoped>
.allocate-confirm-text {
margin: 0;
font-size: 14px;
line-height: 1.6;
color: #303133;
}
</style>

View File

@ -0,0 +1,51 @@
<template>
<el-dialog
v-model="visible"
title="克隆待处理订单"
width="480px"
align-center
destroy-on-close
@closed="emit('closed')"
>
<el-alert
type="warning"
:closable="false"
show-icon
title="克隆会取消原订单并创建新订单,请确认后执行。"
/>
<div class="clone-order-meta">
<p>原订单ID:{{ sourceOrderId || '-' }}</p>
<p>订单号:{{ sourceOrderCode || '-' }}</p>
</div>
<template #footer>
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" :loading="loading" @click="emit('submit')">确认克隆</el-button>
</template>
</el-dialog>
</template>
<script setup lang="ts">
const visible = defineModel<boolean>({ default: false })
defineProps<{
loading: boolean
sourceOrderId: number | null
sourceOrderCode: string
}>()
const emit = defineEmits<{
(e: 'submit'): void
(e: 'closed'): void
}>()
</script>
<style scoped>
.clone-order-meta {
margin-top: 12px;
color: #606266;
}
.clone-order-meta p {
margin: 4px 0;
}
</style>

View File

@ -0,0 +1,50 @@
<template>
<el-dialog
v-model="visible"
:title="mode === 'cancel' ? '按订单批量取消分配储位' : '按订单批量分配储位'"
width="520px"
align-center
destroy-on-close
@closed="emit('closed')"
>
<el-form label-width="140px" class="storage-allocate-form">
<el-form-item label="已选订单数">
<span>{{ orderCount }} 条</span>
</el-form-item>
<el-form-item v-if="mode !== 'cancel'" label="允许存储储位">
<el-switch v-model="allowStorageLocationProxy" active-text="是" inactive-text="否" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" :loading="loading" @click="emit('submit')">
{{ mode === 'cancel' ? '确认取消' : '开始分配' }}
</el-button>
</template>
</el-dialog>
</template>
<script setup lang="ts">
import { computed } from 'vue'
const visible = defineModel<boolean>({ default: false })
const allowStorageLocation = defineModel<boolean>('allowStorageLocation', { default: false })
const props = defineProps<{
mode: 'allocate' | 'cancel'
orderCount: number
loading: boolean
}>()
const emit = defineEmits<{
(e: 'submit'): void
(e: 'closed'): void
}>()
const allowStorageLocationProxy = computed({
get: () => allowStorageLocation.value,
set: (value: boolean) => {
allowStorageLocation.value = value
}
})
</script>

View File

@ -0,0 +1,34 @@
<template>
<el-dialog
v-model="visible"
title="同步订单ID"
width="560px"
align-center
destroy-on-close
@closed="emit('closed')"
>
<el-form label-width="120px" class="storage-allocate-form">
<el-form-item label="当前勾选订单">
<span>{{ orderCount }} 条</span>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" :loading="loading" @click="emit('submit')">确认同步</el-button>
</template>
</el-dialog>
</template>
<script setup lang="ts">
const visible = defineModel<boolean>({ default: false })
defineProps<{
orderCount: number
loading: boolean
}>()
const emit = defineEmits<{
(e: 'submit'): void
(e: 'closed'): void
}>()
</script>

View File

@ -0,0 +1,65 @@
<template>
<el-dialog
v-model="visible"
:title="mode === 'express' ? '批量修改快递信息' : '批量修改平台信息'"
width="560px"
align-center
destroy-on-close
@closed="emit('closed')"
>
<el-form label-width="110px" class="storage-allocate-form">
<el-form-item label="已选订单数">
<span>{{ orderCount }} 条</span>
</el-form-item>
<el-form-item :label="mode === 'express' ? '快递编码' : '平台编码'" required>
<el-select
v-model="codeProxy"
filterable
allow-create
default-first-option
:reserve-keyword="false"
clearable
placeholder="请选择或输入编码"
style="width: 100%"
>
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="visible = false">取消</el-button>
<el-button type="primary" :loading="loading" @click="emit('submit')">确认修改</el-button>
</template>
</el-dialog>
</template>
<script setup lang="ts">
import { computed } from 'vue'
const visible = defineModel<boolean>({ default: false })
const code = defineModel<string>('code', { default: '' })
defineProps<{
mode: 'express' | 'platform'
orderCount: number
loading: boolean
options: Array<{ label: string; value: string }>
}>()
const emit = defineEmits<{
(e: 'submit'): void
(e: 'closed'): void
}>()
const codeProxy = computed({
get: () => code.value,
set: (value: string) => {
code.value = value
}
})
</script>

View File

@ -178,139 +178,46 @@
</template>
</div>
<el-dialog
<allocate-express-form
v-model="allocateDialogVisible"
title="批量分配快递号"
width="420px"
align-center
destroy-on-close
:loading="allocateLoading"
@closed="resetAllocateDialog"
>
<p class="allocate-confirm-text">是否确认分配?</p>
<template #footer>
<el-button @click="allocateDialogVisible = false">取消</el-button>
<el-button type="primary" :loading="allocateLoading" @click="submitAllocateExpress">
确认
</el-button>
</template>
</el-dialog>
<el-dialog
@submit="submitAllocateExpress"
/>
<storage-allocate-form
v-model="storageDialogVisible"
:title="storageDialogMode === 'cancel' ? '按订单批量取消分配储位' : '按订单批量分配储位'"
width="520px"
align-center
destroy-on-close
v-model:allow-storage-location="storageForm.allowStorageLocation"
:mode="storageDialogMode"
:order-count="storagePendingOrderIds.length"
:loading="storageAllocateLoading"
@closed="resetStorageAllocateDialog"
>
<!-- <el-alert
type="info"
:closable="false"
show-icon
class="allocate-tip"
title="接口说明"
description="对应 order.storageAllocation.allocateStorage:将选中订单 ID 批量参与储位分配(写入拣货等)。可选「允许使用存储储位」与「仓库 ID」;仓库 ID 留空则使用当前登录上下文。"
/> -->
<el-form label-width="140px" class="storage-allocate-form">
<el-form-item label="已选订单数">
<span>{{ storagePendingOrderIds.length }} 条</span>
</el-form-item>
<el-form-item v-if="storageDialogMode !== 'cancel'" label="允许存储储位">
<el-switch v-model="storageForm.allowStorageLocation" active-text="是" inactive-text="否" />
</el-form-item>
</el-form>
<template #footer>
<el-button @click="storageDialogVisible = false">取消</el-button>
<el-button type="primary" :loading="storageAllocateLoading" @click="submitStorageAllocate">
{{ storageDialogMode === 'cancel' ? '确认取消' : '开始分配' }}
</el-button>
</template>
</el-dialog>
<el-dialog
@submit="submitStorageAllocate"
/>
<update-order-meta-form
v-model="updateOrderMetaDialogVisible"
:title="updateOrderMetaDialogMode === 'express' ? '批量修改快递信息' : '批量修改平台信息'"
width="560px"
align-center
destroy-on-close
v-model:code="updateOrderMetaForm.code"
:mode="updateOrderMetaDialogMode"
:order-count="updateOrderMetaOrderIds.length"
:loading="updateOrderMetaLoading"
:options="updateOrderMetaOptions"
@closed="resetUpdateOrderMetaDialog"
>
<el-form label-width="110px" class="storage-allocate-form">
<el-form-item label="已选订单数">
<span>{{ updateOrderMetaOrderIds.length }} 条</span>
</el-form-item>
<el-form-item :label="updateOrderMetaDialogMode === 'express' ? '快递编码' : '平台编码'" required>
<el-select
v-model="updateOrderMetaForm.code"
filterable
allow-create
default-first-option
:reserve-keyword="false"
clearable
placeholder="请选择或输入编码"
style="width: 100%"
>
<el-option
v-for="item in updateOrderMetaOptions"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="updateOrderMetaDialogVisible = false">取消</el-button>
<el-button type="primary" :loading="updateOrderMetaLoading" @click="submitUpdateOrderMeta">
确认修改
</el-button>
</template>
</el-dialog>
<el-dialog
@submit="submitUpdateOrderMeta"
/>
<clone-order-form
v-model="cloneOrderDialogVisible"
title="克隆待处理订单"
width="480px"
align-center
destroy-on-close
:loading="cloneOrderLoading"
:source-order-id="cloneSourceOrderId"
:source-order-code="cloneSourceOrderCode"
@closed="resetCloneOrderDialog"
>
<el-alert
type="warning"
:closable="false"
show-icon
title="克隆会取消原订单并创建新订单,请确认后执行。"
/>
<div class="clone-order-meta">
<p>原订单ID:{{ cloneSourceOrderId || '-' }}</p>
<p>订单号:{{ cloneSourceOrderCode || '-' }}</p>
</div>
<template #footer>
<el-button @click="cloneOrderDialogVisible = false">取消</el-button>
<el-button type="primary" :loading="cloneOrderLoading" @click="submitCloneOrder">确认克隆</el-button>
</template>
</el-dialog>
<el-dialog
@submit="submitCloneOrder"
/>
<sync-order-ids-form
v-model="syncOrderIdsDialogVisible"
title="同步订单ID"
width="560px"
align-center
destroy-on-close
:order-count="selectionRows.length"
:loading="syncOrderIdsLoading"
@closed="resetSyncOrderIdsDialog"
>
<el-form label-width="120px" class="storage-allocate-form">
<el-form-item label="当前勾选订单">
<span>{{ selectionRows.length }} 条</span>
</el-form-item>
</el-form>
<template #footer>
<el-button @click="syncOrderIdsDialogVisible = false">取消</el-button>
<el-button type="primary" :loading="syncOrderIdsLoading" @click="submitSyncOrderIds">
确认同步
</el-button>
</template>
</el-dialog>
@submit="submitSyncOrderIds"
/>
<manual-create-pending-order-dialog v-model="manualCreateDialogVisible" @success="loadData" />
<excel-import-pending-order-dialog v-model="importOrderDialogVisible" @success="loadData" />
@ -320,7 +227,7 @@
<script setup lang="ts">
import { ref, reactive, onMounted, computed } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { ElMessage } from 'element-plus'
import ScanBox from '@/components/ScanBox/index.vue'
import UpperTable from '@/components/UpperTable/index.vue'
import { orderPendingOrder } from '@/api/order.pendingorder/orderpendingOrder'
@ -329,8 +236,7 @@ import * as indexApi from '@/api/index/index'
import {
pendingCloums,
pendingAvailableFields,
pickToolbarButtons,
pendingToolbarButtonKeys,
pendingToolbarButtons,
type ToolbarButtonConfig,
translateOrderField,
getTagType
@ -341,8 +247,14 @@ import OrderItemsDetailPanel from './component/OrderItemsDetailPanel.vue'
import log from './component/log.vue'
import ManualCreatePendingOrderDialog from './component/ManualCreatePendingOrderDialog.vue'
import ExcelImportPendingOrderDialog from './component/ExcelImportPendingOrderDialog.vue'
import AllocateExpressForm from './form/AllocateExpressForm.vue'
import StorageAllocateForm from './form/StorageAllocateForm.vue'
import UpdateOrderMetaForm from './form/UpdateOrderMetaForm.vue'
import CloneOrderForm from './form/CloneOrderForm.vue'
import SyncOrderIdsForm from './form/SyncOrderIdsForm.vue'
import { exportUpperTableRows } from './utils/export'
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
import { createPendingToolbarController } from './utils/toolbar-actions'
const scanBox = ref<any>(null)
const upperTable = ref<any>(null)
@ -366,9 +278,6 @@ const list = ref<any[]>([])
const loading = ref(false)
const actionLoading = ref(false)
const exportLoading = ref(false)
const allocateLoading = ref(false)
const storageAllocateLoading = ref(false)
const updateOrderMetaLoading = ref(false)
const queryTime = ref(0)
const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 })
@ -382,7 +291,7 @@ const selectedOrderId = ref<number | string | null>(null)
const detailVisible = ref(true)
const quickSearch = ref('')
const toolbarButtons = pickToolbarButtons(pendingToolbarButtonKeys)
const toolbarButtons = pendingToolbarButtons
// Toolbar 滚动与拖拽逻辑
const isDragging = ref(false)
@ -415,42 +324,10 @@ const handleMouseUp = () => {
isDragging.value = false
}
const allocateDialogVisible = ref(false)
/** 打开分配弹窗时勾选的订单行快照(用于提交,避免弹窗期间勾选变化) */
const allocatePendingRows = ref<any[]>([])
const storageDialogVisible = ref(false)
const storageDialogMode = ref<'allocate' | 'cancel'>('allocate')
/** 打开储位弹窗时快照的订单 ID,避免提交前勾选变化 */
const storagePendingOrderIds = ref<Array<number | string>>([])
const storageForm = reactive<{
allowStorageLocation: boolean
}>({
allowStorageLocation: false
})
const updateOrderMetaDialogVisible = ref(false)
const updateOrderMetaDialogMode = ref<'express' | 'platform'>('express')
const updateOrderMetaOrderIds = ref<number[]>([])
const updateOrderMetaForm = reactive({
code: ''
})
const expressCodeOptions = ref<Array<{ label: string; value: string }>>([])
const platformCodeOptions = ref<Array<{ label: string; value: string }>>([])
const manualCreateDialogVisible = ref(false)
const importOrderDialogVisible = ref(false)
const cloneOrderDialogVisible = ref(false)
const cloneOrderLoading = ref(false)
const cloneSourceOrderId = ref<number | null>(null)
const cloneSourceOrderCode = ref('')
const syncOrderIdsDialogVisible = ref(false)
const syncOrderIdsLoading = ref(false)
const updateOrderMetaOptions = computed(() => {
return updateOrderMetaDialogMode.value === 'express'
? expressCodeOptions.value
: platformCodeOptions.value
})
const selectedRow = computed(() => {
return list.value.find((i: any) => i.id === selectedOrderId.value) || null
@ -600,16 +477,6 @@ function toggleDetailVisible() {
detailVisible.value = !detailVisible.value
}
const buttonLoadingMap = computed<Record<string, boolean>>(() => ({
exportLoading: exportLoading.value,
actionLoading: actionLoading.value,
storageAllocateLoading: storageAllocateLoading.value,
allocateLoading: allocateLoading.value,
updateOrderMetaLoading: updateOrderMetaLoading.value,
cloneOrderLoading: cloneOrderLoading.value,
syncOrderIdsLoading: syncOrderIdsLoading.value
}))
const buttonDisabledMap = computed<Record<string, boolean>>(() => ({
hasNoSelection: !hasSelection.value,
notSingleSelection: selectionRows.value.length !== 1
@ -619,24 +486,68 @@ const buttonLabelMap = computed<Record<string, string>>(() => ({
detailToggleLabel: detailVisible.value ? '隐藏详情' : '显示详情'
}))
const toolbarActionMap: Record<string, () => void | Promise<void>> = {
const {
actionMap: toolbarActionMap,
dialogState: {
allocateDialogVisible,
allocateLoading,
storageDialogVisible,
storageDialogMode,
storagePendingOrderIds,
storageAllocateLoading,
storageForm,
updateOrderMetaDialogVisible,
updateOrderMetaDialogMode,
updateOrderMetaOrderIds,
updateOrderMetaForm,
updateOrderMetaOptions,
updateOrderMetaLoading,
cloneOrderDialogVisible,
cloneOrderLoading,
cloneSourceOrderId,
cloneSourceOrderCode,
syncOrderIdsDialogVisible,
syncOrderIdsLoading
},
submitStorageAllocate,
submitUpdateOrderMeta,
submitCloneOrder,
submitSyncOrderIds,
submitAllocateExpress,
resetAllocateDialog,
resetStorageAllocateDialog,
resetUpdateOrderMetaDialog,
resetCloneOrderDialog,
resetSyncOrderIdsDialog
} = createPendingToolbarController({
loadData,
handleExport,
openColumnConfigPanel,
toggleDetailVisible,
handleReverseReview,
handleMarkPendingOutbound,
openStorageAllocateDialog,
openStorageCancelDialog,
openAllocateExpressDialog,
openUpdateOrderExpressDialog,
openUpdateOrderPlatformDialog,
openManualCreateDialog,
openImportOrderDialog,
openCloneOrderDialog,
openSyncOrderIdsDialog,
handleCancelOrder
}
getSelectedRows: () => selectionRows.value,
getSelectedIds,
pendingApi: orderPendingOrder,
actionLoading,
clearSelection: () => {
upperTable.value?.clearSelection?.()
selectionRows.value = []
hasSelection.value = false
},
expressCodeOptions,
platformCodeOptions
})
const buttonLoadingMap = computed<Record<string, boolean>>(() => ({
exportLoading: exportLoading.value,
actionLoading: actionLoading.value,
storageAllocateLoading: storageAllocateLoading.value,
allocateLoading: allocateLoading.value,
updateOrderMetaLoading: updateOrderMetaLoading.value,
cloneOrderLoading: cloneOrderLoading.value,
syncOrderIdsLoading: syncOrderIdsLoading.value
}))
function resolveButtonLoading(loadingKey?: string) {
if (!loadingKey) return false
@ -770,401 +681,6 @@ function getSelectedIds(): number[] {
}
return ids
}
function openStorageDialog(mode: 'allocate' | 'cancel') {
if (!selectionRows.value.length) {
ElMessage.warning(mode === 'cancel' ? '请先勾选需要取消分配储位的订单' : '请先勾选需要分配储位的订单')
return
}
const ids = getSelectedIds()
if (!ids.length) {
ElMessage.error('选中行缺少订单 id,请刷新后重试')
return
}
storageDialogMode.value = mode
storagePendingOrderIds.value = [...ids]
storageForm.allowStorageLocation = false
storageDialogVisible.value = true
}
function openStorageAllocateDialog() {
openStorageDialog('allocate')
}
function openStorageCancelDialog() {
openStorageDialog('cancel')
}
function resetStorageAllocateDialog() {
storageDialogMode.value = 'allocate'
storagePendingOrderIds.value = []
storageForm.allowStorageLocation = false
}
async function submitStorageAllocate() {
const order_ids = [...storagePendingOrderIds.value]
if (!order_ids.length || storageAllocateLoading.value) return
const isCancel = storageDialogMode.value === 'cancel'
storageAllocateLoading.value = true
try {
const payload: Record<string, any> = isCancel
? { order_ids }
: {
order_ids,
// 使用模块文档中的推荐字段名,避免后端别名兼容差异
allow_storage_location: storageForm.allowStorageLocation
}
const res = isCancel
? await orderPendingOrder.cancelAllocateStorage(payload)
: await orderPendingOrder.allocateStorage(payload)
const ok =
res &&
(res.code === 1 || res.code === 200 || res.flag === 'success')
if (ok) {
ElMessage.success(res.message || (isCancel ? '取消分配储位已提交' : '储位分配已提交'))
storageDialogVisible.value = false
upperTable.value?.clearSelection?.()
selectionRows.value = []
hasSelection.value = false
await loadData()
} else {
ElMessage.error(res?.message || (isCancel ? '取消分配储位失败' : '储位分配失败'))
}
} catch {
ElMessage.error(isCancel ? '取消分配储位失败' : '储位分配失败')
} finally {
storageAllocateLoading.value = false
}
}
async function callAction(
title: string,
action: () => Promise<any>,
successText: string
) {
if (actionLoading.value) return
actionLoading.value = true
try {
const res = await action()
if (res && (res.code === 1 || res.code === 200 || res.flag === 'success')) {
ElMessage.success(`${successText} ${res.data?.updated_count || 0} 条`)
upperTable.value?.clearSelection?.()
selectionRows.value = []
hasSelection.value = false
await loadData()
} else {
ElMessage.error(res?.message || `${title}失败`)
}
} catch (error) {
ElMessage.error(`${title}失败`)
} finally {
actionLoading.value = false
}
}
async function handleReverseReview() {
const ids = getSelectedIds()
if (!ids.length) {
ElMessage.warning('请先选择订单')
return
}
try {
await ElMessageBox.confirm(`确定将选中的 ${ids.length} 条订单反审回待审核吗?`, '确认', { type: 'warning' })
await callAction('反审', () => orderPendingOrder.reverseReviewOrder({ ids }), '反审成功')
} catch (error) {}
}
async function handleMarkPendingOutbound() {
const ids = getSelectedIds()
if (!ids.length) {
ElMessage.warning('请先选择订单')
return
}
try {
await ElMessageBox.confirm(`确定将选中的 ${ids.length} 条订单标记为待出库吗?`, '确认', { type: 'warning' })
await callAction(
'标记待出库',
() => orderPendingOrder.markPendingOutboundOrder({ ids }),
'标记待出库成功'
)
} catch (error) {}
}
async function handleCancelOrder() {
const ids = getSelectedIds()
if (!ids.length) {
ElMessage.warning('请先选择订单')
return
}
try {
await ElMessageBox.confirm(`确定取消选中的 ${ids.length} 条订单吗?`, '确认', { type: 'error' })
await callAction('取消订单', () => orderPendingOrder.cancelOrder({ ids }), '取消订单成功')
} catch (error) {}
}
function openUpdateOrderMetaDialog(mode: 'express' | 'platform') {
if (!selectionRows.value.length) {
ElMessage.warning(mode === 'express' ? '请先勾选需要修改快递的订单' : '请先勾选需要修改平台的订单')
return
}
const ids = getSelectedIds()
if (!ids.length) {
ElMessage.error('选中行缺少订单 id,请刷新后重试')
return
}
updateOrderMetaDialogMode.value = mode
updateOrderMetaOrderIds.value = [...ids]
updateOrderMetaForm.code = ''
updateOrderMetaDialogVisible.value = true
}
function openUpdateOrderExpressDialog() {
openUpdateOrderMetaDialog('express')
}
function openUpdateOrderPlatformDialog() {
openUpdateOrderMetaDialog('platform')
}
function resetUpdateOrderMetaDialog() {
updateOrderMetaDialogMode.value = 'express'
updateOrderMetaOrderIds.value = []
updateOrderMetaForm.code = ''
}
async function submitUpdateOrderMeta() {
if (updateOrderMetaLoading.value) return
const order_ids = [...updateOrderMetaOrderIds.value]
const code = normalizeCode(updateOrderMetaForm.code)
if (!order_ids.length) {
ElMessage.error('没有可提交的订单')
return
}
if (!code) {
ElMessage.warning(updateOrderMetaDialogMode.value === 'express' ? '请输入快递编码' : '请输入平台编码')
return
}
updateOrderMetaLoading.value = true
try {
const res =
updateOrderMetaDialogMode.value === 'express'
? await orderPendingOrder.updateOrderExpress({ order_ids, express_code: code })
: await orderPendingOrder.updateOrderPlatform({ order_ids, code })
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
if (!ok) {
ElMessage.error(res?.message || '批量修改失败')
return
}
const updatedCount = Number(res?.data?.updated_count ?? order_ids.length) || 0
ElMessage.success(
`${updateOrderMetaDialogMode.value === 'express' ? '快递信息' : '平台信息'}修改成功 ${updatedCount} 条`
)
updateOrderMetaDialogVisible.value = false
upperTable.value?.clearSelection?.()
selectionRows.value = []
hasSelection.value = false
await loadData()
} catch {
ElMessage.error(updateOrderMetaDialogMode.value === 'express' ? '修改快递失败' : '修改平台失败')
} finally {
updateOrderMetaLoading.value = false
}
}
function openCloneOrderDialog() {
if (selectionRows.value.length !== 1) {
ElMessage.warning('请选择 1 条订单进行克隆')
return
}
const row = selectionRows.value[0] || {}
const orderId = normalizePositiveIntId(row?.order_id ?? row?.id)
if (!orderId) {
ElMessage.error('未识别到有效订单ID')
return
}
cloneSourceOrderId.value = orderId
cloneSourceOrderCode.value = String(row?.delivery_order_code || '')
cloneOrderDialogVisible.value = true
}
function resetCloneOrderDialog() {
cloneSourceOrderId.value = null
cloneSourceOrderCode.value = ''
}
function resetSyncOrderIdsDialog() {
}
function openSyncOrderIdsDialog() {
const selectedIds = getSelectedIds()
if (!selectedIds.length) {
ElMessage.warning('请先勾选需要同步的订单')
return
}
syncOrderIdsDialogVisible.value = true
}
async function submitSyncOrderIds() {
if (syncOrderIdsLoading.value) return
const order_ids = getSelectedIds()
if (!order_ids.length) {
ElMessage.warning('请先勾选需要同步的订单')
return
}
syncOrderIdsLoading.value = true
try {
const res = await orderPendingOrder.syncOrderIds({ order_ids })
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
if (!ok) {
ElMessage.error(res?.message || '同步订单ID失败')
return
}
const count = Array.isArray(res?.data?.order_ids) ? res.data.order_ids.length : order_ids.length
ElMessage.success((res?.message || '同步请求已受理') + `(${count} 条)`)
syncOrderIdsDialogVisible.value = false
await loadData()
} catch {
ElMessage.error('同步订单ID失败')
} finally {
syncOrderIdsLoading.value = false
}
}
async function submitCloneOrder() {
if (!cloneSourceOrderId.value || cloneOrderLoading.value) return
cloneOrderLoading.value = true
try {
const res = await orderPendingOrder.cloneOrder({ order_id: cloneSourceOrderId.value })
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
if (!ok) {
ElMessage.error(res?.message || '克隆订单失败')
return
}
const data = res?.data || {}
ElMessage.success(`克隆成功:原订单 ${data.source_order_id ?? cloneSourceOrderId.value} -> 新订单 ${data.new_order_id ?? '-'}`)
cloneOrderDialogVisible.value = false
upperTable.value?.clearSelection?.()
selectionRows.value = []
hasSelection.value = false
await loadData()
} catch {
ElMessage.error('克隆订单失败')
} finally {
cloneOrderLoading.value = false
}
}
/**
* 根据订单 express_numbers(已占用的运单序号数组)计算下一批可用的 business_key。
* - express_numbers 为已分配过的序号集合;可用序号取从 1 开始的最小未占用正整数。
* - count 指本次要新分配的运单数(默认 1,拆单场景可 >1)。
*/
function computeAvailableBusinessKeys(expressNumbers: any, count = 1): number[] {
const used = new Set<number>()
if (Array.isArray(expressNumbers)) {
for (const item of expressNumbers) {
const n = Number(item)
if (Number.isFinite(n) && n > 0 && Number.isInteger(n)) {
used.add(n)
}
}
}
const need = Math.max(1, Number(count) || 1)
const result: number[] = []
let cursor = 1
while (result.length < need) {
if (!used.has(cursor)) {
result.push(cursor)
}
cursor += 1
}
return result
}
function openAllocateExpressDialog() {
if (!selectionRows.value.length) {
ElMessage.warning('请先勾选需要分配快递号的订单')
return
}
const invalid = selectionRows.value.filter((row: any) => {
const oid = row?.order_id ?? row?.id
return normalizePositiveIntId(oid) === null
})
if (invalid.length) {
ElMessage.error('存在无法识别有效 order_id 的行,请刷新列表后重试')
return
}
allocatePendingRows.value = selectionRows.value.map((row: any) => ({ ...row }))
allocateDialogVisible.value = true
}
function resetAllocateDialog() {
allocatePendingRows.value = []
}
function buildAllocateExpressPayload(rows: any[]): Array<Record<string, any>> {
const out: Array<Record<string, any>> = []
for (const row of rows) {
const base = { ...row }
const order_id = normalizePositiveIntId(base.order_id ?? base.id)
if (order_id === null) continue
const business_key = computeAvailableBusinessKeys(row.express_numbers, 1)
out.push({
...base,
order_id,
business_key
})
}
return out
}
async function submitAllocateExpress() {
const rows = allocatePendingRows.value
if (!rows.length || allocateLoading.value) return
allocateLoading.value = true
try {
const orders = buildAllocateExpressPayload(rows)
if (!orders.length) {
ElMessage.error('没有有效的订单 ID,无法分配快递号')
return
}
const res = await orderPendingOrder.allocateExpressCode({ orders })
const ok =
res &&
(res.code === 1 || res.code === 200 || res.flag === 'success')
if (ok) {
const data = res.data || {}
const summary = data.summary
const successLen = Array.isArray(data.success) ? data.success.length : undefined
const failedLen = Array.isArray(data.failed) ? data.failed.length : undefined
let extra = ''
if (summary && typeof summary === 'object') {
extra = ` ${JSON.stringify(summary)}`
} else if (successLen !== undefined || failedLen !== undefined) {
extra = ` 成功 ${successLen ?? '—'} 条,失败 ${failedLen ?? '—'} 条`
}
ElMessage.success((res.message || '分配请求已提交') + extra)
allocateDialogVisible.value = false
upperTable.value?.clearSelection?.()
selectionRows.value = []
hasSelection.value = false
await loadData()
} else {
ElMessage.error(res?.message || '分配快递号失败')
}
} catch {
ElMessage.error('分配快递号失败')
} finally {
allocateLoading.value = false
}
}
</script>
<style scoped lang="scss">
@ -1193,36 +709,6 @@ async function submitAllocateExpress() {
}
}
.allocate-tip {
margin-bottom: 12px;
}
.allocate-confirm-text {
margin: 0;
font-size: 14px;
line-height: 1.6;
color: #303133;
}
.storage-allocate-form {
margin-top: 12px;
}
.clone-order-meta {
margin-top: 12px;
color: #606266;
}
.clone-order-meta p {
margin: 4px 0;
}
.sync-order-hint {
margin-top: 6px;
font-size: 12px;
color: #909399;
}
.detail-page {
height: 100%;
overflow-x: hidden;

View File

@ -149,8 +149,7 @@ import { orderReviewOrder } from '@/api/order.revieworder/orderreviewOrder'
import {
reviewAvailableFields,
reviewColums,
pickToolbarButtons,
reviewToolbarButtonKeys,
reviewToolbarButtons,
type ToolbarButtonConfig,
translateOrderField,
getTagType
@ -160,6 +159,7 @@ import ManualCreatePendingOrderDialog from './component/ManualCreatePendingOrder
import log from './component/log.vue'
import { exportUpperTableRows } from './utils/export'
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
import { createReviewToolbarController } from './utils/toolbar-actions'
const scanBox = ref<any>(null)
const upperTable = ref<any>(null)
@ -194,10 +194,9 @@ const columns = ref(reviewColums)
const selectionRows = ref<any[]>([])
const hasSelection = ref(false)
const selectedOrderId = ref<number | string | null>(null)
const reviewSubmitting = ref(false)
const quickSearch = ref('')
const toolbarButtons = pickToolbarButtons(reviewToolbarButtonKeys)
const toolbarButtons = reviewToolbarButtons
const selectedRow = computed(() => {
return list.value.find((i: any) => i.id === selectedOrderId.value) || null
@ -333,14 +332,27 @@ const buttonLabelMap = computed<Record<string, string>>(() => ({
detailToggleLabel: detailVisible.value ? '隐藏详情' : '显示详情'
}))
const toolbarActionMap: Record<string, () => void | Promise<void>> = {
const {
actionMap: toolbarActionMap,
reviewSubmitting,
submitReview
} = createReviewToolbarController({
loadData,
handleExport,
openColumnConfigPanel,
toggleDetailVisible,
openManualCreateDialog,
handleBatchReview
}
getSelectedIds: () =>
selectionRows.value
.map((item: any) => item?.id)
.filter((id: any) => id !== undefined && id !== null),
clearSelection: () => {
upperTable.value?.clearSelection?.()
selectionRows.value = []
hasSelection.value = false
},
reviewApi: orderReviewOrder
})
function resolveButtonLoading(loadingKey?: string) {
if (!loadingKey) return false
@ -384,44 +396,6 @@ async function handleExport() {
}
}
async function submitReview(ids: Array<number | string>) {
if (!ids.length) {
ElMessage.warning('请先选择需要审核的订单')
return
}
if (reviewSubmitting.value) return
reviewSubmitting.value = true
try {
const res = await orderReviewOrder.reviewOrder({ ids })
if (res && (res.code === 1 || res.code === 200)) {
ElMessage.success(`审核成功 ${res.data?.updated_count || ids.length} 条`)
upperTable.value?.clearSelection?.()
selectionRows.value = []
hasSelection.value = false
await loadData()
} else {
ElMessage.error(res?.message || '订单审核失败,请稍后重试')
}
} catch (error) {
ElMessage.error('订单审核失败,请稍后重试')
} finally {
reviewSubmitting.value = false
}
}
async function handleBatchReview() {
const ids = selectionRows.value.map((item: any) => item?.id).filter((id: any) => id !== undefined && id !== null)
if (!ids.length) {
ElMessage.warning('请先选择需要审核的订单')
return
}
try {
await ElMessageBox.confirm(`确定审核通过选中的 ${ids.length} 条订单吗?`, '确认', { type: 'warning' })
await submitReview(ids)
} catch (e) {}
}
async function handleSingleReview() {
if (!selectedRow.value?.id) {
ElMessage.warning('请先选择订单')

View File

@ -0,0 +1,567 @@
import { ElMessage, ElMessageBox } from 'element-plus'
import { computed, reactive, ref } from 'vue'
import {
PENDING_TOOLBAR_API_ACTIONS,
REVIEW_TOOLBAR_API_ACTIONS,
type ToolbarApiActionConfig
} from '../config/order-common-config'
type ActionHandler = () => void | Promise<void>
type OrderId = number | string
function buildPayload(ids: OrderId[], config: ToolbarApiActionConfig) {
if (!config.payloadKey) return ids
return { [config.payloadKey]: ids }
}
async function executeApiAction(params: {
ids: OrderId[]
api: Record<string, any>
config: ToolbarApiActionConfig
loading: { value: boolean }
clearSelection: () => void
reload: () => Promise<void>
}) {
const { ids, api, config, loading, clearSelection, reload } = params
if (!ids.length) {
ElMessage.warning('请先选择订单')
return
}
if (loading.value) return
const apiMethod = api[config.apiMethod]
if (typeof apiMethod !== 'function') {
ElMessage.error(`未找到接口方法:${config.apiMethod}`)
return
}
try {
if (config.confirmText) {
await ElMessageBox.confirm(
config.confirmText.replace('{count}', String(ids.length)),
'确认',
{ type: config.confirmType || 'warning' }
)
}
} catch {
return
}
loading.value = true
try {
const res = await apiMethod(buildPayload(ids, config))
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
if (!ok) {
ElMessage.error(res?.message || config.failText)
return
}
const updated = Number(res?.data?.updated_count ?? ids.length) || ids.length
ElMessage.success(`${config.successText} ${updated} 条`)
clearSelection()
await reload()
} catch {
ElMessage.error(config.failText)
} finally {
loading.value = false
}
}
export function createPendingToolbarActionMap(params: {
baseActions: Record<string, ActionHandler>
getSelectedIds: () => OrderId[]
pendingApi: Record<string, any>
actionLoading: { value: boolean }
clearSelection: () => void
loadData: () => Promise<void>
}) {
const actionMap: Record<string, ActionHandler> = {
...params.baseActions
}
for (const config of PENDING_TOOLBAR_API_ACTIONS) {
actionMap[config.action] = () =>
executeApiAction({
ids: params.getSelectedIds(),
api: params.pendingApi,
config,
loading: params.actionLoading,
clearSelection: params.clearSelection,
reload: params.loadData
})
}
return actionMap
}
export function createReviewToolbarActionMap(params: {
baseActions: Record<string, ActionHandler>
getSelectedIds: () => OrderId[]
reviewApi: Record<string, any>
reviewSubmitting: { value: boolean }
clearSelection: () => void
loadData: () => Promise<void>
}) {
const actionMap: Record<string, ActionHandler> = {
...params.baseActions
}
for (const config of REVIEW_TOOLBAR_API_ACTIONS) {
actionMap[config.action] = () =>
executeApiAction({
ids: params.getSelectedIds(),
api: params.reviewApi,
config,
loading: params.reviewSubmitting,
clearSelection: params.clearSelection,
reload: params.loadData
})
}
return actionMap
}
export function createReviewToolbarController(params: {
loadData: () => Promise<void>
handleExport: () => Promise<void>
openColumnConfigPanel: () => void
toggleDetailVisible: () => void
openManualCreateDialog: () => void
getSelectedIds: () => Array<number | string>
clearSelection: () => void
reviewApi: Record<string, any>
}) {
const reviewSubmitting = ref(false)
const actionMap = createReviewToolbarActionMap({
baseActions: {
loadData: params.loadData,
handleExport: params.handleExport,
openColumnConfigPanel: params.openColumnConfigPanel,
toggleDetailVisible: params.toggleDetailVisible,
openManualCreateDialog: params.openManualCreateDialog
},
getSelectedIds: params.getSelectedIds,
reviewApi: params.reviewApi,
reviewSubmitting,
clearSelection: params.clearSelection,
loadData: params.loadData
})
async function submitReview(ids: Array<number | string>) {
if (!ids.length) {
ElMessage.warning('请先选择需要审核的订单')
return
}
if (reviewSubmitting.value) return
reviewSubmitting.value = true
try {
const res = await params.reviewApi.reviewOrder({ ids })
if (res && (res.code === 1 || res.code === 200 || res.flag === 'success')) {
ElMessage.success(`审核成功 ${res.data?.updated_count || ids.length} 条`)
params.clearSelection()
await params.loadData()
} else {
ElMessage.error(res?.message || '订单审核失败,请稍后重试')
}
} catch {
ElMessage.error('订单审核失败,请稍后重试')
} finally {
reviewSubmitting.value = false
}
}
return {
actionMap,
reviewSubmitting,
submitReview
}
}
function normalizePositiveIntId(raw: unknown): number | null {
if (raw === undefined || raw === null || raw === '') return null
const n = typeof raw === 'number' ? raw : Number(raw)
if (!Number.isInteger(n) || n <= 0) return null
return n
}
function normalizeCode(value: unknown) {
return String(value ?? '').trim()
}
function computeAvailableBusinessKeys(expressNumbers: any, count = 1): number[] {
const used = new Set<number>()
if (Array.isArray(expressNumbers)) {
for (const item of expressNumbers) {
const n = Number(item)
if (Number.isFinite(n) && n > 0 && Number.isInteger(n)) {
used.add(n)
}
}
}
const need = Math.max(1, Number(count) || 1)
const result: number[] = []
let cursor = 1
while (result.length < need) {
if (!used.has(cursor)) result.push(cursor)
cursor += 1
}
return result
}
function buildAllocateExpressPayload(rows: any[]): Array<Record<string, any>> {
const out: Array<Record<string, any>> = []
for (const row of rows) {
const base = { ...row }
const order_id = normalizePositiveIntId(base.order_id ?? base.id)
if (order_id === null) continue
out.push({
...base,
order_id,
business_key: computeAvailableBusinessKeys(row.express_numbers, 1)
})
}
return out
}
export function createPendingToolbarController(params: {
loadData: () => Promise<void>
handleExport: () => Promise<void>
openColumnConfigPanel: () => void
toggleDetailVisible: () => void
openManualCreateDialog: () => void
openImportOrderDialog: () => void
getSelectedRows: () => any[]
getSelectedIds: () => number[]
clearSelection: () => void
pendingApi: Record<string, any>
actionLoading: { value: boolean }
expressCodeOptions: { value: Array<{ label: string; value: string }> }
platformCodeOptions: { value: Array<{ label: string; value: string }> }
}) {
const allocateDialogVisible = ref(false)
const allocateLoading = ref(false)
const allocatePendingRows = ref<any[]>([])
const storageDialogVisible = ref(false)
const storageDialogMode = ref<'allocate' | 'cancel'>('allocate')
const storagePendingOrderIds = ref<Array<number | string>>([])
const storageAllocateLoading = ref(false)
const storageForm = reactive({ allowStorageLocation: false })
const updateOrderMetaDialogVisible = ref(false)
const updateOrderMetaDialogMode = ref<'express' | 'platform'>('express')
const updateOrderMetaOrderIds = ref<number[]>([])
const updateOrderMetaLoading = ref(false)
const updateOrderMetaForm = reactive({ code: '' })
const updateOrderMetaOptions = computed(() =>
updateOrderMetaDialogMode.value === 'express'
? params.expressCodeOptions.value
: params.platformCodeOptions.value
)
const cloneOrderDialogVisible = ref(false)
const cloneOrderLoading = ref(false)
const cloneSourceOrderId = ref<number | null>(null)
const cloneSourceOrderCode = ref('')
const syncOrderIdsDialogVisible = ref(false)
const syncOrderIdsLoading = ref(false)
const actionMap = createPendingToolbarActionMap({
baseActions: {
loadData: params.loadData,
handleExport: params.handleExport,
openColumnConfigPanel: params.openColumnConfigPanel,
toggleDetailVisible: params.toggleDetailVisible,
openStorageAllocateDialog: () => openStorageDialog('allocate'),
openStorageCancelDialog: () => openStorageDialog('cancel'),
openAllocateExpressDialog,
openUpdateOrderExpressDialog: () => openUpdateOrderMetaDialog('express'),
openUpdateOrderPlatformDialog: () => openUpdateOrderMetaDialog('platform'),
openManualCreateDialog: params.openManualCreateDialog,
openImportOrderDialog: params.openImportOrderDialog,
openCloneOrderDialog,
openSyncOrderIdsDialog
},
getSelectedIds: params.getSelectedIds,
pendingApi: params.pendingApi,
actionLoading: params.actionLoading,
clearSelection: params.clearSelection,
loadData: params.loadData
})
function openStorageDialog(mode: 'allocate' | 'cancel') {
const rows = params.getSelectedRows()
if (!rows.length) {
ElMessage.warning(mode === 'cancel' ? '请先勾选需要取消分配储位的订单' : '请先勾选需要分配储位的订单')
return
}
const ids = params.getSelectedIds()
if (!ids.length) {
ElMessage.error('选中行缺少订单 id,请刷新后重试')
return
}
storageDialogMode.value = mode
storagePendingOrderIds.value = [...ids]
storageForm.allowStorageLocation = false
storageDialogVisible.value = true
}
async function submitStorageAllocate() {
const order_ids = [...storagePendingOrderIds.value]
if (!order_ids.length || storageAllocateLoading.value) return
const isCancel = storageDialogMode.value === 'cancel'
storageAllocateLoading.value = true
try {
const payload = isCancel
? { order_ids }
: { order_ids, allow_storage_location: storageForm.allowStorageLocation }
const res = isCancel
? await params.pendingApi.cancelAllocateStorage(payload)
: await params.pendingApi.allocateStorage(payload)
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
if (!ok) {
ElMessage.error(res?.message || (isCancel ? '取消分配储位失败' : '储位分配失败'))
return
}
ElMessage.success(res.message || (isCancel ? '取消分配储位已提交' : '储位分配已提交'))
storageDialogVisible.value = false
params.clearSelection()
await params.loadData()
} catch {
ElMessage.error(isCancel ? '取消分配储位失败' : '储位分配失败')
} finally {
storageAllocateLoading.value = false
}
}
function openUpdateOrderMetaDialog(mode: 'express' | 'platform') {
const rows = params.getSelectedRows()
if (!rows.length) {
ElMessage.warning(mode === 'express' ? '请先勾选需要修改快递的订单' : '请先勾选需要修改平台的订单')
return
}
const ids = params.getSelectedIds()
if (!ids.length) {
ElMessage.error('选中行缺少订单 id,请刷新后重试')
return
}
updateOrderMetaDialogMode.value = mode
updateOrderMetaOrderIds.value = [...ids]
updateOrderMetaForm.code = ''
updateOrderMetaDialogVisible.value = true
}
async function submitUpdateOrderMeta() {
if (updateOrderMetaLoading.value) return
const order_ids = [...updateOrderMetaOrderIds.value]
const code = normalizeCode(updateOrderMetaForm.code)
if (!order_ids.length) {
ElMessage.error('没有可提交的订单')
return
}
if (!code) {
ElMessage.warning(updateOrderMetaDialogMode.value === 'express' ? '请输入快递编码' : '请输入平台编码')
return
}
updateOrderMetaLoading.value = true
try {
const res = updateOrderMetaDialogMode.value === 'express'
? await params.pendingApi.updateOrderExpress({ order_ids, express_code: code })
: await params.pendingApi.updateOrderPlatform({ order_ids, code })
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
if (!ok) {
ElMessage.error(res?.message || '批量修改失败')
return
}
ElMessage.success(`${updateOrderMetaDialogMode.value === 'express' ? '快递信息' : '平台信息'}修改成功 ${Number(res?.data?.updated_count ?? order_ids.length) || order_ids.length} 条`)
updateOrderMetaDialogVisible.value = false
params.clearSelection()
await params.loadData()
} catch {
ElMessage.error(updateOrderMetaDialogMode.value === 'express' ? '修改快递失败' : '修改平台失败')
} finally {
updateOrderMetaLoading.value = false
}
}
function openCloneOrderDialog() {
const rows = params.getSelectedRows()
if (rows.length !== 1) {
ElMessage.warning('请选择 1 条订单进行克隆')
return
}
const row = rows[0] || {}
const orderId = normalizePositiveIntId(row?.order_id ?? row?.id)
if (!orderId) {
ElMessage.error('未识别到有效订单ID')
return
}
cloneSourceOrderId.value = orderId
cloneSourceOrderCode.value = String(row?.delivery_order_code || '')
cloneOrderDialogVisible.value = true
}
async function submitCloneOrder() {
if (!cloneSourceOrderId.value || cloneOrderLoading.value) return
cloneOrderLoading.value = true
try {
const res = await params.pendingApi.cloneOrder({ order_id: cloneSourceOrderId.value })
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
if (!ok) {
ElMessage.error(res?.message || '克隆订单失败')
return
}
const data = res?.data || {}
ElMessage.success(`克隆成功:原订单 ${data.source_order_id ?? cloneSourceOrderId.value} -> 新订单 ${data.new_order_id ?? '-'}`)
cloneOrderDialogVisible.value = false
params.clearSelection()
await params.loadData()
} catch {
ElMessage.error('克隆订单失败')
} finally {
cloneOrderLoading.value = false
}
}
function openSyncOrderIdsDialog() {
const selectedIds = params.getSelectedIds()
if (!selectedIds.length) {
ElMessage.warning('请先勾选需要同步的订单')
return
}
syncOrderIdsDialogVisible.value = true
}
async function submitSyncOrderIds() {
if (syncOrderIdsLoading.value) return
const order_ids = params.getSelectedIds()
if (!order_ids.length) {
ElMessage.warning('请先勾选需要同步的订单')
return
}
syncOrderIdsLoading.value = true
try {
const res = await params.pendingApi.syncOrderIds({ order_ids })
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
if (!ok) {
ElMessage.error(res?.message || '同步订单ID失败')
return
}
const count = Array.isArray(res?.data?.order_ids) ? res.data.order_ids.length : order_ids.length
ElMessage.success((res?.message || '同步请求已受理') + `(${count} 条)`)
syncOrderIdsDialogVisible.value = false
await params.loadData()
} catch {
ElMessage.error('同步订单ID失败')
} finally {
syncOrderIdsLoading.value = false
}
}
function openAllocateExpressDialog() {
const rows = params.getSelectedRows()
if (!rows.length) {
ElMessage.warning('请先勾选需要分配快递号的订单')
return
}
const invalid = rows.filter((row: any) => normalizePositiveIntId(row?.order_id ?? row?.id) === null)
if (invalid.length) {
ElMessage.error('存在无法识别有效 order_id 的行,请刷新列表后重试')
return
}
allocatePendingRows.value = rows.map((row: any) => ({ ...row }))
allocateDialogVisible.value = true
}
async function submitAllocateExpress() {
const rows = allocatePendingRows.value
if (!rows.length || allocateLoading.value) return
allocateLoading.value = true
try {
const orders = buildAllocateExpressPayload(rows)
if (!orders.length) {
ElMessage.error('没有有效的订单 ID,无法分配快递号')
return
}
const res = await params.pendingApi.allocateExpressCode({ orders })
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
if (!ok) {
ElMessage.error(res?.message || '分配快递号失败')
return
}
const data = res.data || {}
const summary = data.summary
const successLen = Array.isArray(data.success) ? data.success.length : undefined
const failedLen = Array.isArray(data.failed) ? data.failed.length : undefined
let extra = ''
if (summary && typeof summary === 'object') extra = ` ${JSON.stringify(summary)}`
else if (successLen !== undefined || failedLen !== undefined) extra = ` 成功 ${successLen ?? '—'} 条,失败 ${failedLen ?? '—'} 条`
ElMessage.success((res.message || '分配请求已提交') + extra)
allocateDialogVisible.value = false
params.clearSelection()
await params.loadData()
} catch {
ElMessage.error('分配快递号失败')
} finally {
allocateLoading.value = false
}
}
function resetAllocateDialog() {
allocatePendingRows.value = []
}
function resetStorageAllocateDialog() {
storageDialogMode.value = 'allocate'
storagePendingOrderIds.value = []
storageForm.allowStorageLocation = false
}
function resetUpdateOrderMetaDialog() {
updateOrderMetaDialogMode.value = 'express'
updateOrderMetaOrderIds.value = []
updateOrderMetaForm.code = ''
}
function resetCloneOrderDialog() {
cloneSourceOrderId.value = null
cloneSourceOrderCode.value = ''
}
function resetSyncOrderIdsDialog() {}
return {
actionMap,
dialogState: {
allocateDialogVisible,
allocateLoading,
storageDialogVisible,
storageDialogMode,
storagePendingOrderIds,
storageAllocateLoading,
storageForm,
updateOrderMetaDialogVisible,
updateOrderMetaDialogMode,
updateOrderMetaOrderIds,
updateOrderMetaForm,
updateOrderMetaOptions,
updateOrderMetaLoading,
cloneOrderDialogVisible,
cloneOrderLoading,
cloneSourceOrderId,
cloneSourceOrderCode,
syncOrderIdsDialogVisible,
syncOrderIdsLoading
},
submitStorageAllocate,
submitUpdateOrderMeta,
submitCloneOrder,
submitSyncOrderIds,
submitAllocateExpress,
resetAllocateDialog,
resetStorageAllocateDialog,
resetUpdateOrderMetaDialog,
resetCloneOrderDialog,
resetSyncOrderIdsDialog
}
}

View File

@ -6,7 +6,7 @@
<el-button size="small" type="primary" @click="handleTransfer" v-if="showTransferBtn">移库</el-button>
</el-button-group>
</div>
<el-dialog v-model="dialogVisible" title="移库" width="480px">
<el-dialog v-model="dialogVisible" title="移库" width="480px" align-center>
<div style="display:flex;flex-direction:column;gap:8px;">
<el-input v-model="targetSpace" placeholder="目标库位 ID,扫码或输入" clearable />
<div style="min-height:22px;margin-top:4px;">
@ -140,30 +140,21 @@ async function confirmTransfer() {
const row = currentRow.value || props.row || {}
transferLoading.value = true
try {
// resolve target_space_id: if numeric use directly, otherwise try search API to get id
// target_space_id 统一取 index.searchSpace 返回的首项 id
const raw = String(targetSpace.value).trim()
let targetSpaceId: number | null = null
const num = Number(raw)
if (!isNaN(num) && raw !== '') targetSpaceId = num
if (targetSpaceId === null) {
// try searchSpace to resolve by code/keyword
try {
const res: any = await indexApi.searchSpace({ keyword: raw })
const data = res && (res.data || res.list || res)
const item = Array.isArray(data) ? (data[0] || null) : data
if (item) targetSpaceId = item.id || item.space_id || null
} catch (e) {
// ignore, will attempt warehouse.getSpaceInfo fallback
try {
const res: any = await indexApi.searchSpace({ keyword: raw })
const data = res && (res.data || res.list || res)
const item = Array.isArray(data) ? (data[0] || null) : data
if (item?.id !== undefined && item?.id !== null) {
const parsed = Number(item.id)
if (!isNaN(parsed)) targetSpaceId = parsed
}
}
if (targetSpaceId === null) {
// fallback: if numeric parse failed earlier, try warehouse.getSpaceInfo with raw (some backends accept code)
const maybeNum = Number(raw)
if (!isNaN(maybeNum)) targetSpaceId = maybeNum
}
} catch (e) {}
if (!targetSpaceId) {
ElMessage.warning('未解析到目标库位 ID,请检查输入或使用扫码')
ElMessage.warning('未找到目标库位,请检查输入后重试')
transferLoading.value = false
return
}

View File

@ -17,7 +17,7 @@
<el-button type="link" size="small" @click="handleAddSpace">
修复货架
</el-button>
<el-button type="link" size="small" @click="handleAddSpace">
<el-button type="link" size="small" :loading="exportLoading" @click="handleExportRackSpaces">
导出
</el-button>
<el-button type="link" size="small" @click="handleAddSpace">
@ -74,6 +74,7 @@ const emit = defineEmits(['edit-warehouse','edit-zone','edit-rack','edit-space',
const rackSpaces = ref<any[]>([])
const loading = ref(false)
const exportLoading = ref(false)
const useSpaceCount = ref(0)
const canUseSpacecCount = ref(0)
const canNotUseSpace = ref(0)
@ -176,6 +177,60 @@ async function handleAddSpace() {
}
}
function normalizeDownloadUrl(fileUrl: string) {
if (!fileUrl) return ''
if (/^https?:\/\//i.test(fileUrl)) return fileUrl
const normalizedPath = fileUrl.startsWith('/') ? fileUrl : `/${fileUrl}`
const baseApi = String(import.meta.env.VITE_APP_BASE_API || '')
const normalizedBase = baseApi.endsWith('/') ? baseApi.slice(0, -1) : baseApi
if (normalizedBase.startsWith('/')) {
return `${window.location.origin}${normalizedBase}${normalizedPath}`
}
return `${window.location.origin}${normalizedPath}`
}
async function handleExportRackSpaces() {
if (exportLoading.value) return
exportLoading.value = true
try {
if (!props.rack?.id) {
ElMessage.warning('未获取到货架信息,无法导出')
return
}
const response: any = await warehouseApi.exportRackSpaces(props.rack.id)
const isSuccess = response && (response.code === 200 || response.flag === 'success')
if (!isSuccess) {
ElMessage.error(response?.message || '导出失败')
return
}
const fileUrl = String(response?.fileUrl || '').trim()
if (!fileUrl) {
ElMessage.error('导出文件地址为空')
return
}
const downloadUrl = normalizeDownloadUrl(fileUrl)
const fileName = String(response?.fileName || `warehouse-rack-spaces-${Date.now()}.xlsx`).trim()
const link = document.createElement('a')
link.href = downloadUrl
link.download = fileName
link.target = '_blank'
document.body.appendChild(link)
link.click()
link.remove()
ElMessage.success(response?.message || '导出成功')
} catch (error) {
console.error('导出货架仓位信息模板失败:', error)
ElMessage.error('导出失败')
} finally {
exportLoading.value = false
}
}
function handleEditSpace(space: any) { emit('edit-space', space) }
function handleSpaceClick(space: any) { emit('space-click', space) }

View File

@ -3,469 +3,20 @@
{
"接口": "user.login",
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3NzcyODM0NDIsImV4cCI6MTc3NzI5Nzg0Mn0.D1StcWnOIz2wflK2mIK0TtsRnkM4UxubHqZTOWiOiM4"
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3NzczNjg3MTgsImV4cCI6MTc3NzM4MzExOH0.fGpEVBs6wjnNl3bUu-W9GRvENk4HPqmtU7ALMtdffvY"
}
},
{
"接口": "order.pendingOrder.list",
"data": {
"list": [
{
"id": 35,
"delivery_order_code": "JY2026042719964",
"pre_delivery_order_code": "",
"pre_delivery_order_id": "",
"order_type": "JYCK",
"order_flag": "",
"source_order_codes": "",
"sys_platform_code": "TB",
"sys_platform_name": "淘宝",
"create_at": "2026-04-27T09:12:45.000Z",
"place_order_time": "2026-04-27T09:11:58.000Z",
"pay_time": "2026-04-27T09:11:58.000Z",
"pay_no": "",
"service_code": null,
"operator_name": "1",
"operate_time": "2026-04-27T09:12:45.000Z",
"delivery_time": null,
"shop_nick": "加能量袜子店",
"seller_nick": "1",
"buyer_nick": "111118022222222",
"total_amount": "101.00",
"item_amount": "101.00",
"discount_amount": "0.00",
"freight": "0.00",
"ar_amount": "0.00",
"got_amount": "0.00",
"service_fee": null,
"logistics_name": "申通快递",
"delivery_type": null,
"weight_type": "常规",
"is_urgency": "N",
"invoice_flag": "N",
"status": "pedding",
"name": "1111",
"zip_code": "",
"tel": "",
"mobile": "18022222222",
"email": "",
"province": "广东省",
"city": "江门市",
"area": "恩平市",
"town": "那吉镇",
"detail_address": "广东省 江门市 恩平市 那吉镇 111132",
"id_type": null,
"id_number": null,
"sync_status": "fin",
"items": "101384+101",
"items_count": 1,
"items_total": 101,
"items_weight": "0.00",
"wave_id": 0,
"post_status": "none",
"storage_status": "none",
"pick_status": "none",
"pack_status": "none",
"inspection_status": "padding",
"print_status": "none",
"claim_status": "none",
"outbound_status": "none",
"lock_status": "none",
"intercept_status": "none",
"sys_logistics_name": null,
"express_numbers": [
"776442271858575",
"776442271858574",
"776442271858576"
],
"waybill_codes": [
"776442271858575",
"776442271858574",
"776442271858576"
]
},
{
"id": 18,
"delivery_order_code": "JY2026042225858",
"pre_delivery_order_code": "",
"pre_delivery_order_id": "",
"order_type": "JYCK",
"order_flag": "",
"source_order_codes": "",
"sys_platform_code": "KS",
"sys_platform_name": "快手",
"create_at": "2026-04-22T14:35:08.000Z",
"place_order_time": "2026-04-22T14:34:10.000Z",
"pay_time": "2026-04-22T14:34:10.000Z",
"pay_no": "",
"service_code": null,
"operator_name": "1",
"operate_time": "2026-04-22T14:35:08.000Z",
"delivery_time": null,
"shop_nick": "加能量袜子店",
"seller_nick": "1",
"buyer_nick": "2318022440198",
"total_amount": "30.00",
"item_amount": "30.00",
"discount_amount": "0.00",
"freight": "0.00",
"ar_amount": "0.00",
"got_amount": "0.00",
"service_fee": null,
"logistics_name": "申通快递",
"delivery_type": null,
"weight_type": "常规",
"is_urgency": "N",
"invoice_flag": "N",
"status": "pedding",
"name": "23",
"zip_code": "",
"tel": "",
"mobile": "18022440198",
"email": "",
"province": "广东省",
"city": "阳江市",
"area": "阳西县",
"town": "塘口镇",
"detail_address": "广东省 阳江市 阳西县 塘口镇 11111",
"id_type": null,
"id_number": null,
"sync_status": "fin",
"items": "101384+1",
"items_count": 1,
"items_total": 1,
"items_weight": "0.00",
"wave_id": 0,
"post_status": "fin",
"storage_status": "fin",
"pick_status": "none",
"pack_status": "none",
"inspection_status": "padding",
"print_status": "none",
"claim_status": "none",
"outbound_status": "none",
"lock_status": "none",
"intercept_status": "none",
"sys_logistics_name": null,
"express_numbers": [
"776442271858573",
"776442271858572"
],
"waybill_codes": [
"776442271858573",
"776442271858572"
]
},
{
"id": 32,
"delivery_order_code": "JY2026042425627",
"pre_delivery_order_code": "",
"pre_delivery_order_id": "",
"order_type": "JYCK",
"order_flag": "",
"source_order_codes": "",
"sys_platform_code": "KS",
"sys_platform_name": "快手",
"create_at": "2026-04-24T15:00:29.000Z",
"place_order_time": "2026-04-24T14:45:23.000Z",
"pay_time": "2026-04-24T14:45:23.000Z",
"pay_no": "",
"service_code": null,
"operator_name": "1",
"operate_time": "2026-04-24T15:00:29.000Z",
"delivery_time": null,
"shop_nick": "加能量袜子店",
"seller_nick": "1",
"buyer_nick": "22218022440198",
"total_amount": "3000.00",
"item_amount": "3000.00",
"discount_amount": "0.00",
"freight": "0.00",
"ar_amount": "0.00",
"got_amount": "0.00",
"service_fee": null,
"logistics_name": "申通快递",
"delivery_type": null,
"weight_type": "常规",
"is_urgency": "N",
"invoice_flag": "N",
"status": "pedding",
"name": "222",
"zip_code": "",
"tel": "",
"mobile": "18022440198",
"email": "",
"province": "广东省",
"city": "阳江市",
"area": "阳春市",
"town": "石录矿区",
"detail_address": "广东省 阳江市 阳春市 石录矿区 2222",
"id_type": null,
"id_number": null,
"sync_status": "fin",
"items": "101384+100",
"items_count": 1,
"items_total": 100,
"items_weight": "0.00",
"wave_id": 0,
"post_status": "fin",
"storage_status": "fin",
"pick_status": "none",
"pack_status": "none",
"inspection_status": "padding",
"print_status": "none",
"claim_status": "none",
"outbound_status": "none",
"lock_status": "none",
"intercept_status": "none",
"sys_logistics_name": null,
"express_numbers": [
"776442398366706"
],
"waybill_codes": [
"776442398366706"
]
},
{
"id": 19,
"delivery_order_code": "JY2026042226043",
"pre_delivery_order_code": "",
"pre_delivery_order_id": "",
"order_type": "JYCK",
"order_flag": "",
"source_order_codes": "6952296874657584415",
"sys_platform_code": "DYXD",
"sys_platform_name": "抖音小店",
"create_at": "2026-04-22T14:44:21.000Z",
"place_order_time": "2026-04-22T14:43:37.000Z",
"pay_time": "2026-04-22T14:43:37.000Z",
"pay_no": "",
"service_code": null,
"operator_name": "1",
"operate_time": "2026-04-22T14:44:21.000Z",
"delivery_time": null,
"shop_nick": "玉露化妆品店",
"seller_nick": "1",
"buyer_nick": "2118022440111",
"total_amount": "30.00",
"item_amount": "30.00",
"discount_amount": "0.00",
"freight": "0.00",
"ar_amount": "0.00",
"got_amount": "0.00",
"service_fee": null,
"logistics_name": "申通快递",
"delivery_type": null,
"weight_type": "常规",
"is_urgency": "N",
"invoice_flag": "N",
"status": "pedding",
"name": "##URSajh/kuNMVVBAxeudRCtPX9GkUEf8kc4Ty5AH/vj6beMbIbDWMHlwQBLI3qZLT39zdqLl48F3LR2rPSKCpOtPaMuQZO8eBlnMgfnEGnpv6vJEUIi9K*CgYIASAHKAESPgo8Y19BraOGhsd2ppbwEdyEcto2mJPxXmrVqk78ZIjiUn9Gac600NEzRGAeNoa1TXMyivwfoIn+mFh73lFFGgA=#1##",
"zip_code": "",
"tel": "",
"mobile": "$$0kQnIyUE9bjhBfFCdXjeKiYfzPD7k1sfsPMGezad9clehoccCU65GcubeXNxn91oiudLZ4dGywwk9sdkAl8pYHrrx8y3/1CAc0hnGdR52DyyedZE*CgYIASAHKAESPgo8lk6sLu0U7VotzFtKdw6/zQX6BlqDXA1qU6i696azxIrgACA/d/K3HNUDuG4QoTLIlG/5WooZKxOnuqlJGgA=$1$$",
"email": "",
"province": "陕西省",
"city": "咸阳市",
"area": "渭城区",
"town": "周陵街道",
"detail_address": "##3+uEr9c6e/B4Wc2fAnpVQUiqa/5rKis/wycyj4HfITQvPwX/OQkVhM5I4vSqfbYFcech98f/Ehgr67NCKdFguvDhnmVTGFY2J4+4i776vTH+g5FbbjrZSQV2gdSoZg1cBEyrkJSN9wiVmav3YRnyWZBkpibJdysr/rR7vWtsOEHz*CgYIASAHKAESPgo8rNmCEvbuTBmkzToZc8oMvS6Imgwt4wkon0NnqHDkcqCOvQR/BQxK45CfxVUV5fiYBDyPfUt8lx5YCrmYGgA=#1##",
"id_type": null,
"id_number": null,
"sync_status": "fin",
"items": "101384+1",
"items_count": 1,
"items_total": 1,
"items_weight": "0.00",
"wave_id": 0,
"post_status": "fin",
"storage_status": "fin",
"pick_status": "none",
"pack_status": "none",
"inspection_status": "padding",
"print_status": "none",
"claim_status": "none",
"outbound_status": "none",
"lock_status": "none",
"intercept_status": "none",
"sys_logistics_name": null,
"express_numbers": [
"770315223039814"
],
"waybill_codes": [
"770315223039814"
]
}
],
"pagination": {
"page": 1,
"pageSize": 20,
"total": 4,
"totalPages": 1,
"hasPrevious": false,
"hasNext": false
}
}
"接口": "index.getLocationTypeList",
"data": null
},
{
"接口": "order.pendingOrder.detail",
"data": {
"detail": {
"id": 32,
"delivery_order_code": "JY2026042425627",
"pre_delivery_order_code": "",
"pre_delivery_order_id": "",
"order_type": "JYCK",
"warehouse_code": "100000",
"order_flag": "",
"source_platform_code": "TB",
"source_platform_name": "淘宝",
"create_channel": "QM",
"source_order_codes": "",
"sys_platform_code": "KS",
"sys_platform_name": "快手",
"create_at": "2026-04-24T15:00:29.000Z",
"delete_at": null,
"updated_at": "2026-04-26T14:24:56.000Z",
"place_order_time": "2026-04-24T14:45:23.000Z",
"pay_time": "2026-04-24T14:45:23.000Z",
"pay_no": "",
"service_code": null,
"operator_name": "1",
"operate_time": "2026-04-24T15:00:29.000Z",
"delivery_time": null,
"shop_nick": "加能量袜子店",
"seller_nick": "1",
"buyer_nick": "22218022440198",
"total_amount": "3000.00",
"item_amount": "3000.00",
"discount_amount": "0.00",
"freight": "0.00",
"ar_amount": "0.00",
"got_amount": "0.00",
"service_fee": null,
"logistics_code": "STO",
"logistics_name": "申通快递",
"sys_logistics_code": "STO",
"sys_logistics_name": "申通快递",
"express_code": "",
"logistics_area_code": "",
"delivery_type": null,
"weight_type": 0,
"is_urgency": "N",
"invoice_flag": "N",
"status": "pedding",
"name": "222",
"zip_code": "",
"tel": "",
"mobile": "18022440198",
"email": "",
"country_code": "CN",
"province": "广东省",
"city": "阳江市",
"area": "阳春市",
"town": "石录矿区",
"detail_address": "广东省 阳江市 阳春市 石录矿区 2222",
"id_type": null,
"id_number": null,
"oaid": null,
"sync_status": "fin",
"store_id": 1000000,
"warehouse_id": 100000,
"from_key": 24869601,
"items": "101384+100",
"items_count": 1,
"items_total": 100,
"items_weight": "0.00",
"items_hash": "afd965ded775c8a051e2c7a6fb65298a",
"items_crc": 2381027279,
"wave_id": 0,
"post_status": "fin",
"storage_status": "fin",
"pick_status": "none",
"pack_status": "none",
"sended_status": "none",
"inspection_status": "padding",
"step": 2,
"print_status": "none",
"claim_status": "none",
"outbound_status": "none",
"lock_status": "none",
"intercept_status": "none"
},
"items": [
{
"id": 39,
"order_id": 32,
"actual_price": "30.00",
"retail_price": "30.00",
"ext_code": "",
"inventory_type": "ZP",
"item_code": "011000000228",
"item_id": 1000649,
"item_name": "测试",
"order_line_no": "1",
"owner_code": "jky2025102001",
"plan_qty": 100,
"source_order_code": "",
"sub_source_order_code": "",
"extend_props": "{\"RealPayMoney\":\"3000\",\"shareAmount\":\"3000\"}",
"stock_id": 101384,
"item_snapshot": {
"id": 1000649,
"width": 0,
"height": 0,
"length": 0,
"volume": 0,
"barcode": "011000000228",
"stock_id": 101384,
"item_code": "011000000228",
"item_name": "测试",
"item_type": "ZC",
"brand_name": "",
"goods_code": "01100000",
"net_weight": 0,
"stock_unit": "个",
"category_id": 42,
"gross_weight": 0,
"retail_price": 0,
"sku_property": "默认规格3",
"category_name": "天豹云仓",
"inventory_type": "ZP"
},
"created_at": "2026-04-24T15:00:31.000Z",
"updated_at": "2026-04-24T15:00:31.000Z",
"createdAt": "2026-04-24T15:00:31.000Z",
"updatedAt": "2026-04-24T15:00:31.000Z",
"images": [
"https://ye4s.file.gzxunren.com//100000/images/20260421/EA414742C733521A513E6EE430415143.jpg",
"https://ye4s.file.gzxunren.com//100000/images/20260423/DCB409259C5653AEA53C367953569534.jpg"
]
}
],
"expresses": [
{
"waybill_code": "776442398366706",
"logistics_code": "",
"logistics_name": "",
"logistics_interface_id": 2
}
],
"logs": [
{
"id": 13123,
"operation_code": "WAYBILL",
"operator_name": "阿猫",
"created_at": "2026-04-24 23:03:29",
"external_log_type": "NONE",
"external_log_id": null,
"platform_code": "web",
"message": "订单32获取快递单成功,单号:776442398366706",
"operation_name": "WAYBILL",
"platform_name": "网页后台"
}
]
}
"接口": "warehouse.batchUpdateSpaceInfo",
"data": null
},
{
"接口": "warehouse.exportRackSpaces",
"data": null
}
]
```

View File

@ -1,11 +1,11 @@
# 接口
- 更新时间: 2026-04-25 11:55:22
- 更新时间: 2026-04-28 17:51:49
- 扫描目录: `src\api`
- 模块数: 30
- API 文件数: 30
- 接口数: 236
- 已启用: 208
- 接口数: 239
- 已启用: 211
- 占位接口: 2
## 模块统计
@ -14,7 +14,7 @@
| --- | ---: | ---: | ---: | ---: |
| config | 1 | 1 | 0 | 0 |
| dashboard | 1 | 6 | 6 | 0 |
| index | 1 | 16 | 14 | 1 |
| index | 1 | 17 | 15 | 1 |
| order.archiveorder | 1 | 2 | 2 | 0 |
| order.deliveryexpectionorder | 1 | 2 | 2 | 0 |
| order.deliveryorder | 1 | 2 | 2 | 0 |
@ -41,7 +41,7 @@
| store | 1 | 6 | 6 | 0 |
| storewarehouse.store | 1 | 11 | 11 | 0 |
| user | 1 | 9 | 9 | 0 |
| warehouse | 1 | 21 | 20 | 0 |
| warehouse | 1 | 23 | 22 | 0 |
## 接口明细
@ -60,6 +60,7 @@
| index | getExpressProductTypeList | index.getExpressProductTypeList | POST | 是 | 否 | index/index.ts | |
| index | getI18nMessage | index.getI18nMessage | POST | 是 | 否 | index/index.ts | |
| index | getImages | index.getImages | POST | 是 | 否 | index/index.ts | |
| index | getLocationTypeList | index.getLocationTypeList | POST | 是 | 否 | index/index.ts | |
| index | getMessageDetail | index.getMessageDetail | POST | 是 | 否 | index/index.ts | |
| index | getPlatformList | index.getPlatformList | POST | 是 | 否 | index/index.ts | 表单用 |
| index | listInterfaceTypes | index.listInterfaceTypes | POST | 是 | 否 | index/index.ts | |
@ -262,6 +263,7 @@
| user | logout | user.logout | POST | 是 | 否 | user/user.ts | |
| user | register | user.register | POST | 是 | 否 | user/user.ts | |
| user | unbindWechat | user.unbindWechat | POST | 是 | 否 | user/user.ts | |
| warehouse | batchUpdateSpaceInfo | warehouse.batchUpdateSpaceInfo | POST | 是 | 否 | warehouse/warehouse.ts | |
| warehouse | checkBarcodeUnique | warehouse.checkBarcodeUnique | POST | 是 | 否 | warehouse/warehouse.ts | |
| warehouse | checkConnectivity | warehouse.checkConnectivity | POST | 否 | 否 | warehouse/warehouse.ts | |
| warehouse | create | warehouse.create | POST | 是 | 否 | warehouse/warehouse.ts | |
@ -269,6 +271,7 @@
| warehouse | createRackWithSpaces | warehouse.createRackWithSpaces | POST | 是 | 否 | warehouse/warehouse.ts | |
| warehouse | deleteZone | warehouse.delete | POST | 是 | 否 | warehouse/warehouse.ts | |
| warehouse | detail | warehouse.detail | POST | 是 | 否 | warehouse/warehouse.ts | |
| warehouse | exportRackSpaces | warehouse.exportRackSpaces | POST | 是 | 否 | warehouse/warehouse.ts | |
| warehouse | getAreaRacks | warehouse.getAreaRacks | POST | 是 | 否 | warehouse/warehouse.ts | |
| warehouse | getChildren | warehouse.getChildren | POST | 是 | 否 | warehouse/warehouse.ts | |
| warehouse | getPath | warehouse.getPath | POST | 是 | 否 | warehouse/warehouse.ts | |

View File

@ -8,21 +8,17 @@
}
},
{
"method": "order.pendingOrder.list",
"body": {}
"method": "index.getLocationTypeList",
"body": {
}
},
{
"method": "order.pendingOrder.detail",
"method": "warehouse.batchUpdateSpaceInfo",
"body": {
"id": 32,
"ids": [
32
],
"tableType": "order"
}
},
{
"method": "",
"method": "warehouse.exportRackSpaces",
"body": {}
},
{

View File

@ -1,16 +1,43 @@
{
"数据一览": {
"当前请求数": 3,
"成功数": 3,
"全部请求数": 3,
"成功数与全部请求数": "3/3",
"当前请求数": 4,
"成功数": 2,
"全部请求数": 4,
"成功数与全部请求数": "2/4",
"成功判定名单": [
"ok",
"成功",
"登录成功",
"success"
],
"失败接口": [],
"失败接口": [
{
"接口": "warehouse.batchUpdateSpaceInfo",
"message": "批量数据不能为空",
"code": 0,
"模块目录": "warehouse",
"api封装": [
{
"文件": "src/api/warehouse/warehouse.ts",
"方法名": "batchUpdateSpaceInfo"
}
],
"引用页面": []
},
{
"接口": "warehouse.exportRackSpaces",
"message": "导出成功",
"code": 200,
"模块目录": "warehouse",
"api封装": [
{
"文件": "src/api/warehouse/warehouse.ts",
"方法名": "exportRackSpaces"
}
],
"引用页面": []
}
],
"空数据接口": []
},
"详情": [
@ -19,473 +46,26 @@
"message": "登录成功",
"code": 200,
"data": {
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3NzcyODM0NDIsImV4cCI6MTc3NzI5Nzg0Mn0.D1StcWnOIz2wflK2mIK0TtsRnkM4UxubHqZTOWiOiM4"
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3NzczNjg3MTgsImV4cCI6MTc3NzM4MzExOH0.fGpEVBs6wjnNl3bUu-W9GRvENk4HPqmtU7ALMtdffvY"
}
},
{
"接口": "order.pendingOrder.list",
"接口": "index.getLocationTypeList",
"message": "ok",
"code": 1,
"data": {
"list": [
{
"id": 35,
"delivery_order_code": "JY2026042719964",
"pre_delivery_order_code": "",
"pre_delivery_order_id": "",
"order_type": "JYCK",
"order_flag": "",
"source_order_codes": "",
"sys_platform_code": "TB",
"sys_platform_name": "淘宝",
"create_at": "2026-04-27T09:12:45.000Z",
"place_order_time": "2026-04-27T09:11:58.000Z",
"pay_time": "2026-04-27T09:11:58.000Z",
"pay_no": "",
"service_code": null,
"operator_name": "1",
"operate_time": "2026-04-27T09:12:45.000Z",
"delivery_time": null,
"shop_nick": "加能量袜子店",
"seller_nick": "1",
"buyer_nick": "111118022222222",
"total_amount": "101.00",
"item_amount": "101.00",
"discount_amount": "0.00",
"freight": "0.00",
"ar_amount": "0.00",
"got_amount": "0.00",
"service_fee": null,
"logistics_name": "申通快递",
"delivery_type": null,
"weight_type": "常规",
"is_urgency": "N",
"invoice_flag": "N",
"status": "pedding",
"name": "1111",
"zip_code": "",
"tel": "",
"mobile": "18022222222",
"email": "",
"province": "广东省",
"city": "江门市",
"area": "恩平市",
"town": "那吉镇",
"detail_address": "广东省 江门市 恩平市 那吉镇 111132",
"id_type": null,
"id_number": null,
"sync_status": "fin",
"items": "101384+101",
"items_count": 1,
"items_total": 101,
"items_weight": "0.00",
"wave_id": 0,
"post_status": "none",
"storage_status": "none",
"pick_status": "none",
"pack_status": "none",
"inspection_status": "padding",
"print_status": "none",
"claim_status": "none",
"outbound_status": "none",
"lock_status": "none",
"intercept_status": "none",
"sys_logistics_name": null,
"express_numbers": [
"776442271858575",
"776442271858574",
"776442271858576"
],
"waybill_codes": [
"776442271858575",
"776442271858574",
"776442271858576"
]
},
{
"id": 18,
"delivery_order_code": "JY2026042225858",
"pre_delivery_order_code": "",
"pre_delivery_order_id": "",
"order_type": "JYCK",
"order_flag": "",
"source_order_codes": "",
"sys_platform_code": "KS",
"sys_platform_name": "快手",
"create_at": "2026-04-22T14:35:08.000Z",
"place_order_time": "2026-04-22T14:34:10.000Z",
"pay_time": "2026-04-22T14:34:10.000Z",
"pay_no": "",
"service_code": null,
"operator_name": "1",
"operate_time": "2026-04-22T14:35:08.000Z",
"delivery_time": null,
"shop_nick": "加能量袜子店",
"seller_nick": "1",
"buyer_nick": "2318022440198",
"total_amount": "30.00",
"item_amount": "30.00",
"discount_amount": "0.00",
"freight": "0.00",
"ar_amount": "0.00",
"got_amount": "0.00",
"service_fee": null,
"logistics_name": "申通快递",
"delivery_type": null,
"weight_type": "常规",
"is_urgency": "N",
"invoice_flag": "N",
"status": "pedding",
"name": "23",
"zip_code": "",
"tel": "",
"mobile": "18022440198",
"email": "",
"province": "广东省",
"city": "阳江市",
"area": "阳西县",
"town": "塘口镇",
"detail_address": "广东省 阳江市 阳西县 塘口镇 11111",
"id_type": null,
"id_number": null,
"sync_status": "fin",
"items": "101384+1",
"items_count": 1,
"items_total": 1,
"items_weight": "0.00",
"wave_id": 0,
"post_status": "fin",
"storage_status": "fin",
"pick_status": "none",
"pack_status": "none",
"inspection_status": "padding",
"print_status": "none",
"claim_status": "none",
"outbound_status": "none",
"lock_status": "none",
"intercept_status": "none",
"sys_logistics_name": null,
"express_numbers": [
"776442271858573",
"776442271858572"
],
"waybill_codes": [
"776442271858573",
"776442271858572"
]
},
{
"id": 32,
"delivery_order_code": "JY2026042425627",
"pre_delivery_order_code": "",
"pre_delivery_order_id": "",
"order_type": "JYCK",
"order_flag": "",
"source_order_codes": "",
"sys_platform_code": "KS",
"sys_platform_name": "快手",
"create_at": "2026-04-24T15:00:29.000Z",
"place_order_time": "2026-04-24T14:45:23.000Z",
"pay_time": "2026-04-24T14:45:23.000Z",
"pay_no": "",
"service_code": null,
"operator_name": "1",
"operate_time": "2026-04-24T15:00:29.000Z",
"delivery_time": null,
"shop_nick": "加能量袜子店",
"seller_nick": "1",
"buyer_nick": "22218022440198",
"total_amount": "3000.00",
"item_amount": "3000.00",
"discount_amount": "0.00",
"freight": "0.00",
"ar_amount": "0.00",
"got_amount": "0.00",
"service_fee": null,
"logistics_name": "申通快递",
"delivery_type": null,
"weight_type": "常规",
"is_urgency": "N",
"invoice_flag": "N",
"status": "pedding",
"name": "222",
"zip_code": "",
"tel": "",
"mobile": "18022440198",
"email": "",
"province": "广东省",
"city": "阳江市",
"area": "阳春市",
"town": "石录矿区",
"detail_address": "广东省 阳江市 阳春市 石录矿区 2222",
"id_type": null,
"id_number": null,
"sync_status": "fin",
"items": "101384+100",
"items_count": 1,
"items_total": 100,
"items_weight": "0.00",
"wave_id": 0,
"post_status": "fin",
"storage_status": "fin",
"pick_status": "none",
"pack_status": "none",
"inspection_status": "padding",
"print_status": "none",
"claim_status": "none",
"outbound_status": "none",
"lock_status": "none",
"intercept_status": "none",
"sys_logistics_name": null,
"express_numbers": [
"776442398366706"
],
"waybill_codes": [
"776442398366706"
]
},
{
"id": 19,
"delivery_order_code": "JY2026042226043",
"pre_delivery_order_code": "",
"pre_delivery_order_id": "",
"order_type": "JYCK",
"order_flag": "",
"source_order_codes": "6952296874657584415",
"sys_platform_code": "DYXD",
"sys_platform_name": "抖音小店",
"create_at": "2026-04-22T14:44:21.000Z",
"place_order_time": "2026-04-22T14:43:37.000Z",
"pay_time": "2026-04-22T14:43:37.000Z",
"pay_no": "",
"service_code": null,
"operator_name": "1",
"operate_time": "2026-04-22T14:44:21.000Z",
"delivery_time": null,
"shop_nick": "玉露化妆品店",
"seller_nick": "1",
"buyer_nick": "2118022440111",
"total_amount": "30.00",
"item_amount": "30.00",
"discount_amount": "0.00",
"freight": "0.00",
"ar_amount": "0.00",
"got_amount": "0.00",
"service_fee": null,
"logistics_name": "申通快递",
"delivery_type": null,
"weight_type": "常规",
"is_urgency": "N",
"invoice_flag": "N",
"status": "pedding",
"name": "##URSajh/kuNMVVBAxeudRCtPX9GkUEf8kc4Ty5AH/vj6beMbIbDWMHlwQBLI3qZLT39zdqLl48F3LR2rPSKCpOtPaMuQZO8eBlnMgfnEGnpv6vJEUIi9K*CgYIASAHKAESPgo8Y19BraOGhsd2ppbwEdyEcto2mJPxXmrVqk78ZIjiUn9Gac600NEzRGAeNoa1TXMyivwfoIn+mFh73lFFGgA=#1##",
"zip_code": "",
"tel": "",
"mobile": "$$0kQnIyUE9bjhBfFCdXjeKiYfzPD7k1sfsPMGezad9clehoccCU65GcubeXNxn91oiudLZ4dGywwk9sdkAl8pYHrrx8y3/1CAc0hnGdR52DyyedZE*CgYIASAHKAESPgo8lk6sLu0U7VotzFtKdw6/zQX6BlqDXA1qU6i696azxIrgACA/d/K3HNUDuG4QoTLIlG/5WooZKxOnuqlJGgA=$1$$",
"email": "",
"province": "陕西省",
"city": "咸阳市",
"area": "渭城区",
"town": "周陵街道",
"detail_address": "##3+uEr9c6e/B4Wc2fAnpVQUiqa/5rKis/wycyj4HfITQvPwX/OQkVhM5I4vSqfbYFcech98f/Ehgr67NCKdFguvDhnmVTGFY2J4+4i776vTH+g5FbbjrZSQV2gdSoZg1cBEyrkJSN9wiVmav3YRnyWZBkpibJdysr/rR7vWtsOEHz*CgYIASAHKAESPgo8rNmCEvbuTBmkzToZc8oMvS6Imgwt4wkon0NnqHDkcqCOvQR/BQxK45CfxVUV5fiYBDyPfUt8lx5YCrmYGgA=#1##",
"id_type": null,
"id_number": null,
"sync_status": "fin",
"items": "101384+1",
"items_count": 1,
"items_total": 1,
"items_weight": "0.00",
"wave_id": 0,
"post_status": "fin",
"storage_status": "fin",
"pick_status": "none",
"pack_status": "none",
"inspection_status": "padding",
"print_status": "none",
"claim_status": "none",
"outbound_status": "none",
"lock_status": "none",
"intercept_status": "none",
"sys_logistics_name": null,
"express_numbers": [
"770315223039814"
],
"waybill_codes": [
"770315223039814"
]
}
],
"pagination": {
"page": 1,
"pageSize": 20,
"total": 4,
"totalPages": 1,
"hasPrevious": false,
"hasNext": false
}
}
"code": 200,
"data": null
},
{
"接口": "order.pendingOrder.detail",
"message": "ok",
"code": 1,
"data": {
"detail": {
"id": 32,
"delivery_order_code": "JY2026042425627",
"pre_delivery_order_code": "",
"pre_delivery_order_id": "",
"order_type": "JYCK",
"warehouse_code": "100000",
"order_flag": "",
"source_platform_code": "TB",
"source_platform_name": "淘宝",
"create_channel": "QM",
"source_order_codes": "",
"sys_platform_code": "KS",
"sys_platform_name": "快手",
"create_at": "2026-04-24T15:00:29.000Z",
"delete_at": null,
"updated_at": "2026-04-26T14:24:56.000Z",
"place_order_time": "2026-04-24T14:45:23.000Z",
"pay_time": "2026-04-24T14:45:23.000Z",
"pay_no": "",
"service_code": null,
"operator_name": "1",
"operate_time": "2026-04-24T15:00:29.000Z",
"delivery_time": null,
"shop_nick": "加能量袜子店",
"seller_nick": "1",
"buyer_nick": "22218022440198",
"total_amount": "3000.00",
"item_amount": "3000.00",
"discount_amount": "0.00",
"freight": "0.00",
"ar_amount": "0.00",
"got_amount": "0.00",
"service_fee": null,
"logistics_code": "STO",
"logistics_name": "申通快递",
"sys_logistics_code": "STO",
"sys_logistics_name": "申通快递",
"express_code": "",
"logistics_area_code": "",
"delivery_type": null,
"weight_type": 0,
"is_urgency": "N",
"invoice_flag": "N",
"status": "pedding",
"name": "222",
"zip_code": "",
"tel": "",
"mobile": "18022440198",
"email": "",
"country_code": "CN",
"province": "广东省",
"city": "阳江市",
"area": "阳春市",
"town": "石录矿区",
"detail_address": "广东省 阳江市 阳春市 石录矿区 2222",
"id_type": null,
"id_number": null,
"oaid": null,
"sync_status": "fin",
"store_id": 1000000,
"warehouse_id": 100000,
"from_key": 24869601,
"items": "101384+100",
"items_count": 1,
"items_total": 100,
"items_weight": "0.00",
"items_hash": "afd965ded775c8a051e2c7a6fb65298a",
"items_crc": 2381027279,
"wave_id": 0,
"post_status": "fin",
"storage_status": "fin",
"pick_status": "none",
"pack_status": "none",
"sended_status": "none",
"inspection_status": "padding",
"step": 2,
"print_status": "none",
"claim_status": "none",
"outbound_status": "none",
"lock_status": "none",
"intercept_status": "none"
},
"items": [
{
"id": 39,
"order_id": 32,
"actual_price": "30.00",
"retail_price": "30.00",
"ext_code": "",
"inventory_type": "ZP",
"item_code": "011000000228",
"item_id": 1000649,
"item_name": "测试",
"order_line_no": "1",
"owner_code": "jky2025102001",
"plan_qty": 100,
"source_order_code": "",
"sub_source_order_code": "",
"extend_props": "{\"RealPayMoney\":\"3000\",\"shareAmount\":\"3000\"}",
"stock_id": 101384,
"item_snapshot": {
"id": 1000649,
"width": 0,
"height": 0,
"length": 0,
"volume": 0,
"barcode": "011000000228",
"stock_id": 101384,
"item_code": "011000000228",
"item_name": "测试",
"item_type": "ZC",
"brand_name": "",
"goods_code": "01100000",
"net_weight": 0,
"stock_unit": "个",
"category_id": 42,
"gross_weight": 0,
"retail_price": 0,
"sku_property": "默认规格3",
"category_name": "天豹云仓",
"inventory_type": "ZP"
},
"created_at": "2026-04-24T15:00:31.000Z",
"updated_at": "2026-04-24T15:00:31.000Z",
"createdAt": "2026-04-24T15:00:31.000Z",
"updatedAt": "2026-04-24T15:00:31.000Z",
"images": [
"https://ye4s.file.gzxunren.com//100000/images/20260421/EA414742C733521A513E6EE430415143.jpg",
"https://ye4s.file.gzxunren.com//100000/images/20260423/DCB409259C5653AEA53C367953569534.jpg"
]
}
],
"expresses": [
{
"waybill_code": "776442398366706",
"logistics_code": "",
"logistics_name": "",
"logistics_interface_id": 2
}
],
"logs": [
{
"id": 13123,
"operation_code": "WAYBILL",
"operator_name": "阿猫",
"created_at": "2026-04-24 23:03:29",
"external_log_type": "NONE",
"external_log_id": null,
"platform_code": "web",
"message": "订单32获取快递单成功,单号:776442398366706",
"operation_name": "WAYBILL",
"platform_name": "网页后台"
}
]
}
"接口": "warehouse.batchUpdateSpaceInfo",
"message": "批量数据不能为空",
"code": 0,
"data": null
},
{
"接口": "warehouse.exportRackSpaces",
"message": "导出成功",
"code": 200,
"data": null
}
]
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {
@ -12,26 +12,49 @@
"label": "全部"
}
},
"totalInterfaceCount": 205,
"totalInterfaceCount": 208,
"changes": {
"summary": {
"moduleAdded": 0,
"moduleDeleted": 0,
"moduleUpdated": 0,
"moduleUpdated": 1,
"interfaceAdded": 0,
"interfaceDeleted": 0,
"interfaceParamsUpdated": 0,
"interfaceParamsUpdated": 1,
"interfaceResponseUpdated": 0
},
"moduleUpdates": {
"added": [],
"deleted": [],
"updated": []
"updated": [
{
"moduleName": "仓库模块",
"moduleKey": "warehouse",
"folder": "warehouse",
"previousModuleName": "仓库模块",
"previousModuleKey": "warehouse",
"interfaceChanges": {
"addedMethods": [],
"deletedMethods": [],
"paramsUpdatedMethods": [
"warehouse.exportRackSpaces"
],
"responseUpdatedMethods": []
}
}
]
},
"interfaceUpdates": {
"added": [],
"deleted": [],
"paramsUpdated": [],
"paramsUpdated": [
{
"moduleName": "仓库模块",
"moduleKey": "warehouse",
"folder": "warehouse",
"method": "warehouse.exportRackSpaces"
}
],
"responseUpdated": []
}
},
@ -343,6 +366,44 @@
"params": [],
"response": []
},
{
"moduleName": "基础模块",
"moduleKey": "index",
"moduleFolder": "index",
"method": "index.getLocationTypeList",
"title": "查询库位类型基础列表,优先返回当前仓库下启用的库位类型,同时合并系统公共类型;结果带 300 秒缓存",
"description": "查询库位类型基础列表,优先返回当前仓库下启用的库位类型,同时合并系统公共类型;结果带 300 秒缓存",
"endpoint": "/system",
"authRequired": false,
"loginRequired": true,
"status": {
"isUsed": false,
"isPlaceholder": false
},
"headers": [
{
"name": "Authorization",
"type": "string",
"required": true,
"description": "Bearer token"
}
],
"params": [],
"response": [
{
"name": "list",
"type": "array",
"required": false,
"description": "库位类型列表"
},
{
"name": "total",
"type": "number",
"required": false,
"description": "返回总数"
}
]
},
{
"moduleName": "基础模块",
"moduleKey": "index",
@ -8683,6 +8744,81 @@
"params": [],
"response": []
},
{
"moduleName": "仓库模块",
"moduleKey": "warehouse",
"moduleFolder": "warehouse",
"method": "warehouse.batchUpdateSpaceInfo",
"title": "按导出模板批量修改货架仓位信息,任一行越界或冲突则整批失败。前端提交示例:{ items: [ { warehouse_code: 'WH001', space_code: 'A01-01-01', custom_name: '拣货位1', custom_barcode: 'PICK-001', pick_sequence: 10, location_type_name: '标准库位' } ] }。其中 space_code 为必填定位键,warehouse_code 建议原样回传用于边界校验。",
"description": "按导出模板批量修改货架仓位信息,任一行越界或冲突则整批失败。前端提交示例:{ items: [ { warehouse_code: 'WH001', space_code: 'A01-01-01', custom_name: '拣货位1', custom_barcode: 'PICK-001', pick_sequence: 10, location_type_name: '标准库位' } ] }。其中 space_code 为必填定位键,warehouse_code 建议原样回传用于边界校验。",
"endpoint": "/system",
"authRequired": true,
"loginRequired": true,
"status": {
"isUsed": false,
"isPlaceholder": false
},
"headers": [
{
"name": "Authorization",
"type": "string",
"required": true,
"description": "Bearer token"
}
],
"params": [
{
"name": "items",
"type": "array",
"required": true,
"description": "批量修改数据数组;每项支持字段:warehouse_code、space_code、custom_name、custom_barcode、pick_sequence、location_type_name"
},
{
"name": "items[].warehouse_code",
"type": "string",
"required": false,
"description": "仓库编码,若传入则必须与当前登录仓库一致,否则整批失败"
},
{
"name": "items[].space_code",
"type": "string",
"required": true,
"description": "仓位编码,作为批量修改的唯一定位键;缺失、重复或不存在都会整批失败"
},
{
"name": "items[].custom_name",
"type": "string",
"required": false,
"description": "自定义名称,空字符串会被清空"
},
{
"name": "items[].custom_barcode",
"type": "string",
"required": false,
"description": "自定义条码,批次内或系统内冲突都会整批失败;空字符串会被清空"
},
{
"name": "items[].pick_sequence",
"type": "number",
"required": false,
"description": "拣货顺序,必须为非负整数,超出边界则整批失败"
},
{
"name": "items[].location_type_name",
"type": "string",
"required": false,
"description": "仓位类型名称,必须能在 index.getLocationTypeList 返回结果中命中,否则整批失败"
}
],
"response": [
{
"name": "count",
"type": "number",
"required": false,
"description": "成功更新的记录数"
}
]
},
{
"moduleName": "仓库模块",
"moduleKey": "warehouse",
@ -8958,6 +9094,57 @@
],
"response": []
},
{
"moduleName": "仓库模块",
"moduleKey": "warehouse",
"moduleFolder": "warehouse",
"method": "warehouse.exportRackSpaces",
"title": "按货架ID导出仓位模板(含仓库编码、仓位编码、自定义名称、自定义条码、拣货顺序、仓位类型)",
"description": "按货架ID导出仓位模板(含仓库编码、仓位编码、自定义名称、自定义条码、拣货顺序、仓位类型)",
"endpoint": "/system",
"authRequired": true,
"loginRequired": true,
"status": {
"isUsed": false,
"isPlaceholder": false
},
"headers": [
{
"name": "Authorization",
"type": "string",
"required": true,
"description": "Bearer token"
}
],
"params": [
{
"name": "id",
"type": "number",
"required": true,
"description": "货架ID,仅导出该货架下仓位"
}
],
"response": [
{
"name": "count",
"type": "number",
"required": false,
"description": "导出记录数"
},
{
"name": "fileName",
"type": "string",
"required": false,
"description": "导出文件名"
},
{
"name": "fileUrl",
"type": "string",
"required": false,
"description": "导出文件下载地址"
}
]
},
{
"moduleName": "仓库模块",
"moduleKey": "warehouse",

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {
@ -13,26 +13,49 @@
}
},
"moduleCount": 30,
"totalInterfaceCount": 205,
"totalInterfaceCount": 208,
"changes": {
"summary": {
"moduleAdded": 0,
"moduleDeleted": 0,
"moduleUpdated": 0,
"moduleUpdated": 1,
"interfaceAdded": 0,
"interfaceDeleted": 0,
"interfaceParamsUpdated": 0,
"interfaceParamsUpdated": 1,
"interfaceResponseUpdated": 0
},
"moduleUpdates": {
"added": [],
"deleted": [],
"updated": []
"updated": [
{
"moduleName": "仓库模块",
"moduleKey": "warehouse",
"folder": "warehouse",
"previousModuleName": "仓库模块",
"previousModuleKey": "warehouse",
"interfaceChanges": {
"addedMethods": [],
"deletedMethods": [],
"paramsUpdatedMethods": [
"warehouse.exportRackSpaces"
],
"responseUpdatedMethods": []
}
}
]
},
"interfaceUpdates": {
"added": [],
"deleted": [],
"paramsUpdated": [],
"paramsUpdated": [
{
"moduleName": "仓库模块",
"moduleKey": "warehouse",
"folder": "warehouse",
"method": "warehouse.exportRackSpaces"
}
],
"responseUpdated": []
}
},
@ -41,7 +64,7 @@
"moduleName": "仓库模块",
"moduleKey": "warehouse",
"folder": "warehouse",
"interfaceCount": 20,
"interfaceCount": 22,
"interfaces": [
{
"method": "warehouse.getWarehouseZones"
@ -97,6 +120,12 @@
{
"method": "warehouse.createRackWithSpaces"
},
{
"method": "warehouse.exportRackSpaces"
},
{
"method": "warehouse.batchUpdateSpaceInfo"
},
{
"method": "warehouse.getSpaceInfo"
},
@ -428,7 +457,7 @@
"moduleName": "基础模块",
"moduleKey": "index",
"folder": "index",
"interfaceCount": 13,
"interfaceCount": 14,
"interfaces": [
{
"method": "index.fastWhereTree"
@ -468,6 +497,9 @@
},
{
"method": "index.listInterfaceTypes"
},
{
"method": "index.getLocationTypeList"
}
]
},

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {
@ -16,7 +16,7 @@
"name": "基础模块",
"key": "index",
"folder": "index",
"interfaceCount": 13
"interfaceCount": 14
},
"changes": {
"fromPreviousSnapshot": {
@ -405,6 +405,41 @@
"headers": [],
"params": [],
"response": []
},
{
"method": "index.getLocationTypeList",
"title": "查询库位类型基础列表,优先返回当前仓库下启用的库位类型,同时合并系统公共类型;结果带 300 秒缓存",
"description": "查询库位类型基础列表,优先返回当前仓库下启用的库位类型,同时合并系统公共类型;结果带 300 秒缓存",
"endpoint": "/system",
"authRequired": false,
"loginRequired": true,
"status": {
"isUsed": false,
"isPlaceholder": false
},
"headers": [
{
"name": "Authorization",
"type": "string",
"required": true,
"description": "Bearer token"
}
],
"params": [],
"response": [
{
"name": "list",
"type": "array",
"required": false,
"description": "库位类型列表"
},
{
"name": "total",
"type": "number",
"required": false,
"description": "返回总数"
}
]
}
]
}

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": "2026-04-17 19:16:50"
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": "2026-04-17 19:16:50"
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": "2026-04-17 19:16:50"
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": "2026-04-17 19:16:50"
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": "2026-04-17 19:16:50"
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": "2026-04-17 19:16:50"
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": "2026-04-17 19:16:50"
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": "2026-04-17 19:16:50"
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": "2026-04-17 19:16:50"
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-17 19:37:49",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-17 20:21:27",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-17 19:16:50",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": "2026-04-17 19:16:50"
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {

View File

@ -6,7 +6,7 @@
},
"status": "active",
"createdAt": "2026-04-16 11:15:05",
"updatedAt": "2026-04-27 09:29:10",
"updatedAt": "2026-04-28 17:50:49",
"deletedAt": null,
"restoredAt": null
}

View File

@ -1,6 +1,6 @@
{
"generatedAt": "2026-04-27 09:29:10",
"generatedAtLocal": "2026-04-27 09:29:10",
"generatedAt": "2026-04-28 17:50:49",
"generatedAtLocal": "2026-04-28 17:50:49",
"source": "remote",
"filter": {
"platform": {
@ -16,7 +16,7 @@
"name": "仓库模块",
"key": "warehouse",
"folder": "warehouse",
"interfaceCount": 20
"interfaceCount": 22
},
"changes": {
"fromPreviousSnapshot": {
@ -25,7 +25,9 @@
"interfaceChanges": {
"addedMethods": [],
"deletedMethods": [],
"paramsUpdatedMethods": [],
"paramsUpdatedMethods": [
"warehouse.exportRackSpaces"
],
"responseUpdatedMethods": []
}
}
@ -773,6 +775,126 @@
],
"response": []
},
{
"method": "warehouse.exportRackSpaces",
"title": "按货架ID导出仓位模板(含仓库编码、仓位编码、自定义名称、自定义条码、拣货顺序、仓位类型)",
"description": "按货架ID导出仓位模板(含仓库编码、仓位编码、自定义名称、自定义条码、拣货顺序、仓位类型)",
"endpoint": "/system",
"authRequired": true,
"loginRequired": true,
"status": {
"isUsed": false,
"isPlaceholder": false
},
"headers": [
{
"name": "Authorization",
"type": "string",
"required": true,
"description": "Bearer token"
}
],
"params": [
{
"name": "id",
"type": "number",
"required": true,
"description": "货架ID,仅导出该货架下仓位"
}
],
"response": [
{
"name": "count",
"type": "number",
"required": false,
"description": "导出记录数"
},
{
"name": "fileName",
"type": "string",
"required": false,
"description": "导出文件名"
},
{
"name": "fileUrl",
"type": "string",
"required": false,
"description": "导出文件下载地址"
}
]
},
{
"method": "warehouse.batchUpdateSpaceInfo",
"title": "按导出模板批量修改货架仓位信息,任一行越界或冲突则整批失败。前端提交示例:{ items: [ { warehouse_code: 'WH001', space_code: 'A01-01-01', custom_name: '拣货位1', custom_barcode: 'PICK-001', pick_sequence: 10, location_type_name: '标准库位' } ] }。其中 space_code 为必填定位键,warehouse_code 建议原样回传用于边界校验。",
"description": "按导出模板批量修改货架仓位信息,任一行越界或冲突则整批失败。前端提交示例:{ items: [ { warehouse_code: 'WH001', space_code: 'A01-01-01', custom_name: '拣货位1', custom_barcode: 'PICK-001', pick_sequence: 10, location_type_name: '标准库位' } ] }。其中 space_code 为必填定位键,warehouse_code 建议原样回传用于边界校验。",
"endpoint": "/system",
"authRequired": true,
"loginRequired": true,
"status": {
"isUsed": false,
"isPlaceholder": false
},
"headers": [
{
"name": "Authorization",
"type": "string",
"required": true,
"description": "Bearer token"
}
],
"params": [
{
"name": "items",
"type": "array",
"required": true,
"description": "批量修改数据数组;每项支持字段:warehouse_code、space_code、custom_name、custom_barcode、pick_sequence、location_type_name"
},
{
"name": "items[].warehouse_code",
"type": "string",
"required": false,
"description": "仓库编码,若传入则必须与当前登录仓库一致,否则整批失败"
},
{
"name": "items[].space_code",
"type": "string",
"required": true,
"description": "仓位编码,作为批量修改的唯一定位键;缺失、重复或不存在都会整批失败"
},
{
"name": "items[].custom_name",
"type": "string",
"required": false,
"description": "自定义名称,空字符串会被清空"
},
{
"name": "items[].custom_barcode",
"type": "string",
"required": false,
"description": "自定义条码,批次内或系统内冲突都会整批失败;空字符串会被清空"
},
{
"name": "items[].pick_sequence",
"type": "number",
"required": false,
"description": "拣货顺序,必须为非负整数,超出边界则整批失败"
},
{
"name": "items[].location_type_name",
"type": "string",
"required": false,
"description": "仓位类型名称,必须能在 index.getLocationTypeList 返回结果中命中,否则整批失败"
}
],
"response": [
{
"name": "count",
"type": "number",
"required": false,
"description": "成功更新的记录数"
}
]
},
{
"method": "warehouse.getSpaceInfo",
"title": "warehouse.getSpaceInfo 接口",