| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274 |
- <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=GBK">
- <title>请购单审核列表</title>
- <link href="${pageContext.request.contextPath}/main.css" rel="stylesheet" type="text/css" />
- <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/datePicker/WdatePicker.js"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
- <script type="text/javascript">
- var grid = null;
- var curTab = 1;
- var param = "&listType=wait";
- var audit_grid="waitAuditGrid";
- $(function (){
- $("#auditIncomeTab").ligerTab({ onAfterSelectTabItem: function (tabid){
- if(tabid == "tabitem1"){
- curTab = 1;
- param="&listType=wait";
- audit_grid="waitAuditGrid";
- searchByKword();
- }else if(tabid == "tabitem2"){
- curTab = 2;
- param="&listType=already";
- audit_grid="alreadyAuditGrid";
- searchByKword();
- }
- }});
- initAuditGrid(param,audit_grid);
- });
- //审核列表
- function initAuditGrid(params,audit_grid) {
- var columns = [
- {
- display : '请购单号',
- name : 'request_number',
- width : 150
- }, {
- display : '请购主题',
- name : 'request_theme',
- width : 300
- },{
- display : '申请部门',
- name : 'request_group_name',
- width : 120
- },{
- display : '申请时间',
- name : 'request_create_date',
- width : 100
- }, {
- display : '当前环节',
- name : 'current_tache_name',
- width : 120
- },{
- display : '申请人',
- name : 'create_user_name',
- width : 100
- }
- ];
- columns
- .push({
- display : '操作',
- width : 130,
- isAllowHide : false ,
- render : function(row) {
- var html='';
- if(1==curTab){
- html +='<a href=\"#\" onclick=\"viewflow('+ row.flow_ins_id + ')\"><font color=blue>查看</font></a> ';
- html += '<a href=\"#\" onclick=\"processflow('+ row.current_tins_id + ',\''+row.flow_ins_name+'\')\"><font color=blue>审核</font></a> ';
- }else if(2==curTab){
- html +='<a href=\"#\" onclick=\"viewflow('+ row.flow_ins_id + ')\"><font color=blue>查看</font></a> ';
- }
- return html;
- }
- });
- grid = $("#"+audit_grid)
- .ligerGrid(
- {
- columns : columns,
- pageSize : 20,
- url : 'erpPurchaseRequestAction.do?task=auditPurchaseRequestList&time=' + new Date().getTime() + params,
- pageParmName : 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
- width : '99.9%',
- height : '99%'
- });
- $("#pageloading").hide();
- $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
- }
- //查询
- function searchByKword() {
- var s = "";
- var request_number = $("#request_number").val(); //请购单单号
- if (request_number != "" && typeof (request_number) != "undefined") {
- s += "&request_number=" + encodeURI(encodeURI(request_number));
- }
-
- var request_theme= $("#request_theme").val(); //请购主题
- if (request_theme != "" && typeof (request_theme) != "undefined") {
- s += "&request_theme=" + encodeURI(encodeURI(request_theme));
- }
- var request_date_start= $("#request_date_start").val(); //请购申请开始日期
- if (request_date_start != "" && typeof (request_date_start) != "undefined") {
- s += "&request_date_start=" + encodeURI(encodeURI(request_date_start));
- }
- var request_date_end= $("#request_date_end").val(); //请购申请结束日期
- if (request_date_end != "" && typeof (request_date_end) != "undefined") {
- s += "&request_date_end=" + encodeURI(encodeURI(request_date_end));
- }
- var request_product_id= $("#request_product_id").val(); //请购存货
- if (request_product_id != "" && typeof (request_product_id) != "undefined") {
- s += "&request_product_id=" + encodeURI(encodeURI(request_product_id));
- }
- grid.set("newPage","1");
- s+=param;
- initAuditGrid(s,audit_grid);
- }
- //清除查询条件
- function clearAll(){
-
- }
- //选择存货
- function f_import(){
- var obj = window.top;
- if (obj != undefined && obj != null) {
- obj.$.ligerDialog.open({
- title : '选择存货',
- width : 1000,
- height : 400,
- url : 'productMgrLookup.do?task=toProductList&checkbox=false&typePurchase=1',
- buttons : [ {
- text : '确定',
- onclick : f_importOK
- }, {
- text : '取消',
- onclick : f_importCancel
- } ]
- });
- }
- }
- //选择存货确定
- function f_importOK(item, dialog){
- var obj = window.top;
- var rows = dialog.frame.f_select();
- if (rows.length<=0){
- obj.$.ligerDialog.warn('请选择存货!');
- return;
- }else if(rows.length>1){
- obj.$.ligerDialog.warn('请选择一个存货!');
- return;
- }else{
- for (var i=0;i<rows.length; i++) {
- $("#request_product_id").val("");
- $("#request_product_name").val("");
- $("#request_product_id").val(rows[i].product_id);
- $("#request_product_name").val(rows[i].product_num);
- }
- }
- dialog.close();
- }
- //取消选择
- function f_importCancel(item, dialog){
- dialog.close();
- }
- /**流程相关start**/
- function cancel_payflow(insId){
- if(!confirm("确定要撤消流程?")){
- return ;
- }
- $.ajax({
- type:"post",
- url:"workFlowAction.do?task=cancelflow&insId="+insId+"&time="+new Date().getTime(),
- dataType:"json",
- success:function(data){
- if(data.i>0){
- $.ligerDialog.success("操作成功");
- searchByKword();
- }else{
- $.ligerDialog.success("操作失败");
- }
- }
- });
- }
- function viewflow(insId){
- var url="${pageContext.request.contextPath }/workFlowAction.do?task=viewflow&insId="+insId+"&tabid="+getCurrentTabId();
- openODialog(url,"查看流程信息");
- }
- function processflow(tinsId,flow_ins_name){
- var url="${pageContext.request.contextPath }/workFlowAction.do?task=toProcess&tinsId="+tinsId+"&tabid="+getCurrentTabId();
- openODialog(url,flow_ins_name);
- }
-
- function openODialog(owurl, name) {
- oDialog = openTopDialog({
- height : $("body", window.top.document).height() - 50,
- width : $("body", window.top.document).width() - 50,
- url : owurl,
- showMax : false,
- showToggle : false,
- showMin : false,
- isResize : false,
- modal : false,
- title : name,
- allowClose : true
- });
- }
- function closeODialog() {
- oDialog.close();
- }
- /**流程相关end**/
- </script>
- </head>
- <body>
- <%@ include file="/include/message.jsp"%>
- <div class="container">
- <div class="default_search" style="margin: 0;">
- <ul class="list_search">
- <li class="title">请购单号:</li>
- <li class="text">
- <input type="text" name="request_number" id="request_number">
- </li>
- </ul>
- <ul class="list_search">
- <li class="title">申请日期:</li>
- <li class="text">
- <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})}'})">
- 至
- <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})}'})">
- </li>
- </ul>
- <ul class="list_search" style="clear: both;">
- <li class="title">请购主题:</li>
- <li class="text">
- <input type="text" name="request_theme" id="request_theme">
- </li>
- </ul>
- <ul class="list_search">
- <li class="title">请购存货:</li>
- <li class="text">
- <input type="hidden" name="request_product_id" id="request_product_id">
- <input type="text" name="request_product_name" id="request_product_name" readonly="readonly">
- <input type="button" class='l-button' value="选择" onclick="f_import();"/>
- </li>
- </ul>
- <ul class="list_search">
- <li class="search-button">
- <input type="button" class='l-button' name="search" style="margin-top:2px;" onclick="searchByKword()" value="查询" />
- </li>
- </ul>
- </div>
- <div style="clear:both;" ></div>
- <div id="auditIncomeTab" class="tab2 l-tab">
- <div title="待办" id="waitAuditTab" style="overflow: hidden;">
- <div id="waitAuditGrid" style="margin: 0; padding: 0"></div>
- </div>
- <div title="经办" id="alreadyAuditTab" style="overflow: hidden;">
- <div id="alreadyAuditGrid" style="margin: 0; padding: 0"></div>
- </div>
- </div>
- </div>
- </body>
- </html>
|