【分页搜索下拉插件(SelectPage)】文档地址:https://terryz.github.io/selectpage/docs.html
function initForm(){
$('#newOwner_name_select').selectPage({
showField : 'owner_name',
keyField : 'uuid',
data : basePath +'owner/getList.ui',
params : function(){return {}},
formatItem : function(data){//自定义显示数据
return data.owner_name + '--' + data.phone.replace(/(\d{3})\d{4}(\d{4})/, '$1****$2');
},
eAjaxSuccess : function(data){
if(data && 1 == data.code){
return data
}else{
layer.alert('操作失败, '+data.message, {title : '提示框', icon : 2})
}
}
});
}
文章图片