5月6日
This commit is contained in:
parent
fb118d96b6
commit
e732e7fa9d
5
env.d.ts
vendored
5
env.d.ts
vendored
@ -8,3 +8,8 @@ declare module '@/utils/auth' {
|
|||||||
declare module 'vue-virtual-scroller' {
|
declare module 'vue-virtual-scroller' {
|
||||||
export const RecycleScroller: any
|
export const RecycleScroller: any
|
||||||
}
|
}
|
||||||
|
|
||||||
|
declare module 'qrcode.vue' {
|
||||||
|
const QrcodeVue: any
|
||||||
|
export default QrcodeVue
|
||||||
|
}
|
||||||
|
|||||||
@ -238,6 +238,39 @@ export function orderWaveSingleOrderFetchList(data: WaveGroupOrderFetchListParam
|
|||||||
} as any)
|
} as any)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type WaveSingleFetchByIdsParams = {
|
||||||
|
ids?: Array<string | number> | string | number
|
||||||
|
order_ids?: Array<string | number> | string | number
|
||||||
|
orderIds?: Array<string | number> | string | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type WaveSingleFetchByIdsResponse = {
|
||||||
|
ids: Array<number>
|
||||||
|
wave_id: number
|
||||||
|
wave_no: string
|
||||||
|
fetched_order_ids: Array<number>
|
||||||
|
fetched_order_count: number
|
||||||
|
excluded_existing_wave_order_ids?: Array<number>
|
||||||
|
skipped_order_ids?: Array<number>
|
||||||
|
not_found_order_ids?: Array<number>
|
||||||
|
}
|
||||||
|
|
||||||
|
export function orderWaveSingleFetchByIds(
|
||||||
|
data: WaveSingleFetchByIdsParams
|
||||||
|
): Promise<WaveSingleFetchByIdsResponse & { code?: number; message?: string }> {
|
||||||
|
return request({
|
||||||
|
url: '/system',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
method: 'order.wave.singleFetchByIds',
|
||||||
|
v,
|
||||||
|
timestamp: new Date().getTime()
|
||||||
|
},
|
||||||
|
data,
|
||||||
|
isSystemApi: true
|
||||||
|
} as any)
|
||||||
|
}
|
||||||
|
|
||||||
export function orderWaveFetch(data: WaveFetchParams): Promise<WaveFetchResponse & { code?: number; message?: string }> {
|
export function orderWaveFetch(data: WaveFetchParams): Promise<WaveFetchResponse & { code?: number; message?: string }> {
|
||||||
return request({
|
return request({
|
||||||
url: '/system',
|
url: '/system',
|
||||||
@ -424,6 +457,7 @@ export const orderWave = {
|
|||||||
batchList: orderWaveBatchList,
|
batchList: orderWaveBatchList,
|
||||||
groupOrderFetchList: orderWaveGroupOrderFetchList,
|
groupOrderFetchList: orderWaveGroupOrderFetchList,
|
||||||
singleOrderFetchList: orderWaveSingleOrderFetchList,
|
singleOrderFetchList: orderWaveSingleOrderFetchList,
|
||||||
|
singleFetchByIds: orderWaveSingleFetchByIds,
|
||||||
fetch: orderWaveFetch,
|
fetch: orderWaveFetch,
|
||||||
fetchTaskProgress: orderWaveFetchTaskProgress,
|
fetchTaskProgress: orderWaveFetchTaskProgress,
|
||||||
batchAllocateExpress: orderWaveBatchAllocateExpress,
|
batchAllocateExpress: orderWaveBatchAllocateExpress,
|
||||||
|
|||||||
72
src/components/QR/qrcode.vue
Normal file
72
src/components/QR/qrcode.vue
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:model-value="visible"
|
||||||
|
title="快递单号二维码"
|
||||||
|
width="380px"
|
||||||
|
align-center
|
||||||
|
destroy-on-close
|
||||||
|
@close="handleClose"
|
||||||
|
>
|
||||||
|
<div class="qr-wrapper">
|
||||||
|
<canvas v-if="resolvedCode" ref="qrCanvasRef" class="qr-canvas" />
|
||||||
|
<el-empty v-else description="暂无快递单号" :image-size="120" />
|
||||||
|
<p v-if="resolvedCode" class="qr-code-text">{{ resolvedCode }}</p>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { computed, nextTick, ref, watch } from 'vue'
|
||||||
|
import QRCode from 'qrcode'
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
visible: boolean
|
||||||
|
code?: string | null
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const emit = defineEmits<{
|
||||||
|
(e: 'update:visible', value: boolean): void
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const resolvedCode = computed(() => String(props.code ?? '').trim())
|
||||||
|
const qrCanvasRef = ref<HTMLCanvasElement | null>(null)
|
||||||
|
|
||||||
|
function handleClose() {
|
||||||
|
emit('update:visible', false)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function renderQrCode() {
|
||||||
|
if (!props.visible || !resolvedCode.value) return
|
||||||
|
await nextTick()
|
||||||
|
if (!qrCanvasRef.value) return
|
||||||
|
await QRCode.toCanvas(qrCanvasRef.value, resolvedCode.value, {
|
||||||
|
width: 260,
|
||||||
|
margin: 1
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(() => [props.visible, resolvedCode.value], () => {
|
||||||
|
renderQrCode()
|
||||||
|
}, { immediate: true })
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.qr-wrapper {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qr-canvas {
|
||||||
|
width: 260px;
|
||||||
|
height: 260px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.qr-code-text {
|
||||||
|
margin: 0;
|
||||||
|
color: #606266;
|
||||||
|
word-break: break-all;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -40,7 +40,7 @@ export default {
|
|||||||
"Receivable": "Receivable",
|
"Receivable": "Receivable",
|
||||||
"Encoding": "Encoding",
|
"Encoding": "Encoding",
|
||||||
"Open": "Open Platform",
|
"Open": "Open Platform",
|
||||||
"basicManagement": "Basic Management",
|
"basicManagement": "Warehouse Settings",
|
||||||
"Order": "Order",
|
"Order": "Order",
|
||||||
"Stock": "Stock",
|
"Stock": "Stock",
|
||||||
"Material": "Material",
|
"Material": "Material",
|
||||||
|
|||||||
@ -15,6 +15,12 @@ const CONFIG = {
|
|||||||
CACHE_KEY: 'i18n_collected_keys' // 本地缓存键名
|
CACHE_KEY: 'i18n_collected_keys' // 本地缓存键名
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 合并服务端语言包后仍强制使用前端的菜单译名(避免后台词条未同步时被覆盖) */
|
||||||
|
const FORCE_MENU_LABELS: Record<string, Record<string, string>> = {
|
||||||
|
'zh-CN': { basicManagement: '仓库设置' },
|
||||||
|
en: { basicManagement: 'Warehouse Settings' }
|
||||||
|
}
|
||||||
|
|
||||||
// ==================== 状态管理 ====================
|
// ==================== 状态管理 ====================
|
||||||
const state = {
|
const state = {
|
||||||
serverMessages: {} as Record<string, any>, // 服务器加载的翻译
|
serverMessages: {} as Record<string, any>, // 服务器加载的翻译
|
||||||
@ -259,6 +265,13 @@ export async function loadServerMessages(language: string | null = null) {
|
|||||||
|
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
i18n.global.setLocaleMessage(targetLanguage, mergedMessages)
|
i18n.global.setLocaleMessage(targetLanguage, mergedMessages)
|
||||||
|
|
||||||
|
const forced = FORCE_MENU_LABELS[targetLanguage]
|
||||||
|
if (forced && mergedMessages.menu && typeof mergedMessages.menu === 'object') {
|
||||||
|
Object.assign(mergedMessages.menu, forced)
|
||||||
|
// @ts-ignore
|
||||||
|
i18n.global.setLocaleMessage(targetLanguage, mergedMessages)
|
||||||
|
}
|
||||||
|
|
||||||
// console.log('整合后的语言包:', mergedMessages)
|
// console.log('整合后的语言包:', mergedMessages)
|
||||||
console.log(`✅ 服务器翻译加载并深度合并成功 (${targetLanguage})`);
|
console.log(`✅ 服务器翻译加载并深度合并成功 (${targetLanguage})`);
|
||||||
|
|||||||
@ -40,7 +40,8 @@ export default {
|
|||||||
"Receivable": "应收",
|
"Receivable": "应收",
|
||||||
"Encoding": "编码",
|
"Encoding": "编码",
|
||||||
"Open": "开放平台",
|
"Open": "开放平台",
|
||||||
"basicManagement": "基础设置",
|
"basicManagement": "仓库设置",
|
||||||
|
"基础设置": "仓库设置",
|
||||||
"Order": "订单",
|
"Order": "订单",
|
||||||
"Stock": "商品",
|
"Stock": "商品",
|
||||||
"Material": "耗材",
|
"Material": "耗材",
|
||||||
|
|||||||
@ -6,15 +6,33 @@ import NProgress from 'nprogress'
|
|||||||
import 'nprogress/nprogress.css'
|
import 'nprogress/nprogress.css'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken } from '@/utils/auth'
|
||||||
import getPageTitle from '@/utils/get-page-title'
|
import getPageTitle from '@/utils/get-page-title'
|
||||||
|
import i18n from '@/lang'
|
||||||
|
|
||||||
NProgress.configure({ showSpinner: false })
|
NProgress.configure({ showSpinner: false })
|
||||||
|
|
||||||
|
/** 与侧边栏 / 标签一致:优先按路由 name、再按 meta.title 匹配 menu.* 文案 */
|
||||||
|
function resolveRouteDocumentTitle(route: typeof router.currentRoute.value) {
|
||||||
|
const tryMenuKey = (raw: unknown) => {
|
||||||
|
if (raw === undefined || raw === null || raw === '') return ''
|
||||||
|
const key = String(raw).replace(/_Child$/, '')
|
||||||
|
const path = `menu.${key}`
|
||||||
|
return i18n.global.te(path) ? String(i18n.global.t(path)) : ''
|
||||||
|
}
|
||||||
|
|
||||||
|
const metaTitle = route.meta?.title as string | undefined
|
||||||
|
const fromName = tryMenuKey(route.name)
|
||||||
|
if (fromName) return fromName
|
||||||
|
const fromMetaAsKey = tryMenuKey(metaTitle)
|
||||||
|
if (fromMetaAsKey) return fromMetaAsKey
|
||||||
|
return metaTitle || (route.name != null ? String(route.name) : '')
|
||||||
|
}
|
||||||
|
|
||||||
const whiteList = ['/login','/redirect','/admin/land'] // no redirect whitelist
|
const whiteList = ['/login','/redirect','/admin/land'] // no redirect whitelist
|
||||||
|
|
||||||
router.beforeEach(async (to, from) => {
|
router.beforeEach(async (to, from) => {
|
||||||
NProgress.start()
|
NProgress.start()
|
||||||
// console.log("路由表",router.getRoutes());
|
// console.log("路由表",router.getRoutes());
|
||||||
document.title = getPageTitle(to.meta.title as string)
|
document.title = getPageTitle(resolveRouteDocumentTitle(to))
|
||||||
|
|
||||||
const hasToken = getToken()
|
const hasToken = getToken()
|
||||||
|
|
||||||
|
|||||||
@ -25,6 +25,7 @@ export const componentMap: Record<string, any> = {
|
|||||||
/** 与后端菜单 component 字段兼容 */
|
/** 与后端菜单 component 字段兼容 */
|
||||||
'order/waveOrder': () => import('@/views/order/waveOrder/index.vue'),
|
'order/waveOrder': () => import('@/views/order/waveOrder/index.vue'),
|
||||||
'role/index': () => import('@/views/system/setting/role/index.vue'),
|
'role/index': () => import('@/views/system/setting/role/index.vue'),
|
||||||
|
'basicManagement':() => import('@/views/system/setting/basicManagement/index.vue'),
|
||||||
'system/setting/role/index': () => import('@/views/system/setting/role/index.vue'),
|
'system/setting/role/index': () => import('@/views/system/setting/role/index.vue'),
|
||||||
// 'role/index': () => import('@/views/system/setting/role/index.vue'),
|
// 'role/index': () => import('@/views/system/setting/role/index.vue'),
|
||||||
// 'system/setting/role/index': () => import('@/views/system/setting/role/index.vue'),
|
// 'system/setting/role/index': () => import('@/views/system/setting/role/index.vue'),
|
||||||
|
|||||||
19
src/utils/wave-order-nav.ts
Normal file
19
src/utils/wave-order-nav.ts
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import type { Router } from 'vue-router'
|
||||||
|
|
||||||
|
/** 与 src/router/map.ts 中 order/waveOrder 等 key 对应的常见菜单 path */
|
||||||
|
const WAVE_ORDER_PATH_CANDIDATES = ['/order/waveOrder', '/order/wave', '/wave/index']
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转订单波次管理页的「散单波次」标签(waveOrder/index.vue 使用 query.tab=sandanWave)。
|
||||||
|
*/
|
||||||
|
export async function navigateToSandanWaveTab(router: Router) {
|
||||||
|
const query = { tab: 'sandanWave' }
|
||||||
|
for (const path of WAVE_ORDER_PATH_CANDIDATES) {
|
||||||
|
const resolved = router.resolve({ path, query })
|
||||||
|
if (resolved.matched.length) {
|
||||||
|
await router.push({ path, query })
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
await router.push({ path: WAVE_ORDER_PATH_CANDIDATES[0], query })
|
||||||
|
}
|
||||||
@ -215,6 +215,16 @@ export const ORDER_TOOLBAR_BUTTONS: Record<string, ToolbarButtonConfig> = {
|
|||||||
markPendingOutbound: { key: 'markPendingOutbound', label: '标记待出库', size: 'small', type: 'warning', loadingKey: 'actionLoading', disabledKey: 'hasNoSelection', action: 'handleMarkPendingOutbound' },
|
markPendingOutbound: { key: 'markPendingOutbound', label: '标记待出库', size: 'small', type: 'warning', loadingKey: 'actionLoading', disabledKey: 'hasNoSelection', action: 'handleMarkPendingOutbound' },
|
||||||
allocateStorage: { key: 'allocateStorage', label: '分配储位', size: 'small', type: 'primary', plain: true, loadingKey: 'storageAllocateLoading', disabledKey: 'hasNoSelection', action: 'openStorageAllocateDialog' },
|
allocateStorage: { key: 'allocateStorage', label: '分配储位', size: 'small', type: 'primary', plain: true, loadingKey: 'storageAllocateLoading', disabledKey: 'hasNoSelection', action: 'openStorageAllocateDialog' },
|
||||||
cancelAllocateStorage: { key: 'cancelAllocateStorage', label: '取消分配储位', size: 'small', type: 'danger', plain: true, loadingKey: 'storageAllocateLoading', disabledKey: 'hasNoSelection', action: 'openStorageCancelDialog' },
|
cancelAllocateStorage: { key: 'cancelAllocateStorage', label: '取消分配储位', size: 'small', type: 'danger', plain: true, loadingKey: 'storageAllocateLoading', disabledKey: 'hasNoSelection', action: 'openStorageCancelDialog' },
|
||||||
|
waveSingleFetchByIds: {
|
||||||
|
key: 'waveSingleFetchByIds',
|
||||||
|
label: '抓取散单',
|
||||||
|
size: 'small',
|
||||||
|
type: 'primary',
|
||||||
|
plain: true,
|
||||||
|
loadingKey: 'waveSingleFetchLoading',
|
||||||
|
disabledKey: 'hasNoSelection',
|
||||||
|
action: 'handleWaveSingleFetchByIds'
|
||||||
|
},
|
||||||
allocateExpress: { key: 'allocateExpress', label: '分配快递号', size: 'small', type: 'success', loadingKey: 'allocateLoading', disabledKey: 'hasNoSelection', action: 'openAllocateExpressDialog' },
|
allocateExpress: { key: 'allocateExpress', label: '分配快递号', size: 'small', type: 'success', loadingKey: 'allocateLoading', disabledKey: 'hasNoSelection', action: 'openAllocateExpressDialog' },
|
||||||
updateExpress: { key: 'updateExpress', label: '修改快递', size: 'small', type: 'warning', plain: true, loadingKey: 'updateOrderMetaLoading', disabledKey: 'hasNoSelection', action: 'openUpdateOrderExpressDialog' },
|
updateExpress: { key: 'updateExpress', label: '修改快递', size: 'small', type: 'warning', plain: true, loadingKey: 'updateOrderMetaLoading', disabledKey: 'hasNoSelection', action: 'openUpdateOrderExpressDialog' },
|
||||||
updatePlatform: { key: 'updatePlatform', label: '修改平台', size: 'small', type: 'info', plain: true, loadingKey: 'updateOrderMetaLoading', disabledKey: 'hasNoSelection', action: 'openUpdateOrderPlatformDialog' },
|
updatePlatform: { key: 'updatePlatform', label: '修改平台', size: 'small', type: 'info', plain: true, loadingKey: 'updateOrderMetaLoading', disabledKey: 'hasNoSelection', action: 'openUpdateOrderPlatformDialog' },
|
||||||
@ -909,6 +919,7 @@ export const pendingToolbarButtonKeys = [
|
|||||||
...simpleListToolbarButtonKeys,
|
...simpleListToolbarButtonKeys,
|
||||||
'reverseReview',
|
'reverseReview',
|
||||||
'markPendingOutbound',
|
'markPendingOutbound',
|
||||||
|
'waveSingleFetchByIds',
|
||||||
'allocateStorage',
|
'allocateStorage',
|
||||||
'cancelAllocateStorage',
|
'cancelAllocateStorage',
|
||||||
'allocateExpress',
|
'allocateExpress',
|
||||||
|
|||||||
@ -147,6 +147,40 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #column-waybill_codes="{ row }">
|
||||||
|
<div v-if="extractWaybillCodes(row).length" class="waybill-list">
|
||||||
|
<span
|
||||||
|
v-for="code in extractWaybillCodes(row)"
|
||||||
|
:key="code"
|
||||||
|
class="waybill-link"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
@click.stop="openWaybillQr(code)"
|
||||||
|
@keydown.enter.prevent="openWaybillQr(code)"
|
||||||
|
>
|
||||||
|
{{ code }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #column-express_code="{ row }">
|
||||||
|
<div v-if="extractWaybillCodes(row).length" class="waybill-list">
|
||||||
|
<span
|
||||||
|
v-for="code in extractWaybillCodes(row)"
|
||||||
|
:key="code"
|
||||||
|
class="waybill-link"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
@click.stop="openWaybillQr(code)"
|
||||||
|
@keydown.enter.prevent="openWaybillQr(code)"
|
||||||
|
>
|
||||||
|
{{ code }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #column-order_flag="{ row }">
|
<template #column-order_flag="{ row }">
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
:content="orderFlagFullText(row)"
|
:content="orderFlagFullText(row)"
|
||||||
@ -293,6 +327,7 @@
|
|||||||
|
|
||||||
<manual-create-pending-order-dialog v-model="manualCreateDialogVisible" @success="loadData" />
|
<manual-create-pending-order-dialog v-model="manualCreateDialogVisible" @success="loadData" />
|
||||||
<excel-import-pending-order-dialog v-model="importOrderDialogVisible" @success="loadData" />
|
<excel-import-pending-order-dialog v-model="importOrderDialogVisible" @success="loadData" />
|
||||||
|
<qrcode-dialog v-model:visible="qrDialogVisible" :code="currentWaybillCode" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -340,6 +375,7 @@ import { exportUpperTableRows } from './utils/export'
|
|||||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||||
import { createPendingToolbarController } from './utils/toolbar-actions'
|
import { createPendingToolbarController } from './utils/toolbar-actions'
|
||||||
import { safeInvoke } from '@/utils/safe-invoke'
|
import { safeInvoke } from '@/utils/safe-invoke'
|
||||||
|
import QrcodeDialog from '@/components/QR/qrcode.vue'
|
||||||
|
|
||||||
const scanBox = ref<any>(null)
|
const scanBox = ref<any>(null)
|
||||||
const upperTable = ref<any>(null)
|
const upperTable = ref<any>(null)
|
||||||
@ -375,6 +411,8 @@ const detailVisible = ref(true)
|
|||||||
|
|
||||||
const quickSearch = ref('')
|
const quickSearch = ref('')
|
||||||
const toolbarButtons = exceptionToolbarButtons
|
const toolbarButtons = exceptionToolbarButtons
|
||||||
|
const qrDialogVisible = ref(false)
|
||||||
|
const currentWaybillCode = ref('')
|
||||||
|
|
||||||
const scrollContainerRef = ref<HTMLElement | null>(null)
|
const scrollContainerRef = ref<HTMLElement | null>(null)
|
||||||
const isDragging = ref(false)
|
const isDragging = ref(false)
|
||||||
@ -820,7 +858,8 @@ const {
|
|||||||
cloneOrderDialogVisible,
|
cloneOrderDialogVisible,
|
||||||
cloneOrderLoading,
|
cloneOrderLoading,
|
||||||
cloneSourceOrderId,
|
cloneSourceOrderId,
|
||||||
cloneSourceOrderCode
|
cloneSourceOrderCode,
|
||||||
|
waveSingleFetchLoading
|
||||||
},
|
},
|
||||||
submitStorageAllocate,
|
submitStorageAllocate,
|
||||||
submitUpdateOrderMeta,
|
submitUpdateOrderMeta,
|
||||||
@ -862,7 +901,8 @@ const buttonLoadingMap = computed<Record<string, boolean>>(() => ({
|
|||||||
allocateLoading: allocateLoading.value,
|
allocateLoading: allocateLoading.value,
|
||||||
updateOrderMetaLoading: updateOrderMetaLoading.value,
|
updateOrderMetaLoading: updateOrderMetaLoading.value,
|
||||||
cloneOrderLoading: cloneOrderLoading.value,
|
cloneOrderLoading: cloneOrderLoading.value,
|
||||||
resolveExceptionLoading: resolveExceptionLoading.value
|
resolveExceptionLoading: resolveExceptionLoading.value,
|
||||||
|
waveSingleFetchLoading: waveSingleFetchLoading.value
|
||||||
}))
|
}))
|
||||||
|
|
||||||
function resolveButtonLoading(loadingKey?: string) {
|
function resolveButtonLoading(loadingKey?: string) {
|
||||||
@ -885,6 +925,39 @@ function handleToolbarButtonClick(action: ToolbarButtonConfig['action']) {
|
|||||||
if (!handler) return
|
if (!handler) return
|
||||||
safeInvoke(() => handler())
|
safeInvoke(() => handler())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parseWaybillCodes(raw: unknown): string[] {
|
||||||
|
if (Array.isArray(raw)) {
|
||||||
|
return raw.map((item) => String(item ?? '').trim()).filter(Boolean)
|
||||||
|
}
|
||||||
|
const text = String(raw ?? '').trim()
|
||||||
|
if (!text) return []
|
||||||
|
if (text.startsWith('[') && text.endsWith(']')) {
|
||||||
|
try {
|
||||||
|
const parsed = JSON.parse(text)
|
||||||
|
if (Array.isArray(parsed)) {
|
||||||
|
return parsed.map((item) => String(item ?? '').trim()).filter(Boolean)
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// ignore invalid json
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (text.includes(',')) {
|
||||||
|
return text.split(',').map((item) => item.trim()).filter(Boolean)
|
||||||
|
}
|
||||||
|
return [text]
|
||||||
|
}
|
||||||
|
|
||||||
|
function extractWaybillCodes(row: any): string[] {
|
||||||
|
const raw = row?.express_numbers ?? row?.waybill_codes ?? row?.express_code
|
||||||
|
return parseWaybillCodes(raw)
|
||||||
|
}
|
||||||
|
|
||||||
|
function openWaybillQr(code: string) {
|
||||||
|
if (!code) return
|
||||||
|
currentWaybillCode.value = code
|
||||||
|
qrDialogVisible.value = true
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
@ -959,6 +1032,17 @@ function handleToolbarButtonClick(action: ToolbarButtonConfig['action']) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.waybill-link {
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.waybill-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
.clone-order-meta {
|
.clone-order-meta {
|
||||||
margin-top: 12px;
|
margin-top: 12px;
|
||||||
color: #606266;
|
color: #606266;
|
||||||
|
|||||||
@ -157,16 +157,24 @@ function refreshBadgeCounts() {
|
|||||||
safeInvoke(() => loadBadgeCounts())
|
safeInvoke(() => loadBadgeCounts())
|
||||||
}
|
}
|
||||||
|
|
||||||
// 初始化:从URL参数获取激活的标签
|
/**
|
||||||
const initFromRoute = () => {
|
* 同步地址栏 tab 与当前页签。
|
||||||
const tabFromUrl = route.query.tab as string
|
* AppMain 使用 route.fullPath 作为 router-view 的 key;首屏缺少 tab 时若 router.replace 补上 ?tab=,
|
||||||
const validTabs = tabs.value.map(tab => tab.name)
|
* fullPath 变化会整页销毁重建,各子页 onMounted 数据请求会执行两次。缺省「待处理订单」时只更新 activeTab,不写回路由。
|
||||||
|
*/
|
||||||
|
watch(
|
||||||
|
() => route.query.tab,
|
||||||
|
(newTab) => {
|
||||||
|
const validTabs = tabs.value.map((tab) => tab.name)
|
||||||
|
const raw = newTab === undefined || newTab === null ? '' : String(newTab).trim()
|
||||||
|
|
||||||
|
if (raw && validTabs.includes(raw)) {
|
||||||
|
activeTab.value = raw
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if (tabFromUrl && validTabs.includes(tabFromUrl)) {
|
|
||||||
activeTab.value = tabFromUrl
|
|
||||||
} else {
|
|
||||||
activeTab.value = 'pendingOrder'
|
activeTab.value = 'pendingOrder'
|
||||||
if (!route.query.tab || !validTabs.includes(tabFromUrl)) {
|
if (raw && !validTabs.includes(raw)) {
|
||||||
router.replace({
|
router.replace({
|
||||||
query: {
|
query: {
|
||||||
...route.query,
|
...route.query,
|
||||||
@ -174,33 +182,11 @@ const initFromRoute = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 监听URL参数变化
|
|
||||||
watch(
|
|
||||||
() => route.query.tab,
|
|
||||||
(newTab) => {
|
|
||||||
const validTabs = tabs.value.map(tab => tab.name)
|
|
||||||
if (newTab && validTabs.includes(newTab as string)) {
|
|
||||||
activeTab.value = newTab as string
|
|
||||||
} else {
|
|
||||||
activeTab.value = 'pendingOrder'
|
|
||||||
if (!newTab || !validTabs.includes(newTab as string)) {
|
|
||||||
router.replace({
|
|
||||||
query: {
|
|
||||||
...route.query,
|
|
||||||
tab: 'pendingOrder'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
initFromRoute()
|
|
||||||
loadBadgeCounts()
|
loadBadgeCounts()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -114,6 +114,23 @@
|
|||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #column-waybill_codes="{ row }">
|
||||||
|
<div v-if="extractWaybillCodes(row).length" class="waybill-list">
|
||||||
|
<span
|
||||||
|
v-for="code in extractWaybillCodes(row)"
|
||||||
|
:key="code"
|
||||||
|
class="waybill-link"
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
@click.stop="openWaybillQr(code)"
|
||||||
|
@keydown.enter.prevent="openWaybillQr(code)"
|
||||||
|
>
|
||||||
|
{{ code }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<span v-else>-</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #column-sync_status="{ row }">
|
<template #column-sync_status="{ row }">
|
||||||
<el-tag :type="getTagType('sync_status', row.sync_status)" size="small">
|
<el-tag :type="getTagType('sync_status', row.sync_status)" size="small">
|
||||||
{{ translateOrderField('sync_status', row.sync_status) }}
|
{{ translateOrderField('sync_status', row.sync_status) }}
|
||||||
@ -225,6 +242,7 @@
|
|||||||
|
|
||||||
<manual-create-pending-order-dialog v-model="manualCreateDialogVisible" @success="loadData" />
|
<manual-create-pending-order-dialog v-model="manualCreateDialogVisible" @success="loadData" />
|
||||||
<excel-import-pending-order-dialog v-model="importOrderDialogVisible" @success="loadData" />
|
<excel-import-pending-order-dialog v-model="importOrderDialogVisible" @success="loadData" />
|
||||||
|
<qrcode-dialog v-model:visible="qrDialogVisible" :code="currentWaybillCode" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -262,6 +280,7 @@ import { exportUpperTableRows } from './utils/export'
|
|||||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||||
import { createPendingToolbarController } from './utils/toolbar-actions'
|
import { createPendingToolbarController } from './utils/toolbar-actions'
|
||||||
import { safeInvoke } from '@/utils/safe-invoke'
|
import { safeInvoke } from '@/utils/safe-invoke'
|
||||||
|
import QrcodeDialog from '@/components/QR/qrcode.vue'
|
||||||
|
|
||||||
const scanBox = ref<any>(null)
|
const scanBox = ref<any>(null)
|
||||||
const upperTable = ref<any>(null)
|
const upperTable = ref<any>(null)
|
||||||
@ -300,6 +319,8 @@ const detailVisible = ref(true)
|
|||||||
|
|
||||||
const quickSearch = ref('')
|
const quickSearch = ref('')
|
||||||
const toolbarButtons = pendingToolbarButtons
|
const toolbarButtons = pendingToolbarButtons
|
||||||
|
const qrDialogVisible = ref(false)
|
||||||
|
const currentWaybillCode = ref('')
|
||||||
const initialConditions = computed(() => {
|
const initialConditions = computed(() => {
|
||||||
const waveNo = String(route.query.wave_no || '').trim()
|
const waveNo = String(route.query.wave_no || '').trim()
|
||||||
if (!waveNo) return undefined
|
if (!waveNo) return undefined
|
||||||
@ -549,7 +570,8 @@ const {
|
|||||||
cloneSourceOrderId,
|
cloneSourceOrderId,
|
||||||
cloneSourceOrderCode,
|
cloneSourceOrderCode,
|
||||||
syncOrderIdsDialogVisible,
|
syncOrderIdsDialogVisible,
|
||||||
syncOrderIdsLoading
|
syncOrderIdsLoading,
|
||||||
|
waveSingleFetchLoading
|
||||||
},
|
},
|
||||||
submitStorageAllocate,
|
submitStorageAllocate,
|
||||||
submitUpdateOrderMeta,
|
submitUpdateOrderMeta,
|
||||||
@ -588,7 +610,8 @@ const buttonLoadingMap = computed<Record<string, boolean>>(() => ({
|
|||||||
allocateLoading: allocateLoading.value,
|
allocateLoading: allocateLoading.value,
|
||||||
updateOrderMetaLoading: updateOrderMetaLoading.value,
|
updateOrderMetaLoading: updateOrderMetaLoading.value,
|
||||||
cloneOrderLoading: cloneOrderLoading.value,
|
cloneOrderLoading: cloneOrderLoading.value,
|
||||||
syncOrderIdsLoading: syncOrderIdsLoading.value
|
syncOrderIdsLoading: syncOrderIdsLoading.value,
|
||||||
|
waveSingleFetchLoading: waveSingleFetchLoading.value
|
||||||
}))
|
}))
|
||||||
|
|
||||||
function resolveButtonLoading(loadingKey?: string) {
|
function resolveButtonLoading(loadingKey?: string) {
|
||||||
@ -612,6 +635,39 @@ function handleToolbarButtonClick(action: ToolbarButtonConfig['action']) {
|
|||||||
safeInvoke(() => handler())
|
safeInvoke(() => handler())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parseWaybillCodes(raw: unknown): string[] {
|
||||||
|
if (Array.isArray(raw)) {
|
||||||
|
return raw.map((item) => String(item ?? '').trim()).filter(Boolean)
|
||||||
|
}
|
||||||
|
const text = String(raw ?? '').trim()
|
||||||
|
if (!text) return []
|
||||||
|
if (text.startsWith('[') && text.endsWith(']')) {
|
||||||
|
try {
|
||||||
|
const parsed = JSON.parse(text)
|
||||||
|
if (Array.isArray(parsed)) {
|
||||||
|
return parsed.map((item) => String(item ?? '').trim()).filter(Boolean)
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// ignore invalid json
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (text.includes(',')) {
|
||||||
|
return text.split(',').map((item) => item.trim()).filter(Boolean)
|
||||||
|
}
|
||||||
|
return [text]
|
||||||
|
}
|
||||||
|
|
||||||
|
function extractWaybillCodes(row: any): string[] {
|
||||||
|
const raw = row?.express_numbers ?? row?.waybill_codes ?? row?.express_code
|
||||||
|
return parseWaybillCodes(raw)
|
||||||
|
}
|
||||||
|
|
||||||
|
function openWaybillQr(code: string) {
|
||||||
|
if (!code) return
|
||||||
|
currentWaybillCode.value = code
|
||||||
|
qrDialogVisible.value = true
|
||||||
|
}
|
||||||
|
|
||||||
function normalizeCode(value: unknown) {
|
function normalizeCode(value: unknown) {
|
||||||
return String(value ?? '').trim()
|
return String(value ?? '').trim()
|
||||||
}
|
}
|
||||||
@ -792,5 +848,16 @@ function getSelectedIds(): number[] {
|
|||||||
.order-log-wrapper {
|
.order-log-wrapper {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.waybill-link {
|
||||||
|
color: var(--el-color-primary);
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.waybill-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 2px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,13 @@
|
|||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { computed, reactive, ref } from 'vue'
|
import { computed, reactive, ref } from 'vue'
|
||||||
|
import { useRouter } from 'vue-router'
|
||||||
import {
|
import {
|
||||||
PENDING_TOOLBAR_API_ACTIONS,
|
PENDING_TOOLBAR_API_ACTIONS,
|
||||||
REVIEW_TOOLBAR_API_ACTIONS,
|
REVIEW_TOOLBAR_API_ACTIONS,
|
||||||
type ToolbarApiActionConfig
|
type ToolbarApiActionConfig
|
||||||
} from '../config/order-common-config'
|
} from '../config/order-common-config'
|
||||||
|
import { orderWaveSingleFetchByIds } from '@/api/order.wave/orderwave'
|
||||||
|
import { navigateToSandanWaveTab } from '@/utils/wave-order-nav'
|
||||||
|
|
||||||
type ActionHandler = () => void | Promise<void>
|
type ActionHandler = () => void | Promise<void>
|
||||||
type OrderId = number | string
|
type OrderId = number | string
|
||||||
@ -260,6 +263,8 @@ export function createPendingToolbarController(params: {
|
|||||||
expressCodeOptions: { value: Array<{ label: string; value: string }> }
|
expressCodeOptions: { value: Array<{ label: string; value: string }> }
|
||||||
platformCodeOptions: { value: Array<{ label: string; value: string }> }
|
platformCodeOptions: { value: Array<{ label: string; value: string }> }
|
||||||
}) {
|
}) {
|
||||||
|
const router = useRouter()
|
||||||
|
|
||||||
const allocateDialogVisible = ref(false)
|
const allocateDialogVisible = ref(false)
|
||||||
const allocateLoading = ref(false)
|
const allocateLoading = ref(false)
|
||||||
const allocatePendingRows = ref<any[]>([])
|
const allocatePendingRows = ref<any[]>([])
|
||||||
@ -296,6 +301,73 @@ export function createPendingToolbarController(params: {
|
|||||||
const syncOrderIdsDialogVisible = ref(false)
|
const syncOrderIdsDialogVisible = ref(false)
|
||||||
const syncOrderIdsLoading = ref(false)
|
const syncOrderIdsLoading = ref(false)
|
||||||
|
|
||||||
|
const waveSingleFetchLoading = ref(false)
|
||||||
|
|
||||||
|
async function handleWaveSingleFetchByIds() {
|
||||||
|
const ids = params.getSelectedIds()
|
||||||
|
if (!ids.length) {
|
||||||
|
ElMessage.warning('请先勾选需要抓取散单的订单')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (waveSingleFetchLoading.value) return
|
||||||
|
try {
|
||||||
|
await ElMessageBox.confirm(
|
||||||
|
`确定将选中的 ${ids.length} 条订单按散单抓取至波次吗?`,
|
||||||
|
'抓取散单',
|
||||||
|
{ type: 'warning' }
|
||||||
|
)
|
||||||
|
} catch {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
waveSingleFetchLoading.value = true
|
||||||
|
try {
|
||||||
|
const res = (await orderWaveSingleFetchByIds({ ids })) as Record<string, any>
|
||||||
|
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
|
||||||
|
const payload =
|
||||||
|
res?.data && typeof res.data === 'object' && !Array.isArray(res.data)
|
||||||
|
? res.data
|
||||||
|
: res
|
||||||
|
if (!ok) {
|
||||||
|
ElMessage.error(res?.message || payload?.message || '抓取散单失败')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
const waveNo = payload?.wave_no ?? ''
|
||||||
|
const fetched = Number(payload?.fetched_order_count ?? 0)
|
||||||
|
const parts = [
|
||||||
|
res?.message || payload?.message || '抓取散单成功',
|
||||||
|
waveNo ? `波次:${waveNo}` : '',
|
||||||
|
Number.isFinite(fetched) && fetched >= 0 ? `已抓取 ${fetched} 单` : ''
|
||||||
|
]
|
||||||
|
const excluded = payload?.excluded_existing_wave_order_ids
|
||||||
|
const skipped = payload?.skipped_order_ids
|
||||||
|
const notFound = payload?.not_found_order_ids
|
||||||
|
if (Array.isArray(excluded) && excluded.length) {
|
||||||
|
parts.push(`已在波次中跳过 ${excluded.length} 单`)
|
||||||
|
}
|
||||||
|
if (Array.isArray(skipped) && skipped.length) {
|
||||||
|
parts.push(`跳过 ${skipped.length} 单`)
|
||||||
|
}
|
||||||
|
if (Array.isArray(notFound) && notFound.length) {
|
||||||
|
parts.push(`未找到 ${notFound.length} 单`)
|
||||||
|
}
|
||||||
|
ElMessage.success(parts.filter(Boolean).join(';'))
|
||||||
|
|
||||||
|
params.clearSelection()
|
||||||
|
await params.loadData()
|
||||||
|
try {
|
||||||
|
await navigateToSandanWaveTab(router)
|
||||||
|
} catch {
|
||||||
|
ElMessage.warning('抓取成功,但跳转散单波次页失败,请从菜单打开波次管理')
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
ElMessage.error('抓取散单失败')
|
||||||
|
} finally {
|
||||||
|
waveSingleFetchLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const actionMap = createPendingToolbarActionMap({
|
const actionMap = createPendingToolbarActionMap({
|
||||||
baseActions: {
|
baseActions: {
|
||||||
loadData: params.loadData,
|
loadData: params.loadData,
|
||||||
@ -310,7 +382,8 @@ export function createPendingToolbarController(params: {
|
|||||||
openManualCreateDialog: params.openManualCreateDialog,
|
openManualCreateDialog: params.openManualCreateDialog,
|
||||||
openImportOrderDialog: params.openImportOrderDialog,
|
openImportOrderDialog: params.openImportOrderDialog,
|
||||||
openCloneOrderDialog,
|
openCloneOrderDialog,
|
||||||
openSyncOrderIdsDialog
|
openSyncOrderIdsDialog,
|
||||||
|
handleWaveSingleFetchByIds
|
||||||
},
|
},
|
||||||
getSelectedIds: params.getSelectedIds,
|
getSelectedIds: params.getSelectedIds,
|
||||||
pendingApi: params.pendingApi,
|
pendingApi: params.pendingApi,
|
||||||
@ -672,7 +745,8 @@ export function createPendingToolbarController(params: {
|
|||||||
cloneSourceOrderId,
|
cloneSourceOrderId,
|
||||||
cloneSourceOrderCode,
|
cloneSourceOrderCode,
|
||||||
syncOrderIdsDialogVisible,
|
syncOrderIdsDialogVisible,
|
||||||
syncOrderIdsLoading
|
syncOrderIdsLoading,
|
||||||
|
waveSingleFetchLoading
|
||||||
},
|
},
|
||||||
submitStorageAllocate,
|
submitStorageAllocate,
|
||||||
submitUpdateOrderMeta,
|
submitUpdateOrderMeta,
|
||||||
|
|||||||
@ -39,23 +39,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div v-if="fetchTaskProgress.taskId" class="task-progress-panel task-progress-panel--toolbar">
|
|
||||||
<div class="task-progress-panel__header">
|
|
||||||
<span class="task-progress-panel__title">抓取任务进度</span>
|
|
||||||
<span class="task-progress-panel__meta">任务ID:{{ fetchTaskProgress.taskId }}</span>
|
|
||||||
</div>
|
|
||||||
<el-progress :percentage="fetchTaskPercent" :status="fetchTaskProgressBarStatus" :stroke-width="16" />
|
|
||||||
<div class="task-progress-panel__info">
|
|
||||||
<span>状态:{{ getFetchTaskStatusText(fetchTaskProgress.status) }}</span>
|
|
||||||
<span>已完成结构:{{ fetchTaskProgress.finishedStructureCount }} / {{ fetchTaskProgress.structureCount }}</span>
|
|
||||||
<span>已抓取件数:{{ fetchTaskProgress.totalFetchedQuantity }}</span>
|
|
||||||
<span v-if="fetchTaskProgress.updateTime">更新时间:{{ formatDateTime(fetchTaskProgress.updateTime) }}</span>
|
|
||||||
</div>
|
|
||||||
<div v-if="fetchTaskProgress.message || fetchTaskProgress.error" class="task-progress-panel__message">
|
|
||||||
{{ fetchTaskProgress.error || fetchTaskProgress.message }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="batchAllocateExpressTaskProgress.taskId" class="task-progress-panel task-progress-panel--toolbar">
|
<div v-if="batchAllocateExpressTaskProgress.taskId" class="task-progress-panel task-progress-panel--toolbar">
|
||||||
<div class="task-progress-panel__header">
|
<div class="task-progress-panel__header">
|
||||||
<span class="task-progress-panel__title">快递号分配任务进度</span>
|
<span class="task-progress-panel__title">快递号分配任务进度</span>
|
||||||
@ -618,6 +601,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<wave-fetch-task-progress-dialog
|
||||||
|
:model-value="Boolean(fetchTaskProgress.taskId)"
|
||||||
|
:progress="fetchTaskProgress"
|
||||||
|
/>
|
||||||
|
|
||||||
<wave-batch-print-preview-dialog
|
<wave-batch-print-preview-dialog
|
||||||
v-model="wavePrintDialogVisible"
|
v-model="wavePrintDialogVisible"
|
||||||
:loading="wavePrintDialogLoading"
|
:loading="wavePrintDialogLoading"
|
||||||
@ -647,6 +635,7 @@ import {
|
|||||||
import { safeInvoke } from '@/utils/safe-invoke'
|
import { safeInvoke } from '@/utils/safe-invoke'
|
||||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||||
import PendingOrderListPanel from './component/PendingOrderListPanel.vue'
|
import PendingOrderListPanel from './component/PendingOrderListPanel.vue'
|
||||||
|
import WaveFetchTaskProgressDialog from './component/WaveFetchTaskProgressDialog.vue'
|
||||||
import * as indexApi from '@/api/index/index'
|
import * as indexApi from '@/api/index/index'
|
||||||
import { settingWarehouseGetSettings as getWarehouseSettings } from '@/api/setting.warehouse/settingwarehouse'
|
import { settingWarehouseGetSettings as getWarehouseSettings } from '@/api/setting.warehouse/settingwarehouse'
|
||||||
import {
|
import {
|
||||||
@ -945,16 +934,6 @@ const selectedWaveOrderTotal = computed(() => {
|
|||||||
const batchPrintDisabled = computed(() => {
|
const batchPrintDisabled = computed(() => {
|
||||||
return !printableSelectionRows.value.length || (waveMaxOrderLimit.value !== null && selectedWaveOrderTotal.value > waveMaxOrderLimit.value)
|
return !printableSelectionRows.value.length || (waveMaxOrderLimit.value !== null && selectedWaveOrderTotal.value > waveMaxOrderLimit.value)
|
||||||
})
|
})
|
||||||
const fetchTaskPercent = computed(() => {
|
|
||||||
const value = Number(fetchTaskProgress.progressPercent || 0)
|
|
||||||
if (!Number.isFinite(value)) return 0
|
|
||||||
return Math.min(100, Math.max(0, value))
|
|
||||||
})
|
|
||||||
const fetchTaskProgressBarStatus = computed(() => {
|
|
||||||
if (fetchTaskProgress.status === 'failed' || fetchTaskProgress.status === 'not_found') return 'exception'
|
|
||||||
if (fetchTaskProgress.status === 'success' || fetchTaskPercent.value >= 100) return 'success'
|
|
||||||
return undefined
|
|
||||||
})
|
|
||||||
const batchAllocateExpressTaskPercent = computed(() => {
|
const batchAllocateExpressTaskPercent = computed(() => {
|
||||||
const value = Number(batchAllocateExpressTaskProgress.progressPercent || 0)
|
const value = Number(batchAllocateExpressTaskProgress.progressPercent || 0)
|
||||||
if (!Number.isFinite(value)) return 0
|
if (!Number.isFinite(value)) return 0
|
||||||
|
|||||||
@ -0,0 +1,136 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog
|
||||||
|
:model-value="modelValue"
|
||||||
|
title="抓取任务进度"
|
||||||
|
width="min(520px, 92vw)"
|
||||||
|
append-to-body
|
||||||
|
align-center
|
||||||
|
:show-close="false"
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:close-on-press-escape="false"
|
||||||
|
class="wave-fetch-task-progress-dialog"
|
||||||
|
>
|
||||||
|
<div v-if="progress.taskId" class="task-progress-panel">
|
||||||
|
<div class="task-progress-panel__header">
|
||||||
|
<span class="task-progress-panel__meta">任务ID:{{ progress.taskId }}</span>
|
||||||
|
</div>
|
||||||
|
<el-progress :percentage="progressPercent" :status="progressBarStatus" :stroke-width="16" />
|
||||||
|
<div class="task-progress-panel__info">
|
||||||
|
<span>状态:{{ statusText }}</span>
|
||||||
|
<span>已完成结构:{{ progress.finishedStructureCount }} / {{ progress.structureCount }}</span>
|
||||||
|
<span>已抓取件数:{{ progress.totalFetchedQuantity }}</span>
|
||||||
|
<span v-if="progress.updateTime">更新时间:{{ formattedUpdateTime }}</span>
|
||||||
|
</div>
|
||||||
|
<div v-if="progress.message || progress.error" class="task-progress-panel__message">
|
||||||
|
{{ progress.error || progress.message }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { computed } from 'vue'
|
||||||
|
|
||||||
|
export interface WaveFetchTaskProgressViewModel {
|
||||||
|
taskId: string
|
||||||
|
status: string
|
||||||
|
warehouseId?: number
|
||||||
|
structureCount: number
|
||||||
|
finishedStructureCount: number
|
||||||
|
progressPercent: number
|
||||||
|
totalFetchedQuantity: number
|
||||||
|
durationMs: number
|
||||||
|
error: string
|
||||||
|
updateTime: string
|
||||||
|
message: string
|
||||||
|
}
|
||||||
|
|
||||||
|
const props = defineProps<{
|
||||||
|
modelValue: boolean
|
||||||
|
progress: WaveFetchTaskProgressViewModel
|
||||||
|
}>()
|
||||||
|
|
||||||
|
const progressPercent = computed(() => {
|
||||||
|
const value = Number(props.progress.progressPercent || 0)
|
||||||
|
if (!Number.isFinite(value)) return 0
|
||||||
|
return Math.min(100, Math.max(0, value))
|
||||||
|
})
|
||||||
|
|
||||||
|
const progressBarStatus = computed(() => {
|
||||||
|
const st = props.progress.status
|
||||||
|
if (st === 'failed' || st === 'not_found') return 'exception'
|
||||||
|
if (st === 'success' || progressPercent.value >= 100) return 'success'
|
||||||
|
return undefined
|
||||||
|
})
|
||||||
|
|
||||||
|
const statusText = computed(() => {
|
||||||
|
const status = props.progress.status
|
||||||
|
const map: Record<string, string> = {
|
||||||
|
submitted: '已受理',
|
||||||
|
running: '进行中',
|
||||||
|
success: '成功',
|
||||||
|
failed: '失败',
|
||||||
|
not_found: '未找到'
|
||||||
|
}
|
||||||
|
return map[status] || status || '—'
|
||||||
|
})
|
||||||
|
|
||||||
|
const formattedUpdateTime = computed(() => formatDateTime(props.progress.updateTime))
|
||||||
|
|
||||||
|
function formatDateTime(value: string | number | null | undefined) {
|
||||||
|
if (!value) return '—'
|
||||||
|
let normalizedValue: string | number = value
|
||||||
|
if (typeof value === 'string' && /^\d+$/.test(value.trim())) {
|
||||||
|
const numericValue = Number(value.trim())
|
||||||
|
normalizedValue = value.trim().length <= 10 ? numericValue * 1000 : numericValue
|
||||||
|
} else if (typeof value === 'number' && Number.isFinite(value) && value > 0 && value < 1000000000000) {
|
||||||
|
normalizedValue = value * 1000
|
||||||
|
}
|
||||||
|
|
||||||
|
const date = new Date(normalizedValue)
|
||||||
|
if (Number.isNaN(date.getTime())) return String(value)
|
||||||
|
const y = date.getFullYear()
|
||||||
|
const m = String(date.getMonth() + 1).padStart(2, '0')
|
||||||
|
const d = String(date.getDate()).padStart(2, '0')
|
||||||
|
const hh = String(date.getHours()).padStart(2, '0')
|
||||||
|
const mm = String(date.getMinutes()).padStart(2, '0')
|
||||||
|
const ss = String(date.getSeconds()).padStart(2, '0')
|
||||||
|
return `${y}-${m}-${d} ${hh}:${mm}:${ss}`
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.task-progress-panel {
|
||||||
|
padding: 4px 0 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-progress-panel__header {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
align-items: center;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
gap: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-progress-panel__meta {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #909399;
|
||||||
|
word-break: break-all;
|
||||||
|
text-align: right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-progress-panel__info {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 12px;
|
||||||
|
margin-top: 8px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
|
|
||||||
|
.task-progress-panel__message {
|
||||||
|
margin-top: 6px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #606266;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -25,7 +25,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, watch, onMounted, computed, markRaw } from 'vue'
|
import { ref, watch, computed, markRaw } from 'vue'
|
||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { useSettingsStore } from '@/stores/modules/settings'
|
import { useSettingsStore } from '@/stores/modules/settings'
|
||||||
import GroupWave from './groupWave.vue'
|
import GroupWave from './groupWave.vue'
|
||||||
@ -52,14 +52,25 @@ const tabs = ref<WaveTabItem[]>([
|
|||||||
{ name: 'sandanWave', label: '散单波次', component: markRaw(SandanWave) }
|
{ name: 'sandanWave', label: '散单波次', component: markRaw(SandanWave) }
|
||||||
])
|
])
|
||||||
|
|
||||||
const initFromRoute = () => {
|
/**
|
||||||
const tabFromUrl = route.query.tab as string
|
* 同步地址栏 tab 与当前页签。
|
||||||
const validTabs = tabs.value.map((t) => t.name)
|
* 注意:布局层 AppMain 使用 route.fullPath 作为 router-view 的 key,
|
||||||
if (tabFromUrl && validTabs.includes(tabFromUrl)) {
|
* 若在「无 tab 参数」的首屏强制 router.replace 补上 ?tab=,会改变 fullPath 导致整页销毁重建,
|
||||||
activeTab.value = tabFromUrl
|
* WaveBatchListPanel 等子组件会挂载两次并重复请求。缺省团购页签时只更新本地 activeTab,不写回路由。
|
||||||
} else {
|
*/
|
||||||
|
watch(
|
||||||
|
() => route.query.tab,
|
||||||
|
(newTab) => {
|
||||||
|
const validTabs = tabs.value.map((t) => t.name)
|
||||||
|
const raw = newTab === undefined || newTab === null ? '' : String(newTab).trim()
|
||||||
|
|
||||||
|
if (raw && validTabs.includes(raw)) {
|
||||||
|
activeTab.value = raw
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
activeTab.value = 'groupWave'
|
activeTab.value = 'groupWave'
|
||||||
if (!route.query.tab || !validTabs.includes(tabFromUrl)) {
|
if (raw && !validTabs.includes(raw)) {
|
||||||
router.replace({
|
router.replace({
|
||||||
query: {
|
query: {
|
||||||
...route.query,
|
...route.query,
|
||||||
@ -67,34 +78,10 @@ const initFromRoute = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
watch(
|
|
||||||
() => route.query.tab,
|
|
||||||
(newTab) => {
|
|
||||||
const validTabs = tabs.value.map((t) => t.name)
|
|
||||||
if (newTab && validTabs.includes(newTab as string)) {
|
|
||||||
activeTab.value = newTab as string
|
|
||||||
} else {
|
|
||||||
activeTab.value = 'groupWave'
|
|
||||||
if (!newTab || !validTabs.includes(newTab as string)) {
|
|
||||||
router.replace({
|
|
||||||
query: {
|
|
||||||
...route.query,
|
|
||||||
tab: 'groupWave'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{ immediate: true }
|
{ immediate: true }
|
||||||
)
|
)
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
initFromRoute()
|
|
||||||
})
|
|
||||||
|
|
||||||
const handleTabChange = (tabName: string | number) => {
|
const handleTabChange = (tabName: string | number) => {
|
||||||
safeInvoke(() => {
|
safeInvoke(() => {
|
||||||
const name = String(tabName)
|
const name = String(tabName)
|
||||||
|
|||||||
@ -718,6 +718,7 @@
|
|||||||
align-center
|
align-center
|
||||||
@close="resetAdjustBalanceDialog"
|
@close="resetAdjustBalanceDialog"
|
||||||
>
|
>
|
||||||
|
<div v-loading="adjustBalanceDialog.fetchLoading">
|
||||||
<el-form
|
<el-form
|
||||||
:model="adjustBalanceForm"
|
:model="adjustBalanceForm"
|
||||||
label-width="120px"
|
label-width="120px"
|
||||||
@ -730,13 +731,25 @@
|
|||||||
:prop="item.prop"
|
:prop="item.prop"
|
||||||
:rules="item.rules"
|
:rules="item.rules"
|
||||||
>
|
>
|
||||||
<el-input-number
|
<span
|
||||||
v-if="item.type === 'number'"
|
v-if="item.type === 'display'"
|
||||||
v-model="adjustBalanceForm[item.prop]"
|
class="adjust-balance-display-value"
|
||||||
:placeholder="item.placeholder"
|
>{{ formatAdjustBalanceDisplayQty(adjustBalanceForm[item.prop]) }}</span>
|
||||||
:style="{ width: '100%' }"
|
<div v-else-if="item.type === 'number'" class="adjust-balance-number-field">
|
||||||
controls-position="right"
|
<el-input-number
|
||||||
/>
|
v-model="adjustBalanceForm[item.prop]"
|
||||||
|
:placeholder="item.placeholder"
|
||||||
|
:style="{ width: '100%' }"
|
||||||
|
controls-position="right"
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
v-if="item.prop === 'target_quantity' && adjustBalanceDeltaHint.text"
|
||||||
|
class="adjust-balance-delta-hint"
|
||||||
|
:class="`is-${adjustBalanceDeltaHint.kind}`"
|
||||||
|
>
|
||||||
|
{{ adjustBalanceDeltaHint.text }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
<el-input
|
<el-input
|
||||||
v-else-if="item.type === 'textarea'"
|
v-else-if="item.type === 'textarea'"
|
||||||
v-model="adjustBalanceForm[item.prop]"
|
v-model="adjustBalanceForm[item.prop]"
|
||||||
@ -753,12 +766,14 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
</div>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="adjustBalanceDialog.visible = false">取消</el-button>
|
<el-button @click="adjustBalanceDialog.visible = false">取消</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
:loading="adjustBalanceDialog.loading"
|
:loading="adjustBalanceDialog.loading"
|
||||||
|
:disabled="adjustBalanceDialog.fetchLoading"
|
||||||
@click="submitAdjustBalance"
|
@click="submitAdjustBalance"
|
||||||
>
|
>
|
||||||
确认设置
|
确认设置
|
||||||
@ -776,7 +791,7 @@ import { storeWarehouseList, storeWarehouseSign, storeWarehouseUnbind,
|
|||||||
storeWarehouseRename, storeWarehouseGetPolicyConfig, storeWarehouseGetPolicyConfigFields,
|
storeWarehouseRename, storeWarehouseGetPolicyConfig, storeWarehouseGetPolicyConfigFields,
|
||||||
storeWarehouseSavePolicyConfig, saveApiConfig, storeWarehouseDeleteQimenConfig,
|
storeWarehouseSavePolicyConfig, saveApiConfig, storeWarehouseDeleteQimenConfig,
|
||||||
storeWarehouseAdjustPrintQuantity, listApiConfig
|
storeWarehouseAdjustPrintQuantity, listApiConfig
|
||||||
} from '@/api/storeWarehouse.store/storeWarehouse'
|
} from '@/api/storewarehouse.store/storeWarehouse'
|
||||||
import { listInterfaceTypes, getExpressList, getPlatformList } from '@/api/index/index'
|
import { listInterfaceTypes, getExpressList, getPlatformList } from '@/api/index/index'
|
||||||
import ScanBox from '@/components/ScanBox/index.vue'
|
import ScanBox from '@/components/ScanBox/index.vue'
|
||||||
import UpperTable from '@/components/UpperTable/index.vue'
|
import UpperTable from '@/components/UpperTable/index.vue'
|
||||||
@ -1295,14 +1310,132 @@ const qimenForm = reactive<Record<string, any>>({ ...qimenFormDefault })
|
|||||||
const adjustBalanceDialog = reactive({ ...adjustBalanceDialogDefault })
|
const adjustBalanceDialog = reactive({ ...adjustBalanceDialogDefault })
|
||||||
const adjustBalanceForm = reactive<Record<string, any>>({ ...adjustBalanceFormDefault })
|
const adjustBalanceForm = reactive<Record<string, any>>({ ...adjustBalanceFormDefault })
|
||||||
|
|
||||||
function openAdjustBalanceDialog(row: any) {
|
/** 目标余额相对当前余额的增减提示 */
|
||||||
|
const adjustBalanceDeltaHint = computed(() => {
|
||||||
|
if (adjustBalanceDialog.fetchLoading) {
|
||||||
|
return { text: '', kind: 'neutral' as const }
|
||||||
|
}
|
||||||
|
const curN = parsePrintQuantity(adjustBalanceForm.current_print_quantity)
|
||||||
|
const tgtRaw = adjustBalanceForm.target_quantity
|
||||||
|
const tgtN = parsePrintQuantity(tgtRaw)
|
||||||
|
if (tgtRaw === undefined || tgtRaw === null || tgtRaw === '') {
|
||||||
|
return { text: '', kind: 'neutral' as const }
|
||||||
|
}
|
||||||
|
if (tgtN === undefined) {
|
||||||
|
return { text: '', kind: 'neutral' as const }
|
||||||
|
}
|
||||||
|
if (curN === undefined) {
|
||||||
|
return {
|
||||||
|
text: '提交后将把面单余额覆盖为上述目标值(当前余额未加载,无法计算增减)',
|
||||||
|
kind: 'neutral' as const
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const delta = tgtN - curN
|
||||||
|
if (delta === 0) {
|
||||||
|
return { text: '与当前面单余额一致,无增减', kind: 'same' as const }
|
||||||
|
}
|
||||||
|
if (delta > 0) {
|
||||||
|
return { text: `相对当前余额将增加 ${delta}`, kind: 'up' as const }
|
||||||
|
}
|
||||||
|
return { text: `相对当前余额将减少 ${Math.abs(delta)}`, kind: 'down' as const }
|
||||||
|
})
|
||||||
|
|
||||||
|
function formatAdjustBalanceDisplayQty(value: unknown) {
|
||||||
|
if (value === null || value === undefined || value === '') {
|
||||||
|
return '—'
|
||||||
|
}
|
||||||
|
const n = Number(value)
|
||||||
|
return Number.isFinite(n) ? String(n) : '—'
|
||||||
|
}
|
||||||
|
|
||||||
|
function parsePrintQuantity(value: unknown): number | undefined {
|
||||||
|
if (value === null || value === undefined || value === '') {
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
const n = Number(value)
|
||||||
|
return Number.isFinite(n) ? n : undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 调用 storeWarehouse.store.list,按签约 id 拉取最新一行(含 print_quantity) */
|
||||||
|
async function fetchLatestContractRowById(contractId: number): Promise<any | null> {
|
||||||
|
const filterAttempts: Record<string, unknown>[] = [
|
||||||
|
{
|
||||||
|
...currentCondition.value,
|
||||||
|
...(queryForm.keyword ? { keyword: queryForm.keyword } : {})
|
||||||
|
},
|
||||||
|
{}
|
||||||
|
]
|
||||||
|
|
||||||
|
const pageSize = 200
|
||||||
|
const maxPages = 40
|
||||||
|
|
||||||
|
for (const filters of filterAttempts) {
|
||||||
|
let page = 1
|
||||||
|
while (page <= maxPages) {
|
||||||
|
const res = (await storeWarehouseList({
|
||||||
|
page,
|
||||||
|
page_size: pageSize,
|
||||||
|
...filters
|
||||||
|
} as any)) as any
|
||||||
|
const payload = res?.data
|
||||||
|
const rows = Array.isArray(payload?.list) ? payload.list : []
|
||||||
|
|
||||||
|
const hit = rows.find((r: any) => Number(r?.id) === Number(contractId))
|
||||||
|
if (hit) {
|
||||||
|
return hit
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rows.length === 0) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
const reportedTotal = Number(payload?.pagination?.total ?? payload?.total)
|
||||||
|
const noMore =
|
||||||
|
rows.length < pageSize ||
|
||||||
|
(Number.isFinite(reportedTotal) && page * pageSize >= reportedTotal)
|
||||||
|
if (noMore) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
page += 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
async function openAdjustBalanceDialog(row: any) {
|
||||||
adjustBalanceDialog.contractRow = row
|
adjustBalanceDialog.contractRow = row
|
||||||
Object.assign(adjustBalanceForm, adjustBalanceFormDefault)
|
|
||||||
adjustBalanceDialog.visible = true
|
adjustBalanceDialog.visible = true
|
||||||
|
adjustBalanceDialog.fetchLoading = true
|
||||||
|
Object.assign(adjustBalanceForm, adjustBalanceFormDefault)
|
||||||
|
|
||||||
|
try {
|
||||||
|
const fresh = await fetchLatestContractRowById(Number(row.id))
|
||||||
|
if (fresh) {
|
||||||
|
adjustBalanceDialog.contractRow = fresh
|
||||||
|
const pq = parsePrintQuantity(fresh.print_quantity)
|
||||||
|
adjustBalanceForm.current_print_quantity = pq
|
||||||
|
adjustBalanceForm.target_quantity = pq
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('未能从列表接口获取该签约的最新数据,已使用表格当前行数据')
|
||||||
|
const pq = parsePrintQuantity(row.print_quantity)
|
||||||
|
adjustBalanceForm.current_print_quantity = pq
|
||||||
|
adjustBalanceForm.target_quantity = pq
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
ElMessage.error('获取最新面单余额失败')
|
||||||
|
const pq = parsePrintQuantity(row.print_quantity)
|
||||||
|
adjustBalanceForm.current_print_quantity = pq
|
||||||
|
adjustBalanceForm.target_quantity = pq
|
||||||
|
} finally {
|
||||||
|
adjustBalanceDialog.fetchLoading = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function resetAdjustBalanceDialog() {
|
function resetAdjustBalanceDialog() {
|
||||||
adjustBalanceDialog.contractRow = null
|
adjustBalanceDialog.contractRow = null
|
||||||
|
adjustBalanceDialog.fetchLoading = false
|
||||||
Object.assign(adjustBalanceForm, adjustBalanceFormDefault)
|
Object.assign(adjustBalanceForm, adjustBalanceFormDefault)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1678,4 +1811,36 @@ onMounted(loadList)
|
|||||||
:deep(.is-error-textarea .el-textarea__inner) {
|
:deep(.is-error-textarea .el-textarea__inner) {
|
||||||
border-color: #f56c6c;
|
border-color: #f56c6c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.adjust-balance-display-value {
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 32px;
|
||||||
|
color: var(--el-text-color-primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.adjust-balance-number-field {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.adjust-balance-delta-hint {
|
||||||
|
margin-top: 8px;
|
||||||
|
font-size: 13px;
|
||||||
|
line-height: 1.45;
|
||||||
|
|
||||||
|
&.is-up {
|
||||||
|
color: var(--el-color-success);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-down {
|
||||||
|
color: var(--el-color-danger);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-same {
|
||||||
|
color: var(--el-text-color-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-neutral {
|
||||||
|
color: var(--el-text-color-secondary);
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@ -40,11 +40,14 @@ export const qimenFormDefault = {
|
|||||||
export const adjustBalanceDialogDefault = {
|
export const adjustBalanceDialogDefault = {
|
||||||
visible: false,
|
visible: false,
|
||||||
loading: false,
|
loading: false,
|
||||||
|
fetchLoading: false,
|
||||||
contractRow: null as any
|
contractRow: null as any
|
||||||
}
|
}
|
||||||
|
|
||||||
// 面单余额调整表单默认配置
|
// 面单余额调整表单默认配置
|
||||||
export const adjustBalanceFormDefault = {
|
export const adjustBalanceFormDefault = {
|
||||||
|
/** 列表接口返回的最新面单余额(只读展示) */
|
||||||
|
current_print_quantity: undefined as number | undefined,
|
||||||
target_quantity: undefined as number | undefined,
|
target_quantity: undefined as number | undefined,
|
||||||
reason: ''
|
reason: ''
|
||||||
}
|
}
|
||||||
@ -70,6 +73,12 @@ export const qimenFormItems = [
|
|||||||
|
|
||||||
// 面单余额调整表单项配置
|
// 面单余额调整表单项配置
|
||||||
export const adjustBalanceFormItems = [
|
export const adjustBalanceFormItems = [
|
||||||
|
{
|
||||||
|
label: '当前面单余额',
|
||||||
|
prop: 'current_print_quantity',
|
||||||
|
type: 'display',
|
||||||
|
span: 24
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: '目标余额',
|
label: '目标余额',
|
||||||
prop: 'target_quantity',
|
prop: 'target_quantity',
|
||||||
|
|||||||
560
src/views/system/setting/basicManagement/index.vue
Normal file
560
src/views/system/setting/basicManagement/index.vue
Normal file
@ -0,0 +1,560 @@
|
|||||||
|
<template>
|
||||||
|
<div class="warehouse-settings-page app-container">
|
||||||
|
<el-card shadow="never" class="settings-card" v-loading="pageLoading">
|
||||||
|
<template #header>
|
||||||
|
<div class="card-header">
|
||||||
|
<div class="header-text">
|
||||||
|
<span class="title">仓库设置</span>
|
||||||
|
<span v-if="warehouseId != null" class="sub">当前仓库 ID:{{ warehouseId }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="header-actions">
|
||||||
|
<el-button :loading="pageLoading" @click="loadAll">刷新</el-button>
|
||||||
|
<el-button type="primary" :loading="saving" @click="handleSave">保存</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<el-alert
|
||||||
|
v-if="loadError"
|
||||||
|
type="error"
|
||||||
|
:closable="false"
|
||||||
|
show-icon
|
||||||
|
class="mb-16"
|
||||||
|
:title="loadError"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-tabs v-model="activeTab" class="settings-tabs">
|
||||||
|
<el-tab-pane label="配置表单" name="form">
|
||||||
|
<!-- <p v-if="useMetaForm && normalizedFields.length" class="hint">
|
||||||
|
以下字段来自接口 <code>setting.warehouse.getFieldMeta</code>,修改后点击右上角保存,将调用
|
||||||
|
<code>setting.warehouse.saveSettings</code>。
|
||||||
|
</p>
|
||||||
|
<p v-else-if="!useMetaForm" class="hint">
|
||||||
|
未获取到字段元信息,已使用常用 <code>subject_config</code> 项作为表单;保存仍写入完整配置对象。
|
||||||
|
</p> -->
|
||||||
|
|
||||||
|
<el-form label-width="200px" label-position="right" class="settings-form">
|
||||||
|
<template v-if="displayFields.length">
|
||||||
|
<el-form-item
|
||||||
|
v-for="field in displayFields"
|
||||||
|
:key="field.key"
|
||||||
|
:required="field.required"
|
||||||
|
>
|
||||||
|
<template #label>
|
||||||
|
<span :title="field.description">{{ field.label }}</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<div class="field-block">
|
||||||
|
<el-switch
|
||||||
|
v-if="field.type === 'boolean'"
|
||||||
|
v-model="subjectConfig[field.key]"
|
||||||
|
:active-value="true"
|
||||||
|
:inactive-value="false"
|
||||||
|
/>
|
||||||
|
<el-select
|
||||||
|
v-else-if="field.type === 'select'"
|
||||||
|
v-model="subjectConfig[field.key]"
|
||||||
|
clearable
|
||||||
|
filterable
|
||||||
|
class="field-control"
|
||||||
|
placeholder="请选择"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="opt in field.options || []"
|
||||||
|
:key="String(opt.value)"
|
||||||
|
:label="opt.label"
|
||||||
|
:value="opt.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
<el-input-number
|
||||||
|
v-else-if="field.type === 'number'"
|
||||||
|
v-model="subjectConfig[field.key] as number | undefined"
|
||||||
|
class="field-control"
|
||||||
|
:min="field.min"
|
||||||
|
:max="field.max"
|
||||||
|
:step="field.step ?? 1"
|
||||||
|
:precision="field.precision"
|
||||||
|
controls-position="right"
|
||||||
|
placeholder="未设置则留空"
|
||||||
|
/>
|
||||||
|
<el-input
|
||||||
|
v-else
|
||||||
|
v-model="subjectConfig[field.key] as string"
|
||||||
|
class="field-control"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入"
|
||||||
|
:maxlength="field.maxLength"
|
||||||
|
:show-word-limit="Boolean(field.maxLength)"
|
||||||
|
/>
|
||||||
|
<div v-if="field.description" class="field-desc">{{ field.description }}</div>
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<el-empty v-else description="暂无可编辑字段,请尝试 JSON 页签或检查接口返回" />
|
||||||
|
</el-form>
|
||||||
|
</el-tab-pane>
|
||||||
|
|
||||||
|
<!-- <el-tab-pane label="JSON 编辑" name="json">
|
||||||
|
<p class="hint">
|
||||||
|
直接编辑 <code>subject_config</code> 完整 JSON。保存前会校验格式;与表单页签共用同一份数据。
|
||||||
|
</p>
|
||||||
|
<el-input
|
||||||
|
v-model="jsonText"
|
||||||
|
type="textarea"
|
||||||
|
:rows="18"
|
||||||
|
class="json-editor"
|
||||||
|
placeholder='例如:{ "max_wave_quantity": 500 }'
|
||||||
|
spellcheck="false"
|
||||||
|
/>
|
||||||
|
<div class="json-actions">
|
||||||
|
<el-button @click="syncJsonFromModel">从当前表单同步到 JSON</el-button>
|
||||||
|
<el-button type="primary" plain @click="applyJsonToModel">应用 JSON 到表单</el-button>
|
||||||
|
</div>
|
||||||
|
</el-tab-pane>
|
||||||
|
|
||||||
|
<el-tab-pane label="保存选项" name="cache">
|
||||||
|
<el-form label-width="220px" class="settings-form">
|
||||||
|
<el-form-item label="清理缓存的仓库 ID">
|
||||||
|
<el-input-number
|
||||||
|
v-model="cacheWarehouseId"
|
||||||
|
:min="1"
|
||||||
|
:precision="0"
|
||||||
|
controls-position="right"
|
||||||
|
placeholder="可选,默认当前仓库"
|
||||||
|
class="field-control-narrow"
|
||||||
|
/>
|
||||||
|
<div class="field-desc">
|
||||||
|
对应参数 <code>cache_warehouse_id</code> / <code>cacheWarehouseId</code>;与接口说明一致,用于保存后清理指定仓库缓存。
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</el-tab-pane> -->
|
||||||
|
</el-tabs>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { computed, reactive, ref, watch } from 'vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import {
|
||||||
|
settingWarehouseGetSettings,
|
||||||
|
settingWarehouseGetFieldMeta,
|
||||||
|
settingWarehouseSaveSettings
|
||||||
|
} from '@/api/setting.warehouse/settingwarehouse'
|
||||||
|
|
||||||
|
const okCode = (code: unknown) => code === 1 || code === 200 || code === 0
|
||||||
|
|
||||||
|
type NormalizedField = {
|
||||||
|
key: string
|
||||||
|
label: string
|
||||||
|
type: 'number' | 'string' | 'boolean' | 'select'
|
||||||
|
description?: string
|
||||||
|
required?: boolean
|
||||||
|
min?: number
|
||||||
|
max?: number
|
||||||
|
step?: number
|
||||||
|
precision?: number
|
||||||
|
maxLength?: number
|
||||||
|
options?: { label: string; value: string | number | boolean }[]
|
||||||
|
}
|
||||||
|
|
||||||
|
const FALLBACK_FIELDS: NormalizedField[] = [
|
||||||
|
{
|
||||||
|
key: 'max_wave_quantity',
|
||||||
|
label: '波次最大订单数',
|
||||||
|
type: 'number',
|
||||||
|
min: 1,
|
||||||
|
precision: 0,
|
||||||
|
description: '自动加团等场景会跳过订单数已达该上限的波次(与波次模块逻辑一致)。'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'min_group_order_fetch_quantity',
|
||||||
|
label: '团购判定最小同组订单数',
|
||||||
|
type: 'number',
|
||||||
|
min: 1,
|
||||||
|
precision: 0,
|
||||||
|
description: '抓取团购/散单分组阈值,未配置时后端常用默认值 13。'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'max_notice_webhook_count',
|
||||||
|
label: 'Webhook 通知上限',
|
||||||
|
type: 'number',
|
||||||
|
min: 0,
|
||||||
|
precision: 0
|
||||||
|
},
|
||||||
|
{ key: 'default_express_code', label: '默认快递编码', type: 'string' },
|
||||||
|
{ key: 'default_platform_code', label: '默认平台编码', type: 'string' },
|
||||||
|
{ key: 'group_wave_prefix', label: '团购波次号前缀', type: 'string' }
|
||||||
|
]
|
||||||
|
|
||||||
|
function pickStr(obj: Record<string, unknown>, keys: string[]): string | undefined {
|
||||||
|
for (const k of keys) {
|
||||||
|
const v = obj[k]
|
||||||
|
if (v !== undefined && v !== null && String(v).trim() !== '') return String(v)
|
||||||
|
}
|
||||||
|
return undefined
|
||||||
|
}
|
||||||
|
|
||||||
|
function parseOptions(raw: unknown): { label: string; value: string | number | boolean }[] {
|
||||||
|
if (!Array.isArray(raw)) return []
|
||||||
|
return raw.map((item) => {
|
||||||
|
if (item !== null && typeof item === 'object') {
|
||||||
|
const o = item as Record<string, unknown>
|
||||||
|
const value = o.value ?? o.key ?? o.id
|
||||||
|
const label = String(o.label ?? o.text ?? o.name ?? value ?? '')
|
||||||
|
return { label, value: value as string | number | boolean }
|
||||||
|
}
|
||||||
|
return { label: String(item), value: item as string | number | boolean }
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalizeFieldMetaItem(raw: Record<string, unknown>): NormalizedField | null {
|
||||||
|
const key = pickStr(raw, ['key', 'field', 'name', 'prop', 'id'])
|
||||||
|
if (!key) return null
|
||||||
|
const label = pickStr(raw, ['label', 'name', 'title', 'displayName']) || key
|
||||||
|
const description = pickStr(raw, ['description', 'desc', 'help', 'remark'])
|
||||||
|
const required = Boolean(raw.required ?? raw.is_required)
|
||||||
|
|
||||||
|
const rawType = String(
|
||||||
|
pickStr(raw, ['type', 'valueType', 'component', 'inputType']) || 'string'
|
||||||
|
).toLowerCase()
|
||||||
|
|
||||||
|
const options = parseOptions(raw.options ?? raw.enum)
|
||||||
|
let type: NormalizedField['type'] = 'string'
|
||||||
|
if (
|
||||||
|
rawType.includes('int') ||
|
||||||
|
rawType.includes('number') ||
|
||||||
|
rawType === 'float' ||
|
||||||
|
rawType === 'decimal'
|
||||||
|
) {
|
||||||
|
type = 'number'
|
||||||
|
} else if (rawType.includes('bool') || rawType === 'switch' || rawType === 'flag') {
|
||||||
|
type = 'boolean'
|
||||||
|
} else if (rawType === 'select' || rawType === 'enum' || options.length > 0) {
|
||||||
|
type = 'select'
|
||||||
|
}
|
||||||
|
|
||||||
|
const toNumber = (v: unknown) => {
|
||||||
|
const n = typeof v === 'number' ? v : Number(v)
|
||||||
|
return Number.isFinite(n) ? n : undefined
|
||||||
|
}
|
||||||
|
const min = toNumber(raw.min)
|
||||||
|
const max = toNumber(raw.max)
|
||||||
|
const step = toNumber(raw.step)
|
||||||
|
const precision = toNumber(raw.precision)
|
||||||
|
const maxLength = toNumber(raw.maxLength ?? raw.max_length)
|
||||||
|
|
||||||
|
return {
|
||||||
|
key,
|
||||||
|
label,
|
||||||
|
type,
|
||||||
|
description,
|
||||||
|
required,
|
||||||
|
min,
|
||||||
|
max,
|
||||||
|
step,
|
||||||
|
precision,
|
||||||
|
maxLength,
|
||||||
|
options: options.length ? options : undefined
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalizeFieldMetaList(list: unknown): NormalizedField[] {
|
||||||
|
if (!Array.isArray(list)) return []
|
||||||
|
const out: NormalizedField[] = []
|
||||||
|
for (const item of list) {
|
||||||
|
if (item && typeof item === 'object') {
|
||||||
|
const n = normalizeFieldMetaItem(item as Record<string, unknown>)
|
||||||
|
if (n) out.push(n)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return out
|
||||||
|
}
|
||||||
|
|
||||||
|
function cloneSubjectConfig(src: unknown): Record<string, unknown> {
|
||||||
|
if (src && typeof src === 'object' && !Array.isArray(src)) {
|
||||||
|
return JSON.parse(JSON.stringify(src))
|
||||||
|
}
|
||||||
|
return {}
|
||||||
|
}
|
||||||
|
|
||||||
|
function ensureFieldDefaults(target: Record<string, unknown>, fields: NormalizedField[]) {
|
||||||
|
for (const f of fields) {
|
||||||
|
if (!(f.key in target)) {
|
||||||
|
if (f.type === 'boolean') target[f.key] = false
|
||||||
|
else if (f.type === 'number') {
|
||||||
|
/* 不写入 key,便于 el-input-number 展示为空 */
|
||||||
|
} else if (f.type === 'select') {
|
||||||
|
/* 不默认选中,避免误保存 */
|
||||||
|
} else target[f.key] = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function unwrapApiPayload(res: Record<string, any> | null | undefined): Record<string, any> {
|
||||||
|
const payload = res?.data
|
||||||
|
if (payload && typeof payload === 'object' && !Array.isArray(payload)) {
|
||||||
|
return payload as Record<string, any>
|
||||||
|
}
|
||||||
|
return (res ?? {}) as Record<string, any>
|
||||||
|
}
|
||||||
|
|
||||||
|
function applySettingsPayload(settingsRes: Record<string, any>) {
|
||||||
|
const wid = settingsRes.warehouse_id
|
||||||
|
warehouseId.value = typeof wid === 'number' ? wid : wid != null ? Number(wid) : null
|
||||||
|
if (!Number.isFinite(warehouseId.value as number)) warehouseId.value = null
|
||||||
|
|
||||||
|
const cfg = cloneSubjectConfig(settingsRes.subject_config)
|
||||||
|
Object.keys(subjectConfig).forEach((k) => delete subjectConfig[k])
|
||||||
|
Object.assign(subjectConfig, cfg)
|
||||||
|
ensureFieldDefaults(subjectConfig, displayFields.value)
|
||||||
|
jsonText.value = JSON.stringify(subjectConfig, null, 2)
|
||||||
|
|
||||||
|
if (warehouseId.value != null) {
|
||||||
|
cacheWarehouseId.value = warehouseId.value
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const pageLoading = ref(false)
|
||||||
|
const saving = ref(false)
|
||||||
|
const loadError = ref('')
|
||||||
|
const warehouseId = ref<number | null>(null)
|
||||||
|
const subjectConfig = reactive<Record<string, unknown>>({})
|
||||||
|
const normalizedFields = ref<NormalizedField[]>([])
|
||||||
|
const useMetaForm = ref(true)
|
||||||
|
const activeTab = ref('form')
|
||||||
|
const cacheWarehouseId = ref<number | undefined>(undefined)
|
||||||
|
|
||||||
|
const jsonText = ref('{}')
|
||||||
|
|
||||||
|
const displayFields = computed(() =>
|
||||||
|
useMetaForm.value && normalizedFields.value.length ? normalizedFields.value : FALLBACK_FIELDS
|
||||||
|
)
|
||||||
|
|
||||||
|
watch(activeTab, (tab) => {
|
||||||
|
if (tab === 'json') {
|
||||||
|
try {
|
||||||
|
jsonText.value = JSON.stringify(subjectConfig, null, 2)
|
||||||
|
} catch {
|
||||||
|
jsonText.value = '{}'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
async function loadAll() {
|
||||||
|
loadError.value = ''
|
||||||
|
pageLoading.value = true
|
||||||
|
try {
|
||||||
|
const [settingsRes, metaRes] = await Promise.all([
|
||||||
|
settingWarehouseGetSettings(),
|
||||||
|
settingWarehouseGetFieldMeta()
|
||||||
|
])
|
||||||
|
|
||||||
|
if (!settingsRes || !okCode(settingsRes.code)) {
|
||||||
|
throw new Error(settingsRes?.message || '获取仓库设置失败(getSettings)')
|
||||||
|
}
|
||||||
|
|
||||||
|
const settingsPayload = unwrapApiPayload(settingsRes as Record<string, any>)
|
||||||
|
applySettingsPayload(settingsPayload)
|
||||||
|
|
||||||
|
const metaPayload = unwrapApiPayload(metaRes as Record<string, any>)
|
||||||
|
const metaList = metaRes && okCode(metaRes.code) ? metaPayload.list : null
|
||||||
|
const parsed = normalizeFieldMetaList(metaList)
|
||||||
|
normalizedFields.value = parsed
|
||||||
|
useMetaForm.value = parsed.length > 0
|
||||||
|
|
||||||
|
ensureFieldDefaults(subjectConfig, displayFields.value)
|
||||||
|
|
||||||
|
if (metaRes && !okCode(metaRes.code)) {
|
||||||
|
ElMessage.warning(metaRes.message || '字段元信息获取失败,已使用默认表单字段')
|
||||||
|
}
|
||||||
|
} catch (e: unknown) {
|
||||||
|
const msg = e instanceof Error ? e.message : '加载失败'
|
||||||
|
loadError.value = msg
|
||||||
|
ElMessage.error(msg)
|
||||||
|
} finally {
|
||||||
|
pageLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function syncJsonFromModel() {
|
||||||
|
jsonText.value = JSON.stringify(subjectConfig, null, 2)
|
||||||
|
ElMessage.success('已同步')
|
||||||
|
}
|
||||||
|
|
||||||
|
function applyJsonToModel() {
|
||||||
|
try {
|
||||||
|
const parsed = JSON.parse(jsonText.value || '{}')
|
||||||
|
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
||||||
|
ElMessage.error('subject_config 必须是 JSON 对象')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
Object.keys(subjectConfig).forEach((k) => delete subjectConfig[k])
|
||||||
|
Object.assign(subjectConfig, parsed as Record<string, unknown>)
|
||||||
|
ensureFieldDefaults(subjectConfig, displayFields.value)
|
||||||
|
ElMessage.success('已应用')
|
||||||
|
} catch {
|
||||||
|
ElMessage.error('JSON 格式不正确')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleSave() {
|
||||||
|
let payloadConfig: Record<string, unknown>
|
||||||
|
|
||||||
|
if (activeTab.value === 'json') {
|
||||||
|
try {
|
||||||
|
payloadConfig = JSON.parse(jsonText.value || '{}')
|
||||||
|
if (payloadConfig === null || typeof payloadConfig !== 'object' || Array.isArray(payloadConfig)) {
|
||||||
|
ElMessage.error('subject_config 必须是 JSON 对象')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
ElMessage.error('JSON 格式不正确,无法保存')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
payloadConfig = { ...subjectConfig }
|
||||||
|
}
|
||||||
|
|
||||||
|
saving.value = true
|
||||||
|
try {
|
||||||
|
const body: Parameters<typeof settingWarehouseSaveSettings>[0] = {
|
||||||
|
subject_config: payloadConfig
|
||||||
|
}
|
||||||
|
if (cacheWarehouseId.value != null && Number.isFinite(cacheWarehouseId.value)) {
|
||||||
|
body.cacheWarehouseId = cacheWarehouseId.value
|
||||||
|
}
|
||||||
|
|
||||||
|
const res = await settingWarehouseSaveSettings(body)
|
||||||
|
if (!res || !okCode(res.code)) {
|
||||||
|
throw new Error(res?.message || '保存失败')
|
||||||
|
}
|
||||||
|
|
||||||
|
ElMessage.success(res.message || '保存成功')
|
||||||
|
|
||||||
|
const latest = await settingWarehouseGetSettings()
|
||||||
|
if (!latest || !okCode(latest.code)) {
|
||||||
|
throw new Error(latest?.message || '保存成功,但刷新最新设置失败(getSettings)')
|
||||||
|
}
|
||||||
|
applySettingsPayload(unwrapApiPayload(latest as Record<string, any>))
|
||||||
|
|
||||||
|
const cleared = res.cache_cleared_warehouse_id
|
||||||
|
if (cleared != null) {
|
||||||
|
ElMessage.info(`已清理仓库缓存:${cleared}`)
|
||||||
|
}
|
||||||
|
} catch (e: unknown) {
|
||||||
|
ElMessage.error(e instanceof Error ? e.message : '保存失败')
|
||||||
|
} finally {
|
||||||
|
saving.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
loadAll()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.warehouse-settings-page {
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-card {
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card-header {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
gap: 12px;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-text {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sub {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #909399;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header-actions {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mb-16 {
|
||||||
|
margin-bottom: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.hint {
|
||||||
|
font-size: 13px;
|
||||||
|
color: #606266;
|
||||||
|
margin: 0 0 16px;
|
||||||
|
line-height: 1.5;
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 1px 6px;
|
||||||
|
background: #f4f4f5;
|
||||||
|
border-radius: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-tabs {
|
||||||
|
margin-top: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-form {
|
||||||
|
max-width: 720px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.field-block {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.field-control {
|
||||||
|
width: 100%;
|
||||||
|
max-width: 420px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.field-control-narrow {
|
||||||
|
width: 220px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.field-desc {
|
||||||
|
margin-top: 6px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #909399;
|
||||||
|
line-height: 1.45;
|
||||||
|
max-width: 520px;
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-size: 11px;
|
||||||
|
padding: 0 4px;
|
||||||
|
background: #f4f4f5;
|
||||||
|
border-radius: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.json-editor {
|
||||||
|
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
||||||
|
monospace;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.json-actions {
|
||||||
|
margin-top: 12px;
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -3,12 +3,145 @@
|
|||||||
{
|
{
|
||||||
"接口": "user.login",
|
"接口": "user.login",
|
||||||
"data": {
|
"data": {
|
||||||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3Nzc4ODU4MjEsImV4cCI6MTc3NzkwMDIyMX0.Q0F2Slir7PDYHsHlcMGWV_BkecHh1HPLBgAvx8KqaQg"
|
"flag": "success",
|
||||||
|
"code": 200,
|
||||||
|
"message": "登录成功",
|
||||||
|
"success": true,
|
||||||
|
"data": {
|
||||||
|
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3NzgwNTgxMTQsImV4cCI6MTc3ODA3MjUxNH0.i_XWXCEuBLQ3o4-AFxznOoUob7PXTf3Vf2i-t6qZTTg"
|
||||||
|
},
|
||||||
|
"timestamp": 1778058114
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"接口": "order.queryOrderLogList",
|
"接口": "setting.warehouse.getSettings",
|
||||||
"data": null
|
"data": {
|
||||||
|
"flag": "success",
|
||||||
|
"code": 1,
|
||||||
|
"message": "ok",
|
||||||
|
"warehouse_id": 100000,
|
||||||
|
"subject_config": {
|
||||||
|
"group_wave_prefix": "B",
|
||||||
|
"max_wave_quantity": 500,
|
||||||
|
"default_express_code": "STO",
|
||||||
|
"auto_grouping_enabled": false,
|
||||||
|
"default_platform_code": "TB",
|
||||||
|
"delete_order_wave_prefix": "A",
|
||||||
|
"max_notice_webhook_count": 5,
|
||||||
|
"min_group_order_fetch_quantity": 13
|
||||||
|
},
|
||||||
|
"timestamp": 1778058114
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"接口": "setting.warehouse.getFieldMeta",
|
||||||
|
"data": {
|
||||||
|
"flag": "success",
|
||||||
|
"code": 1,
|
||||||
|
"message": "ok",
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"key": "max_notice_webhook_count",
|
||||||
|
"name": "最大通知 Webhook 次数",
|
||||||
|
"type": "integer",
|
||||||
|
"default": 5,
|
||||||
|
"required": false,
|
||||||
|
"description": "单次事件最多触发的 Webhook 通知次数(0-5)",
|
||||||
|
"min": 0,
|
||||||
|
"max": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "max_wave_quantity",
|
||||||
|
"name": "仓库波次最大数量限制",
|
||||||
|
"type": "integer",
|
||||||
|
"default": 500,
|
||||||
|
"required": false,
|
||||||
|
"description": "控制单个波次允许的最大订单数量,默认 500",
|
||||||
|
"min": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "min_group_order_fetch_quantity",
|
||||||
|
"name": "最小团购订单抓取数量",
|
||||||
|
"type": "integer",
|
||||||
|
"default": 13,
|
||||||
|
"required": false,
|
||||||
|
"description": "控制团购波次最小抓取订单数量,默认 13",
|
||||||
|
"min": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "default_express_code",
|
||||||
|
"name": "默认快递编码",
|
||||||
|
"type": "string",
|
||||||
|
"default": "STO",
|
||||||
|
"required": false,
|
||||||
|
"description": "仓库默认使用的快递编码",
|
||||||
|
"maxLength": 50
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "default_platform_code",
|
||||||
|
"name": "默认平台编码",
|
||||||
|
"type": "string",
|
||||||
|
"default": "TB",
|
||||||
|
"required": false,
|
||||||
|
"description": "仓库默认使用的平台编码",
|
||||||
|
"maxLength": 50
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "group_wave_prefix",
|
||||||
|
"name": "团购波次前缀",
|
||||||
|
"type": "string",
|
||||||
|
"default": "B",
|
||||||
|
"required": false,
|
||||||
|
"description": "团购波次编号前缀,最多 5 个字符,默认 B",
|
||||||
|
"maxLength": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "delete_order_wave_prefix",
|
||||||
|
"name": "删单波次前缀",
|
||||||
|
"type": "string",
|
||||||
|
"default": "A",
|
||||||
|
"required": false,
|
||||||
|
"description": "删单波次编号前缀,最多 5 个字符,默认 A",
|
||||||
|
"maxLength": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "webhook_enabled",
|
||||||
|
"name": "是否启用 Webhook",
|
||||||
|
"type": "flag",
|
||||||
|
"default": false,
|
||||||
|
"required": false,
|
||||||
|
"description": "控制仓库是否启用 Webhook 事件推送"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "callback_strategy",
|
||||||
|
"name": "回调策略",
|
||||||
|
"type": "enum",
|
||||||
|
"default": "async",
|
||||||
|
"required": false,
|
||||||
|
"description": "仓库 Webhook 事件的回调执行策略",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"value": "sync",
|
||||||
|
"label": "同步回调"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "async",
|
||||||
|
"label": "异步回调"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 1778058114
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"接口": "setting.warehouse.saveSettings",
|
||||||
|
"data": {
|
||||||
|
"flag": "failure",
|
||||||
|
"code": 400,
|
||||||
|
"message": "subject_config 参数不能为空且必须是对象",
|
||||||
|
"timestamp": 1778058114
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
```
|
```
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
# 接口
|
# 接口
|
||||||
|
|
||||||
- 更新时间: 2026-05-05 17:30:32
|
- 更新时间: 2026-05-06 15:05:40
|
||||||
- 扫描目录: `src\api`
|
- 扫描目录: `src\api`
|
||||||
- 模块数: 34
|
- 模块数: 34
|
||||||
- API 文件数: 34
|
- API 文件数: 34
|
||||||
- 接口数: 260
|
- 接口数: 268
|
||||||
- 已启用: 230
|
- 已启用: 238
|
||||||
- 占位接口: 2
|
- 占位接口: 2
|
||||||
|
|
||||||
## 模块统计
|
## 模块统计
|
||||||
@ -25,7 +25,7 @@
|
|||||||
| order.pendingorder | 1 | 16 | 16 | 0 |
|
| order.pendingorder | 1 | 16 | 16 | 0 |
|
||||||
| order.print | 1 | 1 | 1 | 0 |
|
| order.print | 1 | 1 | 1 | 0 |
|
||||||
| order.revieworder | 1 | 3 | 3 | 0 |
|
| order.revieworder | 1 | 3 | 3 | 0 |
|
||||||
| order.wave | 1 | 9 | 9 | 0 |
|
| order.wave | 1 | 17 | 17 | 0 |
|
||||||
| pick | 1 | 1 | 1 | 0 |
|
| pick | 1 | 1 | 1 | 0 |
|
||||||
| print | 1 | 13 | 12 | 1 |
|
| print | 1 | 13 | 12 | 1 |
|
||||||
| printer.station | 1 | 11 | 1 | 0 |
|
| printer.station | 1 | 11 | 1 | 0 |
|
||||||
@ -116,14 +116,22 @@
|
|||||||
| order.revieworder | orderReviewOrderDetail | order.reviewOrder.detail | POST | 是 | 否 | order.revieworder/orderreviewOrder.ts | |
|
| order.revieworder | orderReviewOrderDetail | order.reviewOrder.detail | POST | 是 | 否 | order.revieworder/orderreviewOrder.ts | |
|
||||||
| order.revieworder | orderReviewOrderList | order.reviewOrder.list | POST | 是 | 否 | order.revieworder/orderreviewOrder.ts | |
|
| order.revieworder | orderReviewOrderList | order.reviewOrder.list | POST | 是 | 否 | order.revieworder/orderreviewOrder.ts | |
|
||||||
| order.revieworder | orderReviewOrderReviewOrder | order.reviewOrder.reviewOrder | POST | 是 | 否 | order.revieworder/orderreviewOrder.ts | |
|
| order.revieworder | orderReviewOrderReviewOrder | order.reviewOrder.reviewOrder | POST | 是 | 否 | order.revieworder/orderreviewOrder.ts | |
|
||||||
|
| order.wave | orderWaveBatchAllocateExpress | order.wave.batchAllocateExpress | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
|
| order.wave | orderWaveBatchAllocateExpressTaskProgress | order.wave.batchAllocateExpressTaskProgress | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
|
| order.wave | orderWaveBatchAllocateStorage | order.wave.batchAllocateStorage | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
|
| order.wave | orderWaveBatchAllocateStorageTaskProgress | order.wave.batchAllocateStorageTaskProgress | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
| order.wave | orderWaveBatchAutoGrouping | order.wave.batchAutoGrouping | POST | 是 | 否 | order.wave/orderwave.ts | |
|
| order.wave | orderWaveBatchAutoGrouping | order.wave.batchAutoGrouping | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
| order.wave | orderWaveBatchCancel | order.wave.batchCancel | POST | 是 | 否 | order.wave/orderwave.ts | |
|
| order.wave | orderWaveBatchCancel | order.wave.batchCancel | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
|
| order.wave | orderWaveBatchCancelTaskProgress | order.wave.batchCancelTaskProgress | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
| order.wave | orderWaveBatchFinishAutoGrouping | order.wave.batchFinishAutoGrouping | POST | 是 | 否 | order.wave/orderwave.ts | |
|
| order.wave | orderWaveBatchFinishAutoGrouping | order.wave.batchFinishAutoGrouping | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
| order.wave | orderWaveBatchList | order.wave.batchList | POST | 是 | 否 | order.wave/orderwave.ts | |
|
| order.wave | orderWaveBatchList | order.wave.batchList | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
|
| order.wave | orderWaveBatchRemoveExceptionOrders | order.wave.batchRemoveExceptionOrders | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
|
| order.wave | orderWaveBatchRemoveExceptionOrdersTaskProgress | order.wave.batchRemoveExceptionOrdersTaskProgress | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
| order.wave | orderWaveBatchRemoveOrders | order.wave.batchRemoveOrders | POST | 是 | 否 | order.wave/orderwave.ts | |
|
| order.wave | orderWaveBatchRemoveOrders | order.wave.batchRemoveOrders | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
| order.wave | orderWaveFetch | order.wave.fetch | POST | 是 | 否 | order.wave/orderwave.ts | |
|
| order.wave | orderWaveFetch | order.wave.fetch | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
| order.wave | orderWaveFetchTaskProgress | order.wave.fetchTaskProgress | POST | 是 | 否 | order.wave/orderwave.ts | |
|
| order.wave | orderWaveFetchTaskProgress | order.wave.fetchTaskProgress | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
| order.wave | orderWaveGroupOrderFetchList | order.wave.groupOrderFetchList | POST | 是 | 否 | order.wave/orderwave.ts | |
|
| order.wave | orderWaveGroupOrderFetchList | order.wave.groupOrderFetchList | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
|
| order.wave | orderWaveSingleFetchByIds | order.wave.singleFetchByIds | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
| order.wave | orderWaveSingleOrderFetchList | order.wave.singleOrderFetchList | POST | 是 | 否 | order.wave/orderwave.ts | |
|
| order.wave | orderWaveSingleOrderFetchList | order.wave.singleOrderFetchList | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||||
| pick | pickQuery | pick.query | POST | 是 | 否 | pick/pick.ts | |
|
| pick | pickQuery | pick.query | POST | 是 | 否 | pick/pick.ts | |
|
||||||
| print | getExpressList | index.getExpressList | POST | 否 | 否 | print/print.ts | |
|
| print | getExpressList | index.getExpressList | POST | 否 | 否 | print/print.ts | |
|
||||||
|
|||||||
@ -8,16 +8,15 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "",
|
"method": "setting.warehouse.getSettings",
|
||||||
"body": {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "",
|
|
||||||
"body": {}
|
"body": {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "",
|
"method": "setting.warehouse.getFieldMeta",
|
||||||
|
"body": {}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "setting.warehouse.saveSettings",
|
||||||
"body": {}
|
"body": {}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"数据一览": {
|
"数据一览": {
|
||||||
"当前请求数": 2,
|
"当前请求数": 4,
|
||||||
"成功数": 2,
|
"成功数": 3,
|
||||||
"全部请求数": 2,
|
"全部请求数": 4,
|
||||||
"成功数与全部请求数": "2/2",
|
"成功数与全部请求数": "3/4",
|
||||||
"成功判定名单": [
|
"成功判定名单": [
|
||||||
"ok",
|
"ok",
|
||||||
"成功",
|
"成功",
|
||||||
@ -12,7 +12,22 @@
|
|||||||
"查询成功",
|
"查询成功",
|
||||||
"获取成功"
|
"获取成功"
|
||||||
],
|
],
|
||||||
"失败接口": [],
|
"失败接口": [
|
||||||
|
{
|
||||||
|
"接口": "setting.warehouse.saveSettings",
|
||||||
|
"message": "subject_config 参数不能为空且必须是对象",
|
||||||
|
"code": 400,
|
||||||
|
"模块目录": "setting.warehouse",
|
||||||
|
"api封装": [
|
||||||
|
{
|
||||||
|
"文件": "src/api/setting.warehouse/settingwarehouse.ts",
|
||||||
|
"方法名": "settingWarehouse.saveSettings",
|
||||||
|
"说明": "聚合对象方法"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"引用页面": []
|
||||||
|
}
|
||||||
|
],
|
||||||
"空数据接口": []
|
"空数据接口": []
|
||||||
},
|
},
|
||||||
"详情": [
|
"详情": [
|
||||||
@ -21,14 +36,151 @@
|
|||||||
"message": "登录成功",
|
"message": "登录成功",
|
||||||
"code": 200,
|
"code": 200,
|
||||||
"data": {
|
"data": {
|
||||||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3Nzc4ODU4MjEsImV4cCI6MTc3NzkwMDIyMX0.Q0F2Slir7PDYHsHlcMGWV_BkecHh1HPLBgAvx8KqaQg"
|
"flag": "success",
|
||||||
|
"code": 200,
|
||||||
|
"message": "登录成功",
|
||||||
|
"success": true,
|
||||||
|
"data": {
|
||||||
|
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3NzgwNTgxMTQsImV4cCI6MTc3ODA3MjUxNH0.i_XWXCEuBLQ3o4-AFxznOoUob7PXTf3Vf2i-t6qZTTg"
|
||||||
|
},
|
||||||
|
"timestamp": 1778058114
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"接口": "order.queryOrderLogList",
|
"接口": "setting.warehouse.getSettings",
|
||||||
"message": "ok",
|
"message": "ok",
|
||||||
"code": 200,
|
"code": 1,
|
||||||
"data": null
|
"data": {
|
||||||
|
"flag": "success",
|
||||||
|
"code": 1,
|
||||||
|
"message": "ok",
|
||||||
|
"warehouse_id": 100000,
|
||||||
|
"subject_config": {
|
||||||
|
"group_wave_prefix": "B",
|
||||||
|
"max_wave_quantity": 500,
|
||||||
|
"default_express_code": "STO",
|
||||||
|
"auto_grouping_enabled": false,
|
||||||
|
"default_platform_code": "TB",
|
||||||
|
"delete_order_wave_prefix": "A",
|
||||||
|
"max_notice_webhook_count": 5,
|
||||||
|
"min_group_order_fetch_quantity": 13
|
||||||
|
},
|
||||||
|
"timestamp": 1778058114
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"接口": "setting.warehouse.getFieldMeta",
|
||||||
|
"message": "ok",
|
||||||
|
"code": 1,
|
||||||
|
"data": {
|
||||||
|
"flag": "success",
|
||||||
|
"code": 1,
|
||||||
|
"message": "ok",
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"key": "max_notice_webhook_count",
|
||||||
|
"name": "最大通知 Webhook 次数",
|
||||||
|
"type": "integer",
|
||||||
|
"default": 5,
|
||||||
|
"required": false,
|
||||||
|
"description": "单次事件最多触发的 Webhook 通知次数(0-5)",
|
||||||
|
"min": 0,
|
||||||
|
"max": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "max_wave_quantity",
|
||||||
|
"name": "仓库波次最大数量限制",
|
||||||
|
"type": "integer",
|
||||||
|
"default": 500,
|
||||||
|
"required": false,
|
||||||
|
"description": "控制单个波次允许的最大订单数量,默认 500",
|
||||||
|
"min": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "min_group_order_fetch_quantity",
|
||||||
|
"name": "最小团购订单抓取数量",
|
||||||
|
"type": "integer",
|
||||||
|
"default": 13,
|
||||||
|
"required": false,
|
||||||
|
"description": "控制团购波次最小抓取订单数量,默认 13",
|
||||||
|
"min": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "default_express_code",
|
||||||
|
"name": "默认快递编码",
|
||||||
|
"type": "string",
|
||||||
|
"default": "STO",
|
||||||
|
"required": false,
|
||||||
|
"description": "仓库默认使用的快递编码",
|
||||||
|
"maxLength": 50
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "default_platform_code",
|
||||||
|
"name": "默认平台编码",
|
||||||
|
"type": "string",
|
||||||
|
"default": "TB",
|
||||||
|
"required": false,
|
||||||
|
"description": "仓库默认使用的平台编码",
|
||||||
|
"maxLength": 50
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "group_wave_prefix",
|
||||||
|
"name": "团购波次前缀",
|
||||||
|
"type": "string",
|
||||||
|
"default": "B",
|
||||||
|
"required": false,
|
||||||
|
"description": "团购波次编号前缀,最多 5 个字符,默认 B",
|
||||||
|
"maxLength": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "delete_order_wave_prefix",
|
||||||
|
"name": "删单波次前缀",
|
||||||
|
"type": "string",
|
||||||
|
"default": "A",
|
||||||
|
"required": false,
|
||||||
|
"description": "删单波次编号前缀,最多 5 个字符,默认 A",
|
||||||
|
"maxLength": 5
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "webhook_enabled",
|
||||||
|
"name": "是否启用 Webhook",
|
||||||
|
"type": "flag",
|
||||||
|
"default": false,
|
||||||
|
"required": false,
|
||||||
|
"description": "控制仓库是否启用 Webhook 事件推送"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "callback_strategy",
|
||||||
|
"name": "回调策略",
|
||||||
|
"type": "enum",
|
||||||
|
"default": "async",
|
||||||
|
"required": false,
|
||||||
|
"description": "仓库 Webhook 事件的回调执行策略",
|
||||||
|
"options": [
|
||||||
|
{
|
||||||
|
"value": "sync",
|
||||||
|
"label": "同步回调"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"value": "async",
|
||||||
|
"label": "异步回调"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"timestamp": 1778058114
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"接口": "setting.warehouse.saveSettings",
|
||||||
|
"message": "subject_config 参数不能为空且必须是对象",
|
||||||
|
"code": 400,
|
||||||
|
"data": {
|
||||||
|
"flag": "failure",
|
||||||
|
"code": 400,
|
||||||
|
"message": "subject_config 参数不能为空且必须是对象",
|
||||||
|
"timestamp": 1778058114
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -237,23 +237,35 @@ function isResponseMessageOk(message, successMessages) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 成功响应中 data 含 list 且列表无元素([] 或 null)时视为「空数据」。
|
* 成功响应中「列表业务数据」为空时视为「空数据」。
|
||||||
* 无 list 字段的接口(如登录)不归入此类。
|
* - 标准包裹:根对象含 `data` 且 `data` 为对象且含 `list`
|
||||||
* @param {unknown} data
|
* - 扁平结构:根对象直接含 `list`
|
||||||
|
* 无上述 list 字段的接口(如登录、单对象配置)不归入此类。
|
||||||
|
* @param {unknown} storedResponse apidata 详情条目中保存的完整响应 JSON
|
||||||
*/
|
*/
|
||||||
function isDataWithEmptyList(data) {
|
function isDataWithEmptyList(storedResponse) {
|
||||||
if (!data || typeof data !== "object" || Array.isArray(data)) {
|
if (!storedResponse || typeof storedResponse !== "object" || Array.isArray(storedResponse)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const obj = /** @type {Record<string, unknown>} */ (data);
|
const root = /** @type {Record<string, unknown>} */ (storedResponse);
|
||||||
if (!Object.prototype.hasOwnProperty.call(obj, "list")) {
|
/** @param {Record<string, unknown>} obj */
|
||||||
return false;
|
const emptyListOn = (obj) => {
|
||||||
|
if (!Object.prototype.hasOwnProperty.call(obj, "list")) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
const list = obj.list;
|
||||||
|
if (list == null) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return Array.isArray(list) && list.length === 0;
|
||||||
|
};
|
||||||
|
const inner = root.data;
|
||||||
|
if (inner && typeof inner === "object" && !Array.isArray(inner)) {
|
||||||
|
if (emptyListOn(/** @type {Record<string, unknown>} */ (inner))) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const list = obj.list;
|
return emptyListOn(root);
|
||||||
if (list == null) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return Array.isArray(list) && list.length === 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -340,7 +352,7 @@ function normalizeConfig(rawConfig) {
|
|||||||
|
|
||||||
function printHelp() {
|
function printHelp() {
|
||||||
console.log(`
|
console.log(`
|
||||||
apidata — 按 config.json 请求远端并写入 apidata/data.json;默认同时写入 api-doc-agent/config/响应.md(仅含各接口 method 与 data)。
|
apidata — 按 config.json 请求远端并写入 apidata/data.json;默认同时写入 api-doc-agent/config/响应.md(仅含各接口 method 与完整响应 JSON)。
|
||||||
快速检查(--quick)不写入 响应.md,且 data.json 仅含「数据一览」、不含「详情」。
|
快速检查(--quick)不写入 响应.md,且 data.json 仅含「数据一览」、不含「详情」。
|
||||||
|
|
||||||
成功判定: 响应 message 与「成功判定名单」某项在 trim 且英文忽略大小写后一致即成功(默认含 ok、成功、登录成功)。
|
成功判定: 响应 message 与「成功判定名单」某项在 trim 且英文忽略大小写后一致即成功(默认含 ok、成功、登录成功)。
|
||||||
@ -351,7 +363,7 @@ apidata — 按 config.json 请求远端并写入 apidata/data.json;默认同
|
|||||||
失败接口: 默认在每条失败记录上附加「模块目录」(来自 data/module-list/module-list.json)、
|
失败接口: 默认在每条失败记录上附加「模块目录」(来自 data/module-list/module-list.json)、
|
||||||
「api封装」(在 src/api 中匹配到的 export)及「引用页面」(扫描 src/views、src/components、src/layout 下 .vue/.ts/.tsx 的引用路径,相对仓库根)。
|
「api封装」(在 src/api 中匹配到的 export)及「引用页面」(扫描 src/views、src/components、src/layout 下 .vue/.ts/.tsx 的引用路径,相对仓库根)。
|
||||||
|
|
||||||
空数据接口: message 判定成功且响应 data 中存在 list 字段且为 [] 或 null 的接口,写入「数据一览.空数据接口」,默认附加信息与失败接口相同。
|
空数据接口: message 判定成功且完整响应体中 \`data.list\`(包裹结构)或根级 \`list\` 为 [] 或 null 的接口,写入「数据一览.空数据接口」,默认附加信息与失败接口相同。
|
||||||
|
|
||||||
快速检查(--quick)下:失败/空数据条目仅含 接口、message、文件(api 封装所在文件路径,去重)、引用页面;不含 模块目录、code、api 封装明细等。
|
快速检查(--quick)下:失败/空数据条目仅含 接口、message、文件(api 封装所在文件路径,去重)、引用页面;不含 模块目录、code、api 封装明细等。
|
||||||
|
|
||||||
@ -640,7 +652,7 @@ async function buildAndWriteConfig(opts) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 响应.md 仅含「接口 method + 响应 data」,不含数据一览、message 等。
|
* 响应.md 仅含「接口 method + 完整响应体」,不含数据一览、message 等。
|
||||||
* @param {Array<{ 接口: string, message?: string, code?: unknown, data: unknown }>} rows
|
* @param {Array<{ 接口: string, message?: string, code?: unknown, data: unknown }>} rows
|
||||||
*/
|
*/
|
||||||
function buildMethodDataOnlyForMarkdown(rows) {
|
function buildMethodDataOnlyForMarkdown(rows) {
|
||||||
@ -1095,7 +1107,8 @@ async function runCrawlFromConfigFile(opts = {}) {
|
|||||||
接口: req.method,
|
接口: req.method,
|
||||||
message: isObj ? String(/** @type {{ message?: unknown }} */ (res).message ?? "") : "",
|
message: isObj ? String(/** @type {{ message?: unknown }} */ (res).message ?? "") : "",
|
||||||
code: isObj && "code" in res ? /** @type {{ code?: unknown }} */ (res).code : null,
|
code: isObj && "code" in res ? /** @type {{ code?: unknown }} */ (res).code : null,
|
||||||
data: isObj ? /** @type {{ data?: unknown }} */ (res).data ?? null : null,
|
// 保存服务端返回的完整 JSON,避免仅取 `data` 导致扁平结构接口(如 setting.warehouse.getSettings)丢失主体字段
|
||||||
|
data: isObj ? /** @type {Record<string, unknown>} */ (res) : res,
|
||||||
});
|
});
|
||||||
if (quickCheck || result.attempts > 1) {
|
if (quickCheck || result.attempts > 1) {
|
||||||
console.log(
|
console.log(
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -13,50 +13,59 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"moduleCount": 34,
|
"moduleCount": 34,
|
||||||
"totalInterfaceCount": 225,
|
"totalInterfaceCount": 235,
|
||||||
"changes": {
|
"changes": {
|
||||||
"summary": {
|
"summary": {
|
||||||
"moduleAdded": 0,
|
"moduleAdded": 0,
|
||||||
"moduleDeleted": 0,
|
"moduleDeleted": 0,
|
||||||
"moduleUpdated": 1,
|
"moduleUpdated": 1,
|
||||||
"interfaceAdded": 1,
|
"interfaceAdded": 0,
|
||||||
"interfaceDeleted": 0,
|
"interfaceDeleted": 0,
|
||||||
"interfaceParamsUpdated": 0,
|
"interfaceParamsUpdated": 1,
|
||||||
"interfaceResponseUpdated": 0
|
"interfaceResponseUpdated": 1
|
||||||
},
|
},
|
||||||
"moduleUpdates": {
|
"moduleUpdates": {
|
||||||
"added": [],
|
"added": [],
|
||||||
"deleted": [],
|
"deleted": [],
|
||||||
"updated": [
|
"updated": [
|
||||||
{
|
{
|
||||||
"moduleName": "订单波次模块",
|
"moduleName": "收货单模块",
|
||||||
"moduleKey": "order.wave",
|
"moduleKey": "storage_receiving",
|
||||||
"folder": "order.wave",
|
"folder": "storage_receiving",
|
||||||
"previousModuleName": "订单波次模块",
|
"previousModuleName": "收货单模块",
|
||||||
"previousModuleKey": "order.wave",
|
"previousModuleKey": "storage_receiving",
|
||||||
"interfaceChanges": {
|
"interfaceChanges": {
|
||||||
"addedMethods": [
|
"addedMethods": [],
|
||||||
"order.wave.singleOrderFetchList"
|
|
||||||
],
|
|
||||||
"deletedMethods": [],
|
"deletedMethods": [],
|
||||||
"paramsUpdatedMethods": [],
|
"paramsUpdatedMethods": [
|
||||||
"responseUpdatedMethods": []
|
"storage.receiving.detailChange"
|
||||||
|
],
|
||||||
|
"responseUpdatedMethods": [
|
||||||
|
"storage.receiving.detailChange"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"interfaceUpdates": {
|
"interfaceUpdates": {
|
||||||
"added": [
|
"added": [],
|
||||||
|
"deleted": [],
|
||||||
|
"paramsUpdated": [
|
||||||
{
|
{
|
||||||
"moduleName": "订单波次模块",
|
"moduleName": "收货单模块",
|
||||||
"moduleKey": "order.wave",
|
"moduleKey": "storage_receiving",
|
||||||
"folder": "order.wave",
|
"folder": "storage_receiving",
|
||||||
"method": "order.wave.singleOrderFetchList"
|
"method": "storage.receiving.detailChange"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"deleted": [],
|
"responseUpdated": [
|
||||||
"paramsUpdated": [],
|
{
|
||||||
"responseUpdated": []
|
"moduleName": "收货单模块",
|
||||||
|
"moduleKey": "storage_receiving",
|
||||||
|
"folder": "storage_receiving",
|
||||||
|
"method": "storage.receiving.detailChange"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"modules": [
|
"modules": [
|
||||||
@ -303,11 +312,14 @@
|
|||||||
"moduleName": "订单波次模块",
|
"moduleName": "订单波次模块",
|
||||||
"moduleKey": "order.wave",
|
"moduleKey": "order.wave",
|
||||||
"folder": "order.wave",
|
"folder": "order.wave",
|
||||||
"interfaceCount": 9,
|
"interfaceCount": 19,
|
||||||
"interfaces": [
|
"interfaces": [
|
||||||
{
|
{
|
||||||
"method": "order.wave.groupOrderFetchList"
|
"method": "order.wave.groupOrderFetchList"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.singleFetchByIds"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"method": "order.wave.singleOrderFetchList"
|
"method": "order.wave.singleOrderFetchList"
|
||||||
},
|
},
|
||||||
@ -317,6 +329,33 @@
|
|||||||
{
|
{
|
||||||
"method": "order.wave.batchCancel"
|
"method": "order.wave.batchCancel"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.batchCancelTaskProgress"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.batchAllocateExpress"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.batchAllocateExpressTaskProgress"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.batchRemoveExceptionOrders"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.batchRemoveExceptionOrdersTaskProgress"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.batchAllocateStorage"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.batchAllocateStorageTaskProgress"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.groupFetch"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.singleFetch"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"method": "order.wave.fetch"
|
"method": "order.wave.fetch"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -16,16 +16,14 @@
|
|||||||
"name": "订单波次模块",
|
"name": "订单波次模块",
|
||||||
"key": "order.wave",
|
"key": "order.wave",
|
||||||
"folder": "order.wave",
|
"folder": "order.wave",
|
||||||
"interfaceCount": 9
|
"interfaceCount": 19
|
||||||
},
|
},
|
||||||
"changes": {
|
"changes": {
|
||||||
"fromPreviousSnapshot": {
|
"fromPreviousSnapshot": {
|
||||||
"moduleAdded": false,
|
"moduleAdded": false,
|
||||||
"moduleRenamed": false,
|
"moduleRenamed": false,
|
||||||
"interfaceChanges": {
|
"interfaceChanges": {
|
||||||
"addedMethods": [
|
"addedMethods": [],
|
||||||
"order.wave.singleOrderFetchList"
|
|
||||||
],
|
|
||||||
"deletedMethods": [],
|
"deletedMethods": [],
|
||||||
"paramsUpdatedMethods": [],
|
"paramsUpdatedMethods": [],
|
||||||
"responseUpdatedMethods": []
|
"responseUpdatedMethods": []
|
||||||
@ -111,6 +109,84 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.singleFetchByIds",
|
||||||
|
"title": "按订单 ID 列表抓取到一个散单波次。仅处理当前仓库的待处理订单(step in [1,2,3]),排除已在波次中的订单(wave_id>0),不区分快递;成功抓取后批量写入订单操作日志;当无可抓取订单时返回 wave_id=0。",
|
||||||
|
"description": "按订单 ID 列表抓取到一个散单波次。仅处理当前仓库的待处理订单(step in [1,2,3]),排除已在波次中的订单(wave_id>0),不区分快递;成功抓取后批量写入订单操作日志;当无可抓取订单时返回 wave_id=0。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "ids / order_ids / orderIds",
|
||||||
|
"type": "array|string|number",
|
||||||
|
"required": true,
|
||||||
|
"description": "订单ID列表,支持数组、逗号分隔字符串或单个ID;优先使用 ids 字段"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "ids",
|
||||||
|
"type": "array",
|
||||||
|
"required": true,
|
||||||
|
"description": "请求归一化后的 ids 列表(去重且为正整数)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "wave_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "创建的波次 ID;若无可抓取订单返回 0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "wave_no",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "创建的波次号;无可抓取时为空字符串"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fetched_order_ids",
|
||||||
|
"type": "array",
|
||||||
|
"required": true,
|
||||||
|
"description": "实际被抓取并分配到波次的订单ID列表"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fetched_order_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "实际被抓取的订单数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "excluded_existing_wave_order_ids",
|
||||||
|
"type": "array",
|
||||||
|
"required": false,
|
||||||
|
"description": "原始入参中已在其它波次中的订单ID(被排除)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "skipped_order_ids",
|
||||||
|
"type": "array",
|
||||||
|
"required": false,
|
||||||
|
"description": "未被抓取的订单ID(包括已存在波次、状态不符或出库中等)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "not_found_order_ids",
|
||||||
|
"type": "array",
|
||||||
|
"required": false,
|
||||||
|
"description": "入参中未在数据库中找到的订单ID"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"method": "order.wave.singleOrderFetchList",
|
"method": "order.wave.singleOrderFetchList",
|
||||||
"title": "按机器结构分组的散单候选列表。仅处理待处理订单(排除待审核),且排除已在波次中的订单。与 order.wave.groupOrderFetchList 不同:groupOrderFetchList 返回满足同组订单数量 >= same_order_quantity(或仓库配置 min_group_order_fetch_quantity)的团购命中分组;singleOrderFetchList 则排除这些团购命中分组,仅返回同组订单数量小于该阈值的散单候选分组(即 < same_order_quantity)。",
|
"title": "按机器结构分组的散单候选列表。仅处理待处理订单(排除待审核),且排除已在波次中的订单。与 order.wave.groupOrderFetchList 不同:groupOrderFetchList 返回满足同组订单数量 >= same_order_quantity(或仓库配置 min_group_order_fetch_quantity)的团购命中分组;singleOrderFetchList 则排除这些团购命中分组,仅返回同组订单数量小于该阈值的散单候选分组(即 < same_order_quantity)。",
|
||||||
@ -219,7 +295,7 @@
|
|||||||
"name": "where",
|
"name": "where",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "筛选白名单字段(object,可选)。仅支持下列字段过滤,且禁止传入 warehouse_id / warehouseId: - wave_id(等值) - wave_no(模糊) - wave_type(等值) - wave_status(等值,接口固定叠加状态 0/1) - creator(模糊) - logistics_name(模糊) - item_part_type(等值) - item_part(模糊) - item_snapshot_key(模糊) - item_detail_machine(模糊) - distinguish_express(等值) - total_orders_min / total_orders_max(范围) - processed_orders_min / processed_orders_max(范围)"
|
"description": "筛选白名单字段(object,可选)。仅支持下列字段过滤,且禁止传入 warehouse_id / warehouseId: - wave_id(等值) - wave_no(模糊) - wave_type(等值) - wave_status(等值,接口固定叠加状态 0/1) - creator(模糊) - logistics_name(模糊) - item_part_type(等值) - item_part(模糊) - item_snapshot_key(模糊) - item_detail_machine(模糊) - distinguish_express(等值) - total_orders_min / total_orders_max(范围) - processed_orders_min / processed_orders_max(范围) - storage_assignment_status(等值,string,可选,取值:未分配、部分分配、已分配;默认不传不做限制)。过滤语义:已分配=聚合后全部 fin;部分分配=不含 error,且既不是全 none,也不是全 fin;未分配=全 none 或包含 error(异常并入未分配筛选集合)。说明:返回字段 storage_assignment_status 的展示值保持不变,包含 error 时仍可显示“分配异常”;此处 where 的过滤语义会把异常计入“未分配”,以避免把过滤语义与展示值混淆。"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"response": [
|
"response": [
|
||||||
@ -239,8 +315,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "order.wave.batchCancel",
|
"method": "order.wave.batchCancel",
|
||||||
"title": "批量解除波次。传入 ids,清理订单波次ID,并将命中的波次状态置为 -1(已取消)。仅作用于当前登录仓库。",
|
"title": "提交批量解除波次异步任务。该接口为异步任务提交接口,立即返回 task_id,后端异步按当前仓库 + wave_ids 拉取待处理波次并执行解除操作;可通过 order.wave.batchCancelTaskProgress 查询进度与结果。",
|
||||||
"description": "批量解除波次。传入 ids,清理订单波次ID,并将命中的波次状态置为 -1(已取消)。仅作用于当前登录仓库。",
|
"description": "提交批量解除波次异步任务。该接口为异步任务提交接口,立即返回 task_id,后端异步按当前仓库 + wave_ids 拉取待处理波次并执行解除操作;可通过 order.wave.batchCancelTaskProgress 查询进度与结果。",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -258,43 +334,643 @@
|
|||||||
],
|
],
|
||||||
"params": [
|
"params": [
|
||||||
{
|
{
|
||||||
"name": "ids",
|
"name": "wave_ids / waveIds / ids",
|
||||||
"type": "array|string|number",
|
"type": "array|string|number",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "波次ID列表;支持数组、逗号分隔字符串或单个ID"
|
"description": "波次ID列表;支持数组、逗号分隔字符串或单个ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "task_id / taskId",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "可选外部任务ID,用于幂等提交"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"response": [
|
"response": [
|
||||||
{
|
{
|
||||||
"name": "ids",
|
"name": "status",
|
||||||
"type": "array",
|
"type": "string",
|
||||||
"required": false,
|
"required": true,
|
||||||
"description": "归一化后的请求ID列表"
|
"description": "提交状态,固定 success"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "affected_wave_ids",
|
"name": "task_id",
|
||||||
"type": "array",
|
"type": "string",
|
||||||
"required": false,
|
"required": true,
|
||||||
"description": "实际命中的波次ID列表"
|
"description": "任务 ID(用于查询任务进度)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "affected_order_count",
|
"name": "warehouse_id",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"required": false,
|
"required": true,
|
||||||
"description": "被清理 wave_id 的订单数量"
|
"description": "当前仓库ID"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "canceled_wave_count",
|
"name": "accepted_at",
|
||||||
"type": "number",
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务受理时间(ISO8601)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "message",
|
||||||
|
"type": "string",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "实际置为 -1 的波次数量"
|
"description": "受理提示信息"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "order.wave.fetch",
|
"method": "order.wave.batchCancelTaskProgress",
|
||||||
"title": "提交波次抓取任务:该接口为异步任务提交接口,立即返回任务已受理的信息,后端异步执行实际抓取,不在接口同步返回抓取结果。客户端可通过任务 ID 或调用 order.wave.fetchTaskProgress 查询任务状态与进度。",
|
"title": "查询批量解除波次任务进度:按 task_id 查询任务状态与统计信息;兼容 taskId 参数名。响应包含 state、progress_percent、processed_wave_count、total_wave_count;当 state 为 success/failed 时返回额外字段说明。",
|
||||||
"description": "提交波次抓取任务:该接口为异步任务提交接口,立即返回任务已受理的信息,后端异步执行实际抓取,不在接口同步返回抓取结果。客户端可通过任务 ID 或调用 order.wave.fetchTaskProgress 查询任务状态与进度。",
|
"description": "查询批量解除波次任务进度:按 task_id 查询任务状态与统计信息;兼容 taskId 参数名。响应包含 state、progress_percent、processed_wave_count、total_wave_count;当 state 为 success/failed 时返回额外字段说明。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "task_id / taskId",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务 ID(后端生成或提交时传入)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "task_id",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务 ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "state",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务状态枚举:submitted(已受理)/ running(进行中)/ success(成功)/ failed(失败)/ not_found(未找到)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "progress_percent",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "进度百分比(0-100)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "processed_wave_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "已处理的波次数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "total_wave_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "总波次数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "duration_ms",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "任务耗时(毫秒)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error_message",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "失败时的错误信息(仅在 state=failed 时返回)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error_code",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "失败时的错误码(仅在 state=failed 时返回)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "result",
|
||||||
|
"type": "object",
|
||||||
|
"required": false,
|
||||||
|
"description": "成功时返回的汇总结果(仅在 state=success 时返回),例如 { \"processed_wave_count\": number, \"canceled_wave_count\": number }"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.batchAllocateExpress",
|
||||||
|
"title": "提交批次分配快递号任务。该接口为异步任务提交接口,立即返回 task_id,后端异步按当前仓库 + wave_ids 拉取待处理订单并提交到快递号分配流水线。",
|
||||||
|
"description": "提交批次分配快递号任务。该接口为异步任务提交接口,立即返回 task_id,后端异步按当前仓库 + wave_ids 拉取待处理订单并提交到快递号分配流水线。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "wave_ids / waveIds / ids",
|
||||||
|
"type": "array|string|number",
|
||||||
|
"required": true,
|
||||||
|
"description": "波次ID列表;支持数组、逗号分隔字符串或单个ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "task_id / taskId",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "可选外部任务ID,用于幂等提交"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "status",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "提交状态,固定 success"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "task_id",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务 ID(用于查询任务进度)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "warehouse_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "当前仓库ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accepted_at",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务受理时间(ISO8601)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "message",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "受理提示信息"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.batchAllocateExpressTaskProgress",
|
||||||
|
"title": "查询批次分配快递号任务进度:按 task_id 查询任务状态与统计信息;兼容 taskId 参数名。",
|
||||||
|
"description": "查询批次分配快递号任务进度:按 task_id 查询任务状态与统计信息;兼容 taskId 参数名。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "task_id / taskId",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务 ID(后端生成或提交时传入)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "task_id",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务 ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "state",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务状态枚举:submitted(已受理)/ running(进行中)/ success(成功)/ failed(失败)/ not_found(未找到)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "warehouse_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "任务关联仓库ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "total_wave_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "波次数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "total_order_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "参与分配的订单数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "processed_order_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "已处理订单数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "success_order_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "成功提交分配的订单数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "failed_order_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "提交分配失败的订单数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "progress_percent",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "进度百分比(0-100)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "duration_ms",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "任务耗时(毫秒)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error_message",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "失败时的错误信息"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error_code",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "失败时的错误码"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.batchRemoveExceptionOrders",
|
||||||
|
"title": "提交批次移除异常订单任务。该接口为异步任务提交接口,立即返回 task_id,后端异步按当前仓库 + wave_ids 拉取异常订单并移出波次。",
|
||||||
|
"description": "提交批次移除异常订单任务。该接口为异步任务提交接口,立即返回 task_id,后端异步按当前仓库 + wave_ids 拉取异常订单并移出波次。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "wave_ids / waveIds / ids",
|
||||||
|
"type": "array|string|number",
|
||||||
|
"required": true,
|
||||||
|
"description": "波次ID列表;支持数组、逗号分隔字符串或单个ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "task_id / taskId",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "可选外部任务ID,用于幂等提交"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "status",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "提交状态,固定 success"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "task_id",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务 ID(用于查询任务进度)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "warehouse_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "当前仓库ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accepted_at",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务受理时间(ISO8601)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "message",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "受理提示信息"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.batchRemoveExceptionOrdersTaskProgress",
|
||||||
|
"title": "查询批次移除异常订单任务进度:按 task_id 查询任务状态与统计信息;兼容 taskId 参数名。",
|
||||||
|
"description": "查询批次移除异常订单任务进度:按 task_id 查询任务状态与统计信息;兼容 taskId 参数名。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "task_id / taskId",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务 ID(后端生成或提交时传入)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "task_id",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务 ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "state",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务状态枚举:submitted(已受理)/ running(进行中)/ success(成功)/ failed(失败)/ not_found(未找到)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "warehouse_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "任务关联仓库ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "total_wave_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "波次数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "total_order_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "参与处理的订单数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "processed_order_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "已处理订单数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "removed_order_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "已成功移出波次的订单数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "failed_order_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "处理失败的订单数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "progress_percent",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "进度百分比(0-100)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "duration_ms",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "任务耗时(毫秒)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error_message",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "失败时的错误信息"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error_code",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "失败时的错误码"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.batchAllocateStorage",
|
||||||
|
"title": "提交批次分配储位任务。该接口为异步任务提交接口,立即返回 task_id,后端异步按当前仓库 + wave_ids 拉取待处理订单并提交到储位分配流水线。",
|
||||||
|
"description": "提交批次分配储位任务。该接口为异步任务提交接口,立即返回 task_id,后端异步按当前仓库 + wave_ids 拉取待处理订单并提交到储位分配流水线。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "wave_ids / waveIds / ids",
|
||||||
|
"type": "array|string|number",
|
||||||
|
"required": true,
|
||||||
|
"description": "波次ID列表;支持数组、逗号分隔字符串或单个ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "task_id / taskId",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "可选外部任务ID,用于幂等提交"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "status",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "提交状态,固定 success"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "task_id",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务 ID(用于查询任务进度)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "warehouse_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "当前仓库ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "accepted_at",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务受理时间(ISO8601)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "message",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "受理提示信息"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.batchAllocateStorageTaskProgress",
|
||||||
|
"title": "查询批次分配储位任务进度:按 task_id 查询任务状态与统计信息;兼容 taskId 参数名。",
|
||||||
|
"description": "查询批次分配储位任务进度:按 task_id 查询任务状态与统计信息;兼容 taskId 参数名。",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "task_id / taskId",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务 ID(后端生成或提交时传入)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "task_id",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务 ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "state",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务状态枚举:submitted(已受理)/ running(进行中)/ success(成功)/ failed(失败)/ not_found(未找到)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "warehouse_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "任务关联仓库ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "total_wave_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "波次数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "total_order_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "参与分配的订单数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "processed_order_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "已处理订单数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "success_order_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "成功提交分配的订单数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "failed_order_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "提交分配失败的订单数量"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "progress_percent",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "进度百分比(0-100)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "duration_ms",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "任务耗时(毫秒)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error_message",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "失败时的错误信息"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "error_code",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "失败时的错误码"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.groupFetch",
|
||||||
|
"title": "抓取团购接口(异步任务提交)",
|
||||||
|
"description": "抓取团购接口(异步任务提交)",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -349,6 +1025,162 @@
|
|||||||
"required": true,
|
"required": true,
|
||||||
"description": "手动抓取标记;值为 'wave_manual_fetch' 表示手动抓取"
|
"description": "手动抓取标记;值为 'wave_manual_fetch' 表示手动抓取"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "fetch_mode",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "抓取模式,值为 'group'(团购)或 'single'(散单)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "message",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "受理信息提示,通常为 '任务已提交,后端异步处理中' 或失败/错误说明"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.singleFetch",
|
||||||
|
"title": "抓取散单接口(异步任务提交)",
|
||||||
|
"description": "抓取散单接口(异步任务提交)",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "structure_list",
|
||||||
|
"type": "array",
|
||||||
|
"required": true,
|
||||||
|
"description": "结构请求数组;每项必须包含 item_detail_machine(由 buildMachineStructureToken 生成的结构标识)并包含必填字段 max_fetch_quantity(最大抓取上限,订单数,正整数);可选 quantity(未传入时使用仓库默认或全局默认)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "task_id",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务 ID(后端生成的唯一标识,用于查询任务状态或结果)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "warehouse_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "生效的仓库 ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "structure_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "本次入参的结构数量(structure_list 长度)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "default_quantity",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "仓库默认抓取数量或全局默认值"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "auto_fetch_disabled_marker",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "手动抓取标记;值为 'wave_manual_fetch' 表示手动抓取"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fetch_mode",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "抓取模式,值为 'group'(团购)或 'single'(散单)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "max_fetch_quantity",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "提交时生效的最大抓取上限(订单数,正整数)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "message",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "受理信息提示,通常为 '任务已提交,后端异步处理中' 或失败/错误说明"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"method": "order.wave.fetch",
|
||||||
|
"title": "兼容别名(等同 groupFetch)",
|
||||||
|
"description": "兼容别名(等同 groupFetch)",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "structure_list",
|
||||||
|
"type": "array",
|
||||||
|
"required": true,
|
||||||
|
"description": "结构请求数组;每项必须包含 item_detail_machine(由 buildMachineStructureToken 生成的结构标识),可选 quantity(未传入时使用仓库默认或全局默认)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "task_id",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "任务 ID(后端生成的唯一标识,用于查询任务状态或结果)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "warehouse_id",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "生效的仓库 ID"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "structure_count",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "本次入参的结构数量(structure_list 长度)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "default_quantity",
|
||||||
|
"type": "number",
|
||||||
|
"required": true,
|
||||||
|
"description": "仓库默认抓取数量或全局默认值"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "auto_fetch_disabled_marker",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "手动抓取标记;值为 'wave_manual_fetch' 表示手动抓取"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fetch_mode",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "抓取模式,值为 'group'(团购)或 'single'(散单)"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "message",
|
"name": "message",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -439,6 +1271,30 @@
|
|||||||
"required": false,
|
"required": false,
|
||||||
"description": "错误信息,仅当 status=failed 时返回"
|
"description": "错误信息,仅当 status=failed 时返回"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "fetch_mode",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "抓取模式,值为 'group'(团购)或 'single'(散单);single 模式时可能返回下列额外字段"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "max_fetch_quantity",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "当 fetch_mode=single 时返回的最大抓取上限(订单数,正整数)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "limit_reached",
|
||||||
|
"type": "boolean",
|
||||||
|
"required": false,
|
||||||
|
"description": "当 fetch_mode=single 时指示是否已达到 max_fetch_quantity 限制"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "stop_reason",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "任务停止原因(如达到上限、人工停止或其他失败原因)"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "update_time",
|
"name": "update_time",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-04 17:23:48",
|
"createdAt": "2026-05-04 17:23:48",
|
||||||
"updatedAt": "2026-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -25,8 +25,12 @@
|
|||||||
"interfaceChanges": {
|
"interfaceChanges": {
|
||||||
"addedMethods": [],
|
"addedMethods": [],
|
||||||
"deletedMethods": [],
|
"deletedMethods": [],
|
||||||
"paramsUpdatedMethods": [],
|
"paramsUpdatedMethods": [
|
||||||
"responseUpdatedMethods": []
|
"storage.receiving.detailChange"
|
||||||
|
],
|
||||||
|
"responseUpdatedMethods": [
|
||||||
|
"storage.receiving.detailChange"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@ -883,6 +887,18 @@
|
|||||||
"required": false,
|
"required": false,
|
||||||
"description": "箱长"
|
"description": "箱长"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "box_remainder",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "箱内剩余数量/零散数量(不满箱时的件数)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "box_weight",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "实测箱重(单位与系统重量一致,如 kg)"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "weight",
|
"name": "weight",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
@ -927,6 +943,18 @@
|
|||||||
"required": false,
|
"required": false,
|
||||||
"description": "系统商品 ID"
|
"description": "系统商品 ID"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "data.box_remainder",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "箱内剩余数量/零散数量(不满箱时的件数)"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "data.box_weight",
|
||||||
|
"type": "number",
|
||||||
|
"required": false,
|
||||||
|
"description": "实测箱重(单位与系统重量一致,如 kg)"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "data.updated_at",
|
"name": "data.updated_at",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -33,8 +33,8 @@
|
|||||||
"interfaces": [
|
"interfaces": [
|
||||||
{
|
{
|
||||||
"method": "store.createStore",
|
"method": "store.createStore",
|
||||||
"title": "store.createStore 接口,subject_config 未传时默认写入 max_notice_webhook_count=5、default_express_code=STO、default_platform_code=TB、group_wave_prefix=B、min_group_order_fetch_quantity=13",
|
"title": "store.createStore 接口,subject_config 未传时默认写入 max_notice_webhook_count=5、default_express_code=STO、default_platform_code=TB、group_wave_prefix=B、min_group_order_fetch_quantity=13、auto_grouping_enabled=false(是否自动加团,默认 false(关闭))",
|
||||||
"description": "store.createStore 接口,subject_config 未传时默认写入 max_notice_webhook_count=5、default_express_code=STO、default_platform_code=TB、group_wave_prefix=B、min_group_order_fetch_quantity=13",
|
"description": "store.createStore 接口,subject_config 未传时默认写入 max_notice_webhook_count=5、default_express_code=STO、default_platform_code=TB、group_wave_prefix=B、min_group_order_fetch_quantity=13、auto_grouping_enabled=false(是否自动加团,默认 false(关闭))",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -86,14 +86,20 @@
|
|||||||
"type": "number",
|
"type": "number",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "最小团购订单抓取数量,默认 13"
|
"description": "最小团购订单抓取数量,默认 13"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subject_config.auto_grouping_enabled",
|
||||||
|
"type": "boolean",
|
||||||
|
"required": false,
|
||||||
|
"description": "是否自动加团,默认 false(关闭)"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"response": []
|
"response": []
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "store.createWarehouse",
|
"method": "store.createWarehouse",
|
||||||
"title": "store.createWarehouse 接口,subject_config 未传时默认写入 max_notice_webhook_count=5、default_express_code=STO、default_platform_code=TB、group_wave_prefix=B、min_group_order_fetch_quantity=13",
|
"title": "store.createWarehouse 接口,subject_config 未传时默认写入 max_notice_webhook_count=5、default_express_code=STO、default_platform_code=TB、group_wave_prefix=B、min_group_order_fetch_quantity=13、auto_grouping_enabled=false(是否自动加团,默认 false(关闭))",
|
||||||
"description": "store.createWarehouse 接口,subject_config 未传时默认写入 max_notice_webhook_count=5、default_express_code=STO、default_platform_code=TB、group_wave_prefix=B、min_group_order_fetch_quantity=13",
|
"description": "store.createWarehouse 接口,subject_config 未传时默认写入 max_notice_webhook_count=5、default_express_code=STO、default_platform_code=TB、group_wave_prefix=B、min_group_order_fetch_quantity=13、auto_grouping_enabled=false(是否自动加团,默认 false(关闭))",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -145,6 +151,12 @@
|
|||||||
"type": "number",
|
"type": "number",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "最小团购订单抓取数量,默认 13"
|
"description": "最小团购订单抓取数量,默认 13"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "subject_config.auto_grouping_enabled",
|
||||||
|
"type": "boolean",
|
||||||
|
"required": false,
|
||||||
|
"description": "是否自动加团,默认 false(关闭)"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"response": []
|
"response": []
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -534,7 +534,7 @@
|
|||||||
"name": "policy_config",
|
"name": "policy_config",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "策略配置对象;仅支持 receive_mode、auto_allocate_bin、allow_mix_batch、allow_temp_storage、storage_separation、print_recharge_price(面单充值元/单,支持 2 位小数)、max_daily_inbound、remark"
|
"description": "策略配置对象;仅支持 receive_mode、auto_allocate_bin、auto_allocate_express(是否自动分配快递)、auto_allocate_storage(是否自动分配储位)、allow_mix_batch、allow_temp_storage、storage_separation、print_recharge_price(面单充值元/单,支持 2 位小数)、max_daily_inbound、remark"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"response": []
|
"response": []
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"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-05-05 17:25:14",
|
"updatedAt": "2026-05-06 17:09:32",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-05 17:25:14",
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
"generatedAtLocal": "2026-05-05 17:25:14",
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -1 +1,44 @@
|
|||||||
{}
|
{
|
||||||
|
"generatedAt": "2026-05-06 17:09:32",
|
||||||
|
"generatedAtLocal": "2026-05-06 17:09:32",
|
||||||
|
"source": "remote",
|
||||||
|
"filter": {
|
||||||
|
"platform": {
|
||||||
|
"value": "web",
|
||||||
|
"label": "网页端"
|
||||||
|
},
|
||||||
|
"project": {
|
||||||
|
"value": "all",
|
||||||
|
"label": "全部"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"summary": {
|
||||||
|
"moduleAdded": 0,
|
||||||
|
"moduleDeleted": 0,
|
||||||
|
"interfaceAdded": 0,
|
||||||
|
"interfaceDeleted": 0,
|
||||||
|
"interfaceParamsUpdated": 1,
|
||||||
|
"interfaceResponseUpdated": 1,
|
||||||
|
"totalChangedItems": 2
|
||||||
|
},
|
||||||
|
"interfaceUpdates": {
|
||||||
|
"added": [],
|
||||||
|
"deleted": [],
|
||||||
|
"paramsUpdated": [
|
||||||
|
{
|
||||||
|
"moduleName": "收货单模块",
|
||||||
|
"moduleKey": "storage_receiving",
|
||||||
|
"folder": "storage_receiving",
|
||||||
|
"method": "storage.receiving.detailChange"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"responseUpdated": [
|
||||||
|
{
|
||||||
|
"moduleName": "收货单模块",
|
||||||
|
"moduleKey": "storage_receiving",
|
||||||
|
"folder": "storage_receiving",
|
||||||
|
"method": "storage.receiving.detailChange"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user