From 0070f15944c3b6e4c77b8b9a4a8f3706a73e869b Mon Sep 17 00:00:00 2001 From: yin <3313488199@qq.com> Date: Mon, 23 Mar 2026 18:39:46 +0800 Subject: [PATCH] =?UTF-8?q?3=E6=9C=8823=E6=97=A5=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/order/order.ts | 54 ++- src/components/ScanBox/index.vue | 33 +- src/layout/component/AiChat/index.vue | 2 +- src/layout/component/Navbar.vue | 2 +- src/layout/component/Sidebar/Item.vue | 5 + src/layout/index.vue | 2 +- src/views/order/archiveOrder.vue | 61 ++- src/views/order/config/order-common-config.ts | 431 +++++++++++++----- src/views/order/deliveryOrder.vue | 237 ++++++---- src/views/order/exceptionOrder.vue | 166 ++++++- src/views/order/index.vue | 17 +- src/views/order/pendingOrder.vue | 213 +++++++-- src/views/order/reviewOrder.vue | 101 +++- src/wms_order_delivery_100000.sql | 132 +++++- 日志.md | 16 + 15 files changed, 1168 insertions(+), 304 deletions(-) create mode 100644 日志.md diff --git a/src/api/order/order.ts b/src/api/order/order.ts index 3da8f59b..82da44fc 100644 --- a/src/api/order/order.ts +++ b/src/api/order/order.ts @@ -1,6 +1,19 @@ import request from '@/utils/request' const v = "1.0" +export const getreviewOrderlist = (data: any): Promise => { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.reviewOrder.getreviewOrderlist', + v, + timestamp: new Date().getTime() + }, + data: data + }) +} + export function getdeliveryOrderlist(data: any): Promise { return request({ url: '/system', @@ -25,4 +38,43 @@ export function getdeliveryOrderlist(data: any): Promise { // }, // data: data // }) -// } \ No newline at end of file +// } + +export const getpendingOrderlist = (data: any): Promise => { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.pendingOrder.getpendingOrderlist', + v, + timestamp: new Date().getTime() + }, + data: data + }) +} + +export const getexpectionOrderlist = (data: any): Promise => { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.expectionOrder.getexpectionOrderlist', + v, + timestamp: new Date().getTime() + }, + data: data + }) +} + +export const getarchiveOrderlist = (data: any): Promise => { + return request({ + url: '/system', + method: 'post', + params: { + method: 'order.archiveOrder.getarchiveOrderlist', + v, + timestamp: new Date().getTime() + }, + data: data + }) +} diff --git a/src/components/ScanBox/index.vue b/src/components/ScanBox/index.vue index 2d48ddcd..72847170 100644 --- a/src/components/ScanBox/index.vue +++ b/src/components/ScanBox/index.vue @@ -396,7 +396,7 @@ const props = defineProps({ } }) -const emit = defineEmits(['condition-change', 'reset', 'condition-clear']) +const emit = defineEmits(['condition-change', 'reset', 'condition-clear', 'submit']) // Data const activeTab = ref('custom') @@ -659,6 +659,7 @@ function handleReset() { function handleSubmit() { submitting.value = true buildAndEmitCustomCondition() + emit('submit', activeCondition.value) setTimeout(() => { submitting.value = false }, 300) @@ -671,6 +672,13 @@ function clearActiveCondition() { // 对外暴露的方法,供父组件调用 function getConditions() { + // 如果当前是自定义筛选,且没有已应用的 activeCondition,或者想要获取最新的输入值 + // 我们可以根据 activeTab 来决定返回什么 + if (activeTab.value === 'custom') { + const currentConditions = buildConditionsObject() + return currentConditions + } + if (!activeCondition.value) return {} if (typeof activeCondition.value === 'string' || typeof activeCondition.value === 'number') { @@ -698,6 +706,29 @@ function getConditions() { return {} } +function buildConditionsObject() { + const conditions: any = {} + props.availableFields.forEach((field: any) => { + const condition = customConditions[field.value] + let conditionValue = condition.value + + if (field.type === 'text' && condition.operator === 'contains' && conditionValue) { + const values = conditionValue.split(',').filter((v: string) => v.trim()) + if (values.length > 0) { + conditionValue = values + } + } + + if (conditionValue !== undefined && + conditionValue !== null && + conditionValue !== '' && + !(Array.isArray(conditionValue) && conditionValue.length === 0)) { + conditions[field.value] = conditionValue + } + }) + return conditions +} + function reset() { handleReset() } diff --git a/src/layout/component/AiChat/index.vue b/src/layout/component/AiChat/index.vue index 1b4e2dda..f1a2fba5 100644 --- a/src/layout/component/AiChat/index.vue +++ b/src/layout/component/AiChat/index.vue @@ -201,7 +201,7 @@ onMounted(() => { display: flex; flex-direction: column; // flex: 1; - width: 500px; + width: 100%; height: 100%; background-color: #fff; overflow: hidden; diff --git a/src/layout/component/Navbar.vue b/src/layout/component/Navbar.vue index d7ffc18c..db553366 100644 --- a/src/layout/component/Navbar.vue +++ b/src/layout/component/Navbar.vue @@ -207,7 +207,7 @@ onMounted(() => { height: 45px; overflow: hidden; position: relative; - background-color: #cab1f8; + background-color: #0C90FF; //box-shadow: 0 1px 4px rgba(0, 21, 41, .08); .logo { diff --git a/src/layout/component/Sidebar/Item.vue b/src/layout/component/Sidebar/Item.vue index f460610e..23ef78a0 100644 --- a/src/layout/component/Sidebar/Item.vue +++ b/src/layout/component/Sidebar/Item.vue @@ -69,5 +69,10 @@ defineProps({ -webkit-line-clamp: 2; -webkit-box-orient: vertical; max-width: 100%; + color: black; +} + +.horizontal-item .menu-title { + color: white; } diff --git a/src/layout/index.vue b/src/layout/index.vue index 7b2ef0d6..87c05778 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -154,7 +154,7 @@ const handleClickOutside = () => { } .ai-container { - width: 500px; + width: 600px; height: auto; flex-shrink: 0; background-color: #fff; diff --git a/src/views/order/archiveOrder.vue b/src/views/order/archiveOrder.vue index d8f716c1..8304565f 100644 --- a/src/views/order/archiveOrder.vue +++ b/src/views/order/archiveOrder.vue @@ -45,7 +45,13 @@ > + + @@ -94,11 +100,13 @@ import { ElMessage } from 'element-plus' import ScanBox from '@/components/ScanBox/index.vue' import UpperTable from '@/components/UpperTable/index.vue' import * as indexApi from '@/api/index' +import { getarchiveOrderlist } from '@/api/order/order' import { archiveAvailableFields, - orderColumns, - archiveOrderDetail + archiveColumns, + archiveOrderDetail, + translateOrderField } from './config/order-common-config' import detail from './component/detail.vue' import log from './component/log.vue' @@ -118,7 +126,7 @@ const queryTime = ref(0) const pagination = reactive({ currentPage: 1, pageSize: 20, total: 0 }) const tableSize = ref('small') -const columns = ref(orderColumns) +const columns = ref(archiveColumns) const selectionRows = ref([]) @@ -154,13 +162,50 @@ async function loadData() { loading.value = true const start = Date.now() try { + const params = { + page: pagination.currentPage, + limit: pagination.pageSize, + quickSearch: quickSearch.value, + ...scanBox.value?.getConditions?.() + } + const res = await getarchiveOrderlist(params) + if (res.code === 200) { + list.value = res.data || [] + pagination.total = res.total || 0 + } else { + throw new Error(res.msg || '接口返回异常') + } + } catch (e) { + console.error('加载归档订单失败,使用模拟数据:', e) const mockData = [ - { id: 401, order_code: 'SO20260321A01', store_name: '总仓', order_status: 'ARCHIVED', complete_time: '2026-03-20 18:00:00', create_time: '2026-03-20 10:00:00' }, + { + id: 21, + delivery_order_code: 'JY2026011327233', + order_code: 'SO202601130005', + order_type: 'JYCK', + shop_nick: '火火家de小店', + source_platform_name: '拼多多', + status: 'finished', + name: '刘付明仁', + mobile: '18022440198', + province: '广东省', + city: '广州市', + area: '白云区', + detail_address: '广东省 广州市 白云区 太和镇 二路32号', + logistics_name: '顺丰空运', + express_code: 'SF666777888', + total_amount: 10.00, + item_amount: 10.00, + items_count: 1, + items_total: 10, + create_at: '2026-01-13 15:26:07', + updated_at: '2026-01-13 15:40:00', + place_order_time: '2026-01-13 15:22:03', + pay_time: '2026-01-13 15:22:03' + } ] list.value = mockData pagination.total = mockData.length - } catch (e) { - ElMessage.error('加载订单失败') } finally { loading.value = false queryTime.value = Date.now() - start @@ -230,6 +275,6 @@ async function handleExport() { diff --git a/src/views/order/config/order-common-config.ts b/src/views/order/config/order-common-config.ts index 896365a3..b6356e6d 100644 --- a/src/views/order/config/order-common-config.ts +++ b/src/views/order/config/order-common-config.ts @@ -1,19 +1,74 @@ -export const commonFields = [ - { label: '货主', value: 'store_id', type: 'select', options: [] }, - { label: '订单号', value: 'order_code', type: 'input' }, - { label: '创建时间', value: 'create_time', type: 'daterange' }, -] - -export const orderColumns = [ - { prop: 'id', label: 'ID', width: '80' }, - { prop: 'order_code', label: '订单号', width: '180' }, - { prop: 'store_name', label: '货主', width: '140' }, - { prop: 'order_type', label: '订单类型', width: '120' }, - { prop: 'order_status', label: '状态', width: '120' }, - { prop: 'receiver_name', label: '收货人', width: '120' }, - { prop: 'create_time', label: '创建时间', width: '180' }, -] +// 通用翻译映射 +export const COMMON_TRANSLATIONS: Record> = { + is_urgency: { + 'Y': '是', + 'N': '否' + }, + status: { + 'pedding': '待审核', + 'created': '已创建', + 'cancel': '已取消', + 'error': '错误', + 'after-sales-error': '售后异常', + 'finished': '已完成', + 'cancelled': '已作废', + 'archived': '已归档' + }, + sync_status: { + 'padding': '待同步', + 'fin': '已完成', + 'error': '错误', + 'none': '未同步' + }, + order_status: { + 'WAIT_AUDIT': '待审核', + 'AUDITED': '已审核' + }, + storage_status: { + 'none': '未分配', + 'padding': '分配中', + 'fin': '已完成' + }, + print_status: { + 'none': '未打印', + 'padding': '打印中', + 'fin': '已完成' + }, + pick_status: { + 'none': '未拣货', + 'padding': '拣货中', + 'fin': '已完成' + }, + intercept_status: { + 'none': '无', + 'pending': '待拦截', + 'success': '已拦截' + }, + invoice_flag: { + 'Y': '是', + 'N': '否' + }, + post_status: { + 'padding': '分配中', + 'fin': '已分配', + 'timeout': '超时', + 'error': '错误', + 'none': '未分配' + }, + source_platform_code: { + 'OFFLINE': '线下', + 'PDD': '拼多多', + 'JD': '京东', + 'TAOBAO': '淘宝' + } +} +export function translateOrderField(field: string, value: any) { + if (COMMON_TRANSLATIONS[field] && COMMON_TRANSLATIONS[field][value] !== undefined) { + return COMMON_TRANSLATIONS[field][value] + } + return value +} // deliveryOrder相关配置 export const deliveryAvailableFields = [ @@ -49,103 +104,110 @@ export const deliveryAvailableFields = [ export const deliveryColumns = [ { prop: 'shop_nick', label: '店铺名称', width: '120' }, - { prop: 'name', label: '收件人姓名', width: '100' }, - { prop: 'express_code', label: '快递运单号', width: '160' }, - { prop: 'mobile', label: '收件人手机', width: '120' }, - { prop: 'province', label: '省份', width: '100' }, - { prop: 'is_urgency', label: '是否紧急', width: '100' }, - { prop: 'source_platform_name', label: '来源平台名称', width: '120' }, - { prop: 'logistics_name', label: '物流公司名称', width: '120' }, - { prop:'invoice_flag',label: '是否需要发票',width:'120' }, - { prop:'intercept_status',label: '拦截状态',width:'120' }, - { prop: 'create_at', label: '创建时间', width: '160' }, - { prop: 'sync_status', label: '同步状态', width: '100' }, + { prop: 'name', label: '收件人', width: '100' }, + { prop: 'mobile', label: '移动电话', width: '120' }, + { prop: 'tel', label: '固定电话', width: '120' }, + { prop: 'province', label: '省', width: '100' }, + { prop: 'create_at', label: '创建日期', width: '160' }, + { prop: 'delivery_time', label: '发货时间', width: '160' }, + { prop: 'source_platform_name', label: '订单来源', width: '120' }, + { prop: 'logistics_name', label: '快递', width: '120' }, + { prop: 'pre_delivery_order_code', label: '发货单号', width: '160' }, + { prop: 'sync_status', label: '同步', width: '100' }, ] export const deliverydetail = [ - { label: '订单编号', prop: 'id' }, - { label: '发货单号', prop: 'delivery_order_code' }, - { label: '预发货单号', prop: 'pre_delivery_order_code' }, - { label: '运单号', prop: 'express_code' }, - - { label: '物流公司名称', prop: 'logistics_name' }, - { label: '配送方式', prop: 'delivery_type' }, - { label: '省/市/区', prop: 'province_city_area' }, - { label: '城镇/街道', prop: 'town' }, - { label: '详细地址', prop: 'detail_address' }, - { label: '邮编', prop: 'zip_code' }, - { label: '隐私号 ID', prop: 'oaid' }, - - { label: '商品种类数', prop: 'items_count' }, - { label: '商品总件数', prop: 'items_total' }, - { label: '总重量', prop: 'items_weight' }, - { label: '订单总金额', prop: 'total_amount' }, - { label: '商品总价', prop: 'item_amount' }, - { label: '优惠金额', prop: 'discount_amount' }, - { label: '快递费用', prop: 'freight' }, - { label: '应收金额', prop: 'ar_amount' }, - { label: '实付金额', prop: 'got_amount' }, - { label: '服务费', prop: 'service_fee' }, - - { label: '创建时间', prop: 'create_at' }, - { label: '更新时间', prop: 'updated_at' }, - { label: '删除时间', prop: 'delete_at' }, - { label: '下单时间', prop: 'place_order_time' }, - { label: '支付时间', prop: 'pay_time' }, - { label: 'ERP 审核时间', prop: 'operate_time' }, + { label: '商品总金额', prop: 'item_amount' }, + { label: '订单折扣金额', prop: 'discount_amount' }, + { label: '商品名称(预留位置)', prop: 'item_name' }, + { label: '商品SKU', prop: 'items' }, + { label: '商品种类数', prop: 'items_count' }, + { label: '商品总数', prop: 'items_total' }, + { label: '总重量', prop: 'items_weight' }, + { label: '货主', prop: 'store_id' }, + { label: '国家编码', prop: 'country_code' }, + { label: '详细地址', prop: 'detail_address' }, ] +export const deliverybuttonList: any[] = [ + { + label: 'EXCEL操作', + type: 'dropdown', + command: 'handleDeliveryOperation', + options: [ + { label: '导出配送单(不含明细)', value: 'export-delivery-nodetail' }, + { label: '快递号导入(含明细)', value: 'import-delivery-detail' }, + ] + }, + { + label: '打印操作', + type: 'dropdown', + command: 'handleDeliveryPrintOperation', + options: [ + { label: '打印发货单', value: 'print-delivery' }, + { label: '打印拣货单', value: 'print-picking' }, + { label: '打印面单(菜鸟)', value: 'print-waybill-cainiao', divided: true }, + { label: '打印面单(拼多多)', value: 'print-waybill-pdd' }, + ] + }, +] // revieworder相关配置 export const reviewAvailableFields = [ { label: '货主', value: 'store_id', type: 'select', options: [] }, - { label: '订单号', value: 'order_code', type: 'text' }, - { label: '出库单号', value: 'delivery_order_code', type: 'text' }, + { label: '发货单号', value: 'delivery_order_code', type: 'text' }, { label: '店铺名称', value: 'shop_nick', type: 'text' }, { label: '来源平台', value: 'source_platform_name', type: 'text' }, - { label: '物流公司', value: 'logistics_name', type: 'text' }, - { label: '物流单号', value: 'express_code', type: 'text' }, { label: '收货人', value: 'name', type: 'text' }, { label: '手机号', value: 'mobile', type: 'text' }, - { label: '省/市/区', value: 'province_city_area', 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: 'place_order_time', type: 'daterange' }, { label: '创建时间', value: 'create_at', type: 'daterange' }, ] export const reviewColums = [ - { prop: 'store_id', label: '货主id', width: '100' }, - { prop: 'source_platform_name', label: '来源平台名称', width: '120' }, - { prop: 'name', label: '收件人姓名', width: '120' }, - { prop: 'mobile', label: '收件人手机', width: '120' }, - { prop: 'create_at', label: '创建时间', width: '160' }, + { prop: 'shop_nick', label: '店铺名称', width: '140' }, + { prop: 'source_platform_code', label: '平台编码', width: '100' }, + { prop: 'status', label: '详情状态', width: '100' }, + { prop: 'operator_name', label: '审核人', width: '100' }, + { prop: 'is_urgency', label: '是否紧急', width: '100' }, + { prop: 'total_amount', label: '订单总金额', width: '120' }, + { prop: 'ar_amount', label: '应收金额', width: '120' }, + { prop: 'pay_time', label: '支付时间', width: '160' }, + { prop: 'items_total', label: '总数量', width: '90' }, + { prop: 'store_id', label: '货主', width: '100' }, ] export const reviewOrderDetail = [ - // 基础信息 - { prop: 'store_id', label: '货主id' }, - { prop: 'source_platform_name', label: '来源平台名称' }, - { prop: 'name', label: '收件人姓名' }, - { prop: 'mobile', label: '收件人手机' }, - { prop: 'create_at', label: '创建时间' }, - - // 明细 - { prop: 'shop_nick', label: '店铺名称' }, - { prop: 'item_name', label: '商品名称(预留)' }, - { prop: 'order_type', label: '订单类型' }, + { prop: 'items', label: '商品详情' }, + { prop: 'items_weight', label: '总重量' }, + { prop: 'pay_no', label: '支付单号' }, { prop: 'order_flag', label: '订单标记' }, + { prop: 'warehouse_id', label: '仓库ID' }, + { prop: 'warehouse_code', label: '仓库编码' }, + { prop: 'logistics_code', label: '物流编码' }, + { prop: 'invoice_flag', label: '发票标记' }, + { prop: 'delivery_type', label: '发货类型' }, ] +export const reviewOrderbuttonList: any[] = [ + { + label: '审核操作', + type: 'dropdown', + command: 'handleReviewOperation', + options: [ + { label: '审核通过', value: 'approve' }, + { label: '审核驳回', value: 'reject' }, + ] + } +] // pendingOrder相关配置 export const pendingAvailableFields = [ { label: '货主', value: 'store_id', type: 'select', options: [] }, { label: '订单号', value: 'order_code', type: 'text' }, - { label: '出库单号', value: 'delivery_order_code', type: 'text' }, { label: '店铺名称', value: 'shop_nick', type: 'text' }, { label: '来源平台', value: 'source_platform_name', type: 'text' }, { label: '物流公司', value: 'logistics_name', type: 'text' }, @@ -160,19 +222,65 @@ export const pendingAvailableFields = [ ] export const pendingCloums = [ - { prop: 'id', label: 'ID', width: '80' }, - { prop: 'shop_nick', label: '店铺昵称', width: '160' }, - { prop: 'order_code', label: '订单号', width: '180' }, - { prop: 'delivery_order_code', label: '出库单号', width: '160' }, - { prop: 'name', label: '收货人', width: '160' }, - { prop: 'seller_nick', label: '卖家昵称', width: '160' }, - { prop: 'source_platform_name', label: '来源平台', width: '160' }, - { prop: 'is_urgency', label: '是否紧急', width: '100' }, - { prop: 'logistics_name', label: '物流公司', width: '160' }, - { prop: 'status', label: '系统状态', width: '100' }, - { prop: 'sync_status', label: '同步状态', width: '100' }, - { prop: 'province', label: '送达省份', width: '120' }, - { prop: 'create_at', label: '创建时间', width: '160' }, + { prop: 'wave_id', label: '波次ID', width: '100' }, + { prop: 'storage_status', label: '分配状态', width: '100' }, + { prop: 'post_status', label: '快递状态', width: '100' }, + { prop: 'logistics_name', label: '物流公司', width: '120' }, + { prop: 'express_code', label: '单号', width: '160' }, + { prop: 'is_urgency', label: '紧急', width: '80' }, + { prop: 'items_total', label: '商品总数', width: '100' }, + { prop: 'pay_time', label: '支付时间', width: '160' }, +] + +export const pendingOrderDetail = [ + { prop: 'warehouse_id', label: '仓库ID' }, + { prop: 'warehouse_code', label: '仓库编码' }, + { prop: 'items_weight', label: '总重量' }, + { prop: 'logistics_code', label: '物流编码' }, + { prop: 'delivery_type', label: '发货服务类型' }, + { prop: 'logistics_area_code', label: '快递区域编码' }, +] + +export const pendingOrderbuttonList: any[] = [ + { + label: 'EXCEL操作', + type: 'dropdown', + command: 'handleExcelOperation', + options: [ + { label: '订单导入', value: 'import-order' }, + { label: '快递号导入', value: 'import-delivery' }, + { label: '地址导入', value: 'import-address' }, + { label: '导出订单(不含明细)', value: 'export-summary', divided: true }, + { label: '导出订单(含明细)', value: 'export-detail' }, + ] + }, + { + label: '打印操作', + type: 'dropdown', + command: 'handlePrintOperation', + options: [ + { label: '打印发货单', value: 'print-delivery' }, + { label: '打印拣货单', value: 'print-picking' }, + { label: '打印面单(菜鸟)', value: 'print-waybill-cainiao', divided: true }, + { label: '打印面单(拼多多)', value: 'print-waybill-pdd' }, + ] + }, + { + label: '分配快递号', + type: 'dropdown', + command: 'handleAssignDelivery', + options: [ + { label: '分配快递号', value: 'assign-delivery' }, + ] + }, + { + label: '拆分', + type: 'dropdown', + command: 'handleSplitOrder', + options: [ + { label: '拆分', value: 'split' }, + ] + } ] @@ -180,24 +288,141 @@ export const pendingCloums = [ + +// expectionOrder相关配置 +export const expectionOrderAvailableFields = [ + { label: '货主', value: 'store_id', type: 'select', options: [] }, + { label: '订单号', value: 'order_code', type: 'input' }, + { label: '发货单号', value: 'delivery_order_code', type: 'input' }, + { label: '物流公司', value: 'logistics_name', type: 'input' }, + { label: '快递单号', value: 'express_code', type: 'input' }, + { label: '拦截状态', value: 'intercept_status', type: 'select', options: [ + { label: '无', value: 'none' }, + { label: '待拦截', value: 'pending' }, + { label: '已拦截', value: 'success' } + ]}, + { label: '创建时间', value: 'create_at', type: 'daterange' }, +] + +export const expectionColumns = [ + { prop: 'store_id', label: '货主', width: '100' }, + { prop: 'logistics_name', label: '快递', width: '120' }, + { prop: 'pre_delivery_order_code', label: '发货单号', width: '160' }, + { prop: 'create_at', label: '创建日期', width: '160' }, + { prop: 'status', label: '订单状态', width: '100' }, +] + +export const expectionOrderDetail = [ + // 基础信息 + { prop: 'delivery_order_code', label: '发货单号' }, + { prop: 'order_code', label: '订单号' }, + { prop: 'order_type', label: '订单类型' }, + { prop: 'shop_nick', label: '店铺名称' }, + { prop: 'source_platform_name', label: '来源平台' }, + { prop: 'status', label: '系统状态' }, + { prop: 'intercept_status', label: '拦截状态' }, + + // 异常/状态标记 + { prop: 'lock_status', label: '锁定状态' }, + { prop: 'sync_status', label: '同步状态' }, + { prop: 'post_status', 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: 'express_code', label: '运单号' }, + + // 统计信息 + { prop: 'items_count', label: '商品种类' }, + { prop: 'items_total', label: '商品总数' }, + { prop: 'items_weight', label: '总重量' }, + + // 时间信息 + { prop: 'create_at', label: '创建时间' }, + { prop: 'updated_at', label: '更新时间' }, + { prop: 'operate_time', label: '操作时间' }, +] + +export const expectionOrderbuttonList: any[] = [ + { + label: 'EXCEL操作', + type: 'dropdown', + command: 'handleExpectionOperation', + options: [ + { label: '异常跟踪单导入', value: 'import-exception-tracking' }, + { label: '导出异常跟踪单', value: 'export-exception-tracking' }, + ] + } +] + + // archiveOrder相关配置 export const archiveAvailableFields = [ { label: '货主', value: 'store_id', type: 'select', options: [] }, { label: '订单号', value: 'order_code', type: 'input' }, - { label: '状态', value: 'order_status', type: 'select', options: [ - { label: '已完成', value: 'FINISHED' }, - { label: '已作废', value: 'CANCELLED' }, - { label: '已归档', value: 'ARCHIVED' }, + { label: '发货单号', value: 'delivery_order_code', type: 'input' }, + { label: '店铺名称', value: 'shop_nick', type: 'input' }, + { label: '收货人', value: 'name', type: 'input' }, + { label: '手机号', value: 'mobile', type: 'input' }, + { label: '状态', value: 'status', type: 'select', options: [ + { label: '已完成', value: 'finished' }, + { label: '已作废', value: 'cancelled' }, + { label: '已归档', value: 'archived' } ]}, - { label: '创建时间', value: 'create_time', type: 'daterange' }, + { label: '创建时间', value: 'create_at', type: 'daterange' }, + { label: '归档时间', value: 'updated_at', type: 'daterange' }, +] + +export const archiveColumns = [ + { prop: 'id', label: 'ID', width: '80' }, + { prop: 'order_code', label: '订单号', width: '180' }, + { prop: 'delivery_order_code', label: '发货单号', width: '160' }, + { 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: 'create_at', label: '创建时间', width: '160' }, + { prop: 'updated_at', label: '归档时间', width: '160' }, ] export const archiveOrderDetail = [ + // 基础信息 + { prop: 'delivery_order_code', label: '发货单号' }, { prop: 'order_code', label: '订单号' }, - { prop: 'store_name', label: '货主' }, { prop: 'order_type', label: '订单类型' }, - { prop: 'order_status', label: '状态' }, - { prop: 'receiver_name', label: '收货人' }, - { prop: 'complete_time', label: '完成时间' }, - { prop: 'create_time', label: '创建时间' }, + { prop: 'shop_nick', label: '店铺名称' }, + { prop: 'source_platform_name', label: '来源平台' }, + { prop: 'status', 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: 'express_code', label: '运单号' }, + + // 金额/统计 + { prop: 'total_amount', label: '总金额' }, + { prop: 'item_amount', label: '商品金额' }, + { prop: 'items_count', label: '商品种类' }, + { prop: 'items_total', label: '商品总数' }, + + // 时间信息 + { prop: 'place_order_time', label: '下单时间' }, + { prop: 'pay_time', label: '支付时间' }, + { prop: 'create_at', label: '创建时间' }, + { prop: 'updated_at', label: '归档/更新时间' }, ] diff --git a/src/views/order/deliveryOrder.vue b/src/views/order/deliveryOrder.vue index 23c23e12..3904a295 100644 --- a/src/views/order/deliveryOrder.vue +++ b/src/views/order/deliveryOrder.vue @@ -16,6 +16,41 @@
刷新 + + + 新建配送单 批量作废 导出 @@ -47,7 +82,13 @@ > + + @@ -89,6 +130,7 @@