activitiCostRequestHr-add.jsp 8.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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 src="webpage/cn/com/lzt/cost/cost_tools.js"></script>
  10. <script type="text/javascript" src="plug-in/tools/money.js"></script>
  11. <script type="text/javascript" src="webpage/cn/com/lzt/budget/data/js/budget_control.js"></script>
  12. <script type="text/javascript">
  13. //编写自定义JS代码
  14. function openDep(){
  15. selectUserDep('项目列表');
  16. }
  17. function openCostType(){
  18. selectCostType();
  19. }
  20. function setChnMoney(money){
  21. var chn = convertCurrency(money);
  22. $('#totalamountCHN').html(chn);
  23. }
  24. $(function(){
  25. $('#expectMoney').bind('input',function(){
  26. var $t = $(this);
  27. var v =$t.val().replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3');
  28. $t.val(v);
  29. setChnMoney(v)
  30. var fv = parseFloat(v);
  31. if(!isNaN(fv)){
  32. var leftValue=budgetValue.expectValue-budgetValue.actualValue-fv;
  33. budgetValue.leftValue= leftValue;
  34. if(leftValue<0) leftValue=0;
  35. leftValue=leftValue.toFixed(2);
  36. $('#leftValue').html(leftValue);
  37. }
  38. });
  39. setChnMoney($('#expectMoney').val());
  40. $('#budgetMonth').bind('change',getActualValue);
  41. $('#measureId').bind('change',getActualValue);
  42. getActualValue();
  43. })
  44. function getActualValue() {
  45. var yearMonth = $('#budgetMonth').val();
  46. var measureId = $('#measureId').val();
  47. if(!yearMonth || !measureId){
  48. return;
  49. }
  50. var departId = $('#departId').val();
  51. var busType = 'cost_request_hr';
  52. getExpectActualValue(busType,yearMonth,departId,measureId,function(expectValue,actualValue,leftValue){
  53. $('#actualValue').html(actualValue);
  54. $('#leftValue').html(leftValue);
  55. $('#expectMoney').trigger('input');
  56. });
  57. }
  58. </script>
  59. </head>
  60. <body>
  61. <%--处理回调--%>
  62. <c:set var="_callback">
  63. <c:choose>
  64. <c:when test="${in_process}">@Overridecallback</c:when>
  65. <c:otherwise>callback</c:otherwise>
  66. </c:choose>
  67. </c:set>
  68. <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="activitiCostRequestHrController.do?doAdd"
  69. callback="${_callback}" beforeSubmit="checkOverBudget">
  70. <input id="id" name="id" type="hidden" value="${entity.id }"/>
  71. <table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
  72. <c:if test="${in_process}">
  73. <tr>
  74. <td align="right">
  75. <label class="Validform_label">
  76. 申请人:
  77. </label>
  78. </td>
  79. <td class="value">
  80. ${entity.realName}
  81. </td>
  82. </tr>
  83. </c:if>
  84. <tr>
  85. <td align="right">
  86. <label class="Validform_label">
  87. 所属部门:
  88. </label>
  89. </td>
  90. <td class="value">
  91. <input type="hidden" name="departId" id="departId" value="${empty entity.departId?param.departId:entity.departId}"/>
  92. <input type="hidden" name="depName" id="depName" value="${empty entity.depName?param.depName:entity.depName}"/>
  93. ${empty entity.depName?param.depName:entity.depName}
  94. <%--<c:if test="${(empty param.load && !in_process)|| (in_process&& param.flag==1)}">
  95. <a href="javascript:void(0)" class="easyui-linkbutton" plain="true" icon="icon-select" id="dutiesSearch" onclick="openDep()">选择</a>
  96. </c:if>--%>
  97. <span class="Validform_checktip"></span>
  98. <label class="Validform_label" style="display: none;">所属部门</label>
  99. </td>
  100. </tr>
  101. <tr>
  102. <td align="right">
  103. <label class="Validform_label">
  104. <span color="red" class="requiredIcon">*</span>计入预算月份:
  105. </label>
  106. </td>
  107. <td class="value">
  108. <input id="budgetMonth" name="budgetMonth" type="text" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM',onpicked:getActualValue})" value="${entity.budgetMonth}" datatype="*"/>
  109. <span class="Validform_checktip"></span>
  110. <label class="Validform_label" style="display: none;">计入预算月份</label>
  111. </td>
  112. </tr>
  113. <tr>
  114. <td align="right">
  115. <label class="Validform_label">
  116. <span color="red" class="requiredIcon">*</span>预算指标:
  117. </label>
  118. </td>
  119. <td class="value">
  120. <%--
  121. A01A02A01 内部培训 A01A02A02 外部培训 A01A04A01 经济补偿金 A01A04A02 医疗费 A01A04A03 一次性工伤就业补助金 A01A12 劳动保护费
  122. A01A01A05 福利费
  123. --%>
  124. <t:dictSelect field="measureId" id="measureId" type="list" dictTable="t_b_budget_measure" dictField="id" dictText="name" defaultVal="${entity.measureId}" datatype="*"
  125. dictCondition=" where code ='A01A02A01' or code ='A01A02A02' or code='A01A04A01' or code ='A01A04A02' or code='A01A04A03'
  126. or code = 'A01A01A05A01' or code = 'A01A01A05A02' or code = 'A01A01A05A03' order by code" />
  127. <span class="Validform_checktip"></span>
  128. <label class="Validform_label" style="display: none;">预算指标</label>
  129. </td>
  130. </tr>
  131. <tr>
  132. <td align="right">
  133. <label class="Validform_label">
  134. 已占用预算额度:
  135. </label>
  136. </td>
  137. <td class="value">
  138. <span id="actualValue"></span>
  139. </td>
  140. </tr>
  141. <tr>
  142. <td align="right">
  143. <label class="Validform_label">
  144. 剩余预算额度:
  145. </label>
  146. </td>
  147. <td class="value">
  148. <span id="leftValue"></span>
  149. </td>
  150. </tr>
  151. <tr>
  152. <td align="right">
  153. <label class="Validform_label">
  154. <span color="red" class="requiredIcon">*</span>预计费用:
  155. </label>
  156. </td>
  157. <td class="value">
  158. <input id="expectMoney" name="expectMoney" type="text" style="width: 150px" class="inputxt"
  159. datatype="d,fix2" value="${entity.expectMoney}"/>
  160. <label id="totalamountCHN" style="font-size: 18px"></label>
  161. <span class="Validform_checktip"></span>
  162. <label class="Validform_label" style="display: none;">预计费用</label>
  163. </td>
  164. </tr>
  165. <tr>
  166. <td align="right">
  167. <label class="Validform_label">
  168. <span color="red" class="requiredIcon">*</span>用途摘要:
  169. </label>
  170. </td>
  171. <td class="value">
  172. <input id="summary" name="summary" type="text" style="width: 250px" class="inputxt" datatype="s1-20" value="${entity.summary}"/>
  173. <span class="Validform_checktip"></span>
  174. <label class="Validform_label" style="display: none;">用途摘要</label>
  175. </td>
  176. </tr>
  177. <tr>
  178. <td align="right">
  179. <label class="Validform_label">
  180. 备注:
  181. </label>
  182. </td>
  183. <td class="value" >
  184. <textarea style="width:400px;height: 150px" class="inputxt" rows="6" id="remark" name="remark" >${entity.remark}</textarea>
  185. <span class="Validform_checktip"></span>
  186. <label class="Validform_label" style="display: none;">备注</label>
  187. </td>
  188. </tr>
  189. <c:if test="${entity.bpmStatus!='3'}"> <%--审批通过后不可见--%>
  190. <tr>
  191. <td align="right">
  192. <label class="Validform_label">
  193. 特殊说明:
  194. </label>
  195. </td>
  196. <td class="value" >
  197. <input id="special" name="special" type="text" style="width: 250px" class="inputxt" value="${entity.special}"/>
  198. <span class="Validform_checktip"></span>
  199. <label class="Validform_label" style="display: none;">备注</label>
  200. </td>
  201. </tr>
  202. </c:if>
  203. <tr>
  204. <td align="right">
  205. <label class="Validform_label">
  206. 附件:
  207. </label>
  208. </td>
  209. <td class="value">
  210. <t:webUploader auto="true" busiId="${entity.id}" readOnly="${param.load=='detail' || in_process}"
  211. busiTable="t_b_activiti_cost_request_hr"
  212. bizType="attachment"
  213. extensions="png,jpg,jpeg,bmp"
  214. name="attachment" duplicate="true"
  215. nullMsg="附件不可为空"></t:webUploader>
  216. <span class="Validform_checktip Validform_right" style="display: none;">文件已上传</span>
  217. </td>
  218. </tr>
  219. </table>
  220. <table style="width: 100%">
  221. <tr>
  222. <td style="text-align:center;">
  223. <%@include file="/webpage/cn/com/lzt/useractiviti/view_submit_buttons.jsp"%>
  224. </td>
  225. </tr>
  226. </table>
  227. </t:formvalid>
  228. </body>