| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- <%@ 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;
- $(function() {
- initTargetGrid();
- });
- function initTargetGrid(params) {
- var columns = [
- {
- display : '供应商名称',
- name : 'sname',
- width : 300,
- totalSummary:
- {
- type: 'sum',
- render: function (e) {
- return "<div>" + ' 合计' + "</div>";
- }
- }
- }, {
- display : '应付款',
- name : 'total_amount',
- width : 120,
- totalSummary:
- {
- type: 'sum',
- render: function (e) {
- var sum = parseFloat(e.sum);
- return "<div>" + formatnumber(sum,2) + "</div>";
- }
- }
- }, {
- display : '已付款',
- name : 'payment_amount',
- width : 120,
- totalSummary:
- {
- type: 'sum',
- render: function (e) {
- var sum = parseFloat(e.sum);
- return "<div>" + formatnumber(sum,2) + "</div>";
- }
- }
- },{
- display : '未付款',
- name : 'unpaid_amount',
- width : 120,
- totalSummary:
- {
- type: 'sum',
- render: function (e) {
- var sum = parseFloat(e.sum);
- return "<div>" + formatnumber(sum,2) + "</div>";
- }
- }
- }
- ];
- columns
- .push({
- display : '操作',
- width : 130,
- isAllowHide : false,
- render : function(row) {
- var html = '<a href=\"#\" onclick=\"paymentRequest('+ row.supplier_id + ')\"><font color=blue>付款申请</font></a> ';
- return html;
- }
- });
- grid = $("#maingrid4")
- .ligerGrid(
- {
- columns : columns,
- pageSize : 20,
- url : 'erpPurchaseAccountPayAction.do?task=purchaseAccountPayList&viewListType=allList&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 sname = $("#sname").val();//供应商名称
- if (sname != "" && typeof (sname) != "undefined") {
- s += "&sname=" + encodeURI(encodeURI(sname)) ;
- }
- grid.set("newPage","1");
- initTargetGrid(s);
- }
- function f_select() {
- var rows = grid.getCheckedRows();
- return rows;
- }
- /**
- * 付款申请
- */
- function paymentRequest(supplier_id){
- addTab('paymentRequest' + getCurrentTabId(), '付款申请', '${pageContext.request.contextPath }/erpPurchaseAccountPayAction.do?task=toPaymentRequest&supplier_id='
- + supplier_id + '&tabid=' + getCurrentTabId(),true,true);
- }
- //清除查询条件
- function clearAll(){
- $("#receive_date_start").val("");
- $("#receive_date_end").val("");
- $("#income_sta_number").val("");
- $("#operator").val("");
- $("#pay_unit").val("");
- $("#contract_number").val("");
- grid.set("newPage","1");
- initTargetGrid();
- }
- /**
- * 撤销流程
- */
- function cancel_payflow(insId){
- if(!confirm("确定要撤消流程?")){
- return ;
- }
- $.ajax({
- type:"post",
- url:"workFlowAction.do.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 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();
- }
- /**
- * 格式化小数点
- */
- function formatnumber(value, num) {
- var a, b, c, i;
- a = value.toString();
- b = a.indexOf(".");
- c = a.length;
- if (num == 0) {
- if (b != -1) {
- a = a.substring(0, b);
- }
- } else {// 如果没有小数点
- if (b == -1) {
- a = a + ".";
- for (i = 1; i <= num; i++) {
- a = a + "0";
- }
- } else {// 有小数点,超出位数自动截取,否则补0
- a = a.substring(0, b + num + 1);
- for (i = c; i <= b + num; i++) {
- a = a + "0";
- }
- }
- }
- return a;
- }
- </script>
- </head>
- <body>
- <%@ include file="/include/message.jsp"%>
- <div class="container">
- <div class="default_search" style="margin: 0;">
- <ul>
- <li class="title"> 供应商名称:</li>
- <li class="text">
- <input type="text" id="sname" name="sname" value="" />
- </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>
|