RptQSellerEvaluation.cshtml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306
  1. 
  2. @{
  3. Layout = null;
  4. }
  5. <!DOCTYPE html>
  6. <html>
  7. <head>
  8. <meta name="viewport" content="width=device-width" />
  9. <title>TZQDouzhipin</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/Styles.css" rel="stylesheet" />
  23. <link href="~/Content/css/style.min862f.css" rel="stylesheet" />
  24. </head>
  25. <body>
  26. <section class="hidden">
  27. <input id="hid_IsMarketSysAccount" name="hid_IsMarketSysAccount" type="hidden" value="@ViewBag.IsMarketSysAccount" />
  28. <input id="hid_MarketID" name="hid_MarketID" type="hidden" value="@ViewBag.MarketID" />
  29. </section>
  30. <table class="tableStyle1" style="Z-INDEX:101;LEFT:5px;WIDTH:725px;TOP:10px;POSITION:absolute;">
  31. <tr>
  32. <td class="td1"><img alt="" src="../Images/icon_1.gif" />年份:</td>
  33. <td class="td2">
  34. <select id="cmbYear" style="height: 25px; width: 200px">
  35. @Html.Raw(ViewBag.SelYears)
  36. </select>
  37. </td>
  38. <td class="td1"><img alt="" src="../Images/icon_1.gif" />开始月份:</td>
  39. <td class="td2">
  40. <select id="StartMonth" name="StartMonth" style="height: 25px; width: 200px">
  41. @Html.Raw(ViewBag.SelStartMonths)
  42. </select>
  43. </td>
  44. <td class="td1">结束月份:</td>
  45. <td class="td2">
  46. <select id="EndMonth" name="EndMonth" style="height: 25px; width: 200px">
  47. @Html.Raw(ViewBag.SelEndMonths)
  48. </select>
  49. </td>
  50. </tr>
  51. <tr>
  52. <td class="td1"><img alt="" src="../Images/icon_1.gif" />市场名称:</td>
  53. <td class="td2" colspan="5" height="150px">
  54. <select class="form-control" multiple="true" style="height: 150px; width: 400px" id="MarketIDs" name="MarketIDs">
  55. @Html.Raw(ViewBag.SelMarketInfo)
  56. </select>
  57. </td>
  58. </tr>
  59. <tr>
  60. <td class="td1">
  61. <img alt="" src="../Images/icon_1.gif" />姓名:
  62. </td>
  63. <td class="td2" >
  64. <input class="easyui-textbox" style="height: 22px;width:200px" id="SellerNames" name="SellerNames" data-options="icons:[{
  65. iconCls:'icon-search_zoom',handler:function(){SearchModalSeller()}
  66. }]" />
  67. </td>
  68. <td class="td1">
  69. <img alt="" src="../Images/icon_1.gif" />注册号:
  70. </td>
  71. <td class="td2" >
  72. <input class="easyui-textbox" style="height: 22px;width:200px" id="TextRegNo" name="TextRegNo" />
  73. </td>
  74. <td class="td1" colspan="2">
  75. <div align="center">
  76. <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>
  77. </div>
  78. </td>
  79. </tr>
  80. </table>
  81. <section>
  82. <div id="winModalSeller" class="easyui-window winModal" title="经营户查询" style="width: 700px; height: 450px;padding:10px;"
  83. iconCls="icon-save" data-options="modal:true,closed:true">
  84. <div class="easyui-layout" data-options="fit:true" style="height:99%">
  85. <div data-options="region:'center'" style="padding:5px 5px 5px;">
  86. <table>
  87. <tr>
  88. <td style="padding-left:5px">辖区工商:</td>
  89. <td style="padding-left:5px">
  90. @*<input class="easyui-combotree" id="RegionID" data-options="url:/BaseInfo/GetTreeRegion',method:'post',required:true,loadFilter: function (rows) {
  91. return convert(rows);
  92. }" style="width:100px;" />*@
  93. <input class="easyui-combotree" id="RegionID2" data-options="url:'/BaseInfo/GetTreeRegion',method:'post',loadFilter: function (rows) {
  94. return convert(rows);
  95. },onClick:function(data){largetSelectMarket(data)}" style="width:200px;height:20px" />
  96. </td>
  97. <td style="padding-left:5px">隶属市场:</td>
  98. <td style="padding-left:5px">
  99. <select style="height: 22px;width:200px" id="MarketID" name="MarketID">
  100. <option value="">请选择...</option>
  101. @Html.Raw(ViewBag.SelMarketInfo)
  102. </select>
  103. </td>
  104. </tr>
  105. <tr>
  106. <td style="padding-left:5px">姓名:</td>
  107. <td style="padding-left:5px">
  108. <input class="easyui-textbox" id="SellerName" style="width:200px;height:20px" />
  109. </td>
  110. <td style="padding-left:100px" colspan="2"><a class="easyui-linkbutton" data-options="iconCls:'icon-search'" href="javascript:void(0)" onclick="DgSearchSellerLoadTable()" style="width:100px;height:20px">搜索</a></td>
  111. </tr>
  112. </table>
  113. <table id="dgTable_SearchSeller" class="easyui-datagrid" style="width: 98%; height: 285px;"
  114. data-options="singleSelect: true,
  115. method: 'post',
  116. multiSort: false,
  117. fitColumns: true,
  118. remoteSort: false,
  119. onDblClickRow: function () {
  120. SetSearchSeller();
  121. }">
  122. <thead>
  123. <tr>
  124. <th data-options="field:'Name',width:50">姓名</th>
  125. <th data-options="field:'IdCard',width:150,">身份证号</th>
  126. <th data-options="field:'EnterMarketDate',width:100,">进场时间</th>
  127. <th data-options="field:'Tel',width:100">电话</th>
  128. </tr>
  129. </thead>
  130. </table>
  131. </div>
  132. <div data-options="region:'south',border:false" style="text-align:right; padding: 10px 20px;height:52px">
  133. <a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="SetSearchSeller()" style="width:80px">确认</a>
  134. <a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#winModalSeller').window('close');" style="width:80px">取消</a>
  135. </div>
  136. </div>
  137. </div>
  138. </section>
  139. <script>
  140. function largetSelectMarket(data) {
  141. var regionId = $('#RegionID2').combotree('getValue');
  142. refreshMarketList(regionId);
  143. }
  144. function refreshMarketList(regionId) {
  145. $("#MarketID").empty();
  146. $.post("/Reports/GetMarketJsons", { regionId: regionId }, function (data) {
  147. $("#MarketID").append("<option value=''>请选择...</option>");
  148. if (data.length > 0) {
  149. for (var i = 0; i < data.length; i++) {
  150. $("#MarketID").append("<option value=" + data[i].MarketID + ">" + data[i].Names + "</option>");
  151. }
  152. }
  153. }, "json")
  154. //$("#MarketID").combobox('reload', "/Reports/GetMarketJsons?regionId=" + regionId);
  155. }
  156. function SearchModalSeller() {
  157. $('#winModalSeller').window({ "title": "经营户搜索" });
  158. $('#SellerName').textbox('setValue', "")
  159. DgSearchSellerLoadTable();
  160. $('#winModalSeller').window('open');
  161. }
  162. function SearchModal() {
  163. $('#winModal').window({ "title": "搜索被检单位" });
  164. $('#MarketName').textbox('setValue',"")
  165. DgSearchLoadTable();
  166. $('#winModal').window('open');
  167. }
  168. function DgSearchLoadTable() {
  169. $('#dgTable_Search').datagrid({
  170. url: '/Reports/GetMarkets?RegionId=' + $('#RegionID').combotree('getValue') + '&&MarketName=' + $('#MarketName').textbox('getValue')
  171. })
  172. }
  173. function DgSearchSellerLoadTable() {
  174. $('#dgTable_SearchSeller').datagrid({
  175. url: '/Reports/GetMarketSeller?RegionId=' + $('#RegionID2').combotree('getValue') + '&&MarketID=' + $('#MarketID').val() + '&&SellerName=' + $('#SellerName').textbox('getValue')
  176. })
  177. }
  178. function SetSearch() {
  179. var row = $('#dgTable_Search').datagrid('getSelected');
  180. if (row) {
  181. $('#MarketNames').combobox('setValue', row.MarketID);
  182. $('#winModal').window('close');
  183. }
  184. }
  185. function SetSearchSeller() {
  186. var row = $('#dgTable_SearchSeller').datagrid('getSelected');
  187. if (row) {
  188. $('#SellerNames').textbox('setValue', row.Name);
  189. $('#winModalSeller').window('close');
  190. }
  191. }
  192. function btn_Query() {
  193. var MarketIDs = document.getElementById("MarketIDs");
  194. var strs = "";
  195. for (var i = 0; i < MarketIDs.length; i++) {
  196. //marketIds += marketIds == "" ? MarketIDs[i] : ',' + MarketIDs[i];
  197. if (MarketIDs.options[i].selected) {
  198. strs += MarketIDs.options[i].value + ",";
  199. }
  200. }
  201. if (strs.length > 0) {
  202. strs = strs.substr(0, strs.length - 1)
  203. }
  204. if (strs.length <= 0) {
  205. alert("请先选择市场进行查询!")
  206. return;
  207. }
  208. window.open("/Taizhang/RptPSellerEvaluation?MarketID=" + strs + '&&Year=' + $('#cmbYear').val() + '&&StartMonth=' + $('#StartMonth').val() + '&&EndMonth=' + $('#EndMonth').val() +
  209. '&&SellerName=' + $('#SellerNames').textbox('getValue') + '&&RegNo=' + $('#TextRegNo').textbox('getValue'));
  210. }
  211. $(function () {
  212. })
  213. function openwin(url) {
  214. var a = document.createElement("a");
  215. a.setAttribute("href", url);
  216. a.setAttribute("target", "_blank");
  217. a.setAttribute("id", "openwin");
  218. document.body.appendChild(a);
  219. a.click();
  220. }
  221. //弹出窗体居中
  222. function f_Center(ll_Width, ll_Height) {
  223. var ll_Left;
  224. var ll_Top;
  225. var ls_Str;
  226. ll_Left = (screen.width - ll_Width) / 2
  227. ll_Top = (screen.height - ll_Height) / 2
  228. if (ll_Left < 0) {
  229. ll_Left = 0;
  230. }
  231. if (ll_Top < 0) {
  232. ll_Top = 0;
  233. }
  234. ls_Str = "left = " + ll_Left + ",top = " + ll_Top + ",width = " + ll_Width + ",height = " + ll_Height;
  235. return ls_Str;
  236. }
  237. function convert(rows) {
  238. function exists(rows, parentId) {
  239. for (var i = 0; i < rows.length; i++) {
  240. if (rows[i].id == parentId) return true;
  241. }
  242. return false;
  243. }
  244. var nodes = [];
  245. // get the top level nodes
  246. for (var i = 0; i < rows.length; i++) {
  247. var row = rows[i];
  248. if (!exists(rows, row.parentId)) {
  249. nodes.push({
  250. id: row.id,
  251. text: row.name
  252. });
  253. }
  254. }
  255. var toDo = [];
  256. for (var i = 0; i < nodes.length; i++) {
  257. toDo.push(nodes[i]);
  258. }
  259. while (toDo.length) {
  260. var node = toDo.shift(); // the parent node
  261. // get the children nodes
  262. for (var i = 0; i < rows.length; i++) {
  263. var row = rows[i];
  264. if (row.parentId == node.id) {
  265. var child = { id: row.id, text: row.name };
  266. if (node.children) {
  267. node.children.push(child);
  268. } else {
  269. node.children = [child];
  270. }
  271. toDo.push(child);
  272. }
  273. }
  274. }
  275. return nodes;
  276. }
  277. </script>
  278. </body>
  279. </html>