This commit is contained in:
yin 2026-07-04 18:17:50 +08:00
parent 06d49f83b9
commit 4db690ea50
5 changed files with 77 additions and 73 deletions

Binary file not shown.

View File

@ -688,6 +688,7 @@ export const ORDER_DETAIL_TIME_FIELDS = new Set([
'create_at',
'created_at',
'updated_at',
'delete_at',
'operate_time',
'recheck_time'
])
@ -709,29 +710,40 @@ export type OrderDetailSectionConfig = {
fields: OrderDetailFieldConfig[]
}
/** 待处理订单详情分区(对齐 order.pendingOrder.detail 响应字段) */
export const pendingOrderDetailSections: OrderDetailSectionConfig[] = [
/** 订单明细显示全部:对齐 order.pendingOrder.detail data.detail 字段 */
export const orderDetailFullSections: OrderDetailSectionConfig[] = [
{
title: '基础信息',
column: 4,
fields: [
{ prop: 'id', label: '订单ID' },
{ prop: 'delivery_order_code', label: '发货单号' },
{ prop: 'pre_delivery_order_code', label: '前置单号' },
{ prop: 'pre_delivery_order_id', label: '前置单ID' },
{ prop: 'order_type', label: '订单类型' },
{ prop: 'warehouse_code', label: '仓库编码' },
{ prop: 'create_channel', label: '来源' },
{ prop: 'order_flag', label: '订单标记', span: 4 },
{ prop: 'order_flag', label: '订单标记', span: 4, multiline: true },
{ prop: 'sys_platform_name', label: '平台' },
{ prop: 'sys_platform_code', label: '平台编码', tag: true },
{ prop: 'source_platform_name', label: '来源平台名' },
{ prop: 'source_platform_code', label: '来源平台编码', tag: true },
{ prop: 'source_order_codes', label: '平台交易单号' },
{ prop: 'shop_nick', label: '店铺名称' },
{ prop: 'buyer_nick', label: '买家昵称' },
{ prop: 'seller_nick', label: '卖家昵称' },
{ prop: 'store_id', label: '货主ID' },
{ prop: 'warehouse_id', label: '仓库ID' },
{ prop: 'from_key', label: '来源键' },
{ prop: 'service_code', label: '服务编码' },
{ prop: 'oaid', label: 'OAID' },
{ prop: 'is_urgency', label: '是否紧急', tag: true },
{ prop: 'invoice_flag', label: '发票标记', tag: true },
{ prop: 'pay_no', label: '支付单号' }
{ prop: 'pay_no', label: '支付单号' },
{ prop: 'remark', label: '备注', span: 4, multiline: true },
{ prop: 'buyer_message', label: '买家留言', span: 2, multiline: true },
{ prop: 'seller_message', label: '卖家留言', span: 2, multiline: true },
{ prop: 'extend_props', label: '扩展属性', span: 4, multiline: true }
]
},
{
@ -753,8 +765,12 @@ export const pendingOrderDetailSections: OrderDetailSectionConfig[] = [
{ prop: 'claim_status', label: '认领状态', tag: true },
{ prop: 'lock_status', label: '锁定状态', tag: true },
{ prop: 'intercept_status', label: '拦截状态', tag: true },
{ prop: 'print_lock_status', label: '打印锁定', tag: true },
{ prop: 'wave_no', label: '波次号' },
{ prop: 'wave_id', label: '波次ID' }
{ prop: 'wave_id', label: '波次ID' },
{ prop: 'wave_strategy_version', label: '波次策略版本' },
{ prop: 'wave_scan_result', label: '波次扫描结果' },
{ prop: 'basket_number', label: '篮号' }
]
},
{
@ -765,16 +781,22 @@ export const pendingOrderDetailSections: OrderDetailSectionConfig[] = [
{ prop: 'mobile', label: '电话' },
{ prop: 'tel', label: '固定电话' },
{ prop: 'email', label: '邮箱' },
{ prop: 'country_code', label: '国家编码' },
{ prop: 'province', label: '省份' },
{ prop: 'city', label: '城市' },
{ prop: 'area', label: '区/县' },
{ prop: 'town', label: '镇/街道' },
{ prop: 'zip_code', label: '邮编' },
{ prop: 'detail_address', label: '详细地址', span: 3 },
{ prop: 'detail_address', label: '详细地址', span: 3, multiline: true },
{ prop: 'id_type', label: '证件类型' },
{ prop: 'id_number', label: '证件号码' },
{ prop: 'logistics_name', label: '快递' },
{ prop: 'logistics_code', label: '快递编码' },
{ prop: 'sys_logistics_name', label: '系统快递名称' },
{ prop: 'sys_logistics_code', label: '系统快递编码' },
{ prop: 'express_code', label: '快递单号' },
{ prop: 'waybill_codes', label: '运单号', span: 3, waybill: true },
{ prop: 'logistics_area_code', label: '物流区域编码' },
{ prop: 'waybill_codes', label: '运单号', span: 3, waybill: true, multiline: true },
{ prop: 'delivery_type', label: '发货服务类型' },
{ prop: 'weight_type', label: '重量类型' }
]
@ -790,9 +812,12 @@ export const pendingOrderDetailSections: OrderDetailSectionConfig[] = [
{ prop: 'ar_amount', label: '应收金额', amount: true },
{ prop: 'got_amount', label: '实收金额', amount: true },
{ prop: 'service_fee', label: '服务费', amount: true },
{ prop: 'items', label: '商品明细摘要', span: 4 },
{ prop: 'items_count', label: '商品种类' },
{ prop: 'items_total', label: '商品总数' },
{ prop: 'items_weight', label: '商品重量kg' }
{ prop: 'items_weight', label: '商品重量kg' },
{ prop: 'items_hash', label: '商品哈希', span: 2 },
{ prop: 'items_crc', label: '商品CRC' }
]
},
{
@ -804,6 +829,7 @@ export const pendingOrderDetailSections: OrderDetailSectionConfig[] = [
{ prop: 'delivery_time', label: '配送时间', time: true },
{ prop: 'create_at', label: '创建时间', time: true },
{ prop: 'updated_at', label: '更新时间', time: true },
{ prop: 'delete_at', label: '删除时间', time: true },
{ prop: 'recheck_time', label: '复核时间', time: true },
{ prop: 'operator_name', label: '操作人' },
{ prop: 'operate_time', label: '操作时间', time: true }
@ -1389,56 +1415,8 @@ export const deliveryColumns = applyOrderListCopyActions([
{ prop: 'create_at', label: '创建时间', width: '160', formatter: orderTimeFormatter },
])
function appendOrderDetailSectionFields(
sections: OrderDetailSectionConfig[],
patches: Record<string, OrderDetailFieldConfig[]>
): OrderDetailSectionConfig[] {
return sections.map((section) => ({
...section,
fields: [...section.fields, ...(patches[section.title] || [])]
}))
}
/** 配送订单详情分区(在通用订单详情基础上补充 data.json 返回但未展示的字段) */
export const deliveryOrderDetailSections = appendOrderDetailSectionFields(pendingOrderDetailSections, {
'基础信息': [
{ prop: 'id', label: '订单ID' },
{ prop: 'pre_delivery_order_id', label: '前置单ID' },
{ prop: 'warehouse_code', label: '仓库编码' },
{ prop: 'source_platform_code', label: '来源平台编码', tag: true },
{ prop: 'service_code', label: '服务编码' },
{ prop: 'from_key', label: '来源键' },
{ prop: 'oaid', label: 'OAID' },
{ prop: 'delete_at', label: '删除时间', time: true },
{ prop: 'remark', label: '备注', span: 4 },
{ prop: 'buyer_message', label: '买家留言', span: 2 },
{ prop: 'seller_message', label: '卖家留言', span: 2 },
{ prop: 'extend_props', label: '扩展属性', span: 4 }
],
'流程与状态': [
{ prop: 'basket_number', label: '篮号' },
{ prop: 'wave_strategy_version', label: '波次策略版本' },
{ prop: 'wave_scan_result', label: '波次扫描结果' },
{ prop: 'print_lock_status', label: '打印锁定', tag: true },
{ prop: 'dispatch_lane', label: '配送通道' }
],
'收货与物流': [
{ prop: 'sys_logistics_code', label: '系统快递编码' },
{ prop: 'sys_logistics_name', label: '系统快递名称' },
{ prop: 'logistics_area_code', label: '物流区域编码' },
{ prop: 'country_code', label: '国家编码' },
{ prop: 'id_type', label: '证件类型' },
{ prop: 'id_number', label: '证件号码' }
],
'金额汇总': [
{ prop: 'items', label: '商品明细摘要', span: 4 },
{ prop: 'items_hash', label: '商品哈希', span: 2 },
{ prop: 'items_crc', label: '商品CRC' }
]
})
/** 订单明细显示全部:对齐 data.json order/detail 返回字段 */
export const orderDetailFullSections = deliveryOrderDetailSections
/** 配送订单详情分区(与 orderDetailFullSections 一致) */
export const deliveryOrderDetailSections = orderDetailFullSections
export const deliverydetail = [
{ label: '订单总金额', prop: 'total_amount' },

View File

@ -278,6 +278,13 @@
@closed="resetSyncOrderIdsDialog"
@submit="submitSyncOrderIds"
/>
<batch-quick-recheck-form
v-model="batchQuickRecheckDialogVisible"
:suggested-ids="batchQuickRecheckSuggestedIds"
:selected-rows="batchQuickRecheckSelectedRows"
@closed="resetBatchQuickRecheckDialog"
@success="handleBatchQuickRecheckSuccess"
/>
<update-address-form
v-model="updateAddressDialogVisible"
v-model:form="updateAddressForm"
@ -407,6 +414,7 @@ import UpdateOrderMetaForm from './form/UpdateOrderMetaForm.vue'
import CloneOrderForm from './form/CloneOrderForm.vue'
import ManualWaybillForm from './form/ManualWaybillForm.vue'
import SyncOrderIdsForm from './form/SyncOrderIdsForm.vue'
import BatchQuickRecheckForm from './form/BatchQuickRecheckForm.vue'
import UpdateAddressForm from './form/UpdateAddressForm.vue'
import UpdateRemarkForm from './form/UpdateRemarkForm.vue'
import BatchAsyncTaskForm from './form/BatchAsyncTaskForm.vue'
@ -875,6 +883,9 @@ const {
manualWaybillForm,
syncOrderIdsDialogVisible,
syncOrderIdsLoading,
batchQuickRecheckDialogVisible,
batchQuickRecheckSuggestedIds,
batchQuickRecheckSelectedRows,
updateAddressDialogVisible,
updateAddressLoading,
updateAddressOrderIds,
@ -900,12 +911,14 @@ const {
submitUpdateAddress,
submitUpdateRemark,
submitBatchAsyncTask,
handleBatchQuickRecheckSuccess,
resetAllocateDialog,
resetStorageAllocateDialog,
resetUpdateOrderMetaDialog,
resetCloneOrderDialog,
resetManualWaybillDialog,
resetSyncOrderIdsDialog,
resetBatchQuickRecheckDialog,
resetUpdateAddressDialog,
resetUpdateRemarkDialog,
resetBatchAsyncTaskDialog

View File

@ -331,19 +331,25 @@ export function createReviewToolbarController(params: {
getSelectedIds: () => Array<number | string>
clearSelection: () => void
reviewApi: Record<string, any>
orderActionApi?: Record<string, any>
orderActionApi: Record<string, any>
}) {
const reviewSubmitting = ref(false)
const actionLoading = ref(false)
const updateRemarkController = params.orderActionApi
? createUpdateRemarkController({
getSelectedIds: params.getSelectedIds,
pendingApi: params.orderActionApi,
clearSelection: params.clearSelection,
loadData: params.loadData
})
: null
const {
updateRemarkDialogVisible,
updateRemarkLoading,
updateRemarkOrderIds,
updateRemarkForm,
openUpdateRemarkDialog,
submitUpdateRemark,
resetUpdateRemarkDialog
} = createUpdateRemarkController({
getSelectedIds: params.getSelectedIds,
pendingApi: params.orderActionApi,
clearSelection: params.clearSelection,
loadData: params.loadData
})
const actionMap = createReviewToolbarActionMap({
baseActions: {
@ -352,9 +358,7 @@ export function createReviewToolbarController(params: {
openColumnConfigPanel: params.openColumnConfigPanel,
toggleDetailVisible: params.toggleDetailVisible,
openCreateOrderDialog: params.openCreateOrderDialog,
...(updateRemarkController
? { openUpdateRemarkDialog: updateRemarkController.openUpdateRemarkDialog }
: {})
openUpdateRemarkDialog
},
getSelectedIds: params.getSelectedIds,
reviewApi: params.reviewApi,
@ -394,7 +398,12 @@ export function createReviewToolbarController(params: {
reviewSubmitting,
actionLoading,
submitReview,
...(updateRemarkController ?? {})
updateRemarkDialogVisible,
updateRemarkLoading,
updateRemarkOrderIds,
updateRemarkForm,
submitUpdateRemark,
resetUpdateRemarkDialog
}
}

View File

@ -243,6 +243,7 @@ import { stockColumns, availableFields as stockAvailableFields, stockBatchConfig
// API
import * as stockApi from '@/api/stock/stock'
import type { StockWarehouseListSort } from '@/api/stock/stock'
import * as indexApi from '@/api/index/index'
// Store
import { useUserStore } from '@/stores/modules/user'
@ -517,8 +518,11 @@ const loadData = async () => {
// 调试用:前端打印查看转换结果,确认 operator/value/type 是否符合预期
// console.log('Query Params:', JSON.stringify(params, null, 2))
const sort = currentSort.prop
? { sortField: currentSort.prop, sortOrder: currentSort.order === 'ascending' ? 'ASC' : 'DESC' }
const sort: StockWarehouseListSort | undefined = currentSort.prop
? {
sortField: currentSort.prop,
sortOrder: currentSort.order === 'ascending' ? 'ASC' : 'DESC'
}
: undefined
const res = await stockApi.stockWarehouse(pagination, params, sort)