Keine Beschreibung

toSupervListProvincialPlatform.html 34KB

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