pay_edit.jsp 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704
  1. <%@ page language="java" contentType="text/html;charset=GBK" pageEncoding="GBK"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html;charset=GBK">
  7. <title>新增付款申请</title>
  8. <link href="${pageContext.request.contextPath }/main.css" rel="stylesheet" type="text/css" />
  9. <link href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  10. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  11. <script type="text/javascript" src="/shares/js/constant.js"></script>
  12. <script type="text/javascript" src="/shares/js/common.js"></script>
  13. <script type="text/javascript" src="/shares/js/file.js"></script>
  14. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  15. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerDateEditor.js" type="text/javascript"></script>
  16. <script src="/shares/xheditor/xheditor-1.1.14/xheditor-1.1.14-zh-cn.min.js" type="text/javascript" ></script>
  17. <!-- 选择窗口需要加载的js文件 start-->
  18. <script src="${pageContext.request.contextPath}/liger/lib/json2.js" type="text/javascript"></script>
  19. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerDialog.js" type="text/javascript"></script>
  20. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  21. <!-- -->
  22. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script>
  23. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerCheckBox.js" type="text/javascript"></script>
  24. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerComboBox.js" type="text/javascript"></script>
  25. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/plugins/ligerSpinner.js" type="text/javascript"></script>
  26. <script type="text/javascript" src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js"></script>
  27. <script type="text/javascript" src="/shares/datePicker/WdatePicker.js"></script>
  28. <!-- 选择银行账户js文件 -->
  29. <script type="text/javascript" src="/shares/js/yw/fm/common/chooseAccount.js"></script>
  30. <script type="text/javascript" src="/shares/js/yw/fm/common/chooseReturnMoney.js"></script>
  31. <script type="text/javascript" src="/shares/js/yw/fm/common/chooseProject.js"></script>
  32. <!-- 选择开支类别 -->
  33. <script type="text/javascript" src="/shares/js/yw/fm/incomestatement/chooseSubjectTree.js"></script>
  34. <script type="text/javascript">
  35. var _money=0; //用于存储付款结余金额,0代表没有选择项目或者手动直接输项目
  36. var isClear=true; //用于项目变换时,清除备用金单号及ID
  37. $(function(){
  38. f_initToGrid();
  39. f_initPurchaseGrid();
  40. var tabid="${tabid}";
  41. $("#tabid").val(stripscriptback(tabid));
  42. $("#is_spare").click(function(){
  43. var flag=$(this).attr("checked");
  44. if(flag){//显示备用金
  45. $("#spare_money_id_select").show();
  46. $("#spare_money_id_link").show();
  47. }else{
  48. $("#spare_money_id_select").hide();
  49. $("#spare_money_id_link").hide();
  50. }
  51. });
  52. var is_spare="${map.is_spare}";
  53. if(is_spare==1){
  54. $("#spare_money_id_select").show();
  55. $("#spare_money_id_link").show();
  56. }
  57. var project_name="${map.project_name}";
  58. if(project_name !=null && project_name !=""){
  59. var project_id="${map.project_id}";
  60. if(project_id !=null && project_id !=""){
  61. $.ajax({
  62. url:"fmChooseProjectAction.do?method=getProjectMoney&project_id=${map.project_id}&time="+new Date().getTime(),
  63. type:"post",
  64. dataType:"json",
  65. success:function(data){
  66. var obj=data[0];
  67. call_project("${map.project_id}",obj.subtotal,obj.petty_cash);
  68. }
  69. });
  70. }
  71. }
  72. });
  73. var pay_grid=null;
  74. function f_initToGrid() {
  75. var columns=[
  76. { display: '摘要', name: 'digest', type: 'text',isSort: false,width:200,editor: { type: 'text' },
  77. totalSummary:
  78. {
  79. type: 'sum',
  80. render: function (e) {
  81. return "<div>" + ' 合计' + "</div>";
  82. }
  83. }},
  84. { display: '开支类别Id', name: 'subject_id',width:2, align: 'center',isSort:false,hide:true},
  85. { display: '开支类别',
  86. name: 'subject_name',
  87. align: 'center',
  88. width:150,
  89. editor: { type: 'select',
  90. ext : function (rowdata){
  91. var _subject_type="";
  92. if("${expendType}"=="1"){//付款申请
  93. _subject_type="BD_FKSQ";
  94. }else if("${expendType}"=="2"){//费用报销申请
  95. _subject_type="BD_FYBX";
  96. }else if("${expendType}"=="3"){//备用金申请
  97. _subject_type="BD_BYJSQ";
  98. }else if("${expendType}"=="4"){//其它往来付款
  99. _subject_type="BD_QTWLFK";
  100. }
  101. return {
  102. onBeforeOpen: chooseSubjectTree({grid_id : "pay_grid",subject_id : "subject_id",subject_name : "subject_name",subject_type:_subject_type})
  103. };
  104. }
  105. }
  106. },
  107. { display: '附单据(张)', name: 'invoice', type: 'int',isSort: false,width:150,editor:{type:"int"},
  108. totalSummary:
  109. {
  110. type: 'sum',
  111. render: function (e) {
  112. var sum = parseFloat(e.sum);
  113. return "<div>" + formatnumber(sum,0) + "</div>";
  114. }
  115. }
  116. }
  117. ];
  118. if("${map.payment_type}"=="2"){
  119. columns.push(
  120. { display: '金额(¥)', name: 'item_money', type: 'float',isSort: false,width:200,
  121. totalSummary:
  122. {
  123. type: 'sum',
  124. render: function (e) {
  125. var sum = parseFloat(e.sum);
  126. return "<div>" + formatnumber(sum,2) + "</div>";
  127. }
  128. }
  129. }
  130. );
  131. columns.push({ display: '备注', name: 'remark', type: 'text',isSort: false,width:200,editor: { type: 'text' }});
  132. columns.push({ display: '操作', width:150,render:function(item,rowindex){
  133. var h="";
  134. h += "<a href='javascript:open_pay()'>采购清单</a> ";
  135. return h;
  136. }});
  137. }else{
  138. columns.push(
  139. { display: '金额(¥)', name: 'item_money', type: 'float',isSort: false,width:200,editor: { type: 'float' },
  140. totalSummary:
  141. {
  142. type: 'sum',
  143. render: function (e) {
  144. var sum = parseFloat(e.sum);
  145. return "<div>" + formatnumber(sum,2) + "</div>";
  146. }
  147. }
  148. }
  149. );
  150. columns.push({ display: '备注', name: 'remark', type: 'text',isSort: false,width:200,editor: { type: 'text' }});
  151. columns.push({ display: '操作', width:150,render:function(item,rowindex){
  152. var h="";
  153. h += "<a href='javascript:cancelEdit(" + rowindex + ",1)'>删除</a> ";
  154. return h;
  155. }});
  156. }
  157. pay_grid = $("#pay_grid").ligerGrid({
  158. columns:columns ,
  159. url:"expenditureStatementAction.do?task=pay_detail_page&expend_sta_id=${map.universalid}&time="+new Date().getTime(),
  160. usePager: false,
  161. enabledEdit: true,
  162. clickToEdit:true,
  163. rownumbers:true,
  164. rowDraggable:true,
  165. width :'99%',
  166. height : '260'
  167. });
  168. }
  169. function cancelEdit(rowid,isDelete) {
  170. var row=pay_grid.getRow(rowid);
  171. row.item_money="0";
  172. pay_grid.deleteRow(rowid);
  173. }
  174. function beginEdit(rowid) {
  175. pay_grid.beginEdit(rowid);
  176. }
  177. function addRow(){
  178. pay_grid.addRow({
  179. digest:"",
  180. subject_id:"",
  181. subject_name:"",invoice:"0",item_money:"0",remark:""
  182. });
  183. }
  184. function submitForm(){
  185. pay_grid.endEdit();
  186. if(checkForm()){
  187. var detail_data=JSON.stringify(pay_grid.getData());
  188. if(detail_data=="[]"){ //任务状态为发起时,考核组要必选
  189. $.ligerDialog.warn('请选择付款申请详细信息!');
  190. return ;
  191. }
  192. var msg="";
  193. var total_money=0;
  194. $.each(pay_grid.getData(),function(index,obj){
  195. var subject_id=obj.subject_id;
  196. var invoice=obj.invoice;
  197. var item_money=obj.item_money;
  198. var html="第"+(parseInt(index)+1)+"行:";
  199. var content="";
  200. if((subject_id==null || subject_id=="") && subject_id !="0"){
  201. content+="开支类别不能为空;";
  202. }
  203. if((invoice==null || invoice=="" ) && invoice !="0"){
  204. content+="附单据不能为空;";
  205. }
  206. if((item_money==null || item_money=="") && item_money !="0"){
  207. content+="金额不能为空;";
  208. }else{
  209. total_money=total_money+parseFloat(item_money);
  210. }
  211. if(content !=""){
  212. html +=content;
  213. msg +=html+"<br/>";
  214. }
  215. });
  216. if(msg !=""){
  217. $.ligerDialog.error(msg);
  218. return ;
  219. }
  220. var is_spare=$("#is_spare").attr("checked");
  221. if(is_spare){
  222. var spare_money_number=$("#spare_money_number").val();
  223. if(spare_money_number==null || spare_money_number==""){
  224. $.ligerDialog.error("请选择备用金单号");
  225. return ;
  226. }
  227. }
  228. if(_money !=0){
  229. if(total_money>_money){
  230. $.ligerDialog.error("合计金额不得大于结余金额!");
  231. return ;
  232. }
  233. }
  234. if("${expendType}"==1 || "${expendType}"==4){
  235. do_file();
  236. }
  237. $("#detail_data").val(detail_data);
  238. formJs(submitAddPayment);
  239. }
  240. }
  241. function submitAddPayment(){
  242. $("#addPayment").submit();
  243. }
  244. function checkForm() {
  245. var rs=true;
  246. rs = $.validate({
  247. name : "receipt_account",
  248. model : [ {
  249. type : "require",
  250. msg : "收款户名不能为空!"
  251. }]
  252. });
  253. if (rs) {
  254. return true;
  255. }
  256. return false;
  257. }
  258. function do_file(){
  259. var files="";
  260. $.each($("[name=files]"),function(i,obj){
  261. if(files==""){
  262. files=$(obj).val();
  263. }else{
  264. if($(obj).val() !=""){
  265. files +=","+$(obj).val();
  266. }
  267. }
  268. });
  269. $("#doc_ids").val(files);
  270. }
  271. function call_project(project_id,subtotal,petty_cash){
  272. var total_money=0; //项目预算总金额或备用金总金额
  273. if("${expendType}"=="1" || "${expendType}"=="2"){//付款申请
  274. total_money=subtotal;
  275. }else if("${expendType}"=="3"){//备用金
  276. total_money=petty_cash;
  277. }
  278. if(project_id ==null || project_id==""){
  279. $("tr[id^='project_relation']").hide();
  280. $("#project_amount_value").html("");
  281. $("#alreay_expend_money_value").html("");
  282. $("#expend_surplusr_money_value").html("");
  283. $("#alreay_expend_money").val("");
  284. $("#expend_surplusr_money").val("");
  285. $("#spare_money_id").val("");
  286. $("#spare_money").val("");
  287. $("#spare_money_number").val("");
  288. if("${expendType}"==1 || "${expendType}"==2){
  289. $("#is_spare_tr").hide();
  290. }
  291. _money=0;
  292. return ;
  293. }
  294. $.ajax({
  295. type:"post",
  296. url:"expenditureStatementAction.do?task=query_project_money&expendType=${expendType}&project_id="+project_id+"&time="+new Date().getTime(),
  297. dataType:"json",
  298. success:function(data){
  299. $("tr[id^='project_relation']").show(); //项目付款信息
  300. var alreay_expend_money=0; //已支出金额
  301. if(data[0].total_money ){
  302. alreay_expend_money=parseInt(data[0].total_money); //已支出金额
  303. }
  304. var expend_surplusr_money=total_money-alreay_expend_money; //未支出金额
  305. _money=expend_surplusr_money;
  306. $("#project_amount_value").html(total_money);
  307. $("#alreay_expend_money_value").html(alreay_expend_money);
  308. $("#expend_surplusr_money_value").html(expend_surplusr_money);
  309. $("#alreay_expend_money").val(alreay_expend_money);
  310. $("#expend_surplusr_money").val(expend_surplusr_money);
  311. $("#spare_money_id").val("");
  312. $("#spare_money").val("");
  313. $("#spare_money_number").val("");
  314. if("${expendType}"==1 || "${expendType}"==2){
  315. $("#is_spare_tr").show();
  316. }
  317. },
  318. error:function(){
  319. $.ligerDialog.error("网络异常,请联系管理理员!");
  320. }
  321. });
  322. }
  323. /**
  324. * js过滤特殊字符
  325. * @param s
  326. * @returns {String}
  327. */
  328. function stripscriptback(s) {
  329. var pattern = new RegExp("[_]");
  330. var rs = "";
  331. for (var i = 0; i < s.length; i++) {
  332. rs = rs + s.substr(i, 1).replace(pattern, '&');
  333. }
  334. return rs;
  335. }
  336. //格式化小数点
  337. function formatnumber(value, num) {
  338. var a, b, c, i;
  339. a = value.toString();
  340. b = a.indexOf(".");
  341. c = a.length;
  342. if (num == 0) {
  343. if (b != -1) {
  344. a = a.substring(0, b);
  345. }
  346. } else {// 如果没有小数点
  347. if (b == -1) {
  348. a = a + ".";
  349. for (i = 1; i <= num; i++) {
  350. a = a + "0";
  351. }
  352. } else {// 有小数点,超出位数自动截取,否则补0
  353. a = a.substring(0, b + num + 1);
  354. for (i = c; i <= b + num; i++) {
  355. a = a + "0";
  356. }
  357. }
  358. }
  359. return a;
  360. }
  361. var purchase_grid;
  362. function f_initPurchaseGrid() {
  363. purchase_grid = $("#pay_div").ligerGrid({
  364. columns:
  365. [
  366. { display: '应付账款ID', name: 'account_pay_id', type: 'text',isSort: false, hide: true,width:5},
  367. { display: '产品ID', name: 'product_id', type: 'text',isSort: false, hide: true,width:5},
  368. { display: '供应商ID', name: 'supplier_id', type: 'text',isSort: false, hide: true,width:5},
  369. { display: '请购明细ID', name: 'request_detail_id', type: 'text',isSort: false, hide: true,width:5},
  370. { display: '项目采购清单ID', name: 'project_buy_id', type: 'text',isSort: false, hide: true,width:5},
  371. { display: '采购单ID', name: 'purchase_id',type:'text',isSort:false, hide: true,width:5},
  372. { display: '采购单明细ID', name: 'purchase_detail_id', type: 'text',isSort: false, hide: true,width:5},
  373. { display: '采购单号', name: 'purchase_number',type:'text',isSort:false,hide: true,width:5},
  374. { display: '存货编码', name: 'product_num',type:'text',isSort:false,width:100},
  375. { display: '存货名称', name: 'product_name',type:'text',isSort:false,width:100},
  376. { display: '规格型号', name: 'product_model_standard',type:'text',isSort:false,width:150},
  377. { display: '单位', name: 'product_unit_name',type:'text',isSort:false,width:60},
  378. { display: '单价', name: 'purchase_product_sell_price',type:'float',isSort:false,width:100},
  379. { display: '本次付款数', name: 'pay_num',type:'text',isSort:false,width:100},
  380. { display: '本次付款金额', name: 'pay_amount',type:'text',isSort:false,width:100
  381. }
  382. ],
  383. url:"expenditureStatementAction.do?task=paySubDetail&sta_id=${map.universalid}&time="+new Date().getTime(),
  384. width :'99.8%',
  385. usePager: false,
  386. height : '95%'
  387. });
  388. }
  389. function openSpare(){
  390. var project_id=$("#project_id").val();
  391. if(project_id =="" || project_id==null){
  392. $.ligerDialog.warn("请先选择项目!");
  393. return ;
  394. }
  395. var url="${pageContext.request.contextPath}/expenditureStatementAction.do?task=toChooseStatement&expendType=3&project_id="+project_id+"&spare_where=alllist";
  396. openODialog(url,"查看备用金历史记录");
  397. }
  398. function openPay(){
  399. var project_id=$("#project_id").val();
  400. if(project_id =="" || project_id==null){
  401. $.ligerDialog.warn("请先选择项目!");
  402. return ;
  403. }
  404. var url="${pageContext.request.contextPath}/expenditureStatementAction.do?task=toChooseStatement&expendType=1&project_id="+project_id+"&spare_where=alllist";
  405. oDialog = openTopDialog({
  406. height : $("body", window.top.document).height() - 150,
  407. width : $("body", window.top.document).width() - 650,
  408. url : url,
  409. showMax : false,
  410. showToggle : false,
  411. showMin : false,
  412. isResize : false,
  413. modal : false,
  414. title : "查看付款历史",
  415. allowClose : true
  416. });
  417. }
  418. function openODialog(owurl, name) {
  419. oDialog = openTopDialog({
  420. height : $("body", window.top.document).height() - 50,
  421. width : $("body", window.top.document).width() - 50,
  422. url : owurl,
  423. showMax : false,
  424. showToggle : false,
  425. showMin : false,
  426. isResize : false,
  427. modal : false,
  428. title : name,
  429. allowClose : true
  430. });
  431. }
  432. </script>
  433. </head>
  434. <body>
  435. <form id="addPayment" action="expenditureStatementAction.do?task=addPay" method="post">
  436. <input type="hidden" name="tabid" id="tabid" />
  437. <input type="hidden" name="fmodel" value="${fmodel.modelId }">
  438. <input type="hidden" name="tmodel" value="${tmodel.tmodelId }">
  439. <input type="hidden" name="flow_ins_id" value="${map.flow_ins_id }">
  440. <input type="hidden" name="universalid" value="${map.universalid }" />
  441. <input type="hidden" name="audit_status" value="${map.audit_status }" />
  442. <input type="hidden" name="expend_sta_number" value="${map.expend_sta_number }" />
  443. <input type="hidden" name="expendType" value="${expendType }" />
  444. <input type="hidden" name="expend_type" value="${expendType }" />
  445. <textarea id="detail_data" name="detail_data" style="width: 100%;display: none;"></textarea>
  446. <div id="title" class="form-button">
  447. <input id="btnSave" type="button" class="l-button" value="提交" onclick="submitForm()" ${flowOnOff=='off'? 'disabled="disabled"':'' } />
  448. <input type="button" value="关闭" class="l-button" onclick="closeWindow();"/>
  449. <c:if test="${flowOnOff=='off' }">
  450. <span style="color:red;">请先配置审核流程</span>
  451. </c:if>
  452. </div>
  453. <div class="container-layout" >
  454. <div class="forum-container" >
  455. <center>
  456. <table class="l-table-edit line">
  457. <c:choose>
  458. <c:when test="${expendType==1 }">
  459. <tr>
  460. <th colspan="4">付款申请单信息</th>
  461. </tr>
  462. <tr>
  463. <td class="l-table-edit-text" width="10%">项目名称:</td>
  464. <td class="l-table-edit-td" width="40%">
  465. <input type="hidden" id="project_id" name="project_id" value="${map.project_id }"/>
  466. <input type="text" id="project_name" name="project_name" value="${map.project_name }" style="width:180px;" />
  467. <c:if test="${isHidden=='show' && map.payment_type==1}">
  468. <input id="btn_suppliers" type="button" class="l-button" value="选择" onclick="chooseProject({project_id:'project_id',project_name:'project_name','okpress':call_project});" />
  469. </c:if>
  470. </td>
  471. <td class="l-table-edit-text" width="10%">付款单号:</td>
  472. <td class="l-table-edit-td" width="40%">
  473. ${map.expend_sta_number}
  474. </td>
  475. </tr>
  476. <tr>
  477. <td class="l-table-edit-text" width="10%">付款类型:</td>
  478. <td class="l-table-edit-td" width="40%">
  479. <!-- <select id="payment_type" name="payment_type" style="width:100px;"> -->
  480. <c:forEach items="${payment_type_list}" var="item">
  481. <%-- <option value="${item.dvalue }" ${map.payment_type==item.dvalue?"selected":"" }></option> --%>
  482. <c:if test="${map.payment_type==item.dvalue }">
  483. ${item.dname}
  484. <input type="hidden" id="payment_type" name="payment_type" value="${map.payment_type }" />
  485. </c:if>
  486. </c:forEach>
  487. <!-- </select> -->
  488. </td>
  489. <td class="l-table-edit-text" width="10%">是否到票:</td>
  490. <td class="l-table-edit-td" width="40%">
  491. <select id="is_bill" name="is_bill" style="width:100px;">
  492. <c:forEach items="${isBillList}" var="item">
  493. <option value="${item.dvalue }" ${map.is_bill==item.dvalue?"selected":"" }>${item.dname}</option>
  494. </c:forEach>
  495. </select>
  496. </td>
  497. </tr>
  498. </c:when>
  499. <c:when test="${expendType==2 }">
  500. <tr>
  501. <th colspan="4">费用报销信息</th>
  502. </tr>
  503. <tr>
  504. <td class="l-table-edit-text" width="10%">项目名称:</td>
  505. <td class="l-table-edit-td" width="40%">
  506. <input type="hidden" id="project_id" name="project_id" value="${map.project_id }"/>
  507. <input type="text" id="project_name" name="project_name" value="${map.project_name }" style="width:180px;" />
  508. <c:if test="${isHidden=='show' }">
  509. <input id="btn_suppliers" type="button" class="l-button" value="选择" onclick="chooseProject({project_id:'project_id',project_name:'project_name','okpress':call_project});" />
  510. </c:if>
  511. </td>
  512. <td class="l-table-edit-text" width="10%">费用报销单号:</td>
  513. <td class="l-table-edit-td" width="40%">
  514. ${map.expend_sta_number}
  515. </td>
  516. </tr>
  517. </c:when>
  518. <c:when test="${expendType==3 }">
  519. <tr>
  520. <th colspan="4">备用金信息</th>
  521. </tr>
  522. <tr>
  523. <td class="l-table-edit-text" width="10%">项目名称:</td>
  524. <td class="l-table-edit-td" width="40%">
  525. <input type="hidden" id="project_id" name="project_id" value="${map.project_id }"/>
  526. <input type="text" id="project_name" name="project_name" value="${map.project_name }" style="width:180px;" />
  527. <c:if test="${isHidden=='show' }">
  528. <input id="btn_suppliers" type="button" class="l-button" value="选择" onclick="chooseProject({project_id:'project_id',project_name:'project_name','okpress':call_project});" />
  529. </c:if>
  530. </td>
  531. <td class="l-table-edit-text" width="10%">备用金单号:</td>
  532. <td class="l-table-edit-td" width="40%">
  533. ${map.expend_sta_number}
  534. </td>
  535. </tr>
  536. </c:when>
  537. <c:when test="${expendType==4 }">
  538. <tr>
  539. <th colspan="4">其他往来付款信息</th>
  540. </tr>
  541. <tr>
  542. <td class="l-table-edit-text" width="10%">其它付款单号:</td>
  543. <td class="l-table-edit-td" width="90%" colspan="3">
  544. ${map.expend_sta_number}
  545. </td>
  546. </tr>
  547. </c:when>
  548. </c:choose>
  549. <tr>
  550. <td colspan="4" height="300">
  551. <!-- 明细 start -->
  552. <c:if test="${paymenttype==1 || paymenttype==null}">
  553. <div>
  554. <a class="l-button" style="width:100px;float:left; margin-left:10px; margin-top: 10px" onclick="addRow()">添加</a>
  555. </div>
  556. </c:if>
  557. <div class="l-clear"></div>
  558. <div id="pay_grid" style="margin: 0; padding: 0"></div><br />
  559. <div style="display:none;"></div>
  560. <!-- 明细 end -->
  561. </td>
  562. </tr>
  563. <c:if test="${expendType==1 || expendType==2 }">
  564. <tr id="is_spare_tr" style="display:none">
  565. <td class="l-table-edit-text" colspan="4">
  566. <span><input type="checkbox" name="is_spare" id="is_spare" value="1" ${map.is_spare==1?"checked='checked'":"" }/>是否冲账备用金</span>
  567. <span style="margin-left:80px;display:none" id="spare_money_id_select" >备用金单号:
  568. <input type="hidden" id="spare_money_id" name="spare_money_id" value="${map.spare_money_id }"/>
  569. <input type="text" id="spare_money_number" name="spare_money_number" value="${map.spare_money_number }" style="width:180px;" readonly="readonly"/>
  570. <input id="btn_suppliers" type="button" class="l-button" value="选择" onclick="chooseMoney({spare_money_number:'spare_money_number',spare_money_id:'spare_money_id',project_id:'project_id',spare_where:'alllist'});" />
  571. </span>
  572. <span style="margin-left:80px;display:none" id="spare_money_id_link"><a href="#" onclick="openSpare()">查看备用金历史</a></span>
  573. </tr>
  574. </c:if>
  575. <c:if test="${expendType==1 }">
  576. <tr id="project_relation" style="display:none">
  577. <td class="l-table-edit-text" colspan="3">
  578. <span id="project_amount_span" >预算总金额:<font id="project_amount_value">0</font></span>
  579. <span id="alreay_expend_money_span" style="margin-left:80px;">已付款金额:<font id="alreay_expend_money_value">${map.alreay_expend_money }</font></span>
  580. <span id="expend_surplusr_money_span" style="margin-left:80px;">付款结余金额:<font id="expend_surplusr_money_value">${map.expend_surplusr_money }</font></span>
  581. <span id="pay_history" style="margin-left:80px;"><a href="#" onclick="openPay();">查看付款历史</a></span>
  582. <input type="hidden" name="alreay_expend_money" id="alreay_expend_money" />
  583. <input type="hidden" name="expend_surplusr_money" id="expend_surplusr_money" />
  584. </td>
  585. </tr>
  586. </c:if>
  587. <c:if test="${expendType==2 }">
  588. <tr id="project_relation" style="display:none">
  589. <td class="l-table-edit-text" colspan="3">
  590. <span id="project_amount_span" >预算可领用金额:<font id="project_amount_value"></font></span>
  591. <span id="alreay_expend_money_span" style="margin-left:80px;">已领用金额:<font id="alreay_expend_money_value">${map.alreay_expend_money }</font></span>
  592. <span id="expend_surplusr_money_span" style="margin-left:80px;">预算结余金额:<font id="expend_surplusr_money_value">${map.expend_surplusr_money }</font></span>
  593. <span id="pay_history" style="margin-left:80px;"><a href="#" onclick="openPay();">查看付款历史</a></span>
  594. <input type="hidden" name="alreay_expend_money" id="alreay_expend_money" />
  595. <input type="hidden" name="expend_surplusr_money" id="expend_surplusr_money" />
  596. </td>
  597. </tr>
  598. </c:if>
  599. <c:if test="${expendType==3 }">
  600. <tr id="project_relation" style="display:none" >
  601. <td class="l-table-edit-text" width="10%">预算备用金总金额:</td>
  602. <td class="l-table-edit-td" width="40%">
  603. <span id="project_amount_value"></span>
  604. </td>
  605. <td class="l-table-edit-text" width="10%">备用金已领用金额:</td>
  606. <td class="l-table-edit-td" width="40%">
  607. <span id="alreay_expend_money_value"></span>
  608. <span id="pay_history_3" style="margin-left:150px;"><a href="#" onclick="openSpare()">查看备用金历史</a>
  609. </span>
  610. </td>
  611. </tr>
  612. <tr id="project_relation1" style="display:none" >
  613. <td class="l-table-edit-text" width="10%">备用金结余金额:</td>
  614. <td class="l-table-edit-td" width="40%">
  615. <span id="expend_surplusr_money_value"></span>
  616. <input type="hidden" name="alreay_expend_money" id="alreay_expend_money" />
  617. <input type="hidden" name="expend_surplusr_money" id="expend_surplusr_money" />
  618. </td>
  619. <td class="l-table-edit-text" width="10%">预计还款日期:</td>
  620. <td class="l-table-edit-td" width="40%">
  621. <input type="text" class="Wdate" name="return_date" id="return_date" value="${map.return_date }" onclick="WdatePicker({dateFmt:'yyyy-MM-dd'})">
  622. </td>
  623. </tr>
  624. </c:if>
  625. <%-- <c:if test="${expendType==1 || expendType==2 || expendType==3 || expendType==4 }"> --%>
  626. <tr>
  627. <td class="l-table-edit-text" width="10%">收款户名<FONT COLOR="red">*</FONT>:</td>
  628. <td class="l-table-edit-td" width="40%">
  629. <input type="text" id="receipt_account" name="receipt_account" maxlength="10" value="${map.receipt_account }" style="width:180px;" readonly="readonly" />
  630. <input type="button" class="l-button" value="选择" id="selectBankUser" onclick="selectAccountRec({account_name:'receipt_account',blank_name:'receipt_bank',blank_account:'receipt_bank_account'});"/>
  631. </td>
  632. <td class="l-table-edit-text" width="10%">开户银行<FONT COLOR="red">*</FONT>:</td>
  633. <td class="l-table-edit-td" width="40%">
  634. <input type="text" name="receipt_bank" id="receipt_bank" style="width:180px;" value="${map.receipt_bank }" maxlength="40" readonly="readonly" />
  635. </td>
  636. </tr>
  637. <tr>
  638. <td class="l-table-edit-text" width="10%">银行帐号<FONT COLOR="red">*</FONT>:</td>
  639. <td class="l-table-edit-td" width="90%" colspan="3">
  640. <input type="text" name="receipt_bank_account" id="receipt_bank_account" value="${map.receipt_bank_account }" style="width:180px;" maxlength="40" readonly="readonly" />
  641. </td>
  642. </tr>
  643. <%-- </c:if> --%>
  644. <c:if test="${expendType==1 || expendType==4 }">
  645. <tr>
  646. <td class="l-table-edit-text" width="10%">附件:</td>
  647. <td class="l-table-edit-td" width="90%" colspan="3">
  648. <input type="hidden" id="doc_ids" name="doc_ids" value="" style="width:180px;" readonly="readonly"/>
  649. <jsp:include page="/include/file.jsp">
  650. <jsp:param name="fieldName" value="files" />
  651. <jsp:param name="folder" value="fm/statement" />
  652. <jsp:param name="documentId" value="${map.doc_ids }" />
  653. <jsp:param name="size" value="30" />
  654. <jsp:param name="isView" value="1" />
  655. <jsp:param name="isDelFile" value="1" />
  656. <jsp:param name="definedCss" value="file-style" />
  657. </jsp:include>
  658. </td>
  659. </tr>
  660. </c:if>
  661. <tr>
  662. <td class="l-table-edit-text" width="10%">申请人:</td>
  663. <td class="l-table-edit-td" width="40%">
  664. ${map.create_user_name }
  665. </td>
  666. <td class="l-table-edit-text" width="10%">申请日期:</td>
  667. <td class="l-table-edit-td" width="40%">
  668. ${map.create_date }
  669. </td>
  670. </tr>
  671. </table>
  672. </center>
  673. <div class="l-clear"></div>
  674. <div id="pay_div" style="margin-top:0px;display:none"></div><br />
  675. <div style="display:none;"></div>
  676. </div>
  677. </div>
  678. <%@include file="/yw/eu/codeflow/workflow/workflow_start_process.jsp"%>
  679. </form>
  680. <%@ include file="/include/message.jsp"%>
  681. </body>
  682. </html>