937933a30c191a7b1485dafc97e2895f.php 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162
  1. <?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:74:"D:\wamp\www\yczd\yczd\public/../application/manage\view\constant\edit.html";i:1536562691;s:47:"../application/manage/view/commons/headers.html";i:1537433847;}*/ ?>
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5. <title>TODO supply a title</title>
  6. <meta charset="UTF-8"><?php $req_rmd= rand(1,9999999) ?>
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <link href="/static/js/jquery-easyui-1.5.5.6/themes/material/easyui.css?t=<?php echo $req_rmd; ?>" rel="stylesheet" type="text/css" />
  9. <link href="/static/js/jquery-easyui-1.5.5.6/themes/material/panel.css?t=<?php echo $req_rmd; ?>" rel="stylesheet" type="text/css" />
  10. <link href="/static/manage/css/manage.css?t=<?php echo $req_rmd; ?>" rel="stylesheet" type="text/css" />
  11. <link href="/static/js/jquery-easyui-1.5.5.6/themes/icon.css?t=<?php echo $req_rmd; ?>" rel="stylesheet" type="text/css" />
  12. <script src="/static/js/jquery-easyui-1.5.5.6/jquery.min.js?t=<?php echo $req_rmd; ?>" type="text/javascript" ></script>
  13. <script src="/static/js/jquery-easyui-1.5.5.6/jquery.easyui.min.js?t=<?php echo $req_rmd; ?>" type="text/javascript" ></script>
  14. <script src="/static/js/jquery-easyui-1.5.5.6/locale/easyui-lang-zh_CN.js?t=<?php echo $req_rmd; ?>" type="text/javascript" ></script>
  15. <script src="/static/js/commons.js?t=<?php echo $req_rmd; ?>" type="text/javascript" ></script>
  16. <script >
  17. var constantsData=new Array();
  18. var topInsData=new Array();
  19. topInsData["id"]="";
  20. topInsData["text"]="顶级节点";
  21. <?php if(isset($insJson)): ?>
  22. topInsData["children"]=<?php echo $insJson; ?>;
  23. <?php endif; ?>
  24. constantsData.push(topInsData);
  25. $(function(){
  26. $('#parent_id').combotree({
  27. required:true,multiple:false,
  28. valueField:'id',textField:'name',
  29. data:constantsData
  30. });
  31. });
  32. // 保存信息
  33. function save(){
  34. var data=$("#myform").serialize();
  35. $.ajax({
  36. url:"/manage/constant/save",
  37. data:data,type:"get",
  38. success:function(rs){
  39. if(rs.indexOf("insert_ok")>=0){
  40. document.location.href="edit?id="+rs.split(";")[1];
  41. }else if(rs=="update_ok"){
  42. document.location.reload();
  43. }else{
  44. alert("保存失败!");
  45. }
  46. },error:function(e,e1,e2){
  47. alert(e2);
  48. }
  49. });
  50. }
  51. </script>
  52. </head>
  53. <body>
  54. <form id="myform" action="" method="get" >
  55. <input name="id" type="hidden" value="<?php if(isset($constant)): ?><?php echo $constant['id']; endif; ?>" />
  56. <table class="editform" width="99%" border="0" style="margin: 5px auto;" cellpadding="1" cellspacing="1" >
  57. <tr>
  58. <th width="105" height="38" align="right" >属性&nbsp;</th>
  59. <th>信息</th>
  60. </tr>
  61. <tr>
  62. <th height="32" align="right" >名称:</th>
  63. <td>
  64. <input name="name" type="text" size="55" class="easyui-textbox" value="<?php if(isset($constant)): ?><?php echo $constant['name']; endif; ?>" />
  65. </td>
  66. </tr>
  67. <tr>
  68. <th height="32" align="right" >上级机构:</th>
  69. <td>
  70. <input name="parent_id" id="parent_id" type="text" size="55" value="<?php if(isset($constant)): ?><?php echo $constant['parent_id']; endif; ?>" />
  71. </td>
  72. </tr>
  73. <tr>
  74. <th height="32" align="right" >Key:</th>
  75. <td>
  76. <input name="constant_key" id="constant_key" class="easyui-textbox" type="text" size="55" value="<?php if(isset($constant)): ?><?php echo $constant['constant_key']; endif; ?>" />
  77. </td>
  78. </tr>
  79. <tr>
  80. <th height="32" align="right" >Value:</th>
  81. <td>
  82. <input name="constant_value" id="sid" type="text" class="easyui-textbox" size="55" value="<?php if(isset($constant)): ?><?php echo $constant['constant_value']; endif; ?>" />
  83. </td>
  84. </tr>
  85. <tr>
  86. <th height="32" align="right" >排序号:</th>
  87. <td>
  88. <input name="ordernum" id="sid" type="text" class="easyui-textbox" size="25" value="<?php if(isset($constant)): ?><?php echo $constant['ordernum']; endif; ?>" />
  89. </td>
  90. </tr>
  91. <tr>
  92. <th height="32" align="right" >备注:</th>
  93. <td>
  94. <textarea name="remark" cols="55" rows="3" class="easyui-textbox" data-options="multiline:true" style="height:60px;" ><?php if(isset($constant)): ?><?php echo $constant['remark']; endif; ?></textarea>
  95. </td>
  96. </tr>
  97. <tr>
  98. <th height="32" align="right" >是否为父节点:</th>
  99. <td>
  100. <input type="radio" name="sign" id="sign1" value="1" <?php if(isset($constant) && $constant['sign']==1): ?>checked<?php endif; ?> /><label for="sign1" >是父节点</label>
  101. <input type="radio" name="sign" id="sign0" value="0" <?php if(isset($constant) && $constant['sign']!=1): ?>checked<?php endif; ?> /><label for="sign0" >非父节点</label>
  102. </td>
  103. </tr>
  104. <tr>
  105. <th height="50" >&nbsp;</th>
  106. <td>
  107. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-save'" icon="icon-save" onclick="save()" >保存</a>
  108. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="window.parent.closeEditWin('reload');" >关闭</a>
  109. <?php if(isset($constant) && $constant['id'] != null): ?>
  110. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" onclick="deleteData('${keywords.id}');" >删除</a>
  111. <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-add'" onclick="document.location='/manage/constant/edit'" >添加</a>
  112. <script >
  113. function deleteData(id){
  114. if(confirm('你真的要删除这条信息吗?')){
  115. $.ajax({
  116. url:"delete.page",data:"id="+id+"&t="+new Date(),
  117. success:function(rs){
  118. if(rs=="delete_ok"){
  119. alert("删除操作成功!");
  120. window.parent.closeEditWin("reload");
  121. }else{
  122. alert("删除操作失败!");
  123. }
  124. }
  125. });
  126. }
  127. }
  128. </script>
  129. <?php endif; ?>
  130. </td>
  131. </tr>
  132. <tr >
  133. <th height="32" >&nbsp;</th>
  134. <td>
  135. &nbsp;
  136. </td>
  137. </tr>
  138. </table>
  139. </form>
  140. </body>
  141. </html>