1
This commit is contained in:
parent
abe6d3f668
commit
3b35ce2d8b
BIN
dist.tar.gz
BIN
dist.tar.gz
Binary file not shown.
@ -7,6 +7,8 @@ export type StockReportListItem = {
|
||||
end_time?: string | null
|
||||
stock_id: number
|
||||
store_id: number
|
||||
warehouse_id?: number
|
||||
warehouse_name?: string
|
||||
begin_total: number
|
||||
end_total: number
|
||||
inbound_total: number
|
||||
|
||||
@ -489,25 +489,25 @@
|
||||
:value="op.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-input-number
|
||||
<el-input
|
||||
v-if="!isNullishOperator(customConditions[field.value].operator)"
|
||||
v-model="customConditions[field.value].value"
|
||||
:model-value="customConditions[field.value].value"
|
||||
@update:model-value="(v: string) => handleCompactNumberInput(field, v)"
|
||||
:placeholder="field.label"
|
||||
:controls="false"
|
||||
size="small"
|
||||
clearable
|
||||
class="compact-value-input"
|
||||
@change="handleCompactChange"
|
||||
/>
|
||||
<span v-else class="no-value-tip">无需填值</span>
|
||||
</div>
|
||||
<el-input-number
|
||||
<el-input
|
||||
v-else
|
||||
v-model="customConditions[field.value].value"
|
||||
:model-value="customConditions[field.value].value"
|
||||
@update:model-value="(v: string) => handleCompactNumberInput(field, v)"
|
||||
:placeholder="field.label"
|
||||
:controls="false"
|
||||
size="small"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
@change="handleCompactChange"
|
||||
/>
|
||||
</div>
|
||||
<!-- 日期/日期时间范围 -->
|
||||
@ -737,6 +737,12 @@ function toggleMode() {
|
||||
settingsStore.changeSetting({ key: 'scanBoxMode', value: isCompact.value ? 'standard' : 'compact' })
|
||||
}
|
||||
|
||||
// 紧凑模式数字输入:将 el-input 的字符串转为 number,保持与 el-input-number 一致的语义
|
||||
function handleCompactNumberInput(field: any, v: string) {
|
||||
customConditions[field.value].value = v === '' || v === undefined ? undefined : Number(v)
|
||||
handleCompactChange()
|
||||
}
|
||||
|
||||
// 紧凑模式下字段变更时自动设置默认操作符
|
||||
function handleCompactChange() {
|
||||
// 为有值的字段设置默认操作符
|
||||
@ -1976,6 +1982,10 @@ defineExpose({ getConditions, reset, clear, getFieldDraft, setFieldCondition, su
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.compact-value-input :deep(.el-input__inner) {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
/* 紧凑模式下底部操作栏与字段区域保持一致的左右间距 */
|
||||
.scan-box--compact .fixed-bottom-actions {
|
||||
padding: 10px 12px;
|
||||
|
||||
@ -345,6 +345,9 @@ import { Box } from '@element-plus/icons-vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import type { UploadFile } from 'element-plus'
|
||||
import { useUserStore } from '@/stores/modules/user'
|
||||
import { useSettingsStore } from '@/stores/modules/settings'
|
||||
import { useShortcutsStore } from '@/stores/modules/shortcuts'
|
||||
import defaultSettings from '@/settings'
|
||||
import QrcodeDialog from '@/components/QR/qrcode.vue'
|
||||
|
||||
defineOptions({
|
||||
@ -1452,7 +1455,7 @@ function handleImportColumnConfig(file: UploadFile) {
|
||||
async function handleRepairColumnConfig() {
|
||||
try {
|
||||
await ElMessageBox.confirm(
|
||||
'故障修复会清除当前电脑中此账号的全部字段配置,并恢复各页面默认字段。是否继续?',
|
||||
'故障修复会清除当前电脑中此账号的全部字段配置、显示设置及快捷键,并恢复所有默认配置。是否继续?',
|
||||
'确认故障修复',
|
||||
{
|
||||
type: 'warning',
|
||||
@ -1462,7 +1465,7 @@ async function handleRepairColumnConfig() {
|
||||
)
|
||||
|
||||
await ElMessageBox.confirm(
|
||||
'请再次确认:该操作不可撤销,确定清除所有字段配置吗?',
|
||||
'请再次确认:该操作不可撤销,确定清除所有配置吗?',
|
||||
'二次确认',
|
||||
{
|
||||
type: 'warning',
|
||||
@ -1471,17 +1474,56 @@ async function handleRepairColumnConfig() {
|
||||
}
|
||||
)
|
||||
|
||||
const prefix = globalColumnConfigStoragePrefix.value
|
||||
// 1. 清除字段配置(表格列配置)
|
||||
const columnPrefix = globalColumnConfigStoragePrefix.value
|
||||
const removeKeys: string[] = []
|
||||
Object.keys(localStorage).forEach((key) => {
|
||||
if (key.startsWith(prefix)) {
|
||||
if (key.startsWith(columnPrefix)) {
|
||||
removeKeys.push(key)
|
||||
}
|
||||
})
|
||||
removeKeys.forEach((key) => localStorage.removeItem(key))
|
||||
const columnCount = removeKeys.length
|
||||
|
||||
// 2. 清除并重置显示设置(toolbarMode、scanBoxMode 等)
|
||||
const settingsStore = useSettingsStore()
|
||||
const settingsKey = (() => {
|
||||
const userStore = useUserStore()
|
||||
const userId = userStore.user?.username || userStore.user?.id || 'unknown'
|
||||
const roleId = userStore.roleId || 'default'
|
||||
return `settings_${userId}_${roleId}`
|
||||
})()
|
||||
const hadSettings = localStorage.getItem(settingsKey) !== null
|
||||
localStorage.removeItem(settingsKey)
|
||||
// 将各项设置重置为默认值
|
||||
settingsStore.changeSetting({ key: 'showSettings', value: defaultSettings.showSettings })
|
||||
settingsStore.changeSetting({ key: 'tagsView', value: defaultSettings.tagsView })
|
||||
settingsStore.changeSetting({ key: 'fixedHeader', value: defaultSettings.fixedHeader })
|
||||
settingsStore.changeSetting({ key: 'sidebarLogo', value: defaultSettings.sidebarLogo })
|
||||
settingsStore.changeSetting({ key: 'layoutMode', value: 'top-bottom' })
|
||||
settingsStore.changeSetting({ key: 'shortcutExpanded', value: defaultSettings.shortcutExpanded })
|
||||
settingsStore.changeSetting({ key: 'toolbarMode', value: defaultSettings.toolbarMode })
|
||||
settingsStore.changeSetting({ key: 'scanBoxMode', value: defaultSettings.scanBoxMode })
|
||||
|
||||
// 3. 清除并重置快捷键
|
||||
const shortcutsStore = useShortcutsStore()
|
||||
const shortcutsKey = (() => {
|
||||
const userStore = useUserStore()
|
||||
const userId = userStore.user?.username || userStore.user?.id || 'unknown'
|
||||
const roleId = userStore.roleId || 'default'
|
||||
return `shortcuts_${userId}_${roleId}`
|
||||
})()
|
||||
const hadShortcuts = localStorage.getItem(shortcutsKey) !== null
|
||||
localStorage.removeItem(shortcutsKey)
|
||||
shortcutsStore.shortcuts = []
|
||||
|
||||
rebuildColumnConfig()
|
||||
ElMessage.success(`故障修复完成,已清除 ${removeKeys.length} 个字段配置`)
|
||||
|
||||
const parts: string[] = []
|
||||
if (columnCount > 0) parts.push(`${columnCount} 个字段配置`)
|
||||
if (hadSettings) parts.push('显示设置')
|
||||
if (hadShortcuts) parts.push('快捷键')
|
||||
ElMessage.success(`故障修复完成${parts.length > 0 ? ',已恢复 ' + parts.join('、') : ''}`)
|
||||
} catch {
|
||||
// user cancelled
|
||||
}
|
||||
|
||||
@ -226,6 +226,7 @@ onUnmounted(() => {
|
||||
<style lang="scss" scoped>
|
||||
.navbar {
|
||||
height: 45px;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
background-color: #0C90FF;
|
||||
//box-shadow: 0 1px 4px rgba(0, 21, 41, .08);
|
||||
|
||||
@ -35,7 +35,7 @@ export default {
|
||||
* @type {'tile' | 'collapse'}
|
||||
* @description Toolbar button display mode: tile (平铺) or collapse (折叠)
|
||||
*/
|
||||
toolbarMode: 'collapse',
|
||||
toolbarMode: 'tile',
|
||||
|
||||
/**
|
||||
* @type {'standard' | 'compact'}
|
||||
|
||||
@ -15,7 +15,7 @@ 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 as 'tile' | 'collapse') || 'collapse')
|
||||
const toolbarModeRef = ref<'tile' | 'collapse'>((defaultToolbarMode as 'tile' | 'collapse') || 'tile')
|
||||
const scanBoxModeRef = ref<'standard' | 'compact'>((defaultScanBoxMode as 'standard' | 'compact') || 'standard')
|
||||
|
||||
const storageKey = computed(() => {
|
||||
@ -75,7 +75,7 @@ export const useSettingsStore = defineStore('settings', () => {
|
||||
sidebarLogoRef.value = sidebarLogo
|
||||
layoutMode.value = 'top-bottom'
|
||||
shortcutExpandedRef.value = shortcutExpanded
|
||||
toolbarModeRef.value = (defaultToolbarMode as 'tile' | 'collapse') || 'collapse'
|
||||
toolbarModeRef.value = (defaultToolbarMode as 'tile' | 'collapse') || 'tile'
|
||||
scanBoxModeRef.value = (defaultScanBoxMode as 'standard' | 'compact') || 'standard'
|
||||
}
|
||||
}, { immediate: true })
|
||||
|
||||
@ -24,13 +24,24 @@
|
||||
@action="handleToolbarButtonClick"
|
||||
/>
|
||||
</div>
|
||||
<div class="toolbar-right">
|
||||
<el-radio-group
|
||||
v-model="viewMode"
|
||||
class="view-mode-toggle"
|
||||
size="small"
|
||||
@change="onViewModeChange"
|
||||
>
|
||||
<el-radio-button label="work">售后工作列表</el-radio-button>
|
||||
<el-radio-button label="audit">售后审计列表</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="split-stack">
|
||||
<div class="upper-wrapper">
|
||||
<upper-table
|
||||
ref="upperTable"
|
||||
title="售后列表"
|
||||
:title="viewMode === 'work' ? '售后列表' : '售后审计列表'"
|
||||
default-align="center"
|
||||
table-id="afterSale-list"
|
||||
:data="tableData"
|
||||
@ -101,7 +112,7 @@
|
||||
</template>
|
||||
|
||||
<template #empty>
|
||||
<div class="empty-tip">暂无售后单</div>
|
||||
<div class="empty-tip">{{ viewMode === 'work' ? '暂无售后单' : '暂无售后审计记录' }}</div>
|
||||
</template>
|
||||
</upper-table>
|
||||
</div>
|
||||
@ -193,11 +204,14 @@
|
||||
<!-- 导出进度弹窗 -->
|
||||
<AsyncExportProgressDialog
|
||||
v-model:visible="exportDialogVisible"
|
||||
:task-progress="exportTaskProgress"
|
||||
:loading="exportLoading"
|
||||
:progress-percent="exportProgressPercent"
|
||||
:progress-status="exportProgressStatus"
|
||||
:status-label="exportStatusLabel"
|
||||
@cancel="handleCancelExport"
|
||||
:task-id="exportTaskProgress.taskId"
|
||||
:message="exportTaskProgress.message"
|
||||
:error="exportTaskProgress.error"
|
||||
:update-time="exportTaskProgress.updateTime"
|
||||
/>
|
||||
|
||||
<!-- 跳转路由(用于查看详情) -->
|
||||
@ -210,6 +224,7 @@ import { useRouter } from 'vue-router'
|
||||
import { ElMessage, type FormInstance, type FormRules } from 'element-plus'
|
||||
import {
|
||||
afterSaleWorkList,
|
||||
afterSaleAuditList,
|
||||
afterSaleCreate,
|
||||
afterSaleUpdate,
|
||||
afterSaleTransfer,
|
||||
@ -339,6 +354,7 @@ function handleToolbarButtonClick(action: string) {
|
||||
|
||||
// ==================== 数据状态 ====================
|
||||
|
||||
const viewMode = ref<'work' | 'audit'>('work')
|
||||
const scanBox = ref<any>(null)
|
||||
const upperTable = ref<any>(null)
|
||||
const loading = ref(false)
|
||||
@ -371,10 +387,6 @@ function handleExport() {
|
||||
submitExportTask({ where, sort: {} })
|
||||
}
|
||||
|
||||
function handleCancelExport() {
|
||||
exportDialogVisible.value = false
|
||||
}
|
||||
|
||||
// ==================== ScanBox 事件 ====================
|
||||
|
||||
function handleConditionChange(conditions: Record<string, any>) {
|
||||
@ -429,7 +441,9 @@ async function fetchData() {
|
||||
pagination: { page: pagination.currentPage, pageSize: pagination.pageSize },
|
||||
where,
|
||||
}
|
||||
const res: any = await afterSaleWorkList(params)
|
||||
const res: any = viewMode.value === 'audit'
|
||||
? await afterSaleAuditList(params)
|
||||
: await afterSaleWorkList(params)
|
||||
if (res && (res.code === 1 || res.code === 200 || res.code === 20000 || res.flag === 'success')) {
|
||||
const data = res.data ?? res
|
||||
tableData.value = data.list ?? []
|
||||
@ -458,6 +472,13 @@ function handleRefresh() {
|
||||
fetchData()
|
||||
}
|
||||
|
||||
function onViewModeChange() {
|
||||
selectedRow.value = null
|
||||
pagination.currentPage = 1
|
||||
upperPagination.currentPage = 1
|
||||
fetchData()
|
||||
}
|
||||
|
||||
function handleSortChange(_sort: { prop: string; order: string }) {
|
||||
// 预留排序事件处理
|
||||
}
|
||||
@ -554,7 +575,7 @@ async function handleSubmitForm() {
|
||||
title: formData.title,
|
||||
description: formData.description || undefined,
|
||||
priority: formData.priority,
|
||||
waybill_no: formData.waybill_no || undefined,
|
||||
waybill_id: formData.waybill_no ? Number(formData.waybill_no) : undefined,
|
||||
order_delivery_no: formData.order_delivery_no || undefined,
|
||||
entry_order_no: formData.entry_order_no || undefined,
|
||||
order_stockout_no: formData.order_stockout_no || undefined,
|
||||
@ -568,7 +589,7 @@ async function handleSubmitForm() {
|
||||
title: formData.title,
|
||||
description: formData.description || undefined,
|
||||
priority: formData.priority,
|
||||
waybill_no: formData.waybill_no || undefined,
|
||||
waybill_id: formData.waybill_no ? Number(formData.waybill_no) : undefined,
|
||||
order_delivery_no: formData.order_delivery_no || undefined,
|
||||
entry_order_no: formData.entry_order_no || undefined,
|
||||
order_stockout_no: formData.order_stockout_no || undefined,
|
||||
@ -661,56 +682,24 @@ onUnmounted(() => {
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.order-sub-container {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.toolbar-left {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.split-stack {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.upper-wrapper {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
<style scoped lang="scss">
|
||||
@use "../../order/orderManagement/styles/order-sub.scss";
|
||||
|
||||
.wave-operation-actions {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.empty-tip {
|
||||
padding: 40px 0;
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
font-size: 13px;
|
||||
color: #909399;
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.view-mode-toggle {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -58,9 +58,9 @@
|
||||
{ prop: 'store_remask', label: '货主', width: '80' },
|
||||
{ prop: 'logistics_name', label: '物流', width: '70' },
|
||||
{ prop: 'logistics_interface_name', label: '物流接口', minWidth: '110' },
|
||||
{ prop: 'is_back', label: '退回', width: '60', align: 'center', formatter: (_r: any, _c: any, v: any) => v === 'Y' ? '<span style=background:#fef0f0;color:#f56c6c;padding:0 6px;border-radius:3px;font-size:12px>退回</span>' : '<span style=color:#c0c4cc>否</span>' },
|
||||
{ prop: 'is_intercept', label: '拦截', width: '60', align: 'center', formatter: (_r: any, _c: any, v: any) => v === 'Y' ? '<span style=background:#fdf6ec;color:#e6a23c;padding:0 6px;border-radius:3px;font-size:12px>拦截</span>' : '<span style=color:#c0c4cc>否</span>' },
|
||||
{ prop: 'is_galaxy_receive', label: '揽收', width: '60', align: 'center', formatter: (_r: any, _c: any, v: any) => v === 'Y' ? '<span style=background:#f0f9eb;color:#67c23a;padding:0 6px;border-radius:3px;font-size:12px>揽收</span>' : '<span style=color:#c0c4cc>否</span>' },
|
||||
{ prop: 'is_back', label: '退回', width: '60', align: 'center', formatter: (_r: any, v: any) => v === 'Y' ? '<span style=background:#fef0f0;color:#f56c6c;padding:0 6px;border-radius:3px;font-size:12px>退回</span>' : '<span style=color:#c0c4cc>否</span>' },
|
||||
{ prop: 'is_intercept', label: '拦截', width: '60', align: 'center', formatter: (_r: any, v: any) => v === 'Y' ? '<span style=background:#fdf6ec;color:#e6a23c;padding:0 6px;border-radius:3px;font-size:12px>拦截</span>' : '<span style=color:#c0c4cc>否</span>' },
|
||||
{ prop: 'is_galaxy_receive', label: '揽收', width: '60', align: 'center', formatter: (_r: any, v: any) => v === 'Y' ? '<span style=background:#f0f9eb;color:#67c23a;padding:0 6px;border-radius:3px;font-size:12px>揽收</span>' : '<span style=color:#c0c4cc>否</span>' },
|
||||
]"
|
||||
:fetch-fn="orderSearchFetchFn"
|
||||
:extract-list="(res: any) => res?.data?.list ?? res?.list ?? []"
|
||||
@ -156,7 +156,7 @@ import { afterSaleCreate, type AfterSaleCreateParams } from '@/api/afterSale/ind
|
||||
import { AFTER_SALE_TYPE_MAP } from '@/views/afterSale/list/afterSale-config'
|
||||
import { loadStores } from '@/api/index/index'
|
||||
import { extractStoreListFromResponse, mapStoreListToSelectOptions } from '@/views/order/orderManagement/config/order-common-config'
|
||||
import { orderDeliveryOrderQuickSearch } from '@/api/order.deliveryOrder/orderdeliveryOrder'
|
||||
import { orderDeliveryOrderQuickSearch } from '@/api/order.deliveryorder/orderdeliveryOrder'
|
||||
import { getEntryList } from '@/api/storage.entry/entry'
|
||||
import { stockoutList } from '@/api/storage.stockout/stockout'
|
||||
import { getReceivingList } from '@/api/storage_receiving/receiving'
|
||||
|
||||
@ -69,6 +69,7 @@ export interface DocSearchPickerColumn {
|
||||
label: string
|
||||
width?: string
|
||||
minWidth?: string
|
||||
align?: string
|
||||
formatter?: (row: any, value: any) => string
|
||||
}
|
||||
|
||||
|
||||
@ -1230,7 +1230,7 @@ export const placeOrderTimeRangeScanField = scanBasicField({ label: '下单时
|
||||
export const isUrgencyScanField = scanBasicField({ label: '是否紧急', value: 'is_urgency', type: 'select', options: isUrgencyFilterOptions })
|
||||
export const buyerMessageHasScanField = scanBasicField({ label: '有无留言', value: 'buyer_message_has', type: 'select', options: buyerMessageHasFilterOptions })
|
||||
export const buyerMessageScanField = scanBasicField({ label: '留言', value: 'buyer_message', type: 'text', defaultOperator: 'like' })
|
||||
export const stockQueryScanField = scanBasicField({ label: '包含商品', value: 'stock_query', type: 'text', operators: ['like'], defaultOperator: 'like' })
|
||||
export const stockQueryScanField = scanBasicField({ label: '包含商品', value: 'stock_query', type: 'text', operators: ORDER_BULK_SEARCH_OPERATORS, defaultOperator: 'like' })
|
||||
|
||||
/** 可复用 ScanBox 字段片段(工作流程) */
|
||||
export const orderStatusScanField = (options: Array<{ label: string; value: string }>) =>
|
||||
|
||||
@ -82,21 +82,27 @@
|
||||
</template>
|
||||
|
||||
<template #column-wave_no="{ row }">
|
||||
<span>{{ getPickTaskWaveNos(row).join(', ') || '—' }}</span>
|
||||
</template>
|
||||
|
||||
<template #column-batch_no="{ row }">
|
||||
<span>{{ row.batch_no || '—' }}</span>
|
||||
<div v-if="getPickTaskWaveNos(row).length" class="click-copy-list">
|
||||
<span
|
||||
v-for="(waveNo, wi) in getPickTaskWaveNos(row)"
|
||||
:key="`${row.task_id || row.id}-wave-${wi}`"
|
||||
class="click-copy-link"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
title="点击复制波次号"
|
||||
@click.stop="copyWaveNo(waveNo)"
|
||||
@keydown.enter.prevent="copyWaveNo(waveNo)"
|
||||
>
|
||||
{{ waveNo }}
|
||||
</span>
|
||||
</div>
|
||||
<span v-else style="color:#909399">—</span>
|
||||
</template>
|
||||
|
||||
<template #column-warehouse_id="{ row }">
|
||||
<span>{{ row.warehouse_id ?? '—' }}</span>
|
||||
</template>
|
||||
|
||||
<template #column-creator_name="{ row }">
|
||||
<span>{{ row.creator_name || row.creator_id || '—' }}</span>
|
||||
</template>
|
||||
|
||||
<template #column-box_count="{ row }">
|
||||
<el-tooltip v-if="row.box_count === 0" content="可能未统计" placement="top">
|
||||
<span>{{ row.box_count }}</span>
|
||||
@ -166,44 +172,56 @@
|
||||
@mousedown="beginSplitDrag"
|
||||
/>
|
||||
<div v-if="selectedTaskId" class="lower-level" :style="lowerPaneStyle">
|
||||
<!-- <div class="detail-header">
|
||||
<span class="detail-header-title">
|
||||
波次列表({{ selectedTaskWaveList.length }})
|
||||
<template v-if="selectedTaskRow">
|
||||
— 任务 {{ selectedTaskRow.task_no }}
|
||||
</template>
|
||||
</span>
|
||||
</div> -->
|
||||
<div class="detail-header">
|
||||
<el-tabs v-model="detailActiveTab" class="detail-tab">
|
||||
<el-tab-pane label="波次列表" name="waveList" />
|
||||
</el-tabs>
|
||||
</div>
|
||||
<div class="detail-container">
|
||||
<el-table
|
||||
v-if="selectedTaskWaveList.length"
|
||||
:data="selectedTaskWaveList"
|
||||
border
|
||||
size="small"
|
||||
height="100%"
|
||||
>
|
||||
<el-table-column prop="wave_no" label="波次号" min-width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="wave_id" label="波次ID" width="100" align="center" />
|
||||
<el-table-column prop="box_no" label="箱号" width="80" align="center" />
|
||||
<el-table-column label="状态" width="100" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag size="small" :type="getWaveStatusTagType(row.status)">
|
||||
{{ getWaveStatusText(row.status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="绑定时间" min-width="168" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
{{ formatWaveTime(row.bind_time) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="拣货时间" min-width="168" show-overflow-tooltip>
|
||||
<template #default="{ row }">
|
||||
{{ formatWaveTime(row.pick_time) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-else description="该任务暂无关联波次" />
|
||||
<div v-if="detailActiveTab === 'waveList'" class="detail-page order-detail-wrapper">
|
||||
<el-table
|
||||
v-if="selectedTaskWaveList.length"
|
||||
:data="selectedTaskWaveList"
|
||||
border
|
||||
size="small"
|
||||
height="100%"
|
||||
>
|
||||
<el-table-column label="波次号" min-width="180" show-overflow-tooltip>
|
||||
<template #default="{ row: waveRow }">
|
||||
<span
|
||||
class="click-copy-link"
|
||||
role="button"
|
||||
tabindex="0"
|
||||
title="点击复制波次号"
|
||||
@click.stop="copyWaveNo(waveRow.wave_no)"
|
||||
@keydown.enter.prevent="copyWaveNo(waveRow.wave_no)"
|
||||
>
|
||||
{{ waveRow.wave_no || '—' }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="wave_id" label="波次ID" width="100" align="center" />
|
||||
<el-table-column prop="box_no" label="箱号" width="80" align="center" />
|
||||
<el-table-column label="状态" width="100" align="center">
|
||||
<template #default="{ row: waveRow }">
|
||||
<el-tag size="small" :type="getWaveStatusTagType(waveRow.status)">
|
||||
{{ getWaveStatusText(waveRow.status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="绑定时间" min-width="168" show-overflow-tooltip>
|
||||
<template #default="{ row: waveRow }">
|
||||
{{ formatWaveTime(waveRow.bind_time) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="拣货时间" min-width="168" show-overflow-tooltip>
|
||||
<template #default="{ row: waveRow }">
|
||||
{{ formatWaveTime(waveRow.pick_time) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-empty v-else description="该任务暂无关联波次" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="no-selection" :style="lowerPaneStyle">
|
||||
@ -277,6 +295,7 @@ const selectedTaskRows = ref<Array<Record<string, any>>>([])
|
||||
|
||||
const detailVisible = ref(true)
|
||||
const selectedTaskId = ref<number | string | null>(null)
|
||||
const detailActiveTab = ref('waveList')
|
||||
|
||||
const { splitStackRef, beginSplitDrag, lowerPaneStyle, upperPaneStyle } = useVerticalSplitPane({
|
||||
defaultLowerPercent: 38
|
||||
@ -598,6 +617,30 @@ function formatWaveTime(value: unknown): string {
|
||||
return formatDateTime(value)
|
||||
}
|
||||
|
||||
async function copyWaveNo(text: string) {
|
||||
if (!text) return
|
||||
try {
|
||||
await navigator.clipboard.writeText(text)
|
||||
ElMessage.success(`已复制:${text}`)
|
||||
} catch {
|
||||
// fallback for older browsers / non-HTTPS
|
||||
const textarea = document.createElement('textarea')
|
||||
textarea.value = text
|
||||
textarea.style.position = 'fixed'
|
||||
textarea.style.opacity = '0'
|
||||
document.body.appendChild(textarea)
|
||||
textarea.select()
|
||||
try {
|
||||
document.execCommand('copy')
|
||||
ElMessage.success(`已复制:${text}`)
|
||||
} catch {
|
||||
ElMessage.error('复制失败,请手动复制')
|
||||
} finally {
|
||||
document.body.removeChild(textarea)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function handleCancelSelfTask(row: Record<string, any>) {
|
||||
const taskId = getTaskId(row)
|
||||
if (!taskId) {
|
||||
@ -868,6 +911,32 @@ onMounted(() => {
|
||||
color: var(--el-text-color-placeholder);
|
||||
}
|
||||
|
||||
.click-copy-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.click-copy-link {
|
||||
color: var(--el-color-primary);
|
||||
cursor: pointer;
|
||||
word-break: break-all;
|
||||
line-height: 1.4;
|
||||
max-width: 100%;
|
||||
|
||||
&:hover {
|
||||
color: var(--el-color-primary-dark-2);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 2px solid var(--el-color-primary-light-3);
|
||||
outline-offset: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
}
|
||||
|
||||
.upper-wrapper :deep(.upper-table-container) {
|
||||
border-radius: 4px;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
||||
|
||||
@ -1080,7 +1080,6 @@ export const pickTaskWaveColumns = applyWaveListCopyActions([
|
||||
{ prop: 'order_count', label: '订单数', width: 90 },
|
||||
{ prop: 'box_count', label: '箱数', width: 110 },
|
||||
{ prop: 'operator_name', label: '操作人', minWidth: 120 },
|
||||
{ prop: 'creator_name', label: '创建人', minWidth: 100 },
|
||||
{ prop: 'pick_user_name', label: '拣货员', minWidth: 120 },
|
||||
{ prop: 'review_user_name', label: '复核人', minWidth: 120 },
|
||||
{ prop: 'current_cart_id', label: '当前车ID', width: 100 },
|
||||
|
||||
@ -221,34 +221,30 @@ export const availableFields: EntryScanFieldConfig[] = [
|
||||
]
|
||||
|
||||
export const entryColums = [
|
||||
{ prop: 'id',label:'ID',width:'50' },
|
||||
{ prop: 'entry_order_code',label:'入库单号',width:'160',},
|
||||
{ prop: 'store_name',label:'货主',width:'140', },
|
||||
{ prop: 'order_type',label:'类型',width:'160' },
|
||||
|
||||
{ prop: 'purchase_order_code',label:'单据编号 ',width:'160' },
|
||||
{ prop: 'total_order_lines',label:'商品数',width:'160', sortable: 'custom' },
|
||||
{ prop: 'order_status',label:'订单状态',width:'160' },
|
||||
{ prop: 'id', label: 'ID', width: '50' },
|
||||
{ prop: 'entry_order_code', label: '入库单号', width: '160' },
|
||||
{ prop: 'store_name', label: '货主', width: '140' },
|
||||
{ prop: 'warehouse_name', label: '仓库', width: '120' },
|
||||
{ prop: 'order_type', label: '类型', width: '100' },
|
||||
{ prop: 'purchase_order_code', label: '单据编号', width: '160' },
|
||||
{ prop: 'total_order_lines', label: '商品数', width: '80', sortable: 'custom' },
|
||||
{ prop: 'order_status', label: '订单状态', width: '100' },
|
||||
{ prop: 'hasReceiving', label: '收货绑定', width: '100' },
|
||||
{ prop: 'receivingBindings', label: '绑定收货单', minWidth: '180' },
|
||||
{ prop: 'sync_status',label:'入库状态',width:'160' },
|
||||
{ prop: 'sync_status', label: '入库状态', width: '100' },
|
||||
{ prop: 'sync_message', label: '同步信息', minWidth: '220' },
|
||||
{ prop: 'supplier_code',label:'供应商编码',width:'160' },
|
||||
{ prop: 'supplier_name',label:'供应商名称',width:'160' },
|
||||
// { prop: '',label:'',width:'160' },
|
||||
{ prop: 'express_code',label:'运单号',width:'160' },
|
||||
{ prop: 'logistics_code',label:'物流公司编码',width:'160' },
|
||||
{ prop: 'logistics_name',label:'物流公司名称',width:'160' },
|
||||
// { prop: '',label:'',width:'160',fixed: 'left' },
|
||||
// { prop: '',label:'',width:'160',fixed: 'left' },
|
||||
{ prop: 'order_create_time',label:'单据创建时间',width:'160' },
|
||||
{ prop: 'expect_start_time',label:'预计开始时间',width:'160' },
|
||||
{ prop: 'expect_end_time',label:'预计结束时间',width:'160' },
|
||||
// { prop: '',label:'',width:'160',fixed: 'left' },
|
||||
{ prop: 'source_type',label:'数据来源',width:'160' },
|
||||
{ prop: 'remark',label:'备注',width:'160' },
|
||||
// { prop: '',label:'',width:'160',fixed: 'left' },
|
||||
// { prop: '',label:'',width:'160',fixed: 'left' },
|
||||
{ prop: 'supplier_code', label: '供应商编码', width: '120' },
|
||||
{ prop: 'supplier_name', label: '供应商名称', width: '140' },
|
||||
{ prop: 'express_code', label: '运单号', width: '140' },
|
||||
{ prop: 'logistics_code', label: '物流公司编码', width: '140' },
|
||||
{ prop: 'logistics_name', label: '物流公司名称', width: '140' },
|
||||
{ prop: 'order_create_time', label: '单据创建时间', width: '160' },
|
||||
{ prop: 'expect_start_time', label: '预计开始时间', width: '160' },
|
||||
{ prop: 'expect_end_time', label: '预计结束时间', width: '160' },
|
||||
{ prop: 'created_at', label: '创建时间', width: '160' },
|
||||
{ prop: 'updated_at', label: '更新时间', width: '160' },
|
||||
{ prop: 'source_type', label: '数据来源', width: '100' },
|
||||
{ prop: 'remark', label: '备注', width: '160' },
|
||||
{ prop: 'row_action', label: '操作', width: '300', fixed: 'right' },
|
||||
]
|
||||
|
||||
@ -256,6 +252,7 @@ export const entryColums = [
|
||||
export const entryStoreColums = [
|
||||
{ prop: 'id', label: 'ID', width: '50' },
|
||||
{ prop: 'entry_order_code', label: '入库单号', width: '160' },
|
||||
{ prop: 'warehouse_name', label: '仓库', width: '120' },
|
||||
{ prop: 'order_type', label: '类型', width: '100' },
|
||||
{ prop: 'purchase_order_code', label: '单据编号', width: '160' },
|
||||
{ prop: 'total_order_lines', label: '商品数', width: '80', sortable: 'custom' },
|
||||
@ -271,6 +268,8 @@ export const entryStoreColums = [
|
||||
{ prop: 'order_create_time', label: '单据创建时间', width: '160' },
|
||||
{ prop: 'expect_start_time', label: '预计开始时间', width: '160' },
|
||||
{ prop: 'expect_end_time', label: '预计结束时间', width: '160' },
|
||||
{ prop: 'created_at', label: '创建时间', width: '160' },
|
||||
{ prop: 'updated_at', label: '更新时间', width: '160' },
|
||||
{ prop: 'source_type', label: '数据来源', width: '100' },
|
||||
{ prop: 'remark', label: '备注', width: '160' },
|
||||
]
|
||||
|
||||
@ -289,8 +289,6 @@ const columns = computed(() => {
|
||||
![
|
||||
'production_date',
|
||||
'expiry_date',
|
||||
'shelf_life_days',
|
||||
'sale_ban_period',
|
||||
'expiry_remaining_days',
|
||||
'inventory_warning_level',
|
||||
'inventory_warning_tip_text'
|
||||
|
||||
@ -184,7 +184,8 @@ const inventoryBarcodesColumn = {
|
||||
prop: 'barcodes',
|
||||
label: '商品条码',
|
||||
width: '150',
|
||||
showOverflowTooltip: true
|
||||
showOverflowTooltip: true,
|
||||
copyAction: 'copy' as const
|
||||
}
|
||||
|
||||
/** 库存列表选中导出列 */
|
||||
@ -206,8 +207,8 @@ export const inventoryExportColumns = [
|
||||
]
|
||||
|
||||
export const productstockColums = [
|
||||
{ prop: 'stock_id', label: '商品ID', width: '100' },
|
||||
{ prop: 'item_code', label: '商品编码', width: '150' },
|
||||
{ prop: 'stock_id', label: '商品ID', width: '100', copyAction: 'copy' as const },
|
||||
{ prop: 'item_code', label: '商品编码', width: '150', copyAction: 'copy' as const },
|
||||
{ prop: 'item_name', label: '商品名称', width: '200' },
|
||||
{ ...inventoryBarcodesColumn },
|
||||
{ prop: 'sku_property', label: '规格', width: '140', showOverflowTooltip: true },
|
||||
|
||||
@ -25,6 +25,13 @@
|
||||
@action="handleToolbarButtonClick"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div class="toolbar-right">
|
||||
<el-radio-group v-model="groupByBatch" size="small" @change="handleGroupByBatchChange">
|
||||
<el-radio-button :value="false">按库位+商品聚合</el-radio-button>
|
||||
<el-radio-button :value="true">明细显示</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="split-stack" ref="splitStackRef">
|
||||
@ -56,6 +63,10 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
|
||||
<template #column-order_type="{ row }">
|
||||
{{ getOrderTypeLabel(row.order_type) }}
|
||||
</template>
|
||||
|
||||
<template #empty>
|
||||
<div class="empty-tip">暂无出入库记录</div>
|
||||
</template>
|
||||
@ -89,7 +100,7 @@
|
||||
<el-descriptions-item label="库位ID">{{ selectedRowData.space_id }}</el-descriptions-item>
|
||||
<el-descriptions-item label="仓库ID">{{ selectedRowData.warehouse_id }}</el-descriptions-item>
|
||||
<el-descriptions-item label="货主ID">{{ selectedRowData.store_id }}</el-descriptions-item>
|
||||
<el-descriptions-item label="订单类型">{{ selectedRowData.order_type }}</el-descriptions-item>
|
||||
<el-descriptions-item label="订单类型">{{ getOrderTypeLabel(selectedRowData.order_type) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="操作人">{{ selectedRowData.operator_name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="数量">{{ selectedRowData.quantity }}</el-descriptions-item>
|
||||
<el-descriptions-item label="记录数">{{ selectedRowData.record_count }}</el-descriptions-item>
|
||||
@ -127,7 +138,8 @@ import {
|
||||
formatDateTime,
|
||||
formatTransactionData,
|
||||
inventoryTypeConfig,
|
||||
transactionTypeConfig
|
||||
transactionTypeConfig,
|
||||
getOrderTypeLabel
|
||||
} from './log-config'
|
||||
import { useSettingsStore } from '@/stores/modules/settings'
|
||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||
@ -335,6 +347,11 @@ function handleConditionReset() {
|
||||
loadData()
|
||||
}
|
||||
|
||||
function handleGroupByBatchChange() {
|
||||
pagination.currentPage = 1
|
||||
loadData()
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
if (loading.value) return
|
||||
loading.value = true
|
||||
|
||||
@ -104,23 +104,38 @@ export const inventoryTypeConfig = {
|
||||
}
|
||||
|
||||
// 订单类型配置
|
||||
export const orderTypeConfig = {
|
||||
SCRK: { text: '标准入库', tagType: 'primary' },
|
||||
MATCH: { text: '匹配', tagType: 'primary' }
|
||||
export const orderTypeConfig: Record<string, string> = {
|
||||
ORDER: '订单',
|
||||
ORDER_CANCEL: '取消订单',
|
||||
CGRK: '采购入库',
|
||||
JYCK: '交易出库',
|
||||
CGTH: '采购退货',
|
||||
JYTH: '交易退货',
|
||||
SCRK: '生产入库',
|
||||
SHRK: '收货入库',
|
||||
DELIVERY_ORDER: '出库单',
|
||||
RECEIVING: '收货单',
|
||||
ENTRY_ORDER: '入库单',
|
||||
INVENTORY: '盘点单',
|
||||
RETURN: '退货单'
|
||||
}
|
||||
|
||||
export function getOrderTypeLabel(type: string): string {
|
||||
return orderTypeConfig[type] || type || '—'
|
||||
}
|
||||
|
||||
// 出入库记录列表列
|
||||
export const transactionColumns = [
|
||||
{ prop: 'stock_id', label: '商品ID', width: '100' },
|
||||
{ prop: 'stock_id', label: '商品ID', width: '100', copyAction: 'copy' as const },
|
||||
{ prop: 'item_code', label: '商品编码', width: '140', copyAction: 'copy' as const },
|
||||
{ prop: 'item_name', label: '商品名称', minWidth: '160' },
|
||||
{ prop: 'transaction_type', label: '交易类型', width: '100' },
|
||||
{ prop: 'space_id', label: '库位ID', width: '100' },
|
||||
{ prop: 'warehouse_id', label: '仓库ID', width: '100' },
|
||||
{ prop: 'order_type', label: '订单类型', width: '100' },
|
||||
{ prop: 'quantity', label: '数量', width: '100' },
|
||||
{ prop: 'record_count', label: '记录数', width: '100' },
|
||||
{ prop: 'first_created_at', label: '首次创建', width: '160', sortable: true, formatter: (row: any) => formatDateTime(row.first_created_at) },
|
||||
{ prop: 'last_created_at', label: '最后创建', width: '160', sortable: true, formatter: (row: any) => formatDateTime(row.last_created_at) },
|
||||
{ prop: 'operator_name', label: '操作人', width: '100' }
|
||||
{ prop: 'last_created_at', label: '最后创建', width: '160', sortable: true, formatter: (row: any) => formatDateTime(row.last_created_at) }
|
||||
]
|
||||
|
||||
// scan-box 可用字段(基础信息在前,流程状态在后;对齐收货单 ScanBox 分组)
|
||||
@ -134,29 +149,13 @@ export const availableFields: LogScanFieldConfig[] = [
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
logScanBasicField({
|
||||
value: 'order_no',
|
||||
label: '订单号',
|
||||
value: 'item_code',
|
||||
label: '商品编码',
|
||||
type: 'text',
|
||||
placeholder: '请输入订单号',
|
||||
placeholder: '请输入商品编码',
|
||||
operators: ['contains', 'eq'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
logScanBasicField({
|
||||
value: 'operator_name',
|
||||
label: '操作人',
|
||||
type: 'text',
|
||||
placeholder: '请输入操作人名称',
|
||||
operators: ['eq','contains'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
logScanBasicField({
|
||||
value: 'space_id',
|
||||
label: '库位ID',
|
||||
type: 'number',
|
||||
placeholder: '请输入库位ID',
|
||||
operators: ['eq'],
|
||||
defaultOperator: 'eq'
|
||||
}),
|
||||
logScanBasicField({
|
||||
value: 'store_id',
|
||||
label: '货主',
|
||||
@ -173,17 +172,11 @@ export const availableFields: LogScanFieldConfig[] = [
|
||||
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 }))
|
||||
options: Object.entries(orderTypeConfig).map(([value, label]) => ({ value, label }))
|
||||
}),
|
||||
|
||||
// ===== 时间 =====
|
||||
@ -200,9 +193,11 @@ export const availableFields: LogScanFieldConfig[] = [
|
||||
export function formatTransactionData(data: any[]): any[] {
|
||||
return data.map(item => ({
|
||||
...item,
|
||||
item_code: item.stockItem?.item_code || '',
|
||||
item_name: item.stockItem?.item_name || '',
|
||||
record_count: item.record_count ?? 1,
|
||||
first_created_at: item.first_created_at || item.created_at,
|
||||
last_created_at: item.last_created_at || item.created_at,
|
||||
id: `${item.stock_id}-${item.space_id}-${item.transaction_type}`
|
||||
id: `${item.stock_id}-${item.transaction_type}`
|
||||
}))
|
||||
}
|
||||
|
||||
@ -79,13 +79,15 @@
|
||||
<span :class="getLockClass(row.transaction_type)">{{ row.after_locked_quantity ?? '—' }}</span>
|
||||
</template>
|
||||
<template #column-batch_no="{ row }">
|
||||
{{ row.batch_no || '—' }}
|
||||
<span v-if="row.batch_no" class="click-copy-link" role="button" tabindex="0" title="点击复制批次号" @click.stop="copyText(row.batch_no)" @keydown.enter.prevent="copyText(row.batch_no)">{{ row.batch_no }}</span>
|
||||
<span v-else style="color:#909399">—</span>
|
||||
</template>
|
||||
<template #column-order_type="{ row }">
|
||||
{{ getOrderTypeLabel(row.order_type) }}
|
||||
</template>
|
||||
<template #column-order_no="{ row }">
|
||||
{{ row.order_no || '—' }}
|
||||
<span v-if="row.order_no" class="click-copy-link" role="button" tabindex="0" title="点击复制订单号" @click.stop="copyText(row.order_no)" @keydown.enter.prevent="copyText(row.order_no)">{{ row.order_no }}</span>
|
||||
<span v-else style="color:#909399">—</span>
|
||||
</template>
|
||||
<template #column-operator_name="{ row }">
|
||||
{{ row.operator_name || '—' }}
|
||||
@ -541,6 +543,29 @@ async function handleExportAction(mode: 'all' | 'selected') {
|
||||
await submitExportTask(buildExportPayload(mode))
|
||||
}
|
||||
|
||||
async function copyText(text: string) {
|
||||
if (!text) return
|
||||
try {
|
||||
await navigator.clipboard.writeText(text)
|
||||
ElMessage.success(`已复制:${text}`)
|
||||
} catch {
|
||||
const textarea = document.createElement('textarea')
|
||||
textarea.value = text
|
||||
textarea.style.position = 'fixed'
|
||||
textarea.style.opacity = '0'
|
||||
document.body.appendChild(textarea)
|
||||
textarea.select()
|
||||
try {
|
||||
document.execCommand('copy')
|
||||
ElMessage.success(`已复制:${text}`)
|
||||
} catch {
|
||||
ElMessage.error('复制失败,请手动复制')
|
||||
} finally {
|
||||
document.body.removeChild(textarea)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
loadFilterData()
|
||||
loadList()
|
||||
@ -821,4 +846,21 @@ onMounted(() => {
|
||||
font-weight: 700;
|
||||
color: var(--el-color-info);
|
||||
}
|
||||
|
||||
.click-copy-link {
|
||||
color: var(--el-color-primary);
|
||||
cursor: pointer;
|
||||
word-break: break-all;
|
||||
line-height: 1.4;
|
||||
|
||||
&:hover {
|
||||
color: var(--el-color-primary-dark-2);
|
||||
}
|
||||
|
||||
&:focus-visible {
|
||||
outline: 2px solid var(--el-color-primary-light-3);
|
||||
outline-offset: 2px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -44,6 +44,13 @@ export const transactionTypeConfig: Record<string, { text: string; tagType: stri
|
||||
|
||||
export const orderTypeConfig: Record<string, string> = {
|
||||
ORDER: '订单',
|
||||
ORDER_CANCEL:'取消订单',
|
||||
CGRK: '采购入库',
|
||||
JYCK: '交易出库',
|
||||
CGTH: '采购退货',
|
||||
JYTH: '交易退货',
|
||||
SCRK: '生产入库',
|
||||
SHRK: '收货入库',
|
||||
DELIVERY_ORDER: '出库单',
|
||||
RECEIVING: '收货单',
|
||||
ENTRY_ORDER: '入库单',
|
||||
@ -54,7 +61,7 @@ export const orderTypeConfig: Record<string, string> = {
|
||||
export const columns = [
|
||||
{ prop: 'created_at', label: '流水时间', width: 160, sortable: true },
|
||||
{ prop: 'transaction_type', label: '流水类型', width: 90 },
|
||||
{ prop: 'stock_id', label: '商品ID', 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: 'stock_quantity', label: '库存变动', width: 90 },
|
||||
@ -63,10 +70,10 @@ export const columns = [
|
||||
{ prop: 'after_quantity', label: '变动后库存', width: 100 },
|
||||
{ prop: 'before_locked_quantity', label: '变动前锁定', width: 100 },
|
||||
{ prop: 'after_locked_quantity', label: '变动后锁定', width: 100 },
|
||||
{ prop: 'batch_no', label: '批次号', minWidth: 110 },
|
||||
{ prop: 'batch_no', label: '批次号', minWidth: 130, copyAction: 'copy' as const },
|
||||
{ prop: 'order_type', label: '订单类型', width: 100 },
|
||||
{ prop: 'order_no', label: '订单号', minWidth: 160 },
|
||||
{ prop: 'order_id', label: '订单ID', width: 90 },
|
||||
{ prop: 'order_no', label: '订单号', minWidth: 160, copyAction: 'copy' as const },
|
||||
{ prop: 'order_id', label: '订单ID', width: 90, copyAction: 'copy' as const },
|
||||
{ prop: 'operator_name', label: '操作人', width: 90 },
|
||||
{ prop: 'remark', label: '备注', minWidth: 140 }
|
||||
]
|
||||
|
||||
@ -153,7 +153,7 @@ function calculateValidityDays(productionDate?: string, expiryDate?: string): st
|
||||
}
|
||||
|
||||
export const receivingColumns = [
|
||||
{ prop: 'receiving_number', label: '收货单号', width: '110', fixed: 'left' },
|
||||
{ prop: 'receiving_number', label: '收货单号', width: '110', fixed: 'left', copyAction: 'copy' as const },
|
||||
{
|
||||
prop: 'images',
|
||||
label: '收货图片',
|
||||
@ -187,7 +187,7 @@ export const receivingColumns = [
|
||||
|
||||
/** 货主侧收货单列表列(getStoreReceivingList 返回字段) */
|
||||
export const receivingStoreColumns = [
|
||||
{ prop: 'receiving_number', label: '收货单号', width: '110', fixed: 'left' },
|
||||
{ prop: 'receiving_number', label: '收货单号', width: '110', fixed: 'left', copyAction: 'copy' as const },
|
||||
{ prop: 'status', label: '收货状态', width: '90' },
|
||||
{ prop: 'detail_status', label: '匹配状态', width: '90' },
|
||||
{ prop: 'storage_status', label: '入库状态', width: '90' },
|
||||
|
||||
@ -14,8 +14,6 @@ export const reportFieldLabels: Record<string, string> = {
|
||||
end_total: '期末数量',
|
||||
start_time: '统计区间开始',
|
||||
end_time: '统计区间结束',
|
||||
space_id: '库位ID',
|
||||
space_name: '库位',
|
||||
warehouse_id: '仓库ID',
|
||||
warehouse_name: '仓库名称',
|
||||
}
|
||||
@ -23,6 +21,8 @@ export const reportFieldLabels: Record<string, string> = {
|
||||
const DETAIL_KEY_ORDER = [
|
||||
'store_id',
|
||||
'store_name',
|
||||
'warehouse_id',
|
||||
'warehouse_name',
|
||||
'stock_id',
|
||||
'item_code',
|
||||
'barcode',
|
||||
@ -32,9 +32,7 @@ const DETAIL_KEY_ORDER = [
|
||||
'outbound_total',
|
||||
'end_total',
|
||||
'start_time',
|
||||
'end_time',
|
||||
'space_id',
|
||||
'space_name'
|
||||
'end_time'
|
||||
]
|
||||
|
||||
export function sortReportDetailKeys(keys: string[]) {
|
||||
@ -120,7 +118,8 @@ export const fixedReportColumns: ReportColumn[] = [
|
||||
label: '区间结束',
|
||||
width: 168,
|
||||
formatter: (row) => formatReportDateTime(row.end_time)
|
||||
}
|
||||
},
|
||||
{ prop: 'warehouse_name', label: '仓库', minWidth: 120, formatter: (row) => (row as any).warehouse_name || '--' }
|
||||
]
|
||||
|
||||
const FIXED_PROPS = new Set(fixedReportColumns.map((c) => c.prop))
|
||||
@ -131,7 +130,7 @@ export function buildReportTableColumns(rows: StockReportListItem[]) {
|
||||
for (const row of rows) {
|
||||
if (!row || typeof row !== 'object') continue
|
||||
for (const k of Object.keys(row)) {
|
||||
if (k === '__rid' || k === 'store_id' || k === 'space_id' || k === 'space_name' || FIXED_PROPS.has(k)) continue
|
||||
if (k === '__rid' || k === 'store_id' || k === 'warehouse_id' || FIXED_PROPS.has(k)) continue
|
||||
extra.add(k)
|
||||
}
|
||||
}
|
||||
|
||||
@ -68,7 +68,8 @@
|
||||
<template #column-actions="{ row }">
|
||||
<el-button
|
||||
v-if="row.order_status === 'CREATED' || row.order_status === 'PENDING'"
|
||||
type="primary"
|
||||
type="success"
|
||||
link
|
||||
size="small"
|
||||
:loading="row._stockoutLoading"
|
||||
@click.stop="handleSingleRowStockout(row)"
|
||||
|
||||
@ -142,11 +142,12 @@ export function formatDateTime(dateStr: string): string {
|
||||
}
|
||||
|
||||
export const entryColums = [
|
||||
{ prop: 'stockout_order_code', label: '出库单号', width: '220', fixed: 'left' },
|
||||
{ prop: 'stockout_order_code', label: '出库单号', width: '220', fixed: 'left', copyAction: 'copy' as const },
|
||||
{ prop: 'order_status', label: '出库状态', width: '100' },
|
||||
{ prop: 'sync_status', label: '同步状态', width: '100' },
|
||||
{ prop: 'order_type', label: '单据类型', width: '100' },
|
||||
{ prop: 'source_type', label: '来源类型', width: '100' },
|
||||
{ prop: 'express_code', label: '运单号', width: '120' },
|
||||
{ prop: 'total_order_lines', label: '订单行数', width: '90' },
|
||||
{ prop: 'remark', label: '备注', minWidth: '150' },
|
||||
{ prop: 'order_create_time', label: '下单时间', width: '160', sortable: true, formatter: (row: any) => formatDateTime(row.order_create_time) },
|
||||
|
||||
@ -988,7 +988,7 @@ import { storeWarehouseList, storeWarehouseUnbind,
|
||||
storeWarehouseExportPrintQuantityLogs,
|
||||
storeWarehouseExportPrintQuantityLogsTaskProgress
|
||||
} from '@/api/storewarehouse.store/storeWarehouse'
|
||||
import { listInterfaceTypes, getExpressList, getPlatformList, getQimenAppList } from '@/api/index/index'
|
||||
import { listInterfaceTypes, getExpressList, getPlatformList, getQimenAppList, loadStores } from '@/api/index/index'
|
||||
import ScanBox from '@/components/ScanBox/index.vue'
|
||||
import UpperTable from '@/components/UpperTable/index.vue'
|
||||
import OrderToolbarButtonGroup from '@/views/order/orderManagement/component/OrderToolbarButtonGroup.vue'
|
||||
@ -2460,7 +2460,30 @@ function copyBindCode() {
|
||||
}
|
||||
|
||||
// ─── 初始化 ───────────────────────────────────────────────────────────────────
|
||||
onMounted(loadList)
|
||||
|
||||
async function loadStoreOptions() {
|
||||
try {
|
||||
const res = await loadStores() as any
|
||||
if (res?.code === 200 || res?.code === 1 || res?.code === 20000 || res?.flag === 'success') {
|
||||
const stores = res?.stores || res?.data?.stores || res?.data || []
|
||||
const field = availableFields.find((f: any) => f.value === 'store_id')
|
||||
if (field) {
|
||||
field.options = stores.map((item: any) => {
|
||||
const id = item?.store_id ?? item?.id ?? item?.value
|
||||
const name = item?.store_name ?? item?.name ?? item?.label ?? String(id)
|
||||
return { label: name, value: id }
|
||||
})
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('加载货主列表失败', e)
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
loadList()
|
||||
loadStoreOptions()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@ -190,6 +190,12 @@ export const availableFields = [
|
||||
group: '基础信息',
|
||||
placeholder: '搜索主体名或备注'
|
||||
},
|
||||
{
|
||||
label: '货主',
|
||||
value: 'store_id',
|
||||
type: 'select',
|
||||
options: [] as Array<{ label: string; value: number | string }>
|
||||
},
|
||||
{
|
||||
label: '签约状态',
|
||||
value: 'auth_status',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user