|
|
@ -40,24 +40,22 @@ use yii\helpers\ArrayHelper; |
|
|
|
*/ |
|
|
|
class Order extends \yii\db\ActiveRecord |
|
|
|
{ |
|
|
|
/*支付类型*/ |
|
|
|
const PAY_TYPE_WX = 1;//微信支付
|
|
|
|
const PAY_TYPE_BALANCES = 2;//余额支付
|
|
|
|
const PAY_TYPE_POINT_EXCHANGE = 3;//积分兑换
|
|
|
|
/*支付id*/ |
|
|
|
const PAY_ID_WX = 1;//微信公众号支付
|
|
|
|
const PAY_ID_MINI = 2;//小程序支付
|
|
|
|
const PAY_ID_POINTS_SHOP = 3;//积分商城兑换
|
|
|
|
/*配送方式*/ |
|
|
|
const SHIPPING_TYPE_NO_SHIPPING = 0;//无需配送
|
|
|
|
const SHIPPING_TYPE_PICKED_UP_BY_CUSTOMER = 1;//自提
|
|
|
|
const TYPE_SHOPPING = 1;//普通购物订单
|
|
|
|
|
|
|
|
const SHIPPING_TYPE_VIRTUAL_GOODS = 0;//虚拟货物
|
|
|
|
const SHIPPING_TYPE_PICKED_UP = 1;//自提
|
|
|
|
const SHIPPING_TYPE_EXPRESS = 2;//快递物流
|
|
|
|
/*发货状态*/ |
|
|
|
const SHIPPING_STATUS_UNSHIPPED = 0;/*未发货*/ |
|
|
|
const SHIPPING_STATUS_SHIPMENT = 1;/*已发货*/ |
|
|
|
const SHIPPING_STATUS_TAKE = 2;/*已收货*/ |
|
|
|
const SHIPPING_STATUS_RETURN = 3;/*退货*/ |
|
|
|
const SHIPPING_STATUS_PORTION = 4;/*部分发货*/ |
|
|
|
|
|
|
|
const STATUS_UNCONFIRMED = 0; |
|
|
|
const STATUS_NONPAYMENT = 1; |
|
|
|
const STATUS_CANCEL = 2; |
|
|
|
const STATUS_PAYMENT_TO_BE_CONFIRMED = 3; |
|
|
|
const STATUS_TO_BE_SHIPPING = 6; |
|
|
|
const STATUS_APPLY_REFUND = 4; |
|
|
|
const STATUS_REFUND = 5; |
|
|
|
const STATUS_SHIPMENT_ALL = 7; |
|
|
|
const STATUS_SHIPMENT_PORTION = 8; |
|
|
|
const STATUS_FINISH = 9; |
|
|
|
|
|
|
|
/** |
|
|
|
* {@inheritdoc} |
|
|
@ -169,8 +167,6 @@ class Order extends \yii\db\ActiveRecord |
|
|
|
*/ |
|
|
|
public static function dropDown($column, $value = null) |
|
|
|
{ |
|
|
|
// $types = ExpressType::find()->asArray()->all();
|
|
|
|
// $data = ArrayHelper::map($types, 'id', 'shipping_name');
|
|
|
|
$data[0] = '无需配送'; |
|
|
|
$dropDownList = [ |
|
|
|
'pay_type' => [ |
|
|
@ -179,7 +175,11 @@ class Order extends \yii\db\ActiveRecord |
|
|
|
'2' => '余额支付', |
|
|
|
'3' => '积分兑换', |
|
|
|
], |
|
|
|
'shipping_type' => $data, |
|
|
|
'shipping_type' => [ |
|
|
|
'0' => '虚拟货物', |
|
|
|
'1' => '自提', |
|
|
|
'2' => '快递物流', |
|
|
|
], |
|
|
|
]; |
|
|
|
//根据具体值显示对应的值
|
|
|
|
if ($value !== null) |
|
|
|