소스 검색

fix:客户详情审批权限返回字段调整;用印、合同待审批列表数据返回bug修复

Roc 3 년 전
부모
커밋
ad08c923cc
4개의 변경된 파일11개의 추가작업 그리고 8개의 파일을 삭제
  1. 3 2
      controllers/approval.go
  2. 4 4
      controllers/company_contract.go
  3. 1 1
      controllers/contract_approval.go
  4. 3 1
      controllers/seal_approval.go

+ 3 - 2
controllers/approval.go

@@ -194,7 +194,9 @@ func (this *ApprovalCommon) Detail() {
 	//	}
 	//	item.DelayPermission = delayPermission
 	//}
-
+	if item.ApproveRoleTypeCode == roleTypeCode {
+		item.OpButton = true
+	}
 	resp := approval.CompanyApprovalDetailResp{
 		CompanyApprovalDetail: item,
 	}
@@ -217,7 +219,6 @@ func (this *ApprovalCommon) Detail() {
 		this.FailWithMessage("获取失败", "获取审批权限失败,Err:"+err.Error())
 		return
 	}
-
 	delayPermissionIdMap := make(map[int]int)
 	for _, delayPermission := range delayPermissionList {
 		delayPermissionIdMap[delayPermission.ChartPermissionId] = 0

+ 4 - 4
controllers/company_contract.go

@@ -31,10 +31,10 @@ func (this *CompanyContractCommon) ApplyContractDetail() {
 
 	roleTypeCode := sysUser.RoleTypeCode
 	productId := services.GetProductId(roleTypeCode)
-	if productId == 0 {
-		this.FailWithMessage("当前账户类型异常", "客户类型为:"+roleTypeCode)
-		return
-	}
+	//if productId == 0 {
+	//	this.FailWithMessage("当前账户类型异常", "客户类型为:"+roleTypeCode)
+	//	return
+	//}
 	detail, err := company_contract.GetCompanyContractDetail(companyId, productId, companyContractId)
 	if err != nil {
 		this.FailWithMessage("获取信息失败", "获取信息失败,Err:"+err.Error())

+ 1 - 1
controllers/contract_approval.go

@@ -62,7 +62,7 @@ func (this *ContractApprovalCommon) List() {
 
 	//归属
 	if status == "待审批" {
-		condition += ` AND (c.seller_id = ? and d.approve_user_id = c.seller_id) OR (d.approve_user_id = ? and d.status="待审批")`
+		condition += ` AND ((c.seller_id = ? and a.start_node_id = a.curr_node_id) OR (d.approve_user_id = ? )) and d.status="待审批" `
 	} else {
 		condition += ` AND (c.seller_id = ? or d.approve_user_id = ?)`
 	}

+ 3 - 1
controllers/seal_approval.go

@@ -66,7 +66,9 @@ func (this *SealApprovalCommon) List() {
 
 	//归属
 	if status == "待审批" {
-		condition += ` AND (c.user_id = ? and d.approve_user_id = c.user_id) OR (d.approve_user_id = ? and d.status="待审批")`
+		condition += ` AND ((c.user_id = ? and a.start_node_id = a.curr_node_id) OR (d.approve_user_id = ? )) and d.status="待审批" `
+		//condition += ` AND (c.user_id = ?  OR d.approve_user_id = ?) and (d.approve_user_id is null or d.approve_user_id = c.user_id)`
+
 	} else {
 		condition += ` AND (c.user_id = ? or d.approve_user_id = ?)`
 	}