'全部', self::orderStatusWaitSellerSendGoods => '待发货', self::orderStatusWaitBuyerConfirmGoods => '已发货', self::orderStatusCancel => '已关闭', self::orderStatusFinish => '已完成', ]; } public static function getDistributeOrderAfterSaleStatusMap() { return [ '' => '全部', 2 => '有售后', 1 => '无售后', ]; } public static function getPayTypeMap() { return [ self::payTypeHdhk => '货到付款', self::payTypeWechat => '微信', self::payTypeAlipay => '支付宝', self::payTypeApplets => '小程序', self::payTypeBankCard => '银行卡', self::payTypeBalance => '余额', self::payTypeNoNeedPayment => '无需支付', self::payTypeCreditPayment => '放心花(信用支付)', self::payTypeNewCardPayment => '新卡支付', ]; } public static function getPayTypeText($payType) { return self::getPayTypeMap()[$payType]; } public static function getOrderStatusMap() { return [ self::orderStatusWaitPay => '待付款', self::orderStatusWaitSellerSendGoods => '待发货', self::orderStatusWaitBuyerConfirmGoods => '已发货', self::orderStatusCancel => '已取消', self::orderStatusFinish => '已完成', ]; } public static function checkCacheReceiveMobileDecryptSource($decryptSource) { $noCacheDecryptSourceArr = [ self::decryptSourceCustomPrint, self::decryptSourceAddCustomOrder, self::decryptSourcePrint, self::decryptSourceOrderAddressHistory, self::decryptSourceAddressAudit, self::decryptSourceLogisticsReachable, ]; return !in_array($decryptSource, $noCacheDecryptSourceArr); } public static function getPriorityOrderStatus() { return [ OrderConst::orderStatusPartDelivery, OrderConst::orderStatusWaitSellerSendGoods, OrderConst::orderStatusWaitBuyerConfirmGoods, OrderConst::orderStatusFinish, OrderConst::orderStatusCancel, OrderConst::orderStatusRisk, ]; } public static function getOrderStatusName($orderStatus) { return self::getAllOrderStatusMap()[$orderStatus]; } public static function getPurchaseOrderTabCanceledAllOrderStatus() { return [ self::orderStatusCancel, self::returnGoodsSuccessAndSellerAgree, self::refundSuccessAndWaitSendGoods, self::refundSuccessAndWaitBuyerConfirmGoods, self::returnGoodsSuccessAndSellerAgreeAndCashOnDelivery, self::refundSuccessAndAfterSales, self::refundSuccess, ]; } public static function getAllOrderStatusMap() { return [ self::orderStatusWaitPay => '待支付', self::orderStatusWaitSellerSendGoods => '待发货', self::orderStatusWaitBuyerConfirmGoods => '已发货', self::orderStatusCancel => '已取消', self::orderStatusFinish => '已完成', self::returningAndUserApply => '退货中-用户申请', self::returningAndSellerAgree => '退货中-商家同意退货', self::returningAndCustomerServiceArbitration => '退货中-客服仲裁', self::closeAndReturnGoodsFail => '已关闭-退货失败', self::returningAndCustomerServiceAgree => '退货中-客服同意', self::returningAndUserFilledInLogistics => '退货中-用户已填物流', self::returnGoodsSuccessAndSellerAgree => '退货成功-商户同意', self::returningAndAgainCustomerServiceArbitration => '退货中-再次客服仲裁', self::returningAndCustomerServiceAgreesToRefund => '退货中-客服同意退款', self::returnGoodsAndUserCancel => '退货-用户取消', self::refundingAndUserApply => '退款中-用户申请', self::refundingAndSellerAgreeAndWaitSendGoods => '退款中-商家同意', self::refundSuccessAndWaitSendGoods => '退款成功-订单退款', self::refundSuccessAndWaitBuyerConfirmGoods => '退款成功-订单退款', self::returnGoodsSuccessAndSellerAgreeAndCashOnDelivery => '退货成功-商户已退款', self::refundingAndUserCancel => '退款中-用户取消', self::refundingAndSellerRefused => '退款中-商家拒绝', self::returningAndWaitBuyerProcessing => '退货中-等待买家处理', self::returnGoodsFail => '退货失败', self::returningAndWaitBuyerProcessingAndUserFilledInLogistics => '退货中-等待买家处理', self::refundingAndRefundApply => '退款中-退款申请', self::refundApplyCancel => '退款申请取消', self::refundingAndSellerAgreeAndWaitBuyerConfirmGoods => '退款中-商家同意', self::refundingAndSellerRefusedAndWaitBuyerConfirmGoods => '退款中-商家拒绝', self::refundingAndCustomerServiceArbitration => '退款中-客服仲裁', self::refundingAndCustomerServiceAgree => '退款中-客服同意', self::refundingAndSupportSeller => '退款中-支持商家', self::closeAndRefundFail => '已关闭-退款失败', self::refundSuccessAndAfterSales => '退款成功-售后退款', self::refundSuccess => '退款成功-订单退款', self::orderStatusRisk => '订单支付成功,风控处理中或待成团', self::orderStatusPartDelivery => '部分发货', ]; } public static function getOrderStatusText($orderStatus) { $map = self::getAllOrderStatusMap(); return $map[$orderStatus] ?: null; } public static function checkStatusEqual($status1, $status2) { if ($status1 == $status2) { return true; } if (in_array($status1, [self::orderStatusWaitSellerSendGoods]) && in_array($status2, [self::orderStatusWaitSellerSendGoods])) { return true; } if (in_array($status1, [self::orderStatusWaitBuyerConfirmGoods]) && in_array($status2, [self::orderStatusWaitBuyerConfirmGoods])) { return true; } if (in_array($status1, [self::orderStatusFinish]) && in_array($status2, [self::orderStatusFinish])) { return true; } return false; } public static function getCancelOrderReasons() { return [ '用户重复下单' => '用户重复下单', '用户不想买了' => '用户不想买了', '用户买错了/信息填错了,重新下单' => '用户买错了/信息填错了,重新下单', '联系不上用户' => '联系不上用户', '快递无法配送至用户地址' => '快递无法配送至用户地址', '其他' => '其他', ]; } public static function getOrderOutstorageHistoryTagMap() { return [ 'deliveryTimeType' => [ 'right_now' => '上游订单发货时立即自动发货', 'logistics_accept' => '上游订单揽收后发货', 'disabled' => '不自动发货', ], 'isPurchaseLogisticsUpdateToPlatform' => [ 0 => '不更新物流到下游', 1 => '更新物流到下游', ], 'nearExpShipTime' => [ 1 => '物流一直未揽收,系统自动发货,防止发货超时' ], ]; } }