MarketViolationInfos.cshtml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. 
  2. @{
  3. Layout = null;
  4. }
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta name="viewport" content="width=device-width" />
  9. <title>MarketViolationInfos</title>
  10. <link href="~/easyui/themes/default/easyui.css" rel="stylesheet" />
  11. <link rel="stylesheet" type="text/css" href="~/easyui/themes/icon.css" />
  12. <link href="~/Content/css/bootstrap.min.css" rel="stylesheet" />
  13. <link href="~/Content/js/plugins/layer/skin/layer.css" rel="stylesheet" />
  14. <script src="~/Content/js/jquery.min.js"></script>
  15. <script src="~/Content/js/bootstrap.min.js"></script>
  16. <script src="~/easyui/jquery.easyui.min.js"></script>
  17. <script src="~/easyui/jquery.easyui.mobile.js"></script>
  18. <script src="~/easyui/locale/easyui-lang-zh_CN.js"></script>
  19. <script src="~/Content/js/plugins/layer/laydate/laydate.js"></script>
  20. <script src="~/Content/js/plugins/layer/layer.min.js"></script>
  21. <script src="~/js/Utils.js"></script>
  22. <script src="~/Content/plugins/ajaxFileUpload/ajaxFileUpload-M.js"></script>
  23. <link href="~/Content/css/Style/Markets.css" rel="stylesheet" />
  24. <script src="~/Content/js/js/MarketJs.js"></script>
  25. </head>
  26. <body >
  27. <section class="hidden">
  28. <input id="hid_Type" name="hid_Type" type="hidden" value="0" />
  29. </section>
  30. <section style="height:95vh; padding: 10px 20px;">
  31. <div class="row tbToolBar" id="tbToolBar">
  32. <div class="toolbar">
  33. <a href="#" class="easyui-linkbutton" iconCls="icon-application_view_detail" plain="true" onclick="btn_Detail();">查看详情</a>
  34. </div>
  35. </div>
  36. <table id="dgTable" class="easyui-datagrid" style="height: 100%;"
  37. data-options="singleSelect: true,
  38. method: 'post',
  39. multiSort: false,
  40. toolbar: '#tbToolBar',
  41. fitColumns: true,
  42. @*rownumbers: true,*@
  43. remoteSort: false,
  44. @*loadFilter: pagerFilter,*@
  45. onDblClickRow: function () {
  46. btn_Detail();
  47. },
  48. pagination: true,
  49. pageSize: 50,
  50. pageList: [20, 50, 100]
  51. ">
  52. <thead>
  53. <tr>
  54. <th data-options="field:'MarketName',width:150">市场名称</th>
  55. <th data-options="field:'LogType',width:120">违规行为</th>
  56. <th data-options="field:'Result',width:50">处理记录</th>
  57. <th data-options="field:'LogDate',width:80">记录日期</th>
  58. <th data-options="field:'Checher',width:80">检查人</th>
  59. <th data-options="field:'IsRead',width:80">是否阅读</th>
  60. </tr>
  61. </thead>
  62. </table>
  63. </section>
  64. <section>
  65. <div id="winModal" class="easyui-window winModal" title="市场违规行为详情" style="width: 450px;padding:10px;"
  66. iconCls="icon-save" data-options="modal:true,closed:true">
  67. <div class="easyui-layout" data-options="fit:true" style="height:99%">
  68. <div data-options="region:'center'" style="padding:15px 25px 0;">
  69. <form id="form">
  70. @Html.Hidden("ViolationsNo")
  71. <div class="panle-fluid">
  72. <div class="input-group">
  73. <label class="input-group-addon control-label" for="MarketName">市场名称</label>
  74. <input class="form-control input-group-addon" aria-disabled="true" name="MarketName" id="MarketName" type="text" value="" placeholder="市场名称" />
  75. </div>
  76. <div class="input-group">
  77. <label class="input-group-addon control-label" for="LogType">违规行为</label>
  78. <input class="form-control input-group-addon" aria-disabled="true" name="LogType" id="LogType" type="text" value="" placeholder="违规行为" />
  79. </div>
  80. <div class="input-group">
  81. <label class="input-group-addon control-label" for="LogDate">记录日期</label>
  82. <input class="form-control input-group-addon laydate-icon" aria-disabled="true" name="LogDate" id="LogDate" type="text" value="" placeholder="" />
  83. </div>
  84. <div class="input-group">
  85. <label class="input-group-addon control-label" for="LogContent">行为内容</label>
  86. <textarea class="form-control input-group-addon" aria-disabled="true" rows="5" name="LogContent" id="LogContent" type="text" value="" placeholder=""></textarea>
  87. </div>
  88. <div class="input-group">
  89. <label class="input-group-addon control-label" for="Result">处理记录</label>
  90. <input class="form-control input-group-addon" aria-disabled="true" name="Result" id="Result" type="text" value="" placeholder="处理记录" />
  91. </div>
  92. <div class="input-group">
  93. <label class="input-group-addon control-label" for="Checher">检查人</label>
  94. <input class="form-control input-group-addon" aria-disabled="true" name="Checher" id="Checher" type="text" value="" placeholder="" />
  95. </div>
  96. <div class="input-group">
  97. <label class="input-group-addon control-label" for="FileTitle">附件下载</label>
  98. <input class="form-control input-group-addon" aria-disabled="true" name="FileTitle" id="FileTitle" type="text" value="" placeholder="" disabled="disabled" />
  99. <a id="FileDownload" class="input-group-addon control-label" href="#" data-src="" onclick="FileDownload('#FileDownload')" download="" style="cursor:pointer">点击下载</a>
  100. </div>
  101. </div>
  102. </form>
  103. </div>
  104. <div data-options="region:'south',border:false" style="text-align:right;height:45px; padding:13px 20px 0;">
  105. <a class="easyui-linkbutton" id="Save" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="btn_Read()" style="width:80px">确认已读</a>
  106. <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#winModal').window('close');" style="width:80px">关闭</a>
  107. </div>
  108. </div>
  109. </div>
  110. </section>
  111. <script>
  112. function btn_Read() {
  113. //var violationsNo = (type === "Add" || type === "Edit") ? $("#ViolationsNo").val() : $('#dgTable').datagrid('getSelections')[0].ID;
  114. $.ajax({
  115. url: "@Url.Action("SetViolationMsgRead", "Main")",
  116. type: "post",
  117. dataType: "json",
  118. data: {
  119. ViolationsNo: $("#ViolationsNo").val()
  120. },
  121. success: function (data) {
  122. if (CheckAajxData(data) === false) return;
  123. var msg = data.ErrorInfo;
  124. if (data.Success === true) {
  125. LoadTable();
  126. window.parent.MsgTips();
  127. $("#winModal").window("close");
  128. layer.alert(msg, { icon: 1, title: '提示信息' });
  129. } else {
  130. layer.alert(msg, { icon: 7, title: '提示信息' });
  131. }
  132. }
  133. });
  134. }
  135. function btn_Detail() {
  136. var rows = $('#dgTable').datagrid('getSelections');
  137. if (rows.length === 1) {
  138. var row = rows[0];
  139. //console.log(row);
  140. $("#ViolationsNo").val(row.ViolationsNo);
  141. $("#LogType").val(row.LogType);
  142. $("#Result").val(row.Result);
  143. $("#MarketName").val(row.MarketName);
  144. $("#LogContent").val(row.LogContent);
  145. $("#Checher").val(row.Checher);
  146. $("#LogDate").val(row.LogDate);
  147. $("#FileTitle").val(row.FileTitle);
  148. if (row.FilePath != null && row.FilePath !== "" && row.FileName != null && row.FileName !== "")
  149. $("#FileDownload").attr({
  150. "href": "../" + row.FilePath + "/" + row.FileName,
  151. "download": row.FileTitle,
  152. "onclick": "FileDownload('#FileDownload')"
  153. });
  154. else
  155. $("#FileDownload").removeAttr("href").removeAttr("onclick");
  156. $("#winModal input").attr("disabled", "disabled");
  157. $("#winModal textarea").attr("disabled", "disabled");
  158. $("#winModal").window("open");
  159. } else {
  160. layer.alert('请选择一条记录进行设置', { icon: 7, title: '提示信息' });
  161. }
  162. }
  163. //加载表格数据
  164. function LoadTable(value, item) {
  165. $('#dgTable').datagrid({
  166. url: '@Url.Action("MarketViolationsListResult", "GetResult")' + '?PcVal=' + escape(value) + '&PcItem=' + item
  167. });
  168. }
  169. $(function () {
  170. //加载表格数据
  171. //var value = $(".textbox.searchbox .textbox-value").val(), item = $(".textbox.searchbox .textbox-value").attr("name");
  172. LoadTable();
  173. //加载日历控件
  174. laydate({
  175. elem: '#LogDate',
  176. format: "YYYY-MM-DD",
  177. min: "1980-01-01",
  178. event: "focus"
  179. });
  180. });
  181. </script>
  182. </body>
  183. </html>