NotFinishProblem.cshtml 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. 
  2. @{
  3. ViewBag.Title = "NotFinishProblem";
  4. Layout = "~/Views/Shared/_MainLayoutPage.cshtml";
  5. }
  6. <script>
  7. var Type = '@ViewBag.Type';
  8. var PersonProperty = '@ViewBag.PersonProperty';
  9. $(function () {
  10. //关闭窗口
  11. $('#btnClose').bind('click', function () {
  12. ZLPMS.CloseTopWindow(false);
  13. });
  14. //问题列表
  15. $("#List").datagrid({
  16. url: "/Home/NotFinishProblemList",
  17. method: 'Get',
  18. pagination: true,
  19. singleSelect: true,
  20. fit: true,
  21. rownumbers: true,
  22. queryParams: { Type: Type },
  23. columns: [[
  24. { field: '编号', title: '编号', sortable: true, width: 60, align: 'center' },
  25. {
  26. field: '问题性质', title: '性质', width: 60, align: 'center', formatter: function (val, row, index) {
  27. switch (val) {
  28. case 1:
  29. return "<i class='fa fa-bug' title='Bug' style='color:red'>Bug</i>";
  30. case 2:
  31. return "<i class='fa fa-commenting-o' title='咨询'>咨询</i>";
  32. case 3:
  33. return "<i class='fa fa-dropbox' title='需求' style='color:#3279b6'>需求</i>";
  34. case 4:
  35. return "<i class='fa fa-history' title='任务'>任务</i>";
  36. default:
  37. break;
  38. }
  39. }
  40. },
  41. { field: '问题标题', title: '【问题标题】', width: 300, halign: 'center' },
  42. { field: '登记人', title: '登记人', width: 60, align: 'center' },
  43. { field: '登记日期', title: '登记日期', sortable: true, width: 140, align: 'center' },
  44. { field: '当前环节', title: '当前环节', sortable: true, width: 90, halign: 'center' },
  45. { field: '受理人', title: '当前受理人', sortable: true, width: 60, align: 'center' },
  46. { field: '渠道', title: '分公司(渠道)', width: 100, align: 'center' },
  47. { field: '机构', title: '医疗机构', width: 100, align: 'center' },
  48. { field: '产品', title: '产品类型', width: 100, align: 'center' },
  49. { field: '指派人', title: '被指派人', sortable: true, width: 60, align: 'center' },
  50. {
  51. field: '总耗时', title: '已耗小时', sortable: true, width: 80, formatter: function (val, row, index) {
  52. var rd = val % 24;
  53. if (val >= 24) {
  54. return parseInt(val / 24) + '天' + rd.toFixed(1) + '时';
  55. } else {
  56. return rd + '小时';
  57. }
  58. }
  59. }
  60. ]],
  61. onDblClickRow: function (rowIndex, rowData) {
  62. checkproblem();
  63. }
  64. })
  65. })
  66. //查看问题弹窗
  67. function checkproblem () {
  68. var that = this
  69. var WT = $('#List').datagrid("getSelected");
  70. if (WT == null) {
  71. top.ZLPMS.Msg("请选择一行数据!");
  72. }
  73. else {
  74. top.ZLPMS.OpenNewWindow("查看问题", "/Problem/CheckProblemWindow/" + WT["ID"], '880px', '600px', function () {
  75. DealProblem(0, 0, WT["ID"]);
  76. });
  77. }
  78. }
  79. function DealProblem (showAtt, IsSupport, ProblemId) {
  80. var that = this
  81. //是否为技术支持处理
  82. IsSupport = IsSupport || 0;
  83. //受理问题
  84. var receiveProblem = function (title,HJID) {
  85. var index = top.ZLPMS.Loading3(2);
  86. //受理问题
  87. $.ajax({
  88. url: '/Support/ReceiveProblem',
  89. data: { id: ProblemId },
  90. method: 'post',
  91. success: function (data) {
  92. top.ZLPMS.UnLoading(index);
  93. var url = "/Problem/ProductionPdeal?id=" + ProblemId + "&showAtt=" + showAtt + '&workflowid=' + HJID + '&IsSupport=' + IsSupport;
  94. //成功后调用
  95. if (data.code == 200) {
  96. top.ZLPMS.OpenNewWindow("处理问题:" + title, url, '1000px', '640px', function () {
  97. //回调用刷新(只有确定后才刷新)
  98. $('#List').datagrid('reload')
  99. });
  100. } else {//显示具体原因,并提示是否强制处理
  101. top.ZLPMS.Confirm('该问题已被他人受理,您确定要继续处理吗?', 3, function (idx) {
  102. top.ZLPMS.CloseWindow(idx);
  103. top.ZLPMS.OpenNewWindow("处理问题", url, '1000px', '640px');
  104. })
  105. }
  106. }
  107. });
  108. };
  109. $.post('/Problem/GetProblemById/' + ProblemId, function (data) {
  110. var row = data[0];
  111. if (row) {
  112. /*已关闭的问题,已解决的问题,已受理的问题, 不需要处理*/
  113. if (row.是否终止 == 1) {
  114. top.ZLPMS.Msg('已终止的问题不需要再处理!');
  115. return;
  116. }
  117. if (row.是否解决 == 1) {
  118. top.ZLPMS.Msg('已解决的问题不需要再处理!');
  119. return;
  120. }
  121. if (row.环节ID > 3 && PersonProperty != '1') {
  122. top.ZLPMS.Msg('非本部人员不能处理技术支持与研发处理环节问题,仅能查阅!');
  123. return;
  124. }
  125. if (row.环节ID == 3 && (PersonProperty == '3' || PersonProperty == '4' || PersonProperty == '5')) {//客户,机构管理员,卫计委人员无法处理项目问题
  126. top.ZLPMS.Msg('客户,机构管理员,卫计委人员无法处理项目问题,仅能查阅!');
  127. return;
  128. }
  129. //打开处理窗口
  130. receiveProblem(row.编号, row.环节ID);
  131. } else {//提醒用户没有选择问题记录
  132. top.ZLPMS.Msg('没有选择需要处理的问题记录,请选择后再处理!');
  133. }
  134. })
  135. }
  136. </script>
  137. <div class="easyui-layout" fit="true">
  138. <div data-options="region:'south',border:false" style="height:50px;text-align:right; padding:5px">
  139. <a href="#" id="btnClose" class="easyui-linkbutton c5">
  140. <i class="fa fa-power-off"></i>
  141. 关闭
  142. </a>
  143. </div>
  144. <div data-options="region:'center',border:false">
  145. <div class="easyui-tabs" data-options="fit:true,border:false">
  146. <div title="未完成问题" style="padding:5px;">
  147. <table class="easyui-datagrid" id="List"></table>
  148. </div>
  149. </div>
  150. </div>
  151. </div>