7e47ce238b
添加了管理后台所需的图片资源、Excel文件、安装程序以及设计相关的图片文件
317 lines
11 KiB
PHP
317 lines
11 KiB
PHP
<?php
|
|
//-------------------------------订单明细
|
|
header("Content-type: text/html; charset=utf-8");
|
|
$json_data="{";
|
|
if(THIS_IN!="edt_ipad")
|
|
exit("错误的访问!");
|
|
$msg_client=get_db_msg("select * from ".$table_pre."client where id='".$uid."'");
|
|
//
|
|
$msg_login=get_db_msg("select * from ".$table_pre."client where id='".$uid."'");
|
|
$p=$msg_login["path"]."-".$msg_login["id"];
|
|
$face=$msg_client["face"];
|
|
$ph_ms=get_set("ph_ms");
|
|
$arr_ph_ms=explode(",",$ph_ms);
|
|
$sys_size_num=get_max_size_num();
|
|
$s_key=$s_key?$s_key:$_key;
|
|
//取得选项
|
|
$arr_upath=explode(",",$msg_login["charge_path"]);
|
|
$cou_u_all=get_qj_ucon_all($msg_login["charge_path_real"]);
|
|
$is_spk=get_set("is_spk");
|
|
if($face=="1") $cou_u_all="";
|
|
$arr_select_no=array();
|
|
$arr_select_title=array();
|
|
$q="select no,title from ".$table_pre."keyword where cate='arr_select' and flag_ka='y' and flag_bd='n' and no<>'sx' and no<>'zd1' and no<>'zd2' and no<>'zd3' order by ord";
|
|
$r=$db->query($q);
|
|
while($m=$db->fetch_array($r)){
|
|
$arr_select_no[]=$m["no"];
|
|
$arr_select_title[]=$m["title"];
|
|
}
|
|
|
|
$is_sy=get_set("is_sy");
|
|
$json_data.="\"username\":\"".$msg_client["username"]."\",";
|
|
$json_data.="\"is_sy\":\"".$is_sy."\",";
|
|
|
|
|
|
$s_uid=$s_uid?$s_uid:$uid;
|
|
$s_ka=$s_ka?$s_ka:"n";
|
|
$con="";
|
|
$con_u="";
|
|
if($s_uid){
|
|
if($s_uid=="_ALL_"){
|
|
$con.=$cou_u_all;
|
|
$con_u.=$cou_u_all;
|
|
}else{
|
|
$m1=get_db_msg("select * from ".$table_pre."client where id='".$s_uid."'");
|
|
if($m1["face"]=="4"){
|
|
$con.=" and uid='".$s_uid."'";
|
|
$con_u.=" and uid='".$s_uid."'";
|
|
}else{
|
|
$con.=" and (upath='".$m1["path"]."-".$m1["id"]."' or upath like '".$m1["path"]."-".$m1["id"]."-%')";
|
|
$con_u.=" and (upath='".$m1["path"]."-".$m1["id"]."' or upath like '".$m1["path"]."-".$m1["id"]."-%')";
|
|
}
|
|
}
|
|
}else{
|
|
$con.=" and uid=0";
|
|
$con_u.=" and uid=0";
|
|
}
|
|
for($i=0;$i<count($arr_select_no);$i++){
|
|
$v="s_".$arr_select_no[$i];
|
|
if($$v)
|
|
$con.=" and ".$arr_select_no[$i]."='".$$v."'";
|
|
}
|
|
if($s_tab=="ph"){
|
|
if($s_qy && $s_qy!="-all-")
|
|
$con.=" and qy='".$s_qy."'";
|
|
}else{
|
|
if($s_ka=="n")
|
|
$con.=" and ka<>'y'";
|
|
else if($s_ka=="y")
|
|
$con.=" and ka='y'";
|
|
}
|
|
$con1=" and ka<>'y'";
|
|
//饰品款条件
|
|
if($s_is_sp=="n"){
|
|
$con1.=" and is_sp<>'y'";
|
|
$con.=" and is_sp<>'y'";
|
|
}else if($s_is_sp=="y"){
|
|
$con1.=" and is_sp='y'";
|
|
$con.=" and is_sp='y'";
|
|
}
|
|
if($s_brand)
|
|
$con1.=" and brand='".$s_brand."'";
|
|
if($s_season)
|
|
$con1.=" and season='".$s_season."'";
|
|
//饰品款条件
|
|
//$s_is_sp="n";
|
|
if($s_is_sp=="n"){
|
|
$con1.=" and is_sp<>'y'";
|
|
$con.=" and is_sp<>'y'";
|
|
}else if($s_is_sp=="y"){
|
|
$con1.=" and is_sp='y'";
|
|
$con.=" and is_sp='y'";
|
|
}
|
|
$json_data.="\"face\":\"".$face."\",";
|
|
//$search_select_no=$search_select_op=array();
|
|
//if($face==2) $face=3;
|
|
switch($face){
|
|
case "1":
|
|
$op_client="";
|
|
$i1=0;
|
|
$search_select_no[$i1]="s_uid";
|
|
$search_select_op[$i1][]="-请选择客户-";
|
|
$search_select_op[$i1]["_ALL_"]="所有客户";
|
|
$r=$db->query("select * from ".$table_pre."client where face='4' order by concat(path,'-',id)");
|
|
while($m=$db->fetch_array($r)){
|
|
$op_client.="<option value=\"".$m["id"]."\"";
|
|
if($s_uid==$m["id"])
|
|
$op_client.=" selected";
|
|
$op_client.=">".$m["title"]."(".$m["username"].")-".$m["order_num"]."件</option>";
|
|
$search_select_op[$i1][$m["id"]]="".$m["title"]."(".$m["username"].")-".$m["order_num"]."件";
|
|
}
|
|
$i1++;
|
|
//删除款过滤
|
|
$search_select_no[$i1]="s_ka";
|
|
$search_select_op[$i1]=array("n"=>"非删除款","y"=>"删除款");
|
|
$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++;
|
|
}
|
|
$i++;
|
|
//排序
|
|
|
|
$search_select_no[$i1]="s_order";
|
|
$search_select_op[$i1]=array("num"=>"数量排序","no"=>"款号排序","je"=>"金额排序");
|
|
//选项前面
|
|
$select_qm="";
|
|
$arr_sz=array();
|
|
for($i=0;$i<count($search_select_no);$i++){
|
|
$tmp="";
|
|
foreach($search_select_op[$i] as $key=>$value){
|
|
$tmp.="{\"no\":\"".$key."\",\"title\":\"".$value."\"},";
|
|
$arr_sz[$i]=$value;
|
|
}
|
|
$tmp=deel_end($tmp);
|
|
$var=$search_select_no[$i];
|
|
$select_qm.="{\"no\":\"".$search_select_no[$i]."\",\"title\":\"".$search_select_op[$i][0]."\",\"value\":\"".$$var."\",\"op\":[".$tmp."]},";
|
|
}
|
|
$select_qm=deel_end($select_qm);
|
|
$json_data.="\"select_qm\":[".$select_qm."],";
|
|
//$content_search.=" <input type=\"button\" value=\"打 印\" onclick=\"window.print();\">";
|
|
//----------------------------------------------取得订单记录
|
|
|
|
break;
|
|
case "2":
|
|
//-------------------------------------------------------------------------区经
|
|
$op_client="";
|
|
$i1=0;
|
|
$search_select_no[$i1]="s_uid";
|
|
$search_select_op[$i1][]="-请选择客户-";
|
|
$search_select_op[$i1]["_ALL_"]="所有客户";
|
|
for($i=0;$i<count($arr_upath);$i++){
|
|
$v=get_parent_id($arr_upath[$i]);
|
|
$m1=get_db_msg("select id,path,title,username,face,order_num from ".$table_pre."client where id='".$v."'");
|
|
if($m1["face"]=="4" || ($m1["face"]!="4" && check_qj_priv_all($m1["id"])=="y")){
|
|
$op_client.="<option value=\"".$v."\"";
|
|
if($s_uid==$v)
|
|
$op_client.=" selected";
|
|
$this_js="";
|
|
if($m1["order_num"]>0)
|
|
$this_js="-".$m1["order_num"]."件";
|
|
$op_client.=">".$m1["title"]."(".$m1["username"].")".$this_js."</option>";
|
|
$search_select_op[$i1][$v]="".$m1["title"]."(".$m1["username"].")".$this_js."";
|
|
}
|
|
}
|
|
$i1++;
|
|
//删除款过滤
|
|
$search_select_no[$i1]="s_ka";
|
|
$search_select_op[$i1]=array("n"=>"非删除款","y"=>"删除款");
|
|
$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++;
|
|
}
|
|
$i++;
|
|
//排序
|
|
|
|
$search_select_no[$i1]="s_order";
|
|
$search_select_op[$i1]=array("num"=>"数量排序","no"=>"款号排序","je"=>"金额排序");
|
|
//选项前面
|
|
$select_qm="";
|
|
$arr_sz=array();
|
|
for($i=0;$i<count($search_select_no);$i++){
|
|
$tmp="";
|
|
foreach($search_select_op[$i] as $key=>$value){
|
|
$tmp.="{\"no\":\"".$key."\",\"title\":\"".$value."\"},";
|
|
$arr_sz[$i]=$value;
|
|
}
|
|
$tmp=deel_end($tmp);
|
|
$var=$search_select_no[$i];
|
|
$select_qm.="{\"no\":\"".$search_select_no[$i]."\",\"title\":\"".$search_select_op[$i][0]."\",\"value\":\"".$$var."\",\"op\":[".$tmp."]},";
|
|
}
|
|
$select_qm=deel_end($select_qm);
|
|
$json_data.="\"select_qm\":[".$select_qm."],";
|
|
//$content_search.=" <input type=\"button\" value=\"打 印\" onclick=\"window.print();\">";
|
|
//----------------------------------------------取得订单记录
|
|
break;
|
|
case "3":
|
|
//-------------------------------------------------------------------------代理
|
|
$op_client="";
|
|
$i1=0;
|
|
$search_select_no[$i1]="s_uid";
|
|
$search_select_op[$i1][]="-请选择客户-";
|
|
$r=$db->query("select id,title,username,order_num from ".$table_pre."client where path='".$p."' or path like '".$p."-%' order by path,ord");
|
|
while($m=$db->fetch_array($r)){
|
|
$op_client.="<option value=\"".$m["id"]."\"";
|
|
if($s_uid==$m["id"])
|
|
$op_client.=" selected";
|
|
$op_client.=">".$m["title"]."(".$m["username"].")-".$m["order_num"]."件</option>";
|
|
$search_select_op[$i1][$m["id"]]="".$m["title"]."(".$m["username"].")-".$m["order_num"]."件";
|
|
}
|
|
$i1++;
|
|
//删除款过滤
|
|
$search_select_no[$i1]="s_ka";
|
|
$search_select_op[$i1]=array("n"=>"非删除款","y"=>"删除款");
|
|
$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++;
|
|
}
|
|
$i++;
|
|
//排序
|
|
$search_select_no[$i1]="s_order";
|
|
$search_select_op[$i1]=array("num"=>"数量排序","no"=>"款号排序","je"=>"金额排序");
|
|
//选项前面
|
|
$select_qm="";
|
|
$arr_sz=array();
|
|
for($i=0;$i<count($search_select_no);$i++){
|
|
$tmp="";
|
|
foreach($search_select_op[$i] as $key=>$value){
|
|
$tmp.="{\"no\":\"".$key."\",\"title\":\"".$value."\"},";
|
|
$arr_sz[$i]=$value;
|
|
}
|
|
$tmp=deel_end($tmp);
|
|
$var=$search_select_no[$i];
|
|
$select_qm.="{\"no\":\"".$search_select_no[$i]."\",\"title\":\"".$search_select_op[$i][0]."\",\"value\":\"".$$var."\",\"op\":[".$tmp."]},";
|
|
}
|
|
$select_qm=deel_end($select_qm);
|
|
$json_data.="\"select_qm\":[".$select_qm."],";
|
|
//$content_search.=" <input type=\"button\" value=\"打 印\" onclick=\"window.print();\">";
|
|
//----------------------------------------------取得订单记录
|
|
break;
|
|
case "4":
|
|
//-------------------------------------------------------------------------店铺角色
|
|
//包含定制模块
|
|
//删除款过滤
|
|
$i1=0;
|
|
$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"=>"数量排序");
|
|
//选项前面
|
|
$select_qm="";
|
|
$arr_sz=array();
|
|
for($i=0;$i<count($search_select_no);$i++){
|
|
$tmp="";
|
|
foreach($search_select_op[$i] as $key=>$value){
|
|
$tmp.="{\"no\":\"".$key."\",\"title\":\"".$value."\"},";
|
|
$arr_sz[$i]=$value;
|
|
}
|
|
$tmp=deel_end($tmp);
|
|
$var=$search_select_no[$i];
|
|
$select_qm.="{\"no\":\"".$search_select_no[$i]."\",\"title\":\"".$search_select_op[$i][0]."\",\"value\":\"".$$var."\",\"op\":[".$tmp."]},";
|
|
}
|
|
$select_qm=deel_end($select_qm);
|
|
$json_data.="\"select_qm\":[".$select_qm."],";
|
|
break;
|
|
}
|
|
if($sys_ver_hy=="tz"){
|
|
include_once $path_dz."/dp/detail_tz.php";
|
|
}elseif($sys_ver_hy=="xz"){
|
|
include_once $path_dz."/dp/detail_xz.php";
|
|
}else{
|
|
include_once $path_dz."/dp/detail.php";
|
|
}
|
|
$json_data=substr($json_data,0,-1)."}";
|
|
echo $json_data;
|
|
?>
|