|
@@ -288,8 +288,7 @@ $(document).ready(() => {
|
|
}
|
|
}
|
|
if (p.type === 'left') {
|
|
if (p.type === 'left') {
|
|
iLeftCount += 1;
|
|
iLeftCount += 1;
|
|
- // if (i !== 0 && (param[i-1].type !== 'calc' || param[i-1].type !== 'left'))
|
|
|
|
- if (i !== 0 && param[i-1].type !== 'calc')
|
|
|
|
|
|
+ if (i !== 0 && (param[i-1].type !== 'calc' || param[i-1].type !== 'left'))
|
|
return [false, '输入的表达式非法:(前应有运算符'];
|
|
return [false, '输入的表达式非法:(前应有运算符'];
|
|
}
|
|
}
|
|
if (p.type === 'right') {
|
|
if (p.type === 'right') {
|
|
@@ -349,7 +348,7 @@ $(document).ready(() => {
|
|
checkRangeExpr(payNode, text, data) {
|
|
checkRangeExpr(payNode, text, data) {
|
|
if (!payNode) return [false, '数据错误'];
|
|
if (!payNode) return [false, '数据错误'];
|
|
|
|
|
|
- const num = text ? _.toNumber(text) : 0;
|
|
|
|
|
|
+ const num = text ? _.toNumber(text) || 0 : 0;
|
|
let expr = text ? (num ? '' : text) : '';
|
|
let expr = text ? (num ? '' : text) : '';
|
|
expr = expr ? $.trim(expr).replace('\t', '').replace('=', '').toLowerCase() : '';
|
|
expr = expr ? $.trim(expr).replace('\t', '').replace('=', '').toLowerCase() : '';
|
|
const [valid, msg] = this.checkExprValid(expr, ['bqwc', 'ybbqwc', 'bqht', 'bqbg', 'bqyf']);
|
|
const [valid, msg] = this.checkExprValid(expr, ['bqwc', 'ybbqwc', 'bqht', 'bqbg', 'bqyf']);
|
|
@@ -379,7 +378,7 @@ $(document).ready(() => {
|
|
checkStartExpr(payNode, text, data) {
|
|
checkStartExpr(payNode, text, data) {
|
|
if (!payNode) return [false, '数据错误'];
|
|
if (!payNode) return [false, '数据错误'];
|
|
|
|
|
|
- const num = text ? _.toNumber(text) : 0;
|
|
|
|
|
|
+ const num = text ? _.toNumber(text) || 0 : 0;
|
|
let expr = text ? (num ? '' : text) : '';
|
|
let expr = text ? (num ? '' : text) : '';
|
|
expr = expr ? $.trim(expr).replace('\t', '').replace('=', '').toLowerCase() : '';
|
|
expr = expr ? $.trim(expr).replace('\t', '').replace('=', '').toLowerCase() : '';
|
|
const [valid, msg] = this.checkExprValid(expr, ['bqwc', 'ybbqwc', 'bqht', 'bqbg', 'bqyf']);
|
|
const [valid, msg] = this.checkExprValid(expr, ['bqwc', 'ybbqwc', 'bqht', 'bqbg', 'bqyf']);
|
|
@@ -552,7 +551,7 @@ $(document).ready(() => {
|
|
}
|
|
}
|
|
const preNode = payTree.getPreSiblingNode(select);
|
|
const preNode = payTree.getPreSiblingNode(select);
|
|
setObjEnable($('a[name=base-opr][type=add]'), !readOnly && !payUtils.check.isSf(select) && !payUtils.check.isYf(select));
|
|
setObjEnable($('a[name=base-opr][type=add]'), !readOnly && !payUtils.check.isSf(select) && !payUtils.check.isYf(select));
|
|
- const delValid = !payUtils.check.isFixed(select) && !payUtils.check.isStarted(select);
|
|
|
|
|
|
+ const delValid = !payUtils.check.isFixed(select) && !payUtils.check.isStarted(select) && payUtils.check.isOwner(select);
|
|
setObjEnable($('a[name=base-opr][type=delete]'), !readOnly && delValid);
|
|
setObjEnable($('a[name=base-opr][type=delete]'), !readOnly && delValid);
|
|
setObjEnable($('a[name=base-opr][type=up-move]'), !readOnly && !payUtils.check.isFixed(select) && preNode);
|
|
setObjEnable($('a[name=base-opr][type=up-move]'), !readOnly && !payUtils.check.isFixed(select) && preNode);
|
|
setObjEnable($('a[name=base-opr][type=down-move]'), !readOnly && !payUtils.check.isFixed(select) && !payTree.isLastSibling(select));
|
|
setObjEnable($('a[name=base-opr][type=down-move]'), !readOnly && !payUtils.check.isFixed(select) && !payTree.isLastSibling(select));
|