|
@@ -166,7 +166,8 @@ $(document).ready(() => {
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
-
|
|
|
+ // 数字只判断几个值(unit_price, oamount, camount)
|
|
|
+ const numField = ['unit_price', 'oamount', 'camount'];
|
|
|
const changeSpreadObj = {
|
|
|
makeSjsFooter: function () {
|
|
|
// 增加汇总行并设为锁定禁止编辑状态
|
|
@@ -430,7 +431,7 @@ $(document).ready(() => {
|
|
|
return;
|
|
|
}
|
|
|
// 未改变值则不提交
|
|
|
- let validText = is_numeric(info.editingText) ? parseFloat(info.editingText) : (info.editingText ? trimInvalidChar(info.editingText) : '');
|
|
|
+ let validText = is_numeric(info.editingText) && _.indexOf(numField, col.field) !== -1 ? parseFloat(info.editingText) : (info.editingText ? trimInvalidChar(info.editingText) : '');
|
|
|
const orgValue = select[col.field];
|
|
|
if (orgValue == validText || ((!orgValue || orgValue === '') && (validText === ''))) {
|
|
|
SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
@@ -529,7 +530,7 @@ $(document).ready(() => {
|
|
|
if (!colSetting) continue;
|
|
|
|
|
|
let validText = info.sheet.getText(curRow, curCol);
|
|
|
- validText = is_numeric(validText) ? parseFloat(validText) : (validText ? trimInvalidChar(validText) : '');
|
|
|
+ validText = is_numeric(validText) && _.indexOf(numField, colSetting.field) !== -1 ? parseFloat(validText) : (validText ? trimInvalidChar(validText) : '');
|
|
|
const orgValue = sortData[curRow][colSetting.field];
|
|
|
if (orgValue == validText || ((!orgValue || orgValue === '') && (validText === ''))) {
|
|
|
sameCol++;
|