| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- <!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;
- }
- </style>
- </head>
- <body>
- <div class="container add_edit_cus">
- <ul class="form-horizontal clearfix">
- <li class="form-group">
- <label for="t_mobile">任务名:</label>
- <input id="task" class="form-control" type="text" placeholder="请输入任务名" autocomplete="off" />
- </li>
- <li class="form-group">
- <label for="t_mobile">问题1:</label>
- <input id="question1" class="form-control" type="text" placeholder="请输入问题1" autocomplete="off" />
- </li>
- <li class="form-group">
- <label for="t_mobile">问题2 :</label>
- <input id="question2" class="form-control" type="text" placeholder="请输入问题2" autocomplete="off" />
- </li>
- <li class="form-group">
- <label for="t_mobile">问题3:</label>
- <input id="question3" class="form-control" type="text" placeholder="请输入问题3" 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 id = helper.request.queryString("id");
- $('#btn_save').click(function() {
- if(id){
- save(id)
- }else{
- save(0)
- }
- })
- function save(id){
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "AutomaticCall/CreateOrUpdateTask",
- async: true,
- data: {
- id: Number(id),
- name: $('#task').val(),
- question1:$('#question1').val(),
- question2:$('#question2').val(),
- question3:$('#question3').val(),
- 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>
|