Geen omschrijving

expiredWorkOrdersOtherPhone.html 35KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857
  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><span class="nameJustified">关键字:</span></th>
  62. <td>
  63. <input type="text" placeholder="输入关键字" id="key" class="form-control Min-width" />
  64. <botton class="btns Seach">搜索</botton>
  65. </td>
  66. </tr>
  67. <tr>
  68. <th>受话坐席:</th>
  69. <td>
  70. <select id="ZX" name="select" class="selectpicker show-tick form-control" multiple
  71. data-live-search="true">
  72. <option value="">请选择坐席</option>
  73. </select>
  74. </td>
  75. <th><span class="nameJustified">审核员:</span></th>
  76. <td>
  77. <select id="yardman" name="select" class="selectpicker show-tick form-control"
  78. multiple data-live-search="true">
  79. <option value="">请选择调度员</option>
  80. </select>
  81. </td>
  82. <th>反映区域:</th>
  83. <td>
  84. <select name="" id="sourceAreas" class="form-control Min-width">
  85. </select>
  86. <botton class="btns exportFile">导出</botton>
  87. </td>
  88. </tr>
  89. <tr>
  90. <th>承办单位:</th>
  91. <td style="position: relative;">
  92. <div class="inpBox">
  93. <input type="text" class="inps" />
  94. <i class="Cleans fa fa-close"></i>
  95. <i class="xl xl_one"></i>
  96. <div class="addTree xlAdd">
  97. <ul id="addTreeDemo" class="ztree"></ul>
  98. </div>
  99. </div>
  100. <div class="selDpart1">
  101. <ul id="sponsor">
  102. </ul>
  103. </div>
  104. </td>
  105. <th>来电类型:</th>
  106. <td>
  107. <select class="form-control" id="type">
  108. </select>
  109. </td>
  110. <th></th>
  111. <td style="text-align: center;">
  112. </td>
  113. </tr>
  114. </table>
  115. </div>
  116. </div>
  117. <div>
  118. <div style="width: 100%;padding: 10px;">
  119. <table id="orderlist" data-row-style="rowStyle" data-query-params="queryParams"
  120. data-pagination="true">
  121. <thead>
  122. <tr>
  123. <!--<th data-checkbox="true"></th>-->
  124. <th data-formatter="serialNumber" data-align="center">
  125. 序号
  126. </th>
  127. <th data-field="F_WorkOrderId" data-formatter="View" data-align="center">工单单号</th>
  128. <th data-field="F_ComTitle" data-formatter="GetCont" data-align="center">诉求标题</th>
  129. <th data-field="DeptName" data-align="center">承办单位</th>
  130. <!-- <th data-field="OtherDeptName" data-align="center">协办单位</th> -->
  131. <!-- <th data-field="UserName" data-align="center">受理人</th> -->
  132. <th data-field="F_WorkState" data-align="center" data-formatter="States">办理状态</th>
  133. <!--<th data-field="FilePath" data-formatter="setCode" data-align="center">录音</th>-->
  134. <th data-field="OverState" data-formatter="OverTime" data-align="center">时限</th>
  135. <!--<th data-field="LimitTime" data-formatter="BanTime" data-align="center">办理时限</th>-->
  136. <th data-formatter="Dispose" data-align="center">操作</th>
  137. </tr>
  138. </thead>
  139. <tbody class="list"></tbody>
  140. </table>
  141. </div>
  142. </div>
  143. </div>
  144. </div>
  145. <!--下载框-->
  146. <div class="t-shade lyxz">
  147. <div class="shade_k">
  148. <div class="shade_title">
  149. <span>录音播放与下载<srong class="cknum"></srong></span>
  150. <span class="setwin gbly"><a>x</a></span>
  151. </div>
  152. <div class="shade_content">
  153. <div class="Ly_box audiojs">
  154. </div>
  155. </div>
  156. </div>
  157. </div>
  158. <input type="hidden" id="PID" />
  159. <input type="hidden" id="Dpment" />
  160. </div>
  161. <script src="../js/layui/layui.js"></script>
  162. <script src="../js/bootstrap-select.js"></script>
  163. <script src="../css/laydate/laydate.js"></script>
  164. <script src="../My97DatePicker/WdatePicker.js"></script>
  165. <script src="../js/zTree/jquery.ztree.core.js"></script>
  166. <script src="../js/search/screen.js"></script>
  167. <script src="../js/WorkOrder/WorkOrderList.js"></script>
  168. <script>
  169. var roleCode = $.cookie("code")
  170. $(document).ready(function () {
  171. load();
  172. // helper.getDropList.getOrderAreas($('#sourceAreas'));
  173. laydate.skin('blue');
  174. laydate({
  175. elem: '#starttime',
  176. event: 'focus',
  177. istime: true,
  178. format: 'YYYY-MM-DD hh:mm:ss'
  179. });
  180. laydate({
  181. elem: '#endtime',
  182. event: 'focus',
  183. istime: true,
  184. format: 'YYYY-MM-DD hh:mm:ss'
  185. });
  186. });
  187. //关闭录音弹出
  188. $(".gbly").click(function () {
  189. $(".lyxz").removeClass("cx");
  190. $('audio')[0].pause();
  191. });
  192. $("#orderlist").on("click-row.bs.table", function (e, row, ele) {
  193. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  194. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  195. });
  196. //获取查询信息
  197. function load() {
  198. // 坐席
  199. var usercodeID = "";
  200. var usercode_ = $("#ZX").val(); //坐席
  201. if (usercode_ != null) {
  202. $(usercode_).each(function (i, n) {
  203. var obj1 = "";
  204. obj1 = n + ",";
  205. usercodeID += obj1;
  206. });
  207. } else {
  208. usercodeID = "";
  209. }
  210. // 调度员
  211. var ddusercodeID = "";
  212. var ddusercode_ = $("#yardman").val(); //坐席
  213. if (ddusercode_ != null) {
  214. $(ddusercode_).each(function (i, n) {
  215. var obj2 = "";
  216. obj2 = n + ",";
  217. ddusercodeID += obj2;
  218. });
  219. } else {
  220. ddusercodeID = "";
  221. }
  222. //先销毁表格
  223. $('#orderlist').bootstrapTable('destroy');
  224. //初始化表格,动态从服务器加载数据
  225. $("#orderlist").bootstrapTable({
  226. method: "get", //使用get请求到服务器获取数据
  227. url: huayi.config.callcenter_url + "WorkOrder/GetTimeOutList", //获取数据的Servlet地址
  228. contentType: "application/x-www-form-urlencoded",
  229. striped: true, //表格显示条纹
  230. pagination: true, //启动分页
  231. pageSize: 10, //每页显示的记录数
  232. pageNumber: 1, //当前第几页
  233. pageList: [10, 20, 50, 100], //记录数可选列表
  234. search: false, //是否启用查询
  235. showColumns: false, //显示下拉框勾选要显示的列
  236. showRefresh: false, //显示刷新按钮
  237. sidePagination: "server", //表示服务端请求
  238. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  239. //设置为limit可以获取limit, offset, search, sort, order
  240. queryParamsType: "undefined",
  241. queryParams: function queryParams(params) { //设置查询参数
  242. var param = {
  243. page: params.pageNumber,
  244. pagesize: params.pageSize,
  245. workid: $("#wids").val(),
  246. state: $("#state").val(), //=工单状态
  247. type: $("#type").val(), //=工单类型
  248. bigtype: $("#bigtype").val(), //=大类别
  249. smalltype: $("#smalltype").val(), //=小类别
  250. // key: $("#key").val(), //=关键字
  251. // tel: $("#tel").val(), //=客户电话
  252. // name: $("#name").val(), //=客户名称
  253. usercode: usercodeID, //=坐席工号
  254. ddusercode: ddusercodeID, //审核员
  255. keyid: $("#keyid").val(), //=关键词id
  256. source: $("#source").val(), //=来源&
  257. starttime: $("#starttime").val(), //=开始时间
  258. endtime: $("#endtime").val(), //=结束时间
  259. deptid: $("#PID").val(),
  260. type: $("#type").val(),
  261. tab: 1, //待处理
  262. sourcearea: $('#sourceAreas').val(), //区域
  263. jianhang: 0, // 其他来电
  264. phoneType: 1, //其他电话来电
  265. token: $.cookie("token")
  266. };
  267. return param;
  268. },
  269. onLoadSuccess: function (data) { //加载成功时执行
  270. // layer.msg("加载成功");
  271. //console.log(data);
  272. },
  273. onLoadError: function () { //加载失败时执行
  274. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  275. }
  276. });
  277. }
  278. //状态
  279. function States(val, row) {
  280. var html = '';
  281. switch (val + '') {
  282. case '0':
  283. html = '新工单';
  284. if (row.F_IsReturn == 1) {
  285. html = '新工单(回退)';
  286. }
  287. break;
  288. case '1':
  289. html = '待交办';
  290. break;
  291. case '2':
  292. html = '待查收';
  293. break;
  294. case '3':
  295. html = '退回审核中';
  296. break;
  297. case '4':
  298. html = '办理中';
  299. break;
  300. case '5':
  301. html = '延时审核';
  302. break;
  303. case '6':
  304. html = '已办理';
  305. break;
  306. case '7':
  307. html = '已回访';
  308. break;
  309. case '8':
  310. html = '重办中';
  311. break;
  312. case '9':
  313. html = '已结案';
  314. break;
  315. }
  316. return html;
  317. }
  318. //时限
  319. function OverTime(val, row) {
  320. if (val == 1) {
  321. return '<div class="" style="cursor: pointer;">' +
  322. '<span class="Greens">' + row.GapTime + '</span>' +
  323. '</div>';
  324. } else if (val == 2) {
  325. return '<div class="" style="cursor: pointer;">' +
  326. '<span class="Yellows">' + row.GapTime + '</span>' +
  327. '</div>';
  328. } else if (val == 3) {
  329. return '<div class="" style="cursor: pointer;">' +
  330. '<span class="Reds">' + row.GapTime + '</span>' +
  331. '</div>';
  332. }
  333. }
  334. //办理时限
  335. function BanTime(val) {
  336. if (val) {
  337. var time = val.substring(0, val.indexOf(' '));
  338. return '<div class="" style="cursor: pointer;">' +
  339. '<span>' + time + '</span>' +
  340. '</div>';
  341. }
  342. }
  343. //音频
  344. function setCode(val) {
  345. if (val) {
  346. return '<div class="imgs" style="cursor: pointer;">' +
  347. '<img src="../img/vice.png" alt="" onclick= "helper.luyin.view(this)" item="' + val + '" />' +
  348. '</div>';
  349. } else {
  350. return '';
  351. }
  352. }
  353. //编号
  354. function serialNumber(val, row, index) {
  355. return index + 1;
  356. }
  357. function GetCont(val) {
  358. if (val) {
  359. var str = '<div '
  360. if (val.length > 10) {
  361. str = str + ' title="' + val + '" ';
  362. val = val.substr(0, 10) + "...";
  363. }
  364. return str + '>' + val + '</div>';
  365. } else {
  366. return '';
  367. }
  368. }
  369. //操作
  370. function Dispose(val, row) {
  371. var Rows = row.Buttons;
  372. var html;
  373. if (roleCode === "EJWLDW") {
  374. html = '<a class="xg" onclick="ckxq(\'' + row.F_WorkOrderId + '\')" title="查看">查看</a>';
  375. } else {
  376. html = '<a class="xg" onclick="ckxq(\'' + row.F_WorkOrderId + '\')" title="查看">查看</a>' +
  377. '<a class="xg" onclick="sendMsg(\'' + row.F_WorkOrderId + '\',\'' + row.F_MainDeptId +
  378. '\')" title="催办">催办</a>';
  379. }
  380. return html;
  381. }
  382. //催办
  383. function sendMsg(wid, depId) {
  384. layer.confirm('确定催办吗', {
  385. btn: ['确定', '取消']
  386. }, function () {
  387. $.post(huayi.config.callcenter_url + 'WorkOrder/Reminders', {
  388. workorderid: wid,
  389. token: $.cookie("token")
  390. }, function (result) {
  391. result = JSON.parse(result);
  392. if (result.state.toLowerCase() == 'success') {
  393. layer.msg('催办成功')
  394. }
  395. })
  396. })
  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%', '85%'], //宽高
  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: ['60%', '80%'], //宽高
  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: ['60%', '80%'], //宽高
  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: ['60%', '80%'], //宽高
  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: ['60%', '80%'], //宽高
  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: ['60%', '80%'], //宽高
  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: ['60%', '80%'], //宽高
  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: ['60%', '80%'], //宽高
  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: ['60%', '80%'], //宽高
  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: ['60%', '80%'], //宽高
  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: ['60%', '80%'], //宽高
  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: ['60%', '80%'], //宽高
  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: ['60%', '80%'], //宽高
  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: ['60%', '80%'], //宽高
  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: ['60%', '80%'], //宽高
  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 upload() {
  646. if (document.getElementById("upFile").files.length > 0) {
  647. var formData = new FormData();
  648. formData.append("upFile", document.getElementById("upFile").files[0]);
  649. formData.append("token", $.cookie("token"));
  650. $.ajax({
  651. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  652. type: "POST",
  653. data: formData,
  654. /**
  655. *必须false才会自动加上正确的Content-Type
  656. */
  657. contentType: false,
  658. /**
  659. * 必须false才会避开jQuery对 formdata 的默认处理
  660. * XMLHttpRequest会对 formdata 进行正确的处理
  661. */
  662. processData: false,
  663. success: function (result) {
  664. document.getElementById("upFile").outerHTML = document.getElementById("upFile")
  665. .outerHTML;
  666. $("#upFile").change(function () {
  667. upload();
  668. });
  669. var r = $.parseJSON(result);
  670. if (r.state.toLowerCase() == "success") {
  671. $(".fjnr").text(r.data);
  672. $("#scfj").show();
  673. }
  674. }
  675. });
  676. } else {
  677. layer.confirm('请上传文件!', {
  678. btn: ['确定']
  679. });
  680. }
  681. }
  682. //来源
  683. function LY(obj) {
  684. obj.empty();
  685. obj.append('<option selected="selected" value="">请选择</option>');
  686. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
  687. "token": $.cookie("token"),
  688. id: 1
  689. }, function (data) {
  690. if (data.state.toLowerCase() == "success") {
  691. var content = data.data;
  692. $(content).each(function (i, n) {
  693. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(
  694. obj);
  695. })
  696. }
  697. })
  698. }
  699. //类别
  700. function LB(obj) {
  701. obj.empty();
  702. obj.append('<option selected="selected" value="">请选择</option>');
  703. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
  704. "token": $.cookie("token"),
  705. id: 2
  706. }, function (data) {
  707. if (data.state.toLowerCase() == "success") {
  708. var content = data.data;
  709. $(content).each(function (i, n) {
  710. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(
  711. obj);
  712. })
  713. }
  714. })
  715. }
  716. // 主题
  717. function ZT(obj) {
  718. obj.empty();
  719. obj.append('<option selected="selected" value="">请选择</option>');
  720. $.getJSON(huayi.config.callcenter_url + "Dictionary/GetDicValueListById", {
  721. "token": $.cookie("token"),
  722. id: 3
  723. }, function (data) {
  724. if (data.state.toLowerCase() == "success") {
  725. var content = data.data;
  726. $(content).each(function (i, n) {
  727. $("<option value='" + n.F_ValueId + "'>" + n.F_Value + "</option>").appendTo(
  728. obj);
  729. })
  730. }
  731. })
  732. }
  733. ///坐席
  734. function ZX(obj) {
  735. obj.empty();
  736. obj.append('<option selected="selected" value="">请选择</option>');
  737. $.getJSON(huayi.config.callcenter_url + "UserAccount/GetSeatList", {
  738. "token": $.cookie("token"),
  739. }, function (data) {
  740. if (data.state.toLowerCase() == "success") {
  741. var content = data.data;
  742. $(content).each(function (i, n) {
  743. $("<option value='" + n.F_UserCode + "'>" + n.F_UserName + "</option>")
  744. .appendTo(obj);
  745. })
  746. }
  747. })
  748. }
  749. function tree() {
  750. $.get(huayi.config.callcenter_url + 'Department/GetDeptList', {
  751. "token": $.cookie("token"),
  752. // "pid": pid
  753. }, function (result) {
  754. result = $.parseJSON(result);
  755. $.fn.zTree.init($("#addTreeDemo"), setting1, result.data); //实例化树形图
  756. });
  757. }
  758. var setting1 = {
  759. data: {
  760. key: {
  761. name: "F_DeptName"
  762. },
  763. simpleData: {
  764. enable: true,
  765. idKey: "F_DeptId",
  766. pIdKey: "F_PartentId",
  767. rootPId: 0
  768. }
  769. },
  770. callback: {
  771. onClick: zTreeOnClick
  772. }
  773. };
  774. function zTreeOnClick(event, treeId, treeNode) {
  775. if (treeNode.level >= 1) {
  776. $('.inps').val(treeNode.F_DeptName);
  777. $("#PID").val(treeNode.F_DeptId);
  778. $("#Dpment").val(treeNode.F_DeptId);
  779. $(".Cleans").show();
  780. }
  781. };
  782. $(".exportFile").click(function () {
  783. // 坐席
  784. var usercodeID = "";
  785. var usercode_ = $("#ZX").val(); //坐席
  786. if (usercode_ != null) {
  787. $(usercode_).each(function (i, n) {
  788. var obj1 = "";
  789. obj1 = n + ",";
  790. usercodeID += obj1;
  791. });
  792. } else {
  793. usercodeID = "";
  794. }
  795. // 调度员
  796. var ddusercodeID = "";
  797. var ddusercode_ = $("#yardman").val(); //坐席
  798. if (ddusercode_ != null) {
  799. $(ddusercode_).each(function (i, n) {
  800. var obj2 = "";
  801. obj2 = n + ",";
  802. ddusercodeID += obj2;
  803. });
  804. } else {
  805. ddusercodeID = "";
  806. }
  807. var workid = $("#wids").val()
  808. var state = $("#state").val() == undefined ? "" : $("#state").val() //=工单状态
  809. var type = $("#type").val() //=工单类型
  810. var bigtype = $("#bigtype").val() == undefined ? "" : $("#bigtype").val() //=大类别
  811. var smalltype = $("#smalltype").val() == undefined ? "" : $("#smalltype").val() //=小类别
  812. var usercode = usercodeID //=坐席工号
  813. var ddusercode = ddusercodeID //审核员
  814. var keyid = $("#keyid").val() //=关键词id
  815. var source = $("#source").val() //=来源&
  816. var starttime = $("#starttime").val() //=开始时间
  817. var endtime = $("#endtime").val() //=结束时间
  818. var deptid = $("#PID").val()
  819. var tab = 1 //待处理
  820. var sourcearea = $('#sourceAreas').val() //区域
  821. var url = huayi.config.callcenter_url + "WorkOrder/GetTimeOutList?token=" + $.cookie("token");
  822. url += "&workid=" + workid + "&state=" + state + "&type=" + type + "&bigtype=" + bigtype +
  823. "&smalltype=" + smalltype + "&usercode=" + usercode + "&ddusercode=" + ddusercode + "&keyid=" + keyid + "&source=" + source +
  824. "&starttime=" + starttime + "&endtime=" + endtime + "&deptid=" + deptid + "&tab=" + tab +
  825. "&sourcearea=" + sourcearea + "&jianhang=0" + "&isdc=1";
  826. window.location.href = url;
  827. })
  828. </script>
  829. </body>
  830. </html>