array('identifier'=>'赠', 'text'=>'赠品订单,不可部分退货', 'color'=>'red', 'search'=>'true'), self::__CONFIRM_CODE => array('identifier'=>'退', 'text'=>'云交易商品不可售后', 'color'=>'orange', 'search'=>'true'), self::__EQUAL_CODE => array('identifier'=>'同', 'text'=>'主品与赠品相同,不支持退货', 'color'=>'#F38D23', 'search'=>'true'), self::__LOGISTICS_CODE => array('identifier'=>'物', 'text'=>'同步物流信息失败', 'color'=>'#BD794E', 'search'=>'true'), self::__CREATE_CODE => array('identifier'=>'创', 'text'=>'申请售后服务单失败', 'color'=>'#44607B', 'search'=>'true'), self::__RESULT_CODE => array('identifier'=>'果', 'text'=>'审核结果不一致', 'color'=>'#F38D23', 'search'=>'true'), self::__AGREE_CODE => array('identifier'=>'审', 'text'=>'平台同意售后单失败', 'color'=>'#FF6633', 'search'=>'true'), self::__EXCHANGE_DIFF_CODE => array('identifier'=>'换', 'text'=>'换货与退货商品不同', 'color'=>'yellow', 'search'=>'true'), self::__TRANSFORM_RETURN_CODE => array('identifier'=>'转', 'text'=>'转换售后申请单失败', 'color'=>'#FF00FF', 'search'=>'true'), self::__ERVICE_AUDIT_CODE => array('identifier'=>'核', 'text'=>'京东服务单审核不通过', 'color'=>'#6655ff', 'search'=>'true'), self::__ADDRESS_FAIL_CODE => array('identifier'=>'寄', 'text'=>'京东寄件地址解析失败', 'color'=>'red', 'search'=>'true'), ); /** * 获取Text * @param mixed $key key * @return mixed 返回结果 */ public function getText($key = null) { if ($key) { return (array) $this->status[$key]; } return $this->status; } /** * 获取Identifier * @param mixed $s s * @return mixed 返回结果 */ public function getIdentifier($s) { $str = ''; foreach ($this->status as $k => $v) { if ($s & $k) { $str .= sprintf("%s", $v['text'], $v['color'], $v['identifier']); } } return $str; } /** * 获取BoolType * @param mixed $filter filter * @return mixed 返回结果 */ public function getBoolType($filter) { $where = array(); if ($filter['in']) { $in = 0; foreach ((array) $filter['in'] as $val) { $in = $in | $val; } $where[] = 'abnormal_status & ' . $in . ' = ' . $in; } if ($filter['out']) { $out = 0; foreach ((array) $filter['out'] as $val) { $out = $out | $val; } $where[] = '!(abnormal_status & ' . $out . ')'; } if (empty($where)) { return array(); } $sql = 'select distinct abnormal_status from sdb_ome_reship where ' . implode(' and ', $where); $rows = kernel::database()->select($sql); return $rows ? array_column($rows, 'abnormal_status') : ['-1']; } /** * 获取Options * @return mixed 返回结果 */ public function getOptions() { $options = array(); foreach ($this->status as $k => $v) { if ($v['search'] == 'true') { $options[$k] = $v['text']; } } return $options; } }