tBOvertimeBudget-add.jsp 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/context/mytags.jsp"%>
  3. <!DOCTYPE html>
  4. <html>
  5. <head>
  6. <title>加班预算</title>
  7. <t:base type="jquery,easyui,tools,DatePicker"></t:base>
  8. <script src="webpage/cn/com/lzt/useractiviti/select_user_tools.js"></script>
  9. <script type="text/javascript">
  10. //编写自定义JS代码
  11. </script>
  12. </head>
  13. <body>
  14. <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="tBOvertimeBudgetController.do?doAdd" tiptype="1" >
  15. <table cellpadding="0" cellspacing="1" class="formtable">
  16. <tr bgcolor="#E6E6E6">
  17. <td align="left" bgcolor="#EEEEEE">类型</td>
  18. <c:forEach begin="1" end="12" var="month">
  19. <td align="left" bgcolor="#EEEEEE" >${month}月预算(元)</td>
  20. </c:forEach>
  21. </tr>
  22. <c:forEach items="${typeList}" var="type" varStatus="typeStatus">
  23. <c:set var="entity" value="${yearDataMap[type.typecode]}"/>
  24. <tr>
  25. <td>
  26. <input type="hidden" name="entityList[${typeStatus.index}].id" value="${entity.id}"/>
  27. <input type="hidden" name="entityList[${typeStatus.index}].budgetType" value="${type.typecode}"/>
  28. ${type.typename}
  29. </td>
  30. <c:forEach begin="1" end="12" var="monthNum">
  31. <td class="value">
  32. <c:set var="column" value="month${monthNum}"/>
  33. <input name="entityList[${typeStatus.index}].month${monthNum}" type="text" style="width: 85px; " class="inputxt"
  34. datatype="d,fix2" value="${empty entity[column]?"0.00":entity[column]}" nullmsg="请填写${monthNum}月${type.typename}"/>
  35. </td>
  36. </c:forEach>
  37. </tr>
  38. </c:forEach>
  39. </table>
  40. <table cellpadding="0" cellspacing="1" class="formtable">
  41. <tr>
  42. <td align="right">
  43. <label class="Validform_label">
  44. 所属部门:
  45. </label>
  46. </td>
  47. <td class="value" style="width:300px;">
  48. <input id="depName" name="entityList[0].depName" type="text" readonly="readonly" class="inputxt"
  49. value="${firstEntity.depName}"/>
  50. <input id="departId" name="entityList[0].departId" type="hidden" value="${firstEntity.departId}" datatype="*" nullmsg="请选择所属部门"/>
  51. <c:if test="${empty param.load}">
  52. <a href="#" class="easyui-linkbutton" plain="true" icon="icon-select" id="departSearch"
  53. onclick="openDepartmentSelect()">选择</a>
  54. </c:if>
  55. </td>
  56. <td align="right">
  57. <label class="Validform_label">
  58. 加班年度:
  59. </label>
  60. </td>
  61. <td class="value">
  62. <input id="years" name="entityList[0].years" type="text" style="width: 150px" datatype="*" ignore="checked" readonly="readonly"
  63. value="${firstEntity == null? year:firstEntity.years}"
  64. <c:if test="${empty firstEntity.years}">onClick="WdatePicker({dateFmt:'yyyy'})" class="Wdate"</c:if>
  65. />
  66. <span class="Validform_checktip"></span>
  67. <label class="Validform_label" style="display: none;">加班年度</label>
  68. </td>
  69. </tr>
  70. </table>
  71. </t:formvalid>
  72. </body>
  73. <script src = "webpage/cn/com/lzt/overtimebudget/tBOvertimeBudget.js"></script>
  74. <script>
  75. function openDepartmentSelect() {
  76. var departId = $("#departId").val();
  77. $.dialog({
  78. content: 'url:dialogDealController.do?projectDepartTableAll&ids='+departId ,
  79. zIndex: getzIndex(),
  80. title: '项目名称列表',
  81. lock: true,
  82. width: '600px',
  83. height: '400px',
  84. opacity: 0.4,
  85. button: [
  86. {
  87. name: '确定', callback: function () {
  88. var iframe = this.iframe.contentWindow;
  89. if (iframe.getReason().length > 0) {
  90. var strData = eval(iframe.getReason());
  91. for (var key in strData[0]) {
  92. if (key == "strPId") {
  93. $("#departId").val(strData[0][key]);
  94. } else if (key == "strDepartName") {
  95. $("#depName").val(strData[0][key]);
  96. }
  97. }
  98. }
  99. }, focus: true
  100. },
  101. {
  102. name: '取消', callback: function () {
  103. $('#depName').val('');
  104. $('#departId').val('');
  105. }
  106. }
  107. ]
  108. }).zindex();
  109. }
  110. function callbackClean() {
  111. $('#depName').val('');
  112. $('#departId').val('');
  113. }
  114. </script>