RptQSellerWrntDueExpireCnt.cshtml 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  1. 
  2. @{
  3. Layout = null;
  4. }
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta name="viewport" content="width=device-width" />
  9. <title>RptQSellerWrntDueExpireCnt</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. <style>
  23. #Search_Panel .panel-header {
  24. height: 30px;
  25. padding-top: 8px;
  26. text-align: center;
  27. font-size: 14px;
  28. }
  29. #Search_Panel table.panel-table {
  30. width: 800px;
  31. }
  32. #Search_Panel td.td-label {
  33. width: 5%;
  34. text-align: right;
  35. padding: 3px 10px 3px 0;
  36. }
  37. #Search_Panel td.td-input {
  38. width: 10%;
  39. text-align: left;
  40. }
  41. #Search_Panel .td-input input,
  42. #Search_Panel .td-input select {
  43. width: 150px;
  44. height: 22px;
  45. }
  46. #Search_Panel .panel.easyui-fluid {
  47. margin-bottom: 5px;
  48. }
  49. </style>
  50. </head>
  51. <body>
  52. <section id="Search_Panel">
  53. <div id="" class="easyui-panel" title=""
  54. style="width: 100%; height: 120px; padding: 10px;"
  55. data-options="collapsible:true">
  56. <table class="panel-table">
  57. <tr>
  58. <td class="td-label"><label for="MarketNames">市场名称</label></td>
  59. <td class="td-input">
  60. <select class="easyui-combobox" style="height: 22px;width:200px" id="MarketNames" name="MarketNames" data-options="icons:[{
  61. iconCls:'icon-search_zoom',handler:function(){SearchModal()}
  62. }]">
  63. <option value="">全部</option>
  64. @Html.Raw(ViewBag.SelMarketInfo)
  65. </select>
  66. </td>
  67. @*<td class="td-label"><label for="ddlDueExpireFlag">到期过期类型</label></td>
  68. <td class="td-input">
  69. <select class="easyui-combobox" style="height: 22px;width:200px" id="ddlDueExpireFlag" name="ddlDueExpireFlag">
  70. <option value="0">全部</option>
  71. <option value="2">过期</option>
  72. <option value="1">三个月到期</option>
  73. </select>
  74. </td>*@
  75. <td class="td-label"><label for="WarrantTypeID">证照类型</label></td>
  76. <td class="td-input">
  77. <select class="easyui-combobox" style="height: 22px;width:200px" id="WarrantTypeID" name="WarrantTypeID" data-options="">
  78. <option value="">全部</option>
  79. @Html.Raw(ViewBag.SelWarrantType)
  80. </select>
  81. </td>
  82. </tr>
  83. <tr>
  84. <td colspan="4" style="width: 6%;text-align: right;">
  85. <a class="easyui-linkbutton" id="Save_Search" data-options="iconCls:'icon-search'" href="javascript:void(0)" onclick="btn_Query()" style="width:120px;margin-right:110px">显示打印结果</a>
  86. </td>
  87. </tr>
  88. </table>
  89. </div>
  90. </section>
  91. <section>
  92. <div id="winModal" class="easyui-window winModal" title="市场查询" style="width: 700px; height: 450px;padding:10px;"
  93. iconCls="icon-save" data-options="modal:true,closed:true">
  94. <div class="easyui-layout" data-options="fit:true" style="height:99%">
  95. <div data-options="region:'center'" style="padding:5px 5px 5px;">
  96. <table>
  97. <tr>
  98. <td style="padding-left:5px">辖区工商:</td>
  99. <td style="padding-left:5px">
  100. <input class="easyui-combotree" id="RegionID" data-options="url:'/BaseInfo/GetTreeRegion',method:'post',loadFilter: function (rows) {
  101. return convert(rows);
  102. }" style="width:150px;height:20px" />
  103. </td>
  104. <td style="padding-left:5px">隶属市场:</td>
  105. <td style="padding-left:5px">
  106. <input class="easyui-textbox" id="MarketName" style="width:150px;height:20px" />
  107. </td>
  108. <td style="padding-left:5px"><a class="easyui-linkbutton" id="Save_Search" data-options="iconCls:'icon-search'" href="javascript:void(0)" onclick="DgSearchLoadTable()" style="width:100px;height:20px">搜索</a></td>
  109. </tr>
  110. </table>
  111. <table id="dgTable_Search" class="easyui-datagrid" style="width: 98%; height: 285px;"
  112. data-options="singleSelect: true,
  113. method: 'post',
  114. multiSort: false,
  115. fitColumns: true,
  116. remoteSort: false,
  117. onDblClickRow: function () {
  118. SetSearch();
  119. }">
  120. <thead>
  121. <tr>
  122. <th data-options="field:'RegionID',width:50">区域编号</th>
  123. <th data-options="field:'Names',width:150,">市场名称</th>
  124. <th data-options="field:'Principal',width:60,">负责人</th>
  125. <th data-options="field:'LinkTel',width:60">联系电话</th>
  126. <th data-options="field:'LinkMan',width:60,">日常联系人</th>
  127. <th data-options="field:'FrontForUnit',width:120,">主办单位</th>
  128. <th data-options="field:'ManageUnit',width:100">管理单位</th>
  129. <th data-options="field:'PractiseTime',width:60,">开业时间</th>
  130. </tr>
  131. </thead>
  132. </table>
  133. </div>
  134. <div data-options="region:'south',border:false" style="text-align:right; padding: 10px 20px;height:52px">
  135. <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="SetSearch()" style="width:80px">确认</a>
  136. <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#winModal').window('close');" style="width:80px">取消</a>
  137. </div>
  138. </div>
  139. </div>
  140. @*<div id="winModalSeller" class="easyui-window winModal" title="经营户查询" style="width: 700px; height: 450px;padding:10px;"
  141. iconCls="icon-save" data-options="modal:true,closed:true">
  142. <div class="easyui-layout" data-options="fit:true" style="height:99%">
  143. <div data-options="region:'center'" style="padding:5px 5px 5px;">
  144. <table>
  145. <tr>
  146. <td style="padding-left:5px">辖区工商:</td>
  147. <td style="padding-left:5px">
  148. <input class="easyui-combotree" id="RegionID2" data-options="url:'/BaseInfo/GetTreeRegion',method:'post',loadFilter: function (rows) {
  149. return convert(rows);
  150. }" style="width:150px;height:20px" />
  151. </td>
  152. <td style="padding-left:5px">隶属市场:</td>
  153. <td style="padding-left:5px">
  154. <select class="easyui-combobox" style="height: 22px;width:200px" id="MarketID" name="MarketID">
  155. <option value="">请选择...</option>
  156. @Html.Raw(ViewBag.SelMarketInfo)
  157. </select>
  158. </td>
  159. </tr>
  160. <tr>
  161. <td style="padding-left:5px">姓名:</td>
  162. <td style="padding-left:5px">
  163. <input class="easyui-textbox" id="SellerName" style="width:150px;height:20px" />
  164. </td>
  165. <td style="padding-left:5px" colspan="2"><a class="easyui-linkbutton" data-options="iconCls:'icon-search'" href="javascript:void(0)" onclick="DgSearchSellerLoadTable()" style="width:100px;height:20px">搜索</a></td>
  166. </tr>
  167. </table>
  168. <table id="dgTable_SearchSeller" class="easyui-datagrid" style="width: 98%; height: 285px;"
  169. data-options="singleSelect: true,
  170. method: 'post',
  171. multiSort: false,
  172. fitColumns: true,
  173. remoteSort: false,
  174. onDblClickRow: function () {
  175. SetSearchSeller();
  176. }">
  177. <thead>
  178. <tr>
  179. <th data-options="field:'Name',width:50">姓名</th>
  180. <th data-options="field:'IdCard',width:150,">身份证号</th>
  181. <th data-options="field:'EnterMarketDate',width:100,">进场时间</th>
  182. <th data-options="field:'Tel',width:100">电话</th>
  183. </tr>
  184. </thead>
  185. </table>
  186. </div>
  187. <div data-options="region:'south',border:false" style="text-align:right; padding: 10px 20px;height:52px">
  188. <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="SetSearchSeller()" style="width:80px">确认</a>
  189. <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#winModalSeller').window('close');" style="width:80px">取消</a>
  190. </div>
  191. </div>
  192. </div>*@
  193. </section>
  194. <script>
  195. //function SearchModalSeller() {
  196. // $('#winModalSeller').window({ "title": "搜索被检单位" });
  197. // $('#SellerName').textbox('setValue', "")
  198. // DgSearchSellerLoadTable();
  199. // $('#winModalSeller').window('open');
  200. //}
  201. function SearchModal() {
  202. $('#winModal').window({ "title": "搜索被检单位" });
  203. $('#MarketName').textbox('setValue',"")
  204. DgSearchLoadTable();
  205. $('#winModal').window('open');
  206. }
  207. function DgSearchLoadTable() {
  208. $('#dgTable_Search').datagrid({
  209. url: '/Reports/GetMarkets?RegionId=' + $('#RegionID').combotree('getValue') + '&&MarketName=' + $('#MarketName').textbox('getValue')
  210. })
  211. }
  212. //function DgSearchSellerLoadTable() {
  213. // $('#dgTable_SearchSeller').datagrid({
  214. // url: '/Reports/GetMarketSeller?RegionId=' + $('#RegionID2').combotree('getValue') + '&&MarketID=' + $('#MarketID').combobox('getValue') + '&&SellerName=' + $('#SellerName').textbox('getValue')
  215. // })
  216. //}
  217. function SetSearch() {
  218. var row = $('#dgTable_Search').datagrid('getSelected');
  219. if (row) {
  220. $('#MarketNames').combobox('setValue', row.MarketID);
  221. $('#winModal').window('close');
  222. }
  223. }
  224. //function SetSearchSeller() {
  225. // var row = $('#dgTable_SearchSeller').datagrid('getSelected');
  226. // if (row) {
  227. // $('#SellerNames').textbox('setValue', row.Name);
  228. // $('#winModalSeller').window('close');
  229. // }
  230. //}
  231. function btn_Query() {
  232. window.open("/Reports/RptPSellerWrntDueExpireCnt?MarketID=" + $('#MarketNames').textbox('getValue') +
  233. '&&WarrantTypeID=' + $('#WarrantTypeID').combobox('getValue')) ;
  234. }
  235. //function openwin(url) {
  236. // var a = document.createElement("a");
  237. // a.setAttribute("href", url);
  238. // a.setAttribute("target", "_blank");
  239. // a.setAttribute("id", "openwin");
  240. // document.body.appendChild(a);
  241. // a.click();
  242. //}
  243. //弹出窗体居中
  244. function f_Center(ll_Width, ll_Height) {
  245. var ll_Left;
  246. var ll_Top;
  247. var ls_Str;
  248. ll_Left = (screen.width - ll_Width) / 2
  249. ll_Top = (screen.height - ll_Height) / 2
  250. if (ll_Left < 0) {
  251. ll_Left = 0;
  252. }
  253. if (ll_Top < 0) {
  254. ll_Top = 0;
  255. }
  256. ls_Str = "left = " + ll_Left + ",top = " + ll_Top + ",width = " + ll_Width + ",height = " + ll_Height;
  257. return ls_Str;
  258. }
  259. function convert(rows) {
  260. function exists(rows, parentId) {
  261. for (var i = 0; i < rows.length; i++) {
  262. if (rows[i].id == parentId) return true;
  263. }
  264. return false;
  265. }
  266. var nodes = [];
  267. // get the top level nodes
  268. for (var i = 0; i < rows.length; i++) {
  269. var row = rows[i];
  270. if (!exists(rows, row.parentId)) {
  271. nodes.push({
  272. id: row.id,
  273. text: row.name
  274. });
  275. }
  276. }
  277. var toDo = [];
  278. for (var i = 0; i < nodes.length; i++) {
  279. toDo.push(nodes[i]);
  280. }
  281. while (toDo.length) {
  282. var node = toDo.shift(); // the parent node
  283. // get the children nodes
  284. for (var i = 0; i < rows.length; i++) {
  285. var row = rows[i];
  286. if (row.parentId == node.id) {
  287. var child = { id: row.id, text: row.name };
  288. if (node.children) {
  289. node.children.push(child);
  290. } else {
  291. node.children = [child];
  292. }
  293. toDo.push(child);
  294. }
  295. }
  296. }
  297. return nodes;
  298. }
  299. </script>
  300. </body>
  301. </html>