610
This commit is contained in:
parent
517bd83c76
commit
00f416d847
BIN
dist.tar.gz
BIN
dist.tar.gz
Binary file not shown.
@ -57,12 +57,73 @@ export type QueryOrderLogListParams = {
|
||||
orderId?: string | number
|
||||
}
|
||||
|
||||
/** order.updateExpressWeighingWeight 请求参数 */
|
||||
export type UpdateExpressWeighingWeightParams = {
|
||||
/** 订单 ID;正整数为订单模式,0 为运单号模式(需配合 waybill_code) */
|
||||
order_id: number | string
|
||||
/** 运单号;多运单订单必填,运单号模式(order_id=0)必填 */
|
||||
waybill_code?: string
|
||||
/** 称重重量(kg),必须大于 0,最多 3 位小数 */
|
||||
weighing_weight: number | string
|
||||
}
|
||||
|
||||
/** order.updateExpressWeighingWeight 团购拆单明细项 */
|
||||
export type UpdateExpressWeighingWeightSplitItem = {
|
||||
business_key: string
|
||||
weighing_weight: number
|
||||
waybill_code: string
|
||||
}
|
||||
|
||||
/** order.updateExpressWeighingWeight 响应 data */
|
||||
export type UpdateExpressWeighingWeightResponse = {
|
||||
order_id?: number
|
||||
waybill_code?: string
|
||||
weighing_weight: number
|
||||
wave_no?: string
|
||||
business_key?: string
|
||||
wave_id?: number
|
||||
total_weight?: number
|
||||
split_count?: number
|
||||
splits?: UpdateExpressWeighingWeightSplitItem[]
|
||||
store_name?: string
|
||||
sys_logistics_name?: string
|
||||
}
|
||||
|
||||
/** order.detail 请求参数 */
|
||||
export type OrderDetailParams = {
|
||||
ids?: Array<number | string> | string | number
|
||||
id?: number | string
|
||||
order_id?: number | string
|
||||
orderId?: number | string
|
||||
tableType?: string
|
||||
tablePosition?: string
|
||||
type?: string
|
||||
moduleName?: string
|
||||
}
|
||||
|
||||
/** order.detail 运单信息项 */
|
||||
export type OrderDetailExpressItem = {
|
||||
waybill_code?: string
|
||||
weighing_weight?: number | null
|
||||
sys_logistics_code?: string
|
||||
sys_logistics_name?: string
|
||||
logistics_code?: string
|
||||
logistics_name?: string
|
||||
logistics_interface_id?: number | null
|
||||
business_key?: string
|
||||
created_at?: number | null
|
||||
}
|
||||
|
||||
/** order.detail 响应 data */
|
||||
export type OrderDetailPayload = {
|
||||
order?: Record<string, any>
|
||||
detail?: Record<string, any>
|
||||
orderItems?: any[]
|
||||
items?: any[]
|
||||
expresses?: OrderDetailExpressItem[]
|
||||
waybill_codes?: string[]
|
||||
}
|
||||
|
||||
export type BindExpressPackageMaterialParams = {
|
||||
order_id: number | string
|
||||
waybill_code: string
|
||||
@ -224,8 +285,8 @@ export function orderExportTaskProgress(data: OrderExportTaskProgressParams): Pr
|
||||
} as any)
|
||||
}
|
||||
|
||||
/** 订单明细行(历史接口 order.detail,未纳入远端 module 清单) */
|
||||
export function orderDetail(data: Record<string, any> = {}): Promise<any> {
|
||||
/** order.detail:查询单个订单详情,返回订单头、商品明细和运单信息 */
|
||||
export function orderDetail(data: OrderDetailParams = {}): Promise<any> {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
|
||||
@ -1,4 +1,8 @@
|
||||
import request from '@/utils/request'
|
||||
import {
|
||||
orderUpdateExpressWeighingWeight,
|
||||
type UpdateExpressWeighingWeightParams
|
||||
} from '@/api/order.index/orderindex'
|
||||
|
||||
const v = '1.0'
|
||||
|
||||
@ -167,21 +171,9 @@ export const orderRecheckOrder = {
|
||||
confirmIntercept
|
||||
}
|
||||
|
||||
/** order.updateExpressWeighingWeight:更新订单运单称重重量 */
|
||||
export function updateExpressWeighingWeight(data: {
|
||||
order_id: number | string
|
||||
waybill_code?: string
|
||||
weighing_weight: number | string
|
||||
}) {
|
||||
return request({
|
||||
url: '/system',
|
||||
method: 'post',
|
||||
params: {
|
||||
method: 'order.updateExpressWeighingWeight',
|
||||
v,
|
||||
timestamp: Date.now()
|
||||
},
|
||||
data,
|
||||
isSystemApi: true
|
||||
} as any)
|
||||
export type { UpdateExpressWeighingWeightParams }
|
||||
|
||||
/** @deprecated 请使用 orderUpdateExpressWeighingWeight from @/api/order.index/orderindex */
|
||||
export function updateExpressWeighingWeight(data: UpdateExpressWeighingWeightParams) {
|
||||
return orderUpdateExpressWeighingWeight(data)
|
||||
}
|
||||
|
||||
@ -29,7 +29,13 @@
|
||||
<div class="filter-scroll-area" ref="filterScroll">
|
||||
<!-- 所有字段配置的表单 -->
|
||||
<div class="field-forms">
|
||||
<template v-for="field in availableFields" :key="field.value">
|
||||
<template v-for="(field, fieldIndex) in availableFields" :key="field.value">
|
||||
<div
|
||||
v-if="resolveFieldGroupLabel(field, fieldIndex)"
|
||||
class="field-group-divider"
|
||||
>
|
||||
<span class="field-group-label">{{ resolveFieldGroupLabel(field, fieldIndex) }}</span>
|
||||
</div>
|
||||
<!-- 文本类型 -->
|
||||
<div v-if="field.type === 'text'" class="field-form-item">
|
||||
<div class="field-label">
|
||||
@ -193,23 +199,24 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 日期范围类型,operator 固定为 between -->
|
||||
<div v-else-if="field.type === 'daterange'" class="field-form-item">
|
||||
<!-- 日期/日期时间范围类型,operator 固定为 between -->
|
||||
<div v-else-if="isRangePickerField(field)" class="field-form-item">
|
||||
<div class="field-label">
|
||||
<span>{{ field.label }}</span>
|
||||
<el-tag v-if="field.required" size="small" type="danger">必填</el-tag>
|
||||
</div>
|
||||
<div class="field-control">
|
||||
<div class="field-control field-control--range">
|
||||
<el-date-picker
|
||||
v-model="customConditions[field.value].value"
|
||||
type="daterange"
|
||||
:type="getRangePickerType(field)"
|
||||
range-separator="至"
|
||||
:start-placeholder="field.startPlaceholder || '开始日期'"
|
||||
:end-placeholder="field.endPlaceholder || '结束日期'"
|
||||
: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%;"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
@change="handleCustomChange"
|
||||
/>
|
||||
</div>
|
||||
@ -471,6 +478,9 @@ const props = defineProps({
|
||||
],
|
||||
daterange: [
|
||||
{ value: 'between', label: '区间' }
|
||||
],
|
||||
datetimerange: [
|
||||
{ value: 'between', label: '区间' }
|
||||
]
|
||||
})
|
||||
},
|
||||
@ -694,6 +704,61 @@ function normalizeTextValue(field: any) {
|
||||
}
|
||||
}
|
||||
|
||||
const defaultDayStart = new Date(2000, 0, 1, 0, 0, 0)
|
||||
const defaultDayEnd = new Date(2000, 0, 1, 23, 59, 59)
|
||||
|
||||
function isRangePickerFieldType(type: string) {
|
||||
return type === 'daterange' || type === 'datetimerange'
|
||||
}
|
||||
|
||||
function isRangePickerField(field: any) {
|
||||
return isRangePickerFieldType(String(field?.type || ''))
|
||||
}
|
||||
|
||||
function isDateTimeRangeField(field: any) {
|
||||
return field?.type === 'datetimerange'
|
||||
}
|
||||
|
||||
function getRangePickerType(field: any) {
|
||||
return isDateTimeRangeField(field) ? 'datetimerange' : 'daterange'
|
||||
}
|
||||
|
||||
function getRangePickerFormat(field: any) {
|
||||
if (field?.format) return field.format
|
||||
return isDateTimeRangeField(field) ? 'YYYY-MM-DD HH:mm' : 'YYYY-MM-DD'
|
||||
}
|
||||
|
||||
function getRangePickerValueFormat(field: any) {
|
||||
if (field?.valueFormat) return field.valueFormat
|
||||
return isDateTimeRangeField(field) ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD'
|
||||
}
|
||||
|
||||
function getRangePickerStartPlaceholder(field: any) {
|
||||
return isDateTimeRangeField(field) ? '开始时间' : '开始日期'
|
||||
}
|
||||
|
||||
function getRangePickerEndPlaceholder(field: any) {
|
||||
return isDateTimeRangeField(field) ? '结束时间' : '结束日期'
|
||||
}
|
||||
|
||||
function getRangePickerDefaultTime(field: any) {
|
||||
if (!isDateTimeRangeField(field)) return undefined
|
||||
return [defaultDayStart, defaultDayEnd] as [Date, Date]
|
||||
}
|
||||
|
||||
function resolveRangeConditionMeta(field: any, op: string) {
|
||||
if (isRangePickerFieldType(field.type)) {
|
||||
return {
|
||||
operator: 'between',
|
||||
type: field.type
|
||||
}
|
||||
}
|
||||
return {
|
||||
operator: op,
|
||||
type: field.type
|
||||
}
|
||||
}
|
||||
|
||||
function cloneConditionDefaultValue(value: any) {
|
||||
if (value === undefined) return undefined
|
||||
if (value === null) return null
|
||||
@ -717,15 +782,16 @@ function initCustomConditions(fields: any[], isSilent = false, forceReset = fals
|
||||
defaultValue = ''
|
||||
break
|
||||
case 'daterange':
|
||||
case 'datetimerange':
|
||||
defaultValue = []
|
||||
defaultOperator = 'between' // daterange 固定使用 between
|
||||
defaultOperator = 'between'
|
||||
break
|
||||
default:
|
||||
defaultValue = undefined
|
||||
}
|
||||
|
||||
// daterange 已在上面 switch 设置了 defaultOperator,其他类型按字段配置或默认列表确定
|
||||
if (field.type !== 'daterange') {
|
||||
if (!isRangePickerFieldType(field.type)) {
|
||||
if (field.operators && Array.isArray(field.operators) && field.operators.length > 0) {
|
||||
defaultOperator = field.defaultOperator || field.operators[0]
|
||||
} else {
|
||||
@ -799,6 +865,15 @@ function handleTabChange(pane: any) {
|
||||
}
|
||||
}
|
||||
|
||||
function resolveFieldGroupLabel(field: any, index: number | string): string | null {
|
||||
const fieldIndex = Number(index)
|
||||
const group = field?.group
|
||||
if (!group || typeof group !== 'string') return null
|
||||
if (fieldIndex === 0) return group
|
||||
const prev = props.availableFields[fieldIndex - 1] as any
|
||||
return prev?.group === group ? null : group
|
||||
}
|
||||
|
||||
function getOperators(field: any) {
|
||||
if (field.operators && field.operators.length > 0) {
|
||||
const operatorDefinitions = props.defaultOperators[field.type as keyof typeof props.defaultOperators] || []
|
||||
@ -898,9 +973,9 @@ function buildAndEmitCustomCondition() {
|
||||
}
|
||||
}
|
||||
|
||||
// daterange 固定 operator = between
|
||||
const finalOp = field.type === 'daterange' ? 'between' : op
|
||||
const finalType = field.type === 'daterange' ? 'daterange' : field.type
|
||||
const rangeMeta = resolveRangeConditionMeta(field, op)
|
||||
const finalOp = rangeMeta.operator
|
||||
const finalType = rangeMeta.type
|
||||
|
||||
if (conditionValue !== undefined &&
|
||||
conditionValue !== null &&
|
||||
@ -1064,8 +1139,9 @@ function buildConditionsObject() {
|
||||
if (values.length > 0) conditionValue = values
|
||||
}
|
||||
|
||||
const finalOp = field.type === 'daterange' ? 'between' : op
|
||||
const finalType = field.type === 'daterange' ? 'daterange' : field.type
|
||||
const rangeMeta = resolveRangeConditionMeta(field, op)
|
||||
const finalOp = rangeMeta.operator
|
||||
const finalType = rangeMeta.type
|
||||
|
||||
if (conditionValue !== undefined &&
|
||||
conditionValue !== null &&
|
||||
@ -1216,6 +1292,26 @@ defineExpose({ getConditions, reset, clear, getFieldDraft, setFieldCondition, su
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.field-group-divider {
|
||||
margin-top: 4px;
|
||||
padding-top: 4px;
|
||||
}
|
||||
|
||||
.field-group-divider:not(:first-child) {
|
||||
border-top: 1px dashed #e8e8e8;
|
||||
margin-top: 8px;
|
||||
padding-top: 12px;
|
||||
}
|
||||
|
||||
.field-group-label {
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: #909399;
|
||||
letter-spacing: 0.5px;
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.field-form-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@ -1265,6 +1361,19 @@ defineExpose({ getConditions, reset, clear, getFieldDraft, setFieldCondition, su
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.field-control--range {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.field-control--range :deep(.el-date-editor--daterange),
|
||||
.field-control--range :deep(.el-date-editor--datetimerange) {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.field-control--range :deep(.el-range-input) {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.field-control :deep(.el-input__wrapper),
|
||||
.field-control :deep(.el-select__wrapper) {
|
||||
border-radius: 4px;
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<create-pending-order-dialog
|
||||
v-if="sessionActive"
|
||||
v-if="sessionActive && dialogVisible"
|
||||
v-model="dialogVisible"
|
||||
/>
|
||||
<create-order-float-widget />
|
||||
|
||||
@ -83,20 +83,18 @@
|
||||
</div>
|
||||
|
||||
<div class="detail-container">
|
||||
<KeepAlive>
|
||||
<div v-if="activeTab === 'detail'" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel :row="selectedRow" :detail-request="fetchArchiveOrderDetail" />
|
||||
<div v-if="activeTab === 'detail'" :key="`detail-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel :key="selectedOrderId" :row="selectedRow" :detail-request="fetchArchiveOrderDetail" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'items'" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :row="selectedRow" :detail-request="fetchArchiveOrderDetail" />
|
||||
<div v-else-if="activeTab === 'items'" :key="`items-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :key="selectedOrderId" :row="selectedRow" :detail-request="fetchArchiveOrderDetail" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'fulfillment'" class="detail-page">
|
||||
<p>履约历程加载中...</p>
|
||||
</div>
|
||||
<div v-else class="detail-page order-log-wrapper">
|
||||
<log :data="selectedRow" />
|
||||
<div v-else :key="`logs-${selectedOrderId}`" class="detail-page order-log-wrapper">
|
||||
<log :key="selectedOrderId" :data="selectedRow" />
|
||||
</div>
|
||||
</KeepAlive>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -146,7 +144,8 @@ import OrderItemsDetailPanel from './component/OrderItemsDetailPanel.vue'
|
||||
import log from './component/log.vue'
|
||||
import OrderExportProgressDialog from './component/OrderExportProgressDialog.vue'
|
||||
import { createOrderPageExport } from './utils/order-page-export'
|
||||
import { parseOrderListResponse } from './utils/order-index-helpers'
|
||||
import { buildOrderWhereConditions, parseOrderListResponse } from './utils/order-index-helpers'
|
||||
import { useOrderListPageCleanup } from './utils/use-order-list-page-cleanup'
|
||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||
import OrderToolbarButtonGroup from './component/OrderToolbarButtonGroup.vue'
|
||||
import { createSimpleListToolbarController } from './utils/toolbar-actions'
|
||||
@ -225,6 +224,8 @@ onMounted(() => {
|
||||
loadFilterData()
|
||||
})
|
||||
|
||||
useOrderListPageCleanup({ list, selectionRows, selectedOrderId })
|
||||
|
||||
async function loadData() {
|
||||
if (loading.value) return
|
||||
loading.value = true
|
||||
@ -260,30 +261,8 @@ async function loadData() {
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
function buildWhere() {
|
||||
let where = buildWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
let where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
if (quickSearch.value) {
|
||||
where.delivery_order_code = {
|
||||
operator: 'like',
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
width="92%"
|
||||
align-center
|
||||
append-to-body
|
||||
destroy-on-close
|
||||
:close-on-click-modal="false"
|
||||
:before-close="handleBeforeClose"
|
||||
>
|
||||
@ -11,9 +12,9 @@
|
||||
<div class="create-order-dialog-header">
|
||||
<span class="create-order-dialog-title">建单</span>
|
||||
<div class="create-order-dialog-actions">
|
||||
<el-button link type="primary" @click="handleMinimize">
|
||||
<!-- <el-button link type="primary" @click="handleMinimize">
|
||||
收起后台
|
||||
</el-button>
|
||||
</el-button> -->
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -385,10 +386,10 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, ref, watch } from 'vue'
|
||||
import { computed, nextTick, onBeforeUnmount, onMounted, ref, watch } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import type { DialogBeforeCloseFn } from 'element-plus'
|
||||
import { useCreateOrderSession } from '../composables/useCreateOrderSession'
|
||||
import { useCreateOrderSession, type CreateOrderDraftSnapshot } from '../composables/useCreateOrderSession'
|
||||
import * as XLSX from 'xlsx'
|
||||
import UpperTable from '@/components/UpperTable/index.vue'
|
||||
import SelectProductDialog from './SelectProductDialog.vue'
|
||||
@ -413,6 +414,10 @@ import {
|
||||
getDistrictNodes,
|
||||
resolveRegionCodesFromNames
|
||||
} from '@/views/system/setting/expressinterface/express-interface-config'
|
||||
import {
|
||||
extractStoreListFromResponse,
|
||||
mapStoreListToSelectOptions
|
||||
} from '../config/order-common-config'
|
||||
|
||||
const visible = defineModel<boolean>({ default: false })
|
||||
|
||||
@ -425,7 +430,9 @@ const {
|
||||
minimizeCreateOrderDialog,
|
||||
closeCreateOrderSession,
|
||||
updateFloatSummary,
|
||||
notifyCreateOrderSuccess
|
||||
notifyCreateOrderSuccess,
|
||||
saveCreateOrderDraft,
|
||||
takeCreateOrderDraft
|
||||
} = useCreateOrderSession()
|
||||
|
||||
type ImportOrderResult = {
|
||||
@ -475,18 +482,18 @@ type ImportPreviewRow = {
|
||||
const importPreviewColumns = [
|
||||
{ prop: 'row_no', label: '行号', width: '70', fixed: 'left' },
|
||||
{ prop: '_issue', label: '异常', width: '60', fixed: 'left' },
|
||||
{ prop: 'delivery_order_code', label: '订单号', minWidth: '140', fixed: 'left' },
|
||||
{ prop: 'store_id', label: '货主', minWidth: '160' },
|
||||
{ prop: 'delivery_order_code', label: '发货单号', minWidth: '140', fixed: 'left' },
|
||||
{ prop: 'store_id', label: '货主', minWidth: '160', fixed: 'left' },
|
||||
{ prop: 'selected_items', label: '商品', minWidth: '110', fixed: 'left' },
|
||||
{ prop: 'shop_nick', label: '自定义店铺*', minWidth: '140' },
|
||||
{ prop: 'remark', label: '留言', minWidth: '140' },
|
||||
{ prop: 'name', label: '收件人', minWidth: '100' },
|
||||
{ prop: 'mobile', label: '手机号', minWidth: '120' },
|
||||
{ prop: 'mobile', label: '电话', minWidth: '120' },
|
||||
{ prop: 'tel', label: '电话', minWidth: '120' },
|
||||
{ prop: 'province', label: '省份*', minWidth: '120' },
|
||||
{ prop: 'city', label: '城市*', minWidth: '120' },
|
||||
{ prop: 'area', label: '区/县*', minWidth: '120' },
|
||||
{ prop: 'detail_address', label: '详细地址', minWidth: '150' },
|
||||
{ prop: 'selected_items', label: '商品', minWidth: '110' },
|
||||
{ prop: 'logistics_code', label: '快递', minWidth: '140' },
|
||||
{ prop: 'sys_platform_code', label: '平台', minWidth: '140' },
|
||||
{ prop: 'import_status', label: '状态', width: '90' },
|
||||
@ -540,11 +547,14 @@ watch(visible, (opened) => {
|
||||
if (opened) {
|
||||
void loadStoreOptions()
|
||||
void loadImportSelectOptions()
|
||||
return
|
||||
}
|
||||
})
|
||||
selectProductDialogVisible.value = false
|
||||
selectProductTargetRow.value = null
|
||||
}, { immediate: true })
|
||||
|
||||
watch(
|
||||
[importPreviewRows, importPreviewOrderCount, importOrderLoading, parseImportFileLoading],
|
||||
[() => importPreviewRows.value.length, importPreviewOrderCount, importOrderLoading, parseImportFileLoading],
|
||||
() => {
|
||||
updateFloatSummary({
|
||||
rowCount: importPreviewRows.value.length,
|
||||
@ -553,7 +563,7 @@ watch(
|
||||
parsing: parseImportFileLoading.value
|
||||
})
|
||||
},
|
||||
{ deep: true, immediate: true }
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
watch(resetToken, () => {
|
||||
@ -569,9 +579,54 @@ watch(
|
||||
)
|
||||
|
||||
function handleMinimize() {
|
||||
persistCreateOrderDraft()
|
||||
minimizeCreateOrderDialog()
|
||||
}
|
||||
|
||||
function persistCreateOrderDraft() {
|
||||
if (!importPreviewRows.value.length && !importOrderLoading.value && !parseImportFileLoading.value) {
|
||||
return
|
||||
}
|
||||
const snapshot: CreateOrderDraftSnapshot = {
|
||||
importPreviewRows: importPreviewRows.value.map((row) => ({ ...row, selected_items: [...row.selected_items] })),
|
||||
importOrderFileName: importOrderFileName.value,
|
||||
importOrderResult: importOrderResult.value,
|
||||
defaultStoreId: defaultStoreId.value,
|
||||
activePreviewRowKey: activePreviewRowKey.value,
|
||||
selectedPreviewRowKeys: Array.from(selectedPreviewRowKeys.value),
|
||||
addressPasteText: addressPasteText.value,
|
||||
previewRowKeySeed
|
||||
}
|
||||
saveCreateOrderDraft(snapshot)
|
||||
}
|
||||
|
||||
function restoreCreateOrderDraft() {
|
||||
const snapshot = takeCreateOrderDraft()
|
||||
if (!snapshot) return
|
||||
previewRowKeySeed = snapshot.previewRowKeySeed
|
||||
importPreviewRows.value = snapshot.importPreviewRows as ImportPreviewRow[]
|
||||
importOrderFileName.value = snapshot.importOrderFileName
|
||||
importOrderResult.value = snapshot.importOrderResult as ImportOrderResult | null
|
||||
defaultStoreId.value = snapshot.defaultStoreId
|
||||
activePreviewRowKey.value = snapshot.activePreviewRowKey
|
||||
selectedPreviewRowKeys.value = new Set(snapshot.selectedPreviewRowKeys)
|
||||
addressPasteText.value = snapshot.addressPasteText
|
||||
void nextTick(() => restorePreviewRowSelection())
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
restoreCreateOrderDraft()
|
||||
})
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
selectProductDialogVisible.value = false
|
||||
selectProductTargetRow.value = null
|
||||
storeOptions.value = []
|
||||
importExpressOptions.value = []
|
||||
importPlatformOptions.value = []
|
||||
resetImportOrderDialog()
|
||||
})
|
||||
|
||||
async function confirmDiscardSession() {
|
||||
const hasData =
|
||||
importPreviewRows.value.length > 0 || importOrderLoading.value || parseImportFileLoading.value
|
||||
@ -878,27 +933,10 @@ function getOrderGroupKey(row: ImportPreviewRow) {
|
||||
return code || row._rowKey
|
||||
}
|
||||
|
||||
function normalizeStoreOptions(rawStores: any[]) {
|
||||
const result: Array<{ label: string; value: number | string }> = []
|
||||
const seen = new Set<string>()
|
||||
for (const item of rawStores || []) {
|
||||
const rawValue = item?.value ?? item?.store_id ?? item?.id ?? item?.storeId
|
||||
if (rawValue === undefined || rawValue === null || rawValue === '') continue
|
||||
const value = Number.isNaN(Number(rawValue)) ? String(rawValue) : Number(rawValue)
|
||||
const key = String(value)
|
||||
if (seen.has(key)) continue
|
||||
const label = String(item?.label ?? item?.store_name ?? item?.name ?? item?.storeName ?? key).trim() || key
|
||||
result.push({ label, value })
|
||||
seen.add(key)
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
async function loadStoreOptions() {
|
||||
try {
|
||||
const storesRes: any = await indexApi.loadStores({ type: 'order' })
|
||||
const rawStores = storesRes?.stores || storesRes?.data?.stores || storesRes?.data || []
|
||||
storeOptions.value = normalizeStoreOptions(Array.isArray(rawStores) ? rawStores : [])
|
||||
storeOptions.value = mapStoreListToSelectOptions(extractStoreListFromResponse(storesRes))
|
||||
} catch {
|
||||
storeOptions.value = []
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ import {
|
||||
orderUpdateExpressWeighingWeight
|
||||
} from '@/api/order.index/orderindex'
|
||||
import { packageMaterialGet } from '@/api/setting.packagematerial/packagematerial'
|
||||
import { isOrderIndexApiSuccess, parseOrderDetailPayload } from '../utils/order-index-helpers'
|
||||
import { isOrderIndexApiSuccess, parseOrderDetailPayload, normalizeOrderExpressList } from '../utils/order-index-helpers'
|
||||
import { parsePackageMaterialListResponse } from '@/views/material/packageMaterial/package-material-config'
|
||||
|
||||
const props = defineProps<{
|
||||
@ -149,48 +149,6 @@ function formatTime(value: unknown) {
|
||||
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`
|
||||
}
|
||||
|
||||
function normalizeExpressRows(data: Record<string, any>) {
|
||||
const expresses = Array.isArray(data.expresses) ? data.expresses : []
|
||||
if (expresses.length) {
|
||||
return expresses.map((item: any) => ({
|
||||
waybill_code: String(item.waybill_code || item.express_code || item.code || '').trim(),
|
||||
logistics_name: item.logistics_name || item.sys_logistics_name || item.logisticsName || '',
|
||||
weighing_weight: item.weighing_weight,
|
||||
is_main: String(item.business_key) === '1',
|
||||
created_at: item.created_at || item.create_at,
|
||||
package_material_code: item.package_material_code,
|
||||
package_material_name_snapshot: item.package_material_name_snapshot
|
||||
})).filter((item) => item.waybill_code)
|
||||
}
|
||||
|
||||
const codes = Array.isArray(data.waybill_codes)
|
||||
? data.waybill_codes
|
||||
: Array.isArray(data.order?.waybill_codes)
|
||||
? data.order.waybill_codes
|
||||
: []
|
||||
if (codes.length) {
|
||||
return codes.map((code: any) => ({
|
||||
waybill_code: String(code).trim(),
|
||||
logistics_name: data.order?.logistics_name || data.detail?.logistics_name || '',
|
||||
weighing_weight: undefined,
|
||||
package_material_code: '',
|
||||
package_material_name_snapshot: ''
|
||||
}))
|
||||
}
|
||||
|
||||
const expressCode = data.order?.express_code || data.detail?.express_code
|
||||
if (expressCode) {
|
||||
return [{
|
||||
waybill_code: String(expressCode).trim(),
|
||||
logistics_name: data.order?.logistics_name || data.detail?.logistics_name || '',
|
||||
weighing_weight: undefined,
|
||||
package_material_code: '',
|
||||
package_material_name_snapshot: ''
|
||||
}]
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
async function loadDetail() {
|
||||
if (!orderId.value) {
|
||||
expressRows.value = []
|
||||
@ -208,7 +166,7 @@ async function loadDetail() {
|
||||
throw new Error(res?.message || '获取运单信息失败')
|
||||
}
|
||||
const data = parseOrderDetailPayload(res)
|
||||
expressRows.value = normalizeExpressRows(data)
|
||||
expressRows.value = normalizeOrderExpressList(data)
|
||||
waybillCodesText.value = expressRows.value.map((item) => item.waybill_code).join(', ')
|
||||
} catch (error: any) {
|
||||
expressRows.value = []
|
||||
|
||||
@ -53,7 +53,8 @@ const needTranslateFields = new Set([
|
||||
'order_status',
|
||||
'intercept_status',
|
||||
'source_platform_code',
|
||||
'sys_platform_code'
|
||||
'sys_platform_code',
|
||||
'order_type'
|
||||
])
|
||||
|
||||
function displayValue(prop: string) {
|
||||
|
||||
@ -18,7 +18,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, watch } from 'vue'
|
||||
import { onBeforeUnmount, ref, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { orderPendingOrder } from '@/api/order.pendingorder/orderpendingOrder'
|
||||
|
||||
@ -95,6 +95,10 @@ watch(
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
items.value = []
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@ -110,7 +110,9 @@ async function trimVisibleUntilFits() {
|
||||
}
|
||||
|
||||
if (!visibleButtons.value.length && overflowButtons.value.length) {
|
||||
visibleButtons.value = [overflowButtons.value[0]]
|
||||
const first = overflowButtons.value[0]
|
||||
if (!first) return
|
||||
visibleButtons.value = [first]
|
||||
overflowButtons.value = overflowButtons.value.slice(1)
|
||||
await nextTick()
|
||||
while (isMainOverflowing() && visibleButtons.value.length > 0 && overflowButtons.value.length > 0 && guard < buttons.length + 2) {
|
||||
|
||||
@ -28,11 +28,12 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { computed, onBeforeUnmount, ref, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { orderPendingOrder } from '@/api/order.pendingorder/orderpendingOrder'
|
||||
import {
|
||||
ORDER_DETAIL_TIME_FIELDS,
|
||||
COMMON_TRANSLATIONS,
|
||||
formatOrderTime,
|
||||
getTagType,
|
||||
pendingOrderDetailSections,
|
||||
@ -120,6 +121,10 @@ function displayFieldValue(field: OrderDetailFieldConfig) {
|
||||
return translateOrderField(field.prop, raw)
|
||||
}
|
||||
|
||||
if (COMMON_TRANSLATIONS[field.prop]) {
|
||||
return translateOrderField(field.prop, raw)
|
||||
}
|
||||
|
||||
return raw
|
||||
}
|
||||
|
||||
@ -127,7 +132,14 @@ function normalizeDetailPayload(payload: Record<string, any>) {
|
||||
const orderDetail = payload.order || payload.detail || payload
|
||||
if (!orderDetail || typeof orderDetail !== 'object') return null
|
||||
|
||||
const waybillCodes = payload.waybill_codes ?? orderDetail.waybill_codes
|
||||
const waybillCodes =
|
||||
payload.waybill_codes ??
|
||||
orderDetail.waybill_codes ??
|
||||
(Array.isArray(payload.expresses)
|
||||
? payload.expresses
|
||||
.map((item: any) => item?.waybill_code)
|
||||
.filter((item: unknown) => item !== null && item !== undefined && `${item}`.trim() !== '')
|
||||
: undefined)
|
||||
return {
|
||||
...orderDetail,
|
||||
recheck_status: resolveOrderRecheckStatus(orderDetail),
|
||||
@ -176,6 +188,11 @@ watch(
|
||||
},
|
||||
{ immediate: true }
|
||||
)
|
||||
|
||||
onBeforeUnmount(() => {
|
||||
latestRequestId += 1
|
||||
detail.value = null
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@ -41,12 +41,16 @@
|
||||
<div v-if="showOrderSummary" class="detail-section">
|
||||
<div class="section-title">运单信息</div>
|
||||
<el-table :data="expresses" border stripe size="small" empty-text="暂无运单信息">
|
||||
<el-table-column prop="express_code" label="运单号" min-width="180" />
|
||||
<el-table-column prop="logistics_name" label="物流公司" min-width="140" />
|
||||
<el-table-column prop="status" label="状态" min-width="100" />
|
||||
<el-table-column prop="created_at" label="创建时间" min-width="180">
|
||||
<el-table-column prop="waybill_code" label="运单号" min-width="180" show-overflow-tooltip />
|
||||
<el-table-column prop="logistics_name" label="物流公司" min-width="140" show-overflow-tooltip />
|
||||
<el-table-column label="称重(kg)" width="100" align="right">
|
||||
<template #default="{ row }">
|
||||
{{ row.created_at || row.createdAt || '-' }}
|
||||
{{ formatWeight(row.weighing_weight) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" min-width="160">
|
||||
<template #default="{ row }">
|
||||
{{ formatExpressTime(row.created_at) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -63,7 +67,7 @@
|
||||
import { computed, ref, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { orderDetail } from '@/api/order.index/orderindex'
|
||||
import { parseOrderDetailPayload } from '../utils/order-index-helpers'
|
||||
import { isOrderIndexApiSuccess, parseOrderDetailPayload, normalizeOrderDetailItems, normalizeOrderExpressList, normalizeOrderWaybillCodes } from '../utils/order-index-helpers'
|
||||
|
||||
const props = defineProps<{
|
||||
row: Record<string, any> | null
|
||||
@ -90,47 +94,19 @@ function formatAmount(value: unknown) {
|
||||
return Number.isFinite(amount) ? amount.toFixed(2) : String(value)
|
||||
}
|
||||
|
||||
function normalizeItems(data: Record<string, any>) {
|
||||
if (Array.isArray(data.orderItems)) return data.orderItems
|
||||
if (Array.isArray(data.items)) return data.items
|
||||
|
||||
const rawItems = data.order?.items || data.detail?.items
|
||||
if (Array.isArray(rawItems)) return rawItems
|
||||
if (typeof rawItems === 'string') {
|
||||
try {
|
||||
const parsed = JSON.parse(rawItems)
|
||||
return Array.isArray(parsed) ? parsed : []
|
||||
} catch (error) {
|
||||
return []
|
||||
}
|
||||
}
|
||||
return []
|
||||
function formatWeight(value: unknown) {
|
||||
if (value === null || value === undefined || value === '') return '—'
|
||||
const num = Number(value)
|
||||
return Number.isFinite(num) ? String(num) : String(value)
|
||||
}
|
||||
|
||||
function normalizeExpresses(data: Record<string, any>) {
|
||||
if (Array.isArray(data.expresses)) return data.expresses
|
||||
|
||||
const orderExpressCode = data.order?.express_code || data.detail?.express_code
|
||||
const logisticsName = data.order?.logistics_name || data.detail?.logistics_name
|
||||
if (orderExpressCode) {
|
||||
return [
|
||||
{
|
||||
express_code: orderExpressCode,
|
||||
logistics_name: logisticsName || '',
|
||||
status: ''
|
||||
}
|
||||
]
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
function normalizeWaybillCodes(data: Record<string, any>, expressList: any[]) {
|
||||
if (Array.isArray(data.waybill_codes)) return data.waybill_codes
|
||||
if (Array.isArray(data.order?.waybill_codes)) return data.order.waybill_codes
|
||||
if (Array.isArray(data.detail?.waybill_codes)) return data.detail.waybill_codes
|
||||
return expressList
|
||||
.map((item) => item?.express_code)
|
||||
.filter((item) => item !== null && item !== undefined && `${item}`.trim() !== '')
|
||||
function formatExpressTime(value: unknown) {
|
||||
if (value === null || value === undefined || value === '') return '—'
|
||||
const ts = typeof value === 'number' ? (value > 1e12 ? value : value * 1000) : new Date(String(value)).getTime()
|
||||
if (!Number.isFinite(ts)) return String(value)
|
||||
const d = new Date(ts)
|
||||
const pad = (n: number) => String(n).padStart(2, '0')
|
||||
return `${d.getFullYear()}-${pad(d.getMonth() + 1)}-${pad(d.getDate())} ${pad(d.getHours())}:${pad(d.getMinutes())}:${pad(d.getSeconds())}`
|
||||
}
|
||||
|
||||
async function loadDetail() {
|
||||
@ -150,14 +126,14 @@ async function loadDetail() {
|
||||
ids: [props.row.id],
|
||||
tableType: 'order'
|
||||
})
|
||||
if (!response || ![1, 200].includes(response.code)) {
|
||||
if (!isOrderIndexApiSuccess(response)) {
|
||||
throw new Error(response?.message || 'order.detail 请求失败')
|
||||
}
|
||||
const data = parseOrderDetailPayload(response)
|
||||
detailOrder.value = data.order || data.detail || null
|
||||
orderItems.value = normalizeItems(data)
|
||||
expresses.value = normalizeExpresses(data)
|
||||
const waybillCodes = normalizeWaybillCodes(data, expresses.value)
|
||||
orderItems.value = normalizeOrderDetailItems(data)
|
||||
expresses.value = normalizeOrderExpressList(data)
|
||||
const waybillCodes = normalizeOrderWaybillCodes(data, expresses.value)
|
||||
waybillCodesText.value = waybillCodes.join(', ')
|
||||
} catch (error: any) {
|
||||
detailOrder.value = null
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, watch, onMounted } from 'vue'
|
||||
import * as orderApi from '@/api/order.index/orderindex'
|
||||
import { isOrderIndexApiSuccess, normalizeOrderDetailItems, parseOrderDetailPayload } from '@/views/order/orderManagement/utils/order-index-helpers'
|
||||
|
||||
const props = defineProps<{
|
||||
orderId?: number | string
|
||||
@ -46,8 +47,11 @@ const loadDetail = async () => {
|
||||
if (props.orderCode) params.delivery_order_code = props.orderCode
|
||||
|
||||
const res = await orderApi.orderDetail(params)
|
||||
if (res && res.code === 200 && res.data) {
|
||||
items.value = res.data.items || []
|
||||
if (isOrderIndexApiSuccess(res)) {
|
||||
const data = parseOrderDetailPayload(res)
|
||||
items.value = normalizeOrderDetailItems(data)
|
||||
} else {
|
||||
items.value = []
|
||||
}
|
||||
} catch (error) {
|
||||
console.error('Failed to load order items:', error)
|
||||
|
||||
@ -7,6 +7,18 @@ export type CreateOrderFloatSummary = {
|
||||
parsing: boolean
|
||||
}
|
||||
|
||||
/** 建单草稿:收起后台时暂存,关闭会话或还原后释放 DOM */
|
||||
export type CreateOrderDraftSnapshot = {
|
||||
importPreviewRows: unknown[]
|
||||
importOrderFileName: string
|
||||
importOrderResult: unknown | null
|
||||
defaultStoreId?: number
|
||||
activePreviewRowKey: string
|
||||
selectedPreviewRowKeys: string[]
|
||||
addressPasteText: string
|
||||
previewRowKeySeed: number
|
||||
}
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const minimized = ref(false)
|
||||
const sessionActive = ref(false)
|
||||
@ -17,6 +29,7 @@ const floatSummary = ref<CreateOrderFloatSummary>({
|
||||
loading: false,
|
||||
parsing: false
|
||||
})
|
||||
const createOrderDraft = shallowRef<CreateOrderDraftSnapshot | null>(null)
|
||||
|
||||
const successCallbacks = shallowRef(new Set<() => void | Promise<void>>())
|
||||
|
||||
@ -42,11 +55,30 @@ export function useCreateOrderSession() {
|
||||
minimized.value = false
|
||||
}
|
||||
|
||||
function saveCreateOrderDraft(snapshot: CreateOrderDraftSnapshot) {
|
||||
createOrderDraft.value = snapshot
|
||||
}
|
||||
|
||||
function takeCreateOrderDraft() {
|
||||
const draft = createOrderDraft.value
|
||||
createOrderDraft.value = null
|
||||
return draft
|
||||
}
|
||||
|
||||
function peekCreateOrderDraft() {
|
||||
return createOrderDraft.value
|
||||
}
|
||||
|
||||
function clearCreateOrderDraft() {
|
||||
createOrderDraft.value = null
|
||||
}
|
||||
|
||||
function closeCreateOrderSession() {
|
||||
dialogVisible.value = false
|
||||
minimized.value = false
|
||||
sessionActive.value = false
|
||||
resetToken.value += 1
|
||||
clearCreateOrderDraft()
|
||||
floatSummary.value = {
|
||||
rowCount: 0,
|
||||
orderCount: 0,
|
||||
@ -78,9 +110,14 @@ export function useCreateOrderSession() {
|
||||
sessionActive,
|
||||
resetToken,
|
||||
floatSummary,
|
||||
createOrderDraft,
|
||||
openCreateOrderDialog,
|
||||
minimizeCreateOrderDialog,
|
||||
restoreCreateOrderDialog,
|
||||
saveCreateOrderDraft,
|
||||
takeCreateOrderDraft,
|
||||
peekCreateOrderDraft,
|
||||
clearCreateOrderDraft,
|
||||
closeCreateOrderSession,
|
||||
updateFloatSummary,
|
||||
registerCreateOrderSuccess,
|
||||
|
||||
@ -75,6 +75,13 @@ export const COMMON_TRANSLATIONS: Record<string, Record<string, string>> = {
|
||||
'error': '出库异常',
|
||||
'failed': '出库失败'
|
||||
},
|
||||
order_type: {
|
||||
'JYCK': '交易出库',
|
||||
'JACK': '交易出库',
|
||||
'TRANSFER': '调拨出库',
|
||||
'RETURN': '退货出库',
|
||||
'OTHER': '其他出库',
|
||||
},
|
||||
source_platform_code: {
|
||||
'OFFLINE': '线下',
|
||||
'PDD': '拼多多',
|
||||
@ -418,6 +425,27 @@ function normalizeSyncStatusKey(value: any): string {
|
||||
return String(value ?? '').trim()
|
||||
}
|
||||
|
||||
function normalizeOrderTypeKey(value: any): string {
|
||||
return String(value ?? '').trim().toUpperCase()
|
||||
}
|
||||
|
||||
function lookupTranslationTable(table: Record<string, string> | undefined, field: string, value: any): string | undefined {
|
||||
if (!table) return undefined
|
||||
if (table[value] !== undefined) return table[value]
|
||||
if (field === 'sync_status') {
|
||||
const k = normalizeSyncStatusKey(value)
|
||||
if (k && table[k] !== undefined) return table[k]
|
||||
const lower = k.toLowerCase()
|
||||
const hit = Object.keys(table).find((key) => key.toLowerCase() === lower)
|
||||
if (hit) return table[hit]
|
||||
}
|
||||
if (field === 'order_type') {
|
||||
const k = normalizeOrderTypeKey(value)
|
||||
if (k && table[k] !== undefined) return table[k]
|
||||
}
|
||||
return undefined
|
||||
}
|
||||
|
||||
export function getTagType(field: string, value: any) {
|
||||
if (field === 'is_urgency') {
|
||||
const y = normalizeUrgencyValue(value)
|
||||
@ -436,6 +464,10 @@ export function getTagType(field: string, value: any) {
|
||||
const hit = Object.keys(map).find((key) => key.toLowerCase() === lower)
|
||||
if (hit) return map[hit]
|
||||
}
|
||||
if (field === 'order_type') {
|
||||
const k = normalizeOrderTypeKey(value)
|
||||
if (k && map[k] !== undefined) return map[k]
|
||||
}
|
||||
}
|
||||
return 'info'
|
||||
}
|
||||
@ -452,16 +484,8 @@ export function translateOrderField(field: string, value: any) {
|
||||
}
|
||||
}
|
||||
const table = COMMON_TRANSLATIONS[field]
|
||||
if (table) {
|
||||
if (table[value] !== undefined) return table[value]
|
||||
if (field === 'sync_status') {
|
||||
const k = normalizeSyncStatusKey(value)
|
||||
if (k && table[k] !== undefined) return table[k]
|
||||
const lower = k.toLowerCase()
|
||||
const hit = Object.keys(table).find((key) => key.toLowerCase() === lower)
|
||||
if (hit) return table[hit]
|
||||
}
|
||||
}
|
||||
const translated = lookupTranslationTable(table, field, value)
|
||||
if (translated !== undefined) return translated
|
||||
return value
|
||||
}
|
||||
|
||||
@ -552,6 +576,10 @@ function waybillCodesFormatter(_row: any, _column: any, cellValue: unknown) {
|
||||
return text
|
||||
}
|
||||
|
||||
function orderTypeFormatter(_row: any, _column: any, cellValue: unknown) {
|
||||
return translateOrderField('order_type', cellValue)
|
||||
}
|
||||
|
||||
/** 订单详情 descriptions 中需格式化为本地时间的字段(与列表 formatter 一致) */
|
||||
export const ORDER_DETAIL_TIME_FIELDS = new Set([
|
||||
'place_order_time',
|
||||
@ -591,7 +619,7 @@ export const pendingOrderDetailSections: OrderDetailSectionConfig[] = [
|
||||
{ prop: 'order_type', label: '订单类型' },
|
||||
{ prop: 'create_channel', label: '创建渠道' },
|
||||
{ prop: 'order_flag', label: '订单标记', span: 4 },
|
||||
{ prop: 'sys_platform_name', label: '来源平台' },
|
||||
{ prop: 'sys_platform_name', label: '来源' },
|
||||
{ prop: 'sys_platform_code', label: '平台编码', tag: true },
|
||||
{ prop: 'source_platform_name', label: '来源平台名' },
|
||||
{ prop: 'source_order_codes', label: '来源单号' },
|
||||
@ -613,10 +641,10 @@ export const pendingOrderDetailSections: OrderDetailSectionConfig[] = [
|
||||
{ prop: 'step', label: '流程步骤' },
|
||||
{ prop: 'sync_status', label: '同步状态', tag: true },
|
||||
{ prop: 'inspection_status', label: '审核状态', tag: true },
|
||||
{ prop: 'recheck_status', label: '复核状态', tag: true },
|
||||
{ prop: 'recheck_status', label: '复核', tag: true },
|
||||
{ prop: 'outbound_status', label: '出库状态', tag: true },
|
||||
{ prop: 'storage_status', label: '分配状态', tag: true },
|
||||
{ prop: 'post_status', label: '快递状态', tag: true },
|
||||
{ prop: 'storage_status', label: '储位', tag: true },
|
||||
{ prop: 'post_status', label: '快递', tag: true },
|
||||
{ prop: 'pick_status', label: '拣货状态', tag: true },
|
||||
{ prop: 'pack_status', label: '打包状态', tag: true },
|
||||
{ prop: 'print_status', label: '打印状态', tag: true },
|
||||
@ -632,8 +660,8 @@ export const pendingOrderDetailSections: OrderDetailSectionConfig[] = [
|
||||
title: '收货与物流',
|
||||
column: 3,
|
||||
fields: [
|
||||
{ prop: 'name', label: '收货人' },
|
||||
{ prop: 'mobile', label: '手机号' },
|
||||
{ prop: 'name', label: '收件人' },
|
||||
{ prop: 'mobile', label: '电话' },
|
||||
{ prop: 'tel', label: '固定电话' },
|
||||
{ prop: 'email', label: '邮箱' },
|
||||
{ prop: 'province', label: '省份' },
|
||||
@ -642,7 +670,7 @@ export const pendingOrderDetailSections: OrderDetailSectionConfig[] = [
|
||||
{ prop: 'town', label: '镇/街道' },
|
||||
{ prop: 'zip_code', label: '邮编' },
|
||||
{ prop: 'detail_address', label: '详细地址', span: 3 },
|
||||
{ prop: 'logistics_name', label: '物流公司' },
|
||||
{ prop: 'logistics_name', label: '快递' },
|
||||
{ prop: 'logistics_code', label: '快递编码' },
|
||||
{ prop: 'express_code', label: '快递单号' },
|
||||
{ prop: 'waybill_codes', label: '运单号', span: 3, waybill: true },
|
||||
@ -704,8 +732,155 @@ export const simpleListToolbarButtons = pickToolbarButtons(simpleListToolbarButt
|
||||
|
||||
|
||||
|
||||
/** ScanBox 筛选字段分组 */
|
||||
export const SCAN_FIELD_GROUPS = {
|
||||
order: '单号信息',
|
||||
shop: '店铺平台',
|
||||
receiver: '收货信息',
|
||||
logistics: '物流信息',
|
||||
status: '订单状态',
|
||||
warehouse: '仓储流程',
|
||||
time: '时间范围',
|
||||
} as const
|
||||
|
||||
type ScanFieldGroupKey = keyof typeof SCAN_FIELD_GROUPS
|
||||
|
||||
/** 为 ScanBox 字段附加分组标签 */
|
||||
export function scanField<G extends ScanFieldGroupKey>(
|
||||
group: G,
|
||||
field: Record<string, any>
|
||||
) {
|
||||
return { ...field, group: SCAN_FIELD_GROUPS[group] }
|
||||
}
|
||||
|
||||
/** 通用下拉选项 */
|
||||
export const isUrgencyFilterOptions = [
|
||||
{ label: '是', value: 'Y' },
|
||||
{ label: '否', value: 'N' },
|
||||
]
|
||||
|
||||
export const syncStatusFilterOptionsBasic = [
|
||||
{ label: '待同步', value: 'padding' },
|
||||
{ label: '已同步', value: 'fin' },
|
||||
{ label: '错误', value: 'error' },
|
||||
]
|
||||
|
||||
export const syncStatusFilterOptionsExtended = [
|
||||
{ label: '待同步', value: 'padding' },
|
||||
{ label: '同步中', value: 'pending' },
|
||||
{ label: '已同步', value: 'fin' },
|
||||
{ label: '错误', value: 'error' },
|
||||
{ label: '未同步', value: 'none' },
|
||||
]
|
||||
|
||||
export const storageStatusFilterOptions = [
|
||||
{ label: '未分配', value: 'none' },
|
||||
{ label: '分配中', value: 'padding' },
|
||||
{ label: '已完成', value: 'fin' },
|
||||
{ label: '错误', value: 'error' },
|
||||
]
|
||||
|
||||
export const postStatusFilterOptions = [
|
||||
{ label: '未分配', value: 'none' },
|
||||
{ label: '分配中', value: 'padding' },
|
||||
{ label: '已分配', value: 'fin' },
|
||||
{ label: '错误', value: 'error' },
|
||||
]
|
||||
|
||||
export const postStatusFilterOptionsExtended = [
|
||||
...postStatusFilterOptions,
|
||||
{ label: '超时', value: 'timeout' },
|
||||
]
|
||||
|
||||
export const pickStatusFilterOptions = [
|
||||
{ label: '未拣货', value: 'none' },
|
||||
{ label: '拣货中', value: 'padding' },
|
||||
{ label: '已完成', value: 'fin' },
|
||||
]
|
||||
|
||||
export const packStatusFilterOptions = [
|
||||
{ label: '未打包', value: 'none' },
|
||||
{ label: '打包中', value: 'padding' },
|
||||
{ label: '已完成', value: 'fin' },
|
||||
]
|
||||
|
||||
export const printStatusFilterOptions = [
|
||||
{ label: '未打印', value: 'none' },
|
||||
{ label: '已完成', value: 'fin' },
|
||||
]
|
||||
|
||||
export const outboundStatusFilterOptions = [
|
||||
{ label: '未出库', value: 'none' },
|
||||
{ label: '待出库', value: 'padding' },
|
||||
{ label: '已出库', value: 'fin' },
|
||||
]
|
||||
|
||||
export const interceptStatusFilterOptions = [
|
||||
{ label: '无', value: 'none' },
|
||||
{ label: '待拦截', value: 'pending' },
|
||||
{ label: '已拦截', value: 'success' },
|
||||
]
|
||||
|
||||
export const pendingOrderStatusFilterOptions = [
|
||||
{ label: '待审核', value: 'pedding' },
|
||||
{ label: '已创建', value: 'created' },
|
||||
{ label: '已取消', value: 'cancel' },
|
||||
{ label: '错误', value: 'error' },
|
||||
{ label: '售后异常', value: 'after-sales-error' },
|
||||
{ label: '已完成', value: 'finished' },
|
||||
{ label: '已作废', value: 'cancelled' },
|
||||
{ label: '已归档', value: 'archived' },
|
||||
]
|
||||
|
||||
export const reviewOrderStatusFilterOptions = [
|
||||
{ label: '待审核', value: 'pedding' },
|
||||
{ label: '已创建', value: 'created' },
|
||||
{ label: '错误', value: 'error' },
|
||||
]
|
||||
|
||||
export const exceptionOrderStatusFilterOptions = [
|
||||
{ label: '待审核', value: 'pedding' },
|
||||
{ label: '已创建', value: 'created' },
|
||||
{ label: '错误', value: 'error' },
|
||||
{ label: '已作废', value: 'cancelled' },
|
||||
{ label: '已归档', value: 'archived' },
|
||||
]
|
||||
|
||||
export const archiveOrderStatusFilterOptions = [
|
||||
{ label: '待审核', value: 'pedding' },
|
||||
{ label: '已创建', value: 'created' },
|
||||
{ label: '错误', value: 'error' },
|
||||
{ label: '已完成', value: 'finished' },
|
||||
{ label: '已作废', value: 'cancelled' },
|
||||
{ label: '已归档', value: 'archived' },
|
||||
]
|
||||
|
||||
/** 可复用 ScanBox 字段片段 */
|
||||
export const storeScanField = scanField('order', { label: '货主', value: 'store_id', type: 'select', multiple: true, options: [] })
|
||||
export const orderFlagScanField = scanField('order', { label: '订单标记', value: 'order_flag', type: 'text', operators: ['like', 'notlike'], defaultOperator: 'like' })
|
||||
export const waveNoScanField = scanField('order', { label: '波次号', value: 'wave_no', type: 'text' })
|
||||
export const deliveryOrderCodeScanField = scanField('order', { label: '发货单号', value: 'delivery_order_code', type: 'text' })
|
||||
export const pendingOrderCodeScanField = scanField('order', { label: '发货单号', value: 'order_code', type: 'text' })
|
||||
export const exceptionOrderCodeScanField = scanField('order', { label: '发货单号', value: 'order_code', type: 'text' })
|
||||
export const shopNickScanField = scanField('shop', { label: '店铺名称', value: 'shop_nick', type: 'text' })
|
||||
export const sysPlatformNameScanField = scanField('shop', { label: '来源', value: 'sys_platform_name', type: 'select', options: [] })
|
||||
export const sysPlatformCodeScanField = scanField('shop', { label: '平台编码', value: 'sys_platform_code', type: 'select', options: [] })
|
||||
export const buyerNickScanField = scanField('shop', { label: '买家昵称', value: 'buyer_nick', type: 'text' })
|
||||
export const receiverNameScanField = scanField('receiver', { label: '收件人', value: 'name', type: 'text' })
|
||||
export const receiverMobileScanField = scanField('receiver', { label: '电话', value: 'mobile', type: 'text' })
|
||||
export const receiverProvinceScanField = scanField('receiver', { label: '省份', value: 'province', type: 'text' })
|
||||
export const receiverCityScanField = scanField('receiver', { label: '城市', value: 'city', type: 'text' })
|
||||
export const receiverAreaScanField = scanField('receiver', { label: '区县', value: 'area', type: 'text' })
|
||||
export const logisticsNameScanField = scanField('logistics', { label: '物流公司', value: 'logistics_name', type: 'select', options: [] })
|
||||
export const waybillCodesScanField = scanField('logistics', { label: '快递单号', value: 'waybill_codes', type: 'text' })
|
||||
export const expressCodeScanField = scanField('logistics', { label: '快递单号', value: 'express_code', type: 'text' })
|
||||
export const createAtRangeScanField = scanField('time', { label: '创建时间', value: 'create_at', type: 'datetimerange' })
|
||||
export const payTimeRangeScanField = scanField('time', { label: '支付时间', value: 'pay_time', type: 'datetimerange' })
|
||||
export const deliveryTimeRangeScanField = scanField('time', { label: '配送时间', value: 'delivery_time', type: 'datetimerange' })
|
||||
export const placeOrderTimeRangeScanField = scanField('time', { label: '下单时间', value: 'place_order_time', type: 'datetimerange' })
|
||||
|
||||
/** ScanBox:波次分配 → where.wave_id 为 { operator: 'eq'|'ne', value: 0 } */
|
||||
export const waveAssignmentScanField = {
|
||||
export const waveAssignmentScanField = scanField('order', {
|
||||
label: '波次分配',
|
||||
value: 'wave_id',
|
||||
type: 'select',
|
||||
@ -714,15 +889,15 @@ export const waveAssignmentScanField = {
|
||||
{ label: '未分配波次', value: '__wave_assign_eq_0__', operator: 'eq', conditionValue: 0 },
|
||||
{ label: '已分配波次', value: '__wave_assign_ne_0__', operator: 'ne', conditionValue: 0 }
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
/** ScanBox:快递公司(快递编码),选项由 index.getExpressList + fillExpressCompanyScanFieldOptions 注入 */
|
||||
export const expressCompanyScanField = {
|
||||
export const expressCompanyScanField = scanField('logistics', {
|
||||
label: '快递公司',
|
||||
value: 'logistics_code',
|
||||
type: 'select',
|
||||
options: [] as Array<{ label: string; value: string }>
|
||||
}
|
||||
})
|
||||
|
||||
export function mapExpressListToCompanySelectOptions(rawList: any[]): Array<{ label: string; value: string }> {
|
||||
const result: Array<{ label: string; value: string }> = []
|
||||
@ -792,74 +967,70 @@ export function fillStoreScanFieldOptions(availableFields: any[], rawStores: any
|
||||
|
||||
// deliveryOrder相关配置
|
||||
export const deliveryAvailableFields = [
|
||||
{ label: '货主', value: 'store_id', type: 'select', multiple: true, options: [] },
|
||||
{ label: '发货单号', value: 'delivery_order_code', type: 'text' },
|
||||
{ label: '订单标记', value: 'order_flag', type: 'text', operators: ['like', 'notlike'], defaultOperator: 'like' },
|
||||
// 单号信息
|
||||
storeScanField,
|
||||
deliveryOrderCodeScanField,
|
||||
orderFlagScanField,
|
||||
waveAssignmentScanField,
|
||||
{ label: '波次号', value: 'wave_no', type: 'text' },
|
||||
{ label: '店铺名称', value: 'shop_nick', type: 'text' },
|
||||
{ label: '来源平台', value: 'sys_platform_name', type: 'select', options: [] },
|
||||
{ label: '收货人', value: 'name', type: 'text' },
|
||||
{ label: '手机号', value: 'mobile', type: 'text' },
|
||||
{ label: '物流公司', value: 'logistics_name', type: 'select', options: [] },
|
||||
waveNoScanField,
|
||||
// 店铺平台
|
||||
shopNickScanField,
|
||||
sysPlatformNameScanField,
|
||||
// 收货信息
|
||||
receiverNameScanField,
|
||||
receiverMobileScanField,
|
||||
// 物流信息
|
||||
logisticsNameScanField,
|
||||
expressCompanyScanField,
|
||||
{ label: '物流单号', value: 'waybill_codes', type: 'text' },
|
||||
{ label: '紧急订单', value: 'is_urgency', type: 'select', options: [
|
||||
{ label: '是', value: 'Y' },
|
||||
{ label: '否', value: 'N' },
|
||||
]},
|
||||
{ label: '同步状态', value: 'sync_status', type: 'select', options: [
|
||||
{ label: '待同步', value: 'padding' },
|
||||
{ label: '已同步', value: 'fin' },
|
||||
{ label: '错误', value: 'error' }
|
||||
]},
|
||||
{ label: '出库状态', value: 'outbound_status', type: 'select', options: [
|
||||
{ label: '未出库', value: 'none' },
|
||||
{ label: '待出库', value: 'padding' },
|
||||
{ label: '已出库', value: 'fin' }
|
||||
]},
|
||||
{ label: '打印状态', value: 'print_status', type: 'select', options: [
|
||||
{ label: '未打印', value: 'none' },
|
||||
{ label: '已完成', value: 'fin' }
|
||||
]},
|
||||
{ label: '创建时间', value: 'create_at', type: 'daterange' },
|
||||
{ label: '支付时间', value: 'pay_time', type: 'daterange' },
|
||||
scanField('logistics', { label: '物流单号', value: 'waybill_codes', type: 'text' }),
|
||||
// 订单状态
|
||||
scanField('status', { label: '是否紧急', value: 'is_urgency', type: 'select', options: isUrgencyFilterOptions }),
|
||||
scanField('status', { label: '同步状态', value: 'sync_status', type: 'select', options: syncStatusFilterOptionsBasic }),
|
||||
// 仓储流程
|
||||
scanField('warehouse', { label: '出库状态', value: 'outbound_status', type: 'select', options: outboundStatusFilterOptions }),
|
||||
scanField('warehouse', { label: '打印状态', value: 'print_status', type: 'select', options: printStatusFilterOptions }),
|
||||
// 时间范围
|
||||
createAtRangeScanField,
|
||||
payTimeRangeScanField,
|
||||
deliveryTimeRangeScanField,
|
||||
]
|
||||
|
||||
export const deliveryColumns = [
|
||||
{ prop: 'delivery_order_code', label: '配送单号', width: '170', fixed: 'left' },
|
||||
{ prop: 'delivery_order_code', label: '发货单号', width: '170', fixed: 'left' },
|
||||
{ prop: 'shop_nick', label: '店铺名称', width: '140' },
|
||||
{ prop: 'wave_no', label: '波次号', width: '150' },
|
||||
{ prop: 'order_flag', label: '订单标记', minWidth: '220' },
|
||||
{ prop: 'sys_platform_name', label: '来源平台', width: '110' },
|
||||
{ prop: 'order_type', label: '订单类型', width: '90' },
|
||||
{ prop: 'sys_platform_name', label: '来源', width: '110' },
|
||||
{ prop: 'order_type', label: '订单类型', width: '90', formatter: orderTypeFormatter },
|
||||
{ prop: 'buyer_nick', label: '买家昵称', width: '120' },
|
||||
{ prop: 'name', label: '收货人', width: '100' },
|
||||
{ prop: 'mobile', label: '手机号', width: '120' },
|
||||
{ prop: 'name', label: '收件人', width: '100' },
|
||||
{ prop: 'mobile', label: '电话', width: '120' },
|
||||
{ prop: 'province', label: '省份', width: '90' },
|
||||
{ prop: 'city', label: '城市', width: '90' },
|
||||
{ prop: 'status', label: '订单状态', width: '100' },
|
||||
{ prop: 'outbound_status', label: '出库状态', width: '100' },
|
||||
{ prop: 'sync_status', label: '同步状态', width: '100' },
|
||||
{ prop: 'inspection_status', label: '审核状态', width: '100' },
|
||||
{ prop: 'recheck_status', label: '复核状态', width: '100' },
|
||||
{ prop: 'recheck_status', label: '复核', width: '100' },
|
||||
{ prop: 'storage_status', label: '储位', width: '90' },
|
||||
{ prop: 'post_status', label: '快递', width: '90' },
|
||||
{ prop: 'print_status', label: '打印状态', width: '100' },
|
||||
{ prop: 'pick_status', label: '拣货', width: '90' },
|
||||
{ prop: 'pack_status', label: '打包', width: '90' },
|
||||
{ prop: 'intercept_status', label: '拦截状态', width: '100' },
|
||||
{ prop: 'logistics_name', label: '物流公司', width: '120' },
|
||||
{ prop: 'waybill_codes', label: '物流单号', width: '150', formatter: waybillCodesFormatter },
|
||||
{ prop: 'pick_status', label: '拣货状态', width: '90' },
|
||||
{ prop: 'pack_status', label: '打包状态', width: '90' },
|
||||
{ prop: 'intercept_status', label: '拦截状态', width: '100', tag: true },
|
||||
{ prop: 'logistics_name', label: '快递', width: '120' },
|
||||
{ prop: 'express_numbers', label: '运单号', width: '160', formatter: waybillCodesFormatter },
|
||||
{ prop: 'waybill_codes', label: '运单号', width: '150', formatter: waybillCodesFormatter },
|
||||
{ prop: 'source_order_codes', label: '来源单号', width: '140' },
|
||||
{ prop: 'is_urgency', label: '紧急', width: '80' },
|
||||
{ prop: 'is_urgency', label: '是否紧急', width: '80' },
|
||||
{ prop: 'items_count', label: '商品种类', width: '90' },
|
||||
{ prop: 'items_total', label: '商品总数', width: '90' },
|
||||
{ prop: 'items_weight', label: '总重量', width: '90' },
|
||||
{ prop: 'total_amount', label: '订单金额', width: '100' },
|
||||
{ prop: 'remark', label: '留言', width: '140' },
|
||||
{ prop: 'pay_time', label: '支付时间', width: '160', formatter: orderTimeFormatter },
|
||||
{ prop: 'place_order_time', label: '下单时间', width: '160', formatter: orderTimeFormatter },
|
||||
{ prop: 'delivery_time', label: '配送时间', width: '160', formatter: orderTimeFormatter },
|
||||
{ prop: 'place_order_time', label: '时效', width: '160', formatter: orderTimeFormatter },
|
||||
{ prop: 'create_at', label: '创建时间', width: '160', formatter: orderTimeFormatter },
|
||||
]
|
||||
|
||||
@ -940,20 +1111,26 @@ export const recheckStatusFilterOptions = [
|
||||
|
||||
// revieworder相关配置
|
||||
export const reviewAvailableFields = [
|
||||
{ label: '货主', value: 'store_id', type: 'select', multiple: true, options: [] },
|
||||
{ label: '发货单号', value: 'delivery_order_code', type: 'text' },
|
||||
// 单号信息
|
||||
storeScanField,
|
||||
deliveryOrderCodeScanField,
|
||||
waveAssignmentScanField,
|
||||
{ label: '波次号', value: 'wave_no', type: 'text' },
|
||||
{ label: '店铺名称', value: 'shop_nick', type: 'text' },
|
||||
{ label: '平台编码', value: 'sys_platform_code', type: 'select', options: [] },
|
||||
{ label: '收货人', value: 'name', type: 'text' },
|
||||
{ label: '手机号', value: 'mobile', type: 'text' },
|
||||
waveNoScanField,
|
||||
// 店铺平台
|
||||
shopNickScanField,
|
||||
sysPlatformCodeScanField,
|
||||
// 收货信息
|
||||
receiverNameScanField,
|
||||
receiverMobileScanField,
|
||||
// 物流信息
|
||||
expressCompanyScanField,
|
||||
{ label: '订单状态', value: 'status', type: 'select', options: [ { label: '待审核', value: 'pedding' }, { label: '已创建', value: 'created' }, { label: '错误', value: 'error' } ] },
|
||||
{ label: '是否紧急', value: 'is_urgency', type: 'select', options: [ { label: '是', value: 'Y' }, { label: '否', value: 'N' } ] },
|
||||
{ label: '同步状态', value: 'sync_status', type: 'select', options: [ { label: '待同步', value: 'padding' }, { label: '已完成', value: 'fin' }, { label: '错误', value: 'error' }, { label: '未同步', value: 'none' } ] },
|
||||
{ label: '复核状态', value: 'recheck_status', type: 'select', options: recheckStatusFilterOptions },
|
||||
{ label: '创建时间', value: 'create_at', type: 'daterange' },
|
||||
// 订单状态
|
||||
scanField('status', { label: '订单状态', value: 'status', type: 'select', options: reviewOrderStatusFilterOptions }),
|
||||
scanField('status', { label: '是否紧急', value: 'is_urgency', type: 'select', options: isUrgencyFilterOptions }),
|
||||
scanField('status', { label: '同步状态', value: 'sync_status', type: 'select', options: syncStatusFilterOptionsBasic }),
|
||||
scanField('status', { label: '复核', value: 'recheck_status', type: 'select', options: recheckStatusFilterOptions }),
|
||||
// 时间范围
|
||||
createAtRangeScanField,
|
||||
]
|
||||
|
||||
export const reviewColums = [
|
||||
@ -962,15 +1139,14 @@ export const reviewColums = [
|
||||
{ prop: 'order_flag', label: '订单标记', minWidth: '260' },
|
||||
{ prop: 'shop_nick', label: '店铺名称', width: '140' },
|
||||
{ prop: 'sys_platform_code', label: '平台编码', width: '100' },
|
||||
{ prop: 'name', label: '收货人', width: '110' },
|
||||
{ prop: 'mobile', label: '手机号', width: '120' },
|
||||
{ prop: 'name', label: '收件人', width: '110' },
|
||||
{ prop: 'status', label: '订单状态', width: '100' },
|
||||
{ prop: 'sync_status', label: '同步状态', width: '100' },
|
||||
{ prop: 'recheck_status', label: '复核', width: '100' },
|
||||
{ prop: 'is_urgency', label: '紧急', width: '80' },
|
||||
{ prop: 'logistics_name', label: '物流公司', width: '120' },
|
||||
{ prop: 'is_urgency', label: '是否紧急', width: '80' },
|
||||
{ prop: 'logistics_name', label: '快递', width: '120' },
|
||||
{ prop: 'items_total', label: '商品总数', width: '100' },
|
||||
{ prop: 'items_count', label: '商品总类', width: '100' },
|
||||
{ prop: 'items_count', label: '商品种类', width: '100' },
|
||||
{ prop: 'total_amount', label: '订单金额', width: '110' },
|
||||
{ prop: 'pay_time', label: '支付时间', width: '165', formatter: orderTimeFormatter },
|
||||
{ prop: 'operator_name', label: '审核人', width: '100' },
|
||||
@ -984,7 +1160,7 @@ export const reviewOrderDetail = [
|
||||
{ prop: 'pre_delivery_order_code', label: '前置单号' },
|
||||
{ prop: 'order_type', label: '订单类型' },
|
||||
{ prop: 'order_flag', label: '订单标记' },
|
||||
{ prop: 'sys_platform_name', label: '来源平台' },
|
||||
{ prop: 'sys_platform_name', label: '来源' },
|
||||
{ prop: 'sys_platform_code', label: '平台编码' },
|
||||
{ prop: 'shop_nick', label: '店铺名称' },
|
||||
{ prop: 'buyer_nick', label: '买家昵称' },
|
||||
@ -1010,8 +1186,8 @@ export const reviewOrderDetail = [
|
||||
{ prop: 'items_weight', label: '总重量' },
|
||||
|
||||
// 收货与物流
|
||||
{ prop: 'name', label: '收货人' },
|
||||
{ prop: 'mobile', label: '手机号码' },
|
||||
{ prop: 'name', label: '收件人' },
|
||||
{ prop: 'mobile', label: '电话' },
|
||||
{ prop: 'tel', label: '固定电话' },
|
||||
{ prop: 'province', label: '省份' },
|
||||
{ prop: 'city', label: '城市' },
|
||||
@ -1019,8 +1195,8 @@ export const reviewOrderDetail = [
|
||||
{ prop: 'town', label: '镇街' },
|
||||
{ prop: 'detail_address', label: '详细地址', span: 2 },
|
||||
{ prop: 'zip_code', label: '邮编' },
|
||||
{ prop: 'logistics_name', label: '物流公司' },
|
||||
{ prop: 'waybill_codes', label: '物流单号' },
|
||||
{ prop: 'logistics_name', label: '快递' },
|
||||
{ prop: 'waybill_codes', label: '运单号' },
|
||||
{ prop: 'delivery_type', label: '发货类型' },
|
||||
{ prop: 'weight_type', label: '重量类型' },
|
||||
|
||||
@ -1078,69 +1254,39 @@ export const outboundToolbarButtons = pickToolbarButtons(outboundToolbarButtonKe
|
||||
|
||||
// pendingOrder相关配置
|
||||
export const pendingAvailableFields = [
|
||||
{ label: '货主', value: 'store_id', type: 'select', multiple: true, options: [] },
|
||||
{ label: '发货单号', value: 'order_code', type: 'text' },
|
||||
{ label: '订单标记', value: 'order_flag', type: 'text', operators: ['like', 'notlike'], defaultOperator: 'like' },
|
||||
// 单号信息
|
||||
storeScanField,
|
||||
pendingOrderCodeScanField,
|
||||
orderFlagScanField,
|
||||
waveAssignmentScanField,
|
||||
{ label: '波次号', value: 'wave_no', type: 'text' },
|
||||
{ label: '店铺名称', value: 'shop_nick', type: 'text' },
|
||||
{ label: '来源平台', value: 'sys_platform_name', type: 'select', options: [] },
|
||||
{ label: '物流公司', value: 'logistics_name', type: 'select', options: [] },
|
||||
waveNoScanField,
|
||||
// 店铺平台
|
||||
shopNickScanField,
|
||||
sysPlatformNameScanField,
|
||||
// 物流信息
|
||||
logisticsNameScanField,
|
||||
expressCompanyScanField,
|
||||
{ label: '快递单号', value: 'waybill_codes', type: 'text' },
|
||||
{ label: '订单状态', value: 'status', type: 'select', options: [
|
||||
{ label: '待审核', value: 'pedding' },
|
||||
{ label: '已创建', value: 'created' },
|
||||
{ label: '已取消', value: 'cancel' },
|
||||
{ label: '错误', value: 'error' },
|
||||
{ label: '售后异常', value: 'after-sales-error' },
|
||||
{ label: '已完成', value: 'finished' },
|
||||
{ label: '已作废', value: 'cancelled' },
|
||||
{ label: '已归档', value: 'archived' },
|
||||
] },
|
||||
{ label:'快递', value: 'post_status', type: 'select', options: [
|
||||
{ label: '未分配', value: 'none' },
|
||||
{ label: '分配中', value: 'padding' },
|
||||
{ label: '已完成', value: 'fin' },
|
||||
{ label: '错误', value: 'error' },
|
||||
] },
|
||||
{ label:'打印状态', value: 'print_status', type: 'select', options: [
|
||||
{ label: '未打印', value: 'none' },
|
||||
{ label: '已完成', value: 'fin' }
|
||||
] },
|
||||
{ label: '储位', value: 'storage_status', type: 'select', options: [
|
||||
{ label: '未分配', value: 'none' },
|
||||
{ label: '分配中', value: 'padding' },
|
||||
{ label: '已完成', value: 'fin' },
|
||||
{ label: '错误', value: 'error' },
|
||||
] },
|
||||
{ label: '拣货状态', value: 'pick_status', type: 'select', options: [
|
||||
{ label: '未拣货', value: 'none' },
|
||||
{ label: '拣货中', value: 'padding' },
|
||||
{ label: '已完成', value: 'fin' },
|
||||
] },
|
||||
{ label: '打包状态', value: 'pack_status', type: 'select', options: [
|
||||
{ label: '未打包', value: 'none' },
|
||||
{ label: '打包中', value: 'padding' },
|
||||
{ label: '已完成', value: 'fin' },
|
||||
] },
|
||||
{ label: '是否紧急', value: 'is_urgency', type: 'select', options: [
|
||||
{ label: '是', value: 'Y' },
|
||||
{ label: '否', value: 'N' }
|
||||
]},
|
||||
{ label: '同步状态', value: 'sync_status', type: 'select', options: [
|
||||
{ label: '待同步', value: 'padding' },
|
||||
{ label: '已同步', value: 'fin' },
|
||||
{ label: '错误', value: 'error' }
|
||||
] },
|
||||
{ label: '复核状态', value: 'recheck_status', type: 'select', options: recheckStatusFilterOptions },
|
||||
{ label: '收货人', value: 'name', type: 'text' },
|
||||
{ label: '手机号', value: 'mobile', type: 'text' },
|
||||
{ label: '省份', value: 'province', type: 'text' },
|
||||
{ label: '城市', value: 'city', type: 'text' },
|
||||
{ label: '区县', value: 'area', type: 'text' },
|
||||
{ label: '下单时间', value: 'place_order_time', type: 'daterange' },
|
||||
{ label: '创建时间', value: 'create_at', type: 'daterange' },
|
||||
waybillCodesScanField,
|
||||
// 订单状态
|
||||
scanField('status', { label: '订单状态', value: 'status', type: 'select', options: pendingOrderStatusFilterOptions }),
|
||||
scanField('status', { label: '是否紧急', value: 'is_urgency', type: 'select', options: isUrgencyFilterOptions }),
|
||||
scanField('status', { label: '同步状态', value: 'sync_status', type: 'select', options: syncStatusFilterOptionsBasic }),
|
||||
scanField('status', { label: '复核', value: 'recheck_status', type: 'select', options: recheckStatusFilterOptions }),
|
||||
// 仓储流程
|
||||
scanField('warehouse', { label: '储位', value: 'storage_status', type: 'select', options: storageStatusFilterOptions }),
|
||||
scanField('warehouse', { label: '快递', value: 'post_status', type: 'select', options: postStatusFilterOptions }),
|
||||
scanField('warehouse', { label: '拣货状态', value: 'pick_status', type: 'select', options: pickStatusFilterOptions }),
|
||||
scanField('warehouse', { label: '打包状态', value: 'pack_status', type: 'select', options: packStatusFilterOptions }),
|
||||
scanField('warehouse', { label: '打印状态', value: 'print_status', type: 'select', options: printStatusFilterOptions }),
|
||||
// 收货信息
|
||||
receiverNameScanField,
|
||||
receiverMobileScanField,
|
||||
receiverProvinceScanField,
|
||||
receiverCityScanField,
|
||||
receiverAreaScanField,
|
||||
// 时间范围
|
||||
placeOrderTimeRangeScanField,
|
||||
createAtRangeScanField,
|
||||
]
|
||||
|
||||
export const pendingCloums = [
|
||||
@ -1158,7 +1304,7 @@ export const pendingCloums = [
|
||||
{ prop: 'pick_status', label: '拣货状态', width: '100' },
|
||||
{ prop: 'pack_status', label: '打包状态', width: '100' },
|
||||
{ prop: 'intercept_status', label: '拦截状态', width: '100', tag: true },
|
||||
{ prop: 'waybill_codes', label: '快递单号', width: '160', formatter: waybillCodesFormatter },
|
||||
{ prop: 'express_numbers', label: '运单号', width: '160', formatter: waybillCodesFormatter },
|
||||
{ prop: 'items_count', label: '商品种类', width: '100' },
|
||||
{ prop: 'items_total', label: '商品总数', width: '100' },
|
||||
{ prop: 'province', label: '省份', width: '100' },
|
||||
@ -1170,13 +1316,63 @@ export const pendingCloums = [
|
||||
{ prop: 'remark', label: '留言', width: '160' },
|
||||
]
|
||||
|
||||
/** 列表字段显示名(以待处理订单 pendingCloums 为准,含动态插入列) */
|
||||
export const ORDER_LIST_FIELD_LABELS: Record<string, string> = {
|
||||
...Object.fromEntries(pendingCloums.map((col) => [col.prop, col.label])),
|
||||
recheck_status: '复核',
|
||||
print_status: '打印状态',
|
||||
outbound_status: '出库状态',
|
||||
inspection_status: '审核状态',
|
||||
order_code: '发货单号',
|
||||
sys_platform_code: '平台编码',
|
||||
total_amount: '订单金额',
|
||||
source_order_codes: '来源单号',
|
||||
order_type: '订单类型',
|
||||
buyer_nick: '买家昵称',
|
||||
pre_delivery_order_code: '前置单号',
|
||||
delivery_time: '配送时间',
|
||||
items_weight: '总重量',
|
||||
waybill_codes: '运单号',
|
||||
}
|
||||
|
||||
export function applyOrderListColumnLabels<T extends { prop: string; label: string }>(columns: T[]): T[] {
|
||||
return columns.map((col) => {
|
||||
const standard = ORDER_LIST_FIELD_LABELS[col.prop]
|
||||
return standard ? { ...col, label: standard } : col
|
||||
})
|
||||
}
|
||||
|
||||
/** 待处理订单列表标准列:在基础列上补全复核、打印列 */
|
||||
export function buildPendingStyleColumns(baseColumns: ReadonlyArray<{ prop: string; label: string; [key: string]: any }> = pendingCloums) {
|
||||
const source = applyOrderListColumnLabels(Array.isArray(baseColumns) ? [...baseColumns] : [])
|
||||
const recheckColumn = { prop: 'recheck_status', label: ORDER_LIST_FIELD_LABELS.recheck_status, width: '100' }
|
||||
if (!source.some((col) => String(col?.prop || '') === 'recheck_status')) {
|
||||
const insertAfterIndex = source.findIndex((col) => String(col?.prop || '') === 'sync_status')
|
||||
if (insertAfterIndex >= 0) {
|
||||
source.splice(insertAfterIndex + 1, 0, recheckColumn)
|
||||
} else {
|
||||
source.push(recheckColumn)
|
||||
}
|
||||
}
|
||||
if (!source.some((col) => String(col?.prop || '') === 'print_status')) {
|
||||
const printColumn = { prop: 'print_status', label: ORDER_LIST_FIELD_LABELS.print_status, width: '100' }
|
||||
const insertAfterIndex = source.findIndex((col) => String(col?.prop || '') === 'post_status')
|
||||
if (insertAfterIndex >= 0) {
|
||||
source.splice(insertAfterIndex + 1, 0, printColumn)
|
||||
} else {
|
||||
source.push(printColumn)
|
||||
}
|
||||
}
|
||||
return source
|
||||
}
|
||||
|
||||
export const pendingOrderDetail = [
|
||||
// 基础信息
|
||||
{ prop: 'delivery_order_code', label: '发货单号' },
|
||||
{ prop: 'pre_delivery_order_code', label: '前置单号' },
|
||||
{ prop: 'order_type', label: '订单类型' },
|
||||
{ prop: 'order_flag', label: '订单标记' },
|
||||
{ prop: 'sys_platform_name', label: '来源平台' },
|
||||
{ prop: 'sys_platform_name', label: '来源' },
|
||||
{ prop: 'sys_platform_code', label: '平台编码' },
|
||||
{ prop: 'shop_nick', label: '店铺名称' },
|
||||
{ prop: 'buyer_nick', label: '买家昵称' },
|
||||
@ -1201,8 +1397,8 @@ export const pendingOrderDetail = [
|
||||
{ prop: 'items_weight', label: '总重量' },
|
||||
|
||||
// 收货与物流
|
||||
{ prop: 'name', label: '收货人' },
|
||||
{ prop: 'mobile', label: '手机号码' },
|
||||
{ prop: 'name', label: '收件人' },
|
||||
{ prop: 'mobile', label: '电话' },
|
||||
{ prop: 'tel', label: '固定电话' },
|
||||
{ prop: 'province', label: '省份' },
|
||||
{ prop: 'city', label: '城市' },
|
||||
@ -1210,8 +1406,8 @@ export const pendingOrderDetail = [
|
||||
{ prop: 'town', label: '镇街' },
|
||||
{ prop: 'detail_address', label: '详细地址', span: 2 },
|
||||
{ prop: 'zip_code', label: '邮编' },
|
||||
{ prop: 'logistics_name', label: '物流公司' },
|
||||
{ prop: 'waybill_codes', label: '物流单号' },
|
||||
{ prop: 'logistics_name', label: '快递' },
|
||||
{ prop: 'waybill_codes', label: '运单号' },
|
||||
{ prop: 'delivery_type', label: '发货服务类型' },
|
||||
{ prop: 'weight_type', label: '重量类型' },
|
||||
|
||||
@ -1318,30 +1514,33 @@ export const workbenchStatusOptions = [
|
||||
]
|
||||
|
||||
export const workbenchAvailableFields = [
|
||||
{ label: '发货单号', value: 'delivery_order_code', type: 'text' },
|
||||
// 单号信息
|
||||
deliveryOrderCodeScanField,
|
||||
waveAssignmentScanField,
|
||||
{ label: '波次号', value: 'wave_no', type: 'text' },
|
||||
{ label: '买家昵称', value: 'buyer_nick', type: 'text' },
|
||||
{ label: '订单状态', value: 'status', type: 'select', options: workbenchStatusOptions },
|
||||
{ label: '是否紧急', value: 'is_urgency', type: 'select', options: [ { label: '是', value: 'Y' }, { label: '否', value: 'N' } ] }
|
||||
waveNoScanField,
|
||||
// 店铺平台
|
||||
buyerNickScanField,
|
||||
// 订单状态
|
||||
scanField('status', { label: '订单状态', value: 'status', type: 'select', options: workbenchStatusOptions }),
|
||||
scanField('status', { label: '是否紧急', value: 'is_urgency', type: 'select', options: isUrgencyFilterOptions }),
|
||||
]
|
||||
|
||||
export const workbenchColumns = [
|
||||
{ prop: 'delivery_order_code', label: '订单号', minWidth: 160 },
|
||||
{ prop: 'delivery_order_code', label: '发货单号', minWidth: 160 },
|
||||
{ prop: 'wave_no', label: '波次号', minWidth: 160 },
|
||||
{ prop: 'order_flag', label: '订单标记', minWidth: 260 },
|
||||
{ prop: 'sys_platform_name', label: '平台', minWidth: 120 },
|
||||
{ prop: 'sys_platform_name', label: '来源', minWidth: 120 },
|
||||
{ prop: 'shop_nick', label: '店铺名称', minWidth: 140 },
|
||||
{ prop: 'buyer_nick', label: '买家昵称', minWidth: 140 },
|
||||
{ prop: 'name', label: '收货人', minWidth: 100 },
|
||||
{ prop: 'mobile', label: '手机号', minWidth: 120 },
|
||||
{ prop: 'name', label: '收件人', minWidth: 100 },
|
||||
{ prop: 'mobile', label: '电话', minWidth: 120 },
|
||||
{ prop: 'is_urgency', label: '是否紧急', minWidth: 100 },
|
||||
{ prop: 'status', label: '订单状态', minWidth: 120 },
|
||||
{ prop: 'sync_status', label: '同步状态', minWidth: 110 },
|
||||
{ prop: 'inspection_status', label: '审核状态', minWidth: 110 },
|
||||
{ prop: 'outbound_status', label: '出库状态', minWidth: 120 },
|
||||
{ prop: 'logistics_name', label: '物流公司', minWidth: 120 },
|
||||
{ prop: 'waybill_codes', label: '物流单号', minWidth: 140, formatter: waybillCodesFormatter },
|
||||
{ prop: 'logistics_name', label: '快递', minWidth: 120 },
|
||||
{ prop: 'waybill_codes', label: '运单号', minWidth: 140, formatter: waybillCodesFormatter },
|
||||
{ prop: 'items_total', label: '商品总数', minWidth: 100 },
|
||||
{ prop: 'total_amount', label: '订单金额', minWidth: 110 },
|
||||
{ prop: 'create_at', label: '创建时间', minWidth: 170, formatter: orderTimeFormatter },
|
||||
@ -1367,80 +1566,48 @@ export const workbenchBadgeItems = [
|
||||
|
||||
// expectionOrder相关配置
|
||||
export const expectionOrderAvailableFields = [
|
||||
{ label: '货主', value: 'store_id', type: 'select', multiple: true, options: [] },
|
||||
{ label: '订单号', value: 'order_code', type: 'text' },
|
||||
{ label: '发货单号', value: 'delivery_order_code', type: 'text' },
|
||||
{ label: '订单标记', value: 'order_flag', type: 'text', operators: ['like', 'notlike'], defaultOperator: 'like' },
|
||||
// 单号信息
|
||||
storeScanField,
|
||||
exceptionOrderCodeScanField,
|
||||
deliveryOrderCodeScanField,
|
||||
orderFlagScanField,
|
||||
waveAssignmentScanField,
|
||||
{ label: '波次号', value: 'wave_no', type: 'text' },
|
||||
{ label: '物流公司', value: 'logistics_name', type: 'select', options: [] },
|
||||
waveNoScanField,
|
||||
// 物流信息
|
||||
logisticsNameScanField,
|
||||
expressCompanyScanField,
|
||||
{ label: '快递单号', value: 'express_code', type: 'text' },
|
||||
{label:'是否紧急', value: 'is_urgency', type: 'select', options: [ { label: '是', value: 'Y' }, { label: '否', value: 'N' } ] },
|
||||
{ label: '拦截状态', value: 'intercept_status', type: 'select', options: [
|
||||
{ label: '无', value: 'none' },
|
||||
{ label: '待拦截', value: 'pending' },
|
||||
{ label: '已拦截', value: 'success' }
|
||||
]},
|
||||
{label:'订单状态', value: 'status', type: 'select', options: [
|
||||
{ label: '待审核', value: 'pedding' },
|
||||
{ label: '已审核', value: 'created' },
|
||||
{ label: '异常', value: 'error' },
|
||||
{ label: '已作废', value: 'cancelled' },
|
||||
{ label: '已归档', value: 'archived' }
|
||||
]},
|
||||
{label:'同步状态', value: 'sync_status', type: 'select', options: [
|
||||
{ label: '待同步', value: 'padding' },
|
||||
{ label: '同步中', value: 'pending' },
|
||||
{ label: '已完成', value: 'fin' },
|
||||
{ label: '错误', value: 'error' },
|
||||
{ label: '未同步', value: 'none' }
|
||||
]},
|
||||
{label:'分配状态', value: 'storage_status', type: 'select', options: [
|
||||
{ label: '未分配', value: 'none' },
|
||||
{ label: '分配中', value: 'padding' },
|
||||
{ label: '已完成', value: 'fin' },
|
||||
{ label: '错误', value: 'error' }
|
||||
]},
|
||||
{label:'快递状态', value: 'post_status', type: 'select', options: [
|
||||
{ label: '未分配', value: 'none' },
|
||||
{ label: '分配中', value: 'padding' },
|
||||
{ label: '已完成', value: 'fin' },
|
||||
{ label: '错误', value: 'error' },
|
||||
{ label: '超时', value: 'timeout' }
|
||||
]},
|
||||
{label:'打印状态', value: 'print_status', type: 'select', options: [
|
||||
{ label: '未打印', value: 'none' },
|
||||
{ label: '已完成', value: 'fin' }
|
||||
]},
|
||||
{label:'拣货状态', value: 'pick_status', type: 'select', options: [
|
||||
{ label: '未拣货', value: 'none' },
|
||||
{ label: '拣货中', value: 'padding' },
|
||||
{ label: '已完成', value: 'fin' }
|
||||
]},
|
||||
{label:'打包状态', value: 'pack_status', type: 'select', options: [
|
||||
{ label: '未打包', value: 'none' },
|
||||
{ label: '打包中', value: 'padding' },
|
||||
{ label: '已完成', value: 'fin' }
|
||||
]},
|
||||
{ label: '创建时间', value: 'create_at', type: 'daterange' },
|
||||
expressCodeScanField,
|
||||
// 订单状态
|
||||
scanField('status', { label: '是否紧急', value: 'is_urgency', type: 'select', options: isUrgencyFilterOptions }),
|
||||
scanField('status', { label: '拦截状态', value: 'intercept_status', type: 'select', options: interceptStatusFilterOptions }),
|
||||
scanField('status', { label: '订单状态', value: 'status', type: 'select', options: exceptionOrderStatusFilterOptions }),
|
||||
scanField('status', { label: '同步状态', value: 'sync_status', type: 'select', options: syncStatusFilterOptionsBasic }),
|
||||
// 仓储流程
|
||||
scanField('warehouse', { label: '储位', value: 'storage_status', type: 'select', options: storageStatusFilterOptions }),
|
||||
scanField('warehouse', { label: '快递', value: 'post_status', type: 'select', options: postStatusFilterOptions }),
|
||||
scanField('warehouse', { label: '打印状态', value: 'print_status', type: 'select', options: printStatusFilterOptions }),
|
||||
scanField('warehouse', { label: '拣货状态', value: 'pick_status', type: 'select', options: pickStatusFilterOptions }),
|
||||
scanField('warehouse', { label: '打包状态', value: 'pack_status', type: 'select', options: packStatusFilterOptions }),
|
||||
// 时间范围
|
||||
createAtRangeScanField,
|
||||
]
|
||||
|
||||
export const expectionColumns = [
|
||||
{ prop: 'delivery_order_code', label: '发货单号', width: '170' },
|
||||
{ prop: 'wave_no', label: '波次号', width: '170' },
|
||||
{ prop: 'sys_platform_name', label: '来源平台', width: '120' },
|
||||
{ prop: 'sys_platform_name', label: '来源', width: '120' },
|
||||
{ prop: 'shop_nick', label: '店铺名称', width: '140' },
|
||||
{ prop: 'is_urgency', label: '是否紧急', width: '100' },
|
||||
{ prop: 'status', label: '订单状态', width: '100' },
|
||||
{ prop: 'sync_status', label: '同步状态', width: '100' },
|
||||
{ prop: 'storage_status', label: '分配状态', width: '100' },
|
||||
{ prop: 'post_status', label: '快递状态', width: '100' },
|
||||
{ prop: 'storage_status', label: '储位', width: '100' },
|
||||
{ prop: 'post_status', label: '快递', width: '100' },
|
||||
{ prop: 'pick_status', label: '拣货状态', width: '100' },
|
||||
{ prop: 'pack_status', label: '打包状态', width: '100' },
|
||||
{ prop: 'intercept_status', label: '拦截状态', width: '100', tag: true },
|
||||
{ prop: 'name', label: '收货人', width: '110' },
|
||||
{ prop: 'mobile', label: '手机号', width: '120' },
|
||||
{ prop: 'express_numbers', label: '运单号', width: '160', formatter: waybillCodesFormatter },
|
||||
{ prop: 'name', label: '收件人', width: '110' },
|
||||
{ prop: 'mobile', label: '电话', width: '120' },
|
||||
{ prop: 'logistics_name', label: '快递', width: '120' },
|
||||
{ prop: 'pre_delivery_order_code', label: '前置单号', width: '140' },
|
||||
{ prop: 'order_flag', label: '订单标记', minWidth: '260' },
|
||||
@ -1453,29 +1620,29 @@ export const expectionColumns = [
|
||||
export const expectionOrderDetail = [
|
||||
// 基础信息
|
||||
{ prop: 'delivery_order_code', label: '发货单号' },
|
||||
{ prop: 'order_code', label: '订单号' },
|
||||
{ prop: 'order_code', label: '发货单号' },
|
||||
{ prop: 'order_type', label: '订单类型' },
|
||||
{ prop: 'shop_nick', label: '店铺名称' },
|
||||
{ prop: 'sys_platform_name', label: '来源平台' },
|
||||
{ prop: 'status', label: '系统状态' },
|
||||
{ prop: 'sys_platform_name', label: '来源' },
|
||||
{ prop: 'status', label: '订单状态' },
|
||||
{ prop: 'intercept_status', label: '拦截状态' },
|
||||
|
||||
// 异常/状态标记
|
||||
{ prop: 'order_flag', label: '订单标记', span: 3 },
|
||||
{ prop: 'lock_status', label: '锁定状态' },
|
||||
{ prop: 'sync_status', label: '同步状态' },
|
||||
{ prop: 'post_status', label: '投递状态' },
|
||||
{ prop: 'post_status', label: '快递' },
|
||||
|
||||
// 收货信息
|
||||
{ prop: 'name', label: '收货人' },
|
||||
{ prop: 'mobile', label: '手机号' },
|
||||
{ prop: 'name', label: '收件人' },
|
||||
{ prop: 'mobile', label: '电话' },
|
||||
{ prop: 'province', label: '省份' },
|
||||
{ prop: 'city', label: '城市' },
|
||||
{ prop: 'area', label: '区县' },
|
||||
{ prop: 'detail_address', label: '详细地址' },
|
||||
|
||||
// 物流信息
|
||||
{ prop: 'logistics_name', label: '物流公司' },
|
||||
{ prop: 'logistics_name', label: '快递' },
|
||||
{ prop: 'express_code', label: '运单号' },
|
||||
|
||||
// 统计信息
|
||||
@ -1504,62 +1671,40 @@ export const expectionOrderbuttonList: any[] = [
|
||||
|
||||
// deliveryException相关配置
|
||||
export const archiveAvailableFields = [
|
||||
{ label: '货主', value: 'store_id', type: 'select', multiple: true, options: [] },
|
||||
{ label: '订单号', value: 'order_code', type: 'text' },
|
||||
{ label: '发货单号', value: 'delivery_order_code', type: 'text' },
|
||||
// 单号信息
|
||||
storeScanField,
|
||||
exceptionOrderCodeScanField,
|
||||
deliveryOrderCodeScanField,
|
||||
waveAssignmentScanField,
|
||||
{ label: '波次号', value: 'wave_no', type: 'text' },
|
||||
waveNoScanField,
|
||||
// 物流信息
|
||||
expressCompanyScanField,
|
||||
{label:'是否紧急', value: 'is_urgency', type: 'select', options: [ { label: '是', value: 'Y' }, { label: '否', value: 'N' } ] },
|
||||
{ label: '订单状态', value: 'status', type: 'select', options: [
|
||||
{ label: '待审核', value: 'pedding' },
|
||||
{ label: '已创建', value: 'created' },
|
||||
{ label: '异常', value: 'error' },
|
||||
{ label: '已作废', value: 'cancelled' },
|
||||
{ label: '已归档', value: 'archived' }
|
||||
]},
|
||||
{ label: '状态', value: 'status', type: 'select', options: [
|
||||
{ label: '已完成', value: 'finished' },
|
||||
{ label: '已作废', value: 'cancelled' },
|
||||
{ label: '已归档', value: 'archived' }
|
||||
]},
|
||||
{label:'同步状态', value: 'sync_status', type: 'select', options: [
|
||||
{ label: '待同步', value: 'padding' },
|
||||
{ label: '已完成', value: 'fin' },
|
||||
{ label: '错误', value: 'error' },
|
||||
{ label: '未同步', value: 'none' }
|
||||
]},
|
||||
{label:'出库状态', value: 'outbound_status', type: 'select', options: [
|
||||
{ label: '未出库', value: 'none' },
|
||||
{ label: '待出库', value: 'padding' },
|
||||
{ label: '已出库', value: 'fin' }
|
||||
]},
|
||||
{label:'拣货状态', value: 'pick_status', type: 'select', options: [
|
||||
{ label: '未拣货', value: 'none' },
|
||||
{ label: '拣货中', value: 'padding' },
|
||||
{ label: '已完成', value: 'fin' }
|
||||
]},
|
||||
{label:'打包状态', value: 'pack_status', type: 'select', options: [
|
||||
{ label: '未打包', value: 'none' },
|
||||
{ label: '打包中', value: 'padding' },
|
||||
{ label: '已完成', value: 'fin' }
|
||||
]},
|
||||
{ label: '店铺名称', value: 'shop_nick', type: 'text' },
|
||||
{ label: '收货人', value: 'name', type: 'text' },
|
||||
{ label: '手机号', value: 'mobile', type: 'text' },
|
||||
// 订单状态
|
||||
scanField('status', { label: '是否紧急', value: 'is_urgency', type: 'select', options: isUrgencyFilterOptions }),
|
||||
scanField('status', { label: '订单状态', value: 'status', type: 'select', options: archiveOrderStatusFilterOptions }),
|
||||
scanField('status', { label: '同步状态', value: 'sync_status', type: 'select', options: syncStatusFilterOptionsBasic }),
|
||||
// 仓储流程
|
||||
scanField('warehouse', { label: '出库状态', value: 'outbound_status', type: 'select', options: outboundStatusFilterOptions }),
|
||||
scanField('warehouse', { label: '拣货状态', value: 'pick_status', type: 'select', options: pickStatusFilterOptions }),
|
||||
scanField('warehouse', { label: '打包状态', value: 'pack_status', type: 'select', options: packStatusFilterOptions }),
|
||||
// 店铺平台
|
||||
shopNickScanField,
|
||||
// 收货信息
|
||||
receiverNameScanField,
|
||||
receiverMobileScanField,
|
||||
]
|
||||
|
||||
export const archiveColumns = [
|
||||
{ prop: 'id', label: 'ID', width: '80' },
|
||||
{ prop: 'order_code', label: '订单号', width: '180' },
|
||||
{ prop: 'order_code', label: '发货单号', width: '180' },
|
||||
{ prop: 'delivery_order_code', label: '发货单号', width: '160' },
|
||||
{ prop: 'wave_no', label: '波次号', width: '160' },
|
||||
{ prop: 'order_flag', label: '订单标记', minWidth: '260' },
|
||||
{ prop: 'shop_nick', label: '店铺名称', width: '140' },
|
||||
{ prop: 'name', label: '收货人', width: '120' },
|
||||
{ prop: 'mobile', label: '手机号', width: '120' },
|
||||
{ prop: 'logistics_name', label: '物流公司', width: '120' },
|
||||
{ prop: 'status', label: '状态', width: '100' },
|
||||
{ prop: 'name', label: '收件人', width: '120' },
|
||||
{ prop: 'mobile', label: '电话', width: '120' },
|
||||
{ prop: 'logistics_name', label: '快递', width: '120' },
|
||||
{ prop: 'status', label: '订单状态', width: '100' },
|
||||
{ prop: 'create_at', label: '创建时间', width: '160' },
|
||||
{ prop: 'updated_at', label: '归档时间', width: '160' },
|
||||
]
|
||||
@ -1567,22 +1712,22 @@ export const archiveColumns = [
|
||||
export const archiveOrderDetail = [
|
||||
// 基础信息
|
||||
{ prop: 'delivery_order_code', label: '发货单号' },
|
||||
{ prop: 'order_code', label: '订单号' },
|
||||
{ prop: 'order_code', label: '发货单号' },
|
||||
{ prop: 'order_type', label: '订单类型' },
|
||||
{ prop: 'shop_nick', label: '店铺名称' },
|
||||
{ prop: 'sys_platform_name', label: '来源平台' },
|
||||
{ prop: 'status', label: '系统状态' },
|
||||
{ prop: 'sys_platform_name', label: '来源' },
|
||||
{ prop: 'status', label: '订单状态' },
|
||||
|
||||
// 收货信息
|
||||
{ prop: 'name', label: '收货人' },
|
||||
{ prop: 'mobile', label: '手机号' },
|
||||
{ prop: 'name', label: '收件人' },
|
||||
{ prop: 'mobile', label: '电话' },
|
||||
{ prop: 'province', label: '省份' },
|
||||
{ prop: 'city', label: '城市' },
|
||||
{ prop: 'area', label: '区县' },
|
||||
{ prop: 'detail_address', label: '详细地址' },
|
||||
|
||||
// 物流信息
|
||||
{ prop: 'logistics_name', label: '物流公司' },
|
||||
{ prop: 'logistics_name', label: '快递' },
|
||||
{ prop: 'express_code', label: '运单号' },
|
||||
|
||||
// 金额/统计
|
||||
|
||||
@ -83,20 +83,18 @@
|
||||
</div>
|
||||
|
||||
<div class="detail-container">
|
||||
<KeepAlive>
|
||||
<div v-if="activeTab === 'detail'" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel :row="selectedRow" :detail-request="fetchDeliveryExpectionOrderDetail" />
|
||||
<div v-if="activeTab === 'detail'" :key="`detail-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel :key="selectedOrderId" :row="selectedRow" :detail-request="fetchDeliveryExpectionOrderDetail" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'items'" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :row="selectedRow" :detail-request="fetchDeliveryExpectionOrderDetail" />
|
||||
<div v-else-if="activeTab === 'items'" :key="`items-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :key="selectedOrderId" :row="selectedRow" :detail-request="fetchDeliveryExpectionOrderDetail" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'fulfillment'" class="detail-page">
|
||||
<p>履约历程加载中...</p>
|
||||
</div>
|
||||
<div v-else class="detail-page order-log-wrapper">
|
||||
<log :data="selectedRow" />
|
||||
<div v-else :key="`logs-${selectedOrderId}`" class="detail-page order-log-wrapper">
|
||||
<log :key="selectedOrderId" :data="selectedRow" />
|
||||
</div>
|
||||
</KeepAlive>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -146,7 +144,8 @@ import OrderItemsDetailPanel from './component/OrderItemsDetailPanel.vue'
|
||||
import log from './component/log.vue'
|
||||
import OrderExportProgressDialog from './component/OrderExportProgressDialog.vue'
|
||||
import { createOrderPageExport } from './utils/order-page-export'
|
||||
import { parseOrderListResponse } from './utils/order-index-helpers'
|
||||
import { buildOrderWhereConditions, parseOrderListResponse } from './utils/order-index-helpers'
|
||||
import { useOrderListPageCleanup } from './utils/use-order-list-page-cleanup'
|
||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||
import OrderToolbarButtonGroup from './component/OrderToolbarButtonGroup.vue'
|
||||
import { createSimpleListToolbarController } from './utils/toolbar-actions'
|
||||
@ -225,6 +224,8 @@ onMounted(() => {
|
||||
loadFilterData()
|
||||
})
|
||||
|
||||
useOrderListPageCleanup({ list, selectionRows, selectedOrderId })
|
||||
|
||||
async function loadData() {
|
||||
if (loading.value) return
|
||||
loading.value = true
|
||||
@ -260,30 +261,8 @@ async function loadData() {
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
function buildWhere() {
|
||||
let where = buildWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
let where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
if (quickSearch.value) {
|
||||
where.delivery_order_code = {
|
||||
operator: 'like',
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
|
||||
<template #column-outbound_status="{ row }">
|
||||
<el-tag :type="getTagType('outbound_status', row.outbound_status)" size="small">
|
||||
{{ translateOrderField('outbound_status', row.outbound_status) || row.outbound_status || '-' }}
|
||||
{{ translateOrderField('outbound_status', row.outbound_status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
|
||||
@ -126,9 +126,10 @@
|
||||
</template>
|
||||
|
||||
<template #column-intercept_status="{ row }">
|
||||
<el-tag :type="getTagType('intercept_status', row.intercept_status)" size="small">
|
||||
{{ translateOrderField('intercept_status', row.intercept_status) }}
|
||||
<el-tag v-if="row.intercept_status && row.intercept_status !== 'none'" type="danger" size="small">
|
||||
{{ translateInterceptStatus(row.intercept_status) }}
|
||||
</el-tag>
|
||||
<span v-else style="color:#909399">—</span>
|
||||
</template>
|
||||
|
||||
<template #empty>
|
||||
@ -148,21 +149,20 @@
|
||||
</div>
|
||||
|
||||
<div class="detail-container">
|
||||
<KeepAlive>
|
||||
<div v-if="activeTab === 'detail'" class="detail-page order-detail-wrapper">
|
||||
<div v-if="activeTab === 'detail'" :key="`detail-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel
|
||||
:key="selectedOrderId"
|
||||
:row="selectedRow"
|
||||
:detail-request="fetchDeliveryOrderDetail"
|
||||
:sections="deliveryOrderDetailSections"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'items'" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :row="selectedRow" :detail-request="fetchDeliveryOrderDetail" />
|
||||
<div v-else-if="activeTab === 'items'" :key="`items-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :key="selectedOrderId" :row="selectedRow" :detail-request="fetchDeliveryOrderDetail" />
|
||||
</div>
|
||||
<div v-else class="detail-page order-log-wrapper">
|
||||
<log :data="selectedRow" />
|
||||
<div v-else :key="`logs-${selectedOrderId}`" class="detail-page order-log-wrapper">
|
||||
<log :key="selectedOrderId" :data="selectedRow" />
|
||||
</div>
|
||||
</KeepAlive>
|
||||
</div>
|
||||
</div>
|
||||
<div class="no-selection" v-else :style="lowerPaneStyle">
|
||||
@ -202,6 +202,7 @@ import {
|
||||
deliveryOrderToolbarButtons,
|
||||
type ToolbarButtonConfig,
|
||||
translateOrderField,
|
||||
translateInterceptStatus,
|
||||
getTagType,
|
||||
fillExpressCompanyScanFieldOptions,
|
||||
fillStoreScanFieldOptions,
|
||||
@ -212,7 +213,8 @@ import OrderItemsDetailPanel from './component/OrderItemsDetailPanel.vue'
|
||||
import log from './component/log.vue'
|
||||
import OrderExportProgressDialog from './component/OrderExportProgressDialog.vue'
|
||||
import { createOrderPageExport } from './utils/order-page-export'
|
||||
import { parseOrderListResponse, resolveOrderRecheckStatus } from './utils/order-index-helpers'
|
||||
import { buildOrderWhereConditions, parseOrderListResponse, resolveOrderRecheckStatus } from './utils/order-index-helpers'
|
||||
import { useOrderListPageCleanup } from './utils/use-order-list-page-cleanup'
|
||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||
import OrderToolbarButtonGroup from './component/OrderToolbarButtonGroup.vue'
|
||||
import { createSimpleListToolbarController } from './utils/toolbar-actions'
|
||||
@ -276,6 +278,8 @@ onMounted(() => {
|
||||
loadOrderMetaOptions()
|
||||
})
|
||||
|
||||
useOrderListPageCleanup({ list, selectionRows, selectedOrderId })
|
||||
|
||||
function normalizeOptionValue(value: unknown) {
|
||||
return String(value ?? '').trim()
|
||||
}
|
||||
@ -355,30 +359,8 @@ async function loadData() {
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
function buildWhere() {
|
||||
let where = buildWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
let where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
if (quickSearch.value) {
|
||||
where.delivery_order_code = {
|
||||
operator: 'like',
|
||||
|
||||
@ -83,20 +83,18 @@
|
||||
</div>
|
||||
|
||||
<div class="detail-container">
|
||||
<KeepAlive>
|
||||
<div v-if="activeTab === 'detail'" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel :row="selectedRow" :detail-request="fetchEntrustOrderDetail" />
|
||||
<div v-if="activeTab === 'detail'" :key="`detail-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel :key="selectedOrderId" :row="selectedRow" :detail-request="fetchEntrustOrderDetail" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'items'" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :row="selectedRow" :detail-request="fetchEntrustOrderDetail" />
|
||||
<div v-else-if="activeTab === 'items'" :key="`items-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :key="selectedOrderId" :row="selectedRow" :detail-request="fetchEntrustOrderDetail" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'fulfillment'" class="detail-page">
|
||||
<p>履约历程加载中...</p>
|
||||
</div>
|
||||
<div v-else class="detail-page order-log-wrapper">
|
||||
<log :data="selectedRow" />
|
||||
<div v-else :key="`logs-${selectedOrderId}`" class="detail-page order-log-wrapper">
|
||||
<log :key="selectedOrderId" :data="selectedRow" />
|
||||
</div>
|
||||
</KeepAlive>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -146,7 +144,8 @@ import OrderItemsDetailPanel from './component/OrderItemsDetailPanel.vue'
|
||||
import log from './component/log.vue'
|
||||
import OrderExportProgressDialog from './component/OrderExportProgressDialog.vue'
|
||||
import { createOrderPageExport } from './utils/order-page-export'
|
||||
import { parseOrderListResponse } from './utils/order-index-helpers'
|
||||
import { buildOrderWhereConditions, parseOrderListResponse } from './utils/order-index-helpers'
|
||||
import { useOrderListPageCleanup } from './utils/use-order-list-page-cleanup'
|
||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||
import OrderToolbarButtonGroup from './component/OrderToolbarButtonGroup.vue'
|
||||
import { createSimpleListToolbarController } from './utils/toolbar-actions'
|
||||
@ -225,6 +224,8 @@ onMounted(() => {
|
||||
loadFilterData()
|
||||
})
|
||||
|
||||
useOrderListPageCleanup({ list, selectionRows, selectedOrderId })
|
||||
|
||||
async function loadData() {
|
||||
if (loading.value) return
|
||||
loading.value = true
|
||||
@ -260,30 +261,8 @@ async function loadData() {
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
function buildWhere() {
|
||||
let where = buildWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
let where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
if (quickSearch.value) {
|
||||
where.delivery_order_code = {
|
||||
operator: 'like',
|
||||
|
||||
@ -148,7 +148,7 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
|
||||
<template #column-waybill_codes="{ row }">
|
||||
<template #column-express_numbers="{ row }">
|
||||
<div v-if="extractWaybillCodes(row).length" class="waybill-list">
|
||||
<span
|
||||
v-for="code in extractWaybillCodes(row)"
|
||||
@ -222,20 +222,18 @@
|
||||
</div>
|
||||
|
||||
<div class="detail-container">
|
||||
<KeepAlive>
|
||||
<div v-if="activeTab === 'detail'" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel :row="selectedRow" :detail-request="fetchExpectionOrderDetail" />
|
||||
<div v-if="activeTab === 'detail'" :key="`detail-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel :key="selectedOrderId" :row="selectedRow" :detail-request="fetchExpectionOrderDetail" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'items'" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :row="selectedRow" />
|
||||
<div v-else-if="activeTab === 'items'" :key="`items-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :key="selectedOrderId" :row="selectedRow" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'picking'" class="detail-page order-picking-wrapper">
|
||||
<p>配货明细加载中...</p>
|
||||
</div>
|
||||
<div v-else class="detail-page order-log-wrapper">
|
||||
<log :data="selectedRow" />
|
||||
<div v-else :key="`logs-${selectedOrderId}`" class="detail-page order-log-wrapper">
|
||||
<log :key="selectedOrderId" :data="selectedRow" />
|
||||
</div>
|
||||
</KeepAlive>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -394,6 +392,7 @@ import { orderExpectionOrder } from '@/api/order.expectionorder/orderexpectionor
|
||||
import { orderPendingOrder } from '@/api/order.pendingorder/orderpendingOrder'
|
||||
|
||||
import {
|
||||
buildPendingStyleColumns,
|
||||
expectionColumns,
|
||||
expectionOrderAvailableFields,
|
||||
expectionOrderbuttonList,
|
||||
@ -420,7 +419,8 @@ import UpdateAddressForm from './form/UpdateAddressForm.vue'
|
||||
import BatchAsyncTaskForm from './form/BatchAsyncTaskForm.vue'
|
||||
import OrderExportProgressDialog from './component/OrderExportProgressDialog.vue'
|
||||
import { createOrderPageExport } from './utils/order-page-export'
|
||||
import { parseOrderListResponse } from './utils/order-index-helpers'
|
||||
import { buildOrderWhereConditions, parseOrderListResponse } from './utils/order-index-helpers'
|
||||
import { useOrderListPageCleanup } from './utils/use-order-list-page-cleanup'
|
||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||
import OrderToolbarButtonGroup from './component/OrderToolbarButtonGroup.vue'
|
||||
import { createPendingToolbarController } from './utils/toolbar-actions'
|
||||
@ -465,23 +465,7 @@ const platformCodeOptions = ref<Array<{ label: string; value: string }>>([])
|
||||
const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 })
|
||||
const tableSize = ref('small')
|
||||
|
||||
const buildExceptionColumns = () => {
|
||||
const source = Array.isArray(expectionColumns) ? [...expectionColumns] : []
|
||||
if (source.some((col: any) => String(col?.prop || '') === 'print_status')) {
|
||||
return source
|
||||
}
|
||||
|
||||
const printColumn = { prop: 'print_status', label: '打印状态', width: '100' }
|
||||
const insertAfterIndex = source.findIndex((col: any) => String(col?.prop || '') === 'post_status')
|
||||
if (insertAfterIndex >= 0) {
|
||||
source.splice(insertAfterIndex + 1, 0, printColumn)
|
||||
} else {
|
||||
source.push(printColumn)
|
||||
}
|
||||
return source
|
||||
}
|
||||
|
||||
const columns = ref(buildExceptionColumns())
|
||||
const columns = ref(buildPendingStyleColumns(expectionColumns))
|
||||
|
||||
|
||||
const selectionRows = ref<any[]>([])
|
||||
@ -632,6 +616,8 @@ onUnmounted(() => {
|
||||
unregisterCreateOrderSuccess(loadData)
|
||||
})
|
||||
|
||||
useOrderListPageCleanup({ list, selectionRows, selectedOrderId })
|
||||
|
||||
async function loadData() {
|
||||
if (loading.value) return
|
||||
loading.value = true
|
||||
@ -667,30 +653,8 @@ async function loadData() {
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
function buildExportWhere() {
|
||||
let where = buildWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
let where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
if (quickSearch.value) {
|
||||
where.delivery_order_code = {
|
||||
operator: 'like',
|
||||
|
||||
@ -4,7 +4,6 @@
|
||||
<el-button size="small" @click="workbenchDialogVisible = true">统一查询</el-button>
|
||||
<el-button size="small" :loading="badgeLoading" @click="refreshBadgeCounts">刷新角标</el-button>
|
||||
</div>
|
||||
<!-- 使用 keep-alive 强制保留所有标签 -->
|
||||
<el-tabs
|
||||
v-model="activeTab"
|
||||
@tab-change="handleTabChange"
|
||||
@ -30,10 +29,8 @@
|
||||
/>
|
||||
</span>
|
||||
</template>
|
||||
<!-- Vue 3 keep-alive 内部必须是单一根元素或动态组件 -->
|
||||
<keep-alive>
|
||||
<component :is="tab.component" v-if="activeTab === tab.name" />
|
||||
</keep-alive>
|
||||
<!-- 仅挂载当前标签页,切换时销毁子页以释放内存 -->
|
||||
<component :is="tab.component" v-if="activeTab === tab.name" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
@ -67,8 +64,6 @@ const shortcutExpanded = computed(() => settingsStore.shortcutExpanded)
|
||||
const containerHeight = computed(() => shortcutExpanded.value ? 'calc(100vh - 150px)' : 'calc(100vh - 100px)')
|
||||
|
||||
const activeTab = ref('pendingOrder')
|
||||
const forceRenderAll = ref(false) // 只有 activeTab 对应的组件会被渲染
|
||||
|
||||
type OrderTabItem = {
|
||||
name: string
|
||||
label: string
|
||||
|
||||
@ -108,7 +108,7 @@
|
||||
|
||||
<template #column-outbound_status="{ row }">
|
||||
<el-tag :type="getTagType('outbound_status', row.outbound_status)" size="small">
|
||||
{{ translateOrderField('outbound_status', row.outbound_status) || row.outbound_status || 'none' }}
|
||||
{{ translateOrderField('outbound_status', row.outbound_status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</upper-table>
|
||||
@ -127,28 +127,27 @@
|
||||
</div>
|
||||
|
||||
<div class="detail-container">
|
||||
<KeepAlive>
|
||||
<div v-if="activeTab === 'detail'" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel :row="selectedRow" :detail-request="fetchOutboundOrderDetail" />
|
||||
<div v-if="activeTab === 'detail'" :key="`detail-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel :key="selectedOrderId" :row="selectedRow" :detail-request="fetchOutboundOrderDetail" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'items'" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :row="selectedRow" />
|
||||
<div v-else-if="activeTab === 'items'" :key="`items-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :key="selectedOrderId" :row="selectedRow" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'logs'" class="detail-page order-log-wrapper">
|
||||
<log :data="selectedRow" />
|
||||
<div v-else-if="activeTab === 'logs'" :key="`logs-${selectedOrderId}`" class="detail-page order-log-wrapper">
|
||||
<log :key="selectedOrderId" :data="selectedRow" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'waybill'" class="detail-page order-waybill-wrapper">
|
||||
<express-waybill-panel :row="selectedRow" table-type="order" />
|
||||
<div v-else-if="activeTab === 'waybill'" :key="`waybill-${selectedOrderId}`" class="detail-page order-waybill-wrapper">
|
||||
<express-waybill-panel :key="selectedOrderId" :row="selectedRow" table-type="order" />
|
||||
</div>
|
||||
<div v-else class="detail-page order-manual-outbound-wrapper">
|
||||
<div v-else :key="`manual-${selectedOrderId}`" class="detail-page order-manual-outbound-wrapper">
|
||||
<outbound-manual-outbound-form
|
||||
:key="selectedOrderId"
|
||||
ref="manualOutboundRef"
|
||||
:orderId="selectedOrderId"
|
||||
@success="handleManualOutboundSuccess"
|
||||
@loading-change="handleManualLoadingChange"
|
||||
/>
|
||||
</div>
|
||||
</KeepAlive>
|
||||
<el-alert
|
||||
v-if="activeTab === 'manualOutbound' && manualResult"
|
||||
type="success"
|
||||
@ -189,6 +188,7 @@ import UpperTable from '@/components/UpperTable/index.vue'
|
||||
import * as indexApi from '@/api/index/index'
|
||||
import { orderOutboundOrder } from '@/api/order.outboundorder/orderoutboundOrder'
|
||||
import {
|
||||
buildPendingStyleColumns,
|
||||
outboundAvailableFields,
|
||||
outboundColumns,
|
||||
outboundToolbarButtons,
|
||||
@ -206,7 +206,8 @@ import OutboundManualOutboundForm from './component/OutboundManualOutboundForm.v
|
||||
import ExpressWaybillPanel from './component/ExpressWaybillPanel.vue'
|
||||
import OrderExportProgressDialog from './component/OrderExportProgressDialog.vue'
|
||||
import { createOrderPageExport } from './utils/order-page-export'
|
||||
import { parseOrderListResponse } from './utils/order-index-helpers'
|
||||
import { buildOrderWhereConditions, parseOrderListResponse } from './utils/order-index-helpers'
|
||||
import { useOrderListPageCleanup } from './utils/use-order-list-page-cleanup'
|
||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||
import OrderToolbarButtonGroup from './component/OrderToolbarButtonGroup.vue'
|
||||
import { createSimpleListToolbarController } from './utils/toolbar-actions'
|
||||
@ -225,7 +226,7 @@ const queryTime = ref(0)
|
||||
const availableFieldsRef = reactive(JSON.parse(JSON.stringify(outboundAvailableFields)))
|
||||
const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 })
|
||||
const tableSize = ref('small')
|
||||
const columns = ref(outboundColumns)
|
||||
const columns = ref(buildPendingStyleColumns(outboundColumns))
|
||||
const selectionRows = ref<any[]>([])
|
||||
const selectedOrderId = ref<number | string | null>(null)
|
||||
const detailVisible = ref(true)
|
||||
@ -269,7 +270,7 @@ function sanitizeOutboundListWhere(where: Record<string, any>) {
|
||||
}
|
||||
|
||||
function buildWhere() {
|
||||
let where = buildWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
let where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
if (quickSearch.value) {
|
||||
where.delivery_order_code = {
|
||||
operator: 'like',
|
||||
@ -280,28 +281,6 @@ function buildWhere() {
|
||||
return sanitizeOutboundListWhere(where)
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
const pageExport = createOrderPageExport({
|
||||
scopeKey: 'outboundOrder',
|
||||
buildWhere,
|
||||
@ -431,6 +410,15 @@ onMounted(() => {
|
||||
loadOrderMetaOptions()
|
||||
})
|
||||
|
||||
useOrderListPageCleanup({
|
||||
list,
|
||||
selectionRows,
|
||||
selectedOrderId,
|
||||
onCleanup: () => {
|
||||
manualResult.value = null
|
||||
}
|
||||
})
|
||||
|
||||
function normalizeOptionValue(value: unknown) {
|
||||
return String(value ?? '').trim()
|
||||
}
|
||||
|
||||
@ -109,7 +109,7 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
|
||||
<template #column-waybill_codes="{ row }">
|
||||
<template #column-express_numbers="{ row }">
|
||||
<div v-if="extractWaybillCodes(row).length" class="waybill-cell">
|
||||
<div class="waybill-list">
|
||||
<span
|
||||
@ -174,29 +174,28 @@
|
||||
</div>
|
||||
|
||||
<div class="detail-container">
|
||||
<KeepAlive>
|
||||
<div v-if="activeTab === 'detail'" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel :row="selectedRow" />
|
||||
<div v-if="activeTab === 'detail'" :key="`detail-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel :key="selectedOrderId" :row="selectedRow" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'items'" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :row="selectedRow" />
|
||||
<div v-else-if="activeTab === 'items'" :key="`items-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :key="selectedOrderId" :row="selectedRow" />
|
||||
</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
|
||||
:key="selectedOrderId"
|
||||
:order-id="selectedRow?.id || null"
|
||||
:delivery-order-code="selectedRow?.delivery_order_code || ''"
|
||||
/>
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'logs'" class="detail-page order-log-wrapper">
|
||||
<log :data="selectedRow" />
|
||||
<div v-else-if="activeTab === 'logs'" :key="`logs-${selectedOrderId}`" class="detail-page order-log-wrapper">
|
||||
<log :key="selectedOrderId" :data="selectedRow" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'waybill'" class="detail-page order-waybill-wrapper">
|
||||
<express-waybill-panel :row="selectedRow" table-type="order" />
|
||||
<div v-else-if="activeTab === 'waybill'" :key="`waybill-${selectedOrderId}`" class="detail-page order-waybill-wrapper">
|
||||
<express-waybill-panel :key="selectedOrderId" :row="selectedRow" table-type="order" />
|
||||
</div>
|
||||
</KeepAlive>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -332,7 +331,7 @@ import { orderPendingOrder } from '@/api/order.pendingorder/orderpendingOrder'
|
||||
import * as indexApi from '@/api/index/index'
|
||||
|
||||
import {
|
||||
pendingCloums,
|
||||
buildPendingStyleColumns,
|
||||
pendingAvailableFields,
|
||||
pendingToolbarButtons,
|
||||
type ToolbarButtonConfig,
|
||||
@ -359,7 +358,8 @@ import BatchAsyncTaskForm from './form/BatchAsyncTaskForm.vue'
|
||||
import ExpressWaybillPanel from './component/ExpressWaybillPanel.vue'
|
||||
import OrderExportProgressDialog from './component/OrderExportProgressDialog.vue'
|
||||
import { createOrderPageExport } from './utils/order-page-export'
|
||||
import { parseOrderListResponse, resolveOrderRecheckStatus } from './utils/order-index-helpers'
|
||||
import { buildOrderWhereConditions, parseOrderListResponse, resolveOrderRecheckStatus } from './utils/order-index-helpers'
|
||||
import { useOrderListPageCleanup } from './utils/use-order-list-page-cleanup'
|
||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||
import OrderToolbarButtonGroup from './component/OrderToolbarButtonGroup.vue'
|
||||
import { createPendingToolbarController } from './utils/toolbar-actions'
|
||||
@ -398,32 +398,7 @@ const queryTime = ref(0)
|
||||
const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 })
|
||||
const tableSize = ref('small')
|
||||
|
||||
const buildPendingColumns = () => {
|
||||
const source = Array.isArray(pendingCloums) ? [...pendingCloums] : []
|
||||
const recheckColumn = { prop: 'recheck_status', label: '复核', width: '100' }
|
||||
if (!source.some((col: any) => String(col?.prop || '') === 'recheck_status')) {
|
||||
const insertAfterIndex = source.findIndex((col: any) => String(col?.prop || '') === 'sync_status')
|
||||
if (insertAfterIndex >= 0) {
|
||||
source.splice(insertAfterIndex + 1, 0, recheckColumn)
|
||||
} else {
|
||||
source.push(recheckColumn)
|
||||
}
|
||||
}
|
||||
if (source.some((col: any) => String(col?.prop || '') === 'print_status')) {
|
||||
return source
|
||||
}
|
||||
|
||||
const printColumn = { prop: 'print_status', label: '打印状态', width: '100' }
|
||||
const insertAfterIndex = source.findIndex((col: any) => String(col?.prop || '') === 'post_status')
|
||||
if (insertAfterIndex >= 0) {
|
||||
source.splice(insertAfterIndex + 1, 0, printColumn)
|
||||
} else {
|
||||
source.push(printColumn)
|
||||
}
|
||||
return source
|
||||
}
|
||||
|
||||
const columns = ref(buildPendingColumns())
|
||||
const columns = ref(buildPendingStyleColumns())
|
||||
|
||||
|
||||
const selectionRows = ref<any[]>([])
|
||||
@ -495,6 +470,16 @@ onUnmounted(() => {
|
||||
unregisterCreateOrderSuccess(loadData)
|
||||
})
|
||||
|
||||
useOrderListPageCleanup({
|
||||
list,
|
||||
selectionRows,
|
||||
selectedOrderId,
|
||||
onCleanup: () => {
|
||||
batchPrintPayload.value = null
|
||||
batchPrintRequestMeta.value = null
|
||||
}
|
||||
})
|
||||
|
||||
async function loadData() {
|
||||
if (loading.value) return
|
||||
loading.value = true
|
||||
@ -532,30 +517,8 @@ async function loadData() {
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
function buildExportWhere() {
|
||||
let where = buildWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
let where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
const routeWaveNo = String(route.query.wave_no || '').trim()
|
||||
if (routeWaveNo) {
|
||||
where.wave_no = {
|
||||
|
||||
@ -106,31 +106,29 @@
|
||||
</div>
|
||||
|
||||
<div class="detail-container">
|
||||
<KeepAlive>
|
||||
<div v-if="activeTab === 'detail'" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel :row="selectedRow" :detail-request="fetchReviewOrderDetail" />
|
||||
<div v-if="activeTab === 'detail'" :key="`detail-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<pending-order-detail-panel :key="selectedOrderId" :row="selectedRow" :detail-request="fetchReviewOrderDetail" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'items'" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :row="selectedRow" />
|
||||
<div v-else-if="activeTab === 'items'" :key="`items-${selectedOrderId}`" class="detail-page order-detail-wrapper">
|
||||
<order-items-detail-panel :key="selectedOrderId" :row="selectedRow" />
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'receiver'" class="detail-page order-receiver-wrapper">
|
||||
<div v-else-if="activeTab === 'receiver'" :key="`receiver-${selectedOrderId}`" class="detail-page order-receiver-wrapper">
|
||||
<el-descriptions :column="2" border>
|
||||
<el-descriptions-item label="收货人">{{ selectedRow?.name }}</el-descriptions-item>
|
||||
<el-descriptions-item label="手机">{{ selectedRow?.mobile }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'review'" class="detail-page order-review-wrapper review-tab-panel">
|
||||
<div v-else-if="activeTab === 'review'" :key="`review-${selectedOrderId}`" class="detail-page order-review-wrapper review-tab-panel">
|
||||
<el-alert type="info" :closable="false" show-icon title="可对当前选中订单发起审核操作" />
|
||||
<div class="review-tab-action">
|
||||
<el-button size="small" type="primary" :loading="reviewSubmitting" @click="handleSingleReview">审核当前订单</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="activeTab === 'logs'" class="detail-page order-log-wrapper">
|
||||
<log :data="selectedRow" />
|
||||
<div v-else-if="activeTab === 'logs'" :key="`logs-${selectedOrderId}`" class="detail-page order-log-wrapper">
|
||||
<log :key="selectedOrderId" :data="selectedRow" />
|
||||
</div>
|
||||
</KeepAlive>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="no-selection" v-else :style="lowerPaneStyle">
|
||||
<div class="empty-tip">
|
||||
@ -180,7 +178,8 @@ import { useCreateOrderSession } from './composables/useCreateOrderSession'
|
||||
import log from './component/log.vue'
|
||||
import OrderExportProgressDialog from './component/OrderExportProgressDialog.vue'
|
||||
import { createOrderPageExport } from './utils/order-page-export'
|
||||
import { parseOrderListResponse, resolveOrderRecheckStatus } from './utils/order-index-helpers'
|
||||
import { buildOrderWhereConditions, parseOrderListResponse, resolveOrderRecheckStatus } from './utils/order-index-helpers'
|
||||
import { useOrderListPageCleanup } from './utils/use-order-list-page-cleanup'
|
||||
import { useVerticalSplitPane } from '@/composables/useVerticalSplitPane'
|
||||
import OrderToolbarButtonGroup from './component/OrderToolbarButtonGroup.vue'
|
||||
import { createReviewToolbarController } from './utils/toolbar-actions'
|
||||
@ -253,6 +252,8 @@ onUnmounted(() => {
|
||||
unregisterCreateOrderSuccess(loadData)
|
||||
})
|
||||
|
||||
useOrderListPageCleanup({ list, selectionRows, selectedOrderId })
|
||||
|
||||
function normalizeOptionValue(value: unknown) {
|
||||
return String(value ?? '').trim()
|
||||
}
|
||||
@ -333,30 +334,8 @@ async function loadData() {
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
function buildExportWhere() {
|
||||
let where = buildWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
let where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
if (quickSearch.value) {
|
||||
where.delivery_order_code = {
|
||||
operator: 'like',
|
||||
|
||||
@ -100,6 +100,121 @@ export function parseOrderDetailPayload(res: any): Record<string, any> {
|
||||
return nested && typeof nested === 'object' ? nested : res
|
||||
}
|
||||
|
||||
/** order.detail 商品明细:优先 orderItems,兼容 items 及嵌套字段 */
|
||||
export function normalizeOrderDetailItems(data: Record<string, any>): any[] {
|
||||
if (Array.isArray(data.orderItems)) return data.orderItems
|
||||
if (Array.isArray(data.items)) return data.items
|
||||
|
||||
const rawItems = data.order?.items || data.detail?.items
|
||||
if (Array.isArray(rawItems)) return rawItems
|
||||
if (typeof rawItems === 'string') {
|
||||
try {
|
||||
const parsed = JSON.parse(rawItems)
|
||||
return Array.isArray(parsed) ? parsed : []
|
||||
} catch {
|
||||
return []
|
||||
}
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
/** order.detail 运单列表:优先 expresses,兼容 waybill_codes / 单运单字段 */
|
||||
export function normalizeOrderExpressList(data: Record<string, any>) {
|
||||
const expresses = Array.isArray(data.expresses) ? data.expresses : []
|
||||
if (expresses.length) {
|
||||
return expresses
|
||||
.map((item: any) => ({
|
||||
waybill_code: String(item.waybill_code || item.express_code || item.code || '').trim(),
|
||||
weighing_weight: item.weighing_weight ?? null,
|
||||
sys_logistics_code: item.sys_logistics_code || '',
|
||||
sys_logistics_name: item.sys_logistics_name || '',
|
||||
logistics_code: item.logistics_code || '',
|
||||
logistics_name: item.logistics_name || item.sys_logistics_name || item.logisticsName || '',
|
||||
logistics_interface_id: item.logistics_interface_id ?? null,
|
||||
business_key: item.business_key ?? '',
|
||||
created_at: item.created_at ?? item.create_at ?? null,
|
||||
is_main: String(item.business_key) === '1',
|
||||
package_material_code: item.package_material_code,
|
||||
package_material_name_snapshot: item.package_material_name_snapshot
|
||||
}))
|
||||
.filter((item: { waybill_code: string }) => item.waybill_code)
|
||||
}
|
||||
|
||||
const codes = Array.isArray(data.waybill_codes)
|
||||
? data.waybill_codes
|
||||
: Array.isArray(data.order?.waybill_codes)
|
||||
? data.order.waybill_codes
|
||||
: Array.isArray(data.detail?.waybill_codes)
|
||||
? data.detail.waybill_codes
|
||||
: []
|
||||
if (codes.length) {
|
||||
const logisticsName = data.order?.logistics_name || data.detail?.logistics_name || ''
|
||||
return codes.map((code: any) => ({
|
||||
waybill_code: String(code).trim(),
|
||||
weighing_weight: null,
|
||||
logistics_name: logisticsName,
|
||||
sys_logistics_name: '',
|
||||
logistics_code: '',
|
||||
sys_logistics_code: '',
|
||||
logistics_interface_id: null,
|
||||
business_key: '',
|
||||
created_at: null,
|
||||
is_main: false,
|
||||
package_material_code: '',
|
||||
package_material_name_snapshot: ''
|
||||
})).filter((item: { waybill_code: string }) => item.waybill_code)
|
||||
}
|
||||
|
||||
const expressCode = data.order?.express_code || data.detail?.express_code
|
||||
if (expressCode) {
|
||||
return [{
|
||||
waybill_code: String(expressCode).trim(),
|
||||
weighing_weight: null,
|
||||
logistics_name: data.order?.logistics_name || data.detail?.logistics_name || '',
|
||||
sys_logistics_name: '',
|
||||
logistics_code: '',
|
||||
sys_logistics_code: '',
|
||||
logistics_interface_id: null,
|
||||
business_key: '',
|
||||
created_at: null,
|
||||
is_main: false,
|
||||
package_material_code: '',
|
||||
package_material_name_snapshot: ''
|
||||
}]
|
||||
}
|
||||
return []
|
||||
}
|
||||
|
||||
/** order.detail 运单号汇总:优先 waybill_codes,否则从 expresses 提取 */
|
||||
export function normalizeOrderWaybillCodes(data: Record<string, any>, expressList: any[] = []) {
|
||||
if (Array.isArray(data.waybill_codes)) return data.waybill_codes
|
||||
if (Array.isArray(data.order?.waybill_codes)) return data.order.waybill_codes
|
||||
if (Array.isArray(data.detail?.waybill_codes)) return data.detail.waybill_codes
|
||||
return expressList
|
||||
.map((item) => item?.waybill_code)
|
||||
.filter((item) => item !== null && item !== undefined && `${item}`.trim() !== '')
|
||||
}
|
||||
|
||||
/** order.updateExpressWeighingWeight 响应 data 解析 */
|
||||
export function parseUpdateExpressWeighingWeightResponse(res: any): Record<string, any> {
|
||||
if (!res || typeof res !== 'object') return {}
|
||||
const nested = res.data
|
||||
if (nested && typeof nested === 'object' && !Array.isArray(nested)) {
|
||||
if (
|
||||
nested.weighing_weight !== undefined ||
|
||||
nested.waybill_code !== undefined ||
|
||||
nested.wave_id !== undefined ||
|
||||
nested.splits !== undefined
|
||||
) {
|
||||
return nested
|
||||
}
|
||||
if (nested.data && typeof nested.data === 'object') {
|
||||
return nested.data
|
||||
}
|
||||
}
|
||||
return nested && typeof nested === 'object' ? nested : res
|
||||
}
|
||||
|
||||
export function parseOrderLogsResponse(res: any): { list: any[]; total: number } {
|
||||
const pick = (obj: any) => {
|
||||
if (!obj || typeof obj !== 'object') return { list: [], total: 0 }
|
||||
@ -167,31 +282,132 @@ export function sanitizeOrderListWhere(where: Record<string, unknown>) {
|
||||
return next
|
||||
}
|
||||
|
||||
/** 行级复核状态(优先 recheck_status,兼容历史 inspection_status) */
|
||||
export function resolveOrderRecheckStatus(row?: Record<string, any> | null): string {
|
||||
if (!row || typeof row !== 'object') return ''
|
||||
const value = row.recheck_status ?? row.recheckStatus ?? row.inspection_status
|
||||
return value === undefined || value === null ? '' : String(value)
|
||||
const DATE_RANGE_OPERATORS = new Set(['between', 'notbetween'])
|
||||
const NULLISH_OPERATORS = new Set(['isnull', 'isnotnull'])
|
||||
const MULTI_VALUE_OPERATORS = new Set(['in', 'notin', 'contains'])
|
||||
|
||||
function isEmptyConditionValue(value: unknown): boolean {
|
||||
if (value === undefined || value === null || value === '') return true
|
||||
if (Array.isArray(value) && value.length === 0) return true
|
||||
return false
|
||||
}
|
||||
|
||||
/** 归一化 daterange 值:支持 `[start, end]` 或 `{ start/from/begin, end/to/finish }` */
|
||||
export function normalizeDateRangeValue(value: unknown): [string, string] | null {
|
||||
if (Array.isArray(value)) {
|
||||
const start = String(value[0] ?? '').trim()
|
||||
const end = String(value[1] ?? '').trim()
|
||||
if (!start || !end) return null
|
||||
return [start, end]
|
||||
}
|
||||
if (value && typeof value === 'object') {
|
||||
const obj = value as Record<string, unknown>
|
||||
const start = String(obj.start ?? obj.from ?? obj.begin ?? '').trim()
|
||||
const end = String(obj.end ?? obj.to ?? obj.finish ?? '').trim()
|
||||
if (!start || !end) return null
|
||||
return [start, end]
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
function normalizeWhereConditionEntry(condition: Record<string, any>): Record<string, any> | null {
|
||||
const operator = String(condition.operator ?? 'eq')
|
||||
const type = condition.type ? String(condition.type) : undefined
|
||||
const value = condition.value
|
||||
|
||||
if (NULLISH_OPERATORS.has(operator)) {
|
||||
return { operator, type: type || 'text', value: null }
|
||||
}
|
||||
|
||||
if (isEmptyConditionValue(value)) {
|
||||
return null
|
||||
}
|
||||
|
||||
if (
|
||||
type === 'daterange'
|
||||
|| type === 'datetimerange'
|
||||
|| (DATE_RANGE_OPERATORS.has(operator) && (Array.isArray(value) || (value && typeof value === 'object')))
|
||||
) {
|
||||
const rangeValue = normalizeDateRangeValue(value)
|
||||
if (!rangeValue) return null
|
||||
const rangeType = type === 'datetimerange' ? 'datetimerange' : 'daterange'
|
||||
return {
|
||||
operator: DATE_RANGE_OPERATORS.has(operator) ? operator : 'between',
|
||||
type: rangeType,
|
||||
value: rangeValue
|
||||
}
|
||||
}
|
||||
|
||||
if (type === 'date') {
|
||||
return { operator, type: 'date', value }
|
||||
}
|
||||
|
||||
if (MULTI_VALUE_OPERATORS.has(operator)) {
|
||||
return { operator, type: type || 'text', value }
|
||||
}
|
||||
|
||||
if (condition.isMultiple && Array.isArray(value)) {
|
||||
return {
|
||||
operator: operator && operator !== 'eq' ? operator : 'in',
|
||||
type: type || 'text',
|
||||
value
|
||||
}
|
||||
}
|
||||
|
||||
if (DATE_RANGE_OPERATORS.has(operator) && Array.isArray(value) && value.length >= 2) {
|
||||
return {
|
||||
operator,
|
||||
type: type || 'number',
|
||||
value: [value[0], value[1]]
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
operator,
|
||||
type: type || condition.conditionType || 'text',
|
||||
value
|
||||
}
|
||||
}
|
||||
|
||||
/** 将 ScanBox getConditions() 转为 order.list 标准 where 条件对象 */
|
||||
export function buildOrderWhereConditions(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
|
||||
const normalized = normalizeWhereConditionEntry(condition)
|
||||
if (normalized) {
|
||||
where[normalizedKey] = normalized
|
||||
}
|
||||
return
|
||||
}
|
||||
if (condition !== undefined && condition !== null && condition !== '') {
|
||||
where[normalizedKey] = {
|
||||
operator: 'eq',
|
||||
value: Array.isArray(condition) ? condition[0] ?? '' : condition,
|
||||
type: 'text'
|
||||
if (isEmptyConditionValue(condition)) {
|
||||
return
|
||||
}
|
||||
if (Array.isArray(condition)) {
|
||||
const rangeValue = normalizeDateRangeValue(condition)
|
||||
if (rangeValue) {
|
||||
where[normalizedKey] = {
|
||||
operator: 'between',
|
||||
type: 'daterange',
|
||||
value: rangeValue
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
where[normalizedKey] = {
|
||||
operator: 'eq',
|
||||
value: condition,
|
||||
type: 'text'
|
||||
}
|
||||
})
|
||||
return where
|
||||
}
|
||||
|
||||
/** 行级复核状态(优先 recheck_status,兼容历史 inspection_status) */
|
||||
export function resolveOrderRecheckStatus(row?: Record<string, any> | null): string {
|
||||
if (!row || typeof row !== 'object') return ''
|
||||
const value = row.recheck_status ?? row.recheckStatus ?? row.inspection_status
|
||||
return value === undefined || value === null ? '' : String(value)
|
||||
}
|
||||
|
||||
@ -0,0 +1,22 @@
|
||||
import { onBeforeUnmount, type Ref } from 'vue'
|
||||
|
||||
type OrderListPageCleanupOptions = {
|
||||
list: Ref<any[]>
|
||||
selectionRows?: Ref<any[]>
|
||||
selectedOrderId?: Ref<number | string | null>
|
||||
onCleanup?: () => void
|
||||
}
|
||||
|
||||
/** 订单列表页卸载时释放列表、选中态等内存占用 */
|
||||
export function useOrderListPageCleanup(options: OrderListPageCleanupOptions) {
|
||||
onBeforeUnmount(() => {
|
||||
options.list.value = []
|
||||
if (options.selectionRows) {
|
||||
options.selectionRows.value = []
|
||||
}
|
||||
if (options.selectedOrderId) {
|
||||
options.selectedOrderId.value = null
|
||||
}
|
||||
options.onCleanup?.()
|
||||
})
|
||||
}
|
||||
@ -115,8 +115,12 @@ import { computed, onMounted, reactive, ref, watch, nextTick } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import UpperTable from '@/components/UpperTable/index.vue'
|
||||
import { useSettingsStore } from '@/stores/modules/settings'
|
||||
import { updateExpressWeighingWeight } from '@/api/order.recheckorder/recheckOrder'
|
||||
import { orderUpdateExpressWeighingWeight } from '@/api/order.index/orderindex'
|
||||
import { orderPendingOrderList } from '@/api/order.pendingorder/orderpendingOrder'
|
||||
import {
|
||||
isOrderIndexApiSuccess,
|
||||
parseUpdateExpressWeighingWeightResponse
|
||||
} from '@/views/order/orderManagement/utils/order-index-helpers'
|
||||
|
||||
const settingsStore = useSettingsStore()
|
||||
const upperTable = ref<any>(null)
|
||||
@ -171,7 +175,7 @@ function saveSetting(key: string, val: string) {
|
||||
}
|
||||
|
||||
function isSuccess(res: any) {
|
||||
return res && [0, 1, 200].includes(res.code)
|
||||
return isOrderIndexApiSuccess(res)
|
||||
}
|
||||
|
||||
function formatTime(v: string) {
|
||||
@ -193,8 +197,10 @@ async function loadList() {
|
||||
const fw = filterWaybill.value.trim()
|
||||
if (fw) where.waybill_no = { operator: 'contains', value: fw, type: 'text' }
|
||||
const res: any = await orderPendingOrderList({
|
||||
page: pagination.currentPage,
|
||||
pageSize: pagination.pageSize,
|
||||
pagination: {
|
||||
page: pagination.currentPage,
|
||||
pageSize: pagination.pageSize
|
||||
},
|
||||
where
|
||||
})
|
||||
if (!isSuccess(res)) {
|
||||
@ -225,8 +231,8 @@ async function handleQuickSave() {
|
||||
ElMessage.warning(`格式: 运单号${delimiter}重量`)
|
||||
return
|
||||
}
|
||||
const waybill = parts[0].trim()
|
||||
const weight = parseFloat(parts[1].trim())
|
||||
const waybill = parts[0]?.trim() ?? ''
|
||||
const weight = parseFloat(parts[1]?.trim() ?? '')
|
||||
if (!waybill) { ElMessage.warning('运单号为空'); return }
|
||||
if (isNaN(weight) || weight <= 0) { ElMessage.warning('重量无效'); return }
|
||||
const finalWeight = weighingUnit.value === 'g' ? weight / 1000 : weight
|
||||
@ -234,20 +240,20 @@ async function handleQuickSave() {
|
||||
quickSaving.value = true
|
||||
try {
|
||||
// order_id=0 + waybill_code 直接称重,无需先查订单
|
||||
const res: any = await updateExpressWeighingWeight({
|
||||
const res: any = await orderUpdateExpressWeighingWeight({
|
||||
order_id: 0,
|
||||
waybill_code: waybill,
|
||||
weighing_weight: Number(finalWeight.toFixed(3))
|
||||
})
|
||||
if (isSuccess(res)) {
|
||||
ElMessage.success(`运单 ${waybill} 称重 ${finalWeight}kg 保存成功`)
|
||||
const detail = res?.data || {}
|
||||
const detail = parseUpdateExpressWeighingWeightResponse(res)
|
||||
lastResult.value = {
|
||||
waybill,
|
||||
weighing_weight: finalWeight,
|
||||
waybill: detail.waybill_code || waybill,
|
||||
weighing_weight: detail.weighing_weight ?? finalWeight,
|
||||
wave_id: detail.wave_id,
|
||||
wave_no: detail.wave_no,
|
||||
total_weight: detail.total_weight ?? detail.totalWeight,
|
||||
total_weight: detail.total_weight,
|
||||
split_count: detail.split_count ?? 0,
|
||||
splits: detail.splits || [],
|
||||
store_name: detail.store_name || '',
|
||||
|
||||
@ -198,11 +198,12 @@ import {
|
||||
scanTask,
|
||||
confirmRecheck,
|
||||
confirmIntercept,
|
||||
updateExpressWeighingWeight,
|
||||
type ConfirmRecheckResultShape,
|
||||
type RecheckScanOrderParams,
|
||||
type ScanOrderResultShape
|
||||
} from '@/api/order.recheckorder/recheckOrder'
|
||||
import { orderUpdateExpressWeighingWeight } from '@/api/order.index/orderindex'
|
||||
import { isOrderIndexApiSuccess } from '@/views/order/orderManagement/utils/order-index-helpers'
|
||||
|
||||
const SCAN_PARAM_KEYS: (keyof RecheckScanOrderParams)[] = [
|
||||
'keyword',
|
||||
@ -1558,11 +1559,11 @@ async function submitWeighing() {
|
||||
}
|
||||
weighingSubmitting.value = true
|
||||
try {
|
||||
const res: any = await updateExpressWeighingWeight({
|
||||
const res: any = await orderUpdateExpressWeighingWeight({
|
||||
order_id: id,
|
||||
weighing_weight: Number(weighingForm.weight)
|
||||
})
|
||||
const ok = res && (res.code === 1 || res.code === 200 || res.flag === 'success')
|
||||
const ok = isOrderIndexApiSuccess(res)
|
||||
if (ok) {
|
||||
ElMessage.success(res?.message || '称重保存成功')
|
||||
weighingDialogVisible.value = false
|
||||
|
||||
@ -162,6 +162,7 @@ import AllocateExpressForm from '@/views/order/orderManagement/form/AllocateExpr
|
||||
import StorageAllocateForm from '@/views/order/orderManagement/form/StorageAllocateForm.vue'
|
||||
import SyncOrderIdsForm from '@/views/order/orderManagement/form/SyncOrderIdsForm.vue'
|
||||
import { createPendingToolbarController } from '@/views/order/orderManagement/utils/toolbar-actions'
|
||||
import { buildOrderWhereConditions, sanitizeOrderListWhere } from '@/views/order/orderManagement/utils/order-index-helpers'
|
||||
import {
|
||||
pendingCloums,
|
||||
pendingAvailableFields,
|
||||
@ -230,41 +231,12 @@ function normalizePositiveIntId(raw: unknown): number | null {
|
||||
return n
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
function sanitizePendingListWhere(where: Record<string, any>) {
|
||||
const w = { ...where }
|
||||
delete w.warehouse_id
|
||||
delete w.warehouseId
|
||||
return w
|
||||
}
|
||||
|
||||
async function loadData() {
|
||||
if (loading.value) return
|
||||
loading.value = true
|
||||
const start = Date.now()
|
||||
|
||||
let where = buildWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
let where = buildOrderWhereConditions(scanBox.value?.getConditions?.() || {})
|
||||
where.wave_no = {
|
||||
operator: 'eq',
|
||||
value: props.waveNo,
|
||||
@ -277,7 +249,7 @@ async function loadData() {
|
||||
type: 'text'
|
||||
}
|
||||
}
|
||||
where = sanitizePendingListWhere(where)
|
||||
where = sanitizeOrderListWhere(where)
|
||||
|
||||
try {
|
||||
const res = await orderPendingOrder.list({
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -21,26 +21,27 @@
|
||||
"interfaceAdded": 0,
|
||||
"interfaceDeleted": 0,
|
||||
"interfaceParamsUpdated": 1,
|
||||
"interfaceResponseUpdated": 1
|
||||
"interfaceResponseUpdated": 2
|
||||
},
|
||||
"moduleUpdates": {
|
||||
"added": [],
|
||||
"deleted": [],
|
||||
"updated": [
|
||||
{
|
||||
"moduleName": "订单待处理模块",
|
||||
"moduleKey": "order.pendingOrder",
|
||||
"folder": "order.pendingorder",
|
||||
"previousModuleName": "订单待处理模块",
|
||||
"previousModuleKey": "order.pendingOrder",
|
||||
"moduleName": "订单工作台入口模块",
|
||||
"moduleKey": "order.index",
|
||||
"folder": "order.index",
|
||||
"previousModuleName": "订单工作台入口模块",
|
||||
"previousModuleKey": "order.index",
|
||||
"interfaceChanges": {
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [
|
||||
"order.pendingOrder.updateAddress"
|
||||
"order.updateExpressWeighingWeight"
|
||||
],
|
||||
"responseUpdatedMethods": [
|
||||
"order.pendingOrder.updateAddress"
|
||||
"order.detail",
|
||||
"order.updateExpressWeighingWeight"
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -51,18 +52,24 @@
|
||||
"deleted": [],
|
||||
"paramsUpdated": [
|
||||
{
|
||||
"moduleName": "订单待处理模块",
|
||||
"moduleKey": "order.pendingOrder",
|
||||
"folder": "order.pendingorder",
|
||||
"method": "order.pendingOrder.updateAddress"
|
||||
"moduleName": "订单工作台入口模块",
|
||||
"moduleKey": "order.index",
|
||||
"folder": "order.index",
|
||||
"method": "order.updateExpressWeighingWeight"
|
||||
}
|
||||
],
|
||||
"responseUpdated": [
|
||||
{
|
||||
"moduleName": "订单待处理模块",
|
||||
"moduleKey": "order.pendingOrder",
|
||||
"folder": "order.pendingorder",
|
||||
"method": "order.pendingOrder.updateAddress"
|
||||
"moduleName": "订单工作台入口模块",
|
||||
"moduleKey": "order.index",
|
||||
"folder": "order.index",
|
||||
"method": "order.detail"
|
||||
},
|
||||
{
|
||||
"moduleName": "订单工作台入口模块",
|
||||
"moduleKey": "order.index",
|
||||
"folder": "order.index",
|
||||
"method": "order.updateExpressWeighingWeight"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1921,31 +1928,31 @@
|
||||
{
|
||||
"name": "order",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"required": true,
|
||||
"description": "订单头对象(raw 行数据)"
|
||||
},
|
||||
{
|
||||
"name": "detail",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"required": true,
|
||||
"description": "等同于 order"
|
||||
},
|
||||
{
|
||||
"name": "orderItems / items",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"required": true,
|
||||
"description": "商品明细数组"
|
||||
},
|
||||
{
|
||||
"name": "expresses",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"description": "运单信息数组"
|
||||
"required": true,
|
||||
"description": "运单信息数组,每个元素包含以下字段:waybill_code(运单号,string)、weighing_weight(称重重量,number|null)、sys_logistics_code(系统物流公司编码,string)、sys_logistics_name(系统物流公司名称,string)、logistics_code(实际物流公司编码,string)、logistics_name(实际物流公司名称,string)、logistics_interface_id(物流接口ID,number|null)、business_key(业务标识,string)、created_at(创建时间戳毫秒,number|null)"
|
||||
},
|
||||
{
|
||||
"name": "waybill_codes",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"required": true,
|
||||
"description": "去重后的运单号字符串数组"
|
||||
}
|
||||
]
|
||||
@ -5994,8 +6001,8 @@
|
||||
"moduleKey": "order.index",
|
||||
"moduleFolder": "order.index",
|
||||
"method": "order.updateExpressWeighingWeight",
|
||||
"title": "更新订单运单称重重量。规则:订单仅一个运单时,直接写入该运单重量;多运单时,必须传 waybill_code 并按运单写入。",
|
||||
"description": "更新订单运单称重重量。规则:订单仅一个运单时,直接写入该运单重量;多运单时,必须传 waybill_code 并按运单写入。",
|
||||
"title": "更新订单运单称重重量。支持两种模式:1) 订单模式(order_id>0):规则:订单仅一个运单时,直接写入该运单重量;多运单时,必须传 waybill_code 并按运单写入;团购波次批量设置同一重量到波次下所有订单运单,并返回拆单汇总信息(total_weight/split_count/splits/store_name/sys_logistics_name)。2) 运单号模式(order_id=0):从运单号反查订单与波次,散单/非团购波次仅更新单个运单重量,团购波次按 wave_no+business_key 批量设置并返回拆单汇总信息。",
|
||||
"description": "更新订单运单称重重量。支持两种模式:1) 订单模式(order_id>0):规则:订单仅一个运单时,直接写入该运单重量;多运单时,必须传 waybill_code 并按运单写入;团购波次批量设置同一重量到波次下所有订单运单,并返回拆单汇总信息(total_weight/split_count/splits/store_name/sys_logistics_name)。2) 运单号模式(order_id=0):从运单号反查订单与波次,散单/非团购波次仅更新单个运单重量,团购波次按 wave_no+business_key 批量设置并返回拆单汇总信息。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -6016,13 +6023,13 @@
|
||||
"name": "order_id",
|
||||
"type": "number|string",
|
||||
"required": true,
|
||||
"description": "订单ID,必填且必须为正整数。"
|
||||
"description": "订单ID,必填且必须为数字。订单模式下为正整数,设为0时切换为运单号模式(需配合 waybill_code 使用)。"
|
||||
},
|
||||
{
|
||||
"name": "waybill_code",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "运单号;订单仅一个运单时可不传且会被忽略,多运单时必填并需匹配订单下运单。"
|
||||
"description": "运单号。订单模式下:订单仅一个运单时可不传且会被忽略,多运单时必填并需匹配订单下运单。运单号模式(order_id=0)下必填。"
|
||||
},
|
||||
{
|
||||
"name": "weighing_weight",
|
||||
@ -6035,20 +6042,68 @@
|
||||
{
|
||||
"name": "order_id",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "订单ID(成功时返回于 data 对象中)。"
|
||||
"required": false,
|
||||
"description": "订单ID。订单模式及运单号散单模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "waybill_code",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "写入重量的运单号(成功时返回于 data 对象中)。"
|
||||
"required": false,
|
||||
"description": "写入重量的运单号。订单模式及运单号散单模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "weighing_weight",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "已写入的称重重量(kg,成功时返回于 data 对象中)。"
|
||||
"description": "已写入的称重重量(kg)。"
|
||||
},
|
||||
{
|
||||
"name": "wave_no",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "波次号。团购批量模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "business_key",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "业务键。运单号团购批量模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "wave_id",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "波次ID。团购批量模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "total_weight",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "所有拆单重量累加(kg)。团购批量模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "split_count",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "waybill_code 非空的 business_key 数量。团购批量模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "splits",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"description": "按 business_key 分组的拆单明细。每项含 business_key(业务键)、weighing_weight(该拆单累加重量)、waybill_code(代表运单号)。团购批量模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "store_name",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "货主名称(订单 shop_nick)。团购批量模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "sys_logistics_name",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "系统快递名称。团购批量模式返回。"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -22,26 +22,27 @@
|
||||
"interfaceAdded": 0,
|
||||
"interfaceDeleted": 0,
|
||||
"interfaceParamsUpdated": 1,
|
||||
"interfaceResponseUpdated": 1
|
||||
"interfaceResponseUpdated": 2
|
||||
},
|
||||
"moduleUpdates": {
|
||||
"added": [],
|
||||
"deleted": [],
|
||||
"updated": [
|
||||
{
|
||||
"moduleName": "订单待处理模块",
|
||||
"moduleKey": "order.pendingOrder",
|
||||
"folder": "order.pendingorder",
|
||||
"previousModuleName": "订单待处理模块",
|
||||
"previousModuleKey": "order.pendingOrder",
|
||||
"moduleName": "订单工作台入口模块",
|
||||
"moduleKey": "order.index",
|
||||
"folder": "order.index",
|
||||
"previousModuleName": "订单工作台入口模块",
|
||||
"previousModuleKey": "order.index",
|
||||
"interfaceChanges": {
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [
|
||||
"order.pendingOrder.updateAddress"
|
||||
"order.updateExpressWeighingWeight"
|
||||
],
|
||||
"responseUpdatedMethods": [
|
||||
"order.pendingOrder.updateAddress"
|
||||
"order.detail",
|
||||
"order.updateExpressWeighingWeight"
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -52,18 +53,24 @@
|
||||
"deleted": [],
|
||||
"paramsUpdated": [
|
||||
{
|
||||
"moduleName": "订单待处理模块",
|
||||
"moduleKey": "order.pendingOrder",
|
||||
"folder": "order.pendingorder",
|
||||
"method": "order.pendingOrder.updateAddress"
|
||||
"moduleName": "订单工作台入口模块",
|
||||
"moduleKey": "order.index",
|
||||
"folder": "order.index",
|
||||
"method": "order.updateExpressWeighingWeight"
|
||||
}
|
||||
],
|
||||
"responseUpdated": [
|
||||
{
|
||||
"moduleName": "订单待处理模块",
|
||||
"moduleKey": "order.pendingOrder",
|
||||
"folder": "order.pendingorder",
|
||||
"method": "order.pendingOrder.updateAddress"
|
||||
"moduleName": "订单工作台入口模块",
|
||||
"moduleKey": "order.index",
|
||||
"folder": "order.index",
|
||||
"method": "order.detail"
|
||||
},
|
||||
{
|
||||
"moduleName": "订单工作台入口模块",
|
||||
"moduleKey": "order.index",
|
||||
"folder": "order.index",
|
||||
"method": "order.updateExpressWeighingWeight"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -25,8 +25,13 @@
|
||||
"interfaceChanges": {
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [],
|
||||
"responseUpdatedMethods": []
|
||||
"paramsUpdatedMethods": [
|
||||
"order.updateExpressWeighingWeight"
|
||||
],
|
||||
"responseUpdatedMethods": [
|
||||
"order.detail",
|
||||
"order.updateExpressWeighingWeight"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -128,31 +133,31 @@
|
||||
{
|
||||
"name": "order",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"required": true,
|
||||
"description": "订单头对象(raw 行数据)"
|
||||
},
|
||||
{
|
||||
"name": "detail",
|
||||
"type": "object",
|
||||
"required": false,
|
||||
"required": true,
|
||||
"description": "等同于 order"
|
||||
},
|
||||
{
|
||||
"name": "orderItems / items",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"required": true,
|
||||
"description": "商品明细数组"
|
||||
},
|
||||
{
|
||||
"name": "expresses",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"description": "运单信息数组"
|
||||
"required": true,
|
||||
"description": "运单信息数组,每个元素包含以下字段:waybill_code(运单号,string)、weighing_weight(称重重量,number|null)、sys_logistics_code(系统物流公司编码,string)、sys_logistics_name(系统物流公司名称,string)、logistics_code(实际物流公司编码,string)、logistics_name(实际物流公司名称,string)、logistics_interface_id(物流接口ID,number|null)、business_key(业务标识,string)、created_at(创建时间戳毫秒,number|null)"
|
||||
},
|
||||
{
|
||||
"name": "waybill_codes",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"required": true,
|
||||
"description": "去重后的运单号字符串数组"
|
||||
}
|
||||
]
|
||||
@ -416,8 +421,8 @@
|
||||
},
|
||||
{
|
||||
"method": "order.updateExpressWeighingWeight",
|
||||
"title": "更新订单运单称重重量。规则:订单仅一个运单时,直接写入该运单重量;多运单时,必须传 waybill_code 并按运单写入。",
|
||||
"description": "更新订单运单称重重量。规则:订单仅一个运单时,直接写入该运单重量;多运单时,必须传 waybill_code 并按运单写入。",
|
||||
"title": "更新订单运单称重重量。支持两种模式:1) 订单模式(order_id>0):规则:订单仅一个运单时,直接写入该运单重量;多运单时,必须传 waybill_code 并按运单写入;团购波次批量设置同一重量到波次下所有订单运单,并返回拆单汇总信息(total_weight/split_count/splits/store_name/sys_logistics_name)。2) 运单号模式(order_id=0):从运单号反查订单与波次,散单/非团购波次仅更新单个运单重量,团购波次按 wave_no+business_key 批量设置并返回拆单汇总信息。",
|
||||
"description": "更新订单运单称重重量。支持两种模式:1) 订单模式(order_id>0):规则:订单仅一个运单时,直接写入该运单重量;多运单时,必须传 waybill_code 并按运单写入;团购波次批量设置同一重量到波次下所有订单运单,并返回拆单汇总信息(total_weight/split_count/splits/store_name/sys_logistics_name)。2) 运单号模式(order_id=0):从运单号反查订单与波次,散单/非团购波次仅更新单个运单重量,团购波次按 wave_no+business_key 批量设置并返回拆单汇总信息。",
|
||||
"endpoint": "/system",
|
||||
"authRequired": false,
|
||||
"loginRequired": true,
|
||||
@ -438,13 +443,13 @@
|
||||
"name": "order_id",
|
||||
"type": "number|string",
|
||||
"required": true,
|
||||
"description": "订单ID,必填且必须为正整数。"
|
||||
"description": "订单ID,必填且必须为数字。订单模式下为正整数,设为0时切换为运单号模式(需配合 waybill_code 使用)。"
|
||||
},
|
||||
{
|
||||
"name": "waybill_code",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "运单号;订单仅一个运单时可不传且会被忽略,多运单时必填并需匹配订单下运单。"
|
||||
"description": "运单号。订单模式下:订单仅一个运单时可不传且会被忽略,多运单时必填并需匹配订单下运单。运单号模式(order_id=0)下必填。"
|
||||
},
|
||||
{
|
||||
"name": "weighing_weight",
|
||||
@ -457,20 +462,68 @@
|
||||
{
|
||||
"name": "order_id",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "订单ID(成功时返回于 data 对象中)。"
|
||||
"required": false,
|
||||
"description": "订单ID。订单模式及运单号散单模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "waybill_code",
|
||||
"type": "string",
|
||||
"required": true,
|
||||
"description": "写入重量的运单号(成功时返回于 data 对象中)。"
|
||||
"required": false,
|
||||
"description": "写入重量的运单号。订单模式及运单号散单模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "weighing_weight",
|
||||
"type": "number",
|
||||
"required": true,
|
||||
"description": "已写入的称重重量(kg,成功时返回于 data 对象中)。"
|
||||
"description": "已写入的称重重量(kg)。"
|
||||
},
|
||||
{
|
||||
"name": "wave_no",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "波次号。团购批量模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "business_key",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "业务键。运单号团购批量模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "wave_id",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "波次ID。团购批量模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "total_weight",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "所有拆单重量累加(kg)。团购批量模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "split_count",
|
||||
"type": "number",
|
||||
"required": false,
|
||||
"description": "waybill_code 非空的 business_key 数量。团购批量模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "splits",
|
||||
"type": "array",
|
||||
"required": false,
|
||||
"description": "按 business_key 分组的拆单明细。每项含 business_key(业务键)、weighing_weight(该拆单累加重量)、waybill_code(代表运单号)。团购批量模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "store_name",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "货主名称(订单 shop_nick)。团购批量模式返回。"
|
||||
},
|
||||
{
|
||||
"name": "sys_logistics_name",
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"description": "系统快递名称。团购批量模式返回。"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
@ -25,12 +25,8 @@
|
||||
"interfaceChanges": {
|
||||
"addedMethods": [],
|
||||
"deletedMethods": [],
|
||||
"paramsUpdatedMethods": [
|
||||
"order.pendingOrder.updateAddress"
|
||||
],
|
||||
"responseUpdatedMethods": [
|
||||
"order.pendingOrder.updateAddress"
|
||||
]
|
||||
"paramsUpdatedMethods": [],
|
||||
"responseUpdatedMethods": []
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-05 09:15:19",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-20 08:59:09",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": "2026-04-17 19:16:50"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-04 09:11:04",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-09 09:52:14",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-04 17:23:48",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-06-03 16:55:40",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-17 19:37:49",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-17 20:21:27",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-29 09:07:53",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-29 09:07:53",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-17 19:16:50",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-04 09:11:04",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-25 17:05:16",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-04-16 11:15:05",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"generatedAt": "2026-06-09 18:13:02",
|
||||
"generatedAtLocal": "2026-06-09 18:13:02",
|
||||
"generatedAt": "2026-06-10 09:08:21",
|
||||
"generatedAtLocal": "2026-06-10 09:08:21",
|
||||
"source": "remote",
|
||||
"filter": {
|
||||
"platform": {
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
},
|
||||
"status": "active",
|
||||
"createdAt": "2026-05-15 17:32:36",
|
||||
"updatedAt": "2026-06-09 18:13:02",
|
||||
"updatedAt": "2026-06-10 09:08:21",
|
||||
"deletedAt": null,
|
||||
"restoredAt": null
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user