Bez popisu

associatWorkOrder.html 29KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783
  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="../css/init.css" />
  9. <link rel="stylesheet" href="../js/zTree/zTreeStyle.css" />
  10. <link rel="stylesheet" href="../js/layui/css/layui.css">
  11. <title>关联工单</title>
  12. <style>
  13. .Common {
  14. z-index: 999;
  15. overflow-y: visible;
  16. }
  17. .btn_box {
  18. text-align: center;
  19. }
  20. .inpBox {
  21. border: 1px solid #cccccc;
  22. height: 31px;
  23. width: 220px;
  24. display: inline-block;
  25. position: relative;
  26. vertical-align: middle;
  27. position: absolute;
  28. left: 0px;
  29. top: 0px;
  30. z-index: 111;
  31. }
  32. .selDpart1 {
  33. position: absolute;
  34. left: 0px;
  35. top: 30px;
  36. z-index: 11111;
  37. width: 220px;
  38. line-height: 30px;
  39. background: #ffffff;
  40. display: none;
  41. }
  42. #sponsor {
  43. width: 218px;
  44. border: 1px solid #00a1cb;
  45. margin: 0;
  46. padding: 0;
  47. list-style: none;
  48. max-height: 212px;
  49. overflow-x: hidden;
  50. overflow-y: scroll;
  51. }
  52. #sponsor li {
  53. margin: 0;
  54. padding-left: 10px;
  55. width: 220px;
  56. height: 30px;
  57. line-height: 30px;
  58. list-style: none;
  59. }
  60. #sponsor li:hover {
  61. background: #00a1cb;
  62. }
  63. .addTree,
  64. .addTreeReactionCategory {
  65. background: #fff;
  66. position: absolute;
  67. width: 100%;
  68. border: 1px solid darkgrey;
  69. right: 0;
  70. top: 29px;
  71. display: none;
  72. z-index: 999;
  73. }
  74. .xl,
  75. .xlReactionCategory {
  76. display: inline-block;
  77. background: url(../../img/dropDown.png) no-repeat;
  78. height: 100%;
  79. background-position: center center;
  80. width: 20px;
  81. position: absolute;
  82. right: 0;
  83. top: 0px;
  84. /* background-color: #f7bc8b; */
  85. cursor: pointer;
  86. }
  87. .ztree li span {
  88. border: none;
  89. padding: 0;
  90. }
  91. .inps,
  92. .inpsReactionCategory {
  93. width: 217px;
  94. height: 29px;
  95. outline: none;
  96. border: 0;
  97. border-image-width: 0;
  98. padding: 0;
  99. padding-left: 3px;
  100. }
  101. .xl,
  102. .xlReactionCategory {
  103. display: inline-block;
  104. background: url(../img/dropDown.png) no-repeat;
  105. height: 100%;
  106. background-position: center center;
  107. width: 20px;
  108. position: absolute;
  109. right: 0;
  110. top: 0px;
  111. /* background-color: #f7bc8b; */
  112. cursor: pointer;
  113. }
  114. .Cleans,
  115. .CleansReactionCategory {
  116. display: inline-block;
  117. width: 20px;
  118. position: absolute;
  119. right: 21px;
  120. top: 8px;
  121. display: none;
  122. }
  123. </style>
  124. </head>
  125. <body>
  126. <div class="">
  127. <div class="Common">
  128. <div class="box_content">
  129. <table id="sqzx" style="width: 100%" border="0" cellspacing="0" cellpadding="0">
  130. <tr>
  131. <th>事项编号:</th>
  132. <td>
  133. <input type="text" placeholder="输入工单号" id="wids" class="Min-width" />
  134. </td>
  135. <th>工单状态:</th>
  136. <td>
  137. <select name="" id="state" class="select_">
  138. <option selected="selected" value="">
  139. 请选择
  140. </option>
  141. <option value="0">新工单</option>
  142. <option value="1">待交办</option>
  143. <!-- <option value="10">待审核</option> -->
  144. <option value="2">待查收</option>
  145. <option value="3">
  146. 退回审核中
  147. </option>
  148. <option value="4">办理中</option>
  149. <option value="5">
  150. 延时审核中
  151. </option>
  152. <option value="6">已办理</option>
  153. <!-- <option value="7">已回访</option> -->
  154. <option value="11">
  155. 重办待交办
  156. </option>
  157. <option value="13">重办驳回</option>
  158. <option value="8">重办中</option>
  159. <option value="9">已结案</option>
  160. </select>
  161. </td>
  162. <th>时间:</th>
  163. <td colspan="3">
  164. <input id="starttime" class="photo x-color laydate-icon" type="text" autocomplete="off"
  165. style="height: 35px;" />-<input id="endtime" class="photo x-color laydate-icon"
  166. type="text" autocomplete="off" style="height: 35px;" />
  167. </td>
  168. </tr>
  169. <tr>
  170. <th>工单来源:</th>
  171. <td>
  172. <select class="select_" id="source"></select>
  173. </td>
  174. <th>来电号码:</th>
  175. <td>
  176. <input type="text" id="tel" placeholder="请输入来电号码" />
  177. </td>
  178. <th>来电人:</th>
  179. <td>
  180. <input type="text" id="name" class="Min-width" autocomplete="off" />
  181. </td>
  182. <th>工单标题:</th>
  183. <td>
  184. <input type="text" placeholder="输入工单标题" id="workOrderTitle" class="Min-width" />
  185. </td>
  186. </tr>
  187. <tr>
  188. <th>来电内容:</th>
  189. <td>
  190. <input type="text" placeholder="输入来电内容" id="workOrderContent" class="Min-width" />
  191. </td>
  192. <th>区域:</th>
  193. <td>
  194. <select class="select_" id="sourceAreas"></select>
  195. </td>
  196. <th>反映类别:</th>
  197. <td style="position: relative;">
  198. <div class="inpBox">
  199. <input type="text" class="inpsReactionCategory" />
  200. <input type="hidden" id="keyid" />
  201. <i class="CleansReactionCategory fa fa-close"></i>
  202. <i class="xlReactionCategory xl_one"></i>
  203. <div class="addTreeReactionCategory xlAddReactionCategory">
  204. <ul id="addTreeDemoReactionCategory" class="ztree"></ul>
  205. </div>
  206. </div>
  207. </td>
  208. </tr>
  209. <tr>
  210. <th>承办单位:</th>
  211. <td style="position: relative">
  212. <div class="inpBox">
  213. <input type="text" class="inps" onkeyup="darptSearch()" />
  214. <i class="Cleans fa fa-close"></i>
  215. <i class="xl xl_one"></i>
  216. <div class="addTree xlAdd">
  217. <ul id="addTreeDemo" class="ztree"></ul>
  218. </div>
  219. </div>
  220. <div class="selDpart1">
  221. <ul id="sponsor"></ul>
  222. </div>
  223. </td>
  224. <td colspan="7" style="text-align: center">
  225. <botton class="btns Seach">搜索</botton>
  226. </td>
  227. </tr>
  228. <input type="hidden" id="PID" />
  229. <input type="hidden" id="Dpment" />
  230. </table>
  231. </div>
  232. </div>
  233. <div style="width: 100%; padding: 10px; z-index: 1">
  234. <table id="orderlist" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  235. <thead>
  236. <tr>
  237. <th data-field="state" data-checkbox="true"></th>
  238. <th data-formatter="serialNumber" data-align="center">
  239. 序号
  240. </th>
  241. <th data-field="F_WorkOrderId" data-formatter="View" data-align="center">
  242. 工单单号
  243. </th>
  244. <th data-field="F_ComTitle" data-formatter="GetCont" data-align="center">
  245. 诉求标题
  246. </th>
  247. <th data-field="DeptName" data-align="center">
  248. 承办单位
  249. </th>
  250. <!-- <th data-field="OtherDeptName" data-align="center">
  251. 协办单位
  252. </th> -->
  253. <th data-field="UserName" data-align="center">
  254. 受理人
  255. </th>
  256. <th data-field="F_WorkState" data-align="center" data-formatter="States">
  257. 办理状态
  258. </th>
  259. <th data-field="OverState" data-formatter="OverTime" data-align="center">
  260. 时限
  261. </th>
  262. <th data-field="LimitTime" data-formatter="BanTime" data-align="center">
  263. 办理时限
  264. </th>
  265. <!-- <th data-field="FilePath" data-formatter="setCode" data-align="center">
  266. 录音
  267. </th> -->
  268. <!-- <th data-field="F_WorkOrderId" data-formatter="Dispose" data-align="center">
  269. 操作
  270. </th> -->
  271. </tr>
  272. </thead>
  273. <tbody class="list"></tbody>
  274. </table>
  275. </div>
  276. <div class="btn_box">
  277. <button class="btns master">添加主工单</button>
  278. <button class="btns child">添加子工单</button>
  279. </div>
  280. </div>
  281. <script src="../js/layui/layui.js"></script>
  282. <script src="../js/adjustHeight.js"></script>
  283. <script src="../js/bootstrap-select.js"></script>
  284. <script src="../css/laydate/laydate.js"></script>
  285. <!-- <script src="../My97DatePicker/WdatePicker.js"></script> -->
  286. <script src="../js/zTree/jquery.ztree.core.js"></script>
  287. <script src="../js/search/screen.js"></script>
  288. <script src="../js/WorkOrder/WorkOrderList.js"></script>
  289. <script>
  290. var wid = helper.request.queryString("wid");
  291. var tab = helper.request.queryString("tab");
  292. var roleCode = $.cookie("code")
  293. var comprehensive;
  294. var jianhang;
  295. var phoneType;
  296. $(document).ready(function () {
  297. $(".master").click(function () {
  298. submit(0)
  299. })
  300. $(".child").click(function () {
  301. submit(1)
  302. })
  303. laydate.skin('blue');
  304. laydate({
  305. elem: '#starttime',
  306. event: 'focus',
  307. istime: true,
  308. format: 'YYYY-MM-DD hh:mm:ss'
  309. });
  310. laydate({
  311. elem: '#endtime',
  312. event: 'focus',
  313. istime: true,
  314. format: 'YYYY-MM-DD hh:mm:ss'
  315. });
  316. // laydate({
  317. // elem: '#dealstarttime',
  318. // event: 'focus',
  319. // istime: true,
  320. // format: 'YYYY-MM-DD hh:mm:ss'
  321. // });
  322. // laydate({
  323. // elem: '#dealstrendtime',
  324. // event: 'focus',
  325. // istime: true,
  326. // format: 'YYYY-MM-DD hh:mm:ss'
  327. // });
  328. if (roleCode === "MTDD") {
  329. comprehensive = ""
  330. jianhang = 1;
  331. phoneType = "";
  332. } else if (roleCode === "ZXLD") {
  333. comprehensive = ""
  334. jianhang = 0;
  335. phoneType = 2;
  336. } else {
  337. comprehensive = 1;
  338. jianhang = "";
  339. phoneType = "";
  340. }
  341. load()
  342. });
  343. // 提交
  344. function submit(state) {
  345. var ids = $.map($('#orderlist').bootstrapTable('getSelections'),
  346. function (row) {
  347. return row.F_WorkOrderId;
  348. });
  349. var workorderid;
  350. var subworkorderid;
  351. if (state === 0) {
  352. if (ids.length !== 1) {
  353. layer.confirm('请选择一条数据', {
  354. btn: ['确定'] //按钮
  355. });
  356. return;
  357. }
  358. workorderid = ids.join(",");
  359. subworkorderid = wid;
  360. } else if (state === 1) {
  361. workorderid = wid;
  362. subworkorderid = ids.join(",")
  363. }
  364. /*发送请求*/
  365. $.post(huayi.config.callcenter_url + "WorkOrder/RelationWorkOrder", {
  366. workorderid: workorderid,
  367. subworkorderid: subworkorderid,
  368. token: $.cookie("token")
  369. }, function (result) {
  370. result = JSON.parse(result);
  371. if (result.state.toLowerCase() == "success") {
  372. layer.msg("操作成功");
  373. load();
  374. }
  375. })
  376. }
  377. function load() {
  378. //坐席
  379. var usercodeID = "";
  380. var usercode_ = $("#ZX").val(); //坐席
  381. if (usercode_ != null) {
  382. $(usercode_).each(function (i, n) {
  383. var obj1 = "";
  384. obj1 = n + ",";
  385. usercodeID += obj1;
  386. });
  387. } else {
  388. usercodeID = "";
  389. }
  390. // 调度员
  391. var ddusercodeID = "";
  392. var ddusercode_ = $("#yardman").val(); //坐席
  393. if (ddusercode_ != null) {
  394. $(ddusercode_).each(function (i, n) {
  395. var obj2 = "";
  396. obj2 = n + ",";
  397. ddusercodeID += obj2;
  398. });
  399. } else {
  400. ddusercodeID = "";
  401. }
  402. //先销毁表格
  403. $("#orderlist").bootstrapTable("destroy");
  404. //初始化表格,动态从服务器加载数据
  405. $("#orderlist").bootstrapTable({
  406. method: "get", //使用get请求到服务器获取数据
  407. url: huayi.config.callcenter_url + "WorkOrder/GetList", //获取数据的Servlet地址
  408. contentType: "application/x-www-form-urlencoded",
  409. striped: true, //表格显示条纹
  410. pagination: true, //启动分页
  411. pageSize: 10, //每页显示的记录数
  412. pageNumber: 1, //当前第几页
  413. pageList: [10, 20, 50, 100], //记录数可选列表
  414. search: false, //是否启用查询
  415. showColumns: false, //显示下拉框勾选要显示的列
  416. showRefresh: false, //显示刷新按钮
  417. sidePagination: "server", //表示服务端请求
  418. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  419. //设置为limit可以获取limit, offset, search, sort, order
  420. queryParamsType: "undefined",
  421. queryParams: function queryParams(params) {
  422. //设置查询参数
  423. //alert(params.pageNumber)
  424. var param = {
  425. page: params.pageNumber,
  426. pagesize: params.pageSize,
  427. workid: $("#wids").val().replace(/\s+/g, ""),
  428. state: $("#state").val(), //=工单状态
  429. type: $("#type").val(), //=工单类型
  430. //bigtype: $("#bigtype").val(), //=大类别
  431. //smalltype: $("#smalltype").val(), //=小类别
  432. key: $("#key").val(), //=关键字
  433. tel: $("#tel").val().replace(/\s+/g, ""), //=客户电话
  434. name: $("#name").val().replace(/\s+/g, ""), //=客户名称
  435. usercode: usercodeID, //=坐席工号
  436. ddusercode: ddusercodeID,
  437. keyid: $("#keyid").val(), //=关键词id
  438. source: $("#source").val(), //=来源&
  439. starttime: $("#starttime").val(), //=开始时间
  440. endtime: $("#endtime").val(), //=结束时间
  441. deptid: $("#PID").val(),
  442. type: $("#type").val(),
  443. dealtype: $("#dealtype").val(),
  444. sourcearea: $("#sourceAreas").val(), // 区域
  445. ComTitle: $("#workOrderTitle").val().replace(/\s+/g, ""), // 工单标题
  446. ComContent: $("#workOrderContent").val().replace(/\s+/g, ""), // 工单内容
  447. // Result: $("#workOrderProcessingResult").val().replace(/\s+/g, ""), // 办理结果
  448. dealstarttime: $("#dealstarttime").val(), //办理开始时间
  449. dealstrendtime: $("#dealstrendtime").val(), //办理结束时间
  450. isopen: $("#isopen").val(),
  451. comprehensive: comprehensive, // 综合查询
  452. jianhang: jianhang,
  453. phoneType: 2, // 12345来电
  454. token: $.cookie("token"),
  455. };
  456. return param;
  457. },
  458. onLoadSuccess: function (data) {
  459. //加载成功时执行
  460. // layer.msg("加载成功");
  461. //console.log(data);
  462. },
  463. onLoadError: function () {
  464. //加载失败时执行
  465. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  466. },
  467. });
  468. }
  469. //状态
  470. function States(val, row) {
  471. var html = "";
  472. switch (val + "") {
  473. case "0":
  474. html = "新工单";
  475. if (row.F_IsReturn == 1) {
  476. html = "新工单(回退)";
  477. }
  478. break;
  479. case "1":
  480. html = "待交办";
  481. break;
  482. case "2":
  483. html = '<span style="color:#FF0000;">待查收</span>';
  484. break;
  485. case "3":
  486. html = "退回审核中";
  487. break;
  488. case "4":
  489. html = "办理中";
  490. break;
  491. case "5":
  492. html = "延时审核";
  493. break;
  494. case "6":
  495. if (row.F_IsProtect === 2 || row.F_IsProtect === 3) {
  496. html = "已办未果"
  497. } else {
  498. html = "已办理";
  499. }
  500. break;
  501. case "7":
  502. html = "已回访";
  503. break;
  504. case "8":
  505. html = "重办中";
  506. break;
  507. case "9":
  508. html = "已结案";
  509. break;
  510. case "10":
  511. html = "待审核";
  512. break;
  513. case "11":
  514. html = "重办待交办";
  515. break;
  516. // case '12':
  517. // html = '待审核';
  518. // break;
  519. case "13":
  520. html = "重办驳回";
  521. break;
  522. }
  523. return html;
  524. }
  525. //音频
  526. function setCode(val) {
  527. if (val) {
  528. return (
  529. '<div class="imgs" style="cursor: pointer;">' +
  530. '<img src="../img/vice.png" alt="" onclick= "helper.luyin.view(this)" item="' +
  531. val +
  532. '" />' +
  533. "</div>"
  534. );
  535. } else {
  536. return "";
  537. }
  538. }
  539. //编号
  540. function serialNumber(val, row, index) {
  541. return index + 1;
  542. }
  543. function GetCont(val) {
  544. if (val) {
  545. var str = "<div ";
  546. if (val.length > 10) {
  547. str = str + ' title="' + val + '" ';
  548. val = val.substr(0, 10) + "...";
  549. }
  550. return str + ">" + val + "</div>";
  551. } else {
  552. return "";
  553. }
  554. }
  555. //操作
  556. function Dispose(val, row) {
  557. var Rows = row.Buttons;
  558. var html = "";
  559. for (var i = 0; i < Rows.length; i++) {
  560. var html1 = huayi.config.arr[Rows[i].key * 1 - 1];
  561. if (html1) {
  562. html1 = html1.replace("data", val);
  563. html1 = html1.replace("isProtect", row.F_IsProtect);
  564. html1 = html1.replace("row", row.F_MainDeptId);
  565. }
  566. html += html1;
  567. }
  568. return html;
  569. }
  570. //查看详情
  571. function ckxq(str) {
  572. layer.open({
  573. type: 2,
  574. // content: "../CommonHtml/lawsuits.html?wid=" + str, //iframe的url,no代表不显示滚动条
  575. content: "../CommonHtml/WorkDatil.html?wid=" + str, //iframe的url,no代表不显示滚动条
  576. title: "工单详情",
  577. area: ["100%", "100%"], //宽高
  578. });
  579. }
  580. //时限
  581. function OverTime(val, row) {
  582. if (val == 1) {
  583. return (
  584. '<div class="" style="cursor: pointer;">' +
  585. '<span class="Greens">' +
  586. row.GapTime +
  587. "</span>" +
  588. "</div>"
  589. );
  590. } else if (val == 2) {
  591. return (
  592. '<div class="" style="cursor: pointer;">' +
  593. '<span class="Yellows">' +
  594. row.GapTime +
  595. "</span>" +
  596. "</div>"
  597. );
  598. } else if (val == 3) {
  599. return (
  600. '<div class="" style="cursor: pointer;">' +
  601. '<span class="Reds">' +
  602. row.GapTime +
  603. "</span>" +
  604. "</div>"
  605. );
  606. }
  607. }
  608. //办理时限
  609. function BanTime(val) {
  610. if (val) {
  611. var time = val.substring(0, val.indexOf(" "));
  612. return (
  613. '<div class="" style="cursor: pointer;">' +
  614. "<span>" +
  615. time +
  616. "</span>" +
  617. "</div>"
  618. );
  619. }
  620. }
  621. //来源
  622. function LY(obj) {
  623. obj.empty();
  624. obj.append(
  625. '<option selected="selected" value="">请选择</option>'
  626. );
  627. $.getJSON(
  628. huayi.config.callcenter_url +
  629. "Dictionary/GetDicValueListById", {
  630. token: $.cookie("token"),
  631. id: 1,
  632. },
  633. function (data) {
  634. if (data.state.toLowerCase() == "success") {
  635. var content = data.data;
  636. $(content).each(function (i, n) {
  637. $(
  638. "<option value='" +
  639. n.F_ValueId +
  640. "'>" +
  641. n.F_Value +
  642. "</option>"
  643. ).appendTo(obj);
  644. });
  645. }
  646. }
  647. );
  648. }
  649. //类别
  650. function LB(obj) {
  651. obj.empty();
  652. obj.append(
  653. '<option selected="selected" value="">请选择</option>'
  654. );
  655. $.getJSON(
  656. huayi.config.callcenter_url +
  657. "Dictionary/GetDicValueListById", {
  658. token: $.cookie("token"),
  659. id: 2,
  660. },
  661. function (data) {
  662. if (data.state.toLowerCase() == "success") {
  663. var content = data.data;
  664. $(content).each(function (i, n) {
  665. $(
  666. "<option value='" +
  667. n.F_ValueId +
  668. "'>" +
  669. n.F_Value +
  670. "</option>"
  671. ).appendTo(obj);
  672. });
  673. }
  674. }
  675. );
  676. }
  677. // 主题
  678. function ZT(obj) {
  679. obj.empty();
  680. obj.append(
  681. '<option selected="selected" value="">请选择</option>'
  682. );
  683. $.getJSON(
  684. huayi.config.callcenter_url +
  685. "Dictionary/GetDicValueListById", {
  686. token: $.cookie("token"),
  687. id: 3,
  688. },
  689. function (data) {
  690. if (data.state.toLowerCase() == "success") {
  691. var content = data.data;
  692. $(content).each(function (i, n) {
  693. $(
  694. "<option value='" +
  695. n.F_ValueId +
  696. "'>" +
  697. n.F_Value +
  698. "</option>"
  699. ).appendTo(obj);
  700. });
  701. }
  702. }
  703. );
  704. }
  705. function tree() {
  706. $.get(
  707. huayi.config.callcenter_url + "Department/GetDeptList", {
  708. token: $.cookie("token"),
  709. // "pid": pid
  710. },
  711. function (result) {
  712. result = $.parseJSON(result);
  713. $.fn.zTree.init(
  714. $("#addTreeDemo"),
  715. setting1,
  716. result.data
  717. ); //实例化树形图
  718. }
  719. );
  720. }
  721. var setting1 = {
  722. data: {
  723. key: {
  724. name: "F_DeptName",
  725. },
  726. simpleData: {
  727. enable: true,
  728. idKey: "F_DeptId",
  729. pIdKey: "F_PartentId",
  730. rootPId: 0,
  731. },
  732. },
  733. callback: {
  734. onClick: zTreeOnClick,
  735. },
  736. };
  737. function zTreeOnClick(event, treeId, treeNode) {
  738. if (treeNode.level >= 1) {
  739. $(".inps").val(treeNode.F_DeptName);
  740. $("#PID").val(treeNode.F_DeptId);
  741. $("#Dpment").val(treeNode.F_DeptId);
  742. $(".Cleans").show();
  743. }
  744. }
  745. function Close() {
  746. $(".lyxz").removeClass("cx");
  747. if ($("audio").length > 0) {
  748. $("audio")[0].pause();
  749. }
  750. }
  751. </script>
  752. </body>
  753. </html>