5月15
This commit is contained in:
parent
c84f9c82a7
commit
349053e2ed
@ -174,20 +174,31 @@ export function getPrintRecordItem(id: string | number) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/** print.send 请求体(与 print 模块 module.json 一致:template 仅 customize 必填,express 可不传) */
|
/** customize:computerId / printer / template 等;express 路径下由服务端忽略 */
|
||||||
export type PrintSendParams = {
|
export type PrintSendCustomizeParams = {
|
||||||
|
type: 'customize'
|
||||||
computerId: string
|
computerId: string
|
||||||
count?: number
|
count?: number
|
||||||
data: Record<string, unknown>
|
data: Record<string, unknown>
|
||||||
printer: string
|
printer: string
|
||||||
/** customize 时必填且宜含 page_width、page_height、template_content;express 可不传 */
|
/** 宜含 page_width、page_height、template_content */
|
||||||
template?: Record<string, unknown>
|
template: Record<string, unknown>
|
||||||
/** 业务时间戳,可选;接口类型为 string */
|
|
||||||
timestamp?: string
|
timestamp?: string
|
||||||
/** 当前实现支持 customize、express */
|
|
||||||
type: string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* express:须 printStationId、requestCode;data 须含 waveGroups(见 order.print.getWavePlatformPrintData)。
|
||||||
|
* computerId / count / printer / timestamp / template 在 express 下不适用,请求体中不发送。
|
||||||
|
*/
|
||||||
|
export type PrintSendExpressParams = {
|
||||||
|
type: 'express'
|
||||||
|
printStationId: string
|
||||||
|
requestCode: string
|
||||||
|
data: Record<string, unknown>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PrintSendParams = PrintSendCustomizeParams | PrintSendExpressParams
|
||||||
|
|
||||||
/** print.send 业务响应字段(成功 code 多为 200,flag 为 success) */
|
/** print.send 业务响应字段(成功 code 多为 200,flag 为 success) */
|
||||||
export type PrintSendResult = {
|
export type PrintSendResult = {
|
||||||
flag?: string
|
flag?: string
|
||||||
@ -196,10 +207,16 @@ export type PrintSendResult = {
|
|||||||
printId?: number
|
printId?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** savePrinters.express 单项:首选 express_code + printer_name(兼容 express_id、name 由服务端映射) */
|
||||||
|
export type PrintSavePrintersExpressItem = {
|
||||||
|
express_code: string
|
||||||
|
printer_name: string
|
||||||
|
}
|
||||||
|
|
||||||
/** print.savePrinters:defaultPrinter、express、print_station_id 均为必填(见 print 模块 module.json) */
|
/** print.savePrinters:defaultPrinter、express、print_station_id 均为必填(见 print 模块 module.json) */
|
||||||
export type PrintSavePrintersParams = {
|
export type PrintSavePrintersParams = {
|
||||||
defaultPrinter: string
|
defaultPrinter: string
|
||||||
express: Array<Record<string, unknown>>
|
express: PrintSavePrintersExpressItem[] | Array<Record<string, unknown>>
|
||||||
print_station_id: number
|
print_station_id: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -225,20 +242,28 @@ export function savePrinters(data: PrintSavePrintersParams) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function sendPrint(data: PrintSendParams) {
|
export function sendPrint(data: PrintSendParams) {
|
||||||
const body: Record<string, unknown> = {
|
let body: Record<string, unknown>
|
||||||
computerId: data.computerId,
|
if (data.type === 'express') {
|
||||||
data: data.data,
|
body = {
|
||||||
printer: data.printer,
|
type: 'express',
|
||||||
type: data.type
|
printStationId: data.printStationId,
|
||||||
}
|
requestCode: data.requestCode,
|
||||||
if (data.count !== undefined && data.count !== null) {
|
data: data.data
|
||||||
body.count = data.count
|
}
|
||||||
}
|
} else {
|
||||||
if (data.timestamp !== undefined && data.timestamp !== null) {
|
body = {
|
||||||
body.timestamp = typeof data.timestamp === 'string' ? data.timestamp : String(data.timestamp)
|
type: data.type,
|
||||||
}
|
computerId: data.computerId,
|
||||||
if (data.template !== undefined && data.template !== null) {
|
data: data.data,
|
||||||
body.template = data.template
|
printer: data.printer,
|
||||||
|
template: data.template
|
||||||
|
}
|
||||||
|
if (data.count !== undefined && data.count !== null) {
|
||||||
|
body.count = data.count
|
||||||
|
}
|
||||||
|
if (data.timestamp !== undefined && data.timestamp !== null) {
|
||||||
|
body.timestamp = typeof data.timestamp === 'string' ? data.timestamp : String(data.timestamp)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return request({
|
return request({
|
||||||
url: '/system',
|
url: '/system',
|
||||||
|
|||||||
@ -42,7 +42,15 @@ export function expressListBase() {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function expressCreate(data: { code: string, name: string, platform?: string }) {
|
/** setting.express.create:code、name、express_code 必填;expressCode 为驼峰等价写法 */
|
||||||
|
export type ExpressCreatePayload = {
|
||||||
|
code: string
|
||||||
|
name: string
|
||||||
|
express_code: string
|
||||||
|
expressCode?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export function expressCreate(data: ExpressCreatePayload) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system',
|
url: '/system',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
@ -68,7 +76,18 @@ export function expressCheckCodeUnique(data: { id?: number, code: string }) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function expressUpdate(data: any) {
|
/** setting.express.update:id 必填;至少一项可更新字段;express_code 与 expressCode 等价 */
|
||||||
|
export type ExpressUpdatePayload = {
|
||||||
|
id: number
|
||||||
|
code?: string
|
||||||
|
name?: string
|
||||||
|
express_code?: string
|
||||||
|
expressCode?: string
|
||||||
|
setting_id?: number
|
||||||
|
settingId?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export function expressUpdate(data: ExpressUpdatePayload) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system',
|
url: '/system',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|||||||
@ -16,7 +16,7 @@ export function settingPlatformIndexGetPlatformList(data?: Record<string, unknow
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function settingPlatformList(data?: { page?: number; page_size?: number; keyword?: string }) {
|
export function settingPlatformList(data?: Record<string, unknown>) {
|
||||||
return request({
|
return request({
|
||||||
url: '/system',
|
url: '/system',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
|
|||||||
59
src/api/storage.report/report.ts
Normal file
59
src/api/storage.report/report.ts
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
const v = '1.0'
|
||||||
|
|
||||||
|
/** 与 apidata/data.json 中 list 单项字段一致 */
|
||||||
|
export interface StorageReportListItem {
|
||||||
|
start_time?: string | null
|
||||||
|
end_time?: string | null
|
||||||
|
stock_id: number
|
||||||
|
store_id: number
|
||||||
|
begin_total: number
|
||||||
|
end_total: number
|
||||||
|
inbound_total: number
|
||||||
|
outbound_total: number
|
||||||
|
store_name?: string
|
||||||
|
item_name?: string
|
||||||
|
barcode?: string
|
||||||
|
item_code?: string
|
||||||
|
space_id?: number | null
|
||||||
|
space_name?: string | null
|
||||||
|
[key: string]: unknown
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface StorageReportSearchBody {
|
||||||
|
where?: {
|
||||||
|
start_time?: string | Date
|
||||||
|
end_time?: string | Date
|
||||||
|
by_space?: boolean
|
||||||
|
store_ids?: number[]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 与网关返回一致:成功时 data 内含 list */
|
||||||
|
export interface StorageReportSearchResult {
|
||||||
|
flag?: string
|
||||||
|
code?: number
|
||||||
|
message?: string
|
||||||
|
data?: {
|
||||||
|
list?: StorageReportListItem[]
|
||||||
|
}
|
||||||
|
list?: StorageReportListItem[]
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 不传或传 `{}` 表示无业务参数(与页面首次打开一致) */
|
||||||
|
export function searchInventoryReport(
|
||||||
|
data?: StorageReportSearchBody
|
||||||
|
): Promise<StorageReportSearchResult> {
|
||||||
|
return request({
|
||||||
|
url: '/system',
|
||||||
|
method: 'post',
|
||||||
|
params: {
|
||||||
|
method: 'storage.report.search',
|
||||||
|
v,
|
||||||
|
timestamp: new Date().getTime()
|
||||||
|
},
|
||||||
|
data: data ?? {},
|
||||||
|
isSystemApi: true
|
||||||
|
} as any)
|
||||||
|
}
|
||||||
@ -25,6 +25,7 @@ export default {
|
|||||||
"Combo Stock ": "Combo Stock",
|
"Combo Stock ": "Combo Stock",
|
||||||
"Stock Storage": "Stock Storage",
|
"Stock Storage": "Stock Storage",
|
||||||
"receiving": "Receiving",
|
"receiving": "Receiving",
|
||||||
|
"Report": "Report",
|
||||||
"Entry Order": "Entry Order",
|
"Entry Order": "Entry Order",
|
||||||
"Stock out": "Stock Out",
|
"Stock out": "Stock Out",
|
||||||
"inventory": "Inventory",
|
"inventory": "Inventory",
|
||||||
|
|||||||
@ -25,6 +25,7 @@ export default {
|
|||||||
"Combo Stock ": "组合商品",
|
"Combo Stock ": "组合商品",
|
||||||
"Stock Storage": "商品库存",
|
"Stock Storage": "商品库存",
|
||||||
"receiving": "收货单",
|
"receiving": "收货单",
|
||||||
|
"Report": "库存报表",
|
||||||
"Entry Order": "入库单",
|
"Entry Order": "入库单",
|
||||||
"Stock out": "出库单",
|
"Stock out": "出库单",
|
||||||
"inventory": "库存",
|
"inventory": "库存",
|
||||||
|
|||||||
@ -17,6 +17,7 @@ export const componentMap: Record<string, any> = {
|
|||||||
'stock/storestock/index': () => import('@/views/stock/storestock/index.vue'),
|
'stock/storestock/index': () => import('@/views/stock/storestock/index.vue'),
|
||||||
'stock/combo_stock/index': () => import('@/views/stock/combo_stock/index.vue'),
|
'stock/combo_stock/index': () => import('@/views/stock/combo_stock/index.vue'),
|
||||||
'storage/receiving': () => import('@/views/storage/receiving/index.vue'),
|
'storage/receiving': () => import('@/views/storage/receiving/index.vue'),
|
||||||
|
'storage/report': () => import('@/views/storage/report/index.vue'),
|
||||||
'storage/entry': () => import('@/views/storage/entry/index.vue'),
|
'storage/entry': () => import('@/views/storage/entry/index.vue'),
|
||||||
'storage/inventory': () => import('@/views/storage/inventory/index.vue'),
|
'storage/inventory': () => import('@/views/storage/inventory/index.vue'),
|
||||||
'storage/stockout': () => import('@/views/storage/stockout/index.vue'),
|
'storage/stockout': () => import('@/views/storage/stockout/index.vue'),
|
||||||
|
|||||||
@ -22,9 +22,9 @@
|
|||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stationOptions"
|
v-for="item in stationOptions"
|
||||||
:key="item.id"
|
:key="item.stationId"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.computer_id"
|
:value="item.stationId"
|
||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
@ -129,9 +129,10 @@ const emit = defineEmits<{
|
|||||||
}>()
|
}>()
|
||||||
|
|
||||||
const printRootRef = ref<HTMLElement | null>(null)
|
const printRootRef = ref<HTMLElement | null>(null)
|
||||||
|
/** 下拉值使用打印台主键 stationId(print.send express 的 printStationId);computer_id_legacy 用于迁移旧版本地存储 */
|
||||||
type StationOption = {
|
type StationOption = {
|
||||||
id: string | number
|
stationId: string
|
||||||
computer_id: string
|
computer_id_legacy: string
|
||||||
name: string
|
name: string
|
||||||
default_printer_name: string
|
default_printer_name: string
|
||||||
}
|
}
|
||||||
@ -232,10 +233,16 @@ function extractPrintStationRows(res: any): any[] {
|
|||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 与 printStation info 表单一致:列表行上名称、默认打印机字段别名 */
|
/** 与 print.getList 行一致:stationId 为打印台 id;computer_id_legacy 为关联打印电脑(仅迁移/展示用) */
|
||||||
function mapStationRow(item: Record<string, any>): StationOption {
|
function mapStationRow(item: Record<string, any>): StationOption {
|
||||||
const rawCid = item.computer_id ?? item.computerId ?? item.id
|
const rawSid = item.id ?? item.print_station_id ?? item.station_id
|
||||||
const computer_id = rawCid != null && String(rawCid).trim() !== '' ? String(rawCid) : ''
|
let stationId = rawSid != null && String(rawSid).trim() !== '' ? String(rawSid).trim() : ''
|
||||||
|
const rawComputer = item.computer_id ?? item.computerId
|
||||||
|
const computer_id_legacy =
|
||||||
|
rawComputer != null && String(rawComputer).trim() !== '' ? String(rawComputer).trim() : ''
|
||||||
|
if (!stationId && computer_id_legacy) {
|
||||||
|
stationId = computer_id_legacy
|
||||||
|
}
|
||||||
const nameRaw =
|
const nameRaw =
|
||||||
item.name ??
|
item.name ??
|
||||||
item.station_name ??
|
item.station_name ??
|
||||||
@ -244,7 +251,7 @@ function mapStationRow(item: Record<string, any>): StationOption {
|
|||||||
item.stationName ??
|
item.stationName ??
|
||||||
item.label ??
|
item.label ??
|
||||||
''
|
''
|
||||||
const name = nameRaw != null && String(nameRaw).trim() !== '' ? String(nameRaw).trim() : computer_id
|
const name = nameRaw != null && String(nameRaw).trim() !== '' ? String(nameRaw).trim() : stationId
|
||||||
const defPrinter =
|
const defPrinter =
|
||||||
item.default_printer_name ??
|
item.default_printer_name ??
|
||||||
item.defaultPrinterName ??
|
item.defaultPrinterName ??
|
||||||
@ -253,8 +260,8 @@ function mapStationRow(item: Record<string, any>): StationOption {
|
|||||||
''
|
''
|
||||||
const default_printer_name = String(defPrinter ?? '').trim()
|
const default_printer_name = String(defPrinter ?? '').trim()
|
||||||
return {
|
return {
|
||||||
id: item.id ?? rawCid ?? computer_id,
|
stationId,
|
||||||
computer_id,
|
computer_id_legacy,
|
||||||
name,
|
name,
|
||||||
default_printer_name
|
default_printer_name
|
||||||
}
|
}
|
||||||
@ -276,8 +283,16 @@ async function loadStationOptions() {
|
|||||||
// 初始化默认打印台:优先本地存储,其次当前值,最后回退到首项
|
// 初始化默认打印台:优先本地存储,其次当前值,最后回退到首项
|
||||||
const savedStation = getSavedStationId()
|
const savedStation = getSavedStationId()
|
||||||
const currentStationId = String(printSettings.station || '').trim()
|
const currentStationId = String(printSettings.station || '').trim()
|
||||||
const hasSaved = !!savedStation && stationOptions.value.some((item) => item.computer_id === savedStation)
|
const hasSaved = !!savedStation && stationOptions.value.some((item) => item.stationId === savedStation)
|
||||||
const hasCurrent = !!currentStationId && stationOptions.value.some((item) => item.computer_id === currentStationId)
|
const hasCurrent = !!currentStationId && stationOptions.value.some((item) => item.stationId === currentStationId)
|
||||||
|
/** 历史本地存的是关联电脑 ID,迁移为当前列表中的 stationId */
|
||||||
|
const legacyComputerMatch =
|
||||||
|
!!savedStation &&
|
||||||
|
!hasSaved &&
|
||||||
|
stationOptions.value.find((item) => {
|
||||||
|
const cid = item.computer_id_legacy
|
||||||
|
return cid != null && String(cid).trim() === savedStation
|
||||||
|
})
|
||||||
|
|
||||||
if (!stationOptions.value.length) {
|
if (!stationOptions.value.length) {
|
||||||
printSettings.station = ''
|
printSettings.station = ''
|
||||||
@ -287,13 +302,16 @@ async function loadStationOptions() {
|
|||||||
|
|
||||||
if (hasSaved) {
|
if (hasSaved) {
|
||||||
printSettings.station = savedStation
|
printSettings.station = savedStation
|
||||||
|
} else if (legacyComputerMatch) {
|
||||||
|
printSettings.station = legacyComputerMatch.stationId
|
||||||
|
saveStationId(legacyComputerMatch.stationId)
|
||||||
} else if (hasCurrent) {
|
} else if (hasCurrent) {
|
||||||
saveStationId(String(currentStationId))
|
saveStationId(String(currentStationId))
|
||||||
} else {
|
} else {
|
||||||
const first = stationOptions.value[0]
|
const first = stationOptions.value[0]
|
||||||
if (first) {
|
if (first) {
|
||||||
printSettings.station = first.computer_id
|
printSettings.station = first.stationId
|
||||||
saveStationId(first.computer_id)
|
saveStationId(first.stationId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch {
|
} catch {
|
||||||
@ -314,6 +332,12 @@ function handleStationChange(val: string | number) {
|
|||||||
saveStationId(stationId)
|
saveStationId(stationId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function buildExpressRequestCode(): string {
|
||||||
|
const wids = (props.requestMeta?.wave_ids || []).map(String).join('-')
|
||||||
|
const wh = props.requestMeta?.warehouse_id ?? ''
|
||||||
|
return `wave-print-${wh}-${wids}-${Date.now()}`
|
||||||
|
}
|
||||||
|
|
||||||
async function printToStation() {
|
async function printToStation() {
|
||||||
if (!printSettings.station) {
|
if (!printSettings.station) {
|
||||||
ElMessage.warning('请选择打印台')
|
ElMessage.warning('请选择打印台')
|
||||||
@ -325,23 +349,19 @@ async function printToStation() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const sid = String(printSettings.station).trim()
|
const sid = String(printSettings.station).trim()
|
||||||
const stationRow = stationOptions.value.find((s) => s.computer_id === sid)
|
|
||||||
const printer = stationRow?.default_printer_name ?? ''
|
|
||||||
|
|
||||||
stationPrinting.value = true
|
stationPrinting.value = true
|
||||||
try {
|
try {
|
||||||
const printPayload: PrintSendParams = {
|
const printPayload: PrintSendParams = {
|
||||||
type: 'express',
|
type: 'express',
|
||||||
computerId: sid,
|
printStationId: sid,
|
||||||
printer,
|
requestCode: buildExpressRequestCode(),
|
||||||
data: {
|
data: {
|
||||||
waveGroups: props.payload.waveGroups || [],
|
waveGroups: props.payload.waveGroups || [],
|
||||||
wave_ids: props.payload.wave_ids || [],
|
wave_ids: props.payload.wave_ids || [],
|
||||||
summary: props.payload.summary || {},
|
summary: props.payload.summary || {},
|
||||||
request_meta: props.requestMeta || {}
|
request_meta: props.requestMeta || {}
|
||||||
},
|
}
|
||||||
timestamp: String(Date.now()),
|
|
||||||
count: 1
|
|
||||||
}
|
}
|
||||||
const res: any = await stationApi.sendPrint(printPayload)
|
const res: any = await stationApi.sendPrint(printPayload)
|
||||||
if (res && (res.code === 0 || res.code === 200 || res.flag === 'success' || res.status === 'success')) {
|
if (res && (res.code === 0 || res.code === 200 || res.flag === 'success' || res.status === 'success')) {
|
||||||
|
|||||||
@ -74,6 +74,14 @@
|
|||||||
<span>{{ row.inventory_warning_tip_text || '--' }}</span>
|
<span>{{ row.inventory_warning_tip_text || '--' }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #column-shelf_life_days="{ row }">
|
||||||
|
<span>{{ row.shelf_life_days ?? '--' }}</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #column-sale_ban_period="{ row }">
|
||||||
|
<span>{{ row.sale_ban_period ?? '--' }}</span>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template #column-order_status="{ row }">
|
<template #column-order_status="{ row }">
|
||||||
<el-tag v-if="row.order_status" size="small" :type="orderStatusTagType(row.order_status)">
|
<el-tag v-if="row.order_status" size="small" :type="orderStatusTagType(row.order_status)">
|
||||||
{{ orderStatusLabel(row.order_status) }}
|
{{ orderStatusLabel(row.order_status) }}
|
||||||
@ -193,7 +201,18 @@ const columns = computed(() => {
|
|||||||
|
|
||||||
return cols
|
return cols
|
||||||
}
|
}
|
||||||
return cols.filter((col: any) => !['production_date', 'expiry_date', 'expiry_remaining_days', 'inventory_warning_level', 'inventory_warning_tip_text'].includes(col.prop))
|
return cols.filter(
|
||||||
|
(col: any) =>
|
||||||
|
![
|
||||||
|
'production_date',
|
||||||
|
'expiry_date',
|
||||||
|
'shelf_life_days',
|
||||||
|
'sale_ban_period',
|
||||||
|
'expiry_remaining_days',
|
||||||
|
'inventory_warning_level',
|
||||||
|
'inventory_warning_tip_text'
|
||||||
|
].includes(col.prop)
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
@ -208,6 +227,20 @@ const componentMap: Record<string, any> = {
|
|||||||
|
|
||||||
const activeComponent = computed(() => componentMap[activeTab.value] || componentMap.details)
|
const activeComponent = computed(() => componentMap[activeTab.value] || componentMap.details)
|
||||||
|
|
||||||
|
/** 按批次列表用:根据行标识生成稳定的模拟保质期/禁售期展示 */
|
||||||
|
function mockBatchShelfLifeFields(rowKey: string) {
|
||||||
|
let hash = 0
|
||||||
|
for (let i = 0; i < rowKey.length; i++) {
|
||||||
|
hash = (hash * 31 + rowKey.charCodeAt(i)) >>> 0
|
||||||
|
}
|
||||||
|
const shelfLifeDays = 90 + (hash % 271)
|
||||||
|
const saleBanDays = 3 + (hash % 28)
|
||||||
|
return {
|
||||||
|
shelf_life_days: `${shelfLifeDays}天`,
|
||||||
|
sale_ban_period: `到期前${saleBanDays}天`
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const selectedRow = computed(() => {
|
const selectedRow = computed(() => {
|
||||||
return list.value.find((i: any) => i.id === selectedEntryId.value) || null
|
return list.value.find((i: any) => i.id === selectedEntryId.value) || null
|
||||||
})
|
})
|
||||||
@ -234,16 +267,22 @@ async function loadData() {
|
|||||||
const data = res.data || res
|
const data = res.data || res
|
||||||
const rows = Array.isArray(data.list) ? data.list : []
|
const rows = Array.isArray(data.list) ? data.list : []
|
||||||
|
|
||||||
list.value = rows.map((item: any) => ({
|
list.value = rows.map((item: any) => {
|
||||||
id: groupByBatch.value
|
const rowId = groupByBatch.value
|
||||||
? `${item.stock_id}-${item.space_id}-${item.batch_no || item.id || ''}`
|
? `${item.stock_id}-${item.space_id}-${item.batch_no || item.id || ''}`
|
||||||
: `${item.stock_id}-${item.space_id}`, // 合并模式下按库位+商品唯一
|
: `${item.stock_id}-${item.space_id}`
|
||||||
|
const mockShelf = groupByBatch.value ? mockBatchShelfLifeFields(rowId) : null
|
||||||
|
|
||||||
|
return {
|
||||||
|
id: rowId,
|
||||||
stock_id: item.stock_id,
|
stock_id: item.stock_id,
|
||||||
item_code: item.stock?.item_code || '',
|
item_code: item.stock?.item_code || '',
|
||||||
item_name: item.stock?.item_name || '',
|
item_name: item.stock?.item_name || '',
|
||||||
batch_no: item.batch_no || item.batch?.batch_no || '',
|
batch_no: item.batch_no || item.batch?.batch_no || '',
|
||||||
production_date: item.production_date || item.batch?.production_date || '',
|
production_date: item.production_date || item.batch?.production_date || '',
|
||||||
expiry_date: item.expiry_date || item.batch?.expiry_date || '',
|
expiry_date: item.expiry_date || item.batch?.expiry_date || '',
|
||||||
|
shelf_life_days: mockShelf?.shelf_life_days ?? '',
|
||||||
|
sale_ban_period: mockShelf?.sale_ban_period ?? '',
|
||||||
expiry_remaining_days: item.expiry_remaining_days,
|
expiry_remaining_days: item.expiry_remaining_days,
|
||||||
is_shelf_life_warning_triggered: Boolean(item.is_shelf_life_warning_triggered),
|
is_shelf_life_warning_triggered: Boolean(item.is_shelf_life_warning_triggered),
|
||||||
space_code: item.space?.space_code || item.space?.custom_name || '',
|
space_code: item.space?.space_code || item.space?.custom_name || '',
|
||||||
@ -264,7 +303,8 @@ async function loadData() {
|
|||||||
storage_id: item.storage_id || item.id || null,
|
storage_id: item.storage_id || item.id || null,
|
||||||
space_id: item.space_id || null,
|
space_id: item.space_id || null,
|
||||||
__raw: item
|
__raw: item
|
||||||
}))
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const pager = data.pagination || {}
|
const pager = data.pagination || {}
|
||||||
pagination.total = pager.total || data.total || list.value.length
|
pagination.total = pager.total || data.total || list.value.length
|
||||||
|
|||||||
@ -22,6 +22,8 @@ export const productstockColums = [
|
|||||||
{ prop: 'item_name', label: '商品名称', width: '200' },
|
{ prop: 'item_name', label: '商品名称', width: '200' },
|
||||||
{ prop: 'production_date', label: '生产日期', width: '120' },
|
{ prop: 'production_date', label: '生产日期', width: '120' },
|
||||||
{ prop: 'expiry_date', label: '到期日期', width: '120' },
|
{ prop: 'expiry_date', label: '到期日期', width: '120' },
|
||||||
|
{ prop: 'shelf_life_days', label: '保质期', width: '100' },
|
||||||
|
{ prop: 'sale_ban_period', label: '禁售期', width: '110' },
|
||||||
{ prop: 'space_code', label: '库位名称', width: '150' },
|
{ prop: 'space_code', label: '库位名称', width: '150' },
|
||||||
{ prop: 'store_name', label: '货主', width: '120' },
|
{ prop: 'store_name', label: '货主', width: '120' },
|
||||||
{ prop: 'inventory_type', label: '库存类型', width: '100' },
|
{ prop: 'inventory_type', label: '库存类型', width: '100' },
|
||||||
|
|||||||
492
src/views/storage/report/index.vue
Normal file
492
src/views/storage/report/index.vue
Normal file
@ -0,0 +1,492 @@
|
|||||||
|
<template>
|
||||||
|
<div class="storage-report-container" :style="{ height: containerHeight }">
|
||||||
|
<scan-box
|
||||||
|
ref="scanBox"
|
||||||
|
width="250px"
|
||||||
|
:tree-props="{ children: 'children', label: 'label' }"
|
||||||
|
:auto-submit="false"
|
||||||
|
:preset-tree="presetTree"
|
||||||
|
:available-fields="availableFieldsRef"
|
||||||
|
@condition-change="handleConditionChange"
|
||||||
|
@reset="handleConditionReset"
|
||||||
|
@condition-clear="handleConditionClear"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div class="main-content">
|
||||||
|
<div class="toolbar">
|
||||||
|
<div class="toolbar-left">
|
||||||
|
<el-button size="small" type="primary" @click="loadData">刷新</el-button>
|
||||||
|
<el-button size="small" :loading="exportLoading" @click="handleExport">导出 CSV</el-button>
|
||||||
|
<span class="toolbar-title">库存报表</span>
|
||||||
|
<el-tag size="small" type="info">共 {{ pagination.total }} 条</el-tag>
|
||||||
|
<template v-if="pagination.total > 0">
|
||||||
|
<el-tag size="small" effect="plain">入库合计 {{ formatNumber(sumInbound) }}</el-tag>
|
||||||
|
<el-tag size="small" effect="plain">出库合计 {{ formatNumber(sumOutbound) }}</el-tag>
|
||||||
|
</template>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="filter-hint">
|
||||||
|
结构与收货单页一致:左侧 ScanBox 选条件后自动查询。无任何有效条件时请求体为
|
||||||
|
<code>{}</code>。接口字段:期初 <code>begin_total</code>、入库 <code>inbound_total</code>、出库
|
||||||
|
<code>outbound_total</code>、期末 <code>end_total</code>;按库位时可能含
|
||||||
|
<code>space_id</code>/<code>space_name</code>。
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<div class="upper-wrapper">
|
||||||
|
<upper-table
|
||||||
|
row-key="__rid"
|
||||||
|
title="报表明细"
|
||||||
|
:data="list"
|
||||||
|
:columns="columns"
|
||||||
|
:table-size="tableSize"
|
||||||
|
:pagination="pagination"
|
||||||
|
:show-index="true"
|
||||||
|
:loading="loading"
|
||||||
|
:query-time="queryTime"
|
||||||
|
@current-change="handleRowClick"
|
||||||
|
@page-change="handlePageChange"
|
||||||
|
@page-size-change="handlePageSizeChange"
|
||||||
|
@refresh="loadData"
|
||||||
|
>
|
||||||
|
<template #empty>
|
||||||
|
<div class="empty-tip">暂无数据,可在左侧调整筛选条件</div>
|
||||||
|
</template>
|
||||||
|
</upper-table>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="selectedRow" class="lower-level" :class="tableSize">
|
||||||
|
<div class="detail-header">
|
||||||
|
<span class="detail-title">行明细</span>
|
||||||
|
<span class="detail-sub">字段与接口 <code>data.list[]</code> 单条对象一致</span>
|
||||||
|
</div>
|
||||||
|
<div class="detail-container">
|
||||||
|
<el-descriptions :column="2" border size="small">
|
||||||
|
<el-descriptions-item
|
||||||
|
v-for="key in detailKeys"
|
||||||
|
:key="key"
|
||||||
|
:label="fieldLabel(key)"
|
||||||
|
:span="isWideKey(key) ? 2 : 1"
|
||||||
|
>
|
||||||
|
{{ detailValue(key) }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-else class="no-selection">
|
||||||
|
<div class="empty-tip">在表格中点击一行可查看该行完整字段</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { computed, onMounted, reactive, ref } from 'vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import dayjs from 'dayjs'
|
||||||
|
import ScanBox from '@/components/ScanBox/index.vue'
|
||||||
|
import UpperTable from '@/components/UpperTable/index.vue'
|
||||||
|
import { searchInventoryReport } from '@/api/storage.report/report'
|
||||||
|
import * as indexApi from '@/api/index/index'
|
||||||
|
import {
|
||||||
|
buildReportTableColumns,
|
||||||
|
formatReportCell,
|
||||||
|
formatReportDateTime,
|
||||||
|
formatReportNumber,
|
||||||
|
normalizeScanConditionToReportWhere,
|
||||||
|
reportFieldLabels,
|
||||||
|
reportScanBoxAvailableFields,
|
||||||
|
sortReportDetailKeys
|
||||||
|
} from './report-config'
|
||||||
|
import { useSettingsStore } from '@/stores/modules/settings'
|
||||||
|
|
||||||
|
const scanBox = ref<any>(null)
|
||||||
|
|
||||||
|
const presetTree = ref<any[]>([])
|
||||||
|
const availableFieldsRef = reactive(JSON.parse(JSON.stringify(reportScanBoxAvailableFields)))
|
||||||
|
|
||||||
|
const settingsStore = useSettingsStore()
|
||||||
|
const shortcutExpanded = computed(() => settingsStore.shortcutExpanded)
|
||||||
|
const containerHeight = computed(() =>
|
||||||
|
shortcutExpanded.value ? 'calc(100vh - 150px)' : 'calc(100vh - 100px)'
|
||||||
|
)
|
||||||
|
|
||||||
|
const tableSize = ref<'small' | 'default' | 'large'>('small')
|
||||||
|
const loading = ref(false)
|
||||||
|
const exportLoading = ref(false)
|
||||||
|
const queryTime = ref(0)
|
||||||
|
|
||||||
|
const fullList = ref<any[]>([])
|
||||||
|
const list = ref<any[]>([])
|
||||||
|
const columns = ref(buildReportTableColumns([]))
|
||||||
|
|
||||||
|
const pagination = reactive({
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
total: 0
|
||||||
|
})
|
||||||
|
|
||||||
|
const selectedRid = ref<string | null>(null)
|
||||||
|
const currentConditionRaw = ref<any>(null)
|
||||||
|
|
||||||
|
const selectedRow = computed(() => fullList.value.find((r) => r.__rid === selectedRid.value) || null)
|
||||||
|
|
||||||
|
const detailKeys = computed(() => {
|
||||||
|
if (!selectedRow.value) return []
|
||||||
|
const keys = Object.keys(selectedRow.value).filter((k) => k !== '__rid')
|
||||||
|
return sortReportDetailKeys(keys)
|
||||||
|
})
|
||||||
|
|
||||||
|
const sumInbound = computed(() =>
|
||||||
|
fullList.value.reduce((a, r) => a + Number((r as any).inbound_total ?? 0), 0)
|
||||||
|
)
|
||||||
|
const sumOutbound = computed(() =>
|
||||||
|
fullList.value.reduce((a, r) => a + Number((r as any).outbound_total ?? 0), 0)
|
||||||
|
)
|
||||||
|
|
||||||
|
function formatNumber(n: number) {
|
||||||
|
return Number.isFinite(n) ? n.toLocaleString('zh-CN') : '--'
|
||||||
|
}
|
||||||
|
|
||||||
|
function fieldLabel(key: string) {
|
||||||
|
return reportFieldLabels[key] || key
|
||||||
|
}
|
||||||
|
|
||||||
|
function detailValue(key: string) {
|
||||||
|
if (!selectedRow.value) return '--'
|
||||||
|
const v = (selectedRow.value as any)[key]
|
||||||
|
if (key === 'start_time' || key === 'end_time') return formatReportDateTime(v)
|
||||||
|
if (
|
||||||
|
key === 'begin_total' ||
|
||||||
|
key === 'end_total' ||
|
||||||
|
key === 'inbound_total' ||
|
||||||
|
key === 'outbound_total' ||
|
||||||
|
key === 'stock_id' ||
|
||||||
|
key === 'store_id' ||
|
||||||
|
key === 'space_id'
|
||||||
|
) {
|
||||||
|
return formatReportNumber(v)
|
||||||
|
}
|
||||||
|
return formatReportCell(v)
|
||||||
|
}
|
||||||
|
|
||||||
|
function isWideKey(key: string) {
|
||||||
|
return detailValue(key).length > 80
|
||||||
|
}
|
||||||
|
|
||||||
|
function extractReportList(res: any): any[] {
|
||||||
|
if (!res) return []
|
||||||
|
if (res.data != null && Array.isArray(res.data.list)) return res.data.list
|
||||||
|
if (Array.isArray(res.list)) return res.list
|
||||||
|
return []
|
||||||
|
}
|
||||||
|
|
||||||
|
function withRowIds(rows: any[]) {
|
||||||
|
return rows.map((row, idx) => ({
|
||||||
|
...row,
|
||||||
|
__rid: `r-${idx}-${row.stock_id ?? ''}-${row.store_id ?? ''}-${row.item_code ?? ''}`
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
|
function applyClientPage() {
|
||||||
|
const total = fullList.value.length
|
||||||
|
pagination.total = total
|
||||||
|
const start = (pagination.currentPage - 1) * pagination.pageSize
|
||||||
|
list.value = fullList.value.slice(start, start + pagination.pageSize)
|
||||||
|
}
|
||||||
|
|
||||||
|
async function loadFilterData() {
|
||||||
|
try {
|
||||||
|
const [storesRes, presetRes]: any = await Promise.all([
|
||||||
|
indexApi.loadStores({ type: 'stock' }),
|
||||||
|
indexApi.fastWhereTree('stock')
|
||||||
|
])
|
||||||
|
if (storesRes && storesRes.code === 200) {
|
||||||
|
const f = availableFieldsRef.find((i: any) => i.value === 'store_id')
|
||||||
|
if (f) f.options = storesRes.stores || []
|
||||||
|
}
|
||||||
|
if (presetRes && presetRes.code === 200) {
|
||||||
|
presetTree.value = presetRes.presetTree || []
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
console.error('加载筛选配置失败', e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleConditionChange(condition: any) {
|
||||||
|
currentConditionRaw.value = condition
|
||||||
|
pagination.currentPage = 1
|
||||||
|
loadData()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleConditionClear() {
|
||||||
|
currentConditionRaw.value = null
|
||||||
|
pagination.currentPage = 1
|
||||||
|
loadData()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleConditionReset() {
|
||||||
|
currentConditionRaw.value = null
|
||||||
|
pagination.currentPage = 1
|
||||||
|
if (scanBox.value?.reset) {
|
||||||
|
scanBox.value.reset()
|
||||||
|
} else if (scanBox.value?.clear) {
|
||||||
|
scanBox.value.clear()
|
||||||
|
}
|
||||||
|
loadData()
|
||||||
|
}
|
||||||
|
|
||||||
|
async function loadData() {
|
||||||
|
if (loading.value) return
|
||||||
|
loading.value = true
|
||||||
|
const started = Date.now()
|
||||||
|
selectedRid.value = null
|
||||||
|
const where = normalizeScanConditionToReportWhere(currentConditionRaw.value)
|
||||||
|
const body = Object.keys(where).length > 0 ? { where } : {}
|
||||||
|
try {
|
||||||
|
const res: any = await searchInventoryReport(body as any)
|
||||||
|
if (res && (res.flag === 'success' || res.code === 200)) {
|
||||||
|
const raw = extractReportList(res)
|
||||||
|
fullList.value = withRowIds(raw)
|
||||||
|
columns.value = buildReportTableColumns(raw)
|
||||||
|
pagination.currentPage = 1
|
||||||
|
applyClientPage()
|
||||||
|
queryTime.value = Date.now() - started
|
||||||
|
if (raw.length === 0) {
|
||||||
|
ElMessage.info('当前条件下暂无数据')
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
fullList.value = []
|
||||||
|
list.value = []
|
||||||
|
columns.value = buildReportTableColumns([])
|
||||||
|
pagination.total = 0
|
||||||
|
ElMessage.error(res?.message || '查询失败')
|
||||||
|
}
|
||||||
|
} catch (e: any) {
|
||||||
|
fullList.value = []
|
||||||
|
list.value = []
|
||||||
|
columns.value = buildReportTableColumns([])
|
||||||
|
pagination.total = 0
|
||||||
|
ElMessage.error(e?.message || '请求失败')
|
||||||
|
} finally {
|
||||||
|
loading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function handlePageChange(page: number) {
|
||||||
|
pagination.currentPage = page
|
||||||
|
applyClientPage()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handlePageSizeChange(size: number) {
|
||||||
|
pagination.pageSize = size
|
||||||
|
pagination.currentPage = 1
|
||||||
|
applyClientPage()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleRowClick(row: any) {
|
||||||
|
selectedRid.value = row?.__rid ?? null
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleExport() {
|
||||||
|
if (!fullList.value.length) {
|
||||||
|
ElMessage.warning('暂无数据可导出,请先查询')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
exportLoading.value = true
|
||||||
|
try {
|
||||||
|
const cols = columns.value.length > 0 ? columns.value : buildReportTableColumns([])
|
||||||
|
const headers = cols.map((c) => c.label)
|
||||||
|
const props = cols.map((c) => c.prop)
|
||||||
|
const lines = [
|
||||||
|
headers.map(escapeCsv).join(','),
|
||||||
|
...fullList.value.map((row) =>
|
||||||
|
props.map((p) => escapeCsv(row[p])).join(',')
|
||||||
|
)
|
||||||
|
]
|
||||||
|
const blob = new Blob(['\uFEFF' + lines.join('\n')], { type: 'text/csv;charset=utf-8;' })
|
||||||
|
const a = document.createElement('a')
|
||||||
|
a.href = URL.createObjectURL(blob)
|
||||||
|
a.download = `库存报表_${dayjs().format('YYYY-MM-DD_HHmmss')}.csv`
|
||||||
|
a.click()
|
||||||
|
URL.revokeObjectURL(a.href)
|
||||||
|
ElMessage.success('导出成功')
|
||||||
|
} catch (e: any) {
|
||||||
|
ElMessage.error(e?.message || '导出失败')
|
||||||
|
} finally {
|
||||||
|
exportLoading.value = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function escapeCsv(v: unknown) {
|
||||||
|
const s = formatReportCell(v)
|
||||||
|
if (/[",\n\r]/.test(s)) return `"${s.replace(/"/g, '""')}"`
|
||||||
|
return s
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
loadFilterData()
|
||||||
|
loadData()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.storage-report-container {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #f0f2f5;
|
||||||
|
|
||||||
|
.main-content {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
min-height: 0;
|
||||||
|
|
||||||
|
.toolbar {
|
||||||
|
padding: 5px;
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
.toolbar-left {
|
||||||
|
display: flex;
|
||||||
|
gap: 8px;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toolbar-title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #303133;
|
||||||
|
margin-left: 4px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.filter-hint {
|
||||||
|
margin: 6px 0 0;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #909399;
|
||||||
|
line-height: 1.5;
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 0 4px;
|
||||||
|
background: #f4f4f5;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper :deep(.upper-table-container) {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper :deep(.upper-table-container) :deep(.table-container) {
|
||||||
|
height: auto !important;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper :deep(.el-table__header-wrapper) {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
z-index: 3;
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper :deep(.el-table__body-wrapper) {
|
||||||
|
overflow: auto;
|
||||||
|
min-height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.lower-level {
|
||||||
|
flex: 0 0 40%;
|
||||||
|
height: 40%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
border-top: 1px solid #ebeef5;
|
||||||
|
overflow: hidden;
|
||||||
|
background-color: #fff;
|
||||||
|
margin-top: 8px;
|
||||||
|
|
||||||
|
.detail-header {
|
||||||
|
padding: 10px 12px;
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
background: #fafafa;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: baseline;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-title {
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
color: #303133;
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-sub {
|
||||||
|
font-size: 12px;
|
||||||
|
color: #909399;
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-size: 12px;
|
||||||
|
padding: 0 4px;
|
||||||
|
background: #f4f4f5;
|
||||||
|
border-radius: 2px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.detail-container {
|
||||||
|
flex: 1;
|
||||||
|
overflow: auto;
|
||||||
|
padding: 10px;
|
||||||
|
|
||||||
|
:deep(.el-descriptions__body) {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-descriptions-item__cell) {
|
||||||
|
padding: 8px 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.no-selection {
|
||||||
|
flex: 0 0 40%;
|
||||||
|
height: 40%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #909399;
|
||||||
|
background-color: #fff;
|
||||||
|
margin-top: 8px;
|
||||||
|
border: 1px dashed #dcdfe6;
|
||||||
|
|
||||||
|
.empty-tip {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-tip {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 13px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
195
src/views/storage/report/report-config.ts
Normal file
195
src/views/storage/report/report-config.ts
Normal file
@ -0,0 +1,195 @@
|
|||||||
|
import dayjs from 'dayjs'
|
||||||
|
import type { StorageReportListItem } from '@/api/storage.report/report'
|
||||||
|
|
||||||
|
export const reportFieldLabels: Record<string, string> = {
|
||||||
|
store_id: '货主ID',
|
||||||
|
store_name: '货主',
|
||||||
|
stock_id: '商品ID',
|
||||||
|
item_code: '商品编码',
|
||||||
|
barcode: '条码',
|
||||||
|
item_name: '商品名称',
|
||||||
|
begin_total: '期初数量',
|
||||||
|
inbound_total: '区间内入库',
|
||||||
|
outbound_total: '区间内出库',
|
||||||
|
end_total: '期末数量',
|
||||||
|
start_time: '统计区间开始',
|
||||||
|
end_time: '统计区间结束',
|
||||||
|
space_id: '库位ID',
|
||||||
|
space_name: '库位'
|
||||||
|
}
|
||||||
|
|
||||||
|
const DETAIL_KEY_ORDER = [
|
||||||
|
'store_id',
|
||||||
|
'store_name',
|
||||||
|
'stock_id',
|
||||||
|
'item_code',
|
||||||
|
'barcode',
|
||||||
|
'item_name',
|
||||||
|
'begin_total',
|
||||||
|
'inbound_total',
|
||||||
|
'outbound_total',
|
||||||
|
'end_total',
|
||||||
|
'start_time',
|
||||||
|
'end_time',
|
||||||
|
'space_id',
|
||||||
|
'space_name'
|
||||||
|
]
|
||||||
|
|
||||||
|
export function sortReportDetailKeys(keys: string[]) {
|
||||||
|
const head = DETAIL_KEY_ORDER.filter((k) => keys.includes(k))
|
||||||
|
const tail = keys.filter((k) => !DETAIL_KEY_ORDER.includes(k)).sort()
|
||||||
|
return [...head, ...tail]
|
||||||
|
}
|
||||||
|
|
||||||
|
export function formatReportNumber(val: unknown): string {
|
||||||
|
if (val === null || val === undefined || val === '') return '--'
|
||||||
|
const n = Number(val)
|
||||||
|
if (Number.isNaN(n)) return '--'
|
||||||
|
return String(Math.trunc(n) === n ? n.toLocaleString('zh-CN') : n.toLocaleString('zh-CN', { maximumFractionDigits: 4 }))
|
||||||
|
}
|
||||||
|
|
||||||
|
export function formatReportDateTime(val: unknown): string {
|
||||||
|
if (val === null || val === undefined || val === '') return '--'
|
||||||
|
const d = dayjs(val as string | number | Date)
|
||||||
|
return d.isValid() ? d.format('YYYY-MM-DD HH:mm:ss') : String(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
export function formatReportCell(val: unknown): string {
|
||||||
|
if (val === null || val === undefined || val === '') return '--'
|
||||||
|
if (typeof val === 'object') return JSON.stringify(val)
|
||||||
|
return String(val)
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ReportColumn = {
|
||||||
|
prop: string
|
||||||
|
label: string
|
||||||
|
width?: string | number
|
||||||
|
minWidth?: string | number
|
||||||
|
align?: 'left' | 'center' | 'right'
|
||||||
|
formatter?: (row: StorageReportListItem) => string
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 主表格固定列(与真实接口字段一致);按库位时后端可额外返回 space_*,由 buildReportTableColumns 追加 */
|
||||||
|
export const fixedReportColumns: ReportColumn[] = [
|
||||||
|
{ prop: 'store_name', label: '货主', minWidth: 120, formatter: (row) => row.store_name || '--' },
|
||||||
|
{ prop: 'store_id', label: '货主ID', width: 96, align: 'center', formatter: (row) => formatReportNumber(row.store_id) },
|
||||||
|
{ prop: 'item_name', label: '商品名称', minWidth: 140, formatter: (row) => row.item_name || '--' },
|
||||||
|
{ prop: 'item_code', label: '商品编码', minWidth: 120, formatter: (row) => row.item_code || '--' },
|
||||||
|
{ prop: 'barcode', label: '条码', minWidth: 140, formatter: (row) => row.barcode || '--' },
|
||||||
|
{ prop: 'stock_id', label: '商品ID', width: 96, align: 'center', formatter: (row) => formatReportNumber(row.stock_id) },
|
||||||
|
{ prop: 'begin_total', label: '期初数量', width: 104, align: 'right', formatter: (row) => formatReportNumber(row.begin_total) },
|
||||||
|
{ prop: 'inbound_total', label: '区间内入库', width: 112, align: 'right', formatter: (row) => formatReportNumber(row.inbound_total) },
|
||||||
|
{ prop: 'outbound_total', label: '区间内出库', width: 112, align: 'right', formatter: (row) => formatReportNumber(row.outbound_total) },
|
||||||
|
{ prop: 'end_total', label: '期末数量', width: 104, align: 'right', formatter: (row) => formatReportNumber(row.end_total) },
|
||||||
|
{
|
||||||
|
prop: 'start_time',
|
||||||
|
label: '区间开始',
|
||||||
|
width: 168,
|
||||||
|
align: 'center',
|
||||||
|
formatter: (row) => formatReportDateTime(row.start_time)
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'end_time',
|
||||||
|
label: '区间结束',
|
||||||
|
width: 168,
|
||||||
|
align: 'center',
|
||||||
|
formatter: (row) => formatReportDateTime(row.end_time)
|
||||||
|
},
|
||||||
|
{ prop: 'space_id', label: '库位ID', width: 96, align: 'center', formatter: (row) => formatReportNumber(row.space_id) },
|
||||||
|
{ prop: 'space_name', label: '库位', minWidth: 120, formatter: (row) => row.space_name || '--' }
|
||||||
|
]
|
||||||
|
|
||||||
|
const FIXED_PROPS = new Set(fixedReportColumns.map((c) => c.prop))
|
||||||
|
|
||||||
|
export function buildReportTableColumns(rows: StorageReportListItem[]) {
|
||||||
|
const cols = fixedReportColumns.map((c) => ({ ...c }))
|
||||||
|
const extra = new Set<string>()
|
||||||
|
for (const row of rows) {
|
||||||
|
if (!row || typeof row !== 'object') continue
|
||||||
|
for (const k of Object.keys(row)) {
|
||||||
|
if (k === '__rid' || FIXED_PROPS.has(k)) continue
|
||||||
|
extra.add(k)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const prop of [...extra].sort()) {
|
||||||
|
cols.push({
|
||||||
|
prop,
|
||||||
|
label: reportFieldLabels[prop] || prop,
|
||||||
|
minWidth: 110,
|
||||||
|
align: /total|qty|count|amount|_id$/i.test(prop) ? 'right' : 'left',
|
||||||
|
formatter: (row) => formatReportCell((row as any)[prop])
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return cols
|
||||||
|
}
|
||||||
|
|
||||||
|
function normalizeReportDateParam(value: unknown): string | undefined {
|
||||||
|
if (value == null || value === '') return undefined
|
||||||
|
const d = dayjs(value as string | number | Date)
|
||||||
|
return d.isValid() ? d.format('YYYY-MM-DD HH:mm:ss') : String(value)
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ScanBox 侧栏可用字段(与 storage.report.search 的 where 对应) */
|
||||||
|
export const reportScanBoxAvailableFields = [
|
||||||
|
// {
|
||||||
|
// value: 'report_period',
|
||||||
|
// label: '统计时间',
|
||||||
|
// type: 'date',
|
||||||
|
// operators: ['between'],
|
||||||
|
// defaultOperator: 'between'
|
||||||
|
// },
|
||||||
|
{
|
||||||
|
value: 'store_id',
|
||||||
|
label: '货主',
|
||||||
|
type: 'select',
|
||||||
|
multiple: true,
|
||||||
|
filterable: true,
|
||||||
|
options: [] as { label: string; value: number }[]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'by_space',
|
||||||
|
label: '聚合方式',
|
||||||
|
type: 'select',
|
||||||
|
options: [
|
||||||
|
{ value: false, label: '按商品汇总' },
|
||||||
|
{ value: true, label: '按库位' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
/** 将 ScanBox 条件转为接口扁平 where;无有效条件时返回 {} */
|
||||||
|
export function normalizeScanConditionToReportWhere(condition: any): Record<string, unknown> {
|
||||||
|
const where: Record<string, unknown> = {}
|
||||||
|
if (!condition?.conditions || typeof condition.conditions !== 'object') {
|
||||||
|
return where
|
||||||
|
}
|
||||||
|
const conds = condition.conditions
|
||||||
|
|
||||||
|
const period = conds.report_period
|
||||||
|
if (period?.value != null && period.value !== '') {
|
||||||
|
const v = period.value
|
||||||
|
if (Array.isArray(v) && v.length >= 2) {
|
||||||
|
const a = normalizeReportDateParam(v[0])
|
||||||
|
const b = normalizeReportDateParam(v[1])
|
||||||
|
if (a) where.start_time = a
|
||||||
|
if (b) where.end_time = b
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const sid = conds.store_id
|
||||||
|
if (sid?.value != null && sid.value !== '') {
|
||||||
|
const raw = sid.value
|
||||||
|
const arr = (Array.isArray(raw) ? raw : [raw])
|
||||||
|
.map((x: unknown) => Number(x))
|
||||||
|
.filter((n) => Number.isFinite(n))
|
||||||
|
if (arr.length) where.store_ids = arr
|
||||||
|
}
|
||||||
|
|
||||||
|
const bs = conds.by_space
|
||||||
|
if (bs && bs.value !== undefined && bs.value !== null && bs.value !== '') {
|
||||||
|
const val = bs.value
|
||||||
|
where.by_space = val === true || val === 'true' || val === 1 || val === '1'
|
||||||
|
}
|
||||||
|
|
||||||
|
return where
|
||||||
|
}
|
||||||
@ -1,51 +1,55 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="courier-page">
|
<div class="encoding-sub-container">
|
||||||
<div class="toolbar">
|
<!-- <scan-box
|
||||||
<div class="toolbar-left">
|
ref="scanBox"
|
||||||
<el-input
|
cache-key="encoding:courierCode"
|
||||||
v-model="query.keyword"
|
width="250px"
|
||||||
clearable
|
:tree-props="{ children: 'children', label: 'label' }"
|
||||||
placeholder="搜索编码/名称/快递公司"
|
:auto-submit="false"
|
||||||
class="search-input"
|
:preset-tree="presetTree"
|
||||||
@keyup.enter="handleSearch"
|
:available-fields="availableFieldsRef"
|
||||||
@clear="handleSearch"
|
@condition-change="handleConditionChange"
|
||||||
/>
|
@reset="handleConditionReset"
|
||||||
<el-button type="primary" size="small" @click="handleSearch">搜索</el-button>
|
@condition-clear="handleConditionClear"
|
||||||
<el-button size="small" :loading="loading" @click="loadList">刷新</el-button>
|
/> -->
|
||||||
</div>
|
|
||||||
<div class="toolbar-right">
|
|
||||||
<el-button type="success" size="small" @click="openCreate">新增编码</el-button>
|
|
||||||
<el-button
|
|
||||||
type="danger"
|
|
||||||
size="small"
|
|
||||||
plain
|
|
||||||
:disabled="!selectedIds.length"
|
|
||||||
:loading="batchDeleting"
|
|
||||||
@click="handleBatchDelete"
|
|
||||||
>
|
|
||||||
批量删除
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="table-wrapper">
|
<div class="main-content">
|
||||||
<el-table
|
<div class="toolbar">
|
||||||
ref="tableRef"
|
<div class="toolbar-left">
|
||||||
v-loading="loading"
|
<el-button size="small" :loading="loading" @click="loadList">刷新</el-button>
|
||||||
:data="tableData"
|
<el-button type="success" size="small" @click="openCreate">新增编码</el-button>
|
||||||
border
|
<el-button
|
||||||
stripe
|
type="danger"
|
||||||
height="100%"
|
size="small"
|
||||||
row-key="id"
|
plain
|
||||||
@selection-change="onSelectionChange"
|
:disabled="!selectedIds.length"
|
||||||
>
|
:loading="batchDeleting"
|
||||||
<el-table-column type="selection" width="48" fixed="left" />
|
@click="handleBatchDelete"
|
||||||
<el-table-column prop="id" label="ID" width="80" />
|
>
|
||||||
<el-table-column prop="express_name" label="快递名称" min-width="180" />
|
批量删除
|
||||||
<el-table-column prop="code" label="业务编码" min-width="180" />
|
</el-button>
|
||||||
<el-table-column prop="name" label="业务名称" min-width="180" />
|
</div>
|
||||||
<el-table-column label="操作" width="140" fixed="right">
|
</div>
|
||||||
<template #default="{ row }">
|
|
||||||
|
<div class="upper-wrapper">
|
||||||
|
<upper-table
|
||||||
|
ref="upperTable"
|
||||||
|
title="快递编码列表"
|
||||||
|
table-id="encoding-courier-code"
|
||||||
|
:data="tableData"
|
||||||
|
:columns="columns"
|
||||||
|
:table-size="tableSize"
|
||||||
|
:pagination="pagination"
|
||||||
|
:show-index="true"
|
||||||
|
:show-selection="true"
|
||||||
|
:loading="loading"
|
||||||
|
:query-time="queryTime"
|
||||||
|
@page-change="handlePageChange"
|
||||||
|
@page-size-change="handlePageSizeChange"
|
||||||
|
@refresh="loadList"
|
||||||
|
@selection-change="onSelectionChange"
|
||||||
|
>
|
||||||
|
<template #column-actions="{ row }">
|
||||||
<el-button link type="primary" @click="openEdit(row)">编辑</el-button>
|
<el-button link type="primary" @click="openEdit(row)">编辑</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
link
|
link
|
||||||
@ -57,21 +61,12 @@
|
|||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pager">
|
<template #empty>
|
||||||
<el-pagination
|
<div class="empty-tip">暂无快递编码数据</div>
|
||||||
v-model:current-page="query.page"
|
</template>
|
||||||
v-model:page-size="query.page_size"
|
</upper-table>
|
||||||
background
|
</div>
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
:total="total"
|
|
||||||
:page-sizes="[10, 20, 50, 100]"
|
|
||||||
@current-change="loadList"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@ -90,14 +85,6 @@
|
|||||||
@blur="validateCodeUnique"
|
@blur="validateCodeUnique"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<!-- <el-alert
|
|
||||||
v-if="dialogMode === 'edit'"
|
|
||||||
type="info"
|
|
||||||
:closable="false"
|
|
||||||
show-icon
|
|
||||||
class="form-tip"
|
|
||||||
title="业务编码创建后不可修改;仅可调整名称与关联快递公司(platform)。"
|
|
||||||
/> -->
|
|
||||||
<el-form-item label="业务名称" prop="name">
|
<el-form-item label="业务名称" prop="name">
|
||||||
<el-input v-model="formData.name" placeholder="如 顺丰空运产品" />
|
<el-input v-model="formData.name" placeholder="如 顺丰空运产品" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -130,6 +117,8 @@
|
|||||||
import { onMounted, reactive, ref } from 'vue'
|
import { onMounted, reactive, ref } from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import type { FormInstance, FormRules } from 'element-plus'
|
import type { FormInstance, FormRules } from 'element-plus'
|
||||||
|
import ScanBox from '@/components/ScanBox/index.vue'
|
||||||
|
import UpperTable from '@/components/UpperTable/index.vue'
|
||||||
import { getExpressList } from '@/api/index/index'
|
import { getExpressList } from '@/api/index/index'
|
||||||
import {
|
import {
|
||||||
expressCheckCodeUnique,
|
expressCheckCodeUnique,
|
||||||
@ -138,6 +127,11 @@ import {
|
|||||||
expressList,
|
expressList,
|
||||||
expressUpdate
|
expressUpdate
|
||||||
} from '@/api/setting.express/express'
|
} from '@/api/setting.express/express'
|
||||||
|
import {
|
||||||
|
buildWhereConditions,
|
||||||
|
courierAvailableFields,
|
||||||
|
courierColumns
|
||||||
|
} from '../encoding-config'
|
||||||
|
|
||||||
type ExpressOption = {
|
type ExpressOption = {
|
||||||
code: string
|
code: string
|
||||||
@ -155,21 +149,23 @@ type ExpressRecord = {
|
|||||||
express_label?: string
|
express_label?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const tableRef = ref()
|
const scanBox = ref<any>(null)
|
||||||
|
const upperTable = ref<any>(null)
|
||||||
|
const presetTree = ref<any[]>([])
|
||||||
|
const availableFieldsRef = reactive(JSON.parse(JSON.stringify(courierAvailableFields)))
|
||||||
|
const columns = courierColumns
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const saving = ref(false)
|
const saving = ref(false)
|
||||||
const deletingId = ref<number | string | null>(null)
|
const deletingId = ref<number | string | null>(null)
|
||||||
const batchDeleting = ref(false)
|
const batchDeleting = ref(false)
|
||||||
const selectedIds = ref<number[]>([])
|
const selectedIds = ref<number[]>([])
|
||||||
const tableData = ref<ExpressRecord[]>([])
|
const tableData = ref<ExpressRecord[]>([])
|
||||||
const total = ref(0)
|
|
||||||
const expressOptions = ref<ExpressOption[]>([])
|
const expressOptions = ref<ExpressOption[]>([])
|
||||||
|
const queryTime = ref(0)
|
||||||
|
const tableSize = ref('small')
|
||||||
|
|
||||||
const query = reactive({
|
const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 })
|
||||||
keyword: '',
|
|
||||||
page: 1,
|
|
||||||
page_size: 20
|
|
||||||
})
|
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const dialogMode = ref<'create' | 'edit'>('create')
|
const dialogMode = ref<'create' | 'edit'>('create')
|
||||||
@ -190,17 +186,16 @@ const rules: FormRules = {
|
|||||||
|
|
||||||
const isSuccess = (res: any) => res && [0, 1, 200].includes(res.code)
|
const isSuccess = (res: any) => res && [0, 1, 200].includes(res.code)
|
||||||
|
|
||||||
/** setting.express.list:pagination(module)+ keyword(兼容旧入参) */
|
|
||||||
function buildListPayload() {
|
function buildListPayload() {
|
||||||
const kw = query.keyword.trim()
|
const where = buildWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||||
const payload: Record<string, any> = {
|
const payload: Record<string, any> = {
|
||||||
pagination: {
|
pagination: {
|
||||||
page: query.page,
|
page: pagination.currentPage,
|
||||||
pageSize: query.page_size
|
pageSize: pagination.pageSize
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (kw) {
|
if (Object.keys(where).length) {
|
||||||
payload.keyword = kw
|
payload.where = where
|
||||||
}
|
}
|
||||||
return payload
|
return payload
|
||||||
}
|
}
|
||||||
@ -215,6 +210,24 @@ function normalizeListRow(item: any): ExpressRecord {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function syncPresetTree(list: ExpressRecord[]) {
|
||||||
|
presetTree.value = list.map((item) => ({
|
||||||
|
label: item.name || item.code,
|
||||||
|
id: item.id,
|
||||||
|
code: item.code,
|
||||||
|
children: []
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
|
function fillExpressScanOptions(raw: any[]) {
|
||||||
|
const field = availableFieldsRef.find((f: any) => f.value === 'platform')
|
||||||
|
if (!field) return
|
||||||
|
field.options = (raw || []).map((item: any) => ({
|
||||||
|
label: item.label || item.name || item.express_name || item.code,
|
||||||
|
value: item.code || item.express_code
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
function onSelectionChange(rows: ExpressRecord[]) {
|
function onSelectionChange(rows: ExpressRecord[]) {
|
||||||
selectedIds.value = (rows || [])
|
selectedIds.value = (rows || [])
|
||||||
.map((r) => r.id)
|
.map((r) => r.id)
|
||||||
@ -224,25 +237,28 @@ function onSelectionChange(rows: ExpressRecord[]) {
|
|||||||
|
|
||||||
async function loadList() {
|
async function loadList() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
const start = Date.now()
|
||||||
try {
|
try {
|
||||||
const res: any = await expressList(buildListPayload())
|
const res: any = await expressList(buildListPayload())
|
||||||
if (!isSuccess(res)) {
|
if (!isSuccess(res)) {
|
||||||
ElMessage.error(res?.message || '获取快递编码失败')
|
ElMessage.error(res?.message || '获取快递编码失败')
|
||||||
tableData.value = []
|
tableData.value = []
|
||||||
total.value = 0
|
pagination.total = 0
|
||||||
|
presetTree.value = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const data = res?.data || {}
|
const data = res?.data || {}
|
||||||
const raw = data.list || []
|
const raw = data.list || []
|
||||||
tableData.value = raw.map((item: any) => normalizeListRow(item))
|
tableData.value = raw.map((item: any) => normalizeListRow(item))
|
||||||
total.value = Number(
|
pagination.total = Number(data.pagination?.total ?? data.total ?? data.count ?? 0)
|
||||||
data.pagination?.total ?? data.total ?? data.count ?? 0
|
syncPresetTree(tableData.value)
|
||||||
)
|
} catch {
|
||||||
} catch (error) {
|
|
||||||
tableData.value = []
|
tableData.value = []
|
||||||
total.value = 0
|
pagination.total = 0
|
||||||
|
presetTree.value = []
|
||||||
ElMessage.error('获取快递编码失败')
|
ElMessage.error('获取快递编码失败')
|
||||||
} finally {
|
} finally {
|
||||||
|
queryTime.value = Date.now() - start
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -251,32 +267,51 @@ async function loadBaseOptions() {
|
|||||||
try {
|
try {
|
||||||
const res: any = await getExpressList({ systemOnly: true })
|
const res: any = await getExpressList({ systemOnly: true })
|
||||||
if (!isSuccess(res)) return
|
if (!isSuccess(res)) return
|
||||||
expressOptions.value = (res?.data || []).map((item: any) => ({
|
const raw = res?.data || []
|
||||||
|
expressOptions.value = raw.map((item: any) => ({
|
||||||
code: item.code || item.express_code,
|
code: item.code || item.express_code,
|
||||||
name: item.name || item.express_name,
|
name: item.name || item.express_name,
|
||||||
label: item.label
|
label: item.label
|
||||||
}))
|
}))
|
||||||
} catch (error) {
|
fillExpressScanOptions(raw)
|
||||||
|
} catch {
|
||||||
expressOptions.value = []
|
expressOptions.value = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handlePageChange(page: number) {
|
||||||
|
pagination.currentPage = page
|
||||||
|
loadList()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handlePageSizeChange(size: number) {
|
||||||
|
pagination.pageSize = size
|
||||||
|
pagination.currentPage = 1
|
||||||
|
loadList()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleConditionChange() {
|
||||||
|
pagination.currentPage = 1
|
||||||
|
loadList()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleConditionClear() {
|
||||||
|
pagination.currentPage = 1
|
||||||
|
loadList()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleConditionReset() {
|
||||||
|
pagination.currentPage = 1
|
||||||
|
scanBox.value?.reset?.()
|
||||||
|
loadList()
|
||||||
|
}
|
||||||
|
|
||||||
function handleExpressChange(code: string) {
|
function handleExpressChange(code: string) {
|
||||||
const target = expressOptions.value.find((item) => item.code === code)
|
const target = expressOptions.value.find((item) => item.code === code)
|
||||||
if (!target) return
|
if (!target) return
|
||||||
formData.express_name = target.name || target.label || ''
|
formData.express_name = target.name || target.label || ''
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSearch() {
|
|
||||||
query.page = 1
|
|
||||||
loadList()
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleSizeChange() {
|
|
||||||
query.page = 1
|
|
||||||
loadList()
|
|
||||||
}
|
|
||||||
|
|
||||||
function resetForm() {
|
function resetForm() {
|
||||||
formData.id = undefined
|
formData.id = undefined
|
||||||
formData.code = ''
|
formData.code = ''
|
||||||
@ -372,7 +407,7 @@ async function handleBatchDelete() {
|
|||||||
const extra = summarizeDeleteResult(res.data)
|
const extra = summarizeDeleteResult(res.data)
|
||||||
ElMessage.success((res.message || '批量删除已提交') + extra)
|
ElMessage.success((res.message || '批量删除已提交') + extra)
|
||||||
selectedIds.value = []
|
selectedIds.value = []
|
||||||
tableRef.value?.clearSelection?.()
|
upperTable.value?.clearSelection?.()
|
||||||
await loadList()
|
await loadList()
|
||||||
} catch {
|
} catch {
|
||||||
ElMessage.error('批量删除失败')
|
ElMessage.error('批量删除失败')
|
||||||
@ -393,7 +428,7 @@ async function validateCodeUnique() {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true
|
return true
|
||||||
} catch (error) {
|
} catch {
|
||||||
ElMessage.warning('业务编码校验失败')
|
ElMessage.warning('业务编码校验失败')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -408,18 +443,28 @@ async function submitForm() {
|
|||||||
|
|
||||||
saving.value = true
|
saving.value = true
|
||||||
try {
|
try {
|
||||||
const createPayload = {
|
const createPayload: {
|
||||||
|
code: string
|
||||||
|
name: string
|
||||||
|
express_code: string
|
||||||
|
} = {
|
||||||
code: formData.code.trim(),
|
code: formData.code.trim(),
|
||||||
name: formData.name.trim(),
|
name: formData.name.trim(),
|
||||||
...(formData.express_code ? { platform: String(formData.express_code).trim() } : {})
|
express_code: String(formData.express_code).trim()
|
||||||
}
|
}
|
||||||
/** setting.express.update:仅 id、name、platform(与 module 一致) */
|
/** setting.express.update:id 必填;至少提供 code / name / express_code 之一;关联系统快递用 express_code */
|
||||||
const updatePayload = {
|
const updatePayload: {
|
||||||
|
id: number
|
||||||
|
code: string
|
||||||
|
name: string
|
||||||
|
express_code?: string
|
||||||
|
} = {
|
||||||
id: Number(formData.id),
|
id: Number(formData.id),
|
||||||
name: formData.name.trim(),
|
code: formData.code.trim(),
|
||||||
...(formData.express_code
|
name: formData.name.trim()
|
||||||
? { platform: String(formData.express_code).trim() }
|
}
|
||||||
: {})
|
if (formData.express_code) {
|
||||||
|
updatePayload.express_code = String(formData.express_code).trim()
|
||||||
}
|
}
|
||||||
const res: any = dialogMode.value === 'create'
|
const res: any = dialogMode.value === 'create'
|
||||||
? await expressCreate(createPayload)
|
? await expressCreate(createPayload)
|
||||||
@ -431,72 +476,19 @@ async function submitForm() {
|
|||||||
ElMessage.success(dialogMode.value === 'create' ? '新增成功' : '更新成功')
|
ElMessage.success(dialogMode.value === 'create' ? '新增成功' : '更新成功')
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
loadList()
|
loadList()
|
||||||
} catch (error) {
|
} catch {
|
||||||
ElMessage.error('保存失败')
|
ElMessage.error('保存失败')
|
||||||
} finally {
|
} finally {
|
||||||
saving.value = false
|
saving.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
loadBaseOptions()
|
await loadBaseOptions()
|
||||||
loadList()
|
await loadList()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style lang="scss" scoped>
|
||||||
.courier-page {
|
@use '../styles/encoding-sub.scss';
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 12px;
|
|
||||||
padding: 12px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toolbar {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toolbar-left {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-input {
|
|
||||||
width: 280px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pager {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-wrapper {
|
|
||||||
flex: 1;
|
|
||||||
min-height: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-wrapper :deep(.el-table) {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-wrapper :deep(.el-table__inner-wrapper) {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-wrapper :deep(.el-table__body-wrapper) {
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-tip {
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -1,57 +1,53 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="platform-page">
|
<div class="encoding-sub-container">
|
||||||
<div class="toolbar">
|
<!-- <scan-box
|
||||||
<div class="toolbar-left">
|
ref="scanBox"
|
||||||
<el-input
|
cache-key="encoding:platformCode"
|
||||||
v-model="query.keyword"
|
width="250px"
|
||||||
clearable
|
:tree-props="{ children: 'children', label: 'label' }"
|
||||||
placeholder="搜索编码/名称/平台"
|
:auto-submit="false"
|
||||||
class="search-input"
|
:preset-tree="presetTree"
|
||||||
@keyup.enter="handleSearch"
|
:available-fields="availableFieldsRef"
|
||||||
@clear="handleSearch"
|
@condition-change="handleConditionChange"
|
||||||
/>
|
@reset="handleConditionReset"
|
||||||
<el-button type="primary" size="small" @click="handleSearch">搜索</el-button>
|
@condition-clear="handleConditionClear"
|
||||||
<el-button size="small" :loading="loading" @click="loadList">刷新</el-button>
|
/> -->
|
||||||
</div>
|
|
||||||
<div class="toolbar-right">
|
|
||||||
<el-button type="success" size="small" @click="openCreate">新增平台编码</el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="table-wrapper">
|
<div class="main-content">
|
||||||
<el-table
|
<div class="toolbar">
|
||||||
v-loading="loading"
|
<div class="toolbar-left">
|
||||||
:data="tableData"
|
<el-button size="small" :loading="loading" @click="loadList">刷新</el-button>
|
||||||
border
|
<el-button type="success" size="small" @click="openCreate">新增平台编码</el-button>
|
||||||
stripe
|
</div>
|
||||||
height="100%"
|
</div>
|
||||||
row-key="id"
|
|
||||||
>
|
<div class="upper-wrapper">
|
||||||
<el-table-column prop="id" label="ID" width="80" />
|
<upper-table
|
||||||
<el-table-column prop="platform_name" label="平台名称" min-width="160" />
|
ref="upperTable"
|
||||||
<el-table-column prop="code" label="业务编码" min-width="140" />
|
title="平台编码列表"
|
||||||
<el-table-column prop="label" label="显示标签" min-width="180" />
|
table-id="encoding-platform-code"
|
||||||
<el-table-column prop="name" label="业务名称" min-width="180" />
|
:data="tableData"
|
||||||
<el-table-column label="操作" width="150" fixed="right">
|
:columns="columns"
|
||||||
<template #default="{ row }">
|
:table-size="tableSize"
|
||||||
|
:pagination="pagination"
|
||||||
|
:show-index="true"
|
||||||
|
:show-selection="false"
|
||||||
|
:loading="loading"
|
||||||
|
:query-time="queryTime"
|
||||||
|
@page-change="handlePageChange"
|
||||||
|
@page-size-change="handlePageSizeChange"
|
||||||
|
@refresh="loadList"
|
||||||
|
>
|
||||||
|
<template #column-actions="{ row }">
|
||||||
<el-button link type="primary" @click="openEdit(row)">编辑</el-button>
|
<el-button link type="primary" @click="openEdit(row)">编辑</el-button>
|
||||||
<el-button link type="danger" @click="handleDelete(row)">删除</el-button>
|
<el-button link type="danger" @click="handleDelete(row)">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
|
||||||
</el-table>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="pager">
|
<template #empty>
|
||||||
<el-pagination
|
<div class="empty-tip">暂无平台编码数据</div>
|
||||||
v-model:current-page="query.page"
|
</template>
|
||||||
v-model:page-size="query.page_size"
|
</upper-table>
|
||||||
background
|
</div>
|
||||||
layout="total, sizes, prev, pager, next, jumper"
|
|
||||||
:total="total"
|
|
||||||
:page-sizes="[10, 20, 50, 100]"
|
|
||||||
@current-change="loadList"
|
|
||||||
@size-change="handleSizeChange"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@ -97,6 +93,8 @@
|
|||||||
import { onMounted, reactive, ref } from 'vue'
|
import { onMounted, reactive, ref } from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import type { FormInstance, FormRules } from 'element-plus'
|
import type { FormInstance, FormRules } from 'element-plus'
|
||||||
|
import ScanBox from '@/components/ScanBox/index.vue'
|
||||||
|
import UpperTable from '@/components/UpperTable/index.vue'
|
||||||
import { getPlatformList } from '@/api/index/index'
|
import { getPlatformList } from '@/api/index/index'
|
||||||
import {
|
import {
|
||||||
settingPlatformCreate,
|
settingPlatformCreate,
|
||||||
@ -104,6 +102,11 @@ import {
|
|||||||
settingPlatformList,
|
settingPlatformList,
|
||||||
settingPlatformUpdate
|
settingPlatformUpdate
|
||||||
} from '@/api/setting.platform/platform'
|
} from '@/api/setting.platform/platform'
|
||||||
|
import {
|
||||||
|
buildWhereConditions,
|
||||||
|
platformAvailableFields,
|
||||||
|
platformColumns
|
||||||
|
} from '../encoding-config'
|
||||||
|
|
||||||
type PlatformOption = {
|
type PlatformOption = {
|
||||||
code: string
|
code: string
|
||||||
@ -120,17 +123,19 @@ type PlatformRecord = {
|
|||||||
label?: string
|
label?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const scanBox = ref<any>(null)
|
||||||
|
const presetTree = ref<any[]>([])
|
||||||
|
const availableFieldsRef = reactive(JSON.parse(JSON.stringify(platformAvailableFields)))
|
||||||
|
const columns = platformColumns
|
||||||
|
|
||||||
const loading = ref(false)
|
const loading = ref(false)
|
||||||
const saving = ref(false)
|
const saving = ref(false)
|
||||||
const tableData = ref<PlatformRecord[]>([])
|
const tableData = ref<PlatformRecord[]>([])
|
||||||
const total = ref(0)
|
|
||||||
const platformOptions = ref<PlatformOption[]>([])
|
const platformOptions = ref<PlatformOption[]>([])
|
||||||
|
const queryTime = ref(0)
|
||||||
|
const tableSize = ref('small')
|
||||||
|
|
||||||
const query = reactive({
|
const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 })
|
||||||
keyword: '',
|
|
||||||
page: 1,
|
|
||||||
page_size: 20
|
|
||||||
})
|
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const dialogMode = ref<'create' | 'edit'>('create')
|
const dialogMode = ref<'create' | 'edit'>('create')
|
||||||
@ -150,28 +155,68 @@ const rules: FormRules = {
|
|||||||
|
|
||||||
const isSuccess = (res: any) => res && [0, 1, 200].includes(res.code)
|
const isSuccess = (res: any) => res && [0, 1, 200].includes(res.code)
|
||||||
|
|
||||||
|
function buildListPayload() {
|
||||||
|
const raw = scanBox.value?.getConditions?.() || {}
|
||||||
|
const where = buildWhereConditions(raw)
|
||||||
|
const keyword = String(where.keyword?.value ?? raw.keyword ?? '').trim()
|
||||||
|
delete where.keyword
|
||||||
|
|
||||||
|
const payload: Record<string, any> = {
|
||||||
|
pagination: {
|
||||||
|
page: pagination.currentPage,
|
||||||
|
pageSize: pagination.pageSize
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (keyword) {
|
||||||
|
payload.keyword = keyword
|
||||||
|
}
|
||||||
|
if (Object.keys(where).length) {
|
||||||
|
payload.where = where
|
||||||
|
}
|
||||||
|
return payload
|
||||||
|
}
|
||||||
|
|
||||||
|
function syncPresetTree(list: PlatformRecord[]) {
|
||||||
|
presetTree.value = list.map((item) => ({
|
||||||
|
label: item.name || item.code,
|
||||||
|
id: item.id,
|
||||||
|
code: item.code,
|
||||||
|
children: []
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
|
function fillPlatformScanOptions(raw: any[]) {
|
||||||
|
const field = availableFieldsRef.find((f: any) => f.value === 'platform_code')
|
||||||
|
if (!field) return
|
||||||
|
field.options = (raw || []).map((item: any) => ({
|
||||||
|
label: item.label || item.platform_name || item.name,
|
||||||
|
value: item.platform_code || item.code
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
async function loadList() {
|
async function loadList() {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
|
const start = Date.now()
|
||||||
try {
|
try {
|
||||||
const res: any = await settingPlatformList({
|
const res: any = await settingPlatformList(buildListPayload())
|
||||||
page: query.page,
|
|
||||||
page_size: query.page_size,
|
|
||||||
keyword: query.keyword
|
|
||||||
})
|
|
||||||
if (!isSuccess(res)) {
|
if (!isSuccess(res)) {
|
||||||
ElMessage.error(res?.message || '获取平台编码失败')
|
ElMessage.error(res?.message || '获取平台编码失败')
|
||||||
tableData.value = []
|
tableData.value = []
|
||||||
total.value = 0
|
pagination.total = 0
|
||||||
|
presetTree.value = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
const data = res?.data || {}
|
const data = res?.data || {}
|
||||||
tableData.value = data.list || []
|
tableData.value = data.list || []
|
||||||
total.value = Number(data.total || 0)
|
pagination.total = Number(data.pagination?.total ?? data.total ?? 0)
|
||||||
} catch (error) {
|
syncPresetTree(tableData.value)
|
||||||
|
} catch {
|
||||||
tableData.value = []
|
tableData.value = []
|
||||||
total.value = 0
|
pagination.total = 0
|
||||||
|
presetTree.value = []
|
||||||
ElMessage.error('获取平台编码失败')
|
ElMessage.error('获取平台编码失败')
|
||||||
} finally {
|
} finally {
|
||||||
|
queryTime.value = Date.now() - start
|
||||||
loading.value = false
|
loading.value = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -183,16 +228,45 @@ async function loadPlatformOptions() {
|
|||||||
platformOptions.value = []
|
platformOptions.value = []
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
platformOptions.value = (res?.data || []).map((item: any) => ({
|
const raw = res?.data || []
|
||||||
|
platformOptions.value = raw.map((item: any) => ({
|
||||||
code: item.platform_code || item.code,
|
code: item.platform_code || item.code,
|
||||||
name: item.platform_name || item.name,
|
name: item.platform_name || item.name,
|
||||||
label: item.label || item.platform_name || item.name
|
label: item.label || item.platform_name || item.name
|
||||||
}))
|
}))
|
||||||
} catch (error) {
|
fillPlatformScanOptions(raw)
|
||||||
|
} catch {
|
||||||
platformOptions.value = []
|
platformOptions.value = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function handlePageChange(page: number) {
|
||||||
|
pagination.currentPage = page
|
||||||
|
loadList()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handlePageSizeChange(size: number) {
|
||||||
|
pagination.pageSize = size
|
||||||
|
pagination.currentPage = 1
|
||||||
|
loadList()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleConditionChange() {
|
||||||
|
pagination.currentPage = 1
|
||||||
|
loadList()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleConditionClear() {
|
||||||
|
pagination.currentPage = 1
|
||||||
|
loadList()
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleConditionReset() {
|
||||||
|
pagination.currentPage = 1
|
||||||
|
scanBox.value?.reset?.()
|
||||||
|
loadList()
|
||||||
|
}
|
||||||
|
|
||||||
function handlePlatformChange(code: string) {
|
function handlePlatformChange(code: string) {
|
||||||
const target = platformOptions.value.find((item) => item.code === code)
|
const target = platformOptions.value.find((item) => item.code === code)
|
||||||
if (!target) return
|
if (!target) return
|
||||||
@ -201,16 +275,6 @@ function handlePlatformChange(code: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleSearch() {
|
|
||||||
query.page = 1
|
|
||||||
loadList()
|
|
||||||
}
|
|
||||||
|
|
||||||
function handleSizeChange() {
|
|
||||||
query.page = 1
|
|
||||||
loadList()
|
|
||||||
}
|
|
||||||
|
|
||||||
function resetForm() {
|
function resetForm() {
|
||||||
formData.id = undefined
|
formData.id = undefined
|
||||||
formData.code = ''
|
formData.code = ''
|
||||||
@ -262,7 +326,7 @@ async function submitForm() {
|
|||||||
ElMessage.success(dialogMode.value === 'create' ? '新增成功' : '更新成功')
|
ElMessage.success(dialogMode.value === 'create' ? '新增成功' : '更新成功')
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
loadList()
|
loadList()
|
||||||
} catch (error) {
|
} catch {
|
||||||
ElMessage.error('保存失败')
|
ElMessage.error('保存失败')
|
||||||
} finally {
|
} finally {
|
||||||
saving.value = false
|
saving.value = false
|
||||||
@ -279,69 +343,20 @@ function handleDelete(row: PlatformRecord) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
if (tableData.value.length === 1 && query.page > 1) {
|
if (tableData.value.length === 1 && pagination.currentPage > 1) {
|
||||||
query.page -= 1
|
pagination.currentPage -= 1
|
||||||
}
|
}
|
||||||
loadList()
|
loadList()
|
||||||
})
|
})
|
||||||
.catch(() => undefined)
|
.catch(() => undefined)
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(async () => {
|
||||||
loadPlatformOptions()
|
await loadPlatformOptions()
|
||||||
loadList()
|
await loadList()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style lang="scss" scoped>
|
||||||
.platform-page {
|
@use '../styles/encoding-sub.scss';
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 12px;
|
|
||||||
padding: 12px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toolbar {
|
|
||||||
display: flex;
|
|
||||||
justify-content: space-between;
|
|
||||||
align-items: center;
|
|
||||||
gap: 12px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.toolbar-left {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
gap: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-input {
|
|
||||||
width: 280px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pager {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
flex-shrink: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-wrapper {
|
|
||||||
flex: 1;
|
|
||||||
min-height: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-wrapper :deep(.el-table) {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-wrapper :deep(.el-table__inner-wrapper) {
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.table-wrapper :deep(.el-table__body-wrapper) {
|
|
||||||
overflow: auto;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
52
src/views/system/setting/encoding/encoding-config.ts
Normal file
52
src/views/system/setting/encoding/encoding-config.ts
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
export const courierAvailableFields = [
|
||||||
|
{ label: 'ID', value: 'id', type: 'number' },
|
||||||
|
{ label: '业务编码', value: 'code', type: 'text' },
|
||||||
|
{ label: '业务名称', value: 'name', type: 'text' },
|
||||||
|
{ label: '快递公司', value: 'platform', type: 'select', options: [] as Array<{ label: string; value: string }> }
|
||||||
|
]
|
||||||
|
|
||||||
|
export const courierColumns = [
|
||||||
|
{ prop: 'id', label: 'ID', width: '80', sortable: true },
|
||||||
|
{ prop: 'express_name', label: '快递名称', minWidth: '180', showOverflowTooltip: true },
|
||||||
|
{ prop: 'code', label: '业务编码', minWidth: '180', showOverflowTooltip: true },
|
||||||
|
{ prop: 'name', label: '业务名称', minWidth: '180', showOverflowTooltip: true },
|
||||||
|
{ prop: 'actions', label: '操作', width: '140', align: 'center', fixed: 'right' }
|
||||||
|
]
|
||||||
|
|
||||||
|
export const platformAvailableFields = [
|
||||||
|
{ label: 'ID', value: 'id', type: 'number' },
|
||||||
|
{ label: '业务编码', value: 'code', type: 'text' },
|
||||||
|
{ label: '业务名称', value: 'name', type: 'text' },
|
||||||
|
{ label: '平台', value: 'platform_code', type: 'select', options: [] as Array<{ label: string; value: string }> },
|
||||||
|
{ label: '关键词', value: 'keyword', type: 'text' }
|
||||||
|
]
|
||||||
|
|
||||||
|
export const platformColumns = [
|
||||||
|
{ prop: 'id', label: 'ID', width: '80', sortable: true },
|
||||||
|
{ prop: 'platform_name', label: '平台名称', minWidth: '160', showOverflowTooltip: true },
|
||||||
|
{ prop: 'code', label: '业务编码', minWidth: '140', showOverflowTooltip: true },
|
||||||
|
{ prop: 'label', label: '显示标签', minWidth: '180', showOverflowTooltip: true },
|
||||||
|
{ prop: 'name', label: '业务名称', minWidth: '180', showOverflowTooltip: true },
|
||||||
|
{ prop: 'actions', label: '操作', width: '140', align: 'center', fixed: 'right' }
|
||||||
|
]
|
||||||
|
|
||||||
|
export function buildWhereConditions(rawConditions: Record<string, any>) {
|
||||||
|
const where: Record<string, any> = {}
|
||||||
|
Object.keys(rawConditions || {}).forEach((key) => {
|
||||||
|
const condition = rawConditions[key]
|
||||||
|
if (condition && typeof condition === 'object' && 'operator' in condition) {
|
||||||
|
where[key] = Array.isArray(condition.value)
|
||||||
|
? { ...condition, value: condition.value[0] ?? '', type: condition.type || 'text' }
|
||||||
|
: condition
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (condition !== undefined && condition !== null && condition !== '') {
|
||||||
|
where[key] = {
|
||||||
|
operator: key === 'name' || key === 'code' ? 'like' : 'eq',
|
||||||
|
value: Array.isArray(condition) ? condition[0] ?? '' : condition,
|
||||||
|
type: key === 'id' ? 'number' : 'text'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return where
|
||||||
|
}
|
||||||
@ -1,18 +1,21 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="encoding-wrapper">
|
<div class="encoding-wrapper" :style="{ height: containerHeight }">
|
||||||
<el-tabs
|
<el-tabs
|
||||||
v-model="activeTab"
|
v-model="activeTab"
|
||||||
tab-position="top"
|
tab-position="top"
|
||||||
type="border-card"
|
type="border-card"
|
||||||
class="tab-container"
|
class="tab-container"
|
||||||
|
@tab-change="handleTabChange"
|
||||||
>
|
>
|
||||||
<el-tab-pane
|
<el-tab-pane
|
||||||
v-for="tab in tabs"
|
v-for="tab in tabs"
|
||||||
:key="tab.name"
|
:key="tab.name"
|
||||||
:name="tab.name"
|
:name="tab.name"
|
||||||
:label="tab.label"
|
|
||||||
:lazy="false"
|
:lazy="false"
|
||||||
>
|
>
|
||||||
|
<template #label>
|
||||||
|
<span class="custom-tab-label">{{ tab.label }}</span>
|
||||||
|
</template>
|
||||||
<keep-alive>
|
<keep-alive>
|
||||||
<component :is="tab.component" v-if="activeTab === tab.name" />
|
<component :is="tab.component" v-if="activeTab === tab.name" />
|
||||||
</keep-alive>
|
</keep-alive>
|
||||||
@ -22,51 +25,160 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
import { ref, watch, computed, markRaw } from 'vue'
|
||||||
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
|
import { useSettingsStore } from '@/stores/modules/settings'
|
||||||
|
import { safeInvoke } from '@/utils/safe-invoke'
|
||||||
import CourierCodeManagement from './components/CourierCodeManagement.vue'
|
import CourierCodeManagement from './components/CourierCodeManagement.vue'
|
||||||
import PlatformCodeManagement from './components/PlatformCodeManagement.vue'
|
import PlatformCodeManagement from './components/PlatformCodeManagement.vue'
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
const router = useRouter()
|
||||||
|
const settingsStore = useSettingsStore()
|
||||||
|
|
||||||
|
const shortcutExpanded = computed(() => settingsStore.shortcutExpanded)
|
||||||
|
const containerHeight = computed(() =>
|
||||||
|
shortcutExpanded.value ? 'calc(100vh - 150px)' : 'calc(100vh - 100px)'
|
||||||
|
)
|
||||||
|
|
||||||
const activeTab = ref('courierCode')
|
const activeTab = ref('courierCode')
|
||||||
|
|
||||||
const tabs = [
|
type EncodingTabItem = {
|
||||||
|
name: string
|
||||||
|
label: string
|
||||||
|
component: any
|
||||||
|
}
|
||||||
|
|
||||||
|
const tabs = ref<EncodingTabItem[]>([
|
||||||
{
|
{
|
||||||
name: 'courierCode',
|
name: 'courierCode',
|
||||||
label: '快递编码管理',
|
label: '快递编码管理',
|
||||||
component: CourierCodeManagement
|
component: markRaw(CourierCodeManagement)
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'platformCode',
|
name: 'platformCode',
|
||||||
label: '平台编码管理',
|
label: '平台编码管理',
|
||||||
component: PlatformCodeManagement
|
component: markRaw(PlatformCodeManagement)
|
||||||
}
|
}
|
||||||
]
|
])
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => route.query.tab,
|
||||||
|
(newTab) => {
|
||||||
|
const validTabs = tabs.value.map((tab) => tab.name)
|
||||||
|
const raw = newTab === undefined || newTab === null ? '' : String(newTab).trim()
|
||||||
|
|
||||||
|
if (raw && validTabs.includes(raw)) {
|
||||||
|
activeTab.value = raw
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
activeTab.value = 'courierCode'
|
||||||
|
if (raw && !validTabs.includes(raw)) {
|
||||||
|
router.replace({
|
||||||
|
query: {
|
||||||
|
...route.query,
|
||||||
|
tab: 'courierCode'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
)
|
||||||
|
|
||||||
|
const handleTabChange = (tabName: string | number) => {
|
||||||
|
safeInvoke(() => {
|
||||||
|
const name = String(tabName)
|
||||||
|
if (String(route.query.tab ?? '') === name) return
|
||||||
|
router.replace({
|
||||||
|
query: {
|
||||||
|
...route.query,
|
||||||
|
tab: name
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.encoding-wrapper {
|
.encoding-wrapper {
|
||||||
|
position: relative;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc(100vh - 130px);
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tab-container {
|
.tab-container {
|
||||||
height: 100%;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
:deep(.el-tabs__header) {
|
:deep(.el-tabs__header) {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-tabs__header.is-top) {
|
||||||
|
padding: 4px 12px 0;
|
||||||
|
background: #f8fbff;
|
||||||
|
border-bottom: 1px solid #e8eef7;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-tabs__nav-wrap::after) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-tabs__item.is-top) {
|
||||||
|
height: 38px;
|
||||||
|
line-height: 38px;
|
||||||
|
padding: 0 20px;
|
||||||
|
border-radius: 6px 6px 0 0;
|
||||||
|
color: #606266;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 500;
|
||||||
|
transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-bottom: none;
|
||||||
|
margin-right: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-tabs__item.is-top:hover) {
|
||||||
|
color: #409eff;
|
||||||
|
background-color: rgba(64, 158, 255, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-tabs__item.is-top.is-active) {
|
||||||
|
color: #409eff;
|
||||||
|
font-weight: 600;
|
||||||
|
background: #ffffff;
|
||||||
|
border-color: #e8eef7;
|
||||||
|
border-bottom: 2px solid #ffffff;
|
||||||
|
margin-bottom: -1px;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-tabs__active-bar) {
|
||||||
|
height: 2px;
|
||||||
|
border-radius: 2px;
|
||||||
|
background-color: #409eff;
|
||||||
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.el-tabs__content) {
|
:deep(.el-tabs__content) {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
overflow: hidden;
|
overflow: auto;
|
||||||
background: #fff;
|
position: relative;
|
||||||
}
|
|
||||||
|
|
||||||
:deep(.el-tab-pane) {
|
.el-tab-pane {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.custom-tab-label {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
61
src/views/system/setting/encoding/styles/encoding-sub.scss
Normal file
61
src/views/system/setting/encoding/styles/encoding-sub.scss
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
.encoding-sub-container {
|
||||||
|
display: flex;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
background-color: #f0f2f5;
|
||||||
|
|
||||||
|
.main-content {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
.toolbar {
|
||||||
|
margin-bottom: 3px;
|
||||||
|
padding: 6px 10px;
|
||||||
|
border: 1px solid #ebeef5;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
.toolbar-left {
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper {
|
||||||
|
flex: 1;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper :deep(.upper-table-container) {
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper :deep(.table-container) {
|
||||||
|
height: auto !important;
|
||||||
|
flex: 1 1 auto;
|
||||||
|
min-height: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upper-wrapper :deep(.el-table__body-wrapper) {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-tip {
|
||||||
|
text-align: center;
|
||||||
|
color: #909399;
|
||||||
|
padding: 24px 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -258,13 +258,11 @@ function buildExpressPayload(): Array<Record<string, unknown>> {
|
|||||||
const def = String(formData.default_printer_name ?? '').trim()
|
const def = String(formData.default_printer_name ?? '').trim()
|
||||||
const out: Array<Record<string, unknown>> = []
|
const out: Array<Record<string, unknown>> = []
|
||||||
for (const row of expressBindRows.value) {
|
for (const row of expressBindRows.value) {
|
||||||
const eid = String(row.expressId ?? '').trim()
|
const express_code = String(row.expressId ?? '').trim()
|
||||||
if (!eid) continue
|
if (!express_code) continue
|
||||||
const num = Number(eid)
|
|
||||||
const express_id = Number.isFinite(num) ? num : eid
|
|
||||||
const pn = String(row.printerName ?? '').trim()
|
const pn = String(row.printerName ?? '').trim()
|
||||||
const name = pn || def || ''
|
const printer_name = pn || def || ''
|
||||||
out.push({ express_id, name })
|
out.push({ express_code, printer_name })
|
||||||
}
|
}
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|||||||
@ -633,18 +633,16 @@ const hasName = async (name: string, id?: string | number) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** print.savePrinters.express:每项 express_id + name(该快递使用的打印机名);未选打印机时用默认打印机 */
|
/** print.savePrinters.express:每项 express_code + printer_name(模块首选字段;服务端兼容 express_id / name) */
|
||||||
const buildExpressPayload = (): Array<Record<string, unknown>> => {
|
const buildExpressPayload = (): Array<Record<string, unknown>> => {
|
||||||
const def = String(form.value.printer_id ?? '').trim()
|
const def = String(form.value.printer_id ?? '').trim()
|
||||||
const out: Array<Record<string, unknown>> = []
|
const out: Array<Record<string, unknown>> = []
|
||||||
for (const row of expressBindRows.value) {
|
for (const row of expressBindRows.value) {
|
||||||
const eid = String(row.expressId ?? '').trim()
|
const express_code = String(row.expressId ?? '').trim()
|
||||||
if (!eid) continue
|
if (!express_code) continue
|
||||||
const num = Number(eid)
|
|
||||||
const express_id = Number.isFinite(num) ? num : eid
|
|
||||||
const pn = String(row.printerName ?? '').trim()
|
const pn = String(row.printerName ?? '').trim()
|
||||||
const name = pn || def || ''
|
const printer_name = pn || def || ''
|
||||||
out.push({ express_id, name })
|
out.push({ express_code, printer_name })
|
||||||
}
|
}
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|||||||
@ -8,207 +8,176 @@
|
|||||||
"message": "登录成功",
|
"message": "登录成功",
|
||||||
"success": true,
|
"success": true,
|
||||||
"data": {
|
"data": {
|
||||||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3Nzg3NDc4NjcsImV4cCI6MTc3ODc2MjI2N30.udbfG-5zKoyBgQScbISTezBJ_wKYE0CFy4zL3LL7nWY"
|
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3Nzg4MzgxMTYsImV4cCI6MTc3ODg1MjUxNn0.7FNkDwmlG7FdjrJWIDWp5JzfoURzaHN3hjDvBoJUwrM"
|
||||||
},
|
},
|
||||||
"timestamp": 1778747867
|
"timestamp": 1778838116
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"接口": "print.send",
|
"接口": "storage.report.search",
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 500,
|
|
||||||
"message": "接口错误: notNull Violation: PrintRecord.computer_id cannot be null,\nnotNull Violation: PrintRecord.printer cannot be null,\nnotNull Violation: PrintRecord.type cannot be null",
|
|
||||||
"data": null,
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getPrintResult",
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getPrintRecordItem",
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getList",
|
|
||||||
"data": {
|
"data": {
|
||||||
"flag": "success",
|
"flag": "success",
|
||||||
"code": 200,
|
"code": 200,
|
||||||
"message": "success",
|
"message": "查询成功",
|
||||||
"data": {
|
"data": {
|
||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"id": 9,
|
"start_time": null,
|
||||||
"warehouse_id": 100000,
|
"end_time": null,
|
||||||
"default_printer_name": "BTP-L730(BPLZ)(U)2",
|
"stock_id": 101384,
|
||||||
"name": "测试打印台1",
|
"store_id": 100000,
|
||||||
"computer_id": 28,
|
"begin_total": 0,
|
||||||
"custom_barcode": "04191",
|
"end_total": 2177,
|
||||||
"creator_id": 31,
|
"inbound_total": 0,
|
||||||
"creator_name": "殷建铭",
|
"outbound_total": 323,
|
||||||
"create_at": "2026-04-19T06:32:06.000Z",
|
"store_name": "测试仓",
|
||||||
"update_at": "2026-05-14T08:30:50.000Z",
|
"item_name": "测试",
|
||||||
"deleted": 0,
|
"barcode": "011000000228",
|
||||||
"subject_config": {
|
"item_code": "01100000"
|
||||||
"express_bind_printer": [
|
},
|
||||||
{
|
{
|
||||||
"express_code": "ANKY",
|
"start_time": null,
|
||||||
"printer_name": "BTP-L730(BPLZ)(U)2"
|
"end_time": null,
|
||||||
}
|
"stock_id": 101380,
|
||||||
]
|
"store_id": 1000000,
|
||||||
},
|
"begin_total": 0,
|
||||||
"is_online": 1,
|
"end_total": 180000,
|
||||||
"components": [
|
"inbound_total": 180000,
|
||||||
{
|
"outbound_total": 0,
|
||||||
"name": "抖音",
|
"store_name": "测试货主1111",
|
||||||
"is_online": 0
|
"item_name": "测试",
|
||||||
},
|
"barcode": "011000001536",
|
||||||
{
|
"item_code": "011000001536"
|
||||||
"name": "拼多多",
|
},
|
||||||
"is_online": 1
|
{
|
||||||
},
|
"start_time": null,
|
||||||
{
|
"end_time": null,
|
||||||
"name": "快手",
|
"stock_id": 101382,
|
||||||
"is_online": 0
|
"store_id": 1000000,
|
||||||
},
|
"begin_total": 0,
|
||||||
{
|
"end_total": 200,
|
||||||
"name": "京东",
|
"inbound_total": 200,
|
||||||
"is_online": 1
|
"outbound_total": 0,
|
||||||
},
|
"store_name": "测试货主1111",
|
||||||
{
|
"item_name": "ousi欧似白丝带香水「10ml」",
|
||||||
"name": "菜鸟",
|
"barcode": "6978744201455",
|
||||||
"is_online": 1
|
"item_code": "6978744201455"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "视频号",
|
"start_time": null,
|
||||||
"is_online": 0
|
"end_time": null,
|
||||||
},
|
"stock_id": 101384,
|
||||||
{
|
"store_id": 1000000,
|
||||||
"name": "小红书",
|
"begin_total": 0,
|
||||||
"is_online": 0
|
"end_total": 182187,
|
||||||
},
|
"inbound_total": 181010,
|
||||||
{
|
"outbound_total": 0,
|
||||||
"name": "LODOP",
|
"store_name": "测试货主1111",
|
||||||
"is_online": 1
|
"item_name": "测试",
|
||||||
}
|
"barcode": "011000000228",
|
||||||
]
|
"item_code": "01100000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start_time": null,
|
||||||
|
"end_time": null,
|
||||||
|
"stock_id": 101390,
|
||||||
|
"store_id": 1000000,
|
||||||
|
"begin_total": 0,
|
||||||
|
"end_total": 200,
|
||||||
|
"inbound_total": 200,
|
||||||
|
"outbound_total": 0,
|
||||||
|
"store_name": "测试货主1111",
|
||||||
|
"item_name": "售后卡",
|
||||||
|
"barcode": "6900000000222",
|
||||||
|
"item_code": "6900000000222"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start_time": null,
|
||||||
|
"end_time": null,
|
||||||
|
"stock_id": 101391,
|
||||||
|
"store_id": 1000000,
|
||||||
|
"begin_total": 0,
|
||||||
|
"end_total": 1700,
|
||||||
|
"inbound_total": 200,
|
||||||
|
"outbound_total": 0,
|
||||||
|
"store_name": "测试货主1111",
|
||||||
|
"item_name": "空包",
|
||||||
|
"barcode": "023802,AUTO100000-BC-686652",
|
||||||
|
"item_code": "023802"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start_time": null,
|
||||||
|
"end_time": null,
|
||||||
|
"stock_id": 156968,
|
||||||
|
"store_id": 1000000,
|
||||||
|
"begin_total": 0,
|
||||||
|
"end_total": 1018,
|
||||||
|
"inbound_total": 243,
|
||||||
|
"outbound_total": 0,
|
||||||
|
"store_name": "测试货主1111",
|
||||||
|
"item_name": "新商品16",
|
||||||
|
"barcode": "6902226191552",
|
||||||
|
"item_code": "6902226191552"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start_time": null,
|
||||||
|
"end_time": null,
|
||||||
|
"stock_id": 157008,
|
||||||
|
"store_id": 1000000,
|
||||||
|
"begin_total": 0,
|
||||||
|
"end_total": 376,
|
||||||
|
"inbound_total": 376,
|
||||||
|
"outbound_total": 0,
|
||||||
|
"store_name": "测试货主1111",
|
||||||
|
"item_name": "测试加货主商品2",
|
||||||
|
"barcode": "6902226191553",
|
||||||
|
"item_code": "6902226191553"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start_time": null,
|
||||||
|
"end_time": null,
|
||||||
|
"stock_id": 157059,
|
||||||
|
"store_id": 1000000,
|
||||||
|
"begin_total": 0,
|
||||||
|
"end_total": 58,
|
||||||
|
"inbound_total": 58,
|
||||||
|
"outbound_total": 0,
|
||||||
|
"store_name": "测试货主1111",
|
||||||
|
"item_name": "yjm0411",
|
||||||
|
"barcode": "yjm20260411t,yjm20260411,AUTO100000-BC-694726,AUTO100000-BC-734606,AUTO100000-BC-786320,AUTO100000-BC-525558,AUTO100000-BC-649476",
|
||||||
|
"item_code": "yjm20260411"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start_time": null,
|
||||||
|
"end_time": null,
|
||||||
|
"stock_id": 157068,
|
||||||
|
"store_id": 1000000,
|
||||||
|
"begin_total": 0,
|
||||||
|
"end_total": 13,
|
||||||
|
"inbound_total": 13,
|
||||||
|
"outbound_total": 0,
|
||||||
|
"store_name": "测试货主1111",
|
||||||
|
"item_name": "yjm0404",
|
||||||
|
"barcode": "yjm20260414",
|
||||||
|
"item_code": "yjm20260414"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start_time": null,
|
||||||
|
"end_time": null,
|
||||||
|
"stock_id": 157071,
|
||||||
|
"store_id": 1000000,
|
||||||
|
"begin_total": 0,
|
||||||
|
"end_total": 29,
|
||||||
|
"inbound_total": 29,
|
||||||
|
"outbound_total": 0,
|
||||||
|
"store_name": "测试货主1111",
|
||||||
|
"item_name": "测试收货商品信息",
|
||||||
|
"barcode": "34464777",
|
||||||
|
"item_code": "34464777"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"pagination": {
|
|
||||||
"hasNext": false,
|
|
||||||
"hasPrevious": false,
|
|
||||||
"page": 1,
|
|
||||||
"pageSize": 20,
|
|
||||||
"total": 1,
|
|
||||||
"totalPages": 1
|
|
||||||
},
|
|
||||||
"queryInfo": {
|
|
||||||
"conditions": {},
|
|
||||||
"hasBarcodeSearch": false,
|
|
||||||
"sortField": "id",
|
|
||||||
"sortOrder": "DESC"
|
|
||||||
},
|
|
||||||
"summary": {
|
|
||||||
"total_available": 1,
|
|
||||||
"total_items": 20,
|
|
||||||
"total_locked": 0,
|
|
||||||
"total_quantity": 0
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"timestamp": 1778747869
|
"timestamp": 1778838116
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getItem",
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.add",
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.hasName",
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.updateItem",
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.del",
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getComputer",
|
|
||||||
"data": {
|
|
||||||
"flag": "success",
|
|
||||||
"code": 0,
|
|
||||||
"message": "success",
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"id": 28,
|
|
||||||
"warehouse_id": 100000,
|
|
||||||
"name": "测试打印台",
|
|
||||||
"status": 1,
|
|
||||||
"last_login_time": "2026-05-13T02:20:50.000Z"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getComputerPrinter",
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.savePrinters",
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 1001,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
# 接口
|
# 接口
|
||||||
|
|
||||||
- 更新时间: 2026-05-12 09:38:35
|
- 更新时间: 2026-05-15 17:34:17
|
||||||
- 扫描目录: `src\api`
|
- 扫描目录: `src\api`
|
||||||
- 模块数: 35
|
- 模块数: 36
|
||||||
- API 文件数: 35
|
- API 文件数: 36
|
||||||
- 接口数: 284
|
- 接口数: 285
|
||||||
- 已启用: 253
|
- 已启用: 254
|
||||||
- 占位接口: 2
|
- 占位接口: 2
|
||||||
|
|
||||||
## 模块统计
|
## 模块统计
|
||||||
@ -42,6 +42,7 @@
|
|||||||
| storage_receiving | 1 | 22 | 12 | 0 |
|
| storage_receiving | 1 | 22 | 12 | 0 |
|
||||||
| storage.entry | 1 | 4 | 4 | 0 |
|
| storage.entry | 1 | 4 | 4 | 0 |
|
||||||
| storage.inventory | 1 | 8 | 7 | 0 |
|
| storage.inventory | 1 | 8 | 7 | 0 |
|
||||||
|
| storage.report | 1 | 1 | 1 | 0 |
|
||||||
| storage.stockout | 1 | 3 | 3 | 0 |
|
| storage.stockout | 1 | 3 | 3 | 0 |
|
||||||
| store | 1 | 6 | 6 | 0 |
|
| store | 1 | 6 | 6 | 0 |
|
||||||
| storewarehouse.store | 1 | 11 | 11 | 0 |
|
| storewarehouse.store | 1 | 11 | 11 | 0 |
|
||||||
@ -284,6 +285,7 @@
|
|||||||
| storage.inventory | transferByProduct | storage.inventory.transferByProduct | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
| storage.inventory | transferByProduct | storage.inventory.transferByProduct | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
||||||
| storage.inventory | transferLocation | storage.inventory.transferLocation | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
| storage.inventory | transferLocation | storage.inventory.transferLocation | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
||||||
| storage.inventory | getTransactionList | storage.transaction.list | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
| storage.inventory | getTransactionList | storage.transaction.list | POST | 是 | 否 | storage.inventory/inventory.ts | |
|
||||||
|
| storage.report | searchInventoryReport | storage.report.search | POST | 是 | 否 | storage.report/report.ts | |
|
||||||
| storage.stockout | stockoutList | storage.stockout.list | POST | 是 | 否 | storage.stockout/stockout.ts | |
|
| storage.stockout | stockoutList | storage.stockout.list | POST | 是 | 否 | storage.stockout/stockout.ts | |
|
||||||
| storage.stockout | stockoutListItems | storage.stockout.listItems | POST | 是 | 否 | storage.stockout/stockout.ts | |
|
| storage.stockout | stockoutListItems | storage.stockout.listItems | POST | 是 | 否 | storage.stockout/stockout.ts | |
|
||||||
| storage.stockout | stockoutToOrder | storage.stockout.toOrder | POST | 是 | 否 | storage.stockout/stockout.ts | |
|
| storage.stockout | stockoutToOrder | storage.stockout.toOrder | POST | 是 | 否 | storage.stockout/stockout.ts | |
|
||||||
|
|||||||
@ -8,51 +8,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "print.send",
|
"method": "storage.report.search",
|
||||||
"body": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "print.getPrintResult",
|
|
||||||
"body": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "print.getPrintRecordItem",
|
|
||||||
"body": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "print.getList",
|
|
||||||
"body": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "print.getItem",
|
|
||||||
"body": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "print.add",
|
|
||||||
"body": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "print.hasName",
|
|
||||||
"body": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "print.updateItem",
|
|
||||||
"body": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "print.del",
|
|
||||||
"body": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "print.getComputer",
|
|
||||||
"body": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "print.getComputerPrinter",
|
|
||||||
"body": {}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"method": "print.savePrinters",
|
|
||||||
"body": {}
|
"body": {}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@ -1,9 +1,9 @@
|
|||||||
{
|
{
|
||||||
"数据一览": {
|
"数据一览": {
|
||||||
"当前请求数": 13,
|
"当前请求数": 2,
|
||||||
"成功数": 3,
|
"成功数": 2,
|
||||||
"全部请求数": 13,
|
"全部请求数": 2,
|
||||||
"成功数与全部请求数": "3/13",
|
"成功数与全部请求数": "2/2",
|
||||||
"成功判定名单": [
|
"成功判定名单": [
|
||||||
"ok",
|
"ok",
|
||||||
"成功",
|
"成功",
|
||||||
@ -12,159 +12,7 @@
|
|||||||
"查询成功",
|
"查询成功",
|
||||||
"获取成功"
|
"获取成功"
|
||||||
],
|
],
|
||||||
"失败接口": [
|
"失败接口": [],
|
||||||
{
|
|
||||||
"接口": "print.send",
|
|
||||||
"message": "接口错误: notNull Violation: PrintRecord.computer_id cannot be null,\nnotNull Violation: PrintRecord.printer cannot be null,\nnotNull Violation: PrintRecord.type cannot be null",
|
|
||||||
"code": 500,
|
|
||||||
"模块目录": "print",
|
|
||||||
"api封装": [
|
|
||||||
{
|
|
||||||
"文件": "src/api/print/print.ts",
|
|
||||||
"方法名": "sendPrint"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"引用页面": [
|
|
||||||
"src/components/BatchReceivingPrintDialog.vue",
|
|
||||||
"src/views/order/waveOrder/component/WavePlatformPrintPreviewDialog.vue"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getPrintResult",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"模块目录": "print",
|
|
||||||
"api封装": [
|
|
||||||
{
|
|
||||||
"文件": "src/api/print/print.ts",
|
|
||||||
"方法名": "getPrintResult"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"引用页面": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getPrintRecordItem",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"模块目录": "print",
|
|
||||||
"api封装": [
|
|
||||||
{
|
|
||||||
"文件": "src/api/print/print.ts",
|
|
||||||
"方法名": "getPrintRecordItem"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"引用页面": []
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getItem",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"模块目录": "print",
|
|
||||||
"api封装": [
|
|
||||||
{
|
|
||||||
"文件": "src/api/print/print.ts",
|
|
||||||
"方法名": "getItem"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"引用页面": [
|
|
||||||
"src/views/system/setting/printStation/components/info.vue"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.add",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"模块目录": "print",
|
|
||||||
"api封装": [
|
|
||||||
{
|
|
||||||
"文件": "src/api/print/print.ts",
|
|
||||||
"方法名": "add"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"引用页面": [
|
|
||||||
"src/views/system/setting/printStation/components/add.vue"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.hasName",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"模块目录": "print",
|
|
||||||
"api封装": [
|
|
||||||
{
|
|
||||||
"文件": "src/api/print/print.ts",
|
|
||||||
"方法名": "hasName"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"引用页面": [
|
|
||||||
"src/views/system/setting/printStation/components/info.vue"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.updateItem",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"模块目录": "print",
|
|
||||||
"api封装": [
|
|
||||||
{
|
|
||||||
"文件": "src/api/print/print.ts",
|
|
||||||
"方法名": "updateItem"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"引用页面": [
|
|
||||||
"src/views/system/setting/printStation/components/info.vue"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.del",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"模块目录": "print",
|
|
||||||
"api封装": [
|
|
||||||
{
|
|
||||||
"文件": "src/api/print/print.ts",
|
|
||||||
"方法名": "delItems"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"引用页面": [
|
|
||||||
"src/views/system/setting/printStation/index.vue"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getComputerPrinter",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"模块目录": "print",
|
|
||||||
"api封装": [
|
|
||||||
{
|
|
||||||
"文件": "src/api/print/print.ts",
|
|
||||||
"方法名": "getComputerPrinter"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"引用页面": [
|
|
||||||
"src/components/BatchReceivingPrintDialog.vue",
|
|
||||||
"src/views/order/waveOrder/component/WavePlatformPrintPreviewDialog.vue",
|
|
||||||
"src/views/system/setting/printStation/components/add.vue",
|
|
||||||
"src/views/system/setting/printStation/components/info.vue"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.savePrinters",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 1001,
|
|
||||||
"模块目录": "print",
|
|
||||||
"api封装": [
|
|
||||||
{
|
|
||||||
"文件": "src/api/print/print.ts",
|
|
||||||
"方法名": "savePrinters"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"引用页面": [
|
|
||||||
"src/views/system/setting/printStation/components/add.vue",
|
|
||||||
"src/views/system/setting/printStation/components/info.vue"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"空数据接口": []
|
"空数据接口": []
|
||||||
},
|
},
|
||||||
"详情": [
|
"详情": [
|
||||||
@ -178,231 +26,178 @@
|
|||||||
"message": "登录成功",
|
"message": "登录成功",
|
||||||
"success": true,
|
"success": true,
|
||||||
"data": {
|
"data": {
|
||||||
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3Nzg3NDc4NjcsImV4cCI6MTc3ODc2MjI2N30.udbfG-5zKoyBgQScbISTezBJ_wKYE0CFy4zL3LL7nWY"
|
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MywidXNlcm5hbWUiOiJ5am0iLCJyZWFsX25hbWUiOiJ5aW4iLCJwbGF0Zm9ybV9jb2RlIjoid2ViIiwiY3VycmVudF9yb2xlX2lkIjozMSwiY3VycmVudF9zdG9yZV9pZCI6MTAwMDAwLCJpYXQiOjE3Nzg4MzgxMTYsImV4cCI6MTc3ODg1MjUxNn0.7FNkDwmlG7FdjrJWIDWp5JzfoURzaHN3hjDvBoJUwrM"
|
||||||
},
|
},
|
||||||
"timestamp": 1778747867
|
"timestamp": 1778838116
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"接口": "print.send",
|
"接口": "storage.report.search",
|
||||||
"message": "接口错误: notNull Violation: PrintRecord.computer_id cannot be null,\nnotNull Violation: PrintRecord.printer cannot be null,\nnotNull Violation: PrintRecord.type cannot be null",
|
"message": "查询成功",
|
||||||
"code": 500,
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 500,
|
|
||||||
"message": "接口错误: notNull Violation: PrintRecord.computer_id cannot be null,\nnotNull Violation: PrintRecord.printer cannot be null,\nnotNull Violation: PrintRecord.type cannot be null",
|
|
||||||
"data": null,
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getPrintResult",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getPrintRecordItem",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getList",
|
|
||||||
"message": "success",
|
|
||||||
"code": 200,
|
"code": 200,
|
||||||
"data": {
|
"data": {
|
||||||
"flag": "success",
|
"flag": "success",
|
||||||
"code": 200,
|
"code": 200,
|
||||||
"message": "success",
|
"message": "查询成功",
|
||||||
"data": {
|
"data": {
|
||||||
"list": [
|
"list": [
|
||||||
{
|
{
|
||||||
"id": 9,
|
"start_time": null,
|
||||||
"warehouse_id": 100000,
|
"end_time": null,
|
||||||
"default_printer_name": "BTP-L730(BPLZ)(U)2",
|
"stock_id": 101384,
|
||||||
"name": "测试打印台1",
|
"store_id": 100000,
|
||||||
"computer_id": 28,
|
"begin_total": 0,
|
||||||
"custom_barcode": "04191",
|
"end_total": 2177,
|
||||||
"creator_id": 31,
|
"inbound_total": 0,
|
||||||
"creator_name": "殷建铭",
|
"outbound_total": 323,
|
||||||
"create_at": "2026-04-19T06:32:06.000Z",
|
"store_name": "测试仓",
|
||||||
"update_at": "2026-05-14T08:30:50.000Z",
|
"item_name": "测试",
|
||||||
"deleted": 0,
|
"barcode": "011000000228",
|
||||||
"subject_config": {
|
"item_code": "01100000"
|
||||||
"express_bind_printer": [
|
},
|
||||||
{
|
{
|
||||||
"express_code": "ANKY",
|
"start_time": null,
|
||||||
"printer_name": "BTP-L730(BPLZ)(U)2"
|
"end_time": null,
|
||||||
}
|
"stock_id": 101380,
|
||||||
]
|
"store_id": 1000000,
|
||||||
},
|
"begin_total": 0,
|
||||||
"is_online": 1,
|
"end_total": 180000,
|
||||||
"components": [
|
"inbound_total": 180000,
|
||||||
{
|
"outbound_total": 0,
|
||||||
"name": "抖音",
|
"store_name": "测试货主1111",
|
||||||
"is_online": 0
|
"item_name": "测试",
|
||||||
},
|
"barcode": "011000001536",
|
||||||
{
|
"item_code": "011000001536"
|
||||||
"name": "拼多多",
|
},
|
||||||
"is_online": 1
|
{
|
||||||
},
|
"start_time": null,
|
||||||
{
|
"end_time": null,
|
||||||
"name": "快手",
|
"stock_id": 101382,
|
||||||
"is_online": 0
|
"store_id": 1000000,
|
||||||
},
|
"begin_total": 0,
|
||||||
{
|
"end_total": 200,
|
||||||
"name": "京东",
|
"inbound_total": 200,
|
||||||
"is_online": 1
|
"outbound_total": 0,
|
||||||
},
|
"store_name": "测试货主1111",
|
||||||
{
|
"item_name": "ousi欧似白丝带香水「10ml」",
|
||||||
"name": "菜鸟",
|
"barcode": "6978744201455",
|
||||||
"is_online": 1
|
"item_code": "6978744201455"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "视频号",
|
"start_time": null,
|
||||||
"is_online": 0
|
"end_time": null,
|
||||||
},
|
"stock_id": 101384,
|
||||||
{
|
"store_id": 1000000,
|
||||||
"name": "小红书",
|
"begin_total": 0,
|
||||||
"is_online": 0
|
"end_total": 182187,
|
||||||
},
|
"inbound_total": 181010,
|
||||||
{
|
"outbound_total": 0,
|
||||||
"name": "LODOP",
|
"store_name": "测试货主1111",
|
||||||
"is_online": 1
|
"item_name": "测试",
|
||||||
}
|
"barcode": "011000000228",
|
||||||
]
|
"item_code": "01100000"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start_time": null,
|
||||||
|
"end_time": null,
|
||||||
|
"stock_id": 101390,
|
||||||
|
"store_id": 1000000,
|
||||||
|
"begin_total": 0,
|
||||||
|
"end_total": 200,
|
||||||
|
"inbound_total": 200,
|
||||||
|
"outbound_total": 0,
|
||||||
|
"store_name": "测试货主1111",
|
||||||
|
"item_name": "售后卡",
|
||||||
|
"barcode": "6900000000222",
|
||||||
|
"item_code": "6900000000222"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start_time": null,
|
||||||
|
"end_time": null,
|
||||||
|
"stock_id": 101391,
|
||||||
|
"store_id": 1000000,
|
||||||
|
"begin_total": 0,
|
||||||
|
"end_total": 1700,
|
||||||
|
"inbound_total": 200,
|
||||||
|
"outbound_total": 0,
|
||||||
|
"store_name": "测试货主1111",
|
||||||
|
"item_name": "空包",
|
||||||
|
"barcode": "023802,AUTO100000-BC-686652",
|
||||||
|
"item_code": "023802"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start_time": null,
|
||||||
|
"end_time": null,
|
||||||
|
"stock_id": 156968,
|
||||||
|
"store_id": 1000000,
|
||||||
|
"begin_total": 0,
|
||||||
|
"end_total": 1018,
|
||||||
|
"inbound_total": 243,
|
||||||
|
"outbound_total": 0,
|
||||||
|
"store_name": "测试货主1111",
|
||||||
|
"item_name": "新商品16",
|
||||||
|
"barcode": "6902226191552",
|
||||||
|
"item_code": "6902226191552"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start_time": null,
|
||||||
|
"end_time": null,
|
||||||
|
"stock_id": 157008,
|
||||||
|
"store_id": 1000000,
|
||||||
|
"begin_total": 0,
|
||||||
|
"end_total": 376,
|
||||||
|
"inbound_total": 376,
|
||||||
|
"outbound_total": 0,
|
||||||
|
"store_name": "测试货主1111",
|
||||||
|
"item_name": "测试加货主商品2",
|
||||||
|
"barcode": "6902226191553",
|
||||||
|
"item_code": "6902226191553"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start_time": null,
|
||||||
|
"end_time": null,
|
||||||
|
"stock_id": 157059,
|
||||||
|
"store_id": 1000000,
|
||||||
|
"begin_total": 0,
|
||||||
|
"end_total": 58,
|
||||||
|
"inbound_total": 58,
|
||||||
|
"outbound_total": 0,
|
||||||
|
"store_name": "测试货主1111",
|
||||||
|
"item_name": "yjm0411",
|
||||||
|
"barcode": "yjm20260411t,yjm20260411,AUTO100000-BC-694726,AUTO100000-BC-734606,AUTO100000-BC-786320,AUTO100000-BC-525558,AUTO100000-BC-649476",
|
||||||
|
"item_code": "yjm20260411"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start_time": null,
|
||||||
|
"end_time": null,
|
||||||
|
"stock_id": 157068,
|
||||||
|
"store_id": 1000000,
|
||||||
|
"begin_total": 0,
|
||||||
|
"end_total": 13,
|
||||||
|
"inbound_total": 13,
|
||||||
|
"outbound_total": 0,
|
||||||
|
"store_name": "测试货主1111",
|
||||||
|
"item_name": "yjm0404",
|
||||||
|
"barcode": "yjm20260414",
|
||||||
|
"item_code": "yjm20260414"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"start_time": null,
|
||||||
|
"end_time": null,
|
||||||
|
"stock_id": 157071,
|
||||||
|
"store_id": 1000000,
|
||||||
|
"begin_total": 0,
|
||||||
|
"end_total": 29,
|
||||||
|
"inbound_total": 29,
|
||||||
|
"outbound_total": 0,
|
||||||
|
"store_name": "测试货主1111",
|
||||||
|
"item_name": "测试收货商品信息",
|
||||||
|
"barcode": "34464777",
|
||||||
|
"item_code": "34464777"
|
||||||
}
|
}
|
||||||
],
|
]
|
||||||
"pagination": {
|
|
||||||
"hasNext": false,
|
|
||||||
"hasPrevious": false,
|
|
||||||
"page": 1,
|
|
||||||
"pageSize": 20,
|
|
||||||
"total": 1,
|
|
||||||
"totalPages": 1
|
|
||||||
},
|
|
||||||
"queryInfo": {
|
|
||||||
"conditions": {},
|
|
||||||
"hasBarcodeSearch": false,
|
|
||||||
"sortField": "id",
|
|
||||||
"sortOrder": "DESC"
|
|
||||||
},
|
|
||||||
"summary": {
|
|
||||||
"total_available": 1,
|
|
||||||
"total_items": 20,
|
|
||||||
"total_locked": 0,
|
|
||||||
"total_quantity": 0
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"timestamp": 1778747869
|
"timestamp": 1778838116
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getItem",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.add",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.hasName",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.updateItem",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.del",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getComputer",
|
|
||||||
"message": "success",
|
|
||||||
"code": 0,
|
|
||||||
"data": {
|
|
||||||
"flag": "success",
|
|
||||||
"code": 0,
|
|
||||||
"message": "success",
|
|
||||||
"data": [
|
|
||||||
{
|
|
||||||
"id": 28,
|
|
||||||
"warehouse_id": 100000,
|
|
||||||
"name": "测试打印台",
|
|
||||||
"status": 1,
|
|
||||||
"last_login_time": "2026-05-13T02:20:50.000Z"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.getComputerPrinter",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 0,
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 0,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"接口": "print.savePrinters",
|
|
||||||
"message": "参数错误",
|
|
||||||
"code": 1001,
|
|
||||||
"data": {
|
|
||||||
"flag": "failure",
|
|
||||||
"code": 1001,
|
|
||||||
"message": "参数错误",
|
|
||||||
"timestamp": 1778747869
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -12,150 +12,67 @@
|
|||||||
"label": "全部"
|
"label": "全部"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"totalInterfaceCount": 248,
|
"totalInterfaceCount": 249,
|
||||||
"changes": {
|
"changes": {
|
||||||
"summary": {
|
"summary": {
|
||||||
"moduleAdded": 0,
|
"moduleAdded": 1,
|
||||||
"moduleDeleted": 0,
|
"moduleDeleted": 0,
|
||||||
"moduleUpdated": 1,
|
"moduleUpdated": 1,
|
||||||
"interfaceAdded": 0,
|
"interfaceAdded": 1,
|
||||||
"interfaceDeleted": 0,
|
"interfaceDeleted": 1,
|
||||||
"interfaceParamsUpdated": 7,
|
"interfaceParamsUpdated": 0,
|
||||||
"interfaceResponseUpdated": 8
|
"interfaceResponseUpdated": 0
|
||||||
},
|
},
|
||||||
"moduleUpdates": {
|
"moduleUpdates": {
|
||||||
"added": [],
|
"added": [
|
||||||
|
{
|
||||||
|
"moduleName": "库存报表模块",
|
||||||
|
"moduleKey": "storage.report",
|
||||||
|
"folder": "storage.report",
|
||||||
|
"methods": [
|
||||||
|
"storage.report.search"
|
||||||
|
],
|
||||||
|
"interfaceCount": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
"deleted": [],
|
"deleted": [],
|
||||||
"updated": [
|
"updated": [
|
||||||
{
|
{
|
||||||
"moduleName": "打印模块",
|
"moduleName": "库存操作模块",
|
||||||
"moduleKey": "print",
|
"moduleKey": "storage.inventory",
|
||||||
"folder": "print",
|
"folder": "storage.inventory",
|
||||||
"previousModuleName": "打印模块",
|
"previousModuleName": "库存操作模块",
|
||||||
"previousModuleKey": "print",
|
"previousModuleKey": "storage.inventory",
|
||||||
"interfaceChanges": {
|
"interfaceChanges": {
|
||||||
"addedMethods": [],
|
"addedMethods": [],
|
||||||
"deletedMethods": [],
|
"deletedMethods": [
|
||||||
"paramsUpdatedMethods": [
|
"storage.report.search"
|
||||||
"print.add",
|
|
||||||
"print.del",
|
|
||||||
"print.getComputerPrinter",
|
|
||||||
"print.getItem",
|
|
||||||
"print.getList",
|
|
||||||
"print.savePrinters",
|
|
||||||
"print.updateItem"
|
|
||||||
],
|
],
|
||||||
"responseUpdatedMethods": [
|
"paramsUpdatedMethods": [],
|
||||||
"print.add",
|
"responseUpdatedMethods": []
|
||||||
"print.del",
|
|
||||||
"print.getComputer",
|
|
||||||
"print.getComputerPrinter",
|
|
||||||
"print.getItem",
|
|
||||||
"print.getList",
|
|
||||||
"print.savePrinters",
|
|
||||||
"print.updateItem"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"interfaceUpdates": {
|
"interfaceUpdates": {
|
||||||
"added": [],
|
"added": [
|
||||||
"deleted": [],
|
|
||||||
"paramsUpdated": [
|
|
||||||
{
|
{
|
||||||
"moduleName": "打印模块",
|
"moduleName": "库存报表模块",
|
||||||
"moduleKey": "print",
|
"moduleKey": "storage.report",
|
||||||
"folder": "print",
|
"folder": "storage.report",
|
||||||
"method": "print.add"
|
"method": "storage.report.search"
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.del"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getComputerPrinter"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getItem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getList"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.savePrinters"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.updateItem"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responseUpdated": [
|
"deleted": [
|
||||||
{
|
{
|
||||||
"moduleName": "打印模块",
|
"moduleName": "库存操作模块",
|
||||||
"moduleKey": "print",
|
"moduleKey": "storage.inventory",
|
||||||
"folder": "print",
|
"folder": "storage.inventory",
|
||||||
"method": "print.add"
|
"method": "storage.report.search"
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.del"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getComputer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getComputerPrinter"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getItem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getList"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.savePrinters"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.updateItem"
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"paramsUpdated": [],
|
||||||
|
"responseUpdated": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"interfaces": [
|
"interfaces": [
|
||||||
@ -6706,8 +6623,8 @@
|
|||||||
"moduleKey": "print",
|
"moduleKey": "print",
|
||||||
"moduleFolder": "print",
|
"moduleFolder": "print",
|
||||||
"method": "print.savePrinters",
|
"method": "print.savePrinters",
|
||||||
"title": "保存打印台的默认打印机与快递-打印机绑定;会使用 print_station_id 标识目标打印台,并批量 upsert PrintStationExpress 记录。",
|
"title": "保存 default_printer_name 与 subject_config.express_bind_printer。",
|
||||||
"description": "保存打印台的默认打印机与快递-打印机绑定;会使用 print_station_id 标识目标打印台,并批量 upsert PrintStationExpress 记录。",
|
"description": "保存 default_printer_name 与 subject_config.express_bind_printer。",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -6728,19 +6645,19 @@
|
|||||||
"name": "defaultPrinter",
|
"name": "defaultPrinter",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "默认打印机名称(必填)"
|
"description": "默认打印机名称(必填),会写入打印台的 `default_printer_name` 字段"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "express",
|
"name": "express",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "快递绑定数组,必填。每项至少包含 express_id(number)和 name(打印机/快递名称,string)"
|
"description": "快递与打印机绑定数组(必填)。每项应包含首选字段 `express_code`(string)和 `printer_name`(string)。为兼容历史字段,也接受 `express_id`(可映射为 `express_code`)和 `name`(可映射为 `printer_name`)。接口实现会将结果序列化后写入打印台的 `subject_config.express_bind_printer`。"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "print_station_id",
|
"name": "print_station_id",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "目标打印台 ID,必填"
|
"description": "目标打印台 ID(必填)。接口会根据此 ID 更新对应打印台记录的 default_printer_name 与 subject_config.express_bind_printer"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"response": [
|
"response": [
|
||||||
@ -6748,7 +6665,7 @@
|
|||||||
"name": "data",
|
"name": "data",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "返回空数据结构表示成功(实现中返回 { data: null, code: 0 })"
|
"description": "成功不返回业务数据,语义为成功(实现中返回 { data: null, code: 0 })"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -6757,8 +6674,8 @@
|
|||||||
"moduleKey": "print",
|
"moduleKey": "print",
|
||||||
"moduleFolder": "print",
|
"moduleFolder": "print",
|
||||||
"method": "print.send",
|
"method": "print.send",
|
||||||
"title": "发送打印任务到打印电脑,并记录打印单",
|
"title": "发送打印任务到打印电脑,并记录打印单。说明:当 type=express 时,接口按 data.waveGroups(来源于 order.print.getWavePlatformPrintData 返回的 data.waveGroups)进行处理,按 waveGroups -> platforms 串行处理,每个平台+快递 组分别发送;返回沿用现有简要风格,不返回明细。",
|
||||||
"description": "发送打印任务到打印电脑,并记录打印单",
|
"description": "发送打印任务到打印电脑,并记录打印单。说明:当 type=express 时,接口按 data.waveGroups(来源于 order.print.getWavePlatformPrintData 返回的 data.waveGroups)进行处理,按 waveGroups -> platforms 串行处理,每个平台+快递 组分别发送;返回沿用现有简要风格,不返回明细。",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -6778,44 +6695,56 @@
|
|||||||
{
|
{
|
||||||
"name": "computerId",
|
"name": "computerId",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": false,
|
||||||
"description": "打印电脑 ID"
|
"description": "打印电脑 ID;历史/customize 分支可能使用。注意:type=express 场景下不适用(该字段不再作为 express 路径的必填或传输约束)。"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "count",
|
"name": "count",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "打印份数,可选"
|
"description": "打印份数;对 type=customize 有效。type=express 场景下不保留,相应字段会被忽略。"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "data",
|
"name": "data",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "打印业务数据对象,字段由模板和 type 决定"
|
"description": "打印业务数据对象。对于 type=express:必须提供 data.waveGroups(来源于 order.print.getWavePlatformPrintData 的返回值 data.waveGroups),接口按 waveGroups->platforms 串行处理,每个 平台+快递 组分别发送;对于 type=customize,data 的具体字段由模板决定。"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "printer",
|
"name": "printer",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": false,
|
||||||
"description": "打印机名称"
|
"description": "打印机名称;type=customize 使用。type=express 下忽略(由快递平台/站点决定打印目标)。"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "打印模板对象;仅 type=customize 时必填且应包含 page_width、page_height、template_content,type=express 可不传"
|
"description": "打印模板对象;仅 type=customize 时必填且应包含 page_width、page_height、template_content。type=express 场景下忽略 template 字段。"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "timestamp",
|
"name": "timestamp",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "业务时间戳,可选"
|
"description": "业务时间戳;历史字段。type=express 场景下不适用。"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "type",
|
"name": "type",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "打印类型;当前实现支持 customize、express"
|
"description": "打印类型;支持 customize、express。对于 express 场景,必须遵守下列额外约束:提供 printStationId、requestCode,并在 data.waveGroups 中传入来自 order.print.getWavePlatformPrintData 的 waveGroups 数据。"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "printStationId",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "打印站点/工作站标识(必填,type=express 时必须提供),用于指示目标打印站或分发单元。"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "requestCode",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "请求去重/防重放 ID(必填,type=express 时必须提供)。接口约束:requestCode 在约定周期内不得变更(例如一次批次/会话期间),系统在同一次请求处理范围内保证对重复 requestCode 进行防重放处理;此保护仅保证同一次请求内的去重/防重放,不等同于跨请求的强幂等保证。"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"response": [
|
"response": [
|
||||||
@ -6841,7 +6770,7 @@
|
|||||||
"name": "printId",
|
"name": "printId",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "打印记录 ID;任务入库成功后返回,失败时若已生成记录也会返回"
|
"description": "打印记录 ID;任务入库成功后返回,失败时若已生成记录也会返回。接口在 express 场景下不返回明细结果,只给出调用结果摘要。"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -7388,8 +7317,8 @@
|
|||||||
"moduleKey": "setting.express",
|
"moduleKey": "setting.express",
|
||||||
"moduleFolder": "setting.express",
|
"moduleFolder": "setting.express",
|
||||||
"method": "setting.express.create",
|
"method": "setting.express.create",
|
||||||
"title": "创建快递映射,仅写入已实现字段(code、name、platform 等)",
|
"title": "创建快递映射,仅写入已实现字段(code、name、express_code 等)",
|
||||||
"description": "创建快递映射,仅写入已实现字段(code、name、platform 等)",
|
"description": "创建快递映射,仅写入已实现字段(code、name、express_code 等)",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -7410,19 +7339,19 @@
|
|||||||
"name": "code",
|
"name": "code",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "快递编码"
|
"description": "快递映射编码;接口会转为大写"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "快递名称"
|
"description": "快递名称(最大 50 字符)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "platform",
|
"name": "express_code",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": false,
|
"required": true,
|
||||||
"description": "平台标识(可选)"
|
"description": "系统快递编码;同时支持驼峰写法 expressCode"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"response": []
|
"response": []
|
||||||
@ -7545,8 +7474,8 @@
|
|||||||
"moduleKey": "setting.express",
|
"moduleKey": "setting.express",
|
||||||
"moduleFolder": "setting.express",
|
"moduleFolder": "setting.express",
|
||||||
"method": "setting.express.update",
|
"method": "setting.express.update",
|
||||||
"title": "更新快递映射,仅更新已实现字段(例如 name、platform)",
|
"title": "更新快递映射。必须提供 `id`(必填),且至少提供 `code`、`name` 或 `express_code` 中的一个用于更新;同时支持 `expressCode` 驼峰写法。",
|
||||||
"description": "更新快递映射,仅更新已实现字段(例如 name、platform)",
|
"description": "更新快递映射。必须提供 `id`(必填),且至少提供 `code`、`name` 或 `express_code` 中的一个用于更新;同时支持 `expressCode` 驼峰写法。",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -7567,22 +7496,35 @@
|
|||||||
"name": "id",
|
"name": "id",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "快递记录ID"
|
"description": "快递记录ID;也兼容别名 `setting_id` / `settingId`"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "code",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "快递映射编码(最大 50 字符,接口会大写化并校验在当前仓库的唯一性)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "快递名称"
|
"description": "快递名称(最大 50 字符)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "platform",
|
"name": "express_code",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "平台标识(可选)"
|
"description": "系统快递编码(必须为系统已存在的编码);支持 `expressCode` 驼峰写法"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"response": []
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "data",
|
||||||
|
"type": "object",
|
||||||
|
"required": true,
|
||||||
|
"description": "更新后的快递映射对象(规范化字段)"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"moduleName": "快递接口管理模块",
|
"moduleName": "快递接口管理模块",
|
||||||
@ -11057,6 +10999,75 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"moduleName": "库存报表模块",
|
||||||
|
"moduleKey": "storage.report",
|
||||||
|
"moduleFolder": "storage.report",
|
||||||
|
"method": "storage.report.search",
|
||||||
|
"title": "库存报表查询(主入口):按时间闭区间统计商品出入库并支持按库位或按商品聚合",
|
||||||
|
"description": "库存报表查询(主入口):按时间闭区间统计商品出入库并支持按库位或按商品聚合",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "where",
|
||||||
|
"type": "object",
|
||||||
|
"required": false,
|
||||||
|
"description": "查询条件对象。支持字段:start_time(闭区间下限)、end_time(闭区间上限)、by_space(是否按库位返回,默认 false)、store_ids(货主ID数组)。仅返回在时间区间内存在流水的数据(无流水键不返回)。"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "where.start_time",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "开始时间,支持字符串/Date;用于闭区间过滤:created_at >= start_time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "where.end_time",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "结束时间,支持字符串/Date;用于闭区间过滤:created_at <= end_time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "where.by_space",
|
||||||
|
"type": "boolean",
|
||||||
|
"required": false,
|
||||||
|
"description": "是否按库位返回,默认 false。false=按商品+货主聚合(多库位汇总),true=按商品+库位+货主返回;当 where.by_space=true 时,额外返回 space_id、space_name(custom_name 优先,否则使用 space_code)。"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "where.store_ids",
|
||||||
|
"type": "array",
|
||||||
|
"required": false,
|
||||||
|
"description": "货主ID数组,用于过滤特定货主(空或未传表示不过滤)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "data.list",
|
||||||
|
"type": "array",
|
||||||
|
"required": true,
|
||||||
|
"description": "匹配到的报表行列表"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "data.list[]",
|
||||||
|
"type": "object",
|
||||||
|
"required": true,
|
||||||
|
"description": "单条报表记录字段"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"moduleName": "出库单模块",
|
"moduleName": "出库单模块",
|
||||||
"moduleKey": "storage.stockout",
|
"moduleKey": "storage.stockout",
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -12,151 +12,68 @@
|
|||||||
"label": "全部"
|
"label": "全部"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"moduleCount": 35,
|
"moduleCount": 36,
|
||||||
"totalInterfaceCount": 248,
|
"totalInterfaceCount": 249,
|
||||||
"changes": {
|
"changes": {
|
||||||
"summary": {
|
"summary": {
|
||||||
"moduleAdded": 0,
|
"moduleAdded": 1,
|
||||||
"moduleDeleted": 0,
|
"moduleDeleted": 0,
|
||||||
"moduleUpdated": 1,
|
"moduleUpdated": 1,
|
||||||
"interfaceAdded": 0,
|
"interfaceAdded": 1,
|
||||||
"interfaceDeleted": 0,
|
"interfaceDeleted": 1,
|
||||||
"interfaceParamsUpdated": 7,
|
"interfaceParamsUpdated": 0,
|
||||||
"interfaceResponseUpdated": 8
|
"interfaceResponseUpdated": 0
|
||||||
},
|
},
|
||||||
"moduleUpdates": {
|
"moduleUpdates": {
|
||||||
"added": [],
|
"added": [
|
||||||
|
{
|
||||||
|
"moduleName": "库存报表模块",
|
||||||
|
"moduleKey": "storage.report",
|
||||||
|
"folder": "storage.report",
|
||||||
|
"methods": [
|
||||||
|
"storage.report.search"
|
||||||
|
],
|
||||||
|
"interfaceCount": 1
|
||||||
|
}
|
||||||
|
],
|
||||||
"deleted": [],
|
"deleted": [],
|
||||||
"updated": [
|
"updated": [
|
||||||
{
|
{
|
||||||
"moduleName": "打印模块",
|
"moduleName": "库存操作模块",
|
||||||
"moduleKey": "print",
|
"moduleKey": "storage.inventory",
|
||||||
"folder": "print",
|
"folder": "storage.inventory",
|
||||||
"previousModuleName": "打印模块",
|
"previousModuleName": "库存操作模块",
|
||||||
"previousModuleKey": "print",
|
"previousModuleKey": "storage.inventory",
|
||||||
"interfaceChanges": {
|
"interfaceChanges": {
|
||||||
"addedMethods": [],
|
"addedMethods": [],
|
||||||
"deletedMethods": [],
|
"deletedMethods": [
|
||||||
"paramsUpdatedMethods": [
|
"storage.report.search"
|
||||||
"print.add",
|
|
||||||
"print.del",
|
|
||||||
"print.getComputerPrinter",
|
|
||||||
"print.getItem",
|
|
||||||
"print.getList",
|
|
||||||
"print.savePrinters",
|
|
||||||
"print.updateItem"
|
|
||||||
],
|
],
|
||||||
"responseUpdatedMethods": [
|
"paramsUpdatedMethods": [],
|
||||||
"print.add",
|
"responseUpdatedMethods": []
|
||||||
"print.del",
|
|
||||||
"print.getComputer",
|
|
||||||
"print.getComputerPrinter",
|
|
||||||
"print.getItem",
|
|
||||||
"print.getList",
|
|
||||||
"print.savePrinters",
|
|
||||||
"print.updateItem"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"interfaceUpdates": {
|
"interfaceUpdates": {
|
||||||
"added": [],
|
"added": [
|
||||||
"deleted": [],
|
|
||||||
"paramsUpdated": [
|
|
||||||
{
|
{
|
||||||
"moduleName": "打印模块",
|
"moduleName": "库存报表模块",
|
||||||
"moduleKey": "print",
|
"moduleKey": "storage.report",
|
||||||
"folder": "print",
|
"folder": "storage.report",
|
||||||
"method": "print.add"
|
"method": "storage.report.search"
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.del"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getComputerPrinter"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getItem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getList"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.savePrinters"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.updateItem"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"responseUpdated": [
|
"deleted": [
|
||||||
{
|
{
|
||||||
"moduleName": "打印模块",
|
"moduleName": "库存操作模块",
|
||||||
"moduleKey": "print",
|
"moduleKey": "storage.inventory",
|
||||||
"folder": "print",
|
"folder": "storage.inventory",
|
||||||
"method": "print.add"
|
"method": "storage.report.search"
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.del"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getComputer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getComputerPrinter"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getItem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getList"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.savePrinters"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.updateItem"
|
|
||||||
}
|
}
|
||||||
]
|
],
|
||||||
|
"paramsUpdated": [],
|
||||||
|
"responseUpdated": []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"modules": [
|
"modules": [
|
||||||
@ -795,6 +712,17 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"moduleName": "库存报表模块",
|
||||||
|
"moduleKey": "storage.report",
|
||||||
|
"folder": "storage.report",
|
||||||
|
"interfaceCount": 1,
|
||||||
|
"interfaces": [
|
||||||
|
{
|
||||||
|
"method": "storage.report.search"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"moduleName": "库存操作模块",
|
"moduleName": "库存操作模块",
|
||||||
"moduleKey": "storage.inventory",
|
"moduleKey": "storage.inventory",
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-05 09:15:19",
|
"createdAt": "2026-05-05 09:15:19",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-04 09:11:04",
|
"createdAt": "2026-05-04 09:11:04",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-09 09:52:14",
|
"createdAt": "2026-05-09 09:52:14",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-04 17:23:48",
|
"createdAt": "2026-05-04 17:23:48",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -25,33 +25,16 @@
|
|||||||
"interfaceChanges": {
|
"interfaceChanges": {
|
||||||
"addedMethods": [],
|
"addedMethods": [],
|
||||||
"deletedMethods": [],
|
"deletedMethods": [],
|
||||||
"paramsUpdatedMethods": [
|
"paramsUpdatedMethods": [],
|
||||||
"print.add",
|
"responseUpdatedMethods": []
|
||||||
"print.del",
|
|
||||||
"print.getComputerPrinter",
|
|
||||||
"print.getItem",
|
|
||||||
"print.getList",
|
|
||||||
"print.savePrinters",
|
|
||||||
"print.updateItem"
|
|
||||||
],
|
|
||||||
"responseUpdatedMethods": [
|
|
||||||
"print.add",
|
|
||||||
"print.del",
|
|
||||||
"print.getComputer",
|
|
||||||
"print.getComputerPrinter",
|
|
||||||
"print.getItem",
|
|
||||||
"print.getList",
|
|
||||||
"print.savePrinters",
|
|
||||||
"print.updateItem"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"interfaces": [
|
"interfaces": [
|
||||||
{
|
{
|
||||||
"method": "print.send",
|
"method": "print.send",
|
||||||
"title": "发送打印任务到打印电脑,并记录打印单",
|
"title": "发送打印任务到打印电脑,并记录打印单。说明:当 type=express 时,接口按 data.waveGroups(来源于 order.print.getWavePlatformPrintData 返回的 data.waveGroups)进行处理,按 waveGroups -> platforms 串行处理,每个平台+快递 组分别发送;返回沿用现有简要风格,不返回明细。",
|
||||||
"description": "发送打印任务到打印电脑,并记录打印单",
|
"description": "发送打印任务到打印电脑,并记录打印单。说明:当 type=express 时,接口按 data.waveGroups(来源于 order.print.getWavePlatformPrintData 返回的 data.waveGroups)进行处理,按 waveGroups -> platforms 串行处理,每个平台+快递 组分别发送;返回沿用现有简要风格,不返回明细。",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -71,44 +54,56 @@
|
|||||||
{
|
{
|
||||||
"name": "computerId",
|
"name": "computerId",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": false,
|
||||||
"description": "打印电脑 ID"
|
"description": "打印电脑 ID;历史/customize 分支可能使用。注意:type=express 场景下不适用(该字段不再作为 express 路径的必填或传输约束)。"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "count",
|
"name": "count",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "打印份数,可选"
|
"description": "打印份数;对 type=customize 有效。type=express 场景下不保留,相应字段会被忽略。"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "data",
|
"name": "data",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "打印业务数据对象,字段由模板和 type 决定"
|
"description": "打印业务数据对象。对于 type=express:必须提供 data.waveGroups(来源于 order.print.getWavePlatformPrintData 的返回值 data.waveGroups),接口按 waveGroups->platforms 串行处理,每个 平台+快递 组分别发送;对于 type=customize,data 的具体字段由模板决定。"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "printer",
|
"name": "printer",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": false,
|
||||||
"description": "打印机名称"
|
"description": "打印机名称;type=customize 使用。type=express 下忽略(由快递平台/站点决定打印目标)。"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "template",
|
"name": "template",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "打印模板对象;仅 type=customize 时必填且应包含 page_width、page_height、template_content,type=express 可不传"
|
"description": "打印模板对象;仅 type=customize 时必填且应包含 page_width、page_height、template_content。type=express 场景下忽略 template 字段。"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "timestamp",
|
"name": "timestamp",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "业务时间戳,可选"
|
"description": "业务时间戳;历史字段。type=express 场景下不适用。"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "type",
|
"name": "type",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "打印类型;当前实现支持 customize、express"
|
"description": "打印类型;支持 customize、express。对于 express 场景,必须遵守下列额外约束:提供 printStationId、requestCode,并在 data.waveGroups 中传入来自 order.print.getWavePlatformPrintData 的 waveGroups 数据。"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "printStationId",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "打印站点/工作站标识(必填,type=express 时必须提供),用于指示目标打印站或分发单元。"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "requestCode",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "请求去重/防重放 ID(必填,type=express 时必须提供)。接口约束:requestCode 在约定周期内不得变更(例如一次批次/会话期间),系统在同一次请求处理范围内保证对重复 requestCode 进行防重放处理;此保护仅保证同一次请求内的去重/防重放,不等同于跨请求的强幂等保证。"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"response": [
|
"response": [
|
||||||
@ -134,7 +129,7 @@
|
|||||||
"name": "printId",
|
"name": "printId",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "打印记录 ID;任务入库成功后返回,失败时若已生成记录也会返回"
|
"description": "打印记录 ID;任务入库成功后返回,失败时若已生成记录也会返回。接口在 express 场景下不返回明细结果,只给出调用结果摘要。"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
@ -544,8 +539,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "print.savePrinters",
|
"method": "print.savePrinters",
|
||||||
"title": "保存打印台的默认打印机与快递-打印机绑定;会使用 print_station_id 标识目标打印台,并批量 upsert PrintStationExpress 记录。",
|
"title": "保存 default_printer_name 与 subject_config.express_bind_printer。",
|
||||||
"description": "保存打印台的默认打印机与快递-打印机绑定;会使用 print_station_id 标识目标打印台,并批量 upsert PrintStationExpress 记录。",
|
"description": "保存 default_printer_name 与 subject_config.express_bind_printer。",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -566,19 +561,19 @@
|
|||||||
"name": "defaultPrinter",
|
"name": "defaultPrinter",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "默认打印机名称(必填)"
|
"description": "默认打印机名称(必填),会写入打印台的 `default_printer_name` 字段"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "express",
|
"name": "express",
|
||||||
"type": "array",
|
"type": "array",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "快递绑定数组,必填。每项至少包含 express_id(number)和 name(打印机/快递名称,string)"
|
"description": "快递与打印机绑定数组(必填)。每项应包含首选字段 `express_code`(string)和 `printer_name`(string)。为兼容历史字段,也接受 `express_id`(可映射为 `express_code`)和 `name`(可映射为 `printer_name`)。接口实现会将结果序列化后写入打印台的 `subject_config.express_bind_printer`。"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "print_station_id",
|
"name": "print_station_id",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "目标打印台 ID,必填"
|
"description": "目标打印台 ID(必填)。接口会根据此 ID 更新对应打印台记录的 default_printer_name 与 subject_config.express_bind_printer"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"response": [
|
"response": [
|
||||||
@ -586,7 +581,7 @@
|
|||||||
"name": "data",
|
"name": "data",
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "返回空数据结构表示成功(实现中返回 { data: null, code: 0 })"
|
"description": "成功不返回业务数据,语义为成功(实现中返回 { data: null, code: 0 })"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-17 19:37:49",
|
"createdAt": "2026-04-17 19:37:49",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -98,8 +98,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "setting.express.create",
|
"method": "setting.express.create",
|
||||||
"title": "创建快递映射,仅写入已实现字段(code、name、platform 等)",
|
"title": "创建快递映射,仅写入已实现字段(code、name、express_code 等)",
|
||||||
"description": "创建快递映射,仅写入已实现字段(code、name、platform 等)",
|
"description": "创建快递映射,仅写入已实现字段(code、name、express_code 等)",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -120,19 +120,19 @@
|
|||||||
"name": "code",
|
"name": "code",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "快递编码"
|
"description": "快递映射编码;接口会转为大写"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "快递名称"
|
"description": "快递名称(最大 50 字符)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "platform",
|
"name": "express_code",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": false,
|
"required": true,
|
||||||
"description": "平台标识(可选)"
|
"description": "系统快递编码;同时支持驼峰写法 expressCode"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"response": []
|
"response": []
|
||||||
@ -174,8 +174,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "setting.express.update",
|
"method": "setting.express.update",
|
||||||
"title": "更新快递映射,仅更新已实现字段(例如 name、platform)",
|
"title": "更新快递映射。必须提供 `id`(必填),且至少提供 `code`、`name` 或 `express_code` 中的一个用于更新;同时支持 `expressCode` 驼峰写法。",
|
||||||
"description": "更新快递映射,仅更新已实现字段(例如 name、platform)",
|
"description": "更新快递映射。必须提供 `id`(必填),且至少提供 `code`、`name` 或 `express_code` 中的一个用于更新;同时支持 `expressCode` 驼峰写法。",
|
||||||
"endpoint": "/system",
|
"endpoint": "/system",
|
||||||
"authRequired": false,
|
"authRequired": false,
|
||||||
"loginRequired": true,
|
"loginRequired": true,
|
||||||
@ -196,22 +196,35 @@
|
|||||||
"name": "id",
|
"name": "id",
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"required": true,
|
"required": true,
|
||||||
"description": "快递记录ID"
|
"description": "快递记录ID;也兼容别名 `setting_id` / `settingId`"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "code",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "快递映射编码(最大 50 字符,接口会大写化并校验在当前仓库的唯一性)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "name",
|
"name": "name",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "快递名称"
|
"description": "快递名称(最大 50 字符)"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "platform",
|
"name": "express_code",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"required": false,
|
"required": false,
|
||||||
"description": "平台标识(可选)"
|
"description": "系统快递编码(必须为系统已存在的编码);支持 `expressCode` 驼峰写法"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"response": []
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "data",
|
||||||
|
"type": "object",
|
||||||
|
"required": true,
|
||||||
|
"description": "更新后的快递映射对象(规范化字段)"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"method": "setting.express.delete",
|
"method": "setting.express.delete",
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-17 20:21:27",
|
"createdAt": "2026-04-17 20:21:27",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-17 19:16:50",
|
"createdAt": "2026-04-17 19:16:50",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-05-04 09:11:04",
|
"createdAt": "2026-05-04 09:11:04",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
@ -24,7 +24,9 @@
|
|||||||
"moduleRenamed": false,
|
"moduleRenamed": false,
|
||||||
"interfaceChanges": {
|
"interfaceChanges": {
|
||||||
"addedMethods": [],
|
"addedMethods": [],
|
||||||
"deletedMethods": [],
|
"deletedMethods": [
|
||||||
|
"storage.report.search"
|
||||||
|
],
|
||||||
"paramsUpdatedMethods": [],
|
"paramsUpdatedMethods": [],
|
||||||
"responseUpdatedMethods": []
|
"responseUpdatedMethods": []
|
||||||
}
|
}
|
||||||
|
|||||||
@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
"module": {
|
||||||
|
"name": "库存报表模块",
|
||||||
|
"key": "storage.report",
|
||||||
|
"folder": "storage.report"
|
||||||
|
},
|
||||||
|
"status": "active",
|
||||||
|
"createdAt": "2026-05-15 17:32:36",
|
||||||
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
|
"deletedAt": null,
|
||||||
|
"restoredAt": null
|
||||||
|
}
|
||||||
103
workflows/api-doc-system/data/module/storage.report/module.json
Normal file
103
workflows/api-doc-system/data/module/storage.report/module.json
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
{
|
||||||
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
|
"source": "remote",
|
||||||
|
"filter": {
|
||||||
|
"platform": {
|
||||||
|
"value": "web",
|
||||||
|
"label": "网页端"
|
||||||
|
},
|
||||||
|
"project": {
|
||||||
|
"value": "all",
|
||||||
|
"label": "全部"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"module": {
|
||||||
|
"name": "库存报表模块",
|
||||||
|
"key": "storage.report",
|
||||||
|
"folder": "storage.report",
|
||||||
|
"interfaceCount": 1
|
||||||
|
},
|
||||||
|
"changes": {
|
||||||
|
"fromPreviousSnapshot": {
|
||||||
|
"moduleAdded": true,
|
||||||
|
"moduleRenamed": false,
|
||||||
|
"interfaceChanges": {
|
||||||
|
"addedMethods": [
|
||||||
|
"storage.report.search"
|
||||||
|
],
|
||||||
|
"deletedMethods": [],
|
||||||
|
"paramsUpdatedMethods": [],
|
||||||
|
"responseUpdatedMethods": []
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"interfaces": [
|
||||||
|
{
|
||||||
|
"method": "storage.report.search",
|
||||||
|
"title": "库存报表查询(主入口):按时间闭区间统计商品出入库并支持按库位或按商品聚合",
|
||||||
|
"description": "库存报表查询(主入口):按时间闭区间统计商品出入库并支持按库位或按商品聚合",
|
||||||
|
"endpoint": "/system",
|
||||||
|
"authRequired": false,
|
||||||
|
"loginRequired": true,
|
||||||
|
"status": {
|
||||||
|
"isUsed": false,
|
||||||
|
"isPlaceholder": false
|
||||||
|
},
|
||||||
|
"headers": [
|
||||||
|
{
|
||||||
|
"name": "Authorization",
|
||||||
|
"type": "string",
|
||||||
|
"required": true,
|
||||||
|
"description": "Bearer token"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"params": [
|
||||||
|
{
|
||||||
|
"name": "where",
|
||||||
|
"type": "object",
|
||||||
|
"required": false,
|
||||||
|
"description": "查询条件对象。支持字段:start_time(闭区间下限)、end_time(闭区间上限)、by_space(是否按库位返回,默认 false)、store_ids(货主ID数组)。仅返回在时间区间内存在流水的数据(无流水键不返回)。"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "where.start_time",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "开始时间,支持字符串/Date;用于闭区间过滤:created_at >= start_time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "where.end_time",
|
||||||
|
"type": "string",
|
||||||
|
"required": false,
|
||||||
|
"description": "结束时间,支持字符串/Date;用于闭区间过滤:created_at <= end_time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "where.by_space",
|
||||||
|
"type": "boolean",
|
||||||
|
"required": false,
|
||||||
|
"description": "是否按库位返回,默认 false。false=按商品+货主聚合(多库位汇总),true=按商品+库位+货主返回;当 where.by_space=true 时,额外返回 space_id、space_name(custom_name 优先,否则使用 space_code)。"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "where.store_ids",
|
||||||
|
"type": "array",
|
||||||
|
"required": false,
|
||||||
|
"description": "货主ID数组,用于过滤特定货主(空或未传表示不过滤)"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"response": [
|
||||||
|
{
|
||||||
|
"name": "data.list",
|
||||||
|
"type": "array",
|
||||||
|
"required": true,
|
||||||
|
"description": "匹配到的报表行列表"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "data.list[]",
|
||||||
|
"type": "object",
|
||||||
|
"required": true,
|
||||||
|
"description": "单条报表记录字段"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": "2026-04-17 19:16:50"
|
"restoredAt": "2026-04-17 19:16:50"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -6,7 +6,7 @@
|
|||||||
},
|
},
|
||||||
"status": "active",
|
"status": "active",
|
||||||
"createdAt": "2026-04-16 11:15:05",
|
"createdAt": "2026-04-16 11:15:05",
|
||||||
"updatedAt": "2026-05-14 14:43:29",
|
"updatedAt": "2026-05-15 17:32:36",
|
||||||
"deletedAt": null,
|
"deletedAt": null,
|
||||||
"restoredAt": null
|
"restoredAt": null
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
"generatedAt": "2026-05-15 17:32:36",
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
"generatedAtLocal": "2026-05-15 17:32:36",
|
||||||
"source": "remote",
|
"source": "remote",
|
||||||
"filter": {
|
"filter": {
|
||||||
"platform": {
|
"platform": {
|
||||||
|
|||||||
@ -1,122 +1 @@
|
|||||||
{
|
{}
|
||||||
"generatedAt": "2026-05-14 14:43:29",
|
|
||||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
|
||||||
"source": "remote",
|
|
||||||
"filter": {
|
|
||||||
"platform": {
|
|
||||||
"value": "web",
|
|
||||||
"label": "网页端"
|
|
||||||
},
|
|
||||||
"project": {
|
|
||||||
"value": "all",
|
|
||||||
"label": "全部"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"summary": {
|
|
||||||
"moduleAdded": 0,
|
|
||||||
"moduleDeleted": 0,
|
|
||||||
"interfaceAdded": 0,
|
|
||||||
"interfaceDeleted": 0,
|
|
||||||
"interfaceParamsUpdated": 7,
|
|
||||||
"interfaceResponseUpdated": 8,
|
|
||||||
"totalChangedItems": 15
|
|
||||||
},
|
|
||||||
"interfaceUpdates": {
|
|
||||||
"added": [],
|
|
||||||
"deleted": [],
|
|
||||||
"paramsUpdated": [
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.add"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.del"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getComputerPrinter"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getItem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getList"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.savePrinters"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.updateItem"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"responseUpdated": [
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.add"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.del"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getComputer"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getComputerPrinter"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getItem"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.getList"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.savePrinters"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"moduleName": "打印模块",
|
|
||||||
"moduleKey": "print",
|
|
||||||
"folder": "print",
|
|
||||||
"method": "print.updateItem"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user