|
@@ -89,7 +89,7 @@ const JpcJsPDFHelper = {
|
|
|
}
|
|
|
// let signatureCounter = {"allAmt": 0, "picAmt": 0};
|
|
|
if (pageObj && pageObj.items.length > 0 ) {
|
|
|
- for(let i = 0; i < pageObj.items.length; i++) {
|
|
|
+ for (let i = 0; i < pageObj.items.length; i++) {
|
|
|
if (i > 0) {
|
|
|
doc.addPage(actPageSize.toLowerCase(), orientation);
|
|
|
}
|
|
@@ -129,9 +129,9 @@ const JpcJsPDFHelper = {
|
|
|
// let ppStatus = zTreeOprObj._chkPrePayStatus();
|
|
|
for (let cell of page.signature_cells) {
|
|
|
if (auditStatus === 3) {
|
|
|
- private_drawSignature(doc, ctx, cell, styles, controls, newPageMergeBand, false, signatureRelArr);
|
|
|
+ private_drawSignature(doc, ctx, cell, styles, controls, newPageMergeBand, false, signatureRelArr, i);
|
|
|
} else {
|
|
|
- private_drawSignature(doc, ctx, cell, styles, controls, newPageMergeBand, true, signatureRelArr);
|
|
|
+ private_drawSignature(doc, ctx, cell, styles, controls, newPageMergeBand, true, signatureRelArr, i);
|
|
|
}
|
|
|
}
|
|
|
if (PAGE_SHOW['closeWatermark'] === 0) {
|
|
@@ -164,7 +164,7 @@ const JpcJsPDFHelper = {
|
|
|
private_drawImage(doc, ctx, cell, control, cell.pic, (!!cell.isStamp), [1, 1, 1, 1]);
|
|
|
}
|
|
|
|
|
|
- function private_drawSignature(doc, ctx, cell, styles, controls, mergedBand, onlyShowBorder, signatureRelArr) {
|
|
|
+ function private_drawSignature(doc, ctx, cell, styles, controls, mergedBand, onlyShowBorder, signatureRelArr, pageIdx) {
|
|
|
ctx.beginPath();
|
|
|
let style = styles[cell[JV.PROP_STYLE]];
|
|
|
// 印章的cell表框都要去掉
|
|
@@ -179,18 +179,18 @@ const JpcJsPDFHelper = {
|
|
|
ctx.closePath();
|
|
|
if (PAGE_SHOW.isTextSignature === 0 || cell.signature_name.indexOf(JV.SIGNATURE_NAME_DUMMY) >= 0) {
|
|
|
if (!onlyShowBorder || cell.signature_name.indexOf(JV.SIGNATURE_NAME_DUMMY) >= 0) {
|
|
|
- private_drawSignatureCellText(doc, ctx, cell, controls, signatureRelArr);
|
|
|
+ private_drawSignatureCellText(doc, ctx, cell, controls, signatureRelArr, pageIdx);
|
|
|
} else {
|
|
|
for (const signRel of signatureRelArr) {
|
|
|
if (cell.signature_name === signRel.signature_name && rptSignatureHelper._chkIfAudit(signRel)) {
|
|
|
- private_drawSignatureCellText(doc, ctx, cell, controls, signatureRelArr);
|
|
|
+ private_drawSignatureCellText(doc, ctx, cell, controls, signatureRelArr, pageIdx);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- function private_drawSignatureCellText(doc, ctx, cell, controls, signatureRelArr) {
|
|
|
+ function private_drawSignatureCellText(doc, ctx, cell, controls, signatureRelArr, pageIdx) {
|
|
|
let control = null;
|
|
|
if (typeof cell[JV.PROP_CONTROL] === "string") {
|
|
|
control = controls[cell[JV.PROP_CONTROL]];
|
|
@@ -207,11 +207,20 @@ const JpcJsPDFHelper = {
|
|
|
} else {
|
|
|
// 导出PDF时,根本不需要判断cell.path是不是null or undefined
|
|
|
for (const signRel of signatureRelArr) {
|
|
|
- if (cell.signature_name === signRel.signature_name && signRel.sign_pic !== null && signRel.sign_pic !== undefined) {
|
|
|
- if (!(signRel.signature_name.indexOf(JV.SIGNATURE_NAME_DUMMY) < 0 && signRel.sign_output.indexOf('normal_sign') < 0)) {
|
|
|
- private_drawImage(doc, ctx, cell, control, signRel.sign_pic);
|
|
|
+ if (cell.signature_name === signRel.signature_name) {
|
|
|
+ if (signRel.type === '流程') {
|
|
|
+ if (signRel.flowAccList[pageIdx] >= 0 && signRel.assFlowInfos[signRel.flowAccList[pageIdx]].sign_pic) {
|
|
|
+ private_drawImage(doc, ctx, cell, control, signRel.assFlowInfos[signRel.flowAccList[pageIdx]].sign_pic);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if (signRel.sign_pic !== null && signRel.sign_pic !== undefined) {
|
|
|
+ if (!(signRel.signature_name.indexOf(JV.SIGNATURE_NAME_DUMMY) < 0 && signRel.sign_output.indexOf('normal_sign') < 0)) {
|
|
|
+ private_drawImage(doc, ctx, cell, control, signRel.sign_pic);
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
- break;
|
|
|
}
|
|
|
}
|
|
|
}
|