'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"]; } //文胸 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; } //童装 if($child_sizegroup_title){ $tmp=get_db_msg("select id from ".$table_pre."keyword where cate='size' and title='".$child_sizegroup_title."' limit 0,1"); $child_sizegroup_id=$tmp["id"]; }else{ $child_sizegroup_id=0; } $con_spk=($is_spk=="y")?" and is_sp<>'y'":""; $flag_spk=($is_spk=="y")?"1":""; //------------------------------------包含定制模块,店铺界面,顶部已订数和完成率的显示 //include_once $path_dz."/dp/wcl.php"; // //--------------交单按钮 $jd_password=get_set("jd_password"); if($is_brand<>"y"){ $tmp=$msg_login; $is_jd=$msg_login["is_jd"]; $is_checked=$msg_login["is_checked"]; }else{ $tmp=get_db_msg("select is_jd from ".$table_pre."client_brand where cid='".$uid."'".$con_brand." order by is_jd limit 0,1"); $is_jd=$tmp["is_jd"]; $tmp=get_db_msg("select is_checked from ".$table_pre."client_brand where cid='".$uid."'".$con_brand." order by is_checked limit 0,1"); $is_checked=$tmp["is_checked"]; } if($show_jd=="y"){ if($is_jd=="y") $jd_button="已交单|"; if($is_checked=="y") $jd_button="已确认|"; if($is_brand=="y"){ $jd_button="交单|go_url('".$_SERVER[PHP_SELF]."?_m=".$_m."&_a=o&s_tab=wcl')"; }else{ if($is_jd!="y" && $is_checked!="y") $jd_button="交单|do_jd('".$jd_password."','".$_SERVER[PHP_SELF]."?_m=".$_m."&_a=jd".$link_var_brand."')"; } }else{ $jd_button="|"; } //计算订货规则按钮 $tmp=get_db_msg("select count(*) 'num' from ".$table_pre."gz where dj='' or dj='".$msg_login["dj"]."'"); if($tmp["num"]>0) $menu_dhgz="订货规则"; else $menu_dhgz=""; switch($_a){ case "single": $msg_err=""; $msg_cc=get_db_msg("select * from ".$table_pre."kh_cc where zsh='".$zsh."'"); /*if(!$msg_cc["id"]){ //echo_wrong("数据不存在!"); $msg_err="数据不存在!"; } if($msg_err){ $json_data.="\"error\":\"".$msg_err."\","; }else{*/ $s_title=trim($s_title); if($s_title){ $msg_dp=get_db_msg("select * from ".$table_pre."kh_cc where title like '%".$s_title."%' order by zsh,ord limit 0,1"); $m1=get_db_msg("select count(distinct zsh) 'num' from ".$table_pre."kh_cc where title like '%".$s_title."%'"); $q1="select * from ".$table_pre."kh_cc where title like '%".$s_title."%' group by zsh order by zsh"; // $tmp=get_db_msg("select min(zsh) 'zsh' from ".$table_pre."kh_cc where title like '%".$s_title."%'"); $zsh=$tmp["zsh"]; }else{ if($zsh){ $msg_dp=get_db_msg("select * from ".$table_pre."kh_cc where zsh='".$zsh."' order by ord"); }else{ $tmp=get_db_msg("select min(zsh) 'zsh' from ".$table_pre."kh_cc"); $zsh=$tmp["zsh"]; $msg_dp=get_db_msg("select * from ".$table_pre."kh_cc where zsh='".$zsh."' order by ord"); } $m1=get_db_msg("select count(distinct zsh) 'num' from ".$table_pre."kh_cc where zsh='".$zsh."'"); $q1="select * from ".$table_pre."kh_cc where zsh='".$zsh."' group by zsh order by zsh"; } //if(!$msg_dp["id"]) //echo_wrong("记录不存在!"); $str_title=""; if($m1["num"]>1){ $r2=$db->query($q1); while($m2=$db->fetch_array($r2)){ //$str_title.="".$m2["zsh"]."#".$m2["title"]."     "; $msg_err.=$m2["zsh"]."#".$m2["title"]."|"; $str_title.="{\"zsh\":\"".$m2["zsh"]."\",\"title\":\"".$m2["zsh"]."#".$m2["title"]."\"},"; } if($msg_err){ $str_title=deel_end($str_title); $msg_err="存在以下符合条件的多个款:".$msg_err; } //echo_wrong("
找到以下符合条件的多项,请选择:
".$str_title."
"); } if(!$msg_dp["id"]){ $msg_err="记录不存在"; } if($msg_err){ if($str_title){ $json_data.="\"code\":101,"; $json_data.="\"msg\":[".$str_title."],"; }else{ $json_data.="\"code\":102,"; $json_data.="\"msg\":\"".$msg_err."\","; } }else{ $json_data.="\"code\":100,"; $json_data.="\"sys_ck_input\":\"".$sys_ck_input."\","; //橱窗选项 $q="select * from ".$table_pre."kh_cc group by zsh order by zsh"; $r=$db->query($q); $op_cc=""; $select_dz=""; $tmp=""; while($m=$db->fetch_array($r)){ $op_cc.="
"; /*//橱窗选项 $q="select zsh,title from ".$table_pre."kh_cc group by zsh order by zsh"; $r=$db->query($q); $op_cc=""; while($m=$db->fetch_array($r)){ $t=trim($m["title"])?$m["zsh"].".".$m["title"]:$m["zsh"]; $op_cc.="