|
@@ -556,14 +556,14 @@ $(document).ready(() => {
|
|
|
}
|
|
|
return [true, ''];
|
|
|
},
|
|
|
- _checkSfExpr: function (text, data) {
|
|
|
+ _checkSfExpr: function (text, data, order) {
|
|
|
if (text) {
|
|
|
const num = _.toNumber(text);
|
|
|
if (num) {
|
|
|
data.expr = num;
|
|
|
} else {
|
|
|
const expr = $.trim(text).replace('\t', '').replace('=', '').toLowerCase();
|
|
|
- const [valid, msg] = this._checkExprValid(expr);
|
|
|
+ const [valid, msg] = this._checkExprValid(expr, [], order);
|
|
|
if (!valid) return [valid, msg];
|
|
|
data.expr = expr;
|
|
|
}
|
|
@@ -740,7 +740,7 @@ $(document).ready(() => {
|
|
|
switch(col.field) {
|
|
|
case 'tp':
|
|
|
const [tpValid, tpMsg] = payBase.isSF(select)
|
|
|
- ? paySpreadObj._checkSfExpr(validText, data.updateData)
|
|
|
+ ? paySpreadObj._checkSfExpr(validText, data.updateData, select.order)
|
|
|
: paySpreadObj._checkExpr(validText, data.updateData, select.order);
|
|
|
if (!tpValid) {
|
|
|
toastr.warning(tpMsg);
|
|
@@ -913,7 +913,7 @@ $(document).ready(() => {
|
|
|
switch (col.field) {
|
|
|
case 'tp':
|
|
|
const [tpValid, tpMsg] = payBase.isSF(node)
|
|
|
- ? paySpreadObj._checkSfExpr(validText, updateData)
|
|
|
+ ? paySpreadObj._checkSfExpr(validText, updateData, select.order)
|
|
|
: paySpreadObj._checkExpr(validText, updateData, select.order);
|
|
|
if (!tpValid) {
|
|
|
toastr.warning(tpMsg);
|
|
@@ -988,7 +988,7 @@ $(document).ready(() => {
|
|
|
data.type = 'stage';
|
|
|
data.updateData = { pid: select.pid, tp: null, expr: newValue };
|
|
|
const [valid, msg] = payBase.isSF(select)
|
|
|
- ? paySpreadObj._checkSfExpr(newValue, data.updateData)
|
|
|
+ ? paySpreadObj._checkSfExpr(newValue, data.updateData, select.order)
|
|
|
: paySpreadObj._checkExpr(newValue, data.updateData, select.order);
|
|
|
if (!valid) {
|
|
|
toastr.warning(msg);
|