Нет описания

AddAppealDCL.html 33KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  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 (workType === "cb") {
  482. $(".limittimesWrapperCB").show()
  483. } else {
  484. if (level === "1") {
  485. $(".limittimesWrapper").hide()
  486. $(".limittimeWrapper").show()
  487. } else if (level === "2") {
  488. $(".limittimesWrapper").show()
  489. $(".limittimeWrapper").hide()
  490. }
  491. }
  492. })
  493. //上传文件隐藏域值
  494. function file_num() {
  495. var str = "";
  496. var Str;
  497. $(".fileBox .files").each(function (j, m) {
  498. var aa = $(m).attr("fiel-num");
  499. console.log(aa);
  500. str += aa + ",";
  501. Str =
  502. str.substring(str.length - 1) == "," ?
  503. str.substring(0, str.length - 1) :
  504. str;
  505. });
  506. $("#file").val(Str);
  507. }
  508. //来源
  509. function LY(obj) {
  510. obj.empty();
  511. obj.append(
  512. '<option selected="selected" value="">请选择</option>'
  513. );
  514. $.ajax({
  515. type: "get",
  516. url: huayi.config.callcenter_url +
  517. "Dictionary/GetDicValueListById",
  518. dataType: "json",
  519. async: false,
  520. data: {
  521. token: $.cookie("token"),
  522. id: 1,
  523. },
  524. success: function (data) {
  525. if (data.state.toLowerCase() == "success") {
  526. var content = data.data;
  527. $(content).each(function (i, n) {
  528. $(
  529. "<option value='" +
  530. n.F_ValueId +
  531. "'>" +
  532. n.F_Value +
  533. "</option>"
  534. ).appendTo(obj);
  535. });
  536. }
  537. },
  538. });
  539. }
  540. //类别
  541. function LB(obj) {
  542. obj.empty();
  543. obj.append(
  544. '<option selected="selected" value="">请选择</option>'
  545. );
  546. $.ajax({
  547. type: "get",
  548. url: huayi.config.callcenter_url +
  549. "Dictionary/GetDicValueListById",
  550. dataType: "json",
  551. async: false,
  552. data: {
  553. token: $.cookie("token"),
  554. id: 2,
  555. },
  556. success: function (data) {
  557. if (data.state.toLowerCase() == "success") {
  558. var content = data.data;
  559. $(content).each(function (i, n) {
  560. $(
  561. "<option value='" +
  562. n.F_ValueId +
  563. "'>" +
  564. n.F_Value +
  565. "</option>"
  566. ).appendTo(obj);
  567. });
  568. }
  569. },
  570. });
  571. }
  572. // 主题
  573. function ZT(obj) {
  574. obj.empty();
  575. obj.append(
  576. '<option selected="selected" value="">请选择</option>'
  577. );
  578. $.ajax({
  579. type: "get",
  580. url: huayi.config.callcenter_url +
  581. "Dictionary/GetDicValueListById",
  582. dataType: "json",
  583. async: false,
  584. data: {
  585. token: $.cookie("token"),
  586. id: 3,
  587. },
  588. success: function (data) {
  589. if (data.state.toLowerCase() == "success") {
  590. var content = data.data;
  591. $(content).each(function (i, n) {
  592. $(
  593. "<option value='" +
  594. n.F_ValueId +
  595. "'>" +
  596. n.F_Value +
  597. "</option>"
  598. ).appendTo(obj);
  599. });
  600. }
  601. },
  602. });
  603. }
  604. //区域
  605. function QY(obj) {
  606. obj.empty();
  607. obj.append(
  608. '<option selected="selected" value="">请选择</option>'
  609. );
  610. $.ajax({
  611. type: "get",
  612. url: huayi.config.callcenter_url + "Area/GetAreaListById",
  613. dataType: "json",
  614. async: false,
  615. data: {
  616. token: $.cookie("token"),
  617. },
  618. success: function (data) {
  619. if (data.state.toLowerCase() == "success") {
  620. var content = data.data;
  621. $(content).each(function (i, n) {
  622. if (n.F_AreaName != "安阳市") {
  623. $(
  624. "<option value='" +
  625. n.F_AreaId +
  626. "'>" +
  627. n.F_AreaName +
  628. "</option>"
  629. ).appendTo(obj);
  630. }
  631. });
  632. }
  633. },
  634. });
  635. }
  636. //上传文件
  637. function upload() {
  638. var Files = document.getElementById("upFile").files;
  639. if (Files.length > 0) {
  640. var formData = new FormData();
  641. for (var i = 0; i < Files.length; i++) {
  642. formData.append("file" + i, Files[i]);
  643. }
  644. formData.append("token", $.cookie("token"));
  645. var typeName = Files[0].name.split(".")[1];
  646. if (
  647. typeName == "png" ||
  648. typeName == "jpg" ||
  649. typeName == "mp4" ||
  650. typeName == "mp3" ||
  651. typeName == "pdf" ||
  652. typeName == "doc" ||
  653. typeName == "docx" ||
  654. typeName == "xls" ||
  655. typeName == "xlsx"
  656. ) {
  657. $.ajax({
  658. url: huayi.config.callcenter_url +
  659. "/WorkOrder/UploadFile",
  660. type: "POST",
  661. data: formData,
  662. /**
  663. *必须false才会自动加上正确的Content-Type
  664. */
  665. contentType: false,
  666. /**
  667. * 必须false才会避开jQuery对 formdata 的默认处理
  668. * XMLHttpRequest会对 formdata 进行正确的处理
  669. */
  670. processData: false,
  671. success: function (result) {
  672. document.getElementById(
  673. "upFile"
  674. ).outerHTML = document.getElementById(
  675. "upFile"
  676. ).outerHTML;
  677. $("#upFile").change(function () {
  678. upload();
  679. });
  680. var r = $.parseJSON(result);
  681. if (r.state.toLowerCase() == "success") {
  682. var a = r.data;
  683. $(a).each(function (i, n) {
  684. var strs =
  685. '<span class="files" fiel-num="' +
  686. n.F_FileId +
  687. '">' +
  688. n.F_FileName.substring(19) +
  689. '<i class="fa fa-remove del_file"></i></span>';
  690. $(strs)
  691. .appendTo($(".fileBox"))
  692. .find(".del_file")
  693. .click(function (event) {
  694. event.stopPropagation();
  695. $(this).parent().remove();
  696. file_num();
  697. });
  698. });
  699. file_num();
  700. }
  701. },
  702. });
  703. } else {
  704. layer.msg("格式不正确");
  705. }
  706. } else {
  707. layer.confirm("请上传文件!", {
  708. btn: ["确定"],
  709. });
  710. }
  711. }
  712. function closePage() {
  713. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  714. parent.layer.close(index); //再执行关闭
  715. parent.$("#orderlist").bootstrapTable("refresh");
  716. parent.layer.msg("操作成功");
  717. }
  718. function jbSelect(obj) {
  719. obj.empty();
  720. $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", {
  721. "token": $.cookie("token"),
  722. "iscbdw": 1,
  723. }, function (data) {
  724. if (data.state.toLowerCase() == "success") {
  725. var content = data.data;
  726. $("<option value=''>请选择</option>").appendTo(obj);
  727. $(content).each(function (i, n) {
  728. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(
  729. obj);
  730. })
  731. obj.selectpicker({
  732. noneSelectedText: '请选择' //默认显示内容
  733. });
  734. obj.selectpicker('refresh');
  735. }
  736. })
  737. }
  738. function xbSelect(obj) {
  739. obj.empty();
  740. $.getJSON(huayi.config.callcenter_url + "Department/GetDeptList", {
  741. "token": $.cookie("token"),
  742. "iscbdw": 1,
  743. }, function (data) {
  744. if (data.state.toLowerCase() == "success") {
  745. var content = data.data;
  746. $(content).each(function (i, n) {
  747. $("<option value='" + n.F_DeptId + "'>" + n.F_DeptName + "</option>").appendTo(
  748. obj);
  749. })
  750. obj.selectpicker({
  751. noneSelectedText: '请选择' //默认显示内容
  752. });
  753. obj.selectpicker('refresh');
  754. }
  755. })
  756. }
  757. </script>
  758. </body>
  759. </html>