瀏覽代碼

新增待审批状态

tuoling805 2 年之前
父節點
當前提交
7a9c561627
共有 2 個文件被更改,包括 11 次插入11 次删除
  1. 10 10
      controllers/business_trip/business_apply.go
  2. 1 1
      controllers/business_trip/business_approve.go

+ 10 - 10
controllers/business_trip/business_apply.go

@@ -86,7 +86,7 @@ func (this *BusinessTrip) ApplyAdd() {
 
 	//校验出差日期冲突
 	{
-		businessApplyCount, err := business_trip.CheckBusinessApplyDate(req.ArriveDate, req.ReturnDate, "'待审批','已审批'", sysUser.AdminId, 0)
+		businessApplyCount, err := business_trip.CheckBusinessApplyDate(req.ArriveDate, req.ReturnDate, "'待审批','已通过'", sysUser.AdminId, 0)
 		if err != nil {
 			this.FailWithMessage("时间冲突检测失败", "时间冲突检测失败-CheckBusinessApplyDate!Err:"+err.Error())
 			return
@@ -99,7 +99,7 @@ func (this *BusinessTrip) ApplyAdd() {
 
 	//校验申请人,是否被邀请为同行人,并且出差日期冲突
 	{
-		peerCount, err := business_trip.CheckBusinessApplyPeerDate(req.ArriveDate, req.ReturnDate, "'待审批','已审批'", sysUser.AdminId, 0)
+		peerCount, err := business_trip.CheckBusinessApplyPeerDate(req.ArriveDate, req.ReturnDate, "'待审批','已通过'", sysUser.AdminId, 0)
 		if err != nil {
 			this.FailWithMessage("时间冲突检测失败", "时间冲突检测失败-CheckBusinessApplyPeerDate!Err:"+err.Error())
 			return
@@ -125,7 +125,7 @@ func (this *BusinessTrip) ApplyAdd() {
 					return
 				}
 
-				peerCount, err := business_trip.CheckBusinessApplyPeerDate(req.ArriveDate, req.ReturnDate, "'待审批','已审批'", peerId, 0)
+				peerCount, err := business_trip.CheckBusinessApplyPeerDate(req.ArriveDate, req.ReturnDate, "'待审批','已通过'", peerId, 0)
 				if err != nil {
 					this.FailWithMessage("时间冲突检测失败", "时间冲突检测失败-CheckBusinessApplyPeerDate!Err:"+err.Error())
 					return
@@ -301,7 +301,7 @@ func (this *BusinessTrip) ApplyEdit() {
 
 	//校验出差日期冲突
 	{
-		businessApplyCount, err := business_trip.CheckBusinessApplyDate(req.ArriveDate, req.ReturnDate, "'待审批','已审批'", sysUser.AdminId, req.BusinessApplyId)
+		businessApplyCount, err := business_trip.CheckBusinessApplyDate(req.ArriveDate, req.ReturnDate, "'待审批','已通过'", sysUser.AdminId, req.BusinessApplyId)
 		if err != nil {
 			this.FailWithMessage("时间冲突检测失败", "时间冲突检测失败-CheckBusinessApplyDate!Err:"+err.Error())
 			return
@@ -314,7 +314,7 @@ func (this *BusinessTrip) ApplyEdit() {
 
 	//校验申请人,是否被邀请为同行人,并且出差日期冲突
 	{
-		peerCount, err := business_trip.CheckBusinessApplyPeerDate(req.ArriveDate, req.ReturnDate, "'待审批','已审批'", sysUser.AdminId, 0)
+		peerCount, err := business_trip.CheckBusinessApplyPeerDate(req.ArriveDate, req.ReturnDate, "'待审批','已通过'", sysUser.AdminId, 0)
 		if err != nil {
 			this.FailWithMessage("时间冲突检测失败", "时间冲突检测失败-CheckBusinessApplyPeerDate!Err:"+err.Error())
 			return
@@ -340,7 +340,7 @@ func (this *BusinessTrip) ApplyEdit() {
 					return
 				}
 
-				peerCount, err := business_trip.CheckBusinessApplyPeerDate(req.ArriveDate, req.ReturnDate, "'待审批','已审批'", peerId, req.BusinessApplyId)
+				peerCount, err := business_trip.CheckBusinessApplyPeerDate(req.ArriveDate, req.ReturnDate, "'待审批','已通过'", peerId, req.BusinessApplyId)
 				if err != nil {
 					this.FailWithMessage("时间冲突检测失败", "时间冲突检测失败-CheckBusinessApplyPeerDate!Err:"+err.Error())
 					return
@@ -371,8 +371,8 @@ func (this *BusinessTrip) ApplyEdit() {
 		return
 	}
 
-	if businessApplyItem.Status == "已审批" {
-		this.FailWithMessage("已审批,不可进行重新申请操作!", "已审批,不可进行重新申请操作!")
+	if businessApplyItem.Status == "已通过" {
+		this.FailWithMessage("已通过,不可进行重新申请操作!", "已通过,不可进行重新申请操作!")
 		return
 	} else if businessApplyItem.Status == "已过期" {
 		this.FailWithMessage("已过期,不可进行重新申请操作!", "已过期,不可进行重新申请操作!")
@@ -616,8 +616,8 @@ func (this *BusinessTrip) Back() {
 		return
 	}
 
-	if businessApplyItem.Status == "已审批" {
-		this.FailWithMessage("已审批,不可进行撤回操作!", "已审批,不可进行撤回操作!")
+	if businessApplyItem.Status == "已通过" {
+		this.FailWithMessage("已通过,不可进行撤回操作!", "已通过,不可进行撤回操作!")
 		return
 	} else if businessApplyItem.Status == "已驳回" {
 		this.FailWithMessage("已驳回,不可进行撤回操作!", "已驳回,不可进行撤回操作!")

+ 1 - 1
controllers/business_trip/business_approve.go

@@ -54,7 +54,7 @@ func (this *BusinessTrip) ApproveList() {
 
 	if status != "" {
 		if status == "已审批" {
-			condition += ` AND status IN('已审批','已驳回') `
+			condition += ` AND status IN('已通过','已驳回','已关闭') `
 		} else {
 			condition += ` AND status=? `
 			pars = append(pars, status)