| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013 |
- <!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 rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
- <link href="../css/layer/need/layer.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <link rel="stylesheet" href="../css/addappeal.css" />
- <link rel="stylesheet" href="../js/layui/css/layui.css">
- <title>新增诉求工单</title>
- <style>
- .reflectCategory-wrapper {
- position: relative;
- }
- .reflectCategoryList-wrapper {
- display: none;
- position: absolute;
- top: 38px;
- z-index: 9999;
- line-height: 32px;
- background: #FFF;
- }
- #reflectCategoryList {
- height: 240px;
- background: #FFF;
- border: 1px solid #e5e6e7;
- overflow: auto;
- }
- #reflectCategoryList li {
- padding: 0 10px;
- width: 100%;
- line-height: 32px;
- }
- #reflectCategoryList li:hover {
- background: #00a1cb;
- }
- </style>
- </head>
- <body>
- <div class="wrapper wrapper-content animated fadeInRight">
- <div class="daoHang clearfix">
- <div class="dhLeft">
- <sapn>
- <i class="syIcon"></i>位置:
- <a href="javaScript:;" id="ReIndex">首页</a>>
- <a href="" class="nowPosition">添加工单</a>
- </sapn>
- </div>
- <div class="dhRight">
- <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
- </div>
- </div>
- <div style="padding: 10px;" class="tj_content clearFix">
- <div class="Common">
- <table>
- <tr>
- <th class="Importent">标题:</th>
- <td colspan="7">
- <input id="title" class="form-control" type="text" style="width: 50%;" />
- </td>
- </tr>
- <tr>
- <th class="Importent">内容:</th>
- <td colspan="7">
- <textarea id="content" class="form-control" name="" rows="4" cols=""
- style="width: 100%;"></textarea>
- </td>
- </tr>
- <tr>
- <th>附件上传:</th>
- <td colspan="7">
- <div class="fileBox"></div>
- <input class="input" type="file" name="upFile" id="upFile" multiple="multiple"
- style="display: none;">
- <input class="input" type="button" value="上传" id="scwj" />
- <input type="hidden" id="file" />
- <!--</br>-->
- <span style="color:#FF0000; border: none;">
- (文件格式为png,jpg,mp4,avi,wmv,mp3,pdf,doc,docx,xls,xlsx)
- </span>
- </td>
- </tr>
- <tr>
- <th>处理方式:</th>
- <td colspan="">
- <input type="radio" value="1" name="banli" class="Nows_ radioStyle" />当即办理
- <input checked="true" type="radio" value="0" name="banli" class="Nows_ radioStyle" />网络转办
- <input id="threeWayCall" type="checkbox" value="1" name="" class="Nows_ radioStyle" />三方通话
- </td>
- <th class="yibanbox" style="display: none;">已办待审核:</th>
- <td class="yibanbox" style="display: none;" colspan="">
- <input class="radioStyle" type="radio" name="ybdsh" id="" value="0" checked="checked" />否
- <input class="radioStyle" type="radio" name="ybdsh" id="" value="1" />是
- </td>
- <th>来电号码密级:</th>
- <td>
- <input class="radioStyle" type="radio" name="mj" id="" value="0" />普通
- <input class="radioStyle" type="radio" name="mj" id="" value="1" checked="checked" />保密
- </td>
- </tr>
- <tr>
- </tr>
- <tr>
- <th class="">来电人:</th>
- <td>
- <input type="text" id="cusname" class="form-control" />
- </td>
- <th>性别:</th>
- <td>
- <select class="form-control" id="cussex">
- <option value="">请选择</option>
- <option value="0">男</option>
- <option value="1">女</option>
- </select>
- </td>
- <th class="Importent">来电号码:</th>
- <td>
- <input type="text" id="cusphone" class="form-control" />
- </td>
- </tr>
- <tr>
- <th>类型:</th>
- <td>
- <select class="form-control" id="type"></select>
- </td>
- <th class="Importent">反映类别:</th>
- <td class="reflectCategory-wrapper">
- <input type="text" id="reflectCategory" class="form-control" autocomplete="off" />
- <div class="reflectCategoryList-wrapper">
- <ul id="reflectCategoryList">
- </ul>
- </div>
- </td>
- <th class="Importent">紧急程度:</th>
- <td>
- <select class="form-control" id="level">
- <option value="1">普通</option>
- <option value="2">紧急</option>
- </select>
- </td>
- </tr>
- <tr>
- <th>来源:</th>
- <td>
- <select class="form-control" id="source"></select>
- </td>
- <!-- <th>自动派单:</th>
- <td>
- <select class="form-control" id="automaticDispatch">
- <option value="">请选择</option>
- <option value="1">是</option>
- <option value="">否</option>
- </select>
- </td> -->
- <th>回访方式:</th>
- <td>
- <select class="form-control" id="visittype">
- <option value="0">正常回访</option>
- <option value="1">无需回访</option>
- </select>
- </td>
- <th>联系电话:</th>
- <td>
- <input type="text" id="conphone" class="form-control" />
- </td>
-
- </tr>
- <tr>
- <th>是否营商:</th>
- <td>
- <select name="" id="isbusiness" class="form-control">
- <option value="0" selected="selected">否</option>
- <option value="1">是</option>
- </select>
- </td>
- </tr>
- <tr class="leaderCharge-wrapper" style="display: none;">
- <th class="">分管领导:</th>
- <td>
- <select class="form-control" id="leaderCharge">
- <option value="">请选择</option>
- <option value="省长">省长</option>
- <option value="市长">市长</option>
- </select>
- </td>
- </tr>
- <tr class="phonetype-wrapper SMSIDflag">
- <th class="phonetype">电话类别:</th>
- <td>
- <select class="form-control" id="phonetype">
- <option value="">请选择</option>
- </select>
- </td>
-
- <td>
- <select style="display: none;" class="form-control" id="phonetype1">
- <option value="" >请选择</option>
- </select>
- </td>
- <td>
- <select style="display: none;" class="form-control" id="phonetype2">
- <option value="">请选择</option>
- </select>
- </td>
- </tr>
- <tr>
- <td colspan="8" style="text-align: center;">
- <div class="btn_box">
- <button class="btns BC">保存</button>
- <button class="btns SavedSubmit">保存并提交</button>
- </div>
- </td>
- </tr>
-
- <tr class="Nows_box Hidens">
- <th>办理状态:</th>
- <td>
- <select class="select_" id="completionStatus">
- <option value="0">正常</option>
- <option value="1">撤单</option>
- <option value="2">废单</option>
- </select>
- </td>
- </tr>
-
- <tr class="Nows_box Hidens">
- <th>办理附件:</th>
- <td colspan="7">
- <div class="fileBoxHandle"></div>
- <input class="input" type="file" name="upFile" id="upFileHandle" multiple="multiple"
- style="display: none;">
- <input class="input" type="button" value="上传" id="scwjHandle" />
- <input type="hidden" id="fileHandle" />
- <span style="color:#FF0000; border: none;">
- (文件格式为png,jpg,mp4,avi,wmv,mp3,pdf,doc,docx,xls,xlsx)
- </span>
- </td>
- </tr>
- <tr class="Nows_box Hidens">
- <th>直办内容:</th>
- <td colspan="7">
- <textarea id="result" class="form-control" name="" rows="3" cols=""
- style="width: 100%;"></textarea>
- <!-- <input type="text" style="width: 100%;" id="result" class="form-control" /> -->
- </td>
- </tr>
- <tr>
- <th>事发区域:</th>
- <td>
- <select class="form-control" id="sourcearea"></select>
- </td>
- <th>乡镇:</th>
- <td>
- <select class="form-control" id="township"></select>
- </td>
- <th>村:</th>
- <td>
- <select class="form-control" id="village"></select>
- </td>
- </tr>
- <tr>
- <th>详细地址:</th>
- <td colspan="3">
- <input id="sourceaddress" class="form-control" type="text" placeholder="输入详细地址"
- style="padding-left: 15px;" />
- </td>
- </tr>
- <tr>
- <th class="Importent"></th>
- <td colspan="7">
- <div style="width:710px">
- <div id="myMap" style="width:100%;height:400px;"></div>
- <input type="hidden" class="store_Lng" value="114.352482" />
- <input type="hidden" class="store_Lat" value="36.103442" />
- </div>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- <input type="hidden" id="PID" value="" />
- <script src="../js/layui/layui.js"></script>
- <script src="https://api.map.baidu.com/api?v=2.0&ak=ZG4gLQZUD6Eq1K11cqlYAR4by8CKgLyu&callback=mapinit"></script>
- <script src="../css/laydate/laydate.js"></script>
- <script src="../js/adjustHeight.js"></script>
- <script src="../js/zTree/jquery.ztree.core.js"></script>
- <script src="../js/appeal/mapIndex.js"></script>
- <script src="../js/ztreeSelect.js"></script>
- <script src="../Script/Common/huayi.common.js"></script>
- <script>
- var submit;
- // var incomingContect
- var roleCode = $.cookie("code");
- var callID = helper.request.queryString("CallID");
- var source = helper.request.queryString("source");
-
- var CallRecordsId = helper.request.queryString("CallRecordsId");
- var SMSID = helper.request.queryString("SMSID")
- var callerNum = helper.request.queryString("callerNum")
-
- var dmtadd = helper.request.queryString("dmtadd")
- var isaddorder = helper.request.queryString("isaddorder")
- $(document).ready(function () {
-
- QY($("#sourcearea"));
- // 获取乡镇,默认文峰区
- getTownshipVillage($("#township"), 4965);
- LY($("#source"));
- LB($("#type"));
- ZT($("#keys"));
- getBigtype($("#phonetype1"));
- getBigtypeKey($("#phonetype2"),3060);
- getPhoneType($("#phonetype"));
-
- getReactionCategory();
- if(CallRecordsId&&callerNum){
- $("#cusphone").val(callerNum)
- }
- if (SMSID) {
- $(".SMSIDflag").hide()
- }
- $(".phonetype-wrapper").hide()
-
- if(dmtadd){//多媒体
- $(' input[name="banli"]').change(function () {
- var val = $(this).val();
- if (val == "1") {
- $('.yibanbox').show()
- } else {
- $('.yibanbox').hide()
- }
- })
- }
- //当即办理
- $(' input[name="banli"]').change(function () {
- var val = $(this).val();
- if (val == "1") {
- $(".Nows_box").show();
- } else {
- $(".Nows_box").hide();
- }
- })
-
- $(".BC").click(function () {
- submit = 0;
- Add();
- })
- $('.SavedSubmit').click(function () {
- submit = 1;
- Add();
- })
- //上传附件
- $("#scwj").click(function () {
- $("#upFile").trigger("click");
- })
- $("#upFile").change(function () {
- upload('upFile','.fileBox',['png','jpg','mp3','mp4','pdf','doc','docx','xls','xlsx','avi','wmv'],"#file");
- })
- //上传附件
- $("#scwjHandle").click(function () {
- $("#upFileHandle").trigger("click");
- })
- $("#upFileHandle").change(function () {
- upload('upFileHandle','.fileBoxHandle',['png','jpg','mp3','mp4','pdf','doc','docx','xls','xlsx','avi','wmv'],'#fileHandle');
- })
- $("#reflectCategory").bind("input propertychange", function () {
- $(".layui-dropdown").hide();
- if ($("#reflectCategory").val() == "") {
- $(".reflectCategoryList-wrapper").hide();
- return;
- }
- var debounceGetSearchReactionCategory = debounce(getSearchReactionCategory, 500)
- $(".reflectCategoryList-wrapper").show();
- debounceGetSearchReactionCategory($("#reflectCategory").val())
- })
- $("#reflectCategoryList").on("click", "li", function () {
- $(".reflectCategoryList-wrapper").hide();
- $("#reflectCategory").val($(this).attr("indexName"));
- $("#PID").val($(this).attr("index"));
- });
- });
- //电话类别为12348 法律服务热线
- $("#phonetype").change(function(){
- console.log($("#phonetype").val())
- if($("#phonetype").val()=='12348'){
- $("#phonetype1").show()
- $("#phonetype2").show()
- }else{
- $("#phonetype1").hide()
- $("#phonetype2").hide()
- $("#phonetype1").val('')
- $("#phonetype2").val('')
- }
- })
- $("#phonetype1").change(function(){
- getBigtypeKey($("#phonetype2"),$("#phonetype1").val());
- console.log($("#phonetype1").val())
- })
- $("#phonetype2").change(function(){
- console.log($("#phonetype2").val())
- })
- //添加工单
- function Add() {
- var threeWayCall;
- var value = $(' input[name="banli"]:checked ').val();
- var content = $("#content").val();
- if ($('#threeWayCall').is(':checked')) {
- threeWayCall = 1;
- } else {
- threeWayCall = 0;
- }
- if(isaddorder=='1'){
- $("#phonetype2").val('')
- }
- if (!$("#cusphone").val()) {
- layer.msg("请输入来电号码");
- } else if (!$("#title").val()) {
- layer.msg("请输入标题");
- } else if (!$("#content").val()) {
- layer.msg("请输入内容");
- } else if (!$("#PID").val()) {
- layer.msg("请选择反映类别");
- } else if (!$("#sourcearea").val()) {
- layer.msg("请选择事发区域");
- } else if (value == 1 && !$('#result').val()) {
- layer.msg("请输入直办内容");
- } else {
- $.ajax({
- type: "post",
- url: huayi.config.callcenter_url + "/WorkOrder/AddWorkOrder",
- dataType: 'json',
- async: true,
- beforeSend: function () { //触发ajax请求开始时执行
- $('.BC').attr("disabled", true);
- $('.SavedSubmit').attr("disabled", true);
- $('.BC').text('提交中...');
- $('.SavedSubmit').text('提交中...');
- $(".BC").css('background',"#cccccc");
- $(".SavedSubmit").css('background',"#cccccc");
- $(document).off('click', '.BC', Add);
- $(document).off('click', '.SavedSubmit', Add);
- },
- data: {
- completionStatus: $("#completionStatus").val(),
- bigtype:$("#phonetype2").val(),
- cusname: $("#cusname").val(), //=来电人姓名
- cussex: $("#cussex").val(),
- cusphone: $("#cusphone").val().replace(/\s+/g, ""), //=来电人电话
- email: $("#email").val(),
- zipcode: $("#zipcode").val(),
- conphone: $("#conphone").val(),
- callid: callID,
- CallRecordsId:CallRecordsId,
- title: $("#title").val(),
- content: $("#content").val(),
- files: $("#file").val(), // 工单附件(多个用英文逗号,隔开)
- file: $("#fileHandle").val(), // 办理附件(多个用英文逗号,隔开)
- sourcearea: $("#sourcearea").val(), //=事发地域id
- township: $("#township").val(), // 乡镇
- village: $("#village").val(), // 村
- sourceaddress: $('#sourceaddress').val(), //=事发详细地址
- longitude: $('.store_Lng').val(),
- latitude: $('.store_Lat').val(),
- source: $("#source").val(), //=来源
- splituser: $("#leaderCharge").val(), // 分管领导
- isresult: $(' input[name="banli"]:checked ').val(), //=(0转办1直办)
- business: threeWayCall,
- isbusiness: $("#isbusiness").val(),
- result: $('#result').val(),
- keys: $("#PID").val(), //=关键词id(多个用英文逗号,隔开)
- type: $("#type").val(), //=类型
- smsid:SMSID,
- isprotect: $(' input[name="mj"]:checked ').val(), //=(0普通1保密)
- isexamine: $(' input[name="ybdsh"]:checked ').val(), //已办待审核1是
- level: $('#level').val(), //=(1普通2紧急)
- visittype: $("#visittype").val(), // 回访方式
- issubmit: submit, //=(0保存1保存并提交)
- phonetype: $("#source").val() === "1" ? $("#phonetype").val() : "", // 电话类别
- token: $.cookie("token")
- },
- success: function (data) {
- if (CallRecordsId || SMSID) {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent.layer.msg("创建工单成功");
- parent.$('#list').bootstrapTable('refresh');
- return
- }
- $('.BC').attr("disabled", false);
- $('.SavedSubmit').attr("disabled", false);
- $('.BC').text('保存');
- $('.SavedSubmit').text('保存并提交');
- $(".BC").css('background',"#00a1cb");
- $(".SavedSubmit").css('background',"#00a1cb");
- $(document).on('click', '.BC', Add);
- $(document).on('click', '.SavedSubmit', Add);
- Clean();
- $('.fileBox').html('');
- $('.fileBoxHandle').html('');
- layer.msg("创建工单成功");
- $("#phonetype1").hide()
- $("#phonetype2").hide()
- $("#phonetype1").val('')
- $("#phonetype2").val('')
- $("#phonetype").val('12345')
- }
- });
- }
- }
- //上传文件
- // function upload() {
- // var Files = document.getElementById("upFile").files;
- // console.log(Files);
- // if (Files.length > 0) {
- // var formData = new FormData();
- // for (var i = 0; i < Files.length; i++) {
- // formData.append('file' + i, Files[i]);
- // }
- // formData.append("token", $.cookie("token"));
- // console.log(formData,0000)
- // var typeName = Files[0].name.split('.')[Files[0].name.split(".").length-1];
- // if (typeName == "png" || typeName == 'jpg' || typeName == 'mp4' || typeName == 'avi' || typeName ==
- // 'wmv' || typeName == 'mp3' || typeName == 'pdf' || typeName == 'doc' || typeName == 'docx' ||
- // typeName == 'xls' || typeName == 'xlsx') {
- // $.ajax({
- // url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
- // type: "POST",
- // data: formData,
- // /**
- // *必须false才会自动加上正确的Content-Type
- // */
- // contentType: false,
- // /**
- // * 必须false才会避开jQuery对 formdata 的默认处理
- // * XMLHttpRequest会对 formdata 进行正确的处理
- // */
- // processData: false,
- // success: function (result) {
- // document.getElementById("upFile").outerHTML = document.getElementById("upFile")
- // .outerHTML;
- // $("#upFile").change(function () {
- // upload();
- // });
- // var r = $.parseJSON(result);
- // if (r.state.toLowerCase() == "success") {
- //
- // var a = r.data;
- // $(a).each(function (i, n) {
- // var strs = '<span class="files" fiel-num="' + n.F_FileId +
- // '">' + n.F_FileName.substring(19) +
- // '<i class="fa fa-remove del_file"></i></span>'
- // $(strs).appendTo($('.fileBox')).find('.del_file').click(
- // function (event) {
- // event.stopPropagation();
- // $(this).parent().remove();
- // file_num()
- // })
- // })
- // file_num();
- // }
- // }
- // });
- // } else {
- // layer.msg("格式不正确");
- // }
- //
- // } else {
- // layer.confirm('请上传文件!', {
- // btn: ['确定']
- // });
- // }
- // }
- // //上传文件隐藏域值
- // function file_num() {
- // var str = '';
- // var Str;
- // $('.fileBox .files').each(function (j, m) {
- // var aa = $(m).attr("fiel-num")
- // console.log(aa);
- // str += aa + ",";
- // Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
- // })
- // $("#file").val(Str);
- // }
- // //上传文件
- // function uploadHandle() {
- // var Files = document.getElementById("upFileHandle").files;
- // console.log(Files);
- // if (Files.length > 0) {
- // var formData = new FormData();
- // for (var i = 0; i < Files.length; i++) {
- // formData.append('file' + i, Files[i]);
- // }
- // formData.append("token", $.cookie("token"));
- // var typeName = Files[0].name.split('.')[1];
- // if (typeName == "png" || typeName == 'jpg' || typeName == 'mp4' || typeName == 'avi' || typeName ==
- // 'wmv' || typeName == 'mp3' || typeName == 'pdf' || typeName == 'doc' || typeName == 'docx' ||
- // typeName == 'xls' || typeName == 'xlsx') {
- // $.ajax({
- // url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
- // type: "POST",
- // data: formData,
- // /**
- // *必须false才会自动加上正确的Content-Type
- // */
- // contentType: false,
- // /**
- // * 必须false才会避开jQuery对 formdata 的默认处理
- // * XMLHttpRequest会对 formdata 进行正确的处理
- // */
- // processData: false,
- // success: function (result) {
- // document.getElementById("upFileHandle").outerHTML = document.getElementById("upFileHandle")
- // .outerHTML;
- // $("#upFileHandle").change(function () {
- // uploadHandle();
- // });
- // var r = $.parseJSON(result);
- // if (r.state.toLowerCase() == "success") {
- //
- // var a = r.data;
- // $(a).each(function (i, n) {
- // var strs = '<span class="filesHandle" fiel-num="' + n.F_FileId +
- // '">' + n.F_FileName.substring(19) +
- // '<i class="fa fa-remove del_file"></i></span>'
- // $(strs).appendTo($('.fileBoxHandle')).find('.del_file').click(
- // function (event) {
- // event.stopPropagation();
- // $(this).parent().remove();
- // file_numHandle()
- // })
- // })
- // file_numHandle();
- // }
- // }
- // });
- // } else {
- // layer.msg("格式不正确");
- // }
- //
- // } else {
- // layer.confirm('请上传文件!', {
- // btn: ['确定']
- // });
- // }
- // }
- // //上传文件隐藏域值
- // function file_numHandle() {
- // var str = '';
- // var Str;
- // $('.fileBoxHandle .filesHandle').each(function (j, m) {
- // var aa = $(m).attr("fiel-num")
- // console.log(aa);
- // str += aa + ",";
- // Str = (str.substring(str.length - 1) == ',') ? str.substring(0, str.length - 1) : str;
- // })
- // $("#fileHandle").val(Str);
- // }
- //来源
- function LY(obj) {
- obj.empty();
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
- dataType: "json",
- async: true,
- data: {
- "token": $.cookie("token"),
- id: 1
- },
- success: function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>")
- .appendTo(obj);
- })
- }
- if (SMSID) {
- obj.val("6")
- obj.attr("disabled","disabled")
- $("#cusphone").val(callerNum)
- $("#cusphone").attr("disabled","disabled")
- $("#content").val(localStorage.getItem("incomingContect"))
- localStorage.setItem("incomingContect","")
- }else if(source){
- if (source != "12") {
- obj.val('2501')
- }else{
- obj.val("1")
- }
- }else{
- obj.val("1")
- }
-
- }
- });
- }
- //类别
- function LB(obj) {
- obj.empty();
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
- dataType: "json",
- async: true,
- data: {
- "token": $.cookie("token"),
- id: 2
- },
- success: function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>")
- .appendTo(obj);
- })
- if(source == "12"){
- $("#type option:selected").val(12 + "");
- $("#type option:selected").text('建议'); //来源
- $("#type").attr("disabled",true)
- }
-
- }
- }
- });
- }
- // 主题
- function ZT(obj) {
- obj.empty();
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
- dataType: "json",
- async: true,
- data: {
- "token": $.cookie("token"),
- type: 1,
- id: 3
- },
- success: function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>")
- .appendTo(obj);
- })
- }
- }
- });
- }
- //区域
- function QY(obj) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Area/GetAreaListById",
- dataType: "json",
- async: true,
- data: {
- "token": $.cookie("token"),
- },
- success: function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- if (n.F_AreaName !== "市区") {
- if (n.F_AreaName === "文峰区") {
- $("<option value='" + n.F_AreaId + "' selected='selected'>" + n
- .F_AreaName + "</option>").appendTo(obj);
- } else {
- $("<option value='" + n.F_AreaId + "'>" + n.F_AreaName +
- "</option>").appendTo(obj);
- }
- }
- })
- }
- }
- });
- }
- //获取乡镇、村
- function getTownshipVillage(obj, parentid) {
- obj.empty();
- obj.append('<option selected="selected" value="">请选择</option>');
- $.getJSON(
- huayi.config.callcenter_url + "Area/GetAreaChildren", {
- token: $.cookie("token"),
- parentid: parentid
- },
- function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_AreaId + "'>" + n.F_AreaName + "</option>").appendTo(
- obj);
- });
- }
- }
- );
- }
- // 获取乡镇
- $("#sourcearea").change(function () {
- getTownshipVillage($("#township"), $("#sourcearea").val())
- })
- // 获取村
- $("#township").change(function () {
- getTownshipVillage($("#village"), $("#township").val())
- })
- //电话类别
- function getPhoneType(obj) {
- obj.empty();
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
- dataType: "json",
- async: true,
- data: {
- "token": $.cookie("token"),
- id: 2498,
- },
- success: function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_Value + "'>" + n.F_Remark + "</option>")
- .appendTo(obj);
- })
- }
- }
- });
- }
- $("#source").change(function () {
- if ($("#source").val() === "4") {
- $(".leaderCharge-wrapper").show()
- $(".phonetype-wrapper").hide()
- } else if ($("#source").val() === "1") {
- $(".leaderCharge-wrapper").hide()
- $(".phonetype-wrapper").show()
- } else {
- $(".leaderCharge-wrapper").hide()
- $(".phonetype-wrapper").hide()
- }
- })
- function Clean() {
- $("#cusname").val(''); //=来电人姓名
- $("#cussex").val('');
- $("#cusphone").val(''); //=来电人电话
- $("#email").val('');
- $("#zipcode").val('');
- $("#conphone").val('');
- $("#title").val('');
- $("#content").val('');
- $("#sourcearea").val(); //=事发地域id
- $("#township").val(); // 乡镇
- $("#village").val(); // 村
- $('#sourceaddress').val(''); //=事发详细地址
- $("input[name='baomi'][value='1']").prop("checked", true) //=(0转办1直办)
- $("#type option:first").prop("selected", 'selected');
- $("#level option:first").prop("selected", 'selected');
- $("#visittype option:first").prop("selected", "selected");
- $("#keys option:first").prop("selected", 'selected');
- $('#result').val('');
- $(".inps").val('');
- $("#PID").val('');
- $("#reflectCategory").val("");
- $(".Cleans").hide();
- $('#threeWayCall').attr('checked', false);
- $("#file").val('');
- }
-
- function getBigtype(obj){
- obj.empty();
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
- dataType: "json",
- async: true,
- data: {
- "token": $.cookie("token"),
- type: 1,
- id: 3059
- },
- success: function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>")
- .appendTo(obj);
- })
- }
- }
- });
- }
-
- function getBigtypeKey(obj,id){
- obj.empty();
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "Dictionary/GetDicValueListById",
- dataType: "json",
- async: true,
- data: {
- "token": $.cookie("token"),
- type: 1,
- id: id
- },
- success: function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>")
- .appendTo(obj);
- })
- }
- }
- });
- }
- function getReactionCategory(pid = 38) {
- console.log("roleCode", roleCode)
- // 供暖专员只获取供暖问题
- if (roleCode === "GNZY") {
- pid = 2460;
- } else {
- pid = 38;
- }
- $.get(
- huayi.config.callcenter_url + "Dictionary/GetZTreeNew", {
- token: $.cookie("token"),
- pid: pid,
- },
- function (result) {
- result = $.parseJSON(result);
- var content = JSON.parse(result.data);
- layui.use("dropdown", function () {
- var dropdown = layui.dropdown;
- dropdown.render({
- elem: "#reflectCategory", //可绑定在任意元素中,此处以上述按钮为例
- data: content,
- id: "reflectCategory",
- //菜单被点击的事件
- click: function (obj) {
- $("#reflectCategory").val(obj.title)
- $("#PID").val(obj.id)
- },
- });
- });
- }
- );
- }
- function getSearchReactionCategory(key) {
- $.get(
- huayi.config.callcenter_url + "Dictionary/GetKeyListNew", {
- token: $.cookie("token"),
- key: key,
- },
- function (result) {
- result = $.parseJSON(result);
- if (result.state.toLowerCase() === "success") {
- $("#reflectCategoryList").empty();
- var content = result.data;
- if (content.length > 0) {
- content.forEach(function (e, i) {
- $("<li index='" + e.id + "' indexName='" + e.name + "'>" + e.names +
- "</li>")
- .appendTo("#reflectCategoryList");
- });
- } else {
- $("<li index='' indexName=''>没有相关数据</li>").appendTo("#reflectCategoryList");
- }
- }
- }
- );
- }
- function debounce(fun, delay) {
- return function (args) {
- var that = this;
- var _args = args
- clearTimeout(fun.id)
- fun.id = setTimeout(function () {
- fun.call(that, _args)
- }, delay)
- }
- }
-
- </script>
- </body>
- </html>
|