inputAutoDealerInfoComp("#batchId","couponBatch/getBatchList.htm");
//网点下拉提示
function inputAutoDealerInfoComp(item,url){
// alert("dfasdf");//这个有反应
$(item).autocomplete({
serviceUrl: url,
autoSelectFirst:true,
showNoSuggestionNotice:true,
noSuggestionNotice: ' ',
ajaxSettings:{
dataType: "json",
type: "post",
},
paramName: 'batchId',
noCache:true,
transformResult: function(response) {
return {
suggestions: $.map(response, function(dataItem) {
return { value: dataItem.orgName, data: dataItem };
})
};
},
onSelect: function (suggestion) {
},
onSearchComplete: function (query, suggestions) {
var isResult = false;
// alert("dfasdf");//这个没有反应
$.each(suggestions,function(n,value) {
if (query == value.value){
isResult = true;
return false;
}
});
}
});
}