Nav apraksta

superviseCommission.html 35KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888
  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="../css/WorkOrder/WorkOrderList.css">
  12. <link rel="stylesheet" href="../js/layui/css/layui.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="javaScript:;">督办管理</a>&gt;
  22. <a href="" class="nowPosition">督办工单</a>
  23. </sapn>
  24. </div>
  25. <div class="dhRight">
  26. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  27. </div>
  28. </div>
  29. <div style="padding: 10px;" class="tj_content clearFix">
  30. <div style="padding: 10px;" class="tj_content clearFix">
  31. <div>
  32. <span>【搜索信息】</span>
  33. <div class="box_content">
  34. <table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
  35. <tr>
  36. <th>工单来源:</th>
  37. <td>
  38. <select class="form-control" id="source">
  39. </select>
  40. </td>
  41. <th>来电号码:</th>
  42. <td>
  43. <input type="text" id="tel" class="form-control" />
  44. </td>
  45. <th>录入时间:</th>
  46. <td colspan="3">
  47. <input type="text" id="starttime" class="photo x-color laydate-icon"
  48. autocomplete="off" style="height: 35px;" />&nbsp;——&nbsp;<input type="text"
  49. id="endtime" class="photo x-color laydate-icon" autocomplete="off"
  50. style="height: 35px;" />
  51. </td>
  52. </tr>
  53. <tr>
  54. <th>事项编号:</th>
  55. <td>
  56. <input type="text" placeholder="输入工单号" id="wids" class="form-control" />
  57. </td>
  58. <th><span class="nameJustified">来电人:</span></th>
  59. <td>
  60. <input type="text" id="name" class="form-control" />
  61. </td>
  62. <th><span class="nameJustified">关键字:</span></th>
  63. <td>
  64. <input type="text" placeholder="输入关键字" id="key" class="form-control Min-width" />
  65. <botton class="btns Seach">搜索</botton>
  66. </td>
  67. </tr>
  68. <tr>
  69. <!-- <th>受话坐席:</th>
  70. <td>
  71. <select id="ZX" name="select" class="selectpicker show-tick form-control" multiple
  72. data-live-search="true">
  73. <option value="">请选择坐席</option>
  74. </select>
  75. </td>
  76. <th><span class="nameJustified">审核员:</span></th>
  77. <td>
  78. <select id="yardman" name="select" class="selectpicker show-tick form-control"
  79. multiple data-live-search="true">
  80. <option value="">请选择调度员</option>
  81. </select>
  82. </td> -->
  83. </tr>
  84. <tr>
  85. <th>承办单位:</th>
  86. <td style="position: relative;">
  87. <div class="inpBox">
  88. <input type="text" class="inps" />
  89. <i class="Cleans fa fa-close"></i>
  90. <i class="xl xl_one"></i>
  91. <div class="addTree xlAdd">
  92. <ul id="addTreeDemo" class="ztree"></ul>
  93. </div>
  94. </div>
  95. <div class="selDpart1">
  96. <ul id="sponsor">
  97. </ul>
  98. </div>
  99. </td>
  100. <th>来电类型:</th>
  101. <td>
  102. <select class="form-control" id="type">
  103. </select>
  104. </td>
  105. <th>反映区域:</th>
  106. <td>
  107. <select name="" id="sourceAreas" class="form-control Min-width">
  108. </select>
  109. <botton class="btns exportFile">导出</botton>
  110. </td>
  111. </tr>
  112. </table>
  113. </div>
  114. </div>
  115. <div>
  116. <ul class="nav nav-tabs ul_tab" role="tablist">
  117. <li class="active">
  118. <a>督办待办</a>
  119. </li>
  120. <li>
  121. <a>督办重办</a>
  122. </li>
  123. </ul>
  124. <div style="width: 100%;padding: 10px;">
  125. <table id="orderlist" data-row-style="rowStyle" data-query-params="queryParams"
  126. data-pagination="true">
  127. <thead>
  128. <tr>
  129. <th data-formatter="serialNumber" data-align="center">
  130. 序号
  131. </th>
  132. <th data-field="F_WorkOrderId" data-formatter="View" data-align="center">工单单号</th>
  133. <th data-field="F_ComContent" data-formatter="GetCont" data-align="center">工单内容</th>
  134. <th data-field="F_WorkOrderId" data-formatter="Dispose" data-align="center">操作</th>
  135. </tr>
  136. </thead>
  137. <tbody class="list"></tbody>
  138. </table>
  139. </div>
  140. </div>
  141. </div>
  142. </div>
  143. <!--下载框-->
  144. <div class="t-shade lyxz">
  145. <div class="shade_k">
  146. <div class="shade_title">
  147. <span>录音播放与下载<srong class="cknum"></srong></span>
  148. <span class="setwin gbly"><a>x</a></span>
  149. </div>
  150. <div class="shade_content">
  151. <div class="Ly_box audiojs">
  152. </div>
  153. </div>
  154. </div>
  155. </div>
  156. <input type="hidden" id="PID" />
  157. <input type="hidden" id="Dpment" />
  158. </div>
  159. <script src="../js/layui/layui.js"></script>
  160. <script src="../js/bootstrap-select.js"></script>
  161. <script src="../css/laydate/laydate.js"></script>
  162. <script src="../My97DatePicker/WdatePicker.js"></script>
  163. <script src="../js/zTree/jquery.ztree.core.js"></script>
  164. <script src="../js/search/screen.js"></script>
  165. <script src="../js/WorkOrder/WorkOrderList.js"></script>
  166. <script>
  167. var roleCode = $.cookie("code");
  168. var iscb = 0;
  169. $(document).ready(function () {
  170. load();
  171. laydate.skin('blue');
  172. laydate({
  173. elem: '#starttime',
  174. event: 'focus',
  175. istime: true,
  176. format: 'YYYY-MM-DD hh:mm:ss'
  177. });
  178. laydate({
  179. elem: '#endtime',
  180. event: 'focus',
  181. istime: true,
  182. format: 'YYYY-MM-DD hh:mm:ss'
  183. });
  184. $('.ul_tab li').click(function () {
  185. $(this).addClass("active").siblings().removeClass("active");
  186. var index = $(this).index();
  187. if (index === 0) {
  188. iscb = 0;
  189. } else if (index === 1) {
  190. iscb = 1
  191. }
  192. load();
  193. })
  194. });
  195. //关闭录音弹出
  196. $(".gbly").click(function () {
  197. $(".lyxz").removeClass("cx");
  198. $('audio')[0].pause();
  199. });
  200. $("#orderlist").on("click-row.bs.table", function (e, row, ele) {
  201. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  202. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  203. });
  204. //获取查询信息
  205. function load() {
  206. //坐席
  207. var usercodeID = "";
  208. var usercode_ = $("#ZX").val(); //坐席
  209. if (usercode_ != null) {
  210. $(usercode_).each(function (i, n) {
  211. var obj1 = '';
  212. obj1 = n + ",";
  213. usercodeID += obj1;
  214. })
  215. } else {
  216. usercodeID = ""
  217. }
  218. // 调度员
  219. var ddusercodeID = "";
  220. var ddusercode_ = $("#yardman").val(); //坐席
  221. if (ddusercode_ != null) {
  222. $(ddusercode_).each(function (i, n) {
  223. var obj2 = '';
  224. obj2 = n + ",";
  225. ddusercodeID += obj2;
  226. })
  227. } else {
  228. ddusercodeID = ""
  229. }
  230. //先销毁表格
  231. $('#orderlist').bootstrapTable('destroy');
  232. //初始化表格,动态从服务器加载数据
  233. $("#orderlist").bootstrapTable({
  234. method: "get", //使用get请求到服务器获取数据
  235. url: huayi.config.callcenter_url + "workorder/GetSupervList", //获取数据的Servlet地址
  236. contentType: "application/x-www-form-urlencoded",
  237. striped: true, //表格显示条纹
  238. pagination: true, //启动分页
  239. pageSize: 10, //每页显示的记录数
  240. pageNumber: 1, //当前第几页
  241. pageList: [10, 20, 50, 100], //记录数可选列表
  242. search: false, //是否启用查询
  243. showColumns: false, //显示下拉框勾选要显示的列
  244. showRefresh: false, //显示刷新按钮
  245. sidePagination: "server", //表示服务端请求
  246. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  247. //设置为limit可以获取limit, offset, search, sort, order
  248. queryParamsType: "undefined",
  249. queryParams: function queryParams(params) { //设置查询参数
  250. var param = {
  251. page: params.pageNumber,
  252. pagesize: params.pageSize,
  253. workid: $("#wids").val(),
  254. type: $("#type").val(), //=工单类型
  255. key: $("#key").val(), //=关键字
  256. tel: $("#tel").val(), //=客户电话
  257. name: $("#name").val(), //=客户名称
  258. usercode: usercodeID, //=坐席工号
  259. ddusercode: ddusercodeID,
  260. keyid: $("#keyid").val(), //=关键词id
  261. source: $("#source").val(), //=来源&
  262. starttime: $("#starttime").val(), //=开始时间
  263. endtime: $("#endtime").val(), //=结束时间
  264. deptid: $("#PID").val(),
  265. tab: 1, //办理中
  266. sourcearea: $('#sourceAreas').val(), //区域
  267. Supervisor: 1,
  268. iscb: iscb, // 0督办待办、1督办重办
  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. }
  320. return html;
  321. }
  322. //时限
  323. function OverTime(val, row) {
  324. if (val == 1) {
  325. return '<div class="" style="cursor: pointer;">' +
  326. '<span class="Greens">' + row.GapTime + '</span>' +
  327. '</div>';
  328. } else if (val == 2) {
  329. return '<div class="" style="cursor: pointer;">' +
  330. '<span class="Yellows">' + row.GapTime + '</span>' +
  331. '</div>';
  332. } else if (val == 3) {
  333. return '<div class="" style="cursor: pointer;">' +
  334. '<span class="Reds">' + row.GapTime + '</span>' +
  335. '</div>';
  336. }
  337. }
  338. //办理时限
  339. function BanTime(val) {
  340. if (val) {
  341. var time = val.substring(0, val.indexOf(' '));
  342. return '<div class="" style="cursor: pointer;">' +
  343. '<span>' + time + '</span>' +
  344. '</div>';
  345. }
  346. }
  347. //音频
  348. function setCode(val) {
  349. if (val) {
  350. return '<div class="imgs" style="cursor: pointer;">' +
  351. '<img src="../img/vice.png" alt="" onclick= "helper.luyin.view(this)" item="' + val + '" />' +
  352. '</div>';
  353. } else {
  354. return '';
  355. }
  356. }
  357. //编号
  358. function serialNumber(val, row, index) {
  359. return index + 1;
  360. }
  361. function GetCont(val) {
  362. if (val) {
  363. var str = '<div '
  364. if (val.length > 20) {
  365. str = str + ' title="' + val + '" ';
  366. val = val.substr(0, 20) + "...";
  367. }
  368. return str + '>' + val + '</div>';
  369. } else {
  370. return '';
  371. }
  372. }
  373. //操作
  374. function Dispose(val, row) {
  375. var Rows = row.Buttons;
  376. // alert(row.F_WorkOrderId);
  377. var WorkOrderId = row.F_WorkOrderId;
  378. var html = '';
  379. for (var i = 0; i < Rows.length; i++) {
  380. var html1 = huayi.config.arr[Rows[i].key * 1 - 1];
  381. if (html1) {
  382. html1 = html1.replace("data", val);
  383. html1 = html1.replace("row", row.F_MainDeptId);
  384. }
  385. html += html1;
  386. }
  387. return html;
  388. }
  389. //催办
  390. function sendMsg(wid, depId) {
  391. layer.confirm('确定催办吗', {
  392. btn: ['确定', '取消']
  393. }, function () {
  394. $.post(huayi.config.callcenter_url + 'WorkOrder/Reminders', {
  395. workorderid: wid,
  396. token: $.cookie("token")
  397. }, function (result) {
  398. result = JSON.parse(result);
  399. if (result.state.toLowerCase() == 'success') {
  400. layer.msg('催办成功')
  401. }
  402. })
  403. })
  404. }
  405. //转派
  406. function redeploy(WorkOrderId) {
  407. layer.open({
  408. type: 2,
  409. content: "../CommonHtml/zhuanpai.html?wid=" + WorkOrderId, //iframe的url,no代表不显示滚动条
  410. title: '转派',
  411. area: ['85%', '80%'], //宽高
  412. });
  413. }
  414. //查看详情
  415. function ckxq(str) {
  416. layer.open({
  417. type: 2,
  418. content: "../CommonHtml/WorkDatil.html?wid=" + str, //iframe的url,no代表不显示滚动条
  419. title: '工单详情',
  420. area: ['100%', '100%'], //宽高
  421. });
  422. }
  423. //编辑
  424. function bj(str) {
  425. layer.open({
  426. type: 2,
  427. content: "../CommonHtml/AddAppeal.html?wid=" + str, //iframe的url,no代表不显示滚动条
  428. title: '编辑工单',
  429. area: ['96%', '85%'], //宽高
  430. });
  431. }
  432. //删除
  433. function move(str) {
  434. layer.confirm('确定删除工单?', {
  435. btn: ['是', '否'] //按钮
  436. }, function () {
  437. $.post(huayi.config.callcenter_url + "WorkOrder/DelWorkOrder", {
  438. ids: str,
  439. token: $.cookie("token")
  440. }, function (result) {
  441. result = JSON.parse(result);
  442. if (result.state.toLowerCase() == "success") {
  443. layer.msg("删除成功");
  444. load();
  445. }
  446. })
  447. });
  448. }
  449. //提交
  450. function tj(str) {
  451. layer.confirm('确定要提交工单么?', {
  452. btn: ['确定', '取消'] //按钮
  453. }, function () {
  454. //请求后台数据
  455. /*发送请求*/
  456. $.post(huayi.config.callcenter_url + "WorkOrder/SubmitWorkOrder", {
  457. ids: str,
  458. token: $.cookie("token")
  459. }, function (result) {
  460. result = JSON.parse(result);
  461. if (result.state.toLowerCase() == "success") {
  462. layer.msg("提交成功");
  463. load();
  464. }
  465. })
  466. });
  467. }
  468. //交办
  469. function jb(str) {
  470. layer.open({
  471. type: 2,
  472. content: "../CommonHtml/jiaoban.html?wid=" + str, //iframe的url,no代表不显示滚动条
  473. title: '工单交办',
  474. area: ['87%', '80%'], //宽高
  475. });
  476. }
  477. //领导批示
  478. function lader(str) {
  479. layer.open({
  480. type: 2,
  481. content: "../CommonHtml/Leader.html?wid=" + str, //iframe的url,no代表不显示滚动条
  482. title: '领导批示',
  483. area: ['60%', '80%'], //宽高
  484. });
  485. }
  486. //市长批示
  487. function city(str) {
  488. layer.open({
  489. type: 2,
  490. content: "../CommonHtml/shizhang.html?wid=" + str, //iframe的url,no代表不显示滚动条
  491. title: '领导批示',
  492. area: ['60%', '80%'], //宽高
  493. });
  494. }
  495. //办理
  496. function bl(str) {
  497. layer.open({
  498. type: 2,
  499. content: "../CommonHtml/banli.html?wid=" + str, //iframe的url,no代表不显示滚动条
  500. title: '办理工单',
  501. area: ['60%', '80%'], //宽高
  502. });
  503. }
  504. //督办
  505. function Supervision(str, supervision) {
  506. layer.open({
  507. type: 2,
  508. state: 1,
  509. content: "../CommonHtml/Supervision_.html?wid=" + str + '&type=1' + '&state=1' + '&depId=' +
  510. supervision + "&pageName=superviseUpcoming", //iframe的url,no代表不显示滚动条
  511. title: '督办',
  512. area: ['90%', '90%'], //宽高
  513. });
  514. }
  515. //不督办
  516. function ndb(str) {
  517. layer.open({
  518. type: 2,
  519. state: 2,
  520. content: "../CommonHtml/Supervision_.html?wid=" + str + '&type=1' +
  521. '&state=2', //iframe的url,no代表不显示滚动条
  522. title: '督办',
  523. area: ['60%', '80%'], //宽高
  524. });
  525. }
  526. function messagesUrge(str) {
  527. layer.confirm('确定催办吗?', {
  528. btn: ['是', '否'] //按钮
  529. }, function () {
  530. $.post(huayi.config.callcenter_url + 'WorkOrder/Reminders', {
  531. workorderid: str,
  532. token: $.cookie("token")
  533. }, function (result) {
  534. result = JSON.parse(result);
  535. if (result.state.toLowerCase() == 'success') {
  536. layer.msg('催办成功')
  537. }
  538. })
  539. });
  540. }
  541. //督查
  542. function Supervision_(str) {
  543. layer.open({
  544. type: 2,
  545. content: "../CommonHtml/Supervision_.html?wid=" + str + '&type=2', //iframe的url,no代表不显示滚动条
  546. title: '监察',
  547. area: ['60%', '80%'], //宽高
  548. });
  549. }
  550. //强制结案
  551. function StrongLawsuit(str) {
  552. layer.open({
  553. type: 2,
  554. content: "../CommonHtml/StrongLawsuit.html?wid=" + str, //iframe的url,no代表不显示滚动条
  555. title: '强制结案',
  556. area: ['60%', '80%'], //宽高
  557. });
  558. }
  559. //回退BackDtail
  560. function BackDtail(str) {
  561. layer.open({
  562. type: 2,
  563. content: "../CommonHtml/BackDatil.html?wid=" + str, //iframe的url,no代表不显示滚动条
  564. title: '工单回退',
  565. area: ['60%', '80%'], //宽高
  566. });
  567. }
  568. //查收
  569. function cs(str) {
  570. layer.confirm('确定要查收?', {
  571. btn: ['是', '否'] //按钮
  572. }, function () {
  573. $.post(huayi.config.callcenter_url + "WorkOrder/ReceiveWorkOrder", {
  574. workorderid: str,
  575. token: $.cookie("token")
  576. }, function (result) {
  577. result = JSON.parse(result);
  578. if (result.state.toLowerCase() == "success") {
  579. layer.msg("查收成功");
  580. load();
  581. }
  582. })
  583. });
  584. }
  585. //收回
  586. function sh(str) {
  587. layer.confirm('确定要回收?', {
  588. btn: ['是', '否'] //按钮
  589. }, function () {
  590. $.post(huayi.config.callcenter_url + "WorkOrder/TakeBackWorkOrder", {
  591. workorderid: str,
  592. token: $.cookie("token")
  593. }, function (result) {
  594. result = JSON.parse(result);
  595. if (result.state.toLowerCase() == "success") {
  596. layer.msg("回收");
  597. load();
  598. }
  599. })
  600. });
  601. }
  602. //强制回收
  603. function recycles() {
  604. layer.confirm('确定要强制退回吗?', {
  605. btn: ['是', '否'] //按钮
  606. });
  607. }
  608. //退回申请
  609. function th(str) {
  610. layer.open({
  611. type: 2,
  612. content: "../CommonHtml/tuihuisq.html?wid=" + str, //iframe的url,no代表不显示滚动条
  613. title: '申请退回工单',
  614. area: ['60%', '80%'], //宽高
  615. });
  616. }
  617. //审核退回申请
  618. function shth(str) {
  619. layer.open({
  620. type: 2,
  621. content: "../CommonHtml/shth.html?wid=" + str, //iframe的url,no代表不显示滚动条
  622. title: '审核退回申请',
  623. area: ['60%', '80%'], //宽高
  624. });
  625. }
  626. //办理
  627. // function th(str) {
  628. // layer.open({
  629. // type: 2,
  630. // content: "../CommonHtml/tuihuisq.html?wid=" + str, //iframe的url,no代表不显示滚动条
  631. // title: '办理工单',
  632. // area: ['35%', '30%'], //宽高
  633. // });
  634. // }
  635. //申请延时
  636. function ys(str) {
  637. layer.open({
  638. type: 2,
  639. content: "../CommonHtml/Timesq.html?wid=" + str, //iframe的url,no代表不显示滚动条
  640. title: '申请延时',
  641. area: ['60%', '80%'], //宽高
  642. });
  643. }
  644. //审核申请延时
  645. function shys(str) {
  646. layer.open({
  647. type: 2,
  648. content: "../CommonHtml/shtime.html?wid=" + str, //iframe的url,no代表不显示滚动条
  649. title: '审核延时申请',
  650. area: ['60%', '80%'], //宽高
  651. });
  652. }
  653. //诉求回访
  654. function hf(str) {
  655. layer.open({
  656. type: 2,
  657. content: "../CommonHtml/Back.html?wid=" + str, //iframe的url,no代表不显示滚动条
  658. title: '工单回访',
  659. area: ['60%', '80%'], //宽高
  660. });
  661. }
  662. //重办工单
  663. function cb(str) {
  664. layer.open({
  665. type: 2,
  666. content: "../CommonHtml/Cb.html?wid=" + str, //iframe的url,no代表不显示滚动条
  667. title: '重办工单',
  668. area: ['60%', '80%'], //宽高
  669. });
  670. }
  671. //结案
  672. function Lawsuit(str) {
  673. layer.open({
  674. type: 2,
  675. content: "../CommonHtml/lawsuits.html?wid=" + str, //iframe的url,no代表不显示滚动条
  676. title: '诉求单结案',
  677. area: ['60%', '80%'], //宽高
  678. });
  679. }
  680. //派单
  681. function pd(str) {
  682. layer.open({
  683. type: 2,
  684. content: "../CommonHtml/handle.html?wid=" + str, //iframe的url,no代表不显示滚动条
  685. title: "办理工单",
  686. area: ["87%", "80%"], //宽高
  687. });
  688. }
  689. $('.Appeal').click(function () {
  690. layer.open({
  691. type: 2,
  692. content: "../CommonHtml/AddAppeal.html?wid=", //iframe的url,no代表不显示滚动条
  693. title: '新增诉求',
  694. area: ['85%', '80%'], //宽高
  695. });
  696. })
  697. //上传文件
  698. function upload() {
  699. if (document.getElementById("upFile").files.length > 0) {
  700. var formData = new FormData();
  701. formData.append("upFile", document.getElementById("upFile").files[0]);
  702. formData.append("token", $.cookie("token"));
  703. $.ajax({
  704. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  705. type: "POST",
  706. data: formData,
  707. /**
  708. *必须false才会自动加上正确的Content-Type
  709. */
  710. contentType: false,
  711. /**
  712. * 必须false才会避开jQuery对 formdata 的默认处理
  713. * XMLHttpRequest会对 formdata 进行正确的处理
  714. */
  715. processData: false,
  716. success: function (result) {
  717. document.getElementById("upFile").outerHTML = document.getElementById("upFile")
  718. .outerHTML;
  719. $("#upFile").change(function () {
  720. upload();
  721. });
  722. var r = $.parseJSON(result);
  723. if (r.state.toLowerCase() == "success") {
  724. $(".fjnr").text(r.data);
  725. $("#scfj").show();
  726. }
  727. }
  728. });
  729. } else {
  730. layer.confirm('请上传文件!', {
  731. btn: ['确定']
  732. });
  733. }
  734. }
  735. //来源
  736. function LY(obj) {
  737. obj.empty();
  738. obj.append('<option selected="selected" value="">请选择</option>');
  739. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
  740. "token": $.cookie("token"),
  741. id: 1
  742. }, function (data) {
  743. if (data.state.toLowerCase() == "success") {
  744. var content = data.data;
  745. $(content).each(function (i, n) {
  746. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(
  747. obj);
  748. })
  749. }
  750. })
  751. }
  752. //类别
  753. function LB(obj) {
  754. obj.empty();
  755. obj.append('<option selected="selected" value="">请选择</option>');
  756. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
  757. "token": $.cookie("token"),
  758. id: 2
  759. }, function (data) {
  760. if (data.state.toLowerCase() == "success") {
  761. var content = data.data;
  762. $(content).each(function (i, n) {
  763. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(
  764. obj);
  765. })
  766. }
  767. })
  768. }
  769. // 主题
  770. function ZT(obj) {
  771. obj.empty();
  772. obj.append('<option selected="selected" value="">请选择</option>');
  773. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
  774. "token": $.cookie("token"),
  775. id: 3
  776. }, function (data) {
  777. if (data.state.toLowerCase() == "success") {
  778. var content = data.data;
  779. $(content).each(function (i, n) {
  780. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(
  781. obj);
  782. })
  783. }
  784. })
  785. }
  786. function tree() {
  787. $.get(huayi.config.callcenter_url + 'Department/GetDeptList', {
  788. "token": $.cookie("token"),
  789. // "pid": pid
  790. }, function (result) {
  791. result = $.parseJSON(result);
  792. $.fn.zTree.init($("#addTreeDemo"), setting1, result.data); //实例化树形图
  793. });
  794. }
  795. var setting1 = {
  796. data: {
  797. key: {
  798. name: "F_DeptName"
  799. },
  800. simpleData: {
  801. enable: true,
  802. idKey: "F_DeptId",
  803. pIdKey: "F_PartentId",
  804. rootPId: 0
  805. }
  806. },
  807. callback: {
  808. onClick: zTreeOnClick
  809. }
  810. };
  811. function zTreeOnClick(event, treeId, treeNode) {
  812. $('.inps').val(treeNode.F_DeptName);
  813. $("#PID").val(treeNode.F_DeptId);
  814. $("#Dpment").val(treeNode.F_DeptName);
  815. $(".Cleans").show();
  816. };
  817. $(".exportFile").click(function () {
  818. var usercode_ = $("#ZX").val(); //坐席
  819. if (usercode_ != null) {
  820. $(usercode_).each(function (i, n) {
  821. var obj1 = "";
  822. obj1 = n + ",";
  823. usercodeID += obj1;
  824. });
  825. } else {
  826. usercodeID = "";
  827. }
  828. // 调度员
  829. var ddusercodeID = "";
  830. var ddusercode_ = $("#yardman").val(); //坐席
  831. if (ddusercode_ != null) {
  832. $(ddusercode_).each(function (i, n) {
  833. var obj2 = "";
  834. obj2 = n + ",";
  835. ddusercodeID += obj2;
  836. });
  837. } else {
  838. ddusercodeID = "";
  839. }
  840. var workid = $("#wids").val()
  841. var key = $("#key").val() //=关键字
  842. var tel = $("#tel").val() //=客户电话
  843. var name = $("#name").val() //=客户名称
  844. var usercode = usercodeID //=坐席工号
  845. var ddusercode = ddusercodeID
  846. var source = $("#source").val() //=来源&
  847. var starttime = $("#starttime").val() //=开始时间
  848. var endtime = $("#endtime").val() //=结束时间
  849. var deptid = $("#PID").val()
  850. var type = $("#type").val() //=工单类型
  851. var sourcearea = $("#sourceAreas").val() //区域
  852. var tab = 1;
  853. var keyid = $("#keyid").val() == undefined ? "" : $("#keyid").val(); //=关键词id
  854. var Supervisor = 1;
  855. iscb = iscb; // 0督办待办、1督办重办
  856. var url = huayi.config.callcenter_url + "workorder/GetSupervList?token=" + $.cookie("token");
  857. url += "&workid=" + workid + "&type=" + type + "&tab=" + tab + "&key=" + key + "&tel=" + tel + "&name=" + name + "&usercode=" + usercode + "&ddusercode=" + ddusercode + "&source=" + source + "&starttime=" + starttime + "&endtime=" + endtime + "&deptid=" + deptid + "&sourcearea=" + sourcearea + "&keyid=" + keyid + "&Supervisor=" + Supervisor + "&iscb=" + iscb + "&isdc=1";
  858. window.location.href = url;
  859. })
  860. </script>
  861. </body>
  862. </html>