deli_info.jsp 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%
  3. String path = request.getContextPath();
  4. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  5. %>
  6. <!DOCTYPE html>
  7. <html>
  8. <head>
  9. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  10. <!-- 避免IE使用兼容模式 -->
  11. <meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
  12. <meta name="renderer" content="webkit">
  13. <!-- 导入公共样式 -->
  14. <%@ include file="ap.jsp" %>
  15. </head>
  16. <style type="text/css">
  17. #printTable td,th{
  18. font-size:16px;
  19. }
  20. #daochu{ display: inline-block; height: 34px;width: 82px; line-height: 31px; border-radius:3px; background-color: #009688; color: #fff; text-align: center;}
  21. </style>
  22. <body>
  23. <!-- layout布局 开始 -->
  24. <div data-toggle="topjui-layout" data-options="fit:true">
  25. <div data-options="region:'center',iconCls:'icon-reload',title:'',split:true,border:false">
  26. <div data-toggle="topjui-layout" data-options="fit:true">
  27. <div data-options="region:'center',title:'',fit:false,split:true,border:false,bodyCls:'border_right_bottom'"
  28. style="height:80%">
  29. <!-- datagrid表格 -->
  30. <table data-toggle="topjui-datagrid"
  31. data-options="id:'userDg',
  32. singleSelect:true,
  33. selectOnCheck:false,
  34. checkOnSelect:false,
  35. ">
  36. </table>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. <!-- 表格工具栏开始 -->
  42. <div id="userDg-toolbar" class="topjui-toolbar"
  43. data-options="grid:{
  44. type:'datagrid',
  45. id:'userDg'
  46. }">
  47. <a href="javascript:void(0)"
  48. data-toggle="topjui-menubutton"
  49. data-options="method:'search',
  50. extend: '#userDg-toolbar',
  51. btnCls:'topjui-btn-blue'">查询</a>
  52. <a href="javascript:void(0)"
  53. data-toggle="topjui-menubutton"
  54. data-options="method:'doAjax',
  55. extend: '#userDg-toolbar',
  56. btnCls:'topjui-btn-brown',
  57. iconCls:'fa fa-trash',
  58. url:_ctx + 'subrecover.action',
  59. grid: {uncheckedMsg:'请先勾选要删除的数据',param:'id:id,packe_num:packe_num,t_name:t_name,user_name:user_name,place_num:place_num'}">工单回收</a>
  60. <a href="javascript:void(0)"
  61. data-toggle="topjui-menubutton"
  62. data-options="method:'filter',
  63. extend: '#userDg-toolbar',
  64. btnCls:'topjui-btn-black'">过滤</a>
  65. <a href="javascript:dayin()" id="daochu"><i class="fa fa-file-excel-o"></i>&nbsp;导出表格</a>
  66. <a href="javascript:void(0)">参与人数 </a> <span class="sum" style="color:red;"></span>
  67. <a href="javascript:void(0)">已完成工序 : </a> <span class="gsum" style="color:red;"></span>
  68. <a href="javascript:void(0)">未完成工序 : </a> <span class="ugsum" style="color:red;"></span>
  69. </div>
  70. <!-- 表格工具栏结束 -->
  71. <script>
  72. var plan_num=request('plan_num');
  73. //打印
  74. function dayin(){
  75. //测试导出exsl
  76. $.ajax({
  77. type : "post",//提交的方法为post
  78. url : 'subReporrinting.action?place_num='+plan_num,//对应的Action提交的路径
  79. dataType: 'json',
  80. success : function(data) {//当Ajax提交成功时调用的方法
  81. //alert(data.message);
  82. console.info(data);
  83. var downurl=data.downurl;
  84. var url="<%=request.getContextPath()%>/download/"+downurl;
  85. /* alert(url); */
  86. window.location.href = url;
  87. //$("#download").attr("href",+url);
  88. //$('#dd').dialog('open');
  89. /* download(downurl); */
  90. }
  91. });
  92. //console.log("打印");
  93. }
  94. function printReceipt(){ //打印
  95. bdhtml=window.document.body.innerHTML;
  96. sprnstr="<!--startprint-->";
  97. eprnstr="<!--endprint-->";
  98. prnhtml=bdhtml.substring(bdhtml.indexOf(sprnstr)+17);
  99. prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
  100. window.document.body.innerHTML=prnhtml;
  101. window.print();
  102. }
  103. $(function () {
  104. $.ajax({
  105. type:"post",
  106. url:"subListPeople.action?place_num="+plan_num,
  107. success:function (num) {
  108. var json = eval("(" + num + ")");
  109. //遍历json
  110. for(var j in json) {
  111. var key = j;
  112. var value = json[j];
  113. }
  114. $(".sum") .text(value);
  115. },
  116. error:function () {
  117. }
  118. });
  119. $.ajax({
  120. type:"post",
  121. url:"subListFinish.action?place_num="+plan_num,
  122. success:function (num) {
  123. var json = eval("(" + num + ")");
  124. //遍历json
  125. for(var j in json) {
  126. var key = j;
  127. var value = json[j];
  128. }
  129. $(".gsum") .text(value);
  130. },
  131. error:function () {
  132. }
  133. });
  134. $.ajax({
  135. type:"post",
  136. url:"subListUnfinish.action?place_num="+plan_num,
  137. success:function (num) {
  138. var json = eval("(" + num + ")");
  139. //遍历json
  140. for(var j in json) {
  141. var key = j;
  142. var value = json[j];
  143. }
  144. $(".ugsum") .text(value);
  145. },
  146. error:function () {
  147. }
  148. });
  149. var userDg = {
  150. type: 'datagrid',
  151. id: 'userDg'
  152. };
  153. $("#userDg").iDatagrid({
  154. id: 'userDg',
  155. url: 'subList.action?place_num='+plan_num,
  156. columns: [[
  157. {field: 'id', title: 'UID', checkbox: true},
  158. {field: 'packe_num', title: '包号', sortable: true},
  159. {field: 'number', title: '数量', sortable: true},
  160. /* {field: 'price', title: '单价', sortable: true},
  161. {field: 'money', title: '工钱', sortable: true}, */
  162. {field: 't_name', title: '工序名称', sortable: true},
  163. {field: 'job_number', title: '提交人工号', sortable: true},
  164. {field: 'user_name', title: '提交人', sortable: true},
  165. {field: 'sub_time', title: '提交时间', sortable: true},
  166. {field: 'state',title:'状态',sortable:true,
  167. formatter:function(value,row,index){
  168. if (value == '1') {
  169. return '<font color=\"green\">正常</font>';
  170. } else if (value == '2') {
  171. return '<font color=\"orange\">待批准</font>';
  172. }else if(value == '3'){
  173. return '<font color=\"red\">已结算</font>';
  174. }
  175. }
  176. },
  177. {field: 'place_num', title: '订单号', sortable: true}
  178. ]]
  179. });
  180. $('#queryBtn').iMenubutton({
  181. event: 'query',
  182. iconCls: 'fa fa-search',
  183. btnCls: 'topjui-btn-danger',
  184. form: {id: 'queryForm'},
  185. grid: {type: 'datagrid', 'id': 'userDg'}
  186. });
  187. });
  188. //获取传入id
  189. function request(paras) {
  190. var url = location.href;
  191. var paraString = url.substring(url.indexOf("?") + 1, url.length).split("&");
  192. var paraObj = { };
  193. for (var i = 0; j = paraString[i]; i++) {
  194. paraObj[j.substring(0, j.indexOf("=")).toLowerCase()] = j.substring(j.indexOf("=") + 1, j.length);
  195. }
  196. var returnValue = paraObj[paras.toLowerCase()];
  197. if (typeof (returnValue) == "undefined") {
  198. return "";
  199. } else {
  200. return returnValue;
  201. }
  202. }
  203. // 自定义方法
  204. /* function myQuery() {
  205. // 提示信息
  206. $.iMessager.alert('自定义方法', '自定义方法被执行了!', 'messager-info');
  207. // 提交参数查询表格数据
  208. $('#productDg').iDatagrid('reload', {
  209. name: $('#name').iTextbox('getValue'),
  210. code: $('#code').iTextbox('getValue')
  211. });
  212. } */
  213. </script>
  214. </body>
  215. </html>