No Description

superviseComprehensiveInquiries.html 35KB

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