add: function () {
$(document).on("change", "#c-ditch_id", function () {
$.post("goods/index",{
//搜索条件,上一个selectpage选择完后传过来的id作为此次搜索的条件
custom: {ditch_id: $('#c-ditch_id').val()},
keyField:'id',
showField:'goods_name',
},function(result){
console.log(result);
//刷新数据的关键,我也是看了文档才知道有这么一个方法,动态更改数据源
$('#c-goods_id').selectPageData(result.list);
});
})
Controller.api.bindevent();
},
fastadmin 二级联动
最新推荐文章于 2024-05-11 15:12:25 发布