• Lyaer 单弹出层获取数据


     案例完整代码如下

     var cls = layer.open({
                    title: "请选择被换班人",
                    type: 2,
                    area: ['700px', '500px'],
                    maxmin: false,
                    content: "/PbManagementV3/ChangeWorkV3/GetTimePeople?time=" + time + "&myTime=" + myTime + "&userId=" + userId,
                    btn: ["确定"],
                    yes: function (index, layero) {

    // 先获取弹出层位置
                        //var test = $(layero).children().find("#test");
                        var body = layer.getChildFrame('body', index);
                        var selected = body.find("input[name='userID']:checked");
                        var userid = $(selected).val();
                        if (userid === "" || userid == undefined) {
                            layer.close(index);
                            return;
                        }
                        var startTime = selected.data("starttime");
                        var endTime = selected.data("endtime");
                        var timeStr = time + " " + startTime + "--" + endTime;

                        $("#BeTimeStr").val(timeStr);
                        $("#BeUserName").val(selected.data("username"));
                        $("#BeUserId").val(userid);
                        $("#BePositionPbMapV3Id").val(selected.data("bepositionpbmapv3id"));
                        $("#BePositionName").val(selected.data("positionname"));
                        layer.close(index);

                        initIsOnDuty();
                    },
                    cancel: function (index, layero) {
                    }
                });

  • 相关阅读:
    在eclipse中运行正常的java项目放到tomcat中报错的解决办法
    xml和json之间的转换
    读取文件工具类
    java解压文件
    常用语句
    形容词&&人称词
    称呼
    单词-数字使用
    单词-数字:十位20-29
    单词-数字:十位11-19
  • 原文地址:https://www.cnblogs.com/louby/p/5946804.html
Copyright © 2020-2023  润新知