暫無描述

AddAppealDCL.html 37KB

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