This commit is contained in:
yin 2026-09-12 18:00:18 +08:00
parent abf03a901f
commit 7afc6697fc
39 changed files with 936 additions and 420 deletions

View File

@ -1,23 +1,23 @@
<!--
实验性功能设置表单
- 由 UpperTable「字段设置」中的「实验性功能」按钮打开
更多设置表单
- 由 UpperTable「字段设置」中的「更多设置」按钮打开
- 表格工作模式(原字段设置工具栏内嵌的 radio,迁移至此)
- tab 缓存分类(tab 缓存开关 / 最大缓存数量 / 应用范围)
- 页面缓存 / tab 缓存分类(开关 / 最大缓存数量 / 应用范围)
-->
<template>
<el-dialog
v-model="dialogVisible"
title="实验性功能"
title="更多设置"
width="600px"
align-center
append-to-body
class="experiment-settings-dialog"
class="more-settings-dialog"
>
<!-- ===== 表格工作模式 ===== -->
<div class="experiment-section">
<div class="experiment-section-title">表格工作模式</div>
<div class="experiment-section-desc">实验性:调整大列表表格(UpperTable)的渲染调度策略。</div>
<div class="experiment-setting-row">
<div class="more-section">
<div class="more-section-title">表格工作模式</div>
<div class="more-section-desc">调整大列表表格(UpperTable)的渲染调度策略。</div>
<div class="more-setting-row">
<el-radio-group v-model="tableMode" size="small" @change="handleTableModeChange">
<el-radio-button value="resource">低占用(默认)</el-radio-button>
<el-radio-button value="performance">高性能</el-radio-button>
@ -28,16 +28,16 @@
<el-divider />
<!-- ===== 页面缓存分类 ===== -->
<div class="experiment-section">
<div class="experiment-section-title">页面缓存</div>
<div class="experiment-section-desc">实验性:控制通过顶部导航栏 / 页面 tab 切换的路由页面缓存策略(AppMain 路由级 keep-alive)。</div>
<div class="more-section">
<div class="more-section-title">页面缓存</div>
<div class="more-section-desc">控制通过顶部导航栏 / 页面 tab 切换的路由页面缓存策略(AppMain 路由级 keep-alive)。</div>
<div class="experiment-setting-row">
<div class="more-setting-row">
<span class="setting-label">页面缓存</span>
<el-switch v-model="pageCacheEnabled" @change="handlePageCacheEnabledChange" />
</div>
<div class="experiment-setting-row">
<div class="more-setting-row">
<span class="setting-label">最大缓存页面数量</span>
<el-input-number
:model-value="pageCacheMax"
@ -50,7 +50,7 @@
<span class="setting-hint">超出后淘汰最久未使用的页面</span>
</div>
<div class="experiment-setting-row">
<div class="more-setting-row">
<span class="setting-label">应用范围</span>
<span class="setting-value">
全部通过顶部导航栏 / 页面 tab 切换的路由页面
@ -61,16 +61,16 @@
<el-divider />
<!-- ===== tab 缓存分类 ===== -->
<div class="experiment-section">
<div class="experiment-section-title">tab 缓存</div>
<div class="experiment-section-desc">实验性:控制含 tab 标签页切换功能页面的 KeepAlive 缓存策略。</div>
<div class="more-section">
<div class="more-section-title">tab 缓存</div>
<div class="more-section-desc">控制含 tab 标签页切换功能页面的 KeepAlive 缓存策略。</div>
<div class="experiment-setting-row">
<div class="more-setting-row">
<span class="setting-label">tab 缓存</span>
<el-switch v-model="tabCacheEnabled" @change="handleTabCacheEnabledChange" />
</div>
<div class="experiment-setting-row">
<div class="more-setting-row">
<span class="setting-label">最大缓存 tab 数量</span>
<el-input-number
:model-value="tabCacheMax"
@ -83,7 +83,7 @@
<span class="setting-hint">超出后淘汰最久未使用的 tab</span>
</div>
<div class="experiment-setting-row">
<div class="more-setting-row">
<span class="setting-label">应用范围</span>
<span class="setting-value">
订单管理、波次管理、商品明细
@ -169,9 +169,9 @@ function handlePageCacheMaxChange(val: number | undefined) {
experimentalStore.setPageCacheMax(Number(val ?? 1))
}
/** 恢复全部实验性设置为默认配置(表格工作模式 / 页面缓存 / tab 缓存) */
/** 恢复全部设置为默认配置(表格工作模式 / 页面缓存 / tab 缓存) */
function handleResetDefaults() {
ElMessageBox.confirm('确定恢复全部实验性功能为默认配置吗?', '恢复默认', {
ElMessageBox.confirm('确定恢复全部设置为默认配置吗?', '恢复默认', {
type: 'warning',
confirmButtonText: '恢复',
cancelButtonText: '取消'
@ -185,26 +185,26 @@ function handleResetDefaults() {
</script>
<style scoped lang="scss">
.experiment-settings-dialog {
.experiment-section {
.more-settings-dialog {
.more-section {
display: flex;
flex-direction: column;
gap: 8px;
.experiment-section-title {
.more-section-title {
font-size: 14px;
font-weight: 600;
color: #303133;
}
.experiment-section-desc {
.more-section-desc {
font-size: 12px;
color: #909399;
margin-bottom: 4px;
}
}
.experiment-setting-row {
.more-setting-row {
display: flex;
align-items: center;
gap: 12px;

View File

@ -236,8 +236,6 @@
append-to-body
>
<div class="column-config-toolbar">
<!-- 实验性功能:表格工作模式等实验性设置已迁移至该表单 -->
<el-button size="small" @click="experimentDialogVisible = true">实验性功能</el-button>
<el-button size="small" @click="resetColumnConfig">恢复默认</el-button>
<el-button size="small" @click="exportGlobalColumnConfig">导出全局配置</el-button>
<el-upload
@ -249,6 +247,8 @@
<el-button size="small">导入全局配置</el-button>
</el-upload>
<el-button size="small" type="danger" plain @click="handleRepairColumnConfig">故障修复</el-button>
<!-- 更多设置:表格工作模式、页面缓存 / tab 缓存等设置已迁移至该表单 -->
<el-button size="small" @click="moreSettingsDialogVisible = true">更多设置</el-button>
</div>
<div class="column-config-list" ref="columnConfigListRef">
<template v-for="section in columnConfigDialogSections" :key="section.key">
@ -357,7 +357,7 @@
<qrcode-dialog v-model:visible="waybillQrVisible" :code="waybillQrCode" />
<experiment-settings-dialog v-model:visible="experimentDialogVisible" />
<more-settings-dialog v-model:visible="moreSettingsDialogVisible" />
</div>
</template>
@ -372,7 +372,7 @@ import { useShortcutsStore } from '@/stores/modules/shortcuts'
import { useExperimentalStore } from '@/stores/modules/experimental'
import defaultSettings from '@/settings'
import QrcodeDialog from '@/components/QR/qrcode.vue'
import ExperimentSettingsDialog from './ExperimentSettingsDialog.vue'
import MoreSettingsDialog from './MoreSettingsDialog.vue'
defineOptions({
name: 'UpperTable'
@ -569,7 +569,7 @@ const emit = defineEmits([
const tableRef = ref<any>(null)
const userStore = useUserStore()
const experimentalStore = useExperimentalStore()
const experimentDialogVisible = ref(false)
const moreSettingsDialogVisible = ref(false)
type ColumnItem = {
prop?: string
@ -931,12 +931,12 @@ function applyColumnConfigMap(configs: ColumnConfigItem[]) {
editableColumnConfigs.value = [...configs].sort((a, b) => a.order - b.order)
}
/** 初始化:优先读实验性设置 store,兜底 props.tableMode */
/** 初始化:优先读更多设置 store,兜底 props.tableMode */
function initTableMode() {
activeTableMode.value = experimentalStore.tableMode
}
/** 切换工作模式(实验性功能表单触发):持久化到 store + 重置虚拟滚动状态 */
/** 切换工作模式(更多设置表单触发):持久化到 store + 重置虚拟滚动状态 */
function handleTableModeChange(mode: 'performance' | 'resource') {
experimentalStore.setTableMode(mode)
resetVirtualScrollState()

View File

@ -52,8 +52,8 @@
</div>
<template #dropdown>
<el-dropdown-menu class="user-dropdown">
<!-- Role Switching -->
<template v-if="user.employees && user.employees.length > 1">
<!-- Role Switching:无论几个身份都展示,便于确认当前所在身份/仓库 -->
<template v-if="user.employees && user.employees.length">
<el-dropdown-item
v-for="role in user.employees"
:key="role.id"

View File

@ -139,12 +139,12 @@ export const videoEnableConfig: Record<number, { text: string; tagType: 'success
// =============================================================================
export const packingColumns = [
{ prop: 'id', label: '任务ID', width: 90 },
// { prop: 'id', label: '任务ID', width: 90 },
{ prop: 'order_id', label: '订单ID', width: 100 },
{ prop: 'waybill_code', label: '运单号', minWidth: 160, copyAction: 'copy' as const, copyValue: (row: any) => getWaybill(row), formatter: (row: any) => getWaybill(row) || '—' },
{ prop: 'wave_no', label: '波次号', minWidth: 140, copyAction: 'copy' as const },
{ prop: 'warehouse_id', label: '仓库ID', width: 100 },
{ prop: 'workbench_id', label: '工作台ID', width: 100 },
// { prop: 'warehouse_id', label: '仓库ID', width: 100 },
// { prop: 'workbench_id', label: '工作台ID', width: 100 },
{ prop: 'operator_text', label: '打包员', width: 100 },
{ prop: 'workbench_name', label: '工作台', width: 120, formatter: (row: any) => row.workbench_name || '—' },
{ prop: 'workbench_barcode', label: '工作台条码', width: 130 },
@ -154,7 +154,7 @@ export const packingColumns = [
{ prop: 'sku_count', label: 'SKU数', width: 80 },
{ prop: 'pack_mode', label: '打包模式', width: 100 },
{ prop: 'status', label: '任务状态', width: 100 },
{ prop: 'device_ids', label: '设备ID', width: 120, formatter: (row: any) => (row.device_ids || []).join(',') || '—' },
// { prop: 'device_ids', label: '设备ID', width: 120, formatter: (row: any) => (row.device_ids || []).join(',') || '—' },
{ prop: 'remark', label: '备注', minWidth: 120 },
{ prop: 'start_time', label: '开始时间', width: 170, sortable: true, formatter: (row: any) => row.start_time ? dayjs(row.start_time).format('YYYY-MM-DD HH:mm:ss') : '—' },
{ prop: 'end_time', label: '结束时间', width: 170, sortable: true, formatter: (row: any) => row.end_time ? dayjs(row.end_time).format('YYYY-MM-DD HH:mm:ss') : '—' },

View File

@ -56,13 +56,13 @@ export const returnReceivedAvailableFields = [
// 对齐 returnReceived.list 实际响应字段
// ============================================================
export const returnReceivedColumns = [
{ prop: 'id', label: '登记ID', width: '90', sortable: 'custom' },
// { prop: 'id', label: '登记ID', width: '90', sortable: 'custom' },
{ prop: 'waybill_code', label: '退回收件运单号', minWidth: '180', showOverflowTooltip: true, sortable: 'custom', copyAction: 'copy' as const },
{ prop: 'scan_date', label: '扫描日期', width: '170', sortable: 'custom' },
{ prop: 'scanner_id', label: '扫描人员工号', width: '110' },
{ prop: 'scanner_name', label: '扫描人员', minWidth: '100', showOverflowTooltip: true },
{ prop: 'warehouse_id', label: '仓库ID', width: '100' },
{ prop: 'store_id', label: '货主ID', width: '100' },
// { prop: 'warehouse_id', label: '仓库ID', width: '100' },
// { prop: 'store_id', label: '货主ID', width: '100' },
{ prop: 'is_original_return', label: '是否原单退回', width: '110' },
{ prop: 'order_express_id', label: '原运单ID', width: '100' },
{ prop: 'order_id', label: '原订单ID', width: '100' },

View File

@ -62,7 +62,7 @@ export const returnUnpackAvailableFields = [
// 对齐 returnUnpack.list 实际响应字段
// ============================================================
export const returnUnpackColumns = [
{ prop: 'id', label: 'ID', width: '80', sortable: 'custom' },
// { prop: 'id', label: 'ID', width: '80', sortable: 'custom' },
{ prop: 'unpack_no', label: '拆包单号', minWidth: '170', showOverflowTooltip: true, copyAction: 'copy' as const },
{ prop: 'waybill_code', label: '退回运单号', minWidth: '180', showOverflowTooltip: true, copyAction: 'copy' as const },
{ prop: 'status', label: '拆包状态', width: '100' },

View File

@ -44,10 +44,10 @@ export const returnWaybillAvailableFields = [
// 对齐 returnWaybill.list 实际响应字段
// ============================================================
export const returnWaybillColumns = [
{ prop: 'id', label: 'ID', width: '80', sortable: 'custom' },
// { prop: 'id', label: 'ID', width: '80', sortable: 'custom' },
{ prop: 'waybill_code', label: '运单号', minWidth: '180', showOverflowTooltip: true, copyAction: 'copy' as const },
{ prop: 'warehouse_id', label: '仓库ID', width: '100' },
{ prop: 'store_id', label: '货主ID', width: '100' },
// { prop: 'warehouse_id', label: '仓库ID', width: '100' },
// { prop: 'store_id', label: '货主ID', width: '100' },
{ prop: 'is_notified', label: '是否已通知', width: '110' },
{ prop: 'is_back', label: '是否退回', width: '100' },
{ prop: 'remark', label: '备注', minWidth: '140', showOverflowTooltip: true },

View File

@ -308,14 +308,14 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
detailLabel: '打包人'
},
// —— 物流信息 ——
logistics_code: {
key: 'logistics_code',
label: '物流编码',
scanBox: { type: 'select', group: SCANBOX_GROUPS.logistics, options: [] },
table: { minWidth: 100, align: 'center' },
slot: null,
detailLabel: '物流公司编码'
},
// logistics_code: {
// key: 'logistics_code',
// label: '物流编码',
// scanBox: { type: 'select', group: SCANBOX_GROUPS.logistics, options: [] },
// table: { minWidth: 100, align: 'center' },
// slot: null,
// detailLabel: '物流公司编码'
// },
logistics_name: {
key: 'logistics_name',
label: '物流公司',
@ -340,14 +340,14 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
slot: null,
detailLabel: '物流接口'
},
platform_code: {
key: 'platform_code',
label: '平台',
scanBox: { type: 'select', group: SCANBOX_GROUPS.logistics, options: [] },
table: { minWidth: 90, align: 'center' },
slot: null,
detailLabel: '平台编码'
},
// platform_code: {
// key: 'platform_code',
// label: '平台',
// scanBox: { type: 'select', group: SCANBOX_GROUPS.logistics, options: [] },
// table: { minWidth: 90, align: 'center' },
// slot: null,
// detailLabel: '平台编码'
// },
// —— 包裹信息 ——
package_material_id: {
key: 'package_material_id',

View File

@ -48,7 +48,7 @@ export type PackageMaterialRecord = {
}
export const packageMaterialColumns = [
{ prop: 'id', label: 'ID', width: '80', sortable: true },
// { prop: 'id', label: 'ID', width: '80', sortable: true },
{ prop: 'material_code', label: '包材编码', minWidth: '130', showOverflowTooltip: true },
{ prop: 'material_name', label: '包材名称', minWidth: '150', showOverflowTooltip: true },
{ prop: 'material_type', label: '包材类型', minWidth: '110', showOverflowTooltip: true },

View File

@ -36,7 +36,7 @@ export type PackageSupplierRecord = {
}
export const packageSupplierColumns = [
{ prop: 'id', label: 'ID', width: '80', sortable: true },
// { prop: 'id', label: 'ID', width: '80', sortable: true },
{ prop: 'supplier_code', label: '供应商编码', minWidth: '130', showOverflowTooltip: true },
{ prop: 'supplier_name', label: '供应商名称', minWidth: '160', showOverflowTooltip: true },
{ prop: 'contact_name', label: '联系人', minWidth: '120', showOverflowTooltip: true },

View File

@ -1,10 +1,14 @@
<template>
<div
v-if="minimized && sessionActive"
ref="floatRef"
class="create-order-float"
:class="{ 'is-dragging': dragging }"
:style="floatStyle"
role="button"
tabindex="0"
@click="restoreCreateOrderDialog"
@mousedown="handleDragStart"
@click="handleFloatClick"
@keydown.enter="restoreCreateOrderDialog"
>
<div class="create-order-float__header">
@ -34,6 +38,7 @@
</template>
<script setup lang="ts">
import { computed, onBeforeUnmount, onMounted, reactive, ref } from 'vue'
import { Close } from '@element-plus/icons-vue'
import { ElMessageBox } from 'element-plus'
import { useCreateOrderSession } from '../composables/useCreateOrderSession'
@ -66,6 +71,93 @@ async function handleClose() {
}
closeCreateOrderSession()
}
// ─── 拖拽定位 ──────────────────────────────────────────────────────────────
// 未拖拽前走 CSS 默认的 right/bottom 定位;一旦拖拽就改用 left/top 像素定位
const floatRef = ref<HTMLElement | null>(null)
const position = ref<{ left: number; top: number } | null>(null)
const dragging = ref(false)
/** 本次按下后是否已产生位移(用于区分“点击还原”与“拖拽”) */
const dragMoved = ref(false)
const dragStart = reactive({ x: 0, y: 0, left: 0, top: 0 })
/** 判定为拖拽的最小位移(px) */
const DRAG_THRESHOLD = 4
const floatStyle = computed(() => {
if (!position.value) return {}
return {
left: `${position.value.left}px`,
top: `${position.value.top}px`,
right: 'auto',
bottom: 'auto'
}
})
/** 把坐标限制在视口内,避免拖出屏幕 */
function clampToViewport(left: number, top: number) {
const width = floatRef.value?.offsetWidth ?? 220
const height = floatRef.value?.offsetHeight ?? 120
return {
left: Math.min(Math.max(left, 0), Math.max(0, window.innerWidth - width)),
top: Math.min(Math.max(top, 0), Math.max(0, window.innerHeight - height))
}
}
function handleDragStart(e: MouseEvent) {
if (e.button !== 0) return
const el = floatRef.value
if (!el) return
const rect = el.getBoundingClientRect()
dragging.value = true
dragMoved.value = false
dragStart.x = e.clientX
dragStart.y = e.clientY
dragStart.left = rect.left
dragStart.top = rect.top
window.addEventListener('mousemove', handleDragMove)
window.addEventListener('mouseup', handleDragEnd)
e.preventDefault()
}
function handleDragMove(e: MouseEvent) {
if (!dragging.value) return
const dx = e.clientX - dragStart.x
const dy = e.clientY - dragStart.y
if (!dragMoved.value && Math.hypot(dx, dy) < DRAG_THRESHOLD) return
dragMoved.value = true
position.value = clampToViewport(dragStart.left + dx, dragStart.top + dy)
}
function handleDragEnd() {
dragging.value = false
window.removeEventListener('mousemove', handleDragMove)
window.removeEventListener('mouseup', handleDragEnd)
}
/** 拖拽结束后紧随的 click 不触发「还原窗口」 */
function handleFloatClick() {
if (dragMoved.value) {
dragMoved.value = false
return
}
restoreCreateOrderDialog()
}
/** 视口尺寸变化时把浮窗收回可视范围 */
function handleWindowResize() {
if (!position.value) return
position.value = clampToViewport(position.value.left, position.value.top)
}
onMounted(() => {
window.addEventListener('resize', handleWindowResize)
})
onBeforeUnmount(() => {
window.removeEventListener('mousemove', handleDragMove)
window.removeEventListener('mouseup', handleDragEnd)
window.removeEventListener('resize', handleWindowResize)
})
</script>
<style scoped>
@ -89,11 +181,23 @@ async function handleClose() {
box-shadow: 0 12px 28px rgba(64, 158, 255, 0.24);
}
/* 拖拽中:去掉过渡/悬停位移,避免跟手感变差 */
.create-order-float.is-dragging {
cursor: grabbing;
transition: none;
user-select: none;
}
.create-order-float.is-dragging:hover {
transform: none;
}
.create-order-float__header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 8px;
cursor: move;
}
.create-order-float__title {

View File

@ -2,7 +2,7 @@
<div class="express-waybill-panel" v-loading="loading">
<template v-if="orderId">
<div class="toolbar">
<el-button size="small" :loading="loading" @click="loadDetail">刷新运单</el-button>
<el-button size="small" type="primary" :loading="loading" @click="loadDetail">刷新</el-button>
<!-- <el-button size="small" type="primary" plain @click="openQuickBindDialog">按运单绑定包材</el-button> -->
<!-- <el-tag v-if="waybillCodesText" size="small" type="info">运单汇总:{{ waybillCodesText }}</el-tag> -->
</div>

View File

@ -4,7 +4,6 @@
<el-button
type="primary"
size="small"
:icon="Refresh"
title="刷新"
:loading="loading"
class="toolbar-btn"

View File

@ -49,7 +49,7 @@
<div class="main-container">
<transition name="tab-fade" mode="out-in">
<!--
tab 缓存策略由「实验性功能」设置控制(tabCacheEnabled / tabCacheMax):
tab 缓存策略由「更多设置」控制(tabCacheEnabled / tabCacheMax):
启用时用 KeepAlive 缓存各 tab 组件(超出 max 按 LRU 淘汰最久未用),
关闭时不缓存、每次切换重新挂载。
-->

View File

@ -116,7 +116,7 @@
<el-tabs v-model="activeTab" class="detail-tab">
<el-tab-pane label="基本信息" name="info" />
<el-tab-pane label="商品图片" name="images" />
<el-tab-pane label="库存信息" name="storage" />
<!-- <el-tab-pane label="库存信息" name="storage" /> -->
<el-tab-pane label="外部绑定" name="erpStock" />
<el-tab-pane label="日志" name="log" />
</el-tabs>
@ -273,9 +273,16 @@ const columns = [
{ prop: 'id', label: 'SKU', width: 80 },
{ prop: 'images', label: '商品图片', width: 80 },
{ prop: 'item_code', label: '商品编码', minWidth: 130 },
{ prop: 'item_name', label: '商品名称', minWidth: 150, sortable: true },
{ prop: 'item_name', label: '商品名称', minWidth: 150 },
{ prop: 'goods_code', label: '商家编码', width: 120 },
{ prop: 'barcodes', label: '条码', minWidth: 150, formatter: (row: any) => row.barcodes?.length ? row.barcodes.join(' | ') : '—' },
// 条码:多值折叠(只显示第 1 个 + 「+N」,点击 +N 展开全部),单击条码复制
{
prop: 'barcodes',
label: '条码',
minWidth: 150,
copyAction: 'copy',
copyValue: (row: any) => (Array.isArray(row.barcodes) ? row.barcodes : [])
},
{ prop: 'brand_name', label: '品牌', width: 100 },
{ prop: 'stock_unit', label: '库存单位', width: 90 },
{ prop: 'warehouse_name', label: '所属仓库', minWidth: 140 },
@ -511,19 +518,15 @@ const toolbarButtons = computed<ToolbarButtonConfig[]>(() => [
{
key: 'refresh',
label: '刷新',
type: 'primary',
size: 'small',
action: 'handleRefresh'
},
{
key: 'columnConfig',
label: '字段设置',
size: 'small',
action: 'openColumnConfigPanel'
},
{
key: 'export',
label: '导出',
size: 'small',
plain: true,
loadingKey: 'exportLoading',
action: 'handleExportAll',
buttonType: 'dropdown',
@ -532,6 +535,12 @@ const toolbarButtons = computed<ToolbarButtonConfig[]>(() => [
{ label: '导出全部', action: 'handleExportAll', divided: true }
]
},
{
key: 'columnConfig',
label: '字段设置',
size: 'small',
action: 'openColumnConfigPanel'
},
{
key: 'toggleDetail',
label: '显示详情',

View File

@ -4,7 +4,6 @@
<el-button
type="primary"
size="small"
icon="Refresh"
@click="fetchStockInfo"
title="刷新"
:loading="loading"

View File

@ -143,7 +143,7 @@
<div class="detail-container">
<!-- KeepAlive 直子须为组件 vnode(不能是包装 div),:key=activeTab 使各详情 tab 独立缓存,
切换时保留组件状态、不重建/不重复请求,避免详情 tab 切换卡顿。
缓存策略由「实验性功能」设置控制(tabCacheEnabled / tabCacheMax)。 -->
缓存策略由「更多设置」控制(tabCacheEnabled / tabCacheMax)。 -->
<KeepAlive v-if="tabCacheEnabled" :max="tabCacheMax">
<component
:is="activeComponent"

View File

@ -2,7 +2,7 @@
<div class="entry-binding-relations">
<div class="header-actions">
<div class="left-actions">
<el-button size="small" :loading="loading" @click="loadBindingData">刷新</el-button>
<el-button size="small" type="primary" :loading="loading" @click="loadBindingData">刷新</el-button>
</div>
<div class="right-actions">
<span class="summary-text">已绑定收货单 {{ receivingBindings.length }} 个</span>
@ -426,7 +426,8 @@ defineExpose({
.left-actions {
display: flex;
gap: 8px;
align-items: center;
gap: 6px;
}
.right-actions {

View File

@ -2,10 +2,11 @@
<div class="entry-details">
<div class="header-actions">
<div class="left-actions">
<el-button size="small" @click="reloadAll">刷新</el-button>
<el-button size="small" type="primary" @click="reloadAll">刷新</el-button>
<el-button
size="small"
type="primary"
plain
:disabled="!canDirectInbound"
:loading="commitLoading"
@click="handleCommit"
@ -14,6 +15,8 @@
</el-button>
<el-button
size="small"
type="primary"
plain
:disabled="!canBatchImport"
@click="openBatchImportDialog"
>
@ -407,7 +410,8 @@ onMounted(() => {
.left-actions {
display: flex;
gap: 8px;
align-items: center;
gap: 6px;
}
.right-actions {

View File

@ -4,7 +4,6 @@
<el-button
type="primary"
size="small"
:icon="Refresh"
title="刷新"
:loading="loading"
class="toolbar-btn"
@ -15,59 +14,61 @@
</el-button>
</el-button-group>
<el-table
:data="tableData"
border
stripe
style="width: 100%; height: 100%"
height="100%"
v-loading="loading"
>
<el-table-column prop="created_at" label="时间" width="175" />
<el-table-column label="操作人" width="110">
<template #default="{ row }">
{{ row.operator_name ?? '—' }}
</template>
</el-table-column>
<el-table-column label="操作类型" min-width="160" show-overflow-tooltip>
<template #default="{ row }">
{{ formatOperationLabel(row) }}
</template>
</el-table-column>
<el-table-column label="平台" width="100" show-overflow-tooltip>
<template #default="{ row }">
{{ row.platform_name || row.platform_code || '—' }}
</template>
</el-table-column>
<el-table-column label="外部日志" width="108" align="center">
<template #default="{ row }">
<el-tag v-if="row.external_log_type && row.external_log_type !== 'NONE'" size="small" type="info">
{{ row.external_log_type }}
</el-tag>
<span v-else class="cell-muted">—</span>
</template>
</el-table-column>
<el-table-column label="说明" min-width="220" show-overflow-tooltip>
<template #default="{ row }">
{{ row.message ?? '—' }}
</template>
</el-table-column>
<div ref="tableHostRef" class="table-host">
<el-table
:data="tableData"
border
stripe
style="width: 100%"
:height="tableHeight"
v-loading="loading"
>
<el-table-column prop="created_at" label="时间" width="175" />
<el-table-column label="操作人" width="110">
<template #default="{ row }">
{{ row.operator_name ?? '—' }}
</template>
</el-table-column>
<el-table-column label="操作类型" min-width="160" show-overflow-tooltip>
<template #default="{ row }">
{{ formatOperationLabel(row) }}
</template>
</el-table-column>
<el-table-column label="平台" width="100" show-overflow-tooltip>
<template #default="{ row }">
{{ row.platform_name || row.platform_code || '—' }}
</template>
</el-table-column>
<el-table-column label="外部日志" width="108" align="center">
<template #default="{ row }">
<el-tag v-if="row.external_log_type && row.external_log_type !== 'NONE'" size="small" type="info">
{{ row.external_log_type }}
</el-tag>
<span v-else class="cell-muted">—</span>
</template>
</el-table-column>
<el-table-column label="说明" min-width="220" show-overflow-tooltip>
<template #default="{ row }">
{{ row.message ?? '—' }}
</template>
</el-table-column>
<el-table-column label="操作" width="108" align="center" fixed="right">
<template #default="scope">
<el-button
v-if="hasExternalPayload(scope.row)"
type="primary"
link
size="small"
@click="viewData(scope.row)"
>
查看报文
</el-button>
<span v-else class="cell-muted">—</span>
</template>
</el-table-column>
</el-table>
<el-table-column label="操作" width="108" align="center" fixed="right">
<template #default="scope">
<el-button
v-if="hasExternalPayload(scope.row)"
type="primary"
link
size="small"
@click="viewData(scope.row)"
>
查看报文
</el-button>
<span v-else class="cell-muted">—</span>
</template>
</el-table-column>
</el-table>
</div>
<div class="pagination-container">
<el-pagination
@ -98,7 +99,7 @@
<script setup lang="ts">
import { computed, reactive, ref, watch } from 'vue'
import { ElMessage } from 'element-plus'
import { Refresh } from '@element-plus/icons-vue'
import { useResizeObserver } from '@vueuse/core'
import RequestData from '@/components/RequestData/index.vue'
import { queryEntryLogs } from '@/api/storage.entry/entry'
@ -113,6 +114,8 @@ const tableData = ref<any[]>([])
const showRequestData = ref(false)
const requestId = ref(0)
const requestType = ref('')
const tableHostRef = ref<HTMLElement | null>(null)
const tableHeight = ref(280)
const pagination = reactive({
page: 1,
@ -120,6 +123,13 @@ const pagination = reactive({
total: 0
})
useResizeObserver(tableHostRef, (entries) => {
const h = entries[0]?.contentRect.height ?? 0
if (h >= 100) {
tableHeight.value = Math.floor(h)
}
})
const entryId = computed(() => {
const id = props.id ?? props.row?.id
if (id === undefined || id === null || id === '') return ''
@ -168,6 +178,14 @@ watch(
tableData.value = []
pagination.total = 0
}
requestAnimationFrame(() => {
const el = tableHostRef.value
if (el) {
const h = el.getBoundingClientRect().height
if (h >= 100) tableHeight.value = Math.floor(h)
}
})
},
{ immediate: true }
)
@ -226,20 +244,31 @@ function viewData(row: any) {
<style scoped lang="scss">
.log-container {
height: 100%;
padding: 8px 10px;
width: 100%;
padding: 6px 10px;
overflow: hidden;
display: flex;
flex-direction: column;
box-sizing: border-box;
.toolbar-btn-group {
margin-bottom: 8px;
margin-bottom: 6px;
flex-shrink: 0;
}
.table-host {
flex: 1;
min-height: 120px;
min-width: 0;
overflow: hidden;
}
.pagination-container {
margin-top: 8px;
padding-top: 4px;
display: flex;
justify-content: center;
justify-content: flex-end;
align-items: center;
flex-shrink: 0;
}

View File

@ -217,13 +217,13 @@ export const productstockColums = [
{ prop: 'quantity', label: '总数量', width: '100' },
{ prop: 'available_quantity', label: '可用数量', width: '100' },
{ prop: 'locked_quantity', label: '锁定数量', width: '100' },
{ prop: 'first_inbound_time', label: '首次入库时间', width: '160' },
{ prop: 'last_inbound_time', label: '最后入库时间', width: '160' },
{ prop: 'is_shelf_life_mgmt', label: '保质期管理', width: '100' },
{ prop: 'remaining_threshold_days', label: '临期阈值(天)', width: '110' },
{ prop: 'is_shelf_life_warning_triggered', label: '临期预警', width: '100' },
{ prop: 'is_batch_mgmt_enabled', label: '批次管理', width: '100' },
{ prop: 'batch_count', label: '批次数', width: '80' }
{ prop: 'batch_count', label: '批次数', width: '80' },
{ prop: 'first_inbound_time', label: '首次入库时间', width: '160' },
{ prop: 'last_inbound_time', label: '最后入库时间', width: '160' },
]
export const productstockDetail = [

View File

@ -152,8 +152,8 @@ export const transactionColumns = [
{ prop: 'order_no', label: '单号', minWidth: '180', showOverflowTooltip: true },
{ prop: 'batch_no', label: '批次号', minWidth: '150', copyAction: 'copy' as const },
{ prop: 'space_id', label: '库位', width: '100' },
{ prop: 'warehouse_id', label: '仓库ID', width: '100' },
{ prop: 'store_id', label: '货主ID', width: '100' },
// { prop: 'warehouse_id', label: '仓库ID', width: '100' },
// { prop: 'store_id', label: '货主ID', width: '100' },
{ prop: 'quantity', label: '数量', width: '100' },
{ prop: 'operator_name', label: '操作人', width: '110' },
{ prop: 'remark', label: '备注', minWidth: '150', showOverflowTooltip: true },

View File

@ -63,7 +63,7 @@ export const columns = [
{ prop: 'transaction_type', label: '流水类型', width: 90 },
{ prop: 'stock_id', label: '商品ID', width: 90, copyAction: 'copy' as const },
// { prop: 'store_id', label: '货主ID', width: 90 },
{ prop: 'warehouse_id', label: '仓库ID', width: 90 },
// { prop: 'warehouse_id', label: '仓库ID', width: 90 },
{ prop: 'stock_quantity', label: '库存变动', width: 90 },
{ prop: 'lock_quantity', label: '锁定变动', width: 90 },
{ prop: 'before_quantity', label: '变动前库存', width: 100 },

View File

@ -112,39 +112,41 @@
/>
<div v-if="selectedFlowId" class="lower-level" :class="tableSize" :style="lowerPaneStyle">
<div class="detail-header">
<div class="detail-info">
<span class="detail-title">流水详情 #{{ selectedFlowId }}</span>
</div>
<el-tabs v-model="activeTab" class="detail-tab">
<el-tab-pane label="基础信息" name="detail" />
</el-tabs>
</div>
<div class="detail-container">
<el-descriptions :column="2" border size="small">
<el-descriptions-item label="流水ID">{{ selectedRowData.id }}</el-descriptions-item>
<el-descriptions-item label="流水时间">{{ formatDateTime(selectedRowData.created_at) }}</el-descriptions-item>
<el-descriptions-item label="流水类型">
<span :class="getStatusTextClass(getTransactionTypeTag(selectedRowData.transaction_type))">
{{ getTransactionTypeLabel(selectedRowData.transaction_type) }}
</span>
</el-descriptions-item>
<el-descriptions-item label="操作人">{{ selectedRowData.operator_name || '—' }}</el-descriptions-item>
<el-descriptions-item label="商品ID">{{ selectedRowData.stock_id ?? '—' }}</el-descriptions-item>
<el-descriptions-item label="仓库ID">{{ selectedRowData.warehouse_id ?? '—' }}</el-descriptions-item>
<el-descriptions-item label="批次号">{{ selectedRowData.batch_no || '—' }}</el-descriptions-item>
<el-descriptions-item label="变动数量">
<span :class="getQuantityClass(selectedRowData)">{{ formatQuantityDisplay(selectedRowData) }}</span>
</el-descriptions-item>
<el-descriptions-item label="可用库存">
{{ selectedRowData.before_quantity ?? '—' }} → {{ selectedRowData.after_quantity ?? '—' }}
</el-descriptions-item>
<el-descriptions-item label="锁定库存">
{{ selectedRowData.before_locked_quantity ?? '—' }} → {{ selectedRowData.after_locked_quantity ?? '—' }}
</el-descriptions-item>
<el-descriptions-item label="订单类型">{{ getOrderTypeLabel(selectedRowData.order_type) }}</el-descriptions-item>
<el-descriptions-item label="订单号">{{ selectedRowData.order_no || '—' }}</el-descriptions-item>
<el-descriptions-item label="订单ID">{{ selectedRowData.order_id || '—' }}</el-descriptions-item>
<el-descriptions-item label="收货单ID">{{ selectedRowData.receiving_id || '—' }}</el-descriptions-item>
<el-descriptions-item label="入库单ID">{{ selectedRowData.entry_order_id || '—' }}</el-descriptions-item>
<el-descriptions-item label="备注" :span="2">{{ selectedRowData.remark || '—' }}</el-descriptions-item>
</el-descriptions>
<div v-if="activeTab === 'detail'" class="detail-page">
<el-descriptions :column="2" border size="small">
<el-descriptions-item label="流水ID">{{ selectedRowData.id }}</el-descriptions-item>
<el-descriptions-item label="流水时间">{{ formatDateTime(selectedRowData.created_at) }}</el-descriptions-item>
<el-descriptions-item label="流水类型">
<span :class="getStatusTextClass(getTransactionTypeTag(selectedRowData.transaction_type))">
{{ getTransactionTypeLabel(selectedRowData.transaction_type) }}
</span>
</el-descriptions-item>
<el-descriptions-item label="操作人">{{ selectedRowData.operator_name || '—' }}</el-descriptions-item>
<el-descriptions-item label="商品ID">{{ selectedRowData.stock_id ?? '—' }}</el-descriptions-item>
<el-descriptions-item label="仓库ID">{{ selectedRowData.warehouse_id ?? '—' }}</el-descriptions-item>
<el-descriptions-item label="批次号">{{ selectedRowData.batch_no || '—' }}</el-descriptions-item>
<el-descriptions-item label="变动数量">
<span :class="getQuantityClass(selectedRowData)">{{ formatQuantityDisplay(selectedRowData) }}</span>
</el-descriptions-item>
<el-descriptions-item label="可用库存">
{{ selectedRowData.before_quantity ?? '—' }} → {{ selectedRowData.after_quantity ?? '—' }}
</el-descriptions-item>
<el-descriptions-item label="锁定库存">
{{ selectedRowData.before_locked_quantity ?? '—' }} → {{ selectedRowData.after_locked_quantity ?? '—' }}
</el-descriptions-item>
<el-descriptions-item label="订单类型">{{ getOrderTypeLabel(selectedRowData.order_type) }}</el-descriptions-item>
<el-descriptions-item label="订单号">{{ selectedRowData.order_no || '—' }}</el-descriptions-item>
<el-descriptions-item label="订单ID">{{ selectedRowData.order_id || '—' }}</el-descriptions-item>
<el-descriptions-item label="收货单ID">{{ selectedRowData.receiving_id || '—' }}</el-descriptions-item>
<el-descriptions-item label="入库单ID">{{ selectedRowData.entry_order_id || '—' }}</el-descriptions-item>
<el-descriptions-item label="备注" :span="2">{{ selectedRowData.remark || '—' }}</el-descriptions-item>
</el-descriptions>
</div>
</div>
</div>
<div v-else class="no-selection" :style="lowerPaneStyle">
@ -235,6 +237,9 @@ const list = ref<any[]>([])
const selectedFlowId = ref<number | string | null>(null)
const detailVisible = ref(true)
/** 详情面板 tab(对齐 storage/receiving_owner) */
const activeTab = ref('detail')
const {
exportLoading,
exportDialogVisible,
@ -764,15 +769,45 @@ onMounted(() => {
min-height: 42px;
box-sizing: border-box;
.detail-info {
display: flex;
align-items: center;
gap: 10px;
.detail-tab {
flex: 1;
min-width: 0;
margin-bottom: -1px;
.detail-title {
font-size: 14px;
font-weight: 500;
color: #303133;
:deep(.el-tabs__header) {
margin: 0;
border-bottom: none;
}
:deep(.el-tabs__nav-wrap::after) {
display: none;
}
:deep(.el-tabs__active-bar) {
display: none;
}
:deep(.el-tabs__item) {
height: 40px;
line-height: 40px;
font-size: 13px;
padding: 0 16px;
color: #606266;
border: 1px solid transparent;
border-bottom: none;
border-radius: 4px 4px 0 0;
transition: color 0.2s;
}
:deep(.el-tabs__item:hover) {
color: var(--el-color-primary);
}
:deep(.el-tabs__item.is-active) {
color: var(--el-color-primary);
background-color: #fff;
border-color: #ebeef5;
border-bottom-color: #fff;
}
}
}
@ -788,6 +823,11 @@ onMounted(() => {
:deep(.el-descriptions__label) {
width: 100px;
}
.detail-page {
height: 100%;
overflow: auto;
}
}
}

View File

@ -4,7 +4,6 @@
<el-button
type="primary"
size="small"
:icon="Refresh"
@click="fetchReceivingLogs"
title="刷新"
:loading="loading"

View File

@ -2,18 +2,21 @@
<div class="product-details">
<div class="header-actions">
<div class="left-actions">
<el-button size="small" type="primary" @click="openAddItemDialog">新增商品</el-button>
<el-button size="small" type="primary" @click="loadProductData">刷新</el-button>
<el-button size="small" @click="openBatchImportDialog">批量导入商品</el-button>
<el-button size="small" type="primary" plain @click="openAddItemDialog">新增商品</el-button>
<el-button
size="small"
type="danger"
plain
:disabled="!canBatchDelete"
:loading="batchDeletingDetails"
@click="confirmBatchDeleteDetails"
>
批量删除
</el-button>
<el-button size="small" @click="loadProductData">刷新</el-button>
<el-radio-group v-model="matchFilter" size="small" class="match-filter-group">
<el-radio-button value="all">全部</el-radio-button>
<el-radio-button value="matched">已匹配</el-radio-button>

View File

@ -105,7 +105,7 @@
<div v-if="selectedReceivingId" class="lower-level" :class="tableSize" :style="lowerPaneStyle">
<div class="detail-header">
<el-tabs v-model="activeTab" class="detail-tab">
<el-tab-pane label="收货明细" name="details" />
<!-- <el-tab-pane label="收货明细" name="details" /> -->
<el-tab-pane label="操作日志" name="logs" />
</el-tabs>
</div>
@ -300,7 +300,7 @@ const availableFieldsRef = reactive(
JSON.parse(JSON.stringify(availableFields)).filter((f: any) => f.value !== 'store_id')
)
const activeTab = ref('details')
const activeTab = ref('logs')
const list = ref<any[]>([])
const loading = ref(false)
@ -341,7 +341,7 @@ const componentMap: Record<string, any> = {
logs: Logs,
}
const activeComponent = computed(() => componentMap[activeTab.value] || componentMap.details)
const activeComponent = computed(() => componentMap[activeTab.value] || componentMap.logs)
const selectedRow = computed(() => {
return list.value.find((i: any) => i.id === selectedReceivingId.value) || null

View File

@ -15,16 +15,14 @@
<div class="main-content">
<div class="toolbar">
<div class="toolbar-left">
<el-button size="small" type="primary" @click="loadData">刷新</el-button>
<ExportModeDropdown
:loading="exportLoading"
label="导出"
default-action="handleExportOnlyInOut"
:items="exportDropdownItems"
@action="handleExportAction"
<order-toolbar-button-group
:buttons="toolbarButtons"
:resolve-disabled="resolveButtonDisabled"
:resolve-loading="resolveButtonLoading"
:resolve-label="resolveButtonLabel"
:layout-key="toolbarLayoutKey"
@action="handleToolbarButtonClick"
/>
<el-button size="small" @click="openColumnConfigPanel">字段设置</el-button>
<el-button size="small" @click="toggleDetailVisible">{{ detailVisible ? '隐藏详情' : '显示详情' }}</el-button>
<el-divider direction="vertical" />
<WarehouseSelect
v-model="warehouseFilterId"
@ -70,21 +68,24 @@
@mousedown="beginSplitDrag"
/>
<div v-if="selectedRow" class="lower-level" :class="tableSize" :style="lowerPaneStyle">
<!-- <div class="detail-header">
<span class="detail-title">行明细</span>
<span class="detail-sub">字段与接口 <code>data.list[]</code> 单条对象一致</span>
</div> -->
<div class="detail-header">
<el-tabs v-model="activeTab" class="detail-tab">
<el-tab-pane label="报表明细" name="detail" />
</el-tabs>
</div>
<div class="detail-container">
<el-descriptions :column="2" border size="small">
<el-descriptions-item
v-for="key in detailKeys"
:key="key"
:label="fieldLabel(key)"
:span="isWideKey(key) ? 2 : 1"
>
{{ detailValue(key) }}
</el-descriptions-item>
</el-descriptions>
<div v-if="activeTab === 'detail'" class="detail-page">
<el-descriptions :column="2" border size="small">
<el-descriptions-item
v-for="key in detailKeys"
:key="key"
:label="fieldLabel(key)"
:span="isWideKey(key) ? 2 : 1"
>
{{ detailValue(key) }}
</el-descriptions-item>
</el-descriptions>
</div>
</div>
</div>
<div v-else class="no-selection" :style="lowerPaneStyle">
@ -115,10 +116,10 @@ import { ElMessage } from 'element-plus'
import dayjs from 'dayjs'
import ScanBox from '@/components/ScanBox/index.vue'
import UpperTable from '@/components/UpperTable/index.vue'
import ExportModeDropdown from '@/components/ExportModeDropdown.vue'
import type { ExportDropdownItem } from '@/components/ExportModeDropdown.vue'
import WarehouseSelect from '@/components/WarehouseSelect.vue'
import AsyncExportProgressDialog from '@/components/AsyncExportProgressDialog.vue'
import OrderToolbarButtonGroup from '@/views/order/orderManagement/component/OrderToolbarButtonGroup.vue'
import type { ToolbarButtonConfig } from '@/views/order/orderManagement/config/order-common-config'
import { useAsyncExportTask } from '@/composables/useAsyncExportTask'
import {
exportStoreReport,
@ -181,6 +182,90 @@ function openColumnConfigPanel() {
upperTable.value?.openColumnConfig?.()
}
// ─── 工具栏按钮配置 ────────────────────────────────────────────────────────
const toolbarButtons = computed<ToolbarButtonConfig[]>(() => [
{
key: 'refresh',
label: '刷新',
type: 'primary',
size: 'small',
action: 'handleRefresh'
},
{
key: 'export',
label: '导出',
size: 'small',
plain: true,
loadingKey: 'exportLoading',
action: 'handleExportOnlyInOut',
buttonType: 'dropdown',
dropdownOptions: [
{ label: '仅出入库(不含锁定记录)', action: 'handleExportOnlyInOut' },
{ label: '全部(含锁定记录)', action: 'handleExportWithLock', divided: true },
{ label: '导出选中·仅出入库', action: 'handleExportSelectedOnlyInOut', divided: true },
{ label: '导出选中·全部(含锁定记录)', action: 'handleExportSelectedWithLock' }
]
},
{
key: 'columnConfig',
label: '字段设置',
size: 'small',
action: 'openColumnConfigPanel'
},
{
key: 'toggleDetail',
label: '显示详情',
dynamicLabelKey: 'detailToggleLabel',
size: 'small',
action: 'toggleDetailVisible'
}
])
const buttonLoadingMap = computed(() => ({
exportLoading: exportLoading.value
}))
const buttonLabelMap = computed(() => ({
detailToggleLabel: detailVisible.value ? '隐藏详情' : '显示详情'
}))
const toolbarLayoutKey = computed(() =>
JSON.stringify({
loading: buttonLoadingMap.value,
labels: buttonLabelMap.value
})
)
function resolveButtonLoading(loadingKey?: string) {
if (!loadingKey) return false
return Boolean((buttonLoadingMap.value as Record<string, boolean>)[loadingKey])
}
function resolveButtonDisabled(_disabledKey?: string) {
return false
}
function resolveButtonLabel(defaultLabel: string, dynamicLabelKey?: string) {
if (!dynamicLabelKey) return defaultLabel
return (buttonLabelMap.value as Record<string, string>)[dynamicLabelKey] || defaultLabel
}
const toolbarActionMap: Record<string, () => void> = {
handleRefresh: () => loadData(),
handleExportOnlyInOut: () => void handleExportOnlyInOut(),
handleExportWithLock: () => void handleExportWithLock(),
handleExportSelectedOnlyInOut: () => void handleExportSelectedOnlyInOut(),
handleExportSelectedWithLock: () => void handleExportSelectedWithLock(),
openColumnConfigPanel: () => openColumnConfigPanel(),
toggleDetailVisible: () => toggleDetailVisible()
}
function handleToolbarButtonClick(action: ToolbarButtonConfig['action']) {
const handler = toolbarActionMap[action]
if (!handler) return
handler()
}
const tableSize = ref<'small' | 'default' | 'large'>('small')
const loading = ref(false)
const queryTime = ref(0)
@ -230,6 +315,9 @@ const warehouseFilterId = ref<number | string | null>(null)
const selectedRow = computed(() => list.value.find((r) => r.__rid === selectedRid.value) || null)
/** 详情面板 tab(对齐 storage/receiving_owner / storage/report) */
const activeTab = ref('detail')
const detailKeys = computed(() => {
if (!selectedRow.value) return []
const keys = Object.keys(selectedRow.value).filter((k) => k !== '__rid' && !STORE_SIDE_HIDDEN_COLS.has(k))
@ -332,14 +420,6 @@ function handleSelectionChange(rows: any[]) {
selectionRows.value = rows || []
}
/** 导出选项:全部=当前筛选条件下全部;选中=勾选行(stock_id in 叠加当前筛选)。mode 语义:item=含 LOCK;不传=仅出入库 */
const exportDropdownItems: ExportDropdownItem[] = [
{ label: '仅出入库(不含锁定记录)', action: 'handleExportOnlyInOut' },
{ label: '全部(含锁定记录)', action: 'handleExportWithLock', divided: true },
{ label: '导出选中·仅出入库', action: 'handleExportSelectedOnlyInOut', divided: true },
{ label: '导出选中·全部(含锁定记录)', action: 'handleExportSelectedWithLock' }
]
/** 勾选行的有效 stock_id(去重去空;后端数组即 in 匹配,参考 inventory 导出选中写法) */
function collectSelectedStockIds(): number[] {
return Array.from(
@ -408,22 +488,6 @@ async function handleExportSelectedWithLock() {
await submitExportTaskWithMode(buildSelectedExportPayload(), 'item')
}
function handleExportAction(action: string) {
if (action === 'handleExportWithLock') {
void handleExportWithLock()
return
}
if (action === 'handleExportSelectedOnlyInOut') {
void handleExportSelectedOnlyInOut()
return
}
if (action === 'handleExportSelectedWithLock') {
void handleExportSelectedWithLock()
return
}
void handleExportOnlyInOut()
}
async function loadFilterData() {
try {
const presetRes: any = await indexApi.fastWhereTree('stock')
@ -547,8 +611,11 @@ onMounted(() => {
justify-content: space-between;
align-items: center;
background-color: #fff;
min-width: 0;
.toolbar-left {
flex: 1;
min-width: 0;
display: flex;
gap: 8px;
align-items: center;
@ -637,30 +704,57 @@ onMounted(() => {
background-color: #fff;
.detail-header {
padding: 10px 12px;
background-color: #fafafa;
border-bottom: 1px solid #ebeef5;
background: #fafafa;
padding: 0 12px;
display: flex;
flex-wrap: wrap;
align-items: baseline;
gap: 8px;
}
align-items: center;
justify-content: space-between;
gap: 12px;
height: 42px;
min-height: 42px;
box-sizing: border-box;
.detail-title {
font-size: 14px;
font-weight: 500;
color: #303133;
}
.detail-tab {
flex: 1;
min-width: 0;
margin-bottom: -1px;
.detail-sub {
font-size: 12px;
color: #909399;
:deep(.el-tabs__header) {
margin: 0;
border-bottom: none;
}
code {
font-size: 12px;
padding: 0 4px;
background: #f4f4f5;
border-radius: 2px;
:deep(.el-tabs__nav-wrap::after) {
display: none;
}
:deep(.el-tabs__active-bar) {
display: none;
}
:deep(.el-tabs__item) {
height: 40px;
line-height: 40px;
font-size: 13px;
padding: 0 16px;
color: #606266;
border: 1px solid transparent;
border-bottom: none;
border-radius: 4px 4px 0 0;
transition: color 0.2s;
}
:deep(.el-tabs__item:hover) {
color: var(--el-color-primary);
}
:deep(.el-tabs__item.is-active) {
color: var(--el-color-primary);
background-color: #fff;
border-color: #ebeef5;
border-bottom-color: #fff;
}
}
}
@ -676,6 +770,11 @@ onMounted(() => {
:deep(.el-descriptions-item__cell) {
padding: 8px 12px;
}
.detail-page {
height: 100%;
overflow: auto;
}
}
}

View File

@ -203,10 +203,10 @@ export const entryColums = [
{ prop: 'store_name', label: '货主', minWidth: '140', formatter: (row: any) => String(row?.store_name || '').trim() || '--' },
{ prop: 'source_platform_name', label: '来源平台', width: '130', formatter: (row: any) => String(row?.source_platform_name || '').trim() || '--' },
{ prop: 'extend_props', label: '转单订单号', width: '180', formatter: (row: any) => formatTransferredOrderCode(row) },
{ prop: 'qimen_owner_code', label: '奇门货主编码', width: '140' },
{ prop: 'qimen_warehouse_code', label: '奇门仓库编码', width: '140' },
// { prop: 'qimen_owner_code', label: '奇门货主编码', width: '140' },
// { prop: 'qimen_warehouse_code', label: '奇门仓库编码', width: '140' },
{ prop: 'express_codes', label: '运单号', width: '140', formatter: (row: any) => formatExpressCodes(row) },
{ prop: 'express_code', label: '快递编码', width: '110' },
// { prop: 'express_code', label: '快递编码', width: '110' },
{ prop: 'express_name', label: '快递名称', width: '110' },
{ prop: 'total_order_lines', label: '订单行数', width: '90' },
{ prop: 'receiver_name', label: '收件人', width: '110', formatter: (row: any) => String(row?.receiver_name || '').trim() || '--' },

View File

@ -2492,7 +2492,7 @@ function copyOpenApiConfig(row: any) {
if (row.app_name) lines.push(`应用名称:${row.app_name}`)
if (row.self_app_key) lines.push(`APPKEY:${row.self_app_key}`)
if (row.self_app_secret) lines.push(`APPSECRET:${row.self_app_secret}`)
if (row.callback_url) lines.push(`回调地址:${row.callback_url}`)
lines.push(`接口地址:${baseApi}/openapi`)
lines.push('')
lines.push('开发文档:')
lines.push(` 接口文档 ${baseApi}/docs/api/openapi`)

View File

@ -1430,7 +1430,7 @@ export const tabPages: TabPageRawConfig[] = [
scanBoxCacheKey: 'basic-settings-plan',
scanBoxFieldKeys: ['store_id', 'report_id', 'enabled'],
labelOverrides: { name: '计划名称' },
tableColumnKeys: ['id', 'name', 'store_name', 'report_name', 'schedule_times', 'channel', 'enabled', 'late_grace_minutes', 'notify_group_ids', 'notify_member_ids', 'remark', 'created_at', 'updated_at', 'operation'],
tableColumnKeys: ['name', 'store_name', 'report_name', 'schedule_times', 'channel', 'enabled', 'late_grace_minutes', 'notify_group_ids', 'notify_member_ids', 'remark', 'created_at', 'updated_at', 'operation'],
upperTableDefaults: {
title: '报表投递计划',
showSelection: false

View File

@ -6,7 +6,7 @@ export const courierAvailableFields = [
]
export const courierColumns = [
{ prop: 'id', label: 'ID', width: '80', sortable: true },
// { prop: 'id', label: 'ID', width: '80', sortable: true },
{ prop: 'express_name', label: '快递名称', minWidth: '180', showOverflowTooltip: true },
{ prop: 'code', label: '业务编码', minWidth: '180', showOverflowTooltip: true },
{ prop: 'name', label: '业务名称', minWidth: '180', showOverflowTooltip: true },
@ -22,7 +22,7 @@ export const platformAvailableFields = [
]
export const platformColumns = [
{ prop: 'id', label: 'ID', width: '80', sortable: true },
// { prop: 'id', label: 'ID', width: '80', sortable: true },
{ prop: 'platform_name', label: '平台名称', minWidth: '160', showOverflowTooltip: true },
{ prop: 'code', label: '业务编码', minWidth: '140', showOverflowTooltip: true },
{ prop: 'label', label: '显示标签', minWidth: '180', showOverflowTooltip: true },

View File

@ -7,41 +7,47 @@ import type {
/** setting.expressInterface.list 单条记录字段顺序(与接口返回一致) */
export const expressInterfaceListFieldOrder = [
'id',
'warehouse_id',
'name',
'platform_code',
'platform_shop_id',
'providerid',
'express_code',
'sys_express_code',
'is_system_express_code',
'express_name',
'shop_name',
'warehouse_id',
'shop_id',
'platform_shop_id',
'template_id',
'paymode',
'brandno',
'providertype',
'providerid',
'platform_code',
'sender_name',
'sender_tel',
'weight',
'weight_type',
'viewer',
'client_id',
'is_enabled',
'is_share',
'ispickup',
'shipperno',
'template_url',
'ext_data',
'province_name',
'city_name',
'district_name',
'address',
'town_name',
'site_code',
'template_id',
'template_url',
'product_type',
'brandno',
'is_enabled',
'weight',
'weight_type',
'viewer',
'client_id',
'ispickup',
'shipperno',
'is_share',
'shop_name',
'express',
'express_name',
'express_polyapi_extra_info',
'express_pdd_code',
'is_system_express_code',
'quantity',
'recycled_quantity',
'cancel_quantity',
'allocated_quantity',
'ext_data'
'allocated_quantity'
] as const
export const expressInterfaceFieldLabels: Record<string, string> = {
@ -51,6 +57,9 @@ export const expressInterfaceFieldLabels: Record<string, string> = {
sys_express_code: '系统快递编码',
platform_code: '平台编码',
platform_shop_id: '平台店铺ID',
shop_id: '店铺ID',
paymode: '付款方式',
providertype: '服务商类型',
providerid: '服务商ID',
sender_name: '发件人',
sender_tel: '发件电话',
@ -78,9 +87,16 @@ export const expressInterfaceFieldLabels: Record<string, string> = {
ext_data: '扩展数据',
express: '关联快递',
express_name: '关联快递',
express_platform_label: '快递平台',
express_polyapi_code: 'PolyAPI 编码',
express_polyapi_extra_info: 'PolyAPI 扩展',
express_pdd_code: '拼多多编码',
express_ks_code: '快手编码',
express_dyxd_code: '抖音编码',
polyapi_code: 'PolyAPI 编码',
pdd_code: '拼多多编码',
ks_code: '快手编码',
dyxd_code: '抖音编码',
polyapi_extra_info: 'PolyAPI 扩展',
quantity: '可用面单数量',
recycled_quantity: '已回收面单数量',
cancel_quantity: '已取消面单数量',
@ -109,6 +125,23 @@ export function formatExpressInterfaceNumber(val: unknown): string {
return String(n)
}
/** 是否类字段展示(1/0、'1'/'0') */
export function formatExpressInterfaceYesNo(val: unknown): string {
if (val === null || val === undefined || val === '') return '--'
const n = Number(val)
if (!Number.isNaN(n)) return n === 1 ? '是' : '否'
return String(val)
}
/** 关联快递子编码(express.pdd_code / express.ks_code / express.dyxd_code / express.polyapi_code) */
export function formatExpressInterfaceRelatedCode(row: Record<string, any>, key: string): string {
const nested = row?.express?.[key]
if (nested !== null && nested !== undefined && nested !== '') return String(nested)
const flat = row?.[`express_${key}`]
if (flat !== null && flat !== undefined && flat !== '') return String(flat)
return '--'
}
export type ExpressInterfaceColumn = {
prop: string
label: string
@ -119,52 +152,268 @@ export type ExpressInterfaceColumn = {
formatter?: (row: Record<string, any>) => string
}
/** 分页列表列(setting.expressInterface.list) */
export const expressInterfaceColumns: ExpressInterfaceColumn[] = [
{ prop: 'id', label: 'ID', width: 80, align: 'center', formatter: (row) => formatExpressInterfaceCell(row.id) },
{ prop: 'name', label: '配置名称', minWidth: 150, formatter: (row) => row.name || '--' },
{ prop: 'express_code', label: '快递编码', minWidth: 110, formatter: (row) => row.express_code || '--' },
{ prop: 'platform_code', label: '平台编码', minWidth: 110, formatter: (row) => row.platform_code || '--' },
{ prop: 'sender_name', label: '发件人', minWidth: 100, formatter: (row) => row.sender_name || '--' },
{ prop: 'sender_tel', label: '发件电话', minWidth: 120, formatter: (row) => row.sender_tel || '--' },
{ prop: 'shop_name', label: '店铺', minWidth: 140, formatter: (row) => row.shop_name || '--' },
{ prop: 'site_code', label: '站点编码', minWidth: 100, formatter: (row) => row.site_code || '--' },
{
/** 单字段列定义:与 setting.expressInterface.list 返回字段一一对应 */
const expressInterfaceFieldColumnMap: Record<string, ExpressInterfaceColumn> = {
id: {
prop: 'id',
label: 'ID',
width: 80,
align: 'center',
formatter: (row) => formatExpressInterfaceCell(row.id)
},
name: { prop: 'name', label: '配置名称', minWidth: 150, formatter: (row) => row.name || '--' },
// express_code: {
// prop: 'express_code',
// label: '快递编码',
// minWidth: 110,
// formatter: (row) => row.express_code || '--'
// },
// sys_express_code: {
// prop: 'sys_express_code',
// label: '系统快递编码',
// minWidth: 120,
// formatter: (row) => row.sys_express_code || '--'
// },
is_system_express_code: {
prop: 'is_system_express_code',
label: '是否系统快递编码',
width: 130,
align: 'center',
formatter: (row) => formatExpressInterfaceYesNo(row.is_system_express_code)
},
express_name: {
prop: 'express_name',
label: '关联快递',
minWidth: 150,
formatter: (row) => {
const name = row.express?.name || row.express_name
if (!name) return '--'
const code = row.express?.code || row.express_code || ''
return code ? `${name}(${code})` : name
}
},
// platform_code: {
// prop: 'platform_code',
// label: '平台编码',
// minWidth: 110,
// formatter: (row) => row.platform_code || '--'
// },
platform_shop_id: {
prop: 'platform_shop_id',
label: '平台店铺ID',
minWidth: 120,
formatter: (row) => formatExpressInterfaceCell(row.platform_shop_id)
},
// shop_id: {
// prop: 'shop_id',
// label: '店铺ID',
// width: 90,
// align: 'right',
// formatter: (row) => formatExpressInterfaceNumber(row.shop_id)
// },
shop_name: {
prop: 'shop_name',
label: '店铺名称',
minWidth: 150,
formatter: (row) => row.shop_name || '--'
},
// warehouse_id: {
// prop: 'warehouse_id',
// label: '仓库ID',
// width: 96,
// align: 'right',
// formatter: (row) => formatExpressInterfaceNumber(row.warehouse_id)
// },
providerid: {
prop: 'providerid',
label: '服务商ID',
minWidth: 110,
formatter: (row) => formatExpressInterfaceCell(row.providerid)
},
providertype: {
prop: 'providertype',
label: '服务商类型',
minWidth: 110,
formatter: (row) => row.providertype || '--'
},
paymode: {
prop: 'paymode',
label: '付款方式',
width: 96,
align: 'right',
formatter: (row) => formatExpressInterfaceNumber(row.paymode)
},
brandno: {
prop: 'brandno',
label: '品牌编码',
minWidth: 110,
formatter: (row) => row.brandno || '--'
},
sender_name: {
prop: 'sender_name',
label: '发件人',
minWidth: 100,
formatter: (row) => row.sender_name || '--'
},
sender_tel: {
prop: 'sender_tel',
label: '发件电话',
minWidth: 120,
formatter: (row) => row.sender_tel || '--'
},
province_name: {
prop: 'province_name',
label: '省',
minWidth: 90,
formatter: (row) => row.province_name || '--'
},
city_name: {
prop: 'city_name',
label: '市',
minWidth: 90,
formatter: (row) => row.city_name || '--'
},
district_name: {
prop: 'district_name',
label: '区/县',
minWidth: 90,
formatter: (row) => row.district_name || '--'
},
town_name: {
prop: 'town_name',
label: '乡镇/街道',
minWidth: 110,
formatter: (row) => row.town_name || '--'
},
address: {
prop: 'address',
label: '详细地址',
minWidth: 180,
formatter: (row) => row.address || '--'
},
site_code: {
prop: 'site_code',
label: '站点编码',
minWidth: 100,
formatter: (row) => row.site_code || '--'
},
// template_id: {
// prop: 'template_id',
// label: '模板ID',
// minWidth: 110,
// formatter: (row) => formatExpressInterfaceCell(row.template_id)
// },
// template_url: {
// prop: 'template_url',
// label: '打印模板',
// minWidth: 200,
// formatter: (row) => row.template_url || '--'
// },
product_type: {
prop: 'product_type',
label: '产品编码',
minWidth: 100,
formatter: (row) => row.product_type || '--'
},
weight: {
prop: 'weight',
label: '默认重量',
width: 96,
align: 'right',
formatter: (row) => formatExpressInterfaceNumber(row.weight)
},
{
weight_type: {
prop: 'weight_type',
label: '重量类型',
width: 96,
align: 'right',
formatter: (row) => formatExpressInterfaceNumber(row.weight_type)
},
viewer: {
prop: 'viewer',
label: '验视人',
minWidth: 100,
formatter: (row) => row.viewer || '--'
},
client_id: {
prop: 'client_id',
label: '客户端ID',
minWidth: 110,
formatter: (row) => row.client_id || '--'
},
is_share: {
prop: 'is_share',
label: '是否共享',
width: 90,
align: 'center',
formatter: (row) => formatExpressInterfaceYesNo(row.is_share)
},
ispickup: {
prop: 'ispickup',
label: '上门取件',
width: 90,
align: 'center',
formatter: (row) => formatExpressInterfaceYesNo(row.ispickup)
},
shipperno: {
prop: 'shipperno',
label: '电子面单客户号',
minWidth: 140,
formatter: (row) => row.shipperno || '--'
},
express_polyapi_code: {
prop: 'express_polyapi_code',
label: 'PolyAPI 编码',
minWidth: 120,
formatter: (row) => formatExpressInterfaceRelatedCode(row, 'polyapi_code')
},
express_pdd_code: {
prop: 'express_pdd_code',
label: '拼多多编码',
minWidth: 110,
formatter: (row) => formatExpressInterfaceRelatedCode(row, 'pdd_code')
},
express_polyapi_extra_info: {
prop: 'express_polyapi_extra_info',
label: 'PolyAPI 扩展',
minWidth: 140,
formatter: (row) => formatExpressInterfaceCell(row.express_polyapi_extra_info)
},
// ext_data: {
// prop: 'ext_data',
// label: '扩展数据',
// minWidth: 160,
// formatter: (row) => formatExpressInterfaceCell(row.ext_data)
// },
quantity: {
prop: 'quantity',
label: '可用面单数量',
width: 100,
align: 'right',
formatter: (row) => formatExpressInterfaceNumber(row.quantity)
},
{
recycled_quantity: {
prop: 'recycled_quantity',
label: '已回收面单',
width: 96,
align: 'right',
formatter: (row) => formatExpressInterfaceNumber(row.recycled_quantity)
},
{
cancel_quantity: {
prop: 'cancel_quantity',
label: '已取消面单',
width: 96,
align: 'right',
formatter: (row) => formatExpressInterfaceNumber(row.cancel_quantity)
},
{
allocated_quantity: {
prop: 'allocated_quantity',
label: '已分配面单',
width: 96,
align: 'right',
formatter: (row) => formatExpressInterfaceNumber(row.allocated_quantity)
},
{
is_enabled: {
prop: 'is_enabled',
label: '状态',
width: 80,
@ -175,101 +424,69 @@ export const expressInterfaceColumns: ExpressInterfaceColumn[] = [
? '<span style="color:#67c23a">启用</span>'
: '<span style="color:#f56c6c">停用</span>'
}
},
}
}
/** 表格列顺序:与 setting.expressInterface.list 返回字段顺序保持一致 */
const expressInterfaceFieldColumnProps = [
'name',
'express_code',
'sys_express_code',
'is_system_express_code',
'express_name',
'platform_code',
'platform_shop_id',
'shop_id',
'shop_name',
'warehouse_id',
'providerid',
'providertype',
'paymode',
'brandno',
'sender_name',
'sender_tel',
'province_name',
'city_name',
'district_name',
'town_name',
'address',
'site_code',
'template_id',
'template_url',
'product_type',
'weight',
'weight_type',
'viewer',
'client_id',
'is_share',
'ispickup',
'shipperno',
'express_polyapi_code',
'express_pdd_code',
'express_polyapi_extra_info',
'ext_data',
'quantity',
'recycled_quantity',
'cancel_quantity',
'allocated_quantity',
'is_enabled'
]
function buildExpressInterfaceColumns(props: string[]): ExpressInterfaceColumn[] {
return props
.map((prop) => expressInterfaceFieldColumnMap[prop])
.filter((column): column is ExpressInterfaceColumn => Boolean(column))
}
/** 分页列表列(setting.expressInterface.list) */
export const expressInterfaceColumns: ExpressInterfaceColumn[] = [
...buildExpressInterfaceColumns(expressInterfaceFieldColumnProps),
{ prop: 'actions', label: '操作', width: 140, align: 'center', fixed: 'right' }
]
/** 按仓库+平台全量列表列(setting.expressInterface.listByWarehousePlatformCode) */
export const expressInterfaceWarehouseColumns: ExpressInterfaceColumn[] = [
{ prop: 'id', label: 'ID', width: 80, align: 'center', formatter: (row) => formatExpressInterfaceCell(row.id) },
{ prop: 'name', label: '配置名称', minWidth: 140, formatter: (row) => row.name || '--' },
{ prop: 'express_code', label: '快递编码', minWidth: 100, formatter: (row) => row.express_code || '--' },
{
prop: 'express_name',
label: '关联快递',
minWidth: 160,
formatter: (row) => {
if (row.express?.name) {
const code = row.express?.code || row.express_code || ''
return code ? `${row.express.name}(${code})` : row.express.name
}
return row.express_name || '--'
}
},
{
prop: 'express_platform_label',
label: '快递平台',
minWidth: 110,
formatter: (row) => {
const platformCode = row.platform_code
if (!platformCode) return '--'
const platformExpressCode = row.express?.[platformCode]
return platformExpressCode ? `${platformCode}(${platformExpressCode})` : platformCode
}
},
{ prop: 'sender_name', label: '发件人', minWidth: 100, formatter: (row) => row.sender_name || '--' },
{ prop: 'sender_tel', label: '发件电话', minWidth: 110, formatter: (row) => row.sender_tel || '--' },
{
prop: 'shop_name',
label: '店铺',
minWidth: 140,
formatter: (row) => row.shop?.custom_name || row.shop_name || '--'
},
{ prop: 'site_code', label: '站点编码', minWidth: 100, formatter: (row) => row.site_code || '--' },
{
prop: 'can_use_count',
label: '可用单量',
width: 96,
align: 'right',
formatter: (row) => formatExpressInterfaceNumber(row.can_use_count)
},
{
prop: 'quantity',
label: '可用面单数量',
width: 100,
align: 'right',
formatter: (row) => formatExpressInterfaceNumber(row.quantity)
},
{
prop: 'recycled_quantity',
label: '已回收面单',
width: 96,
align: 'right',
formatter: (row) => formatExpressInterfaceNumber(row.recycled_quantity)
},
{
prop: 'cancel_quantity',
label: '已取消面单',
width: 96,
align: 'right',
formatter: (row) => formatExpressInterfaceNumber(row.cancel_quantity)
},
{
prop: 'allocated_quantity',
label: '已分配面单',
width: 96,
align: 'right',
formatter: (row) => formatExpressInterfaceNumber(row.allocated_quantity)
},
{
prop: 'weight',
label: '默认重量',
width: 88,
align: 'right',
formatter: (row) => formatExpressInterfaceNumber(row.weight)
},
{
prop: 'is_enabled',
label: '状态',
width: 80,
align: 'center',
formatter: (row) => {
const enabled = row.is_enabled === 1 || row.is_enabled === '1'
return enabled
? '<span style="color:#67c23a">启用</span>'
: '<span style="color:#f56c6c">停用</span>'
}
},
...buildExpressInterfaceColumns(['id', ...expressInterfaceFieldColumnProps]),
{ prop: 'actions', label: '操作', width: 140, align: 'center', fixed: 'right' }
]
@ -470,9 +687,9 @@ export function formatExpressInterfaceData(list: Record<string, any>[] = []) {
recycled_quantity: item.recycled_quantity ?? 0,
cancel_quantity: item.cancel_quantity ?? 0,
allocated_quantity: item.allocated_quantity ?? 0,
express_name: item.express?.name || '',
express_platform_label: item.express?.platform ?? '',
shop_name: item.shop_name || item.shop?.custom_name || item.shop?.shop_name || ''
/** 接口返回的应是 express.name 或平铺的 express_name */
express_name: item.express?.name || item.express_name || '',
shop_name: item.shop_name || ''
}))
}

View File

@ -108,13 +108,25 @@
<div class="express-relation__title">关联快递</div>
<el-descriptions :column="2" border size="small">
<el-descriptions-item label="快递名称">
{{ selectedRow.express.name || '--' }}
{{ selectedRow.express.name || selectedRow.express_name || '--' }}
</el-descriptions-item>
<el-descriptions-item label="快递编码">
{{ selectedRow.express.code || selectedRow.express_code || '--' }}
</el-descriptions-item>
<el-descriptions-item label="快递平台">
{{ selectedRow.express.platform ?? '--' }}
<el-descriptions-item label="PolyAPI 编码">
{{ formatExpressInterfaceRelatedCode(selectedRow, 'polyapi_code') }}
</el-descriptions-item>
<el-descriptions-item label="拼多多编码">
{{ formatExpressInterfaceRelatedCode(selectedRow, 'pdd_code') }}
</el-descriptions-item>
<el-descriptions-item label="快手编码">
{{ formatExpressInterfaceRelatedCode(selectedRow, 'ks_code') }}
</el-descriptions-item>
<el-descriptions-item label="抖音编码">
{{ formatExpressInterfaceRelatedCode(selectedRow, 'dyxd_code') }}
</el-descriptions-item>
<el-descriptions-item label="PolyAPI 扩展" :span="2">
{{ selectedRow.express.polyapi_extra_info || selectedRow.express_polyapi_extra_info || '--' }}
</el-descriptions-item>
</el-descriptions>
</div>
@ -548,6 +560,7 @@ import {
formatExpressInterfaceCell,
formatExpressInterfaceData,
formatExpressInterfaceNumber,
formatExpressInterfaceRelatedCode,
parseExpressInterfaceWarehouseListResponse,
normalizeScanConditionToWhere,
defaultExpressInterfaceForm,

View File

@ -3,12 +3,12 @@ import type { PickCartDetailResponse } from '@/api/pickcart/pickcart'
export type PickCartRecord = PickCartDetailResponse
export const pickCartColumns = [
{ prop: 'cart_id', label: 'ID', width: '80', sortable: true },
// { prop: 'cart_id', label: 'ID', width: '80', sortable: true },
{ prop: 'cart_code', label: '拣货车编码', minWidth: '140', showOverflowTooltip: true },
{ prop: 'cart_name', label: '名称', minWidth: '140', showOverflowTooltip: true },
{ prop: 'status', label: '状态', width: '90', align: 'center' },
{ prop: 'current_task_no', label: '绑定任务', minWidth: '160', showOverflowTooltip: true },
{ prop: 'warehouse_id', label: '仓库ID', width: '90', align: 'center' },
// { prop: 'warehouse_id', label: '仓库ID', width: '90', align: 'center' },
{ prop: 'actions', label: '操作', width: '260', align: 'center', fixed: 'right' }
]

View File

@ -164,13 +164,13 @@ export const FIELD_DICT: Record<string, FieldDefinition> = {
table: { minWidth: 150, fixed: 'left', showOverflowTooltip: true, sortable: true },
slot: null
},
id: {
key: 'id',
label: 'ID',
scanBox: { type: 'number', group: SCANBOX_GROUPS.basic },
table: { minWidth: 72, showOverflowTooltip: true, sortable: true },
slot: null
},
// id: {
// key: 'id',
// label: 'ID',
// scanBox: { type: 'number', group: SCANBOX_GROUPS.basic },
// table: { minWidth: 72, showOverflowTooltip: true, sortable: true },
// slot: null
// },
is_online: {
key: 'is_online',
label: '在线状态',

View File

@ -10,7 +10,7 @@ export type ShopRecord = {
}
export const shopColumns = [
{ prop: 'id', label: 'ID', width: '80', sortable: true },
// { prop: 'id', label: 'ID', width: '80', sortable: true },
{ prop: 'platform_code', label: '平台编码', minWidth: '120', showOverflowTooltip: true },
{ prop: 'platform_name', label: '平台名称', minWidth: '140', showOverflowTooltip: true },
{ prop: 'custom_name', label: '自定义名称', minWidth: '160', showOverflowTooltip: true },

View File

@ -157,14 +157,14 @@ export const TAG_RESOLVERS: Record<string, (val: any) => string> = {
// 二、FIELD_DICT 实例 — 工作台管理字段定义
// ============================================================
export const FIELD_DICT: Record<string, FieldDefinition> = {
id: {
key: 'id',
label: 'ID',
scanBox: null,
table: { width: 80, sortable: true },
slot: null,
detailLabel: 'ID'
},
// id: {
// key: 'id',
// label: 'ID',
// scanBox: null,
// table: { width: 80, sortable: true },
// slot: null,
// detailLabel: 'ID'
// },
name: {
key: 'name',
label: '工作台名称',

View File

@ -352,7 +352,7 @@
>
<div style="display:flex;justify-content:flex-end;margin-bottom:10px">
<el-button size="small" @click="loadQimenConfigs">
<el-icon><Refresh /></el-icon> 刷新
刷新
</el-button>
</div>
<el-table :data="qimenDialog.list" v-loading="qimenDialog.loading" size="small" border>