chore: 添加多个图片和资源文件

添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
This commit is contained in:
2025-06-15 13:04:37 +08:00
parent 1e61dc3970
commit 7e47ce238b
13220 changed files with 1377028 additions and 0 deletions
+267
View File
@@ -0,0 +1,267 @@
<?php
//-------------------------------------------------------店铺界面,订单明细
$s_order=$s_order?$s_order:"date";
$detail_size_ms=get_set("detail_size_ms");
//-------------------处理尺码表头
//取得合并尺码
$arr_size_merged=get_size_merged();
$num_size_total=count($arr_size_merged);
//取得尺码合计sql
$sql_sum_num="";
for($k=0;$k<$num_size_total;$k++){
$sql_sum_num.="sum(num_".$arr_size_merged[$k].") 'num_".$arr_size_merged[$k]."',";
}
//取得尺码表头内容
$num_size_group=0;
$size_tr=array();
$r1=$db->query("select * from ".$table_pre."keyword where cate='size' order by ord");
while($m1=$db->fetch_array($r1)){
$size_tr[$num_size_group]="";
for($i=1;$i<=$num_size_total;$i++){
$tmp=get_db_msg("select title from ".$table_pre."size where iid='".$m1["id"]."' and no='".$i."'");
$t=$tmp["title"]?$tmp["title"]:"&nbsp;";
$size_tr[$num_size_group].="\"w:30 a:c|".$t."\",";
}
$arr_size_merged[]=$m1["no"];
$num_size_group++;
}
//-------------------/处理尺码表头结束
$i1=0;
//买断款过滤
if($check_md["num"]>0){
$search_select_no[$i1]="s_md";
$search_select_op[$i1]=array(""=>"包含买断款","n"=>"非买断款");
$i1++;
}
if($s_md=="y"){
//仅买断款,暂时不做
}else{
//-------------------包含买断款、非买断款
//删除款过滤
$search_select_no[$i1]="s_ka";
$search_select_op[$i1]=array("n"=>"非删除款","y"=>"删除款");
$i1++;
//饰品款过滤
if($is_spk=="y"){
$search_select_no[$i1]="s_is_sp";
$search_select_op[$i1]=array(""=>"".d_translate("spk"),"n"=>"不含".d_translate("spk"),"y"=>"".d_translate("spk"));
$i1++;
}
//选项过滤
for($i=0;$i<count($arr_select_no);$i++){
$v="s_".$arr_select_no[$i];
$r1=$db->query("select no,title from ".$table_pre."keyword where cate='".$arr_select_no[$i]."' order by no");
$search_select_no[$i1]=$v;
$search_select_op[$i1][""]=$arr_select_title[$i]."过滤";
while($m1=$db->fetch_array($r1)){
$search_select_op[$i1][$m1["no"]]=$m1["title"];
}
$i1++;
}
//排序
$search_select_no[$i1]="s_order";
$search_select_op[$i1]=array("date"=>"时间排序","num"=>"数量排序");
//----------------------------------------------取得订单记录
//----表头
if($detail_size_ms=="2"){
//重新计算$num_size_total
$num_size_total1=0;
for($k=$num_size_total-1;$k>=0;$k--){
$tmp=get_db_msg("select sum(num_".$arr_size_merged[$k].") 'num' from ".$table_pre."order where _key='".$s_key."' ".$con);
if($tmp["num"]>0){
$num_size_total1=$k+1;
break;
}
}
$num_size_total=$num_size_total1;
//
$content_thead[0]="\"w:40|次序\",\"款号\",";
for($i=0;$i<count($sys_detail_show_select);$i++){
$content_thead[0].="|".get_cate_title_no("arr_select",$sys_detail_show_select[$i])."\",";
}
$content_thead[0].="\"颜色\",";
if($bx_sizegroup_id>0)
$content_thead[0].="\"w:30|杯型\",";
if($is_gg=="y")
$content_thead[0].="\"w:50|".d_translate("gg")."\",\"rs:".$num_size_group." w:50|".get_main_value($sys_gg_zd,"price")."\",";
else if($is_gg=="b")
$content_thead[0].="\"w:50|".d_translate("gg")."\",";
$content_thead[0].="\"cs:".$num_size_total."|尺码明细\",\"w:35|小计\",";
if($is_gg!="y")
$content_thead[0].="\"w:50|".d_translate("dpj")."\",";
$content_thead[0].="\"w:60|".d_translate("dpje")."\",";
if(trim($zk_type) || $check_md["num"]>0)
$content_thead[0].="\"w:60|结算金额\",";
}else{
$content_thead[0]="\"rs:".$num_size_group." w:40|次序\",\"rs:".$num_size_group."|款号\",";
for($i=0;$i<count($sys_detail_show_select);$i++){
$content_thead[0].="\"rs:".$num_size_group."|".get_cate_title_no("arr_select",$sys_detail_show_select[$i])."\",";
}
$content_thead[0].="\"rs:".$num_size_group."|颜色\",";
if($bx_sizegroup_id>0)
$content_thead[0].="\"rs:".$num_size_group." w:30|杯型\",";
if($is_gg=="y")
$content_thead[0].="\"rs:".$num_size_group." w:50|".d_translate("gg")."\",\"rs:".$num_size_group." w:50|".get_main_value($sys_gg_zd,"price")."\",";
else if($is_gg=="b")
$content_thead[0].="\"rs:".$num_size_group." w:50|".d_translate("gg")."\",";
$content_thead[0].=$size_tr[0]."\"rs:".$num_size_group." w:35|小计\",";
if($is_gg!="y")
$content_thead[0].="\"rs:".$num_size_group." w:50|".d_translate("dpj")."\",";
$content_thead[0].="\"rs:".$num_size_group." w:60|".d_translate("dpje")."\",";
if(trim($zk_type) || $check_md["num"]>0)
$content_thead[0].="\"rs:".$num_size_group." w:60|结算金额\",";
for($i=1;$i<$num_size_group;$i++){
$content_thead[$i].=$size_tr[$i];
}
}
//----表头完成
$con_order="";
if($s_order=="date"){
$con_order=" add_date desc";
}else if($s_order=="num"){
$con_order=" num desc,no";
}else if($s_order=="je"){
$con_order=" je desc,no";
}
$q="select iid,no,sum(num) 'num',sum(num) 'num1',price from ".$table_pre."order where _key='".$s_key."'".$con." group by no order by ".$con_order;
//echo $q."<br>";
$r=$db->query($q);
$total_num=$total_money=$total_money_zk=0;
$count=0;
$arr_kh=$arr_kh_color=array();
while($m=$db->fetch_array($r)){
$bg=($count%2)?"td1":"td2";
$m1=get_db_msg("select * from ".$table_pre."kh where id='".$m["iid"]."'");
//取得颜色,杯型
$q2="select * from ".$table_pre."order where _key='".$s_key."'".$con." and no='".$m["no"]."' order by color,bx";
//echo $q2."<br>";
$r2=$db->query($q2);
//
$j=0;
$je1=$jsje1=$num1=$price1=0;
while($m2=$db->fetch_array($r2)){
$td_size1="";
$num_color_hj=0;
for($k=0;$k<$num_size_total;$k++){
$ck_md=check_md($m1["no"],$m2["color"],$m2["bx"],$arr_size_merged[$k],$msg_login["dj"]);
if($s_md=="n"){
if($ck_md!="n"){
$tmp_num=0;
}else{
$tmp_num=$m2["num_".$arr_size_merged[$k]];
}
}else{
$tmp_num=$m2["num_".$arr_size_merged[$k]];
}
if($ck_md!="n"){
$sty1="bc#90";
}else{
$sty1="";
}
$num1+=$tmp_num;
$num_color_hj+=$tmp_num;
//计算尺码合计
$v11="hj_num_".$k;
$$v11+=$tmp_num;
//
$tmp1=($sty1=="bc#90")?"st:".$sty1:"c:".$bg;
if($tmp_num>0){
if($detail_size_ms=="2"){
$tmp3=get_db_msg("select title from ".$table_pre."size where iid='".$m2["size_group_id"]."' and no='".$arr_size_merged[$k]."'");
$td_size1.="\"".$tmp1." a:r|".$tmp3["title"]."<br>".deel_0($tmp_num)."\",";
}else{
$td_size1.="\"".$tmp1." a:r|".deel_0($tmp_num)."\",";
}
}else{
$td_size1.="\"".$tmp1."| \",";
}
}
$je1+=$m2["je"];
$jsje1+=$m2["jsje"];
$price1+=$m2["price"];
if($num_color_hj>0){
$arr_kh_color[$count][$j]="\"c:".$bg."|".$m2["color"]."-".get_cate_title_no("color",$m2["color"])."\",";
if($bx_sizegroup_id>0)
$arr_kh_color[$count][$j].="\"c:".$bg."|".$m2["bx"]."\",";
if($is_gg=="y"){
$tmp=get_db_msg("select price from ".$table_pre."kh_gg where iid='".$m2["iid"]."' and color='".$m2["color"]."' and gg='".$m2["bx"]."'");
$arr_kh_color[$count][$j].="\"c:".$bg." a:c|".get_gg_title($m2["bx"])."\",\"c:".$bg." a:r|".$tmp["price"]."\",";
}else if($is_gg=="b"){
$arr_kh_color[$count][$j].="\"c:".$bg." a:c|".get_gg_title($m2["bx"])."\",";
}
$arr_kh_color[$count][$j].=$td_size1;
$j++;
}
}
$total_num+=$num1;
$total_money+=$je1;
$total_money_zk+=$jsje1;
//
if($num1>0){
$arr_kh[$count]["bg"]=$bg;
$arr_kh[$count]["id"]=$m1["id"];
$arr_kh[$count]["no"]=$m1["no"];
for($i1=0;$i1<count($sys_detail_show_select);$i1++){
$arr_kh[$count][$sys_detail_show_select[$i1]]=get_cate_title_no($sys_detail_show_select[$i1],$m1[$sys_detail_show_select[$i1]]);
}
$xh=get_kh_xh($m1);
$xh=$xh>0?$xh."#":"";
$arr_kh[$count]["xh"]=$xh;
$arr_kh[$count]["num"]=$num1;
$arr_kh[$count]["price"]=deel_num(keep_float($price1/$j,2));
$arr_kh[$count]["je"]=$je1;
$arr_kh[$count]["jsje"]=$jsje1;
$count++;
}
}
//组合输出内容
$total_kss=0;
for($i=0;$i<count($arr_kh);$i++){
$list=$i+1;
$num1=count($arr_kh_color[$i]);
for($j=0;$j<$num1;$j++){
if($j==0){
$tmp_str=($num1==1)?"":"rs:".$num1."";
$content_tbody[$total_kss]="\"".$tmp_str." c:".$arr_kh[$i]["bg"]."|".$list."\",\"".$tmp_str." c:".$arr_kh[$i]["bg"]."|".$arr_kh[$i]["id"]."l1&".$arr_kh[$i]["xh"].$arr_kh[$i]["no"]."\",";
for($i1=0;$i1<count($sys_detail_show_select);$i1++){
$content_tbody[$total_kss].="\"".$tmp_str." c:".$arr_kh[$i]["bg"]."|".$arr_kh[$i][$sys_detail_show_select[$i1]]."\",";
}
$content_tbody[$total_kss].=$arr_kh_color[$i][$j]."\"".$tmp_str." c:".$arr_kh[$i]["bg"]." a:r|".$arr_kh[$i]["num"]."\",";
if($is_gg!="y")
$content_tbody[$total_kss].="\"".$tmp_str." c:".$arr_kh[$i]["bg"]." a:r|".$arr_kh[$i]["price"]."\",";
$content_tbody[$total_kss].="\"".$tmp_str." c:".$arr_kh[$i]["bg"]." a:r|".($arr_kh[$i]["je"])."\",";
if(trim($zk_type) || $check_md["num"]>0)
$content_tbody[$total_kss].="\"".$tmp_str." c:".$arr_kh[$i]["bg"]." a:r|".deel_num(keep_float($arr_kh[$i]["jsje"],2))."\",";
}else{
$content_tbody[$total_kss]=$arr_kh_color[$i][$j];
}
$total_kss++;
}
}
$td_size1="";
for($k=0;$k<$num_size_total;$k++){
$v1="hj_num_".$k;
$td_size1.="\"c:td3 a:r|".deel_td($$v1)."\",";
}
$price_pj=($total_num>0)?keep_float($total_money/$total_num,2):0;
$hj_colspan=($bx_sizegroup_id>0)?4:3;
if($is_gg=="y")
$hj_colspan+=2;
else if($is_gg=="b")
$hj_colspan+=1;
$hj_colspan+=count($sys_detail_show_select);
$content_tbody[$total_kss]="\"c:td3 cs:".$hj_colspan." a:r|合计\",".$td_size1."\"c:td3 a:r|".$total_num."\",";
if($is_gg!="y")
$content_tbody[$total_kss].="\"c:td3 a:r|".$price_pj."\",";
$content_tbody[$total_kss].="\"c:td3 a:r|".$total_money."\",";
if(trim($zk_type) || $check_md["num"]>0){
$content_tbody[$total_kss].="\"c:td3 a:r|".deel_num(keep_float($total_money_zk,2))."\",";
}
}
$js_body="$(function () { $(\".fix1\").fixedtableheader({headerrowsize:".count($size_tr)."}); });";
$bb_title="订单明细";
include template("order_list_js");
$db->close();
exit;
?>
+593
View File
@@ -0,0 +1,593 @@
<?php
//-------------------------------------------------------客户端,订单明细
//有款型的版本定制
$s_order=$s_order?$s_order:"date";
$detail_size_ms=get_set("detail_size_ms");
//订货会标记选项
$tmp_order_flag="";
foreach($arr_sys_order_flag as $k => $v){
$tmp_order_flag.="{\"no\":\"".$k."\",\"title\":\"".$v."\"},";
}
$con_f=$con_f1=$con_f2="";
if(count($arr_sys_order_flag)>1){
$tmp_order_flag.="{\"no\":\"all\",\"title\":\"所有订单\"},";
$json_data.="\"show_key\":\"y\",";
$tmp_order_flag=deel_end($tmp_order_flag);
if($s_key){
$selectf=$s_key;
}else{
$selectf=$_key;
}
$str_json="\"select_order_flag\":{\"no\":\"s_key\",\"title\":\"订货会标记\",\"value\":\"".$selectf."\",\"op\":[".$tmp_order_flag."]},";
$json_data.=$str_json;
if($s_key){
if($s_key=="all"){
$con_f=$con_f1=$con_f2="";
}else{
$con_f=" and _key='".$s_key."'";
$con_f1=" and a._key='".$s_key."'";
$con_f2=" and b._key='".$s_key."'";
}
}
}
//文胸
if($bx_sizegroup_title){
$tmp=get_db_msg("select id from ".$table_pre."keyword where cate='size' and title='".$bx_sizegroup_title."' limit 0,1");
$bx_sizegroup_id=$tmp["id"];
}else{
$bx_sizegroup_id=0;
}
//-------------------处理尺码表头
//-------------------------根据款属性来组合尺码组 by yyj 20191023
$con3="";
for($i=0;$i<count($arr_select_no);$i++){
$v="s_".$arr_select_no[$i];
if($$v)
$con3.=" and ".$arr_select_no[$i]."='".$$v."'";
}
//echo $con1."--<br>";
$q1="select size_group from ".$table_pre."kh where id<>0 ".$con3." group by size_group";
$r1=$db->query($q1);
$con_size_group_id=$con_size_group_id1="";
while($m1=$db->fetch_array($r1)){
$con_size_group_id.="iid='".$m1["size_group"]."' or ";
$con_size_group_id1.="id='".$m1["size_group"]."' or ";
}
if($con_size_group_id)
$con_size_group_id=" and (".substr($con_size_group_id,0,-4).")";
if($con_size_group_id1)
$con_size_group_id1=" and (".substr($con_size_group_id1,0,-4).")";
//
$arr_size_merged=array();
$r1=$db->query("select no from ".$table_pre."size where id<>0 ".$con_size_group_id." group by no order by no");
while($m1=$db->fetch_array($r1)){
$arr_size_merged[]=$m1["no"];
}
$num_size_total=count($arr_size_merged);
//结算金额相关
$check_md=get_db_msg("select count(*) 'num' from ".$table_pre."kh_md");
$zk_type=get_set("zk_type");
//取得尺码合计sql
$sql_sum_num="";
for($k=0;$k<$num_size_total;$k++){
$sql_sum_num.="sum(num_".$arr_size_merged[$k].") 'num_".$arr_size_merged[$k]."',";
}
//取得尺码表头内容
$num_size_group=0;
$size_tr=array();
$r1=$db->query("select * from ".$table_pre."keyword where cate='size' ".$con_size_group_id1." order by ord");
while($m1=$db->fetch_array($r1)){
$size_tr[$num_size_group]="";
for($i=1;$i<=$num_size_total;$i++){
$tmp=get_db_msg("select title from ".$table_pre."size where iid='".$m1["id"]."' and no='".$i."'");
$t=$tmp["title"]?$tmp["title"]:"&nbsp;";
$size_tr[$num_size_group].="{\"zd\":\"num_".$i."\",\"title\":\"".$t."\",\"is_size\":\"y\"},";
}
$arr_size_merged[]=$m1["no"];
$num_size_group++;
}
//-------------------/处理尺码表头结束
$i1=0;
//买断款过滤
if($check_md["num"]>0){
$search_select_no[$i1]="s_md";
$search_select_op[$i1]=array(""=>"包含买断款","n"=>"非买断款");
$i1++;
}
//----------------------------------------------取得订单记录
//----表头
$content_tbody=$content_tbody_color=$id_tbody=$idcolor_tbody=array();
$thead_str="";
/*$thead_str.="{\"zd\":\"cx\",\"title\":\"次序\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"cx\",\"title\":\"款号\",\"is_size\":\"n\"},";
for($i=0;$i<count($sys_detail_show_select);$i++){
$thead_str.="{\"zd\":\"cx".$i."\",\"title\":\"".get_cate_title_no("arr_select",$sys_detail_show_select[$i])."\",\"is_size\":\"n\"},";
}
$thead_str.="{\"zd\":\"color\",\"title\":\"颜色\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"款型\",\"is_size\":\"n\"},";
$thead_str.=$size_tr[0];
//$thead_str.="{\"zd\":\"kx\",\"title\":\"款型小计\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"颜色小计\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"合计\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"吊牌金额\",\"is_size\":\"n\"}";
if(trim($zk_type) || $check_md["num"]>0){
$thead_str.=",{\"zd\":\"kx\",\"title\":\"结算金额\",\"is_size\":\"n\"}";
}
$thead_str2="\"0\":[".$thead_str."],";
for($i=1;$i<$num_size_group;$i++){
$thead_str2.="\"".$i."\":[".substr($size_tr[$i],0,-1)."],";
}*/
$json_data.="\"detail_size_ms\":\"".$detail_size_ms."\",";
if($detail_size_ms=="2"){
//重新计算$num_size_total
$num_size_total1=0;
for($k=$num_size_total-1;$k>=0;$k--){
$tmp=get_db_msg("select sum(num_".$arr_size_merged[$k].") 'num' from ".$table_pre."order where _key='".$s_key."' ".$con);
if($tmp["num"]>0){
$num_size_total1=$k+1;
break;
}
}
$num_size_total=$num_size_total1;
//
$content_thead[0]="\"w:40|次序\",\"款号\",";
for($i=0;$i<count($sys_detail_show_select);$i++){
$content_thead[0].="|".get_cate_title_no("arr_select",$sys_detail_show_select[$i])."\",";
}
$content_thead[0].="\"颜色\",";
if($bx_sizegroup_id>0)
$content_thead[0].="\"w:30|杯型\",";
if($is_gg=="y")
$content_thead[0].="\"w:50|".d_translate("gg")."\",\"rs:".$num_size_group." w:50|".get_main_value($sys_gg_zd,"price")."\",";
else if($is_gg=="b")
$content_thead[0].="\"w:50|".d_translate("gg")."\",";
$content_thead[0].="\"cs:".$num_size_total."|尺码明细\",\"w:35|小计\",";
if($is_gg!="y")
$content_thead[0].="\"w:50|".d_translate("dpj")."\",";
$content_thead[0].="\"w:60|".d_translate("dpje")."\",";
if(trim($zk_type) || $check_md["num"]>0)
$content_thead[0].="\"w:60|结算金额\",";
$thead_str.="{\"zd\":\"cx\",\"title\":\"次序\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"cx\",\"title\":\"款号\",\"is_size\":\"n\"},";
for($i=0;$i<count($sys_detail_show_select);$i++){
$thead_str.="{\"zd\":\"cx".$i."\",\"title\":\"".get_cate_title_no("arr_select",$sys_detail_show_select[$i])."\",\"is_size\":\"n\"},";
}
$thead_str.="{\"zd\":\"color\",\"title\":\"颜色\",\"is_size\":\"n\"},";
if($bx_sizegroup_id>0)
$thead_str.="{\"zd\":\"color\",\"title\":\"杯型\",\"is_size\":\"n\"},";
if($is_gg=="y"){
$thead_str.="{\"zd\":\"color\",\"title\":\"".d_translate("gg")."\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"color\",\"title\":\"".get_main_value($sys_gg_zd,"price")."\",\"is_size\":\"n\"},";
}else if($is_gg=="b"){
$thead_str.="{\"zd\":\"color\",\"title\":\"".d_translate("gg")."\",\"is_size\":\"n\"},";
}
$thead_str.="{\"zd\":\"color\",\"title\":\"尺码明细\",\"is_size_cs\":\"y\"},";
$thead_str.="{\"zd\":\"color\",\"title\":\"小计\",\"is_size\":\"n\"},";
if($is_gg!="y")
$thead_str.="{\"zd\":\"color\",\"title\":\"".d_translate("dpj")."\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"color\",\"title\":\"".d_translate("dpje")."\",\"is_size\":\"n\"}";
if(trim($zk_type) || $check_md["num"]>0)
$thead_str.=",{\"zd\":\"color\",\"title\":\"结算金额\",\"is_size\":\"n\"}";
$thead_str2="\"0\":[".$thead_str."],";
$json_data.="\"thead_str_cs\":\"".$num_size_total."\",";
$json_data.="\"thead_str_group\":\"1\",";
}else{
$content_thead[0]="\"rs:".$num_size_group." w:40|次序\",\"rs:".$num_size_group."|款号\",";
for($i=0;$i<count($sys_detail_show_select);$i++){
$content_thead[0].="\"rs:".$num_size_group."|".get_cate_title_no("arr_select",$sys_detail_show_select[$i])."\",";
}
$content_thead[0].="\"rs:".$num_size_group."|颜色\",";
if($bx_sizegroup_id>0)
$content_thead[0].="\"rs:".$num_size_group." w:30|杯型\",";
if($is_gg=="y")
$content_thead[0].="\"rs:".$num_size_group." w:50|".d_translate("gg")."\",\"rs:".$num_size_group." w:50|".get_main_value($sys_gg_zd,"price")."\",";
else if($is_gg=="b")
$content_thead[0].="\"rs:".$num_size_group." w:50|".d_translate("gg")."\",";
$content_thead[0].=$size_tr[0]."\"rs:".$num_size_group." w:35|小计\",";
if($is_gg!="y")
$content_thead[0].="\"rs:".$num_size_group." w:50|".d_translate("dpj")."\",";
$content_thead[0].="\"rs:".$num_size_group." w:60|".d_translate("dpje")."\",";
if(trim($zk_type) || $check_md["num"]>0)
$content_thead[0].="\"rs:".$num_size_group." w:60|结算金额\",";
for($i=1;$i<$num_size_group;$i++){
$content_thead[$i].=$size_tr[$i];
}
$json_data.="\"thead_str_group\":\"".$num_size_group."\",";
$thead_str.="{\"zd\":\"cx\",\"title\":\"次序\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"cx\",\"title\":\"款号\",\"is_size\":\"n\"},";
for($i=0;$i<count($sys_detail_show_select);$i++){
$thead_str.="{\"zd\":\"cx".$i."\",\"title\":\"".get_cate_title_no("arr_select",$sys_detail_show_select[$i])."\",\"is_size\":\"n\"},";
}
$thead_str.="{\"zd\":\"color\",\"title\":\"颜色\",\"is_size\":\"n\"},";
if($bx_sizegroup_id>0){
$thead_str.="{\"zd\":\"kx\",\"title\":\"杯型\",\"is_size\":\"n\"},";
}
if($is_gg=="y"){
$thead_str.="{\"zd\":\"kx\",\"title\":\"".d_translate("gg")."\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"".get_main_value($sys_gg_zd,"price")."\",\"is_size\":\"n\"},";
}else if($is_gg=="b"){
$thead_str.="{\"zd\":\"kx\",\"title\":\"".d_translate("gg")."\",\"is_size\":\"n\"},";
}
$thead_str.=$size_tr[0];
//$thead_str.="{\"zd\":\"kx\",\"title\":\"款型小计\",\"is_size\":\"n\"},";
//$thead_str.="{\"zd\":\"kx\",\"title\":\"颜色小计\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"合计\",\"is_size\":\"n\"},";
if($is_gg!="y"){
$thead_str.="{\"zd\":\"kx\",\"title\":\"".d_translate("dpj")."\",\"is_size\":\"n\"},";
}
$thead_str.="{\"zd\":\"kx\",\"title\":\"吊牌金额\",\"is_size\":\"n\"}";
if(trim($zk_type) || $check_md["num"]>0){
$thead_str.=",{\"zd\":\"kx\",\"title\":\"结算金额\",\"is_size\":\"n\"}";
}
$thead_str2="\"0\":[".$thead_str."],";
for($i=1;$i<$num_size_group;$i++){
$thead_str2.="\"".$i."\":[".substr($size_tr[$i],0,-1)."],";
}
}
$json_data.="\"thead_str\":{".substr($thead_str2,0,-1)."},";
//----表头完成$con_order="";
if($s_order=="date"){
$con_order=" add_date desc";
}else if($s_order=="num"){
$con_order=" num desc,no";
}else if($s_order=="je"){
$con_order=" je desc,no";
}else if($s_order=="no"){
$con_order=" no";
}
$q="select iid,no,sum(num) 'num',sum(num) 'num1',sum(je) 'je',price from ".$table_pre."order where id>0".$con.$con_f." group by iid order by ".$con_order;
//echo $q."<br>";
$r=$db->query($q);
$total_num=$total_xs=$total_je=$total_jsje=0;
$i1=0;
$arr_kh=$arr_color=$arr_bx=$arr_pm=$arr_size_td=array();
$arr_xj_kh=$arr_xj_color=array();
while($m=$db->fetch_array($r)){
$m1=get_db_msg("select * from ".$table_pre."kh where id='".$m["iid"]."'");
$msg_size_group=get_db_msg("select title from ".$table_pre."keyword where cate='size' and id='".$m1["size_group"]."'");
/*if(in_array($msg_size_group["title"],$sys_size_group_xz)){
$is_xd_clothes="n";
}else{
$is_xd_clothes="y";
}*/
$arr_kh_size=explode(",",$m1["size"]);
$arr_kh[$i1]=$m["iid"];
$bg=($i1%2)?"td1":"td2";
//取得颜色
$q2="select iid,color from ".$table_pre."order where id>0".$con.$con_f." and iid='".$m["iid"]."' group by color";
//echo $q2."<br>";
$r2=$db->query($q2);
//
$i2=0;
$xj_je_kh=$xj_jsje_kh=$xj_num_kh=$xj_xs_kh=0;
while($m2=$db->fetch_array($r2)){
$arr_color[$m["iid"]][$i2]=$m2["color"];
//取得杯型订单
$q3="select iid,no,bx,size_group_id,sum(num) 'num',sum(num) 'num1',sum(je) 'je',sum(jsje) 'jsje',price,".get_size_sql("sum1")." from ".$table_pre."order where id>0".$con.$con_f." and iid='".$m["iid"]."' and color='".$m2["color"]."' group by bx order by bx";
//echo $q3."<br>";
$r3=$db->query($q3);
$i3=0;
$xj_je_color=$xj_jsje_color=$xj_num_color=0;
while($m3=$db->fetch_array($r3)){
$arr_td_size_tmp=array();
//
$xj_num=0;
//取得单尺码数量
for($k=0;$k<$num_size_total;$k++){
$ck_md=check_md($m["no"],$m2["color"],$m3["bx"],$arr_size_merged[$k],$msg_login["dj"]);
if($s_md=="n"){
if($ck_md!="n"){
$tmp_num=0;
}else{
$tmp_num=$m3["num_".$arr_size_merged[$k]];
}
}else{
$tmp_num=$m3["num_".$arr_size_merged[$k]];
}
if($ck_md!="n"){
$sty1="bc#90";
}else{
$sty1="";
}
$xj_num+=$tmp_num;
//计算尺码合计
$v11="hj_num_".$k;
$$v11+=$tmp_num;
//
//$tmp1=($sty1=="bc#90")?"st:".$sty1:"c:".$bg;
if($detail_size_ms=="2"){
$tmp3=get_db_msg("select title from ".$table_pre."size where iid='".$m3["size_group_id"]."' and no='".$arr_size_merged[$k]."'");
if($tmp_num>0){
$arr_td_size_tmp[$k]=$tmp1."|".$tmp3["title"]."<br>".deel_0($tmp_num);
}else{
$arr_td_size_tmp[$k]=$tmp1."| ";
}
}else{
if($tmp_num>0){
$arr_td_size_tmp[$k]=$tmp1."|".deel_0($tmp_num);
}else{
$arr_td_size_tmp[$k]=$tmp1."| ";
}
}
}
if($xj_num>0){
//杯型小计
if($detail_size_ms=="2"){
}else{
//$arr_td_size_tmp[$k]="|".deel_0($xj_num);
}
$xj_je=$m3["je"];
$xj_jsje=$m3["jsje"];
$xj_num_color+=$xj_num;
$xj_je_color+=$m3["je"];
$xj_jsje_color+=$m3["jsje"];
$xj_num_kh+=$xj_num;
$xj_je_kh+=$m3["je"];
$xj_jsje_kh+=$m3["jsje"];
$total_num+=$xj_num;
$total_je+=$m3["je"];
$total_jsje+=$m3["jsje"];
$arr_bx[$m["iid"]][$m2["color"]][$i3]=$m3["bx"];
$arr_size_td[$m["iid"]][$m2["color"]][$i3]=$arr_td_size_tmp;
$i3++;
}
}//m3结束
if($xj_jsje_color>0)
$xj_jsje_color=deel_num(keep_float($xj_jsje_color,2));
$arr_xj_color[$m["iid"]][$i2]=array($xj_num_color,$xj_je_color,$xj_jsje_color);
$i2++;
}//m2结束
if($xj_jsje_kh>0)
$xj_jsje_kh=deel_num(keep_float($xj_jsje_kh,2));
$arr_xj_kh[$i1]=array($xj_num_kh,$xj_je_kh,$xj_jsje_kh);
$i1++;
}//m结束
//print_r($arr_size_td);
//计算rowspan值
$arr_rowspan_kh=$arr_rowspan_color=$arr_rowspan_bx=array();
$k=0;
for($i1=0;$i1<count($arr_kh);$i1++){
$this_kh=$arr_kh[$i1];
$s1=count($arr_color[$this_kh]);
$tmp_kh_rowspan=0;
for($i2=0;$i2<$s1;$i2++){
$this_color=$arr_color[$this_kh][$i2];
$s2=count($arr_bx[$this_kh][$this_color]);
$tmp_color_rowspan=0;
for($i3=0;$i3<$s2;$i3++){
$tmp_kh_rowspan++;
$tmp_color_rowspan++;
}
$arr_rowspan_color[$k]=$tmp_color_rowspan;
$k++;
}
$arr_rowspan_kh[$i1]=$tmp_kh_rowspan;
}
//print_r($arr_pm);
/*
print_r($arr_rowspan_kh);
echo "<br>";
print_r($arr_rowspan_color);
echo "<Br>";
*/
//组合输出内容
$k=$k2=$k3=0;
for($i1=0;$i1<count($arr_kh);$i1++){
$this_kh=$arr_kh[$i1];
$bg=($i1%2)?"td1":"td2";
//计算款号合并行数
$s1=count($arr_color[$this_kh]);
$rowspan_kh=$arr_rowspan_kh[$i1]>1?"rs:".$arr_rowspan_kh[$i1]."":"rs:1";
//取得款号表数据
$m_kh=get_db_msg("select * from ".$table_pre."kh where id='".$this_kh."'");
if($_m=="main_4"){
//
}else{
//取得预览图片
//取得弹出层内容
$arr_color1=explode(",",$m_kh["color"]);
$num2=count($arr_color1);
for($j=0;$j<$num2;$j++){
if($num2==1){
$pic_big=get_kh_picture($m_kh["no"],$m_kh["main_pic"],$m_kh["color"]);
}else{
$pic_big=get_kh_color_picture($m_kh["no"],$arr_color1[$j]);
}
}
$pich=get_good_pic_height($pic_big,100,100);
$pic_yl=$pic_big."——".$pich;
}
for($i2=0;$i2<$s1;$i2++){
//计算颜色合并行数
$this_color=$arr_color[$this_kh][$i2];
$s2=count($arr_bx[$this_kh][$this_color]);
$rowspan_color=$arr_rowspan_color[$k2]>1?"rs:".$arr_rowspan_color[$k2]."":"";
for($i3=0;$i3<$s2;$i3++){
$content_tbody[$k]="";
$content_tbody_color[$k]="";
$idcolor_tbody[$k]="";
$id_tbody[$k]="";
if($k==count_arr_num_before($arr_rowspan_kh,$i1)){
//次序
$content_tbody[$k].="\"".$rowspan_kh."|".($i1+1)."\",";
$content_tbody_color[$k]="\"".$bg."\",";
$id_tbody[$k]="\"".$m_kh["id"]."\",";
$idcolor_tbody[$k]="\"".$this_color."\",";
//圆牌号
//$content_tbody[$k].="\"".$rowspan_kh." c:".$bg."|".get_kh_xh($m_kh)."\",";
//款号
/*if($face=="4"){
//直接跳转订货
$act1=$pic_yl."tzyl";
}else{
//显示图片预览
$act1=$pic_yl."yulan";
}*/
$act1=$pic_yl."tzyl";
$content_tbody[$k].="\"".$rowspan_kh."|".$act1.$m_kh["no"]."\",";
//定制字段
for($j=0;$j<count($sys_detail_show_select);$j++){
$content_tbody[$k].="\"".$rowspan_kh."|".get_cate_title_no($sys_detail_show_select[$j],$m_kh[$sys_detail_show_select[$j]])."\",";
}
}
if($k==count_arr_num_before($arr_rowspan_color,$k2)){
//颜色
$content_tbody[$k].="\"".$rowspan_color."|".$this_color."-".get_cate_title_no("color",$this_color)."\",";
}
$content_tbody_color[$k]="\"".$bg."\",";
$id_tbody[$k]="\"".$m_kh["id"]."\",";
$idcolor_tbody[$k]="\"".$this_color."\",";
//杯型
if($bx_sizegroup_id>0){
$content_tbody[$k].="\"|".$arr_bx[$this_kh][$this_color][$i3]."\",";
}
if($is_gg=="y"){
$tmp=get_db_msg("select price from ".$table_pre."kh_gg where iid='".$this_kh."' and color='".$this_color."' and gg='".$arr_bx[$this_kh][$this_color][$i3]."'");
$content_tbody[$k].="\"|".$arr_bx[$this_kh][$this_color][$i3]."\",";
$content_tbody[$k].="\"|".$tmp["price"]."\",";
}else if($is_gg=="b"){
$content_tbody[$k].="\"|".$arr_bx[$this_kh][$this_color][$i3]."\",";
}
//尺码
for($k1=0;$k1<count($arr_size_td[$this_kh][$this_color][$i3]);$k1++){
$content_tbody[$k].="\"".$arr_size_td[$this_kh][$this_color][$i3][$k1]."\",";
}
// if($k==count_arr_num_before($arr_rowspan_color,$k2)){
//颜色小计
// $content_tbody[$k].="\"".$rowspan_color."|".$arr_xj_color[$this_kh][$i2][0]."\",";
//}
if($k==count_arr_num_before($arr_rowspan_kh,$i1)){
//款号小计
$content_tbody[$k].="\"".$rowspan_kh."|".$arr_xj_kh[$i1][0]."\",";
if($is_gg!="y"){
$tmp=get_db_msg("select price from ".$table_pre."kh where id='".$this_kh."' ");
$content_tbody[$k].="\"".$rowspan_kh."|".$tmp["price"]."\",";
}
//款号小计金额
$content_tbody[$k].="\"".$rowspan_kh."|".$arr_xj_kh[$i1][1]."\",";
if(trim($zk_type) || $check_md["num"]>0){
//款号小计结算金额
$content_tbody[$k].="\"".$rowspan_kh."|".$arr_xj_kh[$i1][2]."\",";
}
}
$k++;
}
$k2++;
}
}
//print_r($content_tbody);
foreach($content_tbody as $key=>$value){
if($value){
$json_data3.="[".substr($value,0,-1)."],";
}
}
foreach($content_tbody_color as $key=>$value){
$json_data4.="[".substr($value,0,-1)."],";
}
$json_data6=$json_data7=array();
if($khid)
$khid="\"".$khid."\",";
foreach($id_tbody as $key=>$value){
$json_d2.="[".substr($idcolor_tbody[$key],0,-1)."],";
$json_data5.="[".substr($value,0,-1)."],";
if($khid){
if($khid==$value){
$json_data6[$key]=$ii;
$ii++;
}
}
}
foreach($json_data6 as $key=>$value){
$json_d1.="[".substr($content_tbody[$key],0,-1)."],";
$json_d3.="[".substr($content_tbody_color[$key],0,-1)."],";
}
$json_data.="\"table_mid\":[".substr($json_data3,0,-1)."],\"table_color\":[".substr($json_data4,0,-1)."],\"table_id\":[".substr($json_data5,0,-1)."],\"get_new\":[".substr($json_d1,0,-1)."],\"get_newcolor\":[".substr($json_d3,0,-1)."],\"table_idcolor\":[".substr($json_d2,0,-1)."],";
//获取完成率和已订件数,传递参数khid
//完成率
$is_spk=get_set("is_spk");
$con_spk=($is_spk=="y")?" and is_sp<>'y'":"";
//已订金额和件数
$tmp=get_db_msg("select sum(je) 'je',sum(jsje) 'jsje',sum(num) 'num' from ".$table_pre."order where ka<>'y'".$con_spk.$con_f." and uid='".$uid."'");
$ydje=$tmp["je"];
$ydjsje=$tmp["jsje"];
$ydjs=$tmp["num"];
if($is_brand=="y"){
$tmp=get_db_msg("select sum(zb) 'zb',sum(zb_js) 'zb_js' from ".$table_pre."client_brand where cid='".$uid."'");
$zb1=$tmp["zb"]*10000;
$zb=deel_num($tmp["zb"]);
$zb_js=$tmp["zb_js"];
}else{
$zb1=$msg_login["zb"]*10000;
$zb=deel_num($msg_login["zb"]);
$zb_js=$msg_login["zb_js"];
}
$wcl=deel_bfb1($ydje,$zb1,1);
$wcl_js=deel_bfb1($ydjs,$zb_js,1);
if($khid){
$tmp=get_db_msg("select sum(num) 'num' from ".$table_pre."order where uid='".$uid."' and iid='".$khid."'".$con_f);
$k_ydjs=$tmp["num"];
}else{
$k_ydjs=0;
}
//该款已订件数
$zb_client_show=get_set("zb_client_show");
$json_data.="\"ydjs\":\"".$k_ydjs."\",";
$json_data.="\"zb_client_show\":\"".$zb_client_show."\",";
//订货信息
$json_data.="\"order_num\":\"".$ydjs."\",\"order_je\":\"".$ydje."\",\"order_jsje\":\"".$ydjsje."\",";
//指标信息
$json_data.="\"zb_je\":\"".$zb."\",\"wcl_je\":\"".$wcl."\",\"zb_js\":\"".$zb_js."\",\"wcl_js\":\"".$wcl_js."\",";
//-----------合计行
//尺码合计
$hj_colspan=3;
if($bx_sizegroup_id>0){
$hj_colspan+=1;
}
if($is_gg=="y")
$hj_colspan+=2;
else if($is_gg=="b")
$hj_colspan+=1;
$hj_colspan+=count($sys_detail_show_select);
$json_data.="\"table_hj\":[\"".$hj_colspan."co合计\",";
for($k1=0;$k1<$num_size_total;$k1++){
$v1="hj_num_".$k1;
$json_data.="\"".deel_td($$v1)."\",";
}
$json_data.="\"co".$total_num."\",";
if($is_gg!="y"){
$json_data.="\"\",";
}
if($total_je>0)
$total_je=deel_num(keep_float($total_je,2));
if(trim($zk_type) || $check_md["num"]>0){
$json_data.="\"".$total_je."\",";
if($total_jsje>0)
$total_jsje=deel_num(keep_float($total_jsje,2));
$json_data.="\"".$total_jsje."\"],";
}else{
$json_data.="\"".$total_je."\"],";
}
?>
+412
View File
@@ -0,0 +1,412 @@
<?php
//-------------------------------------------------------客户端,订单明细
//有款型的版本定制
$s_order=$s_order?$s_order:"date";
$detail_size_ms=get_set("detail_size_ms");
//订货会标记选项
$tmp_order_flag="";
foreach($arr_sys_order_flag as $k => $v){
$tmp_order_flag.="{\"no\":\"".$k."\",\"title\":\"".$v."\"},";
}
$con_f=$con_f1=$con_f2="";
if(count($arr_sys_order_flag)>1){
$tmp_order_flag.="{\"no\":\"all\",\"title\":\"所有订单\"},";
$json_data.="\"show_key\":\"y\",";
$tmp_order_flag=deel_end($tmp_order_flag);
if($s_key){
$selectf=$s_key;
}else{
$selectf=$_key;
}
$str_json="\"select_order_flag\":{\"no\":\"s_key\",\"title\":\"订货会标记\",\"value\":\"".$selectf."\",\"op\":[".$tmp_order_flag."]},";
$json_data.=$str_json;
if($s_key){
if($s_key=="all"){
$con_f=$con_f1=$con_f2="";
}else{
$con_f=" and _key='".$s_key."'";
$con_f1=" and a._key='".$s_key."'";
$con_f2=" and b._key='".$s_key."'";
}
}
}
//-------------------处理尺码表头
//取得合并尺码
$arr_size_merged=get_size_merged();
$num_size_total=count($arr_size_merged);
//结算金额相关
$check_md=get_db_msg("select count(*) 'num' from ".$table_pre."kh_md");
$zk_type=get_set("zk_type");
//取得尺码合计sql
$sql_sum_num="";
for($k=0;$k<$num_size_total;$k++){
$sql_sum_num.="sum(num_".$arr_size_merged[$k].") 'num_".$arr_size_merged[$k]."',";
}
//取得尺码表头内容
$num_size_group=0;
$size_tr=array();
$r1=$db->query("select * from ".$table_pre."keyword where cate='size' order by ord");
while($m1=$db->fetch_array($r1)){
$size_tr[$num_size_group]="";
for($i=1;$i<=$num_size_total;$i++){
$tmp=get_db_msg("select title from ".$table_pre."size where iid='".$m1["id"]."' and no='".$i."'");
$t=$tmp["title"]?$tmp["title"]:"&nbsp;";
$size_tr[$num_size_group].="{\"zd\":\"num_".$i."\",\"title\":\"".$t."\",\"is_size\":\"y\"},";
}
$arr_size_merged[]=$m1["no"];
$num_size_group++;
}
//-------------------/处理尺码表头结束
$i1=0;
//买断款过滤
if($check_md["num"]>0){
$search_select_no[$i1]="s_md";
$search_select_op[$i1]=array(""=>"包含买断款","n"=>"非买断款");
$i1++;
}
//----------------------------------------------取得订单记录
//----表头
$content_tbody=$content_tbody_color=$id_tbody=$idcolor_tbody=array();
$thead_str="";
$thead_str.="{\"zd\":\"cx\",\"title\":\"次序\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"cx\",\"title\":\"款号\",\"is_size\":\"n\"},";
for($i=0;$i<count($sys_detail_show_select);$i++){
$thead_str.="{\"zd\":\"cx".$i."\",\"title\":\"".get_cate_title_no("arr_select",$sys_detail_show_select[$i])."\",\"is_size\":\"n\"},";
}
$thead_str.="{\"zd\":\"color\",\"title\":\"颜色\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"款型\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"吊牌价\",\"is_size\":\"n\"},";
$thead_str.=$size_tr[0];
$thead_str.="{\"zd\":\"kx\",\"title\":\"款型小计\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"颜色小计\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"合计\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"吊牌金额\",\"is_size\":\"n\"}";
if(trim($zk_type) || $check_md["num"]>0){
$thead_str.=",{\"zd\":\"kx\",\"title\":\"结算金额\",\"is_size\":\"n\"}";
}
$thead_str2="\"0\":[".$thead_str."],";
for($i=1;$i<$num_size_group;$i++){
$thead_str2.="\"".$i."\":[".substr($size_tr[$i],0,-1)."],";
}
$json_data.="\"thead_str\":{".substr($thead_str2,0,-1)."},";
$json_data.="\"thead_str_group\":\"".$num_size_group."\",";
//----表头完成$con_order="";
if($s_order=="date"){
$con_order=" add_date desc";
}else if($s_order=="num"){
$con_order=" num desc,no";
}else if($s_order=="je"){
$con_order=" je desc,no";
}else if($s_order=="no"){
$con_order=" no";
}
$q="select iid,no,sum(num) 'num',sum(num) 'num1',sum(je) 'je',price from ".$table_pre."order where id>0".$con.$con_f." group by iid order by ".$con_order;
//echo $q."<br>";
$r=$db->query($q);
$total_num=$total_xs=$total_je=$total_jsje=0;
$i1=0;
$arr_kh=$arr_color=$arr_bx=$arr_dpj=$arr_pm=$arr_size_td=array();
$arr_xj_kh=$arr_xj_color=array();
while($m=$db->fetch_array($r)){
$m1=get_db_msg("select * from ".$table_pre."kh where id='".$m["iid"]."'");
$msg_size_group=get_db_msg("select title from ".$table_pre."keyword where cate='size' and id='".$m1["size_group"]."'");
/*if(in_array($msg_size_group["title"],$sys_size_group_xz)){
$is_xd_clothes="n";
}else{
$is_xd_clothes="y";
}*/
$arr_kh_size=explode(",",$m1["size"]);
$arr_kh[$i1]=$m["iid"];
$bg=($i1%2)?"td1":"td2";
//取得颜色
$q2="select iid,color from ".$table_pre."order where id>0".$con.$con_f." and iid='".$m["iid"]."' group by color";
//echo $q2."<br>";
$r2=$db->query($q2);
//
$i2=0;
$xj_je_kh=$xj_jsje_kh=$xj_num_kh=$xj_xs_kh=0;
while($m2=$db->fetch_array($r2)){
$arr_color[$m["iid"]][$i2]=$m2["color"];
//取得杯型订单
$q3="select * from ".$table_pre."order where id>0".$con.$con_f." and iid='".$m["iid"]."' and color='".$m2["color"]."' order by bx";
//echo $q3."<br>";
$r3=$db->query($q3);
$i3=0;
$xj_je_color=$xj_jsje_color=$xj_num_color=0;
while($m3=$db->fetch_array($r3)){
$arr_td_size_tmp=array();
//
$xj_num=0;
//取得单尺码数量
for($k=0;$k<$num_size_total;$k++){
$ck_md=check_md($m["no"],$m2["color"],$m3["bx"],$arr_size_merged[$k],$msg_login["dj"]);
if($s_md=="n"){
if($ck_md!="n"){
$tmp_num=0;
}else{
$tmp_num=$m3["num_".$arr_size_merged[$k]];
}
}else{
$tmp_num=$m3["num_".$arr_size_merged[$k]];
}
if($ck_md!="n"){
$sty1="bc#90";
}else{
$sty1="";
}
$xj_num+=$tmp_num;
//计算尺码合计
$v11="hj_num_".$k;
$$v11+=$tmp_num;
//
//$tmp1=($sty1=="bc#90")?"st:".$sty1:"c:".$bg;
if($tmp_num>0){
$arr_td_size_tmp[$k]=$tmp1."|".deel_0($tmp_num);
}else{
$arr_td_size_tmp[$k]=$tmp1."| ";
}
}
if($xj_num>0){
//杯型小计
$arr_td_size_tmp[$k]="|".deel_0($xj_num);
$xj_je=$m3["je"];
$xj_jsje=$m3["jsje"];
$xj_num_color+=$xj_num;
$xj_je_color+=$m3["je"];
$xj_jsje_color+=$m3["jsje"];
$xj_num_kh+=$xj_num;
$xj_je_kh+=$m3["je"];
$xj_jsje_kh+=$m3["jsje"];
$total_num+=$xj_num;
$total_je+=$m3["je"];
$total_jsje+=$m3["jsje"];
$arr_bx[$m["iid"]][$m2["color"]][$i3]=$m3["bx"];
$arr_dpj[$m["iid"]][$m2["color"]][$i3]=$m3["price"];
$arr_size_td[$m["iid"]][$m2["color"]][$i3]=$arr_td_size_tmp;
$i3++;
}
}//m3结束
if($xj_jsje_color>0)
$xj_jsje_color=deel_num(keep_float($xj_jsje_color,2));
$arr_xj_color[$m["iid"]][$i2]=array($xj_num_color,$xj_je_color,$xj_jsje_color);
$i2++;
}//m2结束
if($xj_jsje_kh>0)
$xj_jsje_kh=deel_num(keep_float($xj_jsje_kh,2));
$arr_xj_kh[$i1]=array($xj_num_kh,$xj_je_kh,$xj_jsje_kh);
$i1++;
}//m结束
//print_r($arr_size_td);
//计算rowspan值
$arr_rowspan_kh=$arr_rowspan_color=$arr_rowspan_bx=array();
$k=0;
for($i1=0;$i1<count($arr_kh);$i1++){
$this_kh=$arr_kh[$i1];
$s1=count($arr_color[$this_kh]);
$tmp_kh_rowspan=0;
for($i2=0;$i2<$s1;$i2++){
$this_color=$arr_color[$this_kh][$i2];
$s2=count($arr_bx[$this_kh][$this_color]);
$tmp_color_rowspan=0;
for($i3=0;$i3<$s2;$i3++){
$tmp_kh_rowspan++;
$tmp_color_rowspan++;
}
$arr_rowspan_color[$k]=$tmp_color_rowspan;
$k++;
}
$arr_rowspan_kh[$i1]=$tmp_kh_rowspan;
}
//print_r($arr_pm);
/*
print_r($arr_rowspan_kh);
echo "<br>";
print_r($arr_rowspan_color);
echo "<Br>";
*/
//组合输出内容
$k=$k2=$k3=0;
for($i1=0;$i1<count($arr_kh);$i1++){
$this_kh=$arr_kh[$i1];
$bg=($i1%2)?"td1":"td2";
//计算款号合并行数
$s1=count($arr_color[$this_kh]);
$rowspan_kh=$arr_rowspan_kh[$i1]>1?"rs:".$arr_rowspan_kh[$i1]."":"rs:1";
//取得款号表数据
$m_kh=get_db_msg("select * from ".$table_pre."kh where id='".$this_kh."'");
if($_m=="main_4"){
//
}else{
//取得预览图片
//取得弹出层内容
$arr_color1=explode(",",$m_kh["color"]);
$num2=count($arr_color1);
for($j=0;$j<$num2;$j++){
if($num2==1){
$pic_big=get_kh_picture($m_kh["no"],$m_kh["main_pic"],$m_kh["color"]);
}else{
$pic_big=get_kh_color_picture($m_kh["no"],$arr_color1[$j]);
}
}
$pich=get_good_pic_height($pic_big,100,100);
$pic_yl=$pic_big."——".$pich;
}
for($i2=0;$i2<$s1;$i2++){
//计算颜色合并行数
$this_color=$arr_color[$this_kh][$i2];
$s2=count($arr_bx[$this_kh][$this_color]);
$rowspan_color=$arr_rowspan_color[$k2]>1?"rs:".$arr_rowspan_color[$k2]."":"";
for($i3=0;$i3<$s2;$i3++){
$content_tbody[$k]="";
$content_tbody_color[$k]="";
$idcolor_tbody[$k]="";
$id_tbody[$k]="";
if($k==count_arr_num_before($arr_rowspan_kh,$i1)){
//次序
$content_tbody[$k].="\"".$rowspan_kh."|".($i1+1)."\",";
$content_tbody_color[$k]="\"".$bg."\",";
$id_tbody[$k]="\"".$m_kh["id"]."\",";
$idcolor_tbody[$k]="\"".$this_color."\",";
//圆牌号
//$content_tbody[$k].="\"".$rowspan_kh." c:".$bg."|".get_kh_xh($m_kh)."\",";
//款号
if($face=="4"){
//直接跳转订货
$act1=$pic_yl."tzyl";
}else{
//显示图片预览
$act1=$pic_yl."yulan";
}
$act1=$pic_yl."tzyl";
$content_tbody[$k].="\"".$rowspan_kh."|".$act1.$m_kh["no"]."\",";
//定制字段
for($j=0;$j<count($sys_detail_show_select);$j++){
$content_tbody[$k].="\"".$rowspan_kh."|".get_cate_title_no($sys_detail_show_select[$j],$m_kh[$sys_detail_show_select[$j]])."\",";
}
}
if($k==count_arr_num_before($arr_rowspan_color,$k2)){
//颜色
$content_tbody[$k].="\"".$rowspan_color."|".$this_color."-".get_cate_title_no("color",$this_color)."\",";
}
$content_tbody_color[$k]="\"".$bg."\",";
$id_tbody[$k]="\"".$m_kh["id"]."\",";
$idcolor_tbody[$k]="\"".$this_color."\",";
//杯型
$content_tbody[$k].="\"|".$arr_bx[$this_kh][$this_color][$i3]."\",";
$content_tbody[$k].="\"|".$arr_dpj[$this_kh][$this_color][$i3]."\",";
//尺码
for($k1=0;$k1<count($arr_size_td[$this_kh][$this_color][$i3]);$k1++){
$content_tbody[$k].="\"".$arr_size_td[$this_kh][$this_color][$i3][$k1]."\",";
}
if($k==count_arr_num_before($arr_rowspan_color,$k2)){
//颜色小计
$content_tbody[$k].="\"".$rowspan_color."|".$arr_xj_color[$this_kh][$i2][0]."\",";
}
if($k==count_arr_num_before($arr_rowspan_kh,$i1)){
//款号小计
$content_tbody[$k].="\"".$rowspan_kh."|".$arr_xj_kh[$i1][0]."\",";
//款号小计金额
$content_tbody[$k].="\"".$rowspan_kh."|".$arr_xj_kh[$i1][1]."\",";
if(trim($zk_type) || $check_md["num"]>0){
//款号小计结算金额
$content_tbody[$k].="\"".$rowspan_kh."|".$arr_xj_kh[$i1][2]."\",";
}
}
$k++;
}
$k2++;
}
}
foreach($content_tbody as $key=>$value){
if($value){
$json_data3.="[".substr($value,0,-1)."],";
}
}
foreach($content_tbody_color as $key=>$value){
$json_data4.="[".substr($value,0,-1)."],";
}
$json_data6=$json_data7=array();
if($khid)
$khid="\"".$khid."\",";
foreach($id_tbody as $key=>$value){
$json_d2.="[".substr($idcolor_tbody[$key],0,-1)."],";
$json_data5.="[".substr($value,0,-1)."],";
if($khid){
if($khid==$value){
$json_data6[$key]=$ii;
$ii++;
}
}
}
foreach($json_data6 as $key=>$value){
$json_d1.="[".substr($content_tbody[$key],0,-1)."],";
$json_d3.="[".substr($content_tbody_color[$key],0,-1)."],";
}
$json_data.="\"table_mid\":[".substr($json_data3,0,-1)."],\"table_color\":[".substr($json_data4,0,-1)."],\"table_id\":[".substr($json_data5,0,-1)."],\"get_new\":[".substr($json_d1,0,-1)."],\"get_newcolor\":[".substr($json_d3,0,-1)."],\"table_idcolor\":[".substr($json_d2,0,-1)."],";
//获取完成率和已订件数,传递参数khid
//完成率
$is_spk=get_set("is_spk");
$con_spk=($is_spk=="y")?" and is_sp<>'y'":"";
//已订金额和件数
$tmp=get_db_msg("select sum(je) 'je',sum(jsje) 'jsje',sum(num) 'num' from ".$table_pre."order where ka<>'y'".$con_spk.$con_f." and uid='".$uid."'");
$ydje=$tmp["je"];
$ydjsje=$tmp["jsje"];
$ydjs=$tmp["num"];
if($is_brand=="y"){
$tmp=get_db_msg("select sum(zb) 'zb',sum(zb_js) 'zb_js' from ".$table_pre."client_brand where cid='".$uid."'");
$zb1=$tmp["zb"]*10000;
$zb=deel_num($tmp["zb"]);
$zb_js=$tmp["zb_js"];
}else{
$zb1=$msg_login["zb"]*10000;
$zb=deel_num($msg_login["zb"]);
$zb_js=$msg_login["zb_js"];
}
$wcl=deel_bfb1($ydje,$zb1,1);
$wcl_js=deel_bfb1($ydjs,$zb_js,1);
if($khid){
$tmp=get_db_msg("select sum(num) 'num' from ".$table_pre."order where uid='".$uid."' and iid='".$khid."'".$con_f);
$k_ydjs=$tmp["num"];
}else{
$k_ydjs=0;
}
//该款已订件数
$zb_client_show=get_set("zb_client_show");
$json_data.="\"ydjs\":\"".$k_ydjs."\",";
$json_data.="\"zb_client_show\":\"".$zb_client_show."\",";
//订货信息
$json_data.="\"order_num\":\"".$ydjs."\",\"order_je\":\"".$ydje."\",\"order_jsje\":\"".$ydjsje."\",";
//指标信息
$json_data.="\"zb_je\":\"".$zb."\",\"wcl_je\":\"".$wcl."\",\"zb_js\":\"".$zb_js."\",\"wcl_js\":\"".$wcl_js."\",";
//-----------合计行
//尺码合计
$hj_colspan=5;
$hj_colspan+=count($sys_detail_show_select);
$json_data.="\"table_hj\":[\"".$hj_colspan."co合计\",";
for($k1=0;$k1<$num_size_total;$k1++){
$v1="hj_num_".$k1;
$json_data.="\"".deel_td($$v1)."\",";
}
$json_data.="\"3co".$total_num."\",";
if($total_je>0)
$total_je=deel_num(keep_float($total_je,2));
if(trim($zk_type) || $check_md["num"]>0){
$json_data.="\"".$total_je."\",";
if($total_jsje>0)
$total_jsje=deel_num(keep_float($total_jsje,2));
$json_data.="\"".$total_jsje."\"],";
}else{
$json_data.="\"".$total_je."\"],";
}
?>
+464
View File
@@ -0,0 +1,464 @@
<?php
//-------------------------------------------------------客户端,订单明细
//有款型的版本定制
$s_order=$s_order?$s_order:"date";
$detail_size_ms=get_set("detail_size_ms");
//订货会标记选项
$tmp_order_flag="";
foreach($arr_sys_order_flag as $k => $v){
$tmp_order_flag.="{\"no\":\"".$k."\",\"title\":\"".$v."\"},";
}
$con_f=$con_f1=$con_f2="";
if(count($arr_sys_order_flag)>1){
$tmp_order_flag.="{\"no\":\"all\",\"title\":\"所有订单\"},";
$json_data.="\"show_key\":\"y\",";
$tmp_order_flag=deel_end($tmp_order_flag);
if($s_key){
$selectf=$s_key;
}else{
$selectf=$_key;
}
$str_json="\"select_order_flag\":{\"no\":\"s_key\",\"title\":\"订货会标记\",\"value\":\"".$selectf."\",\"op\":[".$tmp_order_flag."]},";
$json_data.=$str_json;
if($s_key){
if($s_key=="all"){
$con_f=$con_f1=$con_f2="";
}else{
$con_f=" and _key='".$s_key."'";
$con_f1=" and a._key='".$s_key."'";
$con_f2=" and b._key='".$s_key."'";
}
}
}
//-------------------处理尺码表头
//取得合并尺码
$arr_size_merged=get_size_merged();
$num_size_total=count($arr_size_merged);
//结算金额相关
$check_md=get_db_msg("select count(*) 'num' from ".$table_pre."kh_md");
$zk_type=get_set("zk_type");
//取得尺码合计sql
$sql_sum_num="";
for($k=0;$k<$num_size_total;$k++){
$sql_sum_num.="sum(num_".$arr_size_merged[$k].") 'num_".$arr_size_merged[$k]."',";
}
//取得尺码表头内容
$num_size_group=0;
$size_tr=array();
$r1=$db->query("select * from ".$table_pre."keyword where cate='size' order by ord");
while($m1=$db->fetch_array($r1)){
$size_tr[$num_size_group]="";
for($i=1;$i<=$num_size_total;$i++){
$tmp=get_db_msg("select title from ".$table_pre."size where iid='".$m1["id"]."' and no='".$i."'");
$t=$tmp["title"]?$tmp["title"]:"&nbsp;";
$size_tr[$num_size_group].="{\"zd\":\"num_".$i."\",\"title\":\"".$t."\",\"is_size\":\"y\"},";
}
$arr_size_merged[]=$m1["no"];
$num_size_group++;
}
//-------------------/处理尺码表头结束
$i1=0;
//买断款过滤
if($check_md["num"]>0){
$search_select_no[$i1]="s_md";
$search_select_op[$i1]=array(""=>"包含买断款","n"=>"非买断款");
$i1++;
}
//----------------------------------------------取得订单记录
//----表头
$content_tbody=$content_tbody_color=$id_tbody=$idcolor_tbody=array();
$thead_str="";
$thead_str.="{\"zd\":\"cx\",\"title\":\"次序\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"cx\",\"title\":\"款号\",\"is_size\":\"n\"},";
for($i=0;$i<count($sys_detail_show_select);$i++){
$thead_str.="{\"zd\":\"cx".$i."\",\"title\":\"".get_cate_title_no("arr_select",$sys_detail_show_select[$i])."\",\"is_size\":\"n\"},";
}
$thead_str.="{\"zd\":\"color\",\"title\":\"颜色\",\"is_size\":\"n\"},";
if($is_gg=="y"){
$thead_str.="{\"zd\":\"kx\",\"title\":\"".d_translate("gg")."\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"".get_main_value($sys_gg_zd,"price")."\",\"is_size\":\"n\"},";
}else if($is_gg=="b"){
$thead_str.="{\"zd\":\"kx\",\"title\":\"".d_translate("gg")."\",\"is_size\":\"n\"},";
}
$thead_str.=$size_tr[0];
//$thead_str.="{\"zd\":\"kx\",\"title\":\"款型小计\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"箱数\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"双数\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"合计\",\"is_size\":\"n\"},";
$thead_str.="{\"zd\":\"kx\",\"title\":\"吊牌金额\",\"is_size\":\"n\"}";
if(trim($zk_type) || $check_md["num"]>0){
$thead_str.=",{\"zd\":\"kx\",\"title\":\"结算金额\",\"is_size\":\"n\"}";
}
$thead_str2="\"0\":[".$thead_str."],";
for($i=1;$i<$num_size_group;$i++){
$thead_str2.="\"".$i."\":[".substr($size_tr[$i],0,-1)."],";
}
$json_data.="\"thead_str\":{".substr($thead_str2,0,-1)."},";
$json_data.="\"thead_str_group\":\"".$num_size_group."\",";
//----表头完成$con_order="";
if($s_order=="date"){
$con_order=" add_date desc";
}else if($s_order=="num"){
$con_order=" num desc,no";
}else if($s_order=="je"){
$con_order=" je desc,no";
}else if($s_order=="no"){
$con_order=" no";
}
$q="select iid,no,sum(num) 'num',sum(num) 'num1',sum(je) 'je',price from ".$table_pre."order where id>0".$con.$con_f." group by iid order by ".$con_order;
//echo $q."<br>";
$r=$db->query($q);
$total_num=$total_xs=$total_je=$total_jsje=0;
$i1=0;
$arr_kh=$arr_color=$arr_bx=$arr_pm=$arr_size_td=array();
$arr_xj_kh=$arr_xj_color=array();
while($m=$db->fetch_array($r)){
$m1=get_db_msg("select * from ".$table_pre."kh where id='".$m["iid"]."'");
$msg_size_group=get_db_msg("select title from ".$table_pre."keyword where cate='size' and id='".$m1["size_group"]."'");
/*if(in_array($msg_size_group["title"],$sys_size_group_xz)){
$is_xd_clothes="n";
}else{
$is_xd_clothes="y";
}*/
$arr_kh_size=explode(",",$m1["size"]);
$arr_kh[$i1]=$m["iid"];
$bg=($i1%2)?"td1":"td2";
//取得颜色
$q2="select iid,color from ".$table_pre."order where id>0".$con.$con_f." and iid='".$m["iid"]."' group by color";
//echo $q2."<br>";
$r2=$db->query($q2);
//
$i2=0;
$xj_je_kh=$xj_jsje_kh=$xj_num_kh=$xj_xs_kh=0;
while($m2=$db->fetch_array($r2)){
$arr_color[$m["iid"]][$i2]=$m2["color"];
//取得杯型订单
$q3="select * from ".$table_pre."order where id>0".$con.$con_f." and iid='".$m["iid"]."' and color='".$m2["color"]."' order by bx";
//echo $q3."<br>";
$r3=$db->query($q3);
$i3=0;
$xj_je_color=$xj_jsje_color=$xj_num_color=0;
while($m3=$db->fetch_array($r3)){
$arr_td_size_tmp=array();
if($sys_ver_hy=="xz"){
$q4="select * from ".$table_pre."order_pm where uid='".$m3["uid"]."' and iid='".$m3["iid"]."' and color='".$m3["color"]."' and bx='".$m3["bx"]."'";
//echo $q4."<br>";
$r4=$db->query($q4);
$xj_num=0;
$i4=0;
$num1=$xs1=0;
while($m4=$db->fetch_array($r4)){
//echo $q4."<br>";
$m_pm=get_db_msg("select * from ".$table_pre."size_pm where id='".$m4["pmid"]."'");
$arr_pm2=explode(":",$m_pm["gz"]);
$arr_pm1=tz_pm($arr_kh_size,$arr_pm2);
$pm_xj_num=0;
for($k=1;$k<=$num_size_total;$k++){
$v1="hj_num_".$k;
$tmp_num=$arr_pm1[$k];
$$v1+=$tmp_num;
if($tmp_num>0){
$arr_td_size_tmp[$k]=$tmp1."|".deel_0($tmp_num);
}else{
$arr_td_size_tmp[$k]=$tmp1."| ";
}
$xj_num+=$tmp_num;
$pm_xj_num+=$tmp_num;
}
if($pm_xj_num>0){
//echo $m4["pmid"];
$xs1+=$m4["xs"];
$num1+=$m4["xs"]*$m_pm["num"];
$arr_td_size_tmp[$k]="|".deel_0($m4["xs"]);
$arr_td_size_tmp[$k+1]="|".deel_0($m4["xs"]*$m_pm["num"]);
$arr_size_td[$m["iid"]][$m2["color"]][$m3["bx"]][$i4]=$arr_td_size_tmp;
$arr_pm[$m3["iid"]][$m3["color"]][$m3["bx"]][$i4]=$m4["pmid"];
$i4++;
}
}
if($num1>0){
//杯型小计
//$arr_td_size_tmp[$k]="|".deel_0($xj_num);
$xj_je=$m3["je"];
$xj_jsje=$m3["jsje"];
$xj_num_color+=$num1;
$xj_je_color+=$m3["je"];
$xj_jsje_color+=$m3["jsje"];
$xj_xs_kh+=$xs1;
$xj_num_kh+=$num1;
$xj_je_kh+=$m3["je"];
$xj_jsje_kh+=$m3["jsje"];
$total_num+=$num1;
$total_xs+=$xs1;
$total_je+=$m3["je"];
$total_jsje+=$m3["jsje"];
$arr_bx[$m["iid"]][$m2["color"]][$i3]=$m3["bx"];
//$arr_size_td[$m["iid"]][$m2["color"]][$i3]=$arr_td_size_tmp;
$i3++;
}
}
}//m3结束
if($xj_jsje_color>0)
$xj_jsje_color=deel_num(keep_float($xj_jsje_color,2));
$arr_xj_color[$m["iid"]][$i2]=array($xj_num_color,$xj_je_color,$xj_jsje_color);
$i2++;
}//m2结束
if($xj_jsje_kh>0)
$xj_jsje_kh=deel_num(keep_float($xj_jsje_kh,2));
$arr_xj_kh[$i1]=array($xj_num_kh,$xj_je_kh,$xj_jsje_kh);
$i1++;
}//m结束
//print_r($arr_size_td);
//计算rowspan值
$arr_rowspan_kh=$arr_rowspan_color=$arr_rowspan_bx=array();
if($sys_ver_hy=="xz"){
$k=$j=0;
for($i1=0;$i1<count($arr_kh);$i1++){
$this_kh=$arr_kh[$i1];
$s1=count($arr_color[$this_kh]);
$tmp_kh_rowspan=0;
for($i2=0;$i2<$s1;$i2++){
$this_color=$arr_color[$this_kh][$i2];
$s2=count($arr_bx[$this_kh][$this_color]);
$tmp_color_rowspan=0;
for($i3=0;$i3<$s2;$i3++){
$this_bx=$arr_bx[$this_kh][$this_color][$i3];
$s3=count($arr_pm[$this_kh][$this_color][$this_bx]);
$tmp_bx_rowspan=0;
for($i4=0;$i4<$s3;$i4++){
$tmp_kh_rowspan++;
$tmp_color_rowspan++;
$tmp_bx_rowspan++;
}
$arr_rowspan_bx[$j]=$tmp_bx_rowspan;
$j++;
}
$arr_rowspan_color[$k]=$tmp_color_rowspan;
$k++;
}
$arr_rowspan_kh[$i1]=$tmp_kh_rowspan;
}
}
//print_r($arr_pm);
/*
print_r($arr_rowspan_kh);
echo "<br>";
print_r($arr_rowspan_color);
echo "<Br>";
*/
//组合输出内容
$k=$k2=$k3=0;
for($i1=0;$i1<count($arr_kh);$i1++){
$this_kh=$arr_kh[$i1];
$bg=($i1%2)?"td1":"td2";
//计算款号合并行数
$s1=count($arr_color[$this_kh]);
$rowspan_kh=$arr_rowspan_kh[$i1]>1?"rs:".$arr_rowspan_kh[$i1]."":"rs:1";
//取得款号表数据
$m_kh=get_db_msg("select * from ".$table_pre."kh where id='".$this_kh."'");
if($_m=="main_4"){
//
}else{
//取得预览图片
//取得弹出层内容
$arr_color1=explode(",",$m_kh["color"]);
$num2=count($arr_color1);
for($j=0;$j<$num2;$j++){
if($num2==1){
$pic_big=get_kh_picture($m_kh["no"],$m_kh["main_pic"],$m_kh["color"]);
}else{
$pic_big=get_kh_color_picture($m_kh["no"],$arr_color1[$j]);
}
}
$pich=get_good_pic_height($pic_big,100,100);
$pic_yl=$pic_big."——".$pich;
}
for($i2=0;$i2<$s1;$i2++){
//计算颜色合并行数
$this_color=$arr_color[$this_kh][$i2];
$s2=count($arr_bx[$this_kh][$this_color]);
$rowspan_color=$arr_rowspan_color[$k2]>1?"rs:".$arr_rowspan_color[$k2]."":"";
for($i3=0;$i3<$s2;$i3++){
if($sys_ver_hy=="xz"){
$this_bx=$arr_bx[$this_kh][$this_color][$i3];
$s3=count($arr_pm[$this_kh][$this_color][$this_bx]);
//echo $s3;
$rowspan_bx=$arr_rowspan_bx[$k3]>1?"rs:".$arr_rowspan_bx[$k3]."":"";
for($i4=0;$i4<$s3;$i4++){
//echo "a";
$content_tbody[$k]="";
$content_tbody_color[$k]="";
$idcolor_tbody[$k]="";
$id_tbody[$k]="";
if($k==count_arr_num_before($arr_rowspan_kh,$i1)){
//次序
$content_tbody[$k].="\"".$rowspan_kh."|".($i1+1)."\",";
$content_tbody_color[$k]="\"".$bg."\",";
$id_tbody[$k]="\"".$m_kh["id"]."\",";
$idcolor_tbody[$k]="\"".$this_color."\",";
//圆牌号
//$content_tbody[$k].="\"".$rowspan_kh." c:".$bg."|".get_kh_xh($m_kh)."\",";
//款号
/*if($face=="4"){
//直接跳转订货
$act1=$pic_yl."tzyl";
}else{
//显示图片预览
$act1=$pic_yl."yulan";
}*/
$act1=$pic_yl."tzyl";
$content_tbody[$k].="\"".$rowspan_kh."|".$act1.$m_kh["no"]."\",";
//定制字段
for($j=0;$j<count($sys_detail_show_select);$j++){
$content_tbody[$k].="\"".$rowspan_kh."|".get_cate_title_no($sys_detail_show_select[$j],$m_kh[$sys_detail_show_select[$j]])."\",";
}
}
if($k==count_arr_num_before($arr_rowspan_color,$k2)){
//颜色
$content_tbody[$k].="\"".$rowspan_color."|".$this_color."-".get_cate_title_no("color",$this_color)."\",";
}
$content_tbody_color[$k]="\"".$bg."\",";
$id_tbody[$k]="\"".$m_kh["id"]."\",";
$idcolor_tbody[$k]="\"".$this_color."\",";
//杯型
if($is_gg=="y"){
$tmp=get_db_msg("select price from ".$table_pre."kh_gg where iid='".$this_kh."' and color='".$this_color."' and gg='".$this_bx."'");
if($k==count_arr_num_before($arr_rowspan_bx,$k3)){
$content_tbody[$k].="\"".$rowspan_bx."|".$arr_bx[$this_kh][$this_color][$this_bx]."\",";
$content_tbody[$k].="\"".$rowspan_bx."|".$tmp["price"]."\",";
}
}else if($is_gg=="b"){
if($k==count_arr_num_before($arr_rowspan_bx,$k3)){
$content_tbody[$k].="\"".$rowspan_bx."|".$arr_bx[$this_kh][$this_color][$this_bx]."\",";
}
}
//尺码
//print_R($arr_size_td[$this_kh][$this_color][$this_bx][$k]);
for($k1=1;$k1<=count($arr_size_td[$this_kh][$this_color][$this_bx][$i4]);$k1++){
//echo $arr_size_td[$this_kh][$this_color][$this_bx][$k1];
$content_tbody[$k].="\"".$arr_size_td[$this_kh][$this_color][$this_bx][$i4][$k1]."\",";
}
//if($k==count_arr_num_before($arr_rowspan_color,$k2)){
//颜色小计
// $content_tbody[$k].="\"".$rowspan_color."|".$arr_xj_color[$this_kh][$i2][0]."\",";
//}
if($k==count_arr_num_before($arr_rowspan_kh,$i1)){
//print_r($arr_xj_kh[$i1]);
//款号小计
$content_tbody[$k].="\"".$rowspan_kh."|".$arr_xj_kh[$i1][0]."\",";
//款号小计金额
$content_tbody[$k].="\"".$rowspan_kh."|".$arr_xj_kh[$i1][1]."\",";
if(trim($zk_type) || $check_md["num"]>0){
//款号小计结算金额
$content_tbody[$k].="\"".$rowspan_kh."|".$arr_xj_kh[$i1][2]."\",";
}
}
$k++;
}
$k3++;
}
}
$k2++;
}
}
foreach($content_tbody as $key=>$value){
if($value){
$json_data3.="[".substr($value,0,-1)."],";
}
}
foreach($content_tbody_color as $key=>$value){
$json_data4.="[".substr($value,0,-1)."],";
}
$json_data6=$json_data7=array();
if($khid)
$khid="\"".$khid."\",";
foreach($id_tbody as $key=>$value){
$json_d2.="[".substr($idcolor_tbody[$key],0,-1)."],";
$json_data5.="[".substr($value,0,-1)."],";
if($khid){
if($khid==$value){
$json_data6[$key]=$ii;
$ii++;
}
}
}
foreach($json_data6 as $key=>$value){
$json_d1.="[".substr($content_tbody[$key],0,-1)."],";
$json_d3.="[".substr($content_tbody_color[$key],0,-1)."],";
}
$json_data.="\"table_mid\":[".substr($json_data3,0,-1)."],\"table_color\":[".substr($json_data4,0,-1)."],\"table_id\":[".substr($json_data5,0,-1)."],\"get_new\":[".substr($json_d1,0,-1)."],\"get_newcolor\":[".substr($json_d3,0,-1)."],\"table_idcolor\":[".substr($json_d2,0,-1)."],";
//获取完成率和已订件数,传递参数khid
//完成率
$is_spk=get_set("is_spk");
$con_spk=($is_spk=="y")?" and is_sp<>'y'":"";
//已订金额和件数
$tmp=get_db_msg("select sum(je) 'je',sum(jsje) 'jsje',sum(num) 'num' from ".$table_pre."order where ka<>'y'".$con_spk.$con_f." and uid='".$uid."'");
$ydje=$tmp["je"];
$ydjsje=$tmp["jsje"];
$ydjs=$tmp["num"];
if($is_brand=="y"){
$tmp=get_db_msg("select sum(zb) 'zb',sum(zb_js) 'zb_js' from ".$table_pre."client_brand where cid='".$uid."'");
$zb1=$tmp["zb"]*10000;
$zb=deel_num($tmp["zb"]);
$zb_js=$tmp["zb_js"];
}else{
$zb1=$msg_login["zb"]*10000;
$zb=deel_num($msg_login["zb"]);
$zb_js=$msg_login["zb_js"];
}
$wcl=deel_bfb1($ydje,$zb1,1);
$wcl_js=deel_bfb1($ydjs,$zb_js,1);
if($khid){
$tmp=get_db_msg("select sum(num) 'num' from ".$table_pre."order where uid='".$uid."' and iid='".$khid."'".$con_f);
$k_ydjs=$tmp["num"];
}else{
$k_ydjs=0;
}
//该款已订件数
$zb_client_show=get_set("zb_client_show");
$json_data.="\"ydjs\":\"".$k_ydjs."\",";
$json_data.="\"zb_client_show\":\"".$zb_client_show."\",";
//订货信息
$json_data.="\"order_num\":\"".$ydjs."\",\"order_je\":\"".$ydje."\",\"order_jsje\":\"".$ydjsje."\",";
//指标信息
$json_data.="\"zb_je\":\"".$zb."\",\"wcl_je\":\"".$wcl."\",\"zb_js\":\"".$zb_js."\",\"wcl_js\":\"".$wcl_js."\",";
//-----------合计行
//尺码合计
$hj_colspan=3;
if($is_gg=="y")
$hj_colspan+=2;
else if($is_gg=="b")
$hj_colspan+=1;
$hj_colspan+=count($sys_detail_show_select);
$json_data.="\"table_hj\":[\"".$hj_colspan."co合计\",";
if($sys_ver_hy=="xz"){
for($k1=1;$k1<=$num_size_total;$k1++){
$v1="hj_num_".$k1;
$json_data.="\"".deel_td($$v1)."\",";
}
$json_data.="\"".$total_xs."\",";
$json_data.="\"2co".$total_num."\",";
}
if($total_je>0)
$total_je=deel_num(keep_float($total_je,2));
if(trim($zk_type) || $check_md["num"]>0){
$json_data.="\"".$total_je."\",";
if($total_jsje>0)
$total_jsje=deel_num(keep_float($total_jsje,2));
$json_data.="\"".$total_jsje."\"],";
}else{
$json_data.="\"".$total_je."\"],";
}
?>
+35
View File
@@ -0,0 +1,35 @@
<?php
//-------------------------------------------------------店铺界面,交单
if($is_brand=="y"){
if($jd2=="y"){
$con_brand="";
if($s_brand){
$arr_s_brand=explode(",",$s_brand);
for($i=0;$i<count($arr_s_brand);$i++){
$con_brand.="brand='".$arr_s_brand[$i]."' or ";
}
if($con_brand)
$con_brand=" and (".substr($con_brand,0,-3).")";
}
$q="update ".$table_pre."client_brand set is_jd='y' where cid='".$uid."'".$con_brand;
$db->query($q);
$url=$_SERVER["PHP_SELF"]."?_m=".$_m."&_a=o&s_tab=wcl";
//记录订单操作日志
update_order_state($uid,$uid,"交单","");
alert_and_redirect("订单提交成功,请等待客户经理确认!",$url);
}else{
//多品牌交单
$url=$_SERVER["PHP_SELF"]."?_m=".$_m."&_a=o&s_tab=wcl";
url_redirect($url);
}
}else{
//检查订货规则
check_dhgz_client($uid);
$q="update ".$table_pre."client set is_jd='y' where id='".$uid."'";
$db->query($q);
$url=$_SERVER[PHP_SELF]."?_m=".$_m.$link_var_brand;
//记录订单操作日志
update_order_state($uid,$uid,"交单","");
alert_and_redirect("订单提交成功,请等待客户经理确认!",$url);
}
?>
+85
View File
@@ -0,0 +1,85 @@
<?php
//-------------------------------------------------------店铺界面,单款下单界面的价格和选项显示定制
$show_mod="1";//FAB显示模式。1:分行模式;2:合并模式
//--------------------------------------显示价格信息
if($msg["size_group"]==$child_sizegroup_id){
//童装尺码异价
foreach($arr_child_bx as $bx1 => $size1){
$m1=get_db_msg("select id,price from ".$table_pre."size_bx where no='".$msg["no"]."' and bx='".$bx1."'");
if($m1["id"]>0)
$str_price.=$bx1.":".$m1["price"]."元<br>";
}
}else{
$dp_price=get_price_dp($uid,$msg["id"]);
$str_price=deel_num($dp_price)."";
$price_zk=get_price_zk($uid,$msg["id"]);
if($price_zk!=$dp_price){
$str_price.=" / 结算价:".deel_num($price_zk)."";
}
//买断价
$tmp=get_db_msg("select id,price from ".$table_pre."kh_md where (dj='".$msg_login["dj"]."' or dj='') and kh='".$msg["no"]."' limit 0,1");
if($tmp["id"]>0){
$price_md=$tmp["price"]>0?$tmp["price"]:$price_zk;
$str_price.=" / ".d_translate("md")."价:".deel_num($price_md)."";
}
}
if(is_array($sys_color_zd) && count($sys_color_zd)>0){
//取得款色表的定制字段
$other_info.="<table border=0 cellspacing=1 cellpadding=3 bgcolor='#cccccc'><tr bgcolor='#f0f0f0'><td>颜色</td>";
foreach($sys_color_zd as $k1 => $v1){
$other_info.="<td>".$v1."</td>";
}
$other_info.="</tr>";
$q="select * from ".$table_pre."kh_color where iid='".$msg["id"]."' order by color";
$r=$db->query($q);
while($m=$db->fetch_array($r)){
$other_info.="<tr bgcolor='#ffffff'><td>".$m["color"]."-".get_cate_title_no("color",$m["color"])."</td>";
foreach($sys_color_zd as $k1 => $v1){
$other_info.="<td align='center'>".$m[$k1]."</td>";
}
$other_info.="</tr>";
}
$other_info.="</table>";
}
//如果采用了这个变量,图片右边的单款属性以及款号,圆牌号都不显示。
if($show_mod=="1"){
$order_single_detail="<table width='100%' border='0' cellspacing='1' cellpadding='3'>";
$order_single_detail.="<tr><td align='right' class='order_single_td1' width='80'>".d_translate("xh")."</td><td align='left'>".get_kh_xh($msg)."</td></tr>";
$order_single_detail.="<tr><td align='right' class='order_single_td1'>款号</td><td align='left'>".$msg["no"]."</td></tr>";
if($msg["title"])
$order_single_detail.="<tr><td align='right' class='order_single_td1'>款式名</td><td align='left'>".$msg["title"]."</td></tr>";
$order_single_detail.="<tr><td align='right' class='order_single_td1'>价格</td><td align='left'>".$str_price."</td></tr>";
$q="select * from ".$table_pre."keyword where cate='arr_select' and flag_ka='y' and flag_bd='n' and no<>'jgd' and no<>'sx' and no<>'color' order by ord";
$r=$db->query($q);
$i=0;
while($m=$db->fetch_array($r)){
if($m["no"]=="zd1" || $m["no"]=="zd2" || $m["no"]=="zd3"){
$str_tmp=$msg[$m["no"]];
}else{
$str_tmp=get_cate_title_no($m["no"],$msg[$m["no"]]);
}
$order_single_detail.="<tr><td align='right' class='order_single_td1'>".$m["title"]."</td><td align='left'>".$str_tmp."</td></tr>";
}
$order_single_detail.="<tr><td align='right' class='order_single_td1'>备注</td><td align='left'>".dhtmlchars($msg["remark"])."</td></tr>";
$order_single_detail.="</table>";
$str_select_dz="[]";
}else{
//--------------------------------------显示定制选项
$str_select_dz="[";
$q="select * from ".$table_pre."keyword where cate='arr_select' and flag_ka='y' and flag_bd='n' and no<>'jgd' and no<>'sx' and no<>'color' order by ord";
$r=$db->query($q);
$i=0;
while($m=$db->fetch_array($r)){
$str_select_dz.="\"".$m["title"]."|";
if($m["no"]=="zd1" || $m["no"]=="zd2" || $m["no"]=="zd3"){
$str_select_dz.=$msg[$m["no"]]."\",";
}else{
$str_select_dz.=deel_js_var(get_cate_title_no($m["no"],$msg[$m["no"]]))."\",";
}
$i++;
}
$str_select_dz.="]";
$other_info="";
}
//$order_single_detail="<table width='100%' border='0' cellspacing='1' cellpadding='3'><tr><td align='right' width='100' class='order_single_td1'>款号</td><td align='left'>".$msg["no"]."</td></tr></table>";
?>
+112
View File
@@ -0,0 +1,112 @@
<?php
//-------------------------------------------------------店铺界面,顶部已订数和完成率的显示
//已订金额和件数
if($is_brand=="y" && $s_brand){
$tmp=get_db_msg("select sum(jsje) 'je',sum(num) 'num' from ".$table_pre."order where ka<>'y'".$con_spk." and uid='".$uid."'".$con_brand);
$ydje=$tmp["je"];
$ydjs=$tmp["num"];
}else{
$ydje=$msg_login["order_money".$flag_spk];
if(trim($zk_type) || $check_md["num"]>0){
$ydje=$msg_login["order_money".$flag_spk."_zk"];
}
$ydjs=$msg_login["order_num".$flag_spk];
}
$con_brand1=($is_brand=="y")?$con_brand:"";
//取得已订款数
$tmp1=get_db_msg("select count(distinct no) 'num' from ".$table_pre."order where uid='".$uid."' and ka<>'y'".$con_spk.$con_brand1);
$yd_ks=$tmp1["num"];
//取得已订款色数
$tmp1=get_db_msg("select count(distinct no,color) 'num' from ".$table_pre."order where uid='".$uid."' and ka<>'y'".$con_spk.$con_brand1);
$yd_kss=$tmp1["num"];
//指标
$zb_info="";
if(in_array("kss",$arr_zb_type)){
if($is_brand=="y" && $s_brand)
$zb_kss=0;
else
$zb_kss=$msg_login["zb_kss"];
if($zb_kss>0)
$zb_info.=$zb_kss."款色/";
}
if(in_array("ks",$arr_zb_type)){
if($is_brand=="y" && $s_brand)
$zb_ks=0;
else
$zb_ks=$msg_login["zb_ks"];
if($zb_ks>0)
$zb_info.=$zb_ks."款/";
}
if($is_brand=="y" && $s_brand){
$tmp_zb=get_db_msg("select sum(zb_js) 'zb_js',sum(zb) 'zb' from ".$table_pre."client_brand where cid='".$uid."'".$con_brand);
}else if($is_brand=="y"){
$tmp_zb=get_db_msg("select sum(zb_js) 'zb_js',sum(zb) 'zb' from ".$table_pre."client_brand where cid='".$uid."'");
}
if(in_array("js",$arr_zb_type)){
if($is_brand=="y"){
$zb_js=$tmp_zb["zb_js"];
}else{
$zb_js=$msg_login["zb_js"];
}
if($zb_js>0)
$zb_info.=$zb_js."件/";
}
if(in_array("je",$arr_zb_type)){
if($is_brand=="y"){
$zb=$tmp_zb["zb"]*10000;
}else{
$zb=$msg_login["zb"]*10000;
}
if($zb>0)
$zb_info.=deel_je_show($zb)."元/";
}
//完成率
$wcl="";
if(in_array("je",$arr_zb_type)){
if($zb>0)
$wcl.="金额".deel_bfb1($ydje,$zb,1)."/";
}
if(in_array("js",$arr_zb_type)){
if($zb_js>0)
$wcl.="件数".deel_bfb1($ydjs,$zb_js,1)."/";
}
if($wcl==""){
if(in_array("ks",$arr_zb_type)){
if($zb_ks>0)
$wcl="款数".deel_bfb1($yd_ks,$zb_ks,1)."/";
}else if(in_array("kss",$arr_zb_type)){
if($zb_kss>0)
$wcl="款色数".deel_bfb1($yd_kss,$zb_kss,1)."/";
}
}
//
//----------------------top info
if($hd_face=="mobile"){
$top_info="<span class='top_state'>".$msg_login["title"]."</span>";
$top_info.="<a href='?_m=".$_m."&_a=o&s_tab=detail'><span class='top_state_link'>已订".$ydjs."件/";
$top_info.=deel_je_show(deel_num($ydje))."";
if($wcl)
$top_info.=",完成".substr($wcl,0,-1);
$top_info.="</span></a>";
}else{
//显示消息图标
if($is_msg=="y")
$top_info="<a href=\"javascript:show_msg_history();\"><span class='top_state'>".$msg_login["title"]."(".$msg_login["username"].")<img src=\"".$theme_path."/images/new.gif\" width=\"31\" height=\"20\" border=\"0\" align=\"absmiddle\"></span></a>";
else
$top_info="<span class='top_state'>".$msg_login["title"]."(".$msg_login["username"].")";
if($is_brand=="y" && $s_brand)
$top_info.="[".$title_brand."]";
$top_info.="</span><a href='?_m=".$_m."&_a=o&s_tab=detail'><span class='top_state_link'>已订".deel_num($ydjs)."";
$top_info.="/".deel_je_show(deel_num($ydje))."";
$top_info.="/".deel_num($yd_ks)."";
if($is_dkds=="n")
$top_info.="/".deel_num($yd_kss)."款色";
if($is_brand!="y" || ($is_brand=="y" && $sys_multi_brand_show_zwcl=="y") || $s_brand){
if($zb_info)
$top_info.=",指标".substr($zb_info,0,-1);
if($wcl)
$top_info.=",完成".substr($wcl,0,-1);
}
$top_info.="</span></a>";
}
?>
+361
View File
@@ -0,0 +1,361 @@
<?php
//-------------------------------------------------------区经界面,我的客户定制
$s_split_spfs=$s_split_spfs?$s_split_spfs:$is_spk;
$content_search="";
if($is_brand=="y")
$content_search.="<select name=\"s_brand\" onchange=\"tj.submit();\"><option value=''>-所有".get_cate_title_no("arr_select","brand")."-</option>".op_select_cate1("brand",$s_brand)."</select>";
//是否确认
$content_search.="<span class='fontBody'>客户代码</span><input type=\"text\" name=\"s_username\" style=\"width:60px;\" value=\"".$s_username."\" onfocus=\"\" onblur=\"tj.submit();\"><select name=\"s_is_jd\" onchange=\"tj.submit();\"><option value=''>-是否交单-</option>".get_main_op(array("y"=>"","n"=>""),$s_is_jd)."</select> ";
$content_search.="<select name=\"s_is_checked\" onchange=\"tj.submit();\"><option value=''>-是否确认-</option>".get_main_op(array("y"=>"","n"=>""),$s_is_checked)."</select>";
//分开饰品/服饰
$content_search.="&nbsp;&nbsp;分开".d_translate("cyk")."/".d_translate("spk").":".get_main_radio($arr_yn,"s_split_spfs",$s_split_spfs," onclick=\"tj.submit();\"")."";
if($msg_login["rfid"]=="y")
$content_search.=" <input type='button' value='管理客户' onclick=\"location.href='".$_SERVER[PHP_SELF]."?_m=".$_m."&_a=mod_client'\">";
//-------------------------------------------------------
$content="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"4\" bgcolor=\"#000000\" class=\"fix1\"><thead><tr><td align=\"center\" class=\"thead\"><strong>客户</strong></td>";
if($s_split_spfs=="y"){
$content.="<td align=\"center\" class=\"thead\" width=\"40\"><strong>".d_translate("cyk")."数量</strong></td>";
$content.="<td align=\"center\" class=\"thead\" width=\"40\"><strong>".d_translate("cyk")."<br>".d_translate("dpje")."</strong></td>";
if($show_jsje=="y")
$content.="<td align=\"center\" class=\"thead\" width=\"40\"><strong>".d_translate("cyk")."<br>结算金额</strong></td>";
$content.="<td align=\"center\" class=\"thead\" width=\"40\"><strong>".d_translate("spk")."数量</strong></td>";
$content.="<td align=\"center\" class=\"thead\" width=\"40\"><strong>".d_translate("spk")."<br>".d_translate("dpje")."</strong></td>";
if($show_jsje=="y")
$content.="<td align=\"center\" class=\"thead\" width=\"40\"><strong>".d_translate("spk")."<br>结算金额</strong></td>";
}
$content.="<td align=\"center\" class=\"thead\" width=\"60\"><strong>合计数量</strong></td>";
$content.="<td align=\"center\" class=\"thead\" width=\"60\"><strong>合计<br>".d_translate("dpje")."</strong></td>";
if($show_jsje=="y")
$content.="<td align=\"center\" class=\"thead\" width=\"60\"><strong>合计<br>结算金额</strong></td>";
if(in_array("js",$arr_zb_type)){
$content.="<td align=\"center\" class=\"thead\" width=\"60\"><strong>件数指标</strong></td>";
$content.="<td align=\"center\" class=\"thead\" width=\"50\"><strong>件数完成率</strong></td>";
}
if(in_array("je",$arr_zb_type)){
$content.="<td align=\"center\" class=\"thead\" width=\"70\"><strong>金额指标</strong>";
$content.="<td align=\"center\" class=\"thead\" width=\"50\"><strong>金额完成率</strong></td>";
}
$content.="</tr></thead>";
$count=$total_num=$total_money=$total_money_zk=$total_num1=$total_money1=$total_money1_zk=$hj_zb_je=$hj_zb_js=0;
$total_num_dl=$total_money_dl=$total_money_zk_dl=$total_num1_dl=$total_money1_dl=$total_money1_zk_dl=$hj_zb_je_dl=$hj_zb_js_dl=0;
$count1=0;
for($count=0;$count<count($arr_upath);$count++){
$q="select * from ".$table_pre."client where id='".get_parent_id($arr_upath[$count])."'";
//echo $q."<Br>";
$m=get_db_msg($q);
if($m["id"]>0){
$is_jd=$is_checked="null";
if($is_brand=="y"){
if($m["face"]=="4" || $m["face"]=="3"){
$m_tmp=get_db_msg("select is_jd from ".$table_pre."client_brand where cid='".$m["id"]."'".$con_brand." order by is_jd limit 0,1");
$is_jd=$m_tmp["is_jd"];
$m_tmp=get_db_msg("select is_checked from ".$table_pre."client_brand where cid='".$m["id"]."'".$con_brand." order by is_checked limit 0,1");
$is_checked=$m_tmp["is_checked"];
}
}else{
if($m["face"]=="4" || $m["face"]=="3"){
$is_jd=$m["is_jd"];
$is_checked=$m["is_checked"];
}
}
if((!$s_username || ($s_username && preg_match("/".$s_username."/i",$m["username"]))) && (!$s_is_checked || ($s_is_checked && $s_is_checked==$is_checked)) && (!$s_is_jd || ($s_is_jd && $s_is_jd==$is_jd))){
$bg="#cccccc";
$list=$count1+1;
$show_order_num=($m["face"]==4)?"y":check_qj_priv_all($m["id"]);
if($is_brand=="y"){
//启用多品牌
if($m["face"]=="4"){
$con_tmp=" and uid='".$m["id"]."'";
}else{
$con_tmp=" and (upath like '".$m["path"]."-".$m["id"]."-%')";
}
$con_tmp.=$con_brand;
//
$zd_jsje=($m["face"]=="3" or $m["face"]=="9")?"jsje_dl":"jsje";
$tmp=get_db_msg("select sum(num) 'num',sum(je) 'je',sum(".$zd_jsje.") 'jsje' from ".$table_pre."order where ka<>'y' ".$con_tmp);
$tmp_num=$tmp["num"];
$tmp_money=$tmp["je"];
$tmp_money_zk=$tmp["jsje"];
//成衣
if($s_split_spfs=="y"){
$tmp=get_db_msg("select sum(num) 'num',sum(je) 'je',sum(".$zd_jsje.") 'jsje' from ".$table_pre."order where ka<>'y' and is_sp<>'y' ".$con_tmp);
$tmp_num1=$tmp["num"];
$tmp_money1=$tmp["je"];
$tmp_money1_zk=$tmp["jsje"];
}
$tmp=get_db_msg("select sum(zb) 'zb',sum(zb_js) 'zb_js' from ".$table_pre."client_brand where cid='".$m["id"]."'".$con_brand);
$tmp_zb_je=$tmp["zb"]*10000;
$tmp_zb_js=$tmp["zb_js"];
if($m["face"]=="4"){
$total_num+=$tmp_num;
$total_money+=$tmp_money;
$total_money_zk+=$tmp_money_zk;
$total_num1+=$tmp_num1;
$total_money1+=$tmp_money1;
$total_money1_zk+=$tmp_money1_zk;
$flag_qr=($is_checked=="y")?"<span id=\"icon_confirm_".$m["id"]."\"><span style=\"font-size:14px;font-weight:bold;\">√</span></span>":"<span id=\"icon_confirm_".$m["id"]."\"></span>";
$flag_jd=($is_jd=="y")?"<span id=\"icon_jd_".$m["id"]."\"><span style=\"font-size:14px;font-weight:bold;\">√</span></span>":"<span id=\"icon_jd_".$m["id"]."\"></span>";
$hj_zb_je+=$tmp_zb_je;
$hj_zb_js+=$tmp_zb_js;
}else{
if($m["face"]=="3" && $show_order_num=="y"){
$total_num_dl+=$tmp_num;
$total_money_dl+=$tmp_money;
$total_money_zk_dl+=$tmp_money_zk;
$total_num1_dl+=$tmp_num1;
$total_money1_dl+=$tmp_money1;
$total_money1_zk_dl+=$tmp_money1_zk;
$hj_zb_je_dl+=$tmp_zb_je;
$hj_zb_js_dl+=$tmp_zb_js;
}
$flag_qr="";
$flag_jd="";
}
}else{
//未启用多品牌
if($m["face"]!="4"){
set_order_total($m["id"]);
}
$tmp_num=$m["order_num"];
$tmp_num1=$m["order_num1"];
$tmp_money=$m["order_money"];
$tmp_money1=$m["order_money1"];
$tmp_money_zk=$m["order_money_zk"];
$tmp_money1_zk=$m["order_money1_zk"];
$tmp_zb_je=$m["zb"]*10000;
$tmp_zb_js=$m["zb_js"];
if($m["face"]=="4"){
//单店
$total_num+=$tmp_num;
$total_money+=$tmp_money;
$total_money_zk+=$tmp_money_zk;
$total_num1+=$tmp_num1;
$total_money1+=$tmp_money1;
$total_money1_zk+=$tmp_money1_zk;
$hj_zb_je+=$tmp_zb_je;
$hj_zb_js+=$tmp_zb_js;
}else{
if($m["face"]=="3" && $show_order_num=="y"){
$total_num_dl+=$tmp_num;
$total_money_dl+=$tmp_money;
$total_money_zk_dl+=$tmp_money_zk;
$total_num1_dl+=$tmp_num1;
$total_money1_dl+=$tmp_money1;
$total_money1_zk_dl+=$tmp_money1_zk;
$hj_zb_je_dl+=$tmp_zb_je;
$hj_zb_js_dl+=$tmp_zb_js;
}
$m=get_db_msg("select * from ".$table_pre."client where id='".$m["id"]."'");
}
$flag_qr=($m["is_checked"]=="y")?"<span id=\"icon_confirm_".$m["id"]."\"><span style=\"font-size:14px;font-weight:bold;\">√</span></span>":"<span id=\"icon_confirm_".$m["id"]."\"></span>";
$flag_jd=($m["is_jd"]=="y")?"<span id=\"icon_jd_".$m["id"]."\"><span style=\"font-size:14px;font-weight:bold;\">√</span></span>":"<span id=\"icon_jd_".$m["id"]."\"></span>";
}
$cz="";
if($m["face"]=="4" || ($sd_ms=="2" && $m["face"]=="3")){
if($msg_login["qyjl_confirm"]!="n"){
if($is_jd=="y")
$cz.="<span id=\"button_jd_".$m["id"]."\"><input type=\"button\" id='b_jd_".$m["id"]."' value=\"退回交单\" onclick=\"ajax_qj_action('确认退回交单吗?','jd','".$m["id"]."','".$s_brand."','".$_m."')\"></span> ";
if($is_checked=="y"){
$cz.="<span id=\"button_confirm_".$m["id"]."\"><input type=\"button\" id='b_confirm_".$m["id"]."' style=\"background-color:#333333;color:#cccccc;\" value=\"取消确认\" onclick=\"ajax_qj_action('确定执行取消确认订单吗?','confirm','".$m["id"]."','".$s_brand."','".$_m."')\"></span> ";
}else{
$cz.="<span id=\"button_confirm_".$m["id"]."\"><input type=\"button\" value=\"确认订单\" id='b_confirm_".$m["id"]."' onclick=\"ajax_qj_action('确定执行确认订单吗?','confirm','".$m["id"]."','".$s_brand."','".$_m."')\"></span> ";
}
}
}
$wcl=$zb_content="";
if(in_array("js",$arr_zb_type)){
if($is_spk=="y")
$wcl=deel_bfb1($tmp_num1,$tmp_zb_js,1);
else
$wcl=deel_bfb1($tmp_num,$tmp_zb_js,1);
if($show_order_num=="y")
$zb_content.="<td align=\"right\">".$tmp_zb_js."</td><td align=\"right\">".$wcl."</td>";
else
$zb_content.="<td>&nbsp;</td><td>&nbsp;</td>";
}
if(in_array("je",$arr_zb_type)){
if($is_spk=="y"){
$tmp1=($show_jsje=="y")?$tmp_money1_zk:$tmp_money1;
}else{
$tmp1=($show_jsje=="y")?$tmp_money_zk:$tmp_money;
}
$wcl=deel_bfb1($tmp1,$tmp_zb_je,1);
if($show_order_num=="y")
$zb_content.="<td align=\"right\">".deel_je_show($tmp_zb_je)."</td><td align=\"right\">".$wcl."</td>";
else
$zb_content.="<td>&nbsp;</td><td>&nbsp;</td>";
}
$wcl1=str_replace("%","",$wcl);
$wcl1=$wcl1+1-1;
$zb_style=($wcl1>=100)?"font-weight:bold;color:#cc3300;text-decoration:underline;padding:2px;":"font-weight:bold;color:#0000ff;text-decoration:underline;padding:2px;";
if($m["face"]=="4"){
$dl_uid=get_dl_id($m["path"]);
if($s_username || $s_is_jd || $s_is_checked || count($arr_upath)<101){
$dis1="display:";
}else{
$dis1=$dl_uid>0?"display:none":"display:";
}
//如果没有订货权限,显示灰色
$tmp_msg=get_db_msg("select count(*) 'num' from ".$table_pre."client_brand where cid='".$m["id"]."'".$con_brand."");
if($is_brand=="y" && $m["face"]=="4" && $tmp_msg["num"]==0){
$zb_style="color:#999999";
$cz="";
}
$content.="<tr id=\"".$m["path"]."-".$m["id"]."\" bgcolor=\"".$bg."\" style=\"".$dis1."\" onclick=\"dhlight('".$m["path"]."-".$m["id"]."')\"><td><a href=\"?_m=".$_m."&s_tab=ks&s_uid=".$m["id"].$link_var_brand."&window_new=new&window=new\">".indent_dote($m["deep"]-1).$flag_jd."<span style=\"".$zb_style."\">".$m["title"]."(".$m["username"].")"."</span>".$flag_qr."</a> ".$cz."</td>";
}else if($m["face"]=="3"){
$content.="<tr id=\"".$m["path"]."-".$m["id"]."\" bgcolor=\"".$bg."\" onclick=\"dhlight('".$m["path"]."-".$m["id"]."')\"><td><a href=\"javascript:show_tree('".$m["path"]."-".$m["id"]."')\" onclick=\"dhlight('".$m["path"]."-".$m["id"]."')\">".indent($m["deep"]-1).$flag_jd."<span style=\"".$zb_style."\">".$m["title"]."(".$m["username"].")"."</span>".$flag_qr."</a> ".$cz."</td>";
}else{
$content.="<tr id=\"".$m["path"]."-".$m["id"]."\" bgcolor=\"".$bg."\" onclick=\"dhlight('".$m["path"]."-".$m["id"]."')\"><td>".indent_dote($m["deep"]-1).$flag_jd."<span style=\"".$zb_style."\">".$m["title"]."(".$m["username"].")"."</span>".$flag_qr." ".$cz."</td>";
}
if($show_order_num=="y"){
if($s_split_spfs=="y"){
//成衣数量
$content.="<td align=\"right\">".$tmp_num1."</td>";
//成衣吊牌金额
$content.="<td align=\"right\">".deel_je_show($tmp_money1)."</td>";
//成衣结算金额
if($show_jsje=="y")
$content.="<td align=\"right\">".deel_je_show($tmp_money1_zk)."</td>";
//饰品数量
$content.="<td align=\"right\">".($tmp_num-$tmp_num1)."</td>";
//饰品吊牌金额
$content.="<td align=\"right\">".deel_je_show($tmp_money-$tmp_money1)."</td>";
//饰品结算金额
if($show_jsje=="y")
$content.="<td align=\"right\">".deel_je_show($tmp_money_zk-$tmp_money1_zk)."</td>";
}
//合计数量
$content.="<td align=\"right\">".$tmp_num."</td>";
//合计吊牌金额
$content.="<td align=\"right\">".deel_je_show($tmp_money)."</td>";
//合计结算金额
if($show_jsje=="y")
$content.="<td align=\"right\">".deel_je_show($tmp_money_zk)."</td>";
}else{
if($s_split_spfs=="y"){
$content.="<td>&nbsp;</td><td>&nbsp;</td>";
//成衣结算金额
if($show_jsje=="y")
$content.="<td>&nbsp;</td>";
//饰品数量
$content.="<td>&nbsp;</td><td>&nbsp;</td>";
if($show_jsje=="y")
$content.="<td>&nbsp;</td>";
}
//合计数量
$content.="<td>&nbsp;</td><td>&nbsp;</td>";
if($show_jsje=="y")
$content.="<td>&nbsp;</td>";
}
//
$content.=$zb_content;
$content.="</tr>";
$count1++;
}
}
}
//店铺合计
$content.="<tr><td height=\"25\" align=\"right\" class=\"td3\">店铺合计</td>";
if($s_split_spfs=="y"){
//合计成衣数量
$content.="<td class=\"td3\" align=\"right\">".$total_num1."</td>";
//合计成衣吊牌金额
$content.="<td class=\"td3\" align=\"right\">".deel_je_show($total_money1)."</td>";
//合计成衣结算金额
if($show_jsje=="y")
$content.="<td class=\"td3\" align=\"right\">".deel_je_show($total_money1_zk)."</td>";
//合计饰品数量
$content.="<td class=\"td3\" align=\"right\">".($total_num-$total_num1)."</td>";
//合计饰品吊牌金额
$content.="<td class=\"td3\" align=\"right\">".deel_je_show($total_money-$total_money1)."</td>";
//合计饰品结算金额
if($show_jsje=="y")
$content.="<td class=\"td3\" align=\"right\">".deel_je_show(($total_money_zk-$total_money1_zk))."</td>";
}
//合计数量
$content.="<td class=\"td3\" align=\"right\">".$total_num."</td>";
//合计吊牌金额
$content.="<td class=\"td3\" align=\"right\">".deel_je_show($total_money)."</td>";
//合计结算金额
if($show_jsje=="y")
$content.="<td class=\"td3\" align=\"right\">".deel_je_show($total_money_zk)."</td>";
//件数指标
$wcl1="";
if(in_array("js",$arr_zb_type)){
$content.="<td class=\"td3\" align=\"right\">".$hj_zb_js."</td>";
if(in_array("js",$arr_zb_type)){
if($is_spk=="y")
$wcl1=deel_bfb1($total_num1,$hj_zb_js,1);
else
$wcl1=deel_bfb1($total_num,$hj_zb_js,1);
}
$content.="<td class=\"td3\" align=\"right\">".$wcl1."</td>";
}
//金额指标
if(in_array("je",$arr_zb_type)){
$content.="<td class=\"td3\" align=\"right\">".deel_je_show($hj_zb_je)."</td>";
if(in_array("je",$arr_zb_type)){
if($is_spk=="y")
$wcl1=deel_bfb1($total_money1_zk,$hj_zb_je,1);
else
$wcl1=deel_bfb1($total_money_zk,$hj_zb_je,1);
}
$content.="<td class=\"td3\" align=\"right\">".$wcl1."</td>";
}
$content.="</tr>";
if($total_money_zk_dl!=$total_money_zk){
//代理合计
$content.="<tr><td height=\"25\" align=\"right\" class=\"td3\">".d_translate("dl")."合计</td>";
if($s_split_spfs=="y"){
//合计成衣数量
$content.="<td class=\"td3\" align=\"right\">".$total_num1_dl."</td>";
//合计成衣吊牌金额
$content.="<td class=\"td3\" align=\"right\">".deel_je_show($total_money1_dl)."</td>";
//合计成衣结算金额
if($show_jsje=="y")
$content.="<td class=\"td3\" align=\"right\">".deel_je_show($total_money1_zk_dl)."</td>";
//合计饰品数量
$content.="<td class=\"td3\" align=\"right\">".($total_num_dl-$total_num1_dl)."</td>";
//合计饰品吊牌金额
$content.="<td class=\"td3\" align=\"right\">".deel_je_show($total_money_dl-$total_money1_dl)."</td>";
//合计饰品结算金额
if($show_jsje=="y")
$content.="<td class=\"td3\" align=\"right\">".deel_je_show(($total_money_zk_dl-$total_money1_zk_dl))."</td>";
}
//合计数量
$content.="<td class=\"td3\" align=\"right\">".$total_num_dl."</td>";
//合计吊牌金额
$content.="<td class=\"td3\" align=\"right\">".deel_je_show($total_money_dl)."</td>";
//合计结算金额
if($show_jsje=="y")
$content.="<td class=\"td3\" align=\"right\">".deel_je_show($total_money_zk_dl)."</td>";
//件数指标
$wcl1="";
if(in_array("js",$arr_zb_type)){
$content.="<td class=\"td3\" align=\"right\">".$hj_zb_js_dl."</td>";
if(in_array("js",$arr_zb_type)){
if($is_spk=="y")
$wcl1=deel_bfb1($total_num1_dl,$hj_zb_js_dl,1);
else
$wcl1=deel_bfb1($total_num_dl,$hj_zb_js_dl,1);
}
$content.="<td class=\"td3\" align=\"right\">".$wcl1."</td>";
}
//金额指标
if(in_array("je",$arr_zb_type)){
$content.="<td class=\"td3\" align=\"right\">".deel_je_show($hj_zb_je_dl)."</td>";
if(in_array("je",$arr_zb_type)){
if($is_spk=="y")
$wcl1=deel_bfb1($total_money1_zk_dl,$hj_zb_je_dl,1);
else
$wcl1=deel_bfb1($total_money_zk_dl,$hj_zb_je_dl,1);
}
$content.="<td class=\"td3\" align=\"right\">".$wcl1."</td>";
}
$content.="</tr>";
}
//
$content.="</table></td></tr></table>";
$js_code="$(function () { $(\".fix1\").fixedtableheader(); });";
include template("order_list_js");
?>
+309
View File
@@ -0,0 +1,309 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>直播订货</title>
<link rel="shortcut icon" type="image/x-icon" href="../favicon.ico" />
<link rel="stylesheet" href="layuiadmin/layui/css/layui.css">
<link rel="stylesheet" href="https://g.alicdn.com/de/prismplayer/2.8.7/skins/default/aliplayer-min.css">
<script src="https://g.alicdn.com/de/prismplayer/2.8.7/aliplayer-min.js" charset="utf-8"></script>
<script type="text/javascript" charset="utf-8" src="js/aliplayercomponents.min.js"></script>
<script src="js/function.js"></script>
<style>
#player-con {
display: table-row;
}
#player-con video {
background-color: black;
}
</style>
</head>
<body>
<div id="player-con" class="prism-player"></div>
</body>
<script src="layuiadmin/layui/layui.js"></script>
<script src="js/aliyun-rts-sdk.js"></script>
<script>
var global_player
,global_window_name = window.name
,global_is_fullscreen = false
layui.config({
base: './layuiadmin/'
}).extend({
index: 'lib/index'
}).use(['index', 'user'], function(){
var $ = layui.$
,setter = layui.setter
,admin = layui.admin
,form = layui.form
var url=get_url_param("hzhurl");
var cate=get_url_param("cate");
var is_sy = get_url_param("is_sy"),
username = get_url_param("username")
var appzbconfig=get_url_param("appzbconfig");
$(self.frameElement).parents(".layui-layer-iframe").css("overflow-y", "hidden")
//console.log(url);
var theight=0;
if(window.screen.width<450){
theight="160px";
}else{
theight="250px";
}
theight = "100%"
if(cate=='zb'){
alert(appzbconfig);
if(appzbconfig=="y"){
global_player = new Aliplayer({
"id": "player-con",
"source": "",
"width": "100%",
"height": theight,
"autoplay": true,
"isLive": true,
"rePlay": false,
"playsinline": true,
"preload": true,
"controlBarVisibility": 'click',
"showBarTime": '30000',
"useH5Prism":true,
"useFlashPrism":false,
"liveRetry":3,
"skinLayout": [
{
"name": "bigPlayButton",
"align": "blabs",
"x": 30,
"y": 80
},
{
"name": "infoDisplay"
},
{
"name": "controlBar",
"align": "blabs",
"x": 0,
"y": 0,
"children": [
{
"name": "liveDisplay",
"align": "tlabs",
"x": 15,
"y": 6
},
{
"name": "volume",
"align": "tr",
"x": 5,
"y": 10
}
]
}
]
}, function (player) {
console.log("画中画播放器创建成功");
});
var aliRts = new AliRTS()
var v1=$("#player-con video");
aliRts.startLiveStream(decodeURIComponent(url),v1[0]);
alert(decodeURIComponent(url));
}else{
global_player = new Aliplayer({
"id": "player-con",
"source": decodeURIComponent(url),
"width": "100%",
"height": theight,
"autoplay": true,
"isLive": true,
"rePlay": false,
"playsinline": true,
"preload": true,
"controlBarVisibility": 'click',
"showBarTime": '30000',
"useH5Prism":true,
"useFlashPrism":false,
"liveRetry":3,
"skinLayout": [
{
"name": "bigPlayButton",
"align": "blabs",
"x": 30,
"y": 80
},
{
"name": "infoDisplay"
},
{
"name": "controlBar",
"align": "blabs",
"x": 0,
"y": 0,
"children": [
{
"name": "liveDisplay",
"align": "tlabs",
"x": 15,
"y": 6
},
{
"name": "volume",
"align": "tr",
"x": 5,
"y": 10
}
]
}
]
}, function (player) {
console.log("画中画播放器创建成功");
});
}
} else{
global_player = new Aliplayer({
"id": "player-con",
"source": decodeURIComponent(url),
"width": "100%",
"height": theight,
"rePlay": false,
"playsinline": true,
"autoplay": true,
"preload": true,
"controlBarVisibility": 'click',
"showBarTime": '30000',
"useH5Prism":true,
"useFlashPrism":false,
"liveRetry":3,
"skinLayout": [
{
"name": "bigPlayButton",
"align": "blabs",
"x": 30,
"y": 80
},
{
"name": "errorDisplay",
"align": "tlabs",
"x": 0,
"y": 0
},
{
"name": "infoDisplay"
},
{
"name": "controlBar",
"align": "blabs",
"x": 0,
"y": 0,
"children": [
{"name":"progress","align":"blabs","x":0,"y":44},
{"name":"playButton","align":"tl","x":15,"y":12},
{"name": "volume","align": "tr","x": 10, "y": 10},
{"name":"timeDisplay","align":"tl","x":10,"y":7},
// {"name":"fullScreenButton","align":"tr","x":10,"y":10},
]
}
]
}, function (player) {
console.log("画中画播放器创建成功");
player.play()
})
$('#player-con .prism-volume').before('<div class="hzh-fullscreen" style="float:right;margin-right:15px; margin-top:10px;height:28px;line-height:28px; "><a href="javascript:viod(0);" style="color:#ffffff;" onclick="show_fullscreen()"><svg t="1582700473916" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6096" width="28" height="28"><path d="M960.096 927.914V672.297c0-32.847-32.029-32.847-32.029-32.847s-32.029 0-31.926 32.847v179.075L630.803 587.058c-23.228-23.229-45.843-0.614-45.843-0.614s-22.614 22.614 0.614 45.843l265.03 264.11h-177.64c-32.848 0-32.848 32.028-32.848 32.028s0 32.03 32.848 31.927h255.001s0.511 0 1.432-0.103c10.233-0.511 17.09-4.195 21.592-9.004 4.707-4.503 8.39-11.257 8.902-21.387 0.103-1.023 0.103-1.535 0.103-1.535s0.102-0.102 0.102-0.41zM630.803 436.737l264.11-265.03v177.642c0 32.847 32.029 32.847 32.029 32.847s32.028 0 31.926-32.847V94.346s0-0.51-0.102-1.432c-0.512-10.233-4.196-17.089-9.005-21.591-4.503-4.707-11.256-8.391-21.387-8.903-1.023-0.102-1.535-0.102-1.535-0.102H670.711c-32.847 0-32.847 32.029-32.847 32.029s0 32.029 32.847 31.926h179.075L585.574 391.508c-23.228 23.229-0.614 45.843-0.614 45.843s22.717 22.615 45.843-0.614zM173.088 126.785H350.73c32.848 0 32.848-32.029 32.848-32.029s0-32.029-32.848-31.926H95.728s-0.511 0-1.432 0.102c-10.336 0.512-17.09 4.195-21.592 8.903-4.707 4.502-8.39 11.256-8.902 21.386-0.103 1.023-0.103 1.535-0.103 1.535v256.128c0 32.847 32.03 32.847 32.03 32.847s32.028 0 31.926-32.847V171.809l265.337 264.315c23.229 23.228 45.843 0.613 45.843 0.613s22.615-22.614-0.614-45.843l-265.133-264.11z m218.881 459.761l-264.11 265.03v-177.64c0-32.848-32.028-32.848-32.028-32.848s-32.03 0-31.927 32.848v255.001s0 0.512 0.102 1.433c0.512 10.232 4.196 17.088 9.005 21.59 4.503 4.708 11.256 8.392 21.387 8.903 1.023 0.103 1.535 0.103 1.535 0.103H352.06c32.847 0 32.847-32.03 32.847-32.03s0-32.028-32.847-31.926H172.986l264.212-265.235c23.229-23.228 0.614-45.843 0.614-45.843s-22.717-22.614-45.843 0.614z" fill="#ffffff" p-id="6097"></path></svg></a></div>')
}
if (is_sy == "y") {
$("#player-con").append("<div class='watermark' style='position: absolute; font-size: 64px; color: rgba(183,183,183,0.3); top: 0; left: 0; width: 100%; height: 100%; text-align: center;'><span>"+username+"</span></div>")
$("#player-con .watermark").css("line-height", $(self.frameElement).height()+"px")
}
$(window.parent).on("resize", function() {
if (global_is_fullscreen) {
$(self.frameElement).parents(".layui-layer-iframe").css({
"width": window.parent.innerWidth+"px"
,"height": window.parent.innerHeight+"px"
})
// $("#player-con .watermark").css("line-height", window.parent.innerHeight+"px")
} else {
// console.log($(self.frameElement).parents(".layui-layer-iframe").height())
// $(self.frameElement).height($(self.frameElement).parents(".layui-layer-iframe").height() - 43)
// $("#player-con .watermark").css("line-height", ($(self.frameElement).parents(".layui-layer-iframe").height() - 43)+"px")
}
})
$(self.frameElement).parents(".layui-layer-iframe").on("resize", function() {
$(self.frameElement).height($(this).height()-43)
$("#player-con .watermark").css("line-height", ($(this).height()-43)+"px")
})
});
function show_fullscreen() {
layui.use(['layer', 'jquery'], function() {
var $ = layui.jquery
// iframe全屏(应对视频无法真全屏的设备)
var index = parent.layer.getFrameIndex(global_window_name); //先得到当前iframe层的索引
// parent.layer.full(index)
// 隐藏顶栏
$(self.frameElement).parents(".layui-layer-iframe").find(".layui-layer-title").hide()
$(self.frameElement).parents(".layui-layer-iframe").find(".layui-layer-setwin").hide()
// 视频全屏
// global_player.fullscreenService.requestFullScreen()
// 全屏宽高
$(self.frameElement).parents(".layui-layer-iframe").css({
"width": window.parent.innerWidth+"px"
,"height": window.parent.innerHeight+"px"
})
$("#player-con .watermark").css("line-height", window.parent.innerHeight+"px")
$(self.frameElement).parents(".layui-layer-iframe").addClass("hzh-fullscreen")
// 改全屏控件为退出全屏
$("#player-con .hzh-fullscreen").remove()
$('#player-con .prism-volume').before('<div class="hzh-channel-fullscreen" style="float:right;margin-right:15px; margin-top:10px;height:28px;line-height:28px; "><a href="javascript:viod(0);" style="color:#ffffff;" onclick="show_channel_fullscreen()"><svg t="1582700249932" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4554" width="28" height="28"><path d="M682.667 896h256a42.667 42.667 0 0 1 0 85.333h-256a42.667 42.667 0 0 1 0-85.333zM85.333 42.667h256a42.667 42.667 0 1 1 0 85.333h-256a42.667 42.667 0 1 1 0-85.333z" p-id="4555" fill="#ffffff"></path><path d="M981.333 682.667v256a42.667 42.667 0 0 1-85.333 0v-256a42.667 42.667 0 0 1 85.333 0zM128 85.333v256a42.667 42.667 0 1 1-85.333 0v-256a42.667 42.667 0 0 1 85.333 0z m42.667 469.334h256a42.667 42.667 0 0 1 0 85.333h-256a42.667 42.667 0 0 1 0-85.333zM597.333 384h256a42.667 42.667 0 0 1 0 85.333h-256a42.667 42.667 0 0 1 0-85.333z" p-id="4556" fill="#ffffff"></path><path d="M72.832 875.648l290.816-290.816a42.667 42.667 0 1 1 60.33 60.33L133.164 935.98a42.667 42.667 0 1 1-60.331-60.331z m501.12-482.901L891.733 74.965a42.667 42.667 0 0 1 60.331 60.331L634.283 453.077a42.667 42.667 0 1 1-60.331-60.33z" p-id="4557" fill="#ffffff"></path><path d="M469.333 597.333v256a42.667 42.667 0 0 1-85.333 0v-256a42.667 42.667 0 0 1 85.333 0zM640 170.667v256a42.667 42.667 0 0 1-85.333 0v-256a42.667 42.667 0 1 1 85.333 0z" p-id="4558" fill="#ffffff"></path></svg></a></div>')
global_is_fullscreen = true
})
}
function show_channel_fullscreen() {
layui.use(['layer', 'jquery'], function() {
var $ = layui.jquery
// iframe全屏(应对视频无法真全屏的设备)
var index = parent.layer.getFrameIndex(global_window_name); //先得到当前iframe层的索引
// 退出全屏
// global_player.fullscreenService.cancelFullScreen()
// 显示顶栏
$(self.frameElement).parents(".layui-layer-iframe").find(".layui-layer-title").show()
$(self.frameElement).parents(".layui-layer-iframe").find(".layui-layer-setwin").show()
$(self.frameElement).parents(".layui-layer-iframe").removeClass("hzh-fullscreen")
if (window.screen.width < 450){
$(self.frameElement).parents(".layui-layer-iframe").css({
"width": "280px"
,"height": "210px"
,"top": (window.parent.innerHeight - 210)+"px"
,"left": (window.parent.innerWidth - 280)+"px"
})
} else {
$(self.frameElement).parents(".layui-layer-iframe").css({
"width": "400px"
,"height": "300px"
,"top": (window.parent.innerHeight - 300)+"px"
,"left": (window.parent.innerWidth - 400)+"px"
})
}
$(self.frameElement).height($(self.frameElement).parents(".layui-layer-iframe").height() - 43)
$("#player-con .watermark").css("line-height", ($(self.frameElement).parents(".layui-layer-iframe").height() - 43)+"px")
// 改退出全屏控件为全屏
$("#player-con .hzh-channel-fullscreen").remove()
$('#player-con .prism-volume').before('<div class="hzh-fullscreen" style="float:right;margin-right:15px; margin-top:10px;height:28px;line-height:28px; "><a href="javascript:viod(0);" style="color:#ffffff;" onclick="show_fullscreen()"><svg t="1582700473916" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6096" width="28" height="28"><path d="M960.096 927.914V672.297c0-32.847-32.029-32.847-32.029-32.847s-32.029 0-31.926 32.847v179.075L630.803 587.058c-23.228-23.229-45.843-0.614-45.843-0.614s-22.614 22.614 0.614 45.843l265.03 264.11h-177.64c-32.848 0-32.848 32.028-32.848 32.028s0 32.03 32.848 31.927h255.001s0.511 0 1.432-0.103c10.233-0.511 17.09-4.195 21.592-9.004 4.707-4.503 8.39-11.257 8.902-21.387 0.103-1.023 0.103-1.535 0.103-1.535s0.102-0.102 0.102-0.41zM630.803 436.737l264.11-265.03v177.642c0 32.847 32.029 32.847 32.029 32.847s32.028 0 31.926-32.847V94.346s0-0.51-0.102-1.432c-0.512-10.233-4.196-17.089-9.005-21.591-4.503-4.707-11.256-8.391-21.387-8.903-1.023-0.102-1.535-0.102-1.535-0.102H670.711c-32.847 0-32.847 32.029-32.847 32.029s0 32.029 32.847 31.926h179.075L585.574 391.508c-23.228 23.229-0.614 45.843-0.614 45.843s22.717 22.615 45.843-0.614zM173.088 126.785H350.73c32.848 0 32.848-32.029 32.848-32.029s0-32.029-32.848-31.926H95.728s-0.511 0-1.432 0.102c-10.336 0.512-17.09 4.195-21.592 8.903-4.707 4.502-8.39 11.256-8.902 21.386-0.103 1.023-0.103 1.535-0.103 1.535v256.128c0 32.847 32.03 32.847 32.03 32.847s32.028 0 31.926-32.847V171.809l265.337 264.315c23.229 23.228 45.843 0.613 45.843 0.613s22.615-22.614-0.614-45.843l-265.133-264.11z m218.881 459.761l-264.11 265.03v-177.64c0-32.848-32.028-32.848-32.028-32.848s-32.03 0-31.927 32.848v255.001s0 0.512 0.102 1.433c0.512 10.232 4.196 17.088 9.005 21.59 4.503 4.708 11.256 8.392 21.387 8.903 1.023 0.103 1.535 0.103 1.535 0.103H352.06c32.847 0 32.847-32.03 32.847-32.03s0-32.028-32.847-31.926H172.986l264.212-265.235c23.229-23.228 0.614-45.843 0.614-45.843s-22.717-22.614-45.843 0.614z" fill="#ffffff" p-id="6097"></path></svg></a></div>')
global_is_fullscreen = false
})
}
</script>
</html>