Nessuna descrizione

LeaderBH.html 30KB

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