123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- <?php
- namespace app\common\Enum;
- class OrderEnum
- {
- /**
- * 订单状态
- */
- const STATUS_CREATE = 101; //待付款
- const STATUS_PAY = 201; //已付款
- const STATUS_SHIP = 301; //已发货
- const STATUS_CONFIRM = 401; //已收货
- const STATUS_AUTO_CONFIRM = 402;
- const STATUS_CANCEL = 102;
- const STATUS_AUTO_CANCEL = 103;
- const STATUS_ADMIN_CANCEL = 104;
- const STATUS_REFUND = 202;
- const STATUS_REFUND_CONFIRM = 203;
- const STATUS_GROUPON_TIMEOUT = 204;
- /**
- * 订单枚举map
- */
- const STATUS_TEXT_MAP = [
- self::STATUS_CREATE => '未付款',
- self::STATUS_CANCEL => "已取消",
- self::STATUS_AUTO_CANCEL => "已取消(系统)",
- self::STATUS_ADMIN_CANCEL => "已取消(管理员)",
- self::STATUS_PAY => "已付款",
- self::STATUS_REFUND => "订单取消,退款中",
- self::STATUS_REFUND_CONFIRM => "已退款",
- self::STATUS_GROUPON_TIMEOUT => "已超时团购",
- self::STATUS_SHIP => "已发货",
- self::STATUS_CONFIRM => "已收货",
- self::STATUS_AUTO_CONFIRM => "已收货(系统)",
- ];
- const SHOW_TYPE_ALL = 0;//全部订单
- const SHOW_TYPE_WAIT_PAY = 1;//待付款订单
- const SHOW_TYPE_WAIT_DELIVERY = 2;//待发货订单
- const SHOW_TYPE_WAIT_RECEIPT = 3;//待收货订单
- const SHOW_TYPE_WAIT_COMMENT = 4;//待评价订单
- /**
- * 订单枚举map
- */
- const SHOW_TYPE_STATUS_MAP = [
- self::SHOW_TYPE_ALL => [],
- self::SHOW_TYPE_WAIT_PAY => [self::STATUS_CREATE],
- self::SHOW_TYPE_WAIT_DELIVERY => [self::STATUS_PAY],
- self::SHOW_TYPE_WAIT_RECEIPT => [self::STATUS_SHIP],
- self::SHOW_TYPE_WAIT_COMMENT => [self::STATUS_CONFIRM, self::STATUS_COMMENT],
- ];
- /**
- * 支付方式 枚举
- */
- const METHOD_WALLET = 'wallet';
- const METHOD_WECHAT = 'wechatv3';
- /**
- * 支付方式
- */
- const SHOW_PAY_TYPE_MAP = [
- self::METHOD_WALLET => '余额支付',
- self::METHOD_WECHAT => '微信支付',
- ];
- }
|