InfoExport.cshtml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290
  1. @using Bowin.Web.Controls.Mvc;
  2. @using EMIS.Entities;
  3. @using EMIS.Web.Controls;
  4. @{
  5. ViewBag.Title = "List";
  6. }
  7. <link href="~/Content/Bowin.Control.Core/themes/base/jquery-ui.css" rel="stylesheet"
  8. type="text/css" />
  9. <link href="~/Content/Bowin.Control.Core/themes/default/easyui.css" rel="stylesheet"
  10. type="text/css" />
  11. <link href="~/Content/Bowin.Control.Core/themes/icon.css" rel="stylesheet" type="text/css" />
  12. <script src="../../Scripts/jquery-ui.min.js" type="text/javascript"></script>
  13. <script src="~/Scripts/jquery-1.8.0.min.js" type="text/javascript"></script>
  14. <script src="~/Scripts/Bowin.Control.Core/Plugins/EasyUI/jquery.easyui.min.js" type="text/javascript"></script>
  15. <style type="text/css">
  16. .drag {
  17. padding: 4px;
  18. margin: 2px;
  19. border: 1px solid #ccc;
  20. background: #AACCFF;
  21. }
  22. .dp {
  23. opacity: 0.5;
  24. filter: alpha(opacity=50);
  25. }
  26. .over {
  27. background: #FBEC88;
  28. }
  29. .indicator {
  30. position: absolute;
  31. font-size: 9px;
  32. width: 10px;
  33. height: 10px;
  34. display: none;
  35. color: red;
  36. }
  37. .drag-item {
  38. padding: 4px;
  39. margin: 2px;
  40. border: 1px solid #ccc;
  41. background: #AACCFF;
  42. }
  43. input[type=button] {
  44. background-color: #f0f0f0;
  45. }
  46. </style>
  47. @section scripts{
  48. <script type="text/javascript">
  49. var mnu = "";
  50. var windowID;
  51. $(function () {
  52. windowID = $.SystemGeneral.getUrlParam("WindowID");
  53. setleftdiv();
  54. });
  55. function setleftdiv() {
  56. $.getJSON("../Config/StudentColumnName.json", function (result) {
  57. $.each(result.all, function (i, field) {
  58. var colList = eval(field);
  59. for (var key in colList) {
  60. var str = '<div id="' + i + '" class="drag" name="' + key + '">' + i + '(' + colList[key] + ') </div>'
  61. $('#source').append(str);
  62. }
  63. });
  64. setdraggableanddroppable();
  65. });
  66. };
  67. function removeright() {
  68. $('#target').find('div').remove();
  69. $('#source').find('div').remove();
  70. setleftdiv();
  71. }
  72. function setdraggableanddroppable() {
  73. $('.drag').draggable({
  74. proxy: 'clone',
  75. revert: true,
  76. cursor: 'auto',
  77. onStartDrag: function () {
  78. $(this).draggable('options').cursor = 'not-allowed';
  79. $(this).draggable('proxy').addClass('dp');
  80. },
  81. onStopDrag: function () {
  82. $(this).draggable('options').cursor = 'auto';
  83. }
  84. });
  85. $('#target').droppable({
  86. deltaX: 0,
  87. deltaY: 0,
  88. onDragEnter: function (e, source) {
  89. $(source).draggable('options').cursor = 'auto';
  90. $(source).draggable('proxy').css('border', '1px solid red');
  91. $(this).addClass('over');
  92. },
  93. onDragLeave: function (e, source) {
  94. $(source).draggable('options').cursor = 'not-allowed';
  95. $(source).draggable('proxy').css('border', '1px solid #ccc');
  96. $(this).removeClass('over');
  97. },
  98. onDrop: function (e, source) {
  99. source.className = "drag";
  100. var x = event.clientX;
  101. var y = event.clientY;
  102. var lis = $("#target").find("div");
  103. if (lis.length > 0) {
  104. var number = 0;
  105. $.each(lis, function (index, item) {
  106. var divtop = lis.eq(index).position().top;
  107. //var thistop = lis.eq(index).offset().top;
  108. var scrollTop = $(this).parent().scrollTop();
  109. var targettop = $(this).parent().position().top;
  110. var divheight = $(this).height();
  111. if (source.id == item.id) {
  112. return true;
  113. }
  114. if (divtop + scrollTop - targettop + divheight - (y - targettop + scrollTop) >= 0) {
  115. number = index + 1;
  116. return false;
  117. }
  118. });
  119. if (number == 0) {
  120. $(this).append(source);
  121. } else {
  122. var nametext = lis.eq(number - 1).attr("name");
  123. $("[name='" + nametext + "']").before(source);
  124. //$(lis.eq(2)).append(source);
  125. }
  126. }
  127. else {
  128. $(this).append(source);
  129. }
  130. $(this).removeClass('over');
  131. }
  132. });
  133. $('#source').droppable({
  134. //accept: '#d1,#d3',
  135. onDragEnter: function (e, source) {
  136. $(source).draggable('options').cursor = 'auto';
  137. $(source).draggable('proxy').css('border', '1px solid red');
  138. $(this).addClass('over');
  139. },
  140. onDragLeave: function (e, source) {
  141. $(source).draggable('options').cursor = 'not-allowed';
  142. $(source).draggable('proxy').css('border', '1px solid #ccc');
  143. $(this).removeClass('over');
  144. },
  145. onDrop: function (e, source) {
  146. $(this).append(source);
  147. $(this).removeClass('over');
  148. }
  149. });
  150. };
  151. function getall() {
  152. $('#target').find('div').remove();
  153. $.getJSON("../../Config/StudentColumnName.json", function (result) {
  154. $.each(result.all, function (i, field) {
  155. var colList = eval(field);
  156. for (var key in colList) {
  157. var str = '<div id="' + i + '"class="drag" name="' + key + '">' + i + '(' + colList[key] + ') </div>'
  158. $('#source #' + i).remove();
  159. $('#target').append(str);
  160. }
  161. });
  162. setdraggableanddroppable();
  163. });
  164. };
  165. function GetRequest() {
  166. var url = location.search; //获取url中"?"符后的字串
  167. var theRequest = new Object();
  168. if (url.indexOf("?") != -1) {
  169. var str = url.substr(1);
  170. strs = str.split("&");
  171. for (var i = 0; i < strs.length; i++) {
  172. theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
  173. }
  174. }
  175. return theRequest;
  176. }
  177. function Student_Infodbf() {
  178. var Request = new Object();
  179. Request = GetRequest();
  180. var Studentselect = top.$("#" + windowID).data("inputData");
  181. $("[name='QueryParamsDatas']").val(Studentselect.QueryParamsDatas);
  182. Studentselect.selectedIDs = Request["selectedIDs"];
  183. $("[name='selectedIDs']").val(Studentselect.selectedIDs);
  184. var colnames = "";
  185. var showname = "";
  186. $('#target').children('div').each(function () {
  187. colnames = colnames + $(this).attr('id') + ",";
  188. });
  189. $('#target').children('div').each(function () {
  190. showname = showname + $(this).attr('name') + ",";
  191. });
  192. $("[name='colnames']").val(colnames);
  193. $("[name='showname']").val(showname);
  194. $(document.forms[0]).attr("action", CMS_SystemConfig.VirtualDirectoryPath + "/Students/DbfExport");
  195. $(document.forms[0]).submit();
  196. }
  197. function ExaminationApplayStudent_ExportBySelect() {
  198. var Request = new Object();
  199. Request = GetRequest();
  200. var Studentselect = top.$("#" + windowID).data("inputData");
  201. $("[name='QueryParamsDatas']").val(Studentselect.QueryParamsDatas);
  202. //Studentselect.selectedIDs = Request["selectedIDs"];
  203. //$("[name='selectedIDs']").val(Studentselect.selectedIDs);
  204. var colnames = "";
  205. var showname = "";
  206. $('#target').children('div').each(function () {
  207. colnames = colnames + $(this).attr('id') + ",";
  208. });
  209. $('#target').children('div').each(function () {
  210. showname = showname + $(this).attr('name') + ",";
  211. });
  212. $("[name='colnames']").val(colnames);
  213. $("[name='showname']").val(showname);
  214. $(document.forms[0]).attr("action", CMS_SystemConfig.VirtualDirectoryPath + "/ExaminationApplayStudentList/ExportBySelect");
  215. $(document.forms[0]).submit();
  216. }
  217. function ExaminationApplayStudent_DailyExport() {
  218. var Request = new Object();
  219. Request = GetRequest();
  220. var Studentselect = top.$("#" + windowID).data("inputData");
  221. $("[name='QueryParamsDatas']").val(Studentselect.QueryParamsDatas);
  222. $(document.forms[0]).attr("action", CMS_SystemConfig.VirtualDirectoryPath + "/ExaminationApplayStudentList/DailyExport");
  223. $(document.forms[0]).submit();
  224. }
  225. function ExaminationApplayStudent_PJ5Export() {
  226. var Request = new Object();
  227. Request = GetRequest();
  228. var Studentselect = top.$("#" + windowID).data("inputData");
  229. $("[name='QueryParamsDatas']").val(Studentselect.QueryParamsDatas);
  230. $(document.forms[0]).attr("action", CMS_SystemConfig.VirtualDirectoryPath + "/ExaminationApplayStudentList/PJ5Export");
  231. $(document.forms[0]).submit();
  232. }
  233. function ExaminationApplayStudent_HighNewExport() {
  234. var Request = new Object();
  235. Request = GetRequest();
  236. var Studentselect = top.$("#" + windowID).data("inputData");
  237. $("[name='QueryParamsDatas']").val(Studentselect.QueryParamsDatas);
  238. $(document.forms[0]).attr("action", CMS_SystemConfig.VirtualDirectoryPath + "/ExaminationApplayStudentList/HighNewExport");
  239. $(document.forms[0]).submit();
  240. }
  241. </script>
  242. }
  243. <div class="easyui-panel" data-options="border:false,fit:true" style="position: relative;">
  244. <div class="p_title">
  245. <div style="float: left; margin-left: 10px; line-height: 30px; font-size: 12px;">
  246. 学生信息列表
  247. </div>
  248. <div style="margin-right: 10px; line-height: 30px; font-size: 12px;">@Html.ContextMenuBar("InfoExport")</div>
  249. </div>
  250. <form id="formQuery" method="post" action="@Url.Content("~/Students/InfoExcel")">
  251. @Html.Hidden("QueryParamsDatas")
  252. @Html.Hidden("selectedIDs")
  253. @Html.Hidden("colnames")
  254. @Html.Hidden("showname")
  255. </form>
  256. <div id="bodycss">
  257. <div style="margin:20px 0;"></div>
  258. <div id="buttondiv" style="margin-left:20px;">
  259. <div style="float:left;margin:0 4px"><input type="button" onclick="getall()" class="all" value="全部字段" /></div>
  260. @*<div style="float:left;margin:0 4px"><input type="button" onclick="getstru_xjzc()" class="stru_xjzc" value="日常上报" /></div>
  261. <div style="float:left;margin:0 4px"><input type="button" onclick="getstru_sjxg()" class="stru_sjxg" value="广州市PJ5上报" /></div>
  262. <div style="float:left;margin:0 4px"><input type="button" onclick="getstru_xnzc()" class="stru_xnzc" value="高新上报" /></div>
  263. <div style="float:left;margin:0 4px"><input type="button" onclick="getstru_jszc()" class="stru_jszc" value="毕业生学历电子注册上报" /></div>*@
  264. <div><input style="margin:0 4px" type="button" onclick="removeright()" class="stru_jszc" value="清空" /></div>
  265. </div>
  266. <div id="selectdiv">
  267. <div id="source" style="border:1px solid #ccc;width:300px;height:450px;float:left;margin:5px 90px;overflow:auto">
  268. 候选字段
  269. </div>
  270. <div id="target" style="border:1px solid #ccc;width:300px;height:450px;float:left;margin:5px 0px;overflow:auto">
  271. 需打印字段
  272. </div>
  273. <div style="clear:both"></div>
  274. </div>
  275. </div>
  276. </div>