$("#" + inputId).on("input", function () {
var checkboxId = $("#" + inputId).attr("target");
if ($("#" + inputId).val().length == 0) {
//关闭复选框
if ($("#" + checkboxId).next().hasClass("layui-form-checked"))
{
$("#" + checkboxId).next().click();
}
} else {
//开启复选框
if (!$("#" + checkboxId).next().hasClass("layui-form-checked")) {
$("#" + checkboxId).next().click();
}
}
})