Нет описания

AddAppealDCL.html 34KB

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