No Description

AddAppealDCL.html 34KB

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