| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508 |
- <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
- <!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 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/file.js"></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/ligerDateEditor.js" type="text/javascript"></script>
- <script src="/shares/xheditor/xheditor-1.1.14/xheditor-1.1.14-zh-cn.min.js" type="text/javascript" ></script>
- <!-- 选择窗口需要加载的js文件 start-->
- <script src="${pageContext.request.contextPath}/liger/lib/json2.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerDialog.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/ligerTextBox.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerSpinner.js" type="text/javascript"></script>
- <script type="text/javascript" src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js"></script>
- <script type="text/javascript">
- $(function(){
- f_initToGrid();
- f_initPurchaseGrid();
- var is_spare="${map.is_spare}";
- if(is_spare==1){
- $("#spare_money_tr").show();
- $("#spare_money_id_select").show();
- $("#spare_money_id_link").show();
- }
-
- var project_name="${map.project_name}";
- if(project_name !=null && project_name !=""){
- var project_id="${map.project_id}";
- if(project_id !=null && project_id !=""){
- $.ajax({
- url:"fmChooseProjectAction.do?method=getProjectMoney&project_id=${map.project_id}&time="+new Date().getTime(),
- type:"post",
- dataType:"json",
- success:function(data){
- var obj=data[0];
- call_project("${map.project_id}",obj.subtotal,obj.petty_cash);
- }
- });
- }
-
- }
- });
- var pay_grid=null;
- function f_initToGrid() {
- var columns=[
- { display: '摘要', name: 'digest', type: 'text',isSort: false,width:200,editor: { type: 'text' },
- totalSummary:
- {
- type: 'sum',
- render: function (e) {
- return "<div>" + ' 合计' + "</div>";
- }
- }},
- { display: '开支类别', name: 'subject_name', type: 'text',isSort: false,width:100,editor: { type: 'text' }},
- { display: '附单据(张)', name: 'invoice', type: 'int',isSort: false,width:200,editor:{type:"int"},
- totalSummary:
- {
- type: 'sum',
- render: function (e) {
- var sum = parseFloat(e.sum);
- return "<div>" + formatnumber(sum,2) + "</div>";
- }
- }
- },
- { display: '金额(¥)', name: 'item_money', type: 'float',isSort: false,width:200,editor: { type: 'float' },
- totalSummary:
- {
- type: 'sum',
- render: function (e) {
- var sum = parseFloat(e.sum);
- return "<div>" + formatnumber(sum,2) + "</div>";
- }
- }
- },
- { display: '备注', name: 'remark', type: 'text',isSort: false,width:200,editor: { type: 'text' }}
- ];
- if("${map.payment_type}"=="2"){
- columns.push({ display: '操作', width:150,render:function(item,rowindex){
- var h="";
- h += "<a href='javascript:open_pay()'>采购清单</a> ";
-
- return h;
- }});
- }
-
- pay_grid = $("#pay_grid").ligerGrid({
- columns:columns ,
- url:"expenditureStatementAction.do?task=pay_detail_page&expend_sta_id=${map.universalid}&time="+new Date().getTime(),
- usePager: false,
- enabledEdit: true,
- clickToEdit:false,
- rownumbers:true,
- rowDraggable:true,
- width :'99%',
- height : '300'
- });
- }
-
- var purchase_grid;
- function f_initPurchaseGrid() {
- purchase_grid = $("#pay_div").ligerGrid({
- columns:
- [
- { display: '应付账款ID', name: 'account_pay_id', type: 'text',isSort: false, hide: true,width:5},
- { display: '产品ID', name: 'product_id', type: 'text',isSort: false, hide: true,width:5},
- { display: '供应商ID', name: 'supplier_id', type: 'text',isSort: false, hide: true,width:5},
- { display: '请购明细ID', name: 'request_detail_id', type: 'text',isSort: false, hide: true,width:5},
- { display: '项目采购清单ID', name: 'project_buy_id', type: 'text',isSort: false, hide: true,width:5},
- { display: '采购单ID', name: 'purchase_id',type:'text',isSort:false, hide: true,width:5},
- { display: '采购单明细ID', name: 'purchase_detail_id', type: 'text',isSort: false, hide: true,width:5},
- { display: '采购单号', name: 'purchase_number',type:'text',isSort:false,hide: true,width:5},
- { display: '存货编码', name: 'product_num',type:'text',isSort:false,width:100},
- { display: '存货名称', name: 'product_name',type:'text',isSort:false,width:100},
- { display: '规格型号', name: 'product_model_standard',type:'text',isSort:false,width:150},
- { display: '单位', name: 'product_unit_name',type:'text',isSort:false,width:60},
- { display: '单价', name: 'purchase_product_sell_price',type:'float',isSort:false,width:100},
- { display: '本次付款数', name: 'pay_num',type:'text',isSort:false,width:100},
- { display: '本次付款金额', name: 'pay_amount',type:'text',isSort:false,width:100
- }
- ],
- url:"expenditureStatementAction.do?task=paySubDetail&sta_id=${map.universalid}&time="+new Date().getTime(),
- width :'99.8%',
- usePager: false,
- height : '95%'
- });
- }
- function openSpare(){
- var project_id=$("#project_id").val();
- if(project_id =="" || project_id==null){
- $.ligerDialog.warn("请先选择项目!");
- return ;
- }
- var url="${pageContext.request.contextPath}/expenditureStatementAction.do?task=toChooseStatement&expendType=3&project_id="+project_id+"&spare_where=alllist";
- openODialog(url,"查看备用金历史记录");
- }
- function openPay(){
- var project_id=$("#project_id").val();
- if(project_id =="" || project_id==null){
- $.ligerDialog.warn("请先选择项目!");
- return ;
- }
- var url="${pageContext.request.contextPath}/expenditureStatementAction.do?task=topayStatement&project_id="+project_id;
- oDialog = openTopDialog({
- height : $("body", window.top.document).height() - 150,
- width : $("body", window.top.document).width() - 650,
- url : url,
- showMax : false,
- showToggle : false,
- showMin : false,
- isResize : false,
- modal : false,
- title : "查看付款历史",
- allowClose : true
- });
- }
- 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 call_project(project_id,subtotal,petty_cash){
- var total_money=0; //项目预算总金额或备用金总金额
- if("${expendType}"=="1"){//付款申请
- total_money=subtotal;
- }else if("${expendType}"=="3"){//备用金
- total_money=petty_cash;
- }
- $.ajax({
- type:"post",
- url:"expenditureStatementAction.do?task=query_project_money&expendType=${expendType}&project_id="+project_id+"&time="+new Date().getTime(),
- dataType:"json",
- success:function(data){
- $("tr[id='project_relation']").show();
- var alreay_expend_money=0; //已支出金额
- if(data[0].total_money ){
- alreay_expend_money=parseInt(data[0].total_money); //已支出金额
- }
- var expend_surplusr_money=total_money-alreay_expend_money; //未支出金额
- $("#project_amount_value").html(total_money);
- $("#alreay_expend_money_value").html(alreay_expend_money);
- $("#expend_surplusr_money_value").html(expend_surplusr_money);
- $("#alreay_expend_money").val(alreay_expend_money);
- $("#expend_surplusr_money").val(expend_surplusr_money);
- $("#spare_money_id").val("");
- $("#spare_money").val("");
- $("#spare_money_number").val("");
- },
- error:function(){
- $.ligerDialog.error("网络异常,请联系管理理员!");
- }
- });
- }
- //格式化小数点
- 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;
- }
-
- var pay_dialog;
- function open_pay(){
- pay_dialog=$.ligerDialog.open({height: 350,width:800, target: $("#pay_div"),title:"采购清单",
- buttons:[{
- text : '关闭',
- onclick : function(item, dialog) {
- dialog.hidden();
- }
- }]
- });
- }
- </script>
- </head>
- <body>
- <div class="forum-container" >
- <input type="hidden" name="project_id" id="project_id" value="${map.project_id }"/>
- <center>
- <table class="l-table-edit line">
- <c:choose>
- <c:when test="${expendType==1 }">
- <tr>
- <th colspan="4">付款申请单信息</th>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="15%">项目名称:</td>
- <td class="l-table-edit-td" width="35%">
- ${map.project_name }
- </td>
- <td class="l-table-edit-text" width="15%">付款单号:</td>
- <td class="l-table-edit-td" width="35%">
- ${map.expend_sta_number}
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="15%">付款类型:</td>
- <td class="l-table-edit-td" width="35%">
- <c:forEach items="${payment_type_list}" var="item">
- <c:if test="${map.payment_type==item.dvalue }">
- ${item.dname}
- </c:if>
- </c:forEach>
- </td>
- <td class="l-table-edit-text" width="15%">是否到票:</td>
- <td class="l-table-edit-td" width="35%">
- <c:forEach items="${isBillList}" var="item">
- <c:if test="${map.is_bill==item.dvalue }">
- ${item.dname}
- </c:if>
- </c:forEach>
- </td>
- </tr>
- </c:when>
- <c:when test="${expendType==2 }">
- <tr>
- <th colspan="4">费用报销信息</th>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="15%">项目名称:</td>
- <td class="l-table-edit-td" width="35%">
- ${map.project_name }
- </td>
- <td class="l-table-edit-text" width="15%">费用报销单号:</td>
- <td class="l-table-edit-td" width="35%">
- ${map.expend_sta_number}
- </td>
- </tr>
- </c:when>
- <c:when test="${expendType==3 }">
- <tr>
- <th colspan="4">备用金信息</th>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="15%">项目名称:</td>
- <td class="l-table-edit-td" width="35%">
- ${map.project_name }
- </td>
- <td class="l-table-edit-text" width="15%">备用金单号:</td>
- <td class="l-table-edit-td" width="35%">
- ${map.expend_sta_number}
- </td>
- </tr>
- </c:when>
- <c:when test="${expendType==4 }">
- <tr>
- <th colspan="4">其他往来付款信息</th>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="15%">其它付款单号:</td>
- <td class="l-table-edit-td" width="90%" colspan="3">
- ${map.expend_sta_number}
- </td>
- </tr>
- </c:when>
- </c:choose>
-
- <tr>
- <td colspan="4" height="300">
- <!-- 明细 start -->
- <div class="l-clear"></div>
- <div id="pay_grid" style="margin: 0; padding: 0"></div><br />
- <div style="display:none;"></div>
-
- <!-- 明细 end -->
- </td>
- </tr>
- <c:if test="${(expendType==1 || expendType==2) && map.is_spare==1 }">
- <tr id="spare_money_tr" style="display:none">
- <td class="l-table-edit-text" colspan="4">
- <span style="display:none" id="spare_money_id_select" >冲账备用金单号:
- ${map.spare_money_number }
- </span>
- <span style="margin-left:80px;display:none" id="spare_money_id_link"><a href="#" onclick="openSpare()">查看备用金历史</a></span>
- </tr>
- </c:if>
- <c:if test="${expendType==1 }">
- <tr id="project_relation" style="display:none">
- <td class="l-table-edit-text" colspan="4">
- <span id="project_amount_span" >预算总金额:<font id="project_amount_value">0</font></span>
- <span id="alreay_expend_money_span" style="margin-left:80px;">已付款金额:<font id="alreay_expend_money_value">${map.alreay_expend_money }</font></span>
- <span id="expend_surplusr_money_span" style="margin-left:80px;">付款结余金额:<font id="expend_surplusr_money_value">${map.expend_surplusr_money }</font></span>
- <span id="pay_history" style="margin-left:80px;"><a href="#" onclick="openPay();">查看付款历史</a></span>
- </td>
- </tr>
- </c:if>
- <c:if test="${expendType==2 }">
- <tr id="project_relation" style="display:none">
- <td class="l-table-edit-text" colspan="4">
- <span id="project_amount_span" >预算可领用金额:<font id="project_amount_value"></font></span>
- <span id="alreay_expend_money_span" style="margin-left:80px;">已领用金额:<font id="alreay_expend_money_value">${map.alreay_expend_money }</font></span>
- <span id="expend_surplusr_money_span" style="margin-left:80px;">预算结余金额:<font id="expend_surplusr_money_value">${map.expend_surplusr_money }</font></span>
- <span id="pay_history" style="margin-left:80px;display:none"><a href="#" onclick="openPay();">查看付款历史</a></span>
- </td>
- </tr>
- </c:if>
- <c:if test="${expendType==3 }">
- <tr id="project_relation" style="display:none" >
- <td class="l-table-edit-text" width="15%">预算备用金总金额:</td>
- <td class="l-table-edit-td" width="35%">
- <span id="project_amount_value"></span>
- </td>
- <td class="l-table-edit-text" width="15%">备用金已领用金额:</td>
- <td class="l-table-edit-td" width="35%">
- <span id="alreay_expend_money_value">${map.alreay_expend_money}</span>
- </td>
- </tr>
- <tr id="project_relation1" style="display:none" >
- <td class="l-table-edit-text" width="15%">备用金结余金额:</td>
- <td class="l-table-edit-td" width="35%">
- <span id="expend_surplusr_money_value">${map.expend_surplusr_money }</span>
- </td>
- <td class="l-table-edit-text" width="15%">预计还款日期:</td>
- <td class="l-table-edit-td" width="35%">
- <fmt:formatDate value="${map.return_date }" pattern="yyyy-MM-dd"/>
- </td>
- </tr>
- </c:if>
- <c:if test="${expendType==1 || expendType==3 || expendType==4}">
- <tr>
- <td class="l-table-edit-text" width="15%">收款户名:</td>
- <td class="l-table-edit-td" width="35%">
- ${map.receipt_account }
- </td>
- <td class="l-table-edit-text" width="15%">开户银行:</td>
- <td class="l-table-edit-td" width="35%">
- ${map.receipt_bank }
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="15%">银行帐号:</td>
- <td class="l-table-edit-td" width="90%" colspan="3">
- ${map.receipt_bank_account }
- </td>
- </tr>
- </c:if>
- <c:if test="${expendType==1 || expendType==4 }">
- <tr>
- <td class="l-table-edit-text" width="15%">附件:</td>
- <td class="l-table-edit-td" width="90%" colspan="3">
- <jsp:include page="/include/file.jsp">
- <jsp:param name="fieldName" value="files" />
- <jsp:param name="folder" value="fm/statement" />
- <jsp:param name="documentId" value="${map.doc_ids }" />
- <jsp:param name="size" value="${doc_ids_lenth }" />
- <jsp:param name="isView" value="1" />
- <jsp:param name="definedCss" value="file-style" />
- </jsp:include>
- </td>
- </tr>
- </c:if>
- <tr>
- <td class="l-table-edit-text" width="15%">申请人:</td>
- <td class="l-table-edit-td" width="35%">
- ${map.create_user_name }
- </td>
- <td class="l-table-edit-text" width="15%">申请日期:</td>
- <td class="l-table-edit-td" width="35%">
- <fmt:formatDate value="${map.create_date }" pattern="yyyy-MM-dd"/>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="20%">付款凭证:</td>
- <td class="l-table-edit-td" width="30%" >
- <jsp:include page="/include/file.jsp">
- <jsp:param name="fieldName" value="files" />
- <jsp:param name="folder" value="fm/statement" />
- <jsp:param name="documentId" value="${map.pay_proof }" />
- <jsp:param name="size" value="${pay_proof_lenth }" />
- <jsp:param name="isView" value="1" />
- <jsp:param name="definedCss" value="file-style" />
- </jsp:include>
- </td>
- <td class="l-table-edit-text" width="20%">银行流水单号:</td>
- <td class="l-table-edit-td" width="30%" >
- ${map.bank_number }
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="15%">付款户名:</td>
- <td class="l-table-edit-td" width="35%" >
- ${map.pay_account_name }
- </td>
-
-
- <td class="l-table-edit-text" width="20%">付款开户银行:</td>
- <td class="l-table-edit-td" width="30%">
- ${map.pay_bank_name }
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="20%">付款银行账号:</td>
- <td class="l-table-edit-td" width="80%" colspan="3">
- ${map.pay_bank_account_name }
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="20%">付款人:</td>
- <td class="l-table-edit-td" width="30%">
- ${map.pay_people }
- </td>
- <td class="l-table-edit-text" width="15%">付款日期:</td>
- <td class="l-table-edit-td" width="35%">
- <fmt:formatDate value="${map.pay_date }" pattern="yyyy-MM-dd"/>
- </td>
- </tr>
- <tr>
- <td class="l-table-edit-text" width="20%"></td>
- <td class="l-table-edit-td" width="30%">
-
- </td>
- <td class="l-table-edit-text" width="20%"></td>
- <td class="l-table-edit-td" width="30%">
-
- </td>
- </tr>
- </table>
- </center>
- <div class="l-clear"></div>
- <div id="pay_div" style="margin-top:0px;display:none"></div><br />
- <div style="display:none;"></div>
- </div>
- <%@ include file="/include/message.jsp"%>
- </body>
- </html>
|