activitiCostRequestPu-add.jsp 8.0 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').html(leftValue);
  36. }
  37. });
  38. setChnMoney($('#expectMoney').val());
  39. $('#budgetMonth').bind('change',getActualValue);
  40. $('#measureId').bind('change',getActualValue);
  41. getActualValue();
  42. })
  43. function getActualValue() {
  44. var yearMonth = $('#budgetMonth').val();
  45. var measureId = $('#measureId').val();
  46. if(!yearMonth || !measureId){
  47. return;
  48. }
  49. var departId = $('#departId').val();
  50. var busType = 'cost_request_pu';
  51. getExpectActualValue(busType,yearMonth,departId,measureId,function(expectValue,actualValue,leftValue){
  52. $('#actualValue').html(actualValue);
  53. $('#leftValue').html(leftValue);
  54. $('#expectMoney').trigger('input');
  55. });
  56. }
  57. </script>
  58. </head>
  59. <body>
  60. <%--处理回调--%>
  61. <c:set var="_callback">
  62. <c:choose>
  63. <c:when test="${in_process}">@Overridecallback</c:when>
  64. <c:otherwise>callback</c:otherwise>
  65. </c:choose>
  66. </c:set>
  67. <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="activitiCostRequestPuController.do?doAdd"
  68. callback="${_callback}" beforeSubmit="checkOverBudget">
  69. <input id="id" name="id" type="hidden" value="${entity.id }"/>
  70. <table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
  71. <c:if test="${in_process}">
  72. <tr>
  73. <td align="right">
  74. <label class="Validform_label">
  75. 申请人:
  76. </label>
  77. </td>
  78. <td class="value">
  79. ${entity.realName}
  80. </td>
  81. </tr>
  82. </c:if>
  83. <tr>
  84. <td align="right">
  85. <label class="Validform_label">
  86. 所属部门:
  87. </label>
  88. </td>
  89. <td class="value">
  90. <input type="hidden" name="departId" id="departId" value="${empty entity.departId?param.departId:entity.departId}"/>
  91. <input type="hidden" name="depName" id="depName" value="${empty entity.depName?param.depName:entity.depName}"/>
  92. ${empty entity.depName?param.depName:entity.depName}
  93. <%--<c:if test="${(empty param.load && !in_process)|| (in_process&& param.flag==1)}">
  94. <a href="javascript:void(0)" class="easyui-linkbutton" plain="true" icon="icon-select" id="dutiesSearch" onclick="openDep()">选择</a>
  95. </c:if>--%>
  96. <span class="Validform_checktip"></span>
  97. <label class="Validform_label" style="display: none;">所属部门</label>
  98. </td>
  99. </tr>
  100. <tr>
  101. <td align="right">
  102. <label class="Validform_label">
  103. <span color="red" class="requiredIcon">*</span>计入预算月份:
  104. </label>
  105. </td>
  106. <td class="value">
  107. <input id="budgetMonth" name="budgetMonth" type="text" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM',onpicked:getActualValue})" value="${entity.budgetMonth}" datatype="*"/>
  108. <span class="Validform_checktip"></span>
  109. <label class="Validform_label" style="display: none;">计入预算月份</label>
  110. </td>
  111. </tr>
  112. <tr>
  113. <td align="right">
  114. <label class="Validform_label">
  115. <span color="red" class="requiredIcon">*</span>预算指标:
  116. </label>
  117. </td>
  118. <td class="value">
  119. <%--
  120. A01A07 宿舍租赁及附加 A01A08 汽车费用
  121. --%>
  122. <t:dictSelect field="measureId" id="measureId" type="list" dictTable="t_b_budget_measure" dictField="id" dictText="name" defaultVal="${entity.measureId}" datatype="*"
  123. dictCondition=" where code ='A01A07' or code like 'A01A08_%' order by code" />
  124. <span class="Validform_checktip"></span>
  125. <label class="Validform_label" style="display: none;">预算指标</label>
  126. </td>
  127. </tr>
  128. <tr>
  129. <td align="right">
  130. <label class="Validform_label">
  131. 已占用预算额度:
  132. </label>
  133. </td>
  134. <td class="value">
  135. <span id="actualValue"></span>
  136. </td>
  137. </tr>
  138. <tr>
  139. <td align="right">
  140. <label class="Validform_label">
  141. 剩余预算额度:
  142. </label>
  143. </td>
  144. <td class="value">
  145. <span id="leftValue"></span>
  146. </td>
  147. </tr>
  148. <tr>
  149. <td align="right">
  150. <label class="Validform_label">
  151. <span color="red" class="requiredIcon">*</span>预计费用:
  152. </label>
  153. </td>
  154. <td class="value">
  155. <input id="expectMoney" name="expectMoney" type="text" style="width: 150px" class="inputxt"
  156. datatype="d,fix2" value="${entity.expectMoney}"/>
  157. <label id="totalamountCHN" style="font-size: 18px"></label>
  158. <span class="Validform_checktip"></span>
  159. <label class="Validform_label" style="display: none;">预计费用</label>
  160. </td>
  161. </tr>
  162. <tr>
  163. <td align="right">
  164. <label class="Validform_label">
  165. <span color="red" class="requiredIcon">*</span>用途摘要:
  166. </label>
  167. </td>
  168. <td class="value">
  169. <input id="summary" name="summary" type="text" style="width: 250px" class="inputxt" datatype="s1-20" value="${entity.summary}"/>
  170. <span class="Validform_checktip"></span>
  171. <label class="Validform_label" style="display: none;">用途摘要</label>
  172. </td>
  173. </tr>
  174. <tr>
  175. <td align="right">
  176. <label class="Validform_label">
  177. 备注:
  178. </label>
  179. </td>
  180. <td class="value" >
  181. <textarea style="width:400px;height: 150px" class="inputxt" rows="6" id="remark" name="remark" >${entity.remark}</textarea>
  182. <span class="Validform_checktip"></span>
  183. <label class="Validform_label" style="display: none;">备注</label>
  184. </td>
  185. </tr>
  186. <c:if test="${entity.bpmStatus!='3'}"> <%--审批通过后不可见--%>
  187. <tr>
  188. <td align="right">
  189. <label class="Validform_label">
  190. 特殊说明:
  191. </label>
  192. </td>
  193. <td class="value" >
  194. <input id="special" name="special" type="text" style="width: 250px" class="inputxt" value="${entity.special}"/>
  195. <span class="Validform_checktip"></span>
  196. <label class="Validform_label" style="display: none;">备注</label>
  197. </td>
  198. </tr>
  199. </c:if>
  200. <tr>
  201. <td align="right">
  202. <label class="Validform_label">
  203. 附件:
  204. </label>
  205. </td>
  206. <td class="value">
  207. <t:webUploader auto="true" busiId="${entity.id}" readOnly="${param.load=='detail' || in_process}"
  208. busiTable="t_b_activiti_cost_request_pu"
  209. bizType="attachment"
  210. extensions="png,jpg,jpeg,bmp"
  211. name="attachment" duplicate="true"
  212. nullMsg="附件不可为空"></t:webUploader>
  213. <span class="Validform_checktip Validform_right" style="display: none;">文件已上传</span>
  214. </td>
  215. </tr>
  216. </table>
  217. <table style="width: 100%">
  218. <tr>
  219. <td style="text-align:center;">
  220. <%@include file="/webpage/cn/com/lzt/useractiviti/view_submit_buttons.jsp"%>
  221. </td>
  222. </tr>
  223. </table>
  224. </t:formvalid>
  225. </body>