返回上一页 首页 {$category['title']}列表{$model['title']}列表
$where=array( 'model_id'=>$model['id'], 'name'=>$v['field'] ); $extra=M('attribute')->where($where)->getField('extra'); $extra=preg_split("/[,\n\r]+/s",$extra ,-1,PREG_SPLIT_NO_EMPTY); foreach($extra as $k1=>$v1){ $re=preg_split("/[:]+/s",$v1 ,-1,PREG_SPLIT_NO_EMPTY); $extra[$re[0]]=$re[1]; } $ids=I($v['field'].'s','0'); $list_reids_mod=M($extra['table'])->order("field(id,".$ids.")")->where(array('id',array('id'=>array('in',$ids))))->select();
//统计 $tongji=M('file_log')->where($where)->field("sum(amount) as amount,sum(price) as price,sum(money) as money,sum(feilv) as feilv")->find(); //成交 $where['status']=1; $chengjiao=M('file_log')->where($where)->field('count(id) as chengjiao_num,sum(price) as price,sum(feilv) as feilv')->find(); //退款 $where['status']=2; $tuikuan=M('file_log')->where($where)->field('count(id) as tuikuan_num,sum(price) as price')->find(); echo "本次查询订单".$totalRs."个,订单金额: ".$tongji['price']."元 成交金额: ".$chengjiao['price']."元 商户提成: ".($chengjiao['price']-$chengjiao['feilv'])."元 平台利润: ".$chengjiao['feilv']."元 退款: ".$tuikuan['tuikuan_num']."条 退款".($tuikuan['price']?$tuikuan['price']:0)."元 ";
foreach($v1['fun_param'] as $k2=>&$v2){ if($v2=='###'){ $v2=$v[$v1['field']]; }else if(preg_match("/[\[]+([^\[\]]+)[\]]+/i", $v2, $matches)){ $v2=I($matches[1]); } }
{$v.title} 操作
{:call_user_func_array($v1['fun'],$v1['fun_param'])} {$v[$v1['field']]} 查看 退款 ---- 解冻 冻结
{$page|default=''}