5月14
This commit is contained in:
parent
98ddaf83a7
commit
c84f9c82a7
BIN
dist.tar.gz
BIN
dist.tar.gz
Binary file not shown.
@ -102,7 +102,12 @@ function normalizeDelIds(ids: unknown[]): number[] {
|
||||
return ids.map((i) => Number(i)).filter((n) => Number.isFinite(n))
|
||||
}
|
||||
|
||||
/** print.del:ids 必填且须为非空数组(见 print 模块 module.json) */
|
||||
export function delItems(ids: Array<string | number>) {
|
||||
const normalized = normalizeDelIds(ids)
|
||||
if (!normalized.length) {
|
||||
return Promise.reject(new Error('print.del:ids 必须为非空数组'))
|
||||
}
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
@ -111,7 +116,7 @@ export function delItems(ids: Array<string | number>) {
|
||||
v,
|
||||
timestamp: stamp()
|
||||
},
|
||||
data: { ids: normalizeDelIds(ids) }
|
||||
data: { ids: normalized }
|
||||
})
|
||||
}
|
||||
|
||||
@ -169,15 +174,17 @@ export function getPrintRecordItem(id: string | number) {
|
||||
})
|
||||
}
|
||||
|
||||
/** print.send 请求体(与 print 模块接口一致) */
|
||||
/** print.send 请求体(与 print 模块 module.json 一致:template 仅 customize 必填,express 可不传) */
|
||||
export type PrintSendParams = {
|
||||
computerId: string
|
||||
count?: number
|
||||
data: Record<string, unknown>
|
||||
printer: string
|
||||
template: Record<string, unknown>
|
||||
/** customize 时必填且宜含 page_width、page_height、template_content;express 可不传 */
|
||||
template?: Record<string, unknown>
|
||||
/** 业务时间戳,可选;接口类型为 string */
|
||||
timestamp?: string
|
||||
/** 当前实现支持 customize、express */
|
||||
type: string
|
||||
}
|
||||
|
||||
@ -189,18 +196,17 @@ export type PrintSendResult = {
|
||||
printId?: number
|
||||
}
|
||||
|
||||
export function savePrinters(data: {
|
||||
/** print.savePrinters:defaultPrinter、express、print_station_id 均为必填(见 print 模块 module.json) */
|
||||
export type PrintSavePrintersParams = {
|
||||
defaultPrinter: string
|
||||
express?: Array<Record<string, unknown>>
|
||||
print_station_id?: number
|
||||
}) {
|
||||
const body: Record<string, unknown> = {
|
||||
defaultPrinter: data.defaultPrinter,
|
||||
express: data.express ?? []
|
||||
}
|
||||
if (data.print_station_id !== undefined && data.print_station_id !== null) {
|
||||
const n = Number(data.print_station_id)
|
||||
if (Number.isFinite(n)) body.print_station_id = n
|
||||
express: Array<Record<string, unknown>>
|
||||
print_station_id: number
|
||||
}
|
||||
|
||||
export function savePrinters(data: PrintSavePrintersParams) {
|
||||
const sid = Number(data.print_station_id)
|
||||
if (!Number.isFinite(sid)) {
|
||||
return Promise.reject(new Error('print.savePrinters:print_station_id 无效'))
|
||||
}
|
||||
return request({
|
||||
url: '/system',
|
||||
@ -210,14 +216,29 @@ export function savePrinters(data: {
|
||||
v,
|
||||
timestamp: stamp()
|
||||
},
|
||||
data: body
|
||||
data: {
|
||||
defaultPrinter: data.defaultPrinter,
|
||||
express: Array.isArray(data.express) ? data.express : [],
|
||||
print_station_id: sid
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export function sendPrint(data: PrintSendParams) {
|
||||
const body: PrintSendParams = { ...data }
|
||||
if (body.timestamp !== undefined && body.timestamp !== null && typeof body.timestamp !== 'string') {
|
||||
body.timestamp = String(body.timestamp)
|
||||
const body: Record<string, unknown> = {
|
||||
computerId: data.computerId,
|
||||
data: data.data,
|
||||
printer: data.printer,
|
||||
type: data.type
|
||||
}
|
||||
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)
|
||||
}
|
||||
if (data.template !== undefined && data.template !== null) {
|
||||
body.template = data.template
|
||||
}
|
||||
return request({
|
||||
url: '/system',
|
||||
|
||||
@ -136,6 +136,7 @@ import JsBarcode from 'jsbarcode'
|
||||
import * as receivingApi from '@/api/storage_receiving/receiving'
|
||||
import * as templateApi from '@/api/setting.printtemplate/printTemplate'
|
||||
import * as stationApi from '@/api/print/print'
|
||||
import type { PrintSendParams } from '@/api/print/print'
|
||||
import { printFormConfig } from '@/views/storage/receiving/receiving-config'
|
||||
|
||||
type RowItem = {
|
||||
@ -545,7 +546,7 @@ async function doPrint() {
|
||||
|
||||
try {
|
||||
const selectedTemplateObj = templateOptions.value.find((item: any) => item.id === printSettings.template) || null
|
||||
const printPayload = {
|
||||
const printPayload: PrintSendParams = {
|
||||
type: 'customize',
|
||||
computerId: String(printSettings.station),
|
||||
printer: printSettings.printer,
|
||||
|
||||
@ -57,6 +57,10 @@
|
||||
<article v-for="platform in wave.platforms" :key="platform.platformKey" class="wave-platform-card">
|
||||
<div class="wave-platform-card__header">
|
||||
<div class="wave-platform-card__title">
|
||||
<span v-if="platform.sys_logistics_name" class="wave-platform-card__logistics">{{
|
||||
platform.sys_logistics_name
|
||||
}}</span>
|
||||
<span v-if="platform.sys_logistics_name" class="wave-platform-card__sep-inline">|</span>
|
||||
{{ platform.platform_name }}
|
||||
<span class="wave-platform-card__code">{{ platform.platform }}</span>
|
||||
</div>
|
||||
@ -74,7 +78,14 @@
|
||||
|
||||
<template #footer>
|
||||
<el-button @click="visibleProxy = false">关闭</el-button>
|
||||
<el-button type="primary" :loading="stationPrinting" :disabled="!payload" @click="printToStation">打印到打印台</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
:loading="stationPrinting"
|
||||
:disabled="!payload || !printSettings.station"
|
||||
@click="printToStation"
|
||||
>
|
||||
打印到打印台
|
||||
</el-button>
|
||||
<el-button :disabled="!payload" @click="printReport">浏览器打印</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@ -85,6 +96,7 @@ import { computed, reactive, ref, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import type { WavePlatformPrintDataPayload } from '@/api/order.print/orderprint'
|
||||
import * as stationApi from '@/api/print/print'
|
||||
import type { PrintSendParams } from '@/api/print/print'
|
||||
|
||||
const WAVE_PRINT_STATION_STORAGE_KEY = 'wave_platform_print_station_id'
|
||||
|
||||
@ -93,6 +105,8 @@ type WaveGroupPlatform = {
|
||||
platformKey: string
|
||||
platform: string
|
||||
platform_name: string
|
||||
/** 快递 / 物流公司名称(与波次列表 sys_logistics_name 一致) */
|
||||
sys_logistics_name: string
|
||||
order_count: number
|
||||
}
|
||||
type WaveGroupView = {
|
||||
@ -115,11 +129,18 @@ const emit = defineEmits<{
|
||||
}>()
|
||||
|
||||
const printRootRef = ref<HTMLElement | null>(null)
|
||||
const stationOptions = ref<any[]>([])
|
||||
type StationOption = {
|
||||
id: string | number
|
||||
computer_id: string
|
||||
name: string
|
||||
default_printer_name: string
|
||||
}
|
||||
|
||||
const stationOptions = ref<StationOption[]>([])
|
||||
const stationLoading = ref(false)
|
||||
const stationPrinting = ref(false)
|
||||
const printSettings = reactive({
|
||||
station: '' as string | number
|
||||
station: '' as string
|
||||
})
|
||||
|
||||
const visibleProxy = computed({
|
||||
@ -152,10 +173,15 @@ const waveGroupList = computed<WaveGroupView[]>(() => {
|
||||
const platform = rawPlatform as AnyRecord
|
||||
const platformCode = toText(platform.platform, `platform-${platformIndex + 1}`)
|
||||
const platformName = toText(platform.platform_name, platformCode)
|
||||
const logisticsRaw =
|
||||
platform.sys_logistics_name ?? platform.logistics_name ?? platform.express_name ?? platform.logisticsName
|
||||
const sys_logistics_name =
|
||||
logisticsRaw != null && String(logisticsRaw).trim() !== '' ? String(logisticsRaw).trim() : ''
|
||||
return {
|
||||
platformKey: `${wave_id}-${platformCode}-${platformIndex}`,
|
||||
platform: platformCode,
|
||||
platform_name: platformName,
|
||||
sys_logistics_name,
|
||||
order_count: toNum(platform.order_count, 0)
|
||||
}
|
||||
})
|
||||
@ -185,7 +211,53 @@ function toNum(v: unknown, fallback = 0): number {
|
||||
}
|
||||
|
||||
function isApiSuccess(res: any) {
|
||||
return !!res && (res.code === 0 || res.code === 200)
|
||||
const c = res?.code
|
||||
return !!res && (c === 0 || c === 200 || c === 1 || c === 20000)
|
||||
}
|
||||
|
||||
/** print.getList:兼容 data.list 与 data.data.list(及 records) */
|
||||
function extractPrintStationRows(res: any): any[] {
|
||||
const root = res?.data
|
||||
if (Array.isArray(root)) return root
|
||||
if (!root || typeof root !== 'object') return []
|
||||
if (Array.isArray(root.list)) return root.list
|
||||
if (Array.isArray(root.records)) return root.records
|
||||
if (Array.isArray(root.items)) return root.items
|
||||
const inner = root.data
|
||||
if (Array.isArray(inner)) return inner
|
||||
if (inner && typeof inner === 'object') {
|
||||
if (Array.isArray(inner.list)) return inner.list
|
||||
if (Array.isArray(inner.records)) return inner.records
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
/** 与 printStation info 表单一致:列表行上名称、默认打印机字段别名 */
|
||||
function mapStationRow(item: Record<string, any>): StationOption {
|
||||
const rawCid = item.computer_id ?? item.computerId ?? item.id
|
||||
const computer_id = rawCid != null && String(rawCid).trim() !== '' ? String(rawCid) : ''
|
||||
const nameRaw =
|
||||
item.name ??
|
||||
item.station_name ??
|
||||
item.print_station_name ??
|
||||
item.printName ??
|
||||
item.stationName ??
|
||||
item.label ??
|
||||
''
|
||||
const name = nameRaw != null && String(nameRaw).trim() !== '' ? String(nameRaw).trim() : computer_id
|
||||
const defPrinter =
|
||||
item.default_printer_name ??
|
||||
item.defaultPrinterName ??
|
||||
item.printer_name ??
|
||||
item.default_printer ??
|
||||
''
|
||||
const default_printer_name = String(defPrinter ?? '').trim()
|
||||
return {
|
||||
id: item.id ?? rawCid ?? computer_id,
|
||||
computer_id,
|
||||
name,
|
||||
default_printer_name
|
||||
}
|
||||
}
|
||||
|
||||
async function loadStationOptions() {
|
||||
@ -194,21 +266,18 @@ async function loadStationOptions() {
|
||||
const stations: any = await stationApi.getList({ page: 1, pageSize: 100, where: {} })
|
||||
if (!isApiSuccess(stations)) {
|
||||
stationOptions.value = []
|
||||
printSettings.station = ''
|
||||
ElMessage.warning('加载打印台列表失败')
|
||||
return
|
||||
}
|
||||
const rawList: any[] = stations.data?.list || stations.data || []
|
||||
stationOptions.value = rawList.map((item: any) => ({
|
||||
id: item.id ?? item.computer_id,
|
||||
computer_id: item.computer_id ?? item.computerId ?? item.id,
|
||||
name: item.name || item.label || String(item.computer_id ?? item.computerId ?? item.id)
|
||||
}))
|
||||
const rawList = extractPrintStationRows(stations)
|
||||
stationOptions.value = rawList.filter((x) => x && typeof x === 'object').map((item: any) => mapStationRow(item))
|
||||
|
||||
// 初始化默认打印台:优先本地存储,其次当前值,最后回退到首项
|
||||
const savedStation = getSavedStationId()
|
||||
const currentStationId = String(printSettings.station || '').trim()
|
||||
const hasSaved = !!savedStation && stationOptions.value.some((item) => String(item.computer_id) === savedStation)
|
||||
const hasCurrent = !!currentStationId && stationOptions.value.some((item) => String(item.computer_id) === currentStationId)
|
||||
const hasSaved = !!savedStation && stationOptions.value.some((item) => item.computer_id === savedStation)
|
||||
const hasCurrent = !!currentStationId && stationOptions.value.some((item) => item.computer_id === currentStationId)
|
||||
|
||||
if (!stationOptions.value.length) {
|
||||
printSettings.station = ''
|
||||
@ -218,25 +287,25 @@ async function loadStationOptions() {
|
||||
|
||||
if (hasSaved) {
|
||||
printSettings.station = savedStation
|
||||
return
|
||||
}
|
||||
if (hasCurrent) {
|
||||
} else if (hasCurrent) {
|
||||
saveStationId(String(currentStationId))
|
||||
return
|
||||
} else {
|
||||
const first = stationOptions.value[0]
|
||||
if (first) {
|
||||
printSettings.station = first.computer_id
|
||||
saveStationId(first.computer_id)
|
||||
}
|
||||
}
|
||||
|
||||
const fallbackStation = String(stationOptions.value[0].computer_id)
|
||||
printSettings.station = fallbackStation
|
||||
saveStationId(fallbackStation)
|
||||
} catch {
|
||||
stationOptions.value = []
|
||||
printSettings.station = ''
|
||||
ElMessage.warning('加载打印台列表失败')
|
||||
} finally {
|
||||
stationLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
async function handleStationChange(val: string | number) {
|
||||
function handleStationChange(val: string | number) {
|
||||
const stationId = String(val || '').trim()
|
||||
if (!stationId) {
|
||||
clearSavedStationId()
|
||||
@ -255,11 +324,16 @@ async function printToStation() {
|
||||
return
|
||||
}
|
||||
|
||||
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
|
||||
try {
|
||||
const printPayload = {
|
||||
const printPayload: PrintSendParams = {
|
||||
type: 'express',
|
||||
computerId: String(printSettings.station),
|
||||
computerId: sid,
|
||||
printer,
|
||||
data: {
|
||||
waveGroups: props.payload.waveGroups || [],
|
||||
wave_ids: props.payload.wave_ids || [],
|
||||
@ -269,7 +343,7 @@ async function printToStation() {
|
||||
timestamp: String(Date.now()),
|
||||
count: 1
|
||||
}
|
||||
const res: any = await stationApi.sendPrint(printPayload as any)
|
||||
const res: any = await stationApi.sendPrint(printPayload)
|
||||
if (res && (res.code === 0 || res.code === 200 || res.flag === 'success' || res.status === 'success')) {
|
||||
ElMessage.success(res?.message || '已发送到打印台')
|
||||
return
|
||||
@ -469,6 +543,17 @@ function escapeHtml(s: string) {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
&__logistics {
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
&__sep-inline {
|
||||
color: #c0c4cc;
|
||||
margin: 0 6px;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
&__code {
|
||||
margin-left: 6px;
|
||||
color: #909399;
|
||||
|
||||
@ -430,6 +430,8 @@ export function unwrapWavePlatformPrintPayload(res: unknown): WavePlatformPrintD
|
||||
return {
|
||||
platform: platformObj.platform,
|
||||
platform_name: platformObj.platform_name,
|
||||
sys_logistics_name: platformObj.sys_logistics_name,
|
||||
logistics_name: platformObj.logistics_name,
|
||||
order_count: platformObj.order_count,
|
||||
orders: toOrderList(platformObj.orders)
|
||||
}
|
||||
|
||||
@ -185,6 +185,7 @@ const columns = computed(() => {
|
||||
const expiryIdx = cols.findIndex((x: any) => x.prop === 'expiry_date')
|
||||
for (let i = warningColumns.length - 1; i >= 0; i--) {
|
||||
const c = warningColumns[i]
|
||||
if (!c) continue
|
||||
if (cols.find((x: any) => x.prop === c.prop)) continue
|
||||
if (expiryIdx >= 0) cols.splice(expiryIdx + 1, 0, c)
|
||||
else cols.push(c)
|
||||
|
||||
@ -1,29 +1,130 @@
|
||||
<template>
|
||||
<div class="upper-table-container">
|
||||
<el-form ref="formRef" :model="formData" label-width="120px" :disabled="loading" :rules="rules">
|
||||
<el-form-item label="打印台名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入打印台名称" clearable />
|
||||
</el-form-item>
|
||||
<div class="add-print-station">
|
||||
<el-form
|
||||
ref="formRef"
|
||||
:model="formData"
|
||||
label-width="128px"
|
||||
label-position="right"
|
||||
:disabled="loading"
|
||||
:rules="rules"
|
||||
class="add-form"
|
||||
>
|
||||
<section class="add-section">
|
||||
<h3 class="add-section__title">基础信息</h3>
|
||||
<div class="add-section__grid">
|
||||
<el-form-item label="打印台名称" prop="name">
|
||||
<el-input v-model="formData.name" placeholder="请输入打印台名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="自定义条码" prop="custom_barcode">
|
||||
<el-input v-model="formData.custom_barcode" placeholder="可选" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="打印电脑" prop="computer_id" class="add-form__item-span2">
|
||||
<el-select
|
||||
v-model="formData.computer_id"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择打印电脑"
|
||||
class="add-form__control-wide"
|
||||
@change="onComputerChange"
|
||||
>
|
||||
<el-option v-for="c in computers" :key="c.id" :label="c.name || String(c.id)" :value="c.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<el-form-item label="打印电脑" prop="computer_id">
|
||||
<el-select v-model="formData.computer_id" filterable clearable placeholder="请选择打印电脑">
|
||||
<el-option v-for="c in computers" :key="c.id" :label="c.name || c.id" :value="c.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<section class="add-section">
|
||||
<h3 class="add-section__title">打印机与快递</h3>
|
||||
<el-form-item label="默认打印机" prop="default_printer_name">
|
||||
<el-select
|
||||
v-model="formData.default_printer_name"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请先选择打印电脑,再选本机打印机"
|
||||
class="add-form__control-wide"
|
||||
:loading="printerLoading"
|
||||
:disabled="!formData.computer_id"
|
||||
>
|
||||
<el-option v-for="p in printerOptions" :key="p.value" :label="p.label" :value="p.value" />
|
||||
</el-select>
|
||||
<!-- <div class="field-desc">未在下方单独配置的快递,将使用此处默认打印机。</div> -->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="自定义条码" prop="custom_barcode">
|
||||
<el-input v-model="formData.custom_barcode" placeholder="请输入自定义条码" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="快递绑定" class="add-form__item-block">
|
||||
<div class="array-editor">
|
||||
<div class="array-table">
|
||||
<div class="array-table__head">
|
||||
<div class="array-table__cell array-table__cell--express">快递公司</div>
|
||||
<div class="array-table__cell array-table__cell--printer">使用打印机</div>
|
||||
<div class="array-table__op">操作</div>
|
||||
</div>
|
||||
<div
|
||||
v-for="(bindRow, bindIdx) in expressBindRows"
|
||||
:key="`add-ex-${bindIdx}`"
|
||||
class="array-table__row"
|
||||
>
|
||||
<div class="array-table__cell array-table__cell--express">
|
||||
<el-select
|
||||
v-model="bindRow.expressId"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择快递"
|
||||
@visible-change="onExpressVisibleChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in expressOptions"
|
||||
:key="`ex-${bindIdx}-${item.value}`"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="array-table__cell array-table__cell--printer">
|
||||
<el-select
|
||||
v-model="bindRow.printerName"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="同默认打印机"
|
||||
:disabled="!formData.computer_id"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in printerOptions"
|
||||
:key="`pr-${bindIdx}-${item.value}`"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="array-table__op">
|
||||
<el-button type="danger" plain size="small" @click="removeExpressBindRow(bindIdx)">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-button type="primary" plain size="small" @click="addExpressBindRow">新增一项</el-button>
|
||||
<!-- <div class="field-desc">与属性页一致:每行绑定快递与打印机;留空「使用打印机」则使用上方默认打印机。</div> -->
|
||||
</div>
|
||||
</el-form-item>
|
||||
</section>
|
||||
|
||||
<el-form-item label="默认打印机" prop="default_printer_name">
|
||||
<el-input v-model="formData.default_printer_name" placeholder="请输入默认打印机" clearable />
|
||||
</el-form-item>
|
||||
<!-- <section class="add-section">
|
||||
<h3 class="add-section__title">高级</h3>
|
||||
<el-form-item label="主题配置" prop="subject_config_text" class="add-form__item-block">
|
||||
<el-input
|
||||
v-model="formData.subject_config_text"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
class="add-form__control-wide"
|
||||
placeholder="可选 JSON 对象;对应 print.add 的 subject_config"
|
||||
spellcheck="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
</section> -->
|
||||
</el-form>
|
||||
|
||||
<div class="bottom">
|
||||
<el-button-group class="toolbar-btn-group">
|
||||
<el-button type="primary" size="small" :icon="Check" @click="handleSave" title="保存">保存</el-button>
|
||||
<el-button type="danger" size="small" :icon="Refresh" @click="resetForm" title="重置">重置</el-button>
|
||||
<div class="add-footer">
|
||||
<el-button-group>
|
||||
<el-button type="primary" size="small" :icon="Check" :loading="loading" @click="handleSave">保存</el-button>
|
||||
<el-button type="danger" size="small" :icon="Refresh" @click="() => resetForm()">重置</el-button>
|
||||
</el-button-group>
|
||||
</div>
|
||||
</div>
|
||||
@ -34,39 +135,180 @@ import { ref, reactive, onMounted } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { Check, Refresh } from '@element-plus/icons-vue'
|
||||
import * as stationApi from '@/api/print/print'
|
||||
import { getExpressList } from '@/api/index/index'
|
||||
|
||||
const emit = defineEmits(['saved'])
|
||||
|
||||
const formRef = ref<any>(null)
|
||||
const loading = ref(false)
|
||||
const printerLoading = ref(false)
|
||||
|
||||
const formData = reactive({
|
||||
name: '',
|
||||
computer_id: '' as string | number | null,
|
||||
custom_barcode: '',
|
||||
default_printer_name: '' as string
|
||||
default_printer_name: '' as string,
|
||||
subject_config_text: '' as string
|
||||
})
|
||||
|
||||
type ExpressBindRow = { expressId: string; printerName: string }
|
||||
const expressBindRows = ref<ExpressBindRow[]>([])
|
||||
|
||||
const rules = {
|
||||
name: [{ required: true, message: '请输入打印台名称', trigger: 'blur' }],
|
||||
computer_id: [{ required: true, message: '请选择打印电脑', trigger: 'change' }]
|
||||
}
|
||||
|
||||
const computers = ref<Array<any>>([])
|
||||
const printerOptions = ref<Array<{ label: string; value: string }>>([])
|
||||
const expressOptions = ref<Array<{ label: string; value: string }>>([])
|
||||
|
||||
const okCode = (c: unknown) => c === 0 || c === 200 || c === 1
|
||||
|
||||
function unwrapExpressListPayload(data: unknown): any[] {
|
||||
if (Array.isArray(data)) return data
|
||||
if (data && typeof data === 'object') {
|
||||
const o = data as Record<string, unknown>
|
||||
if (Array.isArray(o.list)) return o.list
|
||||
if (Array.isArray(o.records)) return o.records
|
||||
if (Array.isArray(o.items)) return o.items
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
function mapExpressRowToSelectOption(it: unknown): { label: string; value: string } | null {
|
||||
if (it == null) return null
|
||||
if (typeof it === 'string') {
|
||||
const s = it.trim()
|
||||
return s ? { label: s, value: s } : null
|
||||
}
|
||||
if (typeof it !== 'object') {
|
||||
const s = String(it).trim()
|
||||
return s ? { label: s, value: s } : null
|
||||
}
|
||||
const row = it as Record<string, unknown>
|
||||
if (row.value !== undefined && row.label !== undefined) {
|
||||
const v = String(row.value ?? '').trim()
|
||||
const lab = String(row.label ?? '').trim()
|
||||
if (v) return { label: lab || v, value: v }
|
||||
}
|
||||
const idRaw = row.express_id ?? row.id ?? row.expressId
|
||||
const codeRaw = row.code ?? row.express_code ?? row.logistics_code
|
||||
const valueRaw =
|
||||
idRaw !== undefined && idRaw !== null && String(idRaw).trim() !== ''
|
||||
? idRaw
|
||||
: codeRaw !== undefined && codeRaw !== null && String(codeRaw).trim() !== ''
|
||||
? codeRaw
|
||||
: null
|
||||
if (valueRaw === null) return null
|
||||
const value = String(valueRaw).trim()
|
||||
if (!value) return null
|
||||
const nameRaw = row.name ?? row.express_name ?? row.logistics_name ?? row.title
|
||||
const name = nameRaw != null && String(nameRaw).trim() !== '' ? String(nameRaw).trim() : ''
|
||||
const codeStr =
|
||||
codeRaw !== undefined && codeRaw !== null && String(codeRaw).trim() !== '' ? String(codeRaw).trim() : ''
|
||||
let label = ''
|
||||
if (codeStr && name) label = `${codeStr} - ${name}`
|
||||
else if (name) label = name
|
||||
else if (codeStr) label = codeStr
|
||||
else label = value
|
||||
return { label, value }
|
||||
}
|
||||
|
||||
async function loadExpressOptions() {
|
||||
try {
|
||||
const res: any = await getExpressList({ systemOnly: true })
|
||||
if (res && okCode(res.code)) {
|
||||
const list = unwrapExpressListPayload(res.data)
|
||||
expressOptions.value = list.map(mapExpressRowToSelectOption).filter(Boolean) as Array<{ label: string; value: string }>
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载快递列表失败', e)
|
||||
}
|
||||
}
|
||||
|
||||
const onExpressVisibleChange = (visible: boolean) => {
|
||||
if (visible) void loadExpressOptions()
|
||||
}
|
||||
|
||||
function addExpressBindRow() {
|
||||
expressBindRows.value.push({ expressId: '', printerName: '' })
|
||||
}
|
||||
|
||||
function removeExpressBindRow(idx: number) {
|
||||
expressBindRows.value.splice(idx, 1)
|
||||
}
|
||||
|
||||
function pickNewStationId(res: any): number | null {
|
||||
const d = res?.data
|
||||
if (d == null || typeof d !== 'object') return null
|
||||
if (d.id != null) {
|
||||
const n = Number(d.id)
|
||||
if (Number.isFinite(n)) return n
|
||||
}
|
||||
const inner = (d as any).data ?? (d as any).item ?? (d as any).record
|
||||
if (inner && typeof inner === 'object' && inner.id != null) {
|
||||
const n = Number(inner.id)
|
||||
if (Number.isFinite(n)) return n
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
function buildExpressPayload(): Array<Record<string, unknown>> {
|
||||
const def = String(formData.default_printer_name ?? '').trim()
|
||||
const out: Array<Record<string, unknown>> = []
|
||||
for (const row of expressBindRows.value) {
|
||||
const eid = String(row.expressId ?? '').trim()
|
||||
if (!eid) continue
|
||||
const num = Number(eid)
|
||||
const express_id = Number.isFinite(num) ? num : eid
|
||||
const pn = String(row.printerName ?? '').trim()
|
||||
const name = pn || def || ''
|
||||
out.push({ express_id, name })
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
const loadComputers = async () => {
|
||||
try {
|
||||
const res: any = await stationApi.getComputer()
|
||||
if (res && okCode(res.code)) {
|
||||
computers.value = res.data || []
|
||||
computers.value = Array.isArray(res.data) ? res.data : []
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载打印电脑失败', e)
|
||||
}
|
||||
}
|
||||
|
||||
const loadPrintersForComputer = async (computerId: string | number | null) => {
|
||||
printerOptions.value = []
|
||||
formData.default_printer_name = ''
|
||||
if (computerId === null || computerId === undefined || computerId === '') return
|
||||
printerLoading.value = true
|
||||
try {
|
||||
const res: any = await stationApi.getComputerPrinter(computerId)
|
||||
if (!res || !okCode(res.code)) return
|
||||
const raw = res.data
|
||||
const list = Array.isArray(raw) ? raw : []
|
||||
printerOptions.value = list.map((it: any) => {
|
||||
if (typeof it === 'string') return { label: it, value: it }
|
||||
if (it.id !== undefined && it.name !== undefined) return { label: String(it.name), value: String(it.id) }
|
||||
if (it.name !== undefined) return { label: String(it.name), value: String(it.name) }
|
||||
if (it.value !== undefined && it.label !== undefined) return { label: String(it.label), value: String(it.value) }
|
||||
return { label: JSON.stringify(it), value: JSON.stringify(it) }
|
||||
})
|
||||
} catch (e) {
|
||||
console.error('加载打印机列表失败', e)
|
||||
} finally {
|
||||
printerLoading.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const onComputerChange = () => {
|
||||
expressBindRows.value = []
|
||||
void loadPrintersForComputer(formData.computer_id)
|
||||
}
|
||||
|
||||
const handleSave = async () => {
|
||||
if (!formRef.value) return
|
||||
await formRef.value.validate(async (valid: boolean) => {
|
||||
@ -74,30 +316,90 @@ const handleSave = async () => {
|
||||
ElMessage.warning('请检查表单填写')
|
||||
return
|
||||
}
|
||||
loading.value = true
|
||||
try {
|
||||
const cid = Number(formData.computer_id)
|
||||
if (!Number.isFinite(cid)) {
|
||||
ElMessage.warning('请选择有效的打印电脑')
|
||||
loading.value = false
|
||||
|
||||
const expressNow = expressBindRows.value.some((r) => String(r.expressId ?? '').trim() !== '')
|
||||
const printerNow = String(formData.default_printer_name ?? '').trim()
|
||||
if (expressNow && !printerNow) {
|
||||
ElMessage.warning('已配置快递绑定时,请先选择默认打印机')
|
||||
return
|
||||
}
|
||||
for (const row of expressBindRows.value) {
|
||||
const eid = String(row.expressId ?? '').trim()
|
||||
if (!eid) continue
|
||||
const pn = String(row.printerName ?? '').trim()
|
||||
if (!pn && !printerNow) {
|
||||
ElMessage.warning('请为已选快递指定「使用打印机」,或先选择默认打印机')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let subject_config: Record<string, unknown> | undefined
|
||||
const scRaw = String(formData.subject_config_text ?? '').trim()
|
||||
if (scRaw) {
|
||||
try {
|
||||
const parsed = JSON.parse(scRaw) as unknown
|
||||
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
||||
ElMessage.warning('主题配置须为 JSON 对象')
|
||||
return
|
||||
}
|
||||
const payload: Record<string, unknown> = {
|
||||
name: formData.name.trim(),
|
||||
computer_id: cid
|
||||
}
|
||||
const bc = formData.custom_barcode?.trim()
|
||||
if (bc) payload.custom_barcode = bc
|
||||
const dp = formData.default_printer_name?.trim()
|
||||
if (dp) payload.default_printer_name = dp
|
||||
const res: any = await stationApi.add(payload)
|
||||
if (res && okCode(res.code)) {
|
||||
ElMessage.success('添加成功')
|
||||
emit('saved')
|
||||
resetForm()
|
||||
} else {
|
||||
ElMessage.error((res && (res.msg || res.message)) || '添加失败')
|
||||
subject_config = parsed as Record<string, unknown>
|
||||
} catch {
|
||||
ElMessage.warning('主题配置 JSON 格式无效')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
loading.value = true
|
||||
try {
|
||||
const cid = Number(formData.computer_id)
|
||||
if (!Number.isFinite(cid)) {
|
||||
ElMessage.warning('请选择有效的打印电脑')
|
||||
return
|
||||
}
|
||||
const payload: Record<string, unknown> = {
|
||||
name: formData.name.trim(),
|
||||
computer_id: cid
|
||||
}
|
||||
const bc = formData.custom_barcode?.trim()
|
||||
if (bc) payload.custom_barcode = bc
|
||||
const dp = formData.default_printer_name?.trim()
|
||||
if (dp) payload.default_printer_name = dp
|
||||
if (subject_config !== undefined) payload.subject_config = subject_config
|
||||
|
||||
const res: any = await stationApi.add(payload)
|
||||
if (!res || !okCode(res.code)) {
|
||||
ElMessage.error((res && (res.msg || res.message)) || '添加失败')
|
||||
return
|
||||
}
|
||||
|
||||
const newId = pickNewStationId(res)
|
||||
const defaultPrinter = String(formData.default_printer_name ?? '').trim()
|
||||
const expressPayload = buildExpressPayload()
|
||||
|
||||
if (newId != null && defaultPrinter) {
|
||||
try {
|
||||
const bindRes: any = await stationApi.savePrinters({
|
||||
defaultPrinter,
|
||||
express: expressPayload,
|
||||
print_station_id: newId
|
||||
})
|
||||
if (!okCode(bindRes?.code)) {
|
||||
ElMessage.warning(
|
||||
(bindRes && (bindRes.msg || bindRes.message)) ||
|
||||
'打印台已创建,但打印机与快递绑定保存失败,请在详情中重试'
|
||||
)
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e)
|
||||
ElMessage.warning('打印台已创建,但打印机与快递绑定请求失败,请在详情中重试')
|
||||
}
|
||||
} else if (newId != null && expressPayload.length > 0 && !defaultPrinter) {
|
||||
ElMessage.warning('打印台已创建,但未保存快递绑定(需先选择默认打印机)')
|
||||
}
|
||||
|
||||
ElMessage.success('添加成功')
|
||||
emit('saved')
|
||||
resetForm(false)
|
||||
} catch (e: any) {
|
||||
console.error('添加打印台失败', e)
|
||||
ElMessage.error(e.message || '添加打印台失败')
|
||||
@ -107,41 +409,171 @@ const handleSave = async () => {
|
||||
})
|
||||
}
|
||||
|
||||
const resetForm = () => {
|
||||
const resetForm = (showTip = true) => {
|
||||
formData.name = ''
|
||||
formData.computer_id = null
|
||||
formData.custom_barcode = ''
|
||||
formData.default_printer_name = ''
|
||||
formData.subject_config_text = ''
|
||||
expressBindRows.value = []
|
||||
printerOptions.value = []
|
||||
if (formRef.value) formRef.value.resetFields()
|
||||
ElMessage.info('表单已重置')
|
||||
if (showTip) ElMessage.info('表单已重置')
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
loadComputers()
|
||||
void loadExpressOptions()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.upper-table-container {
|
||||
height: 100%;
|
||||
.add-print-station {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20px;
|
||||
height: 100%;
|
||||
min-height: 0;
|
||||
padding: 16px 20px 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.el-form {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 20px;
|
||||
.add-form {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow-y: auto;
|
||||
padding-bottom: 16px;
|
||||
max-width: 720px;
|
||||
}
|
||||
|
||||
.add-section {
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.add-section:last-of-type {
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.add-section__title {
|
||||
margin: 0 0 12px;
|
||||
padding-bottom: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.add-section__grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 4px 20px;
|
||||
}
|
||||
|
||||
@media (max-width: 560px) {
|
||||
.add-section__grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.bottom {
|
||||
height: 40px;
|
||||
background-color: #fff;
|
||||
.add-form__item-span2 {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
|
||||
.add-form__item-block :deep(.el-form-item__content) {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.add-form__control-wide {
|
||||
width: 100%;
|
||||
max-width: 520px;
|
||||
}
|
||||
|
||||
.add-form .el-form-item {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.field-desc {
|
||||
margin-top: 6px;
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
line-height: 1.5;
|
||||
max-width: 640px;
|
||||
}
|
||||
|
||||
.array-editor {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
max-width: 640px;
|
||||
}
|
||||
|
||||
.array-table {
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
background: #fafbfc;
|
||||
}
|
||||
|
||||
.array-table__head,
|
||||
.array-table__row {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
min-width: max-content;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.array-table__head {
|
||||
background: #f5f7fa;
|
||||
font-size: 12px;
|
||||
color: #606266;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.array-table__row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.array-table__cell,
|
||||
.array-table__op {
|
||||
padding: 10px 12px;
|
||||
border-right: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.array-table__cell--express {
|
||||
flex: 0 0 200px;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.array-table__cell--printer {
|
||||
flex: 0 0 220px;
|
||||
min-width: 220px;
|
||||
}
|
||||
|
||||
.array-table__cell:last-child,
|
||||
.array-table__op:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.array-table__op {
|
||||
flex: 0 0 84px;
|
||||
min-width: 84px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.array-editor :deep(.el-select) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.add-footer {
|
||||
flex-shrink: 0;
|
||||
padding: 12px 0 16px;
|
||||
border-top: 1px solid #ebeef5;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-top: 10px;
|
||||
background: #fff;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@ -1,45 +1,129 @@
|
||||
<template>
|
||||
<div class="print-station-info">
|
||||
<div class="left-col">
|
||||
<el-form :model="form" ref="formRef" label-width="120px" :disabled="loading" class="info-form">
|
||||
<el-form-item label="打印台名称" prop="name">
|
||||
<el-input v-model="form.name" />
|
||||
</el-form-item>
|
||||
<div class="print-station-info__main">
|
||||
<el-form
|
||||
:model="form"
|
||||
ref="formRef"
|
||||
label-width="128px"
|
||||
label-position="right"
|
||||
:disabled="loading"
|
||||
class="info-form"
|
||||
>
|
||||
<section class="info-section">
|
||||
<h3 class="info-section__title">基础信息</h3>
|
||||
<div class="info-section__grid">
|
||||
<el-form-item label="打印台名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="打印台名称" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="自定义条码" prop="custom_barcode">
|
||||
<el-input v-model="form.custom_barcode" placeholder="可选" clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="打印电脑" prop="computer_id" class="info-form__item-span2">
|
||||
<el-select
|
||||
v-model="form.computer_id"
|
||||
placeholder="请选择打印电脑"
|
||||
clearable
|
||||
filterable
|
||||
class="info-form__control-wide"
|
||||
@visible-change="onComputerVisibleChange"
|
||||
>
|
||||
<el-option v-for="item in computerOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<el-form-item label="自定义条码" prop="custom_barcode">
|
||||
<el-input v-model="form.custom_barcode" />
|
||||
</el-form-item>
|
||||
<section class="info-section">
|
||||
<h3 class="info-section__title">打印机与快递</h3>
|
||||
<el-form-item label="默认打印机" prop="printer_id">
|
||||
<el-select
|
||||
v-model="form.printer_id"
|
||||
placeholder="请先选择电脑,再选本机打印机"
|
||||
clearable
|
||||
filterable
|
||||
class="info-form__control-wide"
|
||||
@visible-change="onPrinterVisibleChange"
|
||||
>
|
||||
<el-option v-for="item in printerOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
<!-- <div class="field-desc">未在下方单独配置的快递,将使用此处默认打印机出单。</div> -->
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="打印电脑" prop="computer_id">
|
||||
<el-select v-model="form.computer_id" placeholder="请选择打印电脑" clearable
|
||||
@visible-change="onComputerVisibleChange">
|
||||
<el-option v-for="item in computerOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="快递绑定" class="info-form__item-block">
|
||||
<div class="array-editor">
|
||||
<div class="array-table">
|
||||
<div class="array-table__head">
|
||||
<div class="array-table__cell array-table__cell--express">快递公司</div>
|
||||
<div class="array-table__cell array-table__cell--printer">使用打印机</div>
|
||||
<div class="array-table__op">操作</div>
|
||||
</div>
|
||||
<div
|
||||
v-for="(bindRow, bindIdx) in expressBindRows"
|
||||
:key="`express-bind-${bindIdx}`"
|
||||
class="array-table__row"
|
||||
>
|
||||
<div class="array-table__cell array-table__cell--express">
|
||||
<el-select
|
||||
v-model="bindRow.expressId"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择快递"
|
||||
@visible-change="onExpressVisibleChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in expressOptions"
|
||||
:key="`ex-${bindIdx}-${item.value}`"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="array-table__cell array-table__cell--printer">
|
||||
<el-select
|
||||
v-model="bindRow.printerName"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="同默认打印机"
|
||||
:disabled="!form.computer_id"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in printerOptions"
|
||||
:key="`pr-${bindIdx}-${item.value}`"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<div class="array-table__op">
|
||||
<el-button type="danger" plain size="small" @click="removeExpressBindRow(bindIdx)">删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-button type="primary" plain size="small" @click="addExpressBindRow">新增一项</el-button>
|
||||
<!-- <div class="field-desc">
|
||||
多行配置:每行指定快递使用的本机打印机;「使用打印机」留空则该行使用上方默认打印机。
|
||||
</div> -->
|
||||
</div>
|
||||
</el-form-item>
|
||||
</section>
|
||||
|
||||
<el-form-item label="默认打印机" prop="printer_id">
|
||||
<el-select v-model="form.printer_id" placeholder="请先选择电脑,再选本机打印机" clearable filterable
|
||||
@visible-change="onPrinterVisibleChange">
|
||||
<el-option v-for="item in printerOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="快递绑定" prop="express_company">
|
||||
<el-select v-model="form.express_company" placeholder="可选:与默认打印机绑定" clearable filterable
|
||||
@visible-change="onExpressVisibleChange">
|
||||
<el-option v-for="item in expressOptions" :key="item.value" :label="item.label" :value="item.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="默认打印机">
|
||||
<el-input v-model="form.default_printer_name" />
|
||||
</el-form-item> -->
|
||||
<!-- <section class="info-section">
|
||||
<h3 class="info-section__title">高级</h3>
|
||||
<el-form-item label="主题配置" prop="subject_config_text" class="info-form__item-block">
|
||||
<el-input
|
||||
v-model="form.subject_config_text"
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
class="info-form__control-wide"
|
||||
placeholder='可选 JSON 对象;留空则不修改服务端已有 subject_config'
|
||||
spellcheck="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
</section> -->
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<div class="middle-col"></div>
|
||||
|
||||
<aside class="right-col">
|
||||
<aside class="print-station-info__side">
|
||||
<div class="right-panel">
|
||||
<div class="panel-item">
|
||||
<div class="panel-label">仓库 ID</div>
|
||||
@ -49,9 +133,8 @@
|
||||
<div class="panel-label">创建人</div>
|
||||
<div class="panel-value">{{ data.creator_name }}</div>
|
||||
</div>
|
||||
|
||||
<div class="panel-actions">
|
||||
<el-button type="primary" @click="handleSave" :loading="saveLoading">保存</el-button>
|
||||
<el-button type="primary" class="panel-save" @click="handleSave" :loading="saveLoading">保存</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</aside>
|
||||
@ -113,9 +196,14 @@ const form = ref({
|
||||
custom_barcode: '',
|
||||
default_printer_name: '',
|
||||
computer_id: '',
|
||||
express_company: '',
|
||||
printer_id: ''
|
||||
printer_id: '',
|
||||
/** print.updateItem / print.add 的 subject_config,编辑为 JSON 文本 */
|
||||
subject_config_text: ''
|
||||
})
|
||||
|
||||
/** 快递 → 打印机绑定行(与 basicManagement 中 array-table 编辑方式一致) */
|
||||
type ExpressBindRow = { expressId: string; printerName: string }
|
||||
const expressBindRows = ref<ExpressBindRow[]>([])
|
||||
const saveLoading = ref(false)
|
||||
|
||||
/** 避免 getData 与「切换行」并发时旧请求覆盖新表单 */
|
||||
@ -191,6 +279,10 @@ function seedFormFromTableRow(row: Record<string, any>) {
|
||||
rawCid !== undefined && rawCid !== null && String(rawCid).trim() !== ''
|
||||
? String(rawCid).trim()
|
||||
: ''
|
||||
const listDef = String(n.default_printer_name ?? '').trim()
|
||||
if (listDef) {
|
||||
form.value.default_printer_name = listDef
|
||||
}
|
||||
if (form.value.computer_id) {
|
||||
ensureComputerOption(form.value.computer_id)
|
||||
}
|
||||
@ -212,12 +304,13 @@ const getComputers = async () => {
|
||||
try {
|
||||
const res: any = await stationApi.getComputer()
|
||||
if (res && okCode(res.code)) {
|
||||
const list = res.data || []
|
||||
const list = Array.isArray(res.data) ? res.data : []
|
||||
computerOptions.value = list.map((it: any) => {
|
||||
if (typeof it === 'string') return { label: it, value: it }
|
||||
if (it.id !== undefined && it.name !== undefined) return { label: it.name, value: String(it.id) }
|
||||
if (it.value !== undefined && it.label !== undefined) return { label: it.label, value: it.value }
|
||||
return { label: String(it), value: String(it) }
|
||||
if (it.id !== undefined && it.name !== undefined) return { label: String(it.name), value: String(it.id) }
|
||||
if (it.value !== undefined && it.label !== undefined) return { label: String(it.label), value: String(it.value) }
|
||||
if (it.name !== undefined) return { label: String(it.name), value: String(it.id ?? it.name) }
|
||||
return { label: JSON.stringify(it), value: JSON.stringify(it) }
|
||||
})
|
||||
}
|
||||
} catch (e) {
|
||||
@ -226,17 +319,67 @@ const getComputers = async () => {
|
||||
}
|
||||
|
||||
const expressOptions = ref<Array<{ label: string; value: string }>>([])
|
||||
|
||||
/** index.getExpressList 常见返回:data 为数组,或 { list | records };项上多为 express_id/id、express_code/code、express_name/name */
|
||||
function unwrapExpressListPayload(data: unknown): any[] {
|
||||
if (Array.isArray(data)) return data
|
||||
if (data && typeof data === 'object') {
|
||||
const o = data as Record<string, unknown>
|
||||
if (Array.isArray(o.list)) return o.list
|
||||
if (Array.isArray(o.records)) return o.records
|
||||
if (Array.isArray(o.items)) return o.items
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
function mapExpressRowToSelectOption(it: unknown): { label: string; value: string } | null {
|
||||
if (it == null) return null
|
||||
if (typeof it === 'string') {
|
||||
const s = it.trim()
|
||||
return s ? { label: s, value: s } : null
|
||||
}
|
||||
if (typeof it !== 'object') {
|
||||
const s = String(it).trim()
|
||||
return s ? { label: s, value: s } : null
|
||||
}
|
||||
const row = it as Record<string, unknown>
|
||||
if (row.value !== undefined && row.label !== undefined) {
|
||||
const v = String(row.value ?? '').trim()
|
||||
const lab = String(row.label ?? '').trim()
|
||||
if (v) return { label: lab || v, value: v }
|
||||
}
|
||||
const idRaw = row.express_id ?? row.id ?? row.expressId
|
||||
const codeRaw = row.code ?? row.express_code ?? row.logistics_code
|
||||
const valueRaw =
|
||||
idRaw !== undefined && idRaw !== null && String(idRaw).trim() !== ''
|
||||
? idRaw
|
||||
: codeRaw !== undefined && codeRaw !== null && String(codeRaw).trim() !== ''
|
||||
? codeRaw
|
||||
: null
|
||||
if (valueRaw === null) return null
|
||||
const value = String(valueRaw).trim()
|
||||
if (!value) return null
|
||||
|
||||
const nameRaw = row.name ?? row.express_name ?? row.logistics_name ?? row.title
|
||||
const name = nameRaw != null && String(nameRaw).trim() !== '' ? String(nameRaw).trim() : ''
|
||||
const codeStr =
|
||||
codeRaw !== undefined && codeRaw !== null && String(codeRaw).trim() !== '' ? String(codeRaw).trim() : ''
|
||||
let label = ''
|
||||
if (codeStr && name) label = `${codeStr} - ${name}`
|
||||
else if (name) label = name
|
||||
else if (codeStr) label = codeStr
|
||||
else label = value
|
||||
|
||||
return { label, value }
|
||||
}
|
||||
|
||||
const loadExpressOptions = async () => {
|
||||
try {
|
||||
const res: any = await getExpressList({ systemOnly: true })
|
||||
if (res && okCode(res.code)) {
|
||||
const list = res.data || []
|
||||
expressOptions.value = list.map((it: any) => {
|
||||
if (typeof it === 'string') return { label: it, value: it }
|
||||
if (it.id !== undefined && it.name !== undefined) return { label: it.name, value: String(it.id) }
|
||||
if (it.value !== undefined && it.label !== undefined) return { label: it.label, value: it.value }
|
||||
return { label: String(it), value: String(it) }
|
||||
})
|
||||
const list = unwrapExpressListPayload(res.data)
|
||||
const mapped = list.map(mapExpressRowToSelectOption).filter(Boolean) as Array<{ label: string; value: string }>
|
||||
expressOptions.value = mapped
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Failed to fetch express companies', e)
|
||||
@ -244,7 +387,72 @@ const loadExpressOptions = async () => {
|
||||
}
|
||||
|
||||
const onExpressVisibleChange = (visible: boolean) => {
|
||||
if (visible && expressOptions.value.length === 0) loadExpressOptions()
|
||||
if (visible) void loadExpressOptions()
|
||||
}
|
||||
|
||||
function addExpressBindRow() {
|
||||
expressBindRows.value.push({ expressId: '', printerName: '' })
|
||||
}
|
||||
|
||||
function removeExpressBindRow(idx: number) {
|
||||
expressBindRows.value.splice(idx, 1)
|
||||
}
|
||||
|
||||
/** 从详情/列表记录中取快递绑定数组:优先 express_bind_printer,其次 subject_config 内,最后兼容 express */
|
||||
function pickExpressBindSourceArray(record: Record<string, any> | null | undefined): any[] {
|
||||
if (!record || typeof record !== 'object') return []
|
||||
const top = record.express_bind_printer
|
||||
if (Array.isArray(top) && top.length) return top
|
||||
const sc = record.subject_config
|
||||
if (sc && typeof sc === 'object' && !Array.isArray(sc)) {
|
||||
const nested = (sc as Record<string, unknown>).express_bind_printer
|
||||
if (Array.isArray(nested) && nested.length) return nested as any[]
|
||||
}
|
||||
const legacy = record.express
|
||||
if (Array.isArray(legacy) && legacy.length) return legacy
|
||||
return []
|
||||
}
|
||||
|
||||
function mapExpressBindItemToRow(it: any): ExpressBindRow {
|
||||
const expressId = String(
|
||||
it?.express_id ?? it?.expressId ?? it?.express_code ?? it?.code ?? it?.id ?? ''
|
||||
).trim()
|
||||
const printerName = String(
|
||||
it?.printer_name ?? it?.printerName ?? it?.name ?? it?.bind_printer ?? it?.default_printer_name ?? ''
|
||||
).trim()
|
||||
return { expressId, printerName }
|
||||
}
|
||||
|
||||
function syncExpressRowsFromRecord(record: Record<string, any>) {
|
||||
const arr = pickExpressBindSourceArray(record)
|
||||
if (!arr.length) {
|
||||
expressBindRows.value = []
|
||||
return
|
||||
}
|
||||
expressBindRows.value = arr.map(mapExpressBindItemToRow).filter((r) => r.expressId !== '')
|
||||
}
|
||||
|
||||
function snapshotExpressBindForList(): Array<{ express_code: string; printer_name: string }> {
|
||||
const def = String(form.value.printer_id ?? '').trim()
|
||||
return expressBindRows.value
|
||||
.filter((r) => String(r.expressId ?? '').trim() !== '')
|
||||
.map((r) => ({
|
||||
express_code: String(r.expressId).trim(),
|
||||
printer_name: String(r.printerName ?? '').trim() || def
|
||||
}))
|
||||
}
|
||||
|
||||
function hasStoredExpressBind(d: Record<string, any> | null | undefined): boolean {
|
||||
if (!d || typeof d !== 'object') return false
|
||||
const check = (arr: unknown) =>
|
||||
Array.isArray(arr) && arr.some((x: any) => String(x?.express_id ?? x?.express_code ?? x?.id ?? '').trim() !== '')
|
||||
if (check(d.express_bind_printer)) return true
|
||||
const sc = d.subject_config
|
||||
if (sc && typeof sc === 'object' && !Array.isArray(sc)) {
|
||||
if (check((sc as Record<string, unknown>).express_bind_printer)) return true
|
||||
}
|
||||
if (check(d.express)) return true
|
||||
return false
|
||||
}
|
||||
|
||||
const printerOptions = ref<Array<{ label: string; value: string }>>([])
|
||||
@ -260,7 +468,8 @@ const getComputerPrinter = async (id: any) => {
|
||||
try {
|
||||
const res: any = await stationApi.getComputerPrinter(targetId)
|
||||
if (res && okCode(res.code)) {
|
||||
const list = res.data || []
|
||||
const raw = res.data
|
||||
const list = Array.isArray(raw) ? raw : []
|
||||
printerOptions.value = list.map((it: any) => {
|
||||
if (typeof it === 'string') return { label: it, value: it }
|
||||
if (it.id !== undefined && it.name !== undefined) return { label: it.name, value: String(it.id) }
|
||||
@ -279,6 +488,49 @@ const getComputerPrinter = async (id: any) => {
|
||||
}
|
||||
}
|
||||
|
||||
/** 将 print.getList / getItem 的 default_printer_name 对齐到 el-select 的 value(与 printerOptions 一致) */
|
||||
function matchPrinterSelectValue(raw: string, options: Array<{ label: string; value: string }>): string {
|
||||
const want = String(raw ?? '').trim()
|
||||
if (!want || !options.length) return ''
|
||||
if (options.some((o) => o.value === want)) return want
|
||||
const byLabel = options.find((o) => String(o.label).trim() === want)
|
||||
if (byLabel) return byLabel.value
|
||||
const byValueLoose = options.find((o) => String(o.value).trim() === want)
|
||||
if (byValueLoose) return byValueLoose.value
|
||||
return ''
|
||||
}
|
||||
|
||||
function ensurePrinterOptionForDefault(rawName: string) {
|
||||
const want = String(rawName ?? '').trim()
|
||||
if (!want) return
|
||||
if (printerOptions.value.some((o) => o.value === want || String(o.label).trim() === want)) return
|
||||
printerOptions.value = [...printerOptions.value, { label: want, value: want }]
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认打印机:优先 print.getItem 的 default_printer_name;为空则回退 print.getList 当前行(tableRow)
|
||||
*/
|
||||
function applyDefaultPrinterFromSources(record: Record<string, any>) {
|
||||
const recordDef = String(record?.default_printer_name ?? '').trim()
|
||||
let listDef = ''
|
||||
const tr = props.tableRow as Record<string, any> | null | undefined
|
||||
if (tr && rowMatchesPropsId(tr, props.id)) {
|
||||
listDef = String(normalizeStationRecord(tr).default_printer_name ?? '').trim()
|
||||
}
|
||||
const source = recordDef || listDef || String(form.value.default_printer_name ?? '').trim()
|
||||
if (!source) {
|
||||
form.value.printer_id = ''
|
||||
return
|
||||
}
|
||||
const matched = matchPrinterSelectValue(source, printerOptions.value)
|
||||
if (matched) {
|
||||
form.value.printer_id = matched
|
||||
return
|
||||
}
|
||||
ensurePrinterOptionForDefault(source)
|
||||
form.value.printer_id = matchPrinterSelectValue(source, printerOptions.value) || source
|
||||
}
|
||||
|
||||
|
||||
|
||||
// api接口
|
||||
@ -315,6 +567,17 @@ const getData = async () => {
|
||||
form.value.default_printer_name = String(record.default_printer_name)
|
||||
}
|
||||
|
||||
const sc = record.subject_config
|
||||
if (sc && typeof sc === 'object' && !Array.isArray(sc)) {
|
||||
try {
|
||||
form.value.subject_config_text = JSON.stringify(sc, null, 2)
|
||||
} catch {
|
||||
form.value.subject_config_text = ''
|
||||
}
|
||||
} else {
|
||||
form.value.subject_config_text = ''
|
||||
}
|
||||
|
||||
const rawCid = record.computer_id ?? record.computerId
|
||||
if (rawCid !== undefined && rawCid !== null && String(rawCid).trim() !== '') {
|
||||
form.value.computer_id = String(rawCid).trim()
|
||||
@ -325,20 +588,20 @@ const getData = async () => {
|
||||
if (form.value.computer_id) {
|
||||
await getComputerPrinter(form.value.computer_id)
|
||||
if (seq !== loadDetailSeq) return
|
||||
const defName = record.default_printer_name
|
||||
form.value.printer_id = defName != null && defName !== '' ? String(defName) : ''
|
||||
applyDefaultPrinterFromSources(record)
|
||||
} else {
|
||||
printerOptions.value = []
|
||||
form.value.printer_id = ''
|
||||
}
|
||||
|
||||
const ex = record.express
|
||||
if (Array.isArray(ex) && ex.length > 0) {
|
||||
const first = ex[0]
|
||||
form.value.express_company = String(first?.express_id ?? first?.id ?? first?.expressId ?? '')
|
||||
} else {
|
||||
form.value.express_company = ''
|
||||
syncExpressRowsFromRecord(record)
|
||||
if (!expressBindRows.value.length) {
|
||||
const tr = props.tableRow as Record<string, any> | null | undefined
|
||||
if (tr && rowMatchesPropsId(tr, props.id)) {
|
||||
syncExpressRowsFromRecord(normalizeStationRecord(tr))
|
||||
}
|
||||
}
|
||||
void loadExpressOptions()
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch item:', error)
|
||||
} finally {
|
||||
@ -370,42 +633,36 @@ const hasName = async (name: string, id?: string | number) => {
|
||||
}
|
||||
}
|
||||
|
||||
/** print.savePrinters.express:每项 express_id + name(该快递使用的打印机名);未选打印机时用默认打印机 */
|
||||
const buildExpressPayload = (): Array<Record<string, unknown>> => {
|
||||
if (form.value.express_company) {
|
||||
const eid = form.value.express_company
|
||||
const def = String(form.value.printer_id ?? '').trim()
|
||||
const out: Array<Record<string, unknown>> = []
|
||||
for (const row of expressBindRows.value) {
|
||||
const eid = String(row.expressId ?? '').trim()
|
||||
if (!eid) continue
|
||||
const num = Number(eid)
|
||||
const express_id = Number.isFinite(num) ? num : String(eid)
|
||||
return [{ express_id, name: String(form.value.printer_id || '') }]
|
||||
const express_id = Number.isFinite(num) ? num : eid
|
||||
const pn = String(row.printerName ?? '').trim()
|
||||
const name = pn || def || ''
|
||||
out.push({ express_id, name })
|
||||
}
|
||||
const sourceExpress = Array.isArray(props.express) && props.express.length > 0
|
||||
? props.express
|
||||
: Array.isArray(data.value?.express)
|
||||
? data.value.express
|
||||
: []
|
||||
return sourceExpress.map((it: any) => {
|
||||
const rawId = it?.express_id ?? it?.id ?? it?.expressId ?? it?.value ?? ''
|
||||
const numId = Number(rawId)
|
||||
const express_id = Number.isFinite(numId) ? numId : String(rawId)
|
||||
const name = it?.name ?? it?.printer_name ?? it?.default_printer_name ?? it?.label ?? ''
|
||||
return { express_id, name: String(name) }
|
||||
}).filter((e: Record<string, unknown>) => {
|
||||
const id = e.express_id
|
||||
const hasId = id !== '' && id != null
|
||||
const hasName = String(e.name ?? '').trim() !== ''
|
||||
return hasId || hasName
|
||||
})
|
||||
return out
|
||||
}
|
||||
|
||||
const persistPrinterBindings = async () => {
|
||||
const sid = Number(props.id)
|
||||
if (!Number.isFinite(sid)) return false
|
||||
const defaultPrinter = String(form.value.printer_id ?? '').trim()
|
||||
if (!defaultPrinter) {
|
||||
ElMessage.warning('保存打印机与快递绑定须先选择默认打印机(print.savePrinters 要求 defaultPrinter)')
|
||||
return false
|
||||
}
|
||||
const expressPayload = buildExpressPayload()
|
||||
try {
|
||||
const res: any = await stationApi.savePrinters({
|
||||
defaultPrinter,
|
||||
print_station_id: sid,
|
||||
express: Array.isArray(expressPayload) ? expressPayload : []
|
||||
express: expressPayload
|
||||
})
|
||||
if (!okCode(res?.code)) {
|
||||
ElMessage.error((res && (res.msg || res.message)) || '打印机与快递绑定保存失败')
|
||||
@ -414,10 +671,18 @@ const persistPrinterBindings = async () => {
|
||||
if (!data.value) data.value = {}
|
||||
data.value.default_printer_name = defaultPrinter
|
||||
data.value.express = expressPayload
|
||||
const bindSnap = snapshotExpressBindForList()
|
||||
data.value.express_bind_printer = bindSnap
|
||||
const sc = data.value.subject_config
|
||||
if (sc && typeof sc === 'object' && !Array.isArray(sc)) {
|
||||
data.value.subject_config = { ...(sc as Record<string, unknown>), express_bind_printer: bindSnap }
|
||||
}
|
||||
emit('updated', {
|
||||
id: props.id,
|
||||
default_printer_name: defaultPrinter,
|
||||
express: expressPayload
|
||||
express: expressPayload,
|
||||
express_bind_printer: bindSnap,
|
||||
subject_config: data.value.subject_config
|
||||
})
|
||||
return true
|
||||
} catch (e) {
|
||||
@ -436,16 +701,53 @@ const handleSave = async () => {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
const expressNow = expressBindRows.value.some((r) => String(r.expressId ?? '').trim() !== '')
|
||||
const printerNow = String(form.value.printer_id ?? '').trim()
|
||||
if (expressNow && !printerNow) {
|
||||
ElMessage.warning('已配置快递绑定时,请先选择默认打印机')
|
||||
return
|
||||
}
|
||||
for (const row of expressBindRows.value) {
|
||||
const eid = String(row.expressId ?? '').trim()
|
||||
if (!eid) continue
|
||||
const pn = String(row.printerName ?? '').trim()
|
||||
if (!pn && !printerNow) {
|
||||
ElMessage.warning('请为已选快递指定「使用打印机」,或先选择默认打印机')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
let subject_config: Record<string, unknown> | undefined
|
||||
const scRaw = String(form.value.subject_config_text ?? '').trim()
|
||||
if (scRaw) {
|
||||
try {
|
||||
const parsed = JSON.parse(scRaw) as unknown
|
||||
if (!parsed || typeof parsed !== 'object' || Array.isArray(parsed)) {
|
||||
ElMessage.warning('主题配置须为 JSON 对象')
|
||||
return
|
||||
}
|
||||
subject_config = parsed as Record<string, unknown>
|
||||
} catch {
|
||||
ElMessage.warning('主题配置 JSON 格式无效')
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
saveLoading.value = true
|
||||
try {
|
||||
const payload: Record<string, unknown> = {
|
||||
id: props.id,
|
||||
name: form.value.name?.trim() ?? '',
|
||||
custom_barcode: form.value.custom_barcode ?? ''
|
||||
custom_barcode: form.value.custom_barcode ?? '',
|
||||
default_printer_name: printerNow
|
||||
}
|
||||
if (form.value.computer_id) {
|
||||
payload.computer_id = Number(form.value.computer_id)
|
||||
}
|
||||
if (subject_config !== undefined) {
|
||||
payload.subject_config = subject_config
|
||||
}
|
||||
|
||||
const res: any = await stationApi.updateItem(payload)
|
||||
if (!okCode(res?.code)) {
|
||||
@ -453,35 +755,37 @@ const handleSave = async () => {
|
||||
return
|
||||
}
|
||||
|
||||
const hadPrinterBefore = String(data.value?.default_printer_name ?? '').trim() !== ''
|
||||
const hadExpressBefore = hasStoredExpressBind(data.value)
|
||||
|
||||
Object.assign(data.value, {
|
||||
name: form.value.name,
|
||||
custom_barcode: form.value.custom_barcode,
|
||||
computer_id: form.value.computer_id ? Number(form.value.computer_id) : data.value.computer_id
|
||||
computer_id: form.value.computer_id ? Number(form.value.computer_id) : data.value.computer_id,
|
||||
default_printer_name: printerNow,
|
||||
...(subject_config !== undefined ? { subject_config } : {})
|
||||
})
|
||||
emit('updated', {
|
||||
id: props.id,
|
||||
name: form.value.name,
|
||||
custom_barcode: form.value.custom_barcode,
|
||||
computer_id: form.value.computer_id
|
||||
computer_id: form.value.computer_id,
|
||||
default_printer_name: printerNow
|
||||
})
|
||||
|
||||
const printerNow = String(form.value.printer_id ?? '').trim()
|
||||
const expressNow = String(form.value.express_company ?? '').trim()
|
||||
const hadPrinter = String(data.value?.default_printer_name ?? '').trim() !== ''
|
||||
const hadExpress =
|
||||
Array.isArray(data.value?.express) &&
|
||||
data.value.express.some((x: any) => String(x?.express_id ?? x?.id ?? '').trim() !== '')
|
||||
const shouldSaveBind =
|
||||
printerNow !== '' ||
|
||||
expressNow !== '' ||
|
||||
hadPrinter ||
|
||||
hadExpress
|
||||
printerNow !== '' || expressNow || hadPrinterBefore || hadExpressBefore
|
||||
|
||||
if (!shouldSaveBind) {
|
||||
ElMessage.success('保存成功')
|
||||
return
|
||||
}
|
||||
|
||||
if (!printerNow) {
|
||||
ElMessage.success('保存成功(未同步打印机绑定:请先选择默认打印机)')
|
||||
return
|
||||
}
|
||||
|
||||
const bindOk = await persistPrinterBindings()
|
||||
if (bindOk) {
|
||||
ElMessage.success('保存成功')
|
||||
@ -516,10 +820,12 @@ watch(
|
||||
getComputerPrinter(newId)
|
||||
if (data.value && String(data.value.computer_id ?? data.value.computerId ?? '') !== String(newId)) {
|
||||
form.value.printer_id = ''
|
||||
expressBindRows.value = []
|
||||
}
|
||||
} else {
|
||||
printerOptions.value = []
|
||||
form.value.printer_id = ''
|
||||
expressBindRows.value = []
|
||||
}
|
||||
},
|
||||
{ flush: 'post' }
|
||||
@ -528,77 +834,187 @@ watch(
|
||||
|
||||
<style scoped>
|
||||
.print-station-info {
|
||||
padding: 20px;
|
||||
background-color: #fff;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-start;
|
||||
gap: 24px 32px;
|
||||
padding: 16px 20px 20px;
|
||||
background: #fff;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.print-station-info__main {
|
||||
flex: 1 1 400px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.print-station-info__side {
|
||||
flex: 0 0 220px;
|
||||
width: 220px;
|
||||
}
|
||||
|
||||
/* form tweaks */
|
||||
.info-form {
|
||||
max-width: 900px;
|
||||
max-width: 720px;
|
||||
}
|
||||
|
||||
.info-section {
|
||||
margin-bottom: 22px;
|
||||
}
|
||||
|
||||
.info-section:last-of-type {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.info-section__title {
|
||||
margin: 0 0 12px;
|
||||
padding-bottom: 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.info-section__grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 16px 24px;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 4px 20px;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
/* make the last form item (buttons) span full width and align right */
|
||||
.info-form .el-form-item:last-child {
|
||||
@media (max-width: 640px) {
|
||||
.info-section__grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
.info-form__item-span2 {
|
||||
grid-column: 1 / -1;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
/* ensure form items sizing and spacing inside grid */
|
||||
.info-form__item-block :deep(.el-form-item__content) {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.info-form__control-wide {
|
||||
width: 100%;
|
||||
max-width: 520px;
|
||||
}
|
||||
|
||||
.info-form .el-form-item {
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.field-desc {
|
||||
margin-top: 6px;
|
||||
font-size: 12px;
|
||||
color: #909399;
|
||||
line-height: 1.5;
|
||||
max-width: 640px;
|
||||
}
|
||||
|
||||
.array-editor {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
max-width: 640px;
|
||||
}
|
||||
|
||||
.array-table {
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
background: #fafbfc;
|
||||
}
|
||||
|
||||
.array-table__head,
|
||||
.array-table__row {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
min-width: max-content;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.array-table__head {
|
||||
background: #f5f7fa;
|
||||
font-size: 12px;
|
||||
color: #606266;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.array-table__row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.array-table__cell,
|
||||
.array-table__op {
|
||||
padding: 10px 12px;
|
||||
border-right: 1px solid #ebeef5;
|
||||
box-sizing: border-box;
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
/* overall container: three columns (left form, spacer, right panel) */
|
||||
.print-station-info {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 24px 320px;
|
||||
gap: 0 16px;
|
||||
align-items: start;
|
||||
.array-table__cell--express {
|
||||
flex: 0 0 200px;
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
.left-col {
|
||||
grid-column: 1 / 2;
|
||||
.array-table__cell--printer {
|
||||
flex: 0 0 220px;
|
||||
min-width: 220px;
|
||||
}
|
||||
|
||||
.middle-col {
|
||||
grid-column: 2 / 3;
|
||||
.array-table__cell:last-child,
|
||||
.array-table__op:last-child {
|
||||
border-right: none;
|
||||
}
|
||||
|
||||
.right-col {
|
||||
grid-column: 3 / 4;
|
||||
.array-table__op {
|
||||
flex: 0 0 84px;
|
||||
min-width: 84px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.array-editor :deep(.el-select) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.right-panel {
|
||||
position: sticky;
|
||||
top: 20px;
|
||||
background: #fff;
|
||||
border-radius: 4px;
|
||||
padding: 12px;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
|
||||
top: 12px;
|
||||
padding: 16px;
|
||||
border: 1px solid #ebeef5;
|
||||
border-radius: 8px;
|
||||
background: #fafafa;
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
|
||||
}
|
||||
|
||||
.panel-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin-bottom: 12px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.panel-label {
|
||||
color: #606266;
|
||||
font-size: 13px;
|
||||
margin-bottom: 6px;
|
||||
color: #909399;
|
||||
font-size: 12px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
|
||||
.panel-value {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #303133;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.panel-actions {
|
||||
text-align: right;
|
||||
margin-top: 8px;
|
||||
padding-top: 12px;
|
||||
border-top: 1px solid #ebeef5;
|
||||
}
|
||||
|
||||
.panel-save {
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -111,7 +111,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-drawer v-model="drawer" :with-header="false" direction="rtl" size="800px">
|
||||
<el-drawer v-model="drawer" :with-header="false" direction="rtl" size="920px">
|
||||
<Add v-if="drawer" @saved="handleSaved" />
|
||||
</el-drawer>
|
||||
</div>
|
||||
@ -367,11 +367,16 @@ const confirmBatchDelete = async () => {
|
||||
try {
|
||||
await ElMessageBox.confirm('确认删除选中打印台?', '删除确认', { type: 'warning' })
|
||||
const ids = selectedRows.value.map((r: any) => r.id).filter((x: any) => x != null && x !== '')
|
||||
const res: any = await printApi.delItems(ids)
|
||||
const numericIds = ids.map((x: any) => Number(x)).filter((n: number) => Number.isFinite(n))
|
||||
if (!numericIds.length) {
|
||||
ElMessage.warning('所选记录缺少有效打印台 ID')
|
||||
return
|
||||
}
|
||||
const res: any = await printApi.delItems(numericIds)
|
||||
if (res && okCode(res.code)) {
|
||||
ElMessage.success('删除成功')
|
||||
await fetchPrintStationList()
|
||||
const deleted = new Set(ids.map((x: any) => String(x)))
|
||||
const deleted = new Set(numericIds.map((n: number) => String(n)))
|
||||
if (currentStationId.value != null && deleted.has(String(currentStationId.value))) {
|
||||
currentStationId.value = null
|
||||
currentTableRow.value = undefined
|
||||
@ -489,13 +494,13 @@ onMounted(async () => {
|
||||
.lower-level {
|
||||
background-color: #fff;
|
||||
margin-top: 10px;
|
||||
flex: 0 0 300px;
|
||||
flex: 0 0 380px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
|
||||
&.small {
|
||||
flex: 0 0 250px;
|
||||
flex: 0 0 320px;
|
||||
}
|
||||
|
||||
.detail-header {
|
||||
@ -513,7 +518,7 @@ onMounted(async () => {
|
||||
.no-selection {
|
||||
margin-top: 10px;
|
||||
background-color: #fff;
|
||||
flex: 0 0 300px;
|
||||
flex: 0 0 380px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -8,115 +8,51 @@
|
||||
}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.waveStrategyList",
|
||||
"method": "print.send",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.waveStrategyCreate",
|
||||
"method": "print.getPrintResult",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.waveStrategyUpdate",
|
||||
"method": "print.getPrintRecordItem",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.waveStrategyQuickScan",
|
||||
"method": "print.getList",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.waveStrategyFetchPda",
|
||||
"method": "print.getItem",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.waveStrategyFetchAdmin",
|
||||
"method": "print.add",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.waveStrategyQuickScanTaskProgress",
|
||||
"method": "print.hasName",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.groupOrderFetchList",
|
||||
"method": "print.updateItem",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.singleFetchByIds",
|
||||
"method": "print.del",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.waveStrategyFallbackOrderList",
|
||||
"method": "print.getComputer",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.singleOrderFetchList",
|
||||
"method": "print.getComputerPrinter",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.wavePickTaskList",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.wavePickTaskCancel",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.batchCancel",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.batchCancelTaskProgress",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.batchAllocateExpress",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.batchAllocateExpressTaskProgress",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.batchRemoveExceptionOrders",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.batchRemoveExceptionOrdersTaskProgress",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.batchAllocateStorage",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.batchAllocateStorageTaskProgress",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.groupFetch",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.singleFetch",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.fetch",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.fetchTaskProgress",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.batchAutoGrouping",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.batchFinishAutoGrouping",
|
||||
"body": {}
|
||||
},
|
||||
{
|
||||
"method": "order.wave.batchRemoveOrders",
|
||||
"method": "print.savePrinters",
|
||||
"body": {}
|
||||
}
|
||||
],
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -17,31 +17,16 @@
|
||||
"summary": {
|
||||
"moduleAdded": 0,
|
||||
"moduleDeleted": 0,
|
||||
"moduleUpdated": 3,
|
||||
"moduleUpdated": 1,
|
||||
"interfaceAdded": 0,
|
||||
"interfaceDeleted": 0,
|
||||
"interfaceParamsUpdated": 2,
|
||||
"interfaceResponseUpdated": 2
|
||||
"interfaceParamsUpdated": 7,
|
||||
"interfaceResponseUpdated": 8
|
||||
},
|
||||
"moduleUpdates": {
|
||||
"added": [],
|
||||
"deleted": [],
|
||||
"updated": [
|
||||
{
|
||||
"moduleName": "订单打印模块",
|
||||
"moduleKey": "order.print",
|
||||
"folder": "order.print",
|
||||
"previousModuleName": "订单打印模块",
|
||||
"previousModuleKey": "order.print",
|
||||
"interfaceChanges": {
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [],
|
||||
"responseUpdatedMethods": [
|
||||
"order.print.getWavePlatformPrintData"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moduleName": "打印模块",
|
||||
"moduleKey": "print",
|
||||
@ -52,27 +37,25 @@
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [
|
||||
"print.send"
|
||||
"print.add",
|
||||
"print.del",
|
||||
"print.getComputerPrinter",
|
||||
"print.getItem",
|
||||
"print.getList",
|
||||
"print.savePrinters",
|
||||
"print.updateItem"
|
||||
],
|
||||
"responseUpdatedMethods": [
|
||||
"print.send"
|
||||
"print.add",
|
||||
"print.del",
|
||||
"print.getComputer",
|
||||
"print.getComputerPrinter",
|
||||
"print.getItem",
|
||||
"print.getList",
|
||||
"print.savePrinters",
|
||||
"print.updateItem"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moduleName": "货主-仓库签约模块",
|
||||
"moduleKey": "storeWarehouse.store",
|
||||
"folder": "storewarehouse.store",
|
||||
"previousModuleName": "货主-仓库签约模块",
|
||||
"previousModuleKey": "storeWarehouse.store",
|
||||
"interfaceChanges": {
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [
|
||||
"storeWarehouse.store.savePolicyConfig"
|
||||
],
|
||||
"responseUpdatedMethods": []
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -84,27 +67,93 @@
|
||||
"moduleName": "打印模块",
|
||||
"moduleKey": "print",
|
||||
"folder": "print",
|
||||
"method": "print.send"
|
||||
},
|
||||
{
|
||||
"moduleName": "货主-仓库签约模块",
|
||||
"moduleKey": "storeWarehouse.store",
|
||||
"folder": "storewarehouse.store",
|
||||
"method": "storeWarehouse.store.savePolicyConfig"
|
||||
}
|
||||
],
|
||||
"responseUpdated": [
|
||||
{
|
||||
"moduleName": "订单打印模块",
|
||||
"moduleKey": "order.print",
|
||||
"folder": "order.print",
|
||||
"method": "order.print.getWavePlatformPrintData"
|
||||
"method": "print.add"
|
||||
},
|
||||
{
|
||||
"moduleName": "打印模块",
|
||||
"moduleKey": "print",
|
||||
"folder": "print",
|
||||
"method": "print.send"
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -6292,8 +6341,8 @@
|
||||
"moduleKey": "print",
|
||||
"moduleFolder": "print",
|
||||
"method": "print.add",
|
||||
"title": "print.add 接口",
|
||||
"description": "print.add 接口",
|
||||
"title": "新增打印台:关联打印电脑并可保存 subject_config(会由模型 normalizeSubjectConfig 校验)。",
|
||||
"description": "新增打印台:关联打印电脑并可保存 subject_config(会由模型 normalizeSubjectConfig 校验)。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -6314,36 +6363,49 @@
|
||||
"name": "computer_id",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "computer_id 参数"
|
||||
"description": "关联的打印电脑 ID(必填)"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "name 参数"
|
||||
"description": "打印台名称(必填)"
|
||||
},
|
||||
{
|
||||
"name": "custom_barcode",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "custom_barcode 参数"
|
||||
"description": "自定义条码"
|
||||
},
|
||||
{
|
||||
"name": "default_printer_name",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "default_printer_name 参数"
|
||||
"description": "默认打印机名称"
|
||||
},
|
||||
{
|
||||
"name": "subject_config",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "打印台的主题/业务配置(可选,若存在将调用模型 normalizeSubjectConfig 进行校验)"
|
||||
}
|
||||
],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"description": "新建的打印台对象(raw)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"moduleName": "打印模块",
|
||||
"moduleKey": "print",
|
||||
"moduleFolder": "print",
|
||||
"method": "print.del",
|
||||
"title": "print.del 接口",
|
||||
"description": "print.del 接口",
|
||||
"title": "批量删除(软删除)打印台:将指定 ids 的记录标记为 deleted=1。",
|
||||
"description": "批量删除(软删除)打印台:将指定 ids 的记录标记为 deleted=1。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -6363,19 +6425,26 @@
|
||||
{
|
||||
"name": "ids",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"description": "ids 参数"
|
||||
"required": true,
|
||||
"description": "要删除的打印台 ID 数组,必须为非空数组(示例: [1,2,3])"
|
||||
}
|
||||
],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "返回空数据结构,表示操作成功"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"moduleName": "打印模块",
|
||||
"moduleKey": "print",
|
||||
"moduleFolder": "print",
|
||||
"method": "print.getComputer",
|
||||
"title": "print.getComputer 接口",
|
||||
"description": "print.getComputer 接口",
|
||||
"title": "查询当前仓库下状态为 1 的打印电脑列表(raw 列表)。",
|
||||
"description": "查询当前仓库下状态为 1 的打印电脑列表(raw 列表)。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -6392,15 +6461,22 @@
|
||||
}
|
||||
],
|
||||
"params": [],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "array",
|
||||
"required": true,
|
||||
"description": "打印电脑数组,每项为打印电脑的原始记录"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"moduleName": "打印模块",
|
||||
"moduleKey": "print",
|
||||
"moduleFolder": "print",
|
||||
"method": "print.getComputerPrinter",
|
||||
"title": "print.getComputerPrinter 接口",
|
||||
"description": "print.getComputerPrinter 接口",
|
||||
"title": "获取指定打印电脑的打印机列表(从 redis: printer:{id}:printerList 读取并返回 data 数组,通常为打印机名称数组或对象数组)。",
|
||||
"description": "获取指定打印电脑的打印机列表(从 redis: printer:{id}:printerList 读取并返回 data 数组,通常为打印机名称数组或对象数组)。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -6421,18 +6497,25 @@
|
||||
"name": "id",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "id 参数"
|
||||
"description": "打印电脑 ID,必填"
|
||||
}
|
||||
],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "array",
|
||||
"required": true,
|
||||
"description": "打印机数组,通常为字符串名称数组或打印机对象数组(取决于 redis 存储格式)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"moduleName": "打印模块",
|
||||
"moduleKey": "print",
|
||||
"moduleFolder": "print",
|
||||
"method": "print.getItem",
|
||||
"title": "print.getItem 接口",
|
||||
"description": "print.getItem 接口",
|
||||
"title": "查询单个打印台详情,返回打印台对象(raw 行记录,含 subject_config)",
|
||||
"description": "查询单个打印台详情,返回打印台对象(raw 行记录,含 subject_config)",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -6453,18 +6536,25 @@
|
||||
"name": "id",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "id 参数"
|
||||
"description": "打印台 ID,必填"
|
||||
}
|
||||
],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"description": "打印台原始记录(PrintStation raw),字段示例"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"moduleName": "打印模块",
|
||||
"moduleKey": "print",
|
||||
"moduleFolder": "print",
|
||||
"method": "print.getList",
|
||||
"title": "print.getList 接口",
|
||||
"description": "print.getList 接口",
|
||||
"title": "查询当前仓库下的打印台列表,支持分页与 where 条件筛选(支持字段:id、name、computer_id、custom_barcode)。",
|
||||
"description": "查询当前仓库下的打印台列表,支持分页与 where 条件筛选(支持字段:id、name、computer_id、custom_barcode)。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -6485,22 +6575,29 @@
|
||||
"name": "page",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "page 参数"
|
||||
"description": "页码,默认 1"
|
||||
},
|
||||
{
|
||||
"name": "pageSize",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "pageSize 参数"
|
||||
"description": "每页数量,默认 20"
|
||||
},
|
||||
{
|
||||
"name": "where",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "统一 where 条件对象;推荐使用 { operator, value, type } 标准结构,历史简写会在 main 中自动标准化;当前支持 id、name、computer_id、custom_barcode。示例:where.name={operator:like,value:热敏}; where.computer_id={operator:eq,value:PC-01}。"
|
||||
"description": "筛选条件对象;支持字段:id(等值)、name、computer_id、custom_barcode;推荐使用 { operator, value, type } 标准结构"
|
||||
}
|
||||
],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"description": "返回数据对象,包含 list 与 pagination"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"moduleName": "打印模块",
|
||||
@ -6609,8 +6706,8 @@
|
||||
"moduleKey": "print",
|
||||
"moduleFolder": "print",
|
||||
"method": "print.savePrinters",
|
||||
"title": "print.savePrinters 接口",
|
||||
"description": "print.savePrinters 接口",
|
||||
"title": "保存打印台的默认打印机与快递-打印机绑定;会使用 print_station_id 标识目标打印台,并批量 upsert PrintStationExpress 记录。",
|
||||
"description": "保存打印台的默认打印机与快递-打印机绑定;会使用 print_station_id 标识目标打印台,并批量 upsert PrintStationExpress 记录。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -6631,22 +6728,29 @@
|
||||
"name": "defaultPrinter",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "defaultPrinter 参数"
|
||||
"description": "默认打印机名称(必填)"
|
||||
},
|
||||
{
|
||||
"name": "express",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"description": "express 参数"
|
||||
"required": true,
|
||||
"description": "快递绑定数组,必填。每项至少包含 express_id(number)和 name(打印机/快递名称,string)"
|
||||
},
|
||||
{
|
||||
"name": "print_station_id",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "print_station_id 参数"
|
||||
"required": true,
|
||||
"description": "目标打印台 ID,必填"
|
||||
}
|
||||
],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "返回空数据结构表示成功(实现中返回 { data: null, code: 0 })"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"moduleName": "打印模块",
|
||||
@ -6698,8 +6802,8 @@
|
||||
{
|
||||
"name": "template",
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"description": "打印模板对象;type=customize 时通常需要包含 page_width、page_height、template_content"
|
||||
"required": false,
|
||||
"description": "打印模板对象;仅 type=customize 时必填且应包含 page_width、page_height、template_content,type=express 可不传"
|
||||
},
|
||||
{
|
||||
"name": "timestamp",
|
||||
@ -6746,8 +6850,8 @@
|
||||
"moduleKey": "print",
|
||||
"moduleFolder": "print",
|
||||
"method": "print.updateItem",
|
||||
"title": "print.updateItem 接口",
|
||||
"description": "print.updateItem 接口",
|
||||
"title": "更新打印台信息:支持更新 name、computer_id、custom_barcode、default_printer_name 以及 subject_config(会走 normalizeSubjectConfig)。",
|
||||
"description": "更新打印台信息:支持更新 name、computer_id、custom_barcode、default_printer_name 以及 subject_config(会走 normalizeSubjectConfig)。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -6768,28 +6872,47 @@
|
||||
"name": "id",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "id 参数"
|
||||
"description": "打印台 ID(必填)"
|
||||
},
|
||||
{
|
||||
"name": "computer_id",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "computer_id 参数"
|
||||
"description": "要更新的打印电脑 ID"
|
||||
},
|
||||
{
|
||||
"name": "custom_barcode",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "custom_barcode 参数"
|
||||
"description": "自定义条码"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "name 参数"
|
||||
"description": "打印台名称"
|
||||
},
|
||||
{
|
||||
"name": "default_printer_name",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "默认打印机名称"
|
||||
},
|
||||
{
|
||||
"name": "subject_config",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "subject_config(可选),传入将替换/规范化配置"
|
||||
}
|
||||
],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "更新结果,通常返回 null"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"moduleName": "打印机站点模块",
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -18,31 +18,16 @@
|
||||
"summary": {
|
||||
"moduleAdded": 0,
|
||||
"moduleDeleted": 0,
|
||||
"moduleUpdated": 3,
|
||||
"moduleUpdated": 1,
|
||||
"interfaceAdded": 0,
|
||||
"interfaceDeleted": 0,
|
||||
"interfaceParamsUpdated": 2,
|
||||
"interfaceResponseUpdated": 2
|
||||
"interfaceParamsUpdated": 7,
|
||||
"interfaceResponseUpdated": 8
|
||||
},
|
||||
"moduleUpdates": {
|
||||
"added": [],
|
||||
"deleted": [],
|
||||
"updated": [
|
||||
{
|
||||
"moduleName": "订单打印模块",
|
||||
"moduleKey": "order.print",
|
||||
"folder": "order.print",
|
||||
"previousModuleName": "订单打印模块",
|
||||
"previousModuleKey": "order.print",
|
||||
"interfaceChanges": {
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [],
|
||||
"responseUpdatedMethods": [
|
||||
"order.print.getWavePlatformPrintData"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moduleName": "打印模块",
|
||||
"moduleKey": "print",
|
||||
@ -53,27 +38,25 @@
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [
|
||||
"print.send"
|
||||
"print.add",
|
||||
"print.del",
|
||||
"print.getComputerPrinter",
|
||||
"print.getItem",
|
||||
"print.getList",
|
||||
"print.savePrinters",
|
||||
"print.updateItem"
|
||||
],
|
||||
"responseUpdatedMethods": [
|
||||
"print.send"
|
||||
"print.add",
|
||||
"print.del",
|
||||
"print.getComputer",
|
||||
"print.getComputerPrinter",
|
||||
"print.getItem",
|
||||
"print.getList",
|
||||
"print.savePrinters",
|
||||
"print.updateItem"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"moduleName": "货主-仓库签约模块",
|
||||
"moduleKey": "storeWarehouse.store",
|
||||
"folder": "storewarehouse.store",
|
||||
"previousModuleName": "货主-仓库签约模块",
|
||||
"previousModuleKey": "storeWarehouse.store",
|
||||
"interfaceChanges": {
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [
|
||||
"storeWarehouse.store.savePolicyConfig"
|
||||
],
|
||||
"responseUpdatedMethods": []
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -85,27 +68,93 @@
|
||||
"moduleName": "打印模块",
|
||||
"moduleKey": "print",
|
||||
"folder": "print",
|
||||
"method": "print.send"
|
||||
},
|
||||
{
|
||||
"moduleName": "货主-仓库签约模块",
|
||||
"moduleKey": "storeWarehouse.store",
|
||||
"folder": "storewarehouse.store",
|
||||
"method": "storeWarehouse.store.savePolicyConfig"
|
||||
}
|
||||
],
|
||||
"responseUpdated": [
|
||||
{
|
||||
"moduleName": "订单打印模块",
|
||||
"moduleKey": "order.print",
|
||||
"folder": "order.print",
|
||||
"method": "order.print.getWavePlatformPrintData"
|
||||
"method": "print.add"
|
||||
},
|
||||
{
|
||||
"moduleName": "打印模块",
|
||||
"moduleKey": "print",
|
||||
"folder": "print",
|
||||
"method": "print.send"
|
||||
"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"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-05 09:15:19",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -26,9 +26,7 @@
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [],
|
||||
"responseUpdatedMethods": [
|
||||
"order.print.getWavePlatformPrintData"
|
||||
]
|
||||
"responseUpdatedMethods": []
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-04 09:11:04",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-04 17:23:48",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -26,10 +26,23 @@
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [
|
||||
"print.send"
|
||||
"print.add",
|
||||
"print.del",
|
||||
"print.getComputerPrinter",
|
||||
"print.getItem",
|
||||
"print.getList",
|
||||
"print.savePrinters",
|
||||
"print.updateItem"
|
||||
],
|
||||
"responseUpdatedMethods": [
|
||||
"print.send"
|
||||
"print.add",
|
||||
"print.del",
|
||||
"print.getComputer",
|
||||
"print.getComputerPrinter",
|
||||
"print.getItem",
|
||||
"print.getList",
|
||||
"print.savePrinters",
|
||||
"print.updateItem"
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -82,8 +95,8 @@
|
||||
{
|
||||
"name": "template",
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"description": "打印模板对象;type=customize 时通常需要包含 page_width、page_height、template_content"
|
||||
"required": false,
|
||||
"description": "打印模板对象;仅 type=customize 时必填且应包含 page_width、page_height、template_content,type=express 可不传"
|
||||
},
|
||||
{
|
||||
"name": "timestamp",
|
||||
@ -185,8 +198,8 @@
|
||||
},
|
||||
{
|
||||
"method": "print.getList",
|
||||
"title": "print.getList 接口",
|
||||
"description": "print.getList 接口",
|
||||
"title": "查询当前仓库下的打印台列表,支持分页与 where 条件筛选(支持字段:id、name、computer_id、custom_barcode)。",
|
||||
"description": "查询当前仓库下的打印台列表,支持分页与 where 条件筛选(支持字段:id、name、computer_id、custom_barcode)。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -207,27 +220,34 @@
|
||||
"name": "page",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "page 参数"
|
||||
"description": "页码,默认 1"
|
||||
},
|
||||
{
|
||||
"name": "pageSize",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "pageSize 参数"
|
||||
"description": "每页数量,默认 20"
|
||||
},
|
||||
{
|
||||
"name": "where",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "统一 where 条件对象;推荐使用 { operator, value, type } 标准结构,历史简写会在 main 中自动标准化;当前支持 id、name、computer_id、custom_barcode。示例:where.name={operator:like,value:热敏}; where.computer_id={operator:eq,value:PC-01}。"
|
||||
"description": "筛选条件对象;支持字段:id(等值)、name、computer_id、custom_barcode;推荐使用 { operator, value, type } 标准结构"
|
||||
}
|
||||
],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"description": "返回数据对象,包含 list 与 pagination"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"method": "print.getItem",
|
||||
"title": "print.getItem 接口",
|
||||
"description": "print.getItem 接口",
|
||||
"title": "查询单个打印台详情,返回打印台对象(raw 行记录,含 subject_config)",
|
||||
"description": "查询单个打印台详情,返回打印台对象(raw 行记录,含 subject_config)",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -248,15 +268,22 @@
|
||||
"name": "id",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "id 参数"
|
||||
"description": "打印台 ID,必填"
|
||||
}
|
||||
],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"description": "打印台原始记录(PrintStation raw),字段示例"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"method": "print.add",
|
||||
"title": "print.add 接口",
|
||||
"description": "print.add 接口",
|
||||
"title": "新增打印台:关联打印电脑并可保存 subject_config(会由模型 normalizeSubjectConfig 校验)。",
|
||||
"description": "新增打印台:关联打印电脑并可保存 subject_config(会由模型 normalizeSubjectConfig 校验)。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -277,28 +304,41 @@
|
||||
"name": "computer_id",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "computer_id 参数"
|
||||
"description": "关联的打印电脑 ID(必填)"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "name 参数"
|
||||
"description": "打印台名称(必填)"
|
||||
},
|
||||
{
|
||||
"name": "custom_barcode",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "custom_barcode 参数"
|
||||
"description": "自定义条码"
|
||||
},
|
||||
{
|
||||
"name": "default_printer_name",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "default_printer_name 参数"
|
||||
"description": "默认打印机名称"
|
||||
},
|
||||
{
|
||||
"name": "subject_config",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "打印台的主题/业务配置(可选,若存在将调用模型 normalizeSubjectConfig 进行校验)"
|
||||
}
|
||||
],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "object",
|
||||
"required": true,
|
||||
"description": "新建的打印台对象(raw)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"method": "print.hasName",
|
||||
@ -337,8 +377,8 @@
|
||||
},
|
||||
{
|
||||
"method": "print.updateItem",
|
||||
"title": "print.updateItem 接口",
|
||||
"description": "print.updateItem 接口",
|
||||
"title": "更新打印台信息:支持更新 name、computer_id、custom_barcode、default_printer_name 以及 subject_config(会走 normalizeSubjectConfig)。",
|
||||
"description": "更新打印台信息:支持更新 name、computer_id、custom_barcode、default_printer_name 以及 subject_config(会走 normalizeSubjectConfig)。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -359,33 +399,52 @@
|
||||
"name": "id",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "id 参数"
|
||||
"description": "打印台 ID(必填)"
|
||||
},
|
||||
{
|
||||
"name": "computer_id",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "computer_id 参数"
|
||||
"description": "要更新的打印电脑 ID"
|
||||
},
|
||||
{
|
||||
"name": "custom_barcode",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "custom_barcode 参数"
|
||||
"description": "自定义条码"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "name 参数"
|
||||
"description": "打印台名称"
|
||||
},
|
||||
{
|
||||
"name": "default_printer_name",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "默认打印机名称"
|
||||
},
|
||||
{
|
||||
"name": "subject_config",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "subject_config(可选),传入将替换/规范化配置"
|
||||
}
|
||||
],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "更新结果,通常返回 null"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"method": "print.del",
|
||||
"title": "print.del 接口",
|
||||
"description": "print.del 接口",
|
||||
"title": "批量删除(软删除)打印台:将指定 ids 的记录标记为 deleted=1。",
|
||||
"description": "批量删除(软删除)打印台:将指定 ids 的记录标记为 deleted=1。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -405,16 +464,23 @@
|
||||
{
|
||||
"name": "ids",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"description": "ids 参数"
|
||||
"required": true,
|
||||
"description": "要删除的打印台 ID 数组,必须为非空数组(示例: [1,2,3])"
|
||||
}
|
||||
],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "返回空数据结构,表示操作成功"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"method": "print.getComputer",
|
||||
"title": "print.getComputer 接口",
|
||||
"description": "print.getComputer 接口",
|
||||
"title": "查询当前仓库下状态为 1 的打印电脑列表(raw 列表)。",
|
||||
"description": "查询当前仓库下状态为 1 的打印电脑列表(raw 列表)。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -431,12 +497,19 @@
|
||||
}
|
||||
],
|
||||
"params": [],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "array",
|
||||
"required": true,
|
||||
"description": "打印电脑数组,每项为打印电脑的原始记录"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"method": "print.getComputerPrinter",
|
||||
"title": "print.getComputerPrinter 接口",
|
||||
"description": "print.getComputerPrinter 接口",
|
||||
"title": "获取指定打印电脑的打印机列表(从 redis: printer:{id}:printerList 读取并返回 data 数组,通常为打印机名称数组或对象数组)。",
|
||||
"description": "获取指定打印电脑的打印机列表(从 redis: printer:{id}:printerList 读取并返回 data 数组,通常为打印机名称数组或对象数组)。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -457,15 +530,22 @@
|
||||
"name": "id",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "id 参数"
|
||||
"description": "打印电脑 ID,必填"
|
||||
}
|
||||
],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "array",
|
||||
"required": true,
|
||||
"description": "打印机数组,通常为字符串名称数组或打印机对象数组(取决于 redis 存储格式)"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"method": "print.savePrinters",
|
||||
"title": "print.savePrinters 接口",
|
||||
"description": "print.savePrinters 接口",
|
||||
"title": "保存打印台的默认打印机与快递-打印机绑定;会使用 print_station_id 标识目标打印台,并批量 upsert PrintStationExpress 记录。",
|
||||
"description": "保存打印台的默认打印机与快递-打印机绑定;会使用 print_station_id 标识目标打印台,并批量 upsert PrintStationExpress 记录。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -486,22 +566,29 @@
|
||||
"name": "defaultPrinter",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "defaultPrinter 参数"
|
||||
"description": "默认打印机名称(必填)"
|
||||
},
|
||||
{
|
||||
"name": "express",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"description": "express 参数"
|
||||
"required": true,
|
||||
"description": "快递绑定数组,必填。每项至少包含 express_id(number)和 name(打印机/快递名称,string)"
|
||||
},
|
||||
{
|
||||
"name": "print_station_id",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "print_station_id 参数"
|
||||
"required": true,
|
||||
"description": "目标打印台 ID,必填"
|
||||
}
|
||||
],
|
||||
"response": []
|
||||
"response": [
|
||||
{
|
||||
"name": "data",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"description": "返回空数据结构表示成功(实现中返回 { data: null, code: 0 })"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-17 19:37:49",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-17 20:21:27",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-17 19:16:50",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-04 09:11:04",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -25,9 +25,7 @@
|
||||
"interfaceChanges": {
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [
|
||||
"storeWarehouse.store.savePolicyConfig"
|
||||
],
|
||||
"paramsUpdatedMethods": [],
|
||||
"responseUpdatedMethods": []
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-05-13 09:46:41",
|
||||
"updatedAt": "2026-05-14 14:43:29",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-05-13 09:46:41",
|
||||
"generatedAtLocal": "2026-05-13 09:46:41",
|
||||
"generatedAt": "2026-05-14 14:43:29",
|
||||
"generatedAtLocal": "2026-05-14 14:43:29",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -17,9 +17,9 @@
|
||||
"moduleDeleted": 0,
|
||||
"interfaceAdded": 0,
|
||||
"interfaceDeleted": 0,
|
||||
"interfaceParamsUpdated": 2,
|
||||
"interfaceResponseUpdated": 2,
|
||||
"totalChangedItems": 4
|
||||
"interfaceParamsUpdated": 7,
|
||||
"interfaceResponseUpdated": 8,
|
||||
"totalChangedItems": 15
|
||||
},
|
||||
"interfaceUpdates": {
|
||||
"added": [],
|
||||
@ -29,27 +29,93 @@
|
||||
"moduleName": "打印模块",
|
||||
"moduleKey": "print",
|
||||
"folder": "print",
|
||||
"method": "print.send"
|
||||
},
|
||||
{
|
||||
"moduleName": "货主-仓库签约模块",
|
||||
"moduleKey": "storeWarehouse.store",
|
||||
"folder": "storewarehouse.store",
|
||||
"method": "storeWarehouse.store.savePolicyConfig"
|
||||
}
|
||||
],
|
||||
"responseUpdated": [
|
||||
{
|
||||
"moduleName": "订单打印模块",
|
||||
"moduleKey": "order.print",
|
||||
"folder": "order.print",
|
||||
"method": "order.print.getWavePlatformPrintData"
|
||||
"method": "print.add"
|
||||
},
|
||||
{
|
||||
"moduleName": "打印模块",
|
||||
"moduleKey": "print",
|
||||
"folder": "print",
|
||||
"method": "print.send"
|
||||
"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