5月11
This commit is contained in:
parent
6f6281f500
commit
7f9ed5eb67
@ -68,6 +68,16 @@ export type WavePickTaskCancelResponse = {
|
||||
task_no?: string
|
||||
}
|
||||
|
||||
export type WavePickTaskCancelSelfParams = {
|
||||
task_id: number
|
||||
}
|
||||
|
||||
export type WavePickTaskCancelSelfResponse = {
|
||||
cancelled_count?: number
|
||||
task_id?: number
|
||||
task_no?: string
|
||||
}
|
||||
|
||||
export type WaveGroupOrderFetchListParams = {
|
||||
pagination?: {
|
||||
page?: number
|
||||
@ -99,6 +109,13 @@ export type WaveStrategyListParams = {
|
||||
page_size?: number
|
||||
size?: number
|
||||
}
|
||||
/** 仅支持 1=散单、2=团购;与 where.strategy_type 同时存在时以顶层为准 */
|
||||
strategy_type?: number
|
||||
/** 当前仅支持 where.strategy_type(1/2) */
|
||||
where?: { strategy_type?: number } & Record<string, unknown>
|
||||
/** 0-不计算(默认),1-计算并返回每条策略的 next_fetch_order_count */
|
||||
calculate_next_fetch_order_count?: number
|
||||
calculateNextFetchOrderCount?: number
|
||||
}
|
||||
|
||||
export type WaveStrategyRecord = Record<string, unknown> & {
|
||||
@ -128,6 +145,8 @@ export type WaveStrategyRecord = Record<string, unknown> & {
|
||||
warehouse_id?: number
|
||||
create_time?: string | number
|
||||
update_time?: string | number
|
||||
/** 当请求 calculate_next_fetch_order_count=1 时由后端计算返回 */
|
||||
next_fetch_order_count?: number
|
||||
}
|
||||
|
||||
export type WaveStrategyListResponse = {
|
||||
@ -226,17 +245,31 @@ export type WaveStrategyFetchAdminParams = WaveStrategyFetchStrategyId & {
|
||||
|
||||
export type WaveStrategyFetchPdaParams = WaveStrategyFetchAdminParams
|
||||
|
||||
/** 按策略创建抓取主流程任务后的响应(Admin / PDA 一致) */
|
||||
/** 按策略创建抓取主流程任务后的响应(Admin / PDA 一致,见 module order.wave) */
|
||||
export type WaveStrategyFetchTaskCreatedResponse = {
|
||||
state: string
|
||||
task_id: string
|
||||
task_no: string
|
||||
plan: Record<string, unknown>
|
||||
plan_summary: string
|
||||
state?: string
|
||||
/** fetch_state=2 时为 null;fetch_state=3 时可能为已有任务的 ID */
|
||||
task_id?: string | null
|
||||
task_no?: string | null
|
||||
/** 文档描述「existing task_id/task_no」时部分实现单独字段 */
|
||||
existing_task_id?: string | null
|
||||
existing_task_no?: string | null
|
||||
/** fetch_state=2 时后端可能返回空对象 */
|
||||
plan?: Record<string, unknown>
|
||||
plan_summary?: string
|
||||
warehouse_id?: number
|
||||
strategy_id?: number
|
||||
validation_errors?: Array<{ field?: string; message?: string }>
|
||||
message?: string
|
||||
/**
|
||||
* 1=成功创建任务(task_id/task_no)
|
||||
* 2=普通失败(task_id 常为 null)
|
||||
* 3=存在未完成任务(返回已有 task_id/task_no,可进入拣货流程)
|
||||
*/
|
||||
fetch_state?: number
|
||||
tip?: string
|
||||
/** fetch_state=3 时为 true,表示可直接进入拣货流程 */
|
||||
can_enter_pick_flow?: boolean
|
||||
}
|
||||
|
||||
/** @deprecated 使用 WaveStrategyFetchTaskCreatedResponse */
|
||||
@ -605,6 +638,22 @@ export function orderWaveWavePickTaskCancel(
|
||||
} as any)
|
||||
}
|
||||
|
||||
export function orderWaveWavePickTaskCancelSelf(
|
||||
data: WavePickTaskCancelSelfParams
|
||||
): Promise<WavePickTaskCancelSelfResponse & { code?: number; message?: string; data?: Partial<WavePickTaskCancelSelfResponse> }> {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'order.wave.wavePickTaskCancelSelf',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data,
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
|
||||
export function orderWaveGroupOrderFetchList(
|
||||
data: WaveGroupOrderFetchListParams = {}
|
||||
): Promise<WaveGroupOrderFetchListResponse & { code?: number; message?: string; data?: Partial<WaveGroupOrderFetchListResponse> }> {
|
||||
@ -1020,6 +1069,7 @@ export const orderWave = {
|
||||
batchList: orderWaveBatchList,
|
||||
wavePickTaskList: orderWaveWavePickTaskList,
|
||||
wavePickTaskCancel: orderWaveWavePickTaskCancel,
|
||||
wavePickTaskCancelSelf: orderWaveWavePickTaskCancelSelf,
|
||||
groupOrderFetchList: orderWaveGroupOrderFetchList,
|
||||
singleOrderFetchList: orderWaveSingleOrderFetchList,
|
||||
waveStrategyList: orderWaveWaveStrategyList,
|
||||
|
||||
21
src/api/order/order.ts
Normal file
21
src/api/order/order.ts
Normal file
@ -0,0 +1,21 @@
|
||||
import request from '@/utils/request'
|
||||
import type { WaveBatchListParams, WaveBatchListResponse } from '@/api/order.wave/orderwave'
|
||||
|
||||
const v = '1.0'
|
||||
|
||||
/** 文档模块 `order` 中的 `order.wave.batchList`(与 `order.wave/orderwave.ts` 行为一致) */
|
||||
export function orderModuleWaveBatchList(
|
||||
data: WaveBatchListParams = {}
|
||||
): Promise<WaveBatchListResponse & { code?: number; message?: string; data?: Partial<WaveBatchListResponse> }> {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'order.wave.batchList',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data,
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
@ -23,6 +23,36 @@ export function pickQuery(data: PickQueryParams): Promise<any> {
|
||||
} as any)
|
||||
}
|
||||
|
||||
export const pick = {
|
||||
query: pickQuery
|
||||
export type PickWavePickTaskDetailParams = {
|
||||
task_id: number
|
||||
}
|
||||
|
||||
export type PickWavePickTaskDetailResponse = {
|
||||
task?: Record<string, unknown>
|
||||
boxes?: Array<Record<string, unknown>>
|
||||
picking_details?: Array<Record<string, unknown>>
|
||||
picking_summary?: Record<string, unknown>
|
||||
picking_view?: Record<string, unknown>
|
||||
}
|
||||
|
||||
/** pick.wavePickTaskDetail:按任务 ID 取详情(与拣货模块文档一致) */
|
||||
export function pickWavePickTaskDetail(
|
||||
data: PickWavePickTaskDetailParams
|
||||
): Promise<PickWavePickTaskDetailResponse & { code?: number; message?: string; data?: Partial<PickWavePickTaskDetailResponse> }> {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'pick.wavePickTaskDetail',
|
||||
v,
|
||||
timestamp: new Date().getTime()
|
||||
},
|
||||
data,
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
}
|
||||
|
||||
export const pick = {
|
||||
query: pickQuery,
|
||||
wavePickTaskDetail: pickWavePickTaskDetail
|
||||
}
|
||||
|
||||
685
src/components/BatchReceivingPrintDialog.vue
Normal file
685
src/components/BatchReceivingPrintDialog.vue
Normal file
@ -0,0 +1,685 @@
|
||||
<template>
|
||||
<el-dialog v-model="visible" :title="dialogTitle" width="1135px" custom-class="print-dialog">
|
||||
<div class="print-dialog-layout">
|
||||
<div class="print-batch-list">
|
||||
<div class="list-title">打印队列 ({{ selectionRows.length }})</div>
|
||||
<div
|
||||
v-for="(row, index) in selectionRows"
|
||||
:key="row.id"
|
||||
class="batch-item"
|
||||
:class="{ active: currentPrintIndex === index }"
|
||||
@click="switchPrintItem(index)"
|
||||
>
|
||||
<span class="item-index">{{ index + 1 }}</span>
|
||||
<span class="item-number">{{ getQueueNumber(row) }}</span>
|
||||
<el-tag size="small" :type="getStatusTagType(row.id)">
|
||||
{{ getStatusLabel(row.id) }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="print-preview-main">
|
||||
<div class="print-settings-bar">
|
||||
<el-select
|
||||
v-if="!hideBusinessTypeSelect"
|
||||
v-model="printSettings.businessType"
|
||||
placeholder="请选择业务类型"
|
||||
size="small"
|
||||
@change="handleBusinessTypeChange"
|
||||
>
|
||||
<el-option v-for="item in businessTypeOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<el-select v-model="printSettings.station" placeholder="请选择打印台" size="small" @change="handleStationChange">
|
||||
<el-option v-for="item in stationOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select v-model="printSettings.printer" placeholder="请选择打印机" size="small" :loading="printerLoading">
|
||||
<el-option v-for="item in printerOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<el-select v-model="printSettings.template" placeholder="请选择打印模板" size="small">
|
||||
<el-option v-for="item in templateOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<div class="print-canvas-area">
|
||||
<div
|
||||
v-if="previewInfo.width && previewInfo.height"
|
||||
class="preview-page"
|
||||
:style="{ width: previewInfo.width + 'mm', height: previewInfo.height + 'mm', position: 'relative' }"
|
||||
>
|
||||
<div v-for="(item, idx) in previewObjects" :key="item.id" :style="computePreviewItemStyle(item, idx)">
|
||||
<template v-if="item.type === 'text'">
|
||||
<span>{{ getPreviewValue(item) }}</span>
|
||||
</template>
|
||||
<template v-else-if="item.type === 'barcode'">
|
||||
<barcode-img :text="getPreviewValue(item) || '0123456789'" />
|
||||
</template>
|
||||
<template v-else-if="item.type === 'qrcode'">
|
||||
<img
|
||||
:src="'https://ye4s.wms.gztbyc.com/qrcode/build?text=' + encodeURIComponent(getPreviewValue(item) || '')"
|
||||
alt=""
|
||||
style="width: 100%; height: 100%; object-fit: contain;"
|
||||
/>
|
||||
</template>
|
||||
<template v-else-if="item.type === 'image'">
|
||||
<img :src="item.content" alt="" style="width: 100%; height: 100%; object-fit: fill;" />
|
||||
</template>
|
||||
<template v-else-if="item.type === 'table'">
|
||||
<table style="border: 1px solid #000; border-collapse: collapse;" border="1" cellspacing="0" cellpadding="0" width="100%" height="auto">
|
||||
<thead>
|
||||
<tr>
|
||||
<td
|
||||
v-for="c in item.rows"
|
||||
:key="c.id"
|
||||
:style="{ width: c.width + 'mm', fontSize: '3mm', textAlign: 'center', border: '1px solid #000', height: (item.headerHeight || 4) + 'mm' }"
|
||||
>
|
||||
{{ c.title }}
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr
|
||||
v-for="(detailItem, dIdx) in (printForm.details && printForm.details.length ? printForm.details : [printForm])"
|
||||
:key="dIdx"
|
||||
>
|
||||
<td
|
||||
v-for="c in item.rows"
|
||||
:key="c.id + '_v'"
|
||||
:style="{ fontSize: '3mm', textAlign: 'center', border: '1px solid #000', height: (item.rowHeight || 4) + 'mm' }"
|
||||
>
|
||||
{{ detailItem[c.field_code] || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</template>
|
||||
<template v-else-if="item.type === 'shape'">
|
||||
<div style="width: 100%; height: 100%;" />
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="preview-empty">
|
||||
<el-empty description="请在上方选择打印模板" :image-size="60" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<span class="progress-tip">进度: {{ completedPrintCount }} / {{ selectionRows.length }}</span>
|
||||
<div>
|
||||
<el-button @click="visible = false">关闭</el-button>
|
||||
<el-button type="primary" :loading="printing" @click="doPrint">
|
||||
{{ currentPrintIndex < selectionRows.length - 1 ? '打印并切换下一个' : '打印当前单据' }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, h, reactive, ref, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import JsBarcode from 'jsbarcode'
|
||||
import * as receivingApi from '@/api/storage_receiving/receiving'
|
||||
import * as templateApi from '@/api/setting.printtemplate/printTemplate'
|
||||
import * as stationApi from '@/api/print/print'
|
||||
import { printFormConfig } from '@/views/storage/receiving/receiving-config'
|
||||
|
||||
type RowItem = {
|
||||
id: string | number
|
||||
receiving_number?: string
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
modelValue: boolean
|
||||
selectionRows: RowItem[]
|
||||
businessType?: string
|
||||
dialogTitle?: string
|
||||
queueNoField?: string
|
||||
documentLabel?: string
|
||||
hideBusinessTypeSelect?: boolean
|
||||
fetchPrintData?: (row: RowItem, index: number) => Promise<any>
|
||||
}>(), {
|
||||
selectionRows: () => [],
|
||||
businessType: 'RECEIPT',
|
||||
dialogTitle: '批量打印收货单',
|
||||
queueNoField: 'receiving_number',
|
||||
documentLabel: '单据',
|
||||
hideBusinessTypeSelect: false
|
||||
})
|
||||
|
||||
const emit = defineEmits<{
|
||||
(e: 'update:modelValue', value: boolean): void
|
||||
}>()
|
||||
|
||||
const visible = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (value: boolean) => emit('update:modelValue', value)
|
||||
})
|
||||
const dialogTitle = computed(() => props.dialogTitle || '批量打印收货单')
|
||||
|
||||
const printing = ref(false)
|
||||
const currentPrintIndex = ref(0)
|
||||
const printStatusMap = ref<Record<string | number, string>>({})
|
||||
const printForm = reactive<any>({})
|
||||
const printSettings = reactive({
|
||||
businessType: 'RECEIPT',
|
||||
station: '' as string | number,
|
||||
printer: '',
|
||||
template: '' as string | number
|
||||
})
|
||||
const stationOptions = ref<any[]>([])
|
||||
const printerOptions = ref<any[]>([])
|
||||
const templateOptions = ref<any[]>([])
|
||||
const printerLoading = ref(false)
|
||||
const businessTypeOptions = [
|
||||
{ label: '收货单 (RECEIPT)', value: 'RECEIPT' },
|
||||
{ label: '库存单 (STOCK)', value: 'STOCK' },
|
||||
{ label: '拣货单 (PICKING)', value: 'PICKING' }
|
||||
]
|
||||
|
||||
const barcodeImg = {
|
||||
props: ['text'],
|
||||
setup(innerProps: any) {
|
||||
const src = ref('')
|
||||
const renderBarcode = (val: string) => {
|
||||
if (!val) {
|
||||
src.value = ''
|
||||
return
|
||||
}
|
||||
const canvas = document.createElement('canvas')
|
||||
try {
|
||||
JsBarcode(canvas, val, { format: 'CODE128', width: 2, height: 40, displayValue: false, margin: 0 })
|
||||
src.value = canvas.toDataURL()
|
||||
} catch {
|
||||
src.value = ''
|
||||
}
|
||||
}
|
||||
watch(() => innerProps.text, (val: string) => renderBarcode(val), { immediate: true })
|
||||
return () => h('img', { src: src.value, style: { display: 'block', width: '100%', height: '100%', objectFit: 'fill' } })
|
||||
}
|
||||
}
|
||||
|
||||
const previewInfo = computed(() => {
|
||||
const t = templateOptions.value.find((item: any) => item.id === printSettings.template)
|
||||
if (!t) return { width: 0, height: 0 }
|
||||
return { width: t.page_width || 0, height: t.page_height || 0 }
|
||||
})
|
||||
|
||||
const previewObjects = computed(() => {
|
||||
const t = templateOptions.value.find((item: any) => item.id === printSettings.template)
|
||||
if (!t || !Array.isArray(t.template_content)) return []
|
||||
return t.template_content
|
||||
})
|
||||
|
||||
const completedPrintCount = computed(() => {
|
||||
return Object.values(printStatusMap.value).filter(s => s === 'done').length
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.modelValue,
|
||||
value => {
|
||||
if (value) {
|
||||
initDialog()
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
async function initDialog() {
|
||||
currentPrintIndex.value = 0
|
||||
printStatusMap.value = {}
|
||||
props.selectionRows.forEach(row => {
|
||||
printStatusMap.value[row.id] = 'pending'
|
||||
})
|
||||
resetPrintData()
|
||||
if (props.selectionRows.length > 0) {
|
||||
await loadPrintFormData(0)
|
||||
}
|
||||
await loadPrintOptions()
|
||||
}
|
||||
|
||||
function resetPrintData() {
|
||||
Object.keys(printForm).forEach(key => delete printForm[key])
|
||||
printSettings.businessType = resolveBusinessType()
|
||||
printSettings.station = ''
|
||||
printSettings.printer = ''
|
||||
printSettings.template = ''
|
||||
stationOptions.value = []
|
||||
printerOptions.value = []
|
||||
templateOptions.value = []
|
||||
}
|
||||
|
||||
function getStatusTagType(rowId: string | number) {
|
||||
const status = printStatusMap.value[rowId]
|
||||
if (status === 'done') return 'success'
|
||||
if (status === 'error') return 'danger'
|
||||
return 'info'
|
||||
}
|
||||
|
||||
function getQueueNumber(row: RowItem) {
|
||||
const field = props.queueNoField || 'receiving_number'
|
||||
return String(row?.[field] ?? row?.receiving_number ?? row?.id ?? '—')
|
||||
}
|
||||
|
||||
function getStatusLabel(rowId: string | number) {
|
||||
const status = printStatusMap.value[rowId]
|
||||
if (status === 'done') return '已打印'
|
||||
if (status === 'error') return '失败'
|
||||
return '待打印'
|
||||
}
|
||||
|
||||
function getPreviewValue(item: any): string {
|
||||
if (item.field_code && printForm[item.field_code] !== undefined && printForm[item.field_code] !== '') {
|
||||
return String(printForm[item.field_code])
|
||||
}
|
||||
return item.content || ''
|
||||
}
|
||||
|
||||
function computePreviewItemStyle(value: any, idx: string | number): any {
|
||||
const idxNum = Number(idx)
|
||||
const base: any = {
|
||||
position: 'absolute',
|
||||
left: value.left + 'mm',
|
||||
top: value.top + 'mm',
|
||||
width: value.width + 'mm',
|
||||
height: value.height + 'mm',
|
||||
zIndex: idxNum + 1,
|
||||
textAlign: value.textAlign || 'left',
|
||||
lineHeight: (value.lineHeight || 6) + 'mm',
|
||||
transform: `rotate(${(value.rotate || 0) * 90}deg)`,
|
||||
transformOrigin: 'center center',
|
||||
overflow: 'hidden'
|
||||
}
|
||||
if (value.type === 'text') {
|
||||
Object.assign(base, {
|
||||
fontSize: (value.fontSize || 8) + 'pt',
|
||||
lineHeight: (value.lineHeight || 6) + 'mm',
|
||||
fontWeight: value.bold ? 'bold' : 'normal',
|
||||
fontStyle: value.italic ? 'italic' : 'normal',
|
||||
textDecoration: value.underline ? 'underline' : 'none',
|
||||
whiteSpace: value.autoWrap ? 'pre-wrap' : 'nowrap',
|
||||
writingMode: value.direction === 'vertical' ? 'vertical-rl' : 'horizontal-tb'
|
||||
})
|
||||
}
|
||||
if (value.type === 'table') {
|
||||
base.width = 'auto'
|
||||
base.height = 'auto'
|
||||
}
|
||||
if (value.type === 'shape') {
|
||||
if (value.shapeType === 'line') {
|
||||
base.border = 'none'
|
||||
base.borderTop = `${value.lineWeight || 1}pt ${value.lineStyle || 'solid'} #000`
|
||||
base.backgroundColor = 'transparent'
|
||||
base.height = 'auto'
|
||||
} else if (value.shapeType === 'vertical-line') {
|
||||
base.border = 'none'
|
||||
base.borderLeft = `${value.lineWeight || 1}pt ${value.lineStyle || 'solid'} #000`
|
||||
base.backgroundColor = 'transparent'
|
||||
base.width = 'auto'
|
||||
} else if (value.shapeType === 'box') {
|
||||
base.border = `${value.lineWeight || 1}pt ${value.lineStyle || 'solid'} #000`
|
||||
base.backgroundColor = 'transparent'
|
||||
}
|
||||
}
|
||||
return base
|
||||
}
|
||||
|
||||
async function switchPrintItem(index: number) {
|
||||
if (printing.value) return
|
||||
currentPrintIndex.value = index
|
||||
await loadPrintFormData(index)
|
||||
}
|
||||
|
||||
async function loadPrintFormData(index: number) {
|
||||
const mainRow = props.selectionRows[index]
|
||||
if (!mainRow) return
|
||||
|
||||
if (props.fetchPrintData) {
|
||||
try {
|
||||
const formData = await props.fetchPrintData(mainRow, index)
|
||||
Object.keys(printForm).forEach(key => delete printForm[key])
|
||||
Object.assign(printForm, formData || {})
|
||||
} catch (e) {
|
||||
console.error('加载打印数据失败', e)
|
||||
Object.keys(printForm).forEach(key => delete printForm[key])
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
const formData: any = {}
|
||||
printFormConfig.forEach(group => {
|
||||
group.fields.forEach((field: any) => {
|
||||
const val = mainRow[field.prop] || ''
|
||||
if (field.type === 'select' && field.options) {
|
||||
const opt = field.options.find((o: any) => o.value === val)
|
||||
formData[field.prop] = opt ? opt.label : val
|
||||
} else {
|
||||
formData[field.prop] = val
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const detailFields = ['product_name', 'barcode', 'box_quantity', 'boxes_per_pallet', 'weight', 'actual_quantity', 'remark']
|
||||
detailFields.forEach(f => {
|
||||
formData[f] = ''
|
||||
})
|
||||
|
||||
try {
|
||||
const res: any = await receivingApi.getReceivingDetail({
|
||||
id: mainRow.id,
|
||||
pagination: { page: 1, pageSize: 1000 }
|
||||
})
|
||||
if (res && res.code === 200) {
|
||||
const details = res.data.receiving?.details || []
|
||||
const processedDetails = details.map((item: any) => {
|
||||
const newItem = { ...item }
|
||||
const detailConfig = printFormConfig.find(group => group.group === '商品明细')
|
||||
if (detailConfig) {
|
||||
detailConfig.fields.forEach((field: any) => {
|
||||
const val = newItem[field.prop]
|
||||
if (field.type === 'select' && field.options) {
|
||||
const opt = field.options.find((o: any) => o.value === val)
|
||||
newItem[field.prop] = opt ? opt.label : val
|
||||
} else if (val === undefined || val === null) {
|
||||
newItem[field.prop] = ''
|
||||
}
|
||||
})
|
||||
}
|
||||
return newItem
|
||||
})
|
||||
|
||||
formData.details = processedDetails
|
||||
|
||||
if (processedDetails.length > 0) {
|
||||
const detail = processedDetails[0]
|
||||
const detailConfig = printFormConfig.find(group => group.group === '商品明细')
|
||||
if (detailConfig) {
|
||||
detailConfig.fields.forEach((field: any) => {
|
||||
formData[field.prop] = detail[field.prop]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载打印明细失败', e)
|
||||
}
|
||||
|
||||
Object.keys(printForm).forEach(key => delete printForm[key])
|
||||
Object.assign(printForm, formData)
|
||||
}
|
||||
|
||||
async function loadPrintOptions() {
|
||||
try {
|
||||
const stations: any = await stationApi.getList({ page: 1, pageSize: 100, where: {} })
|
||||
|
||||
if (stations && (stations.code === 200 || stations.code === 0)) {
|
||||
const rawList: any[] = stations.data?.list || stations.data || []
|
||||
stationOptions.value = rawList.map((item: any) => ({
|
||||
id: item.id,
|
||||
name: item.name || item.label || String(item.id)
|
||||
}))
|
||||
} else {
|
||||
console.warn('获取打印台列表失败:', stations)
|
||||
}
|
||||
|
||||
await loadTemplatesByBusinessType()
|
||||
} catch (e) {
|
||||
console.error('加载打印配置失败', e)
|
||||
}
|
||||
}
|
||||
|
||||
function resolveBusinessType() {
|
||||
const fromProp = String(props.businessType || '').trim()
|
||||
if (isSupportedBusinessType(fromProp)) return fromProp
|
||||
const firstRow = props.selectionRows[0]
|
||||
const fromRow = String(firstRow?.business_type ?? firstRow?.businessType ?? '').trim()
|
||||
if (isSupportedBusinessType(fromRow)) return fromRow
|
||||
return 'RECEIPT'
|
||||
}
|
||||
|
||||
function isSupportedBusinessType(value: string) {
|
||||
return ['STOCK', 'RECEIPT', 'PICKING'].includes(value)
|
||||
}
|
||||
|
||||
async function handleBusinessTypeChange() {
|
||||
printSettings.template = ''
|
||||
await loadTemplatesByBusinessType()
|
||||
}
|
||||
|
||||
function isApiSuccess(res: any) {
|
||||
return res && (res.code === 200 || res.code === 0)
|
||||
}
|
||||
|
||||
function normalizeTemplateListResponse(res: any): any[] {
|
||||
if (!isApiSuccess(res)) return []
|
||||
const d = res.data
|
||||
if (Array.isArray(d)) return d
|
||||
if (Array.isArray(d?.list)) return d.list
|
||||
if (Array.isArray(d?.templates)) return d.templates
|
||||
if (Array.isArray(d?.records)) return d.records
|
||||
if (Array.isArray(res.list)) return res.list
|
||||
if (Array.isArray(res.templates)) return res.templates
|
||||
if (Array.isArray(res.records)) return res.records
|
||||
return []
|
||||
}
|
||||
|
||||
async function loadTemplatesByBusinessType() {
|
||||
try {
|
||||
const templates: any = await templateApi.listTemplatesByType({ businessType: printSettings.businessType })
|
||||
if (isApiSuccess(templates)) {
|
||||
templateOptions.value = normalizeTemplateListResponse(templates).map((item: any) => ({
|
||||
...item,
|
||||
id: item.id,
|
||||
name: item.title || item.name || item.template_name || String(item.id)
|
||||
}))
|
||||
} else {
|
||||
templateOptions.value = []
|
||||
console.warn('获取模板列表失败:', templates)
|
||||
}
|
||||
} catch (e) {
|
||||
templateOptions.value = []
|
||||
console.error('加载模板失败', e)
|
||||
}
|
||||
}
|
||||
|
||||
async function handleStationChange(val: string | number) {
|
||||
printSettings.printer = ''
|
||||
printerOptions.value = []
|
||||
if (!val) return
|
||||
|
||||
printerLoading.value = true
|
||||
try {
|
||||
const res: any = await stationApi.getComputerPrinter(String(val))
|
||||
if (res && res.code === 0 && res.data) {
|
||||
const printerList = Array.isArray(res.data) ? res.data : (res.data.list || [])
|
||||
printerOptions.value = printerList.map((item: any) => ({
|
||||
label: item.name || item.printerName || item,
|
||||
value: item.name || item.printerName || item
|
||||
}))
|
||||
} else {
|
||||
console.warn('获取打印机列表失败:', res)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('获取打印机列表出错:', e)
|
||||
} finally {
|
||||
printerLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
async function doPrint() {
|
||||
if (!printSettings.station || !printSettings.template) {
|
||||
ElMessage.warning('请选择打印台和模板')
|
||||
return
|
||||
}
|
||||
if (!printSettings.printer) {
|
||||
ElMessage.warning('请选择打印机')
|
||||
return
|
||||
}
|
||||
|
||||
printing.value = true
|
||||
const currentRow = props.selectionRows[currentPrintIndex.value]
|
||||
if (!currentRow) {
|
||||
printing.value = false
|
||||
return
|
||||
}
|
||||
|
||||
try {
|
||||
const selectedTemplateObj = templateOptions.value.find((item: any) => item.id === printSettings.template) || null
|
||||
const printPayload = {
|
||||
type: 'customize',
|
||||
computerId: printSettings.station,
|
||||
printer: printSettings.printer,
|
||||
template: selectedTemplateObj,
|
||||
data: { ...printForm },
|
||||
timestamp: Date.now(),
|
||||
size: 1
|
||||
}
|
||||
|
||||
const res: any = await stationApi.sendPrint(printPayload)
|
||||
if (res && (res.code === 0 || res.code === 200 || res.status === 'success' || res.flag === 'success')) {
|
||||
printStatusMap.value[currentRow.id] = 'done'
|
||||
ElMessage.success(`${props.documentLabel} ${getQueueNumber(currentRow)} 打印成功`)
|
||||
|
||||
if (currentPrintIndex.value < props.selectionRows.length - 1) {
|
||||
currentPrintIndex.value++
|
||||
await loadPrintFormData(currentPrintIndex.value)
|
||||
} else {
|
||||
ElMessage.info('已完成所有选中单据的打印操作')
|
||||
}
|
||||
} else {
|
||||
printStatusMap.value[currentRow.id] = 'error'
|
||||
ElMessage.error(res?.msg || res?.message || `${props.documentLabel} ${getQueueNumber(currentRow)} 打印失败`)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('打印出错:', e)
|
||||
printStatusMap.value[currentRow.id] = 'error'
|
||||
ElMessage.error('打印请求失败,请检查网络或打印台状态')
|
||||
} finally {
|
||||
printing.value = false
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.print-dialog-layout {
|
||||
display: flex;
|
||||
height: 1150px;
|
||||
border: 1px solid #ebeef5;
|
||||
|
||||
.print-batch-list {
|
||||
width: 250px;
|
||||
border-right: 1px solid #ebeef5;
|
||||
background-color: #fafafa;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
max-height: 100%;
|
||||
|
||||
.list-title {
|
||||
padding: 10px;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.batch-item {
|
||||
padding: 12px 15px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
border-bottom: 1px dotted #eee;
|
||||
transition: background 0.2s;
|
||||
|
||||
&:hover {
|
||||
background-color: #f0f7ff;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: #e6f7ff;
|
||||
border-left: 3px solid #1890ff;
|
||||
}
|
||||
|
||||
.item-index {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.item-number {
|
||||
flex: 1;
|
||||
font-weight: 500;
|
||||
font-family: monospace;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.print-preview-main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
|
||||
.print-settings-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 10px 15px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
background-color: #fafafa;
|
||||
flex-shrink: 0;
|
||||
|
||||
.el-select {
|
||||
flex: 1;
|
||||
min-width: 130px;
|
||||
}
|
||||
}
|
||||
|
||||
.print-canvas-area {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
padding: 20px;
|
||||
background-color: #f0f2f5;
|
||||
|
||||
.preview-page {
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
|
||||
border: 1px solid #ddd;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.preview-empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
|
||||
.progress-tip {
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.print-dialog .el-dialog) {
|
||||
top: 50% !important;
|
||||
transform: translateY(-50%) !important;
|
||||
}
|
||||
</style>
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="scan-box-container" >
|
||||
<div class="scan-box-container" :style="{ width }">
|
||||
<!-- Tab 切换 -->
|
||||
<div class="scan-tabs">
|
||||
<el-tabs v-model="activeTab" stretch @tab-click="handleTabChange">
|
||||
@ -388,7 +388,7 @@ const props = defineProps({
|
||||
// 组件宽度
|
||||
width: {
|
||||
type: String,
|
||||
default: '300px'
|
||||
default: '250px'
|
||||
},
|
||||
|
||||
// 预设树状条件
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
cache-key="orderManagement:archiveOrder"
|
||||
width="320px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:preset-tree="presetTree"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
cache-key="orderManagement:deliveryException"
|
||||
width="320px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:preset-tree="presetTree"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
cache-key="orderManagement:deliveryOrder"
|
||||
width="320px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:preset-tree="presetTree"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
cache-key="orderManagement:entrustWarehouse"
|
||||
width="320px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:preset-tree="presetTree"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
cache-key="orderManagement:exceptionOrder"
|
||||
width="320px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:preset-tree="presetTree"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
cache-key="orderManagement:outboundOrder"
|
||||
width="320px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:preset-tree="presetTree"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
cache-key="orderManagement:pendingOrder"
|
||||
width="320px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:initial-conditions="initialConditions"
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
cache-key="orderManagement:reviewOrder"
|
||||
width="320px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:preset-tree="presetTree"
|
||||
|
||||
@ -442,7 +442,7 @@
|
||||
<div class="single-fallback-layout">
|
||||
<scan-box
|
||||
ref="fallbackOrderScanBox"
|
||||
width="300px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:available-fields="fallbackOrderAvailableFieldsRef"
|
||||
@ -575,6 +575,11 @@
|
||||
>
|
||||
<el-table-column prop="id" label="ID" width="72" align="center" />
|
||||
<el-table-column prop="strategy_name" label="策略名称" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="波次前缀" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
{{ row.wave_prefix || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="warehouse_id" label="仓库ID" width="96" align="center" />
|
||||
<el-table-column label="策略类型" width="88" align="center">
|
||||
<template #default="{ row }">{{ row.strategy_type ?? '—' }}</template>
|
||||
@ -841,13 +846,14 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<wave-batch-print-preview-dialog
|
||||
<batch-receiving-print-dialog
|
||||
v-model="wavePrintDialogVisible"
|
||||
:loading="wavePrintDialogLoading"
|
||||
:error-message="wavePrintDialogError"
|
||||
:payload="wavePrintDialogPayload"
|
||||
:request-meta="wavePrintRequestMeta"
|
||||
align-center
|
||||
:selection-rows="wavePrintRows"
|
||||
business-type="PICKING"
|
||||
dialog-title="批量打印货单"
|
||||
queue-no-field="wave_no"
|
||||
document-label="波次"
|
||||
:fetch-print-data="loadWavePrintFormData"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -877,6 +883,7 @@ import {
|
||||
} from './config/wave-config'
|
||||
import { safeInvoke } from '@/utils/safe-invoke'
|
||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||
import BatchReceivingPrintDialog from '@/components/BatchReceivingPrintDialog.vue'
|
||||
import PendingOrderListPanel from './component/PendingOrderListPanel.vue'
|
||||
import WaveBatchDetailPanel from './component/WaveBatchDetailPanel.vue'
|
||||
import WaveFetchTaskProgressDialog from './component/WaveFetchTaskProgressDialog.vue'
|
||||
@ -938,8 +945,6 @@ import type {
|
||||
} from '@/api/order.wave/orderwave'
|
||||
import { useUserStore } from '@/stores/modules/user'
|
||||
import { getWavePrintData } from '@/api/order.print/orderprint'
|
||||
import type { WavePrintDataPayload } from '@/api/order.print/orderprint'
|
||||
import WaveBatchPrintPreviewDialog from './component/WaveBatchPrintPreviewDialog.vue'
|
||||
import pcasCodeData from 'china-division/dist/pcas-code.json'
|
||||
const WAVE_TYPE = 1 as const
|
||||
|
||||
@ -962,10 +967,8 @@ const batchAllocateStorageLoading = ref(false)
|
||||
const batchRemoveExceptionOrdersLoading = ref(false)
|
||||
const userStore = useUserStore()
|
||||
const wavePrintDialogVisible = ref(false)
|
||||
const wavePrintDialogLoading = ref(false)
|
||||
const wavePrintDialogError = ref('')
|
||||
const wavePrintDialogPayload = ref<WavePrintDataPayload | null>(null)
|
||||
const wavePrintRequestMeta = ref<{ warehouse_id: number; wave_ids: Array<number | string> } | null>(null)
|
||||
const wavePrintRows = ref<any[]>([])
|
||||
const wavePrintDataMap = ref<Record<string, any>>({})
|
||||
const queryTime = ref(0)
|
||||
const tableSize = ref('small')
|
||||
const activeTab = ref('detail')
|
||||
@ -1257,6 +1260,67 @@ const currentWaveType = computed(() => WAVE_TYPE)
|
||||
const tableListId = computed(() => `wave-management-list-${WAVE_TYPE}`)
|
||||
|
||||
const okCode = (code: unknown) => code === 1 || code === 200 || code === 0
|
||||
|
||||
function unwrapWaveStrategyFetchPayload(res: any): WaveStrategyFetchTaskCreatedResponse {
|
||||
if (res && typeof res.data === 'object' && res.data !== null && !Array.isArray(res.data)) {
|
||||
return res.data as WaveStrategyFetchTaskCreatedResponse
|
||||
}
|
||||
return res as WaveStrategyFetchTaskCreatedResponse
|
||||
}
|
||||
|
||||
function applyWaveStrategyFetchUiResult(
|
||||
payload: WaveStrategyFetchTaskCreatedResponse,
|
||||
options: { defaultSuccessHint?: string; afterSuccess?: () => void | Promise<void> } = {}
|
||||
) {
|
||||
const validationErrors = payload?.validation_errors
|
||||
if (Array.isArray(validationErrors) && validationErrors.length) {
|
||||
const detail = validationErrors
|
||||
.map((e) => [e?.field, e?.message].filter(Boolean).join(': ') || '')
|
||||
.filter(Boolean)
|
||||
.join(';')
|
||||
ElMessage.warning(detail || payload?.message || '入参校验未通过')
|
||||
return
|
||||
}
|
||||
|
||||
const fs = payload.fetch_state
|
||||
|
||||
if (fs === 2) {
|
||||
ElMessage.warning(payload.tip || payload.message || '抓取任务创建失败')
|
||||
return
|
||||
}
|
||||
|
||||
if (fs === 3) {
|
||||
const taskId = String(payload.task_id ?? payload.existing_task_id ?? '')
|
||||
const taskNo = String(payload.task_no ?? payload.existing_task_no ?? '')
|
||||
const tip =
|
||||
payload.tip ||
|
||||
payload.message ||
|
||||
(payload.can_enter_pick_flow ? '存在未完成任务,可直接进入拣货流程' : '存在未完成的抓取任务')
|
||||
const suffix = [taskNo ? `任务编号:${taskNo}` : '', taskId ? `任务ID:${taskId}` : ''].filter(Boolean).join(',')
|
||||
ElMessage.success(suffix ? `${tip}(${suffix})` : tip)
|
||||
const after = options.afterSuccess
|
||||
if (after) void after()
|
||||
return
|
||||
}
|
||||
|
||||
if (fs === 1 || fs === undefined || fs === null) {
|
||||
const taskId = String(payload?.task_id ?? '')
|
||||
const taskNo = String(payload?.task_no ?? '')
|
||||
const summary = String(payload?.plan_summary ?? '')
|
||||
if (fs === 1 && !taskId && !taskNo && !summary) {
|
||||
ElMessage.warning(payload?.message || '接口未返回任务信息')
|
||||
return
|
||||
}
|
||||
const hint = summary || payload?.message || options.defaultSuccessHint || '抓取任务已创建'
|
||||
const suffix = [taskNo ? `任务编号:${taskNo}` : '', taskId ? `任务ID:${taskId}` : ''].filter(Boolean).join(',')
|
||||
ElMessage.success(suffix ? `${hint}(${suffix})` : hint)
|
||||
const after = options.afterSuccess
|
||||
if (after) void after()
|
||||
return
|
||||
}
|
||||
|
||||
ElMessage.warning(payload?.message || `未知抓取状态(fetch_state=${String(fs)})`)
|
||||
}
|
||||
const printableSelectionRows = computed(() => selectionRows.value.filter((row: any) => !isAutoGroupingWave(row)))
|
||||
const autoGroupingSelectionRows = computed(() => selectionRows.value.filter((row: any) => isAutoGroupingWave(row)))
|
||||
const selectedWaveOrderTotal = computed(() => {
|
||||
@ -1685,7 +1749,7 @@ async function handleBatchFinishAutoGrouping() {
|
||||
}
|
||||
}
|
||||
|
||||
function unwrapWavePrintPayload(res: any): WavePrintDataPayload {
|
||||
function unwrapWavePrintPayload(res: any) {
|
||||
const inner =
|
||||
res?.data !== undefined && res?.data !== null && typeof res.data === 'object' && !Array.isArray(res.data)
|
||||
? res.data
|
||||
@ -1707,6 +1771,33 @@ function unwrapWavePrintPayload(res: any): WavePrintDataPayload {
|
||||
return { summary, wave_list, ext }
|
||||
}
|
||||
|
||||
function getWaveOrders(wave: Record<string, unknown>) {
|
||||
const keys = ['orders', 'order_list', 'order_details', 'items', 'print_orders', 'order_rows', 'details']
|
||||
for (const key of keys) {
|
||||
const value = wave[key]
|
||||
if (Array.isArray(value)) return value
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
function toWavePrintForm(wave: Record<string, unknown>) {
|
||||
const details = getWaveOrders(wave)
|
||||
return {
|
||||
...wave,
|
||||
wave_no: String(wave.wave_no ?? wave.batch_no ?? wave.wave_code ?? wave.id ?? '—'),
|
||||
details
|
||||
}
|
||||
}
|
||||
|
||||
function rowWaveKey(row: any) {
|
||||
return String(row?.id ?? row?.wave_id ?? row?.batch_id ?? row?.wave_no ?? '')
|
||||
}
|
||||
|
||||
async function loadWavePrintFormData(row: any) {
|
||||
const key = rowWaveKey(row)
|
||||
return wavePrintDataMap.value[key] || toWavePrintForm(row || {})
|
||||
}
|
||||
|
||||
async function handleBatchPrint() {
|
||||
if (!isGroupWaveTab.value) {
|
||||
ElMessage.warning('批量打印仅在「团购波次」页签可用')
|
||||
@ -1762,23 +1853,30 @@ async function handleBatchPrint() {
|
||||
return
|
||||
}
|
||||
|
||||
wavePrintRequestMeta.value = { warehouse_id: warehouseId, wave_ids }
|
||||
wavePrintDialogPayload.value = null
|
||||
wavePrintDialogError.value = ''
|
||||
wavePrintDialogVisible.value = true
|
||||
wavePrintDialogLoading.value = true
|
||||
|
||||
batchPrintLoading.value = true
|
||||
try {
|
||||
const res: any = await getWavePrintData({ warehouse_id: warehouseId, wave_ids })
|
||||
wavePrintDialogPayload.value = unwrapWavePrintPayload(res)
|
||||
const waveCount = wavePrintDialogPayload.value.wave_list?.length ?? 0
|
||||
const payload = unwrapWavePrintPayload(res)
|
||||
const waveList = Array.isArray(payload.wave_list) ? payload.wave_list : []
|
||||
const nextMap: Record<string, any> = {}
|
||||
waveList.forEach((wave: Record<string, unknown>) => {
|
||||
const key = String(wave.id ?? wave.wave_id ?? wave.batch_id ?? wave.wave_no ?? '')
|
||||
if (!key) return
|
||||
nextMap[key] = toWavePrintForm(wave)
|
||||
})
|
||||
wavePrintRows.value = rows.map((item: any) => ({
|
||||
...item,
|
||||
wave_no: String(item?.wave_no ?? item?.batch_no ?? item?.wave_code ?? item?.id ?? '—')
|
||||
}))
|
||||
wavePrintDataMap.value = nextMap
|
||||
wavePrintDialogVisible.value = true
|
||||
const waveCount = waveList.length
|
||||
ElMessage.success(res?.message || `已获取打印数据,返回 ${waveCount} 个波次`)
|
||||
} catch (error: any) {
|
||||
wavePrintDialogError.value = error?.message || '获取波次打印数据失败'
|
||||
wavePrintDialogPayload.value = null
|
||||
wavePrintRows.value = []
|
||||
wavePrintDataMap.value = {}
|
||||
ElMessage.error(error?.message || '获取波次打印数据失败')
|
||||
} finally {
|
||||
wavePrintDialogLoading.value = false
|
||||
batchPrintLoading.value = false
|
||||
}
|
||||
}
|
||||
@ -2780,7 +2878,9 @@ async function fetchWaveStrategyList() {
|
||||
pagination: {
|
||||
page: waveStrategyPagination.currentPage,
|
||||
pageSize: waveStrategyPagination.pageSize
|
||||
}
|
||||
},
|
||||
/** module order.wave:strategy_type 1=散单 2=团购(本页为团购波次) */
|
||||
strategy_type: 2,
|
||||
}) as WaveStrategyListResponse & { code?: number; message?: string; data?: Partial<WaveStrategyListResponse> }
|
||||
if (!res || !okCode(res.code)) {
|
||||
throw new Error(res?.message || '获取波次策略列表失败')
|
||||
@ -2818,30 +2918,17 @@ async function submitWaveStrategyFetchAdmin(row: Record<string, any>) {
|
||||
try {
|
||||
const res = await orderWaveWaveStrategyFetchAdmin({
|
||||
strategy_id: strategyId,
|
||||
source: 'pda'
|
||||
source: 'admin',
|
||||
operation_source: 'admin'
|
||||
}) as WaveStrategyFetchTaskCreatedResponse & { code?: number; message?: string }
|
||||
if (!res || !okCode(res.code)) {
|
||||
throw new Error(res?.message || '提交后台抓取任务失败')
|
||||
}
|
||||
const payload =
|
||||
res && typeof (res as any).data === 'object' && (res as any).data !== null && !Array.isArray((res as any).data)
|
||||
? ((res as any).data as WaveStrategyFetchTaskCreatedResponse)
|
||||
: (res as WaveStrategyFetchTaskCreatedResponse)
|
||||
const validationErrors = payload?.validation_errors
|
||||
if (Array.isArray(validationErrors) && validationErrors.length) {
|
||||
const detail = validationErrors
|
||||
.map((e) => [e?.field, e?.message].filter(Boolean).join(': ') || '')
|
||||
.filter(Boolean)
|
||||
.join(';')
|
||||
ElMessage.warning(detail || payload?.message || '入参校验未通过')
|
||||
return
|
||||
}
|
||||
const taskId = String(payload?.task_id || '')
|
||||
const taskNo = String(payload?.task_no || '')
|
||||
const summary = String(payload?.plan_summary || '')
|
||||
const hint = summary || payload?.message || res?.message || '后台抓取任务已创建'
|
||||
const suffix = [taskNo ? `任务编号:${taskNo}` : '', taskId ? `任务ID:${taskId}` : ''].filter(Boolean).join(',')
|
||||
ElMessage.success(suffix ? `${hint}(${suffix})` : hint)
|
||||
const payload = unwrapWaveStrategyFetchPayload(res)
|
||||
applyWaveStrategyFetchUiResult(payload, {
|
||||
defaultSuccessHint: '后台抓取任务已创建',
|
||||
afterSuccess: () => fetchWaveStrategyList()
|
||||
})
|
||||
} catch (error: any) {
|
||||
console.error('submit wave strategy fetch admin failed:', error)
|
||||
ElMessage.error(error?.message || '提交后台抓取任务失败')
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="order-sub-container">
|
||||
<scan-box
|
||||
v-if="!singleOrderOnlyView"
|
||||
ref="scanBox"
|
||||
:width="waveScanBoxConfig.width"
|
||||
:tree-props="waveScanBoxConfig.treeProps"
|
||||
@ -12,7 +13,7 @@
|
||||
@condition-clear="handleConditionClear"
|
||||
/>
|
||||
|
||||
<div class="main-content">
|
||||
<div v-if="!singleOrderOnlyView" class="main-content">
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-left" @wheel="handleToolbarWheel">
|
||||
<div
|
||||
@ -429,20 +430,24 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
v-model="singleOrderDialogVisible"
|
||||
title="散单抓取"
|
||||
width="1280px"
|
||||
class="single-fetch-dialog"
|
||||
align-center
|
||||
:close-on-click-modal="false"
|
||||
<div
|
||||
v-if="singleOrderPanelVisible || singleOrderOnlyView"
|
||||
class="single-fetch-tab-page"
|
||||
>
|
||||
<el-tabs v-model="singleOrderActiveTab" class="single-order-tabs">
|
||||
<el-tab-pane label="不符合波次策略订单列表" name="fallback-orders">
|
||||
<el-tabs
|
||||
v-model="singleOrderActiveTab"
|
||||
class="single-order-tabs"
|
||||
:class="{ 'single-order-tabs--embedded': singleOrderOnlyView }"
|
||||
>
|
||||
<el-tab-pane
|
||||
v-if="!singleOrderOnlyView || props.initialSingleOrderTab === 'fallback-orders'"
|
||||
label="不符合波次策略订单列表"
|
||||
name="fallback-orders"
|
||||
>
|
||||
<div class="single-fallback-layout">
|
||||
<scan-box
|
||||
ref="fallbackOrderScanBox"
|
||||
width="300px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:available-fields="fallbackOrderAvailableFieldsRef"
|
||||
@ -549,7 +554,11 @@
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
|
||||
<el-tab-pane label="波次策略" name="strategy-api">
|
||||
<el-tab-pane
|
||||
v-if="!singleOrderOnlyView || props.initialSingleOrderTab === 'strategy-api'"
|
||||
label="波次策略"
|
||||
name="strategy-api"
|
||||
>
|
||||
<div class="wave-strategy-tab">
|
||||
<div class="group-order-toolbar">
|
||||
<div class="group-order-toolbar__left">
|
||||
@ -582,6 +591,11 @@
|
||||
>
|
||||
<el-table-column prop="id" label="ID" width="72" align="center" />
|
||||
<el-table-column prop="strategy_name" label="策略名称" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="波次前缀" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
{{ row.wave_prefix || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="matched_order_count_filtered" label="匹配订单数" width="100" align="center" />
|
||||
<el-table-column v-if="showWaveStrategyNextFetchOrderCount" prop="next_fetch_order_count" label="下一波抓取数量" width="120" align="center">
|
||||
<template #default="{ row }">
|
||||
@ -590,19 +604,19 @@
|
||||
</el-table-column>
|
||||
<el-table-column label="策略类型" width="88" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.strategy_type != null" size="small" :type="row.strategy_type == 2 ? 'warning' : 'primary'">{{ { 1: '散单', 2: '团购' }[row.strategy_type] ?? row.strategy_type }}</el-tag>
|
||||
<el-tag v-if="row.strategy_type != null" size="small" :type="row.strategy_type == 2 ? 'warning' : 'primary'">{{ { 1: '散单', 2: '团购' }[Number(row.strategy_type)] ?? row.strategy_type }}</el-tag>
|
||||
<span v-else>—</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" width="72" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.status != null" size="small" :type="row.status == 1 ? 'success' : 'danger'">{{ { 1: '启用', 0: '停用' }[row.status] ?? row.status }}</el-tag>
|
||||
<el-tag v-if="row.status != null" size="small" :type="row.status == 1 ? 'success' : 'danger'">{{ { 1: '启用', 0: '停用' }[Number(row.status)] ?? row.status }}</el-tag>
|
||||
<span v-else>—</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="批次模式" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag v-if="row.batch_mode != null" size="small" type="info">{{ { 0: '团购', 1: '单品单件', 2: '先拣后分', 3: '边拣边分', 4: '边拣边分H型', 5: '播种墙', 6: '流利架' }[row.batch_mode] ?? row.batch_mode }}</el-tag>
|
||||
<el-tag v-if="row.batch_mode != null" size="small" type="info">{{ { 0: '团购', 1: '单品单件', 2: '先拣后分', 3: '边拣边分', 4: '边拣边分H型', 5: '播种墙', 6: '流利架' }[Number(row.batch_mode)] ?? row.batch_mode }}</el-tag>
|
||||
<span v-else>—</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -699,10 +713,10 @@
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
<template #footer>
|
||||
<el-button size="small" @click="singleOrderDialogVisible = false">关闭</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<div v-if="!singleOrderOnlyView" class="single-fetch-tab-page__footer">
|
||||
<el-button size="small" @click="singleOrderPanelVisible = false">关闭</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<wave-fetch-task-progress-dialog
|
||||
:model-value="Boolean(fetchTaskProgress.taskId)"
|
||||
@ -886,13 +900,14 @@
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<wave-batch-print-preview-dialog
|
||||
<batch-receiving-print-dialog
|
||||
v-model="wavePrintDialogVisible"
|
||||
:loading="wavePrintDialogLoading"
|
||||
:error-message="wavePrintDialogError"
|
||||
:payload="wavePrintDialogPayload"
|
||||
:request-meta="wavePrintRequestMeta"
|
||||
align-center
|
||||
:selection-rows="wavePrintRows"
|
||||
business-type="PICKING"
|
||||
dialog-title="批量打印货单"
|
||||
queue-no-field="wave_no"
|
||||
document-label="波次"
|
||||
:fetch-print-data="loadWavePrintFormData"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
@ -922,6 +937,7 @@ import {
|
||||
} from './config/wave-config'
|
||||
import { safeInvoke } from '@/utils/safe-invoke'
|
||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||
import BatchReceivingPrintDialog from '@/components/BatchReceivingPrintDialog.vue'
|
||||
import PendingOrderListPanel from './component/PendingOrderListPanel.vue'
|
||||
import WaveBatchDetailPanel from './component/WaveBatchDetailPanel.vue'
|
||||
import WaveFetchTaskProgressDialog from './component/WaveFetchTaskProgressDialog.vue'
|
||||
@ -981,11 +997,18 @@ import type {
|
||||
WaveStrategyQuickScanResponse,
|
||||
WaveStrategyQuickScanTaskProgressResponse
|
||||
} from '@/api/order.wave/orderwave'
|
||||
|
||||
import { useUserStore } from '@/stores/modules/user'
|
||||
import { getWavePrintData } from '@/api/order.print/orderprint'
|
||||
import type { WavePrintDataPayload } from '@/api/order.print/orderprint'
|
||||
import WaveBatchPrintPreviewDialog from './component/WaveBatchPrintPreviewDialog.vue'
|
||||
import pcasCodeData from 'china-division/dist/pcas-code.json'
|
||||
const props = withDefaults(defineProps<{
|
||||
singleOrderOnlyView?: boolean
|
||||
initialSingleOrderTab?: 'fallback-orders' | 'strategy-api'
|
||||
}>(), {
|
||||
singleOrderOnlyView: false,
|
||||
initialSingleOrderTab: 'fallback-orders'
|
||||
})
|
||||
const singleOrderOnlyView = computed(() => Boolean(props.singleOrderOnlyView))
|
||||
const WAVE_TYPE = 2 as const
|
||||
|
||||
const route = useRoute()
|
||||
@ -1007,10 +1030,8 @@ const batchAllocateStorageLoading = ref(false)
|
||||
const batchRemoveExceptionOrdersLoading = ref(false)
|
||||
const userStore = useUserStore()
|
||||
const wavePrintDialogVisible = ref(false)
|
||||
const wavePrintDialogLoading = ref(false)
|
||||
const wavePrintDialogError = ref('')
|
||||
const wavePrintDialogPayload = ref<WavePrintDataPayload | null>(null)
|
||||
const wavePrintRequestMeta = ref<{ warehouse_id: number; wave_ids: Array<number | string> } | null>(null)
|
||||
const wavePrintRows = ref<any[]>([])
|
||||
const wavePrintDataMap = ref<Record<string, any>>({})
|
||||
const queryTime = ref(0)
|
||||
const tableSize = ref('small')
|
||||
const activeTab = ref('detail')
|
||||
@ -1102,7 +1123,7 @@ const batchCancelTaskProgress = reactive({
|
||||
|
||||
const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 })
|
||||
const groupOrderPagination = reactive({ currentPage: 1, pageSize: 20, total: 0 })
|
||||
const singleOrderDialogVisible = ref(false)
|
||||
const singleOrderPanelVisible = ref(false)
|
||||
const singleOrderActiveTab = ref<'fallback-orders' | 'strategy-api'>('fallback-orders')
|
||||
const singleOrderSubmitting = ref(false)
|
||||
const fallbackOrderScanBox = ref<any>(null)
|
||||
@ -1303,6 +1324,72 @@ const currentWaveType = computed(() => WAVE_TYPE)
|
||||
const tableListId = computed(() => `wave-management-list-${WAVE_TYPE}`)
|
||||
|
||||
const okCode = (code: unknown) => code === 1 || code === 200 || code === 0
|
||||
|
||||
/** waveStrategyFetchAdmin / Pda 响应体(支持 res.data 包裹) */
|
||||
function unwrapWaveStrategyFetchPayload(res: any): WaveStrategyFetchTaskCreatedResponse {
|
||||
if (res && typeof res.data === 'object' && res.data !== null && !Array.isArray(res.data)) {
|
||||
return res.data as WaveStrategyFetchTaskCreatedResponse
|
||||
}
|
||||
return res as WaveStrategyFetchTaskCreatedResponse
|
||||
}
|
||||
|
||||
/**
|
||||
* order.wave.waveStrategyFetchAdmin / waveStrategyFetchPda 响应:
|
||||
* fetch_state 1=新建成功,2=失败,3=已有未完成任务;无 fetch_state 时按旧接口字段兼容
|
||||
*/
|
||||
function applyWaveStrategyFetchUiResult(
|
||||
payload: WaveStrategyFetchTaskCreatedResponse,
|
||||
options: { defaultSuccessHint?: string; afterSuccess?: () => void | Promise<void> } = {}
|
||||
) {
|
||||
const validationErrors = payload?.validation_errors
|
||||
if (Array.isArray(validationErrors) && validationErrors.length) {
|
||||
const detail = validationErrors
|
||||
.map((e) => [e?.field, e?.message].filter(Boolean).join(': ') || '')
|
||||
.filter(Boolean)
|
||||
.join(';')
|
||||
ElMessage.warning(detail || payload?.message || '入参校验未通过')
|
||||
return
|
||||
}
|
||||
|
||||
const fs = payload.fetch_state
|
||||
|
||||
if (fs === 2) {
|
||||
ElMessage.warning(payload.tip || payload.message || '抓取任务创建失败')
|
||||
return
|
||||
}
|
||||
|
||||
if (fs === 3) {
|
||||
const taskId = String(payload.task_id ?? payload.existing_task_id ?? '')
|
||||
const taskNo = String(payload.task_no ?? payload.existing_task_no ?? '')
|
||||
const tip =
|
||||
payload.tip ||
|
||||
payload.message ||
|
||||
(payload.can_enter_pick_flow ? '存在未完成任务,可直接进入拣货流程' : '存在未完成的抓取任务')
|
||||
const suffix = [taskNo ? `任务编号:${taskNo}` : '', taskId ? `任务ID:${taskId}` : ''].filter(Boolean).join(',')
|
||||
ElMessage.success(suffix ? `${tip}(${suffix})` : tip)
|
||||
const after = options.afterSuccess
|
||||
if (after) void after()
|
||||
return
|
||||
}
|
||||
|
||||
if (fs === 1 || fs === undefined || fs === null) {
|
||||
const taskId = String(payload?.task_id ?? '')
|
||||
const taskNo = String(payload?.task_no ?? '')
|
||||
const summary = String(payload?.plan_summary ?? '')
|
||||
if (fs === 1 && !taskId && !taskNo && !summary) {
|
||||
ElMessage.warning(payload?.message || '接口未返回任务信息')
|
||||
return
|
||||
}
|
||||
const hint = summary || payload?.message || options.defaultSuccessHint || '抓取任务已创建'
|
||||
const suffix = [taskNo ? `任务编号:${taskNo}` : '', taskId ? `任务ID:${taskId}` : ''].filter(Boolean).join(',')
|
||||
ElMessage.success(suffix ? `${hint}(${suffix})` : hint)
|
||||
const after = options.afterSuccess
|
||||
if (after) void after()
|
||||
return
|
||||
}
|
||||
|
||||
ElMessage.warning(payload?.message || `未知抓取状态(fetch_state=${String(fs)})`)
|
||||
}
|
||||
const printableSelectionRows = computed(() => selectionRows.value.filter((row: any) => !isAutoGroupingWave(row)))
|
||||
const autoGroupingSelectionRows = computed(() => selectionRows.value.filter((row: any) => isAutoGroupingWave(row)))
|
||||
const selectedWaveOrderTotal = computed(() => {
|
||||
@ -1356,7 +1443,7 @@ const pendingOrderDialogTitle = computed(() => pendingOrderDialogWaveNo.value ?
|
||||
watch(
|
||||
() => singleOrderActiveTab.value,
|
||||
(tab) => {
|
||||
if (tab === 'strategy-api' && singleOrderDialogVisible.value) {
|
||||
if (tab === 'strategy-api' && singleOrderPanelVisible.value) {
|
||||
void fetchWaveStrategyList()
|
||||
}
|
||||
}
|
||||
@ -1405,6 +1492,9 @@ onBeforeUnmount(() => {
|
||||
|
||||
async function initializePage() {
|
||||
await Promise.all([loadWarehouseSettings(), loadData()])
|
||||
if (props.singleOrderOnlyView) {
|
||||
await openSingleOrderPanel(props.initialSingleOrderTab)
|
||||
}
|
||||
}
|
||||
|
||||
async function loadWarehouseSettings() {
|
||||
@ -1759,7 +1849,7 @@ async function handleBatchFinishAutoGrouping() {
|
||||
}
|
||||
}
|
||||
|
||||
function unwrapWavePrintPayload(res: any): WavePrintDataPayload {
|
||||
function unwrapWavePrintPayload(res: any) {
|
||||
const inner =
|
||||
res?.data !== undefined && res?.data !== null && typeof res.data === 'object' && !Array.isArray(res.data)
|
||||
? res.data
|
||||
@ -1781,6 +1871,33 @@ function unwrapWavePrintPayload(res: any): WavePrintDataPayload {
|
||||
return { summary, wave_list, ext }
|
||||
}
|
||||
|
||||
function getWaveOrders(wave: Record<string, unknown>) {
|
||||
const keys = ['orders', 'order_list', 'order_details', 'items', 'print_orders', 'order_rows', 'details']
|
||||
for (const key of keys) {
|
||||
const value = wave[key]
|
||||
if (Array.isArray(value)) return value
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
function toWavePrintForm(wave: Record<string, unknown>) {
|
||||
const details = getWaveOrders(wave)
|
||||
return {
|
||||
...wave,
|
||||
wave_no: String(wave.wave_no ?? wave.batch_no ?? wave.wave_code ?? wave.id ?? '—'),
|
||||
details
|
||||
}
|
||||
}
|
||||
|
||||
function rowWaveKey(row: any) {
|
||||
return String(row?.id ?? row?.wave_id ?? row?.batch_id ?? row?.wave_no ?? '')
|
||||
}
|
||||
|
||||
async function loadWavePrintFormData(row: any) {
|
||||
const key = rowWaveKey(row)
|
||||
return wavePrintDataMap.value[key] || toWavePrintForm(row || {})
|
||||
}
|
||||
|
||||
async function handleBatchPrint() {
|
||||
if (!isGroupWaveTab.value) {
|
||||
ElMessage.warning('批量打印仅在「团购波次」页签可用')
|
||||
@ -1836,23 +1953,30 @@ async function handleBatchPrint() {
|
||||
return
|
||||
}
|
||||
|
||||
wavePrintRequestMeta.value = { warehouse_id: warehouseId, wave_ids }
|
||||
wavePrintDialogPayload.value = null
|
||||
wavePrintDialogError.value = ''
|
||||
wavePrintDialogVisible.value = true
|
||||
wavePrintDialogLoading.value = true
|
||||
|
||||
batchPrintLoading.value = true
|
||||
try {
|
||||
const res: any = await getWavePrintData({ warehouse_id: warehouseId, wave_ids })
|
||||
wavePrintDialogPayload.value = unwrapWavePrintPayload(res)
|
||||
const waveCount = wavePrintDialogPayload.value.wave_list?.length ?? 0
|
||||
const payload = unwrapWavePrintPayload(res)
|
||||
const waveList = Array.isArray(payload.wave_list) ? payload.wave_list : []
|
||||
const nextMap: Record<string, any> = {}
|
||||
waveList.forEach((wave: Record<string, unknown>) => {
|
||||
const key = String(wave.id ?? wave.wave_id ?? wave.batch_id ?? wave.wave_no ?? '')
|
||||
if (!key) return
|
||||
nextMap[key] = toWavePrintForm(wave)
|
||||
})
|
||||
wavePrintRows.value = rows.map((item: any) => ({
|
||||
...item,
|
||||
wave_no: String(item?.wave_no ?? item?.batch_no ?? item?.wave_code ?? item?.id ?? '—')
|
||||
}))
|
||||
wavePrintDataMap.value = nextMap
|
||||
wavePrintDialogVisible.value = true
|
||||
const waveCount = waveList.length
|
||||
ElMessage.success(res?.message || `已获取打印数据,返回 ${waveCount} 个波次`)
|
||||
} catch (error: any) {
|
||||
wavePrintDialogError.value = error?.message || '获取波次打印数据失败'
|
||||
wavePrintDialogPayload.value = null
|
||||
wavePrintRows.value = []
|
||||
wavePrintDataMap.value = {}
|
||||
ElMessage.error(error?.message || '获取波次打印数据失败')
|
||||
} finally {
|
||||
wavePrintDialogLoading.value = false
|
||||
batchPrintLoading.value = false
|
||||
}
|
||||
}
|
||||
@ -2564,16 +2688,24 @@ function openGroupOrderDialog() {
|
||||
fetchGroupOrderList()
|
||||
}
|
||||
|
||||
function openSingleOrderDialog() {
|
||||
singleOrderDialogVisible.value = true
|
||||
singleOrderActiveTab.value = 'fallback-orders'
|
||||
async function openSingleOrderPanel(tab: 'fallback-orders' | 'strategy-api' = 'fallback-orders') {
|
||||
singleOrderPanelVisible.value = true
|
||||
singleOrderActiveTab.value = tab
|
||||
fallbackOrderPagination.currentPage = 1
|
||||
fallbackOrderSelectionRows.value = []
|
||||
waveStrategyPagination.currentPage = 1
|
||||
waveStrategyList.value = []
|
||||
waveStrategyPagination.total = 0
|
||||
void loadFallbackOrderFilterOptions()
|
||||
void fetchFallbackOrderList()
|
||||
await loadFallbackOrderFilterOptions()
|
||||
if (tab === 'strategy-api') {
|
||||
await fetchWaveStrategyList()
|
||||
return
|
||||
}
|
||||
await fetchFallbackOrderList()
|
||||
}
|
||||
|
||||
function openSingleOrderDialog() {
|
||||
void openSingleOrderPanel('fallback-orders')
|
||||
}
|
||||
|
||||
function normalizeCode(value: unknown) {
|
||||
@ -2856,7 +2988,7 @@ async function fetchWaveStrategyList() {
|
||||
pageSize: waveStrategyPagination.pageSize
|
||||
},
|
||||
calculate_next_fetch_order_count: showWaveStrategyNextFetchOrderCount.value ? 1 : 0
|
||||
} as any) as WaveStrategyListResponse & { code?: number; message?: string; data?: Partial<WaveStrategyListResponse> }
|
||||
}) as WaveStrategyListResponse & { code?: number; message?: string; data?: Partial<WaveStrategyListResponse> }
|
||||
if (!res || !okCode(res.code)) {
|
||||
throw new Error(res?.message || '获取波次策略列表失败')
|
||||
}
|
||||
@ -2898,31 +3030,17 @@ async function submitWaveStrategyFetchPda(row: Record<string, any>) {
|
||||
try {
|
||||
const res = await orderWaveWaveStrategyFetchPda({
|
||||
strategy_id: strategyId,
|
||||
source: 'pda'
|
||||
source: 'pda',
|
||||
operation_source: 'pda'
|
||||
}) as WaveStrategyFetchTaskCreatedResponse & { code?: number; message?: string }
|
||||
if (!res || !okCode(res.code)) {
|
||||
throw new Error(res?.message || '提交后台抓取任务失败')
|
||||
}
|
||||
const payload =
|
||||
res && typeof (res as any).data === 'object' && (res as any).data !== null && !Array.isArray((res as any).data)
|
||||
? ((res as any).data as WaveStrategyFetchTaskCreatedResponse)
|
||||
: (res as WaveStrategyFetchTaskCreatedResponse)
|
||||
const validationErrors = payload?.validation_errors
|
||||
if (Array.isArray(validationErrors) && validationErrors.length) {
|
||||
const detail = validationErrors
|
||||
.map((e) => [e?.field, e?.message].filter(Boolean).join(': ') || '')
|
||||
.filter(Boolean)
|
||||
.join(';')
|
||||
ElMessage.warning(detail || payload?.message || '入参校验未通过')
|
||||
return
|
||||
}
|
||||
const taskId = String(payload?.task_id || '')
|
||||
const taskNo = String(payload?.task_no || '')
|
||||
const summary = String(payload?.plan_summary || '')
|
||||
const hint = summary || payload?.message || res?.message || '后台抓取任务已创建'
|
||||
const suffix = [taskNo ? `任务编号:${taskNo}` : '', taskId ? `任务ID:${taskId}` : ''].filter(Boolean).join(',')
|
||||
ElMessage.success(suffix ? `${hint}(${suffix})` : hint)
|
||||
await fetchWaveStrategyList()
|
||||
const payload = unwrapWaveStrategyFetchPayload(res)
|
||||
applyWaveStrategyFetchUiResult(payload, {
|
||||
defaultSuccessHint: '抓取任务已创建',
|
||||
afterSuccess: () => fetchWaveStrategyList()
|
||||
})
|
||||
} catch (error: any) {
|
||||
console.error('submit wave strategy fetch admin failed:', error)
|
||||
ElMessage.error(error?.message || '提交后台抓取任务失败')
|
||||
@ -3561,7 +3679,9 @@ async function submitFallbackOrderFetchByIds() {
|
||||
}
|
||||
|
||||
ElMessage.success(parts.filter(Boolean).join(';'))
|
||||
singleOrderDialogVisible.value = false
|
||||
if (!props.singleOrderOnlyView) {
|
||||
singleOrderPanelVisible.value = false
|
||||
}
|
||||
fallbackOrderSelectionRows.value = []
|
||||
await loadData()
|
||||
} catch (error: any) {
|
||||
@ -3716,15 +3836,34 @@ async function submitFallbackOrderFetchByIds() {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
:deep(.single-fetch-dialog .el-dialog__body) {
|
||||
.single-fetch-tab-page {
|
||||
margin-top: 8px;
|
||||
padding: 10px 12px;
|
||||
border: 1px solid #ebeef5;
|
||||
background: #fff;
|
||||
height: calc(100vh - 240px);
|
||||
max-height: calc(100vh - 240px);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
:deep(.single-fetch-dialog .el-tabs),
|
||||
:deep(.single-fetch-dialog .el-tabs__content),
|
||||
:deep(.single-fetch-dialog .el-tab-pane) {
|
||||
.single-fetch-tab-page__footer {
|
||||
margin-top: 8px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.single-order-tabs--embedded :deep(.el-tabs__header) {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.single-order-tabs--embedded :deep(.el-tabs__content) {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.single-fetch-tab-page :deep(.el-tabs),
|
||||
.single-fetch-tab-page :deep(.el-tabs__content),
|
||||
.single-fetch-tab-page :deep(.el-tab-pane) {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,7 @@
|
||||
<div class="pending-order-panel">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
width="300px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:initial-conditions="initialConditions"
|
||||
@ -623,6 +623,6 @@ async function loadStoreOptions() {
|
||||
}
|
||||
|
||||
:deep(.scan-box-container) {
|
||||
flex: 0 0 300px;
|
||||
flex: 0 0 250px;
|
||||
}
|
||||
</style>
|
||||
@ -5,9 +5,9 @@ export type WaveToolbarButtonConfig = ToolbarButtonConfig & {
|
||||
onlyForWaveType?: 1 | 2
|
||||
}
|
||||
|
||||
/** ScanBox 默认 props(与 orderManagement 子页一致的可配置项) */
|
||||
/** ScanBox 默认 props(全站 scan-box 侧栏宽度统一为 250px) */
|
||||
export const waveScanBoxConfig = {
|
||||
width: '320px',
|
||||
width: '250px',
|
||||
treeProps: { children: 'children', label: 'label' } as const,
|
||||
autoSubmit: false
|
||||
}
|
||||
@ -47,12 +47,6 @@ export const waveAvailableFields = [
|
||||
{ label: '已就绪', value: 1 }
|
||||
]
|
||||
},
|
||||
{ label: '创建人', value: 'creator', type: 'text' },
|
||||
{ label: '快递', value: 'logistics_name', type: 'text' },
|
||||
// { label: '商品类型', value: 'item_part_type', type: 'text' },
|
||||
// { label: '商品部位', value: 'item_part', type: 'text' },
|
||||
// { label: '商品快照键', value: 'item_snapshot_key', type: 'text' },
|
||||
// { label: '商品结构', value: 'item_detail_machine', type: 'text' },
|
||||
{
|
||||
label: '区分快递',
|
||||
value: 'distinguish_express',
|
||||
@ -67,6 +61,24 @@ export const waveAvailableFields = [
|
||||
{ label: '部分分配', value: '部分分配' },
|
||||
{ label: '已分配', value: '已分配' },
|
||||
]},
|
||||
{ label:'快递分配', value: 'express_assignment_status', type: 'select', options: [
|
||||
{ label: '未分配', value: '未分配' },
|
||||
{ label: '部分分配', value: '部分分配' },
|
||||
{ label: '已分配', value: '已分配' },
|
||||
]},
|
||||
{ label:'打印状态', value: 'print_assignment_status', type: 'select', options: [
|
||||
{ label: '未打印', value: '未打印' },
|
||||
{ label: '部分打印', value: '部分打印' },
|
||||
{ label: '已打印', value: '已打印' },
|
||||
]},
|
||||
{ label: '创建人', value: 'creator', type: 'text' },
|
||||
{ label: '快递', value: 'logistics_name', type: 'text' },
|
||||
// { label: '商品类型', value: 'item_part_type', type: 'text' },
|
||||
// { label: '商品部位', value: 'item_part', type: 'text' },
|
||||
// { label: '商品快照键', value: 'item_snapshot_key', type: 'text' },
|
||||
// { label: '商品结构', value: 'item_detail_machine', type: 'text' },
|
||||
|
||||
|
||||
{ label: '最小订单数', value: 'total_orders_min', type: 'number' },
|
||||
{ label: '最大订单数', value: 'total_orders_max', type: 'number' },
|
||||
{ label: '最小已处理订单', value: 'processed_orders_min', type: 'number' },
|
||||
@ -129,6 +141,8 @@ export const waveWhereAllowedFieldList = [
|
||||
'item_detail_machine',
|
||||
'distinguish_express',
|
||||
'storage_assignment_status',
|
||||
'express_assignment_status',
|
||||
'print_assignment_status',
|
||||
'total_orders_min',
|
||||
'total_orders_max',
|
||||
'processed_orders_min',
|
||||
@ -226,14 +240,14 @@ export const waveToolbarButtons: WaveToolbarButtonConfig[] = [
|
||||
action: 'openGroupOrderDialog',
|
||||
onlyForWaveType: 1
|
||||
},
|
||||
{
|
||||
key: 'fetchSingleOrder',
|
||||
label: '抓取散单候选',
|
||||
type: 'warning',
|
||||
size: 'small',
|
||||
action: 'openSingleOrderDialog',
|
||||
onlyForWaveType: 2
|
||||
}
|
||||
// {
|
||||
// key: 'fetchSingleOrder',
|
||||
// label: '抓取散单候选',
|
||||
// type: 'warning',
|
||||
// size: 'small',
|
||||
// action: 'openSingleOrderDialog',
|
||||
// onlyForWaveType: 2
|
||||
// }
|
||||
]
|
||||
|
||||
export function getWaveToolbarButtons(waveType: 1 | 2): WaveToolbarButtonConfig[] {
|
||||
@ -352,3 +366,170 @@ export const waveBooleanOptions = [
|
||||
{ label: '是', value: true },
|
||||
{ label: '否', value: false }
|
||||
]
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// 拣货中任务页(pickTaskWave):与散单页共用 waveScanBoxConfig;筛选字段见 pickTaskWaveAvailableFields
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
/** 列表与工具栏文案 */
|
||||
export const pickTaskWaveListDefaults = {
|
||||
toolbarHint: '当前仓库拣货任务(order.wave.wavePickTaskList)',
|
||||
listTitle: '拣货任务列表',
|
||||
emptyText: '暂无拣货任务',
|
||||
loadingEmptyText: '加载中...',
|
||||
loadFailedEmptyText: '加载失败',
|
||||
noWarehouseEmptyText: '未获取到仓库ID'
|
||||
}
|
||||
|
||||
/** 分页与详情弹窗 */
|
||||
export const pickTaskWavePaginationDefaults = {
|
||||
pageSizes: [20, 50, 100, 200] as const,
|
||||
layout: 'total, sizes, prev, pager, next, jumper' as const,
|
||||
initialPageSize: 20
|
||||
}
|
||||
|
||||
/** 供模板 :page-sizes 绑定(避免 readonly 元组在模板中的类型问题) */
|
||||
export const pickTaskWavePaginationPageSizes = [20, 50, 100, 200]
|
||||
|
||||
export const pickTaskWaveDetailDialogDefaults = {
|
||||
title: '拣货任务详情',
|
||||
width: '920px'
|
||||
}
|
||||
|
||||
export type PickTaskWaveToolbarKey = 'search' | 'detailQuery' | 'batchCancel' | 'refresh'
|
||||
|
||||
export type PickTaskWaveToolbarButton = {
|
||||
key: PickTaskWaveToolbarKey
|
||||
label: string
|
||||
type?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | ''
|
||||
plain?: boolean
|
||||
size?: 'small' | 'default' | 'large'
|
||||
}
|
||||
|
||||
/** 工具栏按钮顺序与类型(与散单页工具条同一套间距/滚动行为) */
|
||||
export const pickTaskWaveToolbarButtons: PickTaskWaveToolbarButton[] = [
|
||||
{ key: 'search', label: '查询', type: 'primary', size: 'small' },
|
||||
{ key: 'detailQuery', label: '按任务ID查详情', size: 'small' },
|
||||
{ key: 'batchCancel', label: '批量取消任务', type: 'danger', size: 'small' },
|
||||
{ key: 'refresh', label: '刷新', size: 'small' }
|
||||
]
|
||||
|
||||
/** 左侧筛选字段(与 order.wave.wavePickTaskList 入参对应) */
|
||||
export const pickTaskWaveAvailableFields = [
|
||||
{ label: '任务编号', value: 'task_no', type: 'text' },
|
||||
// { label: '关键字', value: 'keyword', type: 'text' },
|
||||
{
|
||||
label: '任务状态',
|
||||
value: 'status',
|
||||
type: 'multiple',
|
||||
options: [
|
||||
{ label: '待开始', value: 0 },
|
||||
{ label: '拣货中', value: 1 },
|
||||
{ label: '待复核', value: 2 },
|
||||
{ label: '已完成', value: 3 },
|
||||
{ label: '已取消', value: 9 }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '复核状态',
|
||||
value: 'review_status',
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: '未就绪', value: 0 },
|
||||
{ label: '待复核', value: 1 },
|
||||
{ label: '复核中', value: 2 },
|
||||
{ label: '复核通过', value: 3 },
|
||||
{ label: '复核异常', value: 4 }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '拣货模式',
|
||||
value: 'pick_mode',
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: '小团购', value: 1 },
|
||||
{ label: '单品单件', value: 2 },
|
||||
{ label: '先拣后分', value: 3 },
|
||||
{ label: '边拣边分', value: 4 },
|
||||
{ label: '大团购', value: 5 }
|
||||
]
|
||||
},
|
||||
{
|
||||
label: '来源',
|
||||
value: 'source',
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: '默认', value: 0 },
|
||||
{ label: 'PDA', value: 1 },
|
||||
{ label: '后台', value: 2 }
|
||||
]
|
||||
},
|
||||
{ label: '拣货员ID', value: 'pick_user_id', type: 'number' },
|
||||
{ label: '复核人ID', value: 'review_user_id', type: 'number' },
|
||||
{ label: '拣货车ID', value: 'cart_id', type: 'number' },
|
||||
{ label: '开始时间', value: 'start_time_range', type: 'daterange' }
|
||||
]
|
||||
|
||||
export function formatPickTaskStatus(value: unknown): string {
|
||||
const num = Number(value)
|
||||
if (num === 0) return '待开始'
|
||||
if (num === 1) return '拣货中'
|
||||
if (num === 2) return '待复核'
|
||||
if (num === 3) return '已完成'
|
||||
if (num === 9) return '已取消'
|
||||
return value === null || value === undefined || value === '' ? '-' : String(value)
|
||||
}
|
||||
|
||||
export function formatPickTaskReviewStatus(value: unknown): string {
|
||||
const num = Number(value)
|
||||
if (num === 0) return '未就绪'
|
||||
if (num === 1) return '待复核'
|
||||
if (num === 2) return '复核中'
|
||||
if (num === 3) return '复核通过'
|
||||
if (num === 4) return '复核异常'
|
||||
return value === null || value === undefined || value === '' ? '-' : String(value)
|
||||
}
|
||||
|
||||
export function formatPickTaskPickMode(value: unknown): string {
|
||||
const num = Number(value)
|
||||
if (num === 1) return '小团购'
|
||||
if (num === 2) return '单品单件'
|
||||
if (num === 3) return '先拣后分'
|
||||
if (num === 4) return '边拣边分'
|
||||
if (num === 5) return '大团购'
|
||||
return value === null || value === undefined || value === '' ? '-' : String(value)
|
||||
}
|
||||
|
||||
export function formatPickTaskSource(value: unknown): string {
|
||||
const num = Number(value)
|
||||
if (num === 0) return '默认'
|
||||
if (num === 1) return 'PDA'
|
||||
if (num === 2) return '后台'
|
||||
return value === null || value === undefined || value === '' ? '-' : String(value)
|
||||
}
|
||||
|
||||
export function getPickTaskStatusTagType(value: unknown): 'info' | 'warning' | 'success' | 'danger' {
|
||||
const num = Number(value)
|
||||
if (num === 0) return 'info'
|
||||
if (num === 1) return 'warning'
|
||||
if (num === 2) return 'danger'
|
||||
if (num === 3) return 'success'
|
||||
if (num === 9) return 'info'
|
||||
return 'info'
|
||||
}
|
||||
|
||||
export function getPickTaskReviewStatusTagType(value: unknown): 'info' | 'warning' | 'success' | 'danger' {
|
||||
const num = Number(value)
|
||||
if (num === 0) return 'info'
|
||||
if (num === 1) return 'warning'
|
||||
if (num === 2) return 'warning'
|
||||
if (num === 3) return 'success'
|
||||
if (num === 4) return 'danger'
|
||||
return 'info'
|
||||
}
|
||||
|
||||
export function getPickTaskSourceTagType(value: unknown): 'info' | 'success' {
|
||||
const num = Number(value)
|
||||
if (num === 1) return 'success'
|
||||
return 'info'
|
||||
}
|
||||
|
||||
@ -17,7 +17,12 @@
|
||||
<span class="custom-tab-label">{{ tab.label }}</span>
|
||||
</template>
|
||||
<keep-alive>
|
||||
<component :is="tab.component" v-if="activeTab === tab.name" />
|
||||
<component
|
||||
:is="tab.component"
|
||||
:key="tab.name"
|
||||
v-if="activeTab === tab.name"
|
||||
v-bind="tab.props || {}"
|
||||
/>
|
||||
</keep-alive>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
@ -46,11 +51,24 @@ type WaveTabItem = {
|
||||
name: string
|
||||
label: string
|
||||
component: any
|
||||
props?: Record<string, unknown>
|
||||
}
|
||||
|
||||
const tabs = ref<WaveTabItem[]>([
|
||||
{ name: 'groupWave', label: '团购波次', component: markRaw(GroupWaveBatchListPanel) },
|
||||
{ name: 'sandanWave', label: '散单波次', component: markRaw(SandanWaveBatchListPanel) },
|
||||
{
|
||||
name: 'sandanFallbackOrders',
|
||||
label: '不符合波次策略订单列表',
|
||||
component: markRaw(SandanWaveBatchListPanel),
|
||||
props: { singleOrderOnlyView: true, initialSingleOrderTab: 'fallback-orders' }
|
||||
},
|
||||
{
|
||||
name: 'sandanWaveStrategy',
|
||||
label: '波次策略',
|
||||
component: markRaw(SandanWaveBatchListPanel),
|
||||
props: { singleOrderOnlyView: true, initialSingleOrderTab: 'strategy-api' }
|
||||
},
|
||||
{ name: 'pickTaskWave', label: '拣货中任务', component: markRaw(WavePickTaskListPanel) }
|
||||
])
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<!-- 筛选区域 -->
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
width="320px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:preset-tree="presetTree"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="storage-entry-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
width="320px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:initial-conditions="initialConditions"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="storage-entry-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
width="320px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:preset-tree="presetTree"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="transaction-log-container" :style="{ height: containerHeight }">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
width="320px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:preset-tree="presetTree"
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="storage-receiving-container" :style="{ height: containerHeight }">
|
||||
<scan-box ref="scanBox" width="320px" :tree-props="{ children: 'children', label: 'label' }" :auto-submit="false"
|
||||
<scan-box ref="scanBox" width="250px" :tree-props="{ children: 'children', label: 'label' }" :auto-submit="false"
|
||||
:initial-conditions="initialConditions" :preset-tree="presetTree" :available-fields="availableFieldsRef"
|
||||
@condition-change="handleConditionChange" @reset="handleConditionReset" @condition-clear="handleConditionClear"
|
||||
@submit="handleSubmit" />
|
||||
@ -153,102 +153,11 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 打印对话框 -->
|
||||
<el-dialog v-model="printDialogVisible" title="批量打印收货单" width="1135px" custom-class="print-dialog">
|
||||
<div class="print-dialog-layout">
|
||||
<!-- 左侧待打印列表 -->
|
||||
<div class="print-batch-list">
|
||||
<div class="list-title">打印队列 ({{ selectionRows.length }})</div>
|
||||
<div v-for="(row, index) in selectionRows" :key="row.id" class="batch-item"
|
||||
:class="{ active: currentPrintIndex === index }" @click="switchPrintItem(index)">
|
||||
<span class="item-index">{{ index + 1 }}</span>
|
||||
<span class="item-number">{{ row.receiving_number }}</span>
|
||||
<el-tag size="small"
|
||||
:type="printStatusMap[row.id] === 'done' ? 'success' : printStatusMap[row.id] === 'error' ? 'danger' : 'info'">
|
||||
{{ printStatusMap[row.id] === 'done' ? '已打印' : printStatusMap[row.id] === 'error' ? '失败' : '待打印' }}
|
||||
</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 右侧:打印设置 + 模板预览 -->
|
||||
<div class="print-preview-main">
|
||||
<!-- 打印设置工具栏 -->
|
||||
<div class="print-settings-bar">
|
||||
<el-select v-model="printSettings.station" placeholder="请选择打印台" size="small" @change="handleStationChange">
|
||||
<el-option v-for="item in stationOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
<el-select v-model="printSettings.printer" placeholder="请选择打印机" size="small" :loading="printerLoading">
|
||||
<el-option v-for="item in printerOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<el-select v-model="printSettings.template" placeholder="请选择打印模板" size="small">
|
||||
<el-option v-for="item in templateOptions" :key="item.id" :label="item.name" :value="item.id" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<!-- 模板画布预览 -->
|
||||
<div class="print-canvas-area">
|
||||
<div v-if="previewInfo.width && previewInfo.height" class="preview-page"
|
||||
:style="{ width: previewInfo.width + 'mm', height: previewInfo.height + 'mm', position: 'relative' }">
|
||||
<div v-for="(item, idx) in previewObjects" :key="item.id" :style="computePreviewItemStyle(item, idx)">
|
||||
<template v-if="item.type === 'text'">
|
||||
<span>{{ getPreviewValue(item) }}</span>
|
||||
</template>
|
||||
<template v-else-if="item.type === 'barcode'">
|
||||
<barcode-img :text="getPreviewValue(item) || '0123456789'" />
|
||||
</template>
|
||||
<template v-else-if="item.type === 'qrcode'">
|
||||
<img
|
||||
:src="'https://ye4s.wms.gztbyc.com/qrcode/build?text=' + encodeURIComponent(getPreviewValue(item) || '')"
|
||||
alt="" style="width: 100%; height: 100%; object-fit: contain;" />
|
||||
</template>
|
||||
<template v-else-if="item.type === 'image'">
|
||||
<img :src="item.content" alt="" style="width: 100%; height: 100%; object-fit: fill;" />
|
||||
</template>
|
||||
<template v-else-if="item.type === 'table'">
|
||||
<table style="border: 1px solid #000; border-collapse: collapse;" border="1" cellspacing="0"
|
||||
cellpadding="0" width="100%" height="auto">
|
||||
<thead>
|
||||
<tr>
|
||||
<td v-for="c in item.rows" :key="c.id"
|
||||
:style="{ width: c.width + 'mm', fontSize: '3mm', textAlign: 'center', border: '1px solid #000', height: (item.headerHeight || 4) + 'mm' }">
|
||||
{{ c.title }}</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<!-- 如果有 details 数据则遍历显示,否则显示一行占位 -->
|
||||
<tr
|
||||
v-for="(detailItem, dIdx) in (printForm.details && printForm.details.length ? printForm.details : [printForm])"
|
||||
:key="dIdx">
|
||||
<td v-for="c in item.rows" :key="c.id + '_v'"
|
||||
:style="{ fontSize: '3mm', textAlign: 'center', border: '1px solid #000', height: (item.rowHeight || 4) + 'mm' }">
|
||||
{{ detailItem[c.field_code] || '' }}
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</template>
|
||||
<template v-else-if="item.type === 'shape'">
|
||||
<div style="width: 100%; height: 100%;"></div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="preview-empty">
|
||||
<el-empty description="请在上方选择打印模板" :image-size="60" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<span class="progress-tip">进度: {{ completedPrintCount }} / {{ selectionRows.length }}</span>
|
||||
<div>
|
||||
<el-button @click="printDialogVisible = false">关闭</el-button>
|
||||
<el-button type="primary" :loading="printing" @click="doPrint">
|
||||
{{ currentPrintIndex < selectionRows.length - 1 ? '打印并切换下一个' : '打印当前单据' }} </el-button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<batch-receiving-print-dialog
|
||||
v-model="printDialogVisible"
|
||||
:selection-rows="selectionRows"
|
||||
business-type="RECEIPT"
|
||||
/>
|
||||
|
||||
<!-- 新建收货单对话框 -->
|
||||
<el-dialog v-model="createDialogVisible" title="新建收货单" width="600px" align-center
|
||||
@ -412,11 +321,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onMounted, computed, watch, h, nextTick } from 'vue'
|
||||
import { ref, reactive, onMounted, computed, nextTick } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import ScanBox from '@/components/ScanBox/index.vue'
|
||||
import UpperTable from '@/components/UpperTable/index.vue'
|
||||
import BatchReceivingPrintDialog from '@/components/BatchReceivingPrintDialog.vue'
|
||||
import Details from './component/DetailsPanel.vue'
|
||||
import StorageComp from './component/Storage.vue'
|
||||
import Logs from './component/Logs.vue'
|
||||
@ -435,13 +345,8 @@ import {
|
||||
storageStatusConfig,
|
||||
deliveryMethodConfig,
|
||||
loadingMethodConfig,
|
||||
printFormConfig,
|
||||
addReceivingFields
|
||||
} from './receiving-config'
|
||||
import * as templateApi from '@/api/setting.printtemplate/printTemplate'
|
||||
|
||||
import * as stationApi from '@/api/print/print'
|
||||
import JsBarcode from 'jsbarcode'
|
||||
import * as XLSX from 'xlsx'
|
||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||
|
||||
@ -875,109 +780,6 @@ async function submitCreateReceiving() {
|
||||
|
||||
// 打印相关
|
||||
const printDialogVisible = ref(false)
|
||||
const printing = ref(false)
|
||||
const currentPrintIndex = ref(0)
|
||||
const printStatusMap = ref<Record<string, string>>({})
|
||||
const printForm = reactive<any>({})
|
||||
const printSettings = reactive({ station: '' as string | number, printer: '', template: '' })
|
||||
const stationOptions = ref<any[]>([])
|
||||
const printerOptions = ref<any[]>([])
|
||||
const templateOptions = ref<any[]>([])
|
||||
const printerLoading = ref(false)
|
||||
|
||||
// --- 模板预览辅助组件(条码) ---
|
||||
const barcodeImg = {
|
||||
props: ['text'],
|
||||
setup(props: any) {
|
||||
const src = ref('')
|
||||
const renderBarcode = (val: string) => {
|
||||
if (!val) { src.value = ''; return }
|
||||
const canvas = document.createElement('canvas')
|
||||
try {
|
||||
JsBarcode(canvas, val, { format: 'CODE128', width: 2, height: 40, displayValue: false, margin: 0 })
|
||||
src.value = canvas.toDataURL()
|
||||
} catch (e) { src.value = '' }
|
||||
}
|
||||
watch(() => props.text, (val: string) => renderBarcode(val), { immediate: true })
|
||||
return () => h('img', { src: src.value, style: { display: 'block', width: '100%', height: '100%', objectFit: 'fill' } })
|
||||
}
|
||||
}
|
||||
|
||||
// 当前选中模板的画布尺寸
|
||||
const previewInfo = computed(() => {
|
||||
const t = templateOptions.value.find((t: any) => t.id === printSettings.template)
|
||||
if (!t) return { width: 0, height: 0 }
|
||||
return { width: t.page_width || 0, height: t.page_height || 0 }
|
||||
})
|
||||
|
||||
// 当前选中模板的元素列表
|
||||
const previewObjects = computed(() => {
|
||||
const t = templateOptions.value.find((t: any) => t.id === printSettings.template)
|
||||
if (!t || !Array.isArray(t.template_content)) return []
|
||||
return t.template_content
|
||||
})
|
||||
|
||||
// 获取元素的实际展示值(用 printForm 中的值替换 field_code 占位符)
|
||||
function getPreviewValue(item: any): string {
|
||||
if (item.field_code && printForm[item.field_code] !== undefined && printForm[item.field_code] !== '') {
|
||||
return String(printForm[item.field_code])
|
||||
}
|
||||
return item.content || ''
|
||||
}
|
||||
|
||||
// 计算预览元素的绝对定位样式(与 TemplateEditor 保持一致)
|
||||
function computePreviewItemStyle(value: any, idx: string | number): any {
|
||||
const idxNum = Number(idx)
|
||||
const base: any = {
|
||||
position: 'absolute',
|
||||
left: value.left + 'mm',
|
||||
top: value.top + 'mm',
|
||||
width: value.width + 'mm',
|
||||
height: value.height + 'mm',
|
||||
zIndex: idxNum + 1,
|
||||
textAlign: value.textAlign || 'left',
|
||||
lineHeight: (value.lineHeight || 6) + 'mm',
|
||||
transform: `rotate(${(value.rotate || 0) * 90}deg)`,
|
||||
transformOrigin: 'center center',
|
||||
overflow: 'hidden',
|
||||
}
|
||||
if (value.type === 'text') {
|
||||
Object.assign(base, {
|
||||
fontSize: (value.fontSize || 8) + 'pt',
|
||||
lineHeight: (value.lineHeight || 6) + 'mm',
|
||||
fontWeight: value.bold ? 'bold' : 'normal',
|
||||
fontStyle: value.italic ? 'italic' : 'normal',
|
||||
textDecoration: value.underline ? 'underline' : 'none',
|
||||
whiteSpace: value.autoWrap ? 'pre-wrap' : 'nowrap',
|
||||
writingMode: value.direction === 'vertical' ? 'vertical-rl' : 'horizontal-tb'
|
||||
})
|
||||
}
|
||||
if (value.type === 'table') {
|
||||
base.width = 'auto'
|
||||
base.height = 'auto'
|
||||
}
|
||||
if (value.type === 'shape') {
|
||||
if (value.shapeType === 'line') {
|
||||
base.border = 'none'
|
||||
base.borderTop = `${value.lineWeight || 1}pt ${value.lineStyle || 'solid'} #000`
|
||||
base.backgroundColor = 'transparent'
|
||||
base.height = 'auto'
|
||||
} else if (value.shapeType === 'vertical-line') {
|
||||
base.border = 'none'
|
||||
base.borderLeft = `${value.lineWeight || 1}pt ${value.lineStyle || 'solid'} #000`
|
||||
base.backgroundColor = 'transparent'
|
||||
base.width = 'auto'
|
||||
} else if (value.shapeType === 'box') {
|
||||
base.border = `${value.lineWeight || 1}pt ${value.lineStyle || 'solid'} #000`
|
||||
base.backgroundColor = 'transparent'
|
||||
}
|
||||
}
|
||||
return base
|
||||
}
|
||||
|
||||
const completedPrintCount = computed(() => {
|
||||
return Object.values(printStatusMap.value).filter(s => s === 'done').length
|
||||
})
|
||||
|
||||
async function handleOpenPrintDialog() {
|
||||
if (!selectionRows.value.length) {
|
||||
@ -991,223 +793,9 @@ async function handleOpenPrintDialog() {
|
||||
ElMessage.warning(`只有“已完成”状态的单据才能打印。当前选中包含 ${invalidRows.length} 个非已完成单据。`)
|
||||
return
|
||||
}
|
||||
|
||||
// 重置打印状态
|
||||
currentPrintIndex.value = 0
|
||||
printStatusMap.value = {}
|
||||
selectionRows.value.forEach(row => {
|
||||
printStatusMap.value[row.id] = 'pending'
|
||||
})
|
||||
|
||||
// 加载第一项数据
|
||||
await loadPrintFormData(0)
|
||||
|
||||
// 加载打印台和模板
|
||||
loadPrintOptions()
|
||||
printDialogVisible.value = true
|
||||
}
|
||||
|
||||
async function switchPrintItem(index: number) {
|
||||
if (printing.value) return
|
||||
currentPrintIndex.value = index
|
||||
await loadPrintFormData(index)
|
||||
}
|
||||
|
||||
async function loadPrintFormData(index: number) {
|
||||
const mainRow = selectionRows.value[index]
|
||||
if (!mainRow) return
|
||||
|
||||
// 1. 从主表填充
|
||||
const formData: any = {}
|
||||
printFormConfig.forEach(group => {
|
||||
group.fields.forEach((field: any) => {
|
||||
const val = mainRow[field.prop] || ''
|
||||
// 如果是选择器类型,尝试从 options 中提取 label(翻译后的文本)
|
||||
if (field.type === 'select' && field.options) {
|
||||
const opt = field.options.find((o: any) => o.value === val)
|
||||
formData[field.prop] = opt ? opt.label : val
|
||||
} else {
|
||||
formData[field.prop] = val
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
// 2. 清空旧明细字段
|
||||
const detailFields = ['product_name', 'barcode', 'box_quantity', 'boxes_per_pallet', 'weight', 'actual_quantity', 'remark']
|
||||
detailFields.forEach(f => formData[f] = '')
|
||||
|
||||
// 3. 获取详情填充第一个商品的明细(如果有的话)
|
||||
try {
|
||||
const res: any = await receivingApi.getReceivingDetail({
|
||||
id: mainRow.id,
|
||||
pagination: { page: 1, pageSize: 1000 }
|
||||
})
|
||||
if (res && res.code === 200) {
|
||||
const details = res.data.receiving?.details || []
|
||||
|
||||
// 翻译并整理明细列表
|
||||
const processedDetails = details.map((item: any) => {
|
||||
const newItem = { ...item }
|
||||
// 尝试对明细字段进行翻译(如果有配置)
|
||||
const detailConfig = printFormConfig.find(g => g.group === '商品明细')
|
||||
if (detailConfig) {
|
||||
detailConfig.fields.forEach((field: any) => {
|
||||
const val = newItem[field.prop]
|
||||
if (field.type === 'select' && field.options) {
|
||||
const opt = field.options.find((o: any) => o.value === val)
|
||||
newItem[field.prop] = opt ? opt.label : val
|
||||
} else if (val === undefined || val === null) {
|
||||
newItem[field.prop] = ''
|
||||
}
|
||||
})
|
||||
}
|
||||
return newItem
|
||||
})
|
||||
|
||||
// 将明细列表挂载到 formData,通常命名为 details 以便模板遍历
|
||||
formData.details = processedDetails
|
||||
|
||||
if (processedDetails.length > 0) {
|
||||
const detail = processedDetails[0]
|
||||
const detailConfig = printFormConfig.find(g => g.group === '商品明细')
|
||||
if (detailConfig) {
|
||||
detailConfig.fields.forEach((field: any) => {
|
||||
// 使用处理过的数据
|
||||
formData[field.prop] = detail[field.prop]
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载打印明细失败', e)
|
||||
}
|
||||
|
||||
Object.assign(printForm, formData)
|
||||
}
|
||||
|
||||
async function loadPrintOptions() {
|
||||
try {
|
||||
const [stations, templates]: any = await Promise.all([
|
||||
stationApi.getList({ page: 1, pageSize: 100, where: {} }),
|
||||
templateApi.listTemplates({})
|
||||
])
|
||||
// 打印台:兼容 code 0 和 code 200,数据在 data.list 中
|
||||
if (stations && (stations.code === 200 || stations.code === 0)) {
|
||||
const rawList: any[] = stations.data?.list || stations.data || []
|
||||
stationOptions.value = rawList.map((item: any) => ({
|
||||
id: item.id,
|
||||
name: item.name || item.label || String(item.id)
|
||||
}))
|
||||
} else {
|
||||
console.warn('获取打印台列表失败:', stations)
|
||||
}
|
||||
// 打印模板:与模板编辑页保持一致,从 res.presetTree 中递归提取所有非分类节点
|
||||
if (templates && templates.code === 200) {
|
||||
const flattenTree = (nodes: any[]): any[] => {
|
||||
const result: any[] = []
|
||||
for (const node of nodes) {
|
||||
if (node.type !== 'category') {
|
||||
// 保存原始节点数据,特别是 template_content 等后端需要的字段
|
||||
result.push({
|
||||
...node,
|
||||
id: node.id,
|
||||
name: node.title || node.name || node.template_name || String(node.id)
|
||||
})
|
||||
}
|
||||
if (node.children && node.children.length > 0) {
|
||||
result.push(...flattenTree(node.children))
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
templateOptions.value = flattenTree(templates.presetTree || [])
|
||||
} else {
|
||||
console.warn('获取模板列表失败:', templates)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载打印配置失败', e)
|
||||
}
|
||||
}
|
||||
|
||||
async function handleStationChange(val: string | number) {
|
||||
printSettings.printer = ''
|
||||
printerOptions.value = []
|
||||
if (!val) return
|
||||
|
||||
printerLoading.value = true
|
||||
try {
|
||||
const res: any = await stationApi.getComputerPrinter(String(val))
|
||||
if (res && res.code === 0 && res.data) {
|
||||
// res.data 可能是一个包含打印机列表的对象,具体取决于后端实现
|
||||
// 这里的逻辑参考 system/setting/printStation 页面的预期数据格式
|
||||
const printerList = Array.isArray(res.data) ? res.data : (res.data.list || [])
|
||||
printerOptions.value = printerList.map((p: any) => ({
|
||||
label: p.name || p.printerName || p,
|
||||
value: p.name || p.printerName || p
|
||||
}))
|
||||
} else {
|
||||
console.warn('获取打印机列表失败:', res)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('获取打印机列表出错:', e)
|
||||
} finally {
|
||||
printerLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
async function doPrint() {
|
||||
if (!printSettings.station || !printSettings.template) {
|
||||
ElMessage.warning('请选择打印台和模板')
|
||||
return
|
||||
}
|
||||
if (!printSettings.printer) {
|
||||
ElMessage.warning('请选择打印机')
|
||||
return
|
||||
}
|
||||
|
||||
printing.value = true
|
||||
const currentRow = selectionRows.value[currentPrintIndex.value]
|
||||
|
||||
try {
|
||||
// 后端字段:computerId (打印台id)、printer (打印机名)、template (模板对象)、data、type、size
|
||||
const selectedTemplateObj = templateOptions.value.find((t: any) => t.id === printSettings.template) || null
|
||||
const printPayload = {
|
||||
type: 'customize',
|
||||
computerId: printSettings.station,
|
||||
printer: printSettings.printer,
|
||||
template: selectedTemplateObj,
|
||||
data: { ...printForm },
|
||||
timestamp: Date.now(),
|
||||
size: 1
|
||||
}
|
||||
|
||||
const res: any = await stationApi.sendPrint(printPayload)
|
||||
|
||||
// 兼容 code 0(PDA 风格)和 code 200 两种后端响应
|
||||
if (res && (res.code === 0 || res.code === 200 || res.status === 'success' || res.flag === 'success')) {
|
||||
printStatusMap.value[currentRow.id] = 'done'
|
||||
ElMessage.success(`单据 ${currentRow.receiving_number} 打印成功`)
|
||||
|
||||
// 自动切换到下一个待打印单据
|
||||
if (currentPrintIndex.value < selectionRows.value.length - 1) {
|
||||
currentPrintIndex.value++
|
||||
await loadPrintFormData(currentPrintIndex.value)
|
||||
} else {
|
||||
ElMessage.info('已完成所有选中单据的打印操作')
|
||||
}
|
||||
} else {
|
||||
printStatusMap.value[currentRow.id] = 'error'
|
||||
ElMessage.error(res?.msg || res?.message || `单据 ${currentRow.receiving_number} 打印失败`)
|
||||
}
|
||||
} catch (e: any) {
|
||||
console.error('打印出错:', e)
|
||||
printStatusMap.value[currentRow.id] = 'error'
|
||||
ElMessage.error('打印请求失败,请检查网络或打印台状态')
|
||||
} finally {
|
||||
printing.value = false
|
||||
}
|
||||
}
|
||||
|
||||
async function confirmcomplete() {
|
||||
if (!selectionRows.value.length) {
|
||||
ElMessage.warning('请先选择要操作的收货单')
|
||||
@ -1901,127 +1489,6 @@ async function handleExport() {
|
||||
}
|
||||
|
||||
|
||||
.print-dialog-layout {
|
||||
display: flex;
|
||||
height: 1150px;
|
||||
border: 1px solid #ebeef5;
|
||||
|
||||
.print-batch-list {
|
||||
width: 250px;
|
||||
border-right: 1px solid #ebeef5;
|
||||
background-color: #fafafa;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow-y: auto;
|
||||
/* 限制左侧列表高度,使其在对话框中可滚动 */
|
||||
max-height: 100%;
|
||||
|
||||
.list-title {
|
||||
padding: 10px;
|
||||
font-weight: bold;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.batch-item {
|
||||
padding: 12px 15px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
border-bottom: 1px dotted #eee;
|
||||
transition: background 0.2s;
|
||||
|
||||
&:hover {
|
||||
background-color: #f0f7ff;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background-color: #e6f7ff;
|
||||
border-left: 3px solid #1890ff;
|
||||
}
|
||||
|
||||
.item-index {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.item-number {
|
||||
flex: 1;
|
||||
font-weight: 500;
|
||||
font-family: monospace;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.print-preview-main {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
background-color: #fff;
|
||||
|
||||
.print-settings-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 10px 15px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
background-color: #fafafa;
|
||||
flex-shrink: 0;
|
||||
|
||||
.el-select {
|
||||
flex: 1;
|
||||
min-width: 130px;
|
||||
}
|
||||
}
|
||||
|
||||
.print-canvas-area {
|
||||
flex: 1;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
padding: 20px;
|
||||
background-color: #f0f2f5;
|
||||
|
||||
.preview-page {
|
||||
background: #fff;
|
||||
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
|
||||
border: 1px solid #ddd;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.preview-empty {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-footer {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
|
||||
.progress-tip {
|
||||
color: #606266;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
/* 居中打印对话框(垂直居中) */
|
||||
.print-dialog .el-dialog {
|
||||
top: 50% !important;
|
||||
transform: translateY(-50%) !important;
|
||||
}
|
||||
|
||||
.match-putaway-dialog .match-hint {
|
||||
margin: 0 0 8px;
|
||||
font-size: 13px;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="storage-stockout-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
width="320px"
|
||||
width="250px"
|
||||
:tree-props="{ children: 'children', label: 'label' }"
|
||||
:auto-submit="false"
|
||||
:initial-conditions="initialConditions"
|
||||
|
||||
@ -24,7 +24,7 @@ export const availableFields = [
|
||||
]
|
||||
|
||||
export const scanBoxConfig = {
|
||||
width: '320px',
|
||||
width: '250px',
|
||||
treeProps: { children: 'children', label: 'label' },
|
||||
autoSubmit: false
|
||||
}
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="store-container">
|
||||
<scan-box
|
||||
ref="scanBox"
|
||||
width="320px"
|
||||
width="250px"
|
||||
title="货主筛选"
|
||||
:preset-tree="presetTree"
|
||||
:available-fields="availableFields"
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="printer-management-container">
|
||||
<ScanBox
|
||||
ref="scanBox"
|
||||
width="300px"
|
||||
width="250px"
|
||||
:preset-tree="presetTree"
|
||||
:available-fields="availableFields"
|
||||
@condition-change="onScanConditionChange"
|
||||
|
||||
@ -378,7 +378,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog title="编辑模板信息" v-model="showEditTemplate" width="420px" :close-on-click-modal="false">
|
||||
<el-dialog title="编辑模板信息" v-model="showEditTemplate" width="420px" align-center :close-on-click-modal="false">
|
||||
<el-form :model="form" label-width="80px">
|
||||
<el-form-item label="模板名称">
|
||||
<el-input v-model="form.template_name" placeholder="请输入模板名称"></el-input>
|
||||
|
||||
@ -3,55 +3,182 @@
|
||||
<!-- 模板列表 -->
|
||||
<div class="left">
|
||||
<div class="title">
|
||||
<el-icon><Document /></el-icon> 模板列表
|
||||
<span class="title-main">
|
||||
<el-icon><Document /></el-icon> 模板列表
|
||||
</span>
|
||||
<span class="title-actions">
|
||||
<el-button type="primary" link @click="openCreateDialog">
|
||||
<el-icon><Plus /></el-icon> 新建
|
||||
</el-button>
|
||||
<el-button type="danger" link :disabled="!canDeleteSelected" @click="confirmDeleteTemplate">
|
||||
<el-icon><Delete /></el-icon> 删除
|
||||
</el-button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="template-tree">
|
||||
<el-tree
|
||||
ref="presetTreeRef"
|
||||
:data="filteredPresetTree"
|
||||
:props="treeProps"
|
||||
node-key="id"
|
||||
accordion
|
||||
highlight-current
|
||||
:expand-on-click-node="false"
|
||||
@node-click="handlePresetClick"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<span class="custom-tree-node">
|
||||
<span class="tree-node-content">
|
||||
<el-icon v-if="data.type" class="tree-icon">
|
||||
<Folder v-if="data.type === 'category'" />
|
||||
<Document v-else />
|
||||
</el-icon>
|
||||
<span class="node-label">{{ $t(data.title) }}</span>
|
||||
<span v-if="data.count" class="count-badge">{{ data.count }}</span>
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
<div class="left-scroll">
|
||||
<!-- <div class="section by-type-section">
|
||||
<div class="section-title">按业务类型查询</div>
|
||||
<el-form :model="typeQueryForm" label-position="top" class="type-query-form" @submit.prevent>
|
||||
<el-form-item label="业务类型" required>
|
||||
<el-select
|
||||
v-model="typeQueryForm.businessType"
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
clearable
|
||||
placeholder="从下拉选择或输入后回车"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="o in businessTypeOptions"
|
||||
:key="o.value"
|
||||
:label="o.label"
|
||||
:value="o.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
:loading="typeQueryLoading"
|
||||
:disabled="!typeQueryForm.businessType || !String(typeQueryForm.businessType).trim()"
|
||||
@click="runTypeQuery"
|
||||
>
|
||||
查询
|
||||
</el-button>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-if="typeQueryRows.length"
|
||||
:data="typeQueryRows"
|
||||
max-height="220"
|
||||
size="small"
|
||||
highlight-current-row
|
||||
class="type-query-table"
|
||||
empty-text="暂无数据"
|
||||
@row-click="onTypeQueryRowClick"
|
||||
>
|
||||
<el-table-column prop="id" label="ID" width="72" />
|
||||
<el-table-column label="名称" min-width="96" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
{{ row.template_name || row.name || '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="尺寸(mm)" width="102">
|
||||
<template #default="{ row }">
|
||||
{{ row.page_width ?? row.pageWidth ?? '—' }}×{{ row.page_height ?? row.pageHeight ?? '—' }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div> -->
|
||||
|
||||
<div class="section tree-section">
|
||||
<div class="section-title">预设模板树</div>
|
||||
<div class="template-tree">
|
||||
<el-tree
|
||||
:data="filteredPresetTree"
|
||||
:props="treeProps"
|
||||
node-key="id"
|
||||
accordion
|
||||
highlight-current
|
||||
:expand-on-click-node="false"
|
||||
@node-click="handlePresetClick"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<span class="custom-tree-node">
|
||||
<span class="tree-node-content">
|
||||
<el-icon v-if="data.type" class="tree-icon">
|
||||
<Folder v-if="data.type === 'category'" />
|
||||
<Document v-else />
|
||||
</el-icon>
|
||||
<span class="node-label">{{ $t(data.title) }}</span>
|
||||
<span v-if="data.count" class="count-badge">{{ data.count }}</span>
|
||||
</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="right">
|
||||
<template-editor
|
||||
v-if="hasTemplate"
|
||||
:print-items="printItems"
|
||||
@save="saveTemplateInfo"
|
||||
@reset="resetTemplateInfo"
|
||||
@undo="undoTemplateChange"
|
||||
@undo="undoTemplateChange"
|
||||
/>
|
||||
<div v-else class="empty-state">
|
||||
<el-empty description="请选择一个模板进行编辑" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-dialog
|
||||
v-model="createDialogVisible"
|
||||
title="新建打印模板"
|
||||
width="480px"
|
||||
align-center
|
||||
destroy-on-close
|
||||
@closed="resetCreateForm"
|
||||
>
|
||||
<!-- <p class="dialog-hint">
|
||||
对应接口 create:platform / template_type / template_url 由服务端固定;此处提交 template_name、business_type、page_width、page_height(可选 template_content,默认空白画布)。
|
||||
</p> -->
|
||||
<el-form ref="createFormRef" :model="createForm" :rules="createRules" label-width="108px">
|
||||
<el-form-item label="模板名称" prop="template_name">
|
||||
<el-input v-model="createForm.template_name" maxlength="64" show-word-limit placeholder="必填" />
|
||||
</el-form-item>
|
||||
<el-form-item label="业务类型" prop="business_type">
|
||||
<el-select
|
||||
v-model="createForm.business_type"
|
||||
filterable
|
||||
allow-create
|
||||
default-first-option
|
||||
placeholder="必填,可与左侧查询一致"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="o in businessTypeOptions"
|
||||
:key="o.value"
|
||||
:label="o.label"
|
||||
:value="o.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="宽度(mm)" prop="page_width">
|
||||
<el-input-number
|
||||
v-model="createForm.page_width"
|
||||
:min="1"
|
||||
:max="500"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="高度(mm)" prop="page_height">
|
||||
<el-input-number
|
||||
v-model="createForm.page_height"
|
||||
:min="1"
|
||||
:max="500"
|
||||
controls-position="right"
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button @click="createDialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" :loading="createSubmitting" @click="submitCreate">创建</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Document, Folder } from '@element-plus/icons-vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import { Document, Folder, Plus, Delete } from '@element-plus/icons-vue'
|
||||
import TemplateEditor from './components/TemplateEditor.vue'
|
||||
import * as TemplatesApi from '@/api/setting.printtemplate/printTemplate'
|
||||
import { usePrintTemplateStore } from '@/stores/modules/printTemplate'
|
||||
@ -60,7 +187,7 @@ import { storeToRefs } from 'pinia'
|
||||
const printTemplateStore = usePrintTemplateStore()
|
||||
const { templateInfo, templateObjects } = storeToRefs(printTemplateStore)
|
||||
|
||||
const filteredPresetTree = ref([])
|
||||
const filteredPresetTree = ref<any[]>([])
|
||||
const treeProps = {
|
||||
children: 'children',
|
||||
label: 'title'
|
||||
@ -68,20 +195,110 @@ const treeProps = {
|
||||
const templateSelectItem = ref<any>(null)
|
||||
const printItems = ref<any[]>([])
|
||||
|
||||
const typeQueryForm = ref({
|
||||
businessType: '' as string
|
||||
})
|
||||
const typeQueryLoading = ref(false)
|
||||
const typeQueryRows = ref<any[]>([])
|
||||
|
||||
const createDialogVisible = ref(false)
|
||||
const createSubmitting = ref(false)
|
||||
const createFormRef = ref<FormInstance>()
|
||||
const createForm = ref({
|
||||
template_name: '',
|
||||
business_type: '',
|
||||
page_width: 75,
|
||||
page_height: 129
|
||||
})
|
||||
|
||||
const createRules: FormRules = {
|
||||
template_name: [{ required: true, message: '请输入模板名称', trigger: 'blur' }],
|
||||
business_type: [{ required: true, message: '请选择或输入业务类型', trigger: 'change' }],
|
||||
page_width: [{ required: true, message: '请输入页面宽度', trigger: 'change' }],
|
||||
page_height: [{ required: true, message: '请输入页面高度', trigger: 'change' }]
|
||||
}
|
||||
|
||||
function isApiSuccess(res: any) {
|
||||
return res && (res.code === 200 || res.code === 0)
|
||||
}
|
||||
|
||||
/** listTemplatesByType 文档未列明细字段,兼容常见列表包裹形态 */
|
||||
function normalizeTemplateListResponse(res: any): any[] {
|
||||
if (!isApiSuccess(res)) return []
|
||||
const d = res.data
|
||||
if (Array.isArray(d)) return d
|
||||
if (Array.isArray(d?.list)) return d.list
|
||||
if (Array.isArray(d?.templates)) return d.templates
|
||||
if (Array.isArray(d?.records)) return d.records
|
||||
if (Array.isArray(res.list)) return res.list
|
||||
if (Array.isArray(res.templates)) return res.templates
|
||||
if (Array.isArray(res.records)) return res.records
|
||||
return []
|
||||
}
|
||||
|
||||
function pickCreatedId(res: any): number | null {
|
||||
if (!isApiSuccess(res)) return null
|
||||
const raw = res.data?.id ?? res.id ?? (typeof res.data === 'number' ? res.data : null)
|
||||
const n = Number(raw)
|
||||
return Number.isFinite(n) ? n : null
|
||||
}
|
||||
|
||||
function collectBusinessTypesFromTree(nodes: any[]): { label: string; value: string }[] {
|
||||
const seen = new Map<string, string>()
|
||||
const walk = (arr: any[]) => {
|
||||
if (!Array.isArray(arr)) return
|
||||
for (const n of arr) {
|
||||
const bt = n?.business_type ?? n?.businessType
|
||||
if (bt != null && String(bt).trim() !== '') {
|
||||
const key = String(bt)
|
||||
if (!seen.has(key)) {
|
||||
const title = typeof n.title === 'string' && n.title && !n.title.includes('.') ? n.title : key
|
||||
seen.set(key, title)
|
||||
}
|
||||
}
|
||||
if (n?.children?.length) walk(n.children)
|
||||
}
|
||||
}
|
||||
walk(nodes)
|
||||
return [...seen.entries()]
|
||||
.map(([value, label]) => ({ value, label: `${label} (${value})` }))
|
||||
.sort((a, b) => a.value.localeCompare(b.value))
|
||||
}
|
||||
|
||||
const businessTypeOptions = computed(() => collectBusinessTypesFromTree(filteredPresetTree.value))
|
||||
|
||||
function findPrintItemsForBusinessType(nodes: any[], bt: string): any[] {
|
||||
let found: any[] = []
|
||||
const walk = (arr: any[]) => {
|
||||
if (!Array.isArray(arr)) return
|
||||
for (const n of arr) {
|
||||
const nbt = n?.business_type ?? n?.businessType
|
||||
if (nbt === bt && Array.isArray(n.printItems) && n.printItems.length) {
|
||||
found = n.printItems
|
||||
}
|
||||
if (n?.children?.length) walk(n.children)
|
||||
}
|
||||
}
|
||||
walk(nodes)
|
||||
return found
|
||||
}
|
||||
|
||||
const hasTemplate = computed(() => {
|
||||
return !!templateInfo.value.width
|
||||
})
|
||||
|
||||
const canDeleteSelected = computed(() => {
|
||||
const id = templateInfo.value?.id ?? templateSelectItem.value?.id
|
||||
if (id === undefined || id === null || id === '') return false
|
||||
return Number.isFinite(Number(id))
|
||||
})
|
||||
|
||||
const handlePresetClick = async (data: any, node: any) => {
|
||||
// 针对 RECEIPT 这种 businessType 节点,它可能既是 category 又包含 printItems,
|
||||
// 且没有子节点(children 为空),这种情况下应该允许加载
|
||||
if (data.type === 'category' && data.children && data.children.length > 0) {
|
||||
node.expanded = !node.expanded
|
||||
return
|
||||
}
|
||||
|
||||
// 查找可用元素列表(printItems)
|
||||
// 优先从当前节点找,如果没有则从父节点找
|
||||
|
||||
if (data.printItems && data.printItems.length > 0) {
|
||||
printItems.value = data.printItems
|
||||
} else if (node.parent && node.parent.data && node.parent.data.printItems) {
|
||||
@ -93,7 +310,6 @@ const handlePresetClick = async (data: any, node: any) => {
|
||||
templateSelectItem.value = JSON.parse(JSON.stringify(data))
|
||||
try {
|
||||
await printTemplateStore.loadTemplate(templateSelectItem.value)
|
||||
console.log('模板加载成功:', templateInfo.value)
|
||||
ElMessage.success('模板加载成功')
|
||||
} catch (error: any) {
|
||||
console.error('加载模板失败:', error)
|
||||
@ -104,9 +320,8 @@ const handlePresetClick = async (data: any, node: any) => {
|
||||
const loadTemplates = async () => {
|
||||
try {
|
||||
const res: any = await TemplatesApi.listTemplates({})
|
||||
if (res.code === 200) {
|
||||
filteredPresetTree.value = res.presetTree || [];
|
||||
console.log('加载模板树成功:', filteredPresetTree.value)
|
||||
if (isApiSuccess(res)) {
|
||||
filteredPresetTree.value = res.presetTree || []
|
||||
} else {
|
||||
ElMessage.error('加载模板失败: ' + (res.message || '未知错误'))
|
||||
}
|
||||
@ -116,6 +331,48 @@ const loadTemplates = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const runTypeQuery = async () => {
|
||||
const bt = String(typeQueryForm.value.businessType || '').trim()
|
||||
if (!bt) {
|
||||
ElMessage.warning('请填写业务类型 businessType')
|
||||
return
|
||||
}
|
||||
typeQueryLoading.value = true
|
||||
try {
|
||||
const res: any = await TemplatesApi.listTemplatesByType({ businessType: bt })
|
||||
typeQueryRows.value = normalizeTemplateListResponse(res)
|
||||
if (!isApiSuccess(res)) {
|
||||
ElMessage.error(res?.message || '按类型查询失败')
|
||||
return
|
||||
}
|
||||
if (!typeQueryRows.value.length) {
|
||||
ElMessage.info('该业务类型下暂无模板')
|
||||
} else {
|
||||
ElMessage.success(`已加载 ${typeQueryRows.value.length} 条模板`)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
ElMessage.error('按类型查询失败')
|
||||
typeQueryRows.value = []
|
||||
} finally {
|
||||
typeQueryLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const onTypeQueryRowClick = async (row: any) => {
|
||||
const bt = row.business_type ?? row.businessType ?? typeQueryForm.value.businessType
|
||||
printItems.value =
|
||||
row.printItems?.length ? row.printItems : findPrintItemsForBusinessType(filteredPresetTree.value, String(bt || ''))
|
||||
templateSelectItem.value = JSON.parse(JSON.stringify(row))
|
||||
try {
|
||||
await printTemplateStore.loadTemplate(templateSelectItem.value)
|
||||
ElMessage.success('模板加载成功')
|
||||
} catch (error: any) {
|
||||
console.error('加载模板失败:', error)
|
||||
ElMessage.error('加载模板失败: ' + (error.message || '未知错误'))
|
||||
}
|
||||
}
|
||||
|
||||
const saveTemplateInfo = async () => {
|
||||
const info = templateInfo.value
|
||||
const saveData = {
|
||||
@ -126,14 +383,15 @@ const saveTemplateInfo = async () => {
|
||||
page_height: info.height,
|
||||
template_content: templateObjects.value
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
const res: any = await TemplatesApi.saveTemplate(saveData)
|
||||
if (res.code === 200) {
|
||||
if (isApiSuccess(res)) {
|
||||
ElMessage.success('模板保存成功')
|
||||
// 保存成功后更新初始快照,这样重置时会回到这个已保存的状态
|
||||
printTemplateStore.updateInitialSnapshot()
|
||||
loadTemplates() // 刷新列表
|
||||
await loadTemplates()
|
||||
const bt = String(typeQueryForm.value.businessType || '').trim()
|
||||
if (bt) await runTypeQuery()
|
||||
} else {
|
||||
ElMessage.error('模板保存失败: ' + (res.message || '未知错误'))
|
||||
}
|
||||
@ -142,13 +400,43 @@ const saveTemplateInfo = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
const confirmDeleteTemplate = async () => {
|
||||
if (!canDeleteSelected.value) return
|
||||
const id = Number(templateInfo.value?.id ?? templateSelectItem.value?.id)
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
`确定删除模板 ID ${id} 吗?(接口 delete:软删除)`,
|
||||
'删除确认',
|
||||
{ type: 'warning', confirmButtonText: '删除', cancelButtonText: '取消' }
|
||||
)
|
||||
} catch {
|
||||
return
|
||||
}
|
||||
try {
|
||||
const res: any = await TemplatesApi.deleteTemplate({ id })
|
||||
if (isApiSuccess(res)) {
|
||||
ElMessage.success('删除成功')
|
||||
templateSelectItem.value = null
|
||||
printItems.value = []
|
||||
printTemplateStore.$reset()
|
||||
await loadTemplates()
|
||||
const bt = String(typeQueryForm.value.businessType || '').trim()
|
||||
if (bt) await runTypeQuery()
|
||||
} else {
|
||||
ElMessage.error(res?.message || '删除失败')
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
ElMessage.error('删除失败')
|
||||
}
|
||||
}
|
||||
|
||||
const resetTemplateInfo = async () => {
|
||||
if (!templateSelectItem.value) {
|
||||
ElMessage.warning('请先选择一个模板')
|
||||
return
|
||||
}
|
||||
try {
|
||||
// 使用 store 提供的完整重置方法,恢复为初始载入状态并清空历史
|
||||
printTemplateStore.resetTemplate()
|
||||
ElMessage.success('重置成功,已撤销所有操作')
|
||||
} catch (error) {
|
||||
@ -161,6 +449,74 @@ const undoTemplateChange = () => {
|
||||
printTemplateStore.undo()
|
||||
}
|
||||
|
||||
function openCreateDialog() {
|
||||
createDialogVisible.value = true
|
||||
const presetBt = typeQueryForm.value.businessType
|
||||
if (presetBt && String(presetBt).trim()) {
|
||||
createForm.value.business_type = String(presetBt).trim()
|
||||
}
|
||||
}
|
||||
|
||||
function resetCreateForm() {
|
||||
createForm.value = {
|
||||
template_name: '',
|
||||
business_type: '',
|
||||
page_width: 75,
|
||||
page_height: 129
|
||||
}
|
||||
createFormRef.value?.clearValidate()
|
||||
}
|
||||
|
||||
const submitCreate = async () => {
|
||||
const form = createFormRef.value
|
||||
if (!form) return
|
||||
await form.validate(async (valid) => {
|
||||
if (!valid) return
|
||||
createSubmitting.value = true
|
||||
try {
|
||||
const payload = {
|
||||
template_name: createForm.value.template_name.trim(),
|
||||
business_type: String(createForm.value.business_type).trim(),
|
||||
page_width: createForm.value.page_width,
|
||||
page_height: createForm.value.page_height
|
||||
}
|
||||
const res: any = await TemplatesApi.createTemplate(payload)
|
||||
const newId = pickCreatedId(res)
|
||||
if (newId != null) {
|
||||
ElMessage.success(`创建成功,模板 ID:${newId}`)
|
||||
createDialogVisible.value = false
|
||||
await loadTemplates()
|
||||
typeQueryForm.value.businessType = payload.business_type
|
||||
await runTypeQuery()
|
||||
const row = typeQueryRows.value.find((r) => Number(r.id) === newId)
|
||||
if (row) {
|
||||
await onTypeQueryRowClick(row)
|
||||
} else {
|
||||
printItems.value = findPrintItemsForBusinessType(filteredPresetTree.value, payload.business_type)
|
||||
const minimal = {
|
||||
id: newId,
|
||||
template_name: payload.template_name,
|
||||
page_width: payload.page_width,
|
||||
page_height: payload.page_height,
|
||||
business_type: payload.business_type,
|
||||
template_content: [],
|
||||
editable: true
|
||||
}
|
||||
templateSelectItem.value = JSON.parse(JSON.stringify(minimal))
|
||||
await printTemplateStore.loadTemplate(templateSelectItem.value)
|
||||
}
|
||||
} else {
|
||||
ElMessage.error(res?.message || '创建失败:未返回有效 id')
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
ElMessage.error('创建失败')
|
||||
} finally {
|
||||
createSubmitting.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
loadTemplates()
|
||||
})
|
||||
@ -176,7 +532,7 @@ onMounted(() => {
|
||||
overflow: hidden;
|
||||
|
||||
.left {
|
||||
width: 300px;
|
||||
width: 320px;
|
||||
height: 100%;
|
||||
background: #ffffff;
|
||||
border-right: 1px solid #dcdfe6;
|
||||
@ -187,11 +543,84 @@ onMounted(() => {
|
||||
.title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
padding: 20px;
|
||||
padding: 16px 20px;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
flex-shrink: 0;
|
||||
|
||||
.title-main {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.title-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.left-scroll {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.section {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.section-title {
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.section-hint {
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
margin: 0 0 10px;
|
||||
line-height: 1.45;
|
||||
}
|
||||
|
||||
.by-type-section {
|
||||
padding: 12px 16px 16px;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.type-query-form {
|
||||
margin-bottom: 10px;
|
||||
|
||||
:deep(.el-form-item) {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.type-query-table {
|
||||
width: 100%;
|
||||
margin-top: 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.tree-section {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 12px 0 0;
|
||||
|
||||
.section-title {
|
||||
padding: 0 16px 8px;
|
||||
}
|
||||
}
|
||||
|
||||
@ -212,10 +641,18 @@ onMounted(() => {
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-hint {
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
margin: 0 0 14px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.template-tree {
|
||||
padding: 12px;
|
||||
padding: 0 12px 12px;
|
||||
overflow: auto;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.tree-icon {
|
||||
@ -251,7 +688,7 @@ onMounted(() => {
|
||||
|
||||
.left {
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
max-height: 55vh;
|
||||
border-right: none;
|
||||
border-bottom: 1px solid #dcdfe6;
|
||||
}
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
# 接口
|
||||
|
||||
- 更新时间: 2026-05-09 10:21:22
|
||||
- 更新时间: 2026-05-11 09:20:11
|
||||
- 扫描目录: `src\api`
|
||||
- 模块数: 34
|
||||
- API 文件数: 34
|
||||
- 接口数: 280
|
||||
- 已启用: 249
|
||||
- 模块数: 35
|
||||
- API 文件数: 35
|
||||
- 接口数: 283
|
||||
- 已启用: 252
|
||||
- 占位接口: 2
|
||||
|
||||
## 模块统计
|
||||
@ -15,6 +15,7 @@
|
||||
| config | 1 | 1 | 0 | 0 |
|
||||
| dashboard | 1 | 6 | 6 | 0 |
|
||||
| index | 1 | 18 | 15 | 1 |
|
||||
| order | 1 | 1 | 1 | 0 |
|
||||
| order.archiveorder | 1 | 2 | 2 | 0 |
|
||||
| order.deliveryexpectionorder | 1 | 2 | 2 | 0 |
|
||||
| order.deliveryorder | 1 | 2 | 2 | 0 |
|
||||
@ -25,8 +26,8 @@
|
||||
| order.pendingorder | 1 | 16 | 16 | 0 |
|
||||
| order.print | 1 | 1 | 1 | 0 |
|
||||
| order.revieworder | 1 | 3 | 3 | 0 |
|
||||
| order.wave | 1 | 29 | 28 | 0 |
|
||||
| pick | 1 | 1 | 1 | 0 |
|
||||
| order.wave | 1 | 30 | 29 | 0 |
|
||||
| pick | 1 | 2 | 2 | 0 |
|
||||
| print | 1 | 13 | 12 | 1 |
|
||||
| printer.station | 1 | 11 | 1 | 0 |
|
||||
| setting.account | 1 | 7 | 7 | 0 |
|
||||
@ -76,6 +77,7 @@
|
||||
| index | searchSpace | index.searchSpace | POST | 是 | 否 | index/index.ts | |
|
||||
| index | tryAutoTranslateNewKeys | index.tryAutoTranslateNewKeys | POST | 是 | 否 | index/index.ts | |
|
||||
| index | uploadSuccessNotify | index.uploadSuccessNotify | POST | 是 | 否 | index/index.ts | |
|
||||
| order | orderModuleWaveBatchList | order.wave.batchList | POST | 是 | 否 | order/order.ts | |
|
||||
| order.archiveorder | orderArchiveOrderDetail | order.archiveOrder.detail | POST | 是 | 否 | order.archiveorder/orderarchiveorder.ts | |
|
||||
| order.archiveorder | orderArchiveOrderList | order.archiveOrder.list | POST | 是 | 否 | order.archiveorder/orderarchiveorder.ts | |
|
||||
| order.deliveryexpectionorder | orderDeliveryExpectionOrderDetail | order.deliveryExpectionOrder.detail | POST | 是 | 否 | order.deliveryexpectionorder/orderdeliveryexpectionorder.ts | |
|
||||
@ -136,6 +138,7 @@
|
||||
| order.wave | orderWaveSingleFetchByIds | order.wave.singleFetchByIds | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||
| order.wave | orderWaveSingleOrderFetchList | order.wave.singleOrderFetchList | POST | 否 | 否 | order.wave/orderwave.ts | |
|
||||
| order.wave | orderWaveWavePickTaskCancel | order.wave.wavePickTaskCancel | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||
| order.wave | orderWaveWavePickTaskCancelSelf | order.wave.wavePickTaskCancelSelf | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||
| order.wave | orderWaveWavePickTaskList | order.wave.wavePickTaskList | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||
| order.wave | orderWaveWaveStrategyCreate | order.wave.waveStrategyCreate | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||
| order.wave | orderWaveWaveStrategyFallbackOrderList | order.wave.waveStrategyFallbackOrderList | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||
@ -146,6 +149,7 @@
|
||||
| order.wave | orderWaveWaveStrategyQuickScanTaskProgress | order.wave.waveStrategyQuickScanTaskProgress | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||
| order.wave | orderWaveWaveStrategyUpdate | order.wave.waveStrategyUpdate | POST | 是 | 否 | order.wave/orderwave.ts | |
|
||||
| pick | pickQuery | pick.query | POST | 是 | 否 | pick/pick.ts | |
|
||||
| pick | pickWavePickTaskDetail | pick.wavePickTaskDetail | POST | 是 | 否 | pick/pick.ts | |
|
||||
| print | getExpressList | index.getExpressList | POST | 否 | 否 | print/print.ts | |
|
||||
| print | add | print.add | POST | 是 | 否 | print/print.ts | |
|
||||
| print | delItems | print.del | POST | 是 | 否 | print/print.ts | |
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -12,29 +12,19 @@
|
||||
"label": "全部"
|
||||
}
|
||||
},
|
||||
"totalInterfaceCount": 245,
|
||||
"totalInterfaceCount": 247,
|
||||
"changes": {
|
||||
"summary": {
|
||||
"moduleAdded": 1,
|
||||
"moduleAdded": 0,
|
||||
"moduleDeleted": 0,
|
||||
"moduleUpdated": 1,
|
||||
"interfaceAdded": 3,
|
||||
"interfaceDeleted": 1,
|
||||
"interfaceAdded": 0,
|
||||
"interfaceDeleted": 0,
|
||||
"interfaceParamsUpdated": 2,
|
||||
"interfaceResponseUpdated": 2
|
||||
"interfaceResponseUpdated": 0
|
||||
},
|
||||
"moduleUpdates": {
|
||||
"added": [
|
||||
{
|
||||
"moduleName": "order.wave",
|
||||
"moduleKey": "order",
|
||||
"folder": "order",
|
||||
"methods": [
|
||||
"order.wave.batchList"
|
||||
],
|
||||
"interfaceCount": 1
|
||||
}
|
||||
],
|
||||
"added": [],
|
||||
"deleted": [],
|
||||
"updated": [
|
||||
{
|
||||
@ -44,82 +34,35 @@
|
||||
"previousModuleName": "订单波次模块",
|
||||
"previousModuleKey": "order.wave",
|
||||
"interfaceChanges": {
|
||||
"addedMethods": [
|
||||
"order.wave.wavePickTaskCancel",
|
||||
"order.wave.wavePickTaskList"
|
||||
],
|
||||
"deletedMethods": [
|
||||
"order.wave.batchList"
|
||||
],
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [
|
||||
"order.wave.waveStrategyFetchAdmin",
|
||||
"order.wave.waveStrategyFetchPda"
|
||||
"order.wave.waveStrategyCreate",
|
||||
"order.wave.waveStrategyUpdate"
|
||||
],
|
||||
"responseUpdatedMethods": [
|
||||
"order.wave.waveStrategyFetchAdmin",
|
||||
"order.wave.waveStrategyFetchPda"
|
||||
]
|
||||
"responseUpdatedMethods": []
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"interfaceUpdates": {
|
||||
"added": [
|
||||
{
|
||||
"moduleName": "order.wave",
|
||||
"moduleKey": "order",
|
||||
"folder": "order",
|
||||
"method": "order.wave.batchList"
|
||||
},
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"method": "order.wave.wavePickTaskCancel"
|
||||
},
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"method": "order.wave.wavePickTaskList"
|
||||
}
|
||||
],
|
||||
"deleted": [
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"method": "order.wave.batchList"
|
||||
}
|
||||
],
|
||||
"added": [],
|
||||
"deleted": [],
|
||||
"paramsUpdated": [
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"method": "order.wave.waveStrategyFetchAdmin"
|
||||
"method": "order.wave.waveStrategyCreate"
|
||||
},
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"method": "order.wave.waveStrategyFetchPda"
|
||||
"method": "order.wave.waveStrategyUpdate"
|
||||
}
|
||||
],
|
||||
"responseUpdated": [
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"method": "order.wave.waveStrategyFetchAdmin"
|
||||
},
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"method": "order.wave.waveStrategyFetchPda"
|
||||
}
|
||||
]
|
||||
"responseUpdated": []
|
||||
}
|
||||
},
|
||||
"interfaces": [
|
||||
@ -5020,6 +4963,57 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"moduleFolder": "order.wave",
|
||||
"method": "order.wave.wavePickTaskCancelSelf",
|
||||
"title": "取消单个拣货任务(仅允许取消当前操作人本人创建的任务;仅支持单个 task_id,明确不支持 task_ids)",
|
||||
"description": "取消单个拣货任务(仅允许取消当前操作人本人创建的任务;仅支持单个 task_id,明确不支持 task_ids)",
|
||||
"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",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "要取消的单个任务 ID(仅支持单个,不支持 task_ids)"
|
||||
}
|
||||
],
|
||||
"response": [
|
||||
{
|
||||
"name": "cancelled_count",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "成功取消的任务数量(0 或 1)"
|
||||
},
|
||||
{
|
||||
"name": "task_id",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "被处理的任务ID"
|
||||
},
|
||||
{
|
||||
"name": "task_no",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "被处理的任务编号(若后端返回)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
@ -5315,6 +5309,12 @@
|
||||
"type": "array|string",
|
||||
"required": false,
|
||||
"description": "允许的快递编码列表(可选,支持数组/JSON/逗号分隔);系统会校验所传编码是否在可用快递列表内,非法值将导致 400 错误。"
|
||||
},
|
||||
{
|
||||
"name": "wave_prefix",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "策略波次前缀(可选)。优先于仓库前缀;校验:长度 1-5,仅支持 A-Z0-9,保存时转大写;为空时回退仓库前缀(团购->group_wave_prefix,散单->delete_order_wave_prefix)。"
|
||||
}
|
||||
],
|
||||
"response": [
|
||||
@ -5388,8 +5388,8 @@
|
||||
"moduleKey": "order.wave",
|
||||
"moduleFolder": "order.wave",
|
||||
"method": "order.wave.waveStrategyFetchAdmin",
|
||||
"title": "按策略提交并创建抓取主流程任务(后台管理)。当前为最小主流程:执行入参校验并创建任务记录,返回创建结果与计划预览;后续将扩展完整扫描/执行链路。",
|
||||
"description": "按策略提交并创建抓取主流程任务(后台管理)。当前为最小主流程:执行入参校验并创建任务记录,返回创建结果与计划预览;后续将扩展完整扫描/执行链路。",
|
||||
"title": "按策略提交并创建抓取主流程任务(后台管理)。当前为最小主流程:执行入参校验并创建任务记录,返回创建结果与计划预览;后续将扩展完整扫描/执行链路。 注意:当存在未完成任务时,接口返回 fetch_state=3 且同时返回 existing task_id/task_no,前端可直接进入拣货流程。",
|
||||
"description": "按策略提交并创建抓取主流程任务(后台管理)。当前为最小主流程:执行入参校验并创建任务记录,返回创建结果与计划预览;后续将扩展完整扫描/执行链路。 注意:当存在未完成任务时,接口返回 fetch_state=3 且同时返回 existing task_id/task_no,前端可直接进入拣货流程。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -5485,6 +5485,24 @@
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "可选提示信息或错误说明(创建失败时返回简短说明)"
|
||||
},
|
||||
{
|
||||
"name": "fetch_state",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "抓取结果三态:1=成功创建任务(返回 task_id/task_no),2=普通失败(task_id=null),3=存在未完成任务(返回 existing task_id/task_no,前端可进入拣货流程)"
|
||||
},
|
||||
{
|
||||
"name": "tip",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "简短提示,用于向前端展示简要原因或下一步建议"
|
||||
},
|
||||
{
|
||||
"name": "can_enter_pick_flow",
|
||||
"type": "boolean",
|
||||
"required": false,
|
||||
"description": "仅当 fetch_state=3 时为 true,表示前端可直接进入拣货流程"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -5493,8 +5511,8 @@
|
||||
"moduleKey": "order.wave",
|
||||
"moduleFolder": "order.wave",
|
||||
"method": "order.wave.waveStrategyFetchPda",
|
||||
"title": "按策略提交并创建抓取主流程任务(PDA)。当前为最小主流程:进行入参校验并创建任务记录,返回创建结果与计划预览;后续扫描/执行阶段将扩展为完整执行流。",
|
||||
"description": "按策略提交并创建抓取主流程任务(PDA)。当前为最小主流程:进行入参校验并创建任务记录,返回创建结果与计划预览;后续扫描/执行阶段将扩展为完整执行流。",
|
||||
"title": "按策略提交并创建抓取主流程任务(PDA)。当前为最小主流程:进行入参校验并创建任务记录,返回创建结果与计划预览;后续扫描/执行阶段将扩展为完整执行流。 注意:任务创建时生成的波次号(wave_no)使用策略的 wave_prefix(若设置)优先;若策略未设置,则根据策略类型回退到仓库级前缀(团购->group_wave_prefix,散单->delete_order_wave_prefix)。前缀保存为大写;仅允许 A-Z0-9,长度 1-5。 当存在未完成任务时,接口返回 fetch_state=3 且同时返回 existing task_id/task_no,前端可直接进入拣货流程。",
|
||||
"description": "按策略提交并创建抓取主流程任务(PDA)。当前为最小主流程:进行入参校验并创建任务记录,返回创建结果与计划预览;后续扫描/执行阶段将扩展为完整执行流。 注意:任务创建时生成的波次号(wave_no)使用策略的 wave_prefix(若设置)优先;若策略未设置,则根据策略类型回退到仓库级前缀(团购->group_wave_prefix,散单->delete_order_wave_prefix)。前缀保存为大写;仅允许 A-Z0-9,长度 1-5。 当存在未完成任务时,接口返回 fetch_state=3 且同时返回 existing task_id/task_no,前端可直接进入拣货流程。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -5590,6 +5608,24 @@
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "可选提示信息或错误说明(创建失败时返回简短说明)"
|
||||
},
|
||||
{
|
||||
"name": "fetch_state",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "抓取结果三态:1=成功创建任务(返回 task_id/task_no),2=普通失败(task_id=null),3=存在未完成任务(返回 existing task_id/task_no,前端可进入拣货流程)"
|
||||
},
|
||||
{
|
||||
"name": "tip",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "简短提示,用于向前端展示简要原因或下一步建议"
|
||||
},
|
||||
{
|
||||
"name": "can_enter_pick_flow",
|
||||
"type": "boolean",
|
||||
"required": false,
|
||||
"description": "仅当 fetch_state=3 时为 true,表示前端可直接进入拣货流程"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -5621,6 +5657,24 @@
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "分页参数,支持 page / pageSize"
|
||||
},
|
||||
{
|
||||
"name": "strategy_type",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "仅支持 1=散单、2=团购;与 where.strategy_type 同时存在时以顶层 strategy_type 为准。"
|
||||
},
|
||||
{
|
||||
"name": "where",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "当前仅支持 where.strategy_type(1/2);其余 where 字段暂不支持。"
|
||||
},
|
||||
{
|
||||
"name": "calculate_next_fetch_order_count / calculateNextFetchOrderCount",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "0-不计算(默认),1-计算并返回每条策略的 next_fetch_order_count;支持别名 calculateNextFetchOrderCount"
|
||||
}
|
||||
],
|
||||
"response": [
|
||||
@ -5965,6 +6019,12 @@
|
||||
"type": "array|string",
|
||||
"required": false,
|
||||
"description": "允许的快递编码列表(可选,支持数组/JSON/逗号分隔);系统会校验所传编码是否在可用快递列表内,非法值将导致 400 错误。"
|
||||
},
|
||||
{
|
||||
"name": "wave_prefix",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "策略波次前缀(可选)。优先于仓库前缀;校验:长度 1-5,仅支持 A-Z0-9,保存时转大写;为空时回退仓库前缀(团购->group_wave_prefix,散单->delete_order_wave_prefix)。"
|
||||
}
|
||||
],
|
||||
"response": [
|
||||
@ -6057,6 +6117,69 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"moduleName": "拣货模块",
|
||||
"moduleKey": "pick",
|
||||
"moduleFolder": "pick",
|
||||
"method": "pick.wavePickTaskDetail",
|
||||
"title": "按任务ID获取拣货任务详情,返回精简的 task、boxes、picking_details 与 picking_summary;仅允许任务的 pick_user_id 与当前登录用户(operator_id/employees_id)一致时返回数据,否则返回 403。",
|
||||
"description": "按任务ID获取拣货任务详情,返回精简的 task、boxes、picking_details 与 picking_summary;仅允许任务的 pick_user_id 与当前登录用户(operator_id/employees_id)一致时返回数据,否则返回 403。",
|
||||
"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",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "wms_wave_pick_task 主键 ID"
|
||||
}
|
||||
],
|
||||
"response": [
|
||||
{
|
||||
"name": "task",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "拣货任务主表(精简字段)"
|
||||
},
|
||||
{
|
||||
"name": "boxes",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"description": "箱列表;包含用于前端展示与拣货进度的统计字段"
|
||||
},
|
||||
{
|
||||
"name": "picking_details",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"description": "拣货明细列表(按库位/商品/数量拆分),用于从明细视角展示拣货要求"
|
||||
},
|
||||
{
|
||||
"name": "picking_summary",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "对 picking_details 的汇总信息,用于统计与前端显示"
|
||||
},
|
||||
{
|
||||
"name": "picking_view",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "按 pick_mode 区分的 picking_view 形态输出(五种形态);用于前端按任务类型展示聚合视图。"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"moduleName": "打印模块",
|
||||
"moduleKey": "print",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -13,29 +13,19 @@
|
||||
}
|
||||
},
|
||||
"moduleCount": 35,
|
||||
"totalInterfaceCount": 245,
|
||||
"totalInterfaceCount": 247,
|
||||
"changes": {
|
||||
"summary": {
|
||||
"moduleAdded": 1,
|
||||
"moduleAdded": 0,
|
||||
"moduleDeleted": 0,
|
||||
"moduleUpdated": 1,
|
||||
"interfaceAdded": 3,
|
||||
"interfaceDeleted": 1,
|
||||
"interfaceAdded": 0,
|
||||
"interfaceDeleted": 0,
|
||||
"interfaceParamsUpdated": 2,
|
||||
"interfaceResponseUpdated": 2
|
||||
"interfaceResponseUpdated": 0
|
||||
},
|
||||
"moduleUpdates": {
|
||||
"added": [
|
||||
{
|
||||
"moduleName": "order.wave",
|
||||
"moduleKey": "order",
|
||||
"folder": "order",
|
||||
"methods": [
|
||||
"order.wave.batchList"
|
||||
],
|
||||
"interfaceCount": 1
|
||||
}
|
||||
],
|
||||
"added": [],
|
||||
"deleted": [],
|
||||
"updated": [
|
||||
{
|
||||
@ -45,82 +35,35 @@
|
||||
"previousModuleName": "订单波次模块",
|
||||
"previousModuleKey": "order.wave",
|
||||
"interfaceChanges": {
|
||||
"addedMethods": [
|
||||
"order.wave.wavePickTaskCancel",
|
||||
"order.wave.wavePickTaskList"
|
||||
],
|
||||
"deletedMethods": [
|
||||
"order.wave.batchList"
|
||||
],
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [
|
||||
"order.wave.waveStrategyFetchAdmin",
|
||||
"order.wave.waveStrategyFetchPda"
|
||||
"order.wave.waveStrategyCreate",
|
||||
"order.wave.waveStrategyUpdate"
|
||||
],
|
||||
"responseUpdatedMethods": [
|
||||
"order.wave.waveStrategyFetchAdmin",
|
||||
"order.wave.waveStrategyFetchPda"
|
||||
]
|
||||
"responseUpdatedMethods": []
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"interfaceUpdates": {
|
||||
"added": [
|
||||
{
|
||||
"moduleName": "order.wave",
|
||||
"moduleKey": "order",
|
||||
"folder": "order",
|
||||
"method": "order.wave.batchList"
|
||||
},
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"method": "order.wave.wavePickTaskCancel"
|
||||
},
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"method": "order.wave.wavePickTaskList"
|
||||
}
|
||||
],
|
||||
"deleted": [
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"method": "order.wave.batchList"
|
||||
}
|
||||
],
|
||||
"added": [],
|
||||
"deleted": [],
|
||||
"paramsUpdated": [
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"method": "order.wave.waveStrategyFetchAdmin"
|
||||
"method": "order.wave.waveStrategyCreate"
|
||||
},
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"method": "order.wave.waveStrategyFetchPda"
|
||||
"method": "order.wave.waveStrategyUpdate"
|
||||
}
|
||||
],
|
||||
"responseUpdated": [
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"method": "order.wave.waveStrategyFetchAdmin"
|
||||
},
|
||||
{
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"method": "order.wave.waveStrategyFetchPda"
|
||||
}
|
||||
]
|
||||
"responseUpdated": []
|
||||
}
|
||||
},
|
||||
"modules": [
|
||||
@ -367,7 +310,7 @@
|
||||
"moduleName": "订单波次模块",
|
||||
"moduleKey": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"interfaceCount": 28,
|
||||
"interfaceCount": 29,
|
||||
"interfaces": [
|
||||
{
|
||||
"method": "order.wave.waveStrategyList"
|
||||
@ -408,6 +351,9 @@
|
||||
{
|
||||
"method": "order.wave.wavePickTaskCancel"
|
||||
},
|
||||
{
|
||||
"method": "order.wave.wavePickTaskCancelSelf"
|
||||
},
|
||||
{
|
||||
"method": "order.wave.batchCancel"
|
||||
},
|
||||
@ -694,10 +640,13 @@
|
||||
"moduleName": "拣货模块",
|
||||
"moduleKey": "pick",
|
||||
"folder": "pick",
|
||||
"interfaceCount": 1,
|
||||
"interfaceCount": 2,
|
||||
"interfaces": [
|
||||
{
|
||||
"method": "pick.query"
|
||||
},
|
||||
{
|
||||
"method": "pick.wavePickTaskDetail"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-05 09:15:19",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-04 09:11:04",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -16,28 +16,20 @@
|
||||
"name": "订单波次模块",
|
||||
"key": "order.wave",
|
||||
"folder": "order.wave",
|
||||
"interfaceCount": 28
|
||||
"interfaceCount": 29
|
||||
},
|
||||
"changes": {
|
||||
"fromPreviousSnapshot": {
|
||||
"moduleAdded": false,
|
||||
"moduleRenamed": false,
|
||||
"interfaceChanges": {
|
||||
"addedMethods": [
|
||||
"order.wave.wavePickTaskCancel",
|
||||
"order.wave.wavePickTaskList"
|
||||
],
|
||||
"deletedMethods": [
|
||||
"order.wave.batchList"
|
||||
],
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [
|
||||
"order.wave.waveStrategyFetchAdmin",
|
||||
"order.wave.waveStrategyFetchPda"
|
||||
"order.wave.waveStrategyCreate",
|
||||
"order.wave.waveStrategyUpdate"
|
||||
],
|
||||
"responseUpdatedMethods": [
|
||||
"order.wave.waveStrategyFetchAdmin",
|
||||
"order.wave.waveStrategyFetchPda"
|
||||
]
|
||||
"responseUpdatedMethods": []
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -67,6 +59,24 @@
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "分页参数,支持 page / pageSize"
|
||||
},
|
||||
{
|
||||
"name": "strategy_type",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "仅支持 1=散单、2=团购;与 where.strategy_type 同时存在时以顶层 strategy_type 为准。"
|
||||
},
|
||||
{
|
||||
"name": "where",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "当前仅支持 where.strategy_type(1/2);其余 where 字段暂不支持。"
|
||||
},
|
||||
{
|
||||
"name": "calculate_next_fetch_order_count / calculateNextFetchOrderCount",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "0-不计算(默认),1-计算并返回每条策略的 next_fetch_order_count;支持别名 calculateNextFetchOrderCount"
|
||||
}
|
||||
],
|
||||
"response": [
|
||||
@ -223,6 +233,12 @@
|
||||
"type": "array|string",
|
||||
"required": false,
|
||||
"description": "允许的快递编码列表(可选,支持数组/JSON/逗号分隔);系统会校验所传编码是否在可用快递列表内,非法值将导致 400 错误。"
|
||||
},
|
||||
{
|
||||
"name": "wave_prefix",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "策略波次前缀(可选)。优先于仓库前缀;校验:长度 1-5,仅支持 A-Z0-9,保存时转大写;为空时回退仓库前缀(团购->group_wave_prefix,散单->delete_order_wave_prefix)。"
|
||||
}
|
||||
],
|
||||
"response": [
|
||||
@ -385,6 +401,12 @@
|
||||
"type": "array|string",
|
||||
"required": false,
|
||||
"description": "允许的快递编码列表(可选,支持数组/JSON/逗号分隔);系统会校验所传编码是否在可用快递列表内,非法值将导致 400 错误。"
|
||||
},
|
||||
{
|
||||
"name": "wave_prefix",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "策略波次前缀(可选)。优先于仓库前缀;校验:长度 1-5,仅支持 A-Z0-9,保存时转大写;为空时回退仓库前缀(团购->group_wave_prefix,散单->delete_order_wave_prefix)。"
|
||||
}
|
||||
],
|
||||
"response": [
|
||||
@ -463,8 +485,8 @@
|
||||
},
|
||||
{
|
||||
"method": "order.wave.waveStrategyFetchPda",
|
||||
"title": "按策略提交并创建抓取主流程任务(PDA)。当前为最小主流程:进行入参校验并创建任务记录,返回创建结果与计划预览;后续扫描/执行阶段将扩展为完整执行流。",
|
||||
"description": "按策略提交并创建抓取主流程任务(PDA)。当前为最小主流程:进行入参校验并创建任务记录,返回创建结果与计划预览;后续扫描/执行阶段将扩展为完整执行流。",
|
||||
"title": "按策略提交并创建抓取主流程任务(PDA)。当前为最小主流程:进行入参校验并创建任务记录,返回创建结果与计划预览;后续扫描/执行阶段将扩展为完整执行流。 注意:任务创建时生成的波次号(wave_no)使用策略的 wave_prefix(若设置)优先;若策略未设置,则根据策略类型回退到仓库级前缀(团购->group_wave_prefix,散单->delete_order_wave_prefix)。前缀保存为大写;仅允许 A-Z0-9,长度 1-5。 当存在未完成任务时,接口返回 fetch_state=3 且同时返回 existing task_id/task_no,前端可直接进入拣货流程。",
|
||||
"description": "按策略提交并创建抓取主流程任务(PDA)。当前为最小主流程:进行入参校验并创建任务记录,返回创建结果与计划预览;后续扫描/执行阶段将扩展为完整执行流。 注意:任务创建时生成的波次号(wave_no)使用策略的 wave_prefix(若设置)优先;若策略未设置,则根据策略类型回退到仓库级前缀(团购->group_wave_prefix,散单->delete_order_wave_prefix)。前缀保存为大写;仅允许 A-Z0-9,长度 1-5。 当存在未完成任务时,接口返回 fetch_state=3 且同时返回 existing task_id/task_no,前端可直接进入拣货流程。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -560,13 +582,31 @@
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "可选提示信息或错误说明(创建失败时返回简短说明)"
|
||||
},
|
||||
{
|
||||
"name": "fetch_state",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "抓取结果三态:1=成功创建任务(返回 task_id/task_no),2=普通失败(task_id=null),3=存在未完成任务(返回 existing task_id/task_no,前端可进入拣货流程)"
|
||||
},
|
||||
{
|
||||
"name": "tip",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "简短提示,用于向前端展示简要原因或下一步建议"
|
||||
},
|
||||
{
|
||||
"name": "can_enter_pick_flow",
|
||||
"type": "boolean",
|
||||
"required": false,
|
||||
"description": "仅当 fetch_state=3 时为 true,表示前端可直接进入拣货流程"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"method": "order.wave.waveStrategyFetchAdmin",
|
||||
"title": "按策略提交并创建抓取主流程任务(后台管理)。当前为最小主流程:执行入参校验并创建任务记录,返回创建结果与计划预览;后续将扩展完整扫描/执行链路。",
|
||||
"description": "按策略提交并创建抓取主流程任务(后台管理)。当前为最小主流程:执行入参校验并创建任务记录,返回创建结果与计划预览;后续将扩展完整扫描/执行链路。",
|
||||
"title": "按策略提交并创建抓取主流程任务(后台管理)。当前为最小主流程:执行入参校验并创建任务记录,返回创建结果与计划预览;后续将扩展完整扫描/执行链路。 注意:当存在未完成任务时,接口返回 fetch_state=3 且同时返回 existing task_id/task_no,前端可直接进入拣货流程。",
|
||||
"description": "按策略提交并创建抓取主流程任务(后台管理)。当前为最小主流程:执行入参校验并创建任务记录,返回创建结果与计划预览;后续将扩展完整扫描/执行链路。 注意:当存在未完成任务时,接口返回 fetch_state=3 且同时返回 existing task_id/task_no,前端可直接进入拣货流程。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -662,6 +702,24 @@
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "可选提示信息或错误说明(创建失败时返回简短说明)"
|
||||
},
|
||||
{
|
||||
"name": "fetch_state",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "抓取结果三态:1=成功创建任务(返回 task_id/task_no),2=普通失败(task_id=null),3=存在未完成任务(返回 existing task_id/task_no,前端可进入拣货流程)"
|
||||
},
|
||||
{
|
||||
"name": "tip",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "简短提示,用于向前端展示简要原因或下一步建议"
|
||||
},
|
||||
{
|
||||
"name": "can_enter_pick_flow",
|
||||
"type": "boolean",
|
||||
"required": false,
|
||||
"description": "仅当 fetch_state=3 时为 true,表示前端可直接进入拣货流程"
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -1271,6 +1329,54 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"method": "order.wave.wavePickTaskCancelSelf",
|
||||
"title": "取消单个拣货任务(仅允许取消当前操作人本人创建的任务;仅支持单个 task_id,明确不支持 task_ids)",
|
||||
"description": "取消单个拣货任务(仅允许取消当前操作人本人创建的任务;仅支持单个 task_id,明确不支持 task_ids)",
|
||||
"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",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "要取消的单个任务 ID(仅支持单个,不支持 task_ids)"
|
||||
}
|
||||
],
|
||||
"response": [
|
||||
{
|
||||
"name": "cancelled_count",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "成功取消的任务数量(0 或 1)"
|
||||
},
|
||||
{
|
||||
"name": "task_id",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "被处理的任务ID"
|
||||
},
|
||||
{
|
||||
"name": "task_no",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "被处理的任务编号(若后端返回)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"method": "order.wave.batchCancel",
|
||||
"title": "提交批量解除波次异步任务。该接口为异步任务提交接口,立即返回 task_id,后端异步按当前仓库 + wave_ids 拉取待处理波次并执行解除操作;可通过 order.wave.batchCancelTaskProgress 查询进度与结果。",
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -20,12 +20,10 @@
|
||||
},
|
||||
"changes": {
|
||||
"fromPreviousSnapshot": {
|
||||
"moduleAdded": true,
|
||||
"moduleAdded": false,
|
||||
"moduleRenamed": false,
|
||||
"interfaceChanges": {
|
||||
"addedMethods": [
|
||||
"order.wave.batchList"
|
||||
],
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [],
|
||||
"responseUpdatedMethods": []
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-04 17:23:48",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -16,7 +16,7 @@
|
||||
"name": "拣货模块",
|
||||
"key": "pick",
|
||||
"folder": "pick",
|
||||
"interfaceCount": 1
|
||||
"interfaceCount": 2
|
||||
},
|
||||
"changes": {
|
||||
"fromPreviousSnapshot": {
|
||||
@ -102,6 +102,66 @@
|
||||
"description": "拣货明细列表(根据 full 参数返回全量或仅未复核明细),每项为明细对象,字段视实现而定。"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"method": "pick.wavePickTaskDetail",
|
||||
"title": "按任务ID获取拣货任务详情,返回精简的 task、boxes、picking_details 与 picking_summary;仅允许任务的 pick_user_id 与当前登录用户(operator_id/employees_id)一致时返回数据,否则返回 403。",
|
||||
"description": "按任务ID获取拣货任务详情,返回精简的 task、boxes、picking_details 与 picking_summary;仅允许任务的 pick_user_id 与当前登录用户(operator_id/employees_id)一致时返回数据,否则返回 403。",
|
||||
"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",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "wms_wave_pick_task 主键 ID"
|
||||
}
|
||||
],
|
||||
"response": [
|
||||
{
|
||||
"name": "task",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "拣货任务主表(精简字段)"
|
||||
},
|
||||
{
|
||||
"name": "boxes",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"description": "箱列表;包含用于前端展示与拣货进度的统计字段"
|
||||
},
|
||||
{
|
||||
"name": "picking_details",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"description": "拣货明细列表(按库位/商品/数量拆分),用于从明细视角展示拣货要求"
|
||||
},
|
||||
{
|
||||
"name": "picking_summary",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "对 picking_details 的汇总信息,用于统计与前端显示"
|
||||
},
|
||||
{
|
||||
"name": "picking_view",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "按 pick_mode 区分的 picking_view 形态输出(五种形态);用于前端按任务类型展示聚合视图。"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-17 19:37:49",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-17 20:21:27",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-17 19:16:50",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-04 09:11:04",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-09 09:52:14",
|
||||
"generatedAtLocal": "2026-05-09 09:52:14",
|
||||
"generatedAt": "2026-05-11 16:08:50",
|
||||
"generatedAtLocal": "2026-05-11 16:08:50",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-11 16:08:50",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user