123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150 |
- <!DOCTYPE html>
- <html>
- <head>
- <title>TODO supply a title</title>
- {include file="../application/manage/view/commons/headers.html" }
- <script >
-
- var constantsData=new Array();
-
- var topInsData=new Array();
- topInsData["id"]="";
- topInsData["text"]="顶级节点";
- {if isset($insJson) }
- topInsData["children"]={$insJson};
- {/if}
- constantsData.push(topInsData);
-
- $(function(){
- $('#parent_id').combotree({
- required:true,multiple:false,
- valueField:'id',textField:'name',
- data:constantsData
- });
- });
-
- // 保存信息
- function save(){
- var data=$("#myform").serialize();
- $.ajax({
- url:"/manage/constant/save",
- data:data,type:"get",
- success:function(rs){
- if(rs.indexOf("insert_ok")>=0){
- document.location.href="edit?id="+rs.split(";")[1];
- }else if(rs=="update_ok"){
- document.location.reload();
- }else{
- alert("保存失败!");
- }
- },error:function(e,e1,e2){
- alert(e2);
- }
- });
- }
-
-
- </script>
-
-
- </head>
- <body>
- <form id="myform" action="" method="get" >
- <input name="id" type="hidden" value="{if isset($constant) }{$constant.id}{/if}" />
- <table class="editform" width="99%" border="0" style="margin: 5px auto;" cellpadding="1" cellspacing="1" >
- <tr>
- <th width="105" height="38" align="right" >属性 </th>
- <th>信息</th>
- </tr>
- <tr>
- <th height="32" align="right" >名称:</th>
- <td>
- <input name="name" type="text" size="55" class="easyui-textbox" value="{if isset($constant) }{$constant.name}{/if}" />
- </td>
- </tr>
- <tr>
- <th height="32" align="right" >上级机构:</th>
- <td>
- <input name="parent_id" id="parent_id" type="text" size="55" value="{if isset($constant) }{$constant.parent_id}{/if}" />
- </td>
- </tr>
- <tr>
- <th height="32" align="right" >Key:</th>
- <td>
- <input name="constant_key" id="constant_key" class="easyui-textbox" type="text" size="55" value="{if isset($constant) }{$constant.constant_key}{/if}" />
- </td>
- </tr>
- <tr>
- <th height="32" align="right" >Value:</th>
- <td>
- <input name="constant_value" id="sid" type="text" class="easyui-textbox" size="55" value="{if isset($constant) }{$constant.constant_value}{/if}" />
- </td>
- </tr>
- <tr>
- <th height="32" align="right" >排序号:</th>
- <td>
- <input name="ordernum" id="sid" type="text" class="easyui-textbox" size="25" value="{if isset($constant) }{$constant.ordernum}{/if}" />
- </td>
- </tr>
- <tr>
- <th height="32" align="right" >备注:</th>
- <td>
- <textarea name="remark" cols="55" rows="3" class="easyui-textbox" data-options="multiline:true" style="height:60px;" >{if isset($constant) }{$constant.remark}{/if}</textarea>
- </td>
- </tr>
- <tr>
- <th height="32" align="right" >是否为父节点:</th>
- <td>
- <input type="radio" name="sign" id="sign1" value="1" {if isset($constant) && $constant.sign==1 }checked{/if} /><label for="sign1" >是父节点</label>
- <input type="radio" name="sign" id="sign0" value="0" {if isset($constant) && $constant.sign!=1 }checked{/if} /><label for="sign0" >非父节点</label>
- </td>
- </tr>
- <tr>
- <th height="50" > </th>
- <td>
- <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-save'" icon="icon-save" onclick="save()" >保存</a>
- <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" onclick="window.parent.closeEditWin('reload');" >关闭</a>
- {if isset($constant) && $constant['id'] != null }
- <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-remove'" onclick="deleteData('${keywords.id}');" >删除</a>
- <a type="button" class="easyui-linkbutton" data-options="iconCls:'icon-add'" onclick="document.location='/manage/constant/edit'" >添加</a>
- <script >
- function deleteData(id){
- if(confirm('你真的要删除这条信息吗?')){
- $.ajax({
- url:"delete.page",data:"id="+id+"&t="+new Date(),
- success:function(rs){
- if(rs=="delete_ok"){
- alert("删除操作成功!");
- window.parent.closeEditWin("reload");
- }else{
- alert("删除操作失败!");
- }
- }
- });
- }
- }
- </script>
- {/if}
- </td>
- </tr>
- <tr >
- <th height="32" > </th>
- <td>
-
- </td>
- </tr>
- </table>
- </form>
-
-
-
-
-
-
-
-
-
-
-
- </body>
- </html>
|