增加 用户关联职员列表 的模块,方便操作员进行数据的查询 (按钮: 新增,编辑,删除(单行),列设置,按钮设置,退出)
2个文件已修改
2个文件已添加
1306 ■■■■■ 已修改文件
WebTM/Properties/PublishProfiles/JFTM.pubxml.user 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/WebTM.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/系统管理/用户管理/Gy_UserEmployeeList.html 597 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/系统管理/用户管理/Gy_UserEmployeeList_Edit.html 697 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/Properties/PublishProfiles/JFTM.pubxml.user
@@ -18,10 +18,10 @@
      <publishTime>01/28/2016 14:22:24</publishTime>
    </File>
    <File Include="bin/WebTM.dll">
      <publishTime>01/31/2024 08:56:46</publishTime>
      <publishTime>01/31/2024 13:39:17</publishTime>
    </File>
    <File Include="bin/WebTM.pdb">
      <publishTime>01/31/2024 08:56:46</publishTime>
      <publishTime>01/31/2024 13:39:17</publishTime>
    </File>
    <File Include="HtmlPage1.html">
      <publishTime>04/11/2023 16:34:42</publishTime>
@@ -4238,6 +4238,12 @@
    <File Include="views/系统管理/用户管理/Gy_UserEmployee.html">
      <publishTime>01/03/2024 12:55:26</publishTime>
    </File>
    <File Include="views/系统管理/用户管理/Gy_UserEmployeeList.html">
      <publishTime>01/31/2024 13:40:46</publishTime>
    </File>
    <File Include="views/系统管理/用户管理/Gy_UserEmployeeList_Edit.html">
      <publishTime>01/31/2024 14:04:59</publishTime>
    </File>
    <File Include="views/系统管理/用户管理/Gy_UserEmployee_Excel.html">
      <publishTime>01/03/2024 12:55:26</publishTime>
    </File>
WebTM/WebTM.csproj
@@ -402,6 +402,8 @@
    <Content Include="views\系统管理\用户管理\Gy_UserByWorkStationList.html" />
    <Content Include="views\系统管理\用户管理\Gy_UserCustomerList.html" />
    <Content Include="views\系统管理\用户管理\Gy_UserCustomerList_Edit.html" />
    <Content Include="views\系统管理\用户管理\Gy_UserEmployeeList.html" />
    <Content Include="views\系统管理\用户管理\Gy_UserEmployeeList_Edit.html" />
    <Content Include="views\系统管理\用户管理\Gy_UserGroupList.html" />
    <Content Include="views\系统管理\用户管理\Gy_UserMaterList.html" />
    <Content Include="views\系统管理\用户管理\Gy_UserStockRelation.html" />
