From aaa67e6806e80763ef9b0c60420a1aadee0e881a Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期三, 31 一月 2024 14:07:05 +0800
Subject: [PATCH] 增加 用户关联职员列表 的模块,方便操作员进行数据的查询 (按钮: 新增,编辑,删除(单行),列设置,按钮设置,退出)

---
 WebTM/views/系统管理/用户管理/Gy_UserEmployeeList_Edit.html |  697 +++++++++++++++++++++++++++++++
 WebTM/Properties/PublishProfiles/JFTM.pubxml.user   |   10 
 WebTM/views/系统管理/用户管理/Gy_UserEmployeeList.html      |  597 +++++++++++++++++++++++++++
 WebTM/WebTM.csproj                                  |    2 
 4 files changed, 1,304 insertions(+), 2 deletions(-)

diff --git a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user b/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
index 77cde44..da31d00 100644
--- a/WebTM/Properties/PublishProfiles/JFTM.pubxml.user
+++ b/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>
diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 45cfaf7..4bd8a3a 100644
--- a/WebTM/WebTM.csproj
+++ b/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" />
diff --git "a/WebTM/views/\347\263\273\347\273\237\347\256\241\347\220\206/\347\224\250\346\210\267\347\256\241\347\220\206/Gy_UserEmployeeList.html" "b/WebTM/views/\347\263\273\347\273\237\347\256\241\347\220\206/\347\224\250\346\210\267\347\256\241\347\220\206/Gy_UserEmployeeList.html"
new file mode 100644
index 0000000..b943c42
--- /dev/null
+++ "b/WebTM/views/\347\263\273\347\273\237\347\256\241\347\220\206/\347\224\250\346\210\267\347\256\241\347\220\206/Gy_UserEmployeeList.html"
@@ -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;">鐢ㄦ埛浠g爜</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;">鑱屽憳浠g爜</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', //涓诲叆鍙fā鍧�
+        }).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 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.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 涓鸿〃鏍糏D   娉ㄦ剰姝ゅ濡傛灉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();  //鐢ㄦ埛浠g爜
+                var HUserName = $("#HUserName").val();//鐢ㄦ埛鍚嶇О
+                var HEmpNumber = $("#HEmpNumber").val();//瀹㈡埛浠g爜
+                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 鐢ㄦ埛浠g爜 like '%" + HUserID + "%'";
+                }
+                if (HUserName) {
+                    sWhere += " and 鐢ㄦ埛鍚嶇О like '%" + HUserName + "%'";
+                }
+                if (HEmpNumber) {
+                    sWhere += " and 鐢ㄦ埛浠g爜 like '%" + HEmpNumber + "%'";
+                }
+                if (HEmpName) {
+                    sWhere += " and 鐢ㄦ埛鍚嶇О like '%" + HEmpName + "%'";
+                }
+
+                get_Display(sWhere);
+                sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+            }
+            //#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
+
+            //浠ヤ笂鏄痩ayui妯″潡
+    </script>
+
+</body>
+</html>
\ No newline at end of file
diff --git "a/WebTM/views/\347\263\273\347\273\237\347\256\241\347\220\206/\347\224\250\346\210\267\347\256\241\347\220\206/Gy_UserEmployeeList_Edit.html" "b/WebTM/views/\347\263\273\347\273\237\347\256\241\347\220\206/\347\224\250\346\210\267\347\256\241\347\220\206/Gy_UserEmployeeList_Edit.html"
new file mode 100644
index 0000000..a3c730d
--- /dev/null
+++ "b/WebTM/views/\347\263\273\347\273\237\347\256\241\347\220\206/\347\224\250\346\210\267\347\256\241\347\220\206/Gy_UserEmployeeList_Edit.html"
@@ -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' //涓诲叆鍙fā鍧�
+        }).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 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.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: '鐢ㄦ埛浠g爜', 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: '鑱屽憳浠g爜', 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]["鐢ㄦ埛浠g爜"],
+                                        "HUserName": result.data[i]["鐢ㄦ埛鍚嶇О"],
+                                        "HEmpID": result.data[i]["HEmployeeID"],
+                                        "HEmpNumber": result.data[i]["鑱屽憳浠g爜"],
+                                        "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鐨別lem:"#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); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                    }
+                });
+            }
+            //#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 + "琛岋細鐢ㄦ埛浠g爜鏈�夋嫨锛�");
+                        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) + "琛�,鐢ㄦ埛浠g爜銆佽亴鍛橀噸澶�!");
+                        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鐨別lem:"#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); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                                }
+                            });
+                        }
+                        //鑱屽憳
+                        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鐨別lem:"#test"
+                                    if (checkStatus.data.length === 0) {
+                                        return layer.msg('璇烽�夋嫨鏁版嵁');
+                                    }
+                                    //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                                    obj.update({
+                                        HEmpID: checkStatus.data[0].HItemID,
+                                        HEmpNumber: checkStatus.data[0].鑱屽憳浠g爜,
+                                        HEmpName: checkStatus.data[0].鑱屽憳鍚嶇О
+                                    });
+                                    layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                                }
+                            });
+                        }
+                        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
+
+
+            //浠ヤ笂鏄痩ayui妯″潡
+        });
+    </script>
+</body>
+</html>
\ No newline at end of file

--
Gitblit v1.9.1