表单监听下拉选择
字符串转数组
var strs= new Array(); //定义一数组
strs=data.value.split(","); //字符分割
form.on('select(test)', function (data) {
$("#suppsID").empty();
console.log(data);
var strs= new Array(); //定义一数组
strs=data.value.split(","); //字符分割
$.ajax({
// url: "http://60.29.154.146:8278/supplier1/getBom?username='" + parent.layui.index.getCookie("username") + "'&&Admin='" + parent.layui.index.getCookie("Admin") + "'"
url: "/getPersonList/"+strs[0]+""
, dataType: 'json'
, type: 'get'
, async: false
, success: function (result) {
$.each(result.data, function (index, item) {
console.log(item);
$("#suppsID").append("<input lay-filter='checkSPR' type='checkbox' name='checkSPR' title='" + item["pERSONNAME"] + "' value='" + item["pERSONID"] + "' checked=''>");
setpVenName()
});
form.render();
}
});
});