1
This commit is contained in:
parent
68f7990373
commit
216d23ef5f
@ -2,7 +2,9 @@
|
||||
更多设置表单
|
||||
- 由 UpperTable「字段设置」中的「更多设置」按钮打开
|
||||
- 表格工作模式(原字段设置工具栏内嵌的 radio,迁移至此)
|
||||
- 界面显示(浏览器 localStorage 持久化选项:Scan-box 模式 / 工具栏按钮模式 / 快捷键区域 / 页面布局)
|
||||
- 页面缓存 / tab 缓存分类(开关 / 最大缓存数量 / 应用范围)
|
||||
- 存储:experimental_{userId}_{roleId}(experimental store)、settings_{userId}_{roleId}(settings store)
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
@ -27,6 +29,49 @@
|
||||
|
||||
<el-divider />
|
||||
|
||||
<!-- ===== 界面显示(浏览器持久化选项) ===== -->
|
||||
<div class="more-section">
|
||||
<div class="more-section-title">界面显示</div>
|
||||
<div class="more-section-desc">
|
||||
以下选项保存在当前浏览器(按账号 + 角色隔离),仅影响本机显示,换电脑需重新设置。
|
||||
</div>
|
||||
|
||||
<div class="more-setting-row">
|
||||
<span class="setting-label">Scan-box 显示模式</span>
|
||||
<el-radio-group v-model="scanBoxMode" size="small">
|
||||
<el-radio-button value="compact">紧凑(默认)</el-radio-button>
|
||||
<el-radio-button value="standard">标准</el-radio-button>
|
||||
</el-radio-group>
|
||||
<span class="setting-hint">紧凑模式行高更小,一屏显示更多筛选条件</span>
|
||||
</div>
|
||||
|
||||
<div class="more-setting-row">
|
||||
<span class="setting-label">工具栏按钮模式</span>
|
||||
<el-radio-group v-model="toolbarMode" size="small">
|
||||
<el-radio-button value="tile">平铺(默认)</el-radio-button>
|
||||
<el-radio-button value="collapse">折叠</el-radio-button>
|
||||
</el-radio-group>
|
||||
<span class="setting-hint">订单工具栏按钮组的排列方式</span>
|
||||
</div>
|
||||
|
||||
<div class="more-setting-row">
|
||||
<span class="setting-label">快捷键区域</span>
|
||||
<el-switch v-model="shortcutExpanded" />
|
||||
<span class="setting-hint">展开顶部快捷键面板(默认收起)</span>
|
||||
</div>
|
||||
|
||||
<div class="more-setting-row">
|
||||
<span class="setting-label">页面布局</span>
|
||||
<el-radio-group v-model="layoutMode" size="small">
|
||||
<el-radio-button value="top-bottom">顶部导航</el-radio-button>
|
||||
<el-radio-button value="sidebar">侧边导航</el-radio-button>
|
||||
</el-radio-group>
|
||||
<span class="setting-hint">顶部导航 = 菜单在顶部横向排列</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-divider />
|
||||
|
||||
<!-- ===== 页面缓存分类 ===== -->
|
||||
<div class="more-section">
|
||||
<div class="more-section-title">页面缓存</div>
|
||||
@ -102,6 +147,7 @@
|
||||
import { computed } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { useExperimentalStore } from '@/stores/modules/experimental'
|
||||
import { useSettingsStore } from '@/stores/modules/settings'
|
||||
|
||||
const visible = defineModel<boolean>('visible', { default: false })
|
||||
|
||||
@ -113,6 +159,7 @@ const dialogVisible = computed({
|
||||
})
|
||||
|
||||
const experimentalStore = useExperimentalStore()
|
||||
const settingsStore = useSettingsStore()
|
||||
|
||||
const tableMode = computed({
|
||||
get: () => experimentalStore.tableMode,
|
||||
@ -121,6 +168,40 @@ const tableMode = computed({
|
||||
}
|
||||
})
|
||||
|
||||
/* ===== 界面显示(浏览器持久化:settings store → localStorage settings_{userId}_{roleId}) ===== */
|
||||
|
||||
/** Scan-box 显示模式:standard=标准 / compact=紧凑 */
|
||||
const scanBoxMode = computed({
|
||||
get: () => settingsStore.scanBoxMode,
|
||||
set: (mode: 'standard' | 'compact') => {
|
||||
settingsStore.changeSetting({ key: 'scanBoxMode', value: mode })
|
||||
}
|
||||
})
|
||||
|
||||
/** 工具栏按钮组显示模式:tile=平铺 / collapse=折叠 */
|
||||
const toolbarMode = computed({
|
||||
get: () => settingsStore.toolbarMode,
|
||||
set: (mode: 'tile' | 'collapse') => {
|
||||
settingsStore.changeSetting({ key: 'toolbarMode', value: mode })
|
||||
}
|
||||
})
|
||||
|
||||
/** 顶部快捷键区域是否展开 */
|
||||
const shortcutExpanded = computed({
|
||||
get: () => settingsStore.shortcutExpanded,
|
||||
set: (expanded: boolean) => {
|
||||
settingsStore.changeSetting({ key: 'shortcutExpanded', value: expanded })
|
||||
}
|
||||
})
|
||||
|
||||
/** 页面布局:top-bottom=顶部导航 / sidebar=侧边导航 */
|
||||
const layoutMode = computed({
|
||||
get: () => settingsStore.layoutMode,
|
||||
set: (mode: 'sidebar' | 'top-bottom') => {
|
||||
settingsStore.changeSetting({ key: 'layoutMode', value: mode })
|
||||
}
|
||||
})
|
||||
|
||||
const tabCacheEnabled = computed({
|
||||
get: () => experimentalStore.tabCacheEnabled,
|
||||
set: (val: boolean) => {
|
||||
@ -169,15 +250,20 @@ function handlePageCacheMaxChange(val: number | undefined) {
|
||||
experimentalStore.setPageCacheMax(Number(val ?? 1))
|
||||
}
|
||||
|
||||
/** 恢复全部设置为默认配置(表格工作模式 / 页面缓存 / tab 缓存) */
|
||||
/** 恢复全部设置为默认配置(表格工作模式 / 界面显示 / 页面缓存 / tab 缓存) */
|
||||
function handleResetDefaults() {
|
||||
ElMessageBox.confirm('确定恢复全部设置为默认配置吗?', '恢复默认', {
|
||||
type: 'warning',
|
||||
confirmButtonText: '恢复',
|
||||
cancelButtonText: '取消'
|
||||
})
|
||||
ElMessageBox.confirm(
|
||||
'确定恢复全部设置为默认配置吗?表格工作模式、界面显示(Scan-box 模式 / 工具栏按钮模式 / 快捷键区域 / 页面布局)、页面缓存、tab 缓存都将恢复默认。',
|
||||
'恢复默认',
|
||||
{
|
||||
type: 'warning',
|
||||
confirmButtonText: '恢复',
|
||||
cancelButtonText: '取消'
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
experimentalStore.resetToDefaults()
|
||||
settingsStore.resetDisplaySettings()
|
||||
ElMessage.success('已恢复默认配置')
|
||||
})
|
||||
.catch(() => {})
|
||||
|
||||
@ -34,12 +34,14 @@ export default {
|
||||
/**
|
||||
* @type {'tile' | 'collapse'}
|
||||
* @description Toolbar button display mode: tile (平铺) or collapse (折叠)
|
||||
* 默认:tile(平铺)
|
||||
*/
|
||||
toolbarMode: 'tile',
|
||||
|
||||
/**
|
||||
* @type {'standard' | 'compact'}
|
||||
* @description ScanBox display mode: standard (标准) or compact (紧凑)
|
||||
* 默认:compact(紧凑);可在「字段设置 → 更多设置 → 界面显示」中修改
|
||||
*/
|
||||
scanBoxMode: 'standard'
|
||||
scanBoxMode: 'compact'
|
||||
}
|
||||
|
||||
@ -129,6 +129,18 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
saveSettings()
|
||||
}
|
||||
|
||||
/**
|
||||
* 恢复「界面显示」类浏览器持久化设置为默认值并写回 localStorage
|
||||
* 覆盖:Scan-box 显示模式 / 工具栏按钮模式 / 快捷键区域 / 页面布局
|
||||
*/
|
||||
const resetDisplaySettings = () => {
|
||||
scanBoxModeRef.value = (defaultScanBoxMode as 'standard' | 'compact') || 'standard'
|
||||
toolbarModeRef.value = (defaultToolbarMode as 'tile' | 'collapse') || 'tile'
|
||||
shortcutExpandedRef.value = shortcutExpanded
|
||||
layoutMode.value = 'top-bottom'
|
||||
saveSettings()
|
||||
}
|
||||
|
||||
return {
|
||||
theme,
|
||||
showSettings: showSettingsRef,
|
||||
@ -139,6 +151,7 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
shortcutExpanded: shortcutExpandedRef,
|
||||
toolbarMode: toolbarModeRef,
|
||||
scanBoxMode: scanBoxModeRef,
|
||||
changeSetting
|
||||
changeSetting,
|
||||
resetDisplaySettings
|
||||
}
|
||||
})
|
||||
|
||||
@ -19,7 +19,52 @@
|
||||
<div class="app-error" v-if="pdaError">获取版本信息失败</div>
|
||||
</div>
|
||||
<div class="app-action">
|
||||
<el-button type="primary" size="small" :disabled="!pdaData?.downloadUrl" @click="showQrCode">
|
||||
<el-button type="primary" size="small" :disabled="!pdaData?.downloadUrl" @click="showQrCode('扫描二维码下载 PDA', pdaData?.downloadUrl)">
|
||||
下载
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-divider border-style="dashed" />
|
||||
|
||||
<!-- Android Worker Station(安卓工作台) -->
|
||||
<div class="app-item" v-loading="loadingAndroid">
|
||||
<div class="app-icon">
|
||||
<el-icon :size="40" color="#e6a23c"><Iphone /></el-icon>
|
||||
</div>
|
||||
<div class="app-info">
|
||||
<div class="app-name">安卓工作台 (Android)</div>
|
||||
<div class="app-version" v-if="androidData">V {{ androidData.version }}</div>
|
||||
<div class="app-date" v-if="androidData">{{ formatDate(androidData.publishedAtUtc) }}</div>
|
||||
<div class="app-error" v-if="androidError">获取版本信息失败</div>
|
||||
</div>
|
||||
<div class="app-action">
|
||||
<el-button
|
||||
type="warning"
|
||||
size="small"
|
||||
:disabled="!androidData?.url"
|
||||
@click="showQrCode('扫描二维码下载 安卓工作台', androidData?.url)"
|
||||
>
|
||||
下载
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<el-divider border-style="dashed" />
|
||||
|
||||
<!-- Windows Worker Station(Windows工作台) -->
|
||||
<div class="app-item" v-loading="loadingWindows">
|
||||
<div class="app-icon">
|
||||
<el-icon :size="40" color="#e6a23c"><Monitor /></el-icon>
|
||||
</div>
|
||||
<div class="app-info">
|
||||
<div class="app-name">Windows工作台</div>
|
||||
<div class="app-version" v-if="windowsData">V {{ windowsData.version }}</div>
|
||||
<div class="app-date" v-if="windowsData">{{ formatDate(windowsData.publishedAtUtc) }}</div>
|
||||
<div class="app-error" v-if="windowsError">获取版本信息失败</div>
|
||||
</div>
|
||||
<div class="app-action">
|
||||
<el-button type="warning" size="small" :disabled="!windowsData?.url" @click="download(windowsData?.url)">
|
||||
下载
|
||||
</el-button>
|
||||
</div>
|
||||
@ -46,17 +91,17 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 二维码下载弹窗 -->
|
||||
<!-- 二维码下载弹窗(PDA / 安卓工作台共用) -->
|
||||
<el-dialog
|
||||
v-model="qrCodeVisible"
|
||||
title="扫描二维码下载 PDA"
|
||||
:title="qrDialogTitle"
|
||||
width="300px"
|
||||
align-center
|
||||
>
|
||||
<div class="qrcode-container">
|
||||
<canvas ref="qrCanvas"></canvas>
|
||||
<div class="qrcode-tip">请使用 PDA 或手机扫描</div>
|
||||
<div class="qrcode-link" v-if="pdaData" @click="download(pdaData.downloadUrl)">
|
||||
<div class="qrcode-tip">请使用手机或平板扫描</div>
|
||||
<div class="qrcode-link" @click="download(qrTargetUrl)">
|
||||
无法扫描?点击直接下载
|
||||
</div>
|
||||
</div>
|
||||
@ -66,7 +111,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, onMounted, nextTick } from 'vue'
|
||||
import { Cellphone, Monitor } from '@element-plus/icons-vue'
|
||||
import { Cellphone, Monitor, Iphone } from '@element-plus/icons-vue'
|
||||
import dayjs from 'dayjs'
|
||||
import axios from 'axios'
|
||||
import QRCode from 'qrcode'
|
||||
@ -87,15 +132,41 @@ interface PrintServerVersionInfo {
|
||||
publishedAtUtc: string
|
||||
}
|
||||
|
||||
/**
|
||||
* 工作台(散单工作台)版本信息
|
||||
* 与 `worker_station`(安卓 APK)/ `worker_station_windows`(Windows EXE)的 latest.json 字段一致
|
||||
*/
|
||||
interface WorkerStationVersionInfo {
|
||||
version: string
|
||||
file: string
|
||||
url: string
|
||||
sha256?: string
|
||||
publishedAtUtc: string
|
||||
/**
|
||||
* 是否允许跳过该版本:**0 或缺省 = 不可跳过(强制更新)**,1 = 可跳过。
|
||||
* 注:该字段由工作台客户端自身的自更新流程使用,网页端仅作下载入口,不做拦截。
|
||||
*/
|
||||
canSkip?: number
|
||||
}
|
||||
|
||||
const pdaData = ref<PdaVersionInfo | null>(null)
|
||||
const printData = ref<PrintServerVersionInfo | null>(null)
|
||||
const androidData = ref<WorkerStationVersionInfo | null>(null)
|
||||
const windowsData = ref<WorkerStationVersionInfo | null>(null)
|
||||
|
||||
const loadingPda = ref(true)
|
||||
const loadingPrint = ref(true)
|
||||
const loadingAndroid = ref(true)
|
||||
const loadingWindows = ref(true)
|
||||
const pdaError = ref(false)
|
||||
const printError = ref(false)
|
||||
const androidError = ref(false)
|
||||
const windowsError = ref(false)
|
||||
|
||||
const qrCodeVisible = ref(false)
|
||||
/** 二维码弹窗标题 / 目标地址(PDA、安卓工作台共用) */
|
||||
const qrDialogTitle = ref('扫描二维码下载')
|
||||
const qrTargetUrl = ref('')
|
||||
const qrCanvas = ref<HTMLCanvasElement | null>(null)
|
||||
|
||||
const formatDate = (dateString: string) => {
|
||||
@ -103,12 +174,14 @@ const formatDate = (dateString: string) => {
|
||||
return dayjs(dateString).format('YYYY-MM-DD HH:mm')
|
||||
}
|
||||
|
||||
const showQrCode = async () => {
|
||||
if (!pdaData.value?.downloadUrl) return
|
||||
const showQrCode = async (title: string, url?: string) => {
|
||||
if (!url) return
|
||||
qrDialogTitle.value = title
|
||||
qrTargetUrl.value = url
|
||||
qrCodeVisible.value = true
|
||||
await nextTick()
|
||||
if (qrCanvas.value) {
|
||||
QRCode.toCanvas(qrCanvas.value, pdaData.value.downloadUrl, {
|
||||
QRCode.toCanvas(qrCanvas.value, url, {
|
||||
width: 200,
|
||||
margin: 2,
|
||||
color: {
|
||||
@ -157,6 +230,44 @@ const fetchPrintServerInfo = async () => {
|
||||
}
|
||||
}
|
||||
|
||||
/** 安卓工作台(散单工作台 APK)版本信息 */
|
||||
const fetchAndroidInfo = async () => {
|
||||
try {
|
||||
loadingAndroid.value = true
|
||||
androidError.value = false
|
||||
const response = await axios.get('https://dl.wms.gztbyc.com/worker_station/latest.json', {
|
||||
params: { timestamp: new Date().getTime() }
|
||||
})
|
||||
if (response.data) {
|
||||
androidData.value = response.data
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch Android worker station version info', error)
|
||||
androidError.value = true
|
||||
} finally {
|
||||
loadingAndroid.value = false
|
||||
}
|
||||
}
|
||||
|
||||
/** Windows 工作台(散单工作台 EXE)版本信息 */
|
||||
const fetchWindowsInfo = async () => {
|
||||
try {
|
||||
loadingWindows.value = true
|
||||
windowsError.value = false
|
||||
const response = await axios.get('https://dl.wms.gztbyc.com/worker_station_windows/latest.json', {
|
||||
params: { timestamp: new Date().getTime() }
|
||||
})
|
||||
if (response.data) {
|
||||
windowsData.value = response.data
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to fetch Windows worker station version info', error)
|
||||
windowsError.value = true
|
||||
} finally {
|
||||
loadingWindows.value = false
|
||||
}
|
||||
}
|
||||
|
||||
const download = (url?: string) => {
|
||||
if (url) {
|
||||
window.open(url, '_blank')
|
||||
@ -166,6 +277,8 @@ const download = (url?: string) => {
|
||||
onMounted(() => {
|
||||
fetchPdaInfo()
|
||||
fetchPrintServerInfo()
|
||||
fetchAndroidInfo()
|
||||
fetchWindowsInfo()
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
import type { ComboGoodsListItem } from '@/api/combogoods/combogoods'
|
||||
import type { ToolbarButtonConfig } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
export type ComboGoodsRecord = ComboGoodsListItem & {
|
||||
created_at?: string
|
||||
@ -72,6 +73,18 @@ export const comboGoodsColumns = [
|
||||
{ prop: 'actions', label: '操作', width: '150', fixed: 'right' }
|
||||
]
|
||||
|
||||
/**
|
||||
* 组合商品列表主工具栏按钮
|
||||
* 样式 / 顺序对齐「商品明细」(stock/stock 的 stockToolbarButtons):
|
||||
* 刷新(primary)→ 字段设置(default)→ 新增组合商品(primary)→ 快速搜索(primary + plain)
|
||||
*/
|
||||
export const comboGoodsToolbarButtons: ToolbarButtonConfig[] = [
|
||||
{ key: 'refresh', label: '刷新', type: 'primary', size: 'small', loadingKey: 'loading', action: 'loadList' },
|
||||
{ key: 'columnConfig', label: '字段设置', size: 'small', action: 'openColumnConfigPanel' },
|
||||
{ key: 'create', label: '新增组合商品', type: 'primary', size: 'small', action: 'openCreate' },
|
||||
{ key: 'quickSearch', label: '快速搜索', type: 'primary', plain: true, size: 'small', action: 'openSearchDialog' }
|
||||
]
|
||||
|
||||
export const comboGoodsScanFields = [
|
||||
// ===== 组合信息 =====
|
||||
{
|
||||
|
||||
@ -17,12 +17,17 @@
|
||||
<div class="main-content">
|
||||
<div class="toolbar">
|
||||
<div class="toolbar-left">
|
||||
<el-button size="small" type="primary" :loading="loading" @click="loadList">刷新</el-button>
|
||||
<el-button type="success" size="small" @click="openCreate">新增组合商品</el-button>
|
||||
<el-button size="small" type="primary" plain @click="searchDialogVisible = true">快速搜索</el-button>
|
||||
<order-toolbar-button-group
|
||||
:buttons="toolbarButtons"
|
||||
:resolve-disabled="resolveButtonDisabled"
|
||||
:resolve-loading="resolveButtonLoading"
|
||||
:resolve-label="resolveButtonLabel"
|
||||
:layout-key="toolbarLayoutKey"
|
||||
@action="handleToolbarButtonClick"
|
||||
/>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -31,6 +36,7 @@
|
||||
ref="upperTable"
|
||||
title="组合商品列表"
|
||||
default-align="center"
|
||||
:enable-column-config="true"
|
||||
table-id="stock-combo-goods"
|
||||
:data="tableData"
|
||||
:columns="columns"
|
||||
@ -91,10 +97,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, reactive, ref } from 'vue'
|
||||
import { computed, onMounted, reactive, ref } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import ScanBox from '@/components/ScanBox/index.vue'
|
||||
import UpperTable from '@/components/UpperTable/index.vue'
|
||||
import OrderToolbarButtonGroup from '@/views/order/orderManagement/component/OrderToolbarButtonGroup.vue'
|
||||
import type { ToolbarButtonConfig } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { comboGoodsDelete, comboGoodsList } from '@/api/combogoods/combogoods'
|
||||
import ComboGoodsFormDialog from './component/ComboGoodsFormDialog.vue'
|
||||
import ComboGoodsSearchDialog from './component/ComboGoodsSearchDialog.vue'
|
||||
@ -103,6 +111,7 @@ import {
|
||||
buildComboGoodsListPayload,
|
||||
comboGoodsColumns,
|
||||
comboGoodsScanFields,
|
||||
comboGoodsToolbarButtons,
|
||||
formatComboGoodsDateTime,
|
||||
formatComboGoodsStatus,
|
||||
isComboGoodsApiSuccess,
|
||||
@ -112,6 +121,7 @@ import {
|
||||
} from './combo-stock-config'
|
||||
|
||||
const scanBox = ref<any>(null)
|
||||
const upperTable = ref<any>(null)
|
||||
|
||||
const presetTree = ref<any[]>([])
|
||||
const availableFieldsRef = reactive(JSON.parse(JSON.stringify(comboGoodsScanFields)))
|
||||
@ -130,6 +140,52 @@ const formDialogMode = ref<'create' | 'edit'>('create')
|
||||
const editingRecord = ref<ComboGoodsRecord | null>(null)
|
||||
const searchDialogVisible = ref(false)
|
||||
|
||||
// ============================================================
|
||||
// 工具栏(样式 / 布局对齐「商品明细」stock/stock)
|
||||
// 按钮定义见 combo-stock-config.ts 的 comboGoodsToolbarButtons
|
||||
// ============================================================
|
||||
const toolbarButtons: ToolbarButtonConfig[] = comboGoodsToolbarButtons
|
||||
|
||||
const buttonLoadingMap = computed(() => ({
|
||||
loading: loading.value
|
||||
}))
|
||||
|
||||
/** 按钮组重新测量可见按钮的依赖(loading / 按钮集合变化时重算) */
|
||||
const toolbarLayoutKey = computed(() =>
|
||||
JSON.stringify({
|
||||
loading: buttonLoadingMap.value,
|
||||
permissions: toolbarButtons.map((button) => button.key).join(',')
|
||||
})
|
||||
)
|
||||
|
||||
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) {
|
||||
return defaultLabel
|
||||
}
|
||||
|
||||
const toolbarActionMap: Record<string, () => void> = {
|
||||
loadList: () => loadList(),
|
||||
openColumnConfigPanel: () => upperTable.value?.openColumnConfig?.(),
|
||||
openCreate: () => openCreate(),
|
||||
openSearchDialog: () => {
|
||||
searchDialogVisible.value = true
|
||||
}
|
||||
}
|
||||
|
||||
function handleToolbarButtonClick(action: ToolbarButtonConfig['action']) {
|
||||
const handler = toolbarActionMap[action]
|
||||
if (!handler) return
|
||||
handler()
|
||||
}
|
||||
|
||||
async function loadList() {
|
||||
if (loading.value) return
|
||||
loading.value = true
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
scanWorkflowField,
|
||||
type ToolbarButtonConfig
|
||||
} from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { formatBarcodeText } from '@/utils/barcode'
|
||||
import { normalizeBarcodeList } from '@/utils/barcode'
|
||||
|
||||
/** ScanBox 筛选字段分组(商品模块专用,保留供其他场景复用) */
|
||||
export const STOCK_SCAN_FIELD_GROUPS = {
|
||||
@ -70,9 +70,10 @@ export const stockColumns = [
|
||||
prop: 'barcodes',
|
||||
label: '商品条码',
|
||||
width: '120',
|
||||
// 超长条码(多个条码以 | 拼接)超过 30 字符时收起,提供「展开 / 收起」
|
||||
textCollapse: 30,
|
||||
formatter: (row: any) => formatBarcodeText(row.barcodes)
|
||||
// 多值折叠(只显示第 1 个 + 「+N」,点击 +N 展开全部),单击条码复制
|
||||
// 表现与「外部库存」(stock/external_stock)的条码列一致
|
||||
copyAction: 'copy',
|
||||
copyValue: (row: any) => normalizeBarcodeList(row.barcodes)
|
||||
},
|
||||
{
|
||||
prop: 'images',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user