12345市长热线标准版-前端

WorkDC.html 25KB

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