jeecg 二级联动例子
前台JS
var aircodeEdit = $('#aircodeEdit').combobox({
url:'airlinesAction!doListAirlines.action',
mode:'remote',
valueField:'aircode',
editable:false,
textField:'airlinesname',
onSelect:function(record){
$('#airlinesnameEdit').val(record.airlinesname);
tripwayidEdit.combobox({
url:'tripWayAction!doListTripWay.action?aircode='+record.aircode,
mode:'remote',
valueField:'obid',
editable:false,
textField:'tripname',
onSelect:function(record){
$('#tripnameEdit').val(record.tripname);
}
}).combobox('clear');
}
});
var tripwayidEdit = $('#tripwayidEdit').combobox({
url:'tripWayAction!doListTripWay.action?aircode='+aircodeEdit.val(),
mode:'remote',
valueField:'obid',
editable:false,
textField:'tripname',
onSelect:function(record){
$('#tripnameEdit').val(record.tripname);
}
});
后台action方法
public void doListTripWay(){
String aircode = this.getRequest().getParameter("aircode");
writeJson(tripWayService.findTripWayByAirCode(aircode));
}
谢谢分享 学习中,支持下
页:
[1]