|
@@ -64,7 +64,12 @@ func (this *SealApprovalCommon) List() {
|
|
|
// }
|
|
|
//}
|
|
|
|
|
|
- condition += ` AND (c.user_id = ? or d.approve_user_id = ?)`
|
|
|
+ //归属
|
|
|
+ if status == "待审批" {
|
|
|
+ condition += ` AND (c.user_id = ? and d.approve_user_id = c.user_id) OR (d.approve_user_id = ? and d.status="待审批")`
|
|
|
+ } else {
|
|
|
+ condition += ` AND (c.user_id = ? or d.approve_user_id = ?)`
|
|
|
+ }
|
|
|
pars = append(pars, sysUser.AdminId, sysUser.AdminId)
|
|
|
|
|
|
//合同类型、、更新时间、所选销售
|
|
@@ -92,6 +97,11 @@ func (this *SealApprovalCommon) List() {
|
|
|
} else {
|
|
|
pars = append(pars, status)
|
|
|
}
|
|
|
+
|
|
|
+ //if status == "待审批" {
|
|
|
+ // condition += ` AND a.status = ? `
|
|
|
+ // pars = append(pars, status)
|
|
|
+ //}
|
|
|
}
|
|
|
} else {
|
|
|
//childCondition += ` AND status != "已撤回" `
|
|
@@ -144,7 +154,6 @@ func (this *SealApprovalCommon) List() {
|
|
|
if status == "处理中" {
|
|
|
joinCondition = " and a.curr_node_id!=d.node_id"
|
|
|
condition += ` AND a.curr_node_id !=a.start_node_id`
|
|
|
-
|
|
|
}
|
|
|
if status != "待审批" && status != "处理中" {
|
|
|
tmpTotal, err := contract_approval.GetSealApprovalListCountV2(childCondition, condition, childPars, pars)
|