// 通用翻译映射 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 = [ { label: '货主', value: 'store_id', type: 'select', options: [] }, { label: '紧急订单', value: 'is_urgency', type: 'select', options: [ { label: '是', value: 'Y' }, { label: '否', value: 'N' }, ]}, { label: '快递', value: '', type: 'input' }, { label: '来源平台', value: '', type: 'input' }, { label: '同步状态', value: '', type: 'input' }, { label: '出库单号', value: '', type: 'text' }, { label: '前置单号', value: '', type: 'input' }, { label: '物流单号', value: '', type: 'text' }, { label: '移动电话', value: '', type: 'text' }, { label: '固定电话', value: '', type: 'text' }, // { label: '', value: '', type: 'text' }, // { label: '', value: '', type: 'text' }, // { label: '', value: '', type: 'text' }, // { label: '', value: '', type: 'text' }, // { label: '', value: '', type: 'text' }, // { label: '', value: '', type: 'text' }, // { label: '', value: '', type: 'text' }, { label: '审核时间', value: '', type: 'daterange' }, { label: '系统创建时间', value: '', type: 'daterange' }, { label: '下单时间', value: '', type: 'daterange' }, { label: '支付时间', value: '', type: 'daterange' }, // { label: '', value: '', type: 'daterange' }, // { label: '', value: '', type: 'daterange' }, // { label: '', value: '', type: 'daterange' }, // { label: '', value: '', type: 'daterange' }, ] export const deliveryColumns = [ { prop: 'shop_nick', label: '店铺名称', width: '120' }, { 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: 'total_amount' }, { 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: 'delivery_order_code', type: 'text' }, { label: '店铺名称', value: 'shop_nick', type: 'text' }, { label: '来源平台', value: 'source_platform_name', type: 'text' }, { label: '收货人', value: 'name', type: 'text' }, { label: '手机号', value: 'mobile', type: 'text' }, { label: '是否紧急', value: 'is_urgency', type: 'select', options: [ { label: '是', value: 'Y' }, { label: '否', value: 'N' } ] }, { label: '创建时间', value: 'create_at', type: 'daterange' }, ] export const reviewColums = [ { 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: '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: '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 pendingCloums = [ { 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' }, ] } ] // 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: '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_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: 'order_type', 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: '归档/更新时间' }, ]