receptionEdit.jsp 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <%--
  2. time:2019-04-17 13:26:47
  3. desc:edit the 接待管理
  4. --%>
  5. <%@page language="java" pageEncoding="UTF-8"%>
  6. <%@include file="/commons/include/html_doctype.html"%>
  7. <html>
  8. <head>
  9. <title>编辑 接待管理</title>
  10. <%@include file="/commons/include/form.jsp" %>
  11. <script type="text/javascript" src="${ctx}/js/hotent/CustomValid.js"></script>
  12. <script type="text/javascript" charset="utf-8" src="${ctx}/js/hotent/platform/system/SysDialog.js"></script>
  13. <script type="text/javascript" src="${ctx}/js/hotent/platform/system/SysPlanScript.js"></script>
  14. <script type="text/javascript">
  15. $(function() {
  16. $("a.save").click(function() {
  17. $("#receptionForm").attr("action","save.ht");
  18. $("#saveData").val(1);
  19. submitForm();
  20. });
  21. });
  22. //提交表单
  23. function submitForm(){
  24. var options={};
  25. if(showResponse){
  26. options.success=showResponse;
  27. }
  28. var frm=$('#receptionForm').form();
  29. frm.ajaxForm(options);
  30. if(frm.valid()){
  31. frm.submit();
  32. }
  33. }
  34. function showResponse(responseText) {
  35. var obj = new com.hotent.form.ResultMessage(responseText);
  36. if(!obj.isSuccess()){
  37. $.ligerDialog.err("提示信息"," 接待管理保存失败!",obj.getMessage());
  38. return;
  39. }
  40. $.ligerDialog.confirm(obj.getMessage()+",是否继续操作","提示信息", function(rtn) {
  41. if(rtn){
  42. window.location.href = window.location.href;
  43. }else{
  44. window.location.href = "${ctx}/platform/reception/reception/list.ht";
  45. }
  46. });
  47. }
  48. //选择用户
  49. function chooseUser() {
  50. UserDialog({isSingle:true,selectUsers:"",callback:function(userIds, fullnames){
  51. $('#FPerson').attr("value",fullnames);
  52. }});
  53. };
  54. // 弹出组织框
  55. function showOrgDialog(){
  56. OrgDialog({callback:dlgOrgCallBack,ids:$("#receiverOrgId").val(),names:$("#receiverOrgName").val(),isSingle:false});
  57. };
  58. // 组织框返回数据
  59. function dlgOrgCallBack(orgIds, orgNames)
  60. {
  61. $("#FDeptName").val(orgNames);
  62. $("#receiverOrgId").val(orgIds);
  63. }
  64. </script>
  65. </head>
  66. <body>
  67. <div class="panel">
  68. <div class="panel-top">
  69. <div class="tbar-title">
  70. <c:choose>
  71. <c:when test="${reception.id !=null}">
  72. <span class="tbar-label"><span></span>编辑接待管理</span>
  73. </c:when>
  74. <c:otherwise>
  75. <span class="tbar-label"><span></span>添加接待管理</span>
  76. </c:otherwise>
  77. </c:choose>
  78. </div>
  79. <div class="panel-toolbar">
  80. <div class="toolBar">
  81. <div class="group"><a class="link save" id="dataFormSave" href="javascript:;"><span></span>保存</a></div>
  82. <div class="l-bar-separator"></div>
  83. <div class="group"><a class="link back" href="list.ht"><span></span>返回</a></div>
  84. </div>
  85. </div>
  86. </div>
  87. <div class="panel-body">
  88. <form id="receptionForm" method="post" action="save.ht">
  89. <table class="table-detail" cellpadding="0" cellspacing="0" border="0" type="main">
  90. <tr>
  91. <th width="15%">接待名称: </th>
  92. <td><input type="text" id="FName" name="FName" value="${reception.FName}" class="inputText" style="width: 250px;" validate="{required:false,maxlength:50}" /></td>
  93. <th width="15%">接待事由: </th>
  94. <td>
  95. <select id="FCause" name="FCause" class="inputText" style="width: 250px;" validate="{required:true}">
  96. <option >---------------请选择------------------</option>
  97. <option value="0" <c:if test="${reception.FCause ==0}"> selected="selected"</c:if> >参观交流</option>
  98. <option value="1" <c:if test="${reception.FCause ==1}"> selected="selected"</c:if> >外宾接待</option>
  99. <option value="2" <c:if test="${reception.FCause ==2}"> selected="selected"</c:if> >领导视察</option>
  100. <option value="3" <c:if test="${reception.FCause ==3}"> selected="selected"</c:if> >其他</option>
  101. </select>
  102. </td>
  103. </tr>
  104. <tr>
  105. <th width="15%">接待对象: </th>
  106. <td><input type="text" id="FReceptionist" name="FReceptionist" value="${reception.FReceptionist}" class="inputText" style="width: 250px;" validate="{required:false,maxlength:100}" /></td>
  107. <th width="15%">接待日期: </th>
  108. <td><input type="text" id="FTime" name="FTime" value="<fmt:formatDate value='${reception.FTime}' pattern='yyyy-MM-dd'/>" class="inputText date" style="width: 246px;" validate="{date:true}" /></td>
  109. </tr>
  110. <tr>
  111. <th width="15%">接待部门: </th>
  112. <td>
  113. <input id="FDeptName" name="FDeptName" size="34" readonly="readonly" value="${reception.FDeptName}" />
  114. <a href="javascript:;" onclick="showOrgDialog()" class="link get">选择</a>
  115. <input type="hidden" id="receiverOrgId" name="receiverOrgId" value="" class="inputText" />
  116. </td>
  117. <th width="15%">负责人: </th>
  118. <td>
  119. <input readonly type="text" id="FPerson" name="FPerson" value="${reception.FPerson}" class="inputText" style="width: 250px;" validate="{required:true}" />
  120. <a class="link add" onclick="chooseUser(this);" ><span></span>选择</a>
  121. </td>
  122. </tr>
  123. <tr>
  124. <th width="15%">用车数量: </th>
  125. <td><input type="text" id="FCarNumber" name="FCarNumber" value="${reception.FCarNumber}" class="inputText" style="width: 250px;" validate="{required:false,number:true,maxlength:16}" /></td>
  126. <th width="15%">接待费用: </th>
  127. <td><input type="text" id="FCost" name="FCost" value="${reception.FCost}" class="inputText" style="width: 250px;" validate="{required:false,number:true,maxDecimalLen:3,maxIntLen:16}" /></td>
  128. </tr>
  129. <tr>
  130. <th width="15%">备注: </th>
  131. <td colspan="3"><textarea id="FRemarks" name="FRemarks" validate="{required:false}" style="width: 600px; height:100px;" >${reception.FRemarks}</textarea></td>
  132. </tr>
  133. </table>
  134. <input type="hidden" name="id" value="${reception.id}" />
  135. <input type="hidden" name="saveData" id="saveData" />
  136. <input type="hidden" name="executeType" value="start" />
  137. </form>
  138. </div>
  139. </div>
  140. </body>
  141. </html>