| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link href="../../css/init.css" rel="stylesheet" />
- <script src="../../Script/Common/huayi.load.js"></script>
- <script src="../../Script/Common/huayi.config.js"></script>
- <title>添加问题</title>
- <style>
- .add_edit_cus {
- margin: 20px;
- }
-
- .add_edit_cus ul {
- padding-left: 0;
- }
-
- .add_edit_cus li {
- list-style: none;
- }
-
- .add_edit_cus textarea {
- resize: none;
- width: 100%;
- }
-
- .text-red {
- color: red;
- vertical-align: middle;
- font-size: 20px;
- padding: 2px;
- }
-
- .btn {
- width: 200px;
- }
-
- #question {
- height: 200px;
- }
- body{
- overflow: hidden !important;
- }
- </style>
- </head>
- <body>
- <div class="container add_edit_cus">
- <ul class="form-horizontal clearfix">
- <li class="form-group">
- <label for="t_mobile">问题内容:</label>
- <textarea class="form-control" name="" rows="" cols="" id="question" placeholder="请输入问题内容(仅限100字)"></textarea>
- <!--<input id="question" class="form-control" type="text" placeholder="请输入问题内容" autocomplete="off" />-->
- </li>
- </ul>
- <div class="form-group clearfix">
- <div class="text-center">
- <button class="btn btn-primary" id="btn_save" type="button">保存</button>
- </div>
- </div>
- </div>
- <script type="text/javascript">
- var token = $.cookie("token");
- var taskId = helper.request.queryString("taskId");
- var id = helper.request.queryString("id");
- $('#btn_save').click(function() {
- if($('#question').val().length > 100) {
- layer.confirm('限于100字!', {
- btn: ['确定'] //按钮
- });
- }
- save(0)
- })
- function save(id){
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "AutoCall/CreateOrUpdateQuestion",
- async: true,
- data: {
- taskid: Number(taskId),
- // taskid: taskId,
- quesContent: $('#question').val(),
- questionId: id,
- token: $.cookie('token')
- },
- success: function(res) {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- layer.msg('创建成功');
- parent.initTable();
- }
- });
- }
- </script>
- </body>
- </html>
|