| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <script src="../Script/Common/huayi.load.js"></script>
- <script src="../Script/Common/huayi.config.js"></script>
- <link href="../css/layer/need/layer.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <title>详情</title>
- <style>
- .BiaoTi {
- width: 100%;
- border-color: #ccc;
- border: 1px solid #ccc;
- }
-
- textarea {
- border-color: #ccc;
- border: 1px solid #ccc;
- height: 100px;
- }
-
- .BiaoTi {
- width: 100%;
- text-align: center;
- border-color: #ccc;
- border: 1px solid #ccc;
- }
-
- textarea {
- border-color: #ccc;
- border: 1px solid #ccc;
- height: 100px;
- }
-
- .Common {
- width: 100%;
- background: #fff;
- text-align: center;
- padding: 10px 15px;
- height: auto;
- overflow-y: auto;
- }
-
- .Common table th {
- padding: 5px 8px 5px 0;
- text-align: right;
- width: 20%;
- }
-
- .Common table {
- width: 100%;
- }
-
- .Common table td textarea {
- width: 100%;
- vertical-align: middle;
- resize: none;
- outline: none;
- }
-
- .Common table td {
- padding: 6px 0 5px 10px;
- text-align: left;
- color: #717171;
- line-height: 200%;
- }
-
- .btn_box {
- margin-top: 30px;
- }
- </style>
- </head>
- <body>
- <div class="Common">
- <table>
- <tr>
- <th>标题:</th>
- <td>
- <input class="BiaoTi" id="title" type="text" style="" />
- </td>
- </tr>
- <tr>
- <th>内容:</th>
- <td colspan="2">
- <textarea data-adaptheight id="content" name="" rows="" cols=""></textarea>
- </td>
- </tr>
- </table>
- <div class="btn_box">
- <button class="btns">保存</button>
- </div>
- </div>
- <script>
- var wid = helper.request.queryString("wid");
- $(document).ready(function() {
- $(".btns").click(function() {
- if(!$("#title").val()) {
- layer.msg("输入标题");
- } else if(!$("#content").val()) {
- layer.msg("输入选择日期");
- }
- Add()
- })
- if(wid) {
- $.getJSON(huayi.config.callcenter_url + 'Notice/GetNotice', {
- noticeid: wid,
- "token": $.cookie("token")
- }, function(result) {
- if(result.state.toLowerCase() == "success") {
- $("#title").val(result.data.F_Title);
- $("#content").val(result.data.F_Content);
- console.log(result.data);
- }
- });
- }
- })
- function Add() {
- $.post(huayi.config.callcenter_url + "Notice/EditNotice", {
- nid: wid,
- title: $("#title").val(),
- content: $("#content").val(),
- token: $.cookie("token")
- }, function(result) {
- result = JSON.parse(result);
- if(result.state.toLowerCase() == "success") {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent.initTable();
- parent.layer.msg("修改成功");
- }
- })
- }
- </script>
- </body>
- </html>
|