username@email.com
2023-02-28 67a0042c5f29e4bb0e0b82f6190f2bc51480b45c
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
@using DTO;
@{
    ViewBag.Title = "User";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
 
    List<PageEntity> ActionInfo2 = ViewData["ActionInfo2"] as List<PageEntity>;
}
@section headerStyle{
    <script type="text/javascript">
        var zhiwustatusDropDown = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.zhiwustatus))';
        var dept = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.dept))';
        var post = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.post))';
        var shifou = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.shifou))';
        var sex = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.sex))';
        var isMaryed = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.isMaryed))';
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            {
                label: '账号', name: 'UserSn', labtype: 'txt', hidden: false, width: 100
                //,formatter: function (cellvalue, options, rowObject) {
                //    return "<span style='color:" + rowObject.Coler + ";'>" + cellvalue + "</span>";
                //}
            },
            {
                label: '用户名', name: 'UserName', labtype: 'txt', hidden: false, width: 100,
                formatter: function (cellvalue, options, rowObject) {
                    return "<a onclick=\"OpenWindow('" + cellvalue + "','98%','100%', '/User/Edit?id=" + rowObject.Id + "')\"  ><span style='color:" + rowObject.Coler + ";'>" + cellvalue + "</span></a>";
                }
            },
            {
                label: '性别', name: 'SexName', labtype: 'txt', hidden: false, width: 40
                //,formatter: function (cellvalue, options, rowObject) {
                //    return "<span style='color:" + rowObject.Coler + ";'>" + cellvalue + "</span>";
                //}
            },
            {
                label: '部门', name: 'DeptName', labtype: 'txt', hidden: false, width: 100
                //,formatter: function (cellvalue, options, rowObject) {
                //    return "<span style='color:" + rowObject.Coler + ";'>" + cellvalue + "</span>";
                //}
            },
            {
                label: '职务', name: 'HrPositionName', labtype: 'txt', hidden: false, width: 100
                //,
                //formatter: function (cellvalue, options, rowObject) {
                //    return "<span style='color:" + rowObject.Coler + ";'>" + cellvalue + "</span>";
                //}
            },
            {
                label: '联系电话', name: 'Phone', labtype: 'txt', hidden: false, width: 100
                //,
                //formatter: function (cellvalue, options, rowObject) {
                //    return "<span style='color:" + rowObject.Coler + ";'>" + cellvalue + "</span>";
                //}
            },
            {
                label: '入职时间', name: 'IndateName', labtype: 'txt', hidden: false, width: 100
                //,
                //formatter: function (cellvalue, options, rowObject) {
                //    return "<span style='color:" + rowObject.Coler + ";'>" + cellvalue + "</span>";
                //}
            },
            {
                label: '试用期', name: 'ShiyongDateName', labtype: 'txt', hidden: false, width: 200
                //,
                //formatter: function (cellvalue, options, rowObject) {
                //    return "<span style='color:" + rowObject.Coler + ";'>" + cellvalue + "</span>";
                //}
            },
            {
                label: '薪资待遇', name: 'BasicPrice', labtype: 'txt', hidden: false, width: 100
                //,
                //formatter: function (cellvalue, options, rowObject) {
                //    return "<span style='color:" + rowObject.Coler + ";'>" + cellvalue + "</span>";
                //}
            },
            {
                label: '试用待遇', name: 'ShiyongPriceName', labtype: 'txt', hidden: false, width: 100
                ,
                //formatter: function (cellvalue, options, rowObject) {
                //    return "<span style='color:" + rowObject.Coler + ";'>" + cellvalue + "</span>";
                //}
            },
            {
                label: '签订合同时间', name: 'IndateName', labtype: 'txt', hidden: false, width: 100
                //,
                //formatter: function (cellvalue, options, rowObject) {
                //    return "<span style='color:" + rowObject.Coler + ";'>" + cellvalue + "</span>";
                //}
            },
            {
                label: '购买社保时间', name: 'ShebaodateName', labtype: 'txt', hidden: false, width: 100
                //,
                //formatter: function (cellvalue, options, rowObject) {
                //    return "<span style='color:" + rowObject.Coler + ";'>" + cellvalue + "</span>";
                //}
            },
            {
                label: '合同到期日', name: 'HetongDateEndName', labtype: 'txt', hidden: false, width: 100
                //,
                //formatter: function (cellvalue, options, rowObject) {
                //    return "<span style='color:" + rowObject.Coler + ";'>" + cellvalue + "</span>";
                //}
            },
            {
                label: '档案查询', name: 'Education', labtype: 'txt', hidden: false, width: 100,
                formatter: function (cellvalue, options, rowObject) {
                    return "<a class=\"danganchaxun\"  style=\"display: none;\" onclick=\"OpenWindow('奖惩','98%','100%', '/AdmBreakPrecedent/IndexRenshi?UserId=" + rowObject.Id + "')\"  >奖惩</a>&nbsp;"
                        + "<a class=\"danganchaxun\"  style=\"display: none;\" onclick=\"OpenWindow('物品','98%','100%', '/AdmBreakPrecedent/IndexGoods?UserId=" + rowObject.Id + "')\"  >物品</a>&nbsp;"
                        + "<a class=\"danganchaxun\"  style=\"display: none;\" onclick=\"OpenWindow('薪资','98%','100%', '/SalaryCheck/SearchIndexRenshi?UserId=" + rowObject.Id + "')\"  >薪资</a>&nbsp;";
                }
            },
            {
                label: '打印简历', name: 'Imei', labtype: 'txt', hidden: false, width: 100,
                formatter: function (cellvalue, options, rowObject) {
                    return "<a class=\"Dayin\"  style=\"display: none;\" onclick=\"OpenWindow('打印简历','98%','100%', '/User/Print?id=" + rowObject.Id + "')\" > 打印 </a>";
                }
            },
            {
                label: '考勤记录', name: 'Daka', labtype: 'txt', hidden: false, width: 100,
                formatter: function (cellvalue, options, rowObject) {
                    return "<a class=\"Daka\"  style=\"display: none;\" onclick=\"OpenWindow('" + rowObject.UserName + "','98%','100%', '/Signin/SigninAll?id=" + rowObject.Id + "')\" > 考勤记录 </a>";
                }
            },
 
            { label: '状态', name: 'RecStatus', labtype: 'txt', hidden: true },
            { label: '创建人', name: 'Creater', labtype: 'txt', hidden: true },
            { label: '创建时间', name: 'Createtimetxt', labtype: 'txt', hidden: true },
            { label: '修改人', name: 'Modifier', labtype: 'txt', hidden: true },
            { label: '修改时间', name: 'Modifytimetxt', labtype: 'txt', hidden: true },
            {
                label: '颜色', name: 'Coler', labtype: 'txt', hidden: true,
                formatter: function (cellvalue, options, rowObject) {
                    return "<span style='color:" + rowObject.Coler + ";'>" + cellvalue+"</span>";
                }},
        ];
        dataUrl = "/User/GetUserList?Zhiwustatus=A";
        searchCol = [
            { label: '入职时间', name: 'Indate', labtype: 'datearea', hidden: false },
            { label: '部门', name: 'DeptId', labtype: 'combox', hidden: false, data: JSON.parse(dept) },
            { label: '职务', name: 'HrPosition', labtype: 'combox', hidden: false, data: JSON.parse(post) },
            { label: '是否购买社保', name: 'IsGmsb', labtype: 'combox', hidden: false, data: JSON.parse(shifou) },
            { label: '是否签订合同', name: 'IsQdht', labtype: 'combox', hidden: false, data: JSON.parse(shifou) },
            { label: '用户账号', name: 'UserSn', labtype: 'txt', hidden: false },
            { label: '用户姓名', name: 'UserName', labtype: 'txt', hidden: false },
            { label: '性别', name: 'Sex', labtype: 'combox', hidden: false, data: JSON.parse(sex) },
            { label: '用户手机', name: 'Phone', labtype: 'txt', hidden: false },
            { label: '在职状态', name: 'Zhiwustatus', labtype: 'combox', hidden: false, data: JSON.parse(zhiwustatusDropDown) },
 
 
 
 
        ];
        var _pageAdd = function () {
            OpenWindow("新增用户", "98%", "90%", "/User/Edit/");
        }
 
        var _pageSearch = function () {
            $("#jqGrid").jqGrid('setGridParam', {
                url: '/User/GetUserList', postData: jsons, page: 1
            }); //重新载入
            var jsons = GetSearchEnd();
            if (jsons == false) {
                msg.info("请录入查询条件");
                return false;
            }
            LoadGrid(jsons);
        }
 
        $(function () {
            $("#PBSZhiwustatus").val("A");
            $("#PBSZhiwustatus").trigger('chosen:updated');//更新选项
 
        });
 
        var _afterSave = function (result) {
            if (result) {
                toastr.success("保存成功");
            } else {
                toastr.error("保存失败");
            }
        }
 
        var _afterDel = function (result) {
            if (result) {
                toastr.success("删除成功");
            } else {
                /**/
                toastr.error("删除成功");
        /**/
    }
        }
 
 
 
           var ActionInfo22 = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ActionInfo2))';
 
        var _afterLoadDataload = function (xhr) {
            var data = JSON.parse(ActionInfo22);
            for (var o in data) {
                //alert(o);
                //alert(data[o]);
                /* alert("PageShortcut:" + data[o].PageShortcut + " PageName:" + data[o].PageName);*/
                $("." + data[o].PageShortcut).show();
 
            }
 
 
        };
 
 
    </script>
}