Tony Kang hai 1 ano
pai
achega
859a6aa46c

+ 2 - 0
app/public/report/js/rpt_preview_common.js

@@ -6,6 +6,7 @@ let G_OFFSET_X = 0, G_OFFSET_Y = 0;
 let STAGE_AUDIT = []; //注意这个,与rpt_main.js不要混了
 let STAGE_LIST = [];
 let STAGE_AUDIT_ORG = [];
+let ROLE_REL_LIST = [];
 let current_stage_id = -1;
 let OSS_PATH = '';
 // 设置Date对象Format函数
@@ -38,6 +39,7 @@ async function printPageLoading() {
         let refRptTplIds = JSON.parse(sessionStorage.refRptTplIds);
         STAGE_LIST = JSON.parse(sessionStorage.STAGE_LIST);
         STAGE_AUDIT_ORG = JSON.parse(sessionStorage.STAGE_AUDIT_ORG);
+        ROLE_REL_LIST = JSON.parse(sessionStorage.ROLE_REL_LIST);
         OSS_PATH = sessionStorage.OSS_PATH;
         let isTextSignature = parseInt(sessionStorage.isTextSignature);
         current_stage_id = parseInt(sessionStorage.current_stage_id);

+ 1 - 0
app/public/report/js/rpt_print.js

@@ -29,6 +29,7 @@ let rptPrintHelper = {
             sessionStorage.refRptTplIds = JSON.stringify(refRptTplIds);
             sessionStorage.STAGE_LIST = JSON.stringify(STAGE_LIST);
             sessionStorage.STAGE_AUDIT_ORG = JSON.stringify(STAGE_AUDIT_ORG);
+            sessionStorage.ROLE_REL_LIST = JSON.stringify(ROLE_REL_LIST);
             sessionStorage.OSS_PATH = OSS_PATH;
             sessionStorage.current_stage_id = getStageId();
             sessionStorage.isTextSignature = PAGE_SHOW.isTextSignature;

+ 15 - 12
app/public/report/js/rpt_signature.js

@@ -1173,21 +1173,24 @@ function resetTextSignature(pageData, checkAudit = false) {
                     }
                 } else {
                     // 要创建新的文本签名cell
-                    for (let role of ROLE_REL_LIST) {
-                        if (!checkAudit || rptSignatureHelper._chkIfAudit(role)) {
-                            if (sCell.signature_name === role.signature_name && role.sign_output && role.sign_output.indexOf(NORMAL_SIGN_STR) >= 0) {
-                                const newCell = {
-                                    font: 'Footer',
-                                    control: sCell.control,
-                                    style: sCell.style,
-                                    Value: role.user_name,
-                                    area: { Left: sCell.area.Left, Right: sCell.area.Right, Top: sCell.area.Top, Bottom: sCell.area.Bottom },
-                                };
-                                page.cells.push(newCell);
-                                break;
+                    const newCell = {
+                        font: 'Footer',
+                        control: sCell.control,
+                        style: sCell.style,
+                        Value: '',
+                        area: { Left: sCell.area.Left, Right: sCell.area.Right, Top: sCell.area.Top, Bottom: sCell.area.Bottom },
+                    };
+                    if (ROLE_REL_LIST) {
+                        for (let role of ROLE_REL_LIST) {
+                            if (!checkAudit || rptSignatureHelper._chkIfAudit(role)) {
+                                if (sCell.signature_name === role.signature_name && role.sign_output && role.sign_output.indexOf(NORMAL_SIGN_STR) >= 0) {
+                                    newCell.Value = role.user_name;
+                                    break;
+                                }
                             }
                         }
                     }
+                    page.cells.push(newCell); // 怎么也要有这个,哪怕没有文本也要输出,补边框用的
                 }
             }
         }