contractPayruleList.jsp 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <script type="text/javascript">
  4. $('#addContractPayruleBtn').linkbutton({
  5. iconCls: 'icon-add'
  6. });
  7. $('#delContractPayruleBtn').linkbutton({
  8. iconCls: 'icon-remove'
  9. });
  10. $('#addContractPayruleBtn').bind('click', function(){
  11. var tr = $("#add_contractPayrule_table_template tr").clone();
  12. $("#add_contractPayrule_table").append(tr);
  13. resetTrNum('add_contractPayrule_table');
  14. return false;
  15. });
  16. $('#delContractPayruleBtn').bind('click', function(){
  17. $("#add_contractPayrule_table").find("input:checked").parent().parent().remove();
  18. resetTrNum('add_contractPayrule_table');
  19. return false;
  20. });
  21. $(document).ready(function(){
  22. $(".datagrid-toolbar").parent().css("width","auto");
  23. if(location.href.indexOf("load=detail")!=-1 || ($("#viewFlag").val() != null && $("#viewFlag").val() == '1')){
  24. $(":input").attr("disabled","true");
  25. $(".datagrid-toolbar").hide();
  26. }
  27. resetTrNum('add_contractPayrule_table');
  28. //处理select选中
  29. $('#add_contractPayrule_table select[name$="paytype"]').each(function(){
  30. var options = $('select[name="contractPayruleList[#index#].paytype"]').find('option').clone();
  31. var t = $(this);
  32. var defaultVal = t.attr('defaultVal');
  33. t.append(options);
  34. t.val(defaultVal);
  35. });
  36. });
  37. </script>
  38. <div style="padding: 3px; height: 25px;width:auto;" class="datagrid-toolbar">
  39. <a id="addContractPayruleBtn" href="#">添加</a> <a id="delContractPayruleBtn" href="#">删除</a>
  40. </div>
  41. <table border="0" cellpadding="2" cellspacing="0" id="contractPayrule_table">
  42. <tr bgcolor="#E6E6E6">
  43. <td align="center" bgcolor="#EEEEEE" style="width: 25px;">序号</td>
  44. <td align="center" bgcolor="#EEEEEE" style="width: 25px;">操作</td>
  45. <td align="left" bgcolor="#EEEEEE" style="width: 126px;">
  46. 支付期间
  47. </td>
  48. <td align="left" bgcolor="#EEEEEE" style="width: 126px;">
  49. 金额(元)
  50. </td>
  51. <td align="left" bgcolor="#EEEEEE" style="width: 126px;">
  52. 支付比例(%)
  53. </td>
  54. <td align="left" bgcolor="#EEEEEE" style="width: 126px;">
  55. 支付类型
  56. </td>
  57. <td align="left" bgcolor="#EEEEEE" style="width: 126px;">
  58. 备注
  59. </td>
  60. </tr>
  61. <tbody id="add_contractPayrule_table">
  62. <%-- <c:if test="${fn:length(contractPayruleList) <= 0 }">
  63. <tr>
  64. <td align="center"><div style="width: 25px;" name="xh">1</div></td>
  65. <td align="center"><input style="width:20px;" type="checkbox" name="ck"/></td>
  66. <input name="contractPayruleList[0].id" type="hidden"/>
  67. <input name="contractPayruleList[0].createName" type="hidden"/>
  68. <input name="contractPayruleList[0].createBy" type="hidden"/>
  69. <input name="contractPayruleList[0].createDate" type="hidden"/>
  70. <input name="contractPayruleList[0].updateName" type="hidden"/>
  71. <input name="contractPayruleList[0].updateBy" type="hidden"/>
  72. <input name="contractPayruleList[0].updateDate" type="hidden"/>
  73. <input name="contractPayruleList[0].bpmStatus" type="hidden"/>
  74. <input name="contractPayruleList[0].contractid" type="hidden"/>
  75. <td align="left">
  76. <input name="contractPayruleList[0].payperiod" maxlength="32" type="text" class="inputxt" style="width:120px;" ignore="ignore" >
  77. <label class="Validform_label" style="display: none;">支付期间</label>
  78. </td>
  79. <td align="left">
  80. <input name="contractPayruleList[0].amount" maxlength="32" type="text" class="inputxt" style="width:120px;" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" onKeyUp="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')" ignore="ignore" >
  81. <label class="Validform_label" style="display: none;">金额</label>
  82. </td>
  83. <td align="left">
  84. <input name="contractPayruleList[0].percent" maxlength="32" type="text" class="inputxt" style="width:120px;" readonly="readonly" datatype="/^[0-9]+([.]{1}[0-9]+){0,1}$/" onKeyUp="this.value=this.value.replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')" ignore="ignore" >
  85. <label class="Validform_label" style="display: none;" >支付比例</label>
  86. </td>
  87. <td align="left">
  88. <t:dictSelect field="contractPayruleList[0].paytype" type="list" extendJson="{class:'form-control',style:'width:120px'}"
  89. typeGroupCode="paytype" hasLabel="false" title="支付类型" datatype="*" defaultVal="transfer"></t:dictSelect>
  90. <!-- <input name="contractPayruleList[0].paytype" maxlength="32" type="text" class="inputxt" style="width:120px;" ignore="ignore" > -->
  91. <label class="Validform_label" style="display: none;">支付类型</label>
  92. </td>
  93. <td align="left">
  94. <input name="contractPayruleList[0].remark" maxlength="256" type="text" class="inputxt" style="width:120px;" ignore="ignore" >
  95. <label class="Validform_label" style="display: none;">备注</label>
  96. </td>
  97. </tr>
  98. </c:if> --%>
  99. <c:if test="${fn:length(contractPayruleList) > 0 }">
  100. <c:forEach items="${contractPayruleList}" var="poVal" varStatus="stuts">
  101. <tr>
  102. <td align="center"><div style="width: 25px;" name="xh">${stuts.index+1 }</div></td>
  103. <td align="center"><input style="width:20px;" type="checkbox" name="ck" /></td>
  104. <input name="contractPayruleList[${stuts.index }].id" type="hidden" value="${poVal.id }"/>
  105. <input name="contractPayruleList[${stuts.index }].createName" type="hidden" value="${poVal.createName }"/>
  106. <input name="contractPayruleList[${stuts.index }].createBy" type="hidden" value="${poVal.createBy }"/>
  107. <input name="contractPayruleList[${stuts.index }].createDate" type="hidden" value="${poVal.createDate }"/>
  108. <input name="contractPayruleList[${stuts.index }].updateName" type="hidden" value="${poVal.updateName }"/>
  109. <input name="contractPayruleList[${stuts.index }].updateBy" type="hidden" value="${poVal.updateBy }"/>
  110. <input name="contractPayruleList[${stuts.index }].updateDate" type="hidden" value="${poVal.updateDate }"/>
  111. <input name="contractPayruleList[${stuts.index }].bpmStatus" type="hidden" value="${poVal.bpmStatus }"/>
  112. <input name="contractPayruleList[${stuts.index }].contractid" type="hidden" value="${poVal.contractid }"/>
  113. <td align="left">
  114. <input name="contractPayruleList[${stuts.index }].payperiod" maxlength="32" type="text" class="inputxt" style="width:120px;" ignore="ignore" value="${poVal.payperiod }"/>
  115. <label class="Validform_label" style="display: none;">支付期间</label>
  116. </td>
  117. <td align="left">
  118. <input name="contractPayruleList[${stuts.index }].amount" maxlength="32" type="text" class="inputxt" style="width:120px;" datatype="/^(-?\d+)(\.\d+)?$/" ignore="ignore" value="${poVal.amount }"/>
  119. <label class="Validform_label" style="display: none;">金额</label>
  120. </td>
  121. <td align="left">
  122. <input name="contractPayruleList[${stuts.index }].percent" maxlength="32" type="text" class="inputxt" style="width:120px;" readonly="readonly" datatype="/^(-?\d+)(\.\d+)?$/" ignore="ignore" value="${poVal.percent }"/>
  123. <label class="Validform_label" style="display: none;">支付比例</label>
  124. </td>
  125. <td align="left">
  126. <%--<t:dictSelect field="contractPayruleList[${stuts.index }].paytype" type="list" extendJson="{class:'form-control',style:'width:120px'}"--%>
  127. <%--typeGroupCode="paytype" defaultVal="${poVal.paytype}" hasLabel="false" title="支付类型" datatype="*"></t:dictSelect>--%>
  128. <select name="contractPayruleList[${stuts.index }].paytype" class="form-control" style="width:120px" datatype="*" defaultVal="${poVal.paytype}">
  129. </select>
  130. <label class="Validform_label" style="display: none;">支付类型</label>
  131. </td>
  132. <td align="left">
  133. <input name="contractPayruleList[${stuts.index }].remark" maxlength="256" type="text" class="inputxt" style="width:120px;" ignore="ignore" value="${poVal.remark }"/>
  134. <label class="Validform_label" style="display: none;">备注</label>
  135. </td>
  136. </tr>
  137. </c:forEach>
  138. </c:if>
  139. </tbody>
  140. </table>