Нет описания

jiaoban.html 30KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846
  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 href="../css/layer/need/layer.css" />
  8. <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  9. <link rel="stylesheet" href="../css/init.css" />
  10. <title>交办</title>
  11. <style>
  12. #main {
  13. width: 788.8px;
  14. margin: 0 auto;
  15. -webkit-box-shadow: 1px 1px 9px 2px #d2d2d2;
  16. box-shadow: 1px 1px 9px 2px #d2d2d2;
  17. background-color: #fff;
  18. padding: 30px 60px 40px 60px;
  19. }
  20. .alignC {
  21. text-align: center;
  22. }
  23. .alignC h2 {
  24. font-family: "宋体";
  25. font-weight: bold;
  26. font-size: 22pt;
  27. letter-spacing: -1px;
  28. }
  29. .company {
  30. text-align: left;
  31. margin-bottom: 10px;
  32. display: none;
  33. }
  34. .company span {
  35. font-size: 14pt;
  36. padding-top: 20px;
  37. text-align: left;
  38. font-weight: normal;
  39. margin-left: 48px;
  40. vertical-align: middle;
  41. }
  42. #main table {
  43. margin: 0 auto;
  44. width: 600px;
  45. border-collapse: collapse;
  46. font-size: 13pt;
  47. font-family: "宋体";
  48. font-weight: 500;
  49. }
  50. tbody td {
  51. min-width: 10%;
  52. padding: 6px 0 6px 0;
  53. }
  54. .btn {
  55. margin-top: 4px;
  56. margin-bottom: 4px;
  57. background: #00a1cb;
  58. color: #fff;
  59. }
  60. .lxr,
  61. .mmdj,
  62. .jbyj,
  63. .cbyj,
  64. .ldps {
  65. white-space: normal;
  66. word-break: break-all;
  67. }
  68. .inpBox {
  69. border: 1px solid #a9a9a9;
  70. height: 27px;
  71. width: 469px;
  72. display: inline-block;
  73. position: relative;
  74. vertical-align: middle;
  75. }
  76. .inpBoxP {
  77. position: absolute;
  78. left: 131px;
  79. top: 1px;
  80. z-index: 111;
  81. }
  82. .addTree {
  83. background: #fff;
  84. position: absolute;
  85. width: 100%;
  86. border: 1px solid darkgrey;
  87. right: 0;
  88. top: 26px;
  89. display: none;
  90. z-index: 5;
  91. z-index: 112;
  92. }
  93. .menuContent {
  94. background: #fff;
  95. position: absolute;
  96. width: 100%;
  97. border: 1px solid darkgrey;
  98. right: 0;
  99. top: 26px;
  100. display: none;
  101. z-index: 5;
  102. }
  103. .addTree a,
  104. .addTree span,
  105. .ztree a,
  106. .ztree span {
  107. font-size: 16px;
  108. }
  109. .xl {
  110. display: inline-block;
  111. background: url(../../img/dropDown.png) no-repeat;
  112. height: 100%;
  113. background-position: center center;
  114. width: 20px;
  115. position: absolute;
  116. right: 0;
  117. top: 0px;
  118. /* background-color: #f7bc8b; */
  119. cursor: pointer;
  120. }
  121. ul.ztree {
  122. margin-top: 10px;
  123. width: 466px;
  124. height: 260px;
  125. overflow-y: scroll;
  126. overflow-x: auto;
  127. }
  128. .ztree li span {
  129. border: none;
  130. padding: 0;
  131. margin-left: 0;
  132. }
  133. .inps {
  134. width: 468px;
  135. height: 24px;
  136. outline: none;
  137. border: 0;
  138. border-image-width: 0;
  139. padding: 0;
  140. padding-left: 3px;
  141. font-size: 16px;
  142. }
  143. .xl {
  144. display: inline-block;
  145. background: url(../img/dropDown.png) no-repeat;
  146. height: 100%;
  147. background-position: center center;
  148. width: 20px;
  149. position: absolute;
  150. right: 0;
  151. top: 0px;
  152. /* background-color: #f7bc8b; */
  153. cursor: pointer;
  154. }
  155. .selDpart1 {
  156. position: absolute;
  157. left: 130px;
  158. top: 27px;
  159. z-index: 11111;
  160. width: 470px;
  161. line-height: 27px;
  162. background: #ffffff;
  163. display: none;
  164. }
  165. #sponsor {
  166. width: 468px;
  167. border: 1px solid #00a1cb;
  168. margin: 0;
  169. padding: 0;
  170. list-style: none;
  171. max-height: 212px;
  172. overflow-x: hidden;
  173. overflow-y: scroll;
  174. }
  175. #sponsor li {
  176. margin: 0;
  177. padding-left: 10px;
  178. width: 468px;
  179. height: 27px;
  180. line-height: 27px;
  181. list-style: none;
  182. }
  183. #sponsor li:hover {
  184. background: #00a1cb;
  185. }
  186. </style>
  187. </head>
  188. <body>
  189. <div id="main">
  190. <div class="alignC headerAlign">
  191. <br />
  192. <h2 style="margin-bottom: 15px">
  193. 安阳市12345政务服务热线交办单
  194. </h2>
  195. <div class="company">
  196. <span>单位模糊搜索:</span>
  197. <input type="text" class="" id="deptnameKeyword" autocomplete="off"
  198. onkeyup="deptnameKeywordOnkeyup()" />
  199. </div>
  200. <div class="company" style="position: relative">
  201. <span>承办单位:</span>
  202. <div class="inpBox inpBoxP">
  203. <input id="citySel1" class="inps" readonly />
  204. <input type="hidden" id="PID" />
  205. <i class="xl xl_one" id="xls"></i>
  206. <div class="addTree xlAdd">
  207. <ul id="addTreeDemo" class="ztree"></ul>
  208. </div>
  209. </div>
  210. <div class="selDpart1">
  211. <ul id="sponsor"></ul>
  212. </div>
  213. </div>
  214. <div class="company">
  215. <span>协办单位:</span>
  216. <div class="inpBox" id="organizer">
  217. <input id="citySel" class="inps" readonly />
  218. <input type="hidden" id="OPID" />
  219. <i class="xl xl_one" id="xl_one"></i>
  220. <div id="menuContent" class="menuContent">
  221. <ul id="treeDemo" class="ztree"></ul>
  222. </div>
  223. </div>
  224. </div>
  225. </div>
  226. <table class="alignC" border="1" cellpadding="4" cellspacing="0" bordercolor="#cbcbcb">
  227. <tbody>
  228. <tr style="min-height: 49px">
  229. <td rowspan="2" width="10%">编号</td>
  230. <td rowspan="2" width="22%">
  231. <span class="gdbhs"></span>
  232. </td>
  233. <td rowspan="2" width="13%">受理时间</td>
  234. <td rowspan="2" width="16%">
  235. <span class="tssj"></span>
  236. </td>
  237. <td width="13%">签收时间</td>
  238. <td>
  239. <span class="QSHJ"></span>
  240. </td>
  241. </tr>
  242. <tr style="min-height: 49px">
  243. <td>办理时限</td>
  244. <td>
  245. <input disabled="disabled" type="text" id="startTime" style="height: 32px; width: 96%"
  246. autocomplete="off" />
  247. <input disabled="disabled" type="text" id="limittimes" style="height: 32px; width: 96%"
  248. autocomplete="off" style="display: none;" />
  249. </td>
  250. </tr>
  251. <tr style="min-height: 49px">
  252. <td>来电人</td>
  253. <td>
  254. <span class="gdbh"></span>
  255. </td>
  256. <td>联系电话</td>
  257. <td>
  258. <span class="lxdh"></span>
  259. </td>
  260. <td>秘密等级</td>
  261. <td>
  262. <span class="MJ"></span>
  263. </td>
  264. </tr>
  265. <tr style="min-height: 49px">
  266. <td>地址</td>
  267. <td colspan="5" style="
  268. text-align: left;
  269. text-indent: 0.3em;
  270. padding: 4px;
  271. ">
  272. <span class="areaaddress"></span>
  273. <span class="mmdj"></span>
  274. </td>
  275. </tr>
  276. <tr style="height: 180px">
  277. <td class="style1">内容<br />摘要</td>
  278. <td colspan="5" style="
  279. text-align: justify;
  280. padding: 4px;
  281. text-indent: 2em;
  282. ">
  283. <span class="lxr"></span>
  284. </td>
  285. </tr>
  286. <tr style="height: 110px">
  287. <td>
  288. <span>调度<br />意见</span>
  289. </td>
  290. <td colspan="5">
  291. <textarea data-adaptheight id="assignedopinion" name="" rows="4" cols="" style="
  292. width: 97%;
  293. resize: none;
  294. padding-left: 6px;
  295. padding-right: 6px;
  296. "></textarea>
  297. </td>
  298. <input type="hidden" id="ID" />
  299. <input type="hidden" id="PID" />
  300. <input type="hidden" id="Dpment" />
  301. </tr>
  302. </tbody>
  303. </table>
  304. <!-- <div id="message" style="margin: 20px 0 0 30px">
  305. 是否发送短信
  306. <input type="radio" name="message" id="" value="0" checked />否
  307. <input type="radio" name="message" id="" value="1" />是
  308. </div> -->
  309. <div class="btn_box" style="text-align: center">
  310. <!-- <button class="btns BC">保存</button> -->
  311. <button class="btns Submit">保存并交办</button>
  312. </div>
  313. </div>
  314. <script src="../css/laydate/laydate.js"></script>
  315. <script src="../js/zTree/jquery.ztree.core.js"></script>
  316. <script src="../js/zTree/jquery.ztree.excheck.min.js"></script>
  317. <script src="../js/adjustHeight.js"></script>
  318. <script>
  319. var wid = helper.request.queryString("wid");
  320. var jbSelect = helper.request.queryString("jbSelect");
  321. var xbSelect = helper.request.queryString("xbSelect");
  322. var startTime = helper.request.queryString("startTime");
  323. var level = helper.request.queryString("level");
  324. var limittimes = decodeURIComponent(helper.request.queryString("limittimes"));
  325. var workType = helper.request.queryString("workType");
  326. var State = 0;
  327. var a = $("#ID").val();
  328. var assignAPI = "";
  329. $("#assignedopinion").val(
  330. "请于1小时内与来电人取得联系(匿名除外),并于7个工作日内将办理情况反馈来电人,并将办理结果报市长便民公开电话受理中心,同时做好来电人信息保密工作。(若超期将进行通报;若无故不回复,将转交市委市政府督查局。)"
  331. );
  332. $("#inpts").val($("#Dpment").val());
  333. var saveArrs = [];
  334. $(document).ready(function () {
  335. if (workType === "zzbl") {
  336. assignAPI = "WorkOrder/HandleAssign"
  337. } else {
  338. assignAPI = "WorkOrder/AssignWorkOrderNew"
  339. }
  340. if (level === "1") {
  341. $("#startTime").val(startTime + "天")
  342. } else if (level === "2") {
  343. $("#limittimes").val(limittimes)
  344. } else {
  345. $("#startTime").val(startTime + "天")
  346. }
  347. if (wid) {
  348. getDetail();
  349. getAssignDetail();
  350. }
  351. $("#inpts").val($("#Dpment").val());
  352. laydate.skin("blue");
  353. laydate({
  354. elem: "#startTime",
  355. event: "focus",
  356. });
  357. //保存
  358. $(".BC").click(function () {
  359. if (jbSelect == "") {
  360. layer.msg("承办单位不能为空");
  361. } else if (startTime == "") {
  362. layer.msg("办理时限不能为空");
  363. } else if ($("#assignedopinion").val() == "") {
  364. layer.msg("调度意见不能为空");
  365. } else {
  366. State = 0;
  367. JA();
  368. }
  369. });
  370. //保存并提交
  371. $(".Submit").click(function () {
  372. if (jbSelect == "") {
  373. layer.msg("承办单位不能为空");
  374. } else if (startTime == "") {
  375. layer.msg("办理时限不能为空");
  376. } else if ($("#assignedopinion").val() == "") {
  377. layer.msg("调度意见不能为空");
  378. } else {
  379. State = 1;
  380. JA();
  381. }
  382. });
  383. tree(saveArrs);
  384. });
  385. function deptnameKeywordOnkeyup() {
  386. tree(saveArrs);
  387. }
  388. // 单位模糊搜索
  389. function tree(saveArr) {
  390. $.get(
  391. huayi.config.callcenter_url + "Department/GetDeptList", {
  392. token: $.cookie("token"),
  393. iscbdw: 1,
  394. // "pid": pid
  395. deptname: $("#deptnameKeyword").val(),
  396. },
  397. function (result) {
  398. result = $.parseJSON(result);
  399. result1 = result;
  400. $.fn.zTree.init(
  401. $("#addTreeDemo"),
  402. setting1,
  403. result1.data
  404. ); //实例化树形图
  405. //父节点不显示checkbox
  406. //获取到zTree
  407. var zTree1 = $.fn.zTree.getZTreeObj("addTreeDemo");
  408. //设置只能选择最后一层的子节点
  409. var allNodes1 = zTree1.transformToArray(
  410. zTree1.getNodes()
  411. ); //
  412. //去掉选框
  413. if (allNodes1.length > 0) {
  414. for (var i = 0; i < allNodes1.length; i++) {
  415. if (allNodes1[i].F_IsDept == 0) {
  416. //找到父节点
  417. allNodes1[i].nocheck = true; //nocheck为true表示没有选择框
  418. zTree1.updateNode(allNodes1[i]);
  419. } else {
  420. allNodes1[i].nocheck = false; //nocheck为true表示没有选择框
  421. zTree1.updateNode(allNodes1[i]);
  422. }
  423. }
  424. }
  425. if (saveArr.length > 0) {
  426. for (var x = 0; x < saveArr.length; x++) {
  427. $(result.data).each(function (i, n) {
  428. if (saveArr[x] == n.F_DeptId) {
  429. n.checked = "true";
  430. }
  431. });
  432. }
  433. }
  434. $.fn.zTree.init($("#treeDemo"), setting, result.data);
  435. //父节点不显示checkbox
  436. //获取到zTree
  437. var zTree = $.fn.zTree.getZTreeObj("treeDemo");
  438. //设置只能选择最后一层的子节点
  439. var allNodes = zTree.transformToArray(zTree.getNodes()); //
  440. // console.log('allNodes', allNodes)
  441. //去掉选框
  442. // if (allNodes.length > 0) {
  443. // for (var i = 0; i < allNodes.length; i++) {
  444. // if (allNodes[i].F_IsDept == 0) {
  445. // //找到父节点
  446. // allNodes[i].nocheck = true; //nocheck为true表示没有选择框
  447. // zTree.updateNode(allNodes[i]);
  448. // } else {
  449. // allNodes[i].nocheck = false; //nocheck为true表示没有选择框
  450. // zTree.updateNode(allNodes[i]);
  451. // }
  452. // }
  453. // }
  454. }
  455. );
  456. }
  457. var setting1 = {
  458. data: {
  459. key: {
  460. name: "F_DeptName",
  461. },
  462. simpleData: {
  463. enable: true,
  464. idKey: "F_DeptId",
  465. pIdKey: "F_PartentId",
  466. rootPId: 0,
  467. },
  468. },
  469. // check: {
  470. // enable: true,
  471. // chkboxType: { Y: "", N: "" },
  472. // },
  473. view: {
  474. dblClickExpand: true,
  475. },
  476. callback: {
  477. // beforeClick: zTreeOnClick,
  478. onClick: onClick,
  479. },
  480. };
  481. function zTreeOnClick(treeId, treeNode) {
  482. var zTree = $.fn.zTree.getZTreeObj("addTreeDemo"),
  483. nodes = zTree.getCheckedNodes(true);
  484. zTree.checkNode(treeNode, !treeNode.checked, null, true);
  485. return false;
  486. }
  487. function onClick(e, treeId, treeNode) {
  488. var zTree = $.fn.zTree.getZTreeObj("addTreeDemo"),
  489. nodes = zTree.getCheckedNodes(true);
  490. console.log(treeNode);
  491. $("#citySel1").val(treeNode.F_DeptName);
  492. $("#PID").val(treeNode.F_DeptId);
  493. $("#Dpment").val(treeNode.F_DeptName);
  494. if (treeNode.F_IsSms == 1) {
  495. $('#message input[value="1"]').prop("checked", true);
  496. } else {
  497. $('#message input[value="0"]').prop("checked", true);
  498. }
  499. // if (treeNode.level >= 2) {
  500. // var v = "",
  501. // opid = "";
  502. // for (var i = 0, l = nodes.length; i < l; i++) {
  503. // v += nodes[i].F_DeptName + ",";
  504. // opid += nodes[i].F_DeptId + ",";
  505. // }
  506. // if (v.length > 0) v = v.substring(0, v.length - 1);
  507. // var cityObj = $("#citySel1");
  508. // cityObj.val(v);
  509. // if (opid.length > 0)
  510. // opid = opid.substring(0, opid.length - 1);
  511. // $("#PID").attr("value", opid);
  512. // }
  513. }
  514. var setting = {
  515. data: {
  516. key: {
  517. name: "F_DeptName",
  518. },
  519. simpleData: {
  520. enable: true,
  521. idKey: "F_DeptId",
  522. pIdKey: "F_PartentId",
  523. rootPId: 0,
  524. },
  525. },
  526. check: {
  527. enable: true,
  528. chkboxType: {
  529. Y: "",
  530. N: ""
  531. },
  532. },
  533. view: {
  534. dblClickExpand: true,
  535. },
  536. callback: {
  537. beforeClick: beforeClick,
  538. onCheck: onCheck,
  539. },
  540. };
  541. function beforeClick(treeId, treeNode) {
  542. var zTree = $.fn.zTree.getZTreeObj("treeDemo"),
  543. nodes = zTree.getCheckedNodes(true);
  544. zTree.checkNode(treeNode, !treeNode.checked, null, true);
  545. return false;
  546. }
  547. function onCheck(e, treeId, treeNode) {
  548. var zTree = $.fn.zTree.getZTreeObj("treeDemo"),
  549. nodes = zTree.getCheckedNodes(true);
  550. console.log(treeNode);
  551. // if (treeNode.level >= 2) {
  552. var v = "",
  553. opid = "";
  554. for (var i = 0, l = nodes.length; i < l; i++) {
  555. v += nodes[i].F_DeptName + ",";
  556. opid += nodes[i].F_DeptId + ",";
  557. }
  558. if (v.length > 0) v = v.substring(0, v.length - 1);
  559. var cityObj = $("#citySel");
  560. cityObj.val(v);
  561. if (opid.length > 0) opid = opid.substring(0, opid.length - 1);
  562. $("#OPID").attr("value", opid);
  563. // }
  564. }
  565. function showMenu() {
  566. var cityObj = $("#citySel");
  567. $("#menuContent")
  568. .css({
  569. left: 0,
  570. top: $("#citySel").height + "px"
  571. })
  572. .slideDown("fast");
  573. $("body").bind("mousedown", onBodyDown);
  574. }
  575. function hideMenu() {
  576. $("#menuContent").fadeOut("fast");
  577. $("body").unbind("mousedown", onBodyDown);
  578. }
  579. function onBodyDown(event) {
  580. if (
  581. !(
  582. event.target.id == "citySel" ||
  583. event.target.id == "menuContent" ||
  584. $(event.target).parents("#menuContent").length > 0
  585. )
  586. ) {
  587. hideMenu();
  588. }
  589. }
  590. //交办
  591. function JA() {
  592. $.ajax({
  593. type: "post",
  594. url: huayi.config.callcenter_url + assignAPI,
  595. dataType: 'json',
  596. async: true,
  597. beforeSend: function () { //触发ajax请求开始时执行
  598. $('.BC').attr("disabled", true);
  599. $('.Submit').attr("disabled", true);
  600. $('.BC').text('提交中...');
  601. $('.Submit').text('提交中...');
  602. },
  603. data: {
  604. workorderid: wid,
  605. maindeptid: jbSelect, //承办单位
  606. limittime: startTime, //办理时限
  607. limittimes: $("#limittimes").val(), // 紧急办理时限
  608. assignedopinion: $("#assignedopinion").val(), //交办意见
  609. state: State,
  610. assignid: a,
  611. token: $.cookie("token"),
  612. },
  613. success: function (result) {
  614. if (result.state.toLowerCase() == "success") {
  615. var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
  616. parent.layer.close(index); //再执行关闭
  617. parent.parent.$("#orderlist").bootstrapTable("refresh");
  618. parent.closePage();
  619. var savemsgs = State == 0 ? "保存成功" : "交办成功";
  620. parent.layer.msg(savemsgs);
  621. $('.BC').attr("disabled", false);
  622. $('.Submit').attr("disabled", false);
  623. $('.BC').text('保存');
  624. $('.Submit').text('保存并提交');
  625. // sendMessage();
  626. }
  627. }
  628. })
  629. }
  630. //发送短信
  631. function sendMessage() {
  632. $.post(
  633. huayi.config.callcenter_url + "WorkOrder/SendSms", {
  634. workordercode: wid,
  635. deptid: $("#PID").val(), //承办单位
  636. type: 0,
  637. isfs: $('#message input[type="radio"]:checked').val(),
  638. token: $.cookie("token"),
  639. },
  640. function (result) {
  641. result = JSON.parse(result);
  642. if (result.state.toLowerCase() == "success") {
  643. layer.msg("发送短信成功");
  644. }
  645. }
  646. );
  647. }
  648. //所属分类下拉
  649. $("#inpts").click(function () {
  650. $(".xlAdd").css("display", "block");
  651. });
  652. $("#xls").click(function () {
  653. if ($(".xlAdd").css("display") == "block") {
  654. $(".xlAdd").css("display", "none");
  655. } else {
  656. $(".xlAdd").css("display", "block");
  657. }
  658. });
  659. $(".addTree").mouseleave(function () {
  660. $(this).css("display", "none");
  661. });
  662. $("#citySel").click(function () {
  663. showMenu();
  664. });
  665. $("#xl_one").click(function () {
  666. showMenu();
  667. });
  668. $("#menuContent").mouseleave(function () {
  669. $(this).css("display", "none");
  670. });
  671. function darptSearch() {
  672. $(".xlAdd").css("display", "none");
  673. $(".selDpart1").css("display", "block");
  674. depart();
  675. }
  676. $("#sponsor").on("click", "li", function () {
  677. $(".selDpart1").css("display", "none");
  678. $("#inpts").val($(this).html());
  679. $("#Dpment").val($(this).html());
  680. //$("#Dpment").val($(this).attr("index"));
  681. $(".Cleans").show();
  682. });
  683. ///部门
  684. function depart() {
  685. $("#sponsor").empty();
  686. $.getJSON(
  687. huayi.config.callcenter_url +
  688. "Department/GetDeptListByDept", {
  689. token: $.cookie("token"),
  690. dept: $(".inps").val(),
  691. },
  692. function (data) {
  693. if (data.state.toLowerCase() == "success") {
  694. var content = data.data;
  695. $(content).each(function (i, n) {
  696. $(
  697. "<li index='" +
  698. n.F_DeptId +
  699. "'>" +
  700. n.F_DeptName +
  701. "</li>"
  702. ).appendTo("#sponsor");
  703. });
  704. }
  705. }
  706. );
  707. }
  708. function getDetail() {
  709. $.ajax({
  710. type: "get",
  711. url: huayi.config.callcenter_url + "WorkOrder/GetWorkOrderNew",
  712. dataType: 'json',
  713. async: true,
  714. data: {
  715. workorderid: wid,
  716. type: 0, // 工单信息
  717. token: $.cookie("token")
  718. },
  719. success: function (result) {
  720. if (result.state.toLowerCase() == "success") {
  721. var content = result.data;
  722. var level = content.data[0].F_Level + "";
  723. if (level === "2") {
  724. $("#startTime").hide()
  725. $("#limittimes").show()
  726. } else {
  727. $("#startTime").show()
  728. $("#limittimes").hide()
  729. }
  730. $(".gdbhs").text(content.data[0].F_WorkOrderId); //工单
  731. if (content.data[0].F_Content === "" || content.data[0].F_Content === null) {
  732. $('.lxr').text(content.data[0].F_ComContent);
  733. } else {
  734. $('.lxr').text(content.data[0].F_Content);
  735. }
  736. //保密工单模糊市民号码
  737. if (content.data[0].F_IsProtect == 0) {
  738. $(".lxdh").text(content.data[0].F_CusPhone);
  739. } else if (content.data[0].F_IsProtect == 1) {
  740. var cusPhone = content.data[0].F_CusPhone
  741. var cusPhoneSecret = cusPhone.substr(0, 3) + '****' + cusPhone.substr(7)
  742. $(".lxdh").text(cusPhoneSecret);
  743. }
  744. var T = content.data[0].F_CreateTime; //受理时间
  745. if (T) {
  746. var S = T.substring(0, T.indexOf(" "));
  747. $(".tssj").text(S);
  748. }
  749. $(".gdbh").text(content.data[0].F_CusName); //来电人
  750. $(".areaaddress").text(content.data[0].AreaName);
  751. $(".mmdj").text(content.data[0].F_SourceAddress); //地址
  752. if (content.data[0].F_DeptIdIsSms == 1) {
  753. $('#message input[value="1"]').attr(
  754. "checked",
  755. true
  756. );
  757. } else {
  758. $('#message input[value="0"]').attr(
  759. "checked",
  760. true
  761. );
  762. }
  763. //密级程度
  764. if (content.data[0].F_IsProtect == 0) {
  765. $(".MJ").text("普通");
  766. } else {
  767. $(".MJ").text("保密");
  768. }
  769. }
  770. }
  771. })
  772. }
  773. function getAssignDetail() {
  774. $.ajax({
  775. type: "get",
  776. url: huayi.config.callcenter_url + "WorkOrder/GetWorkOrderNew",
  777. dataType: 'json',
  778. async: true,
  779. data: {
  780. workorderid: wid,
  781. type: 1, // 工单信息
  782. token: $.cookie("token")
  783. },
  784. success: function (result) {
  785. if (result.state.toLowerCase() == "success") {
  786. if (content.jbdata.length > 0) {
  787. var qst = content.jbdata[0].F_SureTime; //签收时间
  788. if (qst) {
  789. var qs = qst.substring(
  790. 0,
  791. qst.indexOf(" ")
  792. );
  793. $(".QSHJ").text(qs);
  794. }
  795. }
  796. }
  797. }
  798. })
  799. }
  800. </script>
  801. </body>
  802. </html>