Selaa lähdekoodia

空行提上的签章问题

Tony Kang 1 vuosi sitten
vanhempi
commit
aca8941353
2 muutettua tiedostoa jossa 21 lisäystä ja 1 poistoa
  1. 17 1
      app/controller/report_controller.js
  2. 4 0
      app/reports/rpt_component/jpc_flow_tab.js

+ 17 - 1
app/controller/report_controller.js

@@ -1874,7 +1874,23 @@ async function mergeStampSignature(ctx, status, pageData, singleRoleRel, rpt_ids
                     }
                 }
                 if (newStampCells.length > 0) {
-                    page.signature_cells = page.signature_cells.concat(newStampCells);
+                    if (page.liftUpInfo) {
+                        const tmpStampCells = [];
+                        newStampCells.forEach(newStampCell => {
+                            const tmpCell = JSON.parse(JSON.stringify(newStampCell));
+                            tmpStampCells.push(tmpCell);
+                            let adjustHeight = page.liftUpInfo.liftUpHeight;
+                            const tmpTop = tmpCell.area.Top - adjustHeight;
+                            if (tmpTop < 10) {
+                                adjustHeight = adjustHeight - (10 - tmpTop);
+                            }
+                            tmpCell.area.Top = tmpCell.area.Top - adjustHeight;
+                            tmpCell.area.Bottom = tmpCell.area.Bottom - adjustHeight;
+                        });
+                        page.signature_cells = page.signature_cells.concat(tmpStampCells);
+                    } else {
+                        page.signature_cells = page.signature_cells.concat(newStampCells);
+                    }
                 }
             }
         }

+ 4 - 0
app/reports/rpt_component/jpc_flow_tab.js

@@ -1107,6 +1107,10 @@ JpcFlowTabSrv.prototype.createNew = function() {
             liftUpCells(pageItem[JV.PROP_SIGNATURE_AUDIT_CELLS], cBottom, cHeight);
             liftUpCells(pageItem[JV.PROP_INTERACT_CELLS], cBottom, cHeight);
             liftUpCells(pageItem[JV.PROP_FIGURE_CELLS], cBottom, cHeight); // 这个用途不一样,提法不同
+            pageItem.liftUpInfo = {
+                liftUpCheckBottom: cBottom,
+                liftUpHeight: cHeight,
+            }; // 这里要把提上信息放上去,为签章准备
         }
     };
     JpcFlowTabResult.combinePageCells = function(rstPageCells, verticalCombinePos, horizonCombinePos, controls, fonts) {