RevDetail.cshtml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. @{
  2. ViewBag.Title = "RevDetail";
  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 revUser = ViewData["RevUser"] as SYS_USER;
  13. }
  14. <style>
  15. .changeicon {
  16. float: right;
  17. margin-right: -15px;
  18. position: absolute;
  19. right: -7px;
  20. top: 0px;
  21. border: none;
  22. background-color: #18a689;
  23. color: #FFFFFF;
  24. line-height: 33px;
  25. height: 33px;
  26. }
  27. .col-lg-3 {
  28. width: 12% !important;
  29. }
  30. .f-hafl .col-hafl .col-lg-3 {
  31. width: 24% !important;
  32. }
  33. .col-lg-8 ul {
  34. width: 100%;
  35. margin-top: 4px;
  36. padding: 0px;
  37. }
  38. .col-lg-8 ul li {
  39. width: 100px;
  40. height: 100px;
  41. float: left;
  42. list-style: none;
  43. line-height: 100px;
  44. margin-bottom: 10px;
  45. margin-right: 10px;
  46. border: 1px solid #f8ac59;
  47. }
  48. .col-lg-8 ul li img {
  49. width: 100px;
  50. height: 75px;
  51. margin-top: 0px;
  52. vertical-align: top;
  53. }
  54. .col-lg-8 ul li span {
  55. height: 25px;
  56. line-height: 25px;
  57. background-color: #f8ac59;
  58. float: left;
  59. width: 100px !important;
  60. margin-top: -25px;
  61. }
  62. .col-lg-8 ul li span .remove {
  63. margin-right: 5px;
  64. color: #ffffff;
  65. float: right;
  66. }
  67. .col-lg-8 ul li span .set {
  68. margin-left: 5px;
  69. color: #ffffff;
  70. float: left;
  71. }
  72. .imgactive {
  73. color: #1ab394 !important;
  74. }
  75. .col-lg-8 ul li span a:hover {
  76. text-decoration: underline;
  77. color: #1ab394;
  78. }
  79. #tab_attach thead tr th {
  80. font-size: 14px;
  81. font-weight: bold;
  82. border: 1px solid #1ab394;
  83. text-align: center;
  84. }
  85. #tab_attach tbody tr td {
  86. border: 1px solid #1ab394;
  87. padding: 5px;
  88. }
  89. #tab_attach tbody tr td span {
  90. cursor: pointer;
  91. }
  92. #tab_attach tbody tr td span:hover {
  93. cursor: pointer;
  94. text-decoration: underline;
  95. }
  96. #tab_attach tbody tr td:first-child, #tab_attach tbody tr td:last-child {
  97. text-align: center;
  98. }
  99. </style>
  100. @using (Ajax.BeginForm("Save", null, new AjaxOptions()
  101. {
  102. HttpMethod = "Post",
  103. OnBegin = "SubInfo.Loading",
  104. OnComplete = "SubInfo.Complate",
  105. OnFailure = "SubInfo.Failure",
  106. OnSuccess = "SubInfo.Success",
  107. }, new { @class = "form-horizontal dig-from" }))
  108. {
  109. <div class="row white-bg animated fadeInRight">
  110. <div class="wrapper-content">
  111. <div class="panel-body">
  112. <div class="tab-content">
  113. <div id="tab-1" class="tab-pane active">
  114. <div class="form-group">
  115. <label class="col-lg-3 control-label">标题:</label>
  116. <div class="col-sm-10">
  117. @Html.TextBox("MSGNAME", "回复:" + Model.MSGNAME, new { @class = "form-control", @placeholder = "请输入标题" })
  118. </div>
  119. </div>
  120. <div class="form-group">
  121. <label class="col-lg-3 control-label">接收人:</label>
  122. <div class="col-sm-10">
  123. <label style="margin-top:7px;">@revUser.NAME</label>
  124. @Html.Hidden("hidsendUserid", @revUser.ID)
  125. </div>
  126. </div>
  127. <div class="form-group">
  128. <label class="col-lg-3 control-label">内容:</label>
  129. <div class="col-sm-10">
  130. @Html.TextAreaFor(p => p.MSGCONTENT, new { @id = "MSGCONTENT", @rows = "3", @cols = "5" })
  131. </div>
  132. </div>
  133. <div class="form-group">
  134. <label class="col-lg-3 control-label">定时发送:</label>
  135. <div class="col-sm-10">
  136. @Html.TextBox("SendTimer", null, new { @class = "form-control", @maxlength = "12", @onclick = "ldate('SendTimer','YYYY-MM-DD hh:mm:ss')", @style = "width:240px;float:left;" })
  137. <label class="checkbox-inline" style="margin-left:25px;">
  138. <input type="checkbox" class="i-check" id="ismsg" />短信通知审批人
  139. </label>
  140. </div>
  141. </div>
  142. <div class="form-group">
  143. <label class="col-lg-3 control-label">附件 :</label>
  144. <div class="col-sm-10">
  145. <span class="input-group-btn"><button type="button" class="btn btn-sm btn-primary" id="upattch"><i class="im-plus"></i> 添加附件 </button> </span>
  146. <table id="tab_attach" cellpadding="0" width="100%" style="border: 1px solid #65CEA7; margin-top: 10px; ">
  147. <thead>
  148. <tr>
  149. <th style="width:50px;">操作</th>
  150. <th style="width:150px;">上传时间</th>
  151. <th style="width:80px;">上传者</th>
  152. <th>名称</th>
  153. <th style="width:70px;">大小</th>
  154. </tr>
  155. </thead>
  156. <tbody id="tbAttch">
  157. @{
  158. //处理附件
  159. if (attach != null)
  160. {
  161. foreach (var item in attach)
  162. {
  163. <tr>
  164. <td></td>
  165. <td>@item.UPTIME</td>
  166. <td>@item.UPOPEATOR</td>
  167. <td>
  168. <a href="@item.UPFILEPATH" target="_blank">@item.UPOLDNAME</a>
  169. <input type="hidden" name="attchs" value="@item.UPFILEPATH" />
  170. </td>
  171. <td>@item.UPFILESIZE.ToString()@item.UPFILEUNIT</td>
  172. </tr>
  173. }
  174. }
  175. }
  176. </tbody>
  177. </table>
  178. </div>
  179. </div>
  180. </div>
  181. <div class="hr-line-dashed">
  182. <div class="form-group m20">
  183. <div class="col-sm-2 col-sm-offset-2">
  184. <button class="btn btn-primary btn-save" type="submit" action="save"><i class="fa fa-check"></i> <span>确认发送</span></button>
  185. <button class="btn btn-warning" type="button"><i class="im-undo2"></i> 取消返回</button>
  186. </div>
  187. </div>
  188. </div>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. }
  194. <script type="text/javascript" src="/ueditor/ueditor.config.js"></script>
  195. <script type="text/javascript" src="/ueditor/ueditor.all.min.js"></script>
  196. <script type="text/javascript">
  197. var ue = UE.ui.Editor({ initialFrameHeight: 300, autoFloatEnabled: false });
  198. ue.render('MSGCONTENT');
  199. </script>
  200. @section scripts{
  201. <script type="text/javascript">
  202. var dialog = top.dialog.get(window);
  203. //移除
  204. function removeimg(t) {
  205. $('#' + t).parent().parent().remove();
  206. };
  207. //上传附件
  208. $('#upattch').click(function () {
  209. dig.upload('', function () {
  210. var retval = this.returnValue;
  211. if (retval != '') {
  212. json = JSON.parse(retval);
  213. var num = $('#upattch').find('tr').length;
  214. //自动增加附件记录
  215. var html = '<tr>';
  216. html += '<td><span id="attch"' + num + ' onclick="javascript:removeimg(this.id)">移除</span></td>';
  217. html += '<td><a href="' + json.path + '" target="_blank">' + json.oldname + '</a><input type="hidden" name="attchs" value="' + json.path + '"/>';
  218. html += ' <td>' + json.unitsize + '</td></tr>';
  219. $('#tbAttch').append(html);
  220. }
  221. });
  222. });
  223. $('.btn-warning').click(function () {
  224. dialog.close('no').remove();
  225. });
  226. //提交
  227. var SubInfo = {
  228. Loading: function () {
  229. $(".btn-save").attr("disabled", "disabled").find("span").html("正在发送中...")
  230. },
  231. Success: function (result) {
  232. if (result.Status == undefined) {
  233. document.writeln(result);
  234. } else if (result.Status == "y") {
  235. dig.alertSuccess('提示', result.Msg, function () {
  236. dialog.close('yes').remove();
  237. //dialog.remove();
  238. //window.location.href = "/SysManage/Msg/RevIndex";
  239. });
  240. } else {
  241. dig.alertError("错误提示:", result.Msg);
  242. }
  243. SubInfo.Complete();
  244. },
  245. Failure: function () {
  246. dig.alertError("错误提示:", "网络超时,请稍后再试...");
  247. SubInfo.Complete();
  248. },
  249. Complete: function () {
  250. $(".btn-save").attr("disabled", false).find("span").html("确认发送");
  251. }
  252. };
  253. </script>
  254. }