Bläddra i källkod

年审审批流程修改

huahaiyan 6 år sedan
förälder
incheckning
14e6b725c7

+ 2 - 0
src/dashoo.cn/backend/api/business/oilsupplier/annualaudit/annualaudit.go

@@ -12,6 +12,8 @@ type OilAnnualAudit struct {
 	AuditIndex       int       `xorm:"default 0 comment('审批次数') INT(11)"`
 	BusinessKey      string    `xorm:"VARCHAR(255)"`
 	FirstAudit       int       `xorm:"default 0 comment('初审') INT(10)"`
+	SecondAudit      int       `xorm:"default 0 comment('复审') INT(10)"`
+	ThirdAudit       int       `xorm:"default 0 comment('专业科室审批') INT(10)"`
 	AccessCardNo     string    `xorm:"comment('准入证号') VARCHAR(50)"`
 	SupplierTypeName string    `xorm:"comment('准入类别') VARCHAR(50)"`
 	SupplierName     string    `xorm:"comment('企业名称') VARCHAR(50)"`

+ 158 - 239
src/dashoo.cn/backend/api/controllers/oilsupplier/annualaudit.go

@@ -181,10 +181,10 @@ func (this *AnnualAuditController) GetMyTaskEntityList() {
 	}
 	certIdList = strings.Join(annuIdarr, ",")
 	var total int64 = 0
-	if (certIdList != "") {
+	if certIdList != "" {
 		where += " and Id in (" + certIdList + ")"
 		//根据部门查询待办任务
-		where += " and Status != 2 "
+		where += " and Status > 0 "
 		total = svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
 		//total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
 
@@ -321,9 +321,9 @@ func (this *AnnualAuditController) AddEntity() {
 	}
 	aplytime := suppliermodel.ApplyTime
 	subtime := this.getTimeSub(aplytime, time.Now())
-	lefttime := subtime-3
+	lefttime := subtime - 3
 	if subtime > 3 {
-		errinfo.Message = "还不到年审时间!请"+ utils.ToStr(lefttime) +"月后再来申请"
+		errinfo.Message = "还不到年审时间!请" + utils.ToStr(lefttime) + "月后再来申请"
 		errinfo.Code = -1
 		this.Data["json"] = &errinfo
 		this.ServeJSON()
@@ -346,16 +346,16 @@ func (this *AnnualAuditController) AddEntity() {
 	//启动工作流
 	businessKey := utils.ToStr(annualId) + "-" + strconv.Itoa(model.AuditIndex)
 	processInstanceId := svcActiviti.StartProcess(workflow.OIL_AUDIT_APPLY, businessKey, this.User.Id)
-	var ActiComplete workflow.ActiCompleteVM
-	ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
-	ActiComplete.BusinessKey = businessKey
-	ActiComplete.UserNames = firstAudit
-	ActiComplete.UserId = this.User.Id
-	ActiComplete.Result = "1"
-	ActiComplete.Remarks = model.Remark
-	ActiComplete.CallbackUrl = ""
+	//var ActiComplete workflow.ActiCompleteVM
+	//ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
+	//ActiComplete.BusinessKey = businessKey
+	//ActiComplete.UserNames = firstAudit
+	//ActiComplete.UserId = this.User.Id
+	//ActiComplete.Result = "1"
+	//ActiComplete.Remarks = model.Remark
+	//ActiComplete.CallbackUrl = ""
 	//提交给二级单位初审
-	receiveVal := svcActiviti.TaskComplete(ActiComplete)
+	//receiveVal := svcActiviti.TaskComplete(ActiComplete)
 	var auditmodel annualaudit.OilAnnualAudit
 	auditmodel.WorkflowId = processInstanceId
 	auditmodel.FirstAudit, _ = strconv.Atoi(firstAudit)
@@ -368,27 +368,27 @@ func (this *AnnualAuditController) AddEntity() {
 		"AuditIndex",
 		"BusinessKey",
 	}
-	if receiveVal == "true" {
-		_, err = svc.UpdateEntityByIdCols(annualId, auditmodel, cols)
-		if err == nil {
-			//新增
-			errinfo.Message = "添加成功!"
-			errinfo.Code = 0
-			errinfo.Item = model.Id
-			this.Data["json"] = &errinfo
-			this.ServeJSON()
-		} else {
-			errinfo.Message = "添加失败!" + utils.AlertProcess(err.Error())
-			errinfo.Code = -1
-			this.Data["json"] = &errinfo
-			this.ServeJSON()
-		}
+	//if receiveVal == "true" {
+	_, err = svc.UpdateEntityByIdCols(annualId, auditmodel, cols)
+	if err == nil {
+		//新增
+		errinfo.Message = "添加成功!"
+		errinfo.Code = 0
+		errinfo.Item = model.Id
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
 	} else {
-		errinfo.Message = "工作流异常,请联系管理员!"
+		errinfo.Message = "添加失败!" + utils.AlertProcess(err.Error())
 		errinfo.Code = -1
 		this.Data["json"] = &errinfo
 		this.ServeJSON()
 	}
+	//} else {
+	//	errinfo.Message = "工作流异常,请联系管理员!"
+	//	errinfo.Code = -1
+	//	this.Data["json"] = &errinfo
+	//	this.ServeJSON()
+	//}
 }
 
 func (this *AnnualAuditController) getTimeSub(t1, t2 time.Time) int {
@@ -396,6 +396,7 @@ func (this *AnnualAuditController) getTimeSub(t1, t2 time.Time) int {
 	t2 = time.Date(t2.Year(), t2.Month(), t2.Day(), 0, 0, 0, 0, time.Local)
 	return int(t1.Sub(t2).Hours() / 24 / 30)
 }
+
 // @Title 提交审批
 // @Description 提交审批
 // @Success	200	{object} controllers.Request
@@ -405,66 +406,80 @@ func (this *AnnualAuditController) AddAuditEntity() {
 	var errinfo ErrorDataInfo
 	var jsonBlob = this.Ctx.Input.RequestBody
 	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
-	firstAudit := this.GetString("firstAudit")
+	annualId := this.GetString("AnnualId")
+	firstAudit := this.GetString("FirstAuditName")
+	secondAudit := this.GetString("SecondAudit")
+	thirdAudit := this.GetString("ThirdAudit")
 	json.Unmarshal(jsonBlob, &model)
-	where := "CerId = " + utils.ToStr(model.SupplierId) + " and SupplierTypeName = " + model.SupplierTypeName
+	//where := "CerId = " + utils.ToStr(model.SupplierId) + " and SupplierTypeName = " + model.SupplierTypeName
 	var auditentity annualaudit.OilAnnualAudit
-	svc.GetEntityByWhere(""+OilAnnualAuditName, where, &auditentity)
+	svc.GetEntityById(annualId, &auditentity)
 	historworkflowid := auditentity.WorkflowId
-	annualId := auditentity.Id
 	svcActiviti := workflow.GetActivitiService(utils.DBE)
+	statusint, _ := strconv.Atoi(auditentity.Status)
+	var ActiComplete workflow.ActiCompleteVM
+	var auditmodel annualaudit.OilAnnualAudit
 	//重新工作流
-	businessKey := utils.ToStr(annualId) + "-" + strconv.Itoa(auditentity.AuditIndex)
-	processInstanceId := svcActiviti.StartProcess(workflow.OIL_AUDIT_APPLY, businessKey, this.User.Id)
+	if statusint < 0 {
+		businessKey := utils.ToStr(annualId) + "-" + strconv.Itoa(auditentity.AuditIndex)
+		processInstanceId := svcActiviti.StartProcess(workflow.OIL_AUDIT_APPLY, businessKey, this.User.Id)
+		ActiComplete.BusinessKey = businessKey
+		auditmodel.WorkflowId = processInstanceId
+		auditmodel.BusinessKey = businessKey
+	} else {
+		auditmodel.WorkflowId = auditentity.WorkflowId
+		ActiComplete.BusinessKey = auditentity.BusinessKey
+		auditmodel.BusinessKey = auditentity.BusinessKey
 
-	var ActiComplete workflow.ActiCompleteVM
+	}
 	ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
-	ActiComplete.BusinessKey = businessKey
 	ActiComplete.UserNames = firstAudit
 	ActiComplete.UserId = this.User.Id
 	ActiComplete.Result = "1"
 	ActiComplete.Remarks = model.Remark
 	ActiComplete.CallbackUrl = ""
+
 	//提交给二级单位初审
 	receiveVal := svcActiviti.TaskComplete(ActiComplete)
-
-	// 存储审批历史
-	var audithistoryentity audithistory.Base_AuditHistory
-	audithistoryentity.EntityId = annualId
-	audithistoryentity.WorkflowId = historworkflowid
-	audithistoryentity.Process = workflow.OIL_AUDIT_APPLY
-	audithistoryentity.BusinessKey = auditentity.BusinessKey
-	audithistoryentity.Type = model.SupplierTypeName
-	audithistoryentity.BackStep = utils.ToStr(auditentity.Status)
-	audithistoryentity.Index = auditentity.AuditIndex
-	audithistoryentity.CreateOn = time.Now()
-	audithistoryentity.CreateBy = this.User.Realname
-	audithistoryentity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
-	svc.InsertEntity(audithistoryentity)
-
-	var auditmodel annualaudit.OilAnnualAudit
-	auditmodel.WorkflowId = processInstanceId
+	if statusint < 0 {
+		// 存储审批历史
+		var audithistoryentity audithistory.Base_AuditHistory
+		audithistoryentity.EntityId, _ = strconv.Atoi(annualId)
+		audithistoryentity.WorkflowId = historworkflowid
+		audithistoryentity.Process = workflow.OIL_AUDIT_APPLY
+		audithistoryentity.BusinessKey = auditentity.BusinessKey
+		audithistoryentity.Type = model.SupplierTypeName
+		audithistoryentity.BackStep = utils.ToStr(auditentity.Status)
+		audithistoryentity.Index = auditentity.AuditIndex
+		audithistoryentity.CreateOn = time.Now()
+		audithistoryentity.CreateBy = this.User.Realname
+		audithistoryentity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+		svc.InsertEntity(audithistoryentity)
+	}
 	auditmodel.Status = suppliercert.FIRST_TRIAL_STATUS //二级单位初审
 	auditmodel.FirstAudit, _ = strconv.Atoi(firstAudit)
-	auditmodel.BusinessKey = businessKey
+	auditmodel.SecondAudit, _ = strconv.Atoi(secondAudit)
+	auditmodel.ThirdAudit, _ = strconv.Atoi(thirdAudit)
 	cols := []string{
 		"Id",
 		"WorkflowId",
 		"Status",
 		"FirstAudit",
 		"BusinessKey",
+		"SecondAudit",
+		"ThirdAudit",
 	}
 	if receiveVal == "true" {
 		_, err := svc.UpdateEntityByIdCols(annualId, auditmodel, cols)
 		if err == nil {
 			//新增
-			errinfo.Message = "添加成功!"
+			errinfo.Message = "提交成功!"
 			errinfo.Code = 0
-			errinfo.Item = annualId
+			errinfo.Item = auditmodel.Status
 			this.Data["json"] = &errinfo
 			this.ServeJSON()
 		} else {
-			errinfo.Message = "添加失败!" + utils.AlertProcess(err.Error())
+			errinfo.Message = "提交失败!" + utils.AlertProcess(err.Error())
 			errinfo.Code = -1
 			this.Data["json"] = &errinfo
 			this.ServeJSON()
@@ -544,175 +559,84 @@ func (this *AnnualAuditController) AnnualAudit() {
 	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
 	var jsonblob = this.Ctx.Input.RequestBody
 	var dataother ShenHeModel
-	ProfAudit := this.GetString("ProfAudit")
+	var errinfo ErrorInfo
 	json.Unmarshal(jsonblob, &dataother)
+	ProfAudit := this.GetString("ProfAudit")
 	var list annualaudit.OilAnnualAudit
 	where := " Id = '" + strconv.Itoa(dataother.AnnualId) + "'"
 	svc.GetEntityByWhere(""+OilAnnualAuditName, where, &list)
 	svcActiviti := workflow.GetActivitiService(utils.DBE)
 	//审核状态判断进行的操作
-	if dataother.SuccessStatus == 1 {
-		var errinfo ErrorInfo
-		var auditset []auditsetting.Base_OilAuditSetting
-		where := "OrganizeId=" + ProfAudit + " and AuditStepCode='" + workflow.PROF_RECE + "'"
-		svc.GetEntitysByWhere(OilAuditSettingName, where, &auditset)
+	step := 2
+	status := ""
+	backstatus := "0"
+	var userIds string
+	if list.Status == suppliercert.FIRST_TRIAL_STATUS {
+		userIds = utils.ToStr(list.SecondAudit)
+		status = suppliercert.SECOND_TRIAL_STATUS
+		step = 2
+		backstatus = "-1"
+	} else if list.Status == suppliercert.SECOND_TRIAL_STATUS {
+		status = suppliercert.THIRD_TRIAL_STATUS
+		step = 2
+		backstatus = "-2"
+		supsvc := suppliercert.GetOilSupplierCertService(utils.DBE)
 		var users []userRole.Base_RoleList
-		if auditset != nil {
-			svc := auditsetting.GetOilAuditSettingService(utils.DBE)
-			svc.GetAuditUserList(strconv.Itoa(auditset[0].Id), &users)
-		}
-		var userIds string
+		supsvc.GetAuditUser(strconv.Itoa(list.ThirdAudit), workflow.PROF_RECE, &users)
 		for _, tmpUser := range users {
 			userIds += strconv.FormatInt(tmpUser.Id, 10) + ","
 		}
 		userIds = strings.Trim(userIds, ",")
-		var ActiComplete workflow.ActiCompleteVM
-		ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
-		ActiComplete.BusinessKey = list.BusinessKey
-		ActiComplete.UserNames = userIds
-		ActiComplete.UserId = this.User.Id
+	} else if list.Status == suppliercert.THIRD_TRIAL_STATUS {
+		userIds = ProfAudit
+		status = suppliercert.PROF_AUDIT_STATUS
+		step = 2
+		backstatus = "-3"
+	} else if list.Status == suppliercert.PROF_AUDIT_STATUS {
+		status = suppliercert.CENT_AUDIT_STATUS
+		step = 3
+		backstatus = "-4"
+	}
+	var ActiComplete workflow.ActiCompleteVM
+	ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
+	ActiComplete.BusinessKey = list.BusinessKey
+	ActiComplete.UserNames = userIds
+	ActiComplete.UserId = this.User.Id
+	ActiComplete.Remarks = dataother.AuditorRemark
+	ActiComplete.CallbackUrl = ""
+	if dataother.SuccessStatus == 1 {
 		ActiComplete.Result = "1"
-		ActiComplete.Remarks = dataother.AuditorRemark
-		ActiComplete.CallbackUrl = ""
-		//提交给二级单位初审
-		receiveVal := svcActiviti.TaskComplete(ActiComplete)
-		var auditmodel annualaudit.OilAnnualAudit
-		auditmodel.Status = "1"
-		cols := []string{
-			"Id",
-			"Status",
-		}
-		if receiveVal == "true" {
-			_, err := svc.UpdateEntityByIdCols(dataother.AnnualId, auditmodel, cols)
-			if err == nil {
-				errinfo.Message = "审核通过!"
-				errinfo.Code = 0
-				this.Data["json"] = &errinfo
-				this.ServeJSON()
-			} else {
-				errinfo.Message = "审核错误!" + utils.AlertProcess(err.Error())
-				errinfo.Code = -1
-				this.Data["json"] = &errinfo
-				this.ServeJSON()
-			}
-		} else {
-			errinfo.Message = "工作流异常,请联系管理员!"
-			errinfo.Code = -1
-			this.Data["json"] = &errinfo
-			this.ServeJSON()
-		}
-
-	} else if dataother.SuccessStatus == 2 {
-		var errinfo ErrorInfo
-		var ActiComplete workflow.ActiCompleteVM
-		ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
-		ActiComplete.BusinessKey = list.BusinessKey
-		ActiComplete.UserNames = ""
-		ActiComplete.UserId = this.User.Id
-		ActiComplete.Result = "0"
-		ActiComplete.Remarks = dataother.AuditorRemark
-		ActiComplete.CallbackUrl = ""
 		receiveVal := svcActiviti.TaskComplete(ActiComplete)
 		var auditmodel annualaudit.OilAnnualAudit
-		auditmodel.Status = "2"
-		auditmodel.AuditIndex = auditmodel.AuditIndex + 1
-		cols := []string{
-			"Id",
-			"Status",
-			"AuditIndex",
-		}
-		if receiveVal == "true" {
-			_, err := svc.UpdateEntityByIdCols(dataother.AnnualId, auditmodel, cols)
-			if err == nil {
-				errinfo.Message = "审核未通过!"
-				errinfo.Code = 0
-				this.Data["json"] = &errinfo
-				this.ServeJSON()
-			} else {
-				errinfo.Message = "审核错误!" + utils.AlertProcess(err.Error())
-				errinfo.Code = -1
-				this.Data["json"] = &errinfo
-				this.ServeJSON()
+		auditmodel.Status = status
+		oldaplydate := list.ApplyTime
+		if list.Status == suppliercert.PROF_AUDIT_STATUS {
+			//aplydatechange := oldaplydate.Format("2006-01-02")
+			//local, _ := time.LoadLocation("Local")
+			//oldtimeaply, _ := time.ParseInLocation("2006-01-02", aplydatechange, local)
+			auditmodel.ApplyTime = oldaplydate.AddDate(1, 0, 0)
+			var certmodel suppliercert.OilSupplierCert
+			certmodel.ApplyTime = oldaplydate.AddDate(1, 0, 0)
+			certmodel.AuditDate = time.Now()
+			certcols := []string{
+				"Id",
+				"ApplyTime",
+				"AuditDate",
 			}
-		} else {
-			errinfo.Message = "工作流异常,请联系管理员!"
-			errinfo.Code = -1
-			this.Data["json"] = &errinfo
-			this.ServeJSON()
-		}
-	} else if dataother.SuccessStatus == 3 {
-		var errinfo ErrorInfo
-		var ActiComplete workflow.ActiCompleteVM
-		ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
-		ActiComplete.BusinessKey = list.BusinessKey
-		ActiComplete.UserNames = ProfAudit
-		ActiComplete.UserId = this.User.Id
-		ActiComplete.Result = "1"
-		ActiComplete.Remarks = dataother.AuditorRemark
-		ActiComplete.CallbackUrl = ""
-		//提交给业务处室专业审核
-		receiveVal := svcActiviti.TaskComplete(ActiComplete)
-		var auditmodel annualaudit.OilAnnualAudit
-		auditmodel.Status = "3"
-		cols := []string{
-			"Id",
-			"Status",
+			svc.UpdateEntityByIdCols(list.CerId, certmodel, certcols)
+		}else {
+			auditmodel.ApplyTime = oldaplydate
 		}
+		auditmodel.Step = step
 		if receiveVal == "true" {
-			_, err := svc.UpdateEntityByIdCols(dataother.AnnualId, auditmodel, cols)
-			if err == nil {
-				errinfo.Message = "已分配接收人!"
-				errinfo.Code = 0
-				this.Data["json"] = &errinfo
-				this.ServeJSON()
-			} else {
-				errinfo.Message = "分配错误!" + utils.AlertProcess(err.Error())
-				errinfo.Code = -1
-				this.Data["json"] = &errinfo
-				this.ServeJSON()
+			cols := []string{
+				"Id",
+				"Status",
+				"Step",
+				"ApplyTime",
 			}
-		} else {
-			errinfo.Message = "工作流异常,请联系管理员!"
-			errinfo.Code = -1
-			this.Data["json"] = &errinfo
-			this.ServeJSON()
-		}
-	} else if dataother.SuccessStatus == 4 {
-		var errinfo ErrorInfo
-		var ActiComplete workflow.ActiCompleteVM
-		ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
-		ActiComplete.BusinessKey = list.BusinessKey
-		ActiComplete.UserNames = ""
-		ActiComplete.UserId = this.User.Id
-		ActiComplete.Result = "1"
-		ActiComplete.Remarks = dataother.AuditorRemark
-		ActiComplete.CallbackUrl = ""
-		receiveVal := svcActiviti.TaskComplete(ActiComplete)
-		var auditmodel annualaudit.OilAnnualAudit
-		oldaplydate := list.ApplyTime
-		//aplydatechange := oldaplydate.Format("2006-01-02")
-		//local, _ := time.LoadLocation("Local")
-		//oldtimeaply, _ := time.ParseInLocation("2006-01-02", aplydatechange, local)
-		auditmodel.Status = "4"
-		auditmodel.Step = 3
-		auditmodel.ApplyTime = oldaplydate.AddDate(1,0,0)
-		cols := []string{
-			"Id",
-			"Status",
-			"Step",
-			"ApplyTime",
-		}
-		var certmodel suppliercert.OilSupplierCert
-		certmodel.ApplyTime = oldaplydate.AddDate(1,0,0)
-		certmodel.AuditDate = time.Now()
-		certcols := []string{
-			"Id",
-			"ApplyTime",
-			"AuditDate",
-		}
-		if receiveVal == "true" {
-			_, err := svc.UpdateEntityByIdCols(dataother.AnnualId, auditmodel, cols)
-			_, err = svc.UpdateEntityByIdCols(list.CerId, certmodel, certcols)
+			svc.UpdateEntityByIdCols(dataother.AnnualId, auditmodel, cols)
+
 			paysvc := paymentinfo.GetPaymentService(utils.DBE)
 			var Amount float64
 			if list.SupplierTypeName == "01" {
@@ -722,59 +646,54 @@ func (this *AnnualAuditController) AnnualAudit() {
 			} else if list.SupplierTypeName == "03" {
 				Amount = 8000
 			}
-			err = paysvc.AddPaymentinfo(list.SupplierId, list.CerId, Amount, "2")
-			if err == nil {
-				errinfo.Message = "审核通过!"
-				errinfo.Code = 0
-				this.Data["json"] = &errinfo
-				this.ServeJSON()
-			} else {
-				errinfo.Message = "审核错误!" + utils.AlertProcess(err.Error())
-				errinfo.Code = -1
-				this.Data["json"] = &errinfo
-				this.ServeJSON()
-			}
+			paysvc.AddPaymentinfo(list.SupplierId, list.Id, Amount, "2")
+			errinfo.Message = "提交成功!"
+			errinfo.Code = 0
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
 		} else {
 			errinfo.Message = "工作流异常,请联系管理员!"
 			errinfo.Code = -1
 			this.Data["json"] = &errinfo
 			this.ServeJSON()
+			return
 		}
-	} else if dataother.SuccessStatus == 5 {
-		var errinfo ErrorInfo
-		var ActiComplete workflow.ActiCompleteVM
-		ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
-		ActiComplete.BusinessKey = list.BusinessKey
-		ActiComplete.UserNames = ""
-		ActiComplete.UserId = this.User.Id
+	} else {
 		ActiComplete.Result = "0"
-		ActiComplete.Remarks = dataother.AuditorRemark
-		ActiComplete.CallbackUrl = ""
 		receiveVal := svcActiviti.TaskComplete(ActiComplete)
-		var auditmodel annualaudit.OilAnnualAudit
-		auditmodel.Status = "5"
-		cols := []string{
-			"Id",
-			"Status",
-		}
 		if receiveVal == "true" {
-			_, err := svc.UpdateEntityByIdCols(dataother.AnnualId, auditmodel, cols)
+			if list.Status == suppliercert.PROF_AUDIT_STATUS {
+				list.Status = suppliercert.NOPASS_STATUS
+				list.AuditIndex = list.AuditIndex + 1
+			} else {
+				list.Status = backstatus
+				list.AuditIndex = list.AuditIndex + 1
+			}
+			list.Step = 1
+			cols := []string{
+				"Status",
+				"Step",
+				"AuditIndex",
+			}
+			_, err := svc.UpdateEntityByIdCols(dataother.AnnualId, list, cols)
 			if err == nil {
-				errinfo.Message = "审核未通过!"
+				errinfo.Message = "提交成功!"
 				errinfo.Code = 0
 				this.Data["json"] = &errinfo
 				this.ServeJSON()
 			} else {
-				errinfo.Message = "审核错误!" + utils.AlertProcess(err.Error())
+				errinfo.Message = "提交失败!"
 				errinfo.Code = -1
 				this.Data["json"] = &errinfo
 				this.ServeJSON()
 			}
+
 		} else {
 			errinfo.Message = "工作流异常,请联系管理员!"
 			errinfo.Code = -1
 			this.Data["json"] = &errinfo
 			this.ServeJSON()
+			return
 		}
 	}
 }

+ 1 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go

@@ -691,6 +691,7 @@ func (this *OilSupplierCertAppendController) AuditEntityFir() {
 				supplierCertAppendEntity.Step = step
 				supplierCertAppendEntity.AuditIndex = supplierCertAppendEntity.AuditIndex + 1
 			}else {
+				supplierCertAppendEntity.Status = "-1"
 				supplierCertAppendEntity.Status = "0"
 				supplierCertAppendEntity.Step = 1
 				supplierCertAppendEntity.AuditIndex = supplierCertAppendEntity.AuditIndex + 1

+ 4 - 3
src/dashoo.cn/frontend_web/src/api/oilsupplier/annualaudit.js

@@ -51,11 +51,12 @@ export default {
       data: formData
     })
   },
-  commitauditEntity (formData, FirstAudit, myAxios) {
+  commitauditEntity (formData, params, myAxios) {
     return myAxios({
-      url: '/annualaudit/addauditcomm?firstAudit=' + FirstAudit,
+      url: '/annualaudit/addauditcomm',
       method: 'post',
-      data: formData
+      data: formData,
+      params: params
     })
   },
   updateEntity (entityId, formData, myAxios) {

+ 49 - 77
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/auditoperation.vue

@@ -9,7 +9,7 @@
       <div slot="header" class="clearfix">
         <span>年审基本信息表</span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button>
+          <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button> -->
           <el-popover>
             <el-steps :active="Step" direction="vertical" align-center finish-status="success">
               <el-step title="填信息"></el-step>
@@ -21,9 +21,11 @@
             </el-steps>
             <el-button slot="reference" plain size="mini" style="margin-left: 8px">查看进度</el-button>
           </el-popover>
-          <el-button type="primary" style="margin-left: 8px;" size="mini" @click="annualAudit()" v-if="AnnualStatus == 0 ||AnnualStatus == 3">审核
+          <el-button type="primary" style="margin-left: 8px;" size="mini" @click="annualAudit()"
+            v-if="AnnualStatus == 1 ||AnnualStatus == 2 ||AnnualStatus == 4">审核
           </el-button>
-          <el-button type="primary" style="margin-left: 8px;" size="mini" @click="profAudit()" v-if="AnnualStatus == 1">专业审核分配</el-button>
+          <el-button type="primary" style="margin-left: 8px;" size="mini" @click="profAudit()" v-if="AnnualStatus == 3">
+            专业审核分配</el-button>
           <router-link :to="'/oilsupplier/annualaudit/annualfistaudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px;">返回</el-button>
           </router-link>
@@ -175,19 +177,15 @@
         </el-tab-pane>
 
         <el-tab-pane label="企业资质" :disabled="!certId">
-          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="false" height="360px" style="margin-top: 20px"></subfile-list>
+          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="false" height="360px"
+            style="margin-top: 20px"></subfile-list>
         </el-tab-pane>
 
 
-        <el-tab-pane label="提交审批">
+        <el-tab-pane label="审批流程">
           <el-card class="box-card" style="height: 800px">
             <div slot="header" class="clearfix">
               <span>审批流程</span>
-              <!-- <span style="float: right;">
-                <el-button type="primary" size="mini" :disabled="formDataCert.Status > 0" :loading="applyLoading"
-                  @click="AuditEntity">提交审批
-                </el-button>
-              </span> -->
             </div>
             <wf-history ref="WfHistory" :entryinfo="entrydetail"></wf-history>
           </el-card>
@@ -196,24 +194,15 @@
     </el-card>
     <el-dialog title="审核" :visible.sync="dialogMakeSure">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
-        <el-form-item label="专业科室" v-if="this.AnnualStatus == '0'">
-          <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
-            style="width: 100%" v-model="majorDept" placeholder="请选择组织">
-          </el-cascader>
-        </el-form-item>
-        <!-- <el-form-item label="专业科室" v-if="this.AnnualStatus == '0'">
-          <el-cascader :options="orgtreelist" :props="proorgtreeprops" change-on-select :show-all-levels="false" filterable
-            style="width: 100%" v-model="majorDept" placeholder="请选择组织">
-          </el-cascader>
-        </el-form-item> -->
         <el-form-item label="审核状态">
           <template>
-            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1">通过</el-radio>
-            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2">未通过</el-radio>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1" @change="radioChange">通过</el-radio>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="0" @change="radioChange">未通过</el-radio>
           </template>
         </el-form-item>
-        <el-form-item label="意见">
-          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核说明"></el-input>
+        <el-form-item label="意见" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder">
+          </el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top: -25px">
@@ -254,7 +243,7 @@
   import api from '@/api/oilsupplier/supplier'
   import apiCert from '@/api/oilsupplier/suppliercert'
   import SupplierFileTable from '@/pages/oilsupplier/supplierfile/table.vue'
-  import WfHistory from '@/components/workflow/wfhistory.vue'
+  import WfHistory from '@/components/workflow/wfmultihistory.vue'
   import SupplierCertEdit from '@/components/oilsupplier/suppliercertedit.vue'
 
   import EquipmentList from '@/components/oilsupplier/equipmentlist'
@@ -290,12 +279,13 @@
 
     data() {
       return {
+        textplaceholder:'',
         audithistoryshow: false,
         dialogProfAudit: false,
         canUpdateSupplier: true,
         dictData: null,
         applyLoading: false,
-        subfileList:[],
+        subfileList: [],
         majorDept: [],
         auditbusList: [], // 待审核业务
         secauditerOptions: [], //专业审批人
@@ -470,6 +460,13 @@
           this.SetFormData(fdata)
         }
       },
+      radioChange () {
+        if (this.shenheForm.SuccessStatus === 1) {
+          this.textplaceholder = '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)'
+        } else {
+          this.textplaceholder = '退回意见不能少于5个字'
+        }
+      },
       SetFormData(fdata) {
         this.isCanUpdateSupplier(fdata.Id)
         this.formData.Id = fdata.Id
@@ -585,7 +582,7 @@
             this.$refs['winningList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['businessList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.entrydetail.business = this.certId
+            this.entrydetail.business = this.annualId
             this.entrydetail.instance = this.WorkflowId
             this.backhistroy.classId = this.formData.SupplierTypeCode
             if (this.certId && this.WorkflowId) {
@@ -620,8 +617,8 @@
           IsInnerOrganize: 1
         }
         api.getDictListByStatus(params, this.$axios).then(res => {
-          this.dictData = res.data.items
-          this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
+            this.dictData = res.data.items
+            this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
           })
           .catch(err => {
             console.error(err)
@@ -644,34 +641,10 @@
           })
       },
       auditOrgChange() {
-        // let auditstepcode = ''
-        // if (this.AnnualStatus === '1') {
-        //   auditstepcode = 'PROF_AUDIT'
-        // } else {
-        //   return
-        // }
-        // let deptid = val[val.length - 1]
-        // this.auditerOptions = []
-        // api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
-        //   this.secauditerOptions = res.data.item
-        // }).catch(err => {
-        //   console.error(err)
-        // })
-        let auditstepcode = ''
-        if (this.AnnualStatus == 1) {
-          auditstepcode = 'PROF_AUDIT'
-        } else {
-          return
-        }
-        let deplist = []
-        deplist = this.companyid.split(",")
-        let deptid = deplist[deplist.length - 1]
-        console.log(deptid)
-        this.auditerOptions = []
-        this.auditer = ''
-        api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+        let auditstepcode = 'PROF_AUDIT'
+        api.getAuditerByDept(this.authUser.Profile.DepartmentId, auditstepcode, this.$axios).then(res => {
           this.secauditerOptions = res.data.item
-          console.log("--this.secauditerOptions----",this.secauditerOptions)
+          console.log("--this.secauditerOptions-", this.secauditerOptions)
         }).catch(err => {
           console.error(err)
         })
@@ -688,30 +661,29 @@
       },
       //审核通过
       makeSure() {
-        //审核通过的具体操作(未编写)
-        this.$confirm("确认审核结果!", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          })
-          .then(() => {
-            this.checkstatus()
-          })
-          .catch(() => {})
+        if (this.shenheForm.SuccessStatus === 1) {
+          if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3') {
+            this.$message({
+              type: 'warning',
+              message: '审批意见不能低于20个字符!'
+            })
+            return
+          }
+        } else {
+          if (this.shenheForm.AuditorRemark.trim().length < 5 && this.formData.Status !== '3') {
+            this.$message({
+              type: 'warning',
+              message: '退回意见不能低于5个字符!'
+            })
+            return
+          }
+        }
+        this.checkstatus()
       },
       checkstatus() {
-        var ProfAuditUserId = ""
-        if (this.AnnualStatus === '1') {
-          this.shenheForm.SuccessStatus = parseInt(this.shenheForm.SuccessStatus) + 2
-          ProfAuditUserId = this.ProfAuditThen
-        } else if (this.AnnualStatus === '3') {
-          this.shenheForm.SuccessStatus = parseInt(this.shenheForm.SuccessStatus) + 3
-          ProfAuditUserId = ""
-        } else if (this.AnnualStatus === '0') {
-          ProfAuditUserId = this.majorDept[this.majorDept.length - 1]
-        }
+        this.shenheForm.SuccessStatus = parseInt(this.shenheForm.SuccessStatus)
         let params = this.shenheForm
-        this.$axios.put('/annualaudit/auditfirst?ProfAudit=' + ProfAuditUserId, params)
+        this.$axios.put('/annualaudit/auditfirst?ProfAudit=' + this.ProfAuditThen, params)
           .then(res => {
             // response
             if (res.data.code === 0) {

+ 122 - 30
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/bassicoperation.vue

@@ -9,7 +9,7 @@
       <div slot="header" class="clearfix">
         <span>年审基本信息表</span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button>
+          <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button> -->
           <!-- <el-button plain icon="el-icon-right" size="mini" style="margin-right: 5px" @click="nextTab">下一步</el-button> -->
           <el-popover>
             <el-steps :active="Step" direction="vertical" align-center finish-status="success">
@@ -21,7 +21,7 @@
             </el-steps>
             <el-button slot="reference" plain size="mini" style="margin-left: 8px">查看进度</el-button>
           </el-popover>
-          <el-button type="primary" style="margin-left: 8px;" size="mini" @click="addshow =true" v-if="Status == '2'">提交审核</el-button>
+          <el-button type="primary" style="margin-left: 8px;" size="mini" @click="addshow =true" v-if="Status <= 0">提交审核</el-button>
           <router-link :to="'/oilsupplier/annualaudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px;">返回</el-button>
           </router-link>
@@ -43,7 +43,7 @@
             <div slot="header" class="clearfix">
               <span>供方基本信息表</span>
               <span style="float: right;">
-                <el-button type="primary" size="mini" @click="saveEntity" v-if="Status <= 1">保存基本信息
+                <el-button type="primary" size="mini" @click="saveEntity" v-if="Status <= 0">保存基本信息
                 </el-button>
               </span>
             </div>
@@ -58,7 +58,7 @@
             <div slot="header" class="clearfix">
               <span>企业人员结构情况</span>
               <span style="float: right;">
-              <el-button type="primary" size="mini" @click="updateNumberEntity()" v-if="Status <= 1">
+              <el-button type="primary" size="mini" @click="updateNumberEntity()" v-if="Status <= 0">
                   保存人员结构情况</el-button>
               </span>
             </div>
@@ -141,7 +141,7 @@
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>企业主要装备情况</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="equipmentdialog" v-if="Status <= 1">添加</el-button>
+              <el-button style="float: right; padding: 3px 0" type="text" @click="equipmentdialog" v-if="Status <= 0">添加</el-button>
             </div>
             <equipment-list ref="equipmentList" :data="equipmentList" :SupplierCertId="certId"
               :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></equipment-list>
@@ -150,7 +150,7 @@
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>近三年主要工程业绩</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="performancedialog" v-if="Status <= 1">添加</el-button>
+              <el-button style="float: right; padding: 3px 0" type="text" @click="performancedialog" v-if="Status <= 0">添加</el-button>
             </div>
             <performance-list ref="performanceList" :data="performanceList" :SupplierCertId="certId" :disabled="true"
               :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></performance-list>
@@ -159,7 +159,7 @@
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>拥有专利、专有技术及工法</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="patentdialog" v-if="Status <= 1">添加</el-button>
+              <el-button style="float: right; padding: 3px 0" type="text" @click="patentdialog" v-if="Status <= 0">添加</el-button>
             </div>
             <patent-list ref="patentList" :data="patentList" :SupplierCertId="certId" :SupplierTypeCode="classId"
               height="360px" style="margin-top: 20px">
@@ -169,7 +169,7 @@
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>近三年获得省部级及以上主要技术、管理成果、获奖项目</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="winningdialog" v-if="Status <= 1">添加</el-button>
+              <el-button style="float: right; padding: 3px 0" type="text" @click="winningdialog" v-if="Status <= 0">添加</el-button>
             </div>
             <winning-list ref="winningList" :data="winningList" :SupplierCertId="certId" :SupplierTypeCode="classId"
               height="360px" style="margin-top: 20px">
@@ -212,11 +212,23 @@
                 </el-option>
               </el-select>
             </el-form-item> -->
-            <el-form-item label="审人">
-              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择审人">
+            <el-form-item label="审人">
+              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择审人">
                 <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
               </el-input>
             </el-form-item>
+            <el-form-item label="复审人员">
+              <el-select ref="selectAuditer" v-model="fushenauditer" placeholder="请选择复审人" style="width: 100%" filterable
+                allow-create default-first-option>
+                <el-option v-for="item in secauditerOptions" :key="item.id" :label="item.realname" :value="item.id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="专业处室">
+              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
+                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">
+              </el-cascader>
+            </el-form-item>
           </el-col>
           <el-col :span="24">
             <el-form-item label="说明">
@@ -248,7 +260,7 @@
   import annualapi from '@/api/oilsupplier/annualaudit';
   import apiCert from '@/api/oilsupplier/suppliercert'
   import SupplierFileTable from '@/pages/oilsupplier/supplierfile/table.vue'
-  import WfHistory from '@/components/workflow/wfhistory.vue'
+  import WfHistory from '@/components/workflow/wfmultihistory.vue'
   import SupplierCertEdit from '@/components/oilsupplier/suppliercertedit.vue'
 
   import EquipmentList from '@/components/oilsupplier/equipmentlist'
@@ -290,13 +302,16 @@
       return {
         savebtn: true,
         visbtn: '1',
+        fushenauditer: '', //复审人员
+        majorDept: [],
+        secauditerOptions: [],
         audithistoryshow: false,
         chooseAuditorVisible: false,
         activeName: '0',
         orgtreelist: [],
         orgtreeprops: {
           value: 'id',
-          label: 'Fullname',
+          label: 'name',
           children: 'children'
         },
         backhistroy: {
@@ -304,6 +319,12 @@
           classId: '01',
           workflowId: ''
         },
+        auditform: {
+          FirstAuditName: "",
+          SecondAudit: "",
+          ThirdAudit: "",
+          AnnualId:'',
+        },
         Step: '',
         subfileList: [], // 资质
         auditbusList: [], // 待审核业务
@@ -454,7 +475,6 @@
       this.annualId = this.$route.query.annualId
       this.WorkflowId = this.$route.query.WorkflowId + ''
       this.getDictOptions()
-      this.getorgtreelist()
       this.formData.Id = this.serviceId
       this.initDatas()
       this.backhistroy.certId = this.annualId
@@ -607,7 +627,7 @@
             this.$refs['winningList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['businessList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.entrydetail.business = this.certId
+            this.entrydetail.business = this.annualId
             this.entrydetail.instance = this.WorkflowId
             this.backhistroy.classId = this.formData.SupplierTypeCode
             if (this.certId && this.WorkflowId) {
@@ -620,13 +640,53 @@
         }
       },
 
-      auditOrgChang(val) {
+      orgtreeChange(val) {
+        this.userOptions = []
         let deptid = val[val.length - 1]
-        this.auditerOption = []
-        this.auditer = ''
-        let auditstepcode = 'FIRST_TRIAL'
+        let auditstepcode = 'PROF_RECE'
         api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
-          this.auditerOption = res.data.item
+          this.userOptions = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      auditOrgChang(val) {
+        console.log("------val", val)
+        let auditstepcode = "SECOND_TRIAL";
+        api
+          .getAuditerByFirst(val, auditstepcode, this.$axios)
+          .then(res => {
+            this.secauditerOptions = res.data.item
+          })
+          .catch(err => {
+            console.error(err);
+          });
+      },
+
+      chooseAuditorShow() {
+        this.$refs['chooseAuditor'].getorgtreelist(this.formData.SupplierTypeCode)
+        this.chooseAuditorVisible = true
+      },
+      setAuditer(val, name) {
+        this.auditer = val
+        this.auditerName = name
+        this.chooseAuditorVisible = false
+        this.auditOrgChang(this.auditer)
+      },
+
+      getDictOptions() {
+        let params = {
+          //status: this.formData.Status,
+          //majorAduit: this.formData.ThirdAudit
+        }
+        api.getDictListByStatus(params, this.$axios).then(res => {
+          this.dictData = res.data.items
+          //this.organizeOption = res.data.items['Organizes']
+          this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
+          /* this.UnitRelationOptions = res.data.items['UnitRelation']
+          this.getCityList(res.data.items['GaodeMapChinaAreas'])
+          this.CompanyTypeOptions = res.data.items['CompanyType'] */
         }).catch(err => {
           console.error(err)
         })
@@ -648,16 +708,16 @@
           })
       },
 
-      getDictOptions() {
-        api.getDictList(this.$axios).then(res => {
-          this.dictData = res.data.items
-          /*this.UnitRelationOptions = res.data.items['UnitRelation']
-          this.getCityList(res.data.items['GaodeMapChinaAreas'])
-          this.CompanyTypeOptions = res.data.items['CompanyType']*/
-        }).catch(err => {
-          console.error(err)
-        })
-      },
+      // getDictOptions() {
+      //   api.getDictList(this.$axios).then(res => {
+      //     this.dictData = res.data.items
+      //     /*this.UnitRelationOptions = res.data.items['UnitRelation']
+      //     this.getCityList(res.data.items['GaodeMapChinaAreas'])
+      //     this.CompanyTypeOptions = res.data.items['CompanyType']*/
+      //   }).catch(err => {
+      //     console.error(err)
+      //   })
+      // },
 
       // 保存信息
       saveEntity() {
@@ -756,9 +816,41 @@
       addAnnualAudit() {
         this.$refs['EntityFormref'].validate((valid) => {
           if (valid) {
+            if (this.auditer === '') {
+              this.$message({
+                type: 'warning',
+                message: '请选择审批人!'
+              })
+              return
+            }
+            if (this.fushenauditer === "") {
+              this.$message({
+                type: "warning",
+                message: "请选择复审人!"
+              })
+              return
+            }
+            if (this.majorDept.length === 0) {
+              this.$message({
+                type: "warning",
+                message: "请选择专业处室!"
+              })
+              return
+            }
+            if (this.userOptions == null || this.userOptions.length === 0) {
+              this.$message({
+                type: 'warning',
+                message: '该专业科室未配置接收人!'
+              })
+              return
+            }
             this.entityForm.SupplierId = parseInt(this.certId)
             this.entityForm.SupplierTypeName = this.formData.SupplierTypeCode
-            annualapi.commitauditEntity(this.entityForm, this.auditer, this.$axios).then(res => {
+            this.auditform.FirstAuditName = this.auditer
+            this.auditform.SecondAudit = this.fushenauditer
+            this.auditform.ThirdAudit = this.majorDept[this.majorDept.length - 1]
+            this.auditform.AnnualId = this.annualId
+            annualapi.commitauditEntity(this.entityForm, this.auditform, this.$axios).then(res => {
               if (res.data.code === 0) {
                 //保存成功后,初始化数据,变成修改
                 this.entityForm.Id = res.data.item;

+ 126 - 31
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/goodsoperation.vue

@@ -9,7 +9,7 @@
       <div slot="header" class="clearfix">
         <span>年审基本信息表</span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button>
+          <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button> -->
           <!-- <el-button plain icon="el-icon-right" size="mini" style="margin-right: 5px" @click="nextTab">下一步</el-button> -->
           <el-popover>
             <el-steps :active="Step" direction="vertical" align-center finish-status="success">
@@ -21,7 +21,7 @@
             </el-steps>
             <el-button slot="reference" plain size="mini" style="margin-left: 8px">查看进度</el-button>
           </el-popover>
-          <el-button type="primary" style="margin-left: 8px;" size="mini" @click="addshow =true" v-if="Status == '2'">
+          <el-button type="primary" style="margin-left: 8px;" size="mini" @click="addshow =true" v-if="Status <= 0">
             提交审核</el-button>
           <router-link :to="'/oilsupplier/annualaudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px;">返回</el-button>
@@ -44,7 +44,7 @@
             <div slot="header" class="clearfix">
               <span>供方基本信息表</span>
               <span style="float: right;">
-                <el-button type="primary" size="mini" @click="saveEntity" v-if="Status <= 1">保存基本信息
+                <el-button type="primary" size="mini" @click="saveEntity" v-if="Status <= 0">保存基本信息
                 </el-button>
               </span>
             </div>
@@ -59,7 +59,7 @@
             <div slot="header" class="clearfix">
               <span>企业人员结构情况</span>
               <span style="float: right;">
-                <el-button type="primary" size="mini" @click="updateNumberEntity()" v-if="Status <= 1">
+                <el-button type="primary" size="mini" @click="updateNumberEntity()" v-if="Status <= 0">
                   保存人员结构情况</el-button>
               </span>
             </div>
@@ -142,7 +142,7 @@
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>企业主要装备情况</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="equipmentdialog" v-if="Status <= 1">添加
+              <el-button style="float: right; padding: 3px 0" type="text" @click="equipmentdialog" v-if="Status <= 0">添加
               </el-button>
             </div>
             <equipment-list ref="equipmentList" :data="equipmentList" :SupplierCertId="certId"
@@ -152,7 +152,7 @@
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>近三年主要工程业绩</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="performancedialog" v-if="Status <= 1">
+              <el-button style="float: right; padding: 3px 0" type="text" @click="performancedialog" v-if="Status <= 0">
                 添加</el-button>
             </div>
             <performance-list ref="performanceList" :data="performanceList" :SupplierCertId="certId" :disabled="true"
@@ -162,7 +162,7 @@
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>拥有专利、专有技术及工法</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="patentdialog" v-if="Status <= 1">添加
+              <el-button style="float: right; padding: 3px 0" type="text" @click="patentdialog" v-if="Status <= 0">添加
               </el-button>
             </div>
             <patent-list ref="patentList" :data="patentList" :SupplierCertId="certId" :SupplierTypeCode="classId"
@@ -173,7 +173,7 @@
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>近三年获得省部级及以上主要技术、管理成果、获奖项目</span>
-              <el-button style="float: right; padding: 3px 0" type="text" @click="winningdialog" v-if="Status <= 1">添加
+              <el-button style="float: right; padding: 3px 0" type="text" @click="winningdialog" v-if="Status <= 0">添加
               </el-button>
             </div>
             <winning-list ref="winningList" :data="winningList" :SupplierCertId="certId" :SupplierTypeCode="classId"
@@ -226,11 +226,23 @@
                 </el-option>
               </el-select>
             </el-form-item> -->
-            <el-form-item label="审人">
-              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择审人">
+           <el-form-item label="审人">
+              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择审人">
                 <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
               </el-input>
             </el-form-item>
+            <el-form-item label="复审人员">
+              <el-select ref="selectAuditer" v-model="fushenauditer" placeholder="请选择复审人" style="width: 100%" filterable
+                allow-create default-first-option>
+                <el-option v-for="item in secauditerOptions" :key="item.id" :label="item.realname" :value="item.id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="专业处室">
+              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
+                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">
+              </el-cascader>
+            </el-form-item>
           </el-col>
           <el-col :span="24">
             <el-form-item label="说明">
@@ -262,7 +274,7 @@
   import annualapi from '@/api/oilsupplier/annualaudit';
   import apiCert from '@/api/oilsupplier/suppliercert'
   import SupplierFileTable from '@/pages/oilsupplier/supplierfile/table.vue'
-  import WfHistory from '@/components/workflow/wfhistory.vue'
+  import WfHistory from '@/components/workflow/wfmultihistory.vue'
   import SupplierCertEdit from '@/components/oilsupplier/suppliercertedit.vue'
 
   import EquipmentList from '@/components/oilsupplier/equipmentlist'
@@ -306,13 +318,16 @@
       return {
         savebtn: true,
         visbtn: '1',
+        fushenauditer: '', //复审人员
+        majorDept: [],
+        secauditerOptions: [],
         audithistoryshow: false,
         chooseAuditorVisible: false,
         activeName: '0',
         orgtreelist: [],
         orgtreeprops: {
           value: 'id',
-          label: 'Fullname',
+          label: 'name',
           children: 'children'
         },
         backhistroy: {
@@ -320,6 +335,12 @@
           classId: '01',
           workflowId: ''
         },
+        auditform: {
+          FirstAuditName: "",
+          SecondAudit: "",
+          ThirdAudit: "",
+          AnnualId:'',
+        },
         Step: '',
         goodsList: [], // 准入业务
         subfileList: [], // 资质
@@ -471,9 +492,9 @@
       this.annualId = this.$route.query.annualId
       this.WorkflowId = this.$route.query.WorkflowId + ''
       this.getDictOptions()
-      this.getorgtreelist()
       this.formData.Id = this.serviceId
       this.initDatas()
+      this.entityForm.Status = this.Status
       this.backhistroy.certId = this.annualId
       this.backhistroy.workflowId = this.WorkflowId
       if (this.Status <= 1) {
@@ -644,7 +665,7 @@
             this.$refs['businessList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             console.log("-businessList---",this.businessList)
-            this.entrydetail.business = this.certId
+            this.entrydetail.business = this.annualId
             this.entrydetail.instance = this.WorkflowId
             this.backhistroy.classId = this.formData.SupplierTypeCode
             if (this.certId && this.WorkflowId) {
@@ -657,18 +678,59 @@
         }
       },
 
-      auditOrgChang(val) {
+      orgtreeChange(val) {
+        this.userOptions = []
         let deptid = val[val.length - 1]
-        this.auditerOption = []
-        this.auditer = ''
-        let auditstepcode = 'FIRST_TRIAL'
+        let auditstepcode = 'PROF_RECE'
         api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
-          this.auditerOption = res.data.item
+          this.userOptions = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      auditOrgChang(val) {
+        console.log("------val", val)
+        let auditstepcode = "SECOND_TRIAL";
+        api
+          .getAuditerByFirst(val, auditstepcode, this.$axios)
+          .then(res => {
+            this.secauditerOptions = res.data.item
+          })
+          .catch(err => {
+            console.error(err);
+          });
+      },
+
+      chooseAuditorShow() {
+        this.$refs['chooseAuditor'].getorgtreelist(this.formData.SupplierTypeCode)
+        this.chooseAuditorVisible = true
+      },
+      setAuditer(val, name) {
+        this.auditer = val
+        this.auditerName = name
+        this.chooseAuditorVisible = false
+        this.auditOrgChang(this.auditer)
+      },
+
+      getDictOptions() {
+        let params = {
+          //status: this.formData.Status,
+          //majorAduit: this.formData.ThirdAudit
+        }
+        api.getDictListByStatus(params, this.$axios).then(res => {
+          this.dictData = res.data.items
+          //this.organizeOption = res.data.items['Organizes']
+          this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
+          /* this.UnitRelationOptions = res.data.items['UnitRelation']
+          this.getCityList(res.data.items['GaodeMapChinaAreas'])
+          this.CompanyTypeOptions = res.data.items['CompanyType'] */
         }).catch(err => {
           console.error(err)
         })
       },
 
+
       getorgtreelist() {
         let _this = this
         let params = {
@@ -685,16 +747,16 @@
           })
       },
 
-      getDictOptions() {
-        api.getDictList(this.$axios).then(res => {
-          this.dictData = res.data.items
-          /*this.UnitRelationOptions = res.data.items['UnitRelation']
-          this.getCityList(res.data.items['GaodeMapChinaAreas'])
-          this.CompanyTypeOptions = res.data.items['CompanyType']*/
-        }).catch(err => {
-          console.error(err)
-        })
-      },
+      // getDictOptions() {
+      //   api.getDictList(this.$axios).then(res => {
+      //     this.dictData = res.data.items
+      //     /*this.UnitRelationOptions = res.data.items['UnitRelation']
+      //     this.getCityList(res.data.items['GaodeMapChinaAreas'])
+      //     this.CompanyTypeOptions = res.data.items['CompanyType']*/
+      //   }).catch(err => {
+      //     console.error(err)
+      //   })
+      // },
 
       // 保存信息
       saveEntity() {
@@ -776,12 +838,45 @@
       addAnnualAudit() {
         this.$refs['EntityFormref'].validate((valid) => {
           if (valid) {
+            if (this.auditer === '') {
+              this.$message({
+                type: 'warning',
+                message: '请选择审批人!'
+              })
+              return
+            }
+            if (this.fushenauditer === "") {
+              this.$message({
+                type: "warning",
+                message: "请选择复审人!"
+              })
+              return
+            }
+            if (this.majorDept.length === 0) {
+              this.$message({
+                type: "warning",
+                message: "请选择专业处室!"
+              })
+              return
+            }
+            if (this.userOptions == null || this.userOptions.length === 0) {
+              this.$message({
+                type: 'warning',
+                message: '该专业科室未配置接收人!'
+              })
+              return
+            }
             this.entityForm.SupplierId = parseInt(this.certId)
             this.entityForm.SupplierTypeName = this.formData.SupplierTypeCode
-            annualapi.commitauditEntity(this.entityForm, this.auditer, this.$axios).then(res => {
+            this.auditform.FirstAuditName = this.auditer
+            this.auditform.SecondAudit = this.fushenauditer
+            this.auditform.ThirdAudit = this.majorDept[this.majorDept.length - 1]
+            this.auditform.AnnualId = this.annualId
+            annualapi.commitauditEntity(this.entityForm, this.auditform, this.$axios).then(res => {
               if (res.data.code === 0) {
                 //保存成功后,初始化数据,变成修改
-                this.entityForm.Id = res.data.item;
+                this.Status = res.data.item;
+                this.entityForm.Status = this.Status
                 //this.initDatas();
                 this.addshow = false
                 this.$message({

+ 131 - 51
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/operation.vue

@@ -9,7 +9,7 @@
       <div slot="header" class="clearfix">
         <span>年审基本信息表</span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button>
+          <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button> -->
           <!-- <el-button plain icon="el-icon-right" size="mini" style="margin-right: 5px" @click="nextTab">下一步</el-button> -->
           <el-popover>
             <el-steps :active="Step" direction="vertical" align-center finish-status="success">
@@ -21,7 +21,7 @@
             </el-steps>
             <el-button slot="reference" plain size="mini" style="margin-left: 8px">查看进度</el-button>
           </el-popover>
-          <el-button type="primary" style="margin-left: 8px;" size="mini" @click="addshow =true" v-if="Status == '2'">
+          <el-button type="primary" style="margin-left: 8px;" size="mini" @click="addshow =true" v-if="Status <= 0">
             提交审核</el-button>
           <router-link :to="'/oilsupplier/annualaudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px;">返回</el-button>
@@ -203,26 +203,36 @@
                 </el-button>
               </span> -->
             </div>
-            <wf-history ref="WfHistory" :entryinfo="entrydetail"></wf-history>
+            <wf-multi-history ref="WfHistory" :entryinfo="entrydetail"></wf-multi-history>
           </el-card>
         </el-tab-pane>
       </el-tabs>
     </el-card>
-    <el-dialog title="提交申请" :visible.sync="addshow" width="520px">
+    <el-dialog title="提交审批" :visible.sync="addshow" width="520px">
       <el-form label-width="90px" :model="entityForm" :rules="rules" ref="EntityFormref">
         <el-row>
           <el-col :span="24">
-            <!-- <el-form-item label="审批人" prop="auditer" required>
-              <el-select ref="selectAuditer" v-model="entityForm.auditer" placeholder="请选择" style="width: 100%"
-                filterable allow-create default-first-option>
-                <el-option v-for="item in auditerOption" :key="item.id" :label="item.realname" :value="item.id">
-                </el-option>
-              </el-select>
-            </el-form-item> -->
-            <el-form-item label="审批人">
+            <!-- <el-form-item label="审批人">
               <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择审批人">
                 <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
               </el-input>
+            </el-form-item> -->
+            <el-form-item label="初审人员">
+              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择初审人">
+                <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
+              </el-input>
+            </el-form-item>
+            <el-form-item label="复审人员">
+              <el-select ref="selectAuditer" v-model="fushenauditer" placeholder="请选择复审人" style="width: 100%" filterable
+                allow-create default-first-option>
+                <el-option v-for="item in secauditerOptions" :key="item.id" :label="item.realname" :value="item.id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item label="专业处室">
+              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
+                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">
+              </el-cascader>
             </el-form-item>
           </el-col>
           <el-col :span="24">
@@ -255,7 +265,7 @@
   import annualapi from '@/api/oilsupplier/annualaudit';
   import apiCert from '@/api/oilsupplier/suppliercert'
   import SupplierFileTable from '@/pages/oilsupplier/supplierfile/table.vue'
-  import WfHistory from '@/components/workflow/wfhistory.vue'
+  import WfMultiHistory from '@/components/workflow/wfmultihistory.vue'
   import SupplierCertEdit from '@/components/oilsupplier/suppliercertedit.vue'
 
   import EquipmentList from '@/components/oilsupplier/equipmentlist'
@@ -278,7 +288,7 @@
     },
     components: {
       SupplierFileTable,
-      WfHistory,
+      WfMultiHistory,
       SupplierCertEdit,
       SubfileList, // 选择企业资质
       EquipmentList, //企业主要情况
@@ -297,13 +307,22 @@
       return {
         savebtn: true,
         visbtn: '1',
+        fushenauditer: '', //复审人员
+        majorDept: [],
+        secauditerOptions: [],
         audithistoryshow: false,
         chooseAuditorVisible: false,
         activeName: '0',
         orgtreelist: [],
+        auditform: {
+          FirstAuditName: "",
+          SecondAudit: "",
+          ThirdAudit: "",
+          AnnualId:'',
+        },
         orgtreeprops: {
           value: 'id',
-          label: 'Fullname',
+          label: 'name',
           children: 'children'
         },
         backhistroy: {
@@ -315,7 +334,6 @@
         subfileList: [], // 资质
         auditbusList: [], // 待审核业务
         organizeOption: [], // 审批部门
-        auditerOption: [],
         addshow: false,
         canUpdateSupplier: true,
         dictData: null,
@@ -461,7 +479,6 @@
       this.annualId = this.$route.query.annualId
       this.WorkflowId = this.$route.query.WorkflowId + ''
       this.getDictOptions()
-      this.getorgtreelist()
       this.formData.Id = this.serviceId
       this.initDatas()
       this.backhistroy.certId = this.annualId
@@ -614,7 +631,7 @@
             this.$refs['winningList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['businessList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.entrydetail.business = this.certId
+            this.entrydetail.business = this.annualId
             this.entrydetail.instance = this.WorkflowId
             this.backhistroy.classId = this.formData.SupplierTypeCode
             if (this.certId && this.WorkflowId) {
@@ -627,13 +644,55 @@
         }
       },
 
-      auditOrgChang(val) {
+      orgtreeChange(val) {
+        this.userOptions = []
         let deptid = val[val.length - 1]
-        this.auditerOption = []
-        this.auditer = ''
-        let auditstepcode = 'FIRST_TRIAL'
+        let auditstepcode = 'PROF_RECE'
         api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
-          this.auditerOption = res.data.item
+          this.userOptions = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      auditOrgChang(val) {
+        console.log("------val", val)
+        let auditstepcode = "SECOND_TRIAL";
+        api
+          .getAuditerByFirst(val, auditstepcode, this.$axios)
+          .then(res => {
+            this.secauditerOptions = res.data.item
+          })
+          .catch(err => {
+            console.error(err);
+          });
+      },
+
+      chooseAuditorShow() {
+        this.$refs['chooseAuditor'].getorgtreelist(this.formData.SupplierTypeCode)
+        this.chooseAuditorVisible = true
+      },
+      setAuditer(val, name) {
+        this.auditer = val
+        this.auditerName = name
+        this.chooseAuditorVisible = false
+        this.auditOrgChang(this.auditer)
+      },
+
+      getDictOptions() {
+        console.log("-this.orgtreelist--", this.orgtreelist)
+        let params = {
+          status: this.formData.Status,
+          majorAduit: this.formData.ThirdAudit
+        }
+        api.getDictListByStatus(params, this.$axios).then(res => {
+          this.dictData = res.data.items
+          //this.organizeOption = res.data.items['Organizes']
+          this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
+          console.log("-this.orgtreelist--", this.orgtreelist)
+          /* this.UnitRelationOptions = res.data.items['UnitRelation']
+          this.getCityList(res.data.items['GaodeMapChinaAreas'])
+          this.CompanyTypeOptions = res.data.items['CompanyType'] */
         }).catch(err => {
           console.error(err)
         })
@@ -655,17 +714,6 @@
           })
       },
 
-      getDictOptions() {
-        api.getDictList(this.$axios).then(res => {
-          this.dictData = res.data.items
-          /*this.UnitRelationOptions = res.data.items['UnitRelation']
-          this.getCityList(res.data.items['GaodeMapChinaAreas'])
-          this.CompanyTypeOptions = res.data.items['CompanyType']*/
-        }).catch(err => {
-          console.error(err)
-        })
-      },
-
       // 保存信息
       saveEntity() {
         let valid1 = false
@@ -720,21 +768,21 @@
             }
             this.formDataCert.InStyle = this.formData.InStyle
             api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(
-            res => {
-              if (res.data.code === 0) {
-                // 保存成功后,初始化数据,变成修改
-                this.initDatas()
-                this.$message({
-                  type: 'success',
-                  message: res.data.message
-                })
-              } else {
-                this.$message({
-                  type: 'warning',
-                  message: res.data.message
-                })
-              }
-            }).catch(err => {
+              res => {
+                if (res.data.code === 0) {
+                  // 保存成功后,初始化数据,变成修改
+                  this.initDatas()
+                  this.$message({
+                    type: 'success',
+                    message: res.data.message
+                  })
+                } else {
+                  this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
+              }).catch(err => {
               console.error(err)
             })
           } else {
@@ -742,7 +790,7 @@
           }
         })
       },
-      
+
       CheckCompanyBase() {
         if (!this.formData.Id) {
           this.$message({
@@ -764,9 +812,41 @@
       addAnnualAudit() {
         this.$refs['EntityFormref'].validate((valid) => {
           if (valid) {
+            if (this.auditer === '') {
+              this.$message({
+                type: 'warning',
+                message: '请选择审批人!'
+              })
+              return
+            }
+            if (this.fushenauditer === "") {
+              this.$message({
+                type: "warning",
+                message: "请选择复审人!"
+              })
+              return
+            }
+            if (this.majorDept.length === 0) {
+              this.$message({
+                type: "warning",
+                message: "请选择专业处室!"
+              })
+              return
+            }
+            if (this.userOptions == null || this.userOptions.length === 0) {
+              this.$message({
+                type: 'warning',
+                message: '该专业科室未配置接收人!'
+              })
+              return
+            }
             this.entityForm.SupplierId = parseInt(this.certId)
             this.entityForm.SupplierTypeName = this.formData.SupplierTypeCode
-            annualapi.commitauditEntity(this.entityForm, this.auditer, this.$axios).then(res => {
+            this.auditform.FirstAuditName = this.auditer
+            this.auditform.SecondAudit = this.fushenauditer
+            this.auditform.ThirdAudit = this.majorDept[this.majorDept.length - 1]
+            this.auditform.AnnualId = this.annualId
+            annualapi.commitauditEntity(this.entityForm, this.auditform, this.$axios).then(res => {
               if (res.data.code === 0) {
                 //保存成功后,初始化数据,变成修改
                 this.entityForm.Id = res.data.item;

+ 11 - 8
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/annualfistaudit.vue

@@ -36,8 +36,8 @@
         <el-table-column label="操作" min-width="180" align="center" fixed="right">
           <template slot-scope="scope">
             <router-link :to="'/oilsupplier/annualaudit/' + scope.row.SupplierId + '/auditoperation?certid=' + scope.row.CerId +'&WorkflowId='+scope.row.WorkflowId+'&AnnualStatus='+scope.row.Status+'&annualId='+scope.row.Id+'&Step='+scope.row.Step">
-              <el-button type="primary" plain title="审核" size="mini" v-if="scope.row.Status == 0 ||scope.row.Status == 3">审核</el-button>
-              <el-button type="primary" plain title="专业审核分配" size="mini" v-if="scope.row.Status == 1">分配</el-button>
+              <el-button type="primary" plain title="审核" size="mini" v-if="scope.row.Status == 1 ||scope.row.Status == 2 ||scope.row.Status == 4">审核</el-button>
+              <el-button type="primary" plain title="专业审核分配" size="mini" v-if="scope.row.Status == 3">分配</el-button>
             </router-link>
           </template>
         </el-table-column>
@@ -58,12 +58,15 @@
         </el-table-column> -->
         <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
           <template slot-scope="scope">
-            <span v-if="scope.row.Status=='0'" style="color:#E6A23C">已申请</span>
-            <span v-if="scope.row.Status=='2'" style="color:#F56C6C">初审未通过</span>
-            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">待专业处室分办</span>
-            <span v-if="scope.row.Status=='3'" style="color:#E6A23C">待专业处室审批</span>
-            <span v-if="scope.row.Status=='5'" style="color:#F56C6C">专业处室审批未通过</span>
-            <span v-if="scope.row.Status=='4'" style="color:#67C23A">专业审核通过</span>
+            <span v-if="scope.row.Status=='0'" style="color:#E6A23C">待提交</span>
+            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">待初审</span>
+            <span v-if="scope.row.Status=='-1'" style="color:#F56C6C">初审未通过</span>
+            <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待复审</span>
+            <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">复审未通过</span>
+            <span v-if="scope.row.Status=='3'" style="color:#E6A23C">待专业处室分办</span>
+            <span v-if="scope.row.Status=='4'" style="color:#E6A23C">待专业处室审批</span>
+            <span v-if="scope.row.Status=='-4'" style="color:#F56C6C">专业处室审批未通过</span>
+            <span v-if="scope.row.Status=='5'" style="color:#67C23A">审核通过</span>
           </template>
         </el-table-column>
         <el-table-column prop="ApplyTime" sortable min-width="130" label="年审到期日期" align="center" show-overflow-tooltip>

+ 12 - 9
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/index.vue

@@ -72,12 +72,15 @@
         </el-table-column> -->
         <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
           <template slot-scope="scope">
-            <span v-if="scope.row.Status=='0'" style="color:#E6A23C">已申请</span>
-            <span v-if="scope.row.Status=='2'" style="color:#F56C6C">初审未通过</span>
-            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">待专业处室分办</span>
-            <span v-if="scope.row.Status=='3'" style="color:#E6A23C">待专业处室审批</span>
-            <span v-if="scope.row.Status=='5'" style="color:#F56C6C">专业处室审批未通过</span>
-            <span v-if="scope.row.Status=='4'" style="color:#67C23A">专业审核通过</span>
+            <span v-if="scope.row.Status=='0'" style="color:#E6A23C">待提交</span>
+            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">待初审</span>
+            <span v-if="scope.row.Status=='-1'" style="color:#F56C6C">初审未通过</span>
+            <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待复审</span>
+            <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">复审未通过</span>
+            <span v-if="scope.row.Status=='3'" style="color:#E6A23C">待专业处室分办</span>
+            <span v-if="scope.row.Status=='4'" style="color:#E6A23C">待专业处室审批</span>
+            <span v-if="scope.row.Status=='-4'" style="color:#F56C6C">专业处室审批未通过</span>
+            <span v-if="scope.row.Status=='5'" style="color:#67C23A">审核通过</span>
           </template>
         </el-table-column>
         <el-table-column prop="ApplyTime" sortable min-width="130" label="年审到期日期" align="center" show-overflow-tooltip>
@@ -159,13 +162,13 @@
           </el-col>
         </el-row>
         <el-row>
-          <el-col :span="24">
+          <!-- <el-col :span="24">
             <el-form-item label="审批人">
               <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择审批人">
                 <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
               </el-input>
             </el-form-item>
-          </el-col>
+          </el-col> -->
           <el-col :span="24">
             <el-form-item label="说明">
               <el-input v-model="entityForm.Remark" type="textarea" placeholder="请输入说明内容">
@@ -379,7 +382,7 @@
         this.chooseAuditorVisible = false
       },
       chooseAuditorShow() {
-        console.log("---this.entityForm---",this.entityForm)
+        console.log("---this.entityForm---", this.entityForm)
         this.$refs['chooseAuditor'].getorgtreelist(this.entityForm.SupplierTypeName)
         this.chooseAuditorVisible = true
       },