618
This commit is contained in:
parent
6dda813dc8
commit
cc7ce02a02
BIN
dist.tar.gz
BIN
dist.tar.gz
Binary file not shown.
@ -1,33 +0,0 @@
|
|||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
const v = '1.0'
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 分拣缺货补货需求计算(仓库级别)
|
|
||||||
* 自动从用户上下文获取仓库,查询所有未完成储位分配的订单,
|
|
||||||
* 计算每个SKU在分拣区与存货区的库存量、订单需求量、分拣区缺口及建议补货量。
|
|
||||||
* @param pagination 分页参数 { page, pageSize }
|
|
||||||
* @param order 排序参数,如 { field: 'shortage', direction: 'desc' }
|
|
||||||
*/
|
|
||||||
export function getReplenishmentDemand(
|
|
||||||
pagination?: { page: number; pageSize: number },
|
|
||||||
order?: { field: string; direction: string } | null
|
|
||||||
) {
|
|
||||||
const data: Record<string, any> = {
|
|
||||||
pagination: pagination || { page: 1, pageSize: 50 },
|
|
||||||
}
|
|
||||||
if (order) {
|
|
||||||
data.order = order
|
|
||||||
}
|
|
||||||
return request({
|
|
||||||
url: '/system',
|
|
||||||
method: 'post',
|
|
||||||
params: {
|
|
||||||
method: 'storage.management.replenishmentDemand',
|
|
||||||
v,
|
|
||||||
timestamp: new Date().getTime()
|
|
||||||
},
|
|
||||||
data,
|
|
||||||
isSystemApi: true
|
|
||||||
} as any)
|
|
||||||
}
|
|
||||||
@ -34,7 +34,54 @@ export function getEntryList(data: StorageEntryListParams = {}): Promise<any> {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getEntryDetail(data:any): Promise<any> {
|
export type GetEntryDetailParams = {
|
||||||
|
/** 入库单ID,与 entry_order_code 二选一 */
|
||||||
|
id?: number
|
||||||
|
/** 入库单号,与 id 二选一 */
|
||||||
|
entry_order_code?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EntryDetailBinding = {
|
||||||
|
id?: number
|
||||||
|
entry_item_id?: number
|
||||||
|
receiving_detail_id?: number
|
||||||
|
allocated_quantity?: number
|
||||||
|
status?: string
|
||||||
|
receivingDetail?: Record<string, unknown>
|
||||||
|
[key: string]: unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EntryDetailItem = {
|
||||||
|
id?: number
|
||||||
|
stock_id?: number
|
||||||
|
/** 当前 pending 绑定的总预分配数量 */
|
||||||
|
pending_total?: number
|
||||||
|
/** 计划入库数量(= count) */
|
||||||
|
total_planned?: number
|
||||||
|
/** pending 绑定列表 */
|
||||||
|
bindings?: EntryDetailBinding[]
|
||||||
|
[key: string]: unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EntryOrderDetail = {
|
||||||
|
entry_order_code?: string
|
||||||
|
purchase_order_code?: string
|
||||||
|
store_name?: string
|
||||||
|
order_status?: string
|
||||||
|
items?: EntryDetailItem[]
|
||||||
|
[key: string]: unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GetEntryDetailResponse = {
|
||||||
|
code?: number
|
||||||
|
message?: string
|
||||||
|
entryOrder?: EntryOrderDetail
|
||||||
|
data?: {
|
||||||
|
entryOrder?: EntryOrderDetail
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getEntryDetail(data: GetEntryDetailParams): Promise<GetEntryDetailResponse> {
|
||||||
return request({
|
return request({
|
||||||
url: '/system',
|
url: '/system',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@ -89,3 +136,70 @@ export function deleteDetail(data:any): Promise<any> {
|
|||||||
export function detailChange(data:any): Promise<any> {
|
export function detailChange(data:any): Promise<any> {
|
||||||
return Promise.reject(new Error('storage.entry.detailChange 已下线,入库单明细不再对外编辑'))
|
return Promise.reject(new Error('storage.entry.detailChange 已下线,入库单明细不再对外编辑'))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type BindReceivingDetailsBinding = {
|
||||||
|
receiving_detail_id: number
|
||||||
|
allocated_quantity: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BindReceivingDetailsParams = {
|
||||||
|
entry_item_id: number
|
||||||
|
bindings: BindReceivingDetailsBinding[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BindReceivingDetailsResponse = {
|
||||||
|
code?: number
|
||||||
|
message?: string
|
||||||
|
entry_item_id?: number
|
||||||
|
binding_count?: number
|
||||||
|
data?: {
|
||||||
|
entry_item_id?: number
|
||||||
|
binding_count?: number
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 入库单明细绑定收货明细 */
|
||||||
|
export function bindReceivingDetails(data: BindReceivingDetailsParams): Promise<BindReceivingDetailsResponse> {
|
||||||
|
return request({
|
||||||
|
url: '/system',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
method: 'storage.entry.bindReceivingDetails',
|
||||||
|
v,
|
||||||
|
timestamp: new Date().getTime()
|
||||||
|
},
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export type UnbindReceivingDetailsParams = {
|
||||||
|
/** 入库单明细ID */
|
||||||
|
entry_item_id: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type UnbindReceivingDetailsResponse = {
|
||||||
|
code?: number
|
||||||
|
message?: string
|
||||||
|
entry_item_id?: number
|
||||||
|
released_quantity?: number
|
||||||
|
data?: {
|
||||||
|
entry_item_id?: number
|
||||||
|
released_quantity?: number
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 解绑入库明细的收货明细绑定 */
|
||||||
|
export function unbindReceivingDetails(
|
||||||
|
data: UnbindReceivingDetailsParams
|
||||||
|
): Promise<UnbindReceivingDetailsResponse> {
|
||||||
|
return request({
|
||||||
|
url: '/system',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
method: 'storage.entry.unbindReceivingDetails',
|
||||||
|
v,
|
||||||
|
timestamp: new Date().getTime()
|
||||||
|
},
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
47
src/api/storage.management/management.ts
Normal file
47
src/api/storage.management/management.ts
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
const v = '1.0'
|
||||||
|
|
||||||
|
export type ReplenishmentDemandSortField =
|
||||||
|
| 'stock_id'
|
||||||
|
| 'pick_zone_quantity'
|
||||||
|
| 'storage_zone_quantity'
|
||||||
|
| 'total_demand'
|
||||||
|
| 'shortage'
|
||||||
|
| 'replenishment_needed'
|
||||||
|
|
||||||
|
export interface ReplenishmentDemandBody {
|
||||||
|
pagination?: {
|
||||||
|
page?: number
|
||||||
|
pageSize?: number
|
||||||
|
}
|
||||||
|
sort?: {
|
||||||
|
sortField?: ReplenishmentDemandSortField
|
||||||
|
sortOrder?: 'ASC' | 'DESC'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分拣缺货补货需求计算(仓库级别)
|
||||||
|
* 自动从用户上下文获取仓库,查询所有未完成储位分配的订单,
|
||||||
|
* 计算每个SKU在分拣区与存货区的库存量、订单需求量、分拣区缺口、建议补货量及可补货库位。
|
||||||
|
*/
|
||||||
|
export function getReplenishmentDemand(data?: ReplenishmentDemandBody): Promise<any> {
|
||||||
|
const body: Record<string, unknown> = {
|
||||||
|
pagination: data?.pagination ?? { page: 1, pageSize: 20 },
|
||||||
|
}
|
||||||
|
if (data?.sort) {
|
||||||
|
body.sort = data.sort
|
||||||
|
}
|
||||||
|
return request({
|
||||||
|
url: '/system',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
method: 'storage.management.replenishmentDemand',
|
||||||
|
v,
|
||||||
|
timestamp: new Date().getTime()
|
||||||
|
},
|
||||||
|
data: body,
|
||||||
|
isSystemApi: true
|
||||||
|
} as any)
|
||||||
|
}
|
||||||
@ -360,3 +360,88 @@ export function quickPutaway(data: {
|
|||||||
isSystemApi: true
|
isSystemApi: true
|
||||||
} as any)
|
} as any)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type GetAvailableInboundQuantityParams = {
|
||||||
|
stock_id: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type AvailableInboundQuantityItem = {
|
||||||
|
detail_id?: number
|
||||||
|
receiving_id?: number
|
||||||
|
receiving_number?: string
|
||||||
|
product_name?: string
|
||||||
|
actual_quantity?: number
|
||||||
|
stored_quantity?: number
|
||||||
|
pending_allocated_quantity?: number
|
||||||
|
available_quantity?: number
|
||||||
|
storage_status?: string
|
||||||
|
batch_number?: string
|
||||||
|
production_date?: string
|
||||||
|
expiry_date?: string
|
||||||
|
space_id?: number
|
||||||
|
receiving_status?: string
|
||||||
|
[key: string]: unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GetAvailableInboundQuantityResponse = {
|
||||||
|
code?: number
|
||||||
|
message?: string
|
||||||
|
list?: AvailableInboundQuantityItem[]
|
||||||
|
total?: number
|
||||||
|
data?: {
|
||||||
|
list?: AvailableInboundQuantityItem[]
|
||||||
|
total?: number
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 按 stock_id 查询可入库数量 */
|
||||||
|
export function getAvailableInboundQuantity(
|
||||||
|
data: GetAvailableInboundQuantityParams
|
||||||
|
): Promise<GetAvailableInboundQuantityResponse> {
|
||||||
|
return request({
|
||||||
|
url: '/system',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
method: 'storage.receiving.getAvailableInboundQuantity',
|
||||||
|
v,
|
||||||
|
timestamp: new Date().getTime()
|
||||||
|
},
|
||||||
|
data,
|
||||||
|
isSystemApi: true
|
||||||
|
} as any)
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ManualMatchEntryOrderParams = {
|
||||||
|
receivingId: number
|
||||||
|
entryOrderId: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ManualMatchEntryOrderResponse = {
|
||||||
|
code?: number
|
||||||
|
message?: string
|
||||||
|
matchType?: string
|
||||||
|
comparisonResult?: Record<string, unknown>
|
||||||
|
callbackSent?: boolean
|
||||||
|
callbackResult?: Record<string, unknown> | null
|
||||||
|
partialStorageMarked?: boolean
|
||||||
|
entryOrder?: Record<string, unknown>
|
||||||
|
receivingOrder?: Record<string, unknown>
|
||||||
|
data?: Partial<ManualMatchEntryOrderResponse>
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 手动匹配入库单与收货单 */
|
||||||
|
export function manualMatchEntryOrder(
|
||||||
|
data: ManualMatchEntryOrderParams
|
||||||
|
): Promise<ManualMatchEntryOrderResponse> {
|
||||||
|
return request({
|
||||||
|
url: '/system',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
method: 'storage.receiving.manualMatchEntryOrder',
|
||||||
|
v,
|
||||||
|
timestamp: new Date().getTime()
|
||||||
|
},
|
||||||
|
data,
|
||||||
|
isSystemApi: true
|
||||||
|
} as any)
|
||||||
|
}
|
||||||
|
|||||||
@ -16,7 +16,8 @@ export const componentMap: Record<string, any> = {
|
|||||||
'stock/index': () => import('@/views/stock/stock/index.vue'),
|
'stock/index': () => import('@/views/stock/stock/index.vue'),
|
||||||
'stock/storestock/index': () => import('@/views/stock/storestock/index.vue'),
|
'stock/storestock/index': () => import('@/views/stock/storestock/index.vue'),
|
||||||
'stock/combo_stock/index': () => import('@/views/stock/combo_stock/index.vue'),
|
'stock/combo_stock/index': () => import('@/views/stock/combo_stock/index.vue'),
|
||||||
'stock/pickingShortage/index': () => import('@/views/stock/pickingShortage/index.vue'),
|
'stock/pickingShortage/index': () => import('@/views/storage/management/replenishmentDemand/index.vue'),
|
||||||
|
'storage/management/replenishmentDemand/index': () => import('@/views/storage/management/replenishmentDemand/index.vue'),
|
||||||
'storage/receiving': () => import('@/views/storage/receiving/index.vue'),
|
'storage/receiving': () => import('@/views/storage/receiving/index.vue'),
|
||||||
'storage/report': () => import('@/views/storage/report/index.vue'),
|
'storage/report': () => import('@/views/storage/report/index.vue'),
|
||||||
'storage/entry': () => import('@/views/storage/entry/index.vue'),
|
'storage/entry': () => import('@/views/storage/entry/index.vue'),
|
||||||
|
|||||||
@ -143,6 +143,15 @@
|
|||||||
@closed="resetSyncOrderIdsDialog"
|
@closed="resetSyncOrderIdsDialog"
|
||||||
@submit="submitSyncOrderIds"
|
@submit="submitSyncOrderIds"
|
||||||
/>
|
/>
|
||||||
|
<manual-waybill-form
|
||||||
|
v-model="manualWaybillDialogVisible"
|
||||||
|
v-model:waybill-code="manualWaybillForm.waybill_code"
|
||||||
|
:loading="manualWaybillLoading"
|
||||||
|
:order-id="manualWaybillOrderId"
|
||||||
|
:order-code="manualWaybillOrderCode"
|
||||||
|
@closed="resetManualWaybillDialog"
|
||||||
|
@submit="submitManualWaybill"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -157,6 +166,7 @@ import * as indexApi from '@/api/index/index'
|
|||||||
import AllocateExpressForm from '@/views/order/orderManagement/form/AllocateExpressForm.vue'
|
import AllocateExpressForm from '@/views/order/orderManagement/form/AllocateExpressForm.vue'
|
||||||
import StorageAllocateForm from '@/views/order/orderManagement/form/StorageAllocateForm.vue'
|
import StorageAllocateForm from '@/views/order/orderManagement/form/StorageAllocateForm.vue'
|
||||||
import SyncOrderIdsForm from '@/views/order/orderManagement/form/SyncOrderIdsForm.vue'
|
import SyncOrderIdsForm from '@/views/order/orderManagement/form/SyncOrderIdsForm.vue'
|
||||||
|
import ManualWaybillForm from '@/views/order/orderManagement/form/ManualWaybillForm.vue'
|
||||||
import OrderToolbarButtonGroup from '@/views/order/orderManagement/component/OrderToolbarButtonGroup.vue'
|
import OrderToolbarButtonGroup from '@/views/order/orderManagement/component/OrderToolbarButtonGroup.vue'
|
||||||
import { createPendingToolbarController } from '@/views/order/orderManagement/utils/toolbar-actions'
|
import { createPendingToolbarController } from '@/views/order/orderManagement/utils/toolbar-actions'
|
||||||
import { buildOrderWhereConditions, sanitizeOrderListWhere } from '@/views/order/orderManagement/utils/order-index-helpers'
|
import { buildOrderWhereConditions, sanitizeOrderListWhere } from '@/views/order/orderManagement/utils/order-index-helpers'
|
||||||
@ -181,7 +191,7 @@ const presetTree = ref<any[]>([])
|
|||||||
const availableFieldsRef = reactive(
|
const availableFieldsRef = reactive(
|
||||||
JSON.parse(JSON.stringify(pendingAvailableFields.filter((field: any) => field.value !== 'wave_no')))
|
JSON.parse(JSON.stringify(pendingAvailableFields.filter((field: any) => field.value !== 'wave_no')))
|
||||||
)
|
)
|
||||||
const toolbarButtons = pickToolbarButtons(['refresh', 'columnConfig', 'allocateStorage', 'allocateExpress', 'syncOrderIds'])
|
const toolbarButtons = pickToolbarButtons(['refresh', 'columnConfig', 'allocateStorage', 'allocateExpress', 'manualWaybill', 'syncOrderIds'])
|
||||||
|
|
||||||
const list = ref<any[]>([])
|
const list = ref<any[]>([])
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
@ -345,14 +355,21 @@ const {
|
|||||||
storageAllocateFailedCount,
|
storageAllocateFailedCount,
|
||||||
storageAllocateMessage,
|
storageAllocateMessage,
|
||||||
syncOrderIdsDialogVisible,
|
syncOrderIdsDialogVisible,
|
||||||
syncOrderIdsLoading
|
syncOrderIdsLoading,
|
||||||
|
manualWaybillDialogVisible,
|
||||||
|
manualWaybillLoading,
|
||||||
|
manualWaybillOrderId,
|
||||||
|
manualWaybillOrderCode,
|
||||||
|
manualWaybillForm
|
||||||
},
|
},
|
||||||
submitStorageAllocate,
|
submitStorageAllocate,
|
||||||
submitAllocateExpress,
|
submitAllocateExpress,
|
||||||
submitSyncOrderIds,
|
submitSyncOrderIds,
|
||||||
|
submitManualWaybill,
|
||||||
resetAllocateDialog,
|
resetAllocateDialog,
|
||||||
resetStorageAllocateDialog,
|
resetStorageAllocateDialog,
|
||||||
resetSyncOrderIdsDialog
|
resetSyncOrderIdsDialog,
|
||||||
|
resetManualWaybillDialog
|
||||||
} = createPendingToolbarController({
|
} = createPendingToolbarController({
|
||||||
loadData,
|
loadData,
|
||||||
handleExport: async () => {},
|
handleExport: async () => {},
|
||||||
@ -378,7 +395,8 @@ function resolveButtonLoading(loadingKey?: string) {
|
|||||||
actionLoading: actionLoading.value,
|
actionLoading: actionLoading.value,
|
||||||
storageAllocateLoading: storageAllocateLoading.value,
|
storageAllocateLoading: storageAllocateLoading.value,
|
||||||
allocateLoading: allocateLoading.value,
|
allocateLoading: allocateLoading.value,
|
||||||
syncOrderIdsLoading: syncOrderIdsLoading.value
|
syncOrderIdsLoading: syncOrderIdsLoading.value,
|
||||||
|
manualWaybillLoading: manualWaybillLoading.value
|
||||||
}
|
}
|
||||||
return Boolean(loadingMap[loadingKey])
|
return Boolean(loadingMap[loadingKey])
|
||||||
}
|
}
|
||||||
@ -386,23 +404,29 @@ function resolveButtonLoading(loadingKey?: string) {
|
|||||||
function resolveButtonDisabled(disabledKey?: string) {
|
function resolveButtonDisabled(disabledKey?: string) {
|
||||||
if (!disabledKey) return false
|
if (!disabledKey) return false
|
||||||
const disabledMap: Record<string, boolean> = {
|
const disabledMap: Record<string, boolean> = {
|
||||||
hasNoSelection: !hasSelection.value
|
hasNoSelection: !hasSelection.value,
|
||||||
|
notSingleSelection: selectionRows.value.length !== 1
|
||||||
}
|
}
|
||||||
return Boolean(disabledMap[disabledKey])
|
return Boolean(disabledMap[disabledKey])
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolveButtonLabel(defaultLabel: string) {
|
function resolveButtonLabel(defaultLabel: string) {
|
||||||
|
if (defaultLabel === '录入运单号') return '手工分配快递号'
|
||||||
return defaultLabel
|
return defaultLabel
|
||||||
}
|
}
|
||||||
|
|
||||||
const toolbarLayoutKey = computed(() =>
|
const toolbarLayoutKey = computed(() =>
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
disabled: { hasNoSelection: !hasSelection.value },
|
disabled: {
|
||||||
|
hasNoSelection: !hasSelection.value,
|
||||||
|
notSingleSelection: selectionRows.value.length !== 1
|
||||||
|
},
|
||||||
loading: {
|
loading: {
|
||||||
actionLoading: actionLoading.value,
|
actionLoading: actionLoading.value,
|
||||||
storageAllocateLoading: storageAllocateLoading.value,
|
storageAllocateLoading: storageAllocateLoading.value,
|
||||||
allocateLoading: allocateLoading.value,
|
allocateLoading: allocateLoading.value,
|
||||||
syncOrderIdsLoading: syncOrderIdsLoading.value
|
syncOrderIdsLoading: syncOrderIdsLoading.value,
|
||||||
|
manualWaybillLoading: manualWaybillLoading.value
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,4 +1,8 @@
|
|||||||
import type { ToolbarButtonConfig } from '@/views/order/orderManagement/config/order-common-config'
|
import {
|
||||||
|
buyerMessageHasFilterOptions,
|
||||||
|
scanField,
|
||||||
|
type ToolbarButtonConfig
|
||||||
|
} from '@/views/order/orderManagement/config/order-common-config'
|
||||||
import type { WavePlatformPrintDataPayload } from '@/api/order.print/orderprint'
|
import type { WavePlatformPrintDataPayload } from '@/api/order.print/orderprint'
|
||||||
import { orderPendingOrder } from '@/api/order.pendingorder/orderpendingOrder'
|
import { orderPendingOrder } from '@/api/order.pendingorder/orderpendingOrder'
|
||||||
import {
|
import {
|
||||||
@ -8,6 +12,29 @@ import {
|
|||||||
parseOrderListResponse
|
parseOrderListResponse
|
||||||
} from '@/views/order/orderManagement/utils/order-index-helpers'
|
} from '@/views/order/orderManagement/utils/order-index-helpers'
|
||||||
|
|
||||||
|
/** ScanBox 筛选字段分组(波次模块专用) */
|
||||||
|
export const WAVE_SCAN_FIELD_GROUPS = {
|
||||||
|
wave: '波次信息',
|
||||||
|
process: '流程状态',
|
||||||
|
logistics: '物流信息',
|
||||||
|
person: '人员信息',
|
||||||
|
stats: '商品统计',
|
||||||
|
strategy: '策略配置',
|
||||||
|
task: '任务信息',
|
||||||
|
status: '状态筛选',
|
||||||
|
time: '时间范围',
|
||||||
|
} as const
|
||||||
|
|
||||||
|
type WaveScanFieldGroupKey = keyof typeof WAVE_SCAN_FIELD_GROUPS
|
||||||
|
|
||||||
|
/** 为波次 ScanBox 字段附加分组标签 */
|
||||||
|
export function waveScanField<G extends WaveScanFieldGroupKey>(
|
||||||
|
group: G,
|
||||||
|
field: Record<string, any>
|
||||||
|
) {
|
||||||
|
return { ...field, group: WAVE_SCAN_FIELD_GROUPS[group] }
|
||||||
|
}
|
||||||
|
|
||||||
/** 工具栏按钮:可限定仅在对应波次页签显示(1 团购 / 2 散单) */
|
/** 工具栏按钮:可限定仅在对应波次页签显示(1 团购 / 2 散单) */
|
||||||
export type WaveToolbarButtonConfig = ToolbarButtonConfig & {
|
export type WaveToolbarButtonConfig = ToolbarButtonConfig & {
|
||||||
onlyForWaveType?: 1 | 2
|
onlyForWaveType?: 1 | 2
|
||||||
@ -35,9 +62,8 @@ export const waveUpperTableDefaults = {
|
|||||||
|
|
||||||
/** 左侧筛选可用字段 */
|
/** 左侧筛选可用字段 */
|
||||||
export const waveAvailableFields = [
|
export const waveAvailableFields = [
|
||||||
// { label: '波次ID', value: 'wave_id', type: 'number' },
|
waveScanField('wave', { label: '波次号', value: 'wave_no', type: 'text' }),
|
||||||
{ label: '波次号', value: 'wave_no', type: 'text' },
|
waveScanField('wave', {
|
||||||
{
|
|
||||||
label: '波次类型',
|
label: '波次类型',
|
||||||
value: 'wave_type',
|
value: 'wave_type',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -45,8 +71,8 @@ export const waveAvailableFields = [
|
|||||||
{ label: '团购', value: 1 },
|
{ label: '团购', value: 1 },
|
||||||
{ label: '散单', value: 2 }
|
{ label: '散单', value: 2 }
|
||||||
]
|
]
|
||||||
},
|
}),
|
||||||
{
|
waveScanField('wave', {
|
||||||
label: '波次状态',
|
label: '波次状态',
|
||||||
value: 'wave_status',
|
value: 'wave_status',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -54,8 +80,8 @@ export const waveAvailableFields = [
|
|||||||
{ label: '自动加团中', value: 0 },
|
{ label: '自动加团中', value: 0 },
|
||||||
{ label: '已就绪', value: 1 }
|
{ label: '已就绪', value: 1 }
|
||||||
]
|
]
|
||||||
},
|
}),
|
||||||
{
|
waveScanField('wave', {
|
||||||
label: '区分快递',
|
label: '区分快递',
|
||||||
value: 'distinguish_express',
|
value: 'distinguish_express',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -63,58 +89,69 @@ export const waveAvailableFields = [
|
|||||||
{ label: '是', value: 1 },
|
{ label: '是', value: 1 },
|
||||||
{ label: '否', value: 0 }
|
{ label: '否', value: 0 }
|
||||||
]
|
]
|
||||||
},
|
}),
|
||||||
{label:'库位分配', value: 'storage_assignment_status', type: 'select', options: [
|
waveScanField('process', {
|
||||||
{ label: '未分配', value: '未分配' },
|
label: '库位分配',
|
||||||
// { label: '部分分配', value: '部分分配' },
|
value: 'storage_assignment_status',
|
||||||
{ label: '已分配', value: '已分配' },
|
type: 'select',
|
||||||
]},
|
options: [
|
||||||
{ label:'快递分配', value: 'express_assignment_status', type: 'select', options: [
|
{ label: '未分配', value: '未分配' },
|
||||||
{ label: '未分配', value: 'unassigned' },
|
{ label: '已分配', value: '已分配' },
|
||||||
// { label: '部分分配', value: 'partially_assigned' },
|
]
|
||||||
{ label: '已分配', value: 'assigned' },
|
}),
|
||||||
]},
|
waveScanField('process', {
|
||||||
{ label:'打印状态', value: 'print_assignment_status', type: 'select', options: [
|
label: '快递分配',
|
||||||
{ label: '未打印', value: 'unprinted' },
|
value: 'express_assignment_status',
|
||||||
// { label: '部分打印', value: 'partially_printed' },
|
type: 'select',
|
||||||
{ label: '已打印', value: 'printed' },
|
options: [
|
||||||
]},
|
{ label: '未分配', value: 'unassigned' },
|
||||||
{ label: '复核状态', value: 'review_assignment_status', type: 'select', options: [
|
{ label: '已分配', value: 'assigned' },
|
||||||
{ label: '未复核', value: 'unreviewed' },
|
]
|
||||||
// { label: '部分复核', value: 'partially_reviewed' },
|
}),
|
||||||
{ label: '已复核', value: 'reviewed' },
|
waveScanField('process', {
|
||||||
]},
|
label: '打印状态',
|
||||||
{ label: '创建人', value: 'creator', type: 'text' },
|
value: 'print_assignment_status',
|
||||||
{ label: '快递', value: 'logistics_name', type: 'text' },
|
type: 'select',
|
||||||
// { label: '商品类型', value: 'item_part_type', type: 'text' },
|
options: [
|
||||||
// { label: '商品部位', value: 'item_part', type: 'text' },
|
{ label: '未打印', value: 'unprinted' },
|
||||||
// { label: '商品快照键', value: 'item_snapshot_key', type: 'text' },
|
{ label: '已打印', value: 'printed' },
|
||||||
// { label: '商品结构', value: 'item_detail_machine', type: 'text' },
|
]
|
||||||
|
}),
|
||||||
|
waveScanField('process', {
|
||||||
{ label: '最小订单数', value: 'total_orders_min', type: 'number' },
|
label: '复核状态',
|
||||||
{ label: '最大订单数', value: 'total_orders_max', type: 'number' },
|
value: 'review_assignment_status',
|
||||||
{ label: '最小已处理订单', value: 'processed_orders_min', type: 'number' },
|
type: 'select',
|
||||||
{ label: '最大已处理订单', value: 'processed_orders_max', type: 'number' }
|
options: [
|
||||||
|
{ label: '未复核', value: 'unreviewed' },
|
||||||
|
{ label: '已复核', value: 'reviewed' },
|
||||||
|
]
|
||||||
|
}),
|
||||||
|
waveScanField('logistics', { label: '快递', value: 'logistics_name', type: 'text' }),
|
||||||
|
waveScanField('person', { label: '创建人', value: 'creator', type: 'text' }),
|
||||||
|
waveScanField('stats', { label: '最小订单数', value: 'total_orders_min', type: 'number' }),
|
||||||
|
waveScanField('stats', { label: '最大订单数', value: 'total_orders_max', type: 'number' }),
|
||||||
|
waveScanField('stats', { label: '最小已处理订单', value: 'processed_orders_min', type: 'number' }),
|
||||||
|
waveScanField('stats', { label: '最大已处理订单', value: 'processed_orders_max', type: 'number' }),
|
||||||
]
|
]
|
||||||
|
|
||||||
/** 抓取散单候选:左侧筛选可用字段 */
|
/** 抓取散单候选:左侧筛选可用字段 */
|
||||||
export const fallbackOrderAvailableFields = [
|
export const fallbackOrderAvailableFields = [
|
||||||
// { label: '订单ID', value: 'id', type: 'number' },
|
scanField('order', { label: '订单号', value: 'delivery_no', type: 'text' }),
|
||||||
{ label: '订单号', value: 'delivery_no', type: 'text' },
|
scanField('logistics', { label: '物流单号', value: 'tracking_no', type: 'text' }),
|
||||||
{ label: '物流单号', value: 'tracking_no', type: 'text' },
|
scanField('shop', { label: '店铺名称', value: 'store_name', type: 'text' }),
|
||||||
{ label: '商品种数最小值', value: 'items_count_min', type: 'number' },
|
scanField('shop', { label: '平台', value: 'sys_platform_name', type: 'select', options: [] }),
|
||||||
{ label: '商品种数最大值', value: 'items_count_max', type: 'number' },
|
scanField('logistics', { label: '物流公司', value: 'sys_logistics_name', type: 'select', options: [] }),
|
||||||
{ label: '商品总数最小值', value: 'items_total_min', type: 'number' },
|
waveScanField('stats', { label: '商品种数最小值', value: 'items_count_min', type: 'number' }),
|
||||||
{ label: '商品总数最大值', value: 'items_total_max', type: 'number' },
|
waveScanField('stats', { label: '商品种数最大值', value: 'items_count_max', type: 'number' }),
|
||||||
{ label: '物流公司', value: 'sys_logistics_name', type: 'select', options: [] },
|
waveScanField('stats', { label: '商品总数最小值', value: 'items_total_min', type: 'number' }),
|
||||||
{ label: '店铺名称', value: 'store_name', type: 'text' },
|
waveScanField('stats', { label: '商品总数最大值', value: 'items_total_max', type: 'number' }),
|
||||||
{ label: '平台', value: 'sys_platform_name', type: 'select', options: [] },
|
scanField('receiver', {
|
||||||
{ label: '有无留言', value: 'buyer_message_has', type: 'select', options: [{ label: '有留言', value: 'has' }, { label: '无留言', value: 'none' }] },
|
label: '有无留言',
|
||||||
{ label: '买家留言', value: 'buyer_message', type: 'text' },
|
value: 'buyer_message_has',
|
||||||
// { label: '货主', value: 'owner_name', type: 'select', options: [] },
|
type: 'select',
|
||||||
// { label: '省份', value: 'province', type: 'text' },
|
options: buyerMessageHasFilterOptions
|
||||||
// { label: '来源平台', value: 'sys_platform_name', type: 'select', options: [] }
|
}),
|
||||||
|
scanField('receiver', { label: '买家留言', value: 'buyer_message', type: 'text' }),
|
||||||
]
|
]
|
||||||
|
|
||||||
/** 不符合波次策略订单列表:UpperTable 列配置 */
|
/** 不符合波次策略订单列表:UpperTable 列配置 */
|
||||||
@ -136,8 +173,8 @@ export const fallbackOrderColumns = [
|
|||||||
|
|
||||||
/** 波次策略:左侧筛选可用字段 */
|
/** 波次策略:左侧筛选可用字段 */
|
||||||
export const waveStrategyAvailableFields = [
|
export const waveStrategyAvailableFields = [
|
||||||
{ label: '策略名称', value: 'strategy_name', type: 'text' },
|
waveScanField('strategy', { label: '策略名称', value: 'strategy_name', type: 'text' }),
|
||||||
{
|
waveScanField('strategy', {
|
||||||
label: '策略类型',
|
label: '策略类型',
|
||||||
value: 'strategy_type',
|
value: 'strategy_type',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -145,8 +182,9 @@ export const waveStrategyAvailableFields = [
|
|||||||
{ label: '散单', value: 1 },
|
{ label: '散单', value: 1 },
|
||||||
{ label: '团购', value: 2 }
|
{ label: '团购', value: 2 }
|
||||||
]
|
]
|
||||||
},
|
}),
|
||||||
{
|
waveScanField('strategy', { label: '波次前缀', value: 'wave_prefix', type: 'text' }),
|
||||||
|
waveScanField('status', {
|
||||||
label: '启用状态',
|
label: '启用状态',
|
||||||
value: 'status',
|
value: 'status',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -154,8 +192,8 @@ export const waveStrategyAvailableFields = [
|
|||||||
{ label: '启用', value: 1 },
|
{ label: '启用', value: 1 },
|
||||||
{ label: '停用', value: 0 }
|
{ label: '停用', value: 0 }
|
||||||
]
|
]
|
||||||
},
|
}),
|
||||||
{
|
waveScanField('status', {
|
||||||
label: '批次模式',
|
label: '批次模式',
|
||||||
value: 'batch_mode',
|
value: 'batch_mode',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -168,8 +206,7 @@ export const waveStrategyAvailableFields = [
|
|||||||
{ label: '播种墙', value: 5 },
|
{ label: '播种墙', value: 5 },
|
||||||
{ label: '流利架', value: 6 }
|
{ label: '流利架', value: 6 }
|
||||||
]
|
]
|
||||||
},
|
}),
|
||||||
{ label: '波次前缀', value: 'wave_prefix', type: 'text' }
|
|
||||||
]
|
]
|
||||||
|
|
||||||
/** 波次策略:UpperTable 列配置 */
|
/** 波次策略:UpperTable 列配置 */
|
||||||
@ -767,15 +804,14 @@ export const pickTaskStatusFilterOptions = [
|
|||||||
|
|
||||||
/** 左侧筛选字段(与 order.wave.wavePickTaskList 入参对应) */
|
/** 左侧筛选字段(与 order.wave.wavePickTaskList 入参对应) */
|
||||||
export const pickTaskWaveAvailableFields = [
|
export const pickTaskWaveAvailableFields = [
|
||||||
{ label: '任务编号', value: 'task_no', type: 'text' },
|
waveScanField('task', { label: '任务编号', value: 'task_no', type: 'text' }),
|
||||||
// { label: '关键字', value: 'keyword', type: 'text' },
|
waveScanField('status', {
|
||||||
{
|
|
||||||
label: '任务状态',
|
label: '任务状态',
|
||||||
value: 'status',
|
value: 'status',
|
||||||
type: 'multiple',
|
type: 'multiple',
|
||||||
options: [...pickTaskStatusFilterOptions]
|
options: [...pickTaskStatusFilterOptions]
|
||||||
},
|
}),
|
||||||
{
|
waveScanField('status', {
|
||||||
label: '复核状态',
|
label: '复核状态',
|
||||||
value: 'review_status',
|
value: 'review_status',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -786,8 +822,8 @@ export const pickTaskWaveAvailableFields = [
|
|||||||
{ label: '复核通过', value: 3 },
|
{ label: '复核通过', value: 3 },
|
||||||
{ label: '复核异常', value: 4 }
|
{ label: '复核异常', value: 4 }
|
||||||
]
|
]
|
||||||
},
|
}),
|
||||||
{
|
waveScanField('status', {
|
||||||
label: '拣货模式',
|
label: '拣货模式',
|
||||||
value: 'pick_mode',
|
value: 'pick_mode',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -798,8 +834,8 @@ export const pickTaskWaveAvailableFields = [
|
|||||||
{ label: '边拣边分', value: 4 },
|
{ label: '边拣边分', value: 4 },
|
||||||
{ label: '大团购', value: 5 }
|
{ label: '大团购', value: 5 }
|
||||||
]
|
]
|
||||||
},
|
}),
|
||||||
{
|
waveScanField('status', {
|
||||||
label: '来源',
|
label: '来源',
|
||||||
value: 'source',
|
value: 'source',
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -808,29 +844,8 @@ export const pickTaskWaveAvailableFields = [
|
|||||||
{ label: 'PDA', value: 1 },
|
{ label: 'PDA', value: 1 },
|
||||||
{ label: '后台', value: 2 }
|
{ label: '后台', value: 2 }
|
||||||
]
|
]
|
||||||
},
|
}),
|
||||||
// {
|
waveScanField('time', { label: '开始时间', value: 'start_time_range', type: 'daterange' }),
|
||||||
// label: '拣货员ID',
|
|
||||||
// value: 'pick_user_id',
|
|
||||||
// type: 'text',
|
|
||||||
// operators: ['eq'],
|
|
||||||
// placeholder: '请输入拣货员ID(纯数字)'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '复核人ID',
|
|
||||||
// value: 'review_user_id',
|
|
||||||
// type: 'text',
|
|
||||||
// operators: ['eq'],
|
|
||||||
// placeholder: '请输入复核人ID(纯数字)'
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// label: '拣货车ID',
|
|
||||||
// value: 'cart_id',
|
|
||||||
// type: 'text',
|
|
||||||
// operators: ['eq'],
|
|
||||||
// placeholder: '请输入拣货车ID(纯数字)'
|
|
||||||
// },
|
|
||||||
{ label: '开始时间', value: 'start_time_range', type: 'daterange' }
|
|
||||||
]
|
]
|
||||||
|
|
||||||
export function formatPickTaskStatus(value: unknown): string {
|
export function formatPickTaskStatus(value: unknown): string {
|
||||||
|
|||||||
@ -1,450 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div class="picking-shortage-container">
|
|
||||||
<!-- 主内容区域 -->
|
|
||||||
<div class="main-content">
|
|
||||||
<!-- 汇总卡片 -->
|
|
||||||
<div class="summary-bar">
|
|
||||||
<div class="summary-item">
|
|
||||||
<span class="summary-label">SKU总数</span>
|
|
||||||
<span class="summary-value">{{ summary.total_skus ?? '-' }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="summary-item">
|
|
||||||
<span class="summary-label">缺货SKU</span>
|
|
||||||
<span class="summary-value warning">{{ summary.total_shortage_skus ?? '-' }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="summary-item">
|
|
||||||
<span class="summary-label">建议补货总量</span>
|
|
||||||
<span class="summary-value primary">{{ summary.total_replenishment_needed ?? '-' }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="summary-item">
|
|
||||||
<span class="summary-label">真实缺货SKU</span>
|
|
||||||
<span class="summary-value danger">{{ summary.total_true_shortage_skus ?? '-' }}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 工具栏 -->
|
|
||||||
<div class="toolbar">
|
|
||||||
<div class="toolbar-left">
|
|
||||||
<el-button type="primary" size="small" @click="handleRefresh">
|
|
||||||
刷新
|
|
||||||
</el-button>
|
|
||||||
<el-button
|
|
||||||
type="success"
|
|
||||||
size="small"
|
|
||||||
:disabled="!hasSelection"
|
|
||||||
@click="handleExport"
|
|
||||||
>
|
|
||||||
导出
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
<div class="toolbar-right">
|
|
||||||
<el-input
|
|
||||||
v-model="searchKeyword"
|
|
||||||
placeholder="请输入搜索关键词"
|
|
||||||
size="small"
|
|
||||||
clearable
|
|
||||||
style="width: 220px"
|
|
||||||
@keyup.enter="handleSearch"
|
|
||||||
>
|
|
||||||
<template #append>
|
|
||||||
<el-button @click="handleSearch">
|
|
||||||
<el-icon><Search /></el-icon>
|
|
||||||
</el-button>
|
|
||||||
</template>
|
|
||||||
</el-input>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 数据表格 -->
|
|
||||||
<div class="table-wrapper">
|
|
||||||
<el-table
|
|
||||||
ref="tableRef"
|
|
||||||
v-loading="loading"
|
|
||||||
:data="tableData"
|
|
||||||
border
|
|
||||||
stripe
|
|
||||||
style="width: 100%"
|
|
||||||
row-key="stock_id"
|
|
||||||
@selection-change="handleSelectionChange"
|
|
||||||
@sort-change="handleSortChange"
|
|
||||||
>
|
|
||||||
<el-table-column type="selection" width="55" fixed="left" />
|
|
||||||
<el-table-column type="expand">
|
|
||||||
<template #default="{ row }">
|
|
||||||
<div class="expand-content" v-if="row.replenishment_locations && row.replenishment_locations.length > 0">
|
|
||||||
<div class="expand-title">补货库位明细</div>
|
|
||||||
<el-table
|
|
||||||
:data="row.replenishment_locations"
|
|
||||||
border
|
|
||||||
size="small"
|
|
||||||
style="width: 100%"
|
|
||||||
>
|
|
||||||
<el-table-column
|
|
||||||
prop="space_code"
|
|
||||||
label="库位编码"
|
|
||||||
min-width="180"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="space_name"
|
|
||||||
label="库位名称"
|
|
||||||
min-width="140"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="available_quantity"
|
|
||||||
label="可用数量"
|
|
||||||
min-width="100"
|
|
||||||
align="right"
|
|
||||||
/>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
<div class="expand-empty" v-else>
|
|
||||||
无可用补货库位(存货区与分拣区均无库存)
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="stock_code"
|
|
||||||
label="SKU编码"
|
|
||||||
min-width="140"
|
|
||||||
show-overflow-tooltip
|
|
||||||
>
|
|
||||||
<template #default="{ row }">
|
|
||||||
<span>{{ row.stock_code || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="stock_name"
|
|
||||||
label="商品名称"
|
|
||||||
min-width="160"
|
|
||||||
show-overflow-tooltip
|
|
||||||
>
|
|
||||||
<template #default="{ row }">
|
|
||||||
<span>{{ row.stock_name || '-' }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="pick_zone_quantity"
|
|
||||||
label="分拣区库存"
|
|
||||||
min-width="110"
|
|
||||||
align="right"
|
|
||||||
sortable="custom"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="storage_zone_quantity"
|
|
||||||
label="存货区库存"
|
|
||||||
min-width="110"
|
|
||||||
align="right"
|
|
||||||
sortable="custom"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="total_demand"
|
|
||||||
label="总需求量"
|
|
||||||
min-width="100"
|
|
||||||
align="right"
|
|
||||||
sortable="custom"
|
|
||||||
/>
|
|
||||||
<el-table-column
|
|
||||||
prop="shortage"
|
|
||||||
label="缺口数量"
|
|
||||||
min-width="100"
|
|
||||||
align="right"
|
|
||||||
sortable="custom"
|
|
||||||
>
|
|
||||||
<template #default="{ row }">
|
|
||||||
<span :class="{ 'shortage-text': row.shortage > 0 }">{{ row.shortage }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="replenishment_needed"
|
|
||||||
label="建议补货量"
|
|
||||||
min-width="110"
|
|
||||||
align="right"
|
|
||||||
sortable="custom"
|
|
||||||
>
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-tag
|
|
||||||
:type="row.replenishment_needed > 0 ? 'warning' : 'success'"
|
|
||||||
size="small"
|
|
||||||
>
|
|
||||||
{{ row.replenishment_needed }}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
prop="replenishment_status"
|
|
||||||
label="补货状态"
|
|
||||||
min-width="110"
|
|
||||||
align="center"
|
|
||||||
>
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-tag
|
|
||||||
:type="statusTagType(row.replenishment_status)"
|
|
||||||
size="small"
|
|
||||||
>
|
|
||||||
{{ statusLabel(row.replenishment_status) }}
|
|
||||||
</el-tag>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
label="补货库位"
|
|
||||||
min-width="100"
|
|
||||||
align="center"
|
|
||||||
>
|
|
||||||
<template #default="{ row }">
|
|
||||||
<el-tag
|
|
||||||
v-if="row.replenishment_locations && row.replenishment_locations.length > 0"
|
|
||||||
type="success"
|
|
||||||
size="small"
|
|
||||||
>
|
|
||||||
{{ row.replenishment_locations.length }}个
|
|
||||||
</el-tag>
|
|
||||||
<span v-else class="no-location-text">-</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- 分页 -->
|
|
||||||
<div class="pagination-wrapper">
|
|
||||||
<el-pagination
|
|
||||||
v-model:current-page="pagination.page"
|
|
||||||
v-model:page-size="pagination.pageSize"
|
|
||||||
:total="pagination.total"
|
|
||||||
:page-sizes="[20, 50, 100, 200]"
|
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
@current-change="handlePageChange"
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup lang="ts">
|
|
||||||
import { ref, reactive, onMounted } from 'vue'
|
|
||||||
import { ElMessage } from 'element-plus'
|
|
||||||
import { Search } from '@element-plus/icons-vue'
|
|
||||||
import { getReplenishmentDemand } from '@/api/stock/pickingShortage'
|
|
||||||
|
|
||||||
// ==================== 搜索相关 ====================
|
|
||||||
const searchKeyword = ref('')
|
|
||||||
|
|
||||||
const handleSearch = () => {
|
|
||||||
pagination.page = 1
|
|
||||||
fetchData()
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 汇总信息 ====================
|
|
||||||
const summary = ref<Record<string, number>>({})
|
|
||||||
|
|
||||||
// ==================== 排序相关 ====================
|
|
||||||
const sortParams = ref<{ field: string; direction: string } | null>(null)
|
|
||||||
|
|
||||||
const handleSortChange = (sort: { prop: string; order: string }) => {
|
|
||||||
if (sort.order) {
|
|
||||||
sortParams.value = { field: sort.prop, direction: sort.order === 'ascending' ? 'asc' : 'desc' }
|
|
||||||
} else {
|
|
||||||
sortParams.value = null
|
|
||||||
}
|
|
||||||
pagination.page = 1
|
|
||||||
fetchData()
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 表格相关 ====================
|
|
||||||
const tableRef = ref()
|
|
||||||
const loading = ref(false)
|
|
||||||
const tableData = ref<any[]>([])
|
|
||||||
const selectedRows = ref<any[]>([])
|
|
||||||
const hasSelection = ref(false)
|
|
||||||
|
|
||||||
const pagination = reactive({
|
|
||||||
page: 1,
|
|
||||||
pageSize: 50,
|
|
||||||
total: 0,
|
|
||||||
})
|
|
||||||
|
|
||||||
const handleSelectionChange = (rows: any[]) => {
|
|
||||||
selectedRows.value = rows
|
|
||||||
hasSelection.value = rows.length > 0
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 数据获取 ====================
|
|
||||||
const fetchData = async () => {
|
|
||||||
loading.value = true
|
|
||||||
try {
|
|
||||||
const res: any = await getReplenishmentDemand(
|
|
||||||
{ page: pagination.page, pageSize: pagination.pageSize },
|
|
||||||
sortParams.value
|
|
||||||
)
|
|
||||||
if (res?.flag === 'success' || res?.code === 1) {
|
|
||||||
tableData.value = res?.list || []
|
|
||||||
summary.value = res?.summary || {}
|
|
||||||
pagination.total = res?.total || res?.pagination?.total || tableData.value.length
|
|
||||||
} else {
|
|
||||||
ElMessage.error(res?.message || res?.msg || '获取数据失败')
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error('获取分拣缺货补货需求失败:', error)
|
|
||||||
ElMessage.error('获取数据失败,请稍后重试')
|
|
||||||
} finally {
|
|
||||||
loading.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 工具栏操作 ====================
|
|
||||||
const handleRefresh = () => {
|
|
||||||
fetchData()
|
|
||||||
}
|
|
||||||
|
|
||||||
const handleExport = () => {
|
|
||||||
ElMessage.info('导出功能开发中...')
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 分页操作 ====================
|
|
||||||
const handleSizeChange = () => {
|
|
||||||
pagination.page = 1
|
|
||||||
fetchData()
|
|
||||||
}
|
|
||||||
|
|
||||||
const handlePageChange = () => {
|
|
||||||
fetchData()
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 状态映射 ====================
|
|
||||||
const statusLabel = (status: string) => {
|
|
||||||
const map: Record<string, string> = {
|
|
||||||
true_shortage: '真实缺货',
|
|
||||||
replenishable: '可补货',
|
|
||||||
sufficient: '充足',
|
|
||||||
}
|
|
||||||
return map[status] || status || '-'
|
|
||||||
}
|
|
||||||
|
|
||||||
const statusTagType = (status: string) => {
|
|
||||||
const map: Record<string, string> = {
|
|
||||||
true_shortage: 'danger',
|
|
||||||
replenishable: 'warning',
|
|
||||||
sufficient: 'success',
|
|
||||||
}
|
|
||||||
return map[status] || 'info'
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==================== 生命周期 ====================
|
|
||||||
onMounted(() => {
|
|
||||||
fetchData()
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
|
||||||
.picking-shortage-container {
|
|
||||||
height: 100%;
|
|
||||||
padding: 16px;
|
|
||||||
background-color: #f5f7fa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.main-content {
|
|
||||||
flex: 1;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
min-width: 0;
|
|
||||||
background: #fff;
|
|
||||||
border-radius: 4px;
|
|
||||||
padding: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summary-bar {
|
|
||||||
display: flex;
|
|
||||||
gap: 16px;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
padding: 12px 16px;
|
|
||||||
background: #f0f5ff;
|
|
||||||
border-radius: 6px;
|
|
||||||
border: 1px solid #d6e4ff;
|
|
||||||
|
|
||||||
.summary-item {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
flex: 1;
|
|
||||||
min-width: 0;
|
|
||||||
|
|
||||||
.summary-label {
|
|
||||||
font-size: 12px;
|
|
||||||
color: #909399;
|
|
||||||
margin-bottom: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.summary-value {
|
|
||||||
font-size: 20px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #303133;
|
|
||||||
|
|
||||||
&.warning {
|
|
||||||
color: #e6a23c;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.primary {
|
|
||||||
color: #409eff;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.danger {
|
|
||||||
color: #f56c6c;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.toolbar {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
margin-bottom: 16px;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
gap: 8px;
|
|
||||||
|
|
||||||
.toolbar-left,
|
|
||||||
.toolbar-right {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-wrapper {
|
|
||||||
flex: 1;
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pagination-wrapper {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
margin-top: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.shortage-text {
|
|
||||||
color: #f56c6c;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
.expand-content {
|
|
||||||
padding: 8px 16px;
|
|
||||||
|
|
||||||
.expand-title {
|
|
||||||
font-size: 13px;
|
|
||||||
font-weight: 600;
|
|
||||||
color: #303133;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.expand-empty {
|
|
||||||
padding: 16px;
|
|
||||||
text-align: center;
|
|
||||||
color: #909399;
|
|
||||||
font-size: 13px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-location-text {
|
|
||||||
color: #c0c4cc;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
363
src/views/storage/entry/component/BindReceivingDetailsDialog.vue
Normal file
363
src/views/storage/entry/component/BindReceivingDetailsDialog.vue
Normal file
@ -0,0 +1,363 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="visible"
|
||||||
|
title="绑定收货明细"
|
||||||
|
width="920px"
|
||||||
|
align-center
|
||||||
|
append-to-body
|
||||||
|
destroy-on-close
|
||||||
|
:close-on-click-modal="!submitting"
|
||||||
|
@closed="handleClosed"
|
||||||
|
>
|
||||||
|
<!-- <el-alert
|
||||||
|
type="info"
|
||||||
|
:closable="false"
|
||||||
|
show-icon
|
||||||
|
class="bind-tip"
|
||||||
|
title="storage.entry.bindReceivingDetails"
|
||||||
|
description="按入库明细 stock_id 查询可入库收货明细,选择并填写分配数量后完成绑定。重复绑定将覆盖该入库明细下所有 pending 绑定。"
|
||||||
|
/> -->
|
||||||
|
|
||||||
|
<div v-if="entryItem" class="entry-item-summary">
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">商品编码</span>
|
||||||
|
<span class="summary-value">{{ entryItem.warehouse_item_code || '—' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">商品名称</span>
|
||||||
|
<span class="summary-value">{{ entryItem.warehouse_item_name || '—' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">应收数量</span>
|
||||||
|
<span class="summary-value">{{ entryItem.count ?? '—' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">实收数量</span>
|
||||||
|
<span class="summary-value">{{ entryItem.pending_total ?? '—' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">SKU</span>
|
||||||
|
<span class="summary-value">{{ entryItem.stock_id ?? '—' }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="dialog-toolbar">
|
||||||
|
<span class="toolbar-meta">可绑定收货明细 {{ receivingList.length }} 条</span>
|
||||||
|
<el-button size="small" :loading="loading" @click="loadReceivingList">刷新</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:data="receivingList"
|
||||||
|
border
|
||||||
|
size="small"
|
||||||
|
max-height="360"
|
||||||
|
v-loading="loading"
|
||||||
|
row-key="detail_id"
|
||||||
|
empty-text="暂无可绑定的收货明细"
|
||||||
|
>
|
||||||
|
<el-table-column prop="receiving_number" label="收货单号" min-width="150" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="product_name" label="商品名称" min-width="140" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="actual_quantity" label="实收数量" width="90" align="right" />
|
||||||
|
<el-table-column prop="stored_quantity" label="已入库" width="90" align="right" />
|
||||||
|
<el-table-column prop="available_quantity" label="可入库" width="90" align="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag type="success" size="small">{{ row.available_quantity ?? 0 }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="batch_number" label="批次号" min-width="110" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="production_date" label="生产日期" width="110" />
|
||||||
|
<el-table-column prop="expiry_date" label="有效期" width="110" />
|
||||||
|
<el-table-column label="分配数量" width="200" fixed="right" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<div class="allocation-cell">
|
||||||
|
<el-input-number
|
||||||
|
v-model="allocationMap[row.detail_id]"
|
||||||
|
:min="0"
|
||||||
|
:max="getRowMaxAllocation(row)"
|
||||||
|
:precision="0"
|
||||||
|
size="small"
|
||||||
|
controls-position="right"
|
||||||
|
style="width: 110px"
|
||||||
|
/>
|
||||||
|
<el-button link type="primary" size="small" @click="setMaxAllocation(row)">
|
||||||
|
最大
|
||||||
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<div class="allocation-summary">
|
||||||
|
已填写分配数量合计:<strong>{{ totalAllocated }}</strong>
|
||||||
|
/ 可绑上限 <strong>{{ remainingBindCapacity }}</strong>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<el-button :disabled="submitting" @click="visible = false">取消</el-button>
|
||||||
|
<el-button type="primary" :loading="submitting" @click="handleSubmit">确认绑定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { computed, reactive, ref, watch } from 'vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { bindReceivingDetails } from '@/api/storage.entry/entry'
|
||||||
|
import {
|
||||||
|
getAvailableInboundQuantity,
|
||||||
|
type AvailableInboundQuantityItem,
|
||||||
|
} from '@/api/storage_receiving/receiving'
|
||||||
|
|
||||||
|
export type EntryDetailBindRow = {
|
||||||
|
id?: number
|
||||||
|
stock_id?: number
|
||||||
|
warehouse_item_code?: string
|
||||||
|
warehouse_item_name?: string
|
||||||
|
count?: number
|
||||||
|
pending_total?: number
|
||||||
|
bindings?: Array<Record<string, unknown>>
|
||||||
|
[key: string]: unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
modelValue: boolean
|
||||||
|
entryItem: EntryDetailBindRow | null
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
'update:modelValue': [value: boolean]
|
||||||
|
success: []
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const visible = computed({
|
||||||
|
get: () => props.modelValue,
|
||||||
|
set: (value: boolean) => emit('update:modelValue', value),
|
||||||
|
})
|
||||||
|
|
||||||
|
const loading = ref(false)
|
||||||
|
const submitting = ref(false)
|
||||||
|
const receivingList = ref<AvailableInboundQuantityItem[]>([])
|
||||||
|
const allocationMap = reactive<Record<number, number>>({})
|
||||||
|
|
||||||
|
const totalAllocated = computed(() =>
|
||||||
|
Object.values(allocationMap).reduce((sum, qty) => sum + (Number(qty) || 0), 0)
|
||||||
|
)
|
||||||
|
|
||||||
|
/** 应收数量 - 实收数量(pending 绑定合计) */
|
||||||
|
const remainingBindCapacity = computed(() => {
|
||||||
|
const count = Number(props.entryItem?.count) || 0
|
||||||
|
const receivedQty = Number(props.entryItem?.pending_total) || 0
|
||||||
|
return Math.max(0, count - receivedQty)
|
||||||
|
})
|
||||||
|
|
||||||
|
function getOtherAllocatedTotal(excludeDetailId: number): number {
|
||||||
|
return receivingList.value.reduce((sum, row) => {
|
||||||
|
const detailId = Number(row.detail_id)
|
||||||
|
if (!Number.isFinite(detailId) || detailId <= 0 || detailId === excludeDetailId) return sum
|
||||||
|
return sum + (Number(allocationMap[detailId]) || 0)
|
||||||
|
}, 0)
|
||||||
|
}
|
||||||
|
|
||||||
|
function getRowMaxAllocation(row: AvailableInboundQuantityItem): number {
|
||||||
|
const detailId = Number(row.detail_id)
|
||||||
|
const available = Math.max(0, Number(row.available_quantity) || 0)
|
||||||
|
if (!Number.isFinite(detailId) || detailId <= 0) return available
|
||||||
|
const capacityLeft = remainingBindCapacity.value - getOtherAllocatedTotal(detailId)
|
||||||
|
return Math.max(0, Math.min(available, capacityLeft))
|
||||||
|
}
|
||||||
|
|
||||||
|
function setMaxAllocation(row: AvailableInboundQuantityItem) {
|
||||||
|
const detailId = Number(row.detail_id)
|
||||||
|
if (!Number.isFinite(detailId) || detailId <= 0) return
|
||||||
|
allocationMap[detailId] = getRowMaxAllocation(row)
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetState() {
|
||||||
|
receivingList.value = []
|
||||||
|
Object.keys(allocationMap).forEach((key) => {
|
||||||
|
delete allocationMap[Number(key)]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseReceivingList(res: any): AvailableInboundQuantityItem[] {
|
||||||
|
const data = res?.data && typeof res.data === 'object' ? res.data : res
|
||||||
|
return (data?.list ?? res?.list ?? []) as AvailableInboundQuantityItem[]
|
||||||
|
}
|
||||||
|
|
||||||
|
function isApiSuccess(res: any): boolean {
|
||||||
|
return !!(res && (res.code === 200 || res.code === 1 || res.flag === 'success'))
|
||||||
|
}
|
||||||
|
|
||||||
|
async function loadReceivingList() {
|
||||||
|
const stockId = Number(props.entryItem?.stock_id)
|
||||||
|
if (!Number.isFinite(stockId) || stockId <= 0) {
|
||||||
|
receivingList.value = []
|
||||||
|
ElMessage.warning('当前入库明细缺少有效的 stock_id,无法查询收货单')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const res = await getAvailableInboundQuantity({ stock_id: stockId })
|
||||||
|
if (!isApiSuccess(res)) {
|
||||||
|
receivingList.value = []
|
||||||
|
ElMessage.error(res?.message || '查询可入库收货明细失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
receivingList.value = parseReceivingList(res)
|
||||||
|
receivingList.value.forEach((row) => {
|
||||||
|
const detailId = Number(row.detail_id)
|
||||||
|
if (!Number.isFinite(detailId) || detailId <= 0) return
|
||||||
|
if (allocationMap[detailId] == null) {
|
||||||
|
allocationMap[detailId] = 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} catch (error) {
|
||||||
|
console.error('查询可入库收货明细失败:', error)
|
||||||
|
receivingList.value = []
|
||||||
|
ElMessage.error('查询可入库收货明细失败')
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function buildBindings() {
|
||||||
|
const bindings: Array<{ receiving_detail_id: number; allocated_quantity: number }> = []
|
||||||
|
for (const row of receivingList.value) {
|
||||||
|
const detailId = Number(row.detail_id)
|
||||||
|
const allocated = Number(allocationMap[detailId] || 0)
|
||||||
|
const maxAllowed = getRowMaxAllocation(row)
|
||||||
|
if (!Number.isFinite(detailId) || detailId <= 0 || allocated <= 0) continue
|
||||||
|
if (allocated > maxAllowed) {
|
||||||
|
throw new Error(
|
||||||
|
`收货明细 ${row.receiving_number || detailId} 的分配数量不能超过 ${maxAllowed}(应收减实收后的剩余可绑量)`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
bindings.push({
|
||||||
|
receiving_detail_id: detailId,
|
||||||
|
allocated_quantity: Math.floor(allocated),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (totalAllocated.value > remainingBindCapacity.value) {
|
||||||
|
throw new Error(
|
||||||
|
`分配数量合计不能超过 ${remainingBindCapacity.value}(应收数量减实收数量)`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
return bindings
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleSubmit() {
|
||||||
|
const entryItemId = Number(props.entryItem?.id)
|
||||||
|
if (!Number.isFinite(entryItemId) || entryItemId <= 0) {
|
||||||
|
ElMessage.warning('入库明细 ID 无效,无法绑定')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
let bindings: Array<{ receiving_detail_id: number; allocated_quantity: number }> = []
|
||||||
|
try {
|
||||||
|
bindings = buildBindings()
|
||||||
|
} catch (error: any) {
|
||||||
|
ElMessage.warning(error?.message || '分配数量填写有误')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!bindings.length) {
|
||||||
|
ElMessage.warning('请至少填写一条大于 0 的分配数量')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
submitting.value = true
|
||||||
|
try {
|
||||||
|
const res = await bindReceivingDetails({
|
||||||
|
entry_item_id: entryItemId,
|
||||||
|
bindings,
|
||||||
|
})
|
||||||
|
if (!isApiSuccess(res)) {
|
||||||
|
ElMessage.error(res?.message || '绑定收货明细失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const bindingCount = res?.binding_count ?? res?.data?.binding_count ?? bindings.length
|
||||||
|
ElMessage.success(`绑定成功,共 ${bindingCount} 条`)
|
||||||
|
visible.value = false
|
||||||
|
emit('success')
|
||||||
|
} catch (error) {
|
||||||
|
console.error('绑定收货明细失败:', error)
|
||||||
|
ElMessage.error('绑定收货明细失败')
|
||||||
|
} finally {
|
||||||
|
submitting.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleClosed() {
|
||||||
|
resetState()
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => [props.modelValue, props.entryItem?.id, props.entryItem?.stock_id] as const,
|
||||||
|
([open]) => {
|
||||||
|
if (!open) return
|
||||||
|
resetState()
|
||||||
|
void loadReceivingList()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.bind-tip {
|
||||||
|
margin-bottom: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.entry-item-summary {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||||
|
gap: 10px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
padding: 12px;
|
||||||
|
background: #f5f7fa;
|
||||||
|
border-radius: 6px;
|
||||||
|
|
||||||
|
.summary-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-label {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-value {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #303133;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-toolbar {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
|
||||||
|
.toolbar-meta {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.allocation-summary {
|
||||||
|
margin-top: 10px;
|
||||||
|
font-size: 13px;
|
||||||
|
color: #606266;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.allocation-cell {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -0,0 +1,334 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
v-model="visible"
|
||||||
|
title="解绑收货明细"
|
||||||
|
width="920px"
|
||||||
|
align-center
|
||||||
|
append-to-body
|
||||||
|
destroy-on-close
|
||||||
|
:close-on-click-modal="!submitting"
|
||||||
|
@closed="handleClosed"
|
||||||
|
>
|
||||||
|
<div v-if="entryItem" class="entry-item-summary">
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">商品编码</span>
|
||||||
|
<span class="summary-value">{{ entryItem.warehouse_item_code || '—' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">商品名称</span>
|
||||||
|
<span class="summary-value">{{ entryItem.warehouse_item_name || '—' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">实收数量</span>
|
||||||
|
<span class="summary-value">{{ entryItem.pending_total ?? '—' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">SKU</span>
|
||||||
|
<span class="summary-value">{{ entryItem.stock_id ?? '—' }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="dialog-toolbar">
|
||||||
|
<span class="toolbar-meta">pending 绑定 {{ bindingList.length }} 条</span>
|
||||||
|
<el-button size="small" :loading="loading" @click="loadBindings">刷新</el-button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-table
|
||||||
|
:data="bindingList"
|
||||||
|
border
|
||||||
|
size="small"
|
||||||
|
max-height="360"
|
||||||
|
v-loading="loading"
|
||||||
|
row-key="id"
|
||||||
|
empty-text="暂无可解绑的绑定记录"
|
||||||
|
>
|
||||||
|
<el-table-column label="收货单ID" width="100" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.receivingDetail?.receiving_id ?? '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="商品名称" min-width="140" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.receivingDetail?.product_name ?? '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="实收数量" width="90" align="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.receivingDetail?.actual_quantity ?? '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="已入库" width="90" align="right">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.receivingDetail?.stored_quantity ?? '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="allocated_quantity" label="分配数量" width="90" align="right" />
|
||||||
|
<el-table-column prop="batch_number" label="批次号" min-width="110" show-overflow-tooltip>
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.receivingDetail?.batch_number ?? '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="生产日期" width="110">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.receivingDetail?.production_date ?? '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="有效期" width="110">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ row.receivingDetail?.expiry_date ?? '—' }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="80" fixed="right" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button
|
||||||
|
link
|
||||||
|
type="danger"
|
||||||
|
size="small"
|
||||||
|
:loading="unbindingId === row.id"
|
||||||
|
:disabled="submitting"
|
||||||
|
@click="handleUnbindRow(row)"
|
||||||
|
>
|
||||||
|
解绑
|
||||||
|
</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<el-button :disabled="submitting" @click="visible = false">关闭</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { computed, ref, watch } from 'vue'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
import {
|
||||||
|
bindReceivingDetails,
|
||||||
|
getEntryDetail,
|
||||||
|
unbindReceivingDetails,
|
||||||
|
type EntryDetailBinding,
|
||||||
|
} from '@/api/storage.entry/entry'
|
||||||
|
import type { EntryDetailBindRow } from './BindReceivingDetailsDialog.vue'
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
modelValue: boolean
|
||||||
|
entryItem: EntryDetailBindRow | null
|
||||||
|
entryOrderId?: string | number
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
'update:modelValue': [value: boolean]
|
||||||
|
success: []
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const visible = computed({
|
||||||
|
get: () => props.modelValue,
|
||||||
|
set: (value: boolean) => emit('update:modelValue', value),
|
||||||
|
})
|
||||||
|
|
||||||
|
const loading = ref(false)
|
||||||
|
const submitting = ref(false)
|
||||||
|
const unbindingId = ref<number | null>(null)
|
||||||
|
const bindingList = ref<EntryDetailBinding[]>([])
|
||||||
|
|
||||||
|
function isApiSuccess(res: any): boolean {
|
||||||
|
return !!(res && (res.code === 200 || res.code === 1 || res.flag === 'success'))
|
||||||
|
}
|
||||||
|
|
||||||
|
function resetState() {
|
||||||
|
bindingList.value = []
|
||||||
|
unbindingId.value = null
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseBindingsFromEntryItem(item: EntryDetailBindRow | null | undefined): EntryDetailBinding[] {
|
||||||
|
const bindings = item?.bindings
|
||||||
|
if (!Array.isArray(bindings)) return []
|
||||||
|
return bindings.filter((binding) => {
|
||||||
|
const status = String(binding?.status ?? 'pending').toLowerCase()
|
||||||
|
return status === 'pending' || !binding?.status
|
||||||
|
}) as EntryDetailBinding[]
|
||||||
|
}
|
||||||
|
|
||||||
|
async function loadBindings() {
|
||||||
|
const entryItemId = Number(props.entryItem?.id)
|
||||||
|
if (!Number.isFinite(entryItemId) || entryItemId <= 0) {
|
||||||
|
bindingList.value = []
|
||||||
|
ElMessage.warning('入库明细 ID 无效')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
loading.value = true
|
||||||
|
try {
|
||||||
|
const entryOrderId = Number(props.entryOrderId)
|
||||||
|
if (Number.isFinite(entryOrderId) && entryOrderId > 0) {
|
||||||
|
const res = await getEntryDetail({ id: entryOrderId })
|
||||||
|
if (!isApiSuccess(res) || !res.data?.entryOrder) {
|
||||||
|
bindingList.value = parseBindingsFromEntryItem(props.entryItem)
|
||||||
|
ElMessage.error(res?.message || '刷新绑定列表失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const matchedItem = (res.data.entryOrder.items || []).find(
|
||||||
|
(item) => Number(item.id) === entryItemId
|
||||||
|
)
|
||||||
|
bindingList.value = parseBindingsFromEntryItem(matchedItem as EntryDetailBindRow)
|
||||||
|
} else {
|
||||||
|
bindingList.value = parseBindingsFromEntryItem(props.entryItem)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error('刷新绑定列表失败:', error)
|
||||||
|
bindingList.value = parseBindingsFromEntryItem(props.entryItem)
|
||||||
|
ElMessage.error('刷新绑定列表失败')
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function unbindBindings(selected: EntryDetailBinding[]) {
|
||||||
|
const entryItemId = Number(props.entryItem?.id)
|
||||||
|
if (!Number.isFinite(entryItemId) || entryItemId <= 0) {
|
||||||
|
ElMessage.warning('入库明细 ID 无效,无法解绑')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (!selected.length) {
|
||||||
|
ElMessage.warning('请选择要解绑的绑定记录')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
|
const selectedIds = new Set(
|
||||||
|
selected
|
||||||
|
.map((item) => Number(item.id))
|
||||||
|
.filter((id) => Number.isFinite(id) && id > 0)
|
||||||
|
)
|
||||||
|
const remaining = bindingList.value.filter((item) => {
|
||||||
|
const id = Number(item.id)
|
||||||
|
return !selectedIds.has(id)
|
||||||
|
})
|
||||||
|
const unbindQty = selected.reduce(
|
||||||
|
(sum, item) => sum + (Number(item.allocated_quantity) || 0),
|
||||||
|
0
|
||||||
|
)
|
||||||
|
|
||||||
|
if (!remaining.length) {
|
||||||
|
const res = await unbindReceivingDetails({ entry_item_id: entryItemId })
|
||||||
|
if (!isApiSuccess(res)) {
|
||||||
|
ElMessage.error(res?.message || '解绑收货明细失败')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
const releasedQuantity = res?.released_quantity ?? res?.data?.released_quantity ?? unbindQty
|
||||||
|
ElMessage.success(`解绑成功,已释放 ${releasedQuantity} 件`)
|
||||||
|
} else {
|
||||||
|
const res = await bindReceivingDetails({
|
||||||
|
entry_item_id: entryItemId,
|
||||||
|
bindings: remaining.map((item) => ({
|
||||||
|
receiving_detail_id: Number(item.receiving_detail_id),
|
||||||
|
allocated_quantity: Math.floor(Number(item.allocated_quantity) || 0),
|
||||||
|
})),
|
||||||
|
})
|
||||||
|
if (!isApiSuccess(res)) {
|
||||||
|
ElMessage.error(res?.message || '解绑收货明细失败')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
ElMessage.success(`解绑成功,已释放 ${unbindQty} 件`)
|
||||||
|
}
|
||||||
|
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleUnbindRow(row: EntryDetailBinding) {
|
||||||
|
const entryItemId = Number(props.entryItem?.id)
|
||||||
|
const bindingId = Number(row.id)
|
||||||
|
const allocatedQty = Number(row.allocated_quantity) || 0
|
||||||
|
const itemLabel =
|
||||||
|
props.entryItem?.warehouse_item_name || props.entryItem?.warehouse_item_code || entryItemId
|
||||||
|
const productName = row.receivingDetail?.product_name || `绑定 #${bindingId}`
|
||||||
|
|
||||||
|
try {
|
||||||
|
await ElMessageBox.confirm(
|
||||||
|
`确定解绑「${itemLabel}」的收货明细「${productName}」(${allocatedQty} 件)?`,
|
||||||
|
'确认解绑',
|
||||||
|
{
|
||||||
|
confirmButtonText: '确定解绑',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning',
|
||||||
|
}
|
||||||
|
)
|
||||||
|
} catch {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
submitting.value = true
|
||||||
|
unbindingId.value = bindingId
|
||||||
|
try {
|
||||||
|
const ok = await unbindBindings([row])
|
||||||
|
if (!ok) return
|
||||||
|
emit('success')
|
||||||
|
if (bindingList.value.length <= 1) {
|
||||||
|
visible.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
await loadBindings()
|
||||||
|
} catch (error) {
|
||||||
|
console.error('解绑收货明细失败:', error)
|
||||||
|
ElMessage.error('解绑收货明细失败')
|
||||||
|
} finally {
|
||||||
|
submitting.value = false
|
||||||
|
unbindingId.value = null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleClosed() {
|
||||||
|
resetState()
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => [props.modelValue, props.entryItem?.id, props.entryOrderId] as const,
|
||||||
|
([open]) => {
|
||||||
|
if (!open) return
|
||||||
|
resetState()
|
||||||
|
void loadBindings()
|
||||||
|
}
|
||||||
|
)
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.entry-item-summary {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||||
|
gap: 10px;
|
||||||
|
margin-bottom: 12px;
|
||||||
|
padding: 12px;
|
||||||
|
background: #f5f7fa;
|
||||||
|
border-radius: 6px;
|
||||||
|
|
||||||
|
.summary-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-label {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-value {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #303133;
|
||||||
|
word-break: break-all;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.dialog-toolbar {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
|
||||||
|
.toolbar-meta {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -3,13 +3,11 @@
|
|||||||
<div class="header-actions">
|
<div class="header-actions">
|
||||||
<div class="left-actions">
|
<div class="left-actions">
|
||||||
<el-button size="small" @click="loadEntryDetail">刷新</el-button>
|
<el-button size="small" @click="loadEntryDetail">刷新</el-button>
|
||||||
<!-- <el-button size="small" @click="handleAddDetail">新增入库</el-button> -->
|
|
||||||
<!-- <el-button size="small" type="primary" disabled>批量入库</el-button> -->
|
|
||||||
<el-button size="small" disabled>EXCEL导出</el-button>
|
<el-button size="small" disabled>EXCEL导出</el-button>
|
||||||
<el-button size="small" disabled>导出</el-button>
|
<el-button size="small" disabled>导出</el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-actions">
|
<div class="right-actions">
|
||||||
<!-- 搜索或额外操作 -->
|
<el-tag v-if="canBindReceiving" size="small" type="warning">待入库,可绑定收货明细</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -24,114 +22,128 @@
|
|||||||
@page-size-change="handlePageSizeChange"
|
@page-size-change="handlePageSizeChange"
|
||||||
@page-change="handlePageChange"
|
@page-change="handlePageChange"
|
||||||
>
|
>
|
||||||
<template #column-images="{ row }">
|
<template v-if="canBindReceiving" #column-operation="{ row }">
|
||||||
<div class="image-slot">
|
<el-button
|
||||||
<el-image
|
link
|
||||||
v-if="row.images"
|
type="primary"
|
||||||
style="width: 40px; height: 40px"
|
size="small"
|
||||||
:src="row.images"
|
:disabled="!row.stock_id"
|
||||||
:preview-src-list="[row.images]"
|
@click="openBindDialog(row)"
|
||||||
fit="cover"
|
>
|
||||||
/>
|
绑定
|
||||||
<span v-else>--</span>
|
</el-button>
|
||||||
</div>
|
</template>
|
||||||
|
<template #column-pending_total="{ row }">
|
||||||
|
<el-button
|
||||||
|
v-if="canBindReceiving && hasPendingBindings(row)"
|
||||||
|
link
|
||||||
|
type="primary"
|
||||||
|
size="small"
|
||||||
|
@click="openUnbindDialog(row)"
|
||||||
|
>
|
||||||
|
{{ row.pending_total ?? 0 }}
|
||||||
|
</el-button>
|
||||||
|
<span v-else>{{ row.pending_total ?? 0 }}</span>
|
||||||
</template>
|
</template>
|
||||||
</UpperTable>
|
</UpperTable>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 新增入库明细对话框 -->
|
<BindReceivingDetailsDialog
|
||||||
<el-dialog
|
v-model="bindDialogVisible"
|
||||||
v-model="addDialogVisible"
|
:entry-item="bindTargetItem"
|
||||||
title="新增入库明细"
|
@success="handleBindSuccess"
|
||||||
width="450px"
|
/>
|
||||||
append-to-body
|
|
||||||
>
|
<UnbindReceivingDetailsDialog
|
||||||
<el-form :model="addForm" :rules="addRules" ref="addFormRef" label-width="120px" size="small">
|
v-model="unbindDialogVisible"
|
||||||
<el-form-item label="计划入库数量" prop="count">
|
:entry-item="unbindTargetItem"
|
||||||
<el-input-number v-model="addForm.count" :min="1" style="width: 100%" placeholder="请输入数量" />
|
:entry-order-id="props.id"
|
||||||
</el-form-item>
|
@success="handleUnbindSuccess"
|
||||||
<el-form-item label="商品编码" prop="item_code">
|
/>
|
||||||
<el-input v-model="addForm.item_code" placeholder="请输入商品编码" />
|
|
||||||
</el-form-item>
|
|
||||||
</el-form>
|
|
||||||
<template #footer>
|
|
||||||
<el-button size="small" @click="addDialogVisible = false">取消</el-button>
|
|
||||||
<el-button size="small" type="primary" :loading="addLoading" @click="submitAddDetail">确定</el-button>
|
|
||||||
</template>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, reactive, watch, onMounted } from 'vue'
|
import { computed, reactive, ref, watch, onMounted } from 'vue'
|
||||||
import { ElMessage, type FormInstance, type FormRules } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import UpperTable from '@/components/UpperTable/index.vue'
|
import UpperTable from '@/components/UpperTable/index.vue'
|
||||||
import * as entryApi from '@/api/storage.entry/entry'
|
import * as entryApi from '@/api/storage.entry/entry'
|
||||||
|
import BindReceivingDetailsDialog, {
|
||||||
import {entrydetail} from '../entry-config'
|
type EntryDetailBindRow,
|
||||||
|
} from './BindReceivingDetailsDialog.vue'
|
||||||
|
import UnbindReceivingDetailsDialog from './UnbindReceivingDetailsDialog.vue'
|
||||||
|
import { entrydetail, isPendingEntryOrderStatus } from '../entry-config'
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
id?: string | number,
|
id?: string | number
|
||||||
row?: any
|
row?: any
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const tableData = ref<any[]>([])
|
const tableData = ref<any[]>([])
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const multipleSelection = ref<any[]>([])
|
const multipleSelection = ref<any[]>([])
|
||||||
|
const entryOrderStatus = ref('')
|
||||||
|
|
||||||
// 分页相关
|
|
||||||
const pagination = reactive({
|
const pagination = reactive({
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
total: 0
|
total: 0,
|
||||||
})
|
})
|
||||||
|
|
||||||
// 列定义
|
const canBindReceiving = computed(() => {
|
||||||
const detailColumns = ref(entrydetail)
|
const status = props.row?.order_status ?? entryOrderStatus.value
|
||||||
|
return isPendingEntryOrderStatus(status)
|
||||||
|
})
|
||||||
|
|
||||||
|
const detailColumns = computed(() => {
|
||||||
|
const columns = [...entrydetail]
|
||||||
|
if (canBindReceiving.value) {
|
||||||
|
columns.push({
|
||||||
|
prop: 'operation',
|
||||||
|
label: '操作',
|
||||||
|
width: '90',
|
||||||
|
fixed: 'right',
|
||||||
|
align: 'center',
|
||||||
|
} as unknown as (typeof entrydetail)[number])
|
||||||
|
}
|
||||||
|
return columns
|
||||||
|
})
|
||||||
|
|
||||||
const emit = defineEmits(['refresh'])
|
const emit = defineEmits(['refresh'])
|
||||||
|
|
||||||
// 新增明细相关
|
const bindDialogVisible = ref(false)
|
||||||
const addDialogVisible = ref(false)
|
const bindTargetItem = ref<EntryDetailBindRow | null>(null)
|
||||||
const addLoading = ref(false)
|
const unbindDialogVisible = ref(false)
|
||||||
const addFormRef = ref<FormInstance>()
|
const unbindTargetItem = ref<EntryDetailBindRow | null>(null)
|
||||||
const addForm = reactive({
|
|
||||||
count: 1,
|
|
||||||
item_code: ''
|
|
||||||
})
|
|
||||||
|
|
||||||
const addRules = reactive<FormRules>({
|
watch(
|
||||||
count: [{ required: true, message: '请输入计划入库数量', trigger: 'blur' }],
|
() => props.id,
|
||||||
item_code: [{ required: false }]
|
(newVal) => {
|
||||||
})
|
if (newVal) {
|
||||||
|
loadEntryDetail()
|
||||||
// 监听 ID 变化加载数据
|
}
|
||||||
watch(() => props.id, (newVal) => {
|
},
|
||||||
if (newVal) {
|
{ immediate: true }
|
||||||
loadEntryDetail()
|
)
|
||||||
}
|
|
||||||
}, { immediate: true })
|
|
||||||
|
|
||||||
async function loadEntryDetail() {
|
async function loadEntryDetail() {
|
||||||
if (!props.id) return
|
if (!props.id) return
|
||||||
loading.value = true
|
loading.value = true
|
||||||
try {
|
try {
|
||||||
// console.log('加载入库单详情, ID:', props.id)
|
|
||||||
|
|
||||||
const res = await entryApi.getEntryDetail({
|
const res = await entryApi.getEntryDetail({
|
||||||
id: props.id
|
id: Number(props.id),
|
||||||
})
|
})
|
||||||
|
|
||||||
if (res && res.code === 200 && res.data?.entryOrder) {
|
if (res && res.code === 200 && res.data?.entryOrder) {
|
||||||
const entryOrder = res.data.entryOrder
|
const entryOrder = res.data.entryOrder
|
||||||
// 接口文档1显示 items 在 entryOrder 对象中
|
entryOrderStatus.value = entryOrder.order_status || ''
|
||||||
const items = entryOrder.items || []
|
const items = entryOrder.items || []
|
||||||
|
|
||||||
// 处理 items 数据,将嵌套的 stock 信息平铺,方便表格展示
|
|
||||||
tableData.value = items.map((item: any) => ({
|
tableData.value = items.map((item: any) => ({
|
||||||
...item,
|
...item,
|
||||||
item_name: item.stock?.item_name || '',
|
entry_order_code: entryOrder.entry_order_code || '',
|
||||||
// 如果列配置中有其他需要从 stock 获取的字段,可以在此映射
|
purchase_order_code: entryOrder.purchase_order_code || '',
|
||||||
|
store_name: entryOrder.store_name || '',
|
||||||
}))
|
}))
|
||||||
|
|
||||||
pagination.total = tableData.value.length
|
pagination.total = tableData.value.length
|
||||||
@ -143,36 +155,61 @@ async function loadEntryDetail() {
|
|||||||
ElMessage.error('获取明细失败')
|
ElMessage.error('获取明细失败')
|
||||||
tableData.value = []
|
tableData.value = []
|
||||||
pagination.total = 0
|
pagination.total = 0
|
||||||
|
entryOrderStatus.value = ''
|
||||||
} finally {
|
} finally {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleAddDetail() {
|
function openBindDialog(row: EntryDetailBindRow) {
|
||||||
if (!props.id) {
|
if (!canBindReceiving.value) {
|
||||||
ElMessage.warning('请先选择入库单')
|
ElMessage.warning('仅待入库状态的入库单支持绑定收货明细')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
addForm.count = 1
|
if (!row?.id) {
|
||||||
addForm.item_code = ''
|
ElMessage.warning('入库明细 ID 无效')
|
||||||
addDialogVisible.value = true
|
return
|
||||||
|
}
|
||||||
|
if (!row?.stock_id) {
|
||||||
|
ElMessage.warning('当前明细缺少 stock_id,无法查询收货单')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
bindTargetItem.value = row
|
||||||
|
bindDialogVisible.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
async function submitAddDetail() {
|
function openUnbindDialog(row: EntryDetailBindRow) {
|
||||||
if (!addFormRef.value) return
|
if (!canBindReceiving.value) {
|
||||||
|
ElMessage.warning('仅待入库状态的入库单支持解绑收货明细')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!row?.id) {
|
||||||
|
ElMessage.warning('入库明细 ID 无效')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!hasPendingBindings(row)) {
|
||||||
|
ElMessage.warning('当前明细没有可解绑的收货绑定')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
unbindTargetItem.value = row
|
||||||
|
unbindDialogVisible.value = true
|
||||||
|
}
|
||||||
|
|
||||||
await addFormRef.value.validate(async (valid) => {
|
async function handleBindSuccess() {
|
||||||
if (!valid) return
|
await loadEntryDetail()
|
||||||
|
emit('refresh')
|
||||||
|
}
|
||||||
|
|
||||||
addLoading.value = true
|
async function handleUnbindSuccess() {
|
||||||
try {
|
await loadEntryDetail()
|
||||||
ElMessage.warning('接口已下线:storage.entry.addDetail 不再对外开放')
|
emit('refresh')
|
||||||
addDialogVisible.value = false
|
}
|
||||||
emit('refresh')
|
|
||||||
} finally {
|
function hasPendingBindings(row: EntryDetailBindRow): boolean {
|
||||||
addLoading.value = false
|
const pendingTotal = Number(row.pending_total)
|
||||||
}
|
if (Number.isFinite(pendingTotal) && pendingTotal > 0) return true
|
||||||
})
|
const bindings = row.bindings
|
||||||
|
return Array.isArray(bindings) && bindings.length > 0
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleSelectionChange = (val: any[]) => {
|
const handleSelectionChange = (val: any[]) => {
|
||||||
@ -216,11 +253,5 @@ onMounted(() => {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.image-slot {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -73,19 +73,44 @@ export const entryColums = [
|
|||||||
{ prop: '',label:'',width:'160',fixed: 'left' },
|
{ prop: '',label:'',width:'160',fixed: 'left' },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const entryInventoryTypeLabelMap: Record<string, string> = {
|
||||||
|
ZP: '正品',
|
||||||
|
CC: '次品',
|
||||||
|
JS: '机损',
|
||||||
|
XS: '箱损',
|
||||||
|
ZT: '在途',
|
||||||
|
DJ: '冻结',
|
||||||
|
FP: '分配',
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatEntryInventoryType(_row: any, _col: any, value: unknown) {
|
||||||
|
if (value === null || value === undefined || value === '') return '--'
|
||||||
|
const key = String(value)
|
||||||
|
return entryInventoryTypeLabelMap[key] || key
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 入库单是否为待入库状态(支持枚举值与中文文案) */
|
||||||
|
export function isPendingEntryOrderStatus(status: unknown): boolean {
|
||||||
|
if (status === null || status === undefined || status === '') return false
|
||||||
|
const normalized = String(status).trim()
|
||||||
|
return normalized === 'PENDING' || normalized === '待入库'
|
||||||
|
}
|
||||||
|
|
||||||
export const entrydetail = [
|
export const entrydetail = [
|
||||||
{ prop: 'id', label: 'ID', width: '160' },
|
{ prop: 'entry_order_code', label: '入库单号', width: '180', fixed: 'left' },
|
||||||
|
{ prop: 'purchase_order_code', label: '单据编号', width: '160' },
|
||||||
|
{ prop: 'store_name', label: '货主', width: '140' },
|
||||||
|
{ prop: 'order_line_no', label: '行号', width: '80', align: 'center' },
|
||||||
|
{ prop: 'warehouse_item_code', label: '商品编码', width: '160' },
|
||||||
|
{ prop: 'warehouse_item_name', label: '商品名称', minWidth: '200' },
|
||||||
|
{ prop: 'warehouse_item_spec', label: '规格', width: '140' },
|
||||||
|
{ prop: 'external_item_code', label: '外部商品编码', width: '160' },
|
||||||
|
{ prop: 'count', label: '应收数量', width: '100', align: 'right' },
|
||||||
|
{ prop: 'received_quantity', label: '实收数量', width: '100', align: 'right' },
|
||||||
|
{ prop: 'confirm_quantity', label: '确认数量', width: '100', align: 'right' },
|
||||||
|
{ prop: 'inventory_type', label: '库存类型', width: '100', align: 'center', formatter: formatEntryInventoryType },
|
||||||
|
{ prop: 'stock_id', label: '库存ID', width: '100' },
|
||||||
{ prop: 'out_biz_code', label: '外部业务编码', width: '160' },
|
{ prop: 'out_biz_code', label: '外部业务编码', width: '160' },
|
||||||
{ prop: 'order_line_no', label: '订单行号', width: '160' },
|
|
||||||
{ prop: 'owner_code', label: '货主编码', width: '160' },
|
|
||||||
{ prop: 'item_code', label: '商品编码', width: '160' },
|
|
||||||
{ prop: 'item_id', label: '商品 ID', width: '160' },
|
|
||||||
{ prop: 'count', label: '应收数量', width: '160' },
|
|
||||||
{ prop: 'inventory_type', label: '库存类型', width: '160' },
|
|
||||||
{ prop: 'stock_id', label: '库存记录 ID', width: '160' },
|
|
||||||
{ prop: 'received_quantity', label: '实收数量', width: '160' },
|
|
||||||
{ prop: 'confirm_quantity', label: '确认数量', width: '160' },
|
|
||||||
{ prop: '', label: '', width: '160' },
|
|
||||||
]
|
]
|
||||||
|
|
||||||
export const detailpanel = [
|
export const detailpanel = [
|
||||||
|
|||||||
482
src/views/storage/management/replenishmentDemand/index.vue
Normal file
482
src/views/storage/management/replenishmentDemand/index.vue
Normal file
@ -0,0 +1,482 @@
|
|||||||
|
<template>
|
||||||
|
<div class="replenishment-demand-page">
|
||||||
|
<div class="page-header">
|
||||||
|
<div class="page-title">分拣缺货补货需求</div>
|
||||||
|
<div class="page-desc">
|
||||||
|
按当前登录仓库自动计算未完成储位分配订单的 SKU 补货需求,展示分拣区/存货区库存、需求量、缺口及可补货库位。
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<el-alert
|
||||||
|
type="info"
|
||||||
|
:closable="false"
|
||||||
|
show-icon
|
||||||
|
class="api-tip"
|
||||||
|
title="storage.management.replenishmentDemand"
|
||||||
|
description="接口自动从用户上下文获取仓库,查询参数仅支持分页(page / pageSize)与排序(sortField / sortOrder)。"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-card shadow="never" class="query-card">
|
||||||
|
<el-form
|
||||||
|
ref="queryFormRef"
|
||||||
|
:model="queryForm"
|
||||||
|
:inline="true"
|
||||||
|
size="small"
|
||||||
|
label-width="88px"
|
||||||
|
class="query-form"
|
||||||
|
@submit.prevent="handleQuery"
|
||||||
|
>
|
||||||
|
<el-form-item label="每页条数">
|
||||||
|
<el-select v-model="queryForm.pageSize" style="width: 120px">
|
||||||
|
<el-option v-for="size in pageSizeOptions" :key="size" :label="`${size} 条`" :value="size" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序字段">
|
||||||
|
<el-select v-model="queryForm.sortField" style="width: 150px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in sortFieldOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序方向">
|
||||||
|
<el-select v-model="queryForm.sortOrder" style="width: 110px">
|
||||||
|
<el-option
|
||||||
|
v-for="item in sortOrderOptions"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" :loading="loading" @click="handleQuery">查询</el-button>
|
||||||
|
<el-button :disabled="loading" @click="handleReset">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-card>
|
||||||
|
|
||||||
|
<div class="summary-bar">
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">SKU总数</span>
|
||||||
|
<span class="summary-value">{{ summary.total_skus ?? '-' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">缺货SKU</span>
|
||||||
|
<span class="summary-value warning">{{ summary.total_shortage_skus ?? '-' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">建议补货总量</span>
|
||||||
|
<span class="summary-value primary">{{ summary.total_replenishment_needed ?? '-' }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="summary-item">
|
||||||
|
<span class="summary-label">真实缺货SKU</span>
|
||||||
|
<span class="summary-value danger">{{ summary.total_true_shortage_skus ?? '-' }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="toolbar">
|
||||||
|
<div class="toolbar-left">
|
||||||
|
<el-button type="primary" size="small" :loading="loading" @click="handleQuery">刷新</el-button>
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
size="small"
|
||||||
|
:disabled="!selectedRows.length"
|
||||||
|
@click="handleExport"
|
||||||
|
>
|
||||||
|
导出选中({{ selectedRows.length }})
|
||||||
|
</el-button>
|
||||||
|
<el-tag size="small" type="info">共 {{ pagination.total }} 条</el-tag>
|
||||||
|
<el-tag v-if="queryTime > 0" size="small" effect="plain">{{ queryTime }}ms</el-tag>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="table-wrapper">
|
||||||
|
<el-table
|
||||||
|
ref="tableRef"
|
||||||
|
v-loading="loading"
|
||||||
|
:data="tableData"
|
||||||
|
border
|
||||||
|
stripe
|
||||||
|
size="small"
|
||||||
|
style="width: 100%"
|
||||||
|
row-key="stock_id"
|
||||||
|
:default-sort="defaultTableSort"
|
||||||
|
@selection-change="handleSelectionChange"
|
||||||
|
@sort-change="handleTableSortChange"
|
||||||
|
>
|
||||||
|
<el-table-column type="selection" width="48" fixed="left" />
|
||||||
|
<el-table-column type="expand" width="48">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<div v-if="row.replenishment_locations?.length" class="expand-content">
|
||||||
|
<div class="expand-title">补货库位明细</div>
|
||||||
|
<el-table :data="row.replenishment_locations" border size="small">
|
||||||
|
<el-table-column prop="space_code" label="库位编码" min-width="160" />
|
||||||
|
<el-table-column prop="space_name" label="库位名称" min-width="140" />
|
||||||
|
<el-table-column prop="available_quantity" label="可用数量" min-width="100" align="right" />
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
<div v-else class="expand-empty">无可用补货库位(存货区与分拣区均无库存)</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="stock_code" label="SKU编码" min-width="140" show-overflow-tooltip />
|
||||||
|
<el-table-column prop="stock_name" label="商品名称" min-width="160" show-overflow-tooltip />
|
||||||
|
<el-table-column
|
||||||
|
prop="pick_zone_quantity"
|
||||||
|
label="分拣区库存"
|
||||||
|
min-width="110"
|
||||||
|
align="right"
|
||||||
|
sortable="custom"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="storage_zone_quantity"
|
||||||
|
label="存货区库存"
|
||||||
|
min-width="110"
|
||||||
|
align="right"
|
||||||
|
sortable="custom"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="total_demand" label="总需求量" min-width="100" align="right" sortable="custom" />
|
||||||
|
<el-table-column prop="shortage" label="缺口数量" min-width="100" align="right" sortable="custom">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<span :class="{ 'shortage-text': Number(row.shortage) > 0 }">{{ row.shortage ?? '-' }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
prop="replenishment_needed"
|
||||||
|
label="建议补货量"
|
||||||
|
min-width="110"
|
||||||
|
align="right"
|
||||||
|
sortable="custom"
|
||||||
|
>
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag :type="Number(row.replenishment_needed) > 0 ? 'warning' : 'success'" size="small">
|
||||||
|
{{ row.replenishment_needed ?? 0 }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="replenishment_status" label="补货状态" min-width="110" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag :type="statusTagType(row.replenishment_status)" size="small">
|
||||||
|
{{ statusLabel(row.replenishment_status) }}
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="补货库位" min-width="100" align="center">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag
|
||||||
|
v-if="row.replenishment_locations?.length"
|
||||||
|
type="success"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
{{ row.replenishment_locations.length }}个
|
||||||
|
</el-tag>
|
||||||
|
<span v-else class="no-location-text">-</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template #empty>
|
||||||
|
<div class="empty-tip">暂无补货需求数据,可调整排序后重新查询</div>
|
||||||
|
</template>
|
||||||
|
</el-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pagination-wrapper">
|
||||||
|
<el-pagination
|
||||||
|
v-model:current-page="pagination.page"
|
||||||
|
v-model:page-size="queryForm.pageSize"
|
||||||
|
:total="pagination.total"
|
||||||
|
:page-sizes="pageSizeOptions"
|
||||||
|
layout="total, sizes, prev, pager, next, jumper"
|
||||||
|
@size-change="handlePageSizeChange"
|
||||||
|
@current-change="handlePageChange"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { computed, onMounted, reactive, ref } from 'vue'
|
||||||
|
import { ElMessage, type FormInstance } from 'element-plus'
|
||||||
|
import { getReplenishmentDemand } from '@/api/storage.management/management'
|
||||||
|
import {
|
||||||
|
defaultQueryForm,
|
||||||
|
exportReplenishmentDemandCsv,
|
||||||
|
isReplenishmentDemandSuccess,
|
||||||
|
parseReplenishmentDemandResponse,
|
||||||
|
replenishmentStatusLabelMap,
|
||||||
|
replenishmentStatusTagMap,
|
||||||
|
sortFieldOptions,
|
||||||
|
sortOrderOptions,
|
||||||
|
type ReplenishmentDemandListItem,
|
||||||
|
type ReplenishmentDemandQueryForm,
|
||||||
|
type ReplenishmentDemandSummary,
|
||||||
|
} from './replenishment-demand-config'
|
||||||
|
|
||||||
|
const pageSizeOptions = [20, 50, 100, 200]
|
||||||
|
const queryFormRef = ref<FormInstance>()
|
||||||
|
const tableRef = ref()
|
||||||
|
const loading = ref(false)
|
||||||
|
const queryTime = ref(0)
|
||||||
|
const tableData = ref<ReplenishmentDemandListItem[]>([])
|
||||||
|
const selectedRows = ref<ReplenishmentDemandListItem[]>([])
|
||||||
|
const summary = ref<ReplenishmentDemandSummary>({})
|
||||||
|
|
||||||
|
const queryForm = reactive<ReplenishmentDemandQueryForm>(defaultQueryForm())
|
||||||
|
const pagination = reactive({
|
||||||
|
page: 1,
|
||||||
|
total: 0,
|
||||||
|
})
|
||||||
|
|
||||||
|
const defaultTableSort = computed(() => ({
|
||||||
|
prop: queryForm.sortField,
|
||||||
|
order: queryForm.sortOrder === 'ASC' ? 'ascending' : 'descending',
|
||||||
|
}))
|
||||||
|
|
||||||
|
function buildRequestBody() {
|
||||||
|
return {
|
||||||
|
pagination: {
|
||||||
|
page: pagination.page,
|
||||||
|
pageSize: queryForm.pageSize,
|
||||||
|
},
|
||||||
|
sort: {
|
||||||
|
sortField: queryForm.sortField,
|
||||||
|
sortOrder: queryForm.sortOrder,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function fetchData() {
|
||||||
|
loading.value = true
|
||||||
|
const start = Date.now()
|
||||||
|
try {
|
||||||
|
const res = await getReplenishmentDemand(buildRequestBody())
|
||||||
|
if (!isReplenishmentDemandSuccess(res)) {
|
||||||
|
tableData.value = []
|
||||||
|
summary.value = {}
|
||||||
|
pagination.total = 0
|
||||||
|
ElMessage.error((res as any)?.message || (res as any)?.msg || '获取补货需求失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const parsed = parseReplenishmentDemandResponse(res)
|
||||||
|
tableData.value = parsed.list
|
||||||
|
summary.value = parsed.summary
|
||||||
|
pagination.total = parsed.pagination.total
|
||||||
|
if (parsed.pagination.page) pagination.page = parsed.pagination.page
|
||||||
|
if (parsed.pagination.pageSize) queryForm.pageSize = parsed.pagination.pageSize
|
||||||
|
} catch (error) {
|
||||||
|
console.error('获取分拣缺货补货需求失败:', error)
|
||||||
|
tableData.value = []
|
||||||
|
summary.value = {}
|
||||||
|
pagination.total = 0
|
||||||
|
ElMessage.error('获取数据失败,请稍后重试')
|
||||||
|
} finally {
|
||||||
|
queryTime.value = Date.now() - start
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleQuery() {
|
||||||
|
pagination.page = 1
|
||||||
|
void fetchData()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleReset() {
|
||||||
|
Object.assign(queryForm, defaultQueryForm())
|
||||||
|
pagination.page = 1
|
||||||
|
queryFormRef.value?.clearValidate?.()
|
||||||
|
void fetchData()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handlePageChange(page: number) {
|
||||||
|
pagination.page = page
|
||||||
|
void fetchData()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handlePageSizeChange(size: number) {
|
||||||
|
queryForm.pageSize = size
|
||||||
|
pagination.page = 1
|
||||||
|
void fetchData()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleSelectionChange(rows: ReplenishmentDemandListItem[]) {
|
||||||
|
selectedRows.value = rows
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleTableSortChange(sort: { prop: string; order: string | null }) {
|
||||||
|
if (!sort.order) {
|
||||||
|
Object.assign(queryForm, defaultQueryForm())
|
||||||
|
} else {
|
||||||
|
queryForm.sortField = sort.prop as ReplenishmentDemandQueryForm['sortField']
|
||||||
|
queryForm.sortOrder = sort.order === 'ascending' ? 'ASC' : 'DESC'
|
||||||
|
}
|
||||||
|
pagination.page = 1
|
||||||
|
void fetchData()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleExport() {
|
||||||
|
if (!selectedRows.value.length) {
|
||||||
|
ElMessage.warning('请先选择要导出的记录')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
exportReplenishmentDemandCsv(selectedRows.value)
|
||||||
|
ElMessage.success(`已导出 ${selectedRows.value.length} 条记录`)
|
||||||
|
}
|
||||||
|
|
||||||
|
function statusLabel(status?: string) {
|
||||||
|
return replenishmentStatusLabelMap[status ?? ''] || status || '-'
|
||||||
|
}
|
||||||
|
|
||||||
|
function statusTagType(status?: string) {
|
||||||
|
return replenishmentStatusTagMap[status ?? ''] || 'info'
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
void fetchData()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.replenishment-demand-page {
|
||||||
|
height: 100%;
|
||||||
|
padding: 16px;
|
||||||
|
background: #f5f7fa;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-header {
|
||||||
|
.page-title {
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #303133;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-desc {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.api-tip {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.query-card {
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
:deep(.el-card__body) {
|
||||||
|
padding: 12px 16px 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.query-form {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 4px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-bar {
|
||||||
|
display: flex;
|
||||||
|
gap: 16px;
|
||||||
|
padding: 12px 16px;
|
||||||
|
background: #f0f5ff;
|
||||||
|
border-radius: 6px;
|
||||||
|
border: 1px solid #d6e4ff;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
.summary-item {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
flex: 1;
|
||||||
|
min-width: 0;
|
||||||
|
|
||||||
|
.summary-label {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #909399;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.summary-value {
|
||||||
|
font-size: 20px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #303133;
|
||||||
|
|
||||||
|
&.warning {
|
||||||
|
color: #e6a23c;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.primary {
|
||||||
|
color: #409eff;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.danger {
|
||||||
|
color: #f56c6c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbar {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
flex-shrink: 0;
|
||||||
|
|
||||||
|
.toolbar-left {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.table-wrapper {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: auto;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagination-wrapper {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
flex-shrink: 0;
|
||||||
|
background: #fff;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 8px 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.shortage-text {
|
||||||
|
color: #f56c6c;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.expand-content {
|
||||||
|
padding: 8px 16px;
|
||||||
|
|
||||||
|
.expand-title {
|
||||||
|
font-size: 13px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #303133;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.expand-empty,
|
||||||
|
.empty-tip {
|
||||||
|
padding: 16px;
|
||||||
|
text-align: center;
|
||||||
|
color: #909399;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-location-text {
|
||||||
|
color: #c0c4cc;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -0,0 +1,128 @@
|
|||||||
|
import type { ReplenishmentDemandSortField } from '@/api/storage.management/management'
|
||||||
|
|
||||||
|
export interface ReplenishmentDemandQueryForm {
|
||||||
|
pageSize: number
|
||||||
|
sortField: ReplenishmentDemandSortField
|
||||||
|
sortOrder: 'ASC' | 'DESC'
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ReplenishmentDemandListItem {
|
||||||
|
stock_id: number
|
||||||
|
stock_code?: string
|
||||||
|
stock_name?: string
|
||||||
|
pick_zone_quantity?: number
|
||||||
|
storage_zone_quantity?: number
|
||||||
|
total_demand?: number
|
||||||
|
shortage?: number
|
||||||
|
replenishment_needed?: number
|
||||||
|
replenishment_status?: string
|
||||||
|
replenishment_locations?: Array<{
|
||||||
|
space_code?: string
|
||||||
|
space_name?: string
|
||||||
|
available_quantity?: number
|
||||||
|
}>
|
||||||
|
[key: string]: unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ReplenishmentDemandSummary {
|
||||||
|
total_skus?: number
|
||||||
|
total_shortage_skus?: number
|
||||||
|
total_replenishment_needed?: number
|
||||||
|
total_true_shortage_skus?: number
|
||||||
|
[key: string]: number | undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
export const defaultQueryForm = (): ReplenishmentDemandQueryForm => ({
|
||||||
|
pageSize: 20,
|
||||||
|
sortField: 'shortage',
|
||||||
|
sortOrder: 'DESC',
|
||||||
|
})
|
||||||
|
|
||||||
|
export const sortFieldOptions: Array<{ label: string; value: ReplenishmentDemandSortField }> = [
|
||||||
|
{ label: 'SKU ID', value: 'stock_id' },
|
||||||
|
{ label: '分拣区库存', value: 'pick_zone_quantity' },
|
||||||
|
{ label: '存货区库存', value: 'storage_zone_quantity' },
|
||||||
|
{ label: '总需求量', value: 'total_demand' },
|
||||||
|
{ label: '缺口数量', value: 'shortage' },
|
||||||
|
{ label: '建议补货量', value: 'replenishment_needed' },
|
||||||
|
]
|
||||||
|
|
||||||
|
export const sortOrderOptions = [
|
||||||
|
{ label: '降序', value: 'DESC' as const },
|
||||||
|
{ label: '升序', value: 'ASC' as const },
|
||||||
|
]
|
||||||
|
|
||||||
|
export const replenishmentStatusLabelMap: Record<string, string> = {
|
||||||
|
true_shortage: '真实缺货',
|
||||||
|
replenishable: '可补货',
|
||||||
|
sufficient: '充足',
|
||||||
|
}
|
||||||
|
|
||||||
|
export const replenishmentStatusTagMap: Record<string, string> = {
|
||||||
|
true_shortage: 'danger',
|
||||||
|
replenishable: 'warning',
|
||||||
|
sufficient: 'success',
|
||||||
|
}
|
||||||
|
|
||||||
|
export function isReplenishmentDemandSuccess(res: any): boolean {
|
||||||
|
return !!(res && (res.code === 1 || res.code === 200 || res.flag === 'success'))
|
||||||
|
}
|
||||||
|
|
||||||
|
export function parseReplenishmentDemandResponse(res: any): {
|
||||||
|
list: ReplenishmentDemandListItem[]
|
||||||
|
summary: ReplenishmentDemandSummary
|
||||||
|
pagination: { page: number; pageSize: number; total: number }
|
||||||
|
} {
|
||||||
|
const data = res?.data && typeof res.data === 'object' ? res.data : res
|
||||||
|
const list = (data?.list ?? res?.list ?? []) as ReplenishmentDemandListItem[]
|
||||||
|
const summary = (data?.summary ?? res?.summary ?? {}) as ReplenishmentDemandSummary
|
||||||
|
const paginationRaw = data?.pagination ?? res?.pagination ?? {}
|
||||||
|
const total = Number(
|
||||||
|
paginationRaw?.total ?? data?.total ?? res?.total ?? list.length
|
||||||
|
)
|
||||||
|
return {
|
||||||
|
list,
|
||||||
|
summary,
|
||||||
|
pagination: {
|
||||||
|
page: Number(paginationRaw?.page ?? data?.page ?? 1),
|
||||||
|
pageSize: Number(paginationRaw?.pageSize ?? data?.pageSize ?? 20),
|
||||||
|
total: Number.isFinite(total) ? total : list.length,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function exportReplenishmentDemandCsv(rows: ReplenishmentDemandListItem[], filename = '补货需求.csv') {
|
||||||
|
if (!rows.length) return
|
||||||
|
const headers = [
|
||||||
|
'SKU编码',
|
||||||
|
'商品名称',
|
||||||
|
'分拣区库存',
|
||||||
|
'存货区库存',
|
||||||
|
'总需求量',
|
||||||
|
'缺口数量',
|
||||||
|
'建议补货量',
|
||||||
|
'补货状态',
|
||||||
|
'补货库位数',
|
||||||
|
]
|
||||||
|
const lines = rows.map((row) => [
|
||||||
|
row.stock_code ?? '',
|
||||||
|
row.stock_name ?? '',
|
||||||
|
row.pick_zone_quantity ?? '',
|
||||||
|
row.storage_zone_quantity ?? '',
|
||||||
|
row.total_demand ?? '',
|
||||||
|
row.shortage ?? '',
|
||||||
|
row.replenishment_needed ?? '',
|
||||||
|
replenishmentStatusLabelMap[row.replenishment_status ?? ''] ?? row.replenishment_status ?? '',
|
||||||
|
row.replenishment_locations?.length ?? 0,
|
||||||
|
])
|
||||||
|
const csv = [headers, ...lines]
|
||||||
|
.map((line) => line.map((cell) => `"${String(cell).replace(/"/g, '""')}"`).join(','))
|
||||||
|
.join('\n')
|
||||||
|
const blob = new Blob(['\uFEFF' + csv], { type: 'text/csv;charset=utf-8;' })
|
||||||
|
const url = URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a')
|
||||||
|
link.href = url
|
||||||
|
link.download = filename
|
||||||
|
link.click()
|
||||||
|
URL.revokeObjectURL(url)
|
||||||
|
}
|
||||||
@ -8,227 +8,104 @@
|
|||||||
"message": "登录成功",
|
"message": "登录成功",
|
||||||
"success": true,
|
"success": true,
|
||||||
"data": {
|
"data": {
|
||||||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3ODE2OTEyOTgsImV4cCI6MTc4MTcwNTY5OH0.xdL8rq_zhQIAQPmwsX21pyAV3OzJPPpycgjjjiQYVbg"
|
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3ODE3NzY0NjksImV4cCI6MTc4MTc5MDg2OX0.CbuNMERnphyn_sdPNSOast3BfOnW030MzEEkml_Y-ZE"
|
||||||
},
|
},
|
||||||
"timestamp": 1781691298
|
"timestamp": 1781776469
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"接口": "order.pendingOrder.detail",
|
"接口": "storage.entry.get",
|
||||||
"data": {
|
"data": {
|
||||||
"flag": "success",
|
"flag": "success",
|
||||||
"code": 1,
|
"code": 200,
|
||||||
"message": "ok",
|
"message": "查询成功",
|
||||||
"data": {
|
"data": {
|
||||||
"detail": {
|
"entryOrder": {
|
||||||
"id": 6448,
|
"id": 234,
|
||||||
"delivery_order_code": "SIM202604280004264588",
|
"entry_order_code": "TEST-EO-1781661791664EM3F02",
|
||||||
"pre_delivery_order_code": "",
|
"order_type": "SCRK",
|
||||||
"pre_delivery_order_id": "",
|
"purchase_order_code": "",
|
||||||
"order_type": "JYCK",
|
"total_order_lines": 1,
|
||||||
"warehouse_code": "100000",
|
"order_create_time": "2026-06-17T02:03:11.000Z",
|
||||||
"order_flag": null,
|
"expect_start_time": "2026-06-20T02:00:00.000Z",
|
||||||
"extend_props": null,
|
"expect_end_time": "2026-06-17T02:03:11.000Z",
|
||||||
"source_platform_code": "PDD",
|
"logistics_code": "",
|
||||||
"source_platform_name": "拼多多",
|
"logistics_name": "",
|
||||||
"create_channel": "QM",
|
|
||||||
"source_order_codes": "",
|
|
||||||
"sys_platform_code": "TB",
|
|
||||||
"sys_platform_name": "淘宝",
|
|
||||||
"create_at": "2026-01-13T15:26:07.000Z",
|
|
||||||
"delete_at": null,
|
|
||||||
"updated_at": "2026-06-03T07:24:37.000Z",
|
|
||||||
"place_order_time": "2026-01-13T15:22:03.000Z",
|
|
||||||
"pay_time": "2026-01-13T15:22:03.000Z",
|
|
||||||
"pay_no": "",
|
|
||||||
"service_code": null,
|
|
||||||
"operator_name": "1",
|
|
||||||
"operate_time": "2026-01-13T15:26:07.000Z",
|
|
||||||
"delivery_time": null,
|
|
||||||
"shop_nick": "火火家de小店",
|
|
||||||
"buyer_message": null,
|
|
||||||
"seller_message": null,
|
|
||||||
"remark": null,
|
|
||||||
"seller_nick": "1",
|
|
||||||
"buyer_nick": "刘付明仁18022440198",
|
|
||||||
"total_amount": "13.00",
|
|
||||||
"item_amount": "13.00",
|
|
||||||
"discount_amount": "0.00",
|
|
||||||
"freight": "0.00",
|
|
||||||
"ar_amount": "0.00",
|
|
||||||
"got_amount": "0.00",
|
|
||||||
"service_fee": null,
|
|
||||||
"logistics_code": "SF",
|
|
||||||
"logistics_name": "顺丰速运",
|
|
||||||
"sys_logistics_code": "SF",
|
|
||||||
"sys_logistics_name": "顺丰速运",
|
|
||||||
"basket_number": null,
|
|
||||||
"express_code": "",
|
"express_code": "",
|
||||||
"logistics_area_code": "",
|
"supplier_code": "SUP001",
|
||||||
"delivery_type": null,
|
"supplier_name": "测试供应商",
|
||||||
"weight_type": 0,
|
"source_type": "API",
|
||||||
"is_urgency": "N",
|
"order_status": "PENDING",
|
||||||
"invoice_flag": "N",
|
"sync_status": "PENDING",
|
||||||
"status": "pedding",
|
"sync_message": "",
|
||||||
"name": "王志强",
|
"is_enabled": 1,
|
||||||
"zip_code": "",
|
"created_at": "2026-06-17T02:03:11.000Z",
|
||||||
"tel": "",
|
"updated_at": "2026-06-17T02:03:11.000Z",
|
||||||
"mobile": "18022440198",
|
|
||||||
"email": "",
|
|
||||||
"country_code": "CN",
|
|
||||||
"province": "广东省",
|
|
||||||
"city": "广州市",
|
|
||||||
"area": "白云区",
|
|
||||||
"town": "太和镇",
|
|
||||||
"detail_address": "广东省 广州市 白云区 龙归街道 三路22号",
|
|
||||||
"id_type": null,
|
|
||||||
"id_number": null,
|
|
||||||
"oaid": null,
|
|
||||||
"sync_status": "padding",
|
|
||||||
"store_id": 1000000,
|
|
||||||
"warehouse_id": 100000,
|
"warehouse_id": 100000,
|
||||||
"from_key": 24869601,
|
"store_id": 1000000,
|
||||||
"items": "101380+7",
|
"remark": "自动化测试入库单",
|
||||||
"items_count": 2,
|
"expense_record": 0,
|
||||||
"items_total": 13,
|
"store_name": "测试货主",
|
||||||
"items_weight": "146.00",
|
"warehouse_name": "测试云仓",
|
||||||
"items_hash": "bdffe98b6548cc459dfe5b9ef4b3ba7e",
|
"deleted_at": null,
|
||||||
"items_crc": 4179089176,
|
"qimen_owner_code": "",
|
||||||
"wave_id": 1777970280349416,
|
"qimen_warehouse_code": "100000",
|
||||||
"wave_no": "A2026060800002",
|
"warehouse": {
|
||||||
"wave_strategy_version": 306,
|
"id": 100000,
|
||||||
"wave_scan_result": 1,
|
"company_name": "测试仓"
|
||||||
"post_status": "fin",
|
|
||||||
"storage_status": "fin",
|
|
||||||
"pick_status": "fin",
|
|
||||||
"pack_status": "none",
|
|
||||||
"sended_status": "none",
|
|
||||||
"inspection_status": "padding",
|
|
||||||
"recheck_status": "none",
|
|
||||||
"recheck_time": null,
|
|
||||||
"step": 2,
|
|
||||||
"print_status": "fin",
|
|
||||||
"claim_status": "none",
|
|
||||||
"outbound_status": "none",
|
|
||||||
"lock_status": "none",
|
|
||||||
"print_lock_status": "none",
|
|
||||||
"intercept_status": "none"
|
|
||||||
},
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"id": 8886,
|
|
||||||
"order_id": 6448,
|
|
||||||
"actual_price": "1.00",
|
|
||||||
"retail_price": "1.00",
|
|
||||||
"ext_code": "",
|
|
||||||
"inventory_type": "ZP",
|
|
||||||
"item_code": "011000000228",
|
|
||||||
"item_id": 1000649,
|
|
||||||
"item_name": "测试A",
|
|
||||||
"order_line_no": "1",
|
|
||||||
"owner_code": "jky2025102001",
|
|
||||||
"plan_qty": 6,
|
|
||||||
"source_order_code": "",
|
|
||||||
"sub_source_order_code": "",
|
|
||||||
"extend_props": "{\"RealPayMoney\":\"6\",\"shareAmount\":\"6\"}",
|
|
||||||
"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-27T16:04:26.000Z",
|
|
||||||
"updated_at": "2026-04-27T16:04:26.000Z",
|
|
||||||
"createdAt": "2026-04-27T16:04:26.000Z",
|
|
||||||
"updatedAt": "2026-04-27T16:04:26.000Z",
|
|
||||||
"images": [
|
|
||||||
"https://ye4s.file.gzxunren.com//100000/images/20260421/EA414742C733521A513E6EE430415143.jpg",
|
|
||||||
"https://ye4s.file.gzxunren.com//100000/images/20260423/DCB409259C5653AEA53C367953569534.jpg"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
"store": {
|
||||||
"id": 8887,
|
"id": 1000000,
|
||||||
"order_id": 6448,
|
"company_name": "测试货主1111"
|
||||||
"actual_price": "1.00",
|
},
|
||||||
"retail_price": "1.00",
|
"items": [
|
||||||
"ext_code": "",
|
{
|
||||||
"inventory_type": "ZP",
|
"id": 440,
|
||||||
"item_code": "011000001536",
|
"order_id": 234,
|
||||||
"item_id": 1000652,
|
"out_biz_code": "",
|
||||||
"item_name": "测试B",
|
"order_line_no": 1,
|
||||||
"order_line_no": "2",
|
"owner_code": "4",
|
||||||
"owner_code": "jky2025102001",
|
"count": 10,
|
||||||
"plan_qty": 7,
|
"inventory_type": "ZP",
|
||||||
"source_order_code": "",
|
"stock_id": 101397,
|
||||||
"sub_source_order_code": "",
|
"received_quantity": 0,
|
||||||
"extend_props": "{\"RealPayMoney\":\"7\",\"shareAmount\":\"7\"}",
|
"confirm_quantity": 0,
|
||||||
"stock_id": 101380,
|
"pending_total": 3,
|
||||||
"item_snapshot": {
|
"total_planned": 10,
|
||||||
"id": 1000652,
|
"bindings": [
|
||||||
"width": 0,
|
{
|
||||||
"height": 0,
|
"id": 1,
|
||||||
"length": 0,
|
"entry_item_id": 440,
|
||||||
"volume": 0,
|
"receiving_detail_id": 2628,
|
||||||
"barcode": "011000001536",
|
"allocated_quantity": 3,
|
||||||
"stock_id": 101380,
|
"status": "pending",
|
||||||
"item_code": "011000001536",
|
"creator_id": 31,
|
||||||
"item_name": "测试",
|
"created_at": "2026-06-18T09:26:10.000Z",
|
||||||
"item_type": "ZC",
|
"updated_at": "2026-06-18T09:26:10.000Z",
|
||||||
"brand_name": "",
|
"deleted_at": null,
|
||||||
"goods_code": "01100000",
|
"receivingDetail": {
|
||||||
"net_weight": 0,
|
"id": 2628,
|
||||||
"stock_unit": "个",
|
"receiving_id": 1433,
|
||||||
"category_id": 42,
|
"product_name": "CrazyKitty唇刷",
|
||||||
"gross_weight": 0,
|
"actual_quantity": 5,
|
||||||
"retail_price": 0,
|
"stored_quantity": 0,
|
||||||
"sku_property": "红色:XXL:新产品",
|
"batch_number": "02025416",
|
||||||
"category_name": "天豹云仓",
|
"production_date": "2026-06-16",
|
||||||
"inventory_type": "ZP"
|
"expiry_date": "2026-06-27",
|
||||||
},
|
"storage_status": "none"
|
||||||
"created_at": "2026-04-27T16:04:26.000Z",
|
}
|
||||||
"updated_at": "2026-04-27T16:04:26.000Z",
|
}
|
||||||
"createdAt": "2026-04-27T16:04:26.000Z",
|
],
|
||||||
"updatedAt": "2026-04-27T16:04:26.000Z",
|
"external_item_code": "6920251105000",
|
||||||
"images": [
|
"external_item_id": 1000213,
|
||||||
"https://ye4s.file.gzxunren.com//100000/images/20260423/0EA2A7D58F0EF4EB90CC52A456288DB8.jpg"
|
"warehouse_item_code": "6920251105000",
|
||||||
]
|
"warehouse_item_name": "CrazyKitty唇刷",
|
||||||
}
|
"warehouse_item_spec": ""
|
||||||
],
|
}
|
||||||
"expresses": [
|
]
|
||||||
{
|
}
|
||||||
"waybill_code": "SF1164751866983",
|
|
||||||
"weighing_weight": null,
|
|
||||||
"sys_logistics_code": "SF",
|
|
||||||
"sys_logistics_name": "顺丰速运",
|
|
||||||
"logistics_code": "",
|
|
||||||
"logistics_name": "",
|
|
||||||
"logistics_interface_id": 4,
|
|
||||||
"logistics_interface_name": "顺丰-菜鸟",
|
|
||||||
"business_key": "1",
|
|
||||||
"create_at": 1779630312000,
|
|
||||||
"package_material_id": null,
|
|
||||||
"package_material_name_snapshot": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"timestamp": 1781691298
|
"timestamp": 1781776469
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
# 接口
|
# 接口
|
||||||
|
|
||||||
- 更新时间: 2026-06-16 10:39:51
|
- 更新时间: 2026-06-18 17:47:31
|
||||||
- 扫描目录: `src\api`
|
- 扫描目录: `src\api`
|
||||||
- 模块数: 41
|
- 模块数: 42
|
||||||
- API 文件数: 41
|
- API 文件数: 42
|
||||||
- 接口数: 358
|
- 接口数: 363
|
||||||
- 已启用: 321
|
- 已启用: 326
|
||||||
- 占位接口: 2
|
- 占位接口: 2
|
||||||
|
|
||||||
## 模块统计
|
## 模块统计
|
||||||
@ -44,9 +44,10 @@
|
|||||||
| setting.warehouse | 1 | 3 | 3 | 0 |
|
| setting.warehouse | 1 | 3 | 3 | 0 |
|
||||||
| shops | 1 | 6 | 5 | 0 |
|
| shops | 1 | 6 | 5 | 0 |
|
||||||
| stock | 1 | 29 | 28 | 0 |
|
| stock | 1 | 29 | 28 | 0 |
|
||||||
| storage_receiving | 1 | 22 | 12 | 0 |
|
| storage_receiving | 1 | 24 | 14 | 0 |
|
||||||
| storage.entry | 1 | 4 | 4 | 0 |
|
| storage.entry | 1 | 6 | 6 | 0 |
|
||||||
| storage.inventory | 1 | 8 | 7 | 0 |
|
| storage.inventory | 1 | 8 | 7 | 0 |
|
||||||
|
| storage.management | 1 | 1 | 1 | 0 |
|
||||||
| storage.report | 1 | 3 | 3 | 0 |
|
| storage.report | 1 | 3 | 3 | 0 |
|
||||||
| storage.stockout | 1 | 3 | 3 | 0 |
|
| storage.stockout | 1 | 3 | 3 | 0 |
|
||||||
| store | 1 | 6 | 6 | 0 |
|
| store | 1 | 6 | 6 | 0 |
|
||||||
@ -338,19 +339,23 @@
|
|||||||
| storage_receiving | detailChange | storage.receiving.detailChange | POST | 否 | 否 | storage_receiving/receiving.ts | |
|
| storage_receiving | detailChange | storage.receiving.detailChange | POST | 否 | 否 | storage_receiving/receiving.ts | |
|
||||||
| storage_receiving | exportReceiving | storage.receiving.exportReceiving | POST | 否 | 否 | storage_receiving/receiving.ts | |
|
| storage_receiving | exportReceiving | storage.receiving.exportReceiving | POST | 否 | 否 | storage_receiving/receiving.ts | |
|
||||||
| storage_receiving | getReceiving | storage.receiving.get | POST | 否 | 否 | storage_receiving/receiving.ts | |
|
| storage_receiving | getReceiving | storage.receiving.get | POST | 否 | 否 | storage_receiving/receiving.ts | |
|
||||||
|
| storage_receiving | getAvailableInboundQuantity | storage.receiving.getAvailableInboundQuantity | POST | 是 | 否 | storage_receiving/receiving.ts | |
|
||||||
| storage_receiving | getReceivingDetail | storage.receiving.getReceivingDetail | POST | 是 | 否 | storage_receiving/receiving.ts | |
|
| storage_receiving | getReceivingDetail | storage.receiving.getReceivingDetail | POST | 是 | 否 | storage_receiving/receiving.ts | |
|
||||||
| storage_receiving | getReceivingList | storage.receiving.getReceivingList | POST | 是 | 否 | storage_receiving/receiving.ts | |
|
| storage_receiving | getReceivingList | storage.receiving.getReceivingList | POST | 是 | 否 | storage_receiving/receiving.ts | |
|
||||||
| storage_receiving | getReceivingProduct | storage.receiving.getReceivingProduct | POST | 否 | 否 | storage_receiving/receiving.ts | |
|
| storage_receiving | getReceivingProduct | storage.receiving.getReceivingProduct | POST | 否 | 否 | storage_receiving/receiving.ts | |
|
||||||
|
| storage_receiving | manualMatchEntryOrder | storage.receiving.manualMatchEntryOrder | POST | 是 | 否 | storage_receiving/receiving.ts | |
|
||||||
| storage_receiving | queryReceivingLogs | storage.receiving.queryReceivingLogs | POST | 是 | 否 | storage_receiving/receiving.ts | |
|
| storage_receiving | queryReceivingLogs | storage.receiving.queryReceivingLogs | POST | 是 | 否 | storage_receiving/receiving.ts | |
|
||||||
| storage_receiving | rejectReceiving | storage.receiving.rejectReceiving | POST | 是 | 否 | storage_receiving/receiving.ts | |
|
| storage_receiving | rejectReceiving | storage.receiving.rejectReceiving | POST | 是 | 否 | storage_receiving/receiving.ts | |
|
||||||
| storage_receiving | removeItem | storage.receiving.removeItem | POST | 否 | 否 | storage_receiving/receiving.ts | |
|
| storage_receiving | removeItem | storage.receiving.removeItem | POST | 否 | 否 | storage_receiving/receiving.ts | |
|
||||||
| storage_receiving | reviewReceiving | storage.receiving.reviewReceiving | POST | 是 | 否 | storage_receiving/receiving.ts | |
|
| storage_receiving | reviewReceiving | storage.receiving.reviewReceiving | POST | 是 | 否 | storage_receiving/receiving.ts | |
|
||||||
| storage_receiving | save | storage.receiving.save | POST | 是 | 否 | storage_receiving/receiving.ts | |
|
| storage_receiving | save | storage.receiving.save | POST | 是 | 否 | storage_receiving/receiving.ts | |
|
||||||
| storage_receiving | saveReceiving | storage.receiving.saveReceiving | POST | 否 | 否 | storage_receiving/receiving.ts | |
|
| storage_receiving | saveReceiving | storage.receiving.saveReceiving | POST | 否 | 否 | storage_receiving/receiving.ts | |
|
||||||
|
| storage.entry | bindReceivingDetails | storage.entry.bindReceivingDetails | POST | 是 | 否 | storage.entry/entry.ts | |
|
||||||
| storage.entry | cancelEntry | storage.entry.cancel | POST | 是 | 否 | storage.entry/entry.ts | |
|
| storage.entry | cancelEntry | storage.entry.cancel | POST | 是 | 否 | storage.entry/entry.ts | |
|
||||||
| storage.entry | completeEntry | storage.entry.completeEntry | POST | 是 | 否 | storage.entry/entry.ts | |
|
| storage.entry | completeEntry | storage.entry.completeEntry | POST | 是 | 否 | storage.entry/entry.ts | |
|
||||||
| storage.entry | getEntryDetail | storage.entry.get | POST | 是 | 否 | storage.entry/entry.ts | |
|
| storage.entry | getEntryDetail | storage.entry.get | POST | 是 | 否 | storage.entry/entry.ts | |
|
||||||
| storage.entry | getEntryList | storage.entry.list | POST | 是 | 否 | storage.entry/entry.ts | |
|
| storage.entry | getEntryList | storage.entry.list | POST | 是 | 否 | storage.entry/entry.ts | |
|
||||||
|
| storage.entry | unbindReceivingDetails | storage.entry.unbindReceivingDetails | POST | 是 | 否 | storage.entry/entry.ts | |
|
||||||
| storage.inventory | getExpiryList | storage.expiry.list | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
| storage.inventory | getExpiryList | storage.expiry.list | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
||||||
| storage.inventory | getInventoryList | storage.inventory.list | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
| storage.inventory | getInventoryList | storage.inventory.list | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
||||||
| storage.inventory | matchPutaway | storage.inventory.matchPutaway | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
| storage.inventory | matchPutaway | storage.inventory.matchPutaway | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
||||||
@ -359,6 +364,7 @@
|
|||||||
| storage.inventory | transferByProduct | storage.inventory.transferByProduct | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
| storage.inventory | transferByProduct | storage.inventory.transferByProduct | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
||||||
| storage.inventory | transferLocation | storage.inventory.transferLocation | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
| storage.inventory | transferLocation | storage.inventory.transferLocation | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
||||||
| storage.inventory | getTransactionList | storage.transaction.list | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
| storage.inventory | getTransactionList | storage.transaction.list | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
||||||
|
| storage.management | getReplenishmentDemand | storage.management.replenishmentDemand | POST | 是 | 否 | storage.management/management.ts | |
|
||||||
| storage.report | exportInventoryReport | storage.report.export | POST | 是 | 否 | storage.report/report.ts | |
|
| storage.report | exportInventoryReport | storage.report.export | POST | 是 | 否 | storage.report/report.ts | |
|
||||||
| storage.report | getExportTaskProgress | storage.report.exportTaskProgress | POST | 是 | 否 | storage.report/report.ts | |
|
| storage.report | getExportTaskProgress | storage.report.exportTaskProgress | POST | 是 | 否 | storage.report/report.ts | |
|
||||||
| storage.report | searchInventoryReport | storage.report.search | POST | 是 | 否 | storage.report/report.ts | |
|
| storage.report | searchInventoryReport | storage.report.search | POST | 是 | 否 | storage.report/report.ts | |
|
||||||
|
|||||||
@ -8,13 +8,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "order.pendingOrder.detail",
|
"method": "storage.entry.get",
|
||||||
"body": {
|
"body": {
|
||||||
"id": 6448,
|
"id": 234
|
||||||
"ids": [
|
|
||||||
6448
|
|
||||||
],
|
|
||||||
"tableType": "order"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -26,229 +26,106 @@
|
|||||||
"message": "登录成功",
|
"message": "登录成功",
|
||||||
"success": true,
|
"success": true,
|
||||||
"data": {
|
"data": {
|
||||||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3ODE2OTEyOTgsImV4cCI6MTc4MTcwNTY5OH0.xdL8rq_zhQIAQPmwsX21pyAV3OzJPPpycgjjjiQYVbg"
|
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3ODE3NzY0NjksImV4cCI6MTc4MTc5MDg2OX0.CbuNMERnphyn_sdPNSOast3BfOnW030MzEEkml_Y-ZE"
|
||||||
},
|
},
|
||||||
"timestamp": 1781691298
|
"timestamp": 1781776469
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"接口": "order.pendingOrder.detail",
|
"接口": "storage.entry.get",
|
||||||
"message": "ok",
|
"message": "查询成功",
|
||||||
"code": 1,
|
"code": 200,
|
||||||
"data": {
|
"data": {
|
||||||
"flag": "success",
|
"flag": "success",
|
||||||
"code": 1,
|
"code": 200,
|
||||||
"message": "ok",
|
"message": "查询成功",
|
||||||
"data": {
|
"data": {
|
||||||
"detail": {
|
"entryOrder": {
|
||||||
"id": 6448,
|
"id": 234,
|
||||||
"delivery_order_code": "SIM202604280004264588",
|
"entry_order_code": "TEST-EO-1781661791664EM3F02",
|
||||||
"pre_delivery_order_code": "",
|
"order_type": "SCRK",
|
||||||
"pre_delivery_order_id": "",
|
"purchase_order_code": "",
|
||||||
"order_type": "JYCK",
|
"total_order_lines": 1,
|
||||||
"warehouse_code": "100000",
|
"order_create_time": "2026-06-17T02:03:11.000Z",
|
||||||
"order_flag": null,
|
"expect_start_time": "2026-06-20T02:00:00.000Z",
|
||||||
"extend_props": null,
|
"expect_end_time": "2026-06-17T02:03:11.000Z",
|
||||||
"source_platform_code": "PDD",
|
"logistics_code": "",
|
||||||
"source_platform_name": "拼多多",
|
"logistics_name": "",
|
||||||
"create_channel": "QM",
|
|
||||||
"source_order_codes": "",
|
|
||||||
"sys_platform_code": "TB",
|
|
||||||
"sys_platform_name": "淘宝",
|
|
||||||
"create_at": "2026-01-13T15:26:07.000Z",
|
|
||||||
"delete_at": null,
|
|
||||||
"updated_at": "2026-06-03T07:24:37.000Z",
|
|
||||||
"place_order_time": "2026-01-13T15:22:03.000Z",
|
|
||||||
"pay_time": "2026-01-13T15:22:03.000Z",
|
|
||||||
"pay_no": "",
|
|
||||||
"service_code": null,
|
|
||||||
"operator_name": "1",
|
|
||||||
"operate_time": "2026-01-13T15:26:07.000Z",
|
|
||||||
"delivery_time": null,
|
|
||||||
"shop_nick": "火火家de小店",
|
|
||||||
"buyer_message": null,
|
|
||||||
"seller_message": null,
|
|
||||||
"remark": null,
|
|
||||||
"seller_nick": "1",
|
|
||||||
"buyer_nick": "刘付明仁18022440198",
|
|
||||||
"total_amount": "13.00",
|
|
||||||
"item_amount": "13.00",
|
|
||||||
"discount_amount": "0.00",
|
|
||||||
"freight": "0.00",
|
|
||||||
"ar_amount": "0.00",
|
|
||||||
"got_amount": "0.00",
|
|
||||||
"service_fee": null,
|
|
||||||
"logistics_code": "SF",
|
|
||||||
"logistics_name": "顺丰速运",
|
|
||||||
"sys_logistics_code": "SF",
|
|
||||||
"sys_logistics_name": "顺丰速运",
|
|
||||||
"basket_number": null,
|
|
||||||
"express_code": "",
|
"express_code": "",
|
||||||
"logistics_area_code": "",
|
"supplier_code": "SUP001",
|
||||||
"delivery_type": null,
|
"supplier_name": "测试供应商",
|
||||||
"weight_type": 0,
|
"source_type": "API",
|
||||||
"is_urgency": "N",
|
"order_status": "PENDING",
|
||||||
"invoice_flag": "N",
|
"sync_status": "PENDING",
|
||||||
"status": "pedding",
|
"sync_message": "",
|
||||||
"name": "王志强",
|
"is_enabled": 1,
|
||||||
"zip_code": "",
|
"created_at": "2026-06-17T02:03:11.000Z",
|
||||||
"tel": "",
|
"updated_at": "2026-06-17T02:03:11.000Z",
|
||||||
"mobile": "18022440198",
|
|
||||||
"email": "",
|
|
||||||
"country_code": "CN",
|
|
||||||
"province": "广东省",
|
|
||||||
"city": "广州市",
|
|
||||||
"area": "白云区",
|
|
||||||
"town": "太和镇",
|
|
||||||
"detail_address": "广东省 广州市 白云区 龙归街道 三路22号",
|
|
||||||
"id_type": null,
|
|
||||||
"id_number": null,
|
|
||||||
"oaid": null,
|
|
||||||
"sync_status": "padding",
|
|
||||||
"store_id": 1000000,
|
|
||||||
"warehouse_id": 100000,
|
"warehouse_id": 100000,
|
||||||
"from_key": 24869601,
|
"store_id": 1000000,
|
||||||
"items": "101380+7",
|
"remark": "自动化测试入库单",
|
||||||
"items_count": 2,
|
"expense_record": 0,
|
||||||
"items_total": 13,
|
"store_name": "测试货主",
|
||||||
"items_weight": "146.00",
|
"warehouse_name": "测试云仓",
|
||||||
"items_hash": "bdffe98b6548cc459dfe5b9ef4b3ba7e",
|
"deleted_at": null,
|
||||||
"items_crc": 4179089176,
|
"qimen_owner_code": "",
|
||||||
"wave_id": 1777970280349416,
|
"qimen_warehouse_code": "100000",
|
||||||
"wave_no": "A2026060800002",
|
"warehouse": {
|
||||||
"wave_strategy_version": 306,
|
"id": 100000,
|
||||||
"wave_scan_result": 1,
|
"company_name": "测试仓"
|
||||||
"post_status": "fin",
|
|
||||||
"storage_status": "fin",
|
|
||||||
"pick_status": "fin",
|
|
||||||
"pack_status": "none",
|
|
||||||
"sended_status": "none",
|
|
||||||
"inspection_status": "padding",
|
|
||||||
"recheck_status": "none",
|
|
||||||
"recheck_time": null,
|
|
||||||
"step": 2,
|
|
||||||
"print_status": "fin",
|
|
||||||
"claim_status": "none",
|
|
||||||
"outbound_status": "none",
|
|
||||||
"lock_status": "none",
|
|
||||||
"print_lock_status": "none",
|
|
||||||
"intercept_status": "none"
|
|
||||||
},
|
|
||||||
"items": [
|
|
||||||
{
|
|
||||||
"id": 8886,
|
|
||||||
"order_id": 6448,
|
|
||||||
"actual_price": "1.00",
|
|
||||||
"retail_price": "1.00",
|
|
||||||
"ext_code": "",
|
|
||||||
"inventory_type": "ZP",
|
|
||||||
"item_code": "011000000228",
|
|
||||||
"item_id": 1000649,
|
|
||||||
"item_name": "测试A",
|
|
||||||
"order_line_no": "1",
|
|
||||||
"owner_code": "jky2025102001",
|
|
||||||
"plan_qty": 6,
|
|
||||||
"source_order_code": "",
|
|
||||||
"sub_source_order_code": "",
|
|
||||||
"extend_props": "{\"RealPayMoney\":\"6\",\"shareAmount\":\"6\"}",
|
|
||||||
"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-27T16:04:26.000Z",
|
|
||||||
"updated_at": "2026-04-27T16:04:26.000Z",
|
|
||||||
"createdAt": "2026-04-27T16:04:26.000Z",
|
|
||||||
"updatedAt": "2026-04-27T16:04:26.000Z",
|
|
||||||
"images": [
|
|
||||||
"https://ye4s.file.gzxunren.com//100000/images/20260421/EA414742C733521A513E6EE430415143.jpg",
|
|
||||||
"https://ye4s.file.gzxunren.com//100000/images/20260423/DCB409259C5653AEA53C367953569534.jpg"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
{
|
"store": {
|
||||||
"id": 8887,
|
"id": 1000000,
|
||||||
"order_id": 6448,
|
"company_name": "测试货主1111"
|
||||||
"actual_price": "1.00",
|
},
|
||||||
"retail_price": "1.00",
|
"items": [
|
||||||
"ext_code": "",
|
{
|
||||||
"inventory_type": "ZP",
|
"id": 440,
|
||||||
"item_code": "011000001536",
|
"order_id": 234,
|
||||||
"item_id": 1000652,
|
"out_biz_code": "",
|
||||||
"item_name": "测试B",
|
"order_line_no": 1,
|
||||||
"order_line_no": "2",
|
"owner_code": "4",
|
||||||
"owner_code": "jky2025102001",
|
"count": 10,
|
||||||
"plan_qty": 7,
|
"inventory_type": "ZP",
|
||||||
"source_order_code": "",
|
"stock_id": 101397,
|
||||||
"sub_source_order_code": "",
|
"received_quantity": 0,
|
||||||
"extend_props": "{\"RealPayMoney\":\"7\",\"shareAmount\":\"7\"}",
|
"confirm_quantity": 0,
|
||||||
"stock_id": 101380,
|
"pending_total": 3,
|
||||||
"item_snapshot": {
|
"total_planned": 10,
|
||||||
"id": 1000652,
|
"bindings": [
|
||||||
"width": 0,
|
{
|
||||||
"height": 0,
|
"id": 1,
|
||||||
"length": 0,
|
"entry_item_id": 440,
|
||||||
"volume": 0,
|
"receiving_detail_id": 2628,
|
||||||
"barcode": "011000001536",
|
"allocated_quantity": 3,
|
||||||
"stock_id": 101380,
|
"status": "pending",
|
||||||
"item_code": "011000001536",
|
"creator_id": 31,
|
||||||
"item_name": "测试",
|
"created_at": "2026-06-18T09:26:10.000Z",
|
||||||
"item_type": "ZC",
|
"updated_at": "2026-06-18T09:26:10.000Z",
|
||||||
"brand_name": "",
|
"deleted_at": null,
|
||||||
"goods_code": "01100000",
|
"receivingDetail": {
|
||||||
"net_weight": 0,
|
"id": 2628,
|
||||||
"stock_unit": "个",
|
"receiving_id": 1433,
|
||||||
"category_id": 42,
|
"product_name": "CrazyKitty唇刷",
|
||||||
"gross_weight": 0,
|
"actual_quantity": 5,
|
||||||
"retail_price": 0,
|
"stored_quantity": 0,
|
||||||
"sku_property": "红色:XXL:新产品",
|
"batch_number": "02025416",
|
||||||
"category_name": "天豹云仓",
|
"production_date": "2026-06-16",
|
||||||
"inventory_type": "ZP"
|
"expiry_date": "2026-06-27",
|
||||||
},
|
"storage_status": "none"
|
||||||
"created_at": "2026-04-27T16:04:26.000Z",
|
}
|
||||||
"updated_at": "2026-04-27T16:04:26.000Z",
|
}
|
||||||
"createdAt": "2026-04-27T16:04:26.000Z",
|
],
|
||||||
"updatedAt": "2026-04-27T16:04:26.000Z",
|
"external_item_code": "6920251105000",
|
||||||
"images": [
|
"external_item_id": 1000213,
|
||||||
"https://ye4s.file.gzxunren.com//100000/images/20260423/0EA2A7D58F0EF4EB90CC52A456288DB8.jpg"
|
"warehouse_item_code": "6920251105000",
|
||||||
]
|
"warehouse_item_name": "CrazyKitty唇刷",
|
||||||
}
|
"warehouse_item_spec": ""
|
||||||
],
|
}
|
||||||
"expresses": [
|
]
|
||||||
{
|
}
|
||||||
"waybill_code": "SF1164751866983",
|
|
||||||
"weighing_weight": null,
|
|
||||||
"sys_logistics_code": "SF",
|
|
||||||
"sys_logistics_name": "顺丰速运",
|
|
||||||
"logistics_code": "",
|
|
||||||
"logistics_name": "",
|
|
||||||
"logistics_interface_id": 4,
|
|
||||||
"logistics_interface_name": "顺丰-菜鸟",
|
|
||||||
"business_key": "1",
|
|
||||||
"create_at": 1779630312000,
|
|
||||||
"package_material_id": null,
|
|
||||||
"package_material_name_snapshot": null
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"timestamp": 1781691298
|
"timestamp": 1781776469
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -12,27 +12,80 @@
|
|||||||
"label": "全部"
|
"label": "全部"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"totalInterfaceCount": 317,
|
"totalInterfaceCount": 322,
|
||||||
"changes": {
|
"changes": {
|
||||||
"summary": {
|
"summary": {
|
||||||
"moduleAdded": 0,
|
"moduleAdded": 0,
|
||||||
"moduleDeleted": 0,
|
"moduleDeleted": 0,
|
||||||
"moduleUpdated": 0,
|
"moduleUpdated": 2,
|
||||||
"interfaceAdded": 0,
|
"interfaceAdded": 1,
|
||||||
"interfaceDeleted": 0,
|
"interfaceDeleted": 0,
|
||||||
"interfaceParamsUpdated": 0,
|
"interfaceParamsUpdated": 0,
|
||||||
"interfaceResponseUpdated": 0
|
"interfaceResponseUpdated": 2
|
||||||
},
|
},
|
||||||
"moduleUpdates": {
|
"moduleUpdates": {
|
||||||
"added": [],
|
"added": [],
|
||||||
"deleted": [],
|
"deleted": [],
|
||||||
"updated": []
|
"updated": [
|
||||||
|
{
|
||||||
|
"moduleName": "收货单模块",
|
||||||
|
"moduleKey": "storage_receiving",
|
||||||
|
"folder": "storage_receiving",
|
||||||
|
"previousModuleName": "收货单模块",
|
||||||
|
"previousModuleKey": "storage_receiving",
|
||||||
|
"interfaceChanges": {
|
||||||
|
"addedMethods": [],
|
||||||
|
"deletedMethods": [],
|
||||||
|
"paramsUpdatedMethods": [],
|
||||||
|
"responseUpdatedMethods": [
|
||||||
|
"storage.receiving.getAvailableInboundQuantity"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"moduleName": "入库单模块",
|
||||||
|
"moduleKey": "storage.entry",
|
||||||
|
"folder": "storage.entry",
|
||||||
|
"previousModuleName": "入库单模块",
|
||||||
|
"previousModuleKey": "storage.entry",
|
||||||
|
"interfaceChanges": {
|
||||||
|
"addedMethods": [
|
||||||
|
"storage.entry.unbindReceivingDetails"
|
||||||
|
],
|
||||||
|
"deletedMethods": [],
|
||||||
|
"paramsUpdatedMethods": [],
|
||||||
|
"responseUpdatedMethods": [
|
||||||
|
"storage.entry.get"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"interfaceUpdates": {
|
"interfaceUpdates": {
|
||||||
"added": [],
|
"added": [
|
||||||
|
{
|
||||||
|
"moduleName": "入库单模块",
|
||||||
|
"moduleKey": "storage.entry",
|
||||||
|
"folder": "storage.entry",
|
||||||
|
"method": "storage.entry.unbindReceivingDetails"
|
||||||
|
}
|
||||||
|
],
|
||||||
"deleted": [],
|
"deleted": [],
|
||||||
"paramsUpdated": [],
|
"paramsUpdated": [],
|
||||||
"responseUpdated": []
|
"responseUpdated": [
|
||||||
|
{
|
||||||
|
"moduleName": "收货单模块",
|
||||||
|
"moduleKey": "storage_receiving",
|
||||||
|
"folder": "storage_receiving",
|
||||||
|
"method": "storage.receiving.getAvailableInboundQuantity"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"moduleName": "入库单模块",
|
||||||
|
"moduleKey": "storage.entry",
|
||||||
|
"folder": "storage.entry",
|
||||||
|
"method": "storage.entry.get"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"interfaces": [
|
"interfaces": [
|
||||||
@ -4291,8 +4344,8 @@
|
|||||||
"moduleKey": "order",
|
"moduleKey": "order",
|
||||||
"moduleFolder": "order",
|
"moduleFolder": "order",
|
||||||
"method": "order.pendingOrder.downloadCreateTemplate",
|
"method": "order.pendingOrder.downloadCreateTemplate",
|
||||||
"title": "下载创建订单的 Excel 导入模板。返回 base64 编码的 xlsx 文件,前端解码后作为 .xlsx 附件下载。表头中标注 * 的列为必填项(橙色背景),可选列为灰色背景,包含示例数据行和填写说明工作表。多行相同订单号的行组成一个完整订单,每行代表一条商品明细。模板必填列:订单号(delivery_order_code)、收件人姓名(name)、手机号(mobile)、详细地址(detail_address)、商品编码(item_code)、计划数量(plan_qty);非必填列含:货主ID(store_id)、省份(province)、城市(city)、区/县(area)、店铺名称(shop_nick)等。",
|
"title": "下载创建订单的 Excel 导入模板。返回 base64 编码的 xlsx 文件,前端解码后作为 .xlsx 附件下载。表头中标注 * 的列为必填项(橙色背景),可选列为灰色背景,包含示例数据行和填写说明工作表。多行相同订单号的行组成一个完整订单,每行代表一条商品明细。模板共 25 列(A-Y):店铺名称(shop_nick)位于第2列B列,紧接*订单号(delivery_order_code)之后;其余必填列为*收件人姓名(name)、*手机号(mobile)、*详细地址(detail_address)、*商品编码(item_code)、*计划数量(plan_qty);非必填列依次为货主ID(store_id)、电话(tel)、省份(province)、城市(city)、区/县(area)、镇/街道(town)、邮编(zip_code)、快递编码(logistics_code)、快递名称(logistics_name)、系统平台编码(sys_platform_code)、来源平台编码(source_platform_code)、来源订单号(source_order_codes)、订单类型(order_type)、是否紧急(is_urgency)、是否需要发票(invoice_flag)、商品名称(item_name)、行号(order_line_no)、实际价格(actual_price)。",
|
||||||
"description": "下载创建订单的 Excel 导入模板。返回 base64 编码的 xlsx 文件,前端解码后作为 .xlsx 附件下载。表头中标注 * 的列为必填项(橙色背景),可选列为灰色背景,包含示例数据行和填写说明工作表。多行相同订单号的行组成一个完整订单,每行代表一条商品明细。模板必填列:订单号(delivery_order_code)、收件人姓名(name)、手机号(mobile)、详细地址(detail_address)、商品编码(item_code)、计划数量(plan_qty);非必填列含:货主ID(store_id)、省份(province)、城市(city)、区/县(area)、店铺名称(shop_nick)等。",
|
"description": "下载创建订单的 Excel 导入模板。返回 base64 编码的 xlsx 文件,前端解码后作为 .xlsx 附件下载。表头中标注 * 的列为必填项(橙色背景),可选列为灰色背景,包含示例数据行和填写说明工作表。多行相同订单号的行组成一个完整订单,每行代表一条商品明细。模板共 25 列(A-Y):店铺名称(shop_nick)位于第2列B列,紧接*订单号(delivery_order_code)之后;其余必填列为*收件人姓名(name)、*手机号(mobile)、*详细地址(detail_address)、*商品编码(item_code)、*计划数量(plan_qty);非必填列依次为货主ID(store_id)、电话(tel)、省份(province)、城市(city)、区/县(area)、镇/街道(town)、邮编(zip_code)、快递编码(logistics_code)、快递名称(logistics_name)、系统平台编码(sys_platform_code)、来源平台编码(source_platform_code)、来源订单号(source_order_codes)、订单类型(order_type)、是否紧急(is_urgency)、是否需要发票(invoice_flag)、商品名称(item_name)、行号(order_line_no)、实际价格(actual_price)。",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -4327,12 +4380,6 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "文件 MIME 类型,固定为 application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
"description": "文件 MIME 类型,固定为 application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "shop_nick",
|
|
||||||
"type": "string",
|
|
||||||
"required": false,
|
|
||||||
"description": "模板中新增的店铺名称列(非必填),用于标识订单所属店铺"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -14266,6 +14313,57 @@
|
|||||||
"params": [],
|
"params": [],
|
||||||
"response": []
|
"response": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"moduleName": "入库单模块",
|
||||||
|
"moduleKey": "storage.entry",
|
||||||
|
"moduleFolder": "storage.entry",
|
||||||
|
"method": "storage.entry.bindReceivingDetails",
|
||||||
|
"title": "入库单明细绑定收货明细。将指定的收货单明细与入库单明细建立绑定关系,并立即更新入库明细的 received_quantity(绑定即实收)。重复调用会先回退旧绑定量再创建新绑定。提交入库时完成收货单侧的入库数量扣减和库存上架。",
|
||||||
|
"description": "入库单明细绑定收货明细。将指定的收货单明细与入库单明细建立绑定关系,并立即更新入库明细的 received_quantity(绑定即实收)。重复调用会先回退旧绑定量再创建新绑定。提交入库时完成收货单侧的入库数量扣减和库存上架。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "entry_item_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "入库单明细ID(wms_entry_items.id)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "bindings",
|
||||||
|
"type": "array",
|
||||||
|
"required": true,
|
||||||
|
"description": "收货明细绑定数组,每项包含 receiving_detail_id(收货明细ID, number, 必填)和 allocated_quantity(分配数量, number, 必填, 正整数)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "entry_item_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "入库明细ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "binding_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "创建的绑定数量"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"moduleName": "入库单模块",
|
"moduleName": "入库单模块",
|
||||||
"moduleKey": "storage.entry",
|
"moduleKey": "storage.entry",
|
||||||
@ -14322,8 +14420,8 @@
|
|||||||
"moduleKey": "storage.entry",
|
"moduleKey": "storage.entry",
|
||||||
"moduleFolder": "storage.entry",
|
"moduleFolder": "storage.entry",
|
||||||
"method": "storage.entry.completeEntry",
|
"method": "storage.entry.completeEntry",
|
||||||
"title": "完成入库单",
|
"title": "完成入库单。入库单状态变更为 COMPLETED 后,异步触发收货单匹配与回传:系统会从入库单 remark 中匹配近 3 天收货单号,明细一致则按来源回传(奇门→奇门确认接口,API→OpenAPI 回调);若收货单覆盖入库单,还会标记收货单为部分入库。异步匹配失败不阻塞主流程,仅记录日志。",
|
||||||
"description": "完成入库单",
|
"description": "完成入库单。入库单状态变更为 COMPLETED 后,异步触发收货单匹配与回传:系统会从入库单 remark 中匹配近 3 天收货单号,明细一致则按来源回传(奇门→奇门确认接口,API→OpenAPI 回调);若收货单覆盖入库单,还会标记收货单为部分入库。异步匹配失败不阻塞主流程,仅记录日志。",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -14361,8 +14459,8 @@
|
|||||||
"moduleKey": "storage.entry",
|
"moduleKey": "storage.entry",
|
||||||
"moduleFolder": "storage.entry",
|
"moduleFolder": "storage.entry",
|
||||||
"method": "storage.entry.get",
|
"method": "storage.entry.get",
|
||||||
"title": "查询入库单详情",
|
"title": "查询入库单详情。返回的 entryOrder.items 每项包含 pending_total(当前 pending 绑定的总预分配数量)、total_planned(计划入库数量=count)、bindings(pending 绑定列表,每项含 id/entry_item_id/receiving_detail_id/allocated_quantity/status/receivingDetail)",
|
||||||
"description": "查询入库单详情",
|
"description": "查询入库单详情。返回的 entryOrder.items 每项包含 pending_total(当前 pending 绑定的总预分配数量)、total_planned(计划入库数量=count)、bindings(pending 绑定列表,每项含 id/entry_item_id/receiving_detail_id/allocated_quantity/status/receivingDetail)",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -14397,7 +14495,7 @@
|
|||||||
"name": "entryOrder",
|
"name": "entryOrder",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "入库单详情(含 items 明细)"
|
"description": "入库单详情,含 items 明细数组"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -14464,6 +14562,51 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"moduleName": "入库单模块",
|
||||||
|
"moduleKey": "storage.entry",
|
||||||
|
"moduleFolder": "storage.entry",
|
||||||
|
"method": "storage.entry.unbindReceivingDetails",
|
||||||
|
"title": "解绑入库明细的收货明细绑定。删除指定入库明细的所有 pending 绑定,并回退 received_quantity(恢复到绑定前的值),收货单明细的可用数量自动恢复(因为绑定记录被删除)。",
|
||||||
|
"description": "解绑入库明细的收货明细绑定。删除指定入库明细的所有 pending 绑定,并回退 received_quantity(恢复到绑定前的值),收货单明细的可用数量自动恢复(因为绑定记录被删除)。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "entry_item_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "入库单明细ID"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "entry_item_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "入库明细ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "released_quantity",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "释放的绑定总量"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"moduleName": "库存操作模块",
|
"moduleName": "库存操作模块",
|
||||||
"moduleKey": "storage.inventory",
|
"moduleKey": "storage.inventory",
|
||||||
@ -14693,6 +14836,63 @@
|
|||||||
],
|
],
|
||||||
"response": []
|
"response": []
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"moduleName": "库存管理模块",
|
||||||
|
"moduleKey": "storage.management",
|
||||||
|
"moduleFolder": "storage.management",
|
||||||
|
"method": "storage.management.replenishmentDemand",
|
||||||
|
"title": "分拣缺货补货需求计算(仓库级别)。自动从用户上下文获取仓库,查询所有未完成储位分配的订单,计算每个SKU在分拣区与存货区的库存量、订单需求量、分拣区缺口、建议补货量及可补货库位。支持分页与排序。",
|
||||||
|
"description": "分拣缺货补货需求计算(仓库级别)。自动从用户上下文获取仓库,查询所有未完成储位分配的订单,计算每个SKU在分拣区与存货区的库存量、订单需求量、分拣区缺口、建议补货量及可补货库位。支持分页与排序。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "pagination",
|
||||||
|
"type": "object",
|
||||||
|
"required": false,
|
||||||
|
"description": "分页参数,支持 page / pageSize,默认 page=1 pageSize=20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sort",
|
||||||
|
"type": "object",
|
||||||
|
"required": false,
|
||||||
|
"description": "排序参数,支持 sortField / sortOrder。sortField 可选值:stock_id / pick_zone_quantity / storage_zone_quantity / total_demand / shortage / replenishment_needed,默认 shortage;sortOrder 可选 ASC / DESC,默认 DESC"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "list",
|
||||||
|
"type": "array",
|
||||||
|
"required": true,
|
||||||
|
"description": "补货需求明细列表"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "summary",
|
||||||
|
"type": "object",
|
||||||
|
"required": true,
|
||||||
|
"description": "汇总信息"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pagination",
|
||||||
|
"type": "object",
|
||||||
|
"required": true,
|
||||||
|
"description": "分页信息"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"moduleName": "收货单模块",
|
"moduleName": "收货单模块",
|
||||||
"moduleKey": "storage_receiving",
|
"moduleKey": "storage_receiving",
|
||||||
@ -15391,6 +15591,51 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"moduleName": "收货单模块",
|
||||||
|
"moduleKey": "storage_receiving",
|
||||||
|
"moduleFolder": "storage_receiving",
|
||||||
|
"method": "storage.receiving.getAvailableInboundQuantity",
|
||||||
|
"title": "按 stock_id 查询可入库数量。返回指定商品在已审核收货单中各明细的可入库数量(actual_quantity - stored_quantity - pending_allocated_quantity),仅包含尚有可入库余量的明细,排除未审核和已取消的收货单。",
|
||||||
|
"description": "按 stock_id 查询可入库数量。返回指定商品在已审核收货单中各明细的可入库数量(actual_quantity - stored_quantity - pending_allocated_quantity),仅包含尚有可入库余量的明细,排除未审核和已取消的收货单。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "stock_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "商品库存ID(stock_warehouse.id)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "list",
|
||||||
|
"type": "array",
|
||||||
|
"required": true,
|
||||||
|
"description": "可入库明细列表,每项包含 detail_id、receiving_id、receiving_number、product_name、actual_quantity、stored_quantity、pending_allocated_quantity、available_quantity、storage_status、batch_number、production_date、expiry_date、space_id、receiving_status"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "total",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "返回条数"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"moduleName": "收货单模块",
|
"moduleName": "收货单模块",
|
||||||
"moduleKey": "storage_receiving",
|
"moduleKey": "storage_receiving",
|
||||||
@ -15535,6 +15780,87 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"moduleName": "收货单模块",
|
||||||
|
"moduleKey": "storage_receiving",
|
||||||
|
"moduleFolder": "storage_receiving",
|
||||||
|
"method": "storage.receiving.manualMatchEntryOrder",
|
||||||
|
"title": "手动匹配入库单与收货单。传入收货单ID和入库单ID,复用异步匹配服务的明细对比和回传逻辑,同步返回匹配结果(含 matchType、comparisonResult、callbackSent、partialStorageMarked 等)。",
|
||||||
|
"description": "手动匹配入库单与收货单。传入收货单ID和入库单ID,复用异步匹配服务的明细对比和回传逻辑,同步返回匹配结果(含 matchType、comparisonResult、callbackSent、partialStorageMarked 等)。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "receivingId",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "收货单 ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "entryOrderId",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "入库单 ID"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "matchType",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "匹配类型枚举:full_match(SKU+数量完全一致)/ receiving_covers_entry(收货单覆盖入库单,触发回传+标记部分入库)/ entry_exceeds_receiving(入库单超出收货单,不触发回传)/ no_match(SKU无交集,不触发回传)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comparisonResult",
|
||||||
|
"type": "object",
|
||||||
|
"required": true,
|
||||||
|
"description": "明细对比结果对象"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "callbackSent",
|
||||||
|
"type": "boolean",
|
||||||
|
"required": true,
|
||||||
|
"description": "是否已发送回传(full_match / receiving_covers_entry 时为 true)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "callbackResult",
|
||||||
|
"type": "object|null",
|
||||||
|
"required": true,
|
||||||
|
"description": "回传结果对象(未发送时为 null);成功时含 success、sourceType(QM/API)、detail 字段"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "partialStorageMarked",
|
||||||
|
"type": "boolean",
|
||||||
|
"required": true,
|
||||||
|
"description": "是否已标记部分入库(仅 receiving_covers_entry 时为 true)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "entryOrder",
|
||||||
|
"type": "object",
|
||||||
|
"required": true,
|
||||||
|
"description": "入库单摘要信息"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "receivingOrder",
|
||||||
|
"type": "object",
|
||||||
|
"required": true,
|
||||||
|
"description": "收货单摘要信息"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"moduleName": "收货单模块",
|
"moduleName": "收货单模块",
|
||||||
"moduleKey": "storage_receiving",
|
"moduleKey": "storage_receiving",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -12,28 +12,81 @@
|
|||||||
"label": "全部"
|
"label": "全部"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"moduleCount": 41,
|
"moduleCount": 42,
|
||||||
"totalInterfaceCount": 317,
|
"totalInterfaceCount": 322,
|
||||||
"changes": {
|
"changes": {
|
||||||
"summary": {
|
"summary": {
|
||||||
"moduleAdded": 0,
|
"moduleAdded": 0,
|
||||||
"moduleDeleted": 0,
|
"moduleDeleted": 0,
|
||||||
"moduleUpdated": 0,
|
"moduleUpdated": 2,
|
||||||
"interfaceAdded": 0,
|
"interfaceAdded": 1,
|
||||||
"interfaceDeleted": 0,
|
"interfaceDeleted": 0,
|
||||||
"interfaceParamsUpdated": 0,
|
"interfaceParamsUpdated": 0,
|
||||||
"interfaceResponseUpdated": 0
|
"interfaceResponseUpdated": 2
|
||||||
},
|
},
|
||||||
"moduleUpdates": {
|
"moduleUpdates": {
|
||||||
"added": [],
|
"added": [],
|
||||||
"deleted": [],
|
"deleted": [],
|
||||||
"updated": []
|
"updated": [
|
||||||
|
{
|
||||||
|
"moduleName": "收货单模块",
|
||||||
|
"moduleKey": "storage_receiving",
|
||||||
|
"folder": "storage_receiving",
|
||||||
|
"previousModuleName": "收货单模块",
|
||||||
|
"previousModuleKey": "storage_receiving",
|
||||||
|
"interfaceChanges": {
|
||||||
|
"addedMethods": [],
|
||||||
|
"deletedMethods": [],
|
||||||
|
"paramsUpdatedMethods": [],
|
||||||
|
"responseUpdatedMethods": [
|
||||||
|
"storage.receiving.getAvailableInboundQuantity"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"moduleName": "入库单模块",
|
||||||
|
"moduleKey": "storage.entry",
|
||||||
|
"folder": "storage.entry",
|
||||||
|
"previousModuleName": "入库单模块",
|
||||||
|
"previousModuleKey": "storage.entry",
|
||||||
|
"interfaceChanges": {
|
||||||
|
"addedMethods": [
|
||||||
|
"storage.entry.unbindReceivingDetails"
|
||||||
|
],
|
||||||
|
"deletedMethods": [],
|
||||||
|
"paramsUpdatedMethods": [],
|
||||||
|
"responseUpdatedMethods": [
|
||||||
|
"storage.entry.get"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"interfaceUpdates": {
|
"interfaceUpdates": {
|
||||||
"added": [],
|
"added": [
|
||||||
|
{
|
||||||
|
"moduleName": "入库单模块",
|
||||||
|
"moduleKey": "storage.entry",
|
||||||
|
"folder": "storage.entry",
|
||||||
|
"method": "storage.entry.unbindReceivingDetails"
|
||||||
|
}
|
||||||
|
],
|
||||||
"deleted": [],
|
"deleted": [],
|
||||||
"paramsUpdated": [],
|
"paramsUpdated": [],
|
||||||
"responseUpdated": []
|
"responseUpdated": [
|
||||||
|
{
|
||||||
|
"moduleName": "收货单模块",
|
||||||
|
"moduleKey": "storage_receiving",
|
||||||
|
"folder": "storage_receiving",
|
||||||
|
"method": "storage.receiving.getAvailableInboundQuantity"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"moduleName": "入库单模块",
|
||||||
|
"moduleKey": "storage.entry",
|
||||||
|
"folder": "storage.entry",
|
||||||
|
"method": "storage.entry.get"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"modules": [
|
"modules": [
|
||||||
@ -935,6 +988,17 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"moduleName": "库存管理模块",
|
||||||
|
"moduleKey": "storage.management",
|
||||||
|
"folder": "storage.management",
|
||||||
|
"interfaceCount": 1,
|
||||||
|
"interfaces": [
|
||||||
|
{
|
||||||
|
"method": "storage.management.replenishmentDemand"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"moduleName": "快递编码管理模块",
|
"moduleName": "快递编码管理模块",
|
||||||
"moduleKey": "setting.express",
|
"moduleKey": "setting.express",
|
||||||
@ -1048,7 +1112,7 @@
|
|||||||
"moduleName": "入库单模块",
|
"moduleName": "入库单模块",
|
||||||
"moduleKey": "storage.entry",
|
"moduleKey": "storage.entry",
|
||||||
"folder": "storage.entry",
|
"folder": "storage.entry",
|
||||||
"interfaceCount": 4,
|
"interfaceCount": 6,
|
||||||
"interfaces": [
|
"interfaces": [
|
||||||
{
|
{
|
||||||
"method": "storage.entry.list"
|
"method": "storage.entry.list"
|
||||||
@ -1061,6 +1125,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "storage.entry.completeEntry"
|
"method": "storage.entry.completeEntry"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "storage.entry.bindReceivingDetails"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "storage.entry.unbindReceivingDetails"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -1151,7 +1221,7 @@
|
|||||||
"moduleName": "收货单模块",
|
"moduleName": "收货单模块",
|
||||||
"moduleKey": "storage_receiving",
|
"moduleKey": "storage_receiving",
|
||||||
"folder": "storage_receiving",
|
"folder": "storage_receiving",
|
||||||
"interfaceCount": 17,
|
"interfaceCount": 19,
|
||||||
"interfaces": [
|
"interfaces": [
|
||||||
{
|
{
|
||||||
"method": "storage.receiving.getReceivingList"
|
"method": "storage.receiving.getReceivingList"
|
||||||
@ -1203,6 +1273,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "storage.receiving.completeReceiving"
|
"method": "storage.receiving.completeReceiving"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "storage.receiving.manualMatchEntryOrder"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "storage.receiving.getAvailableInboundQuantity"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-05 09:15:19",
|
"createdAt": "2026-05-05 09:15:19",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-20 08:59:09",
|
"createdAt": "2026-05-20 08:59:09",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-04 09:11:04",
|
"createdAt": "2026-05-04 09:11:04",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-09 09:52:14",
|
"createdAt": "2026-05-09 09:52:14",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -87,8 +87,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "order.pendingOrder.downloadCreateTemplate",
|
"method": "order.pendingOrder.downloadCreateTemplate",
|
||||||
"title": "下载创建订单的 Excel 导入模板。返回 base64 编码的 xlsx 文件,前端解码后作为 .xlsx 附件下载。表头中标注 * 的列为必填项(橙色背景),可选列为灰色背景,包含示例数据行和填写说明工作表。多行相同订单号的行组成一个完整订单,每行代表一条商品明细。模板必填列:订单号(delivery_order_code)、收件人姓名(name)、手机号(mobile)、详细地址(detail_address)、商品编码(item_code)、计划数量(plan_qty);非必填列含:货主ID(store_id)、省份(province)、城市(city)、区/县(area)、店铺名称(shop_nick)等。",
|
"title": "下载创建订单的 Excel 导入模板。返回 base64 编码的 xlsx 文件,前端解码后作为 .xlsx 附件下载。表头中标注 * 的列为必填项(橙色背景),可选列为灰色背景,包含示例数据行和填写说明工作表。多行相同订单号的行组成一个完整订单,每行代表一条商品明细。模板共 25 列(A-Y):店铺名称(shop_nick)位于第2列B列,紧接*订单号(delivery_order_code)之后;其余必填列为*收件人姓名(name)、*手机号(mobile)、*详细地址(detail_address)、*商品编码(item_code)、*计划数量(plan_qty);非必填列依次为货主ID(store_id)、电话(tel)、省份(province)、城市(city)、区/县(area)、镇/街道(town)、邮编(zip_code)、快递编码(logistics_code)、快递名称(logistics_name)、系统平台编码(sys_platform_code)、来源平台编码(source_platform_code)、来源订单号(source_order_codes)、订单类型(order_type)、是否紧急(is_urgency)、是否需要发票(invoice_flag)、商品名称(item_name)、行号(order_line_no)、实际价格(actual_price)。",
|
||||||
"description": "下载创建订单的 Excel 导入模板。返回 base64 编码的 xlsx 文件,前端解码后作为 .xlsx 附件下载。表头中标注 * 的列为必填项(橙色背景),可选列为灰色背景,包含示例数据行和填写说明工作表。多行相同订单号的行组成一个完整订单,每行代表一条商品明细。模板必填列:订单号(delivery_order_code)、收件人姓名(name)、手机号(mobile)、详细地址(detail_address)、商品编码(item_code)、计划数量(plan_qty);非必填列含:货主ID(store_id)、省份(province)、城市(city)、区/县(area)、店铺名称(shop_nick)等。",
|
"description": "下载创建订单的 Excel 导入模板。返回 base64 编码的 xlsx 文件,前端解码后作为 .xlsx 附件下载。表头中标注 * 的列为必填项(橙色背景),可选列为灰色背景,包含示例数据行和填写说明工作表。多行相同订单号的行组成一个完整订单,每行代表一条商品明细。模板共 25 列(A-Y):店铺名称(shop_nick)位于第2列B列,紧接*订单号(delivery_order_code)之后;其余必填列为*收件人姓名(name)、*手机号(mobile)、*详细地址(detail_address)、*商品编码(item_code)、*计划数量(plan_qty);非必填列依次为货主ID(store_id)、电话(tel)、省份(province)、城市(city)、区/县(area)、镇/街道(town)、邮编(zip_code)、快递编码(logistics_code)、快递名称(logistics_name)、系统平台编码(sys_platform_code)、来源平台编码(source_platform_code)、来源订单号(source_order_codes)、订单类型(order_type)、是否紧急(is_urgency)、是否需要发票(invoice_flag)、商品名称(item_name)、行号(order_line_no)、实际价格(actual_price)。",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -123,12 +123,6 @@
|
|||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "文件 MIME 类型,固定为 application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
"description": "文件 MIME 类型,固定为 application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "shop_nick",
|
|
||||||
"type": "string",
|
|
||||||
"required": false,
|
|
||||||
"description": "模板中新增的店铺名称列(非必填),用于标识订单所属店铺"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-04 17:23:48",
|
"createdAt": "2026-05-04 17:23:48",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-06-03 16:55:40",
|
"createdAt": "2026-06-03 16:55:40",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-17 19:37:49",
|
"createdAt": "2026-04-17 19:37:49",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-17 20:21:27",
|
"createdAt": "2026-04-17 20:21:27",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-29 09:07:53",
|
"createdAt": "2026-05-29 09:07:53",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-29 09:07:53",
|
"createdAt": "2026-05-29 09:07:53",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-17 19:16:50",
|
"createdAt": "2026-04-17 19:16:50",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-04 09:11:04",
|
"createdAt": "2026-05-04 09:11:04",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-25 17:05:16",
|
"createdAt": "2026-05-25 17:05:16",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -16,17 +16,21 @@
|
|||||||
"name": "入库单模块",
|
"name": "入库单模块",
|
||||||
"key": "storage.entry",
|
"key": "storage.entry",
|
||||||
"folder": "storage.entry",
|
"folder": "storage.entry",
|
||||||
"interfaceCount": 4
|
"interfaceCount": 6
|
||||||
},
|
},
|
||||||
"changes": {
|
"changes": {
|
||||||
"fromPreviousSnapshot": {
|
"fromPreviousSnapshot": {
|
||||||
"moduleAdded": false,
|
"moduleAdded": false,
|
||||||
"moduleRenamed": false,
|
"moduleRenamed": false,
|
||||||
"interfaceChanges": {
|
"interfaceChanges": {
|
||||||
"addedMethods": [],
|
"addedMethods": [
|
||||||
|
"storage.entry.unbindReceivingDetails"
|
||||||
|
],
|
||||||
"deletedMethods": [],
|
"deletedMethods": [],
|
||||||
"paramsUpdatedMethods": [],
|
"paramsUpdatedMethods": [],
|
||||||
"responseUpdatedMethods": []
|
"responseUpdatedMethods": [
|
||||||
|
"storage.entry.get"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -93,8 +97,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "storage.entry.get",
|
"method": "storage.entry.get",
|
||||||
"title": "查询入库单详情",
|
"title": "查询入库单详情。返回的 entryOrder.items 每项包含 pending_total(当前 pending 绑定的总预分配数量)、total_planned(计划入库数量=count)、bindings(pending 绑定列表,每项含 id/entry_item_id/receiving_detail_id/allocated_quantity/status/receivingDetail)",
|
||||||
"description": "查询入库单详情",
|
"description": "查询入库单详情。返回的 entryOrder.items 每项包含 pending_total(当前 pending 绑定的总预分配数量)、total_planned(计划入库数量=count)、bindings(pending 绑定列表,每项含 id/entry_item_id/receiving_detail_id/allocated_quantity/status/receivingDetail)",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -129,7 +133,7 @@
|
|||||||
"name": "entryOrder",
|
"name": "entryOrder",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "入库单详情(含 items 明细)"
|
"description": "入库单详情,含 items 明细数组"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -183,8 +187,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "storage.entry.completeEntry",
|
"method": "storage.entry.completeEntry",
|
||||||
"title": "完成入库单",
|
"title": "完成入库单。入库单状态变更为 COMPLETED 后,异步触发收货单匹配与回传:系统会从入库单 remark 中匹配近 3 天收货单号,明细一致则按来源回传(奇门→奇门确认接口,API→OpenAPI 回调);若收货单覆盖入库单,还会标记收货单为部分入库。异步匹配失败不阻塞主流程,仅记录日志。",
|
||||||
"description": "完成入库单",
|
"description": "完成入库单。入库单状态变更为 COMPLETED 后,异步触发收货单匹配与回传:系统会从入库单 remark 中匹配近 3 天收货单号,明细一致则按来源回传(奇门→奇门确认接口,API→OpenAPI 回调);若收货单覆盖入库单,还会标记收货单为部分入库。异步匹配失败不阻塞主流程,仅记录日志。",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -216,6 +220,96 @@
|
|||||||
"description": "完成成功的入库单ID"
|
"description": "完成成功的入库单ID"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "storage.entry.bindReceivingDetails",
|
||||||
|
"title": "入库单明细绑定收货明细。将指定的收货单明细与入库单明细建立绑定关系,并立即更新入库明细的 received_quantity(绑定即实收)。重复调用会先回退旧绑定量再创建新绑定。提交入库时完成收货单侧的入库数量扣减和库存上架。",
|
||||||
|
"description": "入库单明细绑定收货明细。将指定的收货单明细与入库单明细建立绑定关系,并立即更新入库明细的 received_quantity(绑定即实收)。重复调用会先回退旧绑定量再创建新绑定。提交入库时完成收货单侧的入库数量扣减和库存上架。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "entry_item_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "入库单明细ID(wms_entry_items.id)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "bindings",
|
||||||
|
"type": "array",
|
||||||
|
"required": true,
|
||||||
|
"description": "收货明细绑定数组,每项包含 receiving_detail_id(收货明细ID, number, 必填)和 allocated_quantity(分配数量, number, 必填, 正整数)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "entry_item_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "入库明细ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "binding_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "创建的绑定数量"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "storage.entry.unbindReceivingDetails",
|
||||||
|
"title": "解绑入库明细的收货明细绑定。删除指定入库明细的所有 pending 绑定,并回退 received_quantity(恢复到绑定前的值),收货单明细的可用数量自动恢复(因为绑定记录被删除)。",
|
||||||
|
"description": "解绑入库明细的收货明细绑定。删除指定入库明细的所有 pending 绑定,并回退 received_quantity(恢复到绑定前的值),收货单明细的可用数量自动恢复(因为绑定记录被删除)。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "entry_item_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "入库单明细ID"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "entry_item_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "入库明细ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "released_quantity",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "释放的绑定总量"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"module": {
|
||||||
|
"name": "库存管理模块",
|
||||||
|
"key": "storage.management",
|
||||||
|
"folder": "storage.management"
|
||||||
|
},
|
||||||
|
"status": "active",
|
||||||
|
"createdAt": "2026-06-18 09:43:47",
|
||||||
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
|
"deletedAt": null,
|
||||||
|
"restoredAt": null
|
||||||
|
}
|
||||||
@ -0,0 +1,89 @@
|
|||||||
|
{
|
||||||
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
|
"source": "remote",
|
||||||
|
"filter": {
|
||||||
|
"platform": {
|
||||||
|
"value": "web",
|
||||||
|
"label": "网页端"
|
||||||
|
},
|
||||||
|
"project": {
|
||||||
|
"value": "all",
|
||||||
|
"label": "全部"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"module": {
|
||||||
|
"name": "库存管理模块",
|
||||||
|
"key": "storage.management",
|
||||||
|
"folder": "storage.management",
|
||||||
|
"interfaceCount": 1
|
||||||
|
},
|
||||||
|
"changes": {
|
||||||
|
"fromPreviousSnapshot": {
|
||||||
|
"moduleAdded": false,
|
||||||
|
"moduleRenamed": false,
|
||||||
|
"interfaceChanges": {
|
||||||
|
"addedMethods": [],
|
||||||
|
"deletedMethods": [],
|
||||||
|
"paramsUpdatedMethods": [],
|
||||||
|
"responseUpdatedMethods": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"interfaces": [
|
||||||
|
{
|
||||||
|
"method": "storage.management.replenishmentDemand",
|
||||||
|
"title": "分拣缺货补货需求计算(仓库级别)。自动从用户上下文获取仓库,查询所有未完成储位分配的订单,计算每个SKU在分拣区与存货区的库存量、订单需求量、分拣区缺口、建议补货量及可补货库位。支持分页与排序。",
|
||||||
|
"description": "分拣缺货补货需求计算(仓库级别)。自动从用户上下文获取仓库,查询所有未完成储位分配的订单,计算每个SKU在分拣区与存货区的库存量、订单需求量、分拣区缺口、建议补货量及可补货库位。支持分页与排序。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "pagination",
|
||||||
|
"type": "object",
|
||||||
|
"required": false,
|
||||||
|
"description": "分页参数,支持 page / pageSize,默认 page=1 pageSize=20"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "sort",
|
||||||
|
"type": "object",
|
||||||
|
"required": false,
|
||||||
|
"description": "排序参数,支持 sortField / sortOrder。sortField 可选值:stock_id / pick_zone_quantity / storage_zone_quantity / total_demand / shortage / replenishment_needed,默认 shortage;sortOrder 可选 ASC / DESC,默认 DESC"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "list",
|
||||||
|
"type": "array",
|
||||||
|
"required": true,
|
||||||
|
"description": "补货需求明细列表"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "summary",
|
||||||
|
"type": "object",
|
||||||
|
"required": true,
|
||||||
|
"description": "汇总信息"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pagination",
|
||||||
|
"type": "object",
|
||||||
|
"required": true,
|
||||||
|
"description": "分页信息"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-15 17:32:36",
|
"createdAt": "2026-05-15 17:32:36",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -16,7 +16,7 @@
|
|||||||
"name": "收货单模块",
|
"name": "收货单模块",
|
||||||
"key": "storage_receiving",
|
"key": "storage_receiving",
|
||||||
"folder": "storage_receiving",
|
"folder": "storage_receiving",
|
||||||
"interfaceCount": 17
|
"interfaceCount": 19
|
||||||
},
|
},
|
||||||
"changes": {
|
"changes": {
|
||||||
"fromPreviousSnapshot": {
|
"fromPreviousSnapshot": {
|
||||||
@ -26,7 +26,9 @@
|
|||||||
"addedMethods": [],
|
"addedMethods": [],
|
||||||
"deletedMethods": [],
|
"deletedMethods": [],
|
||||||
"paramsUpdatedMethods": [],
|
"paramsUpdatedMethods": [],
|
||||||
"responseUpdatedMethods": []
|
"responseUpdatedMethods": [
|
||||||
|
"storage.receiving.getAvailableInboundQuantity"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -1129,6 +1131,126 @@
|
|||||||
],
|
],
|
||||||
"params": [],
|
"params": [],
|
||||||
"response": []
|
"response": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "storage.receiving.manualMatchEntryOrder",
|
||||||
|
"title": "手动匹配入库单与收货单。传入收货单ID和入库单ID,复用异步匹配服务的明细对比和回传逻辑,同步返回匹配结果(含 matchType、comparisonResult、callbackSent、partialStorageMarked 等)。",
|
||||||
|
"description": "手动匹配入库单与收货单。传入收货单ID和入库单ID,复用异步匹配服务的明细对比和回传逻辑,同步返回匹配结果(含 matchType、comparisonResult、callbackSent、partialStorageMarked 等)。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "receivingId",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "收货单 ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "entryOrderId",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "入库单 ID"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "matchType",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "匹配类型枚举:full_match(SKU+数量完全一致)/ receiving_covers_entry(收货单覆盖入库单,触发回传+标记部分入库)/ entry_exceeds_receiving(入库单超出收货单,不触发回传)/ no_match(SKU无交集,不触发回传)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "comparisonResult",
|
||||||
|
"type": "object",
|
||||||
|
"required": true,
|
||||||
|
"description": "明细对比结果对象"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "callbackSent",
|
||||||
|
"type": "boolean",
|
||||||
|
"required": true,
|
||||||
|
"description": "是否已发送回传(full_match / receiving_covers_entry 时为 true)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "callbackResult",
|
||||||
|
"type": "object|null",
|
||||||
|
"required": true,
|
||||||
|
"description": "回传结果对象(未发送时为 null);成功时含 success、sourceType(QM/API)、detail 字段"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "partialStorageMarked",
|
||||||
|
"type": "boolean",
|
||||||
|
"required": true,
|
||||||
|
"description": "是否已标记部分入库(仅 receiving_covers_entry 时为 true)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "entryOrder",
|
||||||
|
"type": "object",
|
||||||
|
"required": true,
|
||||||
|
"description": "入库单摘要信息"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "receivingOrder",
|
||||||
|
"type": "object",
|
||||||
|
"required": true,
|
||||||
|
"description": "收货单摘要信息"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "storage.receiving.getAvailableInboundQuantity",
|
||||||
|
"title": "按 stock_id 查询可入库数量。返回指定商品在已审核收货单中各明细的可入库数量(actual_quantity - stored_quantity - pending_allocated_quantity),仅包含尚有可入库余量的明细,排除未审核和已取消的收货单。",
|
||||||
|
"description": "按 stock_id 查询可入库数量。返回指定商品在已审核收货单中各明细的可入库数量(actual_quantity - stored_quantity - pending_allocated_quantity),仅包含尚有可入库余量的明细,排除未审核和已取消的收货单。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "stock_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "商品库存ID(stock_warehouse.id)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "list",
|
||||||
|
"type": "array",
|
||||||
|
"required": true,
|
||||||
|
"description": "可入库明细列表,每项包含 detail_id、receiving_id、receiving_number、product_name、actual_quantity、stored_quantity、pending_allocated_quantity、available_quantity、storage_status、batch_number、production_date、expiry_date、space_id、receiving_status"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "total",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "返回条数"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-06-17 10:25:45",
|
"generatedAt": "2026-06-18 17:45:21",
|
||||||
"generatedAtLocal": "2026-06-17 10:25:45",
|
"generatedAtLocal": "2026-06-18 17:45:21",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-06-17 10:25:45",
|
"updatedAt": "2026-06-18 17:45:21",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user