| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <script src="../../Script/Common/huayi.load.js"></script>
- <script src="../../Script/Common/huayi.config.js"></script>
- <link href="../../css/init.css" rel="stylesheet" />
- <link rel="stylesheet" type="text/css" href="../../css/Table/table1.css" />
- <link rel="stylesheet" href="../../css/webuploader.css" />
- <title>新增公告</title>
- <style>
- #noticCont{
- height: 380px;
- }
- </style>
- </head>
- <body class="gray-bg">
- <div class="container wrapper-content animated fadeInRight">
- <div class="form-horizontal">
- <div class="form-group code">
- <label for="code" class="col-sm-3 control-label text-right">排序号</label>
- <div class="col-sm-9">
- <input id="code" class="form-control" type="text" autocomplete="off" placeholder="请输入排序号" />
- </div>
- </div>
- <div class="form-group">
- <label for="borrowpeoplec" class="col-sm-3 control-label text-right">公告内容</label>
- <div class="col-sm-9">
- <textarea id="noticCont" rows="3" cols="20" class="form-control" placeholder="请输入公告内容"></textarea>
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-12" style="text-align: center;">
- <input type="button" id="HY_save" class="btn_gray btn" value="保存" />
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- var id = helper.request.queryString("id");
- if(id!=''){
- $('.code').css('display','none')
- getDetial(id)
- $('#HY_save').click(function(){
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'testusertypeapi/api/TestUserType/upimportmassage',
- async: true,
- dataType: 'json',
- data: {
- id:id,
- ifshowfirst: $('#code').val(),
- conterinfo:$('#noticCont').val()
- },
- success: function(data) {
- if (data.state.toLowerCase() == 'success') {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- layer.msg(data.message);
- parent.initTable();
- }
- }
- });
- })
- }else{
- $('.code').css('display','block')
- $('#HY_save').click(function(){
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'testusertypeapi/api/TestUserType/addimportmassage',
- async: true,
- dataType: 'json',
- data: {
- ifshowfirst: $('#code').val(),
- conterinfo:$('#noticCont').val()
- },
- success: function(data) {
- if (data.state.toLowerCase() == 'success') {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- layer.msg(data.message);
- parent.initTable();
- }
- }
- });
- })
- }
- function getDetial(id){
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + 'testusertypeapi/api/TestUserType/getimportmassagebyid',
- async: true,
- dataType: 'json',
- data: {
- id:id
- },
- success: function(data) {
- if (data.state.toLowerCase() == 'success') {
- $('#code').val(data.data[0].ifshowfirst)
- $('#noticCont').val(data.data[0].conterinfo)
- }
- }
- });
- }
- </script>
- </body>
- </html>
|