|
@@ -1022,6 +1022,7 @@ JpcFlowTabSrv.prototype.createNew = function() {
|
|
|
rst = rst.concat(tabRstLst[i]);
|
|
rst = rst.concat(tabRstLst[i]);
|
|
|
tabRstLst[i] = null;
|
|
tabRstLst[i] = null;
|
|
|
}
|
|
}
|
|
|
|
|
+ me.checkCombineEvent(JV.RUN_TYPE_AFTER_COMBINE, [], [], rst, $CURRENT_RPT, dataObj, me, page);
|
|
|
return rst;
|
|
return rst;
|
|
|
};
|
|
};
|
|
|
JpcFlowTabResult.setPageFlow = function(rptTpl, dataObj, page, thisPageRst, $CURRENT_RPT) {
|
|
JpcFlowTabResult.setPageFlow = function(rptTpl, dataObj, page, thisPageRst, $CURRENT_RPT) {
|
|
@@ -1178,6 +1179,11 @@ JpcFlowTabSrv.prototype.createNew = function() {
|
|
|
// 另:要考虑紧密输出情况,需要重新拆分数据
|
|
// 另:要考虑紧密输出情况,需要重新拆分数据
|
|
|
// const regSplit = new RegExp('\\|', 'g');
|
|
// const regSplit = new RegExp('\\|', 'g');
|
|
|
const _splitValues = function(oCell) {
|
|
const _splitValues = function(oCell) {
|
|
|
|
|
+ let chkFontName = '宋体';
|
|
|
|
|
+ let chkFontHeight = 12;
|
|
|
|
|
+ const tmpVal = (`${oCell.Value || ''}`).replace(/\|/g, '');
|
|
|
|
|
+ const area = oCell.area;
|
|
|
|
|
+
|
|
|
// JpcFieldHelper.setValue(data_field, theRecIdx, value);
|
|
// JpcFieldHelper.setValue(data_field, theRecIdx, value);
|
|
|
const values = (typeof oCell.Value === 'string') ? oCell.Value.split('|') : [oCell.Value];
|
|
const values = (typeof oCell.Value === 'string') ? oCell.Value.split('|') : [oCell.Value];
|
|
|
let font = oCell[JV.PROP_FONT];
|
|
let font = oCell[JV.PROP_FONT];
|
|
@@ -1186,12 +1192,24 @@ JpcFlowTabSrv.prototype.createNew = function() {
|
|
|
}
|
|
}
|
|
|
// // if (values.length > rst) rst = values.length; // 考虑到紧凑输出,不能那么快设置rst
|
|
// // if (values.length > rst) rst = values.length; // 考虑到紧凑输出,不能那么快设置rst
|
|
|
// const font = private_get_font(tab_field[JV.PROP_FONT]);
|
|
// const font = private_get_font(tab_field[JV.PROP_FONT]);
|
|
|
- let chkFontName = '宋体';
|
|
|
|
|
- let chkFontHeight = 12;
|
|
|
|
|
if (font) {
|
|
if (font) {
|
|
|
chkFontName = font[JV.FONT_PROPS[0]];
|
|
chkFontName = font[JV.FONT_PROPS[0]];
|
|
|
chkFontHeight = parseFloat(font[JV.FONT_PROPS[JV.FONT_PROP_IDX_HEIGHT]]);
|
|
chkFontHeight = parseFloat(font[JV.FONT_PROPS[JV.FONT_PROP_IDX_HEIGHT]]);
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+ while (chkFontHeight >= 6) {
|
|
|
|
|
+ const tmpChnW = fontWidthMap.getFontWidth(chkFontName, chkFontHeight, '宽');
|
|
|
|
|
+ const tmpOtherW = fontWidthMap.getFontWidth(chkFontName, chkFontHeight, '窄');
|
|
|
|
|
+ let lines = Math.floor((area.Bottom - area.Top) / (chkFontHeight + JV.OUTPUT_OFFSET[JV.OFFSET_IDX_BOTTOM] + JV.OUTPUT_OFFSET[JV.OFFSET_IDX_TOP] + 4));
|
|
|
|
|
+ lines = lines === 0 ? 1 : lines; // lines是该单元格可容纳的行数
|
|
|
|
|
+ const tmpValues = JpcCommonHelper.splitString(oCell.area, tmpVal, tmpChnW, tmpOtherW);
|
|
|
|
|
+ if (lines < tmpValues.length) {
|
|
|
|
|
+ chkFontHeight -= 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
let hasSplitStr = false;
|
|
let hasSplitStr = false;
|
|
|
const splitStrArr = [];
|
|
const splitStrArr = [];
|
|
|
let accAmt = 0;
|
|
let accAmt = 0;
|
|
@@ -1345,6 +1363,7 @@ JpcFlowTabSrv.prototype.createNew = function() {
|
|
|
// 要拆分下数据
|
|
// 要拆分下数据
|
|
|
_splitValues(rCell);
|
|
_splitValues(rCell);
|
|
|
setupControl(rCell, controls, true);
|
|
setupControl(rCell, controls, true);
|
|
|
|
|
+ rCell[JV.PROP_CONTROL].ShrinkFirst = 'T';
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -1560,7 +1579,7 @@ JpcFlowTabSrv.prototype.createNew = function() {
|
|
|
}
|
|
}
|
|
|
me.checkCombineEvent(JV.RUN_TYPE_BEFORE_COMBINE, verticalCombinePos, horizonCombinePos, rst, $CURRENT_RPT, dataObj, me, page);
|
|
me.checkCombineEvent(JV.RUN_TYPE_BEFORE_COMBINE, verticalCombinePos, horizonCombinePos, rst, $CURRENT_RPT, dataObj, me, page);
|
|
|
me.combinePageCells(rst, verticalCombinePos, horizonCombinePos, controls, fonts);
|
|
me.combinePageCells(rst, verticalCombinePos, horizonCombinePos, controls, fonts);
|
|
|
- me.checkCombineEvent(JV.RUN_TYPE_AFTER_COMBINE, verticalCombinePos, horizonCombinePos, rst, $CURRENT_RPT, dataObj, me, page);
|
|
|
|
|
|
|
+ // me.checkCombineEvent(JV.RUN_TYPE_AFTER_COMBINE, verticalCombinePos, horizonCombinePos, rst, $CURRENT_RPT, dataObj, me, page);
|
|
|
return rst;
|
|
return rst;
|
|
|
};
|
|
};
|
|
|
JpcFlowTabResult.checkCombineEvent = function($RUN_TYPE, $VER_COMB_ARRAY, $HOR_COMB_ARRAY, $CURRENT_CELL_ITEMS, $CURRENT_RPT, $CURRENT_DATA, $PARENT, $PAGE) {
|
|
JpcFlowTabResult.checkCombineEvent = function($RUN_TYPE, $VER_COMB_ARRAY, $HOR_COMB_ARRAY, $CURRENT_CELL_ITEMS, $CURRENT_RPT, $CURRENT_DATA, $PARENT, $PAGE) {
|