WebTM/views/ϵͳ¹ÜÀí/Óû§¹ÜÀí/Gy_UserEmployeeList.html
New file
@@ -0,0 +1,597 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>用户关联职员维护</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <!--<script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>-->
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <script src="../../../layuiadmin/HideButton.js"></script>
</head>
<body>
    <div class="layui-fluid">
        <div class="layui-col-md12">
            <div class="layui-card" style="padding: 1px">
                <div class="layui-card-body" style="padding: 1px;">
                    <form class="layui-form" action="" lay-filter="component-form-group">
                        <div class="layui-collapse">
                            <div class="layui-colla-item">
                                <div class="layui-colla-title layui-inline">
                                    <div class="layui-inline">
                                        <span>更多</span>
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width: 85px;">用户代码</label>
                                    <div class="layui-input-block" style="margin-left: 120px;">
                                        <input type="text" class="layui-input" name="HUserID" id="HUserID">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width: 85px;">用户名称</label>
                                    <div class="layui-input-block" style="margin-left: 120px;">
                                        <input type="text" class="layui-input" name="HUserName" id="HUserName">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width: 85px;">职员代码</label>
                                    <div class="layui-input-block" style="margin-left: 120px;">
                                        <input type="text" class="layui-input" name="HEmpNumber" id="HEmpNumber">
                                    </div>
                                </div>
                                <div class="layui-inline">
                                    <label class="layui-form-label" style="width: 85px;">职员名称</label>
                                    <div class="layui-input-block" style="margin-left: 120px;">
                                        <input type="text" class="layui-input" name="HEmpName" id="HEmpName">
                                    </div>
                                </div>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
                                </button>
                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">重置</button>
                                <div class="layui-colla-content" style="padding: 0px; margin-left: 6%;">
                                    <div class="layui-row" style="margin-top:5px">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">过滤</label>
                                            <div class="layui-input-block">
                                                <select name="ColName" id="ColName" lay-filter="ColName" style="width:190px;">
                                                </select>
                                            </div>
                                        </div>
                                        <div class="layui-inline">
                                            <select name="Comparator" id="Comparator" lay-filter="Comparator" style="width:190px;">
                                                <option value="0" selected="selected"></option>
                                                <option value="=">=</option>
                                                <option value=">=">>=</option>
                                                <option value=">">></option>
                                                <option value="<="><=</option>
                                                <option value="<"><</option>
                                                <option value="<>"><></option>
                                                <option value="7">包含</option>
                                                <option value="8">左包含</option>
                                                <option value="9">右包含</option>
                                                <option value="10">不包含</option>
                                            </select>
                                        </div>
                                        <div class="layui-inline">
                                            <input type="text" class="layui-input" value="" name="ColContent" id="ColContent">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <table class="" id="mainTable" lay-filter="mainTable"></table>
                        <script type="text/html" id="toolbarDemo">
                            <div class="layui-btn-container">
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew" id="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>新增</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill" id="set_ShowBill"><i class="layui-icon layui-icon-form"></i>编辑</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill" id="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>删除</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh" id="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>刷新</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit" id="get_Exit"><i class="layui-icon layui-icon-logout"></i>退出</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn" id="set_HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button>
                                <button type="button" class="layui-btn layui-btn-sm" lay-event="HideButton" id="HideButton"><i class="layui-icon layui-icon-form"></i>按钮设置</button>
                            </div>
                        </script>
                    </form>
                </div>
            </div>
        </div>
    </div>
    <script>
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index', //主入口模块
        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
            //#region å…¬ç”¨å˜é‡
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , element = layui.element
                , laypage = layui.laypage
                , laydate = layui.laydate
            var option = [];
            var sWhere = "";
            var HModName = "Gy_UserEmployeeList";
            //不需要显示的字段 å¯æ‰©å±•
            var titleData = ["HItemID","HEmployeeID","HOrgID"];
            //#endregion
            //#region è¿›å…¥é¡µé¢å³åŠ è½½
            //初始化界面
            set_ClearBill();
            //#endregion
            //#region è§¦å‘事件:包括form.on(){}格式的所有点击事件、选择事件等
            //#region å¤´å·¥å…·æ äº‹ä»¶
            table.on('toolbar(mainTable)', function (obj) {
                switch (obj.event) {
                    //新增
                    case 'set_AddNew': set_AddNew();
                        break;
                    //编辑
                    case 'set_ShowBill': set_ShowBill();
                        break;
                    //删除
                    case 'set_DeleteBill': set_DeleteBill();
                        break;
                    //刷新
                    case 'get_Refresh': get_Refresh();
                        break;
                    //退出按钮
                    case 'get_Exit': Pub_Close(2);
                        break;
                    //列设置
                    case 'set_HideColumn': get_HideColumn();
                        break;
                    //按钮设置
                    case 'HideButton':
                        var btns = document.getElementsByTagName("button");     //获取本页所有按钮对象
                        var HBillType = "Gy_UserEmployeeList";
                        get_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
                        break;
                };
            });
            //#endregion
            //#region ç‚¹å‡»è¡Œé€‰ä¸­é«˜äº®
            table.on('row(mainTable)', function (obj) {
                //选中行改变颜色
                var flag = !obj.tr.find(':checkbox:first').prop('checked');
                obj.tr.find(':checkbox').prop('checked', flag);
                if (flag) {
                    obj.tr.find('.layui-form-checkbox').addClass('layui-form-checked');  //设置复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:#ceedfa;color:black" });//改变当前tr背景颜色和字体颜色
                } else {
                    obj.tr.find('.layui-form-checkbox').removeClass('layui-form-checked');//取消复选框选中样式
                    $(obj.tr.selector).attr({ "style": "background:" });//取消当前tr颜色
                }
                //mainTable ä¸ºè¡¨æ ¼ID   æ³¨æ„æ­¤å¤„如果ID不正确将导致你在监听复选框时获取不到你选择的数据,前面的只是添加或删除选中未选中样式以及设置背景色,字体颜色
                layui.each(table.cache.mainTable, function (i, l) {
                    if (obj.tr.index() == l.LAY_TABLE_INDEX) {
                        l.LAY_CHECKED = flag;
                    }
                });
            })
            //#endregion
            //#region é‡ç½®æŒ‰é’®
            form.on('submit(btnReSearch)', function (data) {
                set_ClearQuery();
            });
            //#endregion
            //#region æŸ¥è¯¢æŒ‰é’®
            form.on('submit(btnSearch)', function (data) {
                get_FastQuery(2);
            });
            //#endregion
            //#endregion
            //#region æœ¬é¡µé¢æ‰€æœ‰è¢«è°ƒç”¨çš„æ–¹æ³•
            //#region åˆå§‹åŒ–界面
            function set_ClearBill() {
                //初始化表格
                set_InitGrid();
                //查询
                get_FastQuery(1);
                //Organ();
            }
            //#endregion
            //#region åˆå§‹åŒ–表格方法
            function set_InitGrid() {
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , height: 'full-50'
                    , page: true
                    //, cellMinWidth: 90
                    , limit: 50
                    , limits: [50, 500, 5000, 50000]
                };
            }
            //#endregion
            //#region æŸ¥è¯¢
            function get_Display(sWhere) {
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + '/Xt_User/UserRelationEmployeelist',
                    type: "GET",
                    data: { "sWhere": sWhere, "user": sessionStorage["HUserName"]},
                    success: function (data1) {
                        if (data1.count == 1) {
                            var data = [];
                            var col = [];
                            //给空的数组赋值
                            for (var key in data1.list) {
                                data.push({ "id": data1.list[key].ColmCols, "name": data1.list[key].ColmCols, "Type": data1.list[key].ColmType });
                            }
                            //在列表左边添加勾选框
                            col.push({ type: 'checkbox', fixed: 'left' });
                            for (var i = 0; i < data.length; i++) {
                                // if (data[i].name == 'HInterID' || data[i].name == 'HBillType' || data[i].name == 'hmainid') {
                                if ($.inArray(data[i].name, titleData) > -1) {
                                    col.push({ field: data[i].id, title: data[i].name, align: 'center', hide: true }); //隐藏id列
                                }
                                else {
                                    switch (data[i].Type) {
                                        //int
                                        case 'DateTime':
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, templet: "<div>{{d." + data[i].name + " ==null ?'':layui.util.toDateString(d." + data[i].name + ", 'yyyy-MM-dd')}}</div>", width:120 });
                                            break;
                                        default:
                                            col.push({ field: data[i].id, title: data[i].name, align: 'center', sort: true, width: 120 });
                                    }
                                }
                            }
                            option.cols = [col];
                            option.data = data1.data;
                            table.render(option);
                            //刷新按钮显示
                            var btns = document.getElementsByTagName("button");     //获取本页所有按钮对象
                            var HBillType = "Gy_UserEmployeeList";
                            Display_HideButton(btns, HBillType, HModName, sessionStorage["HUserName"]);
                            //刷新表格数据
                            //DisPlay_HideColumn();
                            layer.close(ajaxLoad);
                            if ($("#Comparator").val() == 0 && $("#ColContent").val() == "") {
                                ColFilter();
                            }
                            //layer.alert("查询成功", { icon: 1 });
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(data1.code + data1.Message, { icon: 5 });
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                });
            }
            //#endregion
            //#region å¿«é€Ÿè¿‡æ»¤
            function get_FastQuery(number) {
                var HUserID = $("#HUserID").val();  //用户代码
                var HUserName = $("#HUserName").val();//用户名称
                var HEmpNumber = $("#HEmpNumber").val();//客户代码
                var HEmpName = $("#HEmpName").val();//客户名称
                //任意字段过滤
                var ColName = $("#ColName").val();//复选框
                var Comparator = $("#Comparator").val()
                var ColContent = $("#ColContent").val();
                if (ColName != 0 && Comparator != 0) {
                    var com = "";
                    switch (Comparator) {
                        case "7":
                            com = "like'%" + ColContent + "%'";
                            break;
                        case "8":
                            com = "like'%" + ColContent + "'";
                            break;
                        case "9":
                            com = "like'" + ColContent + "%'";
                            break;
                        case "10":
                            com = "not like'%" + ColContent + "%'";
                            break;
                        default:
                            com = "" + Comparator + "'" + ColContent + "'";
                            break;
                    }
                    sWhere += " and " + ColName + " " + com;
                }
                if (HUserID) {
                    sWhere += " and ç”¨æˆ·ä»£ç  like '%" + HUserID + "%'";
                }
                if (HUserName) {
                    sWhere += " and ç”¨æˆ·åç§° like '%" + HUserName + "%'";
                }
                if (HEmpNumber) {
                    sWhere += " and ç”¨æˆ·ä»£ç  like '%" + HEmpNumber + "%'";
                }
                if (HEmpName) {
                    sWhere += " and ç”¨æˆ·åç§° like '%" + HEmpName + "%'";
                }
                get_Display(sWhere);
                sWhere = "";//调用接口后清空sWhere缓存
            }
            //#endregion
            //#region é‡ç½®è¿‡æ»¤æ¡ä»¶æ–¹æ³•
            function set_ClearQuery() {
                $("#HUserID").val("");
                $("#HUserName").val("");
                $("#HEmpNumber").val("");
                $("#HEmpName").val("");
                $("#ColContent").val("");
                $("#ColName").val("0");
                $("#Comparator").val("0");
                form.render('select');
                sWhere = "";
            }
            //#endregion
            //#region æ–°å¢ž
            function set_AddNew() {
                layer.open({
                    type: 2
                    , skin: 'layui-layer-rim' //加上边框
                    , area: ['100%', '100%']
                    , title: '用户关联职员-新增'
                    , shift: 0//弹出动画
                    , content: '../../系统管理/用户管理/Gy_UserEmployeeList_Edit.html?OperationType=1&linterid=0&HSouceBillType='
                    ,btn: ['确定'],
                    end: function (index, layero, that) {
                        //刷新页面
                        $("#btnSearch").trigger('click');
                    }
                })
            }
            //#endregion
            //#region ç¼–辑
            function set_ShowBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var linterid = data[0].HItemID.toString();
                    layer.open({
                        type: 2
                        , skin: 'layui-layer-rim' //加上边框
                        , area: ['100%', '100%']
                        , title: '用户关联职员-编辑'
                        , shift: 0//弹出动画
                        , content: '../../系统管理/用户管理/Gy_UserEmployeeList_Edit.html?OperationType=3&linterid=' + linterid
                        , btn: ['确定'],
                        end: function (index, layero, that) {
                            //刷新页面
                            $("#btnSearch").trigger('click');
                        }
                    })
                } else {
                    layer.msg('请选择一行数据编辑!');
                }
            }
            //#endregion
            //#region åˆ é™¤
            function set_DeleteBill() {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;
                if (checkStatus.data.length === 1) {
                    var HInterID = data[0].HItemID.toString();
                    layer.confirm("确认要删除吗,删除后不能恢复", { title: "删除确认" }, function (index) {
                        var wait = layer.load();
                        //逻辑删除方法
                        $.ajax({
                            url: GetWEBURL() + '/Xt_User/UserRelationEmployeelist_Drop',
                            type: "GET",
                            data: { "HInterID": HInterID, "user": sessionStorage["HUserName"] },
                            success: function (result) {
                                if (result.count == 1) {
                                    layer.msg(result.Message, { icon: 1 }, function () {
                                        // å¾—到frame索引
                                        var index = layer.getFrameIndex(window.name);
                                        //关闭当前frame
                                        layer.close(wait);
                                        //修改为功后刷新界面
                                        $("#btnSearch").trigger('click');
                                    });
                                } else {
                                    layer.alert(result.code + result.Message, { icon: 5 });
                                    layer.close(wait);
                                }
                            }, error: function () {
                                layer.alert("接口请求失败!", { icon: 5 });
                                layer.close(wait);
                            }
                        });
                    })
                }
                else {
                    layer.msg('请选择一行数据删除!');
                }
            }
            //#endregion
            //#region åˆ·æ–°
            function get_Refresh() {
                $("#btnSearch").trigger('click');
            }
            //#endregion
            //#region éšè—åˆ—设置
            function get_HideColumn() {
                var colName = "";
                var contentUrl = "";
                for (var i = 1; i < option.cols[0].length; i++) {
                    colName += option.cols[0][i]["title"] + ",";
                }
                var urlStr = window.document.location.pathname;//获取文件路径
                var urlLen = urlStr.split('/');
                for (var i = 0; i < urlLen.length - 4; i++) {
                    contentUrl += "../";
                }
                colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿›è¡Œç¼–码
                contentUrl += '基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
                layer.open({
                    type: 2
                    , skin: "layui-layer-rim" //加上边框
                    , title: "隐藏列设置"  //标题
                    , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                    , shift: 2 //弹出动画
                    , area: ["50%", "90%"] //窗体大小
                    , maxmin: true //设置最大最小按钮是否显示
                    , content: [contentUrl, "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //刷新表格数据
                        DisPlay_HideColumn();
                        //更新表格缓存的数据
                        layer.close(index);//关闭弹窗
                    }
                })
            }
            //#endregion
            //#region æ˜¾ç¤ºåˆ—数据
            function DisPlay_HideColumn() {
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                    success: function (data1) {
                        if (data1.data.length != 0) {
                            var dataCol = [];//数据库查询出的列数据
                            //var titleData = ["单据ID", "HMouldID", "hsubid", "HManagerID", "源单主内码", "源单子内码"];//不需要显示的字段 å¯æ‰©å±•
                            dataCol = data1.data[0].HGridString.split(',');
                            for (var i = 0; i < option.cols[0].length - 1; i++) {
                                var dataCols = dataCol[i].split('|');
                                //隐藏列
                                if (dataCols[1] == 1) {
                                    option.cols[0][i + 1]["hide"] = true;
                                }
                                //设置列宽
                                if (dataCols[3] > 0) {
                                    option.cols[0][i + 1]["width"] = dataCols[3];
                                }
                                //设置内容字体大小
                                if (data1.data[0].HFontSize != 0) {
                                    option.cols[0][i + 1]["style"] = "font-size:" + data1.data[0].HFontSize + "px;";
                                } else {
                                    option.cols[0][i + 1]["style"] = "font-size:100%";
                                }
                                //设置列宽
                                //if (data1.data[0].HColumnWidth != 0) {
                                //    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
                                //} else {
                                //    option.cols[0][i + 1]["width"] = "";
                                //}
                                //显示列
                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
                                    option.cols[0][i + 1]["hide"] = false;
                                }
                                //字体所在位置(å·¦ å±…中 å³)
                                switch (dataCols[2]) {
                                    case "L":
                                        option.cols[0][i + 1]["align"] = "left";
                                        break;
                                    case "M":
                                        option.cols[0][i + 1]["align"] = "center";
                                        break;
                                    case "R":
                                        option.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                            }
                            //取消冻结列
                            for (var i = 1; i < option.cols[0].length - 1; i++) {
                                if (option.cols[0][i]["fixed"] != null) {
                                    option.cols[0][i]["fixed"] = null;
                                }
                                else {
                                    break;
                                }
                            }
                            //冻结列
                            if (data1.data[0].HFixCols != 0) {
                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
                                    if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
                                        data1.data[0].HFixCols += 1;
                                    }
                                    option.cols[0][i + 1]["fixed"] = "left";
                                }
                            }
                            table.render(option);
                        } else {
                            table.render(option);
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                })
            }
            //#endregion
            //#region ä»»æ„å­—段过滤:列名显示下拉框
            function ColFilter() {
                var Organization = '<option  value="0" selected="selected" ></option>';
                for (var i = 1; i < option.cols[0].length; i++) {
                    if (option.cols[0][i].hide != true) {
                        Organization += '<option  style="color:blue;" value="' + option.cols[0][i].field + '">' + option.cols[0][i].field + '</option>';
                    }
                }
                $("#ColName").empty();
                $("#ColName").append(Organization);
                form.render('select');
            }
            //#endregion
            //#endregion
        });
            //#endregion
            //以上是layui模块
    </script>
