diff --git a/dist.tar.gz b/dist.tar.gz index d6fef689..c361d477 100644 Binary files a/dist.tar.gz and b/dist.tar.gz differ diff --git a/src/views/order/orderManagement/config/order-common-config.ts b/src/views/order/orderManagement/config/order-common-config.ts index 8d7e512a..4f8d352d 100644 --- a/src/views/order/orderManagement/config/order-common-config.ts +++ b/src/views/order/orderManagement/config/order-common-config.ts @@ -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 -): 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' }, diff --git a/src/views/order/orderManagement/exceptionOrder.vue b/src/views/order/orderManagement/exceptionOrder.vue index 4aa43711..dbd35e1b 100644 --- a/src/views/order/orderManagement/exceptionOrder.vue +++ b/src/views/order/orderManagement/exceptionOrder.vue @@ -278,6 +278,13 @@ @closed="resetSyncOrderIdsDialog" @submit="submitSyncOrderIds" /> + Array clearSelection: () => void reviewApi: Record - orderActionApi?: Record + orderActionApi: Record }) { 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 } } diff --git a/src/views/stock/stock/index.vue b/src/views/stock/stock/index.vue index aa2c983e..e4337f92 100644 --- a/src/views/stock/stock/index.vue +++ b/src/views/stock/stock/index.vue @@ -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)