_LayoutPage_Report_ToolbarPartial.cshtml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. @using Hospital.Model.D_Models.Models
  2. @using Hospital.Model.Models
  3. @*<link href="~/Content/themes/jquery-ui-bootstrap/jquery-ui-1.10.1.custom.css?v=@Hospital.Core.Utility.AppVersion(true)" rel="stylesheet" />
  4. <link href="~/assets/Report/bower_components/bootstrap/dist/bootstrap.css" rel="stylesheet" />
  5. <link href="~/Content/ui-dialog-custom.css" rel="stylesheet" />*@
  6. @section head
  7. {
  8. <style>
  9. #alertWaringWrap {
  10. display: none;
  11. }
  12. </style>
  13. }
  14. @model D_MedicalRecord
  15. @{
  16. var userpermissionList = ViewBag.UserPermissionsIDSet as HashSet<int>;
  17. var isLeakManager = Hospital.Core.Utility.IsExitDataInList(userpermissionList, 18);
  18. var userprofile = ViewBag.UserProfile as Q_UserProfile;
  19. var isDataManager = Hospital.Core.Utility.IsExitDataInList(userpermissionList, 6);
  20. var isDeptDataManager = Hospital.Core.Utility.IsExitDataInList(userpermissionList, 7);
  21. var isDataFlow = Hospital.Core.Utility.IsExitDataInList(userpermissionList, 8);
  22. var isDataShenheEdit = Hospital.Core.Utility.IsExitDataInList(userpermissionList, 9);
  23. var isDataShenheEdit1 = Hospital.Core.Utility.IsExitDataInList(userpermissionList, 13); //是否可编辑审核前的数据
  24. var isTianbao = Hospital.Core.Utility.IsExitDataInList(userpermissionList, 10);
  25. var isFinalManager = Hospital.Core.Utility.IsExitDataInList(userpermissionList, 23);
  26. var CanReportChangeStatus = bool.Parse(Hospitol.Common.OptionsHelper.GetOption("CanReportChangeStatus") ?? "false"); //是否允许填报人员填报数据时标记无需上报
  27. var OpenAutoReportCheck = bool.Parse(Hospitol.Common.OptionsHelper.GetOption("OpenAutoReportCheck") ?? "false");
  28. var OpenReportCheck = bool.Parse(Hospitol.Common.OptionsHelper.GetOption("OpenReportCheck") ?? "false");
  29. var isEdit_0 = Hospital.Core.Utility.IsExitDataInList(userpermissionList, 32);
  30. var isEdit_8 = Hospital.Core.Utility.IsExitDataInList(userpermissionList, 33);
  31. //var OpenShSuspectRecord = bool.Parse(Hospitol.Common.OptionsHelper.GetOption("OpenShSuspectRecord") ?? "false");
  32. }
  33. <div class="navbar navbar-static-top navbar-default" style="background-color:white">
  34. <div class="navbar-inner">
  35. <div class="container" style="width:100%;padding-left: 100px;">
  36. @if (ViewBag.Logo != null)
  37. {
  38. <img src="@ViewBag.Logo" id="logoImg" style="margin:5px 5px 5px 0px;" />
  39. }
  40. <span class="brand text-brand" style="color:#434343;text-shadow:none;margin-left:5px;padding-left:0px" id="hospitalLogoIcon">
  41. <i class="fa fa-file-text-o"></i>
  42. @ViewBag.Title
  43. <small class="mg-l-20">
  44. <a id="report-tip-popover" class="cursor-help" data-placement="bottom"><span>填报要求</span> <i class="fa fa-caret-down"></i></a>
  45. </small>
  46. </span>
  47. <div id="report-actions" class="btn-group pull-right" style="padding-right:100px;">
  48. @if (!string.IsNullOrEmpty((string)ViewBag.SearchHISData))
  49. {
  50. <button class="btn btn-info" id="btn-searchHISViewData" data-url="@ViewBag.SearchHISData" data-hospitalname="@ViewBag.HospitalName" data-username="@userprofile.UserName" style="width:110px;"><i class="icon-white icon-remove"></i>@ViewBag.SearchHISDataBtnName</button>
  51. }
  52. @if (!string.IsNullOrEmpty((string)ViewBag.SearchHISData2))
  53. {
  54. <button class="btn btn-info" id="btn-searchHISViewData" data-url="@ViewBag.SearchHISData2" data-hospitalname="@ViewBag.HospitalName" data-username="@userprofile.UserName" style="width:110px;"><i class="icon-white icon-remove"></i>@(ViewBag.SearchHISDataBtnName + "2")</button>
  55. }
  56. @if ((bool)ViewBag.OpenDieaseAutoYyfx)
  57. {
  58. <button class="btn btn-info" id="btn-yyfxCotent" style="width:145px;"><i class="icon-white icon-remove"></i>查看完整病历溯源</button>
  59. }
  60. @if (ViewBag.LeakId != null && (CanReportChangeStatus || isLeakManager))
  61. {
  62. <button class="btn btnUnreport" id="btn-change-status-wusb"><i class="fa fa-times-circle-o"></i>无需上报</button>
  63. }
  64. @if (Model.ID > 0)
  65. {
  66. var islock = Model.IsLock.HasValue ? Model.IsLock : false;
  67. if (Model.BackUpFlag == 0 && ViewBag.IsV2 && !islock)
  68. {
  69. if ((Model.Add_UserProfileId == userprofile.PID && (Model.Status == 0 || Model.Status == 8)) ||
  70. ViewBag.IsSuper ||
  71. ((isDataManager || isDeptDataManager) && isDataShenheEdit && Model.Status == 11) ||
  72. ((isDataManager || isDeptDataManager || Model.Add_UserProfileId == userprofile.PID) && isDataShenheEdit1 && Model.Status == 1) ||
  73. ((isDataManager || isDeptDataManager) && isEdit_0 && Model.Status == 0) ||
  74. ((isDataManager || isDeptDataManager) && isEdit_8 && Model.Status == 8)
  75. )
  76. {
  77. if (Model.Ncis_IsExportWsb == null || !Model.Ncis_IsExportWsb.Value)
  78. {
  79. //未对接到卫健委的数据才允许修改
  80. <button class="btn btn-info" id="edit"><i class="fa fa-edit"></i>编辑</button>
  81. }
  82. if (isDataManager || isDeptDataManager || ViewBag.IsSuper)
  83. {
  84. if (Model.Status != 9 && Model.Status != 0 && (userprofile.UserName == "admin" || (Model.Status != 20))) //不等于作废或暂存或审核通过 && item.Status!=11
  85. {
  86. if (isDataFlow)
  87. {//有数据流转权限
  88. <button class="btn btn-success" id="btn-change-status" data-id="@(Model.ID)" data-class="@(Model.ReportClass)" data-statusname="@(((Hospital.Core.Enum.ReportEnum.Status)Model.Status).ToString())" data-status="@(Model.Status)"><i class="fa fa-check"></i>审核</button>
  89. }
  90. else
  91. {
  92. <button class="btn btn-success" id="btn-change-status1" data-id="@(Model.ID)" data-class="@(Model.ReportClass)" data-statusname="@(((Hospital.Core.Enum.ReportEnum.Status)Model.Status).ToString())" data-status="@(Model.Status)"><i class="fa fa-check"></i>审核</button>
  93. }
  94. }
  95. }
  96. if (ViewBag.IsSuper || isDataManager || isDeptDataManager)
  97. {
  98. <a class="btn" target="_blank" href="@Url.Action("PreView", "Report", new { @id = Model.ID, @returnUrl = HttpUtility.UrlEncode(Request.RawUrl) })" title="@ViewBag.DefindNameCL">
  99. <i class="fa fa-list"></i>详情
  100. </a>
  101. }
  102. if (CanReportChangeStatus || isLeakManager)
  103. {
  104. <button class="btn btnUnreport hidden" id="btn-change-status-wusb"><i class="icon-white icon-remove"></i>无需上报</button>
  105. }
  106. <button class="btn btn-primary" id="valRepeat" style="display:none;"><i class="fa fa-check"></i>验证重复</button>
  107. if (Model.Status == 0 || Model.Status == 8)
  108. {
  109. <button class="btn btn-info" id="save" style="display:none;"><i class="fa fa-save"></i>暂存</button>
  110. }
  111. <button class="btn btn-success" id="submit" style="display:none;"><i class="fa fa-upload"></i>上报</button>
  112. if (OpenReportCheck)
  113. {
  114. <button class="btn btn-info" id="btn-reportCheck" style="width: 115px; display: none;"><i class="fa fa-check-circle-o" aria-hidden="true"></i>指标质检</button>
  115. }
  116. }
  117. }
  118. }
  119. else if (ViewBag.IsV2)
  120. {
  121. if (CanReportChangeStatus || isLeakManager)
  122. {
  123. <button class="btn btnUnreport hidden" id="btn-change-status-wusb"><i class="icon-white icon-remove"></i>无需上报</button>
  124. }
  125. <button class="btn btn-primary" id="valRepeat"><i class="fa fa-check"></i>验证重复</button>
  126. <button class="btn btn-info" id="save"><i class="fa fa-save"></i>暂存</button>
  127. <button class="btn btn-success" id="submit"><i class="fa fa-upload"></i>上报</button>
  128. if (OpenReportCheck)
  129. {
  130. <button class="btn btn-info" id="btn-reportCheck" style="width:115px;"><i class="fa fa-check-circle-o" aria-hidden="true"></i>指标质检</button>
  131. }
  132. }
  133. @if (!string.IsNullOrEmpty(Request.QueryString["returnUrl"]) && Request.QueryString["returnUrl"].Contains("Report") && Request.QueryString["returnUrl"].Contains("List"))
  134. {
  135. <a role="button" class="btn btn-default clostbtn" title="关闭之前请先点保存,否则所做更改无效。" href="javascript:history.go(-1)"><i class="fa fa-times"></i>关闭</a>
  136. }
  137. else
  138. {
  139. <a role="button" class="btn btn-default clostbtn" title="关闭之前请先点保存,否则所做更改无效。"><i class="fa fa-times"></i>关闭</a>
  140. }
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. <div class="control-group hide" id="SendHISData">
  146. <label class="control-label" style="width:150px;">唯一检测数据值:</label><div class="controls">
  147. <input type="text" class="textbox" id="uniqueValue" style="width:260px;" /><span style="color:red;margin-left:30px;" id="uniqueMessage"></span>
  148. </div>
  149. </div>
  150. @*@Scripts.Render("~/bundles/jquery")
  151. @Scripts.Render("~/bundles/bootstrap")
  152. @Scripts.Render("~/bundles/jqueryui")
  153. @Scripts.Render("~/bundles/knockout")*@
  154. @*<script type="text/javascript" src="~/Scripts/jquery.easyui.min.js"></script>
  155. <script src="~/Scripts/jquery.cookie.js?v=@Hospital.Core.Utility.AppVersion(true)"></script>
  156. *@
  157. <script>
  158. window.onbeforeunload = onbeforeunload_handler;
  159. function onbeforeunload_handler() {
  160. var warning = "确认退出?";
  161. $.unblockUI();
  162. return warning;
  163. }
  164. $('.clostbtn').click(function () {
  165. window.opener = null;
  166. window.close();
  167. })
  168. var global = {
  169. itemId: '@Model.ID',
  170. reportId: '@Model.ReportNo',
  171. currentUser: '@ViewBag.UserName',
  172. currentUserId: '@ViewBag.UserProfileId',
  173. Mould1: '@ViewBag.Mould1',
  174. Mould2: '@ViewBag.Mould2',
  175. Mould3: '@ViewBag.Mould3',
  176. Mould4: '@ViewBag.Mould4',
  177. Mould5: '@ViewBag.Mould5',
  178. OpenAutoReportCheck:'@OpenAutoReportCheck',
  179. urls: {
  180. UpdateStatus: '@Url.Action("UpdateStatus", "Report")',
  181. UpdateIsFinal: '@Url.Action("UpdateIsFinal", "Report")',
  182. IssueTag: {
  183. GetIssueTagsJson: '@Url.Action("GetIssueTagsJson", "IssueTag")',
  184. GetIssueTagJson: '@Url.Action("GetIssueTagJson", "IssueTag")',
  185. AddTag: '@Url.Action("AddTag", "IssueTag")',
  186. UpdateTag: '@Url.Action("UpdateTag", "IssueTag")',
  187. DeleteTag: '@Url.Action("DeleteTag", "IssueTag")'
  188. },
  189. uploadedFile: {
  190. GetFiles: '@Url.Action("GetFiles", "UploadFile")',
  191. Download: '@Url.Action("Download", "UploadFile")',
  192. Delete: '@Url.Action("Delete", "UploadFile")',
  193. Update: '@Url.Action("Update", "UploadFile")'
  194. },
  195. uploadify: {
  196. swf: '@Url.Content("~/Content/uploadify.swf")',
  197. uploader: '@Url.Action("Upload", "UploadFile")'
  198. },
  199. Issues: {
  200. GetIssusJson: '@Url.Action("GetIssuesJson", "Issue")',
  201. AddIssue: '@Url.Action("AddIssue", "Issue")',
  202. DeleteIssue: '@Url.Action("DeleteIssue", "Issue")',
  203. UpdateIssue: '@Url.Action("UpdateIssue", "Issue")'
  204. },
  205. Logs: {
  206. GetLogJson: '@Url.Action("GetLogJson", "ReportLog")',
  207. AddLog: '@Url.Action("AddLog", "ReportLog")',
  208. DeleteLog: '@Url.Action("DeleteLog", "ReportLog")'
  209. }
  210. }
  211. };
  212. $('input:radio[name="change-status"]').click(function () {
  213. //审核通过
  214. if ($(this).val() == 11) {
  215. $("#checkTo").removeClass("hide");
  216. $("#checkToWSB").change(function () {
  217. console.log($("#checkToWSB").attr("checked"));
  218. if ($("#checkToWSB").attr("checked") == undefined) {
  219. $("#checkToWSB").attr({ "checked": true });
  220. }else
  221. if ($("#checkToWSB").attr("checked") == "checked") {
  222. $("#checkToWSB").removeAttr("checked");
  223. }
  224. });
  225. $("#isFinal").change(function () {
  226. console.log($("#isFinal").attr("checked"));
  227. if ($("#isFinal").attr("checked") == undefined) {
  228. $("#isFinal").attr({ "checked": true });
  229. }else
  230. if ($("#isFinal").attr("checked") == "checked") {
  231. $("#isFinal").removeAttr("checked");
  232. }
  233. });
  234. } else {
  235. $("#checkTo").addClass("hide");
  236. $("#checkToWSB").removeAttr("checked");
  237. $("#isFinal").removeAttr("checked");
  238. }
  239. //移交待审
  240. if ($(this).val() == 2) {
  241. $("#YJDept").removeClass("hide");
  242. } else {
  243. $("#YJDept").addClass("hide");
  244. }
  245. });
  246. </script>