1330 lines
42 KiB
Vue
1330 lines
42 KiB
Vue
<template>
|
||
<div class="order-sub-container">
|
||
<scan-box
|
||
ref="scanBox"
|
||
width="320px"
|
||
:tree-props="{ children: 'children', label: 'label' }"
|
||
:auto-submit="false"
|
||
:preset-tree="presetTree"
|
||
:available-fields="availableFieldsRef"
|
||
@condition-change="handleConditionChange"
|
||
@reset="handleConditionReset"
|
||
@condition-clear="handleConditionClear"
|
||
/>
|
||
|
||
<div class="main-content">
|
||
<div class="toolbar">
|
||
<div class="toolbar-left" @wheel="handleToolbarWheel">
|
||
<div
|
||
class="toolbar-scroll-container"
|
||
ref="scrollContainerRef"
|
||
@mousedown="handleMouseDown"
|
||
@mousemove="handleMouseMove"
|
||
@mouseup="handleMouseUp"
|
||
@mouseleave="handleMouseUp"
|
||
>
|
||
<el-button size="small" type="primary" @click="loadData">刷新</el-button>
|
||
<el-button size="small" :loading="exportLoading" @click="handleExport">导出</el-button>
|
||
<el-button size="small" @click="openColumnConfigPanel">字段设置</el-button>
|
||
<el-button size="small" @click="toggleDetailVisible">{{ detailVisible ? '隐藏详情' : '显示详情' }}</el-button>
|
||
<el-button size="small" :disabled="!hasSelection" :loading="actionLoading" @click="handleReverseReview">
|
||
反审回待审核
|
||
</el-button>
|
||
<el-button size="small" type="warning" :disabled="!hasSelection" :loading="actionLoading" @click="handleMarkPendingOutbound">
|
||
标记待出库
|
||
</el-button>
|
||
<el-button
|
||
size="small"
|
||
type="primary"
|
||
plain
|
||
:disabled="!hasSelection"
|
||
:loading="storageAllocateLoading"
|
||
@click="openStorageAllocateDialog"
|
||
>
|
||
分配储位
|
||
</el-button>
|
||
<el-button
|
||
size="small"
|
||
type="danger"
|
||
plain
|
||
:disabled="!hasSelection"
|
||
:loading="storageAllocateLoading"
|
||
@click="openStorageCancelDialog"
|
||
>
|
||
取消分配储位
|
||
</el-button>
|
||
<el-button
|
||
size="small"
|
||
type="success"
|
||
:disabled="!hasSelection"
|
||
:loading="allocateLoading"
|
||
@click="openAllocateExpressDialog"
|
||
>
|
||
分配快递号
|
||
</el-button>
|
||
<el-button
|
||
size="small"
|
||
type="warning"
|
||
plain
|
||
:disabled="!hasSelection"
|
||
:loading="updateOrderMetaLoading"
|
||
@click="openUpdateOrderExpressDialog"
|
||
>
|
||
修改快递
|
||
</el-button>
|
||
<el-button
|
||
size="small"
|
||
type="info"
|
||
plain
|
||
:disabled="!hasSelection"
|
||
:loading="updateOrderMetaLoading"
|
||
@click="openUpdateOrderPlatformDialog"
|
||
>
|
||
修改平台
|
||
</el-button>
|
||
<el-button size="small" type="primary" plain @click="manualCreateDialogVisible = true">手动建单</el-button>
|
||
<el-button size="small" type="success" plain @click="importOrderDialogVisible = true">Excel导入建单</el-button>
|
||
<el-button
|
||
size="small"
|
||
type="warning"
|
||
plain
|
||
:disabled="selectionRows.length !== 1"
|
||
:loading="cloneOrderLoading"
|
||
@click="openCloneOrderDialog"
|
||
>
|
||
克隆订单
|
||
</el-button>
|
||
<el-button size="small" type="danger" :disabled="!hasSelection" :loading="actionLoading" @click="handleCancelOrder">
|
||
取消订单
|
||
</el-button>
|
||
|
||
<template v-for="(btn, index) in expectionOrderbuttonList" :key="index">
|
||
<el-dropdown
|
||
v-if="btn.type === 'dropdown'"
|
||
trigger="hover"
|
||
@command="(cmd:any) => handleCommand(btn.command, cmd)"
|
||
>
|
||
<el-button size="small" :loading="btn.loading">
|
||
{{ btn.label }}<el-icon class="el-icon--right"><arrow-down /></el-icon>
|
||
</el-button>
|
||
<template #dropdown>
|
||
<el-dropdown-menu>
|
||
<el-dropdown-item
|
||
v-for="opt in btn.options"
|
||
:key="opt.value"
|
||
:command="opt.value"
|
||
:divided="opt.divided"
|
||
>
|
||
{{ opt.label }}
|
||
</el-dropdown-item>
|
||
</el-dropdown-menu>
|
||
</template>
|
||
</el-dropdown>
|
||
|
||
<el-button
|
||
v-else
|
||
size="small"
|
||
:type="btn.btnType || 'primary'"
|
||
:disabled="btn.needSelection && !hasSelection"
|
||
@click="handleCommand(btn.command)"
|
||
>
|
||
{{ btn.label }}
|
||
</el-button>
|
||
</template>
|
||
|
||
<el-button
|
||
size="small"
|
||
type="warning"
|
||
:disabled="!hasSelection"
|
||
:loading="resolveExceptionLoading"
|
||
@click="openResolveExceptionDialog"
|
||
>
|
||
处理异常订单
|
||
</el-button>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="toolbar-right">
|
||
<el-input size="small" placeholder="搜索订单号" v-model="quickSearch" style="width:220px" @keyup.enter.native="onQuickSearch" />
|
||
</div>
|
||
</div>
|
||
|
||
<div class="split-stack" ref="splitStackRef">
|
||
<div class="upper-wrapper" :style="detailVisible ? upperPaneStyle : upperPaneFullStyle">
|
||
<upper-table
|
||
ref="upperTable"
|
||
title="待处理异常订单列表"
|
||
:enable-column-config="true"
|
||
table-id="order-management-exception-order"
|
||
:data="list"
|
||
:columns="columns"
|
||
:table-size="tableSize"
|
||
:pagination="pagination"
|
||
:show-index="true"
|
||
:show-actions="true"
|
||
:show-selection="true"
|
||
:loading="loading"
|
||
:queryTime="queryTime"
|
||
@current-change="handleRowClick"
|
||
@page-change="handlePageChange"
|
||
@page-size-change="handlePageSizeChange"
|
||
@refresh="loadData"
|
||
@selection-change="onSelectionChange"
|
||
>
|
||
<template #column-order_status="{ row }">
|
||
<el-tag :type="getTagType('order_status', row.order_status)" size="small">
|
||
{{ translateOrderField('order_status', row.order_status) }}
|
||
</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-order_flag="{ row }">
|
||
<el-tooltip
|
||
:content="orderFlagFullText(row)"
|
||
placement="top"
|
||
:disabled="!orderFlagFullText(row)"
|
||
:show-after="400"
|
||
>
|
||
<span
|
||
class="order-flag-cell"
|
||
role="button"
|
||
tabindex="0"
|
||
@click.stop="copyOrderFlag(row)"
|
||
@keydown.enter.prevent="copyOrderFlag(row)"
|
||
>
|
||
{{ orderFlagCellText(row) }}
|
||
</span>
|
||
</el-tooltip>
|
||
</template>
|
||
|
||
<template #empty>
|
||
<div class="empty-tip">暂无待处理异常订单</div>
|
||
</template>
|
||
</upper-table>
|
||
</div>
|
||
<template v-if="detailVisible">
|
||
<div
|
||
class="pane-resizer"
|
||
title="拖动调整列表与详情区域高度"
|
||
@mousedown="beginSplitDrag"
|
||
/>
|
||
<div class="lower-level" v-if="selectedOrderId" :class="tableSize" :style="lowerPaneStyle">
|
||
<div class="detail-header">
|
||
<el-tabs v-model="activeTab" class="detail-tab">
|
||
<el-tab-pane label="商品明细" name="items" />
|
||
<el-tab-pane label="配货信息" name="picking" />
|
||
<el-tab-pane label="归档订单" name="archive" />
|
||
<el-tab-pane label="异常记录" name="exceptions" />
|
||
<el-tab-pane label="操作日志" name="logs" />
|
||
</el-tabs>
|
||
</div>
|
||
|
||
<div class="detail-container">
|
||
<KeepAlive>
|
||
<div v-if="activeTab === 'items'" class="detail-page order-detail-wrapper">
|
||
<workbench-order-detail :row="selectedRow" mode="items" :detail-request="orderExpectionOrder.detail" />
|
||
</div>
|
||
<div v-else-if="activeTab === 'picking'" class="detail-page order-picking-wrapper">
|
||
<p>配货明细加载中...</p>
|
||
</div>
|
||
<div v-else-if="activeTab === 'archive'" class="detail-page order-archive-wrapper">
|
||
<archive-order-panel
|
||
:order-id="selectedRow?.id || null"
|
||
:delivery-order-code="selectedRow?.delivery_order_code || ''"
|
||
/>
|
||
</div>
|
||
<div v-else-if="activeTab === 'exceptions'" class="detail-page">
|
||
<el-alert title="系统异常" type="error" :closable="false" description="库存不足或物流接口调用失败。" />
|
||
</div>
|
||
<div v-else class="detail-page order-log-wrapper">
|
||
<log :data="selectedRow" :request="orderQueryOrderLogs" />
|
||
</div>
|
||
</KeepAlive>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="no-selection" v-else :style="lowerPaneStyle">
|
||
<div class="empty-tip">
|
||
<p>请从上方列表中选择一项查看详情</p>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
</div>
|
||
|
||
<el-dialog
|
||
v-model="allocateDialogVisible"
|
||
title="批量分配快递号"
|
||
width="420px"
|
||
align-center
|
||
destroy-on-close
|
||
@closed="resetAllocateDialog"
|
||
>
|
||
<p class="allocate-confirm-text">是否确认分配?</p>
|
||
<template #footer>
|
||
<el-button @click="allocateDialogVisible = false">取消</el-button>
|
||
<el-button type="primary" :loading="allocateLoading" @click="submitAllocateExpress">
|
||
确认
|
||
</el-button>
|
||
</template>
|
||
</el-dialog>
|
||
|
||
<el-dialog
|
||
v-model="storageDialogVisible"
|
||
:title="storageDialogMode === 'cancel' ? '按订单批量取消分配储位' : '按订单批量分配储位'"
|
||
width="520px"
|
||
align-center
|
||
destroy-on-close
|
||
@closed="resetStorageAllocateDialog"
|
||
>
|
||
<el-form label-width="140px" class="storage-allocate-form">
|
||
<el-form-item label="已选订单数">
|
||
<span>{{ storagePendingOrderIds.length }} 条</span>
|
||
</el-form-item>
|
||
<el-form-item v-if="storageDialogMode !== 'cancel'" label="允许存储储位">
|
||
<el-switch v-model="storageForm.allowStorageLocation" active-text="是" inactive-text="否" />
|
||
</el-form-item>
|
||
</el-form>
|
||
<template #footer>
|
||
<el-button @click="storageDialogVisible = false">取消</el-button>
|
||
<el-button type="primary" :loading="storageAllocateLoading" @click="submitStorageAllocate">
|
||
{{ storageDialogMode === 'cancel' ? '确认取消' : '开始分配' }}
|
||
</el-button>
|
||
</template>
|
||
</el-dialog>
|
||
|
||
<el-dialog
|
||
v-model="cloneOrderDialogVisible"
|
||
title="克隆待处理订单"
|
||
width="480px"
|
||
align-center
|
||
destroy-on-close
|
||
@closed="resetCloneOrderDialog"
|
||
>
|
||
<el-alert type="warning" :closable="false" show-icon title="克隆会取消原订单并创建新订单,请确认后执行。" />
|
||
<div class="clone-order-meta">
|
||
<p>原订单ID:{{ cloneSourceOrderId || '-' }}</p>
|
||
<p>订单号:{{ cloneSourceOrderCode || '-' }}</p>
|
||
</div>
|
||
<template #footer>
|
||
<el-button @click="cloneOrderDialogVisible = false">取消</el-button>
|
||
<el-button type="primary" :loading="cloneOrderLoading" @click="submitCloneOrder">确认克隆</el-button>
|
||
</template>
|
||
</el-dialog>
|
||
|
||
<el-dialog
|
||
v-model="resolveExceptionDialogVisible"
|
||
title="异常订单处理"
|
||
width="520px"
|
||
align-center
|
||
destroy-on-close
|
||
@closed="resetResolveExceptionDialog"
|
||
>
|
||
<el-alert
|
||
type="warning"
|
||
:closable="false"
|
||
show-icon
|
||
title="该操作会将异常订单恢复为正常待处理状态(step: 3 -> 2)。"
|
||
/>
|
||
<el-form label-width="120px" class="resolve-exception-form">
|
||
<el-form-item label="已选订单数">
|
||
<span>{{ resolveExceptionOrderIds.length }} 条</span>
|
||
</el-form-item>
|
||
<el-form-item label="订单ID">
|
||
<div class="resolve-exception-ids">{{ resolveExceptionOrderIds.join(', ') }}</div>
|
||
</el-form-item>
|
||
</el-form>
|
||
<template #footer>
|
||
<el-button @click="resolveExceptionDialogVisible = false">取消</el-button>
|
||
<el-button type="primary" :loading="resolveExceptionLoading" @click="submitResolveException">
|
||
确认处理
|
||
</el-button>
|
||
</template>
|
||
</el-dialog>
|
||
|
||
<el-dialog
|
||
v-model="updateOrderMetaDialogVisible"
|
||
:title="updateOrderMetaDialogMode === 'express' ? '批量修改快递信息' : '批量修改平台信息'"
|
||
width="560px"
|
||
align-center
|
||
destroy-on-close
|
||
@closed="resetUpdateOrderMetaDialog"
|
||
>
|
||
<el-form label-width="110px" class="storage-allocate-form">
|
||
<el-form-item label="已选订单数">
|
||
<span>{{ updateOrderMetaOrderIds.length }} 条</span>
|
||
</el-form-item>
|
||
<el-form-item :label="updateOrderMetaDialogMode === 'express' ? '快递编码' : '平台编码'" required>
|
||
<el-select
|
||
v-model="updateOrderMetaForm.code"
|
||
filterable
|
||
allow-create
|
||
default-first-option
|
||
:reserve-keyword="false"
|
||
clearable
|
||
placeholder="请选择或输入编码"
|
||
style="width: 100%"
|
||
>
|
||
<el-option
|
||
v-for="item in updateOrderMetaOptions"
|
||
:key="item.value"
|
||
:label="item.label"
|
||
:value="item.value"
|
||
/>
|
||
</el-select>
|
||
</el-form-item>
|
||
</el-form>
|
||
<template #footer>
|
||
<el-button @click="updateOrderMetaDialogVisible = false">取消</el-button>
|
||
<el-button type="primary" :loading="updateOrderMetaLoading" @click="submitUpdateOrderMeta">
|
||
确认修改
|
||
</el-button>
|
||
</template>
|
||
</el-dialog>
|
||
|
||
<manual-create-pending-order-dialog v-model="manualCreateDialogVisible" @success="loadData" />
|
||
<excel-import-pending-order-dialog v-model="importOrderDialogVisible" @success="loadData" />
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<script setup lang="ts">
|
||
import { ref, reactive, onMounted, computed } from 'vue'
|
||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||
import { ArrowDown } from '@element-plus/icons-vue'
|
||
import ScanBox from '@/components/ScanBox/index.vue'
|
||
import UpperTable from '@/components/UpperTable/index.vue'
|
||
import * as indexApi from '@/api/index/index'
|
||
import { orderQueryOrderLogs } from '@/api/order.index/orderindex'
|
||
import { orderExpectionOrder } from '@/api/order.expectionorder/orderexpectionorder'
|
||
import { orderPendingOrder } from '@/api/order.pendingorder/orderpendingOrder'
|
||
|
||
import {
|
||
expectionColumns,
|
||
expectionOrderAvailableFields,
|
||
expectionOrderbuttonList,
|
||
translateOrderField,
|
||
formatOrderTime,
|
||
getTagType
|
||
} from './config/order-common-config'
|
||
|
||
const EXPORT_TIME_PROPS = new Set([
|
||
'create_at',
|
||
'updated_at',
|
||
'pay_time',
|
||
'place_order_time',
|
||
'operate_time',
|
||
'delivery_time'
|
||
])
|
||
import WorkbenchOrderDetail from './component/WorkbenchOrderDetail.vue'
|
||
import ArchiveOrderPanel from './component/ArchiveOrderPanel.vue'
|
||
import log from './component/log.vue'
|
||
import ManualCreatePendingOrderDialog from './component/ManualCreatePendingOrderDialog.vue'
|
||
import ExcelImportPendingOrderDialog from './component/ExcelImportPendingOrderDialog.vue'
|
||
import { exportUpperTableRows } from './utils/export'
|
||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||
|
||
const scanBox = ref<any>(null)
|
||
const upperTable = ref<any>(null)
|
||
|
||
const presetTree = ref<any[]>([])
|
||
const availableFieldsRef = reactive(JSON.parse(JSON.stringify(expectionOrderAvailableFields)))
|
||
|
||
const activeTab = ref('items')
|
||
|
||
const list = ref<any[]>([])
|
||
const loading = ref(false)
|
||
const exportLoading = ref(false)
|
||
const allocateLoading = ref(false)
|
||
const storageAllocateLoading = ref(false)
|
||
const updateOrderMetaLoading = ref(false)
|
||
const queryTime = ref(0)
|
||
|
||
const actionLoading = ref(false)
|
||
const allocateDialogVisible = ref(false)
|
||
const allocatePendingRows = ref<any[]>([])
|
||
|
||
const storageDialogVisible = ref(false)
|
||
const storageDialogMode = ref<'allocate' | 'cancel'>('allocate')
|
||
const storagePendingOrderIds = ref<Array<number | string>>([])
|
||
const storageForm = reactive<{ allowStorageLocation: boolean }>({
|
||
allowStorageLocation: false
|
||
})
|
||
const cloneOrderDialogVisible = ref(false)
|
||
const cloneOrderLoading = ref(false)
|
||
const cloneSourceOrderId = ref<number | null>(null)
|
||
const cloneSourceOrderCode = ref('')
|
||
const manualCreateDialogVisible = ref(false)
|
||
const importOrderDialogVisible = ref(false)
|
||
const resolveExceptionDialogVisible = ref(false)
|
||
const resolveExceptionLoading = ref(false)
|
||
const resolveExceptionOrderIds = ref<number[]>([])
|
||
const updateOrderMetaDialogVisible = ref(false)
|
||
const updateOrderMetaDialogMode = ref<'express' | 'platform'>('express')
|
||
const updateOrderMetaOrderIds = ref<number[]>([])
|
||
const updateOrderMetaForm = reactive({
|
||
code: ''
|
||
})
|
||
const expressCodeOptions = ref<Array<{ label: string; value: string }>>([])
|
||
const platformCodeOptions = ref<Array<{ label: string; value: string }>>([])
|
||
|
||
const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 })
|
||
const tableSize = ref('small')
|
||
const columns = ref(expectionColumns)
|
||
|
||
|
||
const selectionRows = ref<any[]>([])
|
||
const hasSelection = ref(false)
|
||
const selectedOrderId = ref<number | string | null>(null)
|
||
const detailVisible = ref(true)
|
||
|
||
const quickSearch = ref('')
|
||
|
||
const scrollContainerRef = ref<HTMLElement | null>(null)
|
||
const isDragging = ref(false)
|
||
const startX = ref(0)
|
||
const scrollLeftStart = ref(0)
|
||
|
||
const handleToolbarWheel = (e: WheelEvent) => {
|
||
if (scrollContainerRef.value) {
|
||
e.preventDefault()
|
||
scrollContainerRef.value.scrollLeft += e.deltaY
|
||
}
|
||
}
|
||
|
||
const handleMouseDown = (e: MouseEvent) => {
|
||
if (!scrollContainerRef.value) return
|
||
isDragging.value = true
|
||
startX.value = e.pageX - scrollContainerRef.value.offsetLeft
|
||
scrollLeftStart.value = scrollContainerRef.value.scrollLeft
|
||
}
|
||
|
||
const handleMouseMove = (e: MouseEvent) => {
|
||
if (!isDragging.value || !scrollContainerRef.value) return
|
||
e.preventDefault()
|
||
const x = e.pageX - scrollContainerRef.value.offsetLeft
|
||
const walk = (x - startX.value) * 1.5
|
||
scrollContainerRef.value.scrollLeft = scrollLeftStart.value - walk
|
||
}
|
||
|
||
const handleMouseUp = () => {
|
||
isDragging.value = false
|
||
}
|
||
|
||
const selectedRow = computed(() => {
|
||
return list.value.find((i: any) => i.id === selectedOrderId.value) || null
|
||
})
|
||
|
||
const { splitStackRef, beginSplitDrag, lowerPaneStyle, upperPaneStyle } = useVerticalSplitPane({
|
||
defaultLowerPercent: 38
|
||
})
|
||
|
||
const upperPaneFullStyle = computed(() => ({
|
||
flex: '1 1 auto',
|
||
minHeight: '0',
|
||
overflow: 'hidden',
|
||
}))
|
||
|
||
function toggleDetailVisible() {
|
||
detailVisible.value = !detailVisible.value
|
||
}
|
||
|
||
const updateOrderMetaOptions = computed(() => {
|
||
return updateOrderMetaDialogMode.value === 'express'
|
||
? expressCodeOptions.value
|
||
: platformCodeOptions.value
|
||
})
|
||
|
||
function orderFlagFullText(row: any): string {
|
||
const v = row?.order_flag
|
||
if (v == null) return ''
|
||
return String(v).trim()
|
||
}
|
||
|
||
/** 列表格内省略展示,完整内容见 tooltip,点击复制全文 */
|
||
function orderFlagCellText(row: any): string {
|
||
const t = orderFlagFullText(row)
|
||
if (!t) return '—'
|
||
const max = 48
|
||
return t.length > max ? `${t.slice(0, max)}…` : t
|
||
}
|
||
|
||
async function copyOrderFlag(row: any) {
|
||
const text = orderFlagFullText(row)
|
||
if (!text) {
|
||
ElMessage.warning('当前行无订单标记可复制')
|
||
return
|
||
}
|
||
try {
|
||
if (navigator.clipboard?.writeText) {
|
||
await navigator.clipboard.writeText(text)
|
||
} else {
|
||
throw new Error('no clipboard api')
|
||
}
|
||
ElMessage.success('订单标记已复制到剪贴板')
|
||
} catch {
|
||
try {
|
||
const ta = document.createElement('textarea')
|
||
ta.value = text
|
||
ta.setAttribute('readonly', 'readonly')
|
||
ta.style.position = 'fixed'
|
||
ta.style.left = '-9999px'
|
||
document.body.appendChild(ta)
|
||
ta.select()
|
||
document.execCommand('copy')
|
||
document.body.removeChild(ta)
|
||
ElMessage.success('订单标记已复制到剪贴板')
|
||
} catch {
|
||
ElMessage.error('复制失败,请手动复制')
|
||
}
|
||
}
|
||
}
|
||
|
||
function normalizePositiveIntId(raw: unknown): number | null {
|
||
if (raw === undefined || raw === null || raw === '') return null
|
||
const n = typeof raw === 'number' ? raw : Number(raw)
|
||
if (!Number.isInteger(n) || n <= 0) return null
|
||
return n
|
||
}
|
||
|
||
function normalizeCode(value: unknown) {
|
||
return String(value ?? '').trim()
|
||
}
|
||
|
||
function mapCodeOptions(rawList: any[], codeKeys: string[], nameKeys: string[]) {
|
||
const result: Array<{ label: string; value: string }> = []
|
||
const seen = new Set<string>()
|
||
for (const item of rawList || []) {
|
||
const code = normalizeCode(codeKeys.map((k) => item?.[k]).find((v) => v !== undefined && v !== null && v !== ''))
|
||
if (!code || seen.has(code)) continue
|
||
const name = normalizeCode(nameKeys.map((k) => item?.[k]).find((v) => v !== undefined && v !== null && v !== ''))
|
||
result.push({
|
||
value: code,
|
||
label: name ? `${code} - ${name}` : code
|
||
})
|
||
seen.add(code)
|
||
}
|
||
return result
|
||
}
|
||
|
||
function mapNameOptions(rawList: any[], nameKeys: string[]) {
|
||
const result: Array<{ label: string; value: string }> = []
|
||
const seen = new Set<string>()
|
||
for (const item of rawList || []) {
|
||
const name = normalizeCode(nameKeys.map((k) => item?.[k]).find((v) => v !== undefined && v !== null && v !== ''))
|
||
if (!name || seen.has(name)) continue
|
||
result.push({ value: name, label: name })
|
||
seen.add(name)
|
||
}
|
||
return result
|
||
}
|
||
|
||
function getSelectedIds(): number[] {
|
||
const ids: number[] = []
|
||
for (const item of selectionRows.value) {
|
||
const id = normalizePositiveIntId(item?.id)
|
||
if (id !== null) ids.push(id)
|
||
}
|
||
return ids
|
||
}
|
||
|
||
function openStorageDialog(mode: 'allocate' | 'cancel') {
|
||
if (!selectionRows.value.length) {
|
||
ElMessage.warning(mode === 'cancel' ? '请先勾选需要取消分配储位的订单' : '请先勾选需要分配储位的订单')
|
||
return
|
||
}
|
||
const ids = getSelectedIds()
|
||
if (!ids.length) {
|
||
ElMessage.error('选中行缺少订单 id,请刷新后重试')
|
||
return
|
||
}
|
||
storageDialogMode.value = mode
|
||
storagePendingOrderIds.value = [...ids]
|
||
storageForm.allowStorageLocation = false
|
||
storageDialogVisible.value = true
|
||
}
|
||
|
||
function openStorageAllocateDialog() {
|
||
openStorageDialog('allocate')
|
||
}
|
||
|
||
function openStorageCancelDialog() {
|
||
openStorageDialog('cancel')
|
||
}
|
||
|
||
function resetStorageAllocateDialog() {
|
||
storageDialogMode.value = 'allocate'
|
||
storagePendingOrderIds.value = []
|
||
storageForm.allowStorageLocation = false
|
||
}
|
||
|
||
async function submitStorageAllocate() {
|
||
const order_ids = [...storagePendingOrderIds.value]
|
||
if (!order_ids.length || storageAllocateLoading.value) return
|
||
|
||
const isCancel = storageDialogMode.value === 'cancel'
|
||
|
||
storageAllocateLoading.value = true
|
||
try {
|
||
const payload: Record<string, any> = isCancel
|
||
? { order_ids }
|
||
: {
|
||
order_ids,
|
||
allow_storage_location: storageForm.allowStorageLocation
|
||
}
|
||
const res = isCancel
|
||
? await orderPendingOrder.cancelAllocateStorage(payload)
|
||
: await orderPendingOrder.allocateStorage(payload)
|
||
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
|
||
if (ok) {
|
||
ElMessage.success(res.message || (isCancel ? '取消分配储位已提交' : '储位分配已提交'))
|
||
storageDialogVisible.value = false
|
||
upperTable.value?.clearSelection?.()
|
||
selectionRows.value = []
|
||
hasSelection.value = false
|
||
await loadData()
|
||
} else {
|
||
ElMessage.error(res?.message || (isCancel ? '取消分配储位失败' : '储位分配失败'))
|
||
}
|
||
} catch {
|
||
ElMessage.error(isCancel ? '取消分配储位失败' : '储位分配失败')
|
||
} finally {
|
||
storageAllocateLoading.value = false
|
||
}
|
||
}
|
||
|
||
async function callAction(title: string, action: () => Promise<any>, successText: string) {
|
||
if (actionLoading.value) return
|
||
actionLoading.value = true
|
||
try {
|
||
const res = await action()
|
||
if (res && (res.code === 1 || res.code === 200 || res.flag === 'success')) {
|
||
ElMessage.success(`${successText} ${res.data?.updated_count || 0} 条`)
|
||
upperTable.value?.clearSelection?.()
|
||
selectionRows.value = []
|
||
hasSelection.value = false
|
||
await loadData()
|
||
} else {
|
||
ElMessage.error(res?.message || `${title}失败`)
|
||
}
|
||
} catch {
|
||
ElMessage.error(`${title}失败`)
|
||
} finally {
|
||
actionLoading.value = false
|
||
}
|
||
}
|
||
|
||
async function handleReverseReview() {
|
||
const ids = getSelectedIds()
|
||
if (!ids.length) {
|
||
ElMessage.warning('请先选择订单')
|
||
return
|
||
}
|
||
try {
|
||
await ElMessageBox.confirm(`确定将选中的 ${ids.length} 条订单反审回待审核吗?`, '确认', { type: 'warning' })
|
||
await callAction('反审', () => orderPendingOrder.reverseReviewOrder({ ids }), '反审成功')
|
||
} catch {}
|
||
}
|
||
|
||
async function handleMarkPendingOutbound() {
|
||
const ids = getSelectedIds()
|
||
if (!ids.length) {
|
||
ElMessage.warning('请先选择订单')
|
||
return
|
||
}
|
||
try {
|
||
await ElMessageBox.confirm(`确定将选中的 ${ids.length} 条订单标记为待出库吗?`, '确认', { type: 'warning' })
|
||
await callAction(
|
||
'标记待出库',
|
||
() => orderPendingOrder.markPendingOutboundOrder({ ids }),
|
||
'标记待出库成功'
|
||
)
|
||
} catch {}
|
||
}
|
||
|
||
async function handleCancelOrder() {
|
||
const ids = getSelectedIds()
|
||
if (!ids.length) {
|
||
ElMessage.warning('请先选择订单')
|
||
return
|
||
}
|
||
try {
|
||
await ElMessageBox.confirm(`确定取消选中的 ${ids.length} 条订单吗?`, '确认', { type: 'error' })
|
||
await callAction('取消订单', () => orderPendingOrder.cancelOrder({ ids }), '取消订单成功')
|
||
} catch {}
|
||
}
|
||
|
||
function openCloneOrderDialog() {
|
||
if (selectionRows.value.length !== 1) {
|
||
ElMessage.warning('请选择 1 条订单进行克隆')
|
||
return
|
||
}
|
||
const row = selectionRows.value[0] || {}
|
||
const orderId = normalizePositiveIntId(row?.order_id ?? row?.id)
|
||
if (!orderId) {
|
||
ElMessage.error('未识别到有效订单ID')
|
||
return
|
||
}
|
||
cloneSourceOrderId.value = orderId
|
||
cloneSourceOrderCode.value = String(row?.delivery_order_code || '')
|
||
cloneOrderDialogVisible.value = true
|
||
}
|
||
|
||
function resetCloneOrderDialog() {
|
||
cloneSourceOrderId.value = null
|
||
cloneSourceOrderCode.value = ''
|
||
}
|
||
|
||
async function submitCloneOrder() {
|
||
if (!cloneSourceOrderId.value || cloneOrderLoading.value) return
|
||
cloneOrderLoading.value = true
|
||
try {
|
||
const res = await orderPendingOrder.cloneOrder({ order_id: cloneSourceOrderId.value })
|
||
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
|
||
if (!ok) {
|
||
ElMessage.error(res?.message || '克隆订单失败')
|
||
return
|
||
}
|
||
const data = res?.data || {}
|
||
ElMessage.success(`克隆成功:原订单 ${data.source_order_id ?? cloneSourceOrderId.value} -> 新订单 ${data.new_order_id ?? '-'}`)
|
||
cloneOrderDialogVisible.value = false
|
||
upperTable.value?.clearSelection?.()
|
||
selectionRows.value = []
|
||
hasSelection.value = false
|
||
await loadData()
|
||
} catch {
|
||
ElMessage.error('克隆订单失败')
|
||
} finally {
|
||
cloneOrderLoading.value = false
|
||
}
|
||
}
|
||
|
||
function computeAvailableBusinessKeys(expressNumbers: any, count = 1): number[] {
|
||
const used = new Set<number>()
|
||
if (Array.isArray(expressNumbers)) {
|
||
for (const item of expressNumbers) {
|
||
const n = Number(item)
|
||
if (Number.isFinite(n) && n > 0 && Number.isInteger(n)) {
|
||
used.add(n)
|
||
}
|
||
}
|
||
}
|
||
const need = Math.max(1, Number(count) || 1)
|
||
const result: number[] = []
|
||
let cursor = 1
|
||
while (result.length < need) {
|
||
if (!used.has(cursor)) {
|
||
result.push(cursor)
|
||
}
|
||
cursor += 1
|
||
}
|
||
return result
|
||
}
|
||
|
||
function openAllocateExpressDialog() {
|
||
if (!selectionRows.value.length) {
|
||
ElMessage.warning('请先勾选需要分配快递号的订单')
|
||
return
|
||
}
|
||
const invalid = selectionRows.value.filter((row: any) => {
|
||
const oid = row?.order_id ?? row?.id
|
||
return normalizePositiveIntId(oid) === null
|
||
})
|
||
if (invalid.length) {
|
||
ElMessage.error('存在无法识别有效 order_id 的行,请刷新列表后重试')
|
||
return
|
||
}
|
||
allocatePendingRows.value = selectionRows.value.map((row: any) => ({ ...row }))
|
||
allocateDialogVisible.value = true
|
||
}
|
||
|
||
function resetAllocateDialog() {
|
||
allocatePendingRows.value = []
|
||
}
|
||
|
||
function buildAllocateExpressPayload(rows: any[]): Array<Record<string, any>> {
|
||
const out: Array<Record<string, any>> = []
|
||
for (const row of rows) {
|
||
const base = { ...row }
|
||
const order_id = normalizePositiveIntId(base.order_id ?? base.id)
|
||
if (order_id === null) continue
|
||
const business_key = computeAvailableBusinessKeys(row.express_numbers, 1)
|
||
out.push({
|
||
...base,
|
||
order_id,
|
||
business_key
|
||
})
|
||
}
|
||
return out
|
||
}
|
||
|
||
async function submitAllocateExpress() {
|
||
const rows = allocatePendingRows.value
|
||
if (!rows.length || allocateLoading.value) return
|
||
|
||
allocateLoading.value = true
|
||
try {
|
||
const orders = buildAllocateExpressPayload(rows)
|
||
if (!orders.length) {
|
||
ElMessage.error('没有有效的订单 ID,无法分配快递号')
|
||
return
|
||
}
|
||
const res = await orderPendingOrder.allocateExpressCode({ orders })
|
||
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
|
||
if (ok) {
|
||
const data = res.data || {}
|
||
const summary = data.summary
|
||
const successLen = Array.isArray(data.success) ? data.success.length : undefined
|
||
const failedLen = Array.isArray(data.failed) ? data.failed.length : undefined
|
||
let extra = ''
|
||
if (summary && typeof summary === 'object') {
|
||
extra = ` ${JSON.stringify(summary)}`
|
||
} else if (successLen !== undefined || failedLen !== undefined) {
|
||
extra = ` 成功 ${successLen ?? '—'} 条,失败 ${failedLen ?? '—'} 条`
|
||
}
|
||
ElMessage.success((res.message || '分配请求已提交') + extra)
|
||
allocateDialogVisible.value = false
|
||
upperTable.value?.clearSelection?.()
|
||
selectionRows.value = []
|
||
hasSelection.value = false
|
||
await loadData()
|
||
} else {
|
||
ElMessage.error(res?.message || '分配快递号失败')
|
||
}
|
||
} catch {
|
||
ElMessage.error('分配快递号失败')
|
||
} finally {
|
||
allocateLoading.value = false
|
||
}
|
||
}
|
||
|
||
onMounted(() => {
|
||
loadData()
|
||
loadFilterData()
|
||
loadOrderMetaOptions()
|
||
})
|
||
|
||
async function loadData() {
|
||
if (loading.value) return
|
||
loading.value = true
|
||
const start = Date.now()
|
||
try {
|
||
const where = buildWhereConditions(scanBox.value?.getConditions?.() || {})
|
||
if (quickSearch.value) {
|
||
where.delivery_order_code = {
|
||
operator: 'like',
|
||
value: quickSearch.value,
|
||
type: 'text'
|
||
}
|
||
}
|
||
const params = {
|
||
pagination: {
|
||
page: pagination.currentPage,
|
||
pageSize: pagination.pageSize
|
||
},
|
||
where,
|
||
sort: {
|
||
sortField: 'updated_at',
|
||
sortOrder: 'DESC' as const
|
||
}
|
||
}
|
||
const res: any = await orderExpectionOrder.list(params)
|
||
if (res && (res.code === 200 || res.code === 1)) {
|
||
const responseData = res.data || {}
|
||
list.value = responseData.list || []
|
||
pagination.total = responseData.pagination?.total || responseData.total || (responseData.list ? responseData.list.length : 0)
|
||
} else {
|
||
list.value = []
|
||
pagination.total = 0
|
||
}
|
||
} catch (e) {
|
||
list.value = []
|
||
pagination.total = 0
|
||
ElMessage.error('获取待处理异常订单列表失败')
|
||
} finally {
|
||
loading.value = false
|
||
queryTime.value = Date.now() - start
|
||
}
|
||
}
|
||
|
||
function buildWhereConditions(rawConditions: Record<string, any>) {
|
||
const where: Record<string, any> = {}
|
||
Object.keys(rawConditions || {}).forEach((key) => {
|
||
const condition = rawConditions[key]
|
||
const normalizedKey = key === 'order_code' ? 'delivery_order_code' : key
|
||
if (condition && typeof condition === 'object' && 'operator' in condition) {
|
||
where[normalizedKey] = Array.isArray(condition.value)
|
||
? { ...condition, value: condition.value[0] ?? '', type: 'text' }
|
||
: condition
|
||
return
|
||
}
|
||
if (condition !== undefined && condition !== null && condition !== '') {
|
||
where[normalizedKey] = {
|
||
operator: 'eq',
|
||
value: Array.isArray(condition) ? condition[0] ?? '' : condition,
|
||
type: 'text'
|
||
}
|
||
}
|
||
})
|
||
return where
|
||
}
|
||
|
||
async function loadFilterData() {
|
||
try {
|
||
const [storesRes]: any = await Promise.all([
|
||
indexApi.loadStores({ type: 'order' })
|
||
])
|
||
if (storesRes?.code === 200) {
|
||
const f = availableFieldsRef.find((i: any) => i.value === 'store_id')
|
||
if (f) f.options = storesRes.stores || []
|
||
}
|
||
} catch (e) {}
|
||
}
|
||
|
||
async function loadOrderMetaOptions() {
|
||
try {
|
||
const [expressRes, platformRes] = await Promise.all([
|
||
indexApi.getExpressList({}),
|
||
indexApi.getPlatformList({})
|
||
])
|
||
const expressData: any = expressRes?.data
|
||
const platformData: any = platformRes?.data
|
||
const expressRaw = expressData?.list || expressData || []
|
||
const platformRaw = platformData?.list || platformData || []
|
||
expressCodeOptions.value = mapCodeOptions(expressRaw, ['code', 'logistics_code', 'express_code'], ['name', 'logistics_name', 'express_name'])
|
||
platformCodeOptions.value = mapCodeOptions(platformRaw, ['code', 'platform_code'], ['name', 'platform_name'])
|
||
const logisticsField = availableFieldsRef.find((i: any) => i.value === 'logistics_name')
|
||
if (logisticsField) {
|
||
logisticsField.options = mapNameOptions(expressRaw, ['name', 'logistics_name', 'express_name'])
|
||
}
|
||
} catch {
|
||
expressCodeOptions.value = []
|
||
platformCodeOptions.value = []
|
||
const logisticsField = availableFieldsRef.find((i: any) => i.value === 'logistics_name')
|
||
if (logisticsField) logisticsField.options = []
|
||
}
|
||
}
|
||
|
||
function handleConditionChange() {
|
||
pagination.currentPage = 1
|
||
loadData()
|
||
}
|
||
|
||
const handleConditionClear = () => {
|
||
pagination.currentPage = 1
|
||
loadData()
|
||
}
|
||
|
||
function handleConditionReset() {
|
||
pagination.currentPage = 1
|
||
scanBox.value?.reset?.()
|
||
loadData()
|
||
}
|
||
|
||
function onSelectionChange(rows: any[]) {
|
||
selectionRows.value = rows || []
|
||
hasSelection.value = selectionRows.value.length > 0
|
||
}
|
||
|
||
function handleRowClick(row: any) {
|
||
selectedOrderId.value = row?.id || null
|
||
}
|
||
|
||
function handlePageChange(page: number) {
|
||
pagination.currentPage = page
|
||
loadData()
|
||
}
|
||
|
||
function handlePageSizeChange(size: number) {
|
||
pagination.pageSize = size
|
||
pagination.currentPage = 1
|
||
loadData()
|
||
}
|
||
|
||
function onQuickSearch() {
|
||
pagination.currentPage = 1
|
||
loadData()
|
||
}
|
||
|
||
function openResolveExceptionDialog() {
|
||
if (!selectionRows.value.length) {
|
||
ElMessage.warning('请先勾选需要处理的异常订单')
|
||
return
|
||
}
|
||
const ids = getSelectedIds()
|
||
if (!ids.length) {
|
||
ElMessage.error('选中行缺少有效订单 id,请刷新后重试')
|
||
return
|
||
}
|
||
resolveExceptionOrderIds.value = [...ids]
|
||
resolveExceptionDialogVisible.value = true
|
||
}
|
||
|
||
function resetResolveExceptionDialog() {
|
||
resolveExceptionOrderIds.value = []
|
||
}
|
||
|
||
async function submitResolveException() {
|
||
if (resolveExceptionLoading.value) return
|
||
const ids = [...resolveExceptionOrderIds.value]
|
||
if (!ids.length) {
|
||
ElMessage.warning('没有可处理的异常订单')
|
||
return
|
||
}
|
||
try {
|
||
await ElMessageBox.confirm(
|
||
`确定将选中的 ${ids.length} 条异常订单恢复为待处理状态吗?`,
|
||
'确认处理',
|
||
{ type: 'warning' }
|
||
)
|
||
} catch {
|
||
return
|
||
}
|
||
|
||
resolveExceptionLoading.value = true
|
||
try {
|
||
const res = await orderExpectionOrder.resolveException({ ids })
|
||
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
|
||
if (!ok) {
|
||
ElMessage.error(res?.message || '异常处理失败')
|
||
return
|
||
}
|
||
const updatedCount = Number(res?.data?.updated_count ?? ids.length) || 0
|
||
ElMessage.success(`异常处理成功 ${updatedCount} 条`)
|
||
resolveExceptionDialogVisible.value = false
|
||
upperTable.value?.clearSelection?.()
|
||
selectionRows.value = []
|
||
hasSelection.value = false
|
||
await loadData()
|
||
} catch {
|
||
ElMessage.error('异常处理失败')
|
||
} finally {
|
||
resolveExceptionLoading.value = false
|
||
}
|
||
}
|
||
|
||
function openUpdateOrderMetaDialog(mode: 'express' | 'platform') {
|
||
if (!selectionRows.value.length) {
|
||
ElMessage.warning(mode === 'express' ? '请先勾选需要修改快递的订单' : '请先勾选需要修改平台的订单')
|
||
return
|
||
}
|
||
const ids = getSelectedIds()
|
||
if (!ids.length) {
|
||
ElMessage.error('选中行缺少订单 id,请刷新后重试')
|
||
return
|
||
}
|
||
updateOrderMetaDialogMode.value = mode
|
||
updateOrderMetaOrderIds.value = [...ids]
|
||
updateOrderMetaForm.code = ''
|
||
updateOrderMetaDialogVisible.value = true
|
||
}
|
||
|
||
function openUpdateOrderExpressDialog() {
|
||
openUpdateOrderMetaDialog('express')
|
||
}
|
||
|
||
function openUpdateOrderPlatformDialog() {
|
||
openUpdateOrderMetaDialog('platform')
|
||
}
|
||
|
||
function resetUpdateOrderMetaDialog() {
|
||
updateOrderMetaDialogMode.value = 'express'
|
||
updateOrderMetaOrderIds.value = []
|
||
updateOrderMetaForm.code = ''
|
||
}
|
||
|
||
async function submitUpdateOrderMeta() {
|
||
if (updateOrderMetaLoading.value) return
|
||
const order_ids = [...updateOrderMetaOrderIds.value]
|
||
const code = normalizeCode(updateOrderMetaForm.code)
|
||
if (!order_ids.length) {
|
||
ElMessage.error('没有可提交的订单')
|
||
return
|
||
}
|
||
if (!code) {
|
||
ElMessage.warning(updateOrderMetaDialogMode.value === 'express' ? '请输入快递编码' : '请输入平台编码')
|
||
return
|
||
}
|
||
|
||
updateOrderMetaLoading.value = true
|
||
try {
|
||
const res =
|
||
updateOrderMetaDialogMode.value === 'express'
|
||
? await orderPendingOrder.updateOrderExpress({ order_ids, express_code: code })
|
||
: await orderPendingOrder.updateOrderPlatform({ order_ids, code })
|
||
|
||
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
|
||
if (!ok) {
|
||
ElMessage.error(res?.message || '批量修改失败')
|
||
return
|
||
}
|
||
|
||
const updatedCount = Number(res?.data?.updated_count ?? order_ids.length) || 0
|
||
ElMessage.success(
|
||
`${updateOrderMetaDialogMode.value === 'express' ? '快递信息' : '平台信息'}修改成功 ${updatedCount} 条`
|
||
)
|
||
updateOrderMetaDialogVisible.value = false
|
||
upperTable.value?.clearSelection?.()
|
||
selectionRows.value = []
|
||
hasSelection.value = false
|
||
await loadData()
|
||
} catch {
|
||
ElMessage.error(updateOrderMetaDialogMode.value === 'express' ? '修改快递失败' : '修改平台失败')
|
||
} finally {
|
||
updateOrderMetaLoading.value = false
|
||
}
|
||
}
|
||
|
||
// 统一执行命令
|
||
function handleCommand(commandName: string, subCommand?: string) {
|
||
const handlers: Record<string, Function> = {
|
||
handleExpectionOperation,
|
||
handleExport
|
||
}
|
||
const handler = handlers[commandName]
|
||
if (handler) {
|
||
handler(subCommand)
|
||
}
|
||
}
|
||
|
||
const commandLabels: Record<string, string> = {
|
||
'import-exception-tracking': '异常跟踪单导入',
|
||
'export-exception-tracking': '导出异常跟踪单'
|
||
}
|
||
|
||
async function handleExpectionOperation(command: string) {
|
||
const label = commandLabels[command] || '操作'
|
||
exportLoading.value = true
|
||
setTimeout(() => {
|
||
exportLoading.value = false
|
||
ElMessage.success(`${label}成功`)
|
||
}, 1000)
|
||
}
|
||
|
||
async function handleExport() {
|
||
if (!selectionRows.value.length) {
|
||
ElMessage.warning('请先勾选要导出的订单')
|
||
return
|
||
}
|
||
exportLoading.value = true
|
||
try {
|
||
exportUpperTableRows({
|
||
rows: selectionRows.value,
|
||
columns: columns.value,
|
||
fileName: `异常订单-${Date.now()}.xlsx`,
|
||
transformCell: (prop, value) =>
|
||
EXPORT_TIME_PROPS.has(String(prop)) ? formatOrderTime(value) : translateOrderField(prop, value)
|
||
})
|
||
ElMessage.success('导出完成')
|
||
} catch (error) {
|
||
ElMessage.error('导出失败')
|
||
} finally {
|
||
exportLoading.value = false
|
||
}
|
||
}
|
||
|
||
function openColumnConfigPanel() {
|
||
upperTable.value?.openColumnConfig?.()
|
||
}
|
||
</script>
|
||
|
||
<style scoped lang="scss">
|
||
@use "./styles/order-sub.scss";
|
||
|
||
.order-flag-cell {
|
||
display: inline-block;
|
||
max-width: 100%;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
vertical-align: bottom;
|
||
cursor: pointer;
|
||
color: var(--el-color-primary);
|
||
line-height: 1.5;
|
||
border-bottom: 1px dashed var(--el-color-primary-light-5);
|
||
|
||
&: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;
|
||
}
|
||
}
|
||
|
||
.allocate-confirm-text {
|
||
margin: 0;
|
||
font-size: 14px;
|
||
line-height: 1.6;
|
||
color: #303133;
|
||
}
|
||
|
||
.storage-allocate-form {
|
||
margin-top: 12px;
|
||
}
|
||
|
||
.resolve-exception-form {
|
||
margin-top: 12px;
|
||
}
|
||
|
||
.resolve-exception-ids {
|
||
max-height: 96px;
|
||
overflow-y: auto;
|
||
color: #606266;
|
||
line-height: 1.6;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.order-sub-container .main-content {
|
||
.toolbar {
|
||
.toolbar-left {
|
||
cursor: grab;
|
||
|
||
&:active {
|
||
cursor: grabbing;
|
||
}
|
||
|
||
.toolbar-scroll-container {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
overflow-x: auto;
|
||
scrollbar-width: none;
|
||
&::-webkit-scrollbar {
|
||
display: none;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
|
||
.clone-order-meta {
|
||
margin-top: 12px;
|
||
color: #606266;
|
||
}
|
||
|
||
.clone-order-meta p {
|
||
margin: 4px 0;
|
||
}
|
||
|
||
.detail-page {
|
||
height: 100%;
|
||
overflow-x: hidden;
|
||
overflow-y: auto;
|
||
}
|
||
|
||
.order-detail-wrapper,
|
||
.order-picking-wrapper,
|
||
.order-archive-wrapper,
|
||
.order-log-wrapper {
|
||
height: 100%;
|
||
}
|
||
</style>
|
||
|