免费的 jqGrid - 超过 1 个自定义软和高级搜索总是进入第一个 decleration

Free jqGrid - more than 1 custom soft and advanced search always get into the first decleration

似乎 customSortOperations 总是从我拥有的 5 个元素中取出第一个元素。

我在 colModel 搜索选项上设置了['sopt'] = ['il','nl','em','nm']; 我在 customSortOperations = {'posix':{buildQueryValue}.'il':{buildQueryValue},'nl':{buildQueryValue},'em':{buildQueryValue},'nm':{buildQueryValue}}

但是无论我从 4 个软件中选择什么,它总是进入 posix buildQueryValue。

谢谢,

总计

发现错误:

if (opC === "" && p.cops != null) {
                    for (oper in p.cops) {
                        **if (p.cops.hasOwnProperty(oper)) {**  
                            opC = oper;
                            operand = p.cops[oper].operand;
                            if (isFunction(p.cops[oper].buildQueryValue)) {
                                return p.cops[oper].buildQueryValue.call(p, { cmName: rule.field, searchValue: val, operand: operand });
                            }
                        }
                    }
                }

应改为:

if (opC === "" && p.cops != null) {
                    for (oper in p.cops) {
                        //if (p.cops.hasOwnProperty(oper)) {
                        **if (oper === rule.op) {** 
                            opC = oper;
                            operand = p.cops[oper].operand;
                            if (isFunction(p.cops[oper].buildQueryValue)) {
                                return p.cops[oper].buildQueryValue.call(p, { cmName: rule.field, searchValue: val, operand: operand });
                            }
                        }
                    }
                }