pay_add.jsp 29 KB

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