1<script type="Text/javascript">2 function Gongdan_search (elm) {3 varDangqian_value=$ (Elm). Val ();4 if(dangqian_value) {5 $.ajax ({6Url:'__url__/order_infos_list_search',7Type'Post',8 Data:{dangqian_value:dangqian_value},9 success:function (data) {Ten if(data!=0){ One varD=eval ("("+data+")");//the JSON array returned by the JS loop processing background A varcompany=D.company; - varCus_name=D.cus_name; - varAddr=d.addr; the varCus_mobi=D.cus_mobi; - varWnumber=D.wnumber; - if(company) { -$('. Company_view'). HTML (company); + } - if(cus_name) { +$('. Cus_name_view'). HTML (cus_name); A } at if(addr) { -$('. Addr_view'). html (addr); - } - if(Cus_mobi) { -$('. Cus_mobi_view'). HTML (cus_mobi); - } in if(wnumber) { -$('. Gongdanhao_view'). Val (wnumber); to } +}Else{ -$('. Company_view'). HTML ('No data currently'); the$('. Cus_name_view'). HTML ('No data currently'); *$('. Addr_view'). HTML ('No data currently'); $$('. Cus_mobi_view'). HTML ('No data currently');Panax Notoginseng } - } the }); + } A } the</script> + - $ $ Publicfunction Order_infos_list_search () { -$dangqian _value=$ This->_post ('Dangqian_value'); - if(!$dangqian _value) { the return false; - }Wuyi$where=NULL; the$where['Wnumber']=$dangqian _value; -$result =m ('order_list'),where($where)->field ('wnumber,uid,cus_name,cus_mobi,addr'),find (); Wu if(! $result ['UID']){ - return false; About } $$map =NULL; -$map ['UID']= $result ['UID']; -$factory _infos=m ('user_factory'),where($map)->field (' Company'),find (); - if(!$factory _infos) { A return false; + } the$arr =Array (); -$arr [' Company']= $factory _infos[' Company']; $$arr ['Cus_name']= $result ['Cus_name']; the$arr ['Addr']= $result ['Addr']; the$arr ['Cus_mobi']= $result ['Cus_mobi']; the$arr ['Wnumber']= $result ['Wnumber']; the if(!empty ($arr)) { -echo Json_encode ($arr);//returns an array of Josn in}Else{ theEcho0; the } About } the the the + varcontent1=$ ("input[name= ' Compliant_jibie ']:checked"). Val ();//jquery Select the current radio button to get the value -alert (CONTENT1);
The JSON array returned by the JS loop processing background