Bläddra i källkod

Merge branch 'dev' of http://192.168.1.41:3000/maixinrong/Calculation into dev

MaiXinRong 2 år sedan
förälder
incheckning
04c1c33d55

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

@@ -149,6 +149,8 @@ let JpcJsPDFHelper = {
         function private_drawSignature(doc, ctx, cell, styles, controls, mergedBand, onlyShowBorder, signatureRelArr) {
             ctx.beginPath();
             let style = styles[cell[JV.PROP_STYLE]];
+             // 印章的cell表框都要去掉
+             if(cell.path&&cell.signType) style =  'Default_None';
             if (style) {
                 let isNeedMergeBand = private_chkIfInMergedBand(mergedBand, cell);
                 private_drawLine(cell, doc, ctx, style, JV.PROP_TOP, [JV.PROP_LEFT, JV.PROP_TOP],[JV.PROP_RIGHT, JV.PROP_TOP], mergedBand, styles, isNeedMergeBand);

+ 6 - 8
app/public/report/js/rpt_move_signature.js

@@ -154,23 +154,21 @@ class MoveSignatureTool {
 
     // 临时签章移动事件(控制签章只能在报表中移动)
     templateSignatureMove(event, me) {
-
-
+        // 表格大小
+        const size = me.jpcOutput.getReportSizeInPixel(me.pageObj, getScreenDPI());
         const { top, left } = $("#rptCanvas").position();
-        const canvasWidth = $("#rptCanvas").width();
-        const canvasHeight = $("#rptCanvas").height();
         const signatureWidth = $("#templateSignature").width();
         const signatureHeight = $("#templateSignature").height();
-        const maxTop = canvasHeight + top - signatureHeight; //签章的最大y坐标
-        const maxLeft = canvasWidth + left - signatureWidth; //签章的最大x坐标
+        const maxTop = size[1] + top - signatureHeight + me.jpcOutput.offsetY * 2; //签章的最大y坐标
+        const maxLeft = size[0] + left - signatureWidth + me.jpcOutput.offsetX * 2; //签章的最大x坐标
 
         const mousePos = me.getMousePos(event, me);
         let newTop = mousePos.y - me.subPos.y + top;
         let newLeft = mousePos.x - me.subPos.x + left;
         if ((mousePos.y - me.subPos.y) < 0) newTop = top + me.jpcOutput.offsetY;
         if ((mousePos.x - me.subPos.x) < 0) newLeft = left + me.jpcOutput.offsetX;
-        if ((mousePos.y - me.subPos.y) > maxTop - top) newTop = maxTop - me.jpcOutput.offsetXY;
-        if ((mousePos.x - me.subPos.x) > maxLeft - left) newLeft = maxLeft - me.jpcOutput.offsetX;
+        if ((mousePos.y - me.subPos.y) > maxTop - top) newTop = maxTop ;
+        if ((mousePos.x - me.subPos.x) > maxLeft - left) newLeft = maxLeft;
 
         event.currentTarget.style.top = `${newTop}px`;
         event.currentTarget.style.left = `${newLeft}px`;

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

@@ -234,6 +234,10 @@ function buildSignatureCellSvg(cell, styles, controls, fonts, pageMergeBorder, r
         //引用了padding后,top坐标不用考虑offset了
         HtoVStr = ` transform="translate(${(actArea.Bottom - actArea.Top + 2)},0) rotate(90)"`;
     }
+    
+    // 印章的cell表框都要去掉
+    if(cell.path&&cell.signType) style =  '';
+
     if (style) {
         let leftBS = getActualBorderStyle(cell, styles, mergeBandStyle, (pageMergeBorder)?pageMergeBorder:rptMergeBorder[JV.PROP_AREA], JV.PROP_LEFT);
         // if (style[JV.PROP_LEFT] && parseFloat(style[JV.PROP_LEFT][JV.PROP_LINE_WEIGHT]) > 0) {