oak-pay-business/es/entities/Order.js

166 lines
5.1 KiB
JavaScript

;
export const IActionDef = {
stm: {
startPaying: [['unpaid', 'partiallyPaid'], 'paying'],
payAll: [['unpaid', 'paying', 'partiallyPaid'], 'paid'],
payPartially: [['unpaid', 'paying'], 'partiallyPaid'],
payNone: ['paying', 'unpaid'],
timeout: ['unpaid', 'timeout'],
cancel: ['unpaid', 'cancelled'],
startRefunding: [['paid', 'partiallyPaid'], 'refunding'],
refundAll: [['paid', 'refunding', 'partiallyPaid', 'partiallyRefunded'], 'refunded'],
refundPartially: [['paid', 'refunding', 'partiallyPaid', 'partiallyRefunded'], 'partiallyRefunded'],
refundNone: ['refunding', 'paid'],
},
is: 'unpaid',
};
export const GActionDef = {
stm: {
send: ['unshipped', 'shipped'],
receive: ['shipped', 'received'],
store: [['unshipped', 'shipped'], 'staging'],
unship: [['shipped', 'staging'], 'unshipped'],
turnBack: ['shipped', 'unshipped'],
take: [['staging'], 'taken'],
},
is: 'unshipped',
};
export const entityDesc = {
indexes: [
//索引
{
name: 'index_iState',
attributes: [
{
name: 'iState',
},
],
},
{
name: 'index_settled_price',
attributes: [
{
name: 'system',
},
{
name: 'settled',
},
{
name: '$$deleteAt$$',
},
{
name: 'price',
direction: 'DESC',
}
]
},
],
locales: {
zh_CN: {
name: '订单',
attr: {
price: '订单金额',
paid: '已支付金额',
refunded: '已退款金额',
iState: '订单状态',
gState: '物流状态',
title: '订单标题',
desc: "订单描述",
timeoutAt: '过期时间',
allowPartialPay: '允许部分支付',
receivingMethod: '配送方式',
creator: '创建者',
entity: '关联对象',
entityId: '关联对象Id',
settled: '是否结算',
opers: '相关帐户操作',
system: '所属系统',
address: '收货地址',
payAt: '付款时间',
shipAt: '发货时间',
},
action: {
startPaying: '开始支付',
payAll: '全部支付',
payPartially: '部分支付',
payNone: '支付失败',
timeout: '过期',
cancel: '放弃',
startRefunding: '开始退款',
refundAll: '完全退款',
refundNone: '退款失败',
refundPartially: '部分退款',
send: '发货',
store: '暂存',
take: '取货',
receive: '收货',
settle: '结算',
turnBack: '退还',
unship: '入库'
},
v: {
iState: {
paid: '已付款',
partiallyPaid: '部分支付',
paying: '支付中',
unpaid: '待付款',
timeout: '已超时',
cancelled: '已取消',
refunded: '已退款',
partiallyRefunded: '已部分退款',
refunding: '退款中',
},
gState: {
unshipped: '未发货',
shipped: '已发货',
received: '已收货',
staging: '寄存中',
taken: '已取货',
},
receivingMethod: {
express: '配送',
pickup: '自提',
}
}
},
},
style: {
icon: {
startPaying: '',
payAll: '',
payPartially: '',
payNone: '',
timeout: '',
cancel: '',
startRefunding: '',
refundAll: '',
refundNone: '',
refundPartially: '',
},
color: {
iState: {
unpaid: '#52BE80',
partiallyPaid: '#5DADE2',
cancelled: '#D6DBDF',
paid: '#2E86C1',
paying: '#D2B4DE',
timeout: '#2C3E50',
refunded: '#BA4A00',
partiallyRefunded: '#EDBB99',
refunding: '#FBEEE6'
},
gState: {
unshipped: '#AF601A',
shipped: '#2874A6',
received: '#1E8449',
staging: '#283747',
taken: '#117A65',
},
receivingMethod: {
express: '#5DADE2',
pickup: '#2ECC71',
}
}
}
};