|
@@ -228,7 +228,7 @@ $(function () {
|
|
|
return;
|
|
|
}
|
|
|
// 未改变值则不提交
|
|
|
- let validText = col.type === 'Number' && is_numeric(info.editingText) ? parseFloat(info.editingText) : (info.editingText ? trimInvalidChar(info.editingText) : '');
|
|
|
+ let validText = col.type === 'Number' ? (is_numeric(info.editingText) ? parseFloat(info.editingText) : 0) : (info.editingText ? trimInvalidChar(info.editingText) : '');
|
|
|
const orgValue = type === 'contract_update' ? select[col.field] : '';
|
|
|
if (orgValue == validText || ((!orgValue || orgValue === '') && (validText === ''))) {
|
|
|
SpreadJsObj.reLoadRowData(info.sheet, info.row);
|
|
@@ -301,7 +301,7 @@ $(function () {
|
|
|
// cLData[colSetting.field] = trimInvalidChar(info.sheet.getText(curRow, curCol));
|
|
|
|
|
|
let validText = info.sheet.getText(curRow, curCol);
|
|
|
- validText = colSetting.type === 'Number' && is_numeric(validText) ? parseFloat(validText) : (validText ? trimInvalidChar(validText) : '');
|
|
|
+ validText = colSetting.type === 'Number' ? (is_numeric(validText) ? parseFloat(validText) : 0) : (validText ? trimInvalidChar(validText) : '');
|
|
|
const orgValue = curRow >= sortData.length ? '' : sortData[curRow][colSetting.field];
|
|
|
if (orgValue == validText || ((!orgValue || orgValue === '') && (validText === ''))) {
|
|
|
sameCol++;
|