</body>
</html>
WebTM/views/ϵͳ¹ÜÀí/Óû§¹ÜÀí/Gy_UserEmployeeList_Edit.html
New file
@@ -0,0 +1,697 @@
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title>用户关联职员维护_编辑</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>
    <script src="../../../layuiadmin/zgqCustom/zgqCustom.js"></script>
    <style type="text/css">
        /* .layui-form-item .layui-inline {
            margin-right: 0;
        }
        html {
            background-color: white;
            color: white;
        }
        .layui-table-cell {
            overflow: visible !important;
        }
        td .layui-form-select {
            margin-top: -10px;
            margin-left: -15px;
            margin-right: -15px;
        }*/
    </style>
</head>
<body>
    <div class="layui-fluid" style="padding: 0;">
        <div class="layui-card" style="padding: 15px;">
            <div class="layui-card-body" style="padding: 1px;">
                <form class="layui-form" lay-filter="component-form-group" action="">
                    <div class="layui-card-header">
                        <div class="layui-btn-group">
                            <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="set_SaveBill">保存</button>
                            <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">退出</button>
                        </div>
                    </div>
                    <div class="layui-tab" lay-filter="tab-POStockInBill">
                        <div class="layui-tab-content">
                            <!--基本信息-->
                            <div class="layui-tab-item layui-show">
                                <div class="layui-form-item" style="padding-top: 10px;">
                                    <div class="layui-row">
                                        <div class="layui-inline">
                                            <label class="layui-form-label">用户</label>
                                            <div class="layui-input-inline">
                                                <input type="text" name="UserName" id="UserName" readonly class="layui-input" value="" style="float:left;width:150px;">
                                                <input type="hidden" name="UserID" id="UserID" class="layui-input" value="" style="float:left;width:150px;">
                                                <button type="button" lay-submit="" class="layui-btn" lay-filter="UserList" style="width:40px;">
                                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn" style="margin-left:-9px;"></i>
                                                </button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!--子表1-->
                    <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
                    <script type="text/html" id="toolbarDemo">
                        <div class="layui-btn-container">
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-AddLine"><i class="layui-icon layui-icon-form"></i>增加一行</button>
                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-InsertLine"><i class="layui-icon layui-icon-form"></i>插入一行</button>-->
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-CopyLine"><i class="layui-icon layui-icon-form"></i>复制一行</button>
                            <!--<button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Up"><i class="layui-icon layui-icon-form"></i>上移</button>
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Under"><i class="layui-icon layui-icon-form"></i>下移</button>-->
                            <button type="button" class="layui-btn layui-btn-sm" lay-event="set_HideColumn"><i class="layui-icon layui-icon-form"></i>列设置</button>
                        </div>
                    </script>
                    <script type="text/html" id="xuhao">
                        {{d.LAY_TABLE_INDEX+1}}
                    </script>
                </form>
            </div>
        </div>
    </div>
    <script type="text/html" id="barDemo">
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
    </script>
    <script>
        //#region æŠ˜å æ³¨é‡Š
        //#endregion
        layui.config({
            base: '../../../layuiadmin/' //静态资源所在路径
        }).extend({
            index: 'lib/index' //主入口模块
        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
            //#region å…¬ç”¨å˜é‡
            var $ = layui.$
                , admin = layui.admin
                , layer = layui.layer
                , table = layui.table
                , form = layui.form
                , laydate = layui.laydate
                , element = layui.element;
            //子表渲染参数
            var option = {};
            //模块名
            var HModName = "Gy_UserEmployeeList_Edit";
            //获取页面跳转参数
            var params = get_UrlVars();
            var OperationType = params[params[0]]; //从参数中获取 æ•°æ®ç±»åž‹  1添加 ä¿å­˜  2复制  3 ç¼–辑
            var linterid = params[params[1]]; //从参数中获取 å•据内码
            //#endregion
            //#region è¿›å…¥é¡µé¢å³åŠ è½½
            //#region åˆ¤æ–­æ˜¯å¦ç™»å½• æœªç™»å½•则跳到登录页
            get_LoginIs();
            //#endregion
            //#region åˆ¤æ–­å¹¶è®¾ç½®æ“ä½œç±»åž‹ã€é¡µé¢åˆå§‹åŒ–
            if (OperationType == null || OperationType == 1) {                            //新增
                //新增页面初始化
                Init_setAdd();
            }
            else if (OperationType == 3) {                                                 //编辑
                //子表初始化
                set_InitGrid();
                //加载表体和表体数据
                RoadBillMain(linterid);
            }
            //#endregion
            //#region åˆ—设置:子表1
            DisPlay_HideColumn();
            //#endregion
            //#endregion
            //#region è§¦å‘事件:包括form.on(){}格式的所有点击事件、选择事件等
            //#region å¼¹çª—选择触发事件
            //#region é€‰æ‹©ç”¨æˆ·æŒ‰é’®
            form.on('submit(UserList)', function () {
                get_checkUser();
            });
            //#endregion
            //#endregion
            //#region è¡¨å¤´æŒ‰é’®è§¦å‘事件
            //#region ä¿å­˜æŒ‰é’®
            form.on('submit(set_SaveBill)', function (data) {
                if (AllowLoadData(data)) {
                    set_AddNew();
                }
            });
            //#endregion
            //#region é€€å‡ºæŒ‰é’®
            form.on('submit(Exit)', function () {
                if (params[1] != null) {
                    Pub_Close(1);
                } else if (params[1] == null) {
                    Pub_Close(2);
                }
            })
            //#endregion
            //#endregion
            //#region å­è¡¨ç›¸å…³ç›‘听事件
            //#region å­è¡¨1:头工具栏按钮触发事件
            table.on('toolbar(mainTable)', function (obj) {
                var checkStatus = table.checkStatus('mainTable')
                    , data = checkStatus.data;;
                //新增行表格数据
                var NewRow = {
                    "HItemID": "0",
                    "HUserID": "",
                    "HUserName": "",
                    "HEmpID": "0",
                    "HEmpNumber": "",
                    "HEmpName": "",
                };
                switch (obj.event) {
                    //新增一行
                    case 'btn-AddLine': btnAddLine(NewRow);
                        break;
                    //复制一行
                    case 'btn-CopyLine': btnCopyLine(data);
                        break;
                    ////指定位置下插入一行
                    //case 'btn-InsertLine': btnInsertLine(NewRow)
                    //    break;
                    ////上移
                    //case 'btn-Up': btn_up();
                    //    break;
                    ////下移
                    //case 'btn-Under': btn_under();
                    //    break;
                    //列设置
                    case 'set_HideColumn':
                        get_HideColumn();
                        break;
                }
            });
            //#endregion
            //#region è¡Œå†…事件
            table.on('tool(mainTable)', function (obj) {
                set_GridDelete(obj);   //行内删除
                set_GridCellCheck(obj); //行内快捷键筛选
            });
            //#endregion
            //#endregion
            //#endregion
            //#region æœ¬é¡µé¢æ‰€æœ‰è¢«è°ƒç”¨çš„æ–¹æ³•
            //#region åˆ¤æ–­æ˜¯å¦ç™»å½• æœªç™»å½•则跳到登录页
            function get_LoginIs() {
                if (sessionStorage.login != "login") {
                    layer.confirm("登录失效,请重新登录!", {
                        icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['重新登录']
                    }, function () { window.location.href = "../../user/login.html"; });
                }
            }
            //#endregion
            //#region å­è¡¨1初始化
            function set_InitGrid() {
                option = {
                    elem: '#mainTable'
                    , toolbar: '#toolbarDemo'
                    , totalRow: true
                    , limit: 500
                    , height: 500
                    , loading: false
                    , cols: [[ //子表
                        { type: 'checkbox', totalRowText: '合计行' }
                        , { type: 'numbers', title: '序号', width: 100, style: "background-color:#efefef4d;" }
                        , { field: 'HItemID', title: 'HItemID', width: 150, hide: "true" }
                        , { field: 'HUserID', title: '用户代码', edit: "true", event: "HUser", width: 100 }
                        , { field: 'HUserName', title: '用户名称', width: 150, style: "background-color:#efefef4d;" }//f7
                        , { field: 'HEmpID', title: 'HEmpID', width: 150, hide:"true" }
                        , { field: 'HEmpNumber', title: '职员代码', edit: "true", event: "HEmp", width: 100}
                        , { field: 'HEmpName', title: '职员名称', width: 100, style: "background-color:#efefef4d;"}
                        , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }
                    ]]
                }
                var rowdata = [{
                    "HItemID": "0",
                    "HUserID": "",
                    "HUserName": "",
                    "HEmpID": "0",
                    "HEmpNumber": "",
                    "HEmpName": "",
                }];
                option.data = rowdata;
                table.render(option);
            }
            //#endregion
            //#region æ–°å¢žé¡µé¢åˆå§‹åŒ–
            function Init_setAdd() {
                //设置操作类型为 æ–°å¢ž
                OperationType = 1;
                //初始化并列设置:子表1
                set_InitGrid();
                DisPlay_HideColumn();
            }
            //#endregion
            //#region ç¼–辑页面初始化
            function RoadBillMain(linterid) {
                //查询用户关联客户是否存在
                var ajaxLoad = layer.load();
                $.ajax({
                    url: GetWEBURL() + "/Xt_User/UserRelationEmployeelist_EditInit",
                    async: false,
                    type: "GET",
                    data: {
                        "HItemID": linterid
                        , "user": sessionStorage["HUserName"]
                    },
                    success: function (result) {
                        if (result.code == 1) { // è¯´æ˜ŽéªŒè¯æˆåŠŸäº†ï¼Œ
                            var data = result.data[0];
                            //子表  èµ‹å€¼
                            var rowdata = [];
                            for (var i = 0; i < result.data.length; i++) {
                                rowdata.push(
                                    {
                                        "HItemID": result.data[i]["HItemID"],
                                        "HUserID": result.data[i]["用户代码"],
                                        "HUserName": result.data[i]["用户名称"],
                                        "HEmpID": result.data[i]["HEmployeeID"],
                                        "HEmpNumber": result.data[i]["职员代码"],
                                        "HEmpName": result.data[i]["职员名称"]
                                    }
                                );
                            }
                            option.data = rowdata;
                            table.render(option);
                            layer.close(ajaxLoad);
                        } else {
                            layer.close(ajaxLoad);
                            layer.alert(result.msg, { icon: 5, btn: ['退出'], time: 100000, offset: 't' });
                        }
                    }, error: function () {
                        layer.close(ajaxLoad);
                        layer.alert("发生错误!", { icon: 5 });
                    }
                });
            }
            //#endregion
            //#region å¼¹çª—选择方法
            //#region ç”¨æˆ·é€‰æ‹©æ–¹æ³•
            function get_checkUser() {
                //页面层-自定义
                layer.open({
                    type: 2,
                    skin: 'layui-layer-rim', //加上边框
                    title: '用户列表',
                    closeBtn: 1,
                    shift: 2,
                    area: ['80%', '80%'],
                    maxmin: true,
                    content: ['../../PublicPage/PeopleInformation.html', 'yes'],
                    btn: ['确定', '取消']
                    , btn1: function (index, layero) {
                        //按钮【按钮一】的回调
                        var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                        if (checkStatus.data.length === 0) {
                            return layer.msg('请选择数据');
                        }
                        $("#UserName").val(checkStatus.data[0].HName);
                        $("#UserID").val(checkStatus.data[0].HNumber);
                        layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                    }
                });
            }
            //#endregion
            //#endregion
            //#region ä¿å­˜
            function set_AddNew() {
                var num = [];
                for (var i = 0; i < option.data.length; i++) {
                    if (option.data[i] != "") {
                        num.push(option.data[i])
                    }
                }
                //data.field.HOrgID = sessionStorage["OrganizationID"];//组织
                //var sMainStr = JSON.stringify(data.field);
                var sSubStr = JSON.stringify(num);
                var sMainSub = sSubStr + '&和' + sessionStorage["HUserName"] + '&和' + OperationType;
                var index = layer.load();
                $.ajax({
                    type: "POST",
                    url: GetWEBURL() + "/Xt_User/UserRelationEmployeelist_Save",
                    async: true,
                    data: { "sMainSub": sMainSub },
                    dataType: "json",
                    success: function (data) {
                        if (data.count == 1) {
                            layer.close(index);
                            layer.msg(data.Message);
                            option.data = null;
                            table.cache["mainTable"] = null;
                            table.render(option);
                            $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
                        }
                        else {
                            layer.close(index);
                            layer.msg(data.Message, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                        }
                    },
                    error: function (err) {
                        layer.close(index);
                        layer.msg("错误:" + err, { icon: 5, btn: ['确认'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "温馨提示" });
                    }
                });
            }
            //#endregion
            //#region æ•°æ®æ ¡éªŒ
            function AllowLoadData(data) {
                //数值格式校验工具
                var ref = /^\d+(\.\d+)?$/;          //非负数正则表达式
                var temp = "";
                //#region å­è¡¨ æ•°æ®æ£€éªŒ
                for (var i = 0; i < option.data.length; i++) {
                    if (option.data[i]["HUserID"] == "") {
                        layer.msg("第" + i + "行:用户代码未选择!");
                        return false;
                    }
                    if (option.data[i]["HEmpID"] == "0") {
                        layer.msg("第" + i + "行:职员未选择!");
                        return false;
                    }
                }
                //#endregion
                //#region å­è¡¨ å…³é”®å­—重复校验
                var num = [];
                for (var i = 0; i < option.data.length; i++) {
                    temp = option.data[i]["HUserID"] + ";" + option.data[i]["HEmpID"];
                    if ($.inArray(temp, num) == -1) {
                        num.push(temp);
                    } else {
                        layer.msg("第" + (i + 1) + "行,用户代码、职员重复!");
                        return false;
                    }
                }
                //#endregion
                return true;
            }
            //#endregion
            //#region åœ¨æœ«å°¾å¢žåŠ ä¸€è¡Œ
            function btnAddLine(NewRow) {
                NewRow.HUserID = $("#UserID").val();
                NewRow.HUserName = $("#UserName").val();
                //table.cache["mainTable"].push(NewRow);
                //option.data = table.cache["mainTable"];
                option.data = option.data == null ? [] : option.data;
                option.data.push(NewRow);
                table.render(option);
                //rows++;
                layer.msg('增加一行按钮!')
            }
            //#endregion
            //#region å¤åˆ¶ä¸€è¡Œ
            function btnCopyLine(data) {
                var copydata = JSON.stringify(data);
                if (data.length <= 0) {
                    layer.msg("请选择需要复制的一行!");
                }
                else if (data.length > 1) {
                    layer.msg("只能选择复制一行!");
                }
                else {
                    var copydata2 = copydata.substring(1, copydata.length);//去除首行字符'['
                    var copyrow = copydata2.substring(0, copydata2.length - 1);//去除末尾字符']'
                    table.cache["mainTable"].push(JSON.parse(copyrow));//将复制的行强转成json追加到表格上
                    option.data = table.cache["mainTable"];//将数据绑定到data上
                    //设置复制得到的记录的实际称重为0
                    option.data[option.data.length - 1].HWeight = "0";
                    table.render(option);//将数据渲染到表格上
                }
            }
            //#endregion
            //#region è¡¨æ ¼è¡Œå†…事件删除
            function set_GridDelete(obj) {
                var data = obj.data;
                var rowIndex = $(obj.tr).attr("data-index");
                if (obj.event === 'del') {
                    layer.confirm('真的删除行么', function (index) {
                        console.log("索引为:" + rowIndex);
                        if (rowIndex === '0') {
                            layer.msg('首行无法删除!!!');
                        } else {
                            //obj.del();
                            //layer.close(index);
                            var oldData = table.cache["mainTable"];
                            oldData.splice(obj.tr.data('index'), 1);
                            option.data = oldData;
                            table.render(option);
                            layer.close(index);
                        }
                    });
                }
            }
            //#endregion
            //#region è¡Œå†…快捷键筛选
            function set_GridCellCheck(obj) {
                $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
                    if (event.key == "F7") {
                        //用户
                        if (obj.event == "HUser") {
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '用户列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../PublicPage/PeopleInformation.html', 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //更新表格缓存的数据
                                    obj.update({
                                        "HUserID": checkStatus.data[0].HNumber
                                        , "HUserName": checkStatus.data[0].HName
                                    })
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                            });
                        }
                        //职员
                        if (obj.event == "HEmp") {
                            //页面层-自定义  //F7选择供应商
                            layer.open({
                                type: 2,
                                skin: 'layui-layer-rim', //加上边框
                                title: '职员列表',
                                closeBtn: 1,
                                shift: 2,
                                area: ['80%', '80%'],
                                maxmin: true,
                                content: ['../../基础资料/公用基础资料/Gy_EmployeeList.html?openType=2&HOrgID=' + sessionStorage["OrganizationID"], 'yes'],
                                btn: ['确定', '取消']
                                , btn1: function (index, layero) {
                                    //按钮【按钮一】的回调
                                    var iframeWindow = window['layui-layer-iframe' + index]  //获取弹框页面
                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//获取table的elem:"#test"
                                    if (checkStatus.data.length === 0) {
                                        return layer.msg('请选择数据');
                                    }
                                    //同步更新表格和缓存对应的值
                                    obj.update({
                                        HEmpID: checkStatus.data[0].HItemID,
                                        HEmpNumber: checkStatus.data[0].职员代码,
                                        HEmpName: checkStatus.data[0].职员名称
                                    });
                                    layer.close(layer.index); //它获取的始终是最新弹出的某个层,值是由layer内部动态递增计算的
                                }
                            });
                        }
                        obj.event = "";
                        return false;
                    }
                })
            }
            //#endregion
            //#region å­è¡¨1:隐藏列设置
            function get_HideColumn() {
                var colName = "";
                var contentUrl = "";
                for (var i = 1; i < option.cols[0].length - 1; i++) {
                    colName += option.cols[0][i]["title"] + ",";
                }
                var urlStr = window.document.location.pathname;//获取文件路径
                var urlLen = urlStr.split('/');
                for (var i = 0; i < urlLen.length - 4; i++) {
                    contentUrl += "../";
                }
                colName = encodeURI(colName.substring(0, colName.length - 1));//对 URI è¿›è¡Œç¼–码
                contentUrl += '基础资料/隐藏列设置/Gy_GridView_Hide.html?HModName=' + HModName + '&colName=' + colName;
                layer.open({
                    type: 2
                    , skin: "layui-layer-rim" //加上边框
                    , title: "隐藏列设置"  //标题
                    , closeBtn: 1  //窗体右上角关闭 çš„ æ ·å¼
                    , shift: 2 //弹出动画
                    , area: ["50%", "90%"] //窗体大小
                    , maxmin: true //设置最大最小按钮是否显示
                    , content: [contentUrl, "yes"]
                    , btn: ["确定", "取消"]
                    , btn1: function (index, laero) {
                        //刷新表格数据
                        DisPlay_HideColumn();
                        //更新表格缓存的数据
                        layer.close(index);//关闭弹窗
                    }
                })
            }
            //#endregion
            //#region å­è¡¨1:显示列数据
            function DisPlay_HideColumn() {
                $.ajax({
                    url: GetWEBURL() + '/Xt_grdAlignment_WMES/grdAlignmentWMESList',
                    type: "GET",
                    data: { "HModName": HModName, "user": sessionStorage["HUserName"] },
                    async: false,
                    success: function (data1) {
                        if (data1.data.length != 0) {
                            var dataCol = [];//数据库查询出的列数据
                            var titleData = ["HItemID","HEmpID"];//不需要显示的字段 å¯æ‰©å±•
                            //titleData = [];
                            dataCol = data1.data[0].HGridString.split(',');
                            for (var i = 0; i < option.cols[0].length - 2; i++) {
                                var dataCols = dataCol[i].split('|');
                                //隐藏列
                                if (dataCols[1] == 1) {
                                    option.cols[0][i + 1]["hide"] = true;
                                }
                                //设置列宽
                                if (dataCols[3] > 0) {
                                    option.cols[0][i + 1]["width"] = dataCols[3];
                                }
                                //设置内容字体大小
                                if (data1.data[0].HFontSize != 0) {
                                    option.cols[0][i + 1]["style"] += "font-size:" + data1.data[0].HFontSize + "px;";
                                } else {
                                    option.cols[0][i + 1]["style"] += "font-size:100%";
                                }
                                //设置列宽
                                //if (data1.data[0].HColumnWidth != 0) {
                                //    option.cols[0][i + 1]["width"] = data1.data[0].HColumnWidth + "px;";
                                //} else {
                                //    option.cols[0][i + 1]["width"] = "";
                                //}
                                //显示列
                                if (dataCols[1] == 0 && $.inArray(option.cols[0][i + 1]["title"], titleData) == -1) {
                                    option.cols[0][i + 1]["hide"] = false;
                                }
                                //字体所在位置(å·¦ å±…中 å³)
                                switch (dataCols[2]) {
                                    case "L":
                                        option.cols[0][i + 1]["align"] = "left";
                                        break;
                                    case "M":
                                        option.cols[0][i + 1]["align"] = "center";
                                        break;
                                    case "R":
                                        option.cols[0][i + 1]["align"] = "right";
                                        break;
                                }
                            }
                            //取消冻结列
                            for (var i = 1; i < option.cols[0].length - 1; i++) {
                                if (option.cols[0][i]["fixed"] != null) {
                                    option.cols[0][i]["fixed"] = null;
                                }
                                else {
                                    break;
                                }
                            }
                            //冻结列
                            if (data1.data[0].HFixCols != 0) {
                                for (var i = 0; i < data1.data[0].HFixCols; i++) {
                                    if ($.inArray(option.cols[0][i + 1]["title"], titleData) != -1) {
                                        data1.data[0].HFixCols += 1;
                                    }
                                    option.cols[0][i + 1]["fixed"] = "left";
                                }
                            }
                            table.render(option);
                        } else {
                            table.render(option);
                        }
                    }, error: function () {
                        layer.alert("接口请求失败!", { icon: 5 });
                    }
                })
            }
            //#endregion
            //#endregion
            //以上是layui模块
        });
    </script>
</body>
</html>