Browse Source

签章导出excel问题

Tony Kang 2 years ago
parent
commit
bfbdc7ff7c
1 changed files with 15 additions and 1 deletions
  1. 15 1
      app/public/report/js/rpt_jsexcel.js

+ 15 - 1
app/public/report/js/rpt_jsexcel.js

@@ -1425,7 +1425,21 @@ function _checkAndSetSignatureCache(pageData, signKeyArr, signPathArr, roleRel,
                             if (!(role.signature_name.indexOf(JV.SIGNATURE_NAME_DUMMY) < 0 && role.sign_output.indexOf('normal_sign') < 0)) {
                                 if (!checkAudit || role.signature_name.indexOf(JV.SIGNATURE_NAME_DUMMY) >= 0 || _chkIfAudit(role)) {
                                     // 如果签名但用户并没有选择显示签名,则不输出!
-                                    if (role.sign_pic) {
+                                    if (signatureCell.isStamp) {
+                                        //签章不能用role的图片!!!
+                                        let sPObj = _getDupPicPath(signatureCell.path);
+                                        if (sPObj !== null && isSinglePage) { // 只有在isSinglePage为true时,才需要优化签名
+                                            signatureCell.signature_name = sPObj.signature_name; // 重点,如果有相同路径的,修改signature_name!
+                                            rst = true;
+                                        } else {
+                                            const signPath = { signature_name: signatureCell.signature_name, path: null, pic: null };
+                                            signPathArr.push(signPath);
+                                            signPath.path = signatureCell.path;
+                                            signKeyArr.push(signatureCell.signature_name);
+                                            rst = true;
+                                            signSheetIdxArr[pageIdx] = true;
+                                        }
+                                    } else if (role.sign_pic) {
                                         const signPath = { signature_name: signatureCell.signature_name, path: null, pic: null };
                                         signPathArr.push(signPath);
                                         signPath.pic = role.sign_pic;