暫無描述

AddAppealDCL.html 32KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8" />
  5. <script src="../Script/Common/huayi.load.js"></script>
  6. <script src="../Script/Common/huayi.config.js"></script>
  7. <link rel="stylesheet" href="../css/bootstrap-select.css" />
  8. <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  9. <link rel="stylesheet" href="../css/addappeal.css" />
  10. <link href="../css/layer/need/layer.css" />
  11. <link rel="stylesheet" href="../css/init.css" />
  12. <title>新增诉求工单</title>
  13. </head>
  14. <body>
  15. <input type="hidden" id="PID" value="" />
  16. <div class="wrapper wrapper-content animated fadeInRight">
  17. <div style="padding: 10px" class="tj_content clearFix">
  18. <div class="Common">
  19. <table>
  20. <tr>
  21. <th class="Importent">标题:</th>
  22. <td colspan="7">
  23. <input id="title" type="text" style="width: 100%" />
  24. </td>
  25. </tr>
  26. <tr>
  27. <th class="Importent">内容:</th>
  28. <td colspan="7">
  29. <textarea data-adaptheight id="content" name="" rows="" cols=""
  30. style="width: 100%"></textarea>
  31. </td>
  32. </tr>
  33. <tr>
  34. <th>附件上传:</th>
  35. <td colspan="7">
  36. <div class="fileBox"></div>
  37. <!--<span class="fjnr"></span>-->
  38. <input class="input" type="file" name="upFile" id="upFile" multiple="multiple"
  39. style="display: none" />
  40. <input class="input" type="button" value="上传" id="scwj" />
  41. <input class="input" type="button" value="删除附件" id="scfj" style="display: none" />
  42. <input type="hidden" id="file" />
  43. <span style="color: #ff0000; border: none">
  44. (文件格式为png,jpg,mp4,mp3,pdf,doc,docx,xls,xlsx)
  45. </span>
  46. </td>
  47. </tr>
  48. <tr>
  49. <th>处理方式:</th>
  50. <td colspan="7">
  51. <input type="radio" value="1" name="banli" class="Nows" />当即办理
  52. <input checked="true" type="radio" value="0" name="banli" class="Nows_" />网络转办
  53. </td>
  54. </tr>
  55. <tr class="Nows_box Hidens">
  56. <th>办理内容:</th>
  57. <td colspan="7">
  58. <input type="text" style="width: 100%" id="result" />
  59. </td>
  60. </tr>
  61. <tr>
  62. <th class="Importent">姓名:</th>
  63. <td>
  64. <input type="text" id="cusname" />
  65. </td>
  66. <th>性别:</th>
  67. <td>
  68. <select class="select_" id="SEX">
  69. <option value="">请选择</option>
  70. <option value="0">男</option>
  71. <option value="1">女</option>
  72. </select>
  73. </td>
  74. <th>来源:</th>
  75. <td>
  76. <select class="select_" id="source"></select>
  77. </td>
  78. <th class="Importent">来电号码:</th>
  79. <td>
  80. <input type="text" id="cusphone" />
  81. </td>
  82. </tr>
  83. <tr>
  84. <th>类型:</th>
  85. <td>
  86. <select class="select_" id="type"></select>
  87. </td>
  88. <th class="Importent">反映类别:</th>
  89. <td style="position: relative">
  90. <div class="inpBox">
  91. <input type="text" class="inps" onkeyup="darptSearch()" />
  92. <i class="Cleans fa fa-close"></i>
  93. <i class="xl xl_one"></i>
  94. <div class="addTree xlAdd">
  95. <ul id="addTreeDemo" class="ztree"></ul>
  96. </div>
  97. </div>
  98. <div class="selDpart1">
  99. <ul id="sponsor"></ul>
  100. </div>
  101. </td>
  102. <th>来电号码密级:</th>
  103. <td>
  104. <input type="radio" name="mj" id="" value="0" />普通
  105. <input type="radio" name="mj" id="" value="1" />保密
  106. </td>
  107. <th>紧急程度:</th>
  108. <td>
  109. <select class="select_" id="level">
  110. <!--<option value="0">选择</option>-->
  111. <option value="1">普通</option>
  112. <option value="2">紧急</option>
  113. </select>
  114. </td>
  115. </tr>
  116. <tr>
  117. <th>承办单位:</th>
  118. <td colspan="3">
  119. <select id="jbSelect" name="select" class="selectpicker show-tick form-control" multiple
  120. data-live-search="true">
  121. </select>
  122. </td>
  123. </tr>
  124. <tr class="limittimeWrapper">
  125. <th>办理时限:</th>
  126. <td colspan="3">
  127. <select class="startTime" id="startTime"
  128. style="width: 200px; height: 30px; line-height: 30px;">
  129. <!--<option value="0">选择</option>-->
  130. <option value="1">一天</option>
  131. <option value="3">三天</option>
  132. <option value="5">五天</option>
  133. <option value="7">七天</option>
  134. </select>
  135. </td>
  136. </tr>
  137. <tr class="limittimesWrapper">
  138. <th>紧急时限:</th>
  139. <td colspan="">
  140. <input type="text" id="limittimes">
  141. </td>
  142. </tr>
  143. <tr>
  144. <td colspan="8" style="text-align: center">
  145. <!-- <div class="btn_box"> -->
  146. <!-- <button class="btns BC">保存</button> -->
  147. <button class="btns JB">审核通过</button>
  148. <button class="btns thBtn">回退</button>
  149. <!--<button class="btns SavedSubmit">保存并提交</button>-->
  150. <!-- </div> -->
  151. </td>
  152. </tr>
  153. <tr>
  154. <th class="Importent">事件地址:</th>
  155. <td colspan="7">
  156. <select class="select_" id="sourcearea"></select>
  157. </td>
  158. </tr>
  159. <tr>
  160. <th class="Importent"></th>
  161. <td colspan="7">
  162. <input id="sourceaddress" type="text" placeholder="输入详细地址"
  163. style="width: 50%; padding-left: 15px" />
  164. </td>
  165. </tr>
  166. <tr>
  167. <th class="Importent"></th>
  168. <td colspan="7">
  169. <div style="width: 710px">
  170. <div id="myMap" style="width: 100%; height: 400px"></div>
  171. <input type="hidden" class="store_Lng" value="114.398996" />
  172. <input type="hidden" class="store_Lat" value="36.104678" />
  173. </div>
  174. </td>
  175. </tr>
  176. </table>
  177. </div>
  178. </div>
  179. </div>
  180. <script src="https://api.map.baidu.com/api?v=2.0&ak=ZG4gLQZUD6Eq1K11cqlYAR4by8CKgLyu&callback=mapinit"></script>
  181. <script src="../css/laydate/laydate.js"></script>
  182. <script src="../js/bootstrap-select.js"></script>
  183. <script src="../js/adjustHeight.js"></script>
  184. <script src="../js/appeal/index.js"></script>
  185. <script src="../js/zTree/jquery.ztree.core.js"></script>
  186. <script src="../js/ztreeSelect.js"></script>
  187. <script>
  188. var wid = helper.request.queryString("wid");
  189. var submit;
  190. $(document).ready(function () {
  191. QY($("#sourcearea"));
  192. LY($("#source"));
  193. LB($("#type"));
  194. ZT($("#keys"));
  195. jbSelect($("#jbSelect"));
  196. laydate.skin("blue");
  197. laydate({
  198. elem: "#limittimes",
  199. event: "focus",
  200. istime: true,
  201. format: 'YYYY-MM-DD hh:mm:ss'
  202. });
  203. //当即办理
  204. $(' input[name="banli"]').change(function () {
  205. var val = $(this).val();
  206. if (val == "1") {
  207. $(".Nows_box").show();
  208. } else {
  209. $(".Nows_box").hide();
  210. }
  211. });
  212. $(".BC").click(function () {
  213. submit = 0;
  214. Add();
  215. });
  216. $(".JB").click(function () {
  217. submit = 0;
  218. Add();
  219. });
  220. //上传附件
  221. $("#scwj").click(function () {
  222. $("#upFile").trigger("click");
  223. });
  224. $("#upFile").change(function () {
  225. upload();
  226. });
  227. $(".SavedSubmit").click(function () {
  228. submit = 1;
  229. Add();
  230. });
  231. $(".thBtn").click(function () {
  232. layer.open({
  233. type: 2,
  234. content: "../CommonHtml/BackDatil.html?wid=" + wid, //iframe的url,no代表不显示滚动条
  235. title: "工单回退",
  236. area: ["60%", "80%"], //宽高
  237. });
  238. });
  239. if (wid) {
  240. $.ajax({
  241. type: "get",
  242. url: huayi.config.callcenter_url +
  243. "WorkOrder/GetWorkOrder",
  244. dataType: "json",
  245. async: false,
  246. data: {
  247. workorderid: wid,
  248. token: $.cookie("token"),
  249. },
  250. success: function (data) {
  251. if (data.state.toLowerCase() == "success") {
  252. var Data = data.data.data;
  253. $("#cusname").val(Data[0].F_CusName);
  254. $("#cusphone").val(Data[0].F_CusPhone);
  255. $("#conphone").val(Data[0].F_ConPhone);
  256. $("#title").val(Data[0].F_ComTitle);
  257. $("#content").val(Data[0].F_ComContent);
  258. $("#email").val(Data[0].F_Email);
  259. $("#zipcode").val(Data[0].F_ZipCode);
  260. $("#result").val(Data[0].F_Result);
  261. $(".inps").val(Data[0].KeyName)
  262. $("#PID").val(Data[0].F_Key)
  263. if (Data[0].F_Longitude) {
  264. $(".store_Lng").val(Data[0].F_Longitude);
  265. $(".store_Lat").val(Data[0].F_Latitude);
  266. }
  267. //x性别
  268. $("#SEX option:selected").val(
  269. Data[0].F_CusSex + ""
  270. );
  271. if (Data[0].F_CusSex == "0") {
  272. $("#SEX option:selected").text("男"); //乡镇
  273. } else {
  274. $("#SEX option:selected").text("女"); //乡镇
  275. }
  276. //来源
  277. $("#source option:selected").val(
  278. Data[0].F_InfoSource + ""
  279. );
  280. $("#source option:selected").text(
  281. Data[0].SourceName
  282. ); //来源
  283. //事件地址
  284. $("#sourcearea option:selected").val(
  285. Data[0].F_SourceArea + ""
  286. );
  287. $("#sourcearea option:selected").text(
  288. Data[0].AreaName
  289. ); //事件地址
  290. //主题词
  291. $("#keys option:selected").val(
  292. Data[0].F_Key + ""
  293. );
  294. $("#keys option:selected").text(
  295. Data[0].KeyName
  296. ); //主题词
  297. //类型
  298. $("#type option:selected").val(
  299. Data[0].F_InfoType + ""
  300. );
  301. $("#type option:selected").text(
  302. Data[0].TypeName1
  303. ); //类型
  304. //紧急程度
  305. $("#level").val(Data[0].F_Level + "");
  306. if (Data[0].F_Level == "1") {
  307. $("#level option:selected").text("普通"); //乡镇
  308. $(".limittimesWrapper").hide()
  309. $(".limittimeWrapper").show()
  310. } else {
  311. $("#level option:selected").text("紧急"); //乡镇
  312. $(".limittimesWrapper").show()
  313. $(".limittimeWrapper").hide()
  314. }
  315. if (Data[0].F_IsResult == 1) {
  316. $(".Nows_box").toggle();
  317. }
  318. $(
  319. ' input[name="mj"][value="' +
  320. Data[0].F_IsProtect +
  321. '"]'
  322. ).prop("checked", "checked");
  323. $(
  324. ' input[name="banli"][value="' +
  325. Data[0].F_IsResult +
  326. '"]'
  327. ).prop("checked", "checked");
  328. $("#sourceaddress").val(
  329. Data[0].F_SourceAddress
  330. );
  331. $(".F_FinalOpinion").val(
  332. Data[0].F_FinalOpinion
  333. );
  334. $(Data[0].File).each(function (k, q) {
  335. var strs =
  336. '<span class="files" fiel-num="' +
  337. q.F_FileId +
  338. '">' +
  339. q.F_FileName.substring(19) +
  340. '<i class="fa fa-remove del_file"></i></span>';
  341. $(strs)
  342. .appendTo($(".fileBox"))
  343. .find(".del_file")
  344. .click(function (event) {
  345. event.stopPropagation();
  346. $(this).parent().remove();
  347. file_num();
  348. });
  349. file_num();
  350. });
  351. }
  352. },
  353. });
  354. }
  355. });
  356. ///修改工单
  357. function Add() {
  358. var jbSelect = $("#jbSelect").val();
  359. var startTime = $("#startTime").val();
  360. var limittimes = $("#limittimes").val();
  361. console.log(jbSelect)
  362. console.log(startTime)
  363. //坐席
  364. // var usercodeID = "";
  365. // var usercode_ = $("#ZX").val(); //坐席
  366. // if (usercode_ != null) {
  367. // $(usercode_).each(function (i, n) {
  368. // var obj1 = "";
  369. // obj1 = n + ",";
  370. // usercodeID += obj1;
  371. // });
  372. // } else {
  373. // usercodeID = "";
  374. // }
  375. var value = $(' input[name="banli"]:checked ').val();
  376. var content = $("#content").val();
  377. // if (!$("#cusname").val()) {
  378. // layer.msg("请输入姓名");
  379. // } else
  380. // if (!$("#cusphone").val()) {
  381. // layer.msg("请输入来电号码");
  382. // } else if (!$("#title").val()) {
  383. // layer.msg("请输入标题");
  384. // } else if (!$("#content").val()) {
  385. // layer.msg("请输入内容");
  386. // } else if (!$("#keys").val()) {
  387. // layer.msg("请选择主题词");
  388. // } else if (!$("#sourcearea").val()) {
  389. // layer.msg("请选择事发区域");
  390. // } else if (value == 1 && !$("#result").val()) {
  391. // layer.msg("请输入直办内容");
  392. // } else {
  393. $.ajax({
  394. type: "post",
  395. url: huayi.config.callcenter_url +
  396. "WorkOrder/EditWorkOrder",
  397. dataType: "json",
  398. async: true,
  399. data: {
  400. workorderid: wid,
  401. cusname: $("#cusname").val(), //=来电人姓名
  402. cussex: $("#SEX").val(),
  403. cusphone: $("#cusphone").val(), //=来电人电话
  404. email: $("#email").val(),
  405. zipcode: $("#zipcode").val(),
  406. conphone: $("#conphone").val(),
  407. title: $("#title").val(),
  408. content: $("#content").val(),
  409. files: $("#file").val(), //(多个用英文逗号,隔开)
  410. sourcearea: $("#sourcearea").val(), //=事发地域id
  411. sourceaddress: $("#sourceaddress").val(), //=事发详细地址
  412. source: $("#source").val(), //=来源
  413. isresult: $(' input[name="banli"]:checked ').val(), //=(0转办1直办)
  414. result: $("#result").val(),
  415. keys: $("#PID").val(), //=关键词id(多个用英文逗号,隔开) keys
  416. type: $("#type").val(), //=类型
  417. bigtype: $("#bigtype").val(), //=大类别
  418. smalltype: $("#smalltype").val(), //=小类别
  419. isprotect: $(' input[name="mj"]:checked ').val(), //=(0普通1保密)
  420. level: $("#level").val(), //=(1普通2紧急)
  421. issubmit: submit, //=(0保存1保存并提交)
  422. token: $.cookie("token"),
  423. },
  424. success: function (data) {
  425. if (data.state.toLowerCase() == "success") {
  426. layer.open({
  427. type: 2,
  428. content: "../CommonHtml/jiaoban.html?wid=" + wid + "&jbSelect=" +
  429. jbSelect + "&startTime=" + startTime + "&limittimes=" + limittimes +
  430. "&level=" + $("#level").val(), //iframe的url,no代表不显示滚动条
  431. title: "工单交办",
  432. area: ["95%", "95%"], //宽高
  433. });
  434. // var index = parent.layer.getFrameIndex(
  435. // window.name
  436. // ); //先得到当前iframe层的索引
  437. // parent.layer.close(index); //再执行关闭
  438. // parent
  439. // .$("#orderlist")
  440. // .bootstrapTable("refresh");
  441. // parent.layer.msg(data.message);
  442. $(".fileBox").html("");
  443. }
  444. },
  445. });
  446. // }
  447. }
  448. $("#level").click(function () {
  449. var level = $("#level").val();
  450. if (level === "1") {
  451. $(".limittimesWrapper").hide()
  452. $(".limittimeWrapper").show()
  453. } else if (level === "2" ) {
  454. $(".limittimesWrapper").show()
  455. $(".limittimeWrapper").hide()
  456. }
  457. })
  458. //上传文件隐藏域值
  459. function file_num() {
  460. var str = "";
  461. var Str;
  462. $(".fileBox .files").each(function (j, m) {
  463. var aa = $(m).attr("fiel-num");
  464. console.log(aa);
  465. str += aa + ",";
  466. Str =
  467. str.substring(str.length - 1) == "," ?
  468. str.substring(0, str.length - 1) :
  469. str;
  470. });
  471. $("#file").val(Str);
  472. }
  473. //来源
  474. function LY(obj) {
  475. obj.empty();
  476. obj.append(
  477. '<option selected="selected" value="">请选择</option>'
  478. );
  479. $.ajax({
  480. type: "get",
  481. url: huayi.config.callcenter_url +
  482. "Dictionary/GetDicValueListById",
  483. dataType: "json",
  484. async: false,
  485. data: {
  486. token: $.cookie("token"),
  487. id: 1,
  488. },
  489. success: function (data) {
  490. if (data.state.toLowerCase() == "success") {
  491. var content = data.data;
  492. $(content).each(function (i, n) {
  493. $(
  494. "<option value='" +
  495. n.F_ValueId +
  496. "'>" +
  497. n.F_Value +
  498. "</option>"
  499. ).appendTo(obj);
  500. });
  501. }
  502. },
  503. });
  504. }
  505. //类别
  506. function LB(obj) {
  507. obj.empty();
  508. obj.append(
  509. '<option selected="selected" value="">请选择</option>'
  510. );
  511. $.ajax({
  512. type: "get",
  513. url: huayi.config.callcenter_url +
  514. "Dictionary/GetDicValueListById",
  515. dataType: "json",
  516. async: false,
  517. data: {
  518. token: $.cookie("token"),
  519. id: 2,
  520. },
  521. success: function (data) {
  522. if (data.state.toLowerCase() == "success") {
  523. var content = data.data;
  524. $(content).each(function (i, n) {
  525. $(
  526. "<option value='" +
  527. n.F_ValueId +
  528. "'>" +
  529. n.F_Value +
  530. "</option>"
  531. ).appendTo(obj);
  532. });
  533. }
  534. },
  535. });
  536. }
  537. // 主题
  538. function ZT(obj) {
  539. obj.empty();
  540. obj.append(
  541. '<option selected="selected" value="">请选择</option>'
  542. );
  543. $.ajax({
  544. type: "get",
  545. url: huayi.config.callcenter_url +
  546. "Dictionary/GetDicValueListById",
  547. dataType: "json",
  548. async: false,
  549. data: {
  550. token: $.cookie("token"),
  551. id: 3,
  552. },
  553. success: function (data) {
  554. if (data.state.toLowerCase() == "success") {
  555. var content = data.data;
  556. $(content).each(function (i, n) {
  557. $(
  558. "<option value='" +
  559. n.F_ValueId +
  560. "'>" +
  561. n.F_Value +
  562. "</option>"
  563. ).appendTo(obj);
  564. });
  565. }
  566. },
  567. });
  568. }
  569. //区域
  570. function QY(obj) {
  571. obj.empty();
  572. obj.append(
  573. '<option selected="selected" value="">请选择</option>'
  574. );
  575. $.ajax({
  576. type: "get",
  577. url: huayi.config.callcenter_url + "Area/GetAreaListById",
  578. dataType: "json",
  579. async: false,
  580. data: {
  581. token: $.cookie("token"),
  582. },
  583. success: function (data) {
  584. if (data.state.toLowerCase() == "success") {
  585. var content = data.data;
  586. $(content).each(function (i, n) {
  587. if (n.F_AreaName != "安阳市") {
  588. $(
  589. "<option value='" +
  590. n.F_AreaId +
  591. "'>" +
  592. n.F_AreaName +
  593. "</option>"
  594. ).appendTo(obj);
  595. }
  596. });
  597. }
  598. },
  599. });
  600. }
  601. //上传文件
  602. function upload() {
  603. var Files = document.getElementById("upFile").files;
  604. if (Files.length > 0) {
  605. var formData = new FormData();
  606. for (var i = 0; i < Files.length; i++) {
  607. formData.append("file" + i, Files[i]);
  608. }
  609. formData.append("token", $.cookie("token"));
  610. var typeName = Files[0].name.split(".")[1];
  611. if (
  612. typeName == "png" ||
  613. typeName == "jpg" ||
  614. typeName == "mp4" ||
  615. typeName == "mp3" ||
  616. typeName == "pdf" ||
  617. typeName == "doc" ||
  618. typeName == "docx" ||
  619. typeName == "xls" ||
  620. typeName == "xlsx"
  621. ) {
  622. $.ajax({
  623. url: huayi.config.callcenter_url +
  624. "/WorkOrder/UploadFile",
  625. type: "POST",
  626. data: formData,
  627. /**
  628. *必须false才会自动加上正确的Content-Type
  629. */
  630. contentType: false,
  631. /**
  632. * 必须false才会避开jQuery对 formdata 的默认处理
  633. * XMLHttpRequest会对 formdata 进行正确的处理
  634. */
  635. processData: false,
  636. success: function (result) {
  637. document.getElementById(
  638. "upFile"
  639. ).outerHTML = document.getElementById(
  640. "upFile"
  641. ).outerHTML;
  642. $("#upFile").change(function () {
  643. upload();
  644. });
  645. var r = $.parseJSON(result);
  646. if (r.state.toLowerCase() == "success") {
  647. var a = r.data;
  648. $(a).each(function (i, n) {
  649. var strs =
  650. '<span class="files" fiel-num="' +
  651. n.F_FileId +
  652. '">' +
  653. n.F_FileName.substring(19) +
  654. '<i class="fa fa-remove del_file"></i></span>';
  655. $(strs)
  656. .appendTo($(".fileBox"))
  657. .find(".del_file")
  658. .click(function (event) {
  659. event.stopPropagation();
  660. $(this).parent().remove();
  661. file_num();
  662. });
  663. });
  664. file_num();
  665. }
  666. },
  667. });
  668. } else {
  669. layer.msg("格式不正确");
  670. }
  671. } else {
  672. layer.confirm("请上传文件!", {
  673. btn: ["确定"],
  674. });
  675. }
  676. }
  677. function closePage() {
  678. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  679. parent.layer.close(index); //再执行关闭
  680. parent.$("#orderlist").bootstrapTable("refresh");
  681. parent.layer.msg("操作成功");
  682. }
  683. function jbSelect(obj) {
  684. obj.empty();
  685. $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", {
  686. "token": $.cookie("token"),
  687. "iscbdw": 1,
  688. }, function (data) {
  689. if (data.state.toLowerCase() == "success") {
  690. var content = data.data;
  691. $("<option value=''>请选择</option>").appendTo(obj);
  692. $(content).each(function (i, n) {
  693. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(
  694. obj);
  695. })
  696. obj.selectpicker({
  697. noneSelectedText: '请选择' //默认显示内容
  698. });
  699. obj.selectpicker('refresh');
  700. }
  701. })
  702. }
  703. function xbSelect(obj) {
  704. obj.empty();
  705. $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", {
  706. "token": $.cookie("token"),
  707. "iscbdw": 1,
  708. }, function (data) {
  709. if (data.state.toLowerCase() == "success") {
  710. var content = data.data;
  711. $(content).each(function (i, n) {
  712. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(
  713. obj);
  714. })
  715. obj.selectpicker({
  716. noneSelectedText: '请选择' //默认显示内容
  717. });
  718. obj.selectpicker('refresh');
  719. }
  720. })
  721. }
  722. </script>
  723. </body>
  724. </html>