diff --git a/src/views/order/orderManagement/component/OrderItemsDetailPanel.vue b/src/views/order/orderManagement/component/OrderItemsDetailPanel.vue new file mode 100644 index 00000000..05df69a5 --- /dev/null +++ b/src/views/order/orderManagement/component/OrderItemsDetailPanel.vue @@ -0,0 +1,90 @@ + + + + + diff --git a/src/views/order/orderManagement/component/PendingOrderDetailPanel.vue b/src/views/order/orderManagement/component/PendingOrderDetailPanel.vue new file mode 100644 index 00000000..72008aa2 --- /dev/null +++ b/src/views/order/orderManagement/component/PendingOrderDetailPanel.vue @@ -0,0 +1,173 @@ + + + + + diff --git a/src/views/order/orderManagement/config/order-common-config.ts b/src/views/order/orderManagement/config/order-common-config.ts index 8b357f2e..6caa0ce0 100644 --- a/src/views/order/orderManagement/config/order-common-config.ts +++ b/src/views/order/orderManagement/config/order-common-config.ts @@ -172,6 +172,72 @@ export const COMMON_TAG_TYPES: Record> = { } } +export interface ToolbarButtonConfig { + key: string + label: string + dynamicLabelKey?: string + size?: '' | 'default' | 'small' | 'large' + type?: '' | 'primary' | 'success' | 'warning' | 'info' | 'danger' + plain?: boolean + loadingKey?: string + disabledKey?: string + action: string +} + +export const ORDER_TOOLBAR_BUTTONS: Record = { + refresh: { key: 'refresh', label: '刷新', type: 'primary', size: 'small', action: 'loadData' }, + export: { key: 'export', label: '导出', size: 'small', loadingKey: 'exportLoading', action: 'handleExport' }, + columnConfig: { key: 'columnConfig', label: '字段设置', size: 'small', action: 'openColumnConfigPanel' }, + toggleDetail: { key: 'toggleDetail', label: '显示详情', dynamicLabelKey: 'detailToggleLabel', size: 'small', action: 'toggleDetailVisible' }, + reverseReview: { key: 'reverseReview', label: '反审回待审核', size: 'small', loadingKey: 'actionLoading', disabledKey: 'hasNoSelection', action: 'handleReverseReview' }, + markPendingOutbound: { key: 'markPendingOutbound', label: '标记待出库', size: 'small', type: 'warning', loadingKey: 'actionLoading', disabledKey: 'hasNoSelection', action: 'handleMarkPendingOutbound' }, + allocateStorage: { key: 'allocateStorage', label: '分配储位', size: 'small', type: 'primary', plain: true, loadingKey: 'storageAllocateLoading', disabledKey: 'hasNoSelection', action: 'openStorageAllocateDialog' }, + cancelAllocateStorage: { key: 'cancelAllocateStorage', label: '取消分配储位', size: 'small', type: 'danger', plain: true, loadingKey: 'storageAllocateLoading', disabledKey: 'hasNoSelection', action: 'openStorageCancelDialog' }, + allocateExpress: { key: 'allocateExpress', label: '分配快递号', size: 'small', type: 'success', loadingKey: 'allocateLoading', disabledKey: 'hasNoSelection', action: 'openAllocateExpressDialog' }, + updateExpress: { key: 'updateExpress', label: '修改快递', size: 'small', type: 'warning', plain: true, loadingKey: 'updateOrderMetaLoading', disabledKey: 'hasNoSelection', action: 'openUpdateOrderExpressDialog' }, + updatePlatform: { key: 'updatePlatform', label: '修改平台', size: 'small', type: 'info', plain: true, loadingKey: 'updateOrderMetaLoading', disabledKey: 'hasNoSelection', action: 'openUpdateOrderPlatformDialog' }, + manualCreate: { key: 'manualCreate', label: '手动建单', size: 'small', type: 'primary', plain: true, action: 'openManualCreateDialog' }, + excelImportCreate: { key: 'excelImportCreate', label: 'Excel导入建单', size: 'small', type: 'success', plain: true, action: 'openImportOrderDialog' }, + cloneOrder: { key: 'cloneOrder', label: '克隆订单', size: 'small', type: 'warning', plain: true, loadingKey: 'cloneOrderLoading', disabledKey: 'notSingleSelection', action: 'openCloneOrderDialog' }, + syncOrderIds: { key: 'syncOrderIds', label: '同步订单', size: 'small', type: 'primary', plain: true, loadingKey: 'syncOrderIdsLoading', disabledKey: 'hasNoSelection', action: 'openSyncOrderIdsDialog' }, + cancelOrder: { key: 'cancelOrder', label: '取消订单', size: 'small', type: 'danger', loadingKey: 'actionLoading', disabledKey: 'hasNoSelection', action: 'handleCancelOrder' }, + batchReview: { key: 'batchReview', label: '批量审核通过', size: 'small', type: 'success', loadingKey: 'reviewSubmitting', disabledKey: 'hasNoSelection', action: 'handleBatchReview' } +} + +export const pendingToolbarButtonKeys = [ + 'refresh', + 'export', + 'columnConfig', + 'toggleDetail', + 'reverseReview', + 'markPendingOutbound', + 'allocateStorage', + 'cancelAllocateStorage', + 'allocateExpress', + 'updateExpress', + 'updatePlatform', + 'manualCreate', + 'excelImportCreate', + 'cloneOrder', + 'syncOrderIds', + 'cancelOrder' +] + +export const reviewToolbarButtonKeys = [ + 'refresh', + 'export', + 'columnConfig', + 'toggleDetail', + 'manualCreate', + 'batchReview' +] + +export function pickToolbarButtons(keys: string[]) { + return keys + .map((key) => ORDER_TOOLBAR_BUTTONS[key]) + .filter((button): button is ToolbarButtonConfig => Boolean(button)) +} + export function getTagType(field: string, value: any) { if (COMMON_TAG_TYPES[field] && COMMON_TAG_TYPES[field][value] !== undefined) { return COMMON_TAG_TYPES[field][value] @@ -471,6 +537,13 @@ export const pendingCloums = [ { prop: 'shop_nick', label: '店铺名称', width: '140' }, { prop: 'name', label: '收件人', width: '110' }, { prop: 'mobile', label: '电话', width: '120' }, + { 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: 'pick_status', label: '拣货状态', width: '100' }, + { prop: 'pack_status', label: '打包状态', width: '100' }, { prop: 'items_count', label: '商品种类', width: '100' }, { prop: 'items_total', label: '商品总数', width: '100' }, { prop: 'province', label: '省份', width: '100' }, @@ -652,6 +725,13 @@ export const expectionColumns = [ { prop: 'delivery_order_code', label: '发货单号', width: '170' }, { 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: 'pick_status', label: '拣货状态', width: '100' }, + { prop: 'pack_status', label: '打包状态', width: '100' }, { prop: 'name', label: '收货人', width: '110' }, { prop: 'mobile', label: '手机号', width: '120' }, { prop: 'logistics_name', label: '快递', width: '120' }, diff --git a/src/views/order/orderManagement/pendingOrder.vue b/src/views/order/orderManagement/pendingOrder.vue index 8a40c0e4..3ab934bd 100644 --- a/src/views/order/orderManagement/pendingOrder.vue +++ b/src/views/order/orderManagement/pendingOrder.vue @@ -23,85 +23,18 @@ @mouseup="handleMouseUp" @mouseleave="handleMouseUp" > - 刷新 - 导出 - 字段设置 - {{ detailVisible ? '隐藏详情' : '显示详情' }} - 反审回待审核 - 标记待出库 - 分配储位 + {{ resolveButtonLabel(button.label, button.dynamicLabelKey) }} - - 取消分配储位 - - - 分配快递号 - - - 修改快递 - - - 修改平台 - - 手动建单 - - Excel导入建单 - - - 克隆订单 - - - 同步订单ID - - 取消订单 @@ -205,17 +138,21 @@
+ - + - +
-
- +
+ +
+
+

配货明细加载中...

@@ -363,26 +300,9 @@ @closed="resetSyncOrderIdsDialog" > - - - 按当前勾选 - 手工输入ID - - {{ selectionRows.length }} 条 - - -
- 提交时将按接口要求统一转换为 `order_ids: number[]` -
-