| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831 |
- <!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="../css/bootstrap-select.css" />
- <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
- <link rel="stylesheet" href="../css/addappeal.css" />
- <link href="../css/layer/need/layer.css" />
- <link rel="stylesheet" href="../css/init.css" />
- <title>新增诉求工单</title>
- </head>
- <body>
- <input type="hidden" id="PID" value="" />
- <div class="wrapper wrapper-content animated fadeInRight">
- <div style="padding: 10px" class="tj_content clearFix">
- <div class="Common">
- <table>
- <tr>
- <th class="Importent">标题:</th>
- <td colspan="7">
- <input id="title" type="text" style="width: 100%" />
- </td>
- </tr>
- <tr class="content-wrapper">
- <th class="Importent">来电内容:</th>
- <td colspan="7">
- <textarea data-adaptheight id="content" name="" rows="" cols="" style="width: 100%"
- readonly="readonly"></textarea>
- </td>
- </tr>
- <tr class="workcontent-wrapper">
- <th class="Importent">工单内容:</th>
- <td colspan="7">
- <textarea data-adaptheight id="workcontent" name="" rows="" cols=""
- style="width: 100%;"></textarea>
- </td>
- </tr>
- <tr>
- <th>附件上传:</th>
- <td colspan="7">
- <div class="fileBox"></div>
- <!--<span class="fjnr"></span>-->
- <input class="input" type="file" name="upFile" id="upFile" multiple="multiple"
- style="display: none" />
- <input class="input" type="button" value="上传" id="scwj" />
- <input class="input" type="button" value="删除附件" id="scfj" style="display: none" />
- <input type="hidden" id="file" />
- <span style="color: #ff0000; border: none">
- (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
- </span>
- </td>
- </tr>
- <tr>
- <th>处理方式:</th>
- <td colspan="7">
- <input type="radio" value="1" name="banli" class="Nows" />当即办理
- <input checked="true" type="radio" value="0" name="banli" class="Nows_" />网络转办
- </td>
- </tr>
- <tr class="Nows_box Hidens">
- <th>办理内容:</th>
- <td colspan="7">
- <textarea id="result" name="" rows="" cols="" style="width: 100%; height: 80px;"></textarea>
- </td>
- </tr>
- <tr>
- <th class="Importent">姓名:</th>
- <td>
- <input type="text" id="cusname" />
- </td>
- <th>性别:</th>
- <td>
- <select class="select_" id="SEX">
- <option value="">请选择</option>
- <option value="0">男</option>
- <option value="1">女</option>
- </select>
- </td>
- <th>来源:</th>
- <td>
- <select class="select_" id="source"></select>
- </td>
- <th class="Importent">来电号码:</th>
- <td>
- <input type="text" id="cusphone" />
- </td>
- </tr>
- <tr>
- <th>类型:</th>
- <td>
- <select class="select_" id="type"></select>
- </td>
- <th class="Importent">反映类别:</th>
- <td style="position: relative">
- <div class="inpBox">
- <input type="text" class="inps" onkeyup="darptSearch()" />
- <i class="Cleans fa fa-close"></i>
- <i class="xl xl_one"></i>
- <div class="addTree xlAdd">
- <ul id="addTreeDemo" class="ztree"></ul>
- </div>
- </div>
- <div class="selDpart1">
- <ul id="sponsor"></ul>
- </div>
- </td>
- <th>来电号码密级:</th>
- <td>
- <input type="radio" name="mj" id="" value="0" />普通
- <input type="radio" name="mj" id="" value="1" />保密
- </td>
- <th>紧急程度:</th>
- <td>
- <select class="select_" id="level">
- <!--<option value="0">选择</option>-->
- <option value="1">普通</option>
- <option value="2">紧急</option>
- </select>
- </td>
- </tr>
- <tr>
- <th>承办单位:</th>
- <td colspan="3">
- <select id="jbSelect" name="select" class="selectpicker show-tick form-control" multiple
- data-live-search="true">
- </select>
- </td>
- </tr>
- <tr class="leaderCharge-wrapper" style="display: none;">
- <th class="">分管领导:</th>
- <td>
- <select class="select_" id="leaderCharge">
- <option value="">请选择</option>
- <option value="省长">省长</option>
- <option value="市长">市长</option>
- </select>
- </td>
- </tr>
- <tr class="limittimeWrapper">
- <th>办理时限:</th>
- <td colspan="3">
- <select class="startTime" id="startTime"
- style="width: 200px; height: 30px; line-height: 30px;">
- <!--<option value="0">选择</option>-->
- <option value="1">一天</option>
- <option value="3">三天</option>
- <option value="5">五天</option>
- <option value="7">七天</option>
- </select>
- </td>
- </tr>
- <tr class="limittimesWrapper">
- <th>紧急时限:</th>
- <td colspan="">
- <input type="text" id="limittimes">
- </td>
- </tr>
- <tr class="limittimesWrapperCB" style="display: none;">
- <th>办理时限:</th>
- <td colspan="">
- <input type="text" id="limittimesCB" autocomplete="off">
- </td>
- </tr>
- <tr>
- <td colspan="8" style="text-align: center">
- <!-- <div class="btn_box"> -->
- <button class="btns BC">保存</button>
- <button class="btns JB">审核通过</button>
- <button class="btns thBtn">回退</button>
- <button class="btns associatWorkOrder">关联工单</button>
- <!--<button class="btns SavedSubmit">保存并提交</button>-->
- <!-- </div> -->
- </td>
- </tr>
- <tr>
- <th class="Importent">事件地址:</th>
- <td colspan="7">
- <select class="select_" id="sourcearea"></select>
- </td>
- </tr>
- <tr>
- <th class="Importent"></th>
- <td colspan="7">
- <input id="sourceaddress" type="text" placeholder="输入详细地址"
- style="width: 50%; 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.398996" />
- <input type="hidden" class="store_Lat" value="36.104678" />
- </div>
- </td>
- </tr>
- </table>
- </div>
- </div>
- </div>
- <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/bootstrap-select.js"></script>
- <script src="../js/adjustHeight.js"></script>
- <script src="../js/appeal/index.js"></script>
- <script src="../js/zTree/jquery.ztree.core.js"></script>
- <script src="../js/ztreeSelect.js"></script>
- <script>
- var wid = helper.request.queryString("wid");
- var workType = helper.request.queryString("workType");
- var roleCode = $.cookie("code");
- var submit;
- $(document).ready(function () {
- QY($("#sourcearea"));
- LY($("#source"));
- LB($("#type"));
- ZT($("#keys"));
- jbSelect($("#jbSelect"));
- laydate.skin("blue");
- laydate({
- elem: "#limittimes",
- event: "focus",
- istime: true,
- format: 'YYYY-MM-DD hh:mm:ss'
- });
- laydate({
- elem: "#limittimesCB",
- event: "focus",
- // istime: true,
- format: 'YYYY-MM-DD'
- });
- // 管理员、中心话务员可编辑工单内容
- if (roleCode === "GLY") {
- $("#content").removeAttr("readonly")
- } else if (roleCode === "ZXHWY") {
- $(".workcontent-wrapper").hide()
- $("#content").removeAttr("readonly")
- }
- //当即办理
- $(' input[name="banli"]').change(function () {
- var val = $(this).val();
- if (val == "1") {
- $(".Nows_box").show();
- } else {
- $(".Nows_box").hide();
- }
- });
- $(".BC").click(function () {
- submit = 0;
- workType = ""
- Add();
- });
- $(".JB").click(function () {
- submit = 0;
- Add();
- });
- //上传附件
- $("#scwj").click(function () {
- $("#upFile").trigger("click");
- });
- $("#upFile").change(function () {
- upload();
- });
- $(".SavedSubmit").click(function () {
- submit = 1;
- Add();
- });
- $(".thBtn").click(function () {
- layer.open({
- type: 2,
- content: "../CommonHtml/BackDatil.html?wid=" + wid, //iframe的url,no代表不显示滚动条
- title: "工单回退",
- area: ["60%", "80%"], //宽高
- });
- });
- $(".associatWorkOrder").click(function () {
- layer.open({
- type: 2,
- content: "../CommonHtml/associatWorkOrder.html?wid=" +
- wid, //iframe的url,no代表不显示滚动条
- title: "关联工单",
- area: ["90%", "90%"], //宽高
- });
- });
- if (wid) {
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url + "WorkOrder/GetWorkOrderNew",
- dataType: "json",
- async: false,
- data: {
- workorderid: wid,
- type: 0, // 工单信息
- token: $.cookie("token"),
- },
- success: function (data) {
- if (data.state.toLowerCase() == "success") {
- var Data = data.data.data;
- $("#cusname").val(Data[0].F_CusName);
- $("#cusphone").val(Data[0].F_CusPhone);
- $("#conphone").val(Data[0].F_ConPhone);
- $("#title").val(Data[0].F_ComTitle);
- $("#content").val(Data[0].F_ComContent);
- if (Data[0].F_Content === "" || Data[0].F_Content === null) {
- $('#workcontent').val(Data[0].F_ComContent);
- } else {
- $('#workcontent').val(Data[0].F_Content);
- }
- $("#email").val(Data[0].F_Email);
- $("#zipcode").val(Data[0].F_ZipCode);
- $("#result").val(Data[0].F_Result);
- $(".inps").val(Data[0].KeyName)
- $("#PID").val(Data[0].F_Key)
- if (Data[0].F_Longitude) {
- $(".store_Lng").val(Data[0].F_Longitude);
- $(".store_Lat").val(Data[0].F_Latitude);
- }
- //x性别
- $("#SEX option:selected").val(
- Data[0].F_CusSex + ""
- );
- if (Data[0].F_CusSex == "0") {
- $("#SEX option:selected").text("男"); //乡镇
- } else {
- $("#SEX option:selected").text("女"); //乡镇
- }
- //来源
- $("#source option:selected").val(Data[0].F_InfoSource + "");
- $("#source option:selected").text(Data[0].SourceName); //来源
- if (Data[0].F_InfoSource + "" === "4") {
- $(".leaderCharge-wrapper").show()
- $("#leaderCharge").val(Data[0].splituser)
- }
- //事件地址
- $("#sourcearea option:selected").val(
- Data[0].F_SourceArea + ""
- );
- $("#sourcearea option:selected").text(
- Data[0].AreaName
- ); //事件地址
- //主题词
- $("#keys option:selected").val(
- Data[0].F_Key + ""
- );
- $("#keys option:selected").text(
- Data[0].KeyName
- ); //主题词
- //类型
- $("#type option:selected").val(
- Data[0].F_InfoType + ""
- );
- $("#type option:selected").text(
- Data[0].TypeName1
- ); //类型
- //紧急程度
- $("#level").val(Data[0].F_Level + "");
- if (workType === "cb") {
- $(".limittimeWrapper").hide()
- $(".limittimesWrapper").hide()
- $(".limittimesWrapperCB").show()
- } else {
- if (Data[0].F_Level == "2") {
- $("#level option:selected").text("紧急"); //乡镇
- $(".limittimesWrapper").show()
- $(".limittimeWrapper").hide()
- } else {
- $("#level option:selected").text("普通"); //乡镇
- $(".limittimesWrapper").hide()
- $(".limittimeWrapper").show()
- }
- }
- if (Data[0].F_IsResult == 1) {
- $(".Nows_box").toggle();
- }
- $(
- ' input[name="mj"][value="' +
- Data[0].F_IsProtect +
- '"]'
- ).prop("checked", "checked");
- $(
- ' input[name="banli"][value="' +
- Data[0].F_IsResult +
- '"]'
- ).prop("checked", "checked");
- $("#sourceaddress").val(
- Data[0].F_SourceAddress
- );
- $(".F_FinalOpinion").val(
- Data[0].F_FinalOpinion
- );
- $(Data[0].File).each(function (k, q) {
- var strs =
- '<span class="files" fiel-num="' +
- q.F_FileId +
- '">' +
- q.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();
- });
- }
- },
- });
- }
- });
- ///修改工单
- function Add() {
- var jbSelect = $("#jbSelect").val();
- var startTime = $("#startTime").val();
- var limittimes = $("#limittimes").val();
- var limittimesCB = $("#limittimesCB").val();
- //坐席
- // var usercodeID = "";
- // var usercode_ = $("#ZX").val(); //坐席
- // if (usercode_ != null) {
- // $(usercode_).each(function (i, n) {
- // var obj1 = "";
- // obj1 = n + ",";
- // usercodeID += obj1;
- // });
- // } else {
- // usercodeID = "";
- // }
- var value = $(' input[name="banli"]:checked ').val();
- var content = $("#content").val();
- // if (!$("#cusname").val()) {
- // layer.msg("请输入姓名");
- // } else
- // if (!$("#cusphone").val()) {
- // layer.msg("请输入来电号码");
- // } else if (!$("#title").val()) {
- // layer.msg("请输入标题");
- // } else if (!$("#content").val()) {
- // layer.msg("请输入内容");
- // } else if (!$("#keys").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/EditWorkOrder",
- dataType: "json",
- async: true,
- data: {
- workorderid: wid,
- cusname: $("#cusname").val(), //=来电人姓名
- cussex: $("#SEX").val(),
- cusphone: $("#cusphone").val(), //=来电人电话
- email: $("#email").val(),
- zipcode: $("#zipcode").val(),
- conphone: $("#conphone").val(),
- title: $("#title").val(),
- content: $("#content").val(),
- workcontent: $("#workcontent").val(),
- files: $("#file").val(), //(多个用英文逗号,隔开)
- sourcearea: $("#sourcearea").val(), //=事发地域id
- sourceaddress: $("#sourceaddress").val(), //=事发详细地址
- source: $("#source").val(), //=来源
- splituser: $("#leaderCharge").val(), // 分管领导
- isresult: $(' input[name="banli"]:checked ').val(), //=(0转办1直办)
- result: $("#result").val(),
- keys: $("#PID").val(), //=关键词id(多个用英文逗号,隔开) keys
- type: $("#type").val(), //=类型
- bigtype: $("#bigtype").val(), //=大类别
- smalltype: $("#smalltype").val(), //=小类别
- isprotect: $(' input[name="mj"]:checked ').val(), //=(0普通1保密)
- level: $("#level").val(), //=(1普通2紧急)
- issubmit: submit, //=(0保存1保存并提交)
- token: $.cookie("token"),
- },
- success: function (data) {
- if (data.state.toLowerCase() == "success") {
- if (workType === "cb") {
- layer.open({
- type: 2,
- content: "../CommonHtml/Cb.html?wid=" + wid + "&jbSelect=" +
- jbSelect + "&startTime=" + startTime + "&limittimes=" +
- limittimes + "&limittimesCB=" + limittimesCB +
- "&level=" + $("#level").val(), //iframe的url,no代表不显示滚动条
- title: "重办工单",
- area: ["95%", "95%"], //宽高
- });
- } else if (workType === "jb") {
- layer.open({
- type: 2,
- content: "../CommonHtml/jiaoban.html?wid=" + wid + "&jbSelect=" +
- jbSelect + "&startTime=" + startTime + "&limittimes=" +
- limittimes +
- "&level=" + $("#level").val(), //iframe的url,no代表不显示滚动条
- title: "工单交办",
- area: ["95%", "95%"], //宽高
- });
- } else {
- var index = parent.layer.getFrameIndex(
- window.name
- ); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent
- .$("#orderlist")
- .bootstrapTable("refresh");
- parent.layer.msg(data.message);
- }
- $(".fileBox").html("");
- }
- },
- });
- // }
- }
- $("#level").click(function () {
- var level = $("#level").val();
- if (workType === "cb") {
- $(".limittimesWrapperCB").show()
- } else {
- if (level === "2") {
- $(".limittimesWrapper").show()
- $(".limittimeWrapper").hide()
- } else {
- $(".limittimesWrapper").hide()
- $(".limittimeWrapper").show()
- }
- }
- })
- //上传文件隐藏域值
- 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 LY(obj) {
- obj.empty();
- obj.append(
- '<option selected="selected" value="">请选择</option>'
- );
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url +
- "Dictionary/GetDicValueListById",
- dataType: "json",
- async: false,
- 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);
- });
- }
- },
- });
- }
- //类别
- function LB(obj) {
- obj.empty();
- obj.append(
- '<option selected="selected" value="">请选择</option>'
- );
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url +
- "Dictionary/GetDicValueListById",
- dataType: "json",
- async: false,
- 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);
- });
- }
- },
- });
- }
- // 主题
- function ZT(obj) {
- obj.empty();
- obj.append(
- '<option selected="selected" value="">请选择</option>'
- );
- $.ajax({
- type: "get",
- url: huayi.config.callcenter_url +
- "Dictionary/GetDicValueListById",
- dataType: "json",
- async: false,
- data: {
- token: $.cookie("token"),
- 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: false,
- 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 != "安阳市") {
- $(
- "<option value='" +
- n.F_AreaId +
- "'>" +
- n.F_AreaName +
- "</option>"
- ).appendTo(obj);
- }
- });
- }
- },
- });
- }
- $("#source").click(function () {
- if ($("#source").val() === "4") {
- $(".leaderCharge-wrapper").show()
- } else {
- $(".leaderCharge-wrapper").hide()
- }
- })
- //上传文件
- function upload() {
- var Files = document.getElementById("upFile").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 == "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 closePage() {
- var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
- parent.layer.close(index); //再执行关闭
- parent.$("#orderlist").bootstrapTable("refresh");
- parent.layer.msg("操作成功");
- }
- function jbSelect(obj) {
- obj.empty();
- $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", {
- "token": $.cookie("token"),
- "iscbdw": 1,
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $("<option value=''>请选择</option>").appendTo(obj);
- $(content).each(function (i, n) {
- $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(
- obj);
- })
- obj.selectpicker({
- noneSelectedText: '请选择' //默认显示内容
- });
- obj.selectpicker('refresh');
- }
- })
- }
- function xbSelect(obj) {
- obj.empty();
- $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", {
- "token": $.cookie("token"),
- "iscbdw": 1,
- }, function (data) {
- if (data.state.toLowerCase() == "success") {
- var content = data.data;
- $(content).each(function (i, n) {
- $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(
- obj);
- })
- obj.selectpicker({
- noneSelectedText: '请选择' //默认显示内容
- });
- obj.selectpicker('refresh');
- }
- })
- }
- </script>
- </body>
- </html>
|