|
@@ -255,7 +255,10 @@ $(document).ready(() => {
|
|
|
if (!data.expr) return false;
|
|
|
|
|
|
for (const b of payCalc.bases) {
|
|
|
- if (b.reg.test(data.expr)) return true;
|
|
|
+ // data.expr = bqwc*0.6, b.reg = /bqwc/gim 时, b.reg.test返回值时true时false
|
|
|
+ // 但是如果b.reg = /bqwc/im时,test又可以正常判断
|
|
|
+ // if (b.reg.test(data.expr)) return true;
|
|
|
+ if (data.expr.search(b.reg) !== -1) return true;
|
|
|
}
|
|
|
return false;
|
|
|
},
|
|
@@ -596,7 +599,7 @@ $(document).ready(() => {
|
|
|
if (data) {
|
|
|
if (col.field === 'tp') {
|
|
|
$('#expr').val(data.expr).attr('field', 'expr').attr('org', data.expr)
|
|
|
- .attr('readOnly', readOnly|| (payBase.isYF(data) || payBase.isWC(data)));
|
|
|
+ .attr('readOnly', readOnly|| payCol.readOnly.tp(data));
|
|
|
} else if (col.field === 'sprice') {
|
|
|
$('#expr').val(data.sexpr).attr('field', 'sexpr').attr('org', data.sexpr)
|
|
|
.attr('readOnly', readOnly|| payCol.readOnly.sprice(data) || payBase.isYF(data));
|