Show.cshtml 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. @{
  2. ViewBag.Title = "Show";
  3. Layout = "~/Views/Shared/_Layout.cshtml";
  4. }
  5. @using MES.Production.Service;
  6. @using Central.Control.Domain;
  7. @using Ant.Service.Common;
  8. @using Ant.Service.Common.Enums;
  9. @model SYS_MSG
  10. @{
  11. var attach = ViewData["Attach"] == null ? "" : ViewData["Attach"] as dynamic;
  12. var readUser = ViewData["ReadUser"] == null ? "" : ViewData["ReadUser"] as dynamic;
  13. }
  14. <style>
  15. body{background-color:#fff;}
  16. .tab-pane .form-group .under {
  17. border-bottom: 1px solid #ccc;
  18. min-height: 18px;
  19. float: left;
  20. margin-top: 7px;
  21. font-weight: normal;
  22. }
  23. .tab-pane .form-group .col-sm-1 {
  24. width: 12%;
  25. font-weight: normal;
  26. }
  27. </style>
  28. <div class="wrapper-content form-horizontal">
  29. <div class="panel-body" style="height:420px; overflow:auto;">
  30. <div class="tab-content">
  31. <div id="tab-1" class="tab-pane active">
  32. <div class="form-group">
  33. <label class="col-sm-1 control-label">标题</label>
  34. <label class="col-sm-10 under">
  35. @Model.MSGNAME
  36. </label>
  37. </div>
  38. <div class="form-group">
  39. <label class="col-sm-1 control-label">发件人</label>
  40. <label class="col-sm-10 under" style="word-break:break-all;">
  41. @{
  42. string per = readUser;
  43. string res = string.Empty;
  44. if (!string.IsNullOrEmpty(per))
  45. {
  46. for (int i = 0; i < per.Split(',').Length; i++)
  47. {
  48. if (per.Split(',')[i].ToString().Split('|')[0] == "0")
  49. {
  50. res += " <i class=\"im-envelop3\" style=\"color:#f0ad4e;\"></i>";
  51. }
  52. else
  53. {
  54. res += " <i class=\"im-envelop-opened\" style=\"color:#1ab394;\"></i>";
  55. }
  56. res += per.Split(',')[i].ToString().Split('|')[1];
  57. }
  58. }
  59. @Html.Raw(res);
  60. }
  61. </label>
  62. </div>
  63. <div class="form-group">
  64. <label class="col-sm-1 control-label">正文</label>
  65. <div class="panel-content col-sm-10 under">
  66. @Html.Raw(Model.MSGCONTENT)
  67. </div>
  68. </div>
  69. <div class="form-group">
  70. <label class="col-sm-1 control-label">附件</label>
  71. <label class="col-sm-10 under">
  72. @{
  73. //处理附件
  74. if (attach != null)
  75. {
  76. foreach (var item in attach)
  77. {
  78. <a href="@item.UPFILEPATH" target="_blank">@item.UPOLDNAME</a>
  79. <input type="hidden" name="attchs" value="@item.UPFILEPATH" />
  80. <br />
  81. }
  82. }
  83. }
  84. </label>
  85. </div>
  86. </div>
  87. </div>
  88. </div>
  89. <div class="hr-line-dashed" style="margin:0;">
  90. <div class="form-group m20" style="text-align:center;">
  91. <div>
  92. <button class="btn btn-primary btn-save"><i class="fa fa-check"></i> <span>关 闭</span></button>
  93. </div>
  94. </div>
  95. </div>
  96. </div>
  97. @section scripts{
  98. <script type="text/javascript">
  99. $('.btn-save').click(function () {
  100. dig.remove();
  101. });
  102. </script>
  103. }