夏邑12345_前端

expiredWorkOrders.html 24KB

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