|
@@ -1945,6 +1945,7 @@ $(document).ready(() => {
|
|
|
settle: {type: 'warning', msg: '计量单元已结算,不可修改台账数据,已过滤'},
|
|
|
};
|
|
|
const lastOrder = sortData.length > 0 ? sortData[sortData.length - 1].porder + 1 : 1;
|
|
|
+ let filterExprFields = [];
|
|
|
for (let iRow = 0; iRow < info.cellRange.rowCount; iRow++) {
|
|
|
let bPaste = true;
|
|
|
const curRow = info.cellRange.row + iRow;
|
|
@@ -1953,6 +1954,9 @@ $(document).ready(() => {
|
|
|
const curCol = info.cellRange.col + iCol;
|
|
|
const colSetting = info.sheet.zh_setting.cols[curCol];
|
|
|
if (!colSetting) continue;
|
|
|
+ const checkExprInfo = getExprInfo(colSetting.field);
|
|
|
+ if (checkExprInfo) filterExprFields.push(checkExprInfo.expr);
|
|
|
+ if (filterExprFields.indexOf(colSetting.field) >= 0) continue;
|
|
|
|
|
|
posData[colSetting.field] = colSetting.wordWrap ? info.sheet.getText(curRow, curCol) : trimInvalidChar(info.sheet.getText(curRow, curCol));
|
|
|
if (posData.id && colSetting.type === 'Number' && sortData[curRow].settle_status === settleStatus.finish) {
|
|
@@ -1961,16 +1965,15 @@ $(document).ready(() => {
|
|
|
continue;
|
|
|
}
|
|
|
if (colSetting.type === 'Number') {
|
|
|
+ const exprInfo = getExprInfo(colSetting.field);
|
|
|
const num = _.toNumber(posData[colSetting.field]);
|
|
|
if (num) {
|
|
|
posData[colSetting.field] = num;
|
|
|
+ if (exprInfo) posData[exprInfo.expr] = '';
|
|
|
} else {
|
|
|
try {
|
|
|
+ if (exprInfo) posData[exprInfo.expr] = posData[colSetting.field];
|
|
|
posData[colSetting.field] = ZhCalc.mathCalcExpr(transExpr(posData[colSetting.field]));
|
|
|
- const exprInfo = getExprInfo(colSetting.field);
|
|
|
- if (exprInfo) {
|
|
|
- posData[exprInfo.expr] = trimInvalidChar(info.sheet.getText(curRow, curCol));
|
|
|
- }
|
|
|
} catch (err) {
|
|
|
toastMessageUniq(hint.expr);
|
|
|
bPaste = false;
|