yusijie
2022-12-18 ea2783c18b7d2b30bf6f5367bc48e83571949b80
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
<!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/zgqCustom/zgqCustom.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>
    <style type="text/css">
        .layui-form-label {
            width: 85px;
        }
 
        .layui-form-item .layui-input-inline {
            width: 50%;
        }
 
        .layui-inline {
            width: 290px;
        }
 
        .layui-form-item .layui-inline {
            margin-right: 0px;
        }
 
        /* 防止下拉框的下拉列表被隐藏---必须设置--- */
        .layui-table-cell {
            overflow: visible !important;
        }
        /* 使得下拉框与单元格刚好合适 */
        td .layui-form-select {
            margin-top: -10px;
            margin-left: -15px;
            margin-right: -15px;
        }
    </style>
</head>
<body>
    <div id="layout1" class="layui-fluid">
        <div class="layui-row layui-col-space15">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <form id="form0" class="layui-form" lay-filter="component-form-group" action="">
                        <div class="layui-card-header">
                            <div class="layui-btn-group">
                                <button type="button" id="Saver" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">保存</button>
                                <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">退出</button>
                            </div>
                        </div>
                        <div class="layui-card-body">
                            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                                <h1 style="text-align:center;margin-top:5px"><b>业务员</b></h1>
                                <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" style="width: 85px;">业务员类型</label>
                                                    <div class="layui-input-block" style="margin-left: 120px; width: 185px;">
                                                        <select name="HOperatorType" id="HOperatorType" lay-verify="HOperatorType" lay-filter="HOperatorType">
                                                            <option style="color:blue;" value="XSY">销售员</option>
                                                            <option style="color:blue;" value="CGY">采购员</option>
                                                            <option style="color:blue;" value="WHY">仓管员</option>
                                                            <option style="color:blue;" value="JHY">计划员</option>
                                                            <option style="color:blue;" value="CWRY">财务人员</option>
                                                            <option style="color:blue;" value="ZJY">质检员</option>
                                                            <option style="color:blue;" value="FWRY">服务人员</option>
                                                            <option style="color:blue;" value="JSY">驾驶员</option>
                                                            <option style="color:blue;" value="CXY">程序员</option>
                                                        </select>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <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-CopyLine"><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>
    </div>
</body>
</html>
<script type="text/html" id="barDemo">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
 
<!--行下拉选择(业务状态)-->
<script type="text/html" id="HStopflag">
    <select name="HStopflag" lay-filter="HStopflag" id="HStopflag{{d.LAY_TABLE_INDEX+1}}">
        <option value="false">否</option>
        <option value="true">是</option>
    </select>
</script>
 
