|
@@ -77,6 +77,7 @@ func (c *AuditController) AuditListBefore() { |
|
@@ -77,6 +77,7 @@ func (c *AuditController) AuditListBefore() { |
77
|
auditPermission serverbac.OptionOpportunity
|
77
|
auditPermission serverbac.OptionOpportunity
|
78
|
)
|
78
|
)
|
79
|
auditPermission = serveaudit.GetPermissionInAuditPage(uid, companyId)
|
79
|
auditPermission = serveaudit.GetPermissionInAuditPage(uid, companyId)
|
|
|
80
|
+ reserveType := serveaudit.GetChanceReserveTypeAll(companyId)
|
80
|
data := map[string]interface{}{
|
81
|
data := map[string]interface{}{
|
81
|
"template": templatelist,
|
82
|
"template": templatelist,
|
82
|
"chance_type": chanceTypeList,
|
83
|
"chance_type": chanceTypeList,
|
|
@@ -85,6 +86,12 @@ func (c *AuditController) AuditListBefore() { |
|
@@ -85,6 +86,12 @@ func (c *AuditController) AuditListBefore() { |
85
|
"review_status": reviewStatus,
|
86
|
"review_status": reviewStatus,
|
86
|
"department": departmentList,
|
87
|
"department": departmentList,
|
87
|
"permission": auditPermission,
|
88
|
"permission": auditPermission,
|
|
|
89
|
+ "store_type": map[string]string{
|
|
|
90
|
+ "-1": "全部",
|
|
|
91
|
+ "0": "机会池",
|
|
|
92
|
+ "1": "储备池",
|
|
|
93
|
+ },
|
|
|
94
|
+ "reserve_type": reserveType,
|
88
|
}
|
95
|
}
|
89
|
msg = protocol.NewReturnResponse(data, nil)
|
96
|
msg = protocol.NewReturnResponse(data, nil)
|
90
|
return
|
97
|
return
|
|
@@ -243,7 +250,7 @@ func (c *AuditController) ChanceCheckResultPassOrNo() { |
|
@@ -243,7 +250,7 @@ func (c *AuditController) ChanceCheckResultPassOrNo() { |
243
|
return
|
250
|
return
|
244
|
}
|
251
|
}
|
245
|
|
252
|
|
246
|
-//GetChanceReserveTypeList 获取机会储备池分类类型
|
253
|
+//ChanceReserveTypeList 获取机会储备池分类类型
|
247
|
//@router /v1/chance/reserve_type/list
|
254
|
//@router /v1/chance/reserve_type/list
|
248
|
func (c *AuditController) ChanceReserveTypeList() {
|
255
|
func (c *AuditController) ChanceReserveTypeList() {
|
249
|
var msg *protocol.ResponseMessage
|
256
|
var msg *protocol.ResponseMessage
|
|
@@ -282,6 +289,15 @@ func (c *AuditController) EditReserveType() { |
|
@@ -282,6 +289,15 @@ func (c *AuditController) EditReserveType() { |
282
|
msg = protocol.BadRequestParam("1")
|
289
|
msg = protocol.BadRequestParam("1")
|
283
|
return
|
290
|
return
|
284
|
}
|
291
|
}
|
|
|
292
|
+ nameRune := []rune(param.Name)
|
|
|
293
|
+ if len(nameRune) == 0 {
|
|
|
294
|
+ msg = protocol.BadRequestParam("10133")
|
|
|
295
|
+ return
|
|
|
296
|
+ }
|
|
|
297
|
+ if len(nameRune) > 20 {
|
|
|
298
|
+ msg = protocol.BadRequestParam("10134")
|
|
|
299
|
+ return
|
|
|
300
|
+ }
|
285
|
companyId := c.GetCompanyId()
|
301
|
companyId := c.GetCompanyId()
|
286
|
var err error
|
302
|
var err error
|
287
|
if param.Id == 0 {
|
303
|
if param.Id == 0 {
|
|
@@ -293,7 +309,7 @@ func (c *AuditController) EditReserveType() { |
|
@@ -293,7 +309,7 @@ func (c *AuditController) EditReserveType() { |
293
|
return
|
309
|
return
|
294
|
}
|
310
|
}
|
295
|
|
311
|
|
296
|
-//EditReserveType 编辑机会储备池分类类型
|
312
|
+//DeleteReserveType 删除机会储备池分类类型
|
297
|
//@router /v1/chance/reserve_type/delete
|
313
|
//@router /v1/chance/reserve_type/delete
|
298
|
func (c *AuditController) DeleteReserveType() {
|
314
|
func (c *AuditController) DeleteReserveType() {
|
299
|
var msg *protocol.ResponseMessage
|
315
|
var msg *protocol.ResponseMessage
|