濮阳12345web

ZXYTJs.html 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720
  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. </style>
  131. </head>
  132. <body class="gray-bg">
  133. <div class="wrapper wrapper-content animated fadeInRight">
  134. <div class="daoHang clearfix">
  135. <div class="dhLeft">
  136. <sapn>
  137. <i class="syIcon"></i>位置:
  138. <a href="javaScript:;" id="ReIndex">首页</a>&gt;
  139. <a href="javaScript:;">工作列表</a>&gt;
  140. <a class="nowPosition">已提交工单</a>
  141. </sapn>
  142. </div>
  143. <div class="dhRight">
  144. <a href="" title="刷新"><i class="fa fa-refresh"></i></a>
  145. </div>
  146. </div>
  147. <div style="padding: 10px;" class="tj_content clearFix">
  148. <div style="padding: 10px;" class="tj_content clearFix">
  149. <div>
  150. <span>【搜索信息】</span>
  151. <div class="box_content">
  152. <table id="sqzx" style="width: 100%;" border="0" cellspacing="0" cellpadding="0">
  153. <tr>
  154. <th>诉求标题:</th>
  155. <td>
  156. <input type="text" placeholder="输入关键字" id="key" />
  157. </td>
  158. <th>时间:</th>
  159. <td colspan="3">
  160. <input type="text" id="starttime" class="laydate-icon" style="height: 32px;" />&nbsp;——&nbsp;<input type="text" id="endtime" class="laydate-icon" style="height: 32px;" />
  161. </td>
  162. <th></th>
  163. <td>
  164. <botton class="btns Seach">搜索</botton>
  165. <botton class="btns ">导出</botton>
  166. </td>
  167. </tr>
  168. </table>
  169. </div>
  170. <div class="" style="line-height: 50px;">
  171. </div>
  172. </div>
  173. <div>
  174. <div style="width: 100%;padding: 10px;">
  175. <table id="orderlist" data-row-style="rowStyle" data-query-params="queryParams" data-pagination="true">
  176. <thead>
  177. <tr>
  178. <th data-checkbox="true"></th>
  179. <th data-field="F_WorkOrderId" data-align="center">工单单号</th>
  180. <th data-field="F_ComTitle" data-formatter="GetCont" data-align="center">诉求标题</th>
  181. <th data-field="UserName" data-align="center">受理人</th>
  182. <th data-field="F_WorkState" data-align="center" data-formatter="States">办理状态</th>
  183. <th data-field="e" data-formatter="setCode" data-align="center">录音</th>
  184. <th data-field="F_WorkOrderId" data-formatter="Dispose" data-align="center">操作</th>
  185. </tr>
  186. </thead>
  187. <tbody class="list"></tbody>
  188. </table>
  189. </div>
  190. </div>
  191. </div>
  192. </div>
  193. <!--下载框-->
  194. <div class="t-shade lyxz">
  195. <div class="shade_k">
  196. <div class="shade_title">
  197. <span>录音播放与下载<srong class="cknum"></srong></span>
  198. <span class="setwin gbly"><a>x</a></span>
  199. </div>
  200. <div class="shade_content">
  201. <div class="Ly_box audiojs">
  202. </div>
  203. </div>
  204. </div>
  205. </div>
  206. </div>
  207. <script src="../css/laydate/laydate.js"></script>
  208. <script src="../My97DatePicker/WdatePicker.js"></script>
  209. <script>
  210. // return '<div class="imgs" >' +
  211. // '<a class="xg" title="查看" onclick="ckxq(' + val + ')"> <i class="fa fa-search"></i></a>' +
  212. // '<a class="xg" title="编辑" onclick="bj(' + val + ')"> <i class="fa fa-pencil-square-o"></i></a>' +
  213. // '<a class="xg" title="回访" onclick="back(' + val + ')"> <i class="fa fa-mail-reply"></i></a>' +
  214. // '<a class="xg" "title="强回"onclick="recycles(' + val + ')"> <i class="fa fa-exchange"></i></a>' +
  215. // '<a class="xg" title="结案" onclick="Lawsuit(' + val + ')"> <i class="fa fa-pie-chart"></i></a>' +
  216. // '<a class="xg" "title="交办"onclick="jb(' + val + ')"> <i class="fa fa-check-square-o"></i></a>' +
  217. // '<a class="xg" "title="回收"onclick="recycle(' + val + ')"> <i class="fa fa-retweet"></i></a>' +
  218. // '<a class="xg "title="督查" onclick="Supervision(' + val + ')"> <i class="fa fa-eye"></i></a>' +
  219. // '<a class="xg" "title="强制" onclick="StrongLawsuit(' + val + ')"> <i class="fa fa-check-circle"></i></a>' +
  220. // '<a class="xg" title="删除"onclick="move(' + val + ')"> <i class="fa fa-remove"></i></a>' +
  221. // '</div>';
  222. var arr = ["<a class='xg' onclick='ckxq(data)' title='查看'>查看</a>",
  223. "<a class='xg' onclick='bj(data)' title='编辑'>编辑</a>",
  224. "<a class='xg' onclick='move(data)' title='删除'>删除</a>",
  225. "<a class='xg' onclick='tj(data)' title='提交'>提交</a>",
  226. "<a class='xg' onclick='jb(data)' title='交办'>交办</a>", //交办
  227. "<a class='xg' onclick='lader(data)' title='领导'>领导批示</a>", //领导批示
  228. "<a class='xg' onclick='city(data)' title='市长'>市长批示</a>", //市长指示
  229. "<a class='xg' onclick='Supervision(data)' title='督办'>督办</a>", //督办
  230. "<a class='xg' onclick='Supervision_(data)' title='督察'>监察</a>", //督察
  231. "<a class='xg' onclick='sh(data)' title='收回'>收回</a>", //收回
  232. "<a class='xg' onclick='cs(data)' title='查收'>查收</a>", //查收
  233. "<a class='xg' onclick='th(data)' title='退回申请'>退回申请</a>", //退回申请
  234. "<a class='xg' onclick='bl(data)' title='办理'>办理</a>", //办理
  235. "<a class='xg' onclick='ys(data)' title='申请延时'>申请延时</a>", //延时申请
  236. "<a class='xg' onclick='shth(data)' title='退回审核'>退回审核</a>", //退回审核
  237. "<a class='xg' onclick='hf(data)' title='回访'>回访</a>", //回访
  238. "<a class='xg' onclick='shys(data)' title='延时审核'>延时审核</a>", //延时审核
  239. "<a class='xg' onclick='cb(data)' title='重办'>重办</a>", //重办
  240. "<a class='xg' onclick='Lawsuit(data)' title='结案'>结案</a>", //结案
  241. ];
  242. $(document).ready(function() {
  243. load();
  244. laydate.skin('blue');
  245. laydate({
  246. elem: '#starttime',
  247. event: 'focus'
  248. });
  249. laydate({
  250. elem: '#endtime',
  251. event: 'focus'
  252. });
  253. ///搜素
  254. $(".Seach").click(function() {
  255. load();
  256. })
  257. });
  258. //关闭录音弹出
  259. $(".gbly").click(function() {
  260. $(".lyxz").removeClass("cx");
  261. $('audio')[0].pause();
  262. });
  263. $("#orderlist").on("click-row.bs.table", function(e, row, ele) {
  264. $('.success').removeClass('success'); //去除之前选中的行的,选中样式
  265. $(ele).addClass('success'); //添加当前选中的 success样式用于区别
  266. });
  267. //获取查询信息
  268. function load() {
  269. //先销毁表格
  270. $('#orderlist').bootstrapTable('destroy');
  271. //初始化表格,动态从服务器加载数据
  272. $("#orderlist").bootstrapTable({
  273. method: "get", //使用get请求到服务器获取数据
  274. url: huayi.config.callcenter_url + "WorkOrder/GetZXDealList", //获取数据的Servlet地址
  275. contentType: "application/x-www-form-urlencoded",
  276. striped: true, //表格显示条纹
  277. pagination: true, //启动分页
  278. pageSize: 10, //每页显示的记录数
  279. pageNumber: 1, //当前第几页
  280. pageList: [10, 20, 50, 100], //记录数可选列表
  281. search: false, //是否启用查询
  282. showColumns: false, //显示下拉框勾选要显示的列
  283. showRefresh: false, //显示刷新按钮
  284. sidePagination: "server", //表示服务端请求
  285. //设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
  286. //设置为limit可以获取limit, offset, search, sort, order
  287. queryParamsType: "undefined",
  288. queryParams: function queryParams(params) { //设置查询参数
  289. var param = {
  290. page: params.pageNumber,
  291. pagesize: params.pageSize,
  292. state: $("#state").val(), //=工单状态
  293. type: $("#type").val(), //=工单类型
  294. bigtype: $("#bigtype").val(), //=大类别
  295. smalltype: $("#smalltype").val(), //=小类别
  296. key: $("#key").val(), //=关键字
  297. tel: $("#tel").val(), //=客户电话
  298. name: $("#name").val(), //=客户名称
  299. code: $("#code").val(), //=坐席工号
  300. // keyid:2,//=关键词id
  301. tab: -1,//已提交
  302. source: $("#source").val(), //=来源&
  303. starttime: $("#starttime").val(), //=开始时间
  304. endtime: $("#endtime").val(), //=结束时间
  305. token: $.cookie("token")
  306. };
  307. return param;
  308. },
  309. onLoadSuccess: function(data) { //加载成功时执行
  310. // layer.msg("加载成功");
  311. //console.log(data);
  312. },
  313. onLoadError: function() { //加载失败时执行
  314. //layer.msg("加载数据失败", { time: 1500, icon: 2 });
  315. }
  316. });
  317. }
  318. //状态
  319. function States(val) {
  320. var html = '';
  321. switch(val + '') {
  322. case '0':
  323. html = '新工单';
  324. break;
  325. case '1':
  326. html = '待交办';
  327. break;
  328. case '2':
  329. html = '待查收';
  330. break;
  331. case '3':
  332. html = '退回审核中';
  333. break;
  334. case '4':
  335. html = '办理中';
  336. break;
  337. case '5':
  338. html = '延时审核';
  339. break;
  340. case '6':
  341. html = '已办理';
  342. break;
  343. case '7':
  344. html = '已回访';
  345. break;
  346. case '8':
  347. html = '重办中';
  348. break;
  349. case '9':
  350. html = '已结案';
  351. break;
  352. }
  353. return html;
  354. }
  355. //音频
  356. function setCode(val) {
  357. if(val) {
  358. return '<div class="imgs" style="cursor: pointer;">' +
  359. '<img src="../img/vice.png" alt="" onclick= ck(this) item="' + val + '" />' +
  360. '</div>';
  361. } else {
  362. return '';
  363. }
  364. }
  365. //录音
  366. function ck(val) {
  367. var path = $(val).attr("item");
  368. $(".lyxz").addClass("cx");
  369. $(".Ly_box").empty();
  370. $(".down").attr("href", path);
  371. $('<audio style="width: 100%;"class=" " src="' + path + '" controls="controls" ></audio>').appendTo(".Ly_box");
  372. $('.shade_k').css({
  373. 'top' : $(document).scrollTop() + ($(window).height() - $('.shade_k').height() - 289)/2,
  374. 'left' : ($(window).width()-$('.shade_k').width())/2,
  375. 'position' : 'absolute'
  376. });
  377. }
  378. function GetCont(val) {
  379. if(val) {
  380. var str = '<div '
  381. if(val.length > 10) {
  382. str = str + ' title="' + val + '" ';
  383. val = val.substr(0, 10) + "...";
  384. }
  385. return str + '>' + val + '</div>';
  386. } else {
  387. return '';
  388. }
  389. }
  390. //操作
  391. function Dispose(val, row) {
  392. var Rows = row.Buttons;
  393. var html = '';
  394. for(var i = 0; i < Rows.length; i++) {
  395. var html1 = arr[Rows[i].key * 1 - 1];
  396. if(html1) {
  397. html1 = html1.replace("data", val);
  398. }
  399. html += html1;
  400. }
  401. return html;
  402. }
  403. //查看详情
  404. function ckxq(str) {
  405. layer.open({
  406. type: 2,
  407. content: "../CommonHtml/WorkDatil.html?wid=" + str, //iframe的url,no代表不显示滚动条
  408. title: '工单详情',
  409. area: ['85%', '80%'], //宽高
  410. });
  411. }
  412. //编辑
  413. function bj(str) {
  414. layer.open({
  415. type: 2,
  416. content: "../CommonHtml/AddAppeal.html?wid=" + str, //iframe的url,no代表不显示滚动条
  417. title: '编辑工单',
  418. area: ['96%', '80%'], //宽高
  419. });
  420. }
  421. //删除
  422. function move(str) {
  423. layer.confirm('确定删除工单?', {
  424. btn: ['是', '否'] //按钮
  425. }, function() {
  426. $.post(huayi.config.callcenter_url + "WorkOrder/DelWorkOrder", {
  427. ids: str,
  428. token: $.cookie("token")
  429. }, function(result) {
  430. result = JSON.parse(result);
  431. if(result.state.toLowerCase() == "success") {
  432. layer.msg("删除成功");
  433. load();
  434. }
  435. })
  436. });
  437. }
  438. //提交
  439. function tj(str) {
  440. layer.confirm('确定要提交工单么?', {
  441. btn: ['确定', '取消'] //按钮
  442. }, function() {
  443. //请求后台数据
  444. /*发送请求*/
  445. $.post(huayi.config.callcenter_url + "WorkOrder/SubmitWorkOrder", {
  446. ids: str,
  447. token: $.cookie("token")
  448. }, function(result) {
  449. result = JSON.parse(result);
  450. if(result.state.toLowerCase() == "success") {
  451. layer.msg("提交成功");
  452. load();
  453. }
  454. })
  455. });
  456. }
  457. //交办
  458. function jb(str) {
  459. layer.open({
  460. type: 2,
  461. content: "../CommonHtml/JiaoBan.html?wid=" + str, //iframe的url,no代表不显示滚动条
  462. title: '工单交办',
  463. area: ['87%', '80%'], //宽高
  464. });
  465. }
  466. //领导批示
  467. function lader(str) {
  468. layer.open({
  469. type: 2,
  470. content: "../CommonHtml/Leader.html?wid=" + str, //iframe的url,no代表不显示滚动条
  471. title: '领导批示',
  472. area: ['45%', '40%'], //宽高
  473. });
  474. }
  475. //市长批示
  476. function city(str) {
  477. layer.open({
  478. type: 2,
  479. content: "../CommonHtml/shizhang.html?wid=" + str, //iframe的url,no代表不显示滚动条
  480. title: '领导批示',
  481. area: ['45%', '40%'], //宽高
  482. });
  483. }
  484. //办理
  485. function bl(str) {
  486. layer.open({
  487. type: 2,
  488. content: "../CommonHtml/banli.html?wid=" + str, //iframe的url,no代表不显示滚动条
  489. title: '办理工单',
  490. area: ['45%', '40%'], //宽高
  491. });
  492. }
  493. //督办
  494. function Supervision(str) {
  495. layer.open({
  496. type: 2,
  497. content: "../CommonHtml/Supervision_.html?wid=" + str + '&type=1', //iframe的url,no代表不显示滚动条
  498. title: '督办',
  499. area: ['35%', '30%'], //宽高
  500. });
  501. }
  502. //督查
  503. function Supervision_(str) {
  504. layer.open({
  505. type: 2,
  506. content: "../CommonHtml/Supervision_.html?wid=" + str + '&type=2', //iframe的url,no代表不显示滚动条
  507. title: '监察',
  508. area: ['35%', '30%'], //宽高
  509. });
  510. }
  511. //强制结案
  512. function StrongLawsuit(str) {
  513. layer.open({
  514. type: 2,
  515. content: "../CommonHtml/StrongLawsuit.html?wid=" + str, //iframe的url,no代表不显示滚动条
  516. title: '诉求单强制结案',
  517. area: ['35%', '30%'], //宽高
  518. });
  519. }
  520. //查收
  521. function cs(str) {
  522. layer.confirm('确定要查收?', {
  523. btn: ['是', '否'] //按钮
  524. }, function() {
  525. $.post(huayi.config.callcenter_url + "WorkOrder/ReceiveWorkOrder", {
  526. workorderid: str,
  527. token: $.cookie("token")
  528. }, function(result) {
  529. result = JSON.parse(result);
  530. if(result.state.toLowerCase() == "success") {
  531. layer.msg("查收成功");
  532. load();
  533. }
  534. })
  535. });
  536. }
  537. //收回
  538. function sh(str) {
  539. layer.confirm('确定要回收?', {
  540. btn: ['是', '否'] //按钮
  541. }, function() {
  542. $.post(huayi.config.callcenter_url + "WorkOrder/TakeBackWorkOrder", {
  543. workorderid: str,
  544. token: $.cookie("token")
  545. }, function(result) {
  546. result = JSON.parse(result);
  547. if(result.state.toLowerCase() == "success") {
  548. layer.msg("回收");
  549. load();
  550. }
  551. })
  552. });
  553. }
  554. //强制回收
  555. function recycles() {
  556. layer.confirm('确定要强制退回吗?', {
  557. btn: ['是', '否'] //按钮
  558. });
  559. }
  560. //退回申请
  561. function th(str) {
  562. layer.open({
  563. type: 2,
  564. content: "../CommonHtml/tuihuisq.html?wid=" + str, //iframe的url,no代表不显示滚动条
  565. title: '申请退回工单',
  566. area: ['35%', '30%'], //宽高
  567. });
  568. }
  569. //审核退回申请
  570. function shth(str) {
  571. layer.open({
  572. type: 2,
  573. content: "../CommonHtml/shth.html?wid=" + str, //iframe的url,no代表不显示滚动条
  574. title: '审核退回申请',
  575. area: ['35%', '30%'], //宽高
  576. });
  577. }
  578. //办理
  579. // function th(str) {
  580. // layer.open({
  581. // type: 2,
  582. // content: "../CommonHtml/tuihuisq.html?wid=" + str, //iframe的url,no代表不显示滚动条
  583. // title: '办理工单',
  584. // area: ['35%', '30%'], //宽高
  585. // });
  586. // }
  587. //申请延时
  588. function ys(str) {
  589. layer.open({
  590. type: 2,
  591. content: "../CommonHtml/Timesq.html?wid=" + str, //iframe的url,no代表不显示滚动条
  592. title: '申请延时',
  593. area: ['45%', '40%'], //宽高
  594. });
  595. }
  596. //审核申请延时
  597. function shys(str) {
  598. layer.open({
  599. type: 2,
  600. content: "../CommonHtml/shtime.html?wid=" + str, //iframe的url,no代表不显示滚动条
  601. title: '审核延时申请',
  602. area: ['45%', '40%'], //宽高
  603. });
  604. }
  605. //诉求回访
  606. function hf(str) {
  607. layer.open({
  608. type: 2,
  609. content: "../CommonHtml/Back.html?wid=" + str, //iframe的url,no代表不显示滚动条
  610. title: '工单回访',
  611. area: ['45%', '40%'], //宽高
  612. });
  613. }
  614. //重办工单
  615. function cb(str) {
  616. layer.open({
  617. type: 2,
  618. content: "../CommonHtml/Cb.html?wid=" + str, //iframe的url,no代表不显示滚动条
  619. title: '重办工单',
  620. area: ['45%', '40%'], //宽高
  621. });
  622. }
  623. //结案
  624. function Lawsuit(str) {
  625. layer.open({
  626. type: 2,
  627. content: "../CommonHtml/lawsuits.html?wid=" + str, //iframe的url,no代表不显示滚动条
  628. title: '诉求单结案',
  629. area: ['45%', '40%'], //宽高
  630. });
  631. }
  632. $('.Appeal').click(function() {
  633. layer.open({
  634. type: 2,
  635. content: "../CommonHtml/AddAppeal.html?wid=", //iframe的url,no代表不显示滚动条
  636. title: '新增诉求',
  637. area: ['85%', '80%'], //宽高
  638. });
  639. })
  640. //上传文件
  641. function upload() {
  642. if(document.getElementById("upFile").files.length > 0) {
  643. var formData = new FormData();
  644. formData.append("upFile", document.getElementById("upFile").files[0]);
  645. formData.append("token", $.cookie("token"));
  646. $.ajax({
  647. url: huayi.config.callcenter_url + "/WorkOrder/UploadFile",
  648. type: "POST",
  649. data: formData,
  650. /**
  651. *必须false才会自动加上正确的Content-Type
  652. */
  653. contentType: false,
  654. /**
  655. * 必须false才会避开jQuery对 formdata 的默认处理
  656. * XMLHttpRequest会对 formdata 进行正确的处理
  657. */
  658. processData: false,
  659. success: function(result) {
  660. document.getElementById("upFile").outerHTML = document.getElementById("upFile").outerHTML;
  661. $("#upFile").change(function() {
  662. upload();
  663. });
  664. var r = $.parseJSON(result);
  665. if(r.state.toLowerCase() == "success") {
  666. $(".fjnr").text(r.data);
  667. $("#scfj").show();
  668. }
  669. }
  670. });
  671. } else {
  672. layer.confirm('请上传文件!', {
  673. btn: ['确定']
  674. });
  675. }
  676. }
  677. </script>
  678. </body>
  679. </html>