<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 sWhere = "";
        var option = [];
        var IsDel = 0; //是否伪删除
        //#endregion
 
        //#region 进入页面即加载
 
        var params = getUrlVars();
        var OperationType = params[params[0]]; //从参数中获取 数据类型  1添加 保存  2复制  3 编辑
        var linterid = params[params[0]]; //从参数中获取 单据内码
        //判断是否新增
        if (linterid == null || linterid == 0) {
 
        }
        else {//如果修改则走下面 new
            //禁用组织选项
            $("#HUSEORGID").attr("disabled", true);
            RoadBillMain(linterid);
        }
 
        var rowdata = [{
            "HUSEORGID": 0, "业务组织": "", "HStaffId": "0", "职员": "", "员工编码": "", "部门": "", "业务员编码": "", "业务员名称": "",
            "备注": "", "HStopflag": 0, "HItemID": 0, "HIsPseDel": 0
        }];
 
        //初始化界面
        set_ClearBill();
 
        //#endregion
 
        //#region 触发事件:包括form.on(){}格式的所有点击事件、选择事件等
 
        //头工具栏事件
        table.on('toolbar(mainTable)', function (obj) {
            var checkStatus = table.checkStatus('mainTable')
                , data = checkStatus.data;
            //新增行表格数据
            var NewRow = {
                "HUSEORGID": 0, "业务组织": "", "HStaffId": "0", "职员": "", "员工编码": "", "部门": "", "业务员编码": "", "业务员名称": "",
                "备注": "", "HStopflag": 0, "HItemID": 0, "HIsPseDel": 0
            };
            switch (obj.event) {
                case 'btn-AddLine':
                    table.cache["mainTable"].push(NewRow);
                    option.data = table.cache["mainTable"];
 
                    table.render(option);
                    //刷新复选框
                    checkRefresh();
                    break;
                case 'btn-CopyLine':
                    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上
                        table.render(option);//将数据渲染到表格上
                        //刷新复选框
                        checkRefresh();
                    }
                    break;
            }
        });
 
        //保存提交
        form.on('submit(Saver)', function (data) {//提交
            set_AddNew(data);
        });
 
        //退出
        form.on('submit(Exit)', function (data) {
            Pub_Close(1);
        });
 
        //行内事件
        table.on('tool(mainTable)', function (obj) {
            set_GridDelete(obj);   //行内删除
            set_GridCellCheck(obj); //行内快捷键筛选
 
            var data = obj.data;
            if (obj.event == 'HDate') {
                var field = $(this).data('field');
                laydate.render({
                    elem: this.firstChild
                    , show: true //直接显示
                    , closeStop: this
                    , done: function (nowDate) {
                        //时间选择完成,行数据更新
                        data[field] = nowDate;
                        obj.update(data);
                        //刷新复选框
                        checkRefresh();
                    }
                });
            }
        });
 
        //监听下拉框
        form.on('select(HOperatorType)', function (data) {
            //console.log(data.value)//选中的值
            sWhere = " and 业务员类型 = '" + data.value + "'";
            get_Display(sWhere);
        })
        //#endregion
 
        //#region 本页面被调用的所有方法
 
        // 初始化界面
        function set_ClearBill() {
            set_InitGrid();
            get_Display(sWhere);
            $("#HMakeEmp").val(sessionStorage["HUserName"]);
        }
 
        function set_InitGrid() {
            option = {
                elem: '#mainTable'
                , toolbar: '#toolbarDemo'
                , limit: 500
                , height: 500
                , loading: false
                , cols: [[//表体
                    { type: 'checkbox', totalRowText: '合计行' }
                    , { type: 'numbers', title: '序号', totalRow: true }
                    , { field: 'HItemID', title: 'HItemID', hide: true }
                    , { field: 'HIsPseDel', title: '是否伪删除', hide: true }
                    , { field: 'HUSEORGID', title: 'HUSEORGID', hide: true }
                    , { field: '业务组织', title: '业务组织', edit: 'text', event: "HUSEORGID" }//f7
                    , { field: 'HStaffId', title: 'HStaffId', hide: true }
                    , { field: '职员', title: '职员', edit: 'text', event: "HStaffId" }//f7
                    , { field: '员工编码', title: '员工编码' }
                    //, { field: 'HDepID', title: 'HDepID', width: 100, hide: true }
                    , { field: '部门', title: '部门' }
                    //, { field: '任职岗位', title: '任职岗位', edit: 'text' }
                    , { field: '业务员编码', title: '业务员编码',width: 200 }
                    , { field: '业务员名称', title: '业务员名称' }
                    , { field: '备注', title: '备注', edit: 'text' }
                    , { field: 'HStopflag', title: '是否禁用', templet: "#HStopflag",width: 80 }
                    , { fixed: 'right', title: '操作', toolbar: '#barDemo', width: 70 }
                ]]
                , data: []
            }
 
            option.data = rowdata;
            table.render(option);
        }
 
        //查询
        function get_Display(sWhere) {
            var OperatorType = $("#HOperatorType").val();
            if (OperatorType) {
                sWhere += " and 业务员类型 = '" + OperatorType + "'"
            }
 
            var ajaxLoad = layer.load();
            $.ajax({
                url: GetWEBURL() + '/Gy_Operator/OperatorList',
                type: "GET",
                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "Organization": sessionStorage["Organization"] },
                success: function (data1) {
                    if (data1.count == 1) {
                        option.data = data1.data;
                        for (let i = 0; i < data1.data.length; i++) {
                            switch (data1.data[i].业务员类型) {
                                case 'XSY':
                                    data1.data[i].业务员类型 = '销售员'
                                    break;
                                case 'CGY':
                                    data1.data[i].业务员类型 = '采购员'
                                    break;
                                case 'WHY':
                                    data1.data[i].业务员类型 = '仓管员'
                                    break;
                                case 'JHY':
                                    data1.data[i].业务员类型 = '计划员'
                                    break;
                                case 'CWRY':
                                    data1.data[i].业务员类型 = '财务人员'
                                    break;
                                case 'ZJY':
                                    data1.data[i].业务员类型 = '质检员'
                                    break;
                                case 'FWRY':
                                    data1.data[i].业务员类型 = '服务人员'
                                    break;
                                case 'JSY':
                                    data1.data[i].业务员类型 = '驾驶员'
                                    break;
                                case 'CXY':
                                    data1.data[i].业务员类型 = '程序员'
                                    break;
                            }
                            if (data1.data[i].禁用标记 == 'Y') {
                                data1.data[i].禁用标记 = 1
                                $("#HStopflag").val("true");
                            } else {
                                data1.data[i].禁用标记 = 0
                            }
                        }                        
                        table.render(option);
                        //刷新表格数据
                        //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 });
                }
            });
        }
 
        //保存
        function set_AddNew(data) {
            var num = [];
            var num2 = [];
            for (var i = 0; i < table.cache["mainTable"].length; i++) {
                //if (table.cache["mainTable"][i] != "") {
                table.cache["mainTable"][i].LAY_TABLE_INDEX = i;
                num.push(table.cache["mainTable"][i])
                var sub = { "HUSEORGID": 0, "业务组织": "", "HStaffId": 0, "HName": "", "HNumber": "", "部门": "", "业务员编码": "", "业务员名称": "", "HRemark": "", "HStopflag": 0, "HItemID": 0, "HIsPseDel": 0 };
 
                if (num[i].HIsPseDel != 1) {
                    sub.HUSEORGID = num[i].HUSEORGID
                    sub.业务组织 = num[i].业务组织
                    sub.HStaffId = num[i].HStaffId
                    sub.HName = num[i].职员
                    sub.HNumber = num[i].员工编码
                    sub.部门 = num[i].部门
                    sub.业务员编码 = num[i].业务员编码
                    sub.业务员名称 = num[i].业务员名称
                    sub.HRemark = num[i].备注
                    sub.HStopflag = num[i].禁用标记
                }
                sub.HItemID = num[i].HItemID
                sub.HIsPseDel = num[i].HIsPseDel
                num2.push(sub);
                if (sub.HStopflag == 0) {
                    sub.HStopflag = false;
                } else if (sub.HStopflag == 1) {
                    sub.HStopflag = true;
                }
                //}
            }
            var sMainStr = JSON.stringify(data.field);
            var sSubStr = JSON.stringify(num2);
            //var hentryid = linteridSub;//子表 排序id
            var sMainSub = sMainStr + ';' + sSubStr + ';' + OperationType + ";" + sessionStorage["HUserName"];
 
 
 
            var index = layer.load();
            $.ajax({
                type: "POST",
                url: GetWEBURL() + "/Gy_Operator/OperatorEdit",
                async: true,
                data: { "sMainSub": sMainSub },
                dataType: "json",
                success: function (data) {
                    if (data.count == 1) {
                        $('#Saver').addClass("layui-btn-disabled").attr("disabled", true);
                        layer.close(index);
                        layer.msg("提交成功");
                    }
                    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: "温馨提示" });
                }
            });
        }
 
        ////编辑 页面赋值
        function RoadBillMain(linterid)//加载表头
        {
            var sWhere = " and HItemID='" + linterid + "'";
            $.ajax({
                url: GetWEBURL() + "/Gy_Operator/OperatorList",
                type: "GET",
                async: false,
                data: { "sWhere": sWhere, "user": sessionStorage["HUserName"], "Organization": sessionStorage["Organization"] },
                success: function (d) {
                    var IsHStopflag = d.data[0].禁用标记;
                    if (IsHStopflag == 'Y') {
                        $("input[name='HStopflag']").prop("checked", true);
                    } else {
                        d.data[0].禁用标记 = '';
                    }
                    //主表
                    form.val("component-form-group", { //formTest 即 class="layui-form" 所在元素属性 lay-filter="" 对应的值
                        "HItemID": d.data[0].HItemID
                        , "HNumber": d.data[0].业务员代码
                        , "HName": d.data[0].业务员名称
                        , "HUSEORGID": d.data[0].HUSEORGID
                        , "HStopflag": d.data[0].禁用标记
                        , "HRemark": d.data[0].备注
                    });
                    form.render('checkbox');
                    form.render('select');
                }
            })
        }
 
        //多选  刷新表格
        function checkRefresh() {
            for (var i = 1; i <= option.data.length; i++) {
                //是否手工关闭
                if (option.data[i - 1].HStopflag) {
                    $('#HStopflag' + i + '').attr("checked", true);
                }
            }
            form.render('select');
        }
 
        //行内快捷键筛选
        function set_GridCellCheck(obj) {
            $(document).off('keydown', ".layui-table-edit").on('keydown', '.layui-table-edit', function (e) {
                if (event.key == "F7") {
                    //业务组织
                    if (obj.event == "HUSEORGID") {
                        layer.open({
                            type: 2
                            , skin: "layui-layer-rim" //加上边框
                            , title: "组织列表"  //标题
                            , closeBtn: 1  //窗体右上角关闭 的 样式
                            , shift: 2 //弹出动画
                            , area: ["90%", "90%"] //窗体大小
                            , maxmin: true //设置最大最小按钮是否显示
                            , content: ['../../基础资料/公用基础资料/Xt_ORGANIZATIONSList.html', 'yes']
                            , btn: ["确定", "取消"]
                            , btn1: function (index, laero) {
                                //按钮一  的回调
                                var iframeWindow = window["layui-layer-iframe" + index];//获取弹框页面
                                var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//获取选中的数据
 
                                if (checkStatus.data.length != 1) {
                                    return layer.msg("请选择一条数据");
                                }
 
                                //更新表格缓存的数据
                                obj.update({
                                    "HUSEORGID": checkStatus.data[0].HItemID
                                    , "业务组织": checkStatus.data[0].组织名称
                                })
                                layer.close(index);//关闭弹窗
                            }
                        })
                    }
                    //职员
                    if (obj.event == "HStaffId") {
                        layer.open({
                            type: 2
                            , skin: "layui-layer-rim" //加上边框
                            , title: "员工列表"  //标题
                            , closeBtn: 1  //窗体右上角关闭 的 样式
                            , shift: 2 //弹出动画
                            , area: ["90%", "90%"] //窗体大小
                            , maxmin: true //设置最大最小按钮是否显示
                            , content: ['../../基础资料/基础资料/Gy_Staff.html', 'yes']
                            , btn: ["确定", "取消"]
                            , btn1: function (index, laero) {
                                //按钮一  的回调
                                var iframeWindow = window["layui-layer-iframe" + index];//获取弹框页面
                                var checkStatus = iframeWindow.layui.table.checkStatus("mainTable");//获取选中的数据
 
                                if (checkStatus.data.length != 1) {
                                    return layer.msg("请选择一条数据");
                                }
 
                                //更新表格缓存的数据
                                obj.update({
                                    "HStaffId": checkStatus.data[0].HItemID
                                    , "职员": checkStatus.data[0].员工名称
                                    , "员工编码": checkStatus.data[0].员工代码
                                    , "业务员名称": checkStatus.data[0].员工名称
                                    , "部门": checkStatus.data[0].部门名称
                                    , "业务员编码": checkStatus.data[0].员工代码 + "_" + $("#HOperatorType").val() + "_" + rowdata[0].HUSEORGID
                                })
                                layer.close(index);//关闭弹窗
                            }
                        })
                    }
 
                    obj.event = "";
                    return false;
                }
            })
        }
 
        //行内删除
        function set_GridDelete(obj) {
            var data = obj.data;
            var rowIndex = $(obj.tr).attr("data-index");
            if (obj.event === 'del') {
                layer.confirm("真的删除行吗?", { title: "删除确认" }, function (index) {
                    //if (rowIndex === '0') {
                    //    layer.msg('首行无法删除!!!');
                    //} else {
                    ItemID = option.data[rowIndex].HItemID;
                    obj.del();
                    option.data = table.cache["mainTable"];//将数据绑定到data上
                    //table.reload(option);
                    layer.close(index);
                    //}
                    var wait = layer.load();
                    //#region 逻辑删除方法
                    $.ajax({
                        url: GetWEBURL() + 'Gy_Operator/Delete2',
                        type: "GET",
                        data: { "HItemID": ItemID, "user": sessionStorage["HUserName"] },
                        success: function (result) {
                            if (result.count == 1) {
                                IsDel = 1
                                table.cache["mainTable"][rowIndex].HIsPseDel = IsDel
                                table.cache["mainTable"][rowIndex].HItemID = ItemID
                                layer.msg(result.Message, { icon: 1 }, function () {
                                    //关闭当前frame
                                    layer.close(wait);
                                });
                            } else {
                                layer.alert(result.code + result.Message, { icon: 5 });
                                layer.close(wait);
                            }
                        }, error: function () {
                            layer.alert("接口请求失败!", { icon: 5 });
                            layer.close(wait);
                        }
                    });
                });
            }
        }
 
 
        //获取参数
        function getUrlVars() {
            var vars = [], hash;
            var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
            for (var i = 0; i < hashes.length; i++) {
                hash = hashes[i].split('=');
                vars.push(hash[0]);
                vars[hash[0]] = hash[1];
            }
            return vars;
        }
 
        //#endregion
 
    });
</script>