| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- <%@ 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 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/js/yw/erp/erpflow.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;
-
- $(function() {
- initPurchaseGridList();
- });
-
- function initPurchaseGridList(params) {
- var checkbox = false;
- if ("${checkbox}" == 'false' || "${checkbox}" == '') {
- checkbox = false;
- } else {
- checkbox = true;
- }
- var columns = [
- {
- display : '采购单号',
- name : 'purchase_number',
- width : 120
- }, {
- display : '采购单主题',
- name : 'purchase_theme',
- width : 120
- }, {
- display : '供应商名称',
- name : 'purchase_suppliers_name',
- width : 80
- }, {
- display : '采购日期',
- name : 'purchase_date',
- width : 80
- }, {
- display : '采购类型',
- name : 'purchase_type_name',
- width : 80
- } , {
- display : '采购负责人',
- name : 'purchase_assigned_user_name',
- width : 80
- } ,{
- display : '实付金额',
- name : 'purchase_after_amount',
- width : 80
- },{
- display : '采购状态',
- name : 'purchase_status_name',
- width : 80
- },{
- display : '付款状态',
- name : 'purchase_payment_state_name',
- width : 80
- },{
- display : '审核状态',
- name : 'au_status',
- width : 120,
- render : function(row) {
- if(row.au_status=="4"){
- return "未审核";
- }else if(row.au_status=="1"){
- var html = '<a href=\"#\" onclick=\"viewflow('+ row.flow_ins_id + ')\"><font color=blue>审核中</font></a> ';
- return html;
- }else if(row.au_status=="2"){
- var html = '<a href=\"#\" onclick=\"viewflow('+ row.flow_ins_id + ')\"><font color=blue>审核通过</font></a> ';
- return html;
- }else if(row.au_status == "3"){
- var html = '<a href=\"#\" onclick=\"viewflow('+ row.flow_ins_id + ')\"><font color=blue>驳回</font></a> ';
- return html;
- }
- }
- }];
- if ("${requestScope.lookup }" == "") {
- columns
- .push({
- display : '操作',
- width : 180,
- isAllowHide : false,
- render : function(row) {
- var html = '<a href=\"#\" onclick=\"addTab(\'viewpurchase\'+getCurrentTabId(), \'查看采购信息\', \'${pageContext.request.contextPath }/erpPurchaseOrderAction.do?task=view&purchase_id='
- + row.purchase_id + '\',true,true);\"><font color=blue>查看</font></a> ';
- if('${loginId}'==row.purchaser_create_id){
- if(row.purchase_status==0){
- if(row.au_status==4 || row.au_status==3){
- html += '<a href=\"#\" onclick=\"deleteRow('+ row.purchase_id + ')\"><font color=blue>删除</font></a> ';
- html += '<a href=\"#\" onclick=\"addTab(\'updatepurchase\'+getCurrentTabId(), \'修改采购信息\', \'${pageContext.request.contextPath }/erpPurchaseOrderAction.do?task=toEdit&purchase_id='
- + row.purchase_id
- + '&tabid='
- + getCurrentTabId() + '\',true,true);\"><font color=blue>编辑</font></a> ';
- }
- if(row.au_status==1 || row.au_status==3){
- html += '<a href=\"#\" onclick=\"cancel_payflow('+ row.flow_ins_id + ')\"><font color=blue>撤消</font></a> ';
- }
- //html += '<a href=\"#\" onclick=\"cancleRow('+ row.purchase_id + ')\">撤消</a> ';
- }
- }
- html += '<a href=\"${pageContext.request.contextPath }/erpPurchaseOrderAction.do?task=print&purchase_id='
- + row.purchase_id + '\" target="_blank"><font color=blue>打印</font></a> ';
- return html;
- }
- });
- }
- grid = $("#maingrid4")
- .ligerGrid(
- {
- columns : columns,
- pageSize : 20,
- url : 'erpPurchaseOrderAction.do?task=query&purchaseStatus=${purchaseStatus}&au_status=${au_status}&purchase_payment_state=${purchase_payment_state}&lookup=${lookup}&loginId=${loginId}&time='
- + new Date().getTime() + params,
- pageParmName : 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
- width : '99.9%',
- height : '98.5%',
- checkbox : checkbox,
- onCheckRow: function(checked, rowdata, rowindex) {
- for (var rowid in this.records){
- this.unselect(rowid);
- }
- if(checked){
- this.select(rowindex);
- }else{
- this.unselect(rowindex);
- }
- }
- });
- $("#pageloading").hide();
- $(".l-grid-hd-cell-btn-checkbox").css("display", "none"); //隱藏checkAll
- }
- // wzf start 2015-01-15
- /**
- * 撤销流程
- */
- 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 searchByKword() {
- var purchase_number= $("#purchase_number").val();//采购单编号
- var s = "";
- if (purchase_number != "" && typeof (purchase_number) != "undefined") {
- s += "&purchase_number=" + encodeURI(encodeURI(purchase_number));
- }
- var purchase_theme= $("#purchase_theme").val();//采购单主题
- if (purchase_theme != "" && typeof (purchase_theme) != "undefined") {
- s += "&purchase_theme=" + encodeURI(encodeURI(purchase_theme));
- }
- grid.set("newPage","1");
- $(function() {
- initPurchaseGridList(s);
- });
- }
- function f_select() {
- var rows = grid.getCheckedRows();
- return rows;
- }
-
- function deleteRow(obj) {
- if (confirm("确定要删除")) {
- window.parent.f_addTab(new Date().getTime(), '删除采购信息',
- '${pageContext.request.contextPath }/erpPurchaseOrderAction.do?task=delete&purchase_id='
- + obj + '&tabid=' + getCurrentTabId());
- }
- }
-
- //撤消采购单
- function cancleRow(obj) {
- if (confirm("确定要删除")) {
- window.parent.f_addTab(new Date().getTime(), '撤消采购单',
- '${pageContext.request.contextPath }/erpPurchaseOrderAction.do?task=cancle&purchase_status=2&purchase_id='
- + obj + '&tabid=' + getCurrentTabId());
- }
- }
-
- /**
- * 查看流程
- */
- function viewflow(insId){
- var url="${pageContext.request.contextPath}/workFlowAction.do?task=viewflow&insId="+insId+"&tabid="+getCurrentTabId();
- openODialog(url,"查看流程信息");
- }
-
- </script>
- </head>
- <body>
- <%@ include file="/include/message.jsp"%>
- <div class="container">
- <%-- <c:if test="${!empty requestScope.loginId && requestScope.lookup == null or requestScope.looup == '' }">
- <div id="title" class="form-button">
- <input type="button" class="l-button" value="新增采购信息" onclick="addTab('addpurchase'+getCurrentTabId(), '新增采购订单', '${pageContext.request.contextPath }/erpPurchaseOrderAction.do?task=toAdd&tabid=' + getCurrentTabId(),true,true);" style="width: 90px"/>
- </div>
- <div class="default_search" style="margin: 0; height:30px;"></div>
- </c:if> --%>
- <div class="default_search" style="margin: 0;">
- <ul class="list_search">
- <li class="title">采购单号:</li>
- <li class="text"><input type="text" name="purchase_number" id="purchase_number">
- </li>
- </ul>
- <ul class="list_search">
- <li class="title">采购单主题:</li>
- <li class="text"><input type="text" name="purchase_theme" id="purchase_theme">
- </li>
- </ul>
- <ul>
- <li class="search-button"><input type="button" class='l-button'
- name="search" onclick="searchByKword()" value="查询" /></li>
- </ul>
- </div>
- <div style="clear:both;"></div>
- <div id="searchbar">
- <div style="overflow: hidden; clear: both;">
- <div id="maingrid4" style="margin: 0; padding: 0"></div>
- </div>
- </div>
- </div>
- </body>
- </html>
|