'#3E3E3E', 'msg'=>'追回发货单', 'flag'=>'追回入库'); $ret .= $this->getViewPanel($style['color'], $style['msg'], $style['flag']); } if($flag_type & ome_reship_const::__REBACK_FAIL){ $style = array('color'=>'#ff0000', 'msg'=>'追回发货单失败', 'flag'=>'追回入库失败'); $ret .= $this->getViewPanel($style['color'], $style['msg'], $style['flag']); } if($flag_type & ome_reship_const::__ISCOD_ORDER){ $style = array('color'=>'green', 'msg'=>'货到付款订单', 'flag'=>'货到付款'); $ret .= $this->getViewPanel($style['color'], $style['msg'], $style['flag']); } if($flag_type & ome_reship_const::__NEW_EXCHANGE_REPAIR){ $style = array('color'=>'#F18A50', 'msg'=>'新换货单', 'flag'=>'新换货单'); $ret .= $this->getViewPanel($style['color'], $style['msg'], $style['flag']); } if($flag_type & ome_reship_const::__ZERO_INTERCEPT){ $style = array('color'=>'#F183A0', 'msg'=>'零秒退快递拦截', 'flag'=>'零秒退拦截'); $ret .= $this->getViewPanel($style['color'], $style['msg'], $style['flag']); } if($flag_type & ome_reship_const::__LANJIE_RUKU){ $style = array('color'=>'red', 'msg'=>'拦截入库', 'flag'=>'拦截入库'); $ret .= $this->getViewPanel($style['color'], $style['msg'], $style['flag']); } if($flag_type & ome_reship_const::__RESHIP_DIFF){ $style = array('color'=>'#BDB76B', 'msg'=>'退货差异入库', 'flag'=>'差异入库'); $ret .= $this->getViewPanel($style['color'], $style['msg'], $style['flag']); } if($flag_type & ome_reship_const::__EDIT_RETURN_CODE){ $style = array('color'=>'LimeGreen', 'msg'=>'换转退', 'flag'=>'换转退'); $ret .= $this->getViewPanel($style['color'], $style['msg'], $style['flag']); } if($flag_type & ome_reship_const::__EDIT_CHANGE_CODE){ $style = array('color'=>'#D2B48C', 'msg'=>'退转换', 'flag'=>'退转换'); $ret .= $this->getViewPanel($style['color'], $style['msg'], $style['flag']); } if($flag_type & ome_reship_const::__YUANDANTUI){ $style = array('color'=>'#D2B48C', 'msg'=>'原单退', 'flag'=>'原单退'); $ret .= $this->getViewPanel($style['color'], $style['msg'], $style['flag']); } $ret = '
'.$ret.'
'; } return $ret; } /** * 获取ViewPanel * @param mixed $color color * @param mixed $msg msg * @param mixed $title title * @return mixed 返回结果 */ public function getViewPanel($color, $msg, $title) { $html = sprintf("%s", $msg, $color, $color, $title); return $html; } /** * 获取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[] = 'flag_type & ' . $in . ' = ' . $in; } if($filter['out']) { $out = 0; foreach((array)$filter['out'] as $val) { $out = $out | $val; } $where[] = '!(flag_type & ' . $out . ')'; } if(empty($where)) { return array(); } $sql = 'select flag_type from sdb_ome_reship where ' . implode(' and ', $where) . ' group by flag_type'; $flagData = kernel::database()->select($sql); $flagStatus = array('-1'); foreach($flagData as $val) { $flagStatus[] = $val['flag_type']; } return $flagStatus; } }