瀏覽代碼

准入申请-服务类代码整理,交费流程

baichengfei 5 年之前
父節點
當前提交
fcf45cee12

+ 1 - 0
src/dashoo.cn/backend/api/business/oilsupplier/oilcatalogsub/oilcatalogsub.go

@@ -36,6 +36,7 @@ const (
 	PROF_AUDIT_STATUS   string = "4"  //专业科室审核
 	CENT_AUDIT_STATUS   string = "5"  // 集中审批
 	PAYING_AUDIT_STATUS string = "6"  //待交费
+	CONFIRM_PAYED_STATUS string = "11" //已确认交费
 	STOREING_STATUS     string = "7"  //待入库
 	STORE_STATUS        string = "8"  //已入库
 	FEN_TRIAL_STATUS    string = "10" //二级单位分办

+ 4 - 4
src/dashoo.cn/backend/api/business/paymentinfo/paymentinfo.go

@@ -11,11 +11,11 @@ type OilPaymentInfo struct {
 	SupplierName   string    `xorm:"comment('企业名称') VARCHAR(100)"`
 	ProjectName    string    `xorm:"comment('项目名称') VARCHAR(100)"`
 	Amount         string    `xorm:"comment('缴费金额') DECIMAL(10,2)"`
-	IsPay          string    `xorm:"comment('是否缴费 1 是 2否') VARCHAR(5)"`
+	IsPay          string    `xorm:"comment('是否缴费 0待缴费 1缴费确认 2已缴费') VARCHAR(5)"`
 	IsInvoice      string    `xorm:"comment('是已开发票 1 是 0否') VARCHAR(5)"`
 	IsVerify       string    `xorm:"comment('是否对账 1 是 0否') VARCHAR(5) DEFAULT '0'"`
 	PayMode        string    `xorm:"comment('缴费方式') VARCHAR(10)"`
-	PayType        string    `xorm:"comment('缴费类型 1 准入缴费 2 年审缴费') VARCHAR(10)"`
+	PayType        string    `xorm:"comment('缴费类型 1 准入缴费 2 年审缴费 3 增项缴费 4 换证 5罚款 6其它') VARCHAR(10)"`
 	PayDate        time.Time `xorm:"comment('缴费日期') DATETIME"`
 	VerifyDate     time.Time `xorm:"comment('对账时间') DATETIME"`
 	BankSerialNum  string    `xorm:"comment('银行流水号') VARCHAR(50)"`
@@ -40,10 +40,10 @@ type Del_OilPaymentInfo struct {
 	SupplierName   string    `xorm:"comment('企业名称') VARCHAR(100)"`
 	ProjectName    string    `xorm:"comment('项目名称') VARCHAR(100)"`
 	Amount         string    `xorm:"comment('缴费金额') DECIMAL(10,2)"`
-	IsPay          string    `xorm:"comment('是否缴费 1 是 2否') VARCHAR(5)"`
+	IsPay          string    `xorm:"comment('是否缴费 0待缴费 1缴费确认 2已缴费') VARCHAR(5)"`
 	IsInvoice      string    `xorm:"comment('是已开发票 1 是 0否') VARCHAR(5)"`
 	PayMode        string    `xorm:"comment('缴费方式') VARCHAR(10)"`
-	PayType        string    `xorm:"comment('缴费类型 1 准入缴费 2 年审缴费') VARCHAR(10)"`
+	PayType        string    `xorm:"comment('缴费类型 1 准入缴费 2 年审缴费 3 增项缴费 4 换证 5罚款 6其它') VARCHAR(10)"`
 	PayDate        time.Time `xorm:"comment('缴费日期') DATETIME"`
 	BankSerialNum  string    `xorm:"comment('银行流水号') VARCHAR(50)"`
 	BankName       string    `xorm:"comment('银行名称') VARCHAR(100)"`

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

@@ -165,6 +165,8 @@ const (
 	PROF_AUDIT string = "PROF_AUDIT"
 	// 集中审批
 	PROF_CONCENT string = "PROF_CONCENT"
+	// 待交费 TODO 待确认
+	PAYING_FEE string = "PAYING_FEE"
 	// 企业法规处审核
 	PROF_REGULATION string = "PROF_REGULATION"
 	// 企业用户注册

+ 72 - 24
src/dashoo.cn/backend/api/controllers/oilsupplier/annualListener.go

@@ -3,14 +3,16 @@ package oilsupplier
 import (
 	msg2 "dashoo.cn/backend/api/business/msg"
 	"dashoo.cn/backend/api/business/oilsupplier/annualaudit"
+	"dashoo.cn/backend/api/business/oilsupplier/oilcostmanage"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
+	"dashoo.cn/backend/api/business/paymentinfo"
 	"encoding/json"
 	"strconv"
 	"strings"
+	"time"
 
 	"dashoo.cn/backend/api/business/auditsetting"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
-	"dashoo.cn/backend/api/business/oilsupplier/suppliercertappend"
 	"dashoo.cn/backend/api/business/workflow"
 	. "dashoo.cn/backend/api/controllers"
 	"dashoo.cn/utils"
@@ -42,7 +44,12 @@ func (this *OilAnnualListenerController) PreFenTrialStatus() {
 	srv.UpdateEntityByIdCols(annualId, annualEntity, cols)
 
 	//查出二级单位分办的人员
-	stepCode := workflow.GetWorkFlowStepCode(annualEntity.SupplierTypeName)
+	// 获取准入资质信息:
+	supplierCertSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
+	var supplierCertEntity suppliercert.OilSupplierCert
+	supplierCertSrv.GetEntityById(annualEntity.CerId, &supplierCertEntity)
+
+	stepCode := workflow.GetWorkFlowStepCode(supplierCertEntity.SupplierTypeCode) // TODO 年审的准入方式
 	auditSettingService := auditsetting.GetOilAuditSettingService(utils.DBE)
 	approverIds := auditSettingService.GetApproverIdsByStepCodeAndUnitId(stepCode, annualEntity.CommitComId)
 	var approveInfo ListenerApproveInfo
@@ -174,6 +181,35 @@ func (this *OilAnnualListenerController) GetPrePayer() {
 	annualEntity.Status = suppliercert.PAYING_AUDIT_STATUS //待缴费
 	srv.UpdateEntityByIdCols(annualId, annualEntity, cols)
 
+	// 获取准入资质信息:
+	supplierCertSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
+	var supplierCertEntity suppliercert.OilSupplierCert
+	supplierCertSrv.GetEntityById(annualEntity.CerId, &supplierCertEntity)
+
+	// 年审审批通过且需要交费, 创建交费信息
+	supplierSrv := supplier.GetOilSupplierService(utils.DBE)
+	var supplierEntity supplier.OilSupplier
+	supplierSrv.GetEntityById(annualEntity.SupplierId, &supplierEntity)
+
+	paySvc := paymentinfo.GetPaymentService(utils.DBE)
+	var Amount float64
+	costSvc := oilcostmanage.GetOilCostManageService(utils.DBE)
+	Amount = costSvc.GetAmount("ANNUAL", supplierCertEntity.SupplierTypeCode)
+	var payInfo paymentinfo.OilPaymentInfo
+	payInfo.SrcId = annualEntity.Id
+	payInfo.SupplierId = annualEntity.SupplierId
+	payInfo.SupplierCertId = annualEntity.CerId
+	payInfo.USCCode = supplierEntity.CommercialNo
+	payInfo.SupplierName = supplierEntity.SupplierName
+	payInfo.PayType = "2"
+	payInfo.IsPay = "0"
+	payInfo.IsInvoice = "0"
+	payInfo.Amount = strconv.FormatFloat(Amount, 'E', -1, 64)
+	payInfo.CreateUserId = annualEntity.CreateUserId
+	payInfo.CreateBy = annualEntity.CreateBy
+	payInfo.CreateOn = time.Now()
+	paySvc.InsertEntity(&payInfo)
+
 	//创建人即为交费的人员
 	approverIds := annualEntity.CreateUserId
 	this.Data["json"] = approverIds
@@ -219,18 +255,18 @@ func (this *OilAnnualListenerController) GetStorageAuditor() {
 	var jsonBlob = this.Ctx.Input.RequestBody
 	var listenerApprove ListenerApproveParams
 	json.Unmarshal(jsonBlob, &listenerApprove)
-	supplierCertAppendId := strings.Split(listenerApprove.BusinessKey, "-")[0]
+	annualId := strings.Split(listenerApprove.BusinessKey, "-")[0]
 
-	certSrv := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
-	var supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend
-	certSrv.GetEntityById(supplierCertAppendId, &supplierCertAppendEntity)
+	srv := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	var annualEntity annualaudit.OilAnnualAudit
+	srv.GetEntityById(annualId, &annualEntity)
 	cols := []string{
 		"Id",
 		"Status",
 	}
 	//进入此步骤,记录在数据库中
-	supplierCertAppendEntity.Status = suppliercert.STOREING_STATUS //待入库
-	certSrv.UpdateEntityByIdCols(supplierCertAppendId, supplierCertAppendEntity, cols)
+	annualEntity.Status = suppliercert.STOREING_STATUS //待入库
+	srv.UpdateEntityByIdCols(annualId, annualEntity, cols)
 
 	//查出入库审批的人员
 	stepCode := workflow.PROF_REGULATION //待入库(企业法规处)
@@ -248,18 +284,18 @@ func (this *OilAnnualListenerController) GetStorageAuditor() {
 // @router /workflow-end [get]
 func (this *OilAnnualListenerController) WorkflowEndAudit() {
 	businessKey := this.GetString("businessKey")
-	supplierCertAppendId := strings.Split(businessKey, "-")[0]
-	certSrv := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
-	var supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend
-	certSrv.GetEntityById(supplierCertAppendId, &supplierCertAppendEntity)
+	annualId := strings.Split(businessKey, "-")[0]
+	srv := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	var annualEntity annualaudit.OilAnnualAudit
+	srv.GetEntityById(annualId, &annualEntity)
 
 	cols := []string{
 		"Id",
 		"Status",
 	}
 	//进入此步骤,记录在数据库中
-	supplierCertAppendEntity.Status = suppliercert.STORE_STATUS //已入库
-	certSrv.UpdateEntityByIdCols(supplierCertAppendId, supplierCertAppendEntity, cols)
+	annualEntity.Status = suppliercert.STORE_STATUS //已入库
+	srv.UpdateEntityByIdCols(annualId, annualEntity, cols)
 
 	this.Data["json"] = 1
 	this.ServeJSON()
@@ -271,19 +307,31 @@ func (this *OilAnnualListenerController) WorkflowEndAudit() {
 // @router /approval-refuse [get]
 func (this *OilAnnualListenerController) ApprovalRefuse() {
 	businessKey := this.GetString("businessKey")
-	supplierCertAppendId := strings.Split(businessKey, "-")[0]
-	certSrv := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
-	var supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend
-	certSrv.GetEntityById(supplierCertAppendId, &supplierCertAppendEntity)
+	annualId := strings.Split(businessKey, "-")[0]
+	srv := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	var annualEntity annualaudit.OilAnnualAudit
+	srv.GetEntityById(annualId, &annualEntity)
 
 	cols := []string{
 		"Id",
 		"Status",
 	}
 	//进入此步骤,记录在数据库中
-	supplierCertAppendEntity.Status = suppliercert.DRAFT_STATUS //重置为草稿状态
-	certSrv.UpdateEntityByIdCols(supplierCertAppendId, supplierCertAppendEntity, cols)
+	annualEntity.Status = suppliercert.DRAFT_STATUS //重置为草稿状态
+	srv.UpdateEntityByIdCols(annualId, annualEntity, cols)
+
+	// 获取准入资质信息:
+	//supplierCertSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
+	//var supplierCertEntity suppliercert.OilSupplierCert
+	//supplierCertSrv.GetEntityById(annualEntity.CerId, &supplierCertEntity)
+	//supplierSrv := supplier.GetOilSupplierService(utils.DBE)
+	//var supplierEntity supplier.OilSupplier
+	//supplierSrv.GetEntityById(annualEntity.SupplierId, &supplierEntity)
+
+	// 发送驳回通知短信
+	//this.AuditRejectNotice(supplierCertEntity, supplierEntity)
 
+	// TODO 驳回后原工作流的处理, 新工作流的处理
 	this.Data["json"] = 1
 	this.ServeJSON()
 }
@@ -292,17 +340,17 @@ func (this *OilAnnualListenerController) ApprovalRefuse() {
 // @Description 审核未通过短信通知
 // @Success	200	{object}
 // @router /audit-reject-notice/:id [post]
-func (this *OilAnnualListenerController) AuditRejectNotice(supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend, supplierEntity supplier.OilSupplier) {
+func (this *OilAnnualListenerController) AuditRejectNotice(supplierCertEntity suppliercert.OilSupplierCert, supplierEntity supplier.OilSupplier) {
 	toMobile := supplierEntity.Mobile
 	bFlag := ""
-	if supplierCertAppendEntity.AppendType == "01" {
+	if supplierCertEntity.SupplierTypeCode == "01" {
 		bFlag = "物资类"
-	} else if supplierCertAppendEntity.AppendType == "02" {
+	} else if supplierCertEntity.SupplierTypeCode == "02" {
 		bFlag = "基建类"
 	} else {
 		bFlag = "服务类"
 	}
 	msg := "您的" + bFlag + "增项审核未通过,请及时查看!"
 	msgService := msg2.GetMsgService(utils.DBE)
-	msgService.HandleMsg(toMobile, msg, "5-1", supplierCertAppendEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertAppendEntity.CreateUserId), this.User.Username)
+	msgService.HandleMsg(toMobile, msg, "5-1", supplierCertEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertEntity.CreateUserId), this.User.Username)
 }

+ 15 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/annualaudit.go

@@ -1809,4 +1809,19 @@ func (this *AnnualAuditController) AddAppChange() {
 		this.Data["json"] = &errinfo
 		this.ServeJSON()
 	}
+}
+
+// @Title 交费用户确认交费
+// @Description 交费用户确认交费
+// @Success 200 {object} controllers.Request
+// @router /update-pay-status/:id [post]
+func (this *AnnualAuditController) UpdatePayStatus() {
+	certId := this.Ctx.Input.Param(":id")
+	supplierCertSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
+	var supplierCertEntity suppliercert.OilSupplierCert
+	supplierCertSrv.GetEntityById(certId, &supplierCertEntity)
+
+	// PayType = 2
+	//TODO SrcId获取表id,更新isPay状态为1和主表Status状态:CONFIRM_PAYED_STATUS(11)
+
 }

+ 15 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -1813,3 +1813,18 @@ func (this *OilSupplierCertController) UpdateIsRestrict() {
 		this.ServeJSON()
 	}
 }
+
+// @Title 交费用户确认交费
+// @Description 交费用户确认交费
+// @Success 200 {object} controllers.Request
+// @router /update-pay-status/:id [post]
+func (this *OilSupplierCertController) UpdatePayStatus() {
+	certId := this.Ctx.Input.Param(":id")
+	supplierCertSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
+	var supplierCertEntity suppliercert.OilSupplierCert
+	supplierCertSrv.GetEntityById(certId, &supplierCertEntity)
+
+	// PayType = 1
+	//TODO SrcId获取表id,更新isPay状态为1和主表Status状态:CONFIRM_PAYED_STATUS(11)
+
+}

+ 36 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertAppendListener.go

@@ -2,10 +2,13 @@ package oilsupplier
 
 import (
 	msg2 "dashoo.cn/backend/api/business/msg"
+	"dashoo.cn/backend/api/business/oilsupplier/oilcostmanage"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
+	"dashoo.cn/backend/api/business/paymentinfo"
 	"encoding/json"
 	"strconv"
 	"strings"
+	"time"
 
 	"dashoo.cn/backend/api/business/auditsetting"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
@@ -227,7 +230,31 @@ func (this *OilSupplierCertAppendListenerController) GetPrePayer() {
 	supplierCertAppendEntity.Status = suppliercert.PAYING_AUDIT_STATUS //待缴费
 	certSrv.UpdateEntityByIdCols(supplierCertAppendId, supplierCertAppendEntity, cols)
 
-	//创建人即为交费的人员 TODO 取值可能有问题
+	// 增项审批通过且需要交费, 创建交费信息
+	supplierSrv := supplier.GetOilSupplierService(utils.DBE)
+	var supplierEntity supplier.OilSupplier
+	supplierSrv.GetEntityById(supplierCertAppendEntity.SupplierId, &supplierEntity)
+
+	paySvc := paymentinfo.GetPaymentService(utils.DBE)
+	var Amount float64
+	costSvc := oilcostmanage.GetOilCostManageService(utils.DBE)
+	Amount = costSvc.GetAmount("APPEND", supplierCertAppendEntity.AppendType)
+	var payInfo paymentinfo.OilPaymentInfo
+	payInfo.SrcId = supplierCertAppendEntity.Id
+	payInfo.SupplierId = supplierCertAppendEntity.SupplierId
+	payInfo.SupplierCertId = supplierCertAppendEntity.SupplierCertId
+	payInfo.USCCode = supplierEntity.CommercialNo
+	payInfo.SupplierName = supplierEntity.SupplierName
+	payInfo.PayType = "3"
+	payInfo.IsPay = "0"
+	payInfo.IsInvoice = "0"
+	payInfo.Amount = strconv.FormatFloat(Amount, 'E', -1, 64)
+	payInfo.CreateUserId = supplierCertAppendEntity.CreateUserId
+	payInfo.CreateBy = supplierCertAppendEntity.CreateBy
+	payInfo.CreateOn = time.Now()
+	paySvc.InsertEntity(&payInfo)
+
+	//创建人即为交费的人员
 	approverIds := supplierCertAppendEntity.CreateUserId
 	this.Data["json"] = approverIds
 	this.ServeJSON()
@@ -306,6 +333,13 @@ func (this *OilSupplierCertAppendListenerController) ApprovalRefuse() {
 	supplierCertAppendEntity.Status = suppliercert.DRAFT_STATUS //重置为草稿状态
 	certSrv.UpdateEntityByIdCols(supplierCertAppendId, supplierCertAppendEntity, cols)
 
+	//supplierSrv := supplier.GetOilSupplierService(utils.DBE)
+	//var supplierEntity supplier.OilSupplier
+	//supplierSrv.GetEntityById(supplierCertAppendEntity.SupplierId, &supplierEntity)
+	// 发送驳回通知短信
+	//this.AuditRejectNotice(supplierCertAppendEntity, supplierEntity)
+
+	// TODO 驳回后原工作流的处理, 新工作流的处理
 	this.Data["json"] = 1
 	this.ServeJSON()
 }
@@ -314,7 +348,7 @@ func (this *OilSupplierCertAppendListenerController) ApprovalRefuse() {
 // @Description 审核未通过短信通知
 // @Success	200	{object}
 // @router /audit-reject-notice/:id [post]
-func (this *OilSupplierCertListenerController) AppendAuditRejectNotice(supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend, supplierEntity supplier.OilSupplier) {
+func (this *OilSupplierCertAppendListenerController) AuditRejectNotice(supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend, supplierEntity supplier.OilSupplier) {
 	toMobile := supplierEntity.Mobile
 	bFlag := ""
 	if supplierCertAppendEntity.AppendType == "01" {

+ 30 - 5
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertListener.go

@@ -2,10 +2,13 @@ package oilsupplier
 
 import (
 	msg2 "dashoo.cn/backend/api/business/msg"
+	"dashoo.cn/backend/api/business/oilsupplier/oilcostmanage"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
+	"dashoo.cn/backend/api/business/paymentinfo"
 	"encoding/json"
 	"strconv"
 	"strings"
+	"time"
 
 	"dashoo.cn/backend/api/business/auditsetting"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
@@ -209,10 +212,6 @@ func (this *OilSupplierCertListenerController) CheckNeedConcentrateAudit() {
 	var supplierCertEntity suppliercert.OilSupplierCert
 	certSrv.GetEntityById(supplierCertId, &supplierCertEntity)
 
-	if supplierCertEntity.SupplierTypeCode != "01" {
-		panic("准入类别错误!请联系管理员!")
-	}
-
 	// 需要集中评审的准入类型
 	var concentrateInStyleList []string
 	concentrateInStyleList = append(concentrateInStyleList, suppliercert.PINGSHEN)
@@ -331,7 +330,31 @@ func (this *OilSupplierCertListenerController) GetPrePayer() {
 	supplierCertEntity.Status = suppliercert.PAYING_AUDIT_STATUS //待缴费
 	certSrv.UpdateEntityByIdCols(supplierCertId, supplierCertEntity, cols)
 
-	//创建人即为交费的人员 TODO 取值可能有问题
+	// 准入审批通过且需要交费, 创建交费信息
+	supplierSrv := supplier.GetOilSupplierService(utils.DBE)
+	var supplierEntity supplier.OilSupplier
+	supplierSrv.GetEntityById(supplierCertEntity.SupplierId, &supplierEntity)
+
+	paySvc := paymentinfo.GetPaymentService(utils.DBE)
+	var Amount float64
+	costSvc := oilcostmanage.GetOilCostManageService(utils.DBE)
+	Amount = costSvc.GetAmount("ZHUNRU", supplierCertEntity.SupplierTypeCode)
+	var payInfo paymentinfo.OilPaymentInfo
+	payInfo.SrcId = supplierCertEntity.Id
+	payInfo.SupplierId = supplierCertEntity.SupplierId
+	payInfo.SupplierCertId = supplierCertEntity.Id
+	payInfo.USCCode = supplierEntity.CommercialNo
+	payInfo.SupplierName = supplierEntity.SupplierName
+	payInfo.PayType = "1"
+	payInfo.IsPay = "0"
+	payInfo.IsInvoice = "0"
+	payInfo.Amount = strconv.FormatFloat(Amount, 'E', -1, 64)
+	payInfo.CreateUserId = supplierCertEntity.CreateUserId
+	payInfo.CreateBy = supplierCertEntity.CreateBy
+	payInfo.CreateOn = time.Now()
+	paySvc.InsertEntity(&payInfo)
+
+	//创建人即为交费的人员
 	approverIds := supplierCertEntity.CreateUserId
 	this.Data["json"] = approverIds
 	this.ServeJSON()
@@ -414,6 +437,8 @@ func (this *OilSupplierCertListenerController) ApprovalRefuse() {
 	certSrv.UpdateEntityByIdCols(supplierCertId, supplierCertEntity, cols)
 	// 发送驳回通知短信
 	//this.AuditRejectNotice(supplierCertEntity, supplierEntity)
+
+	// TODO 驳回后原工作流的处理, 新工作流的处理
 	this.Data["json"] = 1
 	this.ServeJSON()
 }

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

@@ -1581,3 +1581,18 @@ func (this *OilSupplierCertAppendController) DeleteNewFile() {
 		this.ServeJSON()
 	}
 }
+
+// @Title 交费用户确认交费
+// @Description 交费用户确认交费
+// @Success 200 {object} controllers.Request
+// @router /update-pay-status/:id [post]
+func (this *OilSupplierCertAppendController) UpdatePayStatus() {
+	certId := this.Ctx.Input.Param(":id")
+	supplierCertSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
+	var supplierCertEntity suppliercert.OilSupplierCert
+	supplierCertSrv.GetEntityById(certId, &supplierCertEntity)
+
+	// PayType = 3
+	// TODO SrcId获取表id,更新isPay状态为1和主表Status状态:CONFIRM_PAYED_STATUS(11)
+
+}

+ 7 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/annualaudit.js

@@ -169,5 +169,12 @@ export default {
       url: '/annualaudit/deleteaddfile/' + Id,
       method: 'delete'
     })
+  },
+  updatePayStatus  (id, params, myAxios) {
+    return myAxios({
+      url: 'annualaudit/update-pay-status/' + id,
+      method: 'post',
+      params: params
+    })
   }
 }

+ 7 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/supplierappend.js

@@ -89,5 +89,12 @@ export default {
       url: '/suppliercertappend/deletenewfile/' + entityId,
       method: 'delete'
     })
+  },
+  updatePayStatus  (id, params, myAxios) {
+    return myAxios({
+      url: 'suppliercertappend/update-pay-status/' + id,
+      method: 'post',
+      params: params
+    })
   }
 }

+ 1 - 1
src/dashoo.cn/frontend_web/src/api/oilsupplier/suppliercert.js

@@ -162,7 +162,7 @@ export default {
   },
   updatePayStatus  (id, params, myAxios) {
     return myAxios({
-      url: 'suppliercert/separate-audit/' + id,
+      url: 'suppliercert/update-pay-status/' + id,
       method: 'post',
       params: params
     })

+ 101 - 23
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -5,18 +5,6 @@
       <el-breadcrumb-item :to="{ path: '/oilsupplier/supplier/techlist' }">服务类列表</el-breadcrumb-item>
       <el-breadcrumb-item>服务类供方准入评审表</el-breadcrumb-item>
     </el-breadcrumb>
-
-    <!--<no-ssr>
-      <div>
-        <float-img-btn ref="floatBtn" text="下一步" :itemWidth="58" :itemHeight="30" :coefficientHeight="0.8"
-          @onFloatBtnClicked="nextTab">
-        </float-img-btn>
-        <float-img-btn ref="floatBtn" text="上一步" :itemWidth="58" :itemHeight="30" :coefficientHeight="0.85"
-          @onFloatBtnClicked="backTab" v-if="certId">
-        </float-img-btn>
-      </div>
-    </no-ssr>-->
-
     <el-card class="box-card">
       <div slot="header">
         <span>
@@ -391,12 +379,12 @@
                 </el-option>
               </el-select>
               <!--<el-input ref="selectAuditer"-->
-                        <!--readonly-->
-                        <!--v-model="auditerName"-->
-                        <!--placeholder="请选择初审人">-->
-                <!--<el-button slot="append"-->
-                           <!--icon="el-icon-search"-->
-                           <!--@click="chooseAuditorShow"></el-button>-->
+              <!--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="复审人员">
@@ -444,7 +432,7 @@
                    @click="dialogVisible = false">取 消</el-button>
         <el-button size="mini"
                    type="primary"
-                   @click="AuditEntity" :loading="loading">确定</el-button>
+                   @click="secondaryUnitSubmitApply" :loading="loading">确定</el-button>
       </span>
     </el-dialog>
     <el-dialog title="提交"
@@ -486,7 +474,7 @@
                    @click="dialogVisibleCom = false">取 消</el-button>
         <el-button size="mini"
                    type="primary"
-                   @click="SubpEntity" :loading="loading">确定</el-button>
+                   @click="companySubmitToSecUnitSeparateMakeSure" :loading="loading">确定</el-button>
       </span>
     </el-dialog>
 
@@ -1541,7 +1529,6 @@ export default {
       this.userOptions = []
       let auditstepcode = 'FIRST_TRIAL' // 初审人
       api.getFirAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
-        console.log(res)
         this.firOptions = res.data.item
       }).catch(err => {
         console.error(err)
@@ -1563,7 +1550,6 @@ export default {
       this.chooseAuditorVisible = true
     },
     commitAudit () {
-      console.log(this.formData)
       apiCert.checkSupplierCertCanSubmit(this.formData.Id, this.$axios)
         .then(res => {
           if (res.data.code === 0) {
@@ -1631,7 +1617,6 @@ export default {
         'ThirdAudit': this.selectDept, // this.majorDept[this.majorDept.length - 1] 专业处室部门id
         'AuditRemark': this.auditform.AuditRemark
       }
-      console.log(params)
       apiCert.unitAuditEntity(this.certId, params, this.$axios).then(res => {
         if (res.data.code === 0) {
           // 保存成功后,初始化数据,变成修改
@@ -1696,6 +1681,99 @@ export default {
         })
     },
 
+    secondaryUnitSubmitApply (val) {
+      if (!this.auditer) {
+        this.$message({
+          type: 'warning',
+          message: '请选择审批人!'
+        })
+        return false
+      }
+      if (!this.fushenauditer) {
+        this.$message({
+          type: 'warning',
+          message: '请选择复审人!'
+        })
+        return false
+      }
+      if (!this.selectDept) {
+        this.$message({
+          type: 'warning',
+          message: '请选择专业处室!'
+        })
+        return false
+      }
+      if (!this.userOptions || this.userOptions.length === 0) {
+        this.$message({
+          type: 'warning',
+          message: '该专业科室未配置接收人!'
+        })
+        return false
+      }
+      this.loading = true
+      this.applyLoading = true
+      let params = {
+        'FirstAudit': this.auditer,
+        'SecondAudit': this.fushenauditer,
+        'ThirdAudit': this.selectDept, // this.majorDept[this.majorDept.length - 1] 专业处室部门id
+        'AuditRemark': this.auditform.AuditRemark
+      }
+      apiCert.unitAuditEntity(this.certId, params, this.$axios).then(res => {
+        if (res.data.code === 0) {
+          // 保存成功后,初始化数据,变成修改
+          this.initDatas()
+          this.dialogVisible = false
+          this.$message({
+            type: 'success',
+            message: res.data.message
+          })
+        } else {
+          this.$message({
+            type: 'warning',
+            message: res.data.message
+          })
+        }
+        this.applyLoading = false
+        this.loading = false
+      }).catch(err => {
+        console.error(err)
+      })
+    },
+    companySubmitToSecUnitSeparateMakeSure () {
+      if (this.orgauditOptions == null || this.orgauditOptions.length === 0) {
+        this.$message({
+          type: 'warning',
+          message: '该单位没有分办人员!'
+        })
+        return
+      }
+      this.applyLoading = true
+      this.auditform.UnitId = this.UnitOrg
+      this.auditform.CertId = this.certId
+      this.loading = true
+      console.log('企业用户提交参数', this.auditform)
+      apiCert.companyAuditEntity(this.certId, this.auditform, this.$axios)
+        .then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.initDatas()
+            this.dialogVisibleCom = false
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.loading = false
+        })
+        .catch(err => {
+          console.error(err)
+        })
+    },
     jstimehandle (val) {
       if (val === '') {
         return '----'

+ 55 - 63
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/goodsedit.vue

@@ -8,7 +8,7 @@
     <el-card class="box-card">
       <div slot="header">
         <span>
-          <i class="icon icon-table2"></i> 审批
+          <i class="icon icon-table2"></i> 审批-{{auditBtn}}
         </span>
         <span style="float: right;">
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick()" v-if="auditBtn && parseInt(this.formData.Status) === 1">初审</el-button>
@@ -18,6 +18,7 @@
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="concentrateAuditClick()" v-if="auditBtn && parseInt(this.formData.Status) === 5">集中评审</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="secUnitSeparateAuditClick()" v-if="parseInt(this.formData.Status) === 10">分办</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="paySureClick()" v-if="auditBtn && parseInt(this.formData.Status) === 6">交费</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" v-if="parseInt(this.formData.Status) === 11">已确认交费</el-button>
           <!--<router-link>-->
           <el-button type="primary" size="mini" style="margin-left: 8px" onclick="window.history.go(-1)">返回</el-button>
           <!--</router-link>-->
@@ -170,15 +171,6 @@
           </el-card>
         </el-tab-pane>
 
-        <!--<el-tab-pane label="审批历史" v-if="this.formData.AuditIndex > 0 ">-->
-          <!--<el-card class="box-card" style="margin-top: 20px">-->
-            <!--<div slot="header" class="clearfix">-->
-              <!--<span>审批历史</span>-->
-            <!--</div>-->
-            <!--<wf-back-history ref="WfBackHistory" :entryinfo="backhistroy"></wf-back-history>-->
-          <!--</el-card>-->
-        <!--</el-tab-pane>-->
-
       </el-tabs>
     </el-card>
     <el-dialog :title="atitle" :visible.sync="dialogMakeSure">
@@ -1204,59 +1196,6 @@
         this.dialogConcentrateAuditVisible = true
         this.radioChange()
       },
-      paySureClick () {
-        console.log('交费按钮')
-        this.$confirm('是否确认交费', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          var payRes = this.payMakeSure()
-          if (payRes) {
-            this.$message({
-              type: 'success',
-              message: '确认成功!'
-            })
-          } else {
-            this.$message({
-              type: 'success',
-              message: '确认失败!'
-            })
-          }
-        }).catch(() => {
-          this.$message({
-            type: 'info',
-            message: '已取消'
-          });
-        });
-      },
-      payMakeSure () {
-        console.log('交费结果确认')
-        this.loading = true
-        let params = {
-          payStatus: this.payStatus
-        }
-        console.log('交费结果确认提交参数:', params)
-        apiCert.updatePayStatus(this.certId, params, this.$axios).then(res => {
-          if (res.data.code === 0) {
-            console.log('交费成功')
-            this.initDatas()
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            })
-          } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            })
-          }
-          this.dialogSecUnitSeparateVisible = false
-          this.loading = false
-        }).catch(err => {
-          console.error(err)
-        })
-      },
       concentrateAuditEntityMakeSure () {
         console.log('集中评审提交审核结果')
         let checkRes = this.concentrateAuditParamsCheck()
@@ -1309,6 +1248,59 @@
         }
         return true
       },
+      paySureClick () {
+        console.log('交费按钮')
+        this.$confirm('是否确认交费', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let payRes = this.payMakeSure()
+          if (payRes) {
+            this.$message({
+              type: 'success',
+              message: '确认成功!'
+            })
+          } else {
+            this.$message({
+              type: 'success',
+              message: '确认失败!'
+            })
+          }
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          })
+        })
+      },
+      payMakeSure () {
+        console.log('交费结果确认')
+        this.loading = true
+        let params = {
+          payStatus: this.payStatus
+        }
+        console.log('交费结果确认提交参数:', params)
+        apiCert.updatePayStatus(this.certId, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('交费成功')
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.dialogSecUnitSeparateVisible = false
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       // 审核通过
       makeSure () {
         if (this.shenheForm.SuccessStatus === 1) {

+ 462 - 108
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/techedit.vue

@@ -8,23 +8,19 @@
     <el-card class="box-card">
       <div slot="header">
         <span>
-          <i class="icon icon-table2"></i> 审批
+          <i class="icon icon-table2"></i> 审批-{{auditBtn}}
         </span>
         <span style="float: right;">
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">提交专业审批</el-button>-->
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-if="auditBtn && this.formData.Status != '6'">{{auditTitle}}</el-button>-->
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity()"
-            v-if="auditBtn && this.formData.Status == '1'">初审</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity()"
-            v-if="auditBtn && this.formData.Status == '2'">复审</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity()"
-            v-if="auditBtn && this.formData.Status == '3'">提交专业审核</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity()"
-            v-if="auditBtn && this.formData.Status == '4'">专业审核</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity('5')"
-            v-if="auditBtn && this.formData.Status == '5'">集中评审</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity()"
-            v-if="this.formData.Status == '10'">分办</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick()" v-if="auditBtn && this.formData.Status == '1'">初审</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick()" v-if="auditBtn && this.formData.Status == '2'">复审</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="businessOfficeSeparateAuditClick()" v-if="auditBtn && this.formData.Status == '3'">提交专业审核</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick()" v-if="auditBtn && this.formData.Status == '4'">专业审核</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="concentrateAuditClick()" v-if="auditBtn && this.formData.Status == '5'">集中评审</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="secUnitSeparateAuditClick()" v-if="this.formData.Status == '10'">分办</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="paySureClick()" v-if="parseInt(this.formData.Status) === 6">交费</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" v-if="parseInt(this.formData.Status) === 11">已确认交费</el-button>
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>-->
           <el-button type="primary" size="mini" style="margin-left: 8px" onclick="window.history.go(-1)">返回</el-button>
         </span>
@@ -217,6 +213,46 @@
         <el-button type="primary" size="small" @click="makeSure()" :loading="loading">确 定</el-button>
       </div>
     </el-dialog>
+    <!--分办之后的审批 包含:初审 复审 专业审核 集中评审-->
+    <el-dialog :title="atitle" :visible.sync="dialogCommonAuditMakeSureVisible">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <el-form-item label="审核状态">
+          <template>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1" @change="radioChange">通过</el-radio>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2" @change="radioChange">退回</el-radio>
+          </template>
+        </el-form-item>
+        <el-form-item porp="AuditorRemark" label="意见"
+                      :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder"
+                    minlength="20"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogCommonAuditMakeSureVisible = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="commonAuditMakeSure()" :loading="loading">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!--集中评审-->
+    <el-dialog :title="atitle" :visible.sync="dialogConcentrateAuditVisible">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <el-form-item label="审核状态">
+          <template>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1" @change="radioChange">通过</el-radio>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2" @change="radioChange">退回</el-radio>
+          </template>
+        </el-form-item>
+        <el-form-item porp="AuditorRemark" label="意见"
+                      :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder"
+                    minlength="20"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogConcentrateAuditVisible = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="concentrateAuditEntityMakeSure()" :loading="loading">确 定</el-button>
+      </div>
+    </el-dialog>
     <el-dialog title="审核" :visible.sync="dialogMakeSure2">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
         <el-form-item label="审核状态">
@@ -259,16 +295,12 @@
         <el-button type="primary" size="small" @click="makeSure()" :loading="loading">确 定</el-button>
       </div>
     </el-dialog>
-    <el-dialog title="提交领导审核" :visible.sync="dialogAllocation">
+    <!--业务处室分办提交-->
+    <el-dialog title="提交领导审核" :visible.sync="dialogBusinessOfficeSeparateAuditVisible">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
-        <!-- <el-form-item label="审批人部门">
-          <el-cascader :options="secorgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false"
-            filterable style="width: 100%" @change="auditOrgChange" placeholder="请选择组织">
-          </el-cascader>
-        </el-form-item> -->
         <el-form-item label="审批人">
-          <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 100%" filterable allow-create
-            default-first-option>
+          <el-select ref="selectAuditer" v-model="ProfessionalAudit" 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>
@@ -278,11 +310,12 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top: -25px">
-        <el-button size="small" @click="dialogAllocation = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="makeSure()" :loading="loading">确 定</el-button>
+        <el-button size="small" @click="dialogBusinessOfficeSeparateAuditVisible = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="businessOfficeSeparateAuditMakeSure()" :loading="loading">确 定</el-button>
       </div>
     </el-dialog>
-    <el-dialog title="提交初审" :visible.sync="dialogVisible" width="520px">
+    <!--二级单位直接提交至初审-->
+    <el-dialog title="提交初审" :visible.sync="dialogSecUnitSeparateVisible" width="520px">
       <el-form ref="searchForm" label-width="100px">
         <el-row>
           <el-col :span="24">
@@ -293,11 +326,8 @@
               </el-radio-group>
             </el-form-item>
           </el-col>
-          <el-col :span="24" v-if="shenheForm.SuccessStatus == 1">
+          <el-col :span="24" v-if="parseInt(shenheForm.SuccessStatus) === 1">
             <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-select ref="selectAuditer"
                          v-model="auditer"
                          placeholder="请选择初审人"
@@ -320,8 +350,8 @@
                 </el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="专业处室">
-              <el-select  v-model="selectDept" filterable
+            <el-form-item label="专业处室" v-if="inStyle != '2' && inStyle != '4' && inStyle != '6' && inStyle != '3' ">
+              <el-select  v-model="selectDept" filterable disabled
                           placeholder="请选择" style="width: 100%" @change="changeOrgUnit">
                 <el-option  v-for="item in allorgunitOptions" :key="item.Id" :label="item.Fullname"
                             :value="item.Id">
@@ -329,13 +359,13 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="24" v-if="shenheForm.SuccessStatus == 1">
+          <el-col :span="24" v-if="parseInt(shenheForm.SuccessStatus) === 1">
             <el-form-item label="备注">
               <el-input v-model="auditform.AuditRemark" type="textarea" placeholder="请输入备注内容">
               </el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="24" v-if="shenheForm.SuccessStatus == 0">
+          <el-col :span="24" v-if="parseInt(shenheForm.SuccessStatus) === 0">
             <el-form-item label="退回原因">
               <el-input v-model="backRemark" type="textarea" placeholder="请输入退回原因,不少于5个字!">
               </el-input>
@@ -344,8 +374,8 @@
         </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
-        <el-button size="mini" type="primary" @click="makeSure()" :loading="loading">确定</el-button>
+        <el-button @click="dialogSecUnitSeparateVisible = false">取 消</el-button>
+        <el-button type="primary" @click="secUnitSeparateAuditMakeSure()" :loading="loading">确定</el-button>
       </span>
     </el-dialog>
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
@@ -398,7 +428,7 @@
     },
     name: 'oilsupplierEdit',
 
-    data() {
+    data () {
       return {
         firOptions: [],
         loading: false,
@@ -418,25 +448,29 @@
         secorgtreelist: [],
         allorgunitOptions: [],
         selectDept: '',
-        auditer: "",
+        auditer: '',
         auditerName: '',
-        fushenauditer: '', //复审人员
+        fushenauditer: '', // 复审人员
+        ProfessionalAudit: '', // 专业审核人员
         majorDept: [],
         auditform: {
-          FirstAuditName: "",
-          SecondAudit: "",
-          ThirdAudit: "",
-          AuditRemark: ""
+          FirstAuditName: '',
+          SecondAudit: '',
+          ThirdAudit: '',
+          AuditRemark: ''
         },
         dialogVisible: false,
         dialogMakeSure: false,
         dialogMakeSure2: false,
         dialogAllocation: false,
         chooseAuditorVisible: false,
+        dialogCommonAuditMakeSureVisible: false,
+        dialogBusinessOfficeSeparateAuditVisible: false,
+        dialogConcentrateAuditVisible: false,
+        dialogSecUnitSeparateVisible: false,
         add_flat: false,
-        delete_flat:true,
+        delete_flat: true,
         aduitlabel: '审核人',
-        auditer: '',
         auditTitle: '审批',
         atitle: '审核',
         auditBtn: false,
@@ -562,7 +596,7 @@
         }
       }
     },
-    created() {
+    created () {
       this.companyid = this.authUser.Profile.Superior
       this.serviceId = this.$route.params.opera + ''
       this.certId = this.$route.query.certid + ''
@@ -575,9 +609,9 @@
       this.getDictOptions()
       this.initDatas()
       // this.changeOrgUnit(this.selectDept)
-      //this.getpreorgtreelist()
-      //this.getorgtreelist()
-      //this.getorgtreelistbydeptid()
+      // this.getpreorgtreelist()
+      // this.getorgtreelist()
+      // this.getorgtreelistbydeptid()
     },
     methods: {
       radioChange () {
@@ -607,12 +641,12 @@
             }
             this.shenheForm.AuditorRemark = ''
           }
-        }else {
-          if (this.shenheForm.SuccessStatus === 1){
+        } else {
+          if (this.shenheForm.SuccessStatus === 1) {
             this.textplaceholder = '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)'
-          } else{
-              this.textplaceholder = '退回意见不能少于5个字'
-            }
+          } else {
+            this.textplaceholder = '退回意见不能少于5个字'
+          }
         }
       },
       changeOrgUnit (val) {
@@ -623,41 +657,41 @@
           console.error(err)
         })
       },
-      equipmentdialog() {
+      equipmentdialog () {
         this.$refs['equipmentList'].showDialog()
       },
-      performancedialog() {
+      performancedialog () {
         this.$refs['performanceList'].showDialog()
       },
-      patentdialog() {
+      patentdialog () {
         this.$refs['patentList'].showDialog()
       },
-      winningdialog() {
+      winningdialog () {
         this.$refs['winningList'].showDialog()
       },
 
-      initDatas() {
+      initDatas () {
         if (this.formData.Id) {
           api.getEntityAndCert(this.certId, this.$axios).then(res => {
             this.formData = res.data
-            this.$refs["TechInfo"].CityAry = [];
-            this.$refs["TechInfo"].CityAry.push(this.formData.Province);
-            this.$refs["TechInfo"].CityAry.push(this.formData.City);
-            this.$refs["TechInfo"].CityAry.push(this.formData.Street);
-            this.$refs["TechInfo"].LinkCityAry = [];
-            this.$refs["TechInfo"].LinkCityAry.push(this.formData.LinkProvince);
-            this.$refs["TechInfo"].LinkCityAry.push(this.formData.LinkCity);
-            this.$refs["TechInfo"].LinkCityAry.push(this.formData.LinkStreet);
-            if (this.formData.CredentialFlag != "") {
-                this.$refs["TechInfo"].showorhid(this.formData.CredentialFlag)
+            this.$refs['TechInfo'].CityAry = []
+            this.$refs['TechInfo'].CityAry.push(this.formData.Province)
+            this.$refs['TechInfo'].CityAry.push(this.formData.City)
+            this.$refs['TechInfo'].CityAry.push(this.formData.Street)
+            this.$refs['TechInfo'].LinkCityAry = []
+            this.$refs['TechInfo'].LinkCityAry.push(this.formData.LinkProvince)
+            this.$refs['TechInfo'].LinkCityAry.push(this.formData.LinkCity)
+            this.$refs['TechInfo'].LinkCityAry.push(this.formData.LinkStreet)
+            if (this.formData.CredentialFlag != '') {
+              this.$refs['TechInfo'].showorhid(this.formData.CredentialFlag)
             }
             if (this.formData.Status != 4) {
-                this.delete_flat = false
+              this.delete_flat = false
             }
             if ((this.formData.Status > 0) && (this.formData.Status != 4)) {
               this.delete_flat = false
             }
-            if ((this.formData.Status > 0) &&(this.authUser.Profile.IsCompanyUser==1)) {
+            if ((this.formData.Status > 0) && (this.authUser.Profile.IsCompanyUser == 1)) {
               this.delete_flat = false
             }
             this.formDataCert.WorkerTotal = this.formData.WorkerTotal
@@ -714,7 +748,8 @@
               } else {
                 this.shenheForm.AuditorRemark = '集中评审通过。'
               }
-
+            } else if (this.formData.Status === '6') {
+              this.auditstepcode = 'PAYING_FEE'
             }
 
             this.$refs['equipmentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
@@ -729,29 +764,29 @@
           })
         }
       },
-      chooseAuditorShow() {
-        this.$refs["chooseAuditor"].getorgtreelist(
+      chooseAuditorShow () {
+        this.$refs['chooseAuditor'].getorgtreelist(
           this.formData.SupplierTypeCode
-        );
-        this.chooseAuditorVisible = true;
+        )
+        this.chooseAuditorVisible = true
       },
-      setAuditer(val, name) {
-        this.auditer = val;
-        this.auditerName = name;
-        this.chooseAuditorVisible = false;
+      setAuditer (val, name) {
+        this.auditer = val
+        this.auditerName = name
+        this.chooseAuditorVisible = false
         this.auditOrgChang(this.auditer)
       },
-      auditOrgChang(val) {
-        let auditstepcode = "SECOND_TRIAL";
+      auditOrgChang (val) {
+        let auditstepcode = 'SECOND_TRIAL'
         api.getAuditerByFirst(this.auditer, auditstepcode, this.$axios)
           .then(res => {
             this.secauditerOptions = res.data.item
           })
           .catch(err => {
-            console.error(err);
-          });
+            console.error(err)
+          })
       },
-      isAccess() {
+      isAccess () {
         this.auditBtn = false
         let params = {
           id: this.formData.CertId,
@@ -765,7 +800,7 @@
         })
       },
 
-      getDictOptions() {
+      getDictOptions () {
         let params = {
           status: this.formData.Status,
           majorAduit: this.formData.ThirdAudit
@@ -774,22 +809,19 @@
           this.dictData = res.data.items
           this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
           this.allorgunitOptions = res.data.items['Allunitorglist']
-          //this.auditerOptions = res.data.items['Auditer']
-          //this.organizeOption = res.data.items['Organizes']
+          // this.auditerOptions = res.data.items['Auditer']
+          // this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
           console.error(err)
         })
       },
 
-
-      getorgtreelist() {
+      getorgtreelist () {
         let _this = this
         let params = {
           IsInnerOrganize: 1
         }
-        _this.$axios.get('organizes/orgalllist', {
-            params
-          })
+        _this.$axios.get('organizes/orgalllist', {params})
           .then(res => {
             _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
           })
@@ -797,14 +829,12 @@
             console.error(err)
           })
       },
-      getorgtreelistbydeptid() {
+      getorgtreelistbydeptid () {
         let _this = this
         let params = {
           IsInnerOrganize: 1
         }
-        _this.$axios.get('organizes/listbydeptid', {
-            params
-          })
+        _this.$axios.get('organizes/listbydeptid', {params})
           .then(res => {
             _this.secorgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
           })
@@ -812,7 +842,7 @@
             console.error(err)
           })
       },
-      auditOrgChange() {
+      auditOrgChange () {
         let auditstepcode = ''
         if (this.formData.Status === '1') {
           auditstepcode = 'SECOND_TRIAL'
@@ -834,7 +864,7 @@
         })
       },
       // 保存信息
-      saveEntity() {
+      saveEntity () {
         this.$refs['EntityForm'].validate((valid) => {
           if (valid) {
             // this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
@@ -850,11 +880,11 @@
       },
 
       // 保存信息
-      saveCertEntity() {
+      saveCertEntity () {
         this.$refs['SupplierCertEditCompoment'].saveEntity()
       },
 
-      addEntity() {
+      addEntity () {
         this.formData.SupplierTypeCode = '03'
         this.formData.SupplierTypeName = '服务类'
         api.addEntity(this.formData, this.$axios).then(res => {
@@ -878,7 +908,7 @@
         })
       },
 
-      updateEntity() {
+      updateEntity () {
         api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
             // 保存成功后,初始化数据,变成修改
@@ -898,7 +928,7 @@
         })
       },
 
-      CheckCompanyBase() {
+      CheckCompanyBase () {
         if (!this.formData.Id) {
           this.$message({
             type: 'error',
@@ -916,7 +946,7 @@
         return true
       },
       // 企业人员结构情况
-      updateNumberEntity() {
+      updateNumberEntity () {
         if (!this.CheckCompanyBase()) {
           return false
         }
@@ -966,11 +996,336 @@
         }
       },
 
-      allocationBtn() {
+      // 二级单位分办审批会话框 ⬇
+      secUnitSeparateAuditClick (val) {
+        console.log('二级单位分办审批会话框')
+        this.auditOrgChange()
+        this.btnstatus = val
+        this.getFirAuditerByDept()
+        this.changeOrgUnit(this.selectDept)
+        this.dialogSecUnitSeparateVisible = true
+      },
+      // 二级单位分办审批结果确认 ⬇
+      secUnitSeparateAuditMakeSure () {
+        console.log('二级单位分办审批结果确认')
+        this.secUnitSeparateAuditParamsCheck()
+        this.loading = true
+        let params = {
+          FirstAudit: this.auditer,
+          SecondAudit: this.fushenauditer,
+          ThirdAudit: this.selectDept,
+          AuditRemark: this.auditform.AuditRemark
+        }
+        console.log('二级单位分办审批结果提交参数:', params)
+        apiCert.separateAuditEntity(this.certId, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('审批提交,成功返回')
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.dialogSecUnitSeparateVisible = false
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      // 二级单位分办审批参数检查 ⬇
+      secUnitSeparateAuditParamsCheck () {
+        if (this.shenheForm.SuccessStatus === 1) {
+          if (this.auditer === '') {
+            this.$message({
+              type: 'warning',
+              message: '请选择初审人!'
+            })
+            return
+          }
+          if (this.fushenauditer === '') {
+            this.$message({
+              type: 'warning',
+              message: '请选择复审人!'
+            })
+            return
+          }
+          if (![2, 4, 6].includes(parseInt(this.inStyle))) {
+            if (this.userOptions == null || this.userOptions.length === 0) {
+              this.$message({
+                type: 'warning',
+                message: '该专业科室未配置接收人!'
+              })
+              return
+            }
+          }
+          if (this.shenheForm.AuditorRemark.trim().length < 1 && this.formData.Status === '5') {
+            this.$message({
+              type: 'warning',
+              message: '请填写审批意见!'
+            })
+            return
+          }
+          if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3' && this.formData.Status !== '5' && this.formData.Status !== '10') {
+            this.$message({
+              type: 'warning',
+              message: '审批意见不能低于20个字符!'
+            })
+            return false
+          }
+        } else {
+          this.shenheForm.AuditorRemark = this.backRemark
+          if (this.shenheForm.AuditorRemark.trim().length < 5 && this.formData.Status !== '3' && this.formData.Status !== '5') {
+            this.$message({
+              type: 'warning',
+              message: '退回意见不能低于5个字符!'
+            })
+            return
+          }
+          if (this.shenheForm.AuditorRemark.trim().length < 1 && this.formData.Status === '5') {
+            this.$message({
+              type: 'warning',
+              message: '请填写退回意见!'
+            })
+            return false
+          }
+        }
+      },
+      commonAuditClick () {
+        console.log('审批公共会话框')
+        this.dialogCommonAuditMakeSureVisible = true
+        this.radioChange()
+      },
+      commonAuditMakeSure () {
+        console.log('审批结果公共提交')
+        let checkRes = this.commonAuditParamsCheck()
+        console.log(checkRes, '审批结果公共提交')
+        if (!checkRes) {
+          return false
+        }
+        this.loading = true
+        let params = {
+          result: this.shenheForm.SuccessStatus,
+          AuditRemark: this.shenheForm.AuditorRemark
+        }
+        console.log('审批结果提交参数:', params)
+        apiCert.commonAuditEntity(this.certId, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('审批提交,成功返回')
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.dialogCommonAuditMakeSureVisible = false
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      commonAuditParamsCheck () {
+        if (this.shenheForm.SuccessStatus === 1) {
+          if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3' && this.formData.Status !== '5' && this.formData.Status !== '10') {
+            this.$message({
+              type: 'warning',
+              message: '审批意见不能低于20个字符!'
+            })
+            return false
+          }
+          if (this.shenheForm.AuditorRemark.trim().length < 1 && this.formData.Status === '5') {
+            this.$message({
+              type: 'warning',
+              message: '请填写审批意见!'
+            })
+            return false
+          }
+        } else {
+          if (this.shenheForm.AuditorRemark.trim().length < 5 && this.formData.Status !== '3' && this.formData.Status !== '5') {
+            this.$message({
+              type: 'warning',
+              message: '退回意见不能低于5个字符!'
+            })
+            return
+          }
+          if (this.shenheForm.AuditorRemark.trim().length < 1 && this.formData.Status === '5') {
+            this.$message({
+              type: 'warning',
+              message: '请填写退回意见!'
+            })
+            return false
+          }
+        }
+        return true
+      },
+      // 业务处室分办点击
+      businessOfficeSeparateAuditClick (val) {
+        console.log('业务处室接收————分办')
+        this.auditOrgChange()
+        console.log('请求部门结束')
+        this.dialogBusinessOfficeSeparateAuditVisible = true
+      },
+      // 业务处室分办提交
+      businessOfficeSeparateAuditMakeSure () {
+        if (this.ProfessionalAudit === '') {
+          this.$message({
+            type: 'warning',
+            message: '请选择审批人!'
+          })
+          return
+        }
+        this.loading = true
+        let params = {
+          ProfessionalAudit: this.ProfessionalAudit,
+          AuditRemark: this.shenheForm.AuditorRemark
+        }
+        console.log('业务处室专业审批, 提交参数: ', params)
+        apiCert.businessOfficeSeparateAuditEntity(this.certId, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('审批提交,成功返回')
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+            this.dialogBusinessOfficeSeparateAuditVisible = false
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      // 集中评审按钮
+      concentrateAuditClick () {
+        console.log('集中评审按钮')
+        this.dialogConcentrateAuditVisible = true
+        this.radioChange()
+      },
+      concentrateAuditEntityMakeSure () {
+        console.log('集中评审提交审核结果')
+        let checkRes = this.concentrateAuditParamsCheck()
+        if (!checkRes) {
+          return false
+        }
+        this.loading = true
+        let params = {
+          result: this.shenheForm.SuccessStatus,
+          AuditRemark: this.shenheForm.AuditorRemark
+        }
+        apiCert.commonAuditEntity(this.certId, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('审批提交,成功返回')
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+            this.dialogConcentrateAuditVisible = false
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      concentrateAuditParamsCheck () {
+        console.log('集中评审提交参数检查')
+        if (this.shenheForm.SuccessStatus === 1) {
+          if (this.shenheForm.AuditorRemark.trim().length < 1) {
+            this.$message({
+              type: 'warning',
+              message: '请填写审批意见!'
+            })
+            return false
+          }
+        } else {
+          if (this.shenheForm.AuditorRemark.trim().length < 1) {
+            this.$message({
+              type: 'warning',
+              message: '请填写退回意见!'
+            })
+            return false
+          }
+        }
+        return true
+      },
+      // 确认交费点击
+      paySureClick () {
+        console.log('交费按钮')
+        this.$confirm('是否确认交费', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          let payRes = this.payMakeSure()
+          if (payRes) {
+            this.$message({
+              type: 'success',
+              message: '确认成功!'
+            })
+          } else {
+            this.$message({
+              type: 'success',
+              message: '确认失败!'
+            })
+          }
+        }).catch(() => {
+          this.$message({
+            type: 'info',
+            message: '已取消'
+          })
+        })
+      },
+      payMakeSure () {
+        console.log('交费结果确认')
+        this.loading = true
+        let params = {
+          payStatus: this.payStatus
+        }
+        console.log('交费结果确认提交参数:', params)
+        apiCert.updatePayStatus(this.certId, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('交费成功')
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.dialogSecUnitSeparateVisible = false
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      allocationBtn () {
         this.dialogAllocation = true
       },
       // 审核通过
-      makeSure() {
+      makeSure () {
         if (this.shenheForm.SuccessStatus === 1) {
           if (this.formData.Status == '' || this.formData.Status == '0') {
             if (this.auditer === '') {
@@ -1056,7 +1411,7 @@
         this.checkstatus()
       },
 
-      checkstatus() {
+      checkstatus () {
         let params = this.shenheForm
         let audit = {
           auditer: this.auditer,
@@ -1095,7 +1450,7 @@
         })
       },
 
-      jstimehandle(val) {
+      jstimehandle (val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -1108,7 +1463,7 @@
         }
       },
 
-      formatDateTime(date) {
+      formatDateTime (date) {
         var y = date.getFullYear()
         var m = date.getMonth() + 1
         m = m < 10 ? ('0' + m) : m
@@ -1121,7 +1476,6 @@
       }
     }
   }
-
 </script>
 
 <style lang="scss">