Açıklama Yok

PrintPreview-12.html 16KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>打印预览</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1">
  7. <script src="../js/jquery.min.js?v=2.1.4"></script>
  8. <script src="../Script/Common/huayi.load.js"></script>
  9. <script src="../Script/Common/huayi.config.js"></script>
  10. <script src="../js/jquery.cookie.js"></script>
  11. <style>
  12. #main {
  13. width: 100%;
  14. /*margin: 0 auto;*/
  15. -webkit-box-shadow: 1px 1px 9px 2px #D2D2D2;
  16. box-shadow: 1px 1px 9px 2px #D2D2D2;
  17. background-color: #fff;
  18. padding: 30px 60px 80px 60px;
  19. }
  20. .alignC {
  21. text-align: center;
  22. }
  23. .alignC h2 {
  24. font-family: "宋体";
  25. font-weight: bold;
  26. font-size: 22pt;
  27. letter-spacing: -1px;
  28. }
  29. .headerAlign h3 div:nth-of-type(1) {
  30. font-size: 14pt;
  31. padding-top: 20px;
  32. text-align: left;
  33. font-weight: normal;
  34. margin-left: 38px;
  35. position: relative;
  36. }
  37. .headerAlign h3 {
  38. width: 646px;
  39. }
  40. .headerAlign .textCb {
  41. position: absolute;
  42. padding: 5px 12px;
  43. right: 32px;
  44. top: 30px;
  45. font-size: 16px;
  46. color: #e84545;
  47. border: 1px solid #e84545;
  48. display: none;
  49. }
  50. #main table {
  51. margin: 0 auto;
  52. width: 100%;
  53. border-collapse: collapse;
  54. font-size: 13pt;
  55. font-family: "仿宋";
  56. }
  57. tbody td {
  58. min-width: 10%;
  59. padding: 6px 0 6px 0;
  60. }
  61. .btn {
  62. margin-top: 4px;
  63. margin-bottom: 4px;
  64. background: #00a1cb;
  65. color: #fff;
  66. }
  67. .lxr,
  68. .mmdj,
  69. .jbyj,
  70. .cbyj,
  71. .ldps,
  72. .bljg {
  73. white-space: normal;
  74. word-break: break-all;
  75. }
  76. /* .mmdj,.lxr,.cbyj,.ldps,.bljg{
  77. width: 539px;
  78. display: inline-block;
  79. } */
  80. .jbyj {
  81. width: 558px;
  82. display: inline-block;
  83. }
  84. .printdz {
  85. text-align: left;
  86. text-indent: .3em;
  87. padding: 4px;
  88. }
  89. .printdd {
  90. text-align: justify;
  91. padding: 4px 2px 4px 4px;
  92. }
  93. .printnr,
  94. .printcb,
  95. .printldps,
  96. .printcljg {
  97. text-align: justify;
  98. padding: 4px;
  99. text-indent: 2em;
  100. }
  101. #inputs {
  102. width: 0;
  103. height: 0;
  104. }
  105. </style>
  106. <style media="print">
  107. /*设置打印样式 标题宋体加黑二号*/
  108. .headerAlign h2 {
  109. font-family: "宋体" !important;
  110. font-weight: bold !important;
  111. font-size: 22pt !important;
  112. letter-spacing: -1px !important;
  113. }
  114. .textCb {
  115. color: #e84545 !important;
  116. }
  117. .headerAlign h3 div:nth-of-type(1) {
  118. font-size: 14pt !important;
  119. font-family: "宋体" !important;
  120. font-weight: normal !important;
  121. margin-left: 98px !important;
  122. }
  123. .headerAlign h3 {
  124. width: 690px !important;
  125. }
  126. #main {
  127. padding: 40px 0 0 0 !important;
  128. }
  129. #main table {
  130. font-size: 13pt !important;
  131. font-family: "仿宋" !important;
  132. border-color: #000;
  133. color: #000;
  134. width: 621px !important;
  135. /*page-break-after:avoid !important;*/
  136. }
  137. tbody td {
  138. padding: 6px 0 6px 0 !important;
  139. }
  140. .printdz {
  141. text-align: left;
  142. text-indent: .3em;
  143. padding: 4px;
  144. }
  145. .printdd {
  146. text-align: justify !important;
  147. padding: 4px 2px 4px 4px !important;
  148. }
  149. .printnr,
  150. .printcb,
  151. .printldps,
  152. .printcljg {
  153. text-align: justify !important;
  154. padding: 4px !important;
  155. text-indent: 2em !important;
  156. }
  157. @page {
  158. size: A4 portrait;
  159. }
  160. #inputs {
  161. width: 0;
  162. height: 0;
  163. }
  164. </style>
  165. </head>
  166. <body>
  167. <div id="main">
  168. <div class="alignC headerAlign">
  169. <h2 style="margin-bottom: 15px; margin-top: 0;">
  170. 巩义市12345政务服务热线办公室工作交办单
  171. </h2>
  172. <span class="textCb">重办</span>
  173. </div>
  174. <table class="alignC" border="1" cellpadding="4" cellspacing="0" bordercolor="#cbcbcb">
  175. <tbody>
  176. <tr style="min-height: 49px;">
  177. <td>
  178. 承办<br />单位
  179. </td>
  180. <td colspan="5" style="text-align: left;">
  181. <span class="cbdw" style="padding-left: 5px;display: inline-block;"></span>
  182. </td>
  183. </tr>
  184. <tr style="min-height: 49px;">
  185. <td rowspan="2" width="60px">编号
  186. </td>
  187. <td rowspan="2" width="154px">
  188. <span class="gdbhs copyBtn"></span>
  189. </td>
  190. <td colspan="2" width="95px">受理时间</td>
  191. <td colspan="2" width="98px">
  192. <span class="tssj"></span>
  193. </td>
  194. <!--<td width="95px">签收时间
  195. </td>
  196. <td width="98px">
  197. <span class="QSHJ"></span>
  198. </td>-->
  199. </tr>
  200. <tr style="min-height: 49px;">
  201. <td>工单来源</td>
  202. <td>
  203. <span id="sourceName"></span>
  204. </td>
  205. <td>
  206. 办理时限
  207. </td>
  208. <td>
  209. <span class="BLSX"></span>
  210. </td>
  211. </tr>
  212. <tr style="min-height: 49px;">
  213. <td>
  214. 投诉人
  215. </td>
  216. <td>
  217. <span class="gdbh"></span>
  218. </td>
  219. <td>
  220. 联系电话
  221. </td>
  222. <td>
  223. <span class="lxdh"></span>
  224. </td>
  225. <td>
  226. 秘密等级
  227. </td>
  228. <td>
  229. <span class="MJ"></span>
  230. </td>
  231. </tr>
  232. <tr style="min-height: 49px;">
  233. <td>
  234. 地址
  235. </td>
  236. <td class="printdz" colspan="5">
  237. <span class="mmdj"></span>
  238. </td>
  239. </tr>
  240. <tr style="height: 200px;">
  241. <td class="style1">内容<br />摘要
  242. </td>
  243. <td class="printnr" colspan="5">
  244. <span class="lxr"></span>
  245. </td>
  246. </tr>
  247. <tr style="height: 130px;" class="printdd-wrapper">
  248. <td>
  249. <span>调度<br />意见</span>
  250. </td>
  251. <td class="printdd" colspan="5">
  252. <span class="jbyj"></span>
  253. </td>
  254. </tr>
  255. <tr style="height: 130px;" class="printcb-wrapper">
  256. <td>
  257. <span>拟办<br />意见</span>
  258. </td>
  259. <td class="printcb" colspan="5">
  260. <span class="cbyj "></span>
  261. </td>
  262. </tr>
  263. <tr style="height: 100px;">
  264. <td>
  265. 单位处理结果
  266. </td>
  267. <td class="printcljg" colspan="5">
  268. <span class="bljg copyBtn"></span>
  269. </td>
  270. </tr>
  271. </tbody>
  272. </table>
  273. <span class="F_Remarks">★以上登记信息仅供市长热线平台及承办人员查阅,未经许可不得向外提供</span>
  274. </div>
  275. <!--endprint1-->
  276. <div class="alignC">
  277. <input type="button" value="导出Word" class="btn" id="btn-html2canvas" />
  278. <input type="button" value="打印" class="btn" onclick="preview(1)" />
  279. </div>
  280. <textarea id="inputs" type="hidden"></textarea>
  281. <script src="../js/plugins/html2pdf/jspdf.debug.js"></script>
  282. <script src="../js/plugins/html2pdf/html2canvas.js"></script>
  283. <script src="../js/plugins/html2pdf/canvas2image.js"></script>
  284. <script src="../js/plugins/html2pdf/FileSaver.js"></script>
  285. <script src="../js/plugins/html2pdf/jquery.wordexport.js"></script>
  286. <script type="text/javascript">
  287. var wid = helper.request.queryString("wid");
  288. var printType = helper.request.queryString("printType");
  289. $(document).ready(function () {
  290. $(".printdd-wrapper").hide()
  291. $(".printcb-wrapper").hide()
  292. if (printType == "DCL") {
  293. $(".printdd-wrapper").hide()
  294. $(".printcb-wrapper").show()
  295. } else {
  296. $(".printdd-wrapper").show()
  297. $(".printcb-wrapper").hide()
  298. }
  299. if (wid) {
  300. $.getJSON(huayi.config.callcenter_url + 'WorkOrder/GetWorkOrder', {
  301. workorderid: wid,
  302. "token": $.cookie("token")
  303. }, function (result) {
  304. if (result.state.toLowerCase() == "success") {
  305. var content = result.data;
  306. //console.log( content);
  307. if (content.data[0].F_OldWorkOrderId) {
  308. $(".gdbhs").text(content.data[0].F_OldWorkOrderId); //工单
  309. } else {
  310. $(".gdbhs").text(content.data[0].F_WorkOrderId); //工单
  311. }
  312. $(".F_Remarks").text(content.data[0].F_Remarks)
  313. $(".tsfs").text(content.data[0].SourceName);
  314. $(".lxr").text(content.data[0].F_CusName); //内容摘要
  315. $('.lxdh').text(content.data[0].F_ConPhone); //联系电话
  316. //$('.dz').text(content.data[0].F_CusAddress);
  317. //$('.lxrphone').text(content.data[0].F_ConPhone);
  318. $(".lxr").text(content.data[0].F_ComContent); //内容
  319. $(".cbyj").text(content.data[0].F_ResultRemarks); //内容
  320. if (content.data[0].F_IsReload > 0) {
  321. $(".textCb").show();
  322. } else {
  323. $(".textCb").remove();
  324. }
  325. var T = content.data[0].F_CreateTime; //受理时间
  326. if (T) {
  327. var S = T.substring(0, T.indexOf(' '));
  328. $('.tssj').text(S);
  329. }
  330. var sourceName = content.data[0].SourceName; //工单来源 20180524 by fanlongfei
  331. if (sourceName) {
  332. $('#sourceName').text(sourceName);
  333. }
  334. if (content.jbdata.length > 0) {
  335. var qst = content.jbdata[content.jbdata.length - 1].F_SureTime; //签收时间
  336. if (qst) {
  337. var qs = qst.substring(0, qst.indexOf(' '));
  338. $('.QSHJ').text(qs);
  339. }
  340. var qst0 = content.jbdata[content.jbdata.length - 1].F_LimitTime; //办理时限
  341. if (qst0) {
  342. var qs0 = qst0.substring(0, qst0.indexOf(' '));
  343. $('.BLSX').html(qs0);
  344. }
  345. }
  346. $(".gdbh").text(content.data[0].F_CusName); //投诉人
  347. $(".mmdj").text(content.data[0].F_SourceAddress); //地址
  348. $(".tslx").text(content.data[0].TypeName1); //偶投诉类型
  349. // 6 || 7 || 9显示办理结果
  350. if (content.data[0].F_WorkState == '6' || content.data[0].F_WorkState == '7' ||
  351. content.data[0].F_WorkState == '9') {
  352. if (content.bldata.length > 0) {
  353. $(".bljg").text(content.bldata[0].F_Situation); // 单位处理结果
  354. }
  355. // $(".bljg").text(content.data[0].F_NewResult); //单位处理结果
  356. }
  357. //密级程度
  358. if (content.data[0].F_IsProtect == 0) {
  359. $('.MJ').text("普通");
  360. } else {
  361. $('.MJ').text("保密");
  362. }
  363. //调度意见
  364. var m = content.jbdata.length;
  365. if (m > 0) {
  366. $('.cbdw').text(content.jbdata[m - 1].DeptName); //承办单位
  367. if (content.jbdata[m - 1].OtherDeptName) {
  368. $('#xbdws').show();
  369. } else {
  370. $('#xbdws').hide();
  371. }
  372. var jbyjs = content.jbdata[m - 1].F_AssignedOpinion;
  373. if (jbyjs) {
  374. jbyjs = jbyjs.replace(/[ ]/g, "&nbsp;").replace(/\ +/g, "&nbsp;")
  375. .replace(/\r\n/g, "<br />").replace(/\n/g, "<br />");
  376. $(".jbyj").html(jbyjs);
  377. } else {
  378. $(".jbyj").html("");
  379. }
  380. }
  381. }
  382. })
  383. }
  384. $("#btn-html2canvas").on("click", function () {
  385. $("#main").wordExport();
  386. // parent.parent.layer.closeAll();
  387. // parent.parent.$('#orderlist').bootstrapTable('refresh');
  388. // parent.parent.layer.msg("操作成功!");
  389. });
  390. })
  391. $(".copyBtn").on("click", function () {
  392. var texts = $(this).text();
  393. var inputs = document.getElementById("inputs");
  394. inputs.value = texts; // 修改文本框的内容(赋值内容)
  395. inputs.select(); // 选中文本
  396. document.execCommand("copy"); // 执行浏览器复制命令
  397. layer.msg("复制成功")
  398. });
  399. function preview(oper) {
  400. if (oper < 5) {
  401. bdhtml = window.document.body.innerHTML; //获取当前页的html代码
  402. sprnstr = "<!--startprint" + oper + "-->"; //设置打印开始区域
  403. eprnstr = "<!--endprint" + oper + "-->"; //设置打印结束区域
  404. prnhtml = bdhtml.substring(bdhtml.indexOf(sprnstr) + 18); //从开始代码向后取html
  405. print.portrait = true; //纵向打印
  406. prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr)); //从结束代码向前取html
  407. window.document.body.innerHTML = prnhtml;
  408. window.print();
  409. window.document.body.innerHTML = bdhtml;
  410. // parent.parent.layer.closeAll();
  411. // parent.parent.$('#orderlist').bootstrapTable('refresh');
  412. // parent.parent.layer.msg("操作成功!");
  413. } else {
  414. window.print();
  415. }
  416. }
  417. GetData();
  418. function GetData() {
  419. var date = new Date;
  420. var year = date.getFullYear();
  421. var month = date.getMonth() + 1;
  422. var strDate = date.getDate();
  423. month = (month <= 9 ? "0" + month : month);
  424. strDate = (strDate <= 9 ? "0" + strDate : strDate)
  425. var mydate = (year.toString() + '年' + month.toString() + '月' + strDate.toString() + '日');
  426. $(".Data").text(mydate);
  427. }
  428. </script>
  429. </body>
  430. </html>