activitiCostRequestSpecialBudget-add.jsp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  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. var measureId = '${entity.measureId}';
  43. var type = $("select[name='budgetSpecialType']").val();
  44. if(type != null || type != "" || type != undefined){
  45. var url = "activitiCostRequestSpecialBudgetController.do?getMeasureIdList";
  46. $.post(url, {"budgetSpecialType" : type}, function(d){
  47. $('#measureId').find('option').remove();
  48. $('#measureId').append("<option value=''>---请选择---</option>");
  49. if(d.obj.length > 0){
  50. for(var i = 0; i < d.obj.length; i++){
  51. if(measureId == d.obj[i].measure_id){
  52. $('#measureId').append("<option selected='selected' value='"+d.obj[i].measure_id+"'>"+d.obj[i].measure_name+"</option>");
  53. }else{
  54. $('#measureId').append("<option value='"+d.obj[i].measure_id+"'>"+d.obj[i].measure_name+"</option>");
  55. }
  56. }
  57. }
  58. }, 'json')
  59. }
  60. $("select[name='budgetSpecialType']").change(function(){
  61. var budgetSpecialType = $("select[name='budgetSpecialType']").val();
  62. if(budgetSpecialType == null || budgetSpecialType == "" || budgetSpecialType == undefined){
  63. return;
  64. }
  65. var url = "activitiCostRequestSpecialBudgetController.do?getMeasureIdList";
  66. $.post(url, {"budgetSpecialType" : budgetSpecialType}, function(d){
  67. $('#measureId').find('option').remove();
  68. $('#measureId').append("<option value='' selected='selected'>---请选择---</option>");
  69. if(d.obj.length > 0){
  70. for(var i = 0; i < d.obj.length; i++){
  71. $('#measureId').append("<option value='"+d.obj[i].measure_id+"'>"+d.obj[i].measure_name+"</option>");
  72. }
  73. }
  74. }, 'json')
  75. });
  76. })
  77. function getActualValue() {
  78. var yearMonth = $('#budgetMonth').val();
  79. var measureId = $('#measureId').val();
  80. if(!yearMonth || !measureId){
  81. return;
  82. }
  83. var departId = $('#departId').val();
  84. var busType = 'cost_request_special_budget';
  85. getExpectActualValue(busType,yearMonth,departId,measureId,function(expectValue,actualValue,leftValue){
  86. $('#actualValue').html(actualValue);
  87. $('#leftValue').html(leftValue);
  88. $('#expectMoney').trigger('input');
  89. });
  90. }
  91. </script>
  92. </head>
  93. <body>
  94. <%--处理回调--%>
  95. <c:set var="_callback">
  96. <c:choose>
  97. <c:when test="${in_process}">@Overridecallback</c:when>
  98. <c:otherwise>callback</c:otherwise>
  99. </c:choose>
  100. </c:set>
  101. <t:formvalid formid="formobj" dialog="true" usePlugin="password" layout="table" action="activitiCostRequestSpecialBudgetController.do?doAdd"
  102. callback="${_callback}" beforeSubmit="checkOverBudget">
  103. <input id="id" name="id" type="hidden" value="${entity.id }"/>
  104. <table style="width: 600px;" cellpadding="0" cellspacing="1" class="formtable">
  105. <c:if test="${in_process}">
  106. <tr>
  107. <td align="right">
  108. <label class="Validform_label">
  109. 申请人:
  110. </label>
  111. </td>
  112. <td class="value">
  113. ${entity.realName}
  114. </td>
  115. </tr>
  116. </c:if>
  117. <tr>
  118. <td align="right">
  119. <label class="Validform_label">
  120. 所属部门:
  121. </label>
  122. </td>
  123. <td class="value">
  124. <input type="hidden" name="departId" id="departId" value="${empty entity.departId?param.departId:entity.departId}"/>
  125. <input type="hidden" name="depName" id="depName" value="${empty entity.depName?param.depName:entity.depName}"/>
  126. ${empty entity.depName?param.depName:entity.depName}
  127. <%--<c:if test="${(empty param.load && !in_process)|| (in_process&& param.flag==1)}">
  128. <a href="javascript:void(0)" class="easyui-linkbutton" plain="true" icon="icon-select" id="dutiesSearch" onclick="openDep()">选择</a>
  129. </c:if>--%>
  130. <span class="Validform_checktip"></span>
  131. <label class="Validform_label" style="display: none;">所属部门</label>
  132. </td>
  133. </tr>
  134. <tr>
  135. <td align="right">
  136. <label class="Validform_label">
  137. <span color="red" class="requiredIcon">*</span>计入预算月份:
  138. </label>
  139. </td>
  140. <td class="value">
  141. <input id="budgetMonth" name="budgetMonth" type="text" class="Wdate" onClick="WdatePicker({dateFmt:'yyyy-MM',onpicked:getActualValue})" value="${entity.budgetMonth}" datatype="*"/>
  142. <span class="Validform_checktip"></span>
  143. <label class="Validform_label" style="display: none;">计入预算月份</label>
  144. </td>
  145. </tr>
  146. <tr>
  147. <td align="right">
  148. <label class="Validform_label">
  149. <span color="red" class="requiredIcon">*</span>
  150. 专项预算类型:
  151. </label>
  152. </td>
  153. <td class="value">
  154. <t:dictSelect field="budgetSpecialType" type="list" typeGroupCode="budget_special_type" defaultVal="${entity.budgetSpecialType}" hasLabel="false" title="专项预算类型" datatype="*"></t:dictSelect>
  155. </td>
  156. </tr>
  157. <tr>
  158. <td align="right">
  159. <label class="Validform_label">
  160. <span color="red" class="requiredIcon">*</span>专项预算指标:
  161. </label>
  162. </td>
  163. <td class="value">
  164. <select name="measureId" id="measureId" datatype="*">
  165. <option value="" selected="selected">---请选择---</option>
  166. </select>
  167. <%--
  168. A01A02A01 内部培训 A01A02A02 外部培训 A01A04A01 经济补偿金 A01A04A02 医疗费 A01A04A03 一次性工伤就业补助金 A01A12 劳动保护费
  169. A01A01A05 福利费
  170. <t:dictSelect field="measureId" id="measureId" type="list" dictTable="t_b_budget_measure" dictField="id" dictText="name" defaultVal="${entity.measureId}" datatype="*"
  171. dictCondition=" where code ='A01A02A01' or code ='A01A02A02' or code='A01A04A01' or code ='A01A04A02' or code='A01A04A03'
  172. or code = 'A01A01A05A01' or code = 'A01A01A05A02' or code = 'A01A01A05A03' order by code" />
  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. <span id="actualValue"></span>
  185. </td>
  186. </tr>
  187. <tr>
  188. <td align="right">
  189. <label class="Validform_label">
  190. 剩余预算额度:
  191. </label>
  192. </td>
  193. <td class="value">
  194. <span id="leftValue"></span>
  195. </td>
  196. </tr>
  197. <tr>
  198. <td align="right">
  199. <label class="Validform_label">
  200. <span color="red" class="requiredIcon">*</span>预计费用:
  201. </label>
  202. </td>
  203. <td class="value">
  204. <input id="expectMoney" name="expectMoney" type="text" style="width: 150px" class="inputxt"
  205. datatype="d,fix2" value="${entity.expectMoney}"/>
  206. <label id="totalamountCHN" style="font-size: 18px"></label>
  207. <span class="Validform_checktip"></span>
  208. <label class="Validform_label" style="display: none;">预计费用</label>
  209. </td>
  210. </tr>
  211. <tr>
  212. <td align="right">
  213. <label class="Validform_label">
  214. <span color="red" class="requiredIcon">*</span>用途摘要:
  215. </label>
  216. </td>
  217. <td class="value">
  218. <input id="summary" name="summary" type="text" style="width: 250px" class="inputxt" datatype="s1-20" value="${entity.summary}"/>
  219. <span class="Validform_checktip"></span>
  220. <label class="Validform_label" style="display: none;">用途摘要</label>
  221. </td>
  222. </tr>
  223. <tr>
  224. <td align="right">
  225. <label class="Validform_label">
  226. 备注:
  227. </label>
  228. </td>
  229. <td class="value" >
  230. <textarea style="width:400px;height: 150px" class="inputxt" rows="6" id="remark" name="remark" >${entity.remark}</textarea>
  231. <span class="Validform_checktip"></span>
  232. <label class="Validform_label" style="display: none;">备注</label>
  233. </td>
  234. </tr>
  235. <c:if test="${entity.bpmStatus!='3'}"> <%--审批通过后不可见--%>
  236. <tr>
  237. <td align="right">
  238. <label class="Validform_label">
  239. 特殊说明:
  240. </label>
  241. </td>
  242. <td class="value" >
  243. <input id="special" name="special" type="text" style="width: 250px" class="inputxt" value="${entity.special}"/>
  244. <span class="Validform_checktip"></span>
  245. <label class="Validform_label" style="display: none;">备注</label>
  246. </td>
  247. </tr>
  248. </c:if>
  249. <tr>
  250. <td align="right">
  251. <label class="Validform_label">
  252. 附件:
  253. </label>
  254. </td>
  255. <td class="value">
  256. <t:webUploader auto="true" busiId="${entity.id}" readOnly="${param.load=='detail' || in_process}"
  257. busiTable="t_b_activiti_cost_request_special_budget"
  258. bizType="attachment"
  259. extensions="png,jpg,jpeg,bmp"
  260. name="attachment" duplicate="true"
  261. nullMsg="附件不可为空"></t:webUploader>
  262. <span class="Validform_checktip Validform_right" style="display: none;">文件已上传</span>
  263. </td>
  264. </tr>
  265. </table>
  266. <table style="width: 100%">
  267. <tr>
  268. <td style="text-align:center;">
  269. <%@include file="/webpage/cn/com/lzt/useractiviti/view_submit_buttons.jsp"%>
  270. </td>
  271. </tr>
  272. </table>
  273. </t:formvalid>
  274. </body>