AJAX返回map的前后端
js: $.ajax({
type: "POST",
url: '<%=basePath%>sa_saleorder/findbycp_ck.do',
data: {IDINVENTORY:IDINVENTORYvalue,tm:new Date().getTime(),IDWAREHOUSE:IDWAREHOUSEvalue},
dataType:'json',
cache: false,
success: function(data){
alert(data.可用量);
}
});
java:
@RequestMapping(value="/findbycp_ck")
@ResponseBody
public Object getbycustomer_name()throws Exception{
// Map<String,Object> map = new HashMap<String,Object>();
PageData pd = new PageData();
pd = this.getPageData();
pd=sa_saleordermxService.findBycp_ck(pd);
return AppUtil.returnObject(new PageData() , pd);
}