MarketViolationsQry.cshtml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. 
  2. @{
  3. Layout = null;
  4. }
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta name="viewport" content="width=device-width" />
  9. <title>MarketSellerViolationsQry</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. <link href="~/Content/css/Style/Markets.css" rel="stylesheet" />
  23. <script src="~/Content/js/js/MarketJs.js"></script>
  24. </head>
  25. <body >
  26. <section class="hidden">
  27. <input id="hid_Type" name="hid_Type" type="hidden" value="0" />
  28. </section>
  29. <section style="height:95vh; padding: 10px 20px;">
  30. <div class="row tbToolBar" id="tbToolBar">
  31. <div class="toolbar">
  32. <a href="#" class="easyui-linkbutton" iconCls="icon-application_view_detail" plain="true" onclick="btn_Detail();">查看详情</a>
  33. </div>
  34. <div class="toolbar-search">
  35. <div id="Search" class="easyui-panel" title="请展开面板输入查询条件" style="width: 300px; height: 330px; padding: 10px;"
  36. data-options="iconCls:'icon-heart',collapsible:true,minimizable:false,maximizable:false,closable:false,collapsed:true,tools:[
  37. {
  38. iconCls:'icon-search',
  39. handler:function(){LoadTable(true)}
  40. }]">
  41. <table>
  42. <tr>
  43. <td><label for="SearchMarketID">隶属市场</label></td>
  44. <td>
  45. <select class="easyui-combobox" type="text" id="SearchMarketID" name="SearchMarketID" style="height: 25px; width: 150px" data-options="">
  46. <option value="">全部</option>
  47. @Html.Raw(ViewBag.SelMarketInfo)
  48. </select>
  49. </td>
  50. </tr>
  51. <tr>
  52. <td><label for="SearchLogType">违规行为</label></td>
  53. <td>
  54. <select class="easyui-combobox" type="text" id="SearchLogType" name="SearchLogType" style="height: 25px; width: 150px" data-options="">
  55. <option value="">全部</option>
  56. @Html.Raw(ViewBag.SelLogTypeInfo)
  57. </select>
  58. </td>
  59. </tr>
  60. <tr>
  61. <td><label for="SearchIsRead">是否阅读</label></td>
  62. <td>
  63. <select class="easyui-combobox" type="text" id="SearchIsRead" name="SearchIsRead" style="height: 25px; width: 150px" data-options="">
  64. <option value="">全部</option>
  65. <option value="是">是</option>
  66. <option value="否">否</option>
  67. </select>
  68. </td>
  69. </tr>
  70. <tr>
  71. <td><label for="SearchChecher">检查人</label></td>
  72. <td>
  73. <input class="easyui-textbox" type="text" id="SearchChecher" name="SearchChecher" style="height: 25px; width: 150px" data-options="" />
  74. </td>
  75. </tr>
  76. <tr>
  77. <td><label for="SearchStartTime">开始时间</label></td>
  78. <td><input class="easyui-textbox" type="text" id="SearchStartTime" name="SearchStartTime" style="height: 25px; width: 150px" data-options=""/></td>
  79. </tr>
  80. <tr>
  81. <td><label for="SearchEndTime">结束时间</label></td>
  82. <td><input class="easyui-textbox" type="text" id="SearchEndTime" name="SearchEndTime" style="height: 25px; width: 150px" data-options=""/></td>
  83. </tr>
  84. <tr>
  85. <td colspan="2" style="text-align: center; width: 100%">
  86. <a href="#" class="easyui-linkbutton" iconCls="icon-search" style="width: 100%; height: 25px" onclick="LoadTable(true);">查询</a>
  87. </td>
  88. </tr>
  89. </table>
  90. </div>
  91. </div>
  92. </div>
  93. <table id="dgTable" class="easyui-datagrid" style="height: 100%;"
  94. data-options="singleSelect: true,
  95. method: 'post',
  96. multiSort: false,
  97. toolbar: '#tbToolBar',
  98. fitColumns: true,
  99. @*rownumbers: true,*@
  100. remoteSort: false,
  101. @*loadFilter: pagerFilter,*@
  102. onDblClickRow: function () {
  103. btn_Detail();
  104. },
  105. pagination: true,
  106. pageSize: 50,
  107. pageList: [20, 50, 100]
  108. ">
  109. <thead>
  110. <tr>
  111. <th data-options="field:'MarketName',width:150">市场名称</th>
  112. <th data-options="field:'LogType',width:120">违规行为</th>
  113. <th data-options="field:'Result',width:50">处理记录</th>
  114. <th data-options="field:'LogDate',width:80">记录日期</th>
  115. <th data-options="field:'Checher',width:80">检查人</th>
  116. <th data-options="field:'IsRead',width:80">是否阅读</th>
  117. </tr>
  118. </thead>
  119. </table>
  120. </section>
  121. <section>
  122. <div id="winModal" class="easyui-window winModal" title="市场违规行为详情" style="width: 450px;padding:10px;"
  123. iconCls="icon-save" data-options="modal:true,closed:true">
  124. <div class="easyui-layout" data-options="fit:true" style="height:99%">
  125. <div data-options="region:'center'" style="padding:15px 25px 0;">
  126. <form id="form">
  127. @Html.Hidden("ViolationsNo")
  128. <div class="panle-fluid">
  129. <div class="input-group">
  130. <label class="input-group-addon control-label" for="MarketName">市场名称</label>
  131. <input class="form-control input-group-addon" aria-disabled="true" name="MarketName" id="MarketName" type="text" value="" placeholder="市场名称"/>
  132. </div>
  133. <div class="input-group">
  134. <label class="input-group-addon control-label" for="LogType">违规行为</label>
  135. <input class="form-control input-group-addon" aria-disabled="true" name="LogType" id="LogType" type="text" value="" placeholder="违规行为" />
  136. </div>
  137. <div class="input-group">
  138. <label class="input-group-addon control-label" for="LogDate">记录日期</label>
  139. <input class="form-control input-group-addon laydate-icon" aria-disabled="true" name="LogDate" id="LogDate" type="text" value="" placeholder="" />
  140. </div>
  141. <div class="input-group">
  142. <label class="input-group-addon control-label" for="LogContent">行为内容</label>
  143. <textarea class="form-control input-group-addon" aria-disabled="true" rows="5" name="LogContent" id="LogContent" type="text" value="" placeholder=""></textarea>
  144. </div>
  145. <div class="input-group">
  146. <label class="input-group-addon control-label" for="Result">处理记录</label>
  147. <input class="form-control input-group-addon" aria-disabled="true" name="Result" id="Result" type="text" value="" placeholder="处理记录" />
  148. </div>
  149. <div class="input-group">
  150. <label class="input-group-addon control-label" for="Checher">检查人</label>
  151. <input class="form-control input-group-addon" aria-disabled="true" name="Checher" id="Checher" type="text" value="" placeholder="" />
  152. </div>
  153. <div class="input-group">
  154. <label class="input-group-addon control-label" for="FileTitle">附件下载</label>
  155. <input class="form-control input-group-addon" aria-disabled="true" name="FileTitle" id="FileTitle" type="text" value="" placeholder="" disabled="disabled" />
  156. <a id="FileDownload" class="input-group-addon control-label" href="#" data-src="" onclick="FileDownload('#FileDownload')" download="" style="cursor:pointer">点击下载</a>
  157. </div>
  158. </div>
  159. </form>
  160. </div>
  161. <div data-options="region:'south',border:false" style="text-align:right;height:45px; padding:13px 20px 0;">
  162. @*<a class="easyui-linkbutton" id="Save" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="Save()" style="width:80px">确认</a>*@
  163. <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#winModal').window('close');" style="width:80px">关闭</a>
  164. </div>
  165. </div>
  166. </div>
  167. </section>
  168. <script>
  169. //加载表格数据
  170. function LoadTable(collapsed) {
  171. collapsed = collapsed || false;
  172. var marketId = $("#SearchMarketID").combobox("getValue"),
  173. logType = $("#SearchLogType").combobox("getText"),
  174. isRead = $("#SearchIsRead").combobox("getValue"),
  175. checher = $("#SearchChecher").textbox("getValue"),
  176. startTime = $('#SearchStartTime').val(),
  177. endTime = $('#SearchEndTime').val();
  178. if (collapsed === true) {
  179. $("#Search").panel("collapse", true);
  180. }
  181. $('#dgTable').datagrid({
  182. url: '@Url.Action("MarketViolationsQryResult", "GetResult")',
  183. queryParams: {
  184. MarketID: marketId,
  185. LogType:logType,
  186. IsRead: isRead,
  187. Checher: checher,
  188. StartTime:startTime ,
  189. EndTime: endTime
  190. }
  191. });
  192. }
  193. function btn_Detail()
  194. {
  195. var rows = $('#dgTable').datagrid('getSelections');
  196. if (rows.length === 1) {
  197. var row = rows[0];
  198. console.log(row);
  199. $("#ViolationsNo").val(row.ViolationsNo);
  200. $("#LogType").val(row.LogType);
  201. $("#Result").val(row.Result);
  202. $("#MarketName").val(row.MarketName);
  203. $("#LogContent").val(row.LogContent);
  204. $("#Checher").val(row.Checher);
  205. $("#LogDate").val(row.LogDate);
  206. $("#FileTitle").val(row.FileTitle);
  207. if (row.FilePath != null && row.FilePath !== "" && row.FileName != null && row.FileName !== "")
  208. $("#FileDownload").attr({
  209. "href": "../" + row.FilePath + "/" + row.FileName,
  210. "download": row.FileTitle,
  211. "onclick": "FileDownload('#FileDownload')"
  212. });
  213. else
  214. $("#FileDownload").removeAttr("href").removeAttr("onclick");
  215. $("#winModal input").attr("disabled", "disabled");
  216. $("#winModal textarea").attr("disabled", "disabled");
  217. $("#winModal").window("open");
  218. } else {
  219. layer.alert('请选择一条记录进行设置', { icon: 7, title: '提示信息' });
  220. }
  221. }
  222. var start = {
  223. elem: "#StartTime",
  224. format: "YYYY-MM-DD",
  225. min: "2010-01-01",
  226. event: "focus",
  227. choose: function (datas) {
  228. end.min = datas; //开始日选好后,重置结束日的最小日期
  229. end.start = datas; //将结束日的初始值设定为开始日
  230. $('#SearchStartTime').val(datas);
  231. }
  232. },
  233. end = {
  234. elem: "#EndTime",
  235. format: "YYYY-MM-DD",
  236. min: "2010-01-01",
  237. event: "focus",
  238. choose: function (datas) {
  239. start.max = datas; //结束日选好后,重置开始日的最大日期
  240. $('#SearchEndTime').val(datas);
  241. }
  242. };
  243. $(function () {
  244. $("#SearchStartTime").next("span").find("input").attr("id", "StartTime");
  245. $("#SearchEndTime").next("span").find("input").attr("id", "EndTime");
  246. $("#SearchStartTime").textbox("setValue", laydate.now(-30, 'YYYY-MM-DD'));
  247. $("#SearchEndTime").textbox("setValue", laydate.now(0, 'YYYY-MM-DD'));
  248. //GetMarketSelStr();
  249. //加载表格数据
  250. setTimeout(LoadTable,100);
  251. //加载日历控件
  252. laydate(start);
  253. laydate(end);
  254. });
  255. </script>
  256. </body>
  257. </html>