1
This commit is contained in:
parent
d11c89a54d
commit
63b81aad31
BIN
dist.tar.gz
BIN
dist.tar.gz
Binary file not shown.
@ -65,6 +65,8 @@ export type SettingWarehouseSubjectConfig = SettingWarehouseSenderConfig & {
|
||||
default_express_code?: string
|
||||
default_platform_code?: string
|
||||
group_wave_prefix?: string
|
||||
/** 自动分配快递排除备注:订单备注命中任一关键字时,跳过自动分配快递 */
|
||||
auto_allocate_express_exclude_remarks?: string[]
|
||||
[key: string]: unknown
|
||||
}
|
||||
|
||||
@ -119,6 +121,18 @@ export function normalizeWarehouseSubjectConfig(
|
||||
}
|
||||
}
|
||||
|
||||
// 规范化 auto_allocate_express_exclude_remarks(string_array 类型)
|
||||
const remarksRaw = base.auto_allocate_express_exclude_remarks
|
||||
if (remarksRaw === null || remarksRaw === undefined || remarksRaw === '') {
|
||||
base.auto_allocate_express_exclude_remarks = []
|
||||
} else if (!Array.isArray(remarksRaw)) {
|
||||
throw new Error('auto_allocate_express_exclude_remarks 必须是字符串数组')
|
||||
} else {
|
||||
base.auto_allocate_express_exclude_remarks = (remarksRaw as unknown[])
|
||||
.filter((v): v is string => typeof v === 'string' && v.trim() !== '')
|
||||
.map((v) => v.trim())
|
||||
}
|
||||
|
||||
return base as SettingWarehouseSubjectConfig
|
||||
}
|
||||
|
||||
|
||||
@ -1,29 +1,46 @@
|
||||
<template>
|
||||
<div class="scan-box-container" :style="{ width }">
|
||||
<div class="scan-box-container" :style="{ width }" :class="{ 'scan-box--compact': isCompact }">
|
||||
<!-- Tab 切换 -->
|
||||
<div class="scan-tabs">
|
||||
<el-tabs v-model="activeTab" stretch @tab-click="handleTabChange">
|
||||
<el-tab-pane label="筛选" name="custom">
|
||||
<template #label>
|
||||
<span class="tab-label">
|
||||
<el-icon><Operation /></el-icon>
|
||||
筛选
|
||||
</span>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="过滤" name="preset">
|
||||
<template #label>
|
||||
<span class="tab-label">
|
||||
<el-icon><DataAnalysis /></el-icon>
|
||||
过滤
|
||||
</span>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<div class="scan-tabs" v-if="!isCompact">
|
||||
<div class="scan-tabs__inner">
|
||||
<el-tabs v-model="activeTab" stretch @tab-click="handleTabChange">
|
||||
<el-tab-pane label="筛选" name="custom">
|
||||
<template #label>
|
||||
<span class="tab-label">
|
||||
<el-icon><Operation /></el-icon>
|
||||
筛选
|
||||
</span>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="过滤" name="preset">
|
||||
<template #label>
|
||||
<span class="tab-label">
|
||||
<el-icon><DataAnalysis /></el-icon>
|
||||
过滤
|
||||
</span>
|
||||
</template>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
<el-tooltip content="切换紧凑模式" placement="bottom">
|
||||
<el-button class="mode-toggle-btn" size="small" link @click="toggleMode">
|
||||
<el-icon><Fold /></el-icon>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 紧凑模式头部 -->
|
||||
<div v-else class="compact-header">
|
||||
<span class="compact-title">{{ title }}</span>
|
||||
<el-tooltip content="切换标准模式" placement="bottom">
|
||||
<el-button class="mode-toggle-btn" size="small" link @click="toggleMode">
|
||||
<el-icon><Expand /></el-icon>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
</div>
|
||||
|
||||
<!-- 内容区域 -->
|
||||
<div class="scan-content">
|
||||
<div class="scan-content" v-if="!isCompact">
|
||||
<!-- 自定义筛选 -->
|
||||
<div v-show="activeTab === 'custom'" class="custom-filter">
|
||||
<div class="filter-scroll-area" ref="filterScroll">
|
||||
@ -408,6 +425,144 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 紧凑模式 -->
|
||||
<div v-if="isCompact" class="compact-filter">
|
||||
<div class="compact-fields">
|
||||
<template v-for="field in availableFields" :key="field.value">
|
||||
<!-- 下拉选择类型 -->
|
||||
<div v-if="field.type === 'select'" class="compact-field-item">
|
||||
<el-select
|
||||
v-model="customConditions[field.value].value"
|
||||
:placeholder="field.label"
|
||||
size="small"
|
||||
clearable
|
||||
filterable
|
||||
style="width: 100%"
|
||||
@change="handleCompactChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in field.options"
|
||||
:key="option.value"
|
||||
:label="option.label"
|
||||
:value="option.value == null ? '' : option.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 多选类型 -->
|
||||
<div v-else-if="field.type === 'multiple'" class="compact-field-item">
|
||||
<el-select
|
||||
v-model="customConditions[field.value].value"
|
||||
multiple
|
||||
:placeholder="field.label"
|
||||
size="small"
|
||||
:filterable="field.filterable"
|
||||
style="width: 100%"
|
||||
@change="handleCompactChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="option in field.options"
|
||||
:key="option.value"
|
||||
:label="option.label"
|
||||
:value="option.value == null ? '' : option.value"
|
||||
/>
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 布尔类型 -->
|
||||
<div v-else-if="field.type === 'boolean'" class="compact-field-item">
|
||||
<el-select
|
||||
v-model="customConditions[field.value].value"
|
||||
:placeholder="field.label"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@change="handleCompactChange"
|
||||
>
|
||||
<el-option label="是" :value="true" />
|
||||
<el-option label="否" :value="false" />
|
||||
<el-option label="全部" :value="''" />
|
||||
</el-select>
|
||||
</div>
|
||||
<!-- 数字类型 -->
|
||||
<div v-else-if="field.type === 'number'" class="compact-field-item">
|
||||
<el-input-number
|
||||
v-model="customConditions[field.value].value"
|
||||
:placeholder="field.label"
|
||||
:controls="false"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@change="handleCompactChange"
|
||||
/>
|
||||
</div>
|
||||
<!-- 日期/日期时间范围 -->
|
||||
<div v-else-if="isRangePickerField(field)" class="compact-field-item">
|
||||
<el-date-picker
|
||||
v-model="customConditions[field.value].value"
|
||||
:type="getRangePickerType(field)"
|
||||
range-separator="至"
|
||||
:start-placeholder="field.startPlaceholder || getRangePickerStartPlaceholder(field)"
|
||||
:end-placeholder="field.endPlaceholder || getRangePickerEndPlaceholder(field)"
|
||||
:format="getRangePickerFormat(field)"
|
||||
:value-format="getRangePickerValueFormat(field)"
|
||||
:default-time="getRangePickerDefaultTime(field)"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
@change="handleCompactChange"
|
||||
/>
|
||||
</div>
|
||||
<!-- 日期类型 -->
|
||||
<div v-else-if="field.type === 'date'" class="compact-field-item">
|
||||
<el-date-picker
|
||||
v-model="customConditions[field.value].value"
|
||||
type="date"
|
||||
:placeholder="field.label"
|
||||
size="small"
|
||||
style="width: 100%"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
@change="handleCompactChange"
|
||||
/>
|
||||
</div>
|
||||
<!-- 自定义组件 -->
|
||||
<div v-else-if="field.type === 'custom'" class="compact-field-item">
|
||||
<component
|
||||
:is="field.component"
|
||||
v-model="customConditions[field.value].value"
|
||||
v-bind="field.props || {}"
|
||||
@change="handleCompactChange"
|
||||
/>
|
||||
</div>
|
||||
<!-- 文本类型(默认) -->
|
||||
<div v-else class="compact-field-item">
|
||||
<el-input
|
||||
v-model="customConditions[field.value].value"
|
||||
:placeholder="field.label"
|
||||
size="small"
|
||||
clearable
|
||||
@change="handleCompactChange"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div class="fixed-bottom-actions">
|
||||
<div class="actions-content">
|
||||
<el-button
|
||||
size="small"
|
||||
@click="handleReset"
|
||||
class="reset-btn"
|
||||
>
|
||||
重置
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
size="small"
|
||||
@click="handleSubmit"
|
||||
:loading="submitting"
|
||||
>
|
||||
确定
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -415,7 +570,8 @@
|
||||
import { ref, reactive, watch, computed, onMounted, onBeforeUnmount, nextTick } from 'vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import { useScanBoxCacheStore } from '@/stores/modules/scanBoxCache'
|
||||
import { Operation, DataAnalysis, Search, Files } from '@element-plus/icons-vue'
|
||||
import { useSettingsStore } from '@/stores/modules/settings'
|
||||
import { Operation, DataAnalysis, Search, Files, Fold, Expand } from '@element-plus/icons-vue'
|
||||
|
||||
defineOptions({
|
||||
name: 'ScanBox'
|
||||
@ -428,6 +584,12 @@ const props = defineProps({
|
||||
default: '250px'
|
||||
},
|
||||
|
||||
// 标题(紧凑模式显示)
|
||||
title: {
|
||||
type: String,
|
||||
default: '筛选'
|
||||
},
|
||||
|
||||
// 预设树状条件
|
||||
presetTree: {
|
||||
type: Array,
|
||||
@ -525,6 +687,47 @@ const props = defineProps({
|
||||
const emit = defineEmits(['condition-change', 'reset', 'condition-clear', 'submit', 'field-action'])
|
||||
const route = useRoute()
|
||||
const scanBoxCacheStore = useScanBoxCacheStore()
|
||||
const settingsStore = useSettingsStore()
|
||||
|
||||
// 紧凑模式
|
||||
const isCompact = computed(() => settingsStore.scanBoxMode === 'compact')
|
||||
function toggleMode() {
|
||||
settingsStore.changeSetting({ key: 'scanBoxMode', value: isCompact.value ? 'standard' : 'compact' })
|
||||
}
|
||||
|
||||
// 紧凑模式下字段变更时自动设置默认操作符
|
||||
function handleCompactChange() {
|
||||
// 为有值的字段设置默认操作符
|
||||
props.availableFields.forEach((field: any) => {
|
||||
const condition = customConditions[field.value]
|
||||
if (!condition) return
|
||||
const val = condition.value
|
||||
const hasValue = val !== undefined && val !== null && val !== '' && !(Array.isArray(val) && val.length === 0)
|
||||
if (hasValue && !condition.operator) {
|
||||
// 设置默认操作符
|
||||
if (field.operators && Array.isArray(field.operators) && field.operators.length > 0) {
|
||||
condition.operator = field.defaultOperator || field.operators[0]
|
||||
} else {
|
||||
const defaultOps = props.defaultOperators[field.type as keyof typeof props.defaultOperators]
|
||||
if (defaultOps && defaultOps.length > 0) {
|
||||
condition.operator = field.defaultOperator || defaultOps[0].value || 'eq'
|
||||
} else {
|
||||
condition.operator = 'eq'
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!hasValue) {
|
||||
condition.operator = ''
|
||||
}
|
||||
})
|
||||
scheduleSaveSnapshot()
|
||||
if (props.autoSubmit) {
|
||||
clearTimeout(debounceTimer)
|
||||
debounceTimer = setTimeout(() => {
|
||||
handleSubmit()
|
||||
}, 300)
|
||||
}
|
||||
}
|
||||
|
||||
// Data
|
||||
const activeTab = ref('custom')
|
||||
@ -1637,4 +1840,78 @@ defineExpose({ getConditions, reset, clear, getFieldDraft, setFieldCondition, su
|
||||
padding-left: 4px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* ─── 紧凑模式 ──────────────────────────────────────────────────────────── */
|
||||
.scan-box--compact {
|
||||
width: 220px !important;
|
||||
min-width: 180px;
|
||||
}
|
||||
|
||||
.scan-tabs__inner {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.scan-tabs__inner .el-tabs {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.mode-toggle-btn {
|
||||
flex-shrink: 0;
|
||||
padding: 4px;
|
||||
margin-left: auto;
|
||||
color: #909399;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.mode-toggle-btn:hover {
|
||||
color: #409eff;
|
||||
}
|
||||
|
||||
.compact-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 12px;
|
||||
background: #f8fbff;
|
||||
border-bottom: 1px solid #e8eef7;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.compact-title {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #303133;
|
||||
}
|
||||
|
||||
.compact-filter {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.compact-fields {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 8px 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.compact-fields::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.compact-fields {
|
||||
-ms-overflow-style: none;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.compact-field-item {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@ -35,5 +35,11 @@ export default {
|
||||
* @type {'tile' | 'collapse'}
|
||||
* @description Toolbar button display mode: tile (平铺) or collapse (折叠)
|
||||
*/
|
||||
toolbarMode: 'collapse'
|
||||
toolbarMode: 'collapse',
|
||||
|
||||
/**
|
||||
* @type {'standard' | 'compact'}
|
||||
* @description ScanBox display mode: standard (标准) or compact (紧凑)
|
||||
*/
|
||||
scanBoxMode: 'standard'
|
||||
}
|
||||
|
||||
@ -3,7 +3,7 @@ import defaultSettings from '@/settings'
|
||||
import { ref, computed, watch } from 'vue'
|
||||
import { useUserStore } from './user'
|
||||
|
||||
const { showSettings, tagsView, fixedHeader, sidebarLogo, shortcutExpanded, toolbarMode: defaultToolbarMode } = defaultSettings
|
||||
const { showSettings, tagsView, fixedHeader, sidebarLogo, shortcutExpanded, toolbarMode: defaultToolbarMode, scanBoxMode: defaultScanBoxMode } = defaultSettings
|
||||
|
||||
export const useSettingsStore = defineStore('settings', () => {
|
||||
const userStore = useUserStore()
|
||||
@ -15,7 +15,8 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
const sidebarLogoRef = ref(sidebarLogo)
|
||||
const layoutMode = ref<'sidebar' | 'top-bottom'>('top-bottom')
|
||||
const shortcutExpandedRef = ref<boolean>(shortcutExpanded)
|
||||
const toolbarModeRef = ref<'tile' | 'collapse'>(defaultToolbarMode || 'collapse')
|
||||
const toolbarModeRef = ref<'tile' | 'collapse'>((defaultToolbarMode as 'tile' | 'collapse') || 'collapse')
|
||||
const scanBoxModeRef = ref<'standard' | 'compact'>((defaultScanBoxMode as 'standard' | 'compact') || 'standard')
|
||||
|
||||
const storageKey = computed(() => {
|
||||
if (!userStore.user?.username && !userStore.user?.id) return null
|
||||
@ -36,6 +37,7 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
if (typeof parsed.layoutMode === 'string') layoutMode.value = parsed.layoutMode
|
||||
if (typeof parsed.shortcutExpanded === 'boolean') shortcutExpandedRef.value = parsed.shortcutExpanded
|
||||
if (parsed.toolbarMode === 'tile' || parsed.toolbarMode === 'collapse') toolbarModeRef.value = parsed.toolbarMode
|
||||
if (parsed.scanBoxMode === 'standard' || parsed.scanBoxMode === 'compact') scanBoxModeRef.value = parsed.scanBoxMode
|
||||
} catch (e) {
|
||||
console.error('Failed to parse settings from storage', e)
|
||||
}
|
||||
@ -51,7 +53,8 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
sidebarLogo: sidebarLogoRef.value,
|
||||
layoutMode: layoutMode.value,
|
||||
shortcutExpanded: shortcutExpandedRef.value,
|
||||
toolbarMode: toolbarModeRef.value
|
||||
toolbarMode: toolbarModeRef.value,
|
||||
scanBoxMode: scanBoxModeRef.value
|
||||
}
|
||||
try {
|
||||
localStorage.setItem(storageKey.value, JSON.stringify(payload))
|
||||
@ -72,7 +75,8 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
sidebarLogoRef.value = sidebarLogo
|
||||
layoutMode.value = 'top-bottom'
|
||||
shortcutExpandedRef.value = shortcutExpanded
|
||||
toolbarModeRef.value = defaultToolbarMode || 'collapse'
|
||||
toolbarModeRef.value = (defaultToolbarMode as 'tile' | 'collapse') || 'collapse'
|
||||
scanBoxModeRef.value = (defaultScanBoxMode as 'standard' | 'compact') || 'standard'
|
||||
}
|
||||
}, { immediate: true })
|
||||
|
||||
@ -85,7 +89,8 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
sidebarLogo: 1,
|
||||
layoutMode: 1,
|
||||
shortcutExpanded: 1,
|
||||
toolbarMode: 1
|
||||
toolbarMode: 1,
|
||||
scanBoxMode: 1
|
||||
}, key)) return
|
||||
|
||||
switch (key) {
|
||||
@ -113,6 +118,9 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
case 'toolbarMode':
|
||||
toolbarModeRef.value = value
|
||||
break
|
||||
case 'scanBoxMode':
|
||||
scanBoxModeRef.value = value
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
@ -130,6 +138,7 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
layoutMode,
|
||||
shortcutExpanded: shortcutExpandedRef,
|
||||
toolbarMode: toolbarModeRef,
|
||||
scanBoxMode: scanBoxModeRef,
|
||||
changeSetting
|
||||
}
|
||||
})
|
||||
|
||||
@ -1343,6 +1343,11 @@ export const deliveryAvailableFields = [
|
||||
{ ...waveNoScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waybillCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sourceOrderCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...orderFlagScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...shopNickScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sysPlatformNameScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...logisticsNameScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...expressCompanyScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
// 流程状态
|
||||
{ ...orderStatusScanField(pendingOrderStatusFilterOptions), group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...outboundStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
@ -1357,12 +1362,6 @@ export const deliveryAvailableFields = [
|
||||
{ ...claimStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...lockStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...interceptStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
// 订单信息
|
||||
{ ...orderFlagScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...shopNickScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sysPlatformNameScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...logisticsNameScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...expressCompanyScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
// 收货信息
|
||||
{ ...receiverNameScanField, group: SCAN_RECEIVING_INFO_GROUP },
|
||||
{ ...receiverMobileScanField, group: SCAN_RECEIVING_INFO_GROUP },
|
||||
@ -1522,18 +1521,17 @@ export const reviewAvailableFields = [
|
||||
{ ...isUrgencyScanField, group: SCAN_QUICK_FILTER_GROUP },
|
||||
{ ...waveAssignmentScanField, group: SCAN_QUICK_FILTER_GROUP },
|
||||
// 订单信息
|
||||
{ ...orderQuickSearchScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...orderQuickSearchScanField, label: '发货单号', group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...orderIdScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveNoScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sourceOrderCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...shopNickScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sysPlatformCodeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...expressCompanyScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
// 流程状态
|
||||
{ ...syncStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...recheckStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...orderStatusScanField(reviewOrderStatusFilterOptions), group: SCAN_PROCESS_STATUS_GROUP },
|
||||
// 订单信息
|
||||
{ ...shopNickScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sysPlatformCodeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...expressCompanyScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
// 收货信息
|
||||
{ ...receiverNameScanField, group: SCAN_RECEIVING_INFO_GROUP },
|
||||
{ ...receiverMobileScanField, group: SCAN_RECEIVING_INFO_GROUP },
|
||||
@ -1551,6 +1549,8 @@ export const reviewColums = applyOrderListCopyActions([
|
||||
{ prop: 'shop_nick', label: '店铺名称', width: '140' },
|
||||
orderStoreRemarkColumn,
|
||||
{ prop: 'sys_platform_name', label: '平台编码', width: '100' },
|
||||
{ prop: 'source_order_codes', label: '平台交易单号', width: '140' },
|
||||
{ prop: 'status', label: '订单状态', width: '100', formatter: (row: any) => translateOrderField('status', row.status) },
|
||||
{ prop: 'name', label: '收件人', width: '110' },
|
||||
{ prop: 'sync_status', label: '同步状态', width: '100' },
|
||||
{ prop: 'recheck_status', label: '复核状态', width: '100' },
|
||||
@ -1680,6 +1680,11 @@ export const pendingAvailableFields = [
|
||||
{ ...waveNoScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waybillCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sourceOrderCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...orderFlagScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...shopNickScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sysPlatformNameScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...logisticsNameScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...expressCompanyScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
// 流程状态
|
||||
{ ...syncStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...recheckStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
@ -1689,12 +1694,6 @@ export const pendingAvailableFields = [
|
||||
{ ...packStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...printStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...orderStatusScanField(pendingOrderStatusFilterOptions), group: SCAN_PROCESS_STATUS_GROUP },
|
||||
// 订单信息
|
||||
{ ...orderFlagScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...shopNickScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sysPlatformNameScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...logisticsNameScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...expressCompanyScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
// 收货信息
|
||||
{ ...receiverNameScanField, group: SCAN_RECEIVING_INFO_GROUP },
|
||||
{ ...receiverMobileScanField, group: SCAN_RECEIVING_INFO_GROUP },
|
||||
@ -1953,10 +1952,9 @@ export const workbenchAvailableFields = [
|
||||
{ ...orderIdScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveNoScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sourceOrderCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...buyerNickScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
// 流程状态
|
||||
{ ...orderStatusScanField(workbenchStatusOptions), group: SCAN_PROCESS_STATUS_GROUP },
|
||||
// 订单信息
|
||||
{ ...buyerNickScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
// 收货信息
|
||||
{ ...buyerMessageHasScanField, group: SCAN_RECEIVING_INFO_GROUP },
|
||||
{ ...buyerMessageScanField, group: SCAN_RECEIVING_INFO_GROUP },
|
||||
@ -2019,6 +2017,9 @@ export const expectionOrderAvailableFields = [
|
||||
{ ...waveNoScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...expressCodeScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sourceOrderCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...orderFlagScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...logisticsNameScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...expressCompanyScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
// 流程状态
|
||||
{ ...syncStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...storageStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
@ -2029,10 +2030,6 @@ export const expectionOrderAvailableFields = [
|
||||
{ ...recheckStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...printStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...orderStatusScanField(exceptionOrderStatusFilterOptions), group: SCAN_PROCESS_STATUS_GROUP },
|
||||
// 订单信息
|
||||
{ ...orderFlagScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...logisticsNameScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...expressCompanyScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
// 收货信息
|
||||
{ ...buyerMessageHasScanField, group: SCAN_RECEIVING_INFO_GROUP },
|
||||
{ ...buyerMessageScanField, group: SCAN_RECEIVING_INFO_GROUP },
|
||||
@ -2134,15 +2131,14 @@ export const archiveAvailableFields = [
|
||||
{ ...orderIdScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...waveNoScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...sourceOrderCodesScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...shopNickScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...expressCompanyScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
// 流程状态
|
||||
{ ...orderStatusScanField(archiveOrderStatusFilterOptions), group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...syncStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...outboundStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...pickStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...packStatusScanField, group: SCAN_PROCESS_STATUS_GROUP },
|
||||
// 订单信息
|
||||
{ ...shopNickScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
{ ...expressCompanyScanField, group: SCAN_ORDER_INFO_GROUP },
|
||||
// 收货信息
|
||||
{ ...receiverNameScanField, group: SCAN_RECEIVING_INFO_GROUP },
|
||||
{ ...receiverMobileScanField, group: SCAN_RECEIVING_INFO_GROUP },
|
||||
|
||||
@ -63,6 +63,12 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
|
||||
<template #column-status="{ row }">
|
||||
<el-tag :type="getTagType('status', row.status)" size="small">
|
||||
{{ translateOrderField('status', row.status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
|
||||
<template #column-recheck_status="{ row }">
|
||||
<el-tag :type="getTagType('recheck_status', resolveOrderRecheckStatus(row))" size="small">
|
||||
{{ translateOrderField('recheck_status', resolveOrderRecheckStatus(row)) }}
|
||||
|
||||
@ -60,7 +60,10 @@ export const WAVE_SCAN_STATS_GROUP = '订单统计'
|
||||
export const WAVE_SCAN_OTHER_GROUP = '其他信息'
|
||||
|
||||
/** 拣货任务 ScanBox:基础信息分组 */
|
||||
export const PICK_TASK_SCAN_BASIC_INFO_GROUP = '基础信息'
|
||||
export const PICK_TASK_SCAN_BASIC_INFO_GROUP = '任务信息'
|
||||
|
||||
/** 拣货任务 ScanBox:流程状态分组(对齐波次列表,所有流程字段归入一组) */
|
||||
export const PICK_TASK_SCAN_PROCESS_STATUS_GROUP = '流程状态'
|
||||
|
||||
/** 波次列表 ScanBox 基础信息字段 */
|
||||
export function waveScanBasicField(field: Record<string, any>) {
|
||||
@ -1007,19 +1010,20 @@ export const pickTaskStatusFilterOptions = [
|
||||
{ label: '已取消', value: 9 }
|
||||
] as const
|
||||
|
||||
/** 左侧筛选字段(与 order.wave.wavePickTaskList 入参对应;基础信息在前,流程状态在后) */
|
||||
/** 左侧筛选字段(对标波次列表 ScanBox 分组排序) */
|
||||
export const pickTaskWaveAvailableFields = [
|
||||
// 任务基础信息
|
||||
// ===== 任务信息 =====
|
||||
pickTaskScanBasicField({ label: '任务编号', value: 'task_no', type: 'text' }),
|
||||
pickTaskScanBasicField({ label: '开始时间', value: 'start_time_range', type: 'daterange' }),
|
||||
// 流程状态(每项独立分组)
|
||||
scanWorkflowField({
|
||||
|
||||
// ===== 流程状态(合并为一组,对齐波次列表 ScanBox) =====
|
||||
{ ...scanWorkflowField({
|
||||
label: '任务状态',
|
||||
value: 'status',
|
||||
type: 'multiple',
|
||||
options: [...pickTaskStatusFilterOptions]
|
||||
}),
|
||||
scanWorkflowField({
|
||||
}), group: PICK_TASK_SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...scanWorkflowField({
|
||||
label: '复核状态',
|
||||
value: 'review_status',
|
||||
type: 'select',
|
||||
@ -1030,8 +1034,8 @@ export const pickTaskWaveAvailableFields = [
|
||||
{ label: '复核通过', value: 3 },
|
||||
{ label: '复核异常', value: 4 }
|
||||
]
|
||||
}),
|
||||
scanWorkflowField({
|
||||
}), group: PICK_TASK_SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...scanWorkflowField({
|
||||
label: '拣货模式',
|
||||
value: 'pick_mode',
|
||||
type: 'select',
|
||||
@ -1042,8 +1046,8 @@ export const pickTaskWaveAvailableFields = [
|
||||
{ label: '边拣边分', value: 4 },
|
||||
{ label: '大团购', value: 5 }
|
||||
]
|
||||
}),
|
||||
scanWorkflowField({
|
||||
}), group: PICK_TASK_SCAN_PROCESS_STATUS_GROUP },
|
||||
{ ...scanWorkflowField({
|
||||
label: '来源',
|
||||
value: 'source',
|
||||
type: 'select',
|
||||
@ -1052,7 +1056,7 @@ export const pickTaskWaveAvailableFields = [
|
||||
{ label: 'PDA', value: 1 },
|
||||
{ label: '后台', value: 2 }
|
||||
]
|
||||
}),
|
||||
}), group: PICK_TASK_SCAN_PROCESS_STATUS_GROUP },
|
||||
]
|
||||
|
||||
/** 拣货任务列表:UpperTable 列配置 */
|
||||
|
||||
@ -73,21 +73,15 @@ export const comboGoodsColumns = [
|
||||
]
|
||||
|
||||
export const comboGoodsScanFields = [
|
||||
// {
|
||||
// value: 'keyword',
|
||||
// label: '关键词',
|
||||
// type: 'text',
|
||||
// placeholder: '组合编码 / 名称',
|
||||
// operators: ['contains'],
|
||||
// defaultOperator: 'contains'
|
||||
// },
|
||||
// ===== 组合信息 =====
|
||||
{
|
||||
value: 'combo_code',
|
||||
label: '组合编码',
|
||||
type: 'text',
|
||||
placeholder: '精确匹配',
|
||||
operators: ['eq'],
|
||||
defaultOperator: 'eq'
|
||||
defaultOperator: 'eq',
|
||||
group: '组合信息'
|
||||
},
|
||||
{
|
||||
value: 'combo_name',
|
||||
@ -95,8 +89,10 @@ export const comboGoodsScanFields = [
|
||||
type: 'text',
|
||||
placeholder: '模糊匹配',
|
||||
operators: ['contains', 'like', 'eq'],
|
||||
defaultOperator: 'eq'
|
||||
defaultOperator: 'eq',
|
||||
group: '组合信息'
|
||||
},
|
||||
// ===== 状态筛选 =====
|
||||
{
|
||||
value: 'status',
|
||||
label: '状态',
|
||||
@ -105,7 +101,8 @@ export const comboGoodsScanFields = [
|
||||
options: [
|
||||
{ label: '启用', value: '1' },
|
||||
{ label: '停用', value: '0' }
|
||||
]
|
||||
],
|
||||
group: '状态筛选'
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
@ -25,12 +25,15 @@ export function stockScanField<G extends StockScanFieldGroupKey>(
|
||||
return { ...field, group: STOCK_SCAN_FIELD_GROUPS[group] }
|
||||
}
|
||||
|
||||
/** 商品列表 ScanBox:基础信息分组(对齐团购波次「波次基础信息」排版) */
|
||||
export const STOCK_SCAN_BASIC_INFO_GROUP = '基础信息'
|
||||
/** 商品列表 ScanBox:基础信息分组(对齐团购波次「波次信息」排版) */
|
||||
export const STOCK_SCAN_PRODUCT_ID_GROUP = '商品标识'
|
||||
|
||||
/** 商品列表 ScanBox:商品信息分组 */
|
||||
export const STOCK_SCAN_PRODUCT_INFO_GROUP = '商品信息'
|
||||
|
||||
/** 商品列表 ScanBox 基础信息字段 */
|
||||
export function stockScanBasicField(field: Record<string, any>) {
|
||||
return { ...field, group: STOCK_SCAN_BASIC_INFO_GROUP }
|
||||
return { ...field, group: STOCK_SCAN_PRODUCT_ID_GROUP }
|
||||
}
|
||||
|
||||
/** ScanBox 默认 props(与波次模块 scan-box 侧栏一致) */
|
||||
@ -230,10 +233,10 @@ export const stockColumns = [
|
||||
},
|
||||
]
|
||||
|
||||
// ScanBox 可用筛选字段(基础信息在前,流程/状态字段在后;对齐团购波次 ScanBox 分组)
|
||||
// ScanBox 可用筛选字段(对标团购波次 ScanBox 分组排序)
|
||||
export const availableFields = [
|
||||
// 基础信息
|
||||
stockScanBasicField({
|
||||
// ===== 商品标识 =====
|
||||
stockScanField('owner', {
|
||||
value: 'store_id',
|
||||
label: '货主',
|
||||
type: 'select',
|
||||
@ -241,7 +244,68 @@ export const availableFields = [
|
||||
filterable: true,
|
||||
options: [],
|
||||
}),
|
||||
stockScanBasicField({
|
||||
stockScanField('product', {
|
||||
value: 'id',
|
||||
label: 'SKU',
|
||||
type: 'text',
|
||||
placeholder: '请输入SKU',
|
||||
operators: ['eq', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
stockScanField('product', {
|
||||
value: 'item_code',
|
||||
label: '商品编码',
|
||||
type: 'text',
|
||||
placeholder: '请输入商品编码',
|
||||
operators: ['eq', 'ne', 'contains', 'startswith', 'endswith'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
stockScanField('product', {
|
||||
value: 'goods_code',
|
||||
label: '货物编码',
|
||||
type: 'text',
|
||||
placeholder: '请输入货物编码',
|
||||
operators: ['eq', 'ne', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
|
||||
// ===== 商品信息 =====
|
||||
stockScanField('info', {
|
||||
value: 'item_name',
|
||||
label: '商品名称',
|
||||
type: 'text',
|
||||
placeholder: '请输入商品名称',
|
||||
operators: ['eq', 'ne', 'contains'],
|
||||
defaultOperator: 'eq',
|
||||
required: false
|
||||
}),
|
||||
stockScanField('info', {
|
||||
value: 'barcode',
|
||||
label: '条码',
|
||||
type: 'text',
|
||||
placeholder: '请输入商品条码',
|
||||
operators: ['eq', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
stockScanField('info', {
|
||||
value: 'brand_name',
|
||||
label: '品牌',
|
||||
type: 'text',
|
||||
placeholder: '请输入品牌',
|
||||
operators: ['eq', 'ne', 'contains', 'startswith', 'endswith'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
stockScanField('info', {
|
||||
value: 'sku_property',
|
||||
label: 'SKU规格',
|
||||
type: 'text',
|
||||
placeholder: '请输入SKU规格',
|
||||
operators: ['eq', 'ne', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
|
||||
// ===== 商品属性 =====
|
||||
stockScanField('attribute', {
|
||||
value: 'stock_unit',
|
||||
label: '库存单位',
|
||||
type: 'select',
|
||||
@ -252,64 +316,7 @@ export const availableFields = [
|
||||
],
|
||||
required: false
|
||||
}),
|
||||
stockScanBasicField({
|
||||
value: 'barcode',
|
||||
label: '条码',
|
||||
type: 'text',
|
||||
placeholder: '请输入商品条码',
|
||||
operators: ['eq', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
stockScanBasicField({
|
||||
value: 'id',
|
||||
label: 'SKU',
|
||||
type: 'text',
|
||||
placeholder: '请输入SKU',
|
||||
operators: ['eq', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
stockScanBasicField({
|
||||
value: 'item_code',
|
||||
label: '商品编码',
|
||||
type: 'text',
|
||||
placeholder: '请输入商品编码',
|
||||
operators: ['eq', 'ne', 'contains', 'startswith', 'endswith'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
stockScanBasicField({
|
||||
value: 'goods_code',
|
||||
label: '货物编码',
|
||||
type: 'text',
|
||||
placeholder: '请输入货物编码',
|
||||
operators: ['eq', 'ne', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
stockScanBasicField({
|
||||
value: 'item_name',
|
||||
label: '商品名称',
|
||||
type: 'text',
|
||||
placeholder: '请输入商品名称',
|
||||
operators: ['eq', 'ne', 'contains'],
|
||||
defaultOperator: 'eq',
|
||||
required: false
|
||||
}),
|
||||
stockScanBasicField({
|
||||
value: 'brand_name',
|
||||
label: '品牌',
|
||||
type: 'text',
|
||||
placeholder: '请输入品牌',
|
||||
operators: ['eq', 'ne', 'contains', 'startswith', 'endswith'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
stockScanBasicField({
|
||||
value: 'sku_property',
|
||||
label: 'SKU规格',
|
||||
type: 'text',
|
||||
placeholder: '请输入SKU规格',
|
||||
operators: ['eq', 'ne', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
stockScanBasicField({
|
||||
stockScanField('attribute', {
|
||||
value: 'prohibited_type',
|
||||
label: '违禁品类型',
|
||||
type: 'select',
|
||||
@ -317,18 +324,18 @@ export const availableFields = [
|
||||
filterable: true,
|
||||
options: [],
|
||||
}),
|
||||
stockScanBasicField({
|
||||
stockScanField('attribute', {
|
||||
value: 'is_images',
|
||||
label: '是否有图片',
|
||||
type: 'boolean',
|
||||
}),
|
||||
stockScanBasicField({
|
||||
stockScanField('attribute', {
|
||||
value: 'has_bound_item',
|
||||
label: '外部商品绑定',
|
||||
type: 'boolean',
|
||||
placeholder: '请选择是否已绑定外部商品'
|
||||
}),
|
||||
stockScanBasicField({
|
||||
stockScanField('attribute', {
|
||||
value: 'level',
|
||||
label: 'ABC分类',
|
||||
type: 'select',
|
||||
@ -339,7 +346,9 @@ export const availableFields = [
|
||||
{ value: 'C', label: 'C类' }
|
||||
],
|
||||
}),
|
||||
stockScanBasicField({
|
||||
|
||||
// ===== 价格规格 =====
|
||||
stockScanField('price', {
|
||||
value: 'tag_price',
|
||||
label: '标价',
|
||||
type: 'number',
|
||||
@ -347,7 +356,7 @@ export const availableFields = [
|
||||
operators: ['eq', 'ne', 'gt', 'lt', 'ge', 'le', 'between'],
|
||||
defaultOperator: 'between'
|
||||
}),
|
||||
stockScanBasicField({
|
||||
stockScanField('price', {
|
||||
value: 'retail_price',
|
||||
label: '零售价',
|
||||
type: 'number',
|
||||
@ -355,7 +364,7 @@ export const availableFields = [
|
||||
operators: ['eq', 'ne', 'gt', 'lt', 'ge', 'le', 'between'],
|
||||
defaultOperator: 'between'
|
||||
}),
|
||||
stockScanBasicField({
|
||||
stockScanField('price', {
|
||||
value: 'length',
|
||||
label: '长度',
|
||||
type: 'number',
|
||||
@ -363,54 +372,59 @@ export const availableFields = [
|
||||
operators: ['eq', 'ne', 'gt', 'lt', 'ge', 'le'],
|
||||
defaultOperator: 'gt'
|
||||
}),
|
||||
stockScanBasicField({
|
||||
value: 'create_at',
|
||||
label: '创建时间',
|
||||
type: 'daterange',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间'
|
||||
}),
|
||||
stockScanBasicField({
|
||||
value: 'update_at',
|
||||
label: '更新时间',
|
||||
type: 'daterange',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间'
|
||||
}),
|
||||
// 流程/状态(每项独立分组,对齐团购波次 scanWorkflowField 排版)
|
||||
scanWorkflowField({
|
||||
|
||||
// ===== 库存信息(合并为一组,对齐波次列表 ScanBox) =====
|
||||
{ ...scanWorkflowField({
|
||||
value: 'quantity',
|
||||
label: '库存数量',
|
||||
type: 'number',
|
||||
placeholder: '请输入库存数量',
|
||||
operators: ['eq', 'ne', 'gt', 'lt', 'ge', 'le', 'between'],
|
||||
defaultOperator: 'ge'
|
||||
}),
|
||||
scanWorkflowField({
|
||||
}), group: STOCK_SCAN_FIELD_GROUPS.inventory },
|
||||
{ ...scanWorkflowField({
|
||||
value: 'locked_quantity',
|
||||
label: '锁定量',
|
||||
type: 'number',
|
||||
placeholder: '请输入锁定量',
|
||||
operators: ['eq', 'ne', 'gt', 'lt', 'ge', 'le'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
scanWorkflowField({
|
||||
}), group: STOCK_SCAN_FIELD_GROUPS.inventory },
|
||||
|
||||
// ===== 管理标识(合并为一组,对齐波次列表 ScanBox) =====
|
||||
{ ...scanWorkflowField({
|
||||
value: 'is_sn_mgmt',
|
||||
label: '序列号管理',
|
||||
type: 'boolean',
|
||||
placeholder: '请选择是否序列号管理'
|
||||
}),
|
||||
scanWorkflowField({
|
||||
}), group: STOCK_SCAN_FIELD_GROUPS.management },
|
||||
{ ...scanWorkflowField({
|
||||
value: 'is_shelf_life_mgmt',
|
||||
label: '保质期管理',
|
||||
type: 'boolean',
|
||||
placeholder: '请选择是否保质期管理'
|
||||
}),
|
||||
scanWorkflowField({
|
||||
}), group: STOCK_SCAN_FIELD_GROUPS.management },
|
||||
{ ...scanWorkflowField({
|
||||
value: 'is_batch_mgmt',
|
||||
label: '批次管理',
|
||||
type: 'boolean',
|
||||
placeholder: '请选择是否批次管理'
|
||||
}), group: STOCK_SCAN_FIELD_GROUPS.management },
|
||||
|
||||
// ===== 时间范围 =====
|
||||
stockScanField('time', {
|
||||
value: 'create_at',
|
||||
label: '创建时间',
|
||||
type: 'daterange',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间'
|
||||
}),
|
||||
stockScanField('time', {
|
||||
value: 'update_at',
|
||||
label: '更新时间',
|
||||
type: 'daterange',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间'
|
||||
}),
|
||||
]
|
||||
|
||||
|
||||
@ -1,8 +1,9 @@
|
||||
import { scanWorkflowField } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
/** ScanBox 基础信息分组(对齐收货/待处理订单排版) */
|
||||
export const ENTRY_SCAN_BASIC_INFO_GROUP = '基础信息'
|
||||
|
||||
/** ScanBox 流程状态分组 */
|
||||
export const ENTRY_SCAN_WORKFLOW_GROUP = '流程状态'
|
||||
|
||||
/** ScanBox 时间分组 */
|
||||
export const ENTRY_SCAN_TIME_GROUP = '时间'
|
||||
|
||||
@ -19,6 +20,10 @@ export function entryScanBasicField(field: Record<string, any>): EntryScanFieldC
|
||||
return { ...field, group: ENTRY_SCAN_BASIC_INFO_GROUP } as EntryScanFieldConfig
|
||||
}
|
||||
|
||||
export function entryScanWorkflowField(field: Record<string, any>): EntryScanFieldConfig {
|
||||
return { ...field, group: ENTRY_SCAN_WORKFLOW_GROUP } as EntryScanFieldConfig
|
||||
}
|
||||
|
||||
export function entryScanTimeField(field: Record<string, any>): EntryScanFieldConfig {
|
||||
return { ...field, group: ENTRY_SCAN_TIME_GROUP } as EntryScanFieldConfig
|
||||
}
|
||||
@ -162,14 +167,14 @@ export const availableFields: EntryScanFieldConfig[] = [
|
||||
value: 'operator_id',
|
||||
type: 'text'
|
||||
}),
|
||||
// 流程/状态(每项独立分组,对齐收货/待处理订单 scanWorkflowField 排版)
|
||||
scanWorkflowField({
|
||||
// ===== 流程状态(合并为一组,对齐波次列表 ScanBox) =====
|
||||
entryScanWorkflowField({
|
||||
label: '状态',
|
||||
value: 'order_status',
|
||||
type: 'select',
|
||||
options: [...entryOrderStatusOptions]
|
||||
}) as EntryScanFieldConfig,
|
||||
scanWorkflowField({
|
||||
}),
|
||||
entryScanWorkflowField({
|
||||
label: '入库状态',
|
||||
value: 'sync_status',
|
||||
type: 'select',
|
||||
@ -180,8 +185,8 @@ export const availableFields: EntryScanFieldConfig[] = [
|
||||
{ label: '失败', value: 'FAIL' },
|
||||
{ label: '失败', value: 'FAILED' },
|
||||
]
|
||||
}) as EntryScanFieldConfig,
|
||||
scanWorkflowField({
|
||||
}),
|
||||
entryScanWorkflowField({
|
||||
label: '收货绑定',
|
||||
value: 'hasReceiving',
|
||||
type: 'select',
|
||||
@ -189,7 +194,7 @@ export const availableFields: EntryScanFieldConfig[] = [
|
||||
{ label: '已绑定', value: true },
|
||||
{ label: '未绑定', value: false },
|
||||
]
|
||||
}) as EntryScanFieldConfig,
|
||||
}),
|
||||
|
||||
// ── 时间 ──
|
||||
entryScanTimeField({
|
||||
|
||||
@ -1,8 +1,12 @@
|
||||
import { scanWorkflowField } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
/** ScanBox 基础信息分组(对齐收货单排版) */
|
||||
export const LOG_SCAN_BASIC_INFO_GROUP = '基础信息'
|
||||
|
||||
/** ScanBox 流程状态分组 */
|
||||
export const LOG_SCAN_WORKFLOW_GROUP = '流程状态'
|
||||
|
||||
/** ScanBox 时间分组 */
|
||||
export const LOG_SCAN_TIME_GROUP = '时间'
|
||||
|
||||
/** 为出入库日志 ScanBox 基础信息字段附加分组标签 */
|
||||
export type LogScanFieldConfig = Record<string, any> & {
|
||||
group: string
|
||||
@ -16,6 +20,14 @@ export function logScanBasicField(field: Record<string, any>): LogScanFieldConfi
|
||||
return { ...field, group: LOG_SCAN_BASIC_INFO_GROUP } as LogScanFieldConfig
|
||||
}
|
||||
|
||||
export function logScanWorkflowField(field: Record<string, any>): LogScanFieldConfig {
|
||||
return { ...field, group: LOG_SCAN_WORKFLOW_GROUP } as LogScanFieldConfig
|
||||
}
|
||||
|
||||
export function logScanTimeField(field: Record<string, any>): LogScanFieldConfig {
|
||||
return { ...field, group: LOG_SCAN_TIME_GROUP } as LogScanFieldConfig
|
||||
}
|
||||
|
||||
/** ScanBox 默认 props(与波次模块 scan-box 侧栏一致) */
|
||||
export const logScanBoxConfig = {
|
||||
width: '250px',
|
||||
@ -121,32 +133,35 @@ export const availableFields: LogScanFieldConfig[] = [
|
||||
filterable: true,
|
||||
options: []
|
||||
}),
|
||||
logScanBasicField({
|
||||
|
||||
// ===== 流程状态(合并为一组,对齐波次列表 ScanBox) =====
|
||||
logScanWorkflowField({
|
||||
value: 'transaction_type',
|
||||
label: '交易类型',
|
||||
type: 'select',
|
||||
options: Object.entries(transactionTypeConfig).map(([v, c]) => ({ value: v, label: c.text }))
|
||||
}),
|
||||
logScanWorkflowField({
|
||||
value: 'inventory_type',
|
||||
label: '库存类型',
|
||||
type: 'select',
|
||||
options: Object.entries(inventoryTypeConfig).map(([v, c]) => ({ value: v, label: c.text }))
|
||||
}),
|
||||
logScanWorkflowField({
|
||||
value: 'order_type',
|
||||
label: '订单类型',
|
||||
type: 'select',
|
||||
options: Object.entries(orderTypeConfig).map(([v, c]) => ({ value: v, label: c.text }))
|
||||
}),
|
||||
|
||||
// ===== 时间 =====
|
||||
logScanTimeField({
|
||||
value: 'created_at',
|
||||
label: '创建时间',
|
||||
type: 'date',
|
||||
operators: ['between', 'eq', 'gt', 'lt'],
|
||||
defaultOperator: 'between'
|
||||
}),
|
||||
// 流程/状态(每项独立分组,对齐收货单 scanWorkflowField 排版)
|
||||
scanWorkflowField({
|
||||
value: 'transaction_type',
|
||||
label: '交易类型',
|
||||
type: 'select',
|
||||
options: Object.entries(transactionTypeConfig).map(([v, c]) => ({ value: v, label: c.text }))
|
||||
}) as LogScanFieldConfig,
|
||||
scanWorkflowField({
|
||||
value: 'inventory_type',
|
||||
label: '库存类型',
|
||||
type: 'select',
|
||||
options: Object.entries(inventoryTypeConfig).map(([v, c]) => ({ value: v, label: c.text }))
|
||||
}) as LogScanFieldConfig,
|
||||
scanWorkflowField({
|
||||
value: 'order_type',
|
||||
label: '订单类型',
|
||||
type: 'select',
|
||||
options: Object.entries(orderTypeConfig).map(([v, c]) => ({ value: v, label: c.text }))
|
||||
}) as LogScanFieldConfig,
|
||||
]
|
||||
|
||||
// 格式化行数据
|
||||
|
||||
@ -1,5 +1,4 @@
|
||||
import type { ToolbarButtonConfig } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { scanWorkflowField } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
/** ScanBox 基础信息分组(对齐收货/待处理订单排版) */
|
||||
export const PRODUCTFLOW_SCAN_BASIC_INFO_GROUP = '基础信息'
|
||||
@ -139,7 +138,7 @@ export const availableFields: ProductflowScanFieldConfig[] = [
|
||||
options: [] as Array<{ label: string; value: unknown }>
|
||||
}),
|
||||
|
||||
// ── 流程状态 ──
|
||||
// ===== 流程状态(合并为一组,对齐波次列表 ScanBox) =====
|
||||
productflowScanWorkflowField({
|
||||
label: '流水类型',
|
||||
value: 'transaction_type',
|
||||
@ -148,7 +147,7 @@ export const availableFields: ProductflowScanFieldConfig[] = [
|
||||
label: cfg.text,
|
||||
value
|
||||
}))
|
||||
}) as ProductflowScanFieldConfig,
|
||||
}),
|
||||
productflowScanWorkflowField({
|
||||
label: '订单类型',
|
||||
value: 'order_type',
|
||||
@ -157,7 +156,7 @@ export const availableFields: ProductflowScanFieldConfig[] = [
|
||||
label,
|
||||
value
|
||||
}))
|
||||
}) as ProductflowScanFieldConfig,
|
||||
}),
|
||||
|
||||
// ── 时间 ──
|
||||
productflowScanTimeField({
|
||||
|
||||
@ -5,9 +5,18 @@ import {
|
||||
/** ScanBox 基础信息分组(对齐待处理订单排版) */
|
||||
export const RECEIVING_SCAN_BASIC_INFO_GROUP = '基础信息'
|
||||
|
||||
/** ScanBox 物流信息分组 */
|
||||
export const RECEIVING_SCAN_LOGISTICS_GROUP = '物流信息'
|
||||
|
||||
/** ScanBox 数量统计分组 */
|
||||
export const RECEIVING_SCAN_STATS_GROUP = '数量统计'
|
||||
|
||||
/** ScanBox 流程状态分组 */
|
||||
export const RECEIVING_SCAN_WORKFLOW_GROUP = '流程状态'
|
||||
|
||||
/** ScanBox 其他分组 */
|
||||
export const RECEIVING_SCAN_OTHER_GROUP = '其他'
|
||||
|
||||
/** ScanBox 时间分组 */
|
||||
export const RECEIVING_SCAN_TIME_GROUP = '时间'
|
||||
|
||||
@ -24,10 +33,22 @@ export function receivingScanBasicField(field: Record<string, any>): ReceivingSc
|
||||
return { ...field, group: RECEIVING_SCAN_BASIC_INFO_GROUP } as ReceivingScanFieldConfig
|
||||
}
|
||||
|
||||
export function receivingScanLogisticsField(field: Record<string, any>): ReceivingScanFieldConfig {
|
||||
return { ...field, group: RECEIVING_SCAN_LOGISTICS_GROUP } as ReceivingScanFieldConfig
|
||||
}
|
||||
|
||||
export function receivingScanStatsField(field: Record<string, any>): ReceivingScanFieldConfig {
|
||||
return { ...field, group: RECEIVING_SCAN_STATS_GROUP } as ReceivingScanFieldConfig
|
||||
}
|
||||
|
||||
export function receivingScanWorkflowField(field: Record<string, any>): ReceivingScanFieldConfig {
|
||||
return { ...field, group: RECEIVING_SCAN_WORKFLOW_GROUP } as ReceivingScanFieldConfig
|
||||
}
|
||||
|
||||
export function receivingScanOtherField(field: Record<string, any>): ReceivingScanFieldConfig {
|
||||
return { ...field, group: RECEIVING_SCAN_OTHER_GROUP } as ReceivingScanFieldConfig
|
||||
}
|
||||
|
||||
export function receivingScanTimeField(field: Record<string, any>): ReceivingScanFieldConfig {
|
||||
return { ...field, group: RECEIVING_SCAN_TIME_GROUP } as ReceivingScanFieldConfig
|
||||
}
|
||||
@ -189,9 +210,9 @@ export const receivingStoreColumns = [
|
||||
]
|
||||
|
||||
|
||||
// receiving配置(基础信息在前,流程状态在后;对齐待处理订单 ScanBox 分组)
|
||||
// receiving配置(对标待处理订单 ScanBox 分组排序)
|
||||
export const availableFields: ReceivingScanFieldConfig[] = [
|
||||
// ── 基础信息 ──
|
||||
// ===== 基础信息 =====
|
||||
receivingScanBasicField({
|
||||
value: 'receiving_number',
|
||||
label: '收货单号',
|
||||
@ -208,96 +229,8 @@ export const availableFields: ReceivingScanFieldConfig[] = [
|
||||
filterable: true,
|
||||
options: []
|
||||
}),
|
||||
receivingScanBasicField({
|
||||
value: 'delivery_method',
|
||||
label: '来货方式',
|
||||
type: 'select',
|
||||
options: Object.entries(deliveryMethodConfig).map(([v, c]: [string, any]) => ({ value: v, label: c.text }))
|
||||
}),
|
||||
receivingScanBasicField({
|
||||
value: 'loading_method',
|
||||
label: '装卸方式',
|
||||
type: 'select',
|
||||
placeholder: '请选择装卸方式',
|
||||
options: Object.entries(loadingMethodConfig).map(([value, config]: [string, any]) => ({
|
||||
value,
|
||||
label: (config as any).text
|
||||
}))
|
||||
}),
|
||||
receivingScanBasicField({
|
||||
value: 'license_plate',
|
||||
label: '车牌号',
|
||||
type: 'text',
|
||||
placeholder: '请输入车牌号',
|
||||
operators: ['eq', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
receivingScanBasicField({
|
||||
value: 'tracking_number',
|
||||
label: '物流单号',
|
||||
type: 'text',
|
||||
placeholder: '请输入物流单号',
|
||||
operators: ['eq', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
receivingScanBasicField({
|
||||
value: 'total_items',
|
||||
label: '商品种类',
|
||||
type: 'number',
|
||||
placeholder: '请输入商品种类数',
|
||||
operators: numberConfig.operators,
|
||||
defaultOperator: numberConfig.defaultOperator
|
||||
}),
|
||||
receivingScanBasicField({
|
||||
value: 'total_quantity',
|
||||
label: '总数量',
|
||||
type: 'number',
|
||||
placeholder: '请输入总数量',
|
||||
operators: numberConfig.operators,
|
||||
defaultOperator: numberConfig.defaultOperator
|
||||
}),
|
||||
receivingScanBasicField({
|
||||
value: 'total_boxes',
|
||||
label: '总箱数',
|
||||
type: 'number',
|
||||
placeholder: '请输入总箱数',
|
||||
operators: numberConfig.operators,
|
||||
defaultOperator: numberConfig.defaultOperator
|
||||
}),
|
||||
receivingScanBasicField({
|
||||
value: 'total_pallets',
|
||||
label: '总托盘数',
|
||||
type: 'number',
|
||||
placeholder: '请输入总托盘数',
|
||||
operators: numberConfig.operators,
|
||||
defaultOperator: numberConfig.defaultOperator
|
||||
}),
|
||||
receivingScanBasicField({
|
||||
value: 'creator_id',
|
||||
label: '创建人',
|
||||
type: 'select',
|
||||
placeholder: '请选择创建人',
|
||||
filterable: true,
|
||||
options: []
|
||||
}),
|
||||
receivingScanBasicField({
|
||||
value: 'remark',
|
||||
label: '备注',
|
||||
type: 'text',
|
||||
placeholder: '请输入备注关键词',
|
||||
operators: ['eq', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
receivingScanBasicField({
|
||||
value: 'video_device_id',
|
||||
label: '录像设备ID',
|
||||
type: 'text',
|
||||
placeholder: '请输入录像设备ID',
|
||||
operators: ['eq', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
|
||||
// ── 流程状态 ──
|
||||
// ===== 流程状态 =====
|
||||
receivingScanWorkflowField({
|
||||
value: 'status',
|
||||
label: '收货状态',
|
||||
@ -332,7 +265,101 @@ export const availableFields: ReceivingScanFieldConfig[] = [
|
||||
]
|
||||
}),
|
||||
|
||||
// ── 时间 ──
|
||||
// ===== 物流信息 =====
|
||||
receivingScanLogisticsField({
|
||||
value: 'delivery_method',
|
||||
label: '来货方式',
|
||||
type: 'select',
|
||||
options: Object.entries(deliveryMethodConfig).map(([v, c]: [string, any]) => ({ value: v, label: c.text }))
|
||||
}),
|
||||
receivingScanLogisticsField({
|
||||
value: 'loading_method',
|
||||
label: '装卸方式',
|
||||
type: 'select',
|
||||
placeholder: '请选择装卸方式',
|
||||
options: Object.entries(loadingMethodConfig).map(([value, config]: [string, any]) => ({
|
||||
value,
|
||||
label: (config as any).text
|
||||
}))
|
||||
}),
|
||||
receivingScanLogisticsField({
|
||||
value: 'license_plate',
|
||||
label: '车牌号',
|
||||
type: 'text',
|
||||
placeholder: '请输入车牌号',
|
||||
operators: ['eq', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
receivingScanLogisticsField({
|
||||
value: 'tracking_number',
|
||||
label: '物流单号',
|
||||
type: 'text',
|
||||
placeholder: '请输入物流单号',
|
||||
operators: ['eq', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
|
||||
// ===== 数量统计 =====
|
||||
receivingScanStatsField({
|
||||
value: 'total_items',
|
||||
label: '商品种类',
|
||||
type: 'number',
|
||||
placeholder: '请输入商品种类数',
|
||||
operators: numberConfig.operators,
|
||||
defaultOperator: numberConfig.defaultOperator
|
||||
}),
|
||||
receivingScanStatsField({
|
||||
value: 'total_quantity',
|
||||
label: '总数量',
|
||||
type: 'number',
|
||||
placeholder: '请输入总数量',
|
||||
operators: numberConfig.operators,
|
||||
defaultOperator: numberConfig.defaultOperator
|
||||
}),
|
||||
receivingScanStatsField({
|
||||
value: 'total_boxes',
|
||||
label: '总箱数',
|
||||
type: 'number',
|
||||
placeholder: '请输入总箱数',
|
||||
operators: numberConfig.operators,
|
||||
defaultOperator: numberConfig.defaultOperator
|
||||
}),
|
||||
receivingScanStatsField({
|
||||
value: 'total_pallets',
|
||||
label: '总托盘数',
|
||||
type: 'number',
|
||||
placeholder: '请输入总托盘数',
|
||||
operators: numberConfig.operators,
|
||||
defaultOperator: numberConfig.defaultOperator
|
||||
}),
|
||||
|
||||
// ===== 其他 =====
|
||||
receivingScanOtherField({
|
||||
value: 'creator_id',
|
||||
label: '创建人',
|
||||
type: 'select',
|
||||
placeholder: '请选择创建人',
|
||||
filterable: true,
|
||||
options: []
|
||||
}),
|
||||
receivingScanOtherField({
|
||||
value: 'remark',
|
||||
label: '备注',
|
||||
type: 'text',
|
||||
placeholder: '请输入备注关键词',
|
||||
operators: ['eq', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
receivingScanOtherField({
|
||||
value: 'video_device_id',
|
||||
label: '录像设备ID',
|
||||
type: 'text',
|
||||
placeholder: '请输入录像设备ID',
|
||||
operators: ['eq', 'contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
|
||||
// ===== 时间 =====
|
||||
receivingScanTimeField({
|
||||
value: 'created_at',
|
||||
label: '创建时间',
|
||||
|
||||
@ -1,8 +1,15 @@
|
||||
import { scanWorkflowField } from '@/views/order/orderManagement/config/order-common-config'
|
||||
|
||||
/** ScanBox 基础信息分组(对齐收货单排版) */
|
||||
export const STOCKOUT_SCAN_BASIC_INFO_GROUP = '基础信息'
|
||||
|
||||
/** ScanBox 流程状态分组 */
|
||||
export const STOCKOUT_SCAN_WORKFLOW_GROUP = '流程状态'
|
||||
|
||||
/** ScanBox 收货信息分组 */
|
||||
export const STOCKOUT_SCAN_RECEIVING_GROUP = '收货信息'
|
||||
|
||||
/** ScanBox 时间分组 */
|
||||
export const STOCKOUT_SCAN_TIME_GROUP = '时间'
|
||||
|
||||
/** 为出库 ScanBox 基础信息字段附加分组标签 */
|
||||
export type StockoutScanFieldConfig = Record<string, any> & {
|
||||
group: string
|
||||
@ -16,6 +23,18 @@ export function stockoutScanBasicField(field: Record<string, any>): StockoutScan
|
||||
return { ...field, group: STOCKOUT_SCAN_BASIC_INFO_GROUP } as StockoutScanFieldConfig
|
||||
}
|
||||
|
||||
export function stockoutScanWorkflowField(field: Record<string, any>): StockoutScanFieldConfig {
|
||||
return { ...field, group: STOCKOUT_SCAN_WORKFLOW_GROUP } as StockoutScanFieldConfig
|
||||
}
|
||||
|
||||
export function stockoutScanReceivingField(field: Record<string, any>): StockoutScanFieldConfig {
|
||||
return { ...field, group: STOCKOUT_SCAN_RECEIVING_GROUP } as StockoutScanFieldConfig
|
||||
}
|
||||
|
||||
export function stockoutScanTimeField(field: Record<string, any>): StockoutScanFieldConfig {
|
||||
return { ...field, group: STOCKOUT_SCAN_TIME_GROUP } as StockoutScanFieldConfig
|
||||
}
|
||||
|
||||
/** ScanBox 默认 props(与波次模块 scan-box 侧栏一致) */
|
||||
export const stockoutScanBoxConfig = {
|
||||
width: '250px',
|
||||
@ -76,6 +95,7 @@ export const entryColums = [
|
||||
]
|
||||
|
||||
export const availableFields: StockoutScanFieldConfig[] = [
|
||||
// ===== 基础信息 =====
|
||||
stockoutScanBasicField({ value: 'delivery_order_code', label: '出库单号', type: 'text' }),
|
||||
stockoutScanBasicField({
|
||||
value: 'order_type',
|
||||
@ -96,19 +116,9 @@ export const availableFields: StockoutScanFieldConfig[] = [
|
||||
filterable: true,
|
||||
options: []
|
||||
}),
|
||||
stockoutScanBasicField({ value: 'buyer_nick', label: '买家', type: 'text' }),
|
||||
stockoutScanBasicField({ value: 'mobile', label: '联系电话', type: 'text' }),
|
||||
stockoutScanBasicField({ value: 'logistics_code', label: '物流公司', type: 'text' }),
|
||||
stockoutScanBasicField({ value: 'express_code', label: '运单号', type: 'text' }),
|
||||
stockoutScanBasicField({
|
||||
value: 'place_order_time',
|
||||
label: '下单时间',
|
||||
type: 'daterange',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间'
|
||||
}),
|
||||
// 流程/状态(每项独立分组,对齐收货单 scanWorkflowField 排版)
|
||||
scanWorkflowField({
|
||||
|
||||
// ===== 流程状态(合并为一组,对齐波次列表 ScanBox) =====
|
||||
stockoutScanWorkflowField({
|
||||
value: 'status',
|
||||
label: '出库状态',
|
||||
type: 'select',
|
||||
@ -118,8 +128,8 @@ export const availableFields: StockoutScanFieldConfig[] = [
|
||||
{ value: 'completed', label: '已完成' },
|
||||
{ value: 'cancelled', label: '已作废' }
|
||||
]
|
||||
}) as StockoutScanFieldConfig,
|
||||
scanWorkflowField({
|
||||
}),
|
||||
stockoutScanWorkflowField({
|
||||
value: 'sync_status',
|
||||
label: '同步状态',
|
||||
type: 'select',
|
||||
@ -128,7 +138,22 @@ export const availableFields: StockoutScanFieldConfig[] = [
|
||||
{ value: 'success', label: '同步成功' },
|
||||
{ value: 'failed', label: '同步失败' }
|
||||
]
|
||||
}) as StockoutScanFieldConfig,
|
||||
}),
|
||||
|
||||
// ===== 收货信息 =====
|
||||
stockoutScanReceivingField({ value: 'buyer_nick', label: '买家', type: 'text' }),
|
||||
stockoutScanReceivingField({ value: 'mobile', label: '联系电话', type: 'text' }),
|
||||
stockoutScanReceivingField({ value: 'logistics_code', label: '物流公司', type: 'text' }),
|
||||
stockoutScanReceivingField({ value: 'express_code', label: '运单号', type: 'text' }),
|
||||
|
||||
// ===== 时间 =====
|
||||
stockoutScanTimeField({
|
||||
value: 'place_order_time',
|
||||
label: '下单时间',
|
||||
type: 'daterange',
|
||||
startPlaceholder: '开始时间',
|
||||
endPlaceholder: '结束时间'
|
||||
}),
|
||||
]
|
||||
|
||||
// 详情面板表单配置
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
title="货主筛选"
|
||||
:preset-tree="presetTree"
|
||||
:available-fields="availableFields"
|
||||
:initial-conditions="{ warehouse_use_status: 1 }"
|
||||
:initial-conditions="{ use_status: 1 }"
|
||||
@condition-change="handleConditionChange"
|
||||
@reset="handleReset"
|
||||
/>
|
||||
@ -78,9 +78,9 @@
|
||||
<el-tag v-if="row.needs_my_confirm" size="small" type="warning" effect="dark">待我确认</el-tag>
|
||||
<span v-else class="text-muted">—</span>
|
||||
</template>
|
||||
<template #column-warehouse_use_status="{ row }">
|
||||
<el-tag size="small" :type="row.warehouse_use_status === 1 ? 'success' : 'info'" effect="light">
|
||||
{{ row.warehouse_use_status === 1 ? '启用' : '禁用' }}
|
||||
<template #column-use_status="{ row }">
|
||||
<el-tag size="small" :type="row.use_status === 1 ? 'success' : 'info'" effect="light">
|
||||
{{ row.use_status === 1 ? '启用' : '禁用' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
<template #column-is_auth_valid="{ row }">
|
||||
@ -108,9 +108,6 @@
|
||||
{{ row.has_qimen_config ? '已配置' : '未配置' }}
|
||||
</el-tag>
|
||||
</template>
|
||||
<template #column-apply_time="{ row }">
|
||||
{{ formatDate(row.apply_time) }}
|
||||
</template>
|
||||
<template #column-actions="{ row }">
|
||||
<el-button
|
||||
v-if="row.needs_my_confirm"
|
||||
@ -132,7 +129,7 @@
|
||||
@click.stop="openAdjustBalanceDialog(row)"
|
||||
>调整余额</el-button>
|
||||
<el-button
|
||||
v-if="row.warehouse_use_status === 1"
|
||||
v-if="row.use_status === 1"
|
||||
size="small"
|
||||
type="danger"
|
||||
link
|
||||
@ -1198,7 +1195,7 @@ const columns = ref(defaultColumns)
|
||||
const availableFields = reactive(defaultAvailableFields)
|
||||
const presetTree = ref<any[]>(defaultPresetTree)
|
||||
|
||||
const currentCondition = ref<any>({ warehouse_use_status: 1 })
|
||||
const currentCondition = ref<any>({ use_status: 1 })
|
||||
|
||||
async function loadList() {
|
||||
loading.value = true
|
||||
|
||||
@ -176,10 +176,9 @@ export const columns = [
|
||||
{ prop: 'counterparty_name', label: '货主', minWidth: 120 },
|
||||
{ prop: 'auth_status', label: '签约状态', width: 100 },
|
||||
{ prop: 'needs_my_confirm', label: '待确认', width: 90 },
|
||||
{ prop: 'warehouse_use_status', label: '使用状态', width: 90 },
|
||||
{ prop: 'use_status', label: '使用状态', width: 90 },
|
||||
{ prop: 'print_quantity', label: '面单余额', width: 100 },
|
||||
{ prop: 'has_qimen_config', label: '奇门配置', width: 100 },
|
||||
{ prop: 'apply_time', label: '申请时间', width: 160 },
|
||||
{ prop: 'actions', label: '操作', width: 460, fixed: 'right' }
|
||||
]
|
||||
|
||||
@ -198,7 +197,7 @@ export const availableFields = [
|
||||
},
|
||||
{
|
||||
label: '使用状态',
|
||||
value: 'warehouse_use_status',
|
||||
value: 'use_status',
|
||||
type: 'select',
|
||||
options: [
|
||||
{ label: '全部', value: undefined },
|
||||
|
||||
@ -51,6 +51,26 @@
|
||||
:active-value="true"
|
||||
:inactive-value="false"
|
||||
/>
|
||||
<div v-else-if="field.type === 'string_array'" class="string-array-editor">
|
||||
<div v-if="getStringArrayFieldItems(field.key).length" class="tag-list">
|
||||
<el-tag
|
||||
v-for="(item, idx) in getStringArrayFieldItems(field.key)"
|
||||
:key="`${field.key}-${idx}`"
|
||||
closable
|
||||
size="small"
|
||||
@close="removeStringArrayFieldItem(field.key, idx)"
|
||||
>{{ item }}</el-tag>
|
||||
</div>
|
||||
<div class="tag-input-row">
|
||||
<el-input
|
||||
v-model="stringArrayInputs[field.key]"
|
||||
:placeholder="`输入关键字,回车添加`"
|
||||
maxlength="100"
|
||||
@keyup.enter="addStringArrayFieldItem(field.key)"
|
||||
/>
|
||||
<el-button size="small" :disabled="!stringArrayInputs[field.key]?.trim()" @click="addStringArrayFieldItem(field.key)">添加</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="field.type === 'array'" class="array-editor">
|
||||
<div v-if="field.itemFields && field.itemFields.length" class="array-table">
|
||||
<div class="array-table__head">
|
||||
@ -281,7 +301,7 @@ const PREDEFINED_COLORS = ['#ff4d4f', '#ff7a45', '#faad14', '#fadb14', '#95de64'
|
||||
type NormalizedField = {
|
||||
key: string
|
||||
label: string
|
||||
type: 'number' | 'string' | 'boolean' | 'select' | 'array' | 'color' | 'object'
|
||||
type: 'number' | 'string' | 'boolean' | 'select' | 'array' | 'string_array' | 'color' | 'object'
|
||||
description?: string
|
||||
required?: boolean
|
||||
min?: number
|
||||
@ -289,6 +309,7 @@ type NormalizedField = {
|
||||
step?: number
|
||||
precision?: number
|
||||
maxLength?: number
|
||||
default?: unknown
|
||||
defaultValue?: unknown
|
||||
itemFields?: NormalizedField[]
|
||||
options?: { label: string; value: string | number | boolean }[]
|
||||
@ -379,6 +400,14 @@ const FALLBACK_FIELDS: NormalizedField[] = [
|
||||
description: 'pick_status=fin,默认开启'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
key: 'auto_allocate_express_exclude_remarks',
|
||||
label: '自动分配快递排除备注',
|
||||
type: 'string_array',
|
||||
default: [],
|
||||
required: false,
|
||||
description: '订单备注命中任一关键字时,跳过自动分配快递,默认 [](不排除任何订单)'
|
||||
}
|
||||
]
|
||||
|
||||
@ -428,7 +457,8 @@ function normalizeFieldMetaItem(raw: Record<string, unknown>): NormalizedField |
|
||||
} else if (rawType.includes('color')) {
|
||||
type = 'color'
|
||||
} else if (rawType.includes('array')) {
|
||||
type = 'array'
|
||||
// string_array 是纯字符串数组(无子字段 item_keys),与 object array 区分
|
||||
type = rawType === 'string_array' ? 'string_array' : 'array'
|
||||
} else if (rawType.includes('object')) {
|
||||
type = 'object'
|
||||
} else if (rawType === 'select' || rawType === 'enum' || options.length > 0) {
|
||||
@ -538,7 +568,7 @@ function ensureFieldDefaults(target: Record<string, unknown>, fields: Normalized
|
||||
if (f.defaultValue !== undefined) {
|
||||
target[f.key] = cloneValue(f.defaultValue)
|
||||
} else if (f.type === 'boolean') target[f.key] = false
|
||||
else if (f.type === 'array') target[f.key] = []
|
||||
else if (f.type === 'array' || f.type === 'string_array') target[f.key] = []
|
||||
else if (f.type === 'object') target[f.key] = f.defaultValue !== undefined ? cloneValue(f.defaultValue) : {}
|
||||
else if (f.type === 'number') {
|
||||
/* 不写入 key,便于 el-input-number 展示为空 */
|
||||
@ -608,6 +638,33 @@ function removeArrayFieldItem(key: string, index: number) {
|
||||
subjectConfig[key] = list
|
||||
}
|
||||
|
||||
// ---- string_array 类型辅助函数 ----
|
||||
function getStringArrayFieldItems(key: string): string[] {
|
||||
const current = subjectConfig[key]
|
||||
if (Array.isArray(current)) {
|
||||
return current.filter((v): v is string => typeof v === 'string' && v.trim() !== '')
|
||||
}
|
||||
subjectConfig[key] = []
|
||||
return []
|
||||
}
|
||||
|
||||
function addStringArrayFieldItem(key: string) {
|
||||
const input = (stringArrayInputs[key] || '').trim()
|
||||
if (!input) return
|
||||
const list = [...getStringArrayFieldItems(key)]
|
||||
if (!list.includes(input)) {
|
||||
list.push(input)
|
||||
subjectConfig[key] = list
|
||||
}
|
||||
stringArrayInputs[key] = ''
|
||||
}
|
||||
|
||||
function removeStringArrayFieldItem(key: string, index: number) {
|
||||
const list = [...getStringArrayFieldItems(key)]
|
||||
list.splice(index, 1)
|
||||
subjectConfig[key] = list
|
||||
}
|
||||
|
||||
function buildArrayObjectDefault(itemFields: NormalizedField[]): Record<string, unknown> {
|
||||
const out: Record<string, unknown> = {}
|
||||
for (const f of itemFields) {
|
||||
@ -687,6 +744,9 @@ const cacheWarehouseId = ref<number | undefined>(undefined)
|
||||
|
||||
const jsonText = ref('{}')
|
||||
|
||||
/** string_array 类型字段的临时输入缓存 */
|
||||
const stringArrayInputs = reactive<Record<string, string>>({})
|
||||
|
||||
const displayFields = computed(() =>
|
||||
useMetaForm.value && normalizedFields.value.length ? normalizedFields.value : FALLBACK_FIELDS
|
||||
)
|
||||
@ -980,6 +1040,24 @@ loadAll()
|
||||
}
|
||||
}
|
||||
|
||||
.string-array-editor {
|
||||
width: 100%;
|
||||
max-width: 560px;
|
||||
|
||||
.tag-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.tag-input-row {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
.field-control {
|
||||
width: 100%;
|
||||
max-width: 420px;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user