auditPurchaseRequestList.jsp 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  6. <title>请购单审核列表</title>
  7. <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
  8. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  9. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  10. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  11. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  12. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
  13. <script type="text/javascript" src="/shares/js/constant.js"></script>
  14. <script type="text/javascript" src="/shares/js/common.js"></script>
  15. <script type="text/javascript" src="/shares/datePicker/WdatePicker.js"></script>
  16. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
  17. <script type="text/javascript">
  18. var grid = null;
  19. var curTab = 1;
  20. var param = "&listType=wait";
  21. var audit_grid="waitAuditGrid";
  22. $(function (){
  23. $("#auditIncomeTab").ligerTab({ onAfterSelectTabItem: function (tabid){
  24. if(tabid == "tabitem1"){
  25. curTab = 1;
  26. param="&listType=wait";
  27. audit_grid="waitAuditGrid";
  28. searchByKword();
  29. }else if(tabid == "tabitem2"){
  30. curTab = 2;
  31. param="&listType=already";
  32. audit_grid="alreadyAuditGrid";
  33. searchByKword();
  34. }
  35. }});
  36. initAuditGrid(param,audit_grid);
  37. });
  38. //审核列表
  39. function initAuditGrid(params,audit_grid) {
  40. var columns = [
  41. {
  42. display : '请购单号',
  43. name : 'request_number',
  44. width : 150
  45. }, {
  46. display : '请购主题',
  47. name : 'request_theme',
  48. width : 300
  49. },{
  50. display : '申请部门',
  51. name : 'request_group_name',
  52. width : 120
  53. },{
  54. display : '申请时间',
  55. name : 'request_create_date',
  56. width : 100
  57. }, {
  58. display : '当前环节',
  59. name : 'current_tache_name',
  60. width : 120
  61. },{
  62. display : '申请人',
  63. name : 'create_user_name',
  64. width : 100
  65. }
  66. ];
  67. columns
  68. .push({
  69. display : '操作',
  70. width : 130,
  71. isAllowHide : false ,
  72. render : function(row) {
  73. var html='';
  74. if(1==curTab){
  75. html +='<a href=\"#\" onclick=\"viewflow('+ row.flow_ins_id + ')\"><font color=blue>查看</font></a>&nbsp;&nbsp;';
  76. html += '<a href=\"#\" onclick=\"processflow('+ row.current_tins_id + ',\''+row.flow_ins_name+'\')\"><font color=blue>审核</font></a>&nbsp;';
  77. }else if(2==curTab){
  78. html +='<a href=\"#\" onclick=\"viewflow('+ row.flow_ins_id + ')\"><font color=blue>查看</font></a>&nbsp;&nbsp;';
  79. }
  80. return html;
  81. }
  82. });
  83. grid = $("#"+audit_grid)
  84. .ligerGrid(
  85. {
  86. columns : columns,
  87. pageSize : 20,
  88. url : 'erpPurchaseRequestAction.do?task=auditPurchaseRequestList&time=' + new Date().getTime() + params,
  89. pageParmName : 'p', //页索引参数名,(提交给服务器)
  90. pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
  91. width : '99.9%',
  92. height : '99%'
  93. });
  94. $("#pageloading").hide();
  95. $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
  96. }
  97. //查询
  98. function searchByKword() {
  99. var s = "";
  100. var request_number = $("#request_number").val(); //请购单单号
  101. if (request_number != "" && typeof (request_number) != "undefined") {
  102. s += "&request_number=" + encodeURI(encodeURI(request_number));
  103. }
  104. var request_theme= $("#request_theme").val(); //请购主题
  105. if (request_theme != "" && typeof (request_theme) != "undefined") {
  106. s += "&request_theme=" + encodeURI(encodeURI(request_theme));
  107. }
  108. var request_date_start= $("#request_date_start").val(); //请购申请开始日期
  109. if (request_date_start != "" && typeof (request_date_start) != "undefined") {
  110. s += "&request_date_start=" + encodeURI(encodeURI(request_date_start));
  111. }
  112. var request_date_end= $("#request_date_end").val(); //请购申请结束日期
  113. if (request_date_end != "" && typeof (request_date_end) != "undefined") {
  114. s += "&request_date_end=" + encodeURI(encodeURI(request_date_end));
  115. }
  116. var request_product_id= $("#request_product_id").val(); //请购存货
  117. if (request_product_id != "" && typeof (request_product_id) != "undefined") {
  118. s += "&request_product_id=" + encodeURI(encodeURI(request_product_id));
  119. }
  120. grid.set("newPage","1");
  121. s+=param;
  122. initAuditGrid(s,audit_grid);
  123. }
  124. //清除查询条件
  125. function clearAll(){
  126. }
  127. //选择存货
  128. function f_import(){
  129. var obj = window.top;
  130. if (obj != undefined && obj != null) {
  131. obj.$.ligerDialog.open({
  132. title : '选择存货',
  133. width : 1000,
  134. height : 400,
  135. url : 'productMgrLookup.do?task=toProductList&checkbox=false&typePurchase=1',
  136. buttons : [ {
  137. text : '确定',
  138. onclick : f_importOK
  139. }, {
  140. text : '取消',
  141. onclick : f_importCancel
  142. } ]
  143. });
  144. }
  145. }
  146. //选择存货确定
  147. function f_importOK(item, dialog){
  148. var obj = window.top;
  149. var rows = dialog.frame.f_select();
  150. if (rows.length<=0){
  151. obj.$.ligerDialog.warn('请选择存货!');
  152. return;
  153. }else if(rows.length>1){
  154. obj.$.ligerDialog.warn('请选择一个存货!');
  155. return;
  156. }else{
  157. for (var i=0;i<rows.length; i++) {
  158. $("#request_product_id").val("");
  159. $("#request_product_name").val("");
  160. $("#request_product_id").val(rows[i].product_id);
  161. $("#request_product_name").val(rows[i].product_num);
  162. }
  163. }
  164. dialog.close();
  165. }
  166. //取消选择
  167. function f_importCancel(item, dialog){
  168. dialog.close();
  169. }
  170. /**流程相关start**/
  171. function cancel_payflow(insId){
  172. if(!confirm("确定要撤消流程?")){
  173. return ;
  174. }
  175. $.ajax({
  176. type:"post",
  177. url:"workFlowAction.do?task=cancelflow&insId="+insId+"&time="+new Date().getTime(),
  178. dataType:"json",
  179. success:function(data){
  180. if(data.i>0){
  181. $.ligerDialog.success("操作成功");
  182. searchByKword();
  183. }else{
  184. $.ligerDialog.success("操作失败");
  185. }
  186. }
  187. });
  188. }
  189. function viewflow(insId){
  190. var url="${pageContext.request.contextPath }/workFlowAction.do?task=viewflow&insId="+insId+"&tabid="+getCurrentTabId();
  191. openODialog(url,"查看流程信息");
  192. }
  193. function processflow(tinsId,flow_ins_name){
  194. var url="${pageContext.request.contextPath }/workFlowAction.do?task=toProcess&tinsId="+tinsId+"&tabid="+getCurrentTabId();
  195. openODialog(url,flow_ins_name);
  196. }
  197. function openODialog(owurl, name) {
  198. oDialog = openTopDialog({
  199. height : $("body", window.top.document).height() - 50,
  200. width : $("body", window.top.document).width() - 50,
  201. url : owurl,
  202. showMax : false,
  203. showToggle : false,
  204. showMin : false,
  205. isResize : false,
  206. modal : false,
  207. title : name,
  208. allowClose : true
  209. });
  210. }
  211. function closeODialog() {
  212. oDialog.close();
  213. }
  214. /**流程相关end**/
  215. </script>
  216. </head>
  217. <body>
  218. <%@ include file="/include/message.jsp"%>
  219. <div class="container">
  220. <div class="default_search" style="margin: 0;">
  221. <ul class="list_search">
  222. <li class="title">请购单号:</li>
  223. <li class="text">
  224. <input type="text" name="request_number" id="request_number">
  225. </li>
  226. </ul>
  227. <ul class="list_search">
  228. <li class="title">申请日期:</li>
  229. <li class="text">
  230. <input type="text" class="Wdate" name="request_date_start" id="request_date_start" onclick="WdatePicker({skin:'blue',dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'request_date_end\',{d:-1})}'})">
  231. <input type="text" class="Wdate" name="request_date_end" id="request_date_end" onclick="WdatePicker({skin:'blue',dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'request_date_start\',{d:1})}'})">
  232. </li>
  233. </ul>
  234. <ul class="list_search" style="clear: both;">
  235. <li class="title">请购主题:</li>
  236. <li class="text">
  237. <input type="text" name="request_theme" id="request_theme">
  238. </li>
  239. </ul>
  240. <ul class="list_search">
  241. <li class="title">请购存货:</li>
  242. <li class="text">
  243. <input type="hidden" name="request_product_id" id="request_product_id">
  244. <input type="text" name="request_product_name" id="request_product_name" readonly="readonly">
  245. <input type="button" class='l-button' value="选择" onclick="f_import();"/>
  246. </li>
  247. </ul>
  248. <ul class="list_search">
  249. <li class="search-button">
  250. <input type="button" class='l-button' name="search" style="margin-top:2px;" onclick="searchByKword()" value="查询" />
  251. </li>
  252. </ul>
  253. </div>
  254. <div style="clear:both;" ></div>
  255. <div id="auditIncomeTab" class="tab2 l-tab">
  256. <div title="待办" id="waitAuditTab" style="overflow: hidden;">
  257. <div id="waitAuditGrid" style="margin: 0; padding: 0"></div>
  258. </div>
  259. <div title="经办" id="alreadyAuditTab" style="overflow: hidden;">
  260. <div id="alreadyAuditGrid" style="margin: 0; padding: 0"></div>
  261. </div>
  262. </div>
  263. </div>
  264. </body>
  265. </html>