Kaynağa Gözat

信息变更修改

huahaiyan 6 yıl önce
ebeveyn
işleme
003acdc62b

+ 75 - 0
src/dashoo.cn/backend/api/business/oilsupplier/infochange/infochange.go

@@ -6,10 +6,12 @@ import (
 
 type OilInfoChange struct {
 	Id                  int       `xorm:"<- not null pk autoincr INT(10)"`
+	SupplierId          int       `xorm:"not null comment('供方基本信息表主键') INT(10)"`
 	AccessCardNo        int       `xorm:"not null default 0 comment('准入证号') INT(10)"`
 	OldAccessCardNo     int       `xorm:"not null default 0 comment('曾用准入证号') INT(10)"`
 	SupplierName        string    `xorm:"comment('企业名称') VARCHAR(255)"`
 	Status              string    `xorm:"comment('状态标识') VARCHAR(10)"`
+	Step                int       `xorm:"comment('页面上第几步') INT(10)"`
 	WorkFlowId          string    `xorm:"comment('工作流的ID') VARCHAR(50)"`
 	OldSupplierName     string    `xorm:"comment('曾用名') VARCHAR(255)"`
 	SupplierTypeCode    string    `xorm:"comment('准入类别代码(1 物资类,2 基建类,3 技术服务类)') VARCHAR(5)"`
@@ -95,3 +97,76 @@ type OilInfoChangeItem struct {
 	ModifiedUserId int       `xorm:"INT(10)"`
 	ModifiedBy     string    `xorm:"VARCHAR(50)"`
 }
+
+type SuppModelInfo struct {
+	Id                 int       `xorm:"<- not null pk autoincr INT(10)"`
+	AccessCardNo       int       `xorm:"not null default 0 comment('准入证号') INT(10)"`
+	SupplierName       string    `xorm:"comment('企业名称') VARCHAR(255)"`
+	Status             string    `xorm:"comment('状态标识') VARCHAR(10)"`
+	Step               int       `xorm:"comment('页面上第几步') INT(10)"`
+	WorkFlowId         string    `xorm:"comment('工作流的ID') VARCHAR(50)"`
+	SupplierTypeCode   string    `xorm:"comment('准入类别代码(1 物资类,2 基建类,3 技术服务类)') VARCHAR(5)"`
+	SupplierTypeName   string    `xorm:"comment('准入类别名称(1 物资类,2 基建类,3 技术服务类)') VARCHAR(50)"`
+	OilCertificateNo   string    `xorm:"comment('中石油供应商证书号') VARCHAR(50)"`
+	Grade              string    `xorm:"comment('级别') VARCHAR(2)"`
+	MgrUnit            string    `xorm:"comment('管理单位') VARCHAR(50)"`
+	OperType           string    `xorm:"comment('经营方式') CHAR(1)"`
+	Country            string    `xorm:"comment('国家') VARCHAR(20)"`
+	MaunAgent          string    `xorm:"comment('所代理制造商名称') VARCHAR(100)"`
+	ConstructTeam      string    `xorm:"comment('施工队伍名称') VARCHAR(100)"`
+	CommercialNo       string    `xorm:"comment('工商注册号') VARCHAR(50)"`
+	OrganCode          string    `xorm:"comment('组织机构代码') VARCHAR(50)"`
+	CountryTaxNo       string    `xorm:"comment('税务登记证国税编号') VARCHAR(50)"`
+	LocalTaxNo         string    `xorm:"comment('税务登记证地税编号') VARCHAR(50)"`
+	Address            string    `xorm:"comment('单位地址') VARCHAR(500)"`
+	Province           string    `xorm:"comment('省直辖市') VARCHAR(20)"`
+	City               string    `xorm:"comment('地市区县') VARCHAR(20)"`
+	Street             string    `xorm:"comment('街道') VARCHAR(20)"`
+	HouseNo            string    `xorm:"comment('门牌号') VARCHAR(10)"`
+	ZipCode            string    `xorm:"comment('邮编') VARCHAR(20)"`
+	QualitySystemCert  string    `xorm:"comment('质量管理体系认证情况及认证机构') VARCHAR(200)"`
+	ProductQualityCert string    `xorm:"comment('产品质量认证情况及认证机构') VARCHAR(200)"`
+	MaunLicense        string    `xorm:"comment('生产制造许可证获证情况及编号') VARCHAR(200)"`
+	QualifCert         string    `xorm:"comment('企业资质证书编号') VARCHAR(200)"`
+	QualifCertLevel    string    `xorm:"comment('企业资质证书级别') VARCHAR(10)"`
+	SafetyLicense      string    `xorm:"comment('安全生产许可证') VARCHAR(200)"`
+	TechServiceLic     string    `xorm:"comment('技术服务类准入许可证') VARCHAR(200)"`
+	TJInNotify         string    `xorm:"comment('外地企业进津备案通知书') VARCHAR(50)"`
+	SpecIndustryCert   string    `xorm:"comment('行业特殊要求的认证证书') VARCHAR(200)"`
+	LegalPerson        string    `xorm:"comment('法定代表人姓名') VARCHAR(20)"`
+	CategoryCode       string    `xorm:"comment('行业类别代码') VARCHAR(10)"`
+	CategoryName       string    `xorm:"comment('行业类别名称') VARCHAR(20)"`
+	RegCapital         float32   `xorm:"default 0 comment('注册资本') FLOAT"`
+	Currency           string    `xorm:"comment('币种') VARCHAR(10)"`
+	ContactName        string    `xorm:"comment('联系人姓名') VARCHAR(20)"`
+	CompanyType        string    `xorm:"comment('公司类型') VARCHAR(20)"`
+	DepositBank        string    `xorm:"comment('开户银行') VARCHAR(50)"`
+	BankAccount        string    `xorm:"comment('银行账号') VARCHAR(50)"`
+	SetupTime          time.Time `xorm:"comment(' 成立时间') DATE"`
+	Email              string    `xorm:"comment('电子邮箱') VARCHAR(50)"`
+	BankCreditRating   string    `xorm:"comment('银行信用等级') VARCHAR(10)"`
+	Mobile             string    `xorm:"comment('移动电话') VARCHAR(20)"`
+	Telphone           string    `xorm:"comment('固定电话') VARCHAR(20)"`
+	Fax                string    `xorm:"comment('传真') VARCHAR(20)"`
+	CompanyTel         string    `xorm:"comment('公司电话') VARCHAR(20)"`
+	Qq                 string    `xorm:"comment('QQ号码') VARCHAR(20)"`
+	CompanyUrl         string    `xorm:"comment('公司网址') VARCHAR(20)"`
+	SpecSupplier       string    `xorm:"default '0' comment('是否特殊业务供应商(可不招标)') VARCHAR(2)"`
+	SpecTypeCode       string    `xorm:"comment('业务类型(1战略合作,2内部多经,3区域关键,4专业化实施)') VARCHAR(200)"`
+	SpecTypeName       string    `xorm:"comment('业务类型(1战略合作,2内部多经,3区域关键,4专业化实施)') VARCHAR(500)"`
+	Remark             string    `xorm:"comment('备注') VARCHAR(500)"`
+	IsDelete           int       `xorm:"default 0 comment('删除状态,0正常,1已删除') INT(10)"`
+	CreateOn           time.Time `xorm:"DATETIME"`
+	CreateUserId       int       `xorm:"INT(10)"`
+	CreateBy           string    `xorm:"VARCHAR(50)"`
+	ModifiedOn         time.Time `xorm:"DATETIME"`
+	ModifiedUserId     int       `xorm:"INT(10)"`
+	ModifiedBy         string    `xorm:"VARCHAR(50)"`
+	LinkAddress        string    `xorm:"comment('通信地址-单位地址') VARCHAR(500)"`
+	LinkProvince       string    `xorm:"comment('通信地址-省直辖市') VARCHAR(20)"`
+	LinkCity           string    `xorm:"comment('通信地址-地市区县') VARCHAR(20)"`
+	LinkStreet         string    `xorm:"comment('通信地址-街道') VARCHAR(20)"`
+	LinkHouseNo        string    `xorm:"comment('通信地址-门牌号') VARCHAR(10)"`
+	LinkZipCode        string    `xorm:"comment('通信地址-邮编') VARCHAR(20)"`
+	HseTraining        string    `xorm:"default '0' comment('是否需要进行HSE审查培训') VARCHAR(2)"`
+}

+ 39 - 1
src/dashoo.cn/backend/api/business/oilsupplier/infochange/infochangeService.go

@@ -136,7 +136,7 @@ func (s *InfoChangeService) Insertentityinfo(infoname string, items string) (int
 	var selectiteval string
 	for i:=0; i<len(allitem); i++ {
 		infoitem := strings.Split(allitem[i],",")
-		selectitem = fmt.Sprintf("%s %s %s",selectitem, strings.Trim(infoitem[0]," ") +",", "Old"+strings.Trim(infoitem[0], " ")+"," )
+		selectitem = fmt.Sprintf("%s %s %s",selectitem, "Old"+strings.Trim(infoitem[0]," ") +",", strings.Trim(infoitem[0], " ")+"," )
 		selectiteval = fmt.Sprintf("%s %s %s",selectiteval, `"`+ strings.Trim(infoitem[1], " ") +`",`, `"`+ strings.Trim(infoitem[2], " ") +`",` )
 	}
 	selectitem = strings.Trim(selectitem, ",")
@@ -148,3 +148,41 @@ func (s *InfoChangeService) Insertentityinfo(infoname string, items string) (int
 	infoid,_ := res.LastInsertId()
 	return infoid, err
 }
+
+func (s *InfoChangeService) GetSuppPagingEntitiesWithOrderBytbl(supplierTableName, infoChangeName string, pageIndex, itemsPerPage int64, orderby string, asc bool, entitiesPtr interface{}, where string) (total int64) {
+	var resultsSlice []map[string][]byte
+
+	//获取总记录数
+	sqlCount := `select count(*) from ` + supplierTableName + ` a `
+	sqlCount += ` left join ` + infoChangeName + " b on b.SupplierId = a.Id"
+	sqlCount += ` where ` + where
+
+	var sql string
+	sql = `select a.*, `
+	sql += ` b.Step, `
+	sql += ` b.Status, `
+	sql += ` b.WorkflowId `
+	sql += ` from ` + supplierTableName + ` a `
+	sql += ` left join ` + infoChangeName + " b on b.SupplierId = a.Id"
+	sql += ` where ` + where
+	if asc {
+		sql += ` order by ` + orderby + ` ASC `
+	} else {
+		sql += ` order by ` + orderby + ` DESC `
+	}
+	sql += ` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)
+	s.DBE.SQL(sql).Find(entitiesPtr)
+
+	resultsSlice, _ = s.DBE.Query(sqlCount)
+
+	if len(resultsSlice) > 0 {
+		results := resultsSlice[0]
+		for _, value := range results {
+			total, _ = strconv.ParseInt(string(value), 10, 64)
+			break
+		}
+	}
+
+	return total
+}
+

+ 484 - 15
src/dashoo.cn/backend/api/controllers/oilsupplier/infochange.go

@@ -4,6 +4,7 @@ import (
 	"dashoo.cn/backend/api/business/auditsetting"
 	"dashoo.cn/backend/api/business/oilsupplier/infochange"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
+	"dashoo.cn/business2/permission"
 	"dashoo.cn/business2/userRole"
 	"encoding/json"
 	"fmt"
@@ -22,6 +23,14 @@ type InfoChangeController struct {
 	BaseController
 }
 
+type InfoShenHeModel struct {
+	InfoId        int
+	SuccessStatus int
+	AuditorRemark string
+	Auditer       int
+	SuppId        int
+}
+
 // @Title 获取实体
 // @Description 获取实体
 // @Success 200 {object} annualaudit.OilAnnualAudit
@@ -30,14 +39,329 @@ func (this *InfoChangeController) GetEntity() {
 	CertId := this.Ctx.Input.Param(":id")
 	var model []infochange.OilInfoChangeItem
 	svc := infochange.GetInfoChangeService(utils.DBE)
-	where := " SupplierId = "+CertId
-	svc.GetEntitysByWhere(OilInfoChangeItemName,where,&model)
+	where := " SupplierId = " + CertId
+	svc.GetEntitysByWhere(OilInfoChangeItemName, where, &model)
+	var datainfo DataInfo
+	datainfo.Items = model
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} annualaudit.OilAnnualAudit
+// @router /auditget/:id [get]
+func (this *InfoChangeController) GetEntityThen() {
+	InfoId := this.Ctx.Input.Param(":id")
+	var model []infochange.OilInfoChangeItem
+	svc := infochange.GetInfoChangeService(utils.DBE)
+	where := " InfoId = " + InfoId
+	svc.GetEntitysByWhere(OilInfoChangeItemName, where, &model)
 	var datainfo DataInfo
 	datainfo.Items = model
 	this.Data["json"] = &datainfo
 	this.ServeJSON()
 }
 
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []supplier.OilSupplier
+// @router /supplist [get]
+func (this *InfoChangeController) GetSuppList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	SupplierName := this.GetString("SupplierName")
+	OilCertificateNo := this.GetString("OilCertificateNo")
+	Grade := this.GetString("Grade")
+	MgrUnit := this.GetString("MgrUnit")
+	OperType := this.GetString("OperType")
+	Country := this.GetString("Country")
+	MaunAgent := this.GetString("MaunAgent")
+	ConstructTeam := this.GetString("ConstructTeam")
+	CommercialNo := this.GetString("CommercialNo")
+	OrganCode := this.GetString("OrganCode")
+	CountryTaxNo := this.GetString("CountryTaxNo")
+	LocalTaxNo := this.GetString("LocalTaxNo")
+	Address := this.GetString("Address")
+	Province := this.GetString("Province")
+	City := this.GetString("City")
+	Street := this.GetString("Street")
+	HouseNo := this.GetString("HouseNo")
+	ZipCode := this.GetString("ZipCode")
+	QualitySystemCert := this.GetString("QualitySystemCert")
+	ProductQualityCert := this.GetString("ProductQualityCert")
+	MaunLicense := this.GetString("MaunLicense")
+	QualifCert := this.GetString("QualifCert")
+	QualifCertLevel := this.GetString("QualifCertLevel")
+	SafetyLicense := this.GetString("SafetyLicense")
+	TechServiceLic := this.GetString("TechServiceLic")
+	TJInNotify := this.GetString("TJInNotify")
+	SpecIndustryCert := this.GetString("SpecIndustryCert")
+	LegalPerson := this.GetString("LegalPerson")
+	CategoryCode := this.GetString("CategoryCode")
+	CategoryName := this.GetString("CategoryName")
+	RegCapital := this.GetString("RegCapital")
+	Currency := this.GetString("Currency")
+	ContactName := this.GetString("ContactName")
+	CompanyType := this.GetString("CompanyType")
+	SetupTime := this.GetString("SetupTime")
+	DepositBank := this.GetString("DepositBank")
+	BankAccount := this.GetString("BankAccount")
+	EMail := this.GetString("EMail")
+	BankCreditRating := this.GetString("BankCreditRating")
+	Mobile := this.GetString("Mobile")
+	Telphone := this.GetString("Telphone")
+	Fax := this.GetString("Fax")
+	CompanyTel := this.GetString("CompanyTel")
+	QQ := this.GetString("QQ")
+	CompanyUrl := this.GetString("CompanyUrl")
+	SpecSupplier := this.GetString("SpecSupplier")
+	SpecTypeCode := this.GetString("SpecTypeCode")
+	SpecTypeName := this.GetString("SpecTypeName")
+	Remark := this.GetString("Remark")
+	CreateOn := this.GetString("CreateOn")
+
+	if SupplierName != "" {
+		where = where + " and a.SupplierName like '%" + SupplierName + "%'"
+	}
+
+	if OilCertificateNo != "" {
+		where = where + " and a.OilCertificateNo like '%" + OilCertificateNo + "%'"
+	}
+
+	if Grade != "" {
+		where = where + " and a.Grade like '%" + Grade + "%'"
+	}
+
+	if MgrUnit != "" {
+		where = where + " and a.MgrUnit like '%" + MgrUnit + "%'"
+	}
+
+	if OperType != "" {
+		where = where + " and a.OperType like '%" + OperType + "%'"
+	}
+
+	if Country != "" {
+		where = where + " and a.Country like '%" + Country + "%'"
+	}
+
+	if MaunAgent != "" {
+		where = where + " and a.MaunAgent like '%" + MaunAgent + "%'"
+	}
+
+	if ConstructTeam != "" {
+		where = where + " and a.ConstructTeam like '%" + ConstructTeam + "%'"
+	}
+
+	if CommercialNo != "" {
+		where = where + " and a.CommercialNo like '%" + CommercialNo + "%'"
+	}
+
+	if OrganCode != "" {
+		where = where + " and a.OrganCode like '%" + OrganCode + "%'"
+	}
+
+	if CountryTaxNo != "" {
+		where = where + " and a.CountryTaxNo like '%" + CountryTaxNo + "%'"
+	}
+
+	if LocalTaxNo != "" {
+		where = where + " and a.LocalTaxNo like '%" + LocalTaxNo + "%'"
+	}
+
+	if Address != "" {
+		where = where + " and a.Address like '%" + Address + "%'"
+	}
+
+	if Province != "" {
+		where = where + " and a.Province like '%" + Province + "%'"
+	}
+
+	if City != "" {
+		where = where + " and a.City like '%" + City + "%'"
+	}
+
+	if Street != "" {
+		where = where + " and a.Street like '%" + Street + "%'"
+	}
+
+	if HouseNo != "" {
+		where = where + " and a.HouseNo like '%" + HouseNo + "%'"
+	}
+
+	if ZipCode != "" {
+		where = where + " and a.ZipCode like '%" + ZipCode + "%'"
+	}
+
+	if QualitySystemCert != "" {
+		where = where + " and a.QualitySystemCert like '%" + QualitySystemCert + "%'"
+	}
+
+	if ProductQualityCert != "" {
+		where = where + " and a.ProductQualityCert like '%" + ProductQualityCert + "%'"
+	}
+
+	if MaunLicense != "" {
+		where = where + " and a.MaunLicense like '%" + MaunLicense + "%'"
+	}
+
+	if QualifCert != "" {
+		where = where + " and a.QualifCert like '%" + QualifCert + "%'"
+	}
+
+	if QualifCertLevel != "" {
+		where = where + " and a.QualifCertLevel like '%" + QualifCertLevel + "%'"
+	}
+
+	if SafetyLicense != "" {
+		where = where + " and a.SafetyLicense like '%" + SafetyLicense + "%'"
+	}
+
+	if TechServiceLic != "" {
+		where = where + " and a.TechServiceLic like '%" + TechServiceLic + "%'"
+	}
+
+	if TJInNotify != "" {
+		where = where + " and a.TJInNotify like '%" + TJInNotify + "%'"
+	}
+
+	if SpecIndustryCert != "" {
+		where = where + " and a.SpecIndustryCert like '%" + SpecIndustryCert + "%'"
+	}
+
+	if LegalPerson != "" {
+		where = where + " and a.LegalPerson like '%" + LegalPerson + "%'"
+	}
+
+	if CategoryCode != "" {
+		where = where + " and a.CategoryCode like '%" + CategoryCode + "%'"
+	}
+
+	if CategoryName != "" {
+		where = where + " and a.CategoryName like '%" + CategoryName + "%'"
+	}
+
+	if RegCapital != "" {
+		where = where + " and a.RegCapital like '%" + RegCapital + "%'"
+	}
+
+	if Currency != "" {
+		where = where + " and a.Currency like '%" + Currency + "%'"
+	}
+
+	if ContactName != "" {
+		where = where + " and a.ContactName like '%" + ContactName + "%'"
+	}
+
+	if CompanyType != "" {
+		where = where + " and a.CompanyType like '%" + CompanyType + "%'"
+	}
+
+	if SetupTime != "" {
+		where = where + " and a.SetupTime like '%" + SetupTime + "%'"
+	}
+
+	if DepositBank != "" {
+		where = where + " and a.DepositBank like '%" + DepositBank + "%'"
+	}
+
+	if BankAccount != "" {
+		where = where + " and a.BankAccount like '%" + BankAccount + "%'"
+	}
+
+	if EMail != "" {
+		where = where + " and a.EMail like '%" + EMail + "%'"
+	}
+
+	if BankCreditRating != "" {
+		where = where + " and a.BankCreditRating like '%" + BankCreditRating + "%'"
+	}
+
+	if Mobile != "" {
+		where = where + " and a.Mobile like '%" + Mobile + "%'"
+	}
+
+	if Telphone != "" {
+		where = where + " and a.Telphone like '%" + Telphone + "%'"
+	}
+
+	if Fax != "" {
+		where = where + " and a.Fax like '%" + Fax + "%'"
+	}
+
+	if CompanyTel != "" {
+		where = where + " and a.CompanyTel like '%" + CompanyTel + "%'"
+	}
+
+	if QQ != "" {
+		where = where + " and a.QQ like '%" + QQ + "%'"
+	}
+
+	if CompanyUrl != "" {
+		where = where + " and a.CompanyUrl like '%" + CompanyUrl + "%'"
+	}
+
+	if SpecSupplier != "" {
+		where = where + " and a.SpecSupplier like '%" + SpecSupplier + "%'"
+	}
+
+	if SpecTypeCode != "" {
+		where = where + " and a.SpecTypeCode like '%" + SpecTypeCode + "%'"
+	}
+
+	if SpecTypeName != "" {
+		where = where + " and a.SpecTypeName like '%" + SpecTypeName + "%'"
+	}
+
+	if Remark != "" {
+		where = where + " and a.Remark like '%" + Remark + "%'"
+	}
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and a.CreateOn>='" + minDate + "' and a.CreateOn<='" + maxDate + "'"
+		}
+	}
+	//企业用户必须加创建人条件
+	if this.User.IsCompanyUser == 1 {
+		where = where + " and a.CreateUserId = '" + this.User.Id + "'"
+	} else {
+		//超级管理员和有查看所有数据权限的用户不加条件
+		svcPerm := permission.GetPermissionService(utils.DBE)
+		isauth := svcPerm.IsAuthorized(this.User.Id, "oil_supplier.marketAccess.AllRecord")
+		if !svcPerm.IsAdmin(this.User.Id) && !isauth {
+			where = where + " and a.CreateUserId = '" + this.User.Id + "'"
+		}
+	}
+
+	svc := infochange.GetInfoChangeService(utils.DBE)
+	var list []infochange.SuppModelInfo
+	total := svc.GetSuppPagingEntitiesWithOrderBytbl(OilSupplierName,OilInfoChangeName, page.CurrentPage, page.Size, orderby, asc, &list, where)
+	//total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+
 // @Title 获取列表
 // @Description get user by token
 // @Success 200 {object} []infochange.OilInfoChange
@@ -111,7 +435,7 @@ func (this *InfoChangeController) GetInfoForItem() {
 	certId := this.GetString("certId")
 	selctitem := this.GetString("selctitem")
 	svc := infochange.GetInfoChangeService(utils.DBE)
-	where := "Id ="+ utils.ToStr(certId)
+	where := "Id =" + utils.ToStr(certId)
 	var selecteditem = svc.GetInfoforItem(""+OilSupplierName, selctitem, where)
 	this.Data["json"] = &selecteditem
 	this.ServeJSON()
@@ -175,7 +499,7 @@ func (this *InfoChangeController) GetMyTaskEntityList() {
 	where += " and Id in (" + certIdList + ")"
 	//根据部门查询待办任务
 
-	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size,orderby,asc, &list, where)
+	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
 	//total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
 
 	var datainfo DataInfo
@@ -226,7 +550,7 @@ func (this *InfoChangeController) DeleteEntity() {
 // @router /addinfochangeitem [post]
 func (this *InfoChangeController) AddInfoChangeItem() {
 	var model infochange.OilInfoChangeItem
-	var jsonBlob= this.Ctx.Input.RequestBody
+	var jsonBlob = this.Ctx.Input.RequestBody
 	svc := infochange.GetInfoChangeService(utils.DBE)
 	json.Unmarshal(jsonBlob, &model)
 	model.CreateOn = time.Now()
@@ -260,7 +584,7 @@ func (this *InfoChangeController) GetAuditerByDept() {
 	rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
 	//rsvc.GetAuditStepRoleEntity(OilAuditSettingName, Id, workflow.FIRST_TRIAL, &auditWorkflow)
 	var userlist []userRole.Base_User
-	where := " CompanyId = "+ Id
+	where := " CompanyId = " + Id
 	rsvc.GetEntities(&userlist, where)
 
 	var datainfo ErrorDataInfo
@@ -269,6 +593,20 @@ func (this *InfoChangeController) GetAuditerByDept() {
 	this.ServeJSON()
 }
 
+// @Title 获取企业法规处人员
+// @Description 获取企业法规处人员
+// @router /getauditer [get]
+func (this *InfoChangeController) GetAuditer() {
+	svc := infochange.GetInfoChangeService(utils.DBE)
+	var users []suppliercert.UserList
+	where := "OrganizeId=100000178 and AuditStepCode='" + workflow.PROF_REGULATION + "'"
+	svc.GetEntitysByWhere(OilAuditSettingName, where, &users)
+	var datainfo ErrorDataInfo
+	datainfo.Item = users
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
 // @Title 提交审批
 // @Description 提交审批
 // @Success	200	{object} controllers.Request
@@ -279,8 +617,8 @@ func (this *InfoChangeController) AuditEntity() {
 
 	//取出审批列表
 	svc := infochange.GetInfoChangeService(utils.DBE)
-	var infoitems [] infochange.OilInfoChangeItem
-	where := " SupplierId = "+ suppId
+	var infoitems []infochange.OilInfoChangeItem
+	where := " SupplierId = " + suppId
 	svc.GetEntities(&infoitems, where)
 	var infochangeentity infochange.OilInfoChange
 	var infomodel infochange.OilInfoChangeItem
@@ -300,15 +638,17 @@ func (this *InfoChangeController) AuditEntity() {
 		}
 	}()
 	var items string
-	for i:=0 ;i<len(infoitems); i++ {
-		items = fmt.Sprintf("%s %s %s %s",items, infoitems[i].SelectItem , ","+ infoitems[i].BeChangeInfo , ","+ infoitems[i].ChangeInfo +";")
+	for i := 0; i < len(infoitems); i++ {
+		items = fmt.Sprintf("%s %s %s %s", items, infoitems[i].SelectItem, ","+infoitems[i].BeChangeInfo, ","+infoitems[i].ChangeInfo+";")
 	}
 	items = strings.Trim(items, ";")
-	infoid,_ := svc.Insertentityinfo(OilInfoChangeName, items)
-
-	for i:=0; i<len(infoitems); i++ {
-		infomodel.InfoId,_ = strconv.Atoi(strconv.FormatInt(infoid,10))
-		err := svc.UpdateEntityBytbl(OilInfoChangeItemName, infoitems[i].Id, &infomodel, []string{"InfoId"} )
+	infoid, _ := svc.Insertentityinfo(OilInfoChangeName, items)
+	var infoupda infochange.OilInfoChange
+	infoupda.SupplierId,_ = strconv.Atoi(suppId)
+	svc.UpdateEntityBytbl(OilInfoChangeName, infoid, &infoupda, []string{"SupplierId"})
+	for i := 0; i < len(infoitems); i++ {
+		infomodel.InfoId, _ = strconv.Atoi(strconv.FormatInt(infoid, 10))
+		err := svc.UpdateEntityBytbl(OilInfoChangeItemName, infoitems[i].Id, &infomodel, []string{"InfoId"})
 		fmt.Println(err)
 	}
 
@@ -361,3 +701,132 @@ func (this *InfoChangeController) AuditEntity() {
 	svc.UpdateEntityByIdCols(infoid, infochangeentity, cols)
 }
 
+// @Title 审批
+// @Description 审批
+// @Success	200	{object} controllers.Request
+// @router /infoaudit [post]
+func (this *InfoChangeController) InfoAudit() {
+	svc := infochange.GetInfoChangeService(utils.DBE)
+	var jsonblob = this.Ctx.Input.RequestBody
+	var dataother InfoShenHeModel
+	json.Unmarshal(jsonblob, &dataother)
+	//取出审批列表
+	var infoid = dataother.InfoId
+	var infomodel infochange.OilInfoChange
+	svc.GetEntityById(utils.ToStr(dataother.InfoId), &infomodel)
+	var infoitems []infochange.OilInfoChangeItem
+	where := "SupplierId = "+ utils.ToStr(dataother.SuppId)
+	svc.GetEntities(&infoitems,where)
+	var infochanentity infochange.OilInfoChange
+	var errinfo ErrorDataInfo
+	defer func() { //finally处理失败的异常
+		if err := recover(); err != nil {
+			errinfo.Message = "提交失败," + err.(string)
+			errinfo.Code = -1
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		} else {
+			//返回正确结果
+			errinfo.Message = "审核提交成功"
+			errinfo.Code = 0
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		}
+	}()
+	step := 2
+	svcActiviti := workflow.GetActivitiService(utils.DBE)
+	var ActiComplete workflow.ActiCompleteVM
+	ActiComplete.ProcessKey = workflow.OIL_INFO_CHANGE
+	ActiComplete.BusinessKey = utils.ToStr(infoid)
+	ActiComplete.UserNames = utils.ToStr(dataother.Auditer)
+	ActiComplete.UserId = this.User.Id
+	ActiComplete.Remarks = dataother.AuditorRemark
+	ActiComplete.CallbackUrl = ""
+	if dataother.SuccessStatus == 1 {
+		ActiComplete.Result = "1"
+		if infomodel.Status == "1" {
+			infochanentity.Status = "2" //二级单位初审
+		} else if infomodel.Status == "2" {
+			infochanentity.Status = "3" //企业法规处审批
+			step = 3
+		}
+		receiveVal := svcActiviti.TaskComplete(ActiComplete)
+		if receiveVal == "true" {
+			cols := []string{
+				"Id",
+				"Status",
+				"Step",
+			}
+			_, err := svc.UpdateEntityByIdCols(infoid, infochanentity, cols)
+			if err == nil{
+				//原信息表更新
+				if infomodel.Status == "2" {
+					err = this.updatesupplier(dataother.SuppId,infoitems,infomodel)
+				}
+				errinfo.Message = "提交成功!"
+				errinfo.Code = 0
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+			}else {
+				errinfo.Message = "提交失败!"
+				errinfo.Code = -1
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+			}
+
+		} else {
+			errinfo.Message = "工作流异常,请联系管理员!"
+			errinfo.Code = -1
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+			return
+		}
+	} else {
+		ActiComplete.Result = "0"
+		if infomodel.Status == "1" {
+			infochanentity.Status = "-2" //二级单位初审
+		} else if infomodel.Status == "2" {
+			infochanentity.Status = "-3" //企业法规处审批
+		}
+		receiveVal := svcActiviti.TaskComplete(ActiComplete)
+		if receiveVal == "true" {
+			infochanentity.Step = step
+			cols := []string{
+				"Id",
+				"Status",
+				"Step",
+			}
+			_, err := svc.UpdateEntityByIdCols(infoid, infochanentity, cols)
+			if err == nil {
+				errinfo.Message = "提交成功!"
+				errinfo.Code = 0
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+			}else {
+				errinfo.Message = "提交失败!"
+				errinfo.Code = -1
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+			}
+		} else {
+			errinfo.Message = "工作流异常,请联系管理员!"
+			errinfo.Code = -1
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+			return
+		}
+	}
+}
+//更新供方信息表
+func (this *InfoChangeController) updatesupplier(suppid int, infoitems []infochange.OilInfoChangeItem, infomodel infochange.OilInfoChange) error {
+	svc := infochange.GetInfoChangeService(utils.DBE)
+	var err error
+	var cols []string
+	if len(infoitems) >0 {
+		for i := 0 ; i < len(infoitems); i++ {
+			cols = append(cols, infoitems[i].SelectItem)
+		}
+	}
+	err = svc.UpdateEntityBytbl(OilSupplierName, suppid, &infomodel, cols)
+	return err
+}

+ 26 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/infochange.js

@@ -6,6 +6,13 @@ export default {
       params: params
     })
   },
+  getSuppList (CreateOn, params, myAxios) {
+    return myAxios({
+      url: '/infochange/supplist?CreateOn=' + CreateOn,
+      method: 'GET',
+      params: params
+    })
+  },
   getinfoforitem(certId,selctitem,myAxios){
     return myAxios({
       url: '/infochange/getinfoforitem?certId=' + certId +'&selctitem='+ selctitem,
@@ -18,6 +25,12 @@ export default {
       method: 'GET'
     })
   },
+  getEntityThen (entityId, myAxios) {
+    return myAxios({
+      url: '/infochange/auditget/' + entityId,
+      method: 'GET'
+    })
+  },
   addInfoChangeItem (formData, myAxios) {
     return myAxios({
       url: '/infochange/addinfochangeitem',
@@ -31,12 +44,25 @@ export default {
       method: 'delete'
     })
   },
+  infoAudit (shenheform, myAxios) {
+    return myAxios({
+      url: '/infochange/infoaudit',
+      method: 'post',
+      data: shenheform
+    })
+  },
   auditEntity (entityId, FirstAudit, myAxios) {
     return myAxios({
       url: '/infochange/audit/' + entityId + '?firstAudit=' + FirstAudit,
       method: 'post'
     })
   },
+  getAuditer(myAxios) {
+    return myAxios({
+      url: '/infochange/getauditer',
+      method: 'GET'
+    })
+  },
   getAuditerByDept(deptId, myAxios) {
     return myAxios({
       url: '/infochange/getauditerbydept/' + deptId,

+ 44 - 43
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochange/_opera/auditoperation.vue

@@ -11,8 +11,9 @@
           <i class="icon icon-table2"></i> 编辑
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" @click="submitInfoChange">审核</el-button>
-          <router-link :to="'/oilsupplier/infochange'">
+          <el-button type="primary" size="mini" @click="submitInfoChange"
+            v-if="butnshow == 0 && (InfoStatus == '1' || InfoStatus == '2')">审核</el-button>
+          <router-link :to="'/oilsupplier/infochange/infoaudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
         </span>
@@ -31,37 +32,32 @@
         </el-table>
       </el-card>
     </el-card>
-    <el-dialog title="提交申请" :visible.sync="commitshow" width="360px">
-      <el-form label-width="90px" :model="entityForm" :rules="rules" ref="EntityFormref">
+    <el-dialog title="审核" :visible.sync="commitshow">
+      <el-form label-width="120px" :model="entityForm" :rules="rules" ref="EntityFormref">
         <el-row>
           <el-col :span="24">
-            <el-form-item label="审批单位" prop="FirstAudit" required>
-              <el-cascader :options="orgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false"
-                filterable @change="auditOrgChang" style="width: 100%" v-model="entityForm.FirstAudit"
-                placeholder="请选择组织"></el-cascader>
-              <!-- <el-select ref="selectauditOrg" v-model="entityForm.FirstAudit" placeholder="请选择" style="width: 100%"
-                @change="auditOrgChang" filterable allow-create default-first-option>
-                <el-option v-for="item in organizeOption" :key="item.id" :label="item.name" :value="item.id">
-                </el-option>
-              </el-select> -->
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="审批人" prop="auditer" required>
+            <el-form-item label="提交审批人" v-if="InfoStatus == '1'" 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 v-for="item in auditerOption" :key="item.userid" :label="item.username" :value="item.userid">
                 </el-option>
               </el-select>
             </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>
+              </template>
+            </el-form-item>
+            <el-form-item label="意见">
+              <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核说明"></el-input>
+            </el-form-item>
           </el-col>
         </el-row>
       </el-form>
       <span style="float: right;margin-top:-10px;">
         <el-button size="small" @click="commitshow = false">取 消</el-button>
-        <el-button type="primary" size="small" @click="addInfoChangeAudit()">确 定</el-button>
+        <el-button type="primary" size="small" @click="infoChangeAuditLaw()">确 定</el-button>
       </span>
       <br>
     </el-dialog>
@@ -107,7 +103,7 @@
           label: 'Fullname',
           children: 'children'
         },
-        supplierId:'',
+        infoId: '',
         auditerOption: [],
         commitshow: false,
         InfoData: [],
@@ -150,22 +146,31 @@
             message: '请选择审批人',
             trigger: 'blur'
           }]
-        }
+        },
+        shenheForm: {
+          SuccessStatus: 1,
+          AuditorRemark: '',
+          InfoId: 0,
+          Auditer: 0,
+          SuppId: 0,
+        },
+        butnshow: 0,
+        InfoStatus: '',
       }
     },
     created() {
       this.serviceId = this.$route.params.opera
-      this.supplierId = this.serviceId
+      this.InfoStatus = this.$route.query.InfoStatus
+      this.infoId = this.serviceId
       this.initDatas()
+      this.auditget()
     },
     methods: {
       initDatas() {
-        console.log("----this.formData.Id---", this.serviceId)
         if (this.serviceId) {
-          api.getEntity(this.serviceId, this.$axios).then(res => {
+          api.getEntityThen(this.serviceId, this.$axios).then(res => {
             this.InfoData = res.data.items
             this.itemsfilter()
-            console.log("---res.data.items---", res.data.items)
           }).catch(err => {
             console.error(err)
           });
@@ -194,7 +199,7 @@
           console.log(e)
         }
       },
-     
+
       getorgtreelist() {
         let _this = this
         // request
@@ -212,19 +217,9 @@
             console.error(err)
           })
       },
-      auditOrgChang(val) {
-        console.log("------val----", val)
+      auditget() {
         this.auditerOption = []
-        this.entityForm.auditer = ''
-        api.getAuditerByDept(val[val.length - 2], this.$axios).then(res => {
-          // if (res.data.item.length === 0) {
-          //   this.$message({
-          //     type: 'warning',
-          //     message: '该单位未设置审批人员!'
-          //   })
-          //   return
-          // }
-          console.log("---res.data.item--", res.data.item)
+        api.getAuditer(this.$axios).then(res => {
           this.auditerOption = res.data.item
         }).catch(err => {
           console.error(err)
@@ -235,13 +230,19 @@
         this.getorgtreelist()
         this.commitshow = true
       },
-      addInfoChangeAudit() {
-        console.log("==this.supplierId====",this.supplierId)
-        api.auditEntity(this.supplierId, this.entityForm.auditer, this.$axios).then(res => {
+      infoChangeAuditLaw() {
+        this.shenheForm.Auditer = this.entityForm.auditer
+        this.shenheForm.InfoId = parseInt(this.infoId)
+        if (this.InfoData) {
+          this.shenheForm.SuppId = this.InfoData[0].SupplierId
+        }
+
+        api.infoAudit(this.shenheForm, this.$axios).then(res => {
           if (res.data.code === 0) {
             // 保存成功后,初始化数据,变成修改
             this.initDatas()
             this.commitshow = false
+            this.butnshow = 1
             this.$message({
               type: 'success',
               message: res.data.message

+ 11 - 26
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochange/index.vue

@@ -42,19 +42,6 @@
             <router-link :to="'/oilsupplier/infochange/' + scope.row.Id + '/operation'">
               <el-button type="primary" plain title="编辑" size="mini">编辑</el-button>
             </router-link>
-            <!-- <el-popover placement="top" title="提示">
-              <el-alert
-                title=""
-                description="确认要删除吗?"
-                type="warning"
-                :closable="false">
-              </el-alert>
-              <br/>
-              <div style="text-align: right; margin: 0">
-                <el-button type="primary" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
-              </div>
-              <el-button :disabled="scope.row.Status != 0" slot="reference" type="primary" plain title="删除" style="margin-left:3px" size="mini">删除</el-button>
-            </el-popover> -->
           </template>
         </el-table-column>
 
@@ -64,24 +51,21 @@
         <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
           <template slot-scope="scope">
             <el-alert v-if="scope.row.Status=='2'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="初审未通过" type="warning">
+              title="待法规处审核" type="warning">
             </el-alert>
-            <el-alert v-if="scope.row.Status=='4'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="审核未通过" type="error">
-            </el-alert>
-            <el-alert v-if="scope.row.Status=='0'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="已申请" type="info">
+            <el-alert v-if="scope.row.Status=='-2'" :closable="false" style="background:rgba(255,255,255,0.2)"
+              title="初审未通过" type="error">
             </el-alert>
             <el-alert v-if="scope.row.Status=='1'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="初审通过" type="success">
+              title="已申请" type="info">
             </el-alert>
-            <el-alert v-if="scope.row.Status=='5'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="已交费" type="success">
+            <el-alert v-if="scope.row.Status=='-3'" :closable="false" style="background:rgba(255,255,255,0.2)"
+              title="审核未通过" type="success">
             </el-alert>
             <el-alert v-if="scope.row.Status=='3'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="专业审核通过" type="success">
+              title="审核通过" type="success">
             </el-alert>
-          </template>
+          </template> 
         </el-table-column>
         <el-table-column prop="CreateOn" sortable min-width="100" label="申请日期" align="center" show-overflow-tooltip>
           <template slot-scope="scope">
@@ -153,7 +137,7 @@
     mapGetters
   } from 'vuex';
   import supplierapi from '@/api/oilsupplier/supplier';
-  import api from '@/api/oilsupplier/annualaudit';
+  import api from '@/api/oilsupplier/infochange';
 
   export default {
     computed: {
@@ -325,8 +309,9 @@
         //查询条件
         Object.assign(params, this.searchForm)
         //访问接口
-        supplierapi.getList(myCreateOn.join(','), params, this.$axios).then(res => {
+        api.getSuppList(myCreateOn.join(','), params, this.$axios).then(res => {
           this.entityList = res.data.items
+          console.log("-------this.entityList-------",this.entityList)
           this.currentItemCount = res.data.currentItemCount
         }).catch(err => {
           console.error(err)

+ 29 - 13
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochange/infoaudit.vue

@@ -39,9 +39,10 @@
       <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby">
         <el-table-column label="操作" min-width="90" align="center" fixed>
           <template slot-scope="scope">
-            <router-link :to="'/oilsupplier/infochange/' + scope.row.Id + '/auditoperation'">
+            <router-link :to="'/oilsupplier/infochange/' + scope.row.Id + '/auditoperation?InfoStatus='+ scope.row.Status">
               <el-button type="primary" plain title="审核" size="mini">审核</el-button>
             </router-link>
+             <el-button type="primary" style="margin-left: 8px;" plain title="审批历史" size="mini" @click="getvalues(scope.row)">审批历史</el-button>
           </template>
         </el-table-column>
 
@@ -51,22 +52,19 @@
         <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
           <template slot-scope="scope">
             <el-alert v-if="scope.row.Status=='2'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="初审未通过" type="warning">
+              title="待法规处审核" type="warning">
             </el-alert>
-            <el-alert v-if="scope.row.Status=='4'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="审核未通过" type="error">
-            </el-alert>
-            <el-alert v-if="scope.row.Status=='0'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="已申请" type="info">
+            <el-alert v-if="scope.row.Status=='-2'" :closable="false" style="background:rgba(255,255,255,0.2)"
+              title="初审未通过" type="error">
             </el-alert>
             <el-alert v-if="scope.row.Status=='1'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="初审通过" type="success">
+              title="已申请" type="info">
             </el-alert>
-            <el-alert v-if="scope.row.Status=='5'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="已交费" type="success">
+            <el-alert v-if="scope.row.Status=='-3'" :closable="false" style="background:rgba(255,255,255,0.2)"
+              title="审核未通过" type="success">
             </el-alert>
             <el-alert v-if="scope.row.Status=='3'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="专业审核通过" type="success">
+              title="审核通过" type="success">
             </el-alert>
           </template>
         </el-table-column>
@@ -132,17 +130,23 @@
         <el-button size="mini" type="primary" @click="handleSearch">查 询</el-button>
       </span>
     </el-dialog>
-   
+    <el-dialog title="审核历史查看" :visible.sync="historyVisible" width="900px">
+      <wf-history ref="WfHistory" :entryinfo="entrydetail"></wf-history>
+    </el-dialog>
   </div>
 </template>
 <script>
   import {
     mapGetters
   } from 'vuex';
+  import WfHistory from '@/components/workflow/wfhistory.vue'
   import supplierapi from '@/api/oilsupplier/supplier';
   import api from '@/api/oilsupplier/infochange';
 
   export default {
+    components: {
+      WfHistory,
+    },
     computed: {
       ...mapGetters({
         authUser: 'authUser'
@@ -152,6 +156,7 @@
 
     data() {
       return {
+        historyVisible: false,
         addshow: false,
         dialogVisible: false,
         delevisble:false,
@@ -280,8 +285,13 @@
             width: 100,
             sort: true
           },
-
         ],
+        //工作流
+        entrydetail: {
+          process: 'oil_info_change',
+          business: '',
+          instance: '',
+        },
       }
     },
     created() {
@@ -320,6 +330,12 @@
         })
       },
 
+      getvalues(val) {
+        this.entrydetail.business = val.Id
+        this.entrydetail.instance = val.WorkFlowId
+        this.historyVisible = true
+      },
+
       getDictOptions() {
         api.getDictList(this.$axios).then(res => {
           //this.dictOptions.customerList = res.data.items['customerList']