detail.ejs 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472
  1. <script type="text/javascript" src="/public/jspdf/jspdf.min.js"></script>
  2. <script type="text/javascript" src="/public/report/js/rpt_public.js"></script>
  3. <script type="text/javascript" src="/public/js/common_ajax.js"></script>
  4. <script type="text/javascript" src="/public/report/js/jpc_output_value_define.js"></script>
  5. <script type="text/javascript" src="/public/report/js/rpt_signature.js?20231024"></script>
  6. <script type="text/javascript" src="/public/report/js/rpt_figure.js"></script>
  7. <script type="text/javascript" src="/public/report/js/jpc_output.js"></script>
  8. <script type="text/javascript" src="/public/report/js/rpt_move_signature.js"></script>
  9. <script type="text/javascript" src="/public/report/js/rpt_jspdf.js"></script>
  10. <div class="panel-content">
  11. <div class="panel-title fluid">
  12. <div class="title-main d-flex justify-content-between">
  13. <div><a class="mr-2" href="/sp/<%- ctx.subProject.id %>/payment/<%- ctx.paymentTender.id %>/list/<%- trInfo.id %>"><i class="fa fa-chevron-left"></i> 返回</a><%- ctx.paymentTender.name %> / <%- trInfo.rpt_name %> / <%- ctx.detail.code %></div>
  14. <div>
  15. <% if ((ctx.detail.status == auditConst.status.uncheck || ctx.detail.status == auditConst.status.checkNo) && trInfo.is_change) { %>
  16. <span class="text-danger pull-right">报表内容已发生变化,请删除并重新生成详情</span>
  17. <% } else { %>
  18. <% include ./audit_btn.ejs %>
  19. <% if (rptAudit &&
  20. ((ctx.detail.status !== auditConst.status.checkNo && ctx.detail.status !== auditConst.status.checked) ||
  21. (ctx.detail.status === auditConst.status.checked && !nextDetail) ||
  22. (ctx.detail.status === auditConst.status.checkNo && ctx.detail.uid === ctx.session.sessionUser.accountId))
  23. ) { %>
  24. <a href="#sub-sp5" data-toggle="modal" data-target="#sub-sp5" class="btn btn-sm btn-primary pull-right mr-2">签字意见</a>
  25. <% } %>
  26. <a href="#sign-flow" data-toggle="modal" data-target="#sign-flow" class="btn btn-sm btn-outline-success pull-right mr-2">签署进度</a>
  27. <% } %>
  28. </div>
  29. </div>
  30. </div>
  31. <div class="content-wrap">
  32. <div class="c-body">
  33. <div class="sjs-height-0">
  34. <div class="row m-0 my-2">
  35. <div class="col-5">
  36. <div class="sjs-bar-1">
  37. <ul class="nav nav-tabs" id="myTab" role="tablist">
  38. <li class="nav-item">
  39. <a class="nav-link active" id="content-tab" data-tab="form" data-toggle="tab" href="#content" role="tab" aria-controls="content" aria-selected="true">表单内容</a>
  40. </li>
  41. <li class="nav-item">
  42. <a class="nav-link" id="annex-tab" data-tab="fujian" data-toggle="tab" href="#annex" role="tab" aria-controls="annex" aria-selected="false">附件</a>
  43. </li>
  44. <li class="nav-item ml-auto pt-1" id="fujian_btn" style="display:none;">
  45. <!--所有附件 翻页-->
  46. <button data-toggle="modal" class="btn btn-sm btn-primary" id="bach-download"><i class="fa fa-download "></i> 批量下载</button>
  47. <!-- <a href="javascript: void(0);" data-toggle="modal" class="btn btn-sm btn-primary" id="bach-download"><i class="fa fa-download "></i> 批量下载</a> -->
  48. <a href="javascript:void(0);" class="page-select ml-3" content="pre"><i class="fa fa-chevron-left"></i></a> <span id="currentPage">1</span>/<span id="totalPage">10</span> <a href="javascript:void(0);" class="page-select mr-3" content="next"><i class="fa fa-chevron-right"></i></a>
  49. <% if (ctx.detail.filePermission) { %>
  50. <a href="#addfujian" data-toggle="modal" class="btn btn-sm btn-light text-primary" data-placement="bottom" title="" data-original-title="上传附件"><i class="fa fa-cloud-upload" aria-hidden="true"></i> 上传附件</a>
  51. <% } %>
  52. <a href="javascript: void(0);" id="zipDown" download style="display: none;"></a>
  53. </li>
  54. </ul>
  55. </div>
  56. <div class="tab-content mt-2" id="myTabContent">
  57. <div class="tab-pane fade show active" id="content" role="tabpanel" aria-labelledby="content-tab">
  58. <div id="rpt-form">
  59. <% for (const c of content) { %>
  60. <div>
  61. <h5><%- c.title %>内容</h5>
  62. <% for (const item of c.items) { %>
  63. <div class="form-group">
  64. <label class="d-flex"><%- item.label %>
  65. <% if (item.link !== undefined) { %>
  66. <div class="dropdown dropup mx-2 show-link-dropdown">
  67. <% if (ctx.detail.uid === ctx.session.sessionUser.accountId &&
  68. (ctx.detail.status === auditConst.status.uncheck || ctx.detail.status === auditConst.status.checkNo)) { %>
  69. <a href="javascript:void(0)" data-toggle="dropdown" title="关联数据" data-target="#link-data1"><i class="fa fa-paperclip"></i></a>
  70. <% } %>
  71. <span class="show-link"><% if (item.link !== '') { %>关联数据:<%= ctx.helper._.find(numberList, { index: item.link }) ? ctx.helper._.find(numberList, { index: item.link }).Label : '' %><% } %></span>
  72. <% if (ctx.detail.uid === ctx.session.sessionUser.accountId &&
  73. (ctx.detail.status === auditConst.status.uncheck || ctx.detail.status === auditConst.status.checkNo)) { %>
  74. <div class="link-dropdown dropdown-menu pb-1" aria-labelledby="dropdownMenuButton">
  75. <div class="px-3">
  76. <% if (numberList.length > 0) { %>
  77. <% for (const numberInfo of numberList) { %>
  78. <div class="form-check py-1">
  79. <input class="form form-check-input" type="radio" id="item_<%- item.index %>_number_<%- numberInfo.index %>"
  80. value="<%- numberInfo.index %>" name="radio_<%- item.index %>" <% if (item.link === numberInfo.index) { %>checked<% } %> />
  81. <label class="form-check-label" for="item_<%- item.index %>_number_<%- numberInfo.index %>"><%- numberInfo.Label %></label>
  82. </div>
  83. <% } %>
  84. <% } %>
  85. <div class="form-check py-1">
  86. <input class="form form-check-input" type="radio" id="item_<%- item.index %>_number_" value="" <% if (item.link === '') { %>checked<% } %> name="radio_<%- item.index %>" />
  87. <label class="form-check-label" for="item_<%- item.index %>_number_">无</label>
  88. </div>
  89. <hr class="m-1">
  90. <div class="float-right">
  91. <button type="button" item-index="<%- item.index %>" old-link="<%- item.link %>" class="btn btn-sm btn-primary change-link">确定</button>
  92. </div>
  93. </div>
  94. </div>
  95. <% } %>
  96. </div>
  97. <% } %>
  98. </label>
  99. <% if (item.type === 'textarea') { %>
  100. <textarea <% if (ctx.detail.readOnly) { %>readonly<% } %> class="form-control form-control-sm" data-index="<%- item.index %>"><%- item.value %></textarea>
  101. <% } else { %>
  102. <input <% if (ctx.detail.readOnly) { %>readonly<% } %> type="<%- item.type %>" value="<%- item.type === 'number' && ctx.helper._.indexOf(item.value, '元') !== -1 ? parseFloat(item.value) : item.value %>" <% if (item.type === 'number') { %>step="0.000001"<% } %> data-index="<%- item.index %>" class="form-control form-control-sm" placeholder="请输入">
  103. <% } %>
  104. </div>
  105. <% } %>
  106. </div>
  107. <% } %>
  108. </div>
  109. </div>
  110. <!-- 附件 -->
  111. <div class="tab-pane fade" id="annex" role="tabpanel" aria-labelledby="annex-tab">
  112. <div class="sjs-sh-1" style="overflow-y: auto;">
  113. <div class="p-2">
  114. <table class="table table-bordered" style="word-break:break-all; table-layout: fixed">
  115. <thead>
  116. <tr>
  117. <td width="25" style="background-color: #e9ecef;"><input type="checkbox" id="check-all-file" ></td>
  118. <th width="40">序号</th>
  119. <th>名称</th>
  120. <th width="130">上传时间/大小</th>
  121. <th width="60">操作</th>
  122. </tr>
  123. </thead>
  124. <tbody id="attList">
  125. <% if (attList !== undefined && attList !== '') { %>
  126. <% for (const [index,att] of attList.entries()) { %>
  127. <tr>
  128. <td width="25"><input type="checkbox" class="check-file" file-id=<%- att.id %>></td>
  129. <td><%- index+1 %></td>
  130. <td><a href="javascript: void(0);" class="file-atn" f-id="<%- att.id %>"><%- att.filename %><%- att.fileext %></a></td>
  131. <td><%- moment(att.upload_time).format("YYYY-MM-DD HH:mm:ss") %><br><%- ctx.helper.bytesToSize(att.filesize) %></td>
  132. <td>
  133. <a href="/sp/<%- ctx.subProject.id %>/payment/<%- ctx.paymentTender.id %>/detail/<%- ctx.detail.id %>/file/<%- att.id %>/download" class="mr-2" title="下载"><span class="fa fa-download text-primary"></span></a>
  134. <% if (att.uid === ctx.session.sessionUser.accountId && (ctx.detail.status === auditConst.status.checked ? Boolean(att.extra_upload) : true )) { %>
  135. <a href="javascript:void(0)" class="mr-2 delete-file" data-attid="<%- att.id %>" title="删除附件"><span class="fa fa-trash text-danger"></span></a>
  136. <% } %>
  137. </td>
  138. </tr>
  139. <% } %>
  140. <% } %>
  141. </tbody>
  142. </table>
  143. <a href="" id="file-upload" target="_blank" style="display: none;"></a>
  144. </div>
  145. </div>
  146. </div>
  147. </div>
  148. </div>
  149. <div class="col-6 ml-5">
  150. <div class="d-flex flex-row">
  151. <!--<a href="javascript: void(0);" onclick="auditRptPrintHelper.showPage()" class="mr-2" >刷新</a>-->
  152. <a href="javascript: void(0);" class="mr-2" onclick="auditRptPrintHelper.directPDF()">导出pdf</a>
  153. <a href="javascript: void(0);" onclick="auditRptPrintHelper.directPrint()">打印</a>
  154. </div>
  155. <div align="center">
  156. <canvas id="auditRptCanvas" height="1200" width="920"></canvas>
  157. </div>
  158. </div>
  159. </div>
  160. </div>
  161. </div>
  162. </div>
  163. </div>
  164. <script type="text/javascript">
  165. const accountId = parseInt('<%- ctx.session.sessionUser.accountId %>');
  166. const tenderId = parseInt('<%- ctx.paymentTender.id %>');
  167. const detailId = parseInt('<%- ctx.detail.id %>');
  168. const detailStatus = parseInt('<%- ctx.detail.status %>');
  169. const trName = JSON.parse(unescape('<%- escape(JSON.stringify(trInfo.rpt_name)) %>'));
  170. const detailName = JSON.parse(unescape('<%- escape(JSON.stringify(ctx.detail.code)) %>'));
  171. const auditConst = JSON.parse(unescape('<%- escape(JSON.stringify(auditConst)) %>'));
  172. const rptAudit = JSON.parse(unescape('<%- escape(JSON.stringify(rptAudit)) %>'));
  173. <% if (rptAudit &&
  174. ((ctx.detail.status !== auditConst.status.checkNo && ctx.detail.status !== auditConst.status.checked) ||
  175. (ctx.detail.status === auditConst.status.checked && !nextDetail) ||
  176. (ctx.detail.status === auditConst.status.checkNo && ctx.detail.uid === ctx.session.sessionUser.accountId))
  177. ) { %>
  178. let currentStamp = JSON.parse(unescape('<%- escape(JSON.stringify(currentStamp)) %>'));
  179. <% } %>
  180. let tesRpttData = JSON.parse(unescape('<%- escape(JSON.stringify(report_json)) %>'));
  181. console.log(tesRpttData);
  182. const whiteList = JSON.parse('<%- JSON.stringify(whiteList) %>');
  183. let attData = JSON.parse(unescape('<%- escape(JSON.stringify(attList)) %>'));
  184. const uidList = JSON.parse(unescape('<%- escape(JSON.stringify(uidList)) %>'));
  185. let currPageFileData = [];
  186. const SCREEN_DPI = [];
  187. const PAGE_SHOW = {closeWaterMark: 1};
  188. const current_stage_status = -1;
  189. const VIEW_CANVAS = document.getElementById("auditRptCanvas");
  190. const OSS_PATH = '<%- OSS_PATH %>';
  191. const CUST_CFG = {
  192. "fonts": [
  193. {
  194. "ID": "ReportTitle_Main",
  195. "Name": "宋体",
  196. "FontBold": "T",
  197. "FontHeight": 32,
  198. "FontItalic": "F",
  199. "CfgDispName": "表标题",
  200. "FontUnderline": "F"
  201. },
  202. {
  203. "ID": "Column",
  204. "Name": "宋体",
  205. "FontBold": "F",
  206. "FontHeight": 12,
  207. "FontItalic": "F",
  208. "CfgDispName": "列标题",
  209. "FontUnderline": "F"
  210. },
  211. {
  212. "ID": "Content",
  213. "Name": "宋体",
  214. "FontBold": "F",
  215. "FontHeight": 12,
  216. "FontItalic": "F",
  217. "CfgDispName": "正文内容",
  218. "FontUnderline": "F"
  219. },
  220. {
  221. "ID": "Total",
  222. "Name": "宋体",
  223. "FontBold": "F",
  224. "FontHeight": 12,
  225. "FontItalic": "F",
  226. "CfgDispName": "合计",
  227. "FontUnderline": "F"
  228. },
  229. {
  230. "ID": "Header",
  231. "Name": "宋体",
  232. "FontBold": "F",
  233. "FontHeight": 12,
  234. "FontItalic": "F",
  235. "CfgDispName": "表眉/表脚",
  236. "FontUnderline": "F"
  237. }
  238. ],
  239. "margins": {
  240. "Top": 12,
  241. "Left": 15,
  242. "Right": 15,
  243. "Bottom": 15
  244. },
  245. "fillZero": false,
  246. "isNarrow": false,
  247. "borderThick": 2,
  248. "showVerticalLine": true,
  249. "closeWarterMark": false,
  250. "continuousOutput": true
  251. }
  252. function getStageStatus() {
  253. // if (current_stage_status === 3 || ppStatus === 3) return 3
  254. return current_stage_status;
  255. }
  256. let zTreeOprObj = {
  257. _chkPrePayStatus: function() {
  258. return -1;
  259. }
  260. };
  261. let rptTplObj = {
  262. pdfFont: {'SmartSimsun': [], 'simhei': [], 'simkai': []},
  263. isLoading: false,
  264. };
  265. let auditRptPrintHelper = {
  266. currentPageData: null,
  267. currentDownloadIdx: 0,
  268. chkPicFeatures: async function(pageData) {
  269. for (let page of pageData.items) {
  270. for (let signCell of page.signature_cells) {
  271. if (typeof signCell.path === 'string' && signCell.path.length > 10) {
  272. let paths = signCell.path.split('!;!');
  273. signCell.picFeatures = [];
  274. if (!signCell.orgArea) {
  275. signCell.orgArea = JSON.parse(JSON.stringify(signCell.area));
  276. }
  277. signCell.signType = 'mixed';
  278. for (let path of paths) {
  279. let imgSrc = path;
  280. if (path.indexOf(OSS_PATH) < 0 && path[0] !== '/') {
  281. imgSrc = OSS_PATH + path;
  282. }
  283. const picFeature = await getPicFeature(imgSrc);
  284. signCell.picFeatures.push(picFeature);
  285. }
  286. }
  287. }
  288. }
  289. },
  290. showPage: async function() {
  291. await auditRptPrintHelper.chkPicFeatures(tesRpttData);
  292. JpcCanvasOutput.cleanCanvas(VIEW_CANVAS);
  293. JpcCanvasOutput.drawPageBorder(tesRpttData, VIEW_CANVAS, getScreenDPI());
  294. JpcCanvasOutput.drawToCanvas(tesRpttData, VIEW_CANVAS, 1, false, true);
  295. },
  296. directPrint: function() {
  297. sessionStorage.report_direct_data = JSON.stringify(tesRpttData);
  298. sessionStorage.closeWaterMark = 1;
  299. sessionStorage.pageSize = 'A4';
  300. sessionStorage.OSS_PATH = OSS_PATH;
  301. window.open('/printReport/A4');
  302. },
  303. _getPdfFontCallback: function(fontProperty) {
  304. let me = auditRptPrintHelper;
  305. if (rptTplObj.pdfFont['SmartSimsun'].indexOf(fontProperty) < 0) {
  306. rptTplObj.pdfFont['SmartSimsun'].push(fontProperty);
  307. }
  308. if (rptTplObj.pdfFont['SmartSimsun'].length >= 2) {
  309. $.bootstrapLoading.end();
  310. downloadPDFReport([tesRpttData], 'A4', [tesRpttData['打印页面_信息']['报表名称']], [], [], [-1], []);
  311. }
  312. },
  313. directPDF: function() {
  314. if (rptTplObj.pdfFont['SmartSimsun'].length >= 2) {
  315. downloadPDFReport([tesRpttData], 'A4', [tesRpttData['打印页面_信息']['报表名称']], [], [], [-1], []);
  316. } else {
  317. dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-normal2.js', 'normal', this._getPdfFontCallback);
  318. dynamicLoadJs('https://d2.smartcost.com.cn/cach/SmartSimsun-bold.js', 'bold', this._getPdfFontCallback);
  319. }
  320. },
  321. };
  322. // $(document).ready(() => {
  323. // autoFlashHeight();
  324. // auditRptPrintHelper.showPage();
  325. // iniPage();
  326. // });
  327. function _getAdhocDummyCells(srcCell, rstCells, controls = null) {
  328. if (typeof srcCell.path === 'string') {
  329. let paths = srcCell.path.split('!;!');
  330. for (let dtlPathIdx = 0; dtlPathIdx < paths.length; dtlPathIdx++) {
  331. dtlPath = paths[dtlPathIdx];
  332. // srcCell.picFeatures
  333. if (dtlPath.length > 10) {
  334. let imgSrc = dtlPath;
  335. if (dtlPath.indexOf(OSS_PATH) < 0 && dtlPath[0] !== '/') {
  336. imgSrc = OSS_PATH + dtlPath;
  337. }
  338. let couldCreate = true;
  339. if (srcCell.picFeatures && srcCell.picFeatures.length === paths.length && (srcCell.picFeatures[dtlPathIdx] === 'not found!')) {
  340. couldCreate = false;
  341. }
  342. if (couldCreate) {
  343. let area = srcCell.area;
  344. if ((dtlPathIdx === 0) && (srcCell.orgArea)) {
  345. area = JSON.parse(JSON.stringify(srcCell.orgArea));
  346. let control = srcCell[JV.PROP_CONTROL];
  347. if (typeof srcCell[JV.PROP_CONTROL] === "string") {
  348. control = controls[srcCell[JV.PROP_CONTROL]];
  349. }
  350. let tmpArea = srcCell.area;
  351. srcCell.area = area;
  352. srcCell.isOrgShow = (dtlPathIdx !== 0);
  353. let signArea = getProperSignatureArea(srcCell, control, 0, 0, JV);
  354. srcCell.area = tmpArea;
  355. area[JV.PROP_LEFT] = signArea[0];
  356. area[JV.PROP_TOP] = signArea[1];
  357. area[JV.PROP_RIGHT] = signArea[2];
  358. area[JV.PROP_BOTTOM] = signArea[3];
  359. }
  360. const newStampCell = {
  361. signature_name: 'dummy_pic',
  362. control: srcCell.control,
  363. // style: srcCell.style,
  364. style: (srcCell.style && srcCell.style !== '') ? srcCell.style : 'sign_pic' ,
  365. path: imgSrc,
  366. isStamp: true,
  367. area,
  368. isOrgShow: (dtlPathIdx === 0),
  369. };
  370. rstCells.push(newStampCell);
  371. }
  372. }
  373. }
  374. }
  375. }
  376. function downloadPDFReport(pageDataArr, pageSize, rpt_names, signatureRelArr, signatureRelInfo, refRptTplIds, STAGE_AUDIT) {
  377. auditRptPrintHelper.currentDownloadIdx = 0;
  378. const private_download = function(newPageDataArr, new_rpt_names, dummyCells) {
  379. if (auditRptPrintHelper.currentDownloadIdx < newPageDataArr.length) {
  380. let singleSignatureRelArr = [];
  381. for (let rIdx = 0; rIdx < signatureRelInfo.length; rIdx++) {
  382. let rptId = refRptTplIds[auditRptPrintHelper.currentDownloadIdx];
  383. if (signatureRelInfo[rIdx].rpt_id === rptId) {
  384. singleSignatureRelArr = signatureRelArr[rIdx]; // 有些报表可能没有签名
  385. break;
  386. }
  387. }
  388. let pageData = newPageDataArr[auditRptPrintHelper.currentDownloadIdx];
  389. let rptName = new_rpt_names[auditRptPrintHelper.currentDownloadIdx];
  390. auditRptPrintHelper.currentDownloadIdx++;
  391. JpcJsPDFHelper.outputAsPdf(pageData, pageSize, rptName, singleSignatureRelArr, STAGE_AUDIT, true); // 精确控制签名
  392. if (auditRptPrintHelper.currentDownloadIdx < newPageDataArr.length) {
  393. setTimeout(private_download(newPageDataArr, new_rpt_names), 2000);
  394. } else {
  395. for (let pd of newPageDataArr) {
  396. for (let pItem of pd.items) {
  397. for (let idx = pItem.signature_cells.length - 1; idx >= 0; idx--) {
  398. let pIdx = dummyCells.indexOf(pItem.signature_cells[idx]);
  399. if (pIdx >= 0) {
  400. pItem.signature_cells.splice(idx, 1);
  401. dummyCells.splice(pIdx, 1);
  402. }
  403. }
  404. }
  405. }
  406. }
  407. }
  408. };
  409. // 导出PDF审核优化代码
  410. let picPaths = [], dummyPicAmt = 0, dummyCells = [];
  411. // 1. 先找有没有dummy
  412. for (let pageData of pageDataArr) {
  413. let tmpDummyCells = [];
  414. let controls = pageData[JV.NODE_CONTROL_COLLECTION];
  415. for (let page of pageData.items) {
  416. for (let dCell of page.signature_cells) {
  417. _getAdhocDummyCells(dCell, tmpDummyCells, controls);
  418. }
  419. if (tmpDummyCells.length > 0) {
  420. page.signature_cells = page.signature_cells.concat(tmpDummyCells);
  421. dummyCells = dummyCells.concat(tmpDummyCells);
  422. }
  423. }
  424. }
  425. dummyPicAmt = dummyCells.length;
  426. if (dummyPicAmt > 0) {
  427. // 2. 有则一个个请求下载图片,下载完后统一导出PDF
  428. $.bootstrapLoading.start();
  429. let handledAmt = 0, exceptionAmt = 0;
  430. for (let pIdx = 0; pIdx < dummyCells.length; pIdx++) {
  431. let dCell = dummyCells[pIdx];
  432. getBlobPublic(dCell.path).then(blob => {
  433. if (blob === 'not found!') {
  434. exceptionAmt++;
  435. if ((handledAmt + exceptionAmt) === dummyPicAmt) {
  436. $.bootstrapLoading.end();
  437. private_download(pageDataArr, rpt_names, dummyCells);
  438. }
  439. } else {
  440. let oFileReader = new FileReader();
  441. oFileReader.onloadend = function (e) {
  442. let base64 = e.target.result;
  443. dCell.pic = base64;
  444. handledAmt++;
  445. if ((handledAmt + exceptionAmt) === dummyPicAmt) {
  446. $.bootstrapLoading.end();
  447. private_download(pageDataArr, rpt_names, dummyCells);
  448. }
  449. };
  450. oFileReader.readAsDataURL(blob);
  451. }
  452. });
  453. }
  454. } else {
  455. // 3. 无则普通导出
  456. private_download(pageDataArr, rpt_names);
  457. }
  458. //*/
  459. }
  460. </script>