7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
62 lines
2.3 KiB
PHP
62 lines
2.3 KiB
PHP
<?php
|
|
header("Content-type: text/html; charset=utf-8");
|
|
$json_data="{";
|
|
if(THIS_IN!="edt_ipad")
|
|
exit("错误的访问!");
|
|
$msg_client=get_db_msg("select * from ".$table_pre."client where id='".$uid."'");
|
|
//
|
|
$zb_client_show=get_set("zb_client_show");
|
|
$zb_type=get_set("zb_type");
|
|
if($zb_client_show=="y")
|
|
$arr_zb_type=explode(",",$zb_type);
|
|
else
|
|
$arr_zb_type=array();
|
|
$face=$msg_client["face"];
|
|
$jd_password=get_set("jd_password");
|
|
$show_jd=get_set("show_jd");
|
|
$is_brand=is_brand();
|
|
$is_spk=get_set("is_spk");
|
|
$json_data.="\"face\":\"".$face."\",";
|
|
switch($_a){
|
|
default:
|
|
//---------------任务完成率
|
|
$json_data.="\"table_top\":[\"".get_cate_title_no("arr_select","brand")."\",\"实际订量\",\"实际结算金额\",\"订货指标\",\"完成率\",\"订单状态\"],";
|
|
//
|
|
$q="select * from ".$table_pre."client_brand where cid='".$uid."' order by brand";
|
|
$r=$db->query($q);
|
|
$total_num=$total_money=$total_zb=$count=$total_wc=0;
|
|
$tmp_sql="";
|
|
if($is_spk=="y")
|
|
$tmp_sql=" and is_sp<>'y'";
|
|
while($m=$db->fetch_array($r)){
|
|
$sty1=($count%2)?"td2":"td1";
|
|
$list=$count+1;
|
|
$m_yd=get_db_msg("select sum(jsje) 'jsje',sum(num) 'num' from ".$table_pre."order where uid='".$uid."' and ka<>'y' and brand='".$m["brand"]."' and _key='".$_key."'".$tmp_sql);
|
|
$total_num+=$m_yd["num"];
|
|
$total_money+=$m_yd["jsje"];
|
|
if(in_array("je",$arr_zb_type)){
|
|
$zb=$m["zb"]*10000;
|
|
$wc_yd=$m_yd["jsje"];
|
|
}else{
|
|
$zb=$m["zb_js"];
|
|
$wc_yd=$m_yd["num"];
|
|
}
|
|
$total_rw+=$zb;
|
|
$total_wc+=$wc_yd;
|
|
if($m["is_checked"]!="y" && $m["is_jd"]!="y" && $show_jd=="y"){
|
|
$button_jd="&jd2=y&s_brand=".$m["brand"]."";
|
|
}
|
|
else
|
|
$button_jd="";
|
|
$count++;
|
|
$json_data1.="[\"".get_cate_title_no("brand",$m["brand"])."|||".$button_jd."\",\"".$m_yd["num"]."\",\"".deel_num($m_yd["jsje"])."\",\"".$zb."\",\"".deel_bfb1($wc_yd,$zb,1)."\",\"".get_client_state($m["is_jd"],$m["is_checked"])."\"],";
|
|
}
|
|
//合计
|
|
$json_data.="\"table_mid\":[".substr($json_data1,0,-1)."],";
|
|
$json_data.="\"table_hj\":[\"合计\",\"".$total_num."\",\"".deel_num($total_money)."\",\"".$total_rw."\",\"".deel_bfb1($total_wc,$total_rw,1)."\",\" \"],";
|
|
//$json_data.="\"code\":1";
|
|
break;
|
|
}
|
|
$json_data=substr($json_data,0,-1)."}";
|
|
echo $json_data;
|
|
?>
|