| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>添加IVR</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <link href="../../css/plugins/cropper/cropper.min.css" rel="stylesheet">
- <link href="../../js/bootstrap-select/css/bootstrap-select.css" rel="stylesheet" />
- <script src="../../Script/Common/huayi.load.js"></script>
- <script src="../../Script/Common/huayi.config.js"></script>
- <link rel="stylesheet" href="../../css/webuploader.css" />
- <link href="../../css/init.css" rel="stylesheet" />
- <style>
- .project_items {
- list-style: none;
- margin: 60px auto;
- padding-left: 0;
- }
-
- .project_items li label {
- height: 34px;
- line-height: 34px;
- }
-
- .project_items li textarea {
- resize: none;
- }
-
- .crop_left {
- width: 40%;
- float: left;
- }
-
- .crop_right {
- width: 30%;
- float: right;
- margin-right: 25px;
- }
-
- .btnn {
- background: #2f4050;
- color: #fff;
- padding: 3px 10px;
- border: 0;
- border-radius: 3px;
- cursor: pointer;
- }
-
- .project_save {
- width: 20%;
- }
-
- .text_require {
- color: red;
- vertical-align: middle;
- font-weight: 900;
- }
-
- .project_items i.tub {
- right: 22px;
- }
-
- #pro_location {
- margin-left: 15px;
- }
-
- .radio-inline input[type=radio] {
- margin-top: 10px;
- }
-
- .form-horizontal .radio-inline {
- padding-top: 0!important;
- }
-
- .editPwd {
- display: none;
- }
-
- .project_items .alert {
- margin-bottom: 0;
- padding: 5px;
- }
-
- .loader_icon {
- display: block;
- height: 36px;
- width: 36px;
- background: url(../../img/upLod.png) no-repeat;
- }
- </style>
- </head>
- <body>
- <div class="container">
- <ul class="project_items form-horizontal addIvr">
- <li class="form-group">
- <label for="groupcode" class="col-md-2 text-right"><b class="text_require">*</b>坐席组编号</label>
- <div class="col-md-10">
- <select id="groupcode" class="form-control selectpicker" data-live-search="true">
- <option value="">请选择角色</option>
- </select>
- </div>
- </li>
- <li class="form-group">
- <label for="" class="col-md-2 text-right"><b class="text_require">*</b>ivr类型</label>
- <div class="col-md-10" id="">
- <label class="radio-inline">
- <input type="radio" name="ivr_type" value="1" checked="checked"> 呼入
- </label>
- <label class="radio-inline">
- <input type="radio" name="ivr_type" value="2"> 满意度
- </label>
- <label class="radio-inline">
- <input type="radio" name="ivr_type" value="3"> 自动外呼
- </label>
- </div>
- </li>
- <li class="form-group">
- <label for="" class="col-md-2 text-right"><b class="text_require">*</b>是否启用</label>
- <div class="col-md-10" id="">
- <label class="radio-inline">
- <input type="radio" name="isenable" value="0" > 不启用
- </label>
- <label class="radio-inline">
- <input type="radio" name="isenable" value="1" checked="checked"> 启用
- </label>
- </div>
- </li>
- <li class="form-group">
- <label for="ivrcontent" class="col-md-2 text-right">ivr内容</label>
- <div class="col-md-10">
- <textarea id="ivrcontent" class="form-control" rows="5" placeholder="请输入内容"></textarea>
- </div>
- </li>
- <li class="form-group">
- <div class="col-md-offset-2 col-md-10">
- <button class="project_save btn btn-primary" id="pro_save" type="button" onclick="saveIvr()">保存</button>
- </div>
- </li>
- </ul>
-
- <ul class="project_items form-horizontal editIvr">
- <li class="form-group">
- <label for="groupcode" class="col-md-2 text-right"><b class="text_require">*</b>坐席组编号</label>
- <div class="col-md-10">
- <input id="editGroupcode" class="form-control" autocomplete="off" type="text" readonly="readonly" />
- </div>
- </li>
- <li class="form-group">
- <label for="" class="col-md-2 text-right"><b class="text_require">*</b>ivr类型</label>
- <div class="col-md-10">
- <label class="radio-inline">
- <input type="radio" name="editivrType" value="1" disabled="disabled"> 呼入
- </label>
- <label class="radio-inline">
- <input type="radio" name="editivrType" value="2" disabled="disabled"> 满意度
- </label>
- <label class="radio-inline">
- <input type="radio" name="editivrType" value="3" disabled="disabled"> 自动外呼
- </label>
- </div>
- </li>
- <li class="form-group">
- <label for="" class="col-md-2 text-right"><b class="text_require">*</b>是否启用</label>
- <div class="col-md-10" id="">
- <label class="radio-inline">
- <input type="radio" name="editIsenable" value="0" > 不启用
- </label>
- <label class="radio-inline">
- <input type="radio" name="editIsenable" value="1"> 启用
- </label>
- </div>
- </li>
- <li class="form-group">
- <label for="ivrcontent" class="col-md-2 text-right">ivr内容</label>
- <div class="col-md-10">
- <textarea id="editIvrcontent" class="form-control" rows="5" placeholder="请输入内容"></textarea>
- </div>
- </li>
- <li class="form-group">
- <div class="col-md-offset-2 col-md-10">
- <button class="project_save btn btn-primary" id="edit_save" type="button" onclick="saveIvr()">保存</button>
- </div>
- </li>
- </ul>
-
- </div>
- <script src="../../js/laydate/laydate.js"></script>
- <script src="../../Script/Common/regexs.js"></script>
- <script src="../../js/bootstrap-select/js/bootstrap-select.js"></script>
- <script src="../../js/bootstrap-select/js/i18n/defaults-zh_CN.js"></script>
- <script src="../../js/autosize/autosize.min.js"></script>
- <script src="../../js/jquery.md5.js"></script>
- <script>
- var ids=helper.request.queryString("edit_id");
- $(function(){
- if(ids){
- $('.editIvr').show();
- $('.addIvr').hide();
- getDetail(ids)
- }else{
- $('.addIvr').show();
- $('.editIvr').hide();
- }
- getSeatGroup($('#groupcode'));//获取坐席组
- })
- //添加
- function saveIvr() {
- $.post(huayi.config.callcenter_url + "callcenterapi/api/SysIVRConfig/add", {
- groupcode: $('#groupcode').val(),
- ivrtype: $('input[name="ivr_type"]:checked').val(),
- isenable: $('input[name="isenable"]:checked').val(),
- ivrcontent: $('#ivrcontent').val(),
- }, function(data) {
- data = JSON.parse(data);
- if(data.state == "success") {
- var index = parent.layer.getFrameIndex(window.name);
- parent.layer.close(index);
- parent.$('#table_all').bootstrapTable('refresh');
- parent.layer.msg("保存成功");
- }
- });
- }
- //获取坐席组
- function getSeatGroup(el) {
- $.getJSON(huayi.config.callcenter_url + "callcenterapi/api/sysseatgroup/getlist", function(data) {
- if(data.state.toLowerCase() == "success") {
- el.empty();
- el.append("<option value=''>请选择坐席组</option>");
- var content = data.data;
- if(content && content.length > 0) {
- $(content).each(function(i, n) {
- $("<option value='" + n.zxzcode + "'>" + n.zxzname + "</option>").appendTo(el);
- });
- el.selectpicker('refresh');
- }
- }
- })
- }
- //获取详情
- function getDetail(tid){
- $.getJSON(huayi.config.callcenter_url + "callcenterapi/api/SysIVRConfig/getsingle", {id:tid},function(data) {
- if(data.state.toLowerCase() == "success") {
- $('#editGroupcode').val(data.data.groupcode);
- $('input[name="editIsenable"][value="' + data.data.isenable + '"]').prop("checked", "checked"); //是否启用
- $('input[name="editivrType"][value="'+data.data.ivrtype+'"]').prop("checked","checked");//ivr类型
- $('#editIvrcontent').val(data.data.ivrcontent);
- }
- })
-
- }
- </script>
- </body>
- </html>
|