Bez popisu

AddAppealDCL.html 33KB

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