Pārlūkot izejas kodu

Merge branch '0.0.1' into debug

Roc 3 gadi atpakaļ
vecāks
revīzija
1bb56a9417

+ 3 - 0
controllers/approval.go

@@ -116,6 +116,9 @@ func (this *ApprovalCommon) List() {
 			}
 			list[i].DelayPermission = delayPermission
 		}
+		if item.ApproveRoleTypeCode == roleTypeCode {
+			list[i].OpButton = true
+		}
 	}
 
 	page := paging.GetPaging(currentIndex, pageSize, total)

+ 31 - 29
models/tables/company_approval/company_approval.go

@@ -82,35 +82,37 @@ func GetCompanyApprovalByApprovalId(companyApprovalId int) (item *CompanyApprova
 
 //客户审批单
 type CompanyApprovalList struct {
-	CompanyId         int
-	ProductId         int
-	CompanyName       string `description:"客户名称"`
-	CreditCode        string `description:"社会统一信用码"`
-	CompanyType       string `description:"客户类型"`
-	IndustryName      string `description:"行业名称"`
-	SellerName        string `description:"销售名称"`
-	CreateTime        string `description:"创建时间"`
-	ApprovalTime      string `description:"提交申请时间"`
-	ApproveTime       string `description:"审批时间"`
-	Status            string `description:"客户状态"`
-	ApproveContent    string `description:"待审内容"`
-	ApproveStatus     string `description:"当前状态"`
-	ApplyMethod       int    `description:"申请类型:申请类型:1:试用->正式,2:冻结—>试用,3:试用延期,4:原销售申请领取流失客户,5:正式客户申请服务更新"`
-	ApplyReasons      string `description:"申请理由"`
-	FreezeStartDate   string `description:"冻结开始日期"`
-	FreezeEndDate     string `description:"冻结结束日期"`
-	FreezeExpireDays  int    `description:"冻结到期天数"`
-	Address           string `description:"地址"`
-	Source            string `description:"客户来源"`
-	ApproveRemark     string `description:"驳回理由"`
-	StartDate         string `description:"开始日期"`
-	EndDate           string `description:"结束日期"`
-	ExpireDay         int    `description:"服务到期天数"`
-	CompanyApprovalId int    `description:"审批记录ID"`
-	ApprovalCount     int    `description:"已延期审批次数"`
-	CompanyContractId int    `description:"合同id"`
-	DelayPermission   string `description:"延期申请品种"`
-	ApplyRealName     string `description:"申请人姓名"`
+	CompanyId           int
+	ProductId           int
+	CompanyName         string `description:"客户名称"`
+	CreditCode          string `description:"社会统一信用码"`
+	CompanyType         string `description:"客户类型"`
+	IndustryName        string `description:"行业名称"`
+	SellerName          string `description:"销售名称"`
+	CreateTime          string `description:"创建时间"`
+	ApprovalTime        string `description:"提交申请时间"`
+	ApproveTime         string `description:"审批时间"`
+	Status              string `description:"客户状态"`
+	ApproveContent      string `description:"待审内容"`
+	ApproveStatus       string `description:"当前状态"`
+	ApplyMethod         int    `description:"申请类型:申请类型:1:试用->正式,2:冻结—>试用,3:试用延期,4:原销售申请领取流失客户,5:正式客户申请服务更新"`
+	ApplyReasons        string `description:"申请理由"`
+	FreezeStartDate     string `description:"冻结开始日期"`
+	FreezeEndDate       string `description:"冻结结束日期"`
+	FreezeExpireDays    int    `description:"冻结到期天数"`
+	Address             string `description:"地址"`
+	Source              string `description:"客户来源"`
+	ApproveRemark       string `description:"驳回理由"`
+	StartDate           string `description:"开始日期"`
+	EndDate             string `description:"结束日期"`
+	ExpireDay           int    `description:"服务到期天数"`
+	CompanyApprovalId   int    `description:"审批记录ID"`
+	ApprovalCount       int    `description:"已延期审批次数"`
+	CompanyContractId   int    `description:"合同id"`
+	DelayPermission     string `description:"延期申请品种"`
+	ApplyRealName       string `description:"申请人姓名"`
+	ApproveRoleTypeCode string `description:"审批人角色类型",json:"-"`
+	OpButton            bool   `description:"是否审批操作权限"`
 }
 
 func GetApprovalList(condition string, pars []interface{}, startSize, pageSize int) (items []*CompanyApprovalList, err error) {