budgetAdjust-add.jsp 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  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. <style>
  8. .ui-button {
  9. display: inline-block;
  10. padding: 2px 2px;
  11. margin-bottom: 0;
  12. font-size: 8px;
  13. font-weight: normal;
  14. line-height: 1.42857143;
  15. text-align: center;
  16. white-space: nowrap;
  17. vertical-align: middle;
  18. -ms-touch-action: manipulation;
  19. touch-action: manipulation;
  20. cursor: pointer;
  21. -webkit-user-select: none;
  22. -moz-user-select: none;
  23. -ms-user-select: none;
  24. user-select: none;
  25. background-image: none;
  26. border: 1px solid transparent;
  27. border-radius: 4px;
  28. }
  29. </style>
  30. <t:base type="jquery,easyui,tools,DatePicker,autocomplete"></t:base>
  31. <script src="webpage/cn/com/lzt/useractiviti/select_user_tools.js"></script>
  32. <script src="${webBasePath}/webpage/cn/com/lzt/useractiviti/detail_tools.js"></script>
  33. <script src="webpage/cn/com/lzt/budget/data/js/budget_tools.js?v=1" type="text/javascript"></script>
  34. <script type="text/javascript">
  35. $(document).ready(function(){
  36. $('#tt').tabs({
  37. onSelect:function(title){
  38. changeTabHeight();
  39. }
  40. });
  41. $(".tabs-wrap").css('width','100%');
  42. $.Datatype.double=/^(-?\d*\.)?\d+$/;
  43. });
  44. function changeTabHeight(){
  45. var height =window.top.document.body.offsetHeight;
  46. height = height -181.3 - 36 - 100 -4;//去掉底部输入框table高度、title高度、弹出框小于后台页面高度、文本格式高度
  47. $('#tt .panel-body').css('width','auto').css('height',height+'px');
  48. }
  49. function openSelectPeriodDetail(){
  50. var now = new Date();
  51. selectPeriodDetail(now.getFullYear(),function(obj){
  52. $('#periodDetailId').val(obj.periodDetailId);
  53. $('#periodDetailName').val(obj.periodDetailName);
  54. });
  55. }
  56. function beforeSubmit(){
  57. var entityNameArray = new Array();
  58. var entityIdArray = new Array();
  59. $('#add_budgetAdjustDetail_table input[name$="entityName"]').each(function(){
  60. entityNameArray.push($(this).val());
  61. });
  62. $('#add_budgetAdjustDetail_table input[name$="entityId"]').each(function(){
  63. entityIdArray.push($(this).val());
  64. });
  65. $('#entityIds').val(entityIdArray.join(','));
  66. $('#entityNames').val(entityNameArray.join(','));
  67. var err = false;
  68. $('#add_budgetAdjustDetail_table input[name$="measureValue"]').each(function(){
  69. var t=$(this);
  70. if(!t.val()){
  71. alerLayerTip('无配置预算');
  72. err=true;
  73. }
  74. });
  75. if(err){
  76. return false;
  77. }
  78. return true;
  79. }
  80. </script>
  81. </head>
  82. <body style="overflow-x: hidden;">
  83. <%--处理回调--%>
  84. <c:set var="_callback">
  85. <c:choose>
  86. <c:when test="${in_process}">@Overridecallback</c:when>
  87. <c:otherwise>callback</c:otherwise>
  88. </c:choose>
  89. </c:set>
  90. <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" tiptype="1" action="budgetAdjustController.do?doAdd"
  91. callback="${_callback}" tipSweep="true" beforeSubmit="beforeSubmit">
  92. <input id="id" name="id" type="hidden" value="${entity.id }"/>
  93. <input id="entityIds" name="entityIds" type="hidden" value="${entity.entityIds }"/>
  94. <input id="entityNames" name="entityNames" type="hidden" value="${entity.entityNames }"/>
  95. <t:tabs id="tt" iframe="false" tabPosition="top" fit="false">
  96. <t:tab href="budgetAdjustController.do?budgetAdjustDetailList&id=${entity.id}" icon="icon-search" title="预算调整详情" id="budgetAdjustDetail"></t:tab>
  97. </t:tabs>
  98. <table cellpadding="0" cellspacing="1" class="formtable">
  99. <input id="totalMoney" name="totalMoney" type="hidden" />
  100. <tr>
  101. <td align="right">
  102. <label class="Validform_label">预算周期:</label>
  103. </td>
  104. <td class="value">
  105. <input id="periodDetailId" name="periodDetailId" type="hidden" datatype="*" nullmsg="请选择预算周期" value="${empty entity.periodDetailId?currentYearPeriodDetail.id:entity.periodDetailId}"/>
  106. <input id="periodDetailName" name="periodDetailName" type="text" style="width: 150px" class="inputxt" readonly="readonly" onclick="openSelectPeriodDetail()"
  107. value="${empty entity.periodDetailName?currentYearPeriodDetail.name: entity.periodDetailName}"/>
  108. <span class="Validform_checktip"></span>
  109. <label class="Validform_label" style="display: none;">预算周期</label>
  110. </td>
  111. </tr>
  112. </table>
  113. <table style="width: 100%">
  114. <tr>
  115. <td style="text-align:center;">
  116. <%@include file="/webpage/cn/com/lzt/useractiviti/view_submit_buttons.jsp"%>
  117. </td>
  118. </tr>
  119. </table>
  120. </t:formvalid>
  121. <!-- 添加 附表明细 模版 -->
  122. <table style="display:none">
  123. <tbody id="add_budgetAdjustDetail_table_template">
  124. <tr>
  125. <td align="center"><div style="width: 25px;" name="xh"></div></td>
  126. <td align="center"><input style="width:20px;" type="checkbox" name="ck"/></td>
  127. <td align="left">
  128. <input name="budgetAdjustDetailList[#index#].entityId" type="hidden" datatype="*" />
  129. <input name="budgetAdjustDetailList[#index#].entityName" maxlength="255" type="text" class="inputxt" style="width:120px;" ignore="ignore" />
  130. <label class="Validform_label" style="display: none;">预算主体</label>
  131. </td>
  132. <td align="left">
  133. <input name="budgetAdjustDetailList[#index#].measureId" type="hidden" datatype="*" />
  134. <input name="budgetAdjustDetailList[#index#].measureName" maxlength="255" type="text" class="inputxt" style="width:120px;" ignore="ignore" />
  135. <label class="Validform_label" style="display: none;">预算指标</label>
  136. </td>
  137. <td align="left">
  138. <input name="budgetAdjustDetailList[#index#].measureValue" maxlength="32" type="text" class="inputxt" style="width:120px;" ignore="ignore" readonly="readonly"/>
  139. <label class="Validform_label" style="display: none;">已配置预算</label>
  140. </td>
  141. <td align="left">
  142. <input name="budgetAdjustDetailList[#index#].suggestMoney" maxlength="32" type="text" class="inputxt" style="width:120px;" datatype="double" />
  143. <label class="Validform_label" style="display: none;">建议增加金额</label>
  144. </td>
  145. <td align="left">
  146. <input name="budgetAdjustDetailList[#index#].afterSuggestValue" maxlength="32" type="text" class="inputxt" style="width:120px;" ignore="ignore" readonly="readonly" />
  147. <label class="Validform_label" style="display: none;">调整后预算</label>
  148. </td>
  149. <td align="left">
  150. <input name="budgetAdjustDetailList[#index#].reason" maxlength="500" type="text" class="inputxt" style="width:500px;" datatype="*" />
  151. <label class="Validform_label" style="display: none;">调整理由</label>
  152. </td>
  153. </tr>
  154. </tbody>
  155. </table>
  156. </body>
  157. <script src = "webpage/cn/com/lzt/budget/adjust/budgetAdjust.js"></script>