123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162 |
- <?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;}*/ ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title>TODO supply a title</title>
- <meta charset="UTF-8"><?php $req_rmd= rand(1,9999999) ?>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link href="/static/js/jquery-easyui-1.5.5.6/themes/material/easyui.css?t=<?php echo $req_rmd; ?>" rel="stylesheet" type="text/css" />
- <link href="/static/js/jquery-easyui-1.5.5.6/themes/material/panel.css?t=<?php echo $req_rmd; ?>" rel="stylesheet" type="text/css" />
- <link href="/static/manage/css/manage.css?t=<?php echo $req_rmd; ?>" rel="stylesheet" type="text/css" />
- <link href="/static/js/jquery-easyui-1.5.5.6/themes/icon.css?t=<?php echo $req_rmd; ?>" rel="stylesheet" type="text/css" />
- <script src="/static/js/jquery-easyui-1.5.5.6/jquery.min.js?t=<?php echo $req_rmd; ?>" type="text/javascript" ></script>
- <script src="/static/js/jquery-easyui-1.5.5.6/jquery.easyui.min.js?t=<?php echo $req_rmd; ?>" type="text/javascript" ></script>
- <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>
- <script src="/static/js/commons.js?t=<?php echo $req_rmd; ?>" type="text/javascript" ></script>
- <script >
-
- var constantsData=new Array();
-
- var topInsData=new Array();
- topInsData["id"]="";
- topInsData["text"]="顶级节点";
- <?php if(isset($insJson)): ?>
- topInsData["children"]=<?php echo $insJson; ?>;
- <?php endif; ?>
- 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="<?php if(isset($constant)): ?><?php echo $constant['id']; endif; ?>" />
- <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="<?php if(isset($constant)): ?><?php echo $constant['name']; endif; ?>" />
- </td>
- </tr>
- <tr>
- <th height="32" align="right" >上级机构:</th>
- <td>
- <input name="parent_id" id="parent_id" type="text" size="55" value="<?php if(isset($constant)): ?><?php echo $constant['parent_id']; endif; ?>" />
- </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="<?php if(isset($constant)): ?><?php echo $constant['constant_key']; endif; ?>" />
- </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="<?php if(isset($constant)): ?><?php echo $constant['constant_value']; endif; ?>" />
- </td>
- </tr>
- <tr>
- <th height="32" align="right" >排序号:</th>
- <td>
- <input name="ordernum" id="sid" type="text" class="easyui-textbox" size="25" value="<?php if(isset($constant)): ?><?php echo $constant['ordernum']; endif; ?>" />
- </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;" ><?php if(isset($constant)): ?><?php echo $constant['remark']; endif; ?></textarea>
- </td>
- </tr>
- <tr>
- <th height="32" align="right" >是否为父节点:</th>
- <td>
- <input type="radio" name="sign" id="sign1" value="1" <?php if(isset($constant) && $constant['sign']==1): ?>checked<?php endif; ?> /><label for="sign1" >是父节点</label>
- <input type="radio" name="sign" id="sign0" value="0" <?php if(isset($constant) && $constant['sign']!=1): ?>checked<?php endif; ?> /><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>
- <?php 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>
- <?php endif; ?>
- </td>
- </tr>
- <tr >
- <th height="32" > </th>
- <td>
-
- </td>
- </tr>
- </table>
- </form>
-
-
-
-
-
-
-
-
-
-
-
- </body>
- </html>
|