chore: 添加多个图片和资源文件
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
This commit is contained in:
@@ -0,0 +1,181 @@
|
||||
<?php
|
||||
//款色深度二维报表
|
||||
//可配置参数:keyword_zd1|category|字段1,zd2|ks_size|字段2(不变),icon|menu_icon_bb_xw_ms|菜单图标,select_zd1||搜索1,select_zd2||搜索2,select_zd3||搜索3
|
||||
//2020-07-10 by hzz
|
||||
//-----参数配置start
|
||||
//菜单图标
|
||||
$icon=get_plugin_set("icon","menu_icon_bb_xw_ms");//支持以下目录的图标ipad/images/menu_icon_*.png
|
||||
//字段
|
||||
$zd1=get_plugin_set("keyword_zd1","category");
|
||||
$zd2=get_plugin_set("zd2","ks_size");
|
||||
//
|
||||
$select_client_type="y";//dp:允许筛选店铺
|
||||
$use_layui_datatable="n";//使用标准layui datatable格式数据
|
||||
|
||||
$s_key=$s_key?$s_key:$_key;
|
||||
//搜索
|
||||
$search_arr=array();
|
||||
$searh_select1=get_plugin_set("select_zd1","");
|
||||
$searh_select2=get_plugin_set("select_zd2","");
|
||||
$searh_select3=get_plugin_set("select_zd3","");
|
||||
array_push($search_arr,$searh_select1,$searh_select2,$searh_select3);
|
||||
|
||||
//
|
||||
$str_select="";
|
||||
for($i=0;$i<count($search_arr);$i++){
|
||||
$arr_val=$search_arr[$i];
|
||||
if($arr_val){
|
||||
if($arr_val=="s_spk"){
|
||||
$str_select.="{\"name\":\"s_spk\",\"title\":\"是否饰品款\",\"value\":\"".$s_spk."\",\"op\":[{\"no\":\"y\",\"title\":\"是\"},{\"no\":\"n\",\"title\":\"否\"}]},";
|
||||
}else if($arr_val=="s_ka"){
|
||||
$str_select.="{\"name\":\"s_ka\",\"title\":\"是否删除款\",\"value\":\"".$s_ka."\",\"op\":[{\"no\":\"y\",\"title\":\"是\"},{\"no\":\"n\",\"title\":\"否\"}]},";
|
||||
}else{
|
||||
$str_op="";
|
||||
$sql_select="select no,title from web_keyword where cate='".$arr_val."' order by ord";
|
||||
$res_select=$db->query($sql_select);
|
||||
while($msg_select=$db->fetch_array($res_select)){
|
||||
$str_op.="{\"no\":\"".$msg_select["no"]."\",\"title\":\"".$msg_select["title"]."\"},";
|
||||
}
|
||||
$str_select.="{\"name\":\"".$arr_val."\",\"title\":\"".get_cate_title_no("arr_select",$arr_val)."\",\"value\":\"".$$arr_val."\",\"op\":[".substr($str_op,0,-1)."]},";
|
||||
}
|
||||
}
|
||||
}
|
||||
$json_data.="\"select_report\":[".substr($str_select,0,-1)."],";
|
||||
//end
|
||||
|
||||
//-------------------------条件
|
||||
//-------con为web_order
|
||||
//-------con1为web_kh
|
||||
$con=$con1="";
|
||||
if($searh_select1!="s_ka" && $searh_select2!="s_ka" && $searh_select3!="s_ka"){
|
||||
//没有删除款搜索时
|
||||
$con.=" and ka<>'y' ";
|
||||
$con1.=" and ka<>'y' ";
|
||||
}else{
|
||||
if($s_ka){
|
||||
$con.=" and ka='".$s_ka."' ";
|
||||
$con1.=" and ka='".$s_ka."' ";
|
||||
}
|
||||
}
|
||||
if($searh_select1!="s_spk" && $searh_select2!="s_spk" && $searh_select3!="s_spk"){
|
||||
//没有饰品款搜索时
|
||||
$con.=" and is_sp<>'y' ";
|
||||
$con1.=" and is_sp<>'y' ";
|
||||
}else{
|
||||
if($s_spk){
|
||||
$con.=" and is_sp='".$s_spk."' ";
|
||||
$con1.=" and is_sp='".$s_spk."' ";
|
||||
}
|
||||
}
|
||||
if($s_key){
|
||||
if($s_key=="all"){
|
||||
$con.="";
|
||||
}else{
|
||||
$con.=" and _key='".$s_key."'";
|
||||
}
|
||||
}
|
||||
//其他
|
||||
for($i=0;$i<count($search_arr);$i++){
|
||||
$arr_val=$search_arr[$i];
|
||||
if($arr_val && $arr_val!="s_spk" && $arr_val!="s_ka"){
|
||||
if($$arr_val){
|
||||
$con.=" and ".$arr_val."='".$$arr_val."' ";
|
||||
$con1.=" and ".$arr_val."='".$$arr_val."' ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//店铺查询条件
|
||||
if($msg_client["face"]=="4"){
|
||||
$s_username=$msg_client["username"];
|
||||
$con.=" and uid='".$msg_client["id"]."'";
|
||||
}else{
|
||||
if($s_username){
|
||||
$m2=get_db_msg("select id,face,path from ".$table_pre."client where username='".$s_username."'");
|
||||
if($m2["face"]=="4"){
|
||||
$con.=" and uid='".$m2["id"]."'";
|
||||
}else{
|
||||
$con.=" and (upath='".$m2["path"]."-".$m2["id"]."' or upath like '".$m2["path"]."-".$m2["id"]."-%')";
|
||||
}
|
||||
}else if($msg_client["face"]=="2"){
|
||||
//区经角色所有客户
|
||||
$con.=get_qj_ucon_all($msg_client["charge_path_real"]);
|
||||
}else if($msg_client["face"]=="1"){
|
||||
//区经角色所有客户
|
||||
}else{
|
||||
//代理角色所有客户
|
||||
$con.=" and (upath='".$msg_client["path"]."-".$msg_client["id"]."' or upath like '".$msg_client["path"]."-".$msg_client["id"]."-%')";
|
||||
}
|
||||
}
|
||||
//---------------------------------------------
|
||||
if($zd1==""){
|
||||
//请求数据有误
|
||||
$content_data="<div align='center'>请先配置参数!</div>";
|
||||
$json_data.="\"sys_bb_type\":\"report_null\",";
|
||||
}else{
|
||||
//---------------------------------------一维报表
|
||||
$json_data.="\"sys_bb_type\":\"report_2w\",";
|
||||
//
|
||||
$arr_group_by_title=array();
|
||||
$r1=$db->query("select no,title from ".$table_pre."keyword where cate='arr_select'");
|
||||
while($m1=$db->fetch_array($r1)){
|
||||
$arr_group_by_title[$m1["no"]]=$m1["title"];
|
||||
}
|
||||
$arr_group_by_title["size"]="尺码";
|
||||
$arr_group_by_title["color"]="颜色";
|
||||
$arr_group_by_title["ks_size"]="款色深度";
|
||||
//
|
||||
$s_group_by1=$zd1;
|
||||
$s_group_by2=$zd2;
|
||||
|
||||
//取得已订总件数和金额
|
||||
$tmp=get_db_msg("select sum(num) 'num',sum(je) 'je' from ".$table_pre."order where id>0".$con);
|
||||
$total_yd_js=$tmp["num"];
|
||||
$total_yd_je=$tmp["je"];
|
||||
//--------------------------------表头start
|
||||
$content_data="";
|
||||
$content_data.="<table id='tabledetail' class='cell-border nowrap' width='100%' lay-filter='layui_table' cellspacing='0' cellpadding='0' border='0' class='layui-table'>";
|
||||
$content_data.="<thead><tr style='background-color:#f2f2f2' align=center><td>".get_main_value($arr_group_by_title,$s_group_by1)."</td><td>件数</td><td>款色数</td><td>占比</td></tr>";
|
||||
$content_data.="</thead>";
|
||||
$content_data.="<tbody>";
|
||||
//--------------------------------表头end
|
||||
$q1="select * from ".$table_pre."keyword where cate='".$s_group_by1."' order by ord";
|
||||
$r1=$db->query($q1);
|
||||
$count=$total_js=$total_kss=0;
|
||||
$l=0;
|
||||
while($m1=$db->fetch_array($r1)){
|
||||
$q="select sum(num)/count(distinct iid,color) 'num',count(distinct iid,color) 'kss' from ".$table_pre."order where ".$s_group_by1."='".$m1["no"]."'".$con." group by num order by num";
|
||||
$r=$db->query($q);
|
||||
//取得数据
|
||||
$xj_js=$xj_kss=0;
|
||||
$arr_data=array();
|
||||
$k=0;
|
||||
while($m=$db->fetch_array($r)){
|
||||
$arr_data[deel_num($m["num"])]=$m["kss"];
|
||||
$xj_js+=$m["num"]*$m["kss"];
|
||||
$xj_kss+=$m["kss"];
|
||||
$total_kss+=$m["kss"];
|
||||
$total_js+=$m["num"]*$m["kss"];
|
||||
$k++;
|
||||
}
|
||||
//
|
||||
foreach($arr_data as $num1 => $kss1){
|
||||
$content_data.="<tr align=center><td>".$m1["title"]."</td><td>".$num1."</td><td>".$kss1."</td><td>".deel_bfb($kss1,$xj_kss)."</td></tr>";
|
||||
$count++;
|
||||
}
|
||||
//小计
|
||||
if($k>0){
|
||||
$content_data.="<tr align=center><td>".$m1["title"]."小计</td><td>".$xj_js."</td><td>".$xj_kss."</td><td>100%</td></tr>";
|
||||
$count++;
|
||||
}
|
||||
}
|
||||
|
||||
$content_data.="</tbody>";
|
||||
$content_data.="<tfoot>";
|
||||
$content_data.="<tr style='background-color:#f2f2f2' align=center><td>合计</td><td>".$total_js."</td><td>".$total_kss."</td><td></td></tr>";
|
||||
$content_data.="</tfoot>";
|
||||
$content_data.="</table>";
|
||||
}
|
||||
$json_data.="\"table_html\":\"".$content_data."\",";
|
||||
?>
|
||||
Reference in New Issue
Block a user