|
@@ -634,7 +634,7 @@ $(document).ready(() => {
|
|
|
updateData.stage[col.field] = newValue;
|
|
|
const exprInfo = getExprInfo(col.field);
|
|
|
if (exprInfo) {
|
|
|
- updateData.stage[exprInfo.expr] = trimInvalidChar(info.editingText);
|
|
|
+ updateData.stage[exprInfo.expr] = info.editingText !== newValue+ '' ? trimInvalidChar(info.editingText) : '';
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -1146,13 +1146,16 @@ $(document).ready(() => {
|
|
|
data.updateType = 'update';
|
|
|
data.updateData = {pid: posData.id, lid: posData.lid};
|
|
|
if (col.type === 'Number') {
|
|
|
+ const exprInfo = getExprInfo(col.field);
|
|
|
const num = _.toNumber(newText);
|
|
|
if (_.isFinite(num)) {
|
|
|
data.updateData[col.field] = num;
|
|
|
+ if (exprInfo) {
|
|
|
+ data.updateData[exprInfo.expr] = '';
|
|
|
+ }
|
|
|
} else {
|
|
|
try {
|
|
|
data.updateData[col.field] = math.evaluate(transExpr(newText));
|
|
|
- const exprInfo = getExprInfo(col.field);
|
|
|
if (exprInfo) {
|
|
|
data.updateData[exprInfo.expr] = newText;
|
|
|
}
|
|
@@ -1485,7 +1488,7 @@ $(document).ready(() => {
|
|
|
const select = posSheet.zh_data ? posSheet.zh_data[row] : null;
|
|
|
if (!select) return;
|
|
|
|
|
|
- const field = expr.attr('field'), orgValue = expr.attr('org'), newValue = expr.val(), row = expr.attr('row');
|
|
|
+ const field = expr.attr('field'), orgValue = expr.attr('org'), newValue = expr.val();
|
|
|
if (orgValue === newValue || (!orgValue && newValue == '')) { return; }
|
|
|
|
|
|
const data = {pid: select.id, lid: select.lid};
|