商丘12345 前端

WorkDC.html 38KB

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