username@email.com
2025-04-27 15eb82df2d6ec539e9d4245bfe08d531e8eb6379
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
@{
    ViewBag.Title = "MemoBook";
    Layout = "~/Views/Shared/_Layout_Search.cshtml";
}
@{PltUser user = (PltUser)ViewData["curentuser"];}
@section headerStyle{
    <script type="text/javascript">
 
        var Wancheng = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Wancheng))';
        var Rtype = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.Rtype))';
        var KaoHe = '@Html.Raw(Newtonsoft.Json.JsonConvert.SerializeObject(ViewBag.KaoHe))';
 
 
        dataCol = [
            { label: 'id', name: 'Id', labtype: 'txt', hidden: true },
            {
                label: '安排时间', name: 'Createtime', labtype: 'txt', width: 100, hidden: false,
                formatter: function (cellvalue, options, rowObject) {
                    return   new Date(cellvalue).Format("yyyy-MM-dd");
                }
            },
            { label: '工作类型', name: 'RtypeName', labtype: 'txt', width: 100, hidden: false },
            { label: '工作内容', name: 'Context', labtype: 'txt', width: 300, hidden: false },
            {
                label: '要求完成时间', name: 'TimeName', labtype: 'txt', width: 100, hidden: false 
            },
            {
                label: '办理情况', name: 'HaveRead', labtype: 'txt', width: 300, hidden: false, 
                formatter: function (cellvalue, options, rowObject) {
                    if (cellvalue == null || cellvalue == "" || cellvalue == "0") {
                        return '<a href="javascript: void (0)" onclick="banli(\'' + rowObject.Rtype + '\',\'' + rowObject.Id + '\');">办理</a>';
                    } else {
                        return rowObject.BanLi;
                    }
 
 
                }
            },
            { label: '完成时间', name: 'WanchengTimeName', labtype: 'txt', width: 100, hidden: false },
            { label: '考核结果', name: 'KaoHeName', labtype: 'txt', width: 60, hidden: false },
            { label: '追责处罚', name: 'ZhuiZe', labtype: 'txt', width: 60, hidden: false },
            //{
            //    label: '提醒类型', name: 'Rtype', labtype: 'txt', width: 100, hidden: false,
            //    formatter: function (cellvalue, options, rowObject) {
 
            //        let value = '';
            //        for (var i = 0; i < rtype.length; i++) {
            //            if (rtype[i].code === cellvalue) {
            //                value = rtype[i].label;
            //                break;
            //            }
            //        }
            //        return value;
            //    }
            //},
            { label: '申诉', name: 'ShenSu', labtype: 'txt', width: 100, hidden: false },
            { label: '安排(提醒)人', name: 'Creater', labtype: 'txt', width: 100, hidden: false },
            { label: '被安排(提醒)人', name: 'ToUserId', labtype: 'txt', width: 100, hidden: true },
 
            {
                label: '操作', name: 'RecStatus', align: "center", align: "center", sortable: false, width: 100, labtype: 'txt',
                formatter: function (cellvalue, options, rowObject) {
                    var sss = "";
 
                    if (rowObject.Rtype == "2" || rowObject.Rtype == "4") {
                        sss += '<a href="javascript:void(0)" onclick="edit(\'' + rowObject.Rtype + '\',\'' + rowObject.Id + '\');"> <span style="background: #ECF3FF;">  修改 </span> </a > '
                            + ' <a href="javascript:void(0)" onclick="del(\'' + rowObject.Id + '\');">  <span style="background: #ECF3FF;"> 删除 </span></a>';
                    } else if (rowObject.KaoHe == "2" && (rowObject.ShenSu == null || rowObject.ShenSu =="") ) {
                        
                        sss += ' <a href="javascript:void(0)" onclick="shensu(\'' + rowObject.Id + '\');">  <span style="background: #ECF3FF;"> 申诉 </span></a>';
                    }
                    
                    return sss;
                         
                }
            },
 
            { label: '状态', name: 'RecStatus', labtype: 'txt', hidden: true },
            { label: '创建人', name: 'Creater', labtype: 'txt', hidden: true },
            { label: '创建时间', name: 'Createtime', labtype: 'txt', hidden: true },
            { label: '修改人', name: 'Modifier', labtype: 'txt', hidden: true },
            { label: '修改时间', name: 'Modifytime', labtype: 'txt', hidden: true }
 
        ];
        dataUrl = "/DailyManagement/GetWorkmyList?ToUserId=" + "@user.Id"
        searchCol = [
            { label: '时间', name: 'Createtime', labtype: 'datearea', hidden: false },
            { label: '工作类型', name: 'Rtype', labtype: 'combox', hidden: false, data: JSON.parse(Rtype)  /*,cwidth: '5%', cccwidth: '28%' */ },
            { label: '完成情况', name: 'HaveRead', labtype: 'combox', hidden: false, data: JSON.parse(Wancheng)  /*,cwidth: '5%', cccwidth: '28%' */ },
            { label: '考核情况', name: 'KaoHe', labtype: 'combox', hidden: false, data: JSON.parse(KaoHe)  /*,cwidth: '5%', cccwidth: '28%' */ },
              
            
           
        ];
 
        var _pageAdd = function () {
            OpenWindow("安排工作", "500px", "600px", "/DailyManagement/EditWorkmy/");
        }
 
        function _pageMemo() {
            OpenWindow("我的工作", "500px", "600px", "/DailyManagement/EditWorkmy/");
        }
 
        function edit(op, id) {
            let caption;
          
            caption = "我的工作";
           
            OpenWindow(caption, "500px", "600px", "/DailyManagement/EditWorkmy/?id=" + id);
 
        }
 
        function banli(op, id) {
            let caption;
            caption = "工作办理";
            OpenWindow(caption, "500px", "600px", "/DailyManagement/EditWorkBanLi/?id=" + id);
 
        }
        function shensu(  id) {
            let caption;
            caption = "工作申诉";
            OpenWindow(caption, "500px", "600px", "/DailyManagement/EditWorkShenSu/?id=" + id);
 
        }
        
 
        function del(id) {
            $.ajax({
                type: "POST",
                url: "/DailyManagement/ModifyWorkmyStatus?id=" + id + "&isReaded=false",
                dataType: "json",
                global: false,
                async: false,
                data: '',
                success: function (data) {
 
 
                    if (data.Result) {
                        window._reloadPageData();
                        toastr.success("删除成功");
 
                    }
                    else {
                        toastr.error(data.Message);
                    }
 
                },
                error: function () {
 
                    toastr.error("删除失败");
                }
            });
        }
 
        var _afterSave = function (result) {
            if (result) {
                toastr.success("保存成功");
            } else {
                toastr.error("保存失败");
            }
 
        }
 
        var _afterDel = function (result) {
            if (result) {
                toastr.success("删除成功");
            } else {
                /**/
                toastr.error("删除成功");
                /**/
            }
        }
 
 
 
    </script>
}
 
@section footerScripts{
    <script type="text/javascript">
 
        
 
 
 
 
 
 
 
 
        function sendZhiwustatus() {
 
            var msg = $("#PBSHaveRead");
 
 
            if (msg.length > 0) {
                $("#PBSHaveRead").val("0");
                $("#PBSHaveRead").trigger('chosen:updated');//更新选项
                _pageSearch();
            } else {
                setTimeout(sendZhiwustatus, 300);
            }
        }
 
 
        sendZhiwustatus();
 
    </script>
}