|
|
@@ -597,10 +597,12 @@ let rptArchiveObj = {
|
|
|
company_stamp: 'company_stamp_areas',
|
|
|
private_stamp: 'private_stamp_areas'
|
|
|
};
|
|
|
- const _chkAndSetArea = (sCell, actSignArea, signDateArea, pageIdx, signNameKey) => {
|
|
|
+ const _chkAndSetArea = (sCell, actSignArea, dtCell, pageIdx, signNameKey) => {
|
|
|
let idx = psInfoStr.indexOf(sCell[signNameKey]);
|
|
|
const signType = sCell.signType || 'normal';
|
|
|
const areaKey = _areaKeyCache[signType] || 'areas';
|
|
|
+ let signDateArea = null;
|
|
|
+ if (dtCell) signDateArea = _getProperSignDateArea(dtCell.area);
|
|
|
if (idx < 0) {
|
|
|
psInfoStr.push(sCell[signNameKey]);
|
|
|
let newPsInfo = {'name': sCell[signNameKey], areas: [], company_stamp_areas: [], private_stamp_areas: [], sign_date_areas: [], order: signatureOrderObj[sCell[signNameKey]]};
|
|
|
@@ -610,6 +612,15 @@ let rptArchiveObj = {
|
|
|
// 新需求:要把签名日期的坐标也记录下来,增加 sign_date_areas 属性
|
|
|
if (signDateArea) {
|
|
|
const sArea = _getAreasProperty(signDateArea);
|
|
|
+ // a. 加字体
|
|
|
+ if (typeof dtCell.font === "string") {
|
|
|
+ sArea.font = pageData.font_collection[dtCell.font] || dtCell.font;
|
|
|
+ } else {
|
|
|
+ sArea.font = dtCell.font;
|
|
|
+ }
|
|
|
+ // sArea.font = JSON.parse(JSON.stringify(sArea.font));
|
|
|
+ // b. 加控制
|
|
|
+ sArea.control = dtCell.control;
|
|
|
sArea.pages.push(pageIdx + 1);
|
|
|
newPsInfo.sign_date_areas.push(sArea);
|
|
|
}
|
|
|
@@ -635,6 +646,15 @@ let rptArchiveObj = {
|
|
|
psInfo[idx][areaKey].push(area);
|
|
|
if (signDateArea) {
|
|
|
const sArea = _getAreasProperty(signDateArea);
|
|
|
+ // a. 加字体
|
|
|
+ if (typeof dtCell.font === "string") {
|
|
|
+ sArea.font = pageData.font_collection[dtCell.font] || dtCell.font;
|
|
|
+ } else {
|
|
|
+ sArea.font = dtCell.font;
|
|
|
+ }
|
|
|
+ // sArea.font = JSON.parse(JSON.stringify(sArea.font));
|
|
|
+ // b. 加控制
|
|
|
+ sArea.control = dtCell.control;
|
|
|
sArea.pages.push(pageIdx + 1);
|
|
|
psInfo[idx].sign_date_areas.push(sArea);
|
|
|
}
|
|
|
@@ -654,8 +674,9 @@ let rptArchiveObj = {
|
|
|
}
|
|
|
for (let sCell of page.signature_cells) {
|
|
|
const dtCell = page.signature_date_cells.find(cell => cell.signature_name === `${sCell.signature_name}_签字日期`);
|
|
|
- const signDateArea = dtCell ? _getProperSignDateArea(dtCell.area) : null;
|
|
|
- // sign_date_areas
|
|
|
+ if (dtCell) {
|
|
|
+ dtCell.Value = '';
|
|
|
+ }
|
|
|
// sCell.signature_name 草图不用加密
|
|
|
if (sCell.signature_name.indexOf('dummy_pic') < 0) {
|
|
|
let control = null;
|
|
|
@@ -665,10 +686,10 @@ let rptArchiveObj = {
|
|
|
control = sCell[JV.PROP_CONTROL];
|
|
|
}
|
|
|
let actSignArea = _getProperSignatureArea(sCell, control);
|
|
|
- _chkAndSetArea(sCell, actSignArea, signDateArea, i, 'signature_name');
|
|
|
+ _chkAndSetArea(sCell, actSignArea, dtCell, i, 'signature_name');
|
|
|
} else {
|
|
|
let stampArea = _getStampArea(sCell);
|
|
|
- _chkAndSetArea(sCell, stampArea, signDateArea, i, 'signatureName'); // 注意:这里的判断不是signature_name(含dummy的),而是signatureName属性(之前的章信息设计导致)
|
|
|
+ _chkAndSetArea(sCell, stampArea, dtCell, i, 'signatureName'); // 注意:这里的判断不是signature_name(含dummy的),而是signatureName属性(之前的章信息设计导致)
|
|
|
}
|
|
|
}
|
|
|
}
|