商丘12345 前端

WorkDC.html 36KB

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