RptQSellerWrntDueExpire.cshtml 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. 
  2. @{
  3. Layout = null;
  4. }
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta name="viewport" content="width=device-width" />
  9. <title>RptQSellerWrntDueExpire</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. </tr>
  76. <tr>
  77. <td class="td-label"><label for="WarrantTypeID">证照类型</label></td>
  78. <td class="td-input">
  79. <select class="easyui-combobox" style="height: 22px;width:200px" id="WarrantTypeID" name="WarrantTypeID" data-options="">
  80. <option value="">请选择...</option>
  81. @Html.Raw(ViewBag.SelWarrantType)
  82. </select>
  83. </td>
  84. <td class="td-label"><label for="SellerNames">经营户名</label></td>
  85. <td class="td-input">
  86. <input class="easyui-textbox" style="height: 22px;width:200px" id="SellerNames" name="SellerNames" data-options="icons:[{
  87. iconCls:'icon-search_zoom',handler:function(){SearchModalSeller()}
  88. }]" />
  89. </td>
  90. </tr>
  91. <tr>
  92. <td colspan="4" style="width: 6%;text-align: right;">
  93. <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>
  94. </td>
  95. </tr>
  96. </table>
  97. </div>
  98. </section>
  99. <section>
  100. <div id="winModal" class="easyui-window winModal" title="市场查询" style="width: 700px; height: 450px;padding:10px;"
  101. iconCls="icon-save" data-options="modal:true,closed:true">
  102. <div class="easyui-layout" data-options="fit:true" style="height:99%">
  103. <div data-options="region:'center'" style="padding:5px 5px 5px;">
  104. <table>
  105. <tr>
  106. <td style="padding-left:5px">辖区工商:</td>
  107. <td style="padding-left:5px">
  108. @*<input class="easyui-combotree" id="RegionID" data-options="url:/BaseInfo/GetTreeRegion',method:'post',required:true,loadFilter: function (rows) {
  109. return convert(rows);
  110. }" style="width:100px;" />*@
  111. <input class="easyui-combotree" id="RegionID" data-options="url:'/BaseInfo/GetTreeRegion',method:'post',loadFilter: function (rows) {
  112. return convert(rows);
  113. }" style="width:150px;height:20px" />
  114. </td>
  115. <td style="padding-left:5px">隶属市场:</td>
  116. <td style="padding-left:5px">
  117. <input class="easyui-textbox" id="MarketName" style="width:150px;height:20px" />
  118. </td>
  119. <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>
  120. </tr>
  121. </table>
  122. <table id="dgTable_Search" class="easyui-datagrid" style="width: 98%; height: 285px;"
  123. data-options="singleSelect: true,
  124. method: 'post',
  125. multiSort: false,
  126. fitColumns: true,
  127. remoteSort: false,
  128. onDblClickRow: function () {
  129. SetSearch();
  130. }">
  131. <thead>
  132. <tr>
  133. <th data-options="field:'RegionID',width:50">区域编号</th>
  134. <th data-options="field:'Names',width:150,">市场名称</th>
  135. <th data-options="field:'Principal',width:60,">负责人</th>
  136. <th data-options="field:'LinkTel',width:60">联系电话</th>
  137. <th data-options="field:'LinkMan',width:60,">日常联系人</th>
  138. <th data-options="field:'FrontForUnit',width:120,">主办单位</th>
  139. <th data-options="field:'ManageUnit',width:100">管理单位</th>
  140. <th data-options="field:'PractiseTime',width:60,">开业时间</th>
  141. </tr>
  142. </thead>
  143. </table>
  144. </div>
  145. <div data-options="region:'south',border:false" style="text-align:right; padding: 10px 20px;height:52px">
  146. <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="SetSearch()" style="width:80px">确认</a>
  147. <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#winModal').window('close');" style="width:80px">取消</a>
  148. </div>
  149. </div>
  150. </div>
  151. <div id="winModalSeller" class="easyui-window winModal" title="经营户查询" style="width: 700px; height: 450px;padding:10px;"
  152. iconCls="icon-save" data-options="modal:true,closed:true">
  153. <div class="easyui-layout" data-options="fit:true" style="height:99%">
  154. <div data-options="region:'center'" style="padding:5px 5px 5px;">
  155. <table>
  156. <tr>
  157. <td style="padding-left:5px">辖区工商:</td>
  158. <td style="padding-left:5px">
  159. @*<input class="easyui-combotree" id="RegionID" data-options="url:/BaseInfo/GetTreeRegion',method:'post',required:true,loadFilter: function (rows) {
  160. return convert(rows);
  161. }" style="width:100px;" />*@
  162. <input class="easyui-combotree" id="RegionID2" data-options="url:'/BaseInfo/GetTreeRegion',method:'post',loadFilter: function (rows) {
  163. return convert(rows);
  164. },onClick:function(data){largetSelectMarket(data)}" style="width:150px;height:20px" />
  165. </td>
  166. <td style="padding-left:5px">隶属市场:</td>
  167. <td style="padding-left:5px">
  168. <select style="height: 22px;width:200px" id="MarketID" name="MarketID">
  169. <option value="">请选择...</option>
  170. @Html.Raw(ViewBag.SelMarketInfo)
  171. </select>
  172. </td>
  173. </tr>
  174. <tr>
  175. <td style="padding-left:5px">姓名:</td>
  176. <td style="padding-left:5px">
  177. <input class="easyui-textbox" id="SellerName" style="width:150px;height:20px" />
  178. </td>
  179. <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>
  180. </tr>
  181. </table>
  182. <table id="dgTable_SearchSeller" class="easyui-datagrid" style="width: 98%; height: 285px;"
  183. data-options="singleSelect: true,
  184. method: 'post',
  185. multiSort: false,
  186. fitColumns: true,
  187. remoteSort: false,
  188. onDblClickRow: function () {
  189. SetSearchSeller();
  190. }">
  191. <thead>
  192. <tr>
  193. <th data-options="field:'Name',width:50">姓名</th>
  194. <th data-options="field:'IdCard',width:150,">身份证号</th>
  195. <th data-options="field:'EnterMarketDate',width:100,">进场时间</th>
  196. <th data-options="field:'Tel',width:100">电话</th>
  197. </tr>
  198. </thead>
  199. </table>
  200. </div>
  201. <div data-options="region:'south',border:false" style="text-align:right; padding: 10px 20px;height:52px">
  202. <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="SetSearchSeller()" style="width:80px">确认</a>
  203. <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#winModalSeller').window('close');" style="width:80px">取消</a>
  204. </div>
  205. </div>
  206. </div>
  207. </section>
  208. <script>
  209. function largetSelectMarket(data) {
  210. var regionId = $('#RegionID2').combotree('getValue');
  211. refreshMarketList(regionId);
  212. }
  213. function refreshMarketList(regionId) {
  214. $("#MarketID").empty();
  215. $.post("/Reports/GetMarketJsons", { regionId: regionId }, function (data) {
  216. $("#MarketID").append("<option value=''>请选择...</option>");
  217. if (data.length > 0) {
  218. for (var i = 0; i < data.length; i++) {
  219. $("#MarketID").append("<option value=" + data[i].MarketID + ">" + data[i].Names + "</option>");
  220. }
  221. }
  222. }, "json")
  223. //$("#MarketID").combobox('reload', "/Reports/GetMarketJsons?regionId=" + regionId);
  224. }
  225. function SearchModalSeller() {
  226. $('#winModalSeller').window({ "title": "搜索被检单位" });
  227. $('#SellerName').textbox('setValue', "")
  228. DgSearchSellerLoadTable();
  229. $('#winModalSeller').window('open');
  230. }
  231. function SearchModal() {
  232. $('#winModal').window({ "title": "搜索被检单位" });
  233. $('#MarketName').textbox('setValue',"")
  234. DgSearchLoadTable();
  235. $('#winModal').window('open');
  236. }
  237. function DgSearchLoadTable() {
  238. $('#dgTable_Search').datagrid({
  239. url: '/Reports/GetMarkets?RegionId=' + $('#RegionID').combotree('getValue') + '&&MarketName=' + $('#MarketName').textbox('getValue')
  240. })
  241. }
  242. function DgSearchSellerLoadTable() {
  243. $('#dgTable_SearchSeller').datagrid({
  244. url: '/Reports/GetMarketSeller?RegionId=' + $('#RegionID2').combotree('getValue') + '&&MarketID=' + $('#MarketID').val() + '&&SellerName=' + $('#SellerName').textbox('getValue')
  245. })
  246. }
  247. function SetSearch() {
  248. var row = $('#dgTable_Search').datagrid('getSelected');
  249. if (row) {
  250. $('#MarketNames').combobox('setValue', row.MarketID);
  251. $('#winModal').window('close');
  252. }
  253. }
  254. function SetSearchSeller() {
  255. var row = $('#dgTable_SearchSeller').datagrid('getSelected');
  256. if (row) {
  257. $('#SellerNames').textbox('setValue', row.Name);
  258. $('#winModalSeller').window('close');
  259. }
  260. }
  261. function btn_Query() {
  262. window.open("/Reports/RptPSellerWrntDueExpire?MarketID=" + $('#MarketNames').combobox('getValue') + '&&ExpireFlag=' + $('#ddlDueExpireFlag').combobox('getValue') +
  263. '&&WarrantTypeID=' + $('#WarrantTypeID').combobox('getValue') + '&&SellerNames=' + $('#SellerNames').textbox('getValue'));
  264. //$.ajax({
  265. // url: "/Reports/CheckIsHasBrowerAuth", data: {}, type: 'POST', dataType: 'json',
  266. // success: function (data) {
  267. // if (CheckAajxData(data) == false) {
  268. // return;
  269. // }
  270. // if (data != null && data.Success == true) {
  271. // openwin("/Reports/RptPSellerWrntDueExpire?MarketID=" + $('#MarketNames').textbox('getValue') + '&&ExpireFlag=' + $('#ddlDueExpireFlag').combobox('getValue') +
  272. // '&&WarrantTypeID=' + $('#WarrantTypeID').combobox('getValue')) + '&&SellerNames=' + $('#SellerNames').textbox('getValue')
  273. // } else {
  274. // layer.alert(data.ErrorInfo, { icon: '2', title: '提示信息' });
  275. // }
  276. // },
  277. // error: function (xhr) {
  278. // alert('动态页有问题\nstatus:' + xhr.status + '\nresponseText:' + xhr.responseText)
  279. // }
  280. //});
  281. }
  282. function openwin(url) {
  283. var a = document.createElement("a");
  284. a.setAttribute("href", url);
  285. a.setAttribute("target", "_blank");
  286. a.setAttribute("id", "openwin");
  287. document.body.appendChild(a);
  288. a.click();
  289. }
  290. //弹出窗体居中
  291. function f_Center(ll_Width, ll_Height) {
  292. var ll_Left;
  293. var ll_Top;
  294. var ls_Str;
  295. ll_Left = (screen.width - ll_Width) / 2
  296. ll_Top = (screen.height - ll_Height) / 2
  297. if (ll_Left < 0) {
  298. ll_Left = 0;
  299. }
  300. if (ll_Top < 0) {
  301. ll_Top = 0;
  302. }
  303. ls_Str = "left = " + ll_Left + ",top = " + ll_Top + ",width = " + ll_Width + ",height = " + ll_Height;
  304. return ls_Str;
  305. }
  306. function convert(rows) {
  307. function exists(rows, parentId) {
  308. for (var i = 0; i < rows.length; i++) {
  309. if (rows[i].id == parentId) return true;
  310. }
  311. return false;
  312. }
  313. var nodes = [];
  314. // get the top level nodes
  315. for (var i = 0; i < rows.length; i++) {
  316. var row = rows[i];
  317. if (!exists(rows, row.parentId)) {
  318. nodes.push({
  319. id: row.id,
  320. text: row.name
  321. });
  322. }
  323. }
  324. var toDo = [];
  325. for (var i = 0; i < nodes.length; i++) {
  326. toDo.push(nodes[i]);
  327. }
  328. while (toDo.length) {
  329. var node = toDo.shift(); // the parent node
  330. // get the children nodes
  331. for (var i = 0; i < rows.length; i++) {
  332. var row = rows[i];
  333. if (row.parentId == node.id) {
  334. var child = { id: row.id, text: row.name };
  335. if (node.children) {
  336. node.children.push(child);
  337. } else {
  338. node.children = [child];
  339. }
  340. toDo.push(child);
  341. }
  342. }
  343. }
  344. return nodes;
  345. }
  346. </script>
  347. </body>
  348. </html>