784 lines
31 KiB
TypeScript
784 lines
31 KiB
TypeScript
// 通用翻译映射
|
|
export const COMMON_TRANSLATIONS: Record<string, Record<string, string>> = {
|
|
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': '已完成'
|
|
},
|
|
pack_status: {
|
|
'none': '未打包',
|
|
'padding': '打包中',
|
|
'fin': '已完成'
|
|
},
|
|
intercept_status: {
|
|
'none': '无',
|
|
'pending': '待拦截',
|
|
'success': '已拦截'
|
|
},
|
|
invoice_flag: {
|
|
'Y': '是',
|
|
'N': '否'
|
|
},
|
|
post_status: {
|
|
'padding': '分配中',
|
|
'fin': '已分配',
|
|
'timeout': '超时',
|
|
'error': '错误',
|
|
'none': '未分配'
|
|
},
|
|
outbound_status: {
|
|
'none': '未出库',
|
|
'padding': '待出库',
|
|
'pending': '待出库',
|
|
'pedding': '待出库',
|
|
'processing': '出库中',
|
|
'fin': '已出库',
|
|
'done': '已出库',
|
|
'finished': '已出库',
|
|
'error': '出库异常',
|
|
'failed': '出库失败'
|
|
},
|
|
source_platform_code: {
|
|
'OFFLINE': '线下',
|
|
'PDD': '拼多多',
|
|
'JD': '京东',
|
|
'TAOBAO': '淘宝',
|
|
'TB': '淘宝'
|
|
}
|
|
,
|
|
inspection_status: {
|
|
'none': '未审核',
|
|
'pending': '待审核',
|
|
'padding': '审核中',
|
|
'fin': '审核通过',
|
|
'reject': '审核驳回',
|
|
'error': '审核异常'
|
|
}
|
|
}
|
|
|
|
// 通用标签类型映射
|
|
export const COMMON_TAG_TYPES: Record<string, Record<string, string>> = {
|
|
is_urgency: {
|
|
'Y': 'danger',
|
|
'N': 'info'
|
|
},
|
|
status: {
|
|
'pedding': 'warning',
|
|
'pending': 'warning',
|
|
'created': 'success',
|
|
'cancel': 'danger',
|
|
'cancelled': 'danger',
|
|
'error': 'danger',
|
|
'after-sales-error': 'danger',
|
|
'finished': 'success',
|
|
'archived': 'info'
|
|
},
|
|
sync_status: {
|
|
'padding': 'warning',
|
|
'pending': 'warning',
|
|
'fin': 'success',
|
|
'error': 'danger',
|
|
'none': 'info'
|
|
},
|
|
order_status: {
|
|
'WAIT_AUDIT': 'warning',
|
|
'AUDITED': 'success'
|
|
},
|
|
storage_status: {
|
|
'none': 'info',
|
|
'padding': 'warning',
|
|
'pending': 'warning',
|
|
'fin': 'success'
|
|
},
|
|
print_status: {
|
|
'none': 'info',
|
|
'padding': 'warning',
|
|
'pending': 'warning',
|
|
'fin': 'success'
|
|
},
|
|
pick_status: {
|
|
'none': 'info',
|
|
'padding': 'warning',
|
|
'pending': 'warning',
|
|
'fin': 'success'
|
|
},
|
|
pack_status: {
|
|
'none': 'info',
|
|
'padding': 'warning',
|
|
'pending': 'warning',
|
|
'fin': 'success'
|
|
},
|
|
post_status: {
|
|
'padding': 'warning',
|
|
'pending': 'warning',
|
|
'fin': 'success',
|
|
'timeout': 'danger',
|
|
'error': 'danger',
|
|
'none': 'info'
|
|
},
|
|
outbound_status: {
|
|
'none': 'info',
|
|
'padding': 'warning',
|
|
'pending': 'warning',
|
|
'pedding': 'warning',
|
|
'processing': 'warning',
|
|
'fin': 'success',
|
|
'done': 'success',
|
|
'finished': 'success',
|
|
'error': 'danger',
|
|
'failed': 'danger'
|
|
},
|
|
inspection_status: {
|
|
'none': 'info',
|
|
'pending': 'warning',
|
|
'padding': 'warning',
|
|
'fin': 'success',
|
|
'reject': 'danger',
|
|
'error': 'danger'
|
|
}
|
|
}
|
|
|
|
export function getTagType(field: string, value: any) {
|
|
if (COMMON_TAG_TYPES[field] && COMMON_TAG_TYPES[field][value] !== undefined) {
|
|
return COMMON_TAG_TYPES[field][value]
|
|
}
|
|
return 'info'
|
|
}
|
|
|
|
export function translateOrderField(field: string, value: any) {
|
|
if (COMMON_TRANSLATIONS[field] && COMMON_TRANSLATIONS[field][value] !== undefined) {
|
|
return COMMON_TRANSLATIONS[field][value]
|
|
}
|
|
return value
|
|
}
|
|
|
|
function pad2(value: number) {
|
|
return String(value).padStart(2, '0')
|
|
}
|
|
|
|
export function formatOrderTime(value: unknown) {
|
|
if (value === undefined || value === null || value === '') return '-'
|
|
if (value instanceof Date) {
|
|
if (Number.isNaN(value.getTime())) return '-'
|
|
return `${value.getFullYear()}-${pad2(value.getMonth() + 1)}-${pad2(value.getDate())} ${pad2(value.getHours())}:${pad2(value.getMinutes())}:${pad2(value.getSeconds())}`
|
|
}
|
|
|
|
if (typeof value === 'number' || /^\d+$/.test(String(value))) {
|
|
const raw = Number(value)
|
|
if (!Number.isFinite(raw)) return String(value)
|
|
const milliseconds = raw < 1000000000000 ? raw * 1000 : raw
|
|
const date = new Date(milliseconds)
|
|
if (Number.isNaN(date.getTime())) return String(value)
|
|
return `${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())} ${pad2(date.getHours())}:${pad2(date.getMinutes())}:${pad2(date.getSeconds())}`
|
|
}
|
|
|
|
const text = String(value).trim()
|
|
if (!text) return '-'
|
|
const date = new Date(text)
|
|
if (Number.isNaN(date.getTime())) return text
|
|
return `${date.getFullYear()}-${pad2(date.getMonth() + 1)}-${pad2(date.getDate())} ${pad2(date.getHours())}:${pad2(date.getMinutes())}:${pad2(date.getSeconds())}`
|
|
}
|
|
|
|
function orderTimeFormatter(_row: any, _column: any, cellValue: unknown) {
|
|
return formatOrderTime(cellValue)
|
|
}
|
|
|
|
function waybillCodesFormatter(_row: any, _column: any, cellValue: unknown) {
|
|
if (cellValue === undefined || cellValue === null || cellValue === '') return '-'
|
|
|
|
const normalizeList = (list: any[]) =>
|
|
list
|
|
.map((item) => String(item ?? '').trim())
|
|
.filter((item) => item.length > 0)
|
|
.join(', ')
|
|
|
|
if (Array.isArray(cellValue)) {
|
|
const text = normalizeList(cellValue)
|
|
return text || '-'
|
|
}
|
|
|
|
const text = String(cellValue).trim()
|
|
if (!text) return '-'
|
|
|
|
// 兼容后端返回 JSON 字符串:["776..."] / ["A","B"]
|
|
if (text.startsWith('[') && text.endsWith(']')) {
|
|
try {
|
|
const parsed = JSON.parse(text)
|
|
if (Array.isArray(parsed)) {
|
|
const normalized = normalizeList(parsed)
|
|
return normalized || '-'
|
|
}
|
|
} catch {
|
|
// 非法 JSON 时回退原文
|
|
}
|
|
}
|
|
|
|
return text
|
|
}
|
|
|
|
/** 订单详情 descriptions 中需格式化为本地时间的字段(与列表 formatter 一致) */
|
|
export const ORDER_DETAIL_TIME_FIELDS = new Set([
|
|
'place_order_time',
|
|
'pay_time',
|
|
'create_at',
|
|
'created_at',
|
|
'updated_at',
|
|
'operate_time'
|
|
])
|
|
|
|
// deliveryOrder相关配置
|
|
export const deliveryAvailableFields = [
|
|
{ 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: 'logistics_name', type: 'text' },
|
|
{ label: '物流单号', value: 'waybill_codes', 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: 'outbound_status', type: 'select', options: [
|
|
{ label: '未出库', value: 'none' },
|
|
{ label: '待出库', value: 'padding' },
|
|
{ label: '已出库', value: 'fin' }
|
|
]},
|
|
{ label: '创建时间', value: 'create_at', type: 'daterange' },
|
|
{ label: '支付时间', value: 'pay_time', type: 'daterange' },
|
|
]
|
|
|
|
export const deliveryColumns = [
|
|
{ prop: 'shop_nick', label: '店铺名称', width: '140' },
|
|
{ prop: 'delivery_order_code', label: '配送单号', width: '170' },
|
|
{ prop: 'source_platform_code', label: '平台来源', width: '100' },
|
|
{ prop: 'name', label: '收货人', width: '100' },
|
|
{ prop: 'mobile', label: '手机号', width: '120' },
|
|
{ prop: 'status', label: '订单状态', width: '100' },
|
|
{ prop: 'outbound_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: 'logistics_name', label: '物流公司', width: '120' },
|
|
{ prop: 'waybill_codes', label: '物流单号', width: '160', formatter: waybillCodesFormatter },
|
|
{ prop: 'is_urgency', label: '紧急', width: '80' },
|
|
{ prop: 'dispatch_lane', label: '道口', width: '80' },
|
|
{ prop: 'items_count', label: '商品种类', width: '100' },
|
|
{ prop: 'items_total', label: '商品总数', width: '100' },
|
|
{ prop: 'total_amount', label: '订单金额', width: '110' },
|
|
{ prop: 'delivery_time', label: '配送时间', width: '165', formatter: orderTimeFormatter },
|
|
{ prop: 'create_at', label: '创建时间', width: '165', formatter: orderTimeFormatter },
|
|
]
|
|
|
|
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: 'delivery_order_code', type: 'text' },
|
|
{ label: '店铺名称', value: 'shop_nick', type: 'text' },
|
|
{ label: '平台编码', value: 'sys_platform_code', type: 'text' },
|
|
{ label: '收货人', value: 'name', type: 'text' },
|
|
{ label: '手机号', value: 'mobile', type: 'text' },
|
|
{ label: '订单状态', value: 'status', type: 'select', options: [ { label: '待审核', value: 'pedding' }, { label: '已创建', value: 'created' }, { label: '错误', value: 'error' } ] },
|
|
{ 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: 'none' } ] },
|
|
{ label: '创建时间', value: 'create_at', type: 'daterange' },
|
|
]
|
|
|
|
export const reviewColums = [
|
|
{ prop: 'delivery_order_code', label: '发货单号', width: '170' },
|
|
{ prop: 'shop_nick', label: '店铺名称', width: '140' },
|
|
{ prop: 'sys_platform_code', label: '平台编码', width: '100' },
|
|
{ prop: 'name', label: '收货人', width: '110' },
|
|
{ prop: 'mobile', label: '手机号', width: '120' },
|
|
{ prop: 'status', label: '订单状态', width: '100' },
|
|
{ prop: 'sync_status', label: '同步状态', width: '100' },
|
|
{ prop: 'is_urgency', label: '紧急', width: '80' },
|
|
{ prop: 'logistics_name', label: '物流公司', width: '120' },
|
|
{ prop: 'items_total', label: '商品总数', width: '100' },
|
|
{ prop: 'total_amount', label: '订单金额', width: '110' },
|
|
{ prop: 'pay_time', label: '支付时间', width: '165', formatter: orderTimeFormatter },
|
|
{ prop: 'operator_name', label: '审核人', width: '100' },
|
|
{ prop: 'operate_time', label: '审核时间', width: '165', formatter: orderTimeFormatter },
|
|
{ prop: 'create_at', label: '创建时间', width: '165', formatter: orderTimeFormatter },
|
|
]
|
|
|
|
export const reviewOrderDetail = [
|
|
// 基础信息
|
|
{ prop: 'delivery_order_code', label: '发货单号' },
|
|
{ prop: 'pre_delivery_order_code', label: '前置单号' },
|
|
{ prop: 'order_type', label: '订单类型' },
|
|
{ prop: 'order_flag', label: '订单标记' },
|
|
{ prop: 'sys_platform_name', label: '来源平台' },
|
|
{ prop: 'sys_platform_code', label: '平台编码' },
|
|
{ prop: 'shop_nick', label: '店铺名称' },
|
|
{ prop: 'buyer_nick', label: '买家昵称' },
|
|
{ prop: 'seller_nick', label: '卖家昵称' },
|
|
{ prop: 'status', label: '订单状态' },
|
|
{ prop: 'is_urgency', label: '是否紧急' },
|
|
{ prop: 'invoice_flag', label: '发票标记' },
|
|
{ prop: 'sync_status', label: '同步状态' },
|
|
{ prop: 'inspection_status', label: '审核状态' },
|
|
{ prop: 'source_order_codes', label: '来源单号' },
|
|
{ prop: 'pay_no', 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: 'items', label: '商品清单', span: 3 },
|
|
{ prop: 'items_count', label: '商品种类' },
|
|
{ prop: 'items_total', label: '商品总数' },
|
|
{ prop: 'items_weight', label: '总重量' },
|
|
|
|
// 收货与物流
|
|
{ prop: 'name', label: '收货人' },
|
|
{ prop: 'mobile', label: '手机号码' },
|
|
{ prop: 'tel', label: '固定电话' },
|
|
{ prop: 'province', label: '省份' },
|
|
{ prop: 'city', label: '城市' },
|
|
{ prop: 'area', label: '区县' },
|
|
{ prop: 'town', label: '镇街' },
|
|
{ prop: 'detail_address', label: '详细地址', span: 2 },
|
|
{ prop: 'zip_code', label: '邮编' },
|
|
{ prop: 'logistics_name', label: '物流公司' },
|
|
{ prop: 'waybill_codes', label: '物流单号' },
|
|
{ prop: 'delivery_type', label: '发货类型' },
|
|
{ prop: 'weight_type', label: '重量类型' },
|
|
|
|
// 时间信息
|
|
{ prop: 'place_order_time', label: '下单时间' },
|
|
{ prop: 'pay_time', label: '支付时间' },
|
|
{ prop: 'delivery_time', label: '配送时间' },
|
|
{ prop: 'create_at', label: '创建时间' },
|
|
{ prop: 'operator_name', label: '审核人' },
|
|
{ prop: 'operate_time', 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: 'waybill_codes', 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: 'delivery_order_code', label: '发货单号', width: '170' },
|
|
{ prop: 'shop_nick', label: '店铺名称', width: '140' },
|
|
{ prop: 'sys_platform_name', label: '平台来源', width: '120' },
|
|
{ prop: 'is_urgency', label: '紧急', width: '80' },
|
|
{ prop: 'name', label: '收货人', width: '100' },
|
|
{ prop: 'mobile', label: '手机号', width: '120' },
|
|
{ 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: 'logistics_name', label: '物流公司', width: '120' },
|
|
{ prop: 'waybill_codes', label: '物流单号', width: '160', formatter: waybillCodesFormatter },
|
|
{ prop: 'total_amount', label: '订单金额', width: '110' },
|
|
{ prop: 'items_count', label: '商品种类', width: '100' },
|
|
{ prop: 'items_total', label: '商品总数', width: '100' },
|
|
{ prop: 'operator_name', label: '操作人', width: '100' },
|
|
{ prop: 'operate_time', label: '操作时间', width: '165', formatter: orderTimeFormatter },
|
|
{ prop: 'pay_time', label: '支付时间', width: '160', formatter: orderTimeFormatter },
|
|
{ prop: 'create_at', label: '创建时间', width: '165', formatter: orderTimeFormatter },
|
|
]
|
|
|
|
export const pendingOrderDetail = [
|
|
// 基础信息
|
|
{ prop: 'delivery_order_code', label: '发货单号' },
|
|
{ prop: 'pre_delivery_order_code', label: '前置单号' },
|
|
{ prop: 'order_type', label: '订单类型' },
|
|
{ prop: 'order_flag', label: '订单标记' },
|
|
{ prop: 'sys_platform_name', label: '来源平台' },
|
|
{ prop: 'sys_platform_code', label: '平台编码' },
|
|
{ prop: 'shop_nick', label: '店铺名称' },
|
|
{ prop: 'buyer_nick', label: '买家昵称' },
|
|
{ prop: 'seller_nick', label: '卖家昵称' },
|
|
{ prop: 'status', label: '订单状态' },
|
|
{ prop: 'sync_status', label: '同步状态' },
|
|
{ prop: 'is_urgency', label: '是否紧急' },
|
|
{ prop: 'invoice_flag', label: '发票标记' },
|
|
{ prop: 'source_order_codes', label: '来源单号' },
|
|
{ prop: 'pay_no', 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: 'items', label: '商品清单', span: 3 },
|
|
{ prop: 'items_count', label: '商品种类' },
|
|
{ prop: 'items_total', label: '商品总数' },
|
|
{ prop: 'items_weight', label: '总重量' },
|
|
|
|
// 收货与物流
|
|
{ prop: 'name', label: '收货人' },
|
|
{ prop: 'mobile', label: '手机号码' },
|
|
{ prop: 'tel', label: '固定电话' },
|
|
{ prop: 'province', label: '省份' },
|
|
{ prop: 'city', label: '城市' },
|
|
{ prop: 'area', label: '区县' },
|
|
{ prop: 'town', label: '镇街' },
|
|
{ prop: 'detail_address', label: '详细地址', span: 2 },
|
|
{ prop: 'zip_code', label: '邮编' },
|
|
{ prop: 'logistics_name', label: '物流公司' },
|
|
{ prop: 'waybill_codes', label: '物流单号' },
|
|
{ prop: 'delivery_type', label: '发货服务类型' },
|
|
{ prop: 'weight_type', label: '重量类型' },
|
|
|
|
// 时间信息
|
|
{ prop: 'place_order_time', label: '下单时间' },
|
|
{ prop: 'pay_time', label: '支付时间' },
|
|
{ prop: 'delivery_time', label: '配送时间' },
|
|
{ prop: 'create_at', label: '创建时间' },
|
|
{ prop: 'operator_name', label: '操作人' },
|
|
{ prop: 'operate_time', 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' },
|
|
]
|
|
}
|
|
]
|
|
|
|
export const outboundAvailableFields = pendingAvailableFields
|
|
export const outboundColumns = pendingCloums
|
|
|
|
// orderWorkbench相关配置
|
|
export const workbenchStatusOptions = [
|
|
{ label: '待处理', value: 'pedding' },
|
|
{ label: '已完成', value: 'fin' },
|
|
{ label: '异常', value: 'error' }
|
|
]
|
|
|
|
export const workbenchAvailableFields = [
|
|
{ label: '订单号', value: 'delivery_order_code', type: 'text' },
|
|
{ label: '买家昵称', value: 'buyer_nick', type: 'text' },
|
|
{ label: '订单状态', value: 'status', type: 'select', options: workbenchStatusOptions },
|
|
{ label: '是否紧急', value: 'is_urgency', type: 'select', options: [ { label: '是', value: 'Y' }, { label: '否', value: 'N' } ] }
|
|
]
|
|
|
|
export const workbenchColumns = [
|
|
{ prop: 'delivery_order_code', label: '订单号', minWidth: 160 },
|
|
{ prop: 'source_platform_name', label: '平台', minWidth: 120 },
|
|
{ prop: 'shop_nick', label: '店铺名称', minWidth: 140 },
|
|
{ prop: 'buyer_nick', label: '买家昵称', minWidth: 140 },
|
|
{ prop: 'name', label: '收货人', minWidth: 100 },
|
|
{ prop: 'mobile', label: '手机号', minWidth: 120 },
|
|
{ prop: 'is_urgency', label: '是否紧急', minWidth: 100 },
|
|
{ prop: 'status', label: '订单状态', minWidth: 120 },
|
|
{ prop: 'sync_status', label: '同步状态', minWidth: 110 },
|
|
{ prop: 'inspection_status', label: '审核状态', minWidth: 110 },
|
|
{ prop: 'outbound_status', label: '出库状态', minWidth: 120 },
|
|
{ prop: 'logistics_name', label: '物流公司', minWidth: 120 },
|
|
{ prop: 'waybill_codes', label: '物流单号', minWidth: 140, formatter: waybillCodesFormatter },
|
|
{ prop: 'items_total', label: '商品总数', minWidth: 100 },
|
|
{ prop: 'total_amount', label: '订单金额', minWidth: 110 },
|
|
{ prop: 'create_at', label: '创建时间', minWidth: 170, formatter: orderTimeFormatter },
|
|
{ prop: 'updated_at', label: '更新时间', minWidth: 170, formatter: orderTimeFormatter }
|
|
]
|
|
|
|
export const workbenchBadgeItems = [
|
|
{ key: 'reviewOrder', label: '待审核' },
|
|
{ key: 'pendingOrder', label: '待处理' },
|
|
{ key: 'outboundOrder', label: '待出库' },
|
|
{ key: 'expectionOrder', label: '异常' },
|
|
{ key: 'entrustOrder', label: '委托外仓' },
|
|
{ key: 'deliveryOrder', label: '配送' },
|
|
{ key: 'deliveryExpectionOrder', label: '配送异常' },
|
|
{ key: 'archiveOrder', label: '归档' }
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 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: 'delivery_order_code', label: '发货单号', width: '170' },
|
|
{ prop: 'logistics_name', label: '快递', width: '120' },
|
|
{ prop: 'pre_delivery_order_code', label: '前置单号', width: '140' },
|
|
{ prop: 'order_flag', label: '订单标记', minWidth: '260' },
|
|
{ prop: 'create_at', label: '创建时间', width: '165', formatter: orderTimeFormatter },
|
|
{ prop: 'updated_at', label: '更新时间', width: '165', formatter: orderTimeFormatter },
|
|
{ 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: 'order_flag', label: '订单标记', span: 3 },
|
|
{ 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: '归档/更新时间' },
|
|
]
|