Commit 5c4148ec by 王勇飞

fix bizOpt filter

parent d3af22f2
......@@ -33,22 +33,29 @@ class BizoptDao extends Dao {
//不是来自平台前端查询
if (qobj.bizpath && qobj.bizpath.indexOf("pmx") < 0) {
console.log("bizpath-------------" + qobj.bizpath);
qc.where.business_type = qc.where.business_type || {
qw.business_type = qw.business_type || {
[this.db.Op.eq]: "bookkeeping"
}
if (qobj.bizpath && qobj.bizpath != "") {
let status;
if (qobj.bizpath.indexOf("demandAllocation") > 0) { //从需求分配列表过来的
qw["business_status"] = {
[this.db.Op.eq]: "received"
};
}
if (qobj.bizpath.indexOf("demandfollow") > 0 || qobj.bizpath.indexOf("distributionManagement") > 0) { //从需求跟进列表或分配记录列表过来的
qw["business_status"] = {
[this.db.Op.ne]: "received"
};
if (qw.business_status) {//如果状态漏斗筛选条件存在
status = qw.business_status;
qw["business_status"] = {
[this.db.Op.eq]: status
};
} else {
qw["business_status"] = {
[this.db.Op.ne]: "received"
};
}
}
}
}
}
return qw;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment