|
@@ -797,7 +797,7 @@ let analyzer = {
|
|
|
let expr = me.standard(dispExpr);
|
|
|
let invalidChars = /[^0-9\u4e00-\u9fa5\+\-\*\/\(\)\.\[\]FL%]/g;
|
|
|
if (invalidChars.test(expr)){
|
|
|
- hintBox.infoBox('系数提示','表达式中含有无效的字符!',1);
|
|
|
+ hintBox.infoBox('错误提示',`表达式中含有${hintBox.font('无效字符')}!`,1);
|
|
|
return false;
|
|
|
};
|
|
|
|
|
@@ -806,26 +806,26 @@ let analyzer = {
|
|
|
let pattBase = new RegExp(/\[[\u4E00-\u9FA5]+\]/gi);
|
|
|
let arrBase = expr.match(pattBase);
|
|
|
if (arrCn && !arrBase){
|
|
|
- hintBox.infoBox('系统提示', '定额基数必须用中括号[]括起来!', 1);
|
|
|
+ hintBox.infoBox('错误提示', `定额基数必须用中括号${hintBox.font('[]')}括起来!`, 1);
|
|
|
return false;
|
|
|
};
|
|
|
if (arrCn && arrBase && (arrCn.length != arrBase.length)){
|
|
|
for (let cn of arrCn){
|
|
|
let tempBase = `[${cn}]`;
|
|
|
if (!arrBase.includes(tempBase)){
|
|
|
- hintBox.infoBox('系统提示', `定额基数“${cn}”必须用中括号[]括起来!`, 1);
|
|
|
+ hintBox.infoBox('错误提示', `定额基数“${hintBox.font(cn)}”必须用中括号${hintBox.font('[]')}括起来!`, 1);
|
|
|
return false;
|
|
|
}
|
|
|
};
|
|
|
// 这里要加一个保险。因为上面的 for 循环在“主材费 + [主材费]” 情况下有Bug
|
|
|
- hintBox.infoBox('系统提示', '定额基数必须用中括号[]括起来!', 1);
|
|
|
+ hintBox.infoBox('错误提示', `定额基数必须用中括号${hintBox.font('[]')}括起来!`, 1);
|
|
|
return false;
|
|
|
};
|
|
|
if (arrBase){
|
|
|
for (let base of arrBase){
|
|
|
let baseName = base.slice(1, -1);
|
|
|
if (!rationCalcBases[baseName]){
|
|
|
- hintBox.infoBox('系统提示', '定额基数 [' + baseName + '] 末定义!', 1);
|
|
|
+ hintBox.infoBox('错误提示', `定额基数${hintBox.font('[' +baseName + ']')}末定义!`, 1);
|
|
|
return false;
|
|
|
}
|
|
|
};
|
|
@@ -836,18 +836,18 @@ let analyzer = {
|
|
|
let num = F.slice(1);
|
|
|
if (num > template.calcItems.length){
|
|
|
let s = hintBox.font('F'+num);
|
|
|
- hintBox.infoBox('系统提示', `表达式中 “${s}” 行号引用错误!`, 1);
|
|
|
+ hintBox.infoBox('错误提示', `表达式中 “${hintBox.font(s)}” 行号引用错误!`, 1);
|
|
|
return false;
|
|
|
};
|
|
|
};
|
|
|
|
|
|
let expression = me.getExpression(expr, template);
|
|
|
if (me.isCycleCalc(expression, itemID, template)){
|
|
|
- hintBox.infoBox('系统提示', '表达式中有循环计算!', 1);
|
|
|
+ hintBox.infoBox('错误提示', `表达式中有${hintBox.font('循环计算')}!`, 1);
|
|
|
return false;
|
|
|
};
|
|
|
if (!testValue(expression)){
|
|
|
- hintBox.infoBox('系统提示', '表达式语法错误!', 1);
|
|
|
+ hintBox.infoBox('错误提示', `表达式中有${hintBox.font('语法错误')}!`, 1);
|
|
|
return false;
|
|
|
};
|
|
|
|