Browse Source

信息变更业务修改,审核流程

huahaiyan 6 years ago
parent
commit
a0316b5f47

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

@@ -12,8 +12,10 @@ type OilInfoChange struct {
 	SupplierName        string    `xorm:"comment('企业名称') VARCHAR(255)"`
 	Status              string    `xorm:"comment('状态标识') VARCHAR(10)"`
 	AuditIndex          int       `xorm:"default 0 comment('审批次数') INT(11)"`
+	FirstAudit          int       `xorm:"default 0 comment('初审') INT(11)"`
+	SecondAudit         int       `xorm:"default 0 comment('复审') INT(11)"`
 	Step                int       `xorm:"comment('页面上第几步') INT(10)"`
-	BusinessKey       string    `xorm:"VARCHAR(255)"`
+	BusinessKey         string    `xorm:"VARCHAR(255)"`
 	WorkFlowId          string    `xorm:"comment('工作流的ID') VARCHAR(50)"`
 	OldSupplierName     string    `xorm:"comment('曾用名') VARCHAR(255)"`
 	SupplierTypeCode    string    `xorm:"comment('准入类别代码(1 物资类,2 基建类,3 技术服务类)') VARCHAR(5)"`

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

@@ -574,11 +574,11 @@ func (this *AnnualAuditController) AnnualAudit() {
 		userIds = utils.ToStr(list.SecondAudit)
 		status = suppliercert.SECOND_TRIAL_STATUS
 		step = 2
-		backstatus = "-1"
+		backstatus = suppliercert.NOPASS_STATUS
 	} else if list.Status == suppliercert.SECOND_TRIAL_STATUS {
 		status = suppliercert.THIRD_TRIAL_STATUS
 		step = 2
-		backstatus = "-2"
+		backstatus = suppliercert.NO_SECOND_TRIAL_STATUS
 		supsvc := suppliercert.GetOilSupplierCertService(utils.DBE)
 		var users []userRole.Base_RoleList
 		supsvc.GetAuditUser(strconv.Itoa(list.ThirdAudit), workflow.PROF_RECE, &users)
@@ -590,11 +590,11 @@ func (this *AnnualAuditController) AnnualAudit() {
 		userIds = ProfAudit
 		status = suppliercert.PROF_AUDIT_STATUS
 		step = 2
-		backstatus = "-3"
+		backstatus = suppliercert.NO_THIRD_TRIAL_STATUS
 	} else if list.Status == suppliercert.PROF_AUDIT_STATUS {
 		status = suppliercert.CENT_AUDIT_STATUS
 		step = 3
-		backstatus = "-4"
+		backstatus = suppliercert.NO_PROF_AUDIT_STATUS
 	}
 	var ActiComplete workflow.ActiCompleteVM
 	ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY

+ 283 - 71
src/dashoo.cn/backend/api/controllers/oilsupplier/infochange.go

@@ -4,11 +4,14 @@ import (
 	"dashoo.cn/backend/api/business/audithistory"
 	"dashoo.cn/backend/api/business/auditsetting"
 	"dashoo.cn/backend/api/business/oilsupplier/infochange"
+	"dashoo.cn/backend/api/business/oilsupplier/supplier"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
+	"dashoo.cn/business2/items"
 	"dashoo.cn/business2/permission"
 	"dashoo.cn/business2/userRole"
 	"encoding/json"
 	"fmt"
+	"reflect"
 	"strconv"
 	"strings"
 	"time"
@@ -28,10 +31,20 @@ type InfoShenHeModel struct {
 	InfoId        int
 	SuccessStatus int
 	AuditorRemark string
-	Auditer       int
 	SuppId        int
 }
 
+type InfoChangeItemsAll struct {
+	InfochangeForm []infoitems
+	SupplierId     string
+	MInfoId        string
+}
+type infoitems struct {
+	SelectItem   string
+	BeChangeInfo string
+	ChangeInfo   string
+}
+
 // @Title 获取实体
 // @Description 获取实体
 // @Success 200 {object} annualaudit.OilAnnualAudit
@@ -56,7 +69,7 @@ func (this *InfoChangeController) GetEntityThen() {
 	InfoId := this.Ctx.Input.Param(":id")
 	var model []infochange.OilInfoChangeItem
 	svc := infochange.GetInfoChangeService(utils.DBE)
-	where := " InfoId = " + InfoId
+	where := " InfoId = " + InfoId + " and ChangeStatus = 0"
 	svc.GetEntitysByWhere(OilInfoChangeItemName, where, &model)
 	var datainfo DataInfo
 	datainfo.Items = model
@@ -351,7 +364,7 @@ func (this *InfoChangeController) GetSuppList() {
 
 	svc := infochange.GetInfoChangeService(utils.DBE)
 	var list []infochange.SuppModelInfo
-	total := svc.GetSuppPagingEntitiesWithOrderBytbl(OilSupplierName,OilInfoChangeName, page.CurrentPage, page.Size, orderby, asc, &list, where)
+	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
@@ -475,8 +488,8 @@ func (this *InfoChangeController) GetEntityList() {
 	certIdList := actisvc.GetMyTasks(workflow.OIL_INFO_CHANGE, this.User.Id)
 	appendIdarr := strings.Split(certIdList, ",")
 	for i, item := range appendIdarr {
-		idx := strings.Index(item,"-")
-		if (idx >= 0 ) {
+		idx := strings.Index(item, "-")
+		if idx >= 0 {
 			appendIdarr[i] = strings.Split(item, "-")[0]
 		}
 	}
@@ -484,7 +497,7 @@ func (this *InfoChangeController) GetEntityList() {
 	svc := infochange.GetInfoChangeService(utils.DBE)
 	var list []infochange.OilInfoChange
 	var total int64 = 0
-	if (certIdList != "") {
+	if certIdList != "" {
 		where += " and Id in (" + certIdList + ")"
 		total = svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
 	}
@@ -512,6 +525,38 @@ func (this *InfoChangeController) GetInfoForItem() {
 	this.ServeJSON()
 }
 
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} supplier.OilSupplier
+// @router /getchangelist/:id [get]
+func (this *InfoChangeController) GetChangeEntity() {
+	Id := this.Ctx.Input.Param(":id")
+	var model supplier.OilSupplier
+	svc := supplier.GetOilSupplierService(utils.DBE)
+	svc.GetEntityByIdBytbl(OilSupplierName, Id, &model)
+	var infoitems []infochange.OilInfoChangeItem
+	where := " SupplierId = " + Id
+	where = where + " and ChangeStatus = 0"
+	svc.GetEntitysByWhere(OilInfoChangeItemName, where, &infoitems)
+	immumodel := reflect.ValueOf(&model)
+	elem := immumodel.Elem()
+	for _, info := range infoitems {
+		fmt.Println(info.SelectItem)
+		fmt.Println(";;;;;;;;;", elem.FieldByName(info.SelectItem).Type().String())
+		if elem.FieldByName(info.SelectItem).Type().String() == "int64" {
+			intchangeinfo, _ := strconv.ParseInt(info.ChangeInfo, 10, 64)
+			elem.FieldByName(info.SelectItem).SetInt(intchangeinfo)
+		} else if elem.FieldByName(info.SelectItem).Type().String() == "time.Time" {
+			t, _ := time.Parse("2006-01-02", info.ChangeInfo)
+			elem.FieldByName(info.SelectItem).Set(reflect.ValueOf(t))
+		} else {
+			elem.FieldByName(info.SelectItem).SetString(info.ChangeInfo)
+		}
+	}
+	this.Data["json"] = &model
+	this.ServeJSON()
+}
+
 // @Title 获取列表
 // @Description get user by token
 // @Success 200 {object} []annualaudit.OilAnnualAudit
@@ -646,6 +691,56 @@ func (this *InfoChangeController) AddInfoChangeItem() {
 	}
 }
 
+// @Title 添加
+// @Description 新增
+// @Success	200	{object} controllers.Request
+// @router /addinfochangeitemch [post]
+func (this *InfoChangeController) AddInfoChangeItemCh() {
+	var model InfoChangeItemsAll
+	var jsonBlob = this.Ctx.Input.RequestBody
+	svc := infochange.GetInfoChangeService(utils.DBE)
+	json.Unmarshal(jsonBlob, &model)
+	var err error
+	where := " SupplierId = " + model.SupplierId
+	where = where + " and InfoId = " + model.MInfoId
+	for i := 0; i < len(model.InfochangeForm); i++ {
+		var infoitementity infochange.OilInfoChangeItem
+		infoitementity.SelectItem = model.InfochangeForm[i].SelectItem
+		infoitementity.ChangeInfo = model.InfochangeForm[i].ChangeInfo
+		infoitementity.BeChangeInfo = model.InfochangeForm[i].BeChangeInfo
+		infoitementity.ChangeStatus = 0
+		infoitementity.SupplierId, _ = strconv.Atoi(model.SupplierId)
+		infoitementity.InfoId, _ = strconv.Atoi(model.MInfoId)
+
+		where = where + " and SelectItem = '" + model.InfochangeForm[i].SelectItem + "'"
+		var infoitemmodel []infochange.OilInfoChangeItem
+		svc.GetEntitysByWhere(OilInfoChangeItemName, where, &infoitemmodel)
+		if len(infoitemmodel) > 0 {
+			cols := []string{"ChangeInfo", "BeChangeInfo", "ChangeStatus"}
+			svc.UpdateEntityBywheretbl(OilInfoChangeItemName, &infoitementity, cols, where)
+		} else {
+			infoitementity.CreateOn = time.Now()
+			infoitementity.CreateBy = this.User.Realname
+			infoitementity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+			_, err = svc.InsertEntityBytbl(""+OilInfoChangeItemName, &infoitementity)
+		}
+	}
+	var errinfo ErrorDataInfo
+	if err == nil {
+		//新增
+		errinfo.Message = "添加成功!"
+		errinfo.Code = 0
+		//errinfo.Item = model.Id
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "添加失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
 // @Title 获取二级初审人员
 // @Description 获取二级初审人员
 // @router /getauditerbydept/:deptId [get]
@@ -690,21 +785,42 @@ func (this *InfoChangeController) AddInfoMain() {
 	SupplierId := this.GetString("SupplierId")
 	Remark := this.GetString("Remark")
 	var infochmain infochange.OilInfoChange
+	var infochm []infochange.OilInfoChange
+	var suppliermodel supplier.OilSupplier
 	var errinfo ErrorDataInfo
-	infochmain.SupplierId ,_ = strconv.Atoi(SupplierId)
+	svc := infochange.GetInfoChangeService(utils.DBE)
+	where := " SupplierId = " + SupplierId + " and Status < 4"
+	svc.GetEntitysByWhere(OilInfoChangeName, where, &infochm)
+	if len(infochm) > 0 {
+		errinfo.Message = "有已提交在申请中的信息变更,请审批完成后再提交!"
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	svc.GetEntityById(SupplierId, &suppliermodel)
+	infochmain.OldSupplierName = suppliermodel.SupplierName
+	infochmain.MgrUnit = suppliermodel.MgrUnit
+	infochmain.OilCertificateNo = suppliermodel.OilCertificateNo
+	infochmain.OperType = suppliermodel.OperType
+	infochmain.Country = suppliermodel.Country
+	infochmain.MaunAgent = suppliermodel.MaunAgent
+	infochmain.CommercialNo = suppliermodel.CommercialNo
+	infochmain.OrganCode = suppliermodel.OrganCode
+	infochmain.SupplierId, _ = strconv.Atoi(SupplierId)
 	infochmain.Remark = Remark
 	infochmain.CreateOn = time.Now()
 	infochmain.CreateBy = this.User.Realname
 	infochmain.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
-	svc := infochange.GetInfoChangeService(utils.DBE)
+
 	_, err := svc.InsertEntityBytbl(OilInfoChangeName, &infochmain)
-	if err == nil{
+	if err == nil {
 		errinfo.Message = "添加成功!"
 		errinfo.Code = 0
 		errinfo.Item = infochmain.Id
 		this.Data["json"] = &errinfo
 		this.ServeJSON()
-	}else {
+	} else {
 		errinfo.Message = "添加失败!"
 		errinfo.Code = -1
 		this.Data["json"] = &errinfo
@@ -738,6 +854,90 @@ func (this *InfoChangeController) GetAddSupplierList() {
 	this.ServeJSON()
 }
 
+// @Title 提交审批
+// @Description 提交审批
+// @Success	200	{object} controllers.Request
+// @router /commitaudit/:id [post]
+func (this *InfoChangeController) CommitAuditEntity() {
+	//suppId := this.Ctx.Input.Param(":id")
+	firstAudit := this.GetString("auditer")
+	fushenauditer := this.GetString("fushenauditer")
+	Remark := this.GetString("Remark")
+	InfoId := this.GetString("MInfoId")
+	//取出审批列表
+	svc := infochange.GetInfoChangeService(utils.DBE)
+	var infochangeentity infochange.OilInfoChange
+	infwhere := " Id = " + InfoId
+	svc.GetEntity(&infochangeentity, infwhere)
+	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()
+		}
+	}()
+	svcActiviti := workflow.GetActivitiService(utils.DBE)
+	processInstanceId := ""
+	businessKey := ""
+	businessKey = InfoId + "-" + strconv.Itoa(infochangeentity.AuditIndex)
+	processInstanceId = svcActiviti.StartProcess(workflow.OIL_INFO_CHANGE, businessKey, this.User.Id)
+
+	var ActiComplete workflow.ActiCompleteVM
+	ActiComplete.ProcessKey = workflow.OIL_INFO_CHANGE
+	ActiComplete.BusinessKey = businessKey
+	ActiComplete.UserNames = firstAudit
+	ActiComplete.UserId = this.User.Id
+	ActiComplete.Result = "1"
+	ActiComplete.Remarks = Remark
+	ActiComplete.CallbackUrl = ""
+	receiveVal := svcActiviti.TaskComplete(ActiComplete)
+
+	if receiveVal == "true" {
+		errinfo.Message = "提交成功!"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "工作流异常,请联系管理员!"
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	//记下workflowID(首次提交时才会记录,中间状态请忽略) 及审批状态
+	infochangeentity.WorkFlowId = processInstanceId
+	infochangeentity.Status = suppliercert.FIRST_TRIAL_STATUS //二级单位初审
+	infochangeentity.FirstAudit, _ = strconv.Atoi(firstAudit)
+	infochangeentity.SecondAudit, _ = strconv.Atoi(fushenauditer)
+	infochangeentity.AuditIndex = infochangeentity.AuditIndex + 1
+	infochangeentity.BusinessKey = ActiComplete.BusinessKey
+	infochangeentity.CreateOn = time.Now()
+	infochangeentity.CreateBy = this.User.Realname
+	infochangeentity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+	cols := []string{
+		"Id",
+		"WorkflowId",
+		"Status",
+		"Step",
+		"FirstAudit",
+		"SecondAudit",
+		"AuditIndex",
+		"BusinessKey",
+		"CreateOn",
+		"CreateBy",
+		"CreateUserId",
+	}
+	svc.UpdateEntityByIdCols(InfoId, infochangeentity, cols)
+}
+
 // @Title 提交审批
 // @Description 提交审批
 // @Success	200	{object} controllers.Request
@@ -790,7 +990,7 @@ func (this *InfoChangeController) AuditEntity() {
 	businessKey := ""
 	if infochangeentity.WorkFlowId == "0" || len(infochangeentity.WorkFlowId) <= 0 {
 		//启动工作流
-		businessKey = InfoId + "-" +  strconv.Itoa(infochangeentity.AuditIndex)
+		businessKey = InfoId + "-" + strconv.Itoa(infochangeentity.AuditIndex)
 		processInstanceId = svcActiviti.StartProcess(workflow.OIL_INFO_CHANGE, businessKey, this.User.Id)
 	}
 
@@ -853,9 +1053,8 @@ func (this *InfoChangeController) InfoAudit() {
 	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
+	where := "SupplierId = " + utils.ToStr(dataother.SuppId)
+	svc.GetEntities(&infoitems, where)
 	var errinfo ErrorDataInfo
 	defer func() { //finally处理失败的异常
 		if err := recover(); err != nil {
@@ -871,16 +1070,36 @@ func (this *InfoChangeController) InfoAudit() {
 			this.ServeJSON()
 		}
 	}()
+	//审核状态判断进行的操作
+	step := 2
+	status := ""
+	backstatus := "0"
 	var userIds string
-	certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
-	var users []userRole.Base_RoleList
-	certSrv.GetAuditUser("100000178", workflow.PROF_REGULATION, &users)
-
-	for _, tmpUser := range users {
-		userIds += strconv.FormatInt(tmpUser.Id, 10) + ","
+	if infomodel.Status == suppliercert.FIRST_TRIAL_STATUS {
+		userIds = utils.ToStr(infomodel.SecondAudit)
+		status = suppliercert.SECOND_TRIAL_STATUS
+		step = 2
+		backstatus = suppliercert.NO_SECOND_TRIAL_STATUS
+	} else if infomodel.Status == suppliercert.SECOND_TRIAL_STATUS {
+		status = suppliercert.THIRD_TRIAL_STATUS
+		backstatus = suppliercert.NO_SECOND_TRIAL_STATUS
+		step = 3
+		dictSvc := items.GetItemsService(utils.DBE)
+		deptIds := dictSvc.GetKeyValueItems("CENT_AUDIT")
+		var users []userRole.Base_RoleList
+		certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
+		for _, dept := range deptIds {
+			certSrv.GetAuditUser(dept.Value, workflow.PROF_REGULATION, &users)
+			for _, tmpUser := range users {
+				userIds += strconv.FormatInt(tmpUser.Id, 10) + ","
+			}
+		}
+		userIds = strings.Trim(userIds, ",")
+	}else if infomodel.Status == suppliercert.THIRD_TRIAL_STATUS {
+		status = suppliercert.PROF_AUDIT_STATUS
+		step = 3
+		backstatus = suppliercert.NO_THIRD_TRIAL_STATUS
 	}
-	userIds = strings.Trim(userIds, ",")
-	step := 2
 	svcActiviti := workflow.GetActivitiService(utils.DBE)
 	var ActiComplete workflow.ActiCompleteVM
 	ActiComplete.ProcessKey = workflow.OIL_INFO_CHANGE
@@ -889,44 +1108,37 @@ func (this *InfoChangeController) InfoAudit() {
 	ActiComplete.UserId = this.User.Id
 	ActiComplete.Remarks = dataother.AuditorRemark
 	ActiComplete.CallbackUrl = ""
+	var myerr error
 	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)
+		infomodel.Status = status
+		if infomodel.Status == suppliercert.THIRD_TRIAL_STATUS {
+			var infochangeitemmodel infochange.OilInfoChangeItem
+			infochangeitemmodel.ChangeStatus = 1
+			itemswhere := "InfoId = " + utils.ToStr(infoid)
+			myerr = svc.UpdateEntityBywheretbl(OilInfoChangeItemName, &infochangeitemmodel, []string{"ChangeStatus"}, itemswhere)
+			myerr = this.updatesupplier(dataother.SuppId, infoitems, infomodel)
+		}
+		infomodel.Step = step
 		if receiveVal == "true" {
 			cols := []string{
 				"Id",
 				"Status",
 				"Step",
 			}
-			_, err := svc.UpdateEntityByIdCols(infoid, infochanentity, cols)
-			if infochanentity.Status == "3" {
-				var infochangeitemmodel infochange.OilInfoChangeItem
-				infochangeitemmodel.ChangeStatus = 1
-				itemswhere := "InfoId = " + utils.ToStr(infoid)
-				svc.UpdateEntityBywheretbl(OilInfoChangeItemName, &infochangeitemmodel,  []string{"ChangeStatus"}, itemswhere)
-			}
-			if err == nil{
-				//原信息表更新
-				if infomodel.Status == "2" {
-					err = this.updatesupplier(dataother.SuppId,infoitems,infomodel)
-				}
+			_, myerr = svc.UpdateEntityByIdCols(infoid, infomodel, cols)
+			if myerr == nil {
 				errinfo.Message = "提交成功!"
 				errinfo.Code = 0
 				this.Data["json"] = &errinfo
 				this.ServeJSON()
-			}else {
+			} else {
 				errinfo.Message = "提交失败!"
 				errinfo.Code = -1
 				this.Data["json"] = &errinfo
 				this.ServeJSON()
 			}
-
 		} else {
 			errinfo.Message = "工作流异常,请联系管理员!"
 			errinfo.Code = -1
@@ -936,47 +1148,46 @@ func (this *InfoChangeController) InfoAudit() {
 		}
 	} else {
 		ActiComplete.Result = "0"
-		if infomodel.Status == "1" {
-			infochanentity.Status = "-2" //二级单位初审
-		} else if infomodel.Status == "2" {
-			infochanentity.Status = "-3" //企业法规处审批
-		}
 		receiveVal := svcActiviti.TaskComplete(ActiComplete)
-		if infochanentity.Status == "-2" {
-			// 审批历史
-			var audithistoryentity audithistory.Base_AuditHistory
-			audithistoryentity.EntityId = infoid
-			audithistoryentity.WorkflowId = infomodel.WorkFlowId
-			audithistoryentity.Process = ActiComplete.ProcessKey
-			audithistoryentity.BusinessKey = ActiComplete.BusinessKey
-			audithistoryentity.Type = "04"
-			audithistoryentity.BackStep = infomodel.Status
-			audithistoryentity.Index = infomodel.AuditIndex
-			audithistoryentity.CreateOn = time.Now()
-			audithistoryentity.CreateBy = this.User.Realname
-			audithistoryentity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
-			certSrv.InsertEntity(audithistoryentity)
-			infochanentity.WorkFlowId = ""
-		}
 		if receiveVal == "true" {
-			infochanentity.Step = step
+			if infomodel.Status == suppliercert.THIRD_TRIAL_STATUS {
+				infomodel.Status = suppliercert.NOPASS_STATUS
+			} else {
+				infomodel.Status = backstatus
+				// 审批历史
+				var audithistoryentity audithistory.Base_AuditHistory
+				audithistoryentity.EntityId = infoid
+				audithistoryentity.WorkflowId = infomodel.WorkFlowId
+				audithistoryentity.Process = ActiComplete.ProcessKey
+				audithistoryentity.BusinessKey = ActiComplete.BusinessKey
+				audithistoryentity.Type = "04"
+				audithistoryentity.BackStep = infomodel.Status
+				audithistoryentity.Index = infomodel.AuditIndex
+				audithistoryentity.CreateOn = time.Now()
+				audithistoryentity.CreateBy = this.User.Realname
+				audithistoryentity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+				_, myerr = svc.InsertEntity(audithistoryentity)
+				infomodel.WorkFlowId = ""
+			}
+			infomodel.Step = 1
 			cols := []string{
-				"Id",
 				"Status",
 				"Step",
 			}
-			_, err := svc.UpdateEntityByIdCols(infoid, infochanentity, cols)
-			if err == nil {
+			_, myerr := svc.UpdateEntityByIdCols(infoid, infomodel, cols)
+
+			if myerr == nil {
 				errinfo.Message = "提交成功!"
 				errinfo.Code = 0
 				this.Data["json"] = &errinfo
 				this.ServeJSON()
-			}else {
+			} else {
 				errinfo.Message = "提交失败!"
 				errinfo.Code = -1
 				this.Data["json"] = &errinfo
 				this.ServeJSON()
 			}
+
 		} else {
 			errinfo.Message = "工作流异常,请联系管理员!"
 			errinfo.Code = -1
@@ -986,16 +1197,17 @@ func (this *InfoChangeController) InfoAudit() {
 		}
 	}
 }
+
 //更新供方信息表
 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++ {
+	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
-}
+}

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

@@ -31,6 +31,12 @@ export default {
       method: 'GET'
     })
   },
+  GetChangeEntity (entityId, myAxios) {
+    return myAxios({
+      url: '/infochange/getchangelist/' + entityId,
+      method: 'GET'
+    })
+  },
   getEntityThen (entityId, myAxios) {
     return myAxios({
       url: '/infochange/auditget/' + entityId,
@@ -44,6 +50,13 @@ export default {
       data: formData
     })
   },
+  addInfoChangeItemCh (formData, myAxios) {
+    return myAxios({
+      url: '/infochange/addinfochangeitemch',
+      method: 'post',
+      data: formData
+    })
+  },
   deleteEntity (entityId, myAxios) {
     return myAxios({
       url: '/infochange/delete/' + entityId,
@@ -57,6 +70,13 @@ export default {
       data: shenheform
     })
   },
+  commitAuditEntity(entityId, params, myAxios) {
+    return myAxios({
+      url: '/infochange/commitaudit/' + entityId,
+      method: 'post',
+      params: params
+    })
+  },
   auditEntity (entityId, params, myAxios) {
     return myAxios({
       url: '/infochange/audit/' + entityId,

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

@@ -279,7 +279,7 @@
 
     data() {
       return {
-        textplaceholder:'',
+        textplaceholder: '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)',
         audithistoryshow: false,
         dialogProfAudit: false,
         canUpdateSupplier: true,

+ 857 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/auditoperation.vue

@@ -0,0 +1,857 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/infochange' }">供方基本信息表</el-breadcrumb-item>
+      <el-breadcrumb-item>编辑</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 编辑
+        </span>
+        <span style="float: right;">
+          <el-button type="primary" size="mini" @click="submitInfoChange" v-if="InfoStatus > 0">审核</el-button>
+          <router-link :to="'/oilsupplier/infochangech/infoaudit'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+        </span>
+      </div>
+      <el-card>
+        <el-form label-width="135px" ref="formData" :model="formData">
+          <el-row>
+
+            <el-col :span="16">
+              <el-form-item label="供方名称" prop="SupplierName" style="color:red;">
+                <el-autocomplete class="inline-input" v-model="formData.SupplierName" :readonly="true"
+                  :fetch-suggestions="querySearch" :maxlength="255" placeholder="请输入内容" style="width: 100%"
+                  @select="handleSelect" v-if="authUser && authUser.Profile.IsCompanyUser == 1">
+                </el-autocomplete>
+                <el-input v-model="formData.SupplierName" :maxlength="255" :readonly="true" placeholder="请输入"
+                  style="width: 100%" :class="getchange('SupplierName') ? 'modified-form-input' : ''"
+                  v-if="!authUser || authUser.Profile.IsCompanyUser == 0">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="准入编码">
+                <el-input v-model="formData.WZAccessCardNo" :readonly="true" placeholder="请输入" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="单位关系">
+                <el-select ref="SpecType" v-model="formData.SpecTypeCode"
+                  :class="getchange('SpecTypeCode') ? 'modified-form-input' : ''" :readonly="true" placeholder="请选择"
+                  style="width: 100%">
+                  <el-option v-for="item in UnitRelationOptions" :key="item.Id" :label="item.Key" :value="item.Value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="国家" prop="Country">
+                <el-select v-model="formData.Country" filterable placeholder="请选择" :readonly="true" style="width: 100%"
+                  :class="getchange('Country') ? 'modified-form-input' : ''">
+                  <el-option v-for="item in countryListOptions" :key="item.key" :label="item.value" :value="item.value">
+                    <span style="float: left">{{ item.value }}</span>
+                    <span style="float: right; color: #8492a6; font-size: 13px">{{ item.label }}</span>
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <!-- <el-col :span="8">
+              <el-form-item label="准入方式">
+                <el-select ref="inStyle" v-model="formData.InStyle" :disabled="true" placeholder="请选择"
+                  :class="getchange('InStyle') ? 'modified-form-input' : ''" style="width: 100%">
+                  <el-option v-for="item in InOptions" :key="item.Id" :label="item.Key" :value="item.Value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col> -->
+
+            <el-col :span="8">
+              <el-form-item label="管理单位">
+                <el-select filterable v-model="formData.MgrUnit" maxlength="255" :readonly="true"
+                  :class="getchange('MgrUnit') ? 'modified-form-input' : ''" placeholder="请输入" style="width: 100%">
+                  <el-option v-for="item in ManagementUnitOptions" :key="item.Value" :label="item.Key"
+                    :value="item.Key">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="中石油准入证编号">
+                <el-input v-model="formData.PACNumber" maxlength="255" :readonly="true" placeholder="请输入"
+                  :class="getchange('PACNumber') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+
+
+            <el-col :span="8">
+              <el-form-item label="证件合一">
+                <el-select v-model="formData.CredentialFlag" placeholder="请选择" :readonly="true" style="width: 100%"
+                  :class="getchange('CredentialFlag') ? 'modified-form-input' : ''">
+                  <el-option v-for="item in selectoptions" :key="item.value" :label="item.label" :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label-width="150px" label="统一社会信用代码" prop="CommercialNo">
+                <el-input v-model="formData.CommercialNo" maxlength="50" :readonly="true"
+                  :class="getchange('CommercialNo') ? 'modified-form-input' : ''" placeholder="请输入" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+
+
+            <el-col :span="8">
+              <el-form-item label="税务登记证编号" prop="CountryTaxNo" v-if="showorhidflag=='show'">
+                <el-input v-model="formData.CountryTaxNo" maxlength="50" :readonly="true"
+                  :class="getchange('CountryTaxNo') ? 'modified-form-input' : ''" placeholder="请输入" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="组织机构代码" prop="OrganCode" v-if="showorhidflag=='show'">
+                <el-input v-model="formData.OrganCode" maxlength="50" :readonly="true" placeholder="请输入"
+                  :class="getchange('OrganCode') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="注册地址" prop="Province">
+                <el-row>
+                  <el-col :span="10">
+                    <el-cascader :options="countryoptions" :props="countryprops" maxlength="20"
+                      :class="getchange('Province') ? 'modified-form-input' : ''" :readonly="true" placeholder="省市区"
+                      v-model="CityAry" style="width: 100%">
+                    </el-cascader>
+                  </el-col>
+                  <el-col :span="14">
+                    <el-input v-model="formData.Address" maxlength="500" :readonly="true" placeholder="详细地址"
+                      style="width: 100%" :class="getchange('Address') ? 'modified-form-input' : ''">
+                    </el-input>
+                  </el-col>
+                </el-row>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="邮编" prop="ZipCode">
+                <el-input v-model="formData.ZipCode" maxlength="20" :readonly="true" placeholder="请输入"
+                  :class="getchange('ZipCode') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="16">
+              <el-form-item label="通信地址" prop="LinkProvince">
+                <el-row>
+                  <el-col :span="10">
+                    <el-cascader :options="countryoptions" :props="countryprops" :readonly="true"
+                      :class="getchange('LinkProvince') ? 'modified-form-input' : ''" placeholder="省市区"
+                      v-model="LinkCityAry" maxlength="20" style="width: 100%">
+                    </el-cascader>
+                  </el-col>
+                  <el-col :span="14">
+                    <el-input v-model="formData.LinkAddress" maxlength="500" :readonly="true" placeholder="详细地址"
+                      style="width: 100%" :class="getchange('LinkAddress') ? 'modified-form-input' : ''">
+                    </el-input>
+                  </el-col>
+                </el-row>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="邮编" prop="LinkZipCode">
+                <el-input v-model="formData.LinkZipCode" maxlength="20" :readonly="true" placeholder="请输入"
+                  :class="getchange('LinkZipCode') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+
+            <el-col :span="8">
+              <el-form-item label="法定代表人姓名" prop="LegalPerson">
+                <el-input v-model="formData.LegalPerson" maxlength="20" :readonly="true" placeholder="请输入"
+                  :class="getchange('LegalPerson') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="公司类型" prop="CompanyType">
+                <!--<el-input v-model="formData.CompanyType" placeholder="请输入" style="width: 100%"></el-input>-->
+                <el-select v-model="formData.CompanyType" maxlength="50" filterable allow-create
+                  :class="getchange('CompanyType') ? 'modified-form-input' : ''" :readonly="true" placeholder="请选择"
+                  style="width: 100%;">
+                  <el-option v-for="item in CompanyTypeOptions" :key="item.Id" :label="item.Key" :value="item.Value"
+                    style="width: 100%">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="注册资本" prop="RegCapital">
+                <el-input type="number" v-model="formData.RegCapital" :min="1" :readonly="true"
+                  :class="getchange('RegCapital') ? 'modified-form-input' : ''" placeholder="请输入" style="width: 100%">
+                  <template slot="append">万元</template>
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="成立时间">
+                <el-date-picker v-model="formData.SetupTime" type="date" :readonly="true"
+                  :class="getchange('SetupTime') ? 'modified-form-input' : ''" format="yyyy 年 MM 月 dd 日"
+                  value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="开户银行" prop="DepositBank">
+                <el-input v-model="formData.DepositBank" maxlength="50" :readonly="true" placeholder="请输入"
+                  :class="getchange('DepositBank') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="银行账号" prop="BankAccount">
+                <el-input v-model="formData.BankAccount" maxlength="50" :readonly="true" placeholder="请输入"
+                  :class="getchange('BankAccount') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="联系人姓名" prop="ContactName">
+                <el-input v-model="formData.ContactName" maxlength="20" :readonly="true" placeholder="请输入"
+                  :class="getchange('ContactName') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="移动电话" prop="Mobile">
+                <el-input v-model="formData.Mobile" maxlength="20" :readonly="true" placeholder="请输入"
+                  :class="getchange('Mobile') ? 'modified-form-input' : ''" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="固定电话" prop="Telphone">
+                <el-input v-model="formData.Telphone" maxlength="20" :readonly="true" placeholder="请输入"
+                  :class="getchange('Telphone') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="传真" prop="Fax">
+                <el-input v-model="formData.Fax" maxlength="20" :readonly="true" placeholder="请输入"
+                  :class="getchange('Fax') ? 'modified-form-input' : ''" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="财务电话" prop="CompanyTel">
+                <el-input v-model="formData.CompanyTel" :readonly="true" placeholder="请输入" maxlength="20"
+                  :class="getchange('CompanyTel') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="电子邮箱" prop="EMail">
+                <el-input v-model="formData.EMail" maxlength="50" :readonly="true" placeholder="请输入"
+                  :class="getchange('EMail') ? 'modified-form-input' : ''" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="银行信用等级">
+                <el-input v-model="formData.BankCreditRating" maxlength="10" :readonly="true"
+                  :class="getchange('BankCreditRating') ? 'modified-form-input' : ''" placeholder="请输入"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <!-- <el-col :span="8">
+              <el-form-item label="级别">
+                <el-input v-model="formData.Level" maxlength="255" placeholder="请输入" style="width: 100%"
+                  :class="getchange('Level') ? 'modified-form-input' : ''">
+                </el-input>
+              </el-form-item>
+            </el-col> -->
+            <el-col :span="8">
+              <el-form-item label="HSE审查培训">
+                <!--<el-input v-model="formData.HseTraining" placeholder="请输入" style="width: 100%"></el-input>-->
+                <el-select v-model="formData.HseTraining" :readonly="true" placeholder="请选择"
+                  :class="getchange('HseTraining') ? 'modified-form-input' : ''" style="width: 100%;">
+                  <el-option v-for="item in HSEOptions" :key="item.value" :label="item.label" :value="item.value"
+                    style="width: 100%">
+                  </el-option>
+                </el-select>
+
+              </el-form-item>
+            </el-col>
+
+          </el-row>
+        </el-form>
+
+        <el-form label-position="top" ref="EntityFormCert" :model="formData">
+          <el-row :gutter="60">
+            <el-col :span="8">
+              <el-form-item label="质量管理体系认证情况及认证机构">
+                <el-input v-model="formData.QualitySystemCert" :readonly="true" maxlength="200" placeholder="请输入"
+                  type="textarea" :class="IsModified ? 'modified-form-input' : ''" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="产品质量认证情况及认证机构">
+                <el-input v-model="formData.ProductQualityCert" :readonly="true" placeholder="请输入" maxlength="200"
+                  type="textarea" :class="IsModified ? 'modified-form-input' : ''">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="生产/制造许可证获证情况及编号">
+                <el-input v-model="formData.MaunLicense" :readonly="true" placeholder="请输入" maxlength="200"
+                  type="textarea" :class="IsModified ? 'modified-form-input' : ''"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="所代理制造商名称">
+                <el-input v-model="formData.AgentManufacturer" :readonly="true" maxlength="255" placeholder="请输入"
+                  type="textarea" :class="IsModified ? 'modified-form-input' : ''">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="中石油物资供应商证书">
+                <el-input v-model="formData.SupplierCertificate" :readonly="true" maxlength="255" placeholder="请输入"
+                  style="width: 100%" :class="IsModified ? 'modified-form-input' : ''">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="安全生产许可证">
+                <el-input v-model="formData.SafetyLicense" :readonly="true" maxlength="200" placeholder="请输入"
+                  type="textarea" :class="IsModified ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="行业特殊要求的认证证书">
+                <el-input v-model="formData.SpecIndustryCert" :readonly="true" placeholder="请输入" maxlength="200"
+                  type="textarea" :class="IsModified ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="16">
+              <el-form-item label="营业范围" prop="BusinessScope">
+                <el-input v-model="formData.BusinessScope" :readonly="true" maxlength="200" placeholder="请输入"
+                  type="textarea" :class="IsModified ? 'modified-form-input' : ''" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="备注">
+                <el-input v-model="formData.Remark" :readonly="true" maxlength="500" placeholder="请输入" type="textarea"
+                  :class="IsModified ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+        </el-form>
+      </el-card>
+    </el-card>
+    <el-dialog title="审核" :visible.sync="commitshow">
+      <el-form label-width="120px" :model="shenheForm" ref="EntityFormref">
+        <el-row>
+          <el-col :span="24">
+            <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="0" @change="radioChange">未通过
+                </el-radio>
+              </template>
+            </el-form-item>
+            <el-form-item label="意见" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
+              <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder">
+              </el-input>
+            </el-form-item>
+          </el-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="makeSure()">确 定</el-button>
+      </span>
+      <br>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  import _ from 'lodash';
+  import supplierapi from '@/api/oilsupplier/supplier';
+  import api from '@/api/oilsupplier/infochange';
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'oilinfochangeEdit',
+
+    data() {
+      return {
+        textplaceholder: '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)',
+        secauditerOptions: [],
+        infochangedata: [],
+        infochangedatalist: [],
+        IsModified: false,
+        showorhidflag: 'hid',
+        selectoptions: [{
+          value: '1',
+          label: '三证合一'
+        }, {
+          value: '2',
+          label: '五证合一',
+        }, {
+          value: '3',
+          label: '常规'
+        }],
+        shenheForm: {
+          SuccessStatus: 1,
+          AuditorRemark: '',
+          InfoId: 0,
+          SuppId: 0,
+        },
+        disabled: false,
+        canUpdateSupplier: true,
+        audithistoryshow: false,
+        companynames: [],
+        ManagementUnitOptions: [],
+        UnitRelationOptions: [],
+        InOptions: [],
+        CompanyTypeOptions: [],
+        UnitRelationAry: [],
+        countryoptions: [],
+        countryListOptions: [],
+        countryprops: {
+          value: 'adcode',
+          label: 'name',
+          children: 'districts'
+        },
+        CityAry: [],
+        LinkCityAry: [],
+        HSEOptions: [{
+          value: '1',
+          label: '是'
+        }, {
+          value: '0',
+          label: '否'
+        }],
+        entityForm: {
+          Id: '',
+          SupplierName: '',
+          SupplierId: '',
+          SupplierTypeName: '',
+          FirstAudit: '',
+          auditer: '',
+          fushenauditer: '',
+          infoId: '',
+          Remark: ''
+        },
+        backhistroy: {
+          certId: '',
+          classId: '04',
+          workflowId: ''
+        },
+        infoitemsoptions: [{
+          value: 'SupplierName',
+          label: '企业名称'
+        }, {
+          value: 'OilCertificateNo',
+          label: '中石油供应商证书号'
+        }, {
+          value: 'Grade',
+          label: '级别'
+        }, {
+          value: 'MgrUnit',
+          label: '管理单位'
+        }, {
+          value: 'OperType',
+          label: '经营方式'
+        }],
+        orgtreeprops: {
+          value: 'id',
+          label: 'Fullname',
+          children: 'children'
+        },
+        dictData: '',
+        formData: {
+          Id: '',
+          SupplierName: '',
+          OilCertificateNo: '',
+          Grade: '',
+          MgrUnit: '',
+          OperType: '',
+          Country: '',
+          MaunAgent: '',
+          ConstructTeam: '',
+          CommercialNo: '',
+          OrganCode: '',
+          CountryTaxNo: '',
+          LocalTaxNo: '',
+          Address: '',
+          Province: '',
+          City: '',
+          Street: '',
+          HouseNo: '',
+          ZipCode: '',
+          LinkAddress: '',
+          LinkProvince: '',
+          LinkCity: '',
+          LinkStreet: '',
+          LinkHouseNo: '',
+          LinkZipCode: '',
+          QualitySystemCert: '',
+          ProductQualityCert: '',
+          MaunLicense: '',
+          QualifCert: '',
+          QualifCertLevel: '',
+          SafetyLicense: '',
+          TechServiceLic: '',
+          TJInNotify: '',
+          SpecIndustryCert: '',
+          LegalPerson: '',
+          CategoryCode: '',
+          CategoryName: '',
+          RegCapital: '',
+          Currency: '',
+          ContactName: '',
+          CompanyType: '',
+          SetupTime: null,
+          DepositBank: '',
+          BankAccount: '',
+          EMail: '',
+          BankCreditRating: '',
+          Mobile: '',
+          Telphone: '',
+          Fax: '',
+          CompanyTel: '',
+          QQ: '',
+          CompanyUrl: '',
+          SpecSupplier: '',
+          SpecTypeCode: '',
+          SpecTypeName: '',
+          WorkerTotal: 0,
+          ContractNum: 0,
+          UniversityNum: 0,
+          TechnicalNum: 0,
+          AboveProfNum: 0,
+          MiddleProfNum: 0,
+          NationalRegNum: 0,
+          NationalCertTotal: 0,
+          DesignerTotal: 0,
+          SkillerTotal: 0,
+          Remark: '',
+          // IsDelete: '',
+          // CreateOn: '',
+          // CreateUserId: '',
+          // CreateBy: '',
+          // ModifiedOn: '',
+          // ModifiedUserId: '',
+          // ModifiedBy: '',
+          CertId: 0,
+          SupplierTypeCode: '',
+          SupplierTypeName: '',
+          Step: 0,
+          HseTraining: '0',
+          AuditIndex: 0,
+          PACNumber: ""
+        },
+        chooseAuditorVisible: false,
+        fushenauditer: '', //复审人员
+        auditer: '',
+        auditerName: '',
+        supplierId: '',
+        auditerOption: [],
+        commitshow: false,
+        InfoData: [],
+        AddChangeShow: false,
+        UnitRelationOptions: [],
+        UnitRelationAry: [],
+        countryoptions: [],
+        selectuserlist: [],
+        countryprops: {
+          value: 'adcode',
+          label: 'name',
+          children: 'districts'
+        },
+        infochangeItemList: [],
+        infochangeForm: {
+          SelectItem: '',
+          BeChangeInfo: '',
+          ChangeInfo: '',
+        },
+        serviceId: '',
+        certId: '',
+        InfoStatus: '',
+        butnab: false,
+        infoId: '',
+        SuppId: '',
+      }
+    },
+    created() {
+      this.SuppId = this.$route.query.SupId
+      this.serviceId = this.$route.params.opera
+      this.InfoStatus = this.$route.query.InfoStatus
+      this.infoId = this.serviceId
+      this.initDatas()
+      this.auditget()
+      this.GetItemsDatas()
+      this.getDictOptions()
+    },
+    methods: {
+      initDatas() {
+        if (this.SuppId) {
+          api.GetChangeEntity(this.SuppId, this.$axios)
+            .then(res => {
+              this.formData = res.data;
+              this.CityAry = []
+              this.CityAry.push(this.formData.Province)
+              this.CityAry.push(this.formData.City)
+              this.CityAry.push(this.formData.Street)
+              this.LinkCityAry = []
+              this.LinkCityAry.push(this.formData.LinkProvince)
+              this.LinkCityAry.push(this.formData.LinkCity)
+              this.LinkCityAry.push(this.formData.LinkStreet)
+              console.log("this.formData", this.formData)
+            })
+            .catch(err => {
+              console.error(err);
+            });
+        }
+      },
+      getchange(key) {
+        for (var i = 0; i < this.infochangedata.length; i++) {
+          if (this.infochangedata[i].SelectItem == key) {
+            return true
+          }
+        }
+        return false
+      },
+      GetItemsDatas() {
+        if (this.infoId) {
+          api.getEntityThen(this.infoId, this.$axios)
+            .then(res => {
+              this.infochangedata = res.data.items;
+              console.log("this.infochangedata", this.infochangedata)
+            })
+            .catch(err => {
+              console.error(err);
+            });
+        }
+      },
+      getDictOptions() {
+        let params = {
+          status: this.formData.Status,
+          majorAduit: this.formData.ThirdAudit
+        }
+        supplierapi.getDictListByStatus(params, this.$axios).then(res => {
+          this.dictData = res.data.items
+          this.ManagementUnitOptions = this.dictData['ManagementUnit']
+          this.UnitRelationOptions = this.dictData['UnitRelation']
+          this.InOptions = this.dictData['InOptions']
+          this.CompanyTypeOptions = this.dictData['CompanyType']
+          this.getCityList(this.dictData['GaodeMapChinaAreas'])
+          this.getCountryList(this.dictData['CountryList'])
+          let suppliers = this.dictData['CompanyNames']
+          for (let idx in suppliers) {
+            suppliers[idx]['value'] = suppliers[idx].SupplierName
+            this.companynames.push(suppliers[idx])
+          }
+          if (this.authUser && this.authUser.Profile.IsCompanyUser === 1 && this.companynames.length > 0) {
+            if (!this.formData.Id) {
+              this.formData.SupplierName = ''
+            }
+            this.companyReadonly = true
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      getCityList(val) {
+        let resultData = JSON.parse(val)
+        let countstr = JSON.stringify(resultData.districts[0].districts)
+        countstr = countstr.replace(/\,\"districts\"\:\[\]/g, '')
+        this.countryoptions = JSON.parse(countstr)
+      },
+      getCountryList(val) {
+        let tmpJson = JSON.parse(val)
+        this.countryListOptions = []
+        for (let idx in tmpJson) {
+          this.countryListOptions.push({
+            label: tmpJson[idx].split('-')[0],
+            value: tmpJson[idx].split('-')[1],
+            code: tmpJson[idx].split('-')[2],
+            key: tmpJson[idx]
+          })
+        }
+      },
+      radioChange() {
+        if (this.shenheForm.SuccessStatus === 1) {
+          this.textplaceholder = '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)'
+        } else {
+          this.textplaceholder = '退回意见不能少于5个字'
+        }
+      },
+      itemsfilter() {
+        try {
+          let entityArray = this.InfoData
+          let arr = this.infoitemsoptions
+          if (entityArray == null) {
+            this.selectuserlist = arr
+            return false
+          }
+          this.selectuserlist = []
+          for (var i = 0; i < entityArray.length; i++) {
+            for (var j = 0; j < arr.length; j++) {
+              if (entityArray[i].SelectItem === arr[j].value) {
+                this.selectuserlist.push(arr[j])
+                arr.splice(j, 1)
+                j--
+              }
+            }
+          }
+          this.selectuserlist = arr
+        } catch (e) {
+          console.log(e)
+        }
+      },
+
+      auditget() {
+        this.auditerOption = []
+        api.getAuditer(this.$axios).then(res => {
+          this.auditerOption = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      //提交信息变更审核
+      submitInfoChange() {
+        this.commitshow = true
+      },
+      //审核通过
+      makeSure() {
+        if (this.shenheForm.SuccessStatus === 1) {
+          if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3') {
+            this.$message({
+              type: 'warning',
+              message: '审批意见不能低于20个字符!'
+            })
+            return
+          }
+        } else {
+          if (this.shenheForm.AuditorRemark.trim().length < 5 && this.formData.Status !== '3') {
+            this.$message({
+              type: 'warning',
+              message: '退回意见不能低于5个字符!'
+            })
+            return
+          }
+        }
+        this.infoChangeAuditLaw()
+      },
+      infoChangeAuditLaw() {
+        this.shenheForm.InfoId = parseInt(this.infoId)
+        this.shenheForm.SuppId = parseInt(this.SuppId)
+        api.infoAudit(this.shenheForm, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.initDatas()
+            this.commitshow = false
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      getCityList(val) {
+        let resultData = JSON.parse(val)
+        let countstr = JSON.stringify(resultData.districts[0].districts)
+        countstr = countstr.replace(/\,\"districts\"\:\[\]/g, '')
+        this.countryoptions = JSON.parse(countstr)
+      },
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+
+      formatDateTime(date) {
+        var y = date.getFullYear();
+        var m = date.getMonth() + 1;
+        m = m < 10 ? ('0' + m) : m;
+        var d = date.getDate();
+        d = d < 10 ? ('0' + d) : d;
+        var h = date.getHours();
+        var minute = date.getMinutes();
+        minute = minute < 10 ? ('0' + minute) : minute;
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      }
+    }
+  }
+
+</script>
+<style lang="scss">
+  .modified-form-input {
+    .el-input__inner {
+      background-color: wheat;
+    }
+  }
+
+</style>

+ 1167 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/operation.vue

@@ -0,0 +1,1167 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/infochange' }">供方基本信息表</el-breadcrumb-item>
+      <el-breadcrumb-item>编辑</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 编辑
+        </span>
+        <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="saveinfochange">保存</el-button>
+          <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button> -->
+          <el-button type="primary" size="mini" @click="submitInfoChange"
+            v-if="(InfoStatus == 0 || InfoStatus == '' || InfoStatus == -2 || InfoStatus == 3) && !butnab">提交申请
+          </el-button>
+          <router-link :to="'/oilsupplier/infochangech'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+        </span>
+      </div>
+
+      <el-card>
+        <el-form label-width="135px" ref="formData" :model="formData" :rules="rulesform" :disabled="disabled">
+          <el-row>
+
+            <el-col :span="16">
+              <el-form-item label="供方名称" prop="SupplierName" style="color:red;">
+                <el-autocomplete class="inline-input" v-model="formData.SupplierName" :readonly="companyReadonly"
+                  :fetch-suggestions="querySearch" :maxlength="255" placeholder="请输入内容" style="width: 100%"
+                  @select="handleSelect" v-if="authUser && authUser.Profile.IsCompanyUser == 1">
+                </el-autocomplete>
+                <el-input v-model="formData.SupplierName" :maxlength="255" @change="inputCompanyName"
+                  :readonly="!canUpdateSupplier" placeholder="请输入" style="width: 100%"
+                  :class="getchange('SupplierName') ? 'modified-form-input' : ''"
+                  v-if="!authUser || authUser.Profile.IsCompanyUser == 0">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="准入编码">
+                <el-input v-model="formData.WZAccessCardNo" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="单位关系">
+                <el-select ref="SpecType" v-model="formData.SpecTypeCode"
+                  :class="getchange('SpecTypeCode') ? 'modified-form-input' : ''" :disabled="!canUpdateSupplier"
+                  placeholder="请选择" style="width: 100%">
+                  <el-option v-for="item in UnitRelationOptions" :key="item.Id" :label="item.Key" :value="item.Value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="国家" prop="Country">
+                <el-select v-model="formData.Country" filterable placeholder="请选择" style="width: 100%"
+                  :class="getchange('Country') ? 'modified-form-input' : ''">
+                  <el-option v-for="item in countryListOptions" :key="item.key" :label="item.value" :value="item.value">
+                    <span style="float: left">{{ item.value }}</span>
+                    <span style="float: right; color: #8492a6; font-size: 13px">{{ item.label }}</span>
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <!-- <el-col :span="8">
+              <el-form-item label="准入方式">
+                <el-select ref="inStyle" v-model="formData.InStyle" :disabled="!canUpdateSupplier" placeholder="请选择"
+                  :class="getchange('InStyle') ? 'modified-form-input' : ''" style="width: 100%">
+                  <el-option v-for="item in InOptions" :key="item.Id" :label="item.Key" :value="item.Value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col> -->
+
+            <el-col :span="8">
+              <el-form-item label="管理单位">
+                <el-select filterable v-model="formData.MgrUnit" maxlength="255" :readonly="!canUpdateSupplier"
+                  :class="getchange('MgrUnit') ? 'modified-form-input' : ''" placeholder="请输入" style="width: 100%">
+                  <el-option v-for="item in ManagementUnitOptions" :key="item.Value" :label="item.Key"
+                    :value="item.Key">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="中石油准入证编号">
+                <el-input v-model="formData.PACNumber" maxlength="255" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  :class="getchange('PACNumber') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+
+
+            <el-col :span="8">
+              <el-form-item label="证件合一">
+                <el-select v-model="formData.CredentialFlag" placeholder="请选择" @change="showorhid" style="width: 100%"
+                  :class="getchange('CredentialFlag') ? 'modified-form-input' : ''">
+                  <el-option v-for="item in selectoptions" :key="item.value" :label="item.label" :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label-width="150px" label="统一社会信用代码" prop="CommercialNo">
+                <el-input v-model="formData.CommercialNo" maxlength="50" :readonly="!canUpdateSupplier"
+                  :class="getchange('CommercialNo') ? 'modified-form-input' : ''" placeholder="请输入" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+
+
+            <el-col :span="8">
+              <el-form-item label="税务登记证编号" prop="CountryTaxNo" v-if="showorhidflag=='show'">
+                <el-input v-model="formData.CountryTaxNo" maxlength="50" :readonly="!canUpdateSupplier"
+                  :class="getchange('CountryTaxNo') ? 'modified-form-input' : ''" placeholder="请输入" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="组织机构代码" prop="OrganCode" v-if="showorhidflag=='show'">
+                <el-input v-model="formData.OrganCode" maxlength="50" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  :class="getchange('OrganCode') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="注册地址" prop="Province">
+                <el-row>
+                  <el-col :span="10">
+                    <el-cascader :options="countryoptions" :props="countryprops" maxlength="20"
+                      :class="getchange('Province') ? 'modified-form-input' : ''" :readonly="!canUpdateSupplier"
+                      placeholder="省市区" v-model="CityAry" style="width: 100%" @change="handleAreaChange">
+                    </el-cascader>
+                  </el-col>
+                  <el-col :span="14">
+                    <el-input v-model="formData.Address" maxlength="500" placeholder="详细地址" style="width: 100%"
+                      :class="getchange('Address') ? 'modified-form-input' : ''">
+                    </el-input>
+                  </el-col>
+                </el-row>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="邮编" prop="ZipCode">
+                <el-input v-model="formData.ZipCode" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  :class="getchange('ZipCode') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="16">
+              <el-form-item label="通信地址" prop="LinkProvince">
+                <el-row>
+                  <el-col :span="10">
+                    <el-cascader :options="countryoptions" :props="countryprops" :readonly="!canUpdateSupplier"
+                      :class="getchange('LinkProvince') ? 'modified-form-input' : ''" placeholder="省市区"
+                      v-model="LinkCityAry" maxlength="20" style="width: 100%" @change="handleLinkAreaChange">
+                    </el-cascader>
+                  </el-col>
+                  <el-col :span="14">
+                    <el-input v-model="formData.LinkAddress" maxlength="500" placeholder="详细地址" style="width: 100%"
+                      :class="getchange('LinkAddress') ? 'modified-form-input' : ''">
+                    </el-input>
+                  </el-col>
+                </el-row>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="邮编" prop="LinkZipCode">
+                <el-input v-model="formData.LinkZipCode" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  :class="getchange('LinkZipCode') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+
+            <el-col :span="8">
+              <el-form-item label="法定代表人姓名" prop="LegalPerson">
+                <el-input v-model="formData.LegalPerson" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  :class="getchange('LegalPerson') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="公司类型" prop="CompanyType">
+                <!--<el-input v-model="formData.CompanyType" placeholder="请输入" style="width: 100%"></el-input>-->
+                <el-select v-model="formData.CompanyType" maxlength="50" filterable allow-create
+                  :class="getchange('CompanyType') ? 'modified-form-input' : ''" :disabled="!canUpdateSupplier"
+                  placeholder="请选择" style="width: 100%;">
+                  <el-option v-for="item in CompanyTypeOptions" :key="item.Id" :label="item.Key" :value="item.Value"
+                    style="width: 100%">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="注册资本" prop="RegCapital">
+                <el-input type="number" v-model="formData.RegCapital" :min="1" :readonly="!canUpdateSupplier"
+                  :class="getchange('RegCapital') ? 'modified-form-input' : ''" placeholder="请输入" style="width: 100%">
+                  <template slot="append">万元</template>
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="成立时间">
+                <el-date-picker v-model="formData.SetupTime" type="date" :readonly="!canUpdateSupplier"
+                  :class="getchange('SetupTime') ? 'modified-form-input' : ''" format="yyyy 年 MM 月 dd 日"
+                  value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="开户银行" prop="DepositBank">
+                <el-input v-model="formData.DepositBank" maxlength="50" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  :class="getchange('DepositBank') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="银行账号" prop="BankAccount">
+                <el-input v-model="formData.BankAccount" maxlength="50" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  :class="getchange('BankAccount') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="联系人姓名" prop="ContactName">
+                <el-input v-model="formData.ContactName" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  :class="getchange('ContactName') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="移动电话" prop="Mobile">
+                <el-input v-model="formData.Mobile" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  :class="getchange('Mobile') ? 'modified-form-input' : ''" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="固定电话" prop="Telphone">
+                <el-input v-model="formData.Telphone" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  :class="getchange('Telphone') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="传真" prop="Fax">
+                <el-input v-model="formData.Fax" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  :class="getchange('Fax') ? 'modified-form-input' : ''" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="财务电话" prop="CompanyTel">
+                <el-input v-model="formData.CompanyTel" :readonly="!canUpdateSupplier" placeholder="请输入" maxlength="20"
+                  :class="getchange('CompanyTel') ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="电子邮箱" prop="EMail">
+                <el-input v-model="formData.EMail" maxlength="50" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  :class="getchange('EMail') ? 'modified-form-input' : ''" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="银行信用等级">
+                <el-input v-model="formData.BankCreditRating" maxlength="10" :readonly="!canUpdateSupplier"
+                  :class="getchange('BankCreditRating') ? 'modified-form-input' : ''" placeholder="请输入"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <!-- <el-col :span="8">
+              <el-form-item label="级别">
+                <el-input v-model="formData.Level" maxlength="255" placeholder="请输入" style="width: 100%"
+                  :class="getchange('Level') ? 'modified-form-input' : ''">
+                </el-input>
+              </el-form-item>
+            </el-col> -->
+            <el-col :span="8">
+              <el-form-item label="HSE审查培训">
+                <!--<el-input v-model="formData.HseTraining" placeholder="请输入" style="width: 100%"></el-input>-->
+                <el-select v-model="formData.HseTraining" :readonly="!canUpdateSupplier" placeholder="请选择"
+                  :class="getchange('HseTraining') ? 'modified-form-input' : ''" style="width: 100%;">
+                  <el-option v-for="item in HSEOptions" :key="item.value" :label="item.label" :value="item.value"
+                    style="width: 100%">
+                  </el-option>
+                </el-select>
+
+              </el-form-item>
+            </el-col>
+
+          </el-row>
+        </el-form>
+
+        <el-form label-position="top" ref="EntityFormCert" :rules="rulesform" :model="formData" :disabled="disabled">
+          <el-row :gutter="60">
+            <el-col :span="8">
+              <el-form-item label="质量管理体系认证情况及认证机构">
+                <el-input v-model="formData.QualitySystemCert" maxlength="200" placeholder="请输入" type="textarea"
+                  :class="IsModified ? 'modified-form-input' : ''" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="产品质量认证情况及认证机构">
+                <el-input v-model="formData.ProductQualityCert" placeholder="请输入" maxlength="200" type="textarea"
+                  :class="IsModified ? 'modified-form-input' : ''">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="生产/制造许可证获证情况及编号">
+                <el-input v-model="formData.MaunLicense" placeholder="请输入" maxlength="200" type="textarea"
+                  :class="IsModified ? 'modified-form-input' : ''"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="所代理制造商名称">
+                <el-input v-model="formData.AgentManufacturer" maxlength="255" placeholder="请输入" type="textarea"
+                  :class="IsModified ? 'modified-form-input' : ''">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="中石油物资供应商证书">
+                <el-input v-model="formData.SupplierCertificate" maxlength="255" placeholder="请输入" style="width: 100%"
+                  :class="IsModified ? 'modified-form-input' : ''">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="安全生产许可证">
+                <el-input v-model="formData.SafetyLicense" maxlength="200" placeholder="请输入" type="textarea"
+                  :class="IsModified ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="行业特殊要求的认证证书">
+                <el-input v-model="formData.SpecIndustryCert" placeholder="请输入" maxlength="200" type="textarea"
+                  :class="IsModified ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="16">
+              <el-form-item label="营业范围" prop="BusinessScope">
+                <el-input v-model="formData.BusinessScope" maxlength="200" placeholder="请输入" type="textarea"
+                  :class="IsModified ? 'modified-form-input' : ''" style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="备注">
+                <el-input v-model="formData.Remark" maxlength="500" placeholder="请输入" type="textarea"
+                  :class="IsModified ? 'modified-form-input' : ''" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+        </el-form>
+      </el-card>
+    </el-card>
+
+    <el-dialog title="提交申请" :visible.sync="commitshow" width="360px">
+      <el-form label-width="90px" :model="entityForm" ref="EntityFormref">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="初审人员">
+              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择初审人">
+                <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
+              </el-input>
+            </el-form-item>
+            <el-form-item label="复审人员">
+              <el-select ref="selectAuditer" v-model="fushenauditer" placeholder="请选择复审人" style="width: 100%" filterable
+                allow-create default-first-option>
+                <el-option v-for="item in secauditerOptions" :key="item.id" :label="item.realname" :value="item.id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="说明">
+              <el-input v-model="entityForm.Remark" type="textarea" 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>
+      </span>
+      <br>
+    </el-dialog>
+    <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
+      :visible="chooseAuditorVisible"></choose-auditor>
+    <el-dialog title="审批历史" :visible.sync="audithistoryshow" width="1200px">
+      <wf-back-history ref="WfBackHistory" :entryinfo="backhistroy"></wf-back-history>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  import _ from 'lodash';
+  import supplierapi from '@/api/oilsupplier/supplier';
+  import api from '@/api/oilsupplier/infochange';
+  import WfBackHistory from '@/components/workflow/wfbackhistory.vue'
+  import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
+  export default {
+    components: {
+      WfBackHistory,
+      ChooseAuditor
+    },
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'oilinfochangeEdit',
+    props: {
+      formData: {
+        type: Object,
+        default: {}
+      },
+    },
+    watch: {
+      formData: {
+        handler(newValue) {
+          this.comparevalue(newValue)
+
+        },
+        deep: true
+      }
+    },
+    data() {
+      var checkemail = (rule, value, callback) => {
+        console.log(value)
+        if (value) {
+          let re = /^([a-zA-Z0-9]+[_|-|.|-]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|-|.|-]?)*[a-zA-Z0-9]+.[a-zA-Z]{2,3}$/
+          if (!re.test(value)) {
+            callback(new Error('请输入正确的邮箱地址'))
+          } else {
+            callback()
+          }
+        } else {
+          callback()
+        }
+      };
+
+      var checkCommercialNo = (rule, value, callback) => {
+        console.log("showorhidflag" + this.showorhidflag)
+        if (!value) {
+          callback(new Error('请输入统一社会信用代码'));
+        } else {
+          if (this.showorhidflag == 'hid') {
+            let re = /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/g
+            if (!re.test(value)) {
+              callback(new Error('请输入正确的统一社会信用代码'))
+            } else {
+              callback()
+            }
+          } else {
+            callback()
+          }
+        }
+      };
+      //查找是否有公司信息,若有则补全信息。
+      var checkSupplierName = (rule, value, callback) => {
+        if (!value) {
+          callback(new Error('请输入供方名称'));
+        } else {
+          //this.searchSupplierName();
+          callback();
+        }
+      };
+      //检查邮编格式
+      var checkZipCode = (rule, value, callback) => {
+        if (!value) {
+          callback(new Error('请输入邮编'));
+        } else {
+          let re = /^[1-9]\d{5}$/
+          if (!re.test(value)) {
+            callback(new Error('请输入正确的邮编'))
+          } else {
+            callback()
+          }
+        }
+      };
+      //检查手机号
+      var checkMobile = (rule, value, callback) => {
+        if (!value) {
+          callback(new Error('请输入手机号码'));
+        } else {
+          let re = /^1[3456789]\d{9}$/
+          if (!re.test(value)) {
+            callback(new Error('请输入正确的手机号码'))
+          } else {
+            callback()
+          }
+        }
+      };
+
+      //固话检验
+      var checkTelphone = (rule, value, callback) => {
+        if (!value) {
+          callback(new Error('请输入固话号码'));
+        } else {
+          let re = /^((0\d{2,3}-\d{7,8})|(1[3584]\d{9}))$/
+          if (!re.test(value)) {
+            callback(new Error('请输入正确的固话格式为:0000-0000000'))
+          } else {
+            callback()
+          }
+        }
+      };
+      return {
+        secauditerOptions: [],
+        infochangedata: [],
+        infochangedatalist: [],
+        copyformdata: '',
+        IsModified: false,
+        showorhidflag: 'hid',
+        selectoptions: [{
+          value: '1',
+          label: '三证合一'
+        }, {
+          value: '2',
+          label: '五证合一',
+        }, {
+          value: '3',
+          label: '常规'
+        }],
+        disabled: false,
+        canUpdateSupplier: true,
+        audithistoryshow: false,
+        companynames: [],
+        ManagementUnitOptions: [],
+        UnitRelationOptions: [],
+        InOptions: [],
+        CompanyTypeOptions: [],
+        UnitRelationAry: [],
+        countryoptions: [],
+        countryListOptions: [],
+        countryprops: {
+          value: 'adcode',
+          label: 'name',
+          children: 'districts'
+        },
+        CityAry: [],
+        LinkCityAry: [],
+        HSEOptions: [{
+          value: '1',
+          label: '是'
+        }, {
+          value: '0',
+          label: '否'
+        }],
+        entityForm: {
+          Id: '',
+          SupplierName: '',
+          SupplierId: '',
+          SupplierTypeName: '',
+          FirstAudit: '',
+          auditer: '',
+          fushenauditer: '',
+          MInfoId: '',
+          Remark: ''
+        },
+        backhistroy: {
+          certId: '',
+          classId: '04',
+          workflowId: ''
+        },
+        infoitemsoptions: [{
+          value: 'SupplierName',
+          label: '企业名称'
+        }, {
+          value: 'OilCertificateNo',
+          label: '中石油供应商证书号'
+        }, {
+          value: 'Grade',
+          label: '级别'
+        }, {
+          value: 'MgrUnit',
+          label: '管理单位'
+        }, {
+          value: 'OperType',
+          label: '经营方式'
+        }],
+        orgtreeprops: {
+          value: 'id',
+          label: 'Fullname',
+          children: 'children'
+        },
+        dictData: '',
+        formData: {
+          Id: '',
+          SupplierName: '',
+          OilCertificateNo: '',
+          Grade: '',
+          MgrUnit: '',
+          OperType: '',
+          Country: '',
+          MaunAgent: '',
+          ConstructTeam: '',
+          CommercialNo: '',
+          OrganCode: '',
+          CountryTaxNo: '',
+          LocalTaxNo: '',
+          Address: '',
+          Province: '',
+          City: '',
+          Street: '',
+          HouseNo: '',
+          ZipCode: '',
+          LinkAddress: '',
+          LinkProvince: '',
+          LinkCity: '',
+          LinkStreet: '',
+          LinkHouseNo: '',
+          LinkZipCode: '',
+          QualitySystemCert: '',
+          ProductQualityCert: '',
+          MaunLicense: '',
+          QualifCert: '',
+          QualifCertLevel: '',
+          SafetyLicense: '',
+          TechServiceLic: '',
+          TJInNotify: '',
+          SpecIndustryCert: '',
+          LegalPerson: '',
+          CategoryCode: '',
+          CategoryName: '',
+          RegCapital: '',
+          Currency: '',
+          ContactName: '',
+          CompanyType: '',
+          SetupTime: null,
+          DepositBank: '',
+          BankAccount: '',
+          EMail: '',
+          BankCreditRating: '',
+          Mobile: '',
+          Telphone: '',
+          Fax: '',
+          CompanyTel: '',
+          QQ: '',
+          CompanyUrl: '',
+          SpecSupplier: '',
+          SpecTypeCode: '',
+          SpecTypeName: '',
+          WorkerTotal: 0,
+          ContractNum: 0,
+          UniversityNum: 0,
+          TechnicalNum: 0,
+          AboveProfNum: 0,
+          MiddleProfNum: 0,
+          NationalRegNum: 0,
+          NationalCertTotal: 0,
+          DesignerTotal: 0,
+          SkillerTotal: 0,
+          Remark: '',
+          // IsDelete: '',
+          // CreateOn: '',
+          // CreateUserId: '',
+          // CreateBy: '',
+          // ModifiedOn: '',
+          // ModifiedUserId: '',
+          // ModifiedBy: '',
+          CertId: 0,
+          SupplierTypeCode: '',
+          SupplierTypeName: '',
+          Step: 0,
+          HseTraining: '0',
+          AuditIndex: 0,
+          PACNumber: ""
+        },
+        chooseAuditorVisible: false,
+        fushenauditer: '', //复审人员
+        auditer: '',
+        auditerName: '',
+        supplierId: '',
+        auditerOption: [],
+        commitshow: false,
+        InfoData: [],
+        AddChangeShow: false,
+        UnitRelationOptions: [],
+        UnitRelationAry: [],
+        countryoptions: [],
+        selectuserlist: [],
+        countryprops: {
+          value: 'adcode',
+          label: 'name',
+          children: 'districts'
+        },
+        infochangeItemList: [],
+        infochangeForm: {
+          SelectItem: '',
+          BeChangeInfo: '',
+          ChangeInfo: '',
+        },
+        serviceId: '',
+        certId: '',
+        InfoStatus: '',
+        butnab: false,
+        MInfoId: '',
+        rulesform: {
+          Mobile: [{
+            required: true,
+            validator: checkMobile,
+            trigger: 'change'
+          }],
+
+          Telphone: [{
+            required: true,
+            validator: checkTelphone,
+            trigger: 'change'
+          }],
+          BusinessScope: [{
+            required: true,
+            message: '请输入营业范围',
+            trigger: 'change'
+          }],
+          ZipCode: [{
+            required: true,
+            validator: checkZipCode,
+            trigger: 'change'
+          }],
+          LinkZipCode: [{
+            required: true,
+            validator: checkZipCode,
+            trigger: 'change'
+          }],
+          SupplierName: [{
+            required: true,
+            validator: checkSupplierName,
+            trigger: 'change'
+          }],
+          Country: [{
+            required: true,
+            message: '请输入国家',
+            trigger: 'change'
+          }],
+          CommercialNo: [{
+            required: true,
+            validator: checkCommercialNo,
+            trigger: 'change'
+          }],
+          CountryTaxNo: [{
+            required: true,
+            message: '请输入税务登记证编号',
+            trigger: 'change'
+          }],
+          CompanyType: [{
+            required: true,
+            message: '请选择公司类型',
+            trigger: 'change'
+          }],
+          LegalPerson: [{
+            required: true,
+            message: '请输入法定代表人姓名',
+            trigger: 'change'
+          }],
+          Province: [{
+            required: true,
+            message: '请选择省市区',
+            trigger: 'change'
+          }],
+          Address: [{
+            required: true,
+            message: '请输入注册地址',
+            trigger: 'change'
+          }],
+          EMail: [{
+            required: false,
+            validator: checkemail,
+            trigger: 'change'
+          }],
+          OrganCode: [{
+            required: true,
+            message: '请输入组织机构代码',
+            trigger: 'change'
+          }],
+
+          RegCapital: [{
+            required: true,
+            message: '请输入注册资本',
+            trigger: 'change'
+          }],
+          DepositBank: [{
+            required: true,
+            message: '请输入开户银行',
+            trigger: 'change'
+          }],
+          BankAccount: [{
+            required: true,
+            message: '请输入银行账号',
+            trigger: 'change'
+          }],
+          ContactName: [{
+            required: true,
+            message: '请输入联系人姓名',
+            trigger: 'change'
+          }],
+          CompanyTel: [{
+            required: true,
+            message: '请输入财务电话',
+            trigger: 'change'
+          }],
+
+          LinkProvince: [{
+            required: true,
+            message: '请选择省市区',
+            trigger: 'change'
+          }],
+          LinkAddress: [{
+            required: true,
+            message: '请输入通信地址',
+            trigger: 'change'
+          }],
+          realname: [{
+            required: true,
+            message: '用户名',
+            trigger: 'blur'
+          }],
+        },
+      }
+    },
+    created() {
+      this.serviceId = this.$route.params.opera
+      this.supplierId = this.serviceId
+      this.InfoStatus = this.$route.query.InfoStatus
+      this.MInfoId = this.$route.query.infoId
+      this.backhistroy.certId = this.MInfoId
+      this.formData.Id = this.serviceId
+      this.initDatas()
+      this.GetItemsDatas()
+      this.getDictOptions()
+    },
+    methods: {
+      initDatas() {
+        if (this.formData.Id) {
+          api.GetChangeEntity(this.formData.Id, this.$axios)
+            .then(res => {
+              this.formData = res.data;
+              this.copyformdata = _.cloneDeep(this.formData);
+              this.CityAry = []
+              this.CityAry.push(this.formData.Province)
+              this.CityAry.push(this.formData.City)
+              this.CityAry.push(this.formData.Street)
+              this.LinkCityAry = []
+              this.LinkCityAry.push(this.formData.LinkProvince)
+              this.LinkCityAry.push(this.formData.LinkCity)
+              this.LinkCityAry.push(this.formData.LinkStreet)
+              console.log("this.formData", this.formData)
+            })
+            .catch(err => {
+              console.error(err);
+            });
+        }
+      },
+      getchange(key) {
+        if (this.infochangedata) {
+          for (var i = 0; i < this.infochangedata.length; i++) {
+            if (this.infochangedata[i].SelectItem == key) {
+              return true
+            }
+          }
+          return false
+        }
+
+      },
+      GetItemsDatas() {
+        if (this.MInfoId) {
+          api.getEntityThen(this.MInfoId, this.$axios)
+            .then(res => {
+              this.infochangedata = res.data.items;
+              console.log("this.infochangedata", this.infochangedata)
+            })
+            .catch(err => {
+              console.error(err);
+            });
+        }
+      },
+      comparevalue(newValue) {
+        let _this = this
+        _this.infochangeItemList = []
+        _.forEach(newValue, function (value, key) {
+          if (_this.copyformdata[key] != value) {
+            _this.infochangeForm = {}
+            _this.infochangeForm.SelectItem = key
+            _this.infochangeForm.ChangeInfo = value
+            _this.infochangeForm.BeChangeInfo = _this.copyformdata[key]
+            _this.infochangeItemList.push(_this.infochangeForm)
+          }
+        })
+        console.log("-3--", _this.infochangeItemList)
+      },
+      showorhid(val) {
+        console.log(val)
+        if (val == '1' || val == '2') {
+          this.showorhidflag = 'hid'
+        } else {
+          this.showorhidflag = 'show'
+        }
+      },
+      handleSelect(item) {
+
+      },
+      inputCompanyName(val) {
+
+      },
+      getDictOptions() {
+        let params = {
+          status: this.formData.Status,
+          majorAduit: this.formData.ThirdAudit
+        }
+        supplierapi.getDictListByStatus(params, this.$axios).then(res => {
+          this.dictData = res.data.items
+          this.ManagementUnitOptions = this.dictData['ManagementUnit']
+          this.UnitRelationOptions = this.dictData['UnitRelation']
+          this.InOptions = this.dictData['InOptions']
+          this.CompanyTypeOptions = this.dictData['CompanyType']
+          this.getCityList(this.dictData['GaodeMapChinaAreas'])
+          this.getCountryList(this.dictData['CountryList'])
+          let suppliers = this.dictData['CompanyNames']
+          for (let idx in suppliers) {
+            suppliers[idx]['value'] = suppliers[idx].SupplierName
+            this.companynames.push(suppliers[idx])
+          }
+          if (this.authUser && this.authUser.Profile.IsCompanyUser === 1 && this.companynames.length > 0) {
+            if (!this.formData.Id) {
+              this.formData.SupplierName = ''
+            }
+            this.companyReadonly = true
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      //审批历史
+      auhistory() {
+        this.audithistoryshow = true
+      },
+      //保存信息变更数据
+      saveinfochange() {
+        let AllInfochangeItemList = {
+          SupplierId: this.serviceId,
+          MInfoId: this.MInfoId,
+          InfochangeForm: this.infochangeItemList
+        }
+        console.log("save", AllInfochangeItemList)
+
+        api.addInfoChangeItemCh(AllInfochangeItemList, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            //保存成功后,初始化数据,变成修改
+            this.initDatas();
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            });
+
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            });
+          }
+        }).catch(err => {
+          console.error(err)
+        });
+      },
+      setAuditer(val, name) {
+        this.auditer = val
+        this.auditerName = name
+        this.chooseAuditorVisible = false
+      },
+      chooseAuditorShow() {
+        this.$refs['chooseAuditor'].getorgtreelist()
+        this.chooseAuditorVisible = true
+      },
+      getCityList(val) {
+        let resultData = JSON.parse(val)
+        let countstr = JSON.stringify(resultData.districts[0].districts)
+        countstr = countstr.replace(/\,\"districts\"\:\[\]/g, '')
+        this.countryoptions = JSON.parse(countstr)
+      },
+      getCountryList(val) {
+        let tmpJson = JSON.parse(val)
+        this.countryListOptions = []
+        for (let idx in tmpJson) {
+          this.countryListOptions.push({
+            label: tmpJson[idx].split('-')[0],
+            value: tmpJson[idx].split('-')[1],
+            code: tmpJson[idx].split('-')[2],
+            key: tmpJson[idx]
+          })
+        }
+      },
+      setAuditer(val, name) {
+        this.auditer = val;
+        this.auditerName = name;
+        this.chooseAuditorVisible = false;
+        this.auditOrgChang(this.auditer)
+      },
+      auditOrgChang(val) {
+        let auditstepcode = "SECOND_TRIAL";
+        supplierapi.getAuditerByFirst(val, auditstepcode, this.$axios)
+          .then(res => {
+            this.secauditerOptions = res.data.item
+          })
+          .catch(err => {
+            console.error(err);
+          });
+      },
+      handleAreaChange(value) {
+        this.formData.Province = value[0]
+        this.formData.City = value[1]
+        this.formData.Street = value[2]
+        //this.formData.ZipCode = value[2]
+      },
+      handleLinkAreaChange(value) {
+        this.formData.LinkProvince = value[0]
+        this.formData.LinkCity = value[1]
+        this.formData.LinkStreet = value[2]
+        //this.formData.LinkZipCode = value[2]
+      },
+      //提交信息变更审核
+      submitInfoChange() {
+        this.commitshow = true
+      },
+      addInfoChangeAudit() {
+        if (this.auditer === "") {
+          this.$message({
+            type: "warning",
+            message: "请选择初审人!"
+          })
+          return
+        }
+        if (this.fushenauditer === "") {
+          this.$message({
+            type: "warning",
+            message: "请选择复审人!"
+          })
+          return
+        }
+        this.entityForm.fushenauditer = this.fushenauditer
+        this.entityForm.auditer = this.auditer
+        this.entityForm.MInfoId = this.MInfoId + ""
+        console.log("==this.entityForm====", this.entityForm)
+        api.commitAuditEntity(this.supplierId, this.entityForm, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.initDatas()
+            this.commitshow = false
+            this.butnab = true
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      //删除信息变更项
+      deleteEntity(row) {
+        api.deleteEntity(row.Id, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.initDatas();
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            });
+
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            });
+          }
+        }).catch(err => {
+          console.error(err)
+        });
+      },
+      getCityList(val) {
+        let resultData = JSON.parse(val)
+        let countstr = JSON.stringify(resultData.districts[0].districts)
+        countstr = countstr.replace(/\,\"districts\"\:\[\]/g, '')
+        this.countryoptions = JSON.parse(countstr)
+      },
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+
+      formatDateTime(date) {
+        var y = date.getFullYear();
+        var m = date.getMonth() + 1;
+        m = m < 10 ? ('0' + m) : m;
+        var d = date.getDate();
+        d = d < 10 ? ('0' + d) : d;
+        var h = date.getHours();
+        var minute = date.getMinutes();
+        minute = minute < 10 ? ('0' + minute) : minute;
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      }
+    }
+  }
+
+</script>
+
+<style lang="scss">
+  .modified-form-input {
+    .el-input__inner {
+      background-color: wheat;
+    }
+  }
+
+</style>

+ 650 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/operationbasic.vue

@@ -0,0 +1,650 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/infochange' }">供方基本信息表</el-breadcrumb-item>
+      <el-breadcrumb-item>编辑</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 编辑
+        </span>
+        <span style="float: right;">
+          <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="historychange">历史变更</el-button> -->
+          <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button> -->
+          <el-button type="primary" size="mini" @click="submitInfoChange"
+            v-if="(InfoStatus == 0 || InfoStatus == '' || InfoStatus == -2 || InfoStatus == 3) && !butnab">提交申请</el-button>
+          <router-link :to="'/oilsupplier/infochangech'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+        </span>
+      </div>
+
+      <el-card>
+        <el-form label-width="135px" ref="EntityForm" :model="formData" :rules="rulesform" :disabled="disabled">
+      <el-row>
+
+        <el-col :span="16">
+          <el-form-item label="供方名称" prop="SupplierName">
+            <el-autocomplete class="inline-input" v-model="formData.SupplierName" :readonly="companyReadonly"
+              :fetch-suggestions="querySearch" :maxlength="255" placeholder="请输入内容" style="width: 100%"
+              @select="handleSelect" v-if="authUser && authUser.Profile.IsCompanyUser == 1">
+            </el-autocomplete>
+            <el-input v-model="formData.SupplierName" :maxlength="255" @change="inputCompanyName"
+              :readonly="!canUpdateSupplier" placeholder="请输入" style="width: 100%"
+              v-if="!authUser || authUser.Profile.IsCompanyUser == 0">
+            </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="单位关系">
+            <el-select ref="SpecType" v-model="formData.SpecTypeCode" :disabled="!canUpdateSupplier"
+               placeholder="请选择" style="width: 100%">
+              <el-option v-for="item in UnitRelationOptions" :key="item.Id" :label="item.Key" :value="item.Value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="准入方式">
+            <el-select ref="SpecType" v-model="formData.InStyle" :disabled="!canUpdateSupplier"
+                       placeholder="请选择" style="width: 100%">
+              <el-option v-for="item in InOptions" :key="item.Id" :label="item.Key" v-if="item.Value != '2' && item.Value != '3'"
+                         :value="item.Value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+          <el-col :span="8">
+           <el-form-item label="证件合一">
+            <el-select v-model="formData.CredentialFlag" placeholder="请选择"  @change="showorhid"  style="width: 100%">
+              <el-option v-for="item in selectoptions" :key="item.value" :label="item.label" :value="item.value">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+
+
+        <el-col :span="8">
+          <el-form-item label="统一社会信用代码" prop="CommercialNo">
+            <el-input v-model="formData.CommercialNo" maxlength="50" :readonly="!canUpdateSupplier" placeholder="请输入"
+              style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="税务登记证编号" prop="CountryTaxNo" v-if="showorhidflag=='show'">
+            <el-input v-model="formData.CountryTaxNo" maxlength="50" :readonly="!canUpdateSupplier" placeholder="请输入"
+              style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="组织机构代码" prop="OrganCode" v-if="showorhidflag=='show'">
+            <el-input v-model="formData.OrganCode" maxlength="50" :readonly="!canUpdateSupplier" placeholder="请输入"
+              style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        </el-row>
+        <el-row>
+        <el-col :span="16">
+          <el-form-item label="注册地址" prop="Province">
+            <el-row>
+              <el-col :span="10">
+                <el-cascader :options="countryoptions" :props="countryprops" :disabled="!canUpdateSupplier"
+                  :readonly="!canUpdateSupplier" placeholder="省市区" v-model="CityAry" style="width: 100%"
+                  @change="handleAreaChange"></el-cascader>
+              </el-col>
+              <el-col :span="14">
+                <el-input v-model="formData.Address" props="Address" maxlength="500" :readonly="!canUpdateSupplier"
+                  placeholder="详细地址" style="width: 100%">
+                </el-input>
+              </el-col>
+            </el-row>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="邮编" prop="ZipCode">
+            <el-input v-model="formData.ZipCode" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+              style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="16">
+          <el-form-item label="通信地址" prop="LinkProvince">
+            <el-row>
+              <el-col :span="10">
+                <el-cascader :options="countryoptions" :props="countryprops" :disabled="!canUpdateSupplier"
+                  placeholder="省市区" v-model="LinkCityAry" style="width: 100%"
+                  @change="handleLinkAreaChange">
+                </el-cascader>
+              </el-col>
+              <el-col :span="14">
+                <el-input v-model="formData.LinkAddress" props="LinkAddress" maxlength="500" placeholder="详细地址"
+                  style="width: 100%">
+                </el-input>
+              </el-col>
+            </el-row>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="邮编" prop="LinkZipCode">
+            <el-input v-model="formData.LinkZipCode" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+              style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+      <el-row>
+
+
+        <el-col :span="8">
+          <el-form-item label="法定代表人姓名" prop="LegalPerson">
+            <el-input v-model="formData.LegalPerson" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+              style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="公司类型" prop="CompanyType">
+            <!--<el-input v-model="formData.CompanyType" placeholder="请输入" style="width: 100%"></el-input>-->
+            <el-select v-model="formData.CompanyType" maxlength="50" filterable allow-create
+              :disabled="!canUpdateSupplier" placeholder="请选择" style="width: 100%;">
+              <el-option v-for="item in CompanyTypeOptions" :key="item.Id" :label="item.Key" :value="item.Value"
+                style="width: 100%">
+              </el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="注册资本" prop="RegCapital">
+            <el-input type="number" v-model="formData.RegCapital" :min="1" :readonly="!canUpdateSupplier"
+              placeholder="请输入" style="width: 100%">
+              <template slot="append">万元</template>
+            </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="成立时间">
+            <el-date-picker v-model="formData.SetupTime" type="date" :readonly="!canUpdateSupplier"
+              format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="开户银行" prop="DepositBank">
+            <el-input v-model="formData.DepositBank" maxlength="50" :readonly="!canUpdateSupplier" placeholder="请输入"
+              style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="银行账号" prop="BankAccount">
+            <el-input v-model="formData.BankAccount" maxlength="50" :readonly="!canUpdateSupplier" placeholder="请输入"
+              style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="联系人姓名" prop="ContactName">
+            <el-input v-model="formData.ContactName" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+              style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="移动电话" prop="Mobile">
+            <el-input v-model="formData.Mobile" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+              style="width: 100%"></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="固定电话" prop="Telphone">
+            <el-input v-model="formData.Telphone" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+              style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="传真" prop="Fax">
+            <el-input v-model="formData.Fax" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+              style="width: 100%"></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="财务电话" prop="CompanyTel">
+            <el-input v-model="formData.CompanyTel" :readonly="!canUpdateSupplier" placeholder="请输入" maxlength="20"
+              style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="电子邮箱" prop="EMail">
+            <el-input v-model="formData.EMail" maxlength="50" :readonly="!canUpdateSupplier" placeholder="请输入"
+              style="width: 100%"></el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="银行信用等级">
+            <el-input v-model="formData.BankCreditRating" maxlength="10" :readonly="!canUpdateSupplier"
+              placeholder="请输入" style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="进津备案通知书">
+            <el-input v-model="formData.TJInNotify" placeholder="请输入" style="width: 100%"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="HSE审查培训">
+            <!--<el-input v-model="formData.HseTraining" placeholder="请输入" style="width: 100%"></el-input>-->
+            <el-select v-model="formData.HseTraining" :readonly="!canUpdateSupplier" placeholder="请选择"
+              style="width: 100%;">
+              <el-option v-for="item in HSEOptions" :key="item.value" :label="item.label" :value="item.value"
+                style="width: 100%">
+              </el-option>
+            </el-select>
+
+          </el-form-item>
+        </el-col>
+
+      </el-row>
+    </el-form>
+    <el-form label-position="top" ref="EntityFormCert" :rules="rulesform" :model="formData" :disabled="disabled">
+      <el-row :gutter="60">
+        <el-col :span="8">
+          <el-form-item label="质量管理体系认证情况">
+            <el-input v-model="formData.QualitySystemCert" maxlength="200" placeholder="请输入" type="textarea"
+              style="width: 100%"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="企业资质证书(编号  级别)">
+            <el-input v-model="formData.QualifCert" placeholder="请输入" maxlength="200" type="textarea"
+              style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="安全生产许可证">
+            <el-input v-model="formData.SafetyLicense" maxlength="200" placeholder="请输入" type="textarea"
+              style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+
+        <el-col :span="8">
+          <el-form-item label="行业特殊要求的认证证书">
+            <el-input v-model="formData.SpecIndustryCert" placeholder="请输入" maxlength="200" type="textarea"
+              style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="16">
+          <el-form-item label="营业范围" prop="BusinessScope">
+            <el-input v-model="formData.BusinessScope" maxlength="200" placeholder="请输入" type="textarea"
+              style="width: 100%"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="24">
+          <el-form-item label="备注">
+            <el-input v-model="formData.Remark" maxlength="500" placeholder="请输入" type="textarea" style="width: 100%">
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+
+    </el-form>
+      </el-card>
+    </el-card>
+    
+    <el-dialog title="提交申请" :visible.sync="commitshow" width="360px">
+      <el-form label-width="90px" :model="entityForm" ref="EntityFormref">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="审批人" prop="auditer">
+              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择审批人">
+                <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="说明">
+              <el-input v-model="entityForm.Remark" type="textarea" 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>
+      </span>
+      <br>
+    </el-dialog>
+    <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
+      :visible="chooseAuditorVisible"></choose-auditor>
+      <el-dialog title="审批历史" :visible.sync="audithistoryshow" width="1200px">
+      <wf-back-history ref="WfBackHistory" :entryinfo="backhistroy"></wf-back-history>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  import supplierapi from '@/api/oilsupplier/supplier';
+  import api from '@/api/oilsupplier/infochange';
+  import WfBackHistory from '@/components/workflow/wfbackhistory.vue'
+  import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
+  export default {
+    components: {
+      WfBackHistory,
+      ChooseAuditor
+    },
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'oilinfochangeEdit',
+
+    data() {
+      return {
+        audithistoryshow: false,
+        backhistroy: {
+          certId: '',
+          classId: '04',
+          workflowId: ''
+        },
+        infoitemsoptions: [{
+          value: 'SupplierName',
+          label: '企业名称'
+        }, {
+          value: 'OilCertificateNo',
+          label: '中石油供应商证书号'
+        }, {
+          value: 'Grade',
+          label: '级别'
+        }, {
+          value: 'MgrUnit',
+          label: '管理单位'
+        }, {
+          value: 'OperType',
+          label: '经营方式'
+        }],
+        orgtreelist: [],
+        orgtreeprops: {
+          value: 'id',
+          label: 'Fullname',
+          children: 'children'
+        },
+        chooseAuditorVisible: false,
+        auditer: '',
+        auditerName: '',
+        supplierId: '',
+        auditerOption: [],
+        commitshow: false,
+        InfoData: [],
+        AddChangeShow: false,
+        UnitRelationOptions: [],
+        UnitRelationAry: [],
+        countryoptions: [],
+        selectuserlist: [],
+        countryprops: {
+          value: 'adcode',
+          label: 'name',
+          children: 'districts'
+        },
+        infochangeForm: {
+          Id: '',
+          SupplierId: '',
+          SelectItem: '',
+          SelectItemName: '',
+          BeChangeInfo: '',
+          ChangeInfo: '',
+          ChangeStatus: '',
+        },
+        serviceId: '',
+        certId: '',
+        entityForm: {
+          Id: '',
+          SupplierName: '',
+          SupplierId: '',
+          SupplierTypeName: '',
+          FirstAudit: '',
+          auditer: '',
+          MInfoId:'',
+          Remark: ''
+        },
+        InfoStatus: '',
+        butnab: false,
+        MInfoId:'',
+      }
+    },
+    created() {
+      this.serviceId = this.$route.params.opera
+      this.supplierId = this.serviceId
+      this.InfoStatus = this.$route.query.InfoStatus
+      this.MInfoId = this.$route.query.infoId
+      this.backhistroy.certId = this.MInfoId
+      // if (this.QualStatus > 0) {
+      //   this.butnab = true
+      // }
+      console.log("----this.InfoStatus---",this.InfoStatus)
+      this.initDatas()
+    },
+    methods: {
+      initDatas() {
+        console.log("----this.formData.Id---", this.serviceId)
+        if (this.serviceId) {
+          api.getEntity(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)
+          });
+        }
+      },
+      addchange() {
+        this.AddChangeShow = true
+        this.infochangeForm.Id = ''
+        this.infochangeForm.SupplierId = ''
+        this.infochangeForm.SelectItem = ''
+        this.infochangeForm.SelectItemName = ''
+        this.infochangeForm.BeChangeInfo = ''
+        this.infochangeForm.ChangeInfo = ''
+        this.infochangeForm.ChangeStatus = ''
+      },
+      itemsfilter() {
+        try {
+          let entityArray = this.InfoData
+          let arr = this.infoitemsoptions
+          if (entityArray == null) {
+            this.selectuserlist = arr
+            return false
+          }
+          this.selectuserlist = []
+          for (var i = 0; i < entityArray.length; i++) {
+            for (var j = 0; j < arr.length; j++) {
+              if (entityArray[i].SelectItem === arr[j].value) {
+                this.selectuserlist.push(arr[j])
+                arr.splice(j, 1)
+                j--
+              }
+            }
+          }
+          this.selectuserlist = arr
+        } catch (e) {
+          console.log(e)
+        }
+      },
+      //审批历史
+      auhistory() {
+        this.audithistoryshow = true
+      },
+      //添加变更项目
+      additems() {
+        console.log(this.$refs.infochangeCorp.selectedLabel)
+        api.getinfoforitem(this.serviceId, this.infochangeForm.Selectitem, this.$axios).then(res => {
+          this.infochangeForm.BeChangeInfo = res.data
+          this.infochangeForm.SelectItemName = this.$refs.infochangeCorp.selectedLabel + ''
+          //this.AddChangeShow = false
+        }).catch(err => {
+          console.error(err)
+        });
+
+      },
+      //保存信息变更数据
+      saveitemschange() {
+        this.infochangeForm.SupplierId = parseInt(this.serviceId)
+        console.log(this.infochangeForm)
+        api.addInfoChangeItem(this.infochangeForm, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            //保存成功后,初始化数据,变成修改
+            this.infochangeForm.Id = res.data.item;
+            this.initDatas();
+            this.AddChangeShow = false
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            });
+
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            });
+          }
+        }).catch(err => {
+          console.error(err)
+        });
+      },
+      setAuditer(val, name) {
+        this.auditer = val
+        this.auditerName = name
+        this.chooseAuditorVisible = false
+      },
+      chooseAuditorShow() {
+        this.$refs['chooseAuditor'].getorgtreelist()
+        this.chooseAuditorVisible = true
+      },
+      getorgtreelist() {
+        let _this = this
+        let params = {
+          IsInnerOrganize: 1
+        }
+        _this.$axios.get('organizes/orgalllist', {
+            params
+          })
+          .then(res => {
+            _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      //提交信息变更审核
+      submitInfoChange() {
+        this.getorgtreelist()
+        this.commitshow = true
+      },
+      addInfoChangeAudit() {
+        this.entityForm.auditer = this.auditer
+        this.entityForm.MInfoId = this.MInfoId + ""
+        console.log("==this.entityForm====", this.entityForm)
+        api.auditEntity(this.supplierId, this.entityForm, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.initDatas()
+            this.commitshow = false
+            this.butnab = true
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      //删除信息变更项
+      deleteEntity(row) {
+        api.deleteEntity(row.Id, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.initDatas();
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            });
+
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            });
+          }
+        }).catch(err => {
+          console.error(err)
+        });
+      },
+      getCityList(val) {
+        let resultData = JSON.parse(val)
+        let countstr = JSON.stringify(resultData.districts[0].districts)
+        countstr = countstr.replace(/\,\"districts\"\:\[\]/g, '')
+        this.countryoptions = JSON.parse(countstr)
+      },
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+
+      formatDateTime(date) {
+        var y = date.getFullYear();
+        var m = date.getMonth() + 1;
+        m = m < 10 ? ('0' + m) : m;
+        var d = date.getDate();
+        d = d < 10 ? ('0' + d) : d;
+        var h = date.getHours();
+        var minute = date.getMinutes();
+        minute = minute < 10 ? ('0' + minute) : minute;
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      }
+    }
+  }
+
+</script>

+ 706 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/operationgoods.vue

@@ -0,0 +1,706 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/infochange' }">供方基本信息表</el-breadcrumb-item>
+      <el-breadcrumb-item>编辑</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 编辑
+        </span>
+        <span style="float: right;">
+          <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="historychange">历史变更</el-button> -->
+          <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button> -->
+          <el-button type="primary" size="mini" @click="submitInfoChange"
+            v-if="(InfoStatus == 0 || InfoStatus == '' || InfoStatus == -2 || InfoStatus == 3) && !butnab">提交申请
+          </el-button>
+          <router-link :to="'/oilsupplier/infochangech'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+        </span>
+      </div>
+
+      <el-card>
+        <el-form label-width="135px" ref="EntityForm" :model="formData" :rules="rulesform" :disabled="disabled">
+          <el-row>
+
+            <el-col :span="16">
+              <el-form-item label="供方名称" prop="SupplierName">
+                <el-autocomplete class="inline-input" v-model="formData.SupplierName" :readonly="companyReadonly"
+                  :fetch-suggestions="querySearch" :maxlength="255" placeholder="请输入内容" style="width: 100%"
+                  @select="handleSelect" v-if="authUser && authUser.Profile.IsCompanyUser == 1">
+                </el-autocomplete>
+                <el-input v-model="formData.SupplierName" :maxlength="255" @change="inputCompanyName"
+                  :readonly="!canUpdateSupplier" placeholder="请输入" style="width: 100%"
+                  v-if="!authUser || authUser.Profile.IsCompanyUser == 0">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="单位关系">
+                <el-select ref="SpecType" v-model="formData.SpecTypeCode" @change="currentSel"
+                  :disabled="!canUpdateSupplier" placeholder="请选择" style="width: 100%">
+                  <el-option v-for="item in UnitRelationOptions" :key="item.Id" :label="item.Key" :value="item.Value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="国家" prop="Country">
+                <!--<el-input v-model="formData.Country" maxlength="255" :readonly="!canUpdateSupplier" placeholder="请输入" style="width: 100%">
+            </el-input>-->
+                <el-select v-model="formData.Country" filterable placeholder="请选择" style="width: 100%">
+                  <el-option v-for="item in countryListOptions" :key="item.key" :label="item.value" :value="item.value">
+                    <span style="float: left">{{ item.value }}</span>
+                    <span style="float: right; color: #8492a6; font-size: 13px">{{ item.label }}</span>
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="准入方式">
+                <el-select ref="inStyle" v-model="formData.InStyle" :disabled="!canUpdateSupplier" placeholder="请选择"
+                  style="width: 100%">
+                  <el-option v-for="item in InOptions" :key="item.Id" :label="item.Key" :value="item.Value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="管理单位">
+                <el-select filterable v-model="formData.MgrUnit" maxlength="255" :readonly="!canUpdateSupplier"
+                  placeholder="请输入" style="width: 100%">
+                  <el-option v-for="item in ManagementUnitOptions" :key="item.Value" :label="item.Key"
+                    :value="item.Key">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="中石油准入证编号">
+                <el-input v-model="formData.PACNumber" maxlength="255" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+
+
+            <el-col :span="8">
+              <el-form-item label="证件合一">
+                <el-select v-model="formData.CredentialFlag" placeholder="请选择" @change="showorhid" style="width: 100%">
+                  <el-option v-for="item in selectoptions" :key="item.value" :label="item.label" :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="统一社会信用代码" prop="CommercialNo">
+                <el-input v-model="formData.CommercialNo" maxlength="50" :readonly="!canUpdateSupplier"
+                  placeholder="请输入" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+
+
+            <el-col :span="8">
+              <el-form-item label="税务登记证编号" prop="CountryTaxNo" v-if="showorhidflag=='show'">
+                <el-input v-model="formData.CountryTaxNo" maxlength="50" :readonly="!canUpdateSupplier"
+                  placeholder="请输入" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="组织机构代码" prop="OrganCode" v-if="showorhidflag=='show'">
+                <el-input v-model="formData.OrganCode" maxlength="50" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="16">
+              <el-form-item label="注册地址" prop="Province">
+                <el-row>
+                  <el-col :span="10">
+                    <el-cascader :options="countryoptions" :props="countryprops" maxlength="20"
+                      :readonly="!canUpdateSupplier" placeholder="省市区" v-model="CityAry" style="width: 100%"
+                      @change="handleAreaChange">
+                    </el-cascader>
+                  </el-col>
+                  <el-col :span="14">
+                    <el-input v-model="formData.Address" maxlength="500" placeholder="详细地址" style="width: 100%">
+                    </el-input>
+                  </el-col>
+                </el-row>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="邮编" prop="ZipCode">
+                <el-input v-model="formData.ZipCode" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="16">
+              <el-form-item label="通信地址" prop="LinkProvince">
+                <el-row>
+                  <el-col :span="10">
+                    <el-cascader :options="countryoptions" :props="countryprops" :readonly="!canUpdateSupplier"
+                      placeholder="省市区" v-model="LinkCityAry" maxlength="20" style="width: 100%"
+                      @change="handleLinkAreaChange">
+                    </el-cascader>
+                  </el-col>
+                  <el-col :span="14">
+                    <el-input v-model="formData.LinkAddress" maxlength="500" placeholder="详细地址" style="width: 100%">
+                    </el-input>
+                  </el-col>
+                </el-row>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="邮编" prop="LinkZipCode">
+                <el-input v-model="formData.LinkZipCode" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+
+            <el-col :span="8">
+              <el-form-item label="法定代表人姓名" prop="LegalPerson">
+                <el-input v-model="formData.LegalPerson" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="公司类型" prop="CompanyType">
+                <!--<el-input v-model="formData.CompanyType" placeholder="请输入" style="width: 100%"></el-input>-->
+                <el-select v-model="formData.CompanyType" maxlength="50" filterable allow-create
+                  :disabled="!canUpdateSupplier" placeholder="请选择" style="width: 100%;">
+                  <el-option v-for="item in CompanyTypeOptions" :key="item.Id" :label="item.Key" :value="item.Value"
+                    style="width: 100%">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="注册资本" prop="RegCapital">
+                <el-input type="number" v-model="formData.RegCapital" :min="1" :readonly="!canUpdateSupplier"
+                  placeholder="请输入" style="width: 100%">
+                  <template slot="append">万元</template>
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="成立时间">
+                <el-date-picker v-model="formData.SetupTime" type="date" :readonly="!canUpdateSupplier"
+                  format="yyyy 年 MM 月 dd 日" value-format="yyyy-MM-dd" placeholder="选择日期" style="width: 100%">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="开户银行" prop="DepositBank">
+                <el-input v-model="formData.DepositBank" maxlength="50" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="银行账号" prop="BankAccount">
+                <el-input v-model="formData.BankAccount" maxlength="50" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="联系人姓名" prop="ContactName">
+                <el-input v-model="formData.ContactName" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="移动电话" prop="Mobile">
+                <el-input v-model="formData.Mobile" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="固定电话" prop="Telphone">
+                <el-input v-model="formData.Telphone" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="传真" prop="Fax">
+                <el-input v-model="formData.Fax" maxlength="20" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="财务电话" prop="CompanyTel">
+                <el-input v-model="formData.CompanyTel" :readonly="!canUpdateSupplier" placeholder="请输入" maxlength="20"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="电子邮箱" prop="EMail">
+                <el-input v-model="formData.EMail" maxlength="50" :readonly="!canUpdateSupplier" placeholder="请输入"
+                  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="银行信用等级">
+                <el-input v-model="formData.BankCreditRating" maxlength="10" :readonly="!canUpdateSupplier"
+                  placeholder="请输入" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="级别">
+                <el-input v-model="formData.Level" maxlength="255" placeholder="请输入" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="HSE审查培训">
+                <!--<el-input v-model="formData.HseTraining" placeholder="请输入" style="width: 100%"></el-input>-->
+                <el-select v-model="formData.HseTraining" :readonly="!canUpdateSupplier" placeholder="请选择"
+                  style="width: 100%;">
+                  <el-option v-for="item in HSEOptions" :key="item.value" :label="item.label" :value="item.value"
+                    style="width: 100%">
+                  </el-option>
+                </el-select>
+
+              </el-form-item>
+            </el-col>
+
+          </el-row>
+        </el-form>
+
+        <el-form label-position="top" ref="EntityFormCert" :rules="rulesform" :model="formData" :disabled="disabled">
+          <el-row :gutter="60">
+            <el-col :span="8">
+              <el-form-item label="质量管理体系认证情况及认证机构">
+                <el-input v-model="formData.QualitySystemCert" maxlength="200" placeholder="请输入" type="textarea"
+                  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="产品质量认证情况及认证机构">
+                <el-input v-model="formData.ProductQualityCert" placeholder="请输入" maxlength="200" type="textarea">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="生产/制造许可证获证情况及编号">
+                <el-input v-model="formData.MaunLicense" placeholder="请输入" maxlength="200" type="textarea"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="所代理制造商名称">
+                <el-input v-model="formData.AgentManufacturer" maxlength="255" placeholder="请输入" type="textarea">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="中石油物资供应商证书">
+                <el-input v-model="formData.SupplierCertificate" maxlength="255" placeholder="请输入" style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="安全生产许可证">
+                <el-input v-model="formData.SafetyLicense" maxlength="200" placeholder="请输入" type="textarea"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :span="8">
+              <el-form-item label="行业特殊要求的认证证书">
+                <el-input v-model="formData.SpecIndustryCert" placeholder="请输入" maxlength="200" type="textarea"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="16">
+              <el-form-item label="营业范围" prop="BusinessScope">
+                <el-input v-model="formData.BusinessScope" maxlength="200" placeholder="请输入" type="textarea"
+                  style="width: 100%"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="24">
+              <el-form-item label="备注">
+                <el-input v-model="formData.Remark" maxlength="500" placeholder="请输入" type="textarea"
+                  style="width: 100%">
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+        </el-form>
+      </el-card>
+    </el-card>
+
+    <el-dialog title="提交申请" :visible.sync="commitshow" width="360px">
+      <el-form label-width="90px" :model="entityForm" ref="EntityFormref">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="审批人" prop="auditer">
+              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择审批人">
+                <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="说明">
+              <el-input v-model="entityForm.Remark" type="textarea" 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>
+      </span>
+      <br>
+    </el-dialog>
+    <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
+      :visible="chooseAuditorVisible"></choose-auditor>
+    <el-dialog title="审批历史" :visible.sync="audithistoryshow" width="1200px">
+      <wf-back-history ref="WfBackHistory" :entryinfo="backhistroy"></wf-back-history>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  import supplierapi from '@/api/oilsupplier/supplier';
+  import api from '@/api/oilsupplier/infochange';
+  import WfBackHistory from '@/components/workflow/wfbackhistory.vue'
+  import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
+  export default {
+    components: {
+      WfBackHistory,
+      ChooseAuditor
+    },
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'oilinfochangeEdit',
+
+    data() {
+      return {
+        audithistoryshow: false,
+        backhistroy: {
+          certId: '',
+          classId: '04',
+          workflowId: ''
+        },
+        infoitemsoptions: [{
+          value: 'SupplierName',
+          label: '企业名称'
+        }, {
+          value: 'OilCertificateNo',
+          label: '中石油供应商证书号'
+        }, {
+          value: 'Grade',
+          label: '级别'
+        }, {
+          value: 'MgrUnit',
+          label: '管理单位'
+        }, {
+          value: 'OperType',
+          label: '经营方式'
+        }],
+        orgtreelist: [],
+        orgtreeprops: {
+          value: 'id',
+          label: 'Fullname',
+          children: 'children'
+        },
+        chooseAuditorVisible: false,
+        auditer: '',
+        auditerName: '',
+        supplierId: '',
+        auditerOption: [],
+        commitshow: false,
+        InfoData: [],
+        AddChangeShow: false,
+        UnitRelationOptions: [],
+        UnitRelationAry: [],
+        countryoptions: [],
+        selectuserlist: [],
+        countryprops: {
+          value: 'adcode',
+          label: 'name',
+          children: 'districts'
+        },
+        infochangeForm: {
+          Id: '',
+          SupplierId: '',
+          SelectItem: '',
+          SelectItemName: '',
+          BeChangeInfo: '',
+          ChangeInfo: '',
+          ChangeStatus: '',
+        },
+        serviceId: '',
+        certId: '',
+        entityForm: {
+          Id: '',
+          SupplierName: '',
+          SupplierId: '',
+          SupplierTypeName: '',
+          FirstAudit: '',
+          auditer: '',
+          MInfoId: '',
+          Remark: ''
+        },
+        InfoStatus: '',
+        butnab: false,
+        MInfoId: '',
+      }
+    },
+    created() {
+      this.serviceId = this.$route.params.opera
+      this.supplierId = this.serviceId
+      this.InfoStatus = this.$route.query.InfoStatus
+      this.MInfoId = this.$route.query.infoId
+      this.backhistroy.certId = this.MInfoId
+      // if (this.QualStatus > 0) {
+      //   this.butnab = true
+      // }
+      console.log("----this.InfoStatus---", this.InfoStatus)
+      this.initDatas()
+    },
+    methods: {
+      initDatas() {
+        console.log("----this.formData.Id---", this.serviceId)
+        if (this.serviceId) {
+          api.getEntity(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)
+          });
+        }
+      },
+      addchange() {
+        this.AddChangeShow = true
+        this.infochangeForm.Id = ''
+        this.infochangeForm.SupplierId = ''
+        this.infochangeForm.SelectItem = ''
+        this.infochangeForm.SelectItemName = ''
+        this.infochangeForm.BeChangeInfo = ''
+        this.infochangeForm.ChangeInfo = ''
+        this.infochangeForm.ChangeStatus = ''
+      },
+      itemsfilter() {
+        try {
+          let entityArray = this.InfoData
+          let arr = this.infoitemsoptions
+          if (entityArray == null) {
+            this.selectuserlist = arr
+            return false
+          }
+          this.selectuserlist = []
+          for (var i = 0; i < entityArray.length; i++) {
+            for (var j = 0; j < arr.length; j++) {
+              if (entityArray[i].SelectItem === arr[j].value) {
+                this.selectuserlist.push(arr[j])
+                arr.splice(j, 1)
+                j--
+              }
+            }
+          }
+          this.selectuserlist = arr
+        } catch (e) {
+          console.log(e)
+        }
+      },
+      //审批历史
+      auhistory() {
+        this.audithistoryshow = true
+      },
+      //添加变更项目
+      additems() {
+        console.log(this.$refs.infochangeCorp.selectedLabel)
+        api.getinfoforitem(this.serviceId, this.infochangeForm.Selectitem, this.$axios).then(res => {
+          this.infochangeForm.BeChangeInfo = res.data
+          this.infochangeForm.SelectItemName = this.$refs.infochangeCorp.selectedLabel + ''
+          //this.AddChangeShow = false
+        }).catch(err => {
+          console.error(err)
+        });
+
+      },
+      //保存信息变更数据
+      saveitemschange() {
+        this.infochangeForm.SupplierId = parseInt(this.serviceId)
+        console.log(this.infochangeForm)
+        api.addInfoChangeItem(this.infochangeForm, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            //保存成功后,初始化数据,变成修改
+            this.infochangeForm.Id = res.data.item;
+            this.initDatas();
+            this.AddChangeShow = false
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            });
+
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            });
+          }
+        }).catch(err => {
+          console.error(err)
+        });
+      },
+      setAuditer(val, name) {
+        this.auditer = val
+        this.auditerName = name
+        this.chooseAuditorVisible = false
+      },
+      chooseAuditorShow() {
+        this.$refs['chooseAuditor'].getorgtreelist()
+        this.chooseAuditorVisible = true
+      },
+      getorgtreelist() {
+        let _this = this
+        let params = {
+          IsInnerOrganize: 1
+        }
+        _this.$axios.get('organizes/orgalllist', {
+            params
+          })
+          .then(res => {
+            _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      //提交信息变更审核
+      submitInfoChange() {
+        this.getorgtreelist()
+        this.commitshow = true
+      },
+      addInfoChangeAudit() {
+        this.entityForm.auditer = this.auditer
+        this.entityForm.MInfoId = this.MInfoId + ""
+        console.log("==this.entityForm====", this.entityForm)
+        api.auditEntity(this.supplierId, this.entityForm, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.initDatas()
+            this.commitshow = false
+            this.butnab = true
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      //删除信息变更项
+      deleteEntity(row) {
+        api.deleteEntity(row.Id, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.initDatas();
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            });
+
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            });
+          }
+        }).catch(err => {
+          console.error(err)
+        });
+      },
+      getCityList(val) {
+        let resultData = JSON.parse(val)
+        let countstr = JSON.stringify(resultData.districts[0].districts)
+        countstr = countstr.replace(/\,\"districts\"\:\[\]/g, '')
+        this.countryoptions = JSON.parse(countstr)
+      },
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+
+      formatDateTime(date) {
+        var y = date.getFullYear();
+        var m = date.getMonth() + 1;
+        m = m < 10 ? ('0' + m) : m;
+        var d = date.getDate();
+        d = d < 10 ? ('0' + d) : d;
+        var h = date.getHours();
+        var minute = date.getMinutes();
+        minute = minute < 10 ? ('0' + minute) : minute;
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      }
+    }
+  }
+
+</script>

+ 486 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/index.vue

@@ -0,0 +1,486 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/infochange' }">企业信息表</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card" style="height: calc(100vh - 115px);">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 企业信息表
+        </span>
+        <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="addinfochange">添加变更
+          </el-button>
+        </span>
+        <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+          <el-form-item label="年审日期">
+            <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
+              start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
+          </el-form-item>
+          <el-form-item label="准入类别">
+            <el-select size="mini" style="width:100px" v-model="searchForm.SupplierTypeName" placeholder="准入类别">
+              <el-option label="物资类" value="01"></el-option>
+              <el-option label="技术服务类" value="03"></el-option>
+              <el-option label="基建类" value="02"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
+              查询
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="search">高级查询</el-dropdown-item>
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+        </el-form>
+      </div>
+      <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="right">
+          <template slot-scope="scope">
+            <router-link :to="'/oilsupplier/infochangech/' + scope.row.Id + '/operation?InfoStatus='+ scope.row.Status +'&infoId='+scope.row.InfoId">
+              <el-button type="primary" plain title="信息变更" size="mini">变更</el-button>
+            </router-link>
+          </template>
+        </el-table-column>
+
+        <el-table-column v-for="column in tableColumns" :key="column.Id" :prop="column.prop" sortable min-width="100"
+          :label="column.label" align="center" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
+          <template slot-scope="scope">
+            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">已申请</span>
+            <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">初审未通过</span>
+            <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待法规处审核</span>
+            <span v-if="scope.row.Status=='-3'" style="color:#F56C6C">审核未通过</span>
+            <span v-if="scope.row.Status=='3'" style="color:#67C23A">审核通过</span>
+          </template> 
+        </el-table-column>
+        <el-table-column prop="ConmmitTime" sortable min-width="100" label="申请日期" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.ConmmitTime+'') }}
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
+        :total="currentItemCount">
+      </el-pagination>
+    </el-card>
+
+    <el-dialog title="高级查询" :visible.sync="dialogVisible" width="720px">
+      <el-form ref="searchForm" label-width="110px">
+        <el-row>
+
+          <!-- <el-col :span="12">
+            <el-form-item label="生成时间">
+              <el-date-picker size="mini" v-model="CreateOn" type="daterange" style="width:100%" range-separator="至"
+                start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
+            </el-form-item>
+          </el-col> -->
+          <!-- 
+          <el-col :span="12">
+            <el-form-item label="">
+              <el-input size="mini" v-model="searchForm.Id" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col> -->
+
+          <el-col :span="12">
+            <el-form-item label="推荐单位编码">
+              <el-input size="mini" v-model="searchForm.RecUnitId" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="准入证号">
+              <el-input size="mini" v-model="searchForm.AccessCardNo" style="width:100%" placeholder="请输入">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="准入类别">
+              <el-input size="mini" v-model="searchForm.SupplierTypeName" style="width:100%" placeholder="请输入">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="企业名称">
+              <el-input size="mini" v-model="searchForm.SupplierName" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+         
+        </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="handleSearch">查 询</el-button>
+      </span>
+    </el-dialog>
+     <el-dialog title="信息变更添加" :visible.sync="addshow" width="360px">
+      <el-form label-width="90px" :model="entityForm" ref="EntityFormref">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="企业名称" prop="SupplierId" required>
+              <el-select filterable default-first-option ref="supselect" v-model="entityForm.SupplierId" required
+                placeholder="请选择" style="width: 100%">
+                <el-option v-for="item in selectsupplierlist" :key="item.Id" :label="item.Realname" :value="item.Id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="说明">
+              <el-input v-model="entityForm.Remark" type="textarea" placeholder="请输入说明内容">
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span style="float: right;margin-top:-10px;">
+        <el-button size="small" @click="addshow = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="addInfoChange()">确 定</el-button>
+      </span>
+      <br>
+    </el-dialog>
+   
+  </div>
+</template>
+<script>
+  import {
+    mapGetters
+  } from 'vuex';
+  import supplierapi from '@/api/oilsupplier/supplier';
+  import api from '@/api/oilsupplier/infochange';
+  import annapi from '@/api/oilsupplier/annualaudit'
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'annualaudit',
+
+    data() {
+      return {
+        addshow: false,
+        dialogVisible: false,
+        delevisble:false,
+        //列表数据
+        selectsupplierlist: [],
+        entityList: [],
+        //分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        //列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        //查询时间
+        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        //查询项
+        searchFormReset: {},
+        entityForm: {
+          Id: '',
+          SupplierId: '',
+        },
+        searchForm: {
+          Id: '',
+          RecUnitId: '',
+          AccessCardNo: '',
+          SupplierTypeName: '',
+          SupplierName: '',
+          Num: '',
+          ProjectName: '',
+          Performance: '',
+          WorkRange: '',
+          Status: '',
+          BackReason: '',
+          ApplyTime: '',
+          AuditDate: '',
+          EnterUserId: '',
+          EnterUserName: '',
+          EnterUserTel: '',
+          SCR: '',
+          SCRQ: '',
+          SCYJ: '',
+          SCJG: '',
+          SPR: '',
+          SPRQ: '',
+          SPYJ: '',
+          SPJG: '',
+          CreateOn: '',
+          CreateUserId: '',
+          CreateBy: '',
+          ModifiedOn: '',
+          ModifiedUserId: '',
+          ModifiedBy: '',
+
+        },
+        tableColumns: [
+
+          // {
+          //   prop: "RecUnitId",
+          //   label: '推荐单位编码',
+          //   width: 100,
+          //   sort: true
+          // },
+          {
+            prop: "SupplierName",
+            label: '企业名称',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "OilCertificateNo",
+            label: '中石油供应商证书号',
+            width: 200,
+            sort: true
+          },
+
+          // {
+          //   prop: "Grade",
+          //   label: '级别',
+          //   width: 100,
+          //   sort: true
+          // },
+
+          
+          // {
+          //   prop: "MgrUnit",
+          //   label: '管理单位',
+          //   width: 100,
+          //   sort: true
+          // },
+
+          // {
+          //   prop: "OperType",
+          //   label: '经营方式',
+          //   width: 100,
+          //   sort: true
+          // },
+
+          // {
+          //   prop: "Country",
+          //   label: '国家',
+          //   width: 100,
+          //   sort: true
+          // },
+          // {
+          //   prop: "MaunAgent",
+          //   label: '所代理制造商名称',
+          //   width: 200,
+          //   sort: true
+          // },
+
+          // {
+          //   prop: "ConstructTeam",
+          //   label: '施工队伍名称',
+          //   width: 100,
+          //   sort: true
+          // },
+
+          {
+            prop: "CommercialNo",
+            label: '工商注册号',
+            width: 100,
+            sort: true
+          },
+
+        ],
+      }
+    },
+    created() {
+      //查询条件初始值备份
+      Object.assign(this.searchFormReset, this.searchForm)
+      //查询列表
+      this.initDatas()
+      this.getselectsupplier()
+      //this.getDictOptions()
+    },
+    methods: {
+      initDatas() {
+        //分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+        }
+        let myCreateOn = []
+        // 解析时间
+        if (this.CreateOn.length == 2) {
+          this.CreateOn[1].setHours(23)
+          this.CreateOn[1].setMinutes(59)
+          this.CreateOn[1].setSeconds(59)
+          myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+          myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+        }
+        //查询条件
+        Object.assign(params, this.searchForm)
+        //访问接口
+        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)
+        })
+      },
+      getselectsupplier() {
+        api.getAddSupList(this.$axios).then(res => {
+          console.log("-------res",res.data)
+          if (res.data.items.length != 0) {
+            for (var i = 0; i < res.data.items.length; i++) {
+              this.selectsupplierlist.push({
+                Id: res.data.items[i].Id,
+                Realname: res.data.items[i].SupplierName
+              })
+            }
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      addinfochange() {
+        this.addshow = true
+      },
+      addInfoChange() {
+        this.$refs['EntityFormref'].validate((valid) => {
+          if (valid) {
+            console.log("---this.entityForm--",this.entityForm)
+            this.entityForm.SupplierId = this.entityForm.SupplierId + ""
+            api.addInfoChMain(this.entityForm, this.$axios).then(res => {
+              if (res.data.code === 0) {
+                console.log("--------res.data----", res.data)
+                //保存成功后,初始化数据,变成修改
+                this.entityForm.Id = res.data.item;
+                this.initDatas();
+                this.addshow = false
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                });
+
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                });
+              }
+            }).catch(err => {
+              console.error(err)
+            });
+          }
+        })
+        
+      },
+      getDictOptions() {
+        api.getDictList(this.$axios).then(res => {
+          //this.dictOptions.customerList = res.data.items['customerList']
+          //this.dictOptions.projectList = res.data.items['projectList']
+
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      searchCommand(command) {
+        if (command == 'search') {
+          this.dialogVisible = true
+        } else if (command == 'clear') {
+          this.clearSearch()
+        }
+      },
+      //列表排序功能
+      orderby(column) {
+        if (column.order == 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order == 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initDatas()
+      },
+      clearSearch() {
+        Object.assign(this.searchForm, this.searchFormReset);
+        //this.searchForm = this.searchFormReset;
+        this.CreateOn = ''
+        this.initDatas()
+      },
+      handleSearch() {
+        this.currentPage = 1;
+        this.dialogVisible = false;
+        this.initDatas();
+      },
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initDatas()
+      },
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initDatas()
+      },
+      deleteEntity(row) {
+        api.deleteEntity(row.Id, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.initDatas();
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            });
+
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            });
+          }
+        }).catch(err => {
+          console.error(err)
+        });
+      },
+
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T00:00:00Z') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+
+      formatDateTime(date) {
+        var y = date.getFullYear();
+        var m = date.getMonth() + 1;
+        m = m < 10 ? ('0' + m) : m;
+        var d = date.getDate();
+        d = d < 10 ? ('0' + d) : d;
+        var h = date.getHours();
+        var minute = date.getMinutes();
+        minute = minute < 10 ? ('0' + minute) : minute;
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      }
+    }
+  }
+
+</script>
+
+<style lang="scss">
+
+</style>

+ 427 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/infoaudit.vue

@@ -0,0 +1,427 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/infoaudit' }">信息变更审核表</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card" style="height: calc(100vh - 115px);">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 信息变更审核表
+        </span>
+        <!-- <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="addaudit">添加
+          </el-button>
+        </span> -->
+        <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+          <el-form-item label="申请日期">
+            <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
+              start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
+          </el-form-item>
+          <el-form-item label="准入类别">
+            <el-select size="mini" style="width:100px" v-model="searchForm.SupplierTypeName" placeholder="准入类别">
+              <el-option label="物资类" value="01"></el-option>
+              <el-option label="技术服务类" value="03"></el-option>
+              <el-option label="基建类" value="02"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
+              查询
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="search">高级查询</el-dropdown-item>
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+        </el-form>
+      </div>
+      <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="right">
+          <template slot-scope="scope">
+            <router-link :to="'/oilsupplier/infochangech/' + scope.row.Id + '/auditoperation?InfoStatus='+ scope.row.Status+'&SupId='+scope.row.SupplierId">
+              <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>
+
+        <el-table-column v-for="column in tableColumns" :key="column.Id" :prop="column.prop" sortable min-width="100"
+          :label="column.label" align="center" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
+          <template slot-scope="scope">
+            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">已申请</span>
+            <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">初审未通过</span>
+            <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待法规处审核</span>
+            <span v-if="scope.row.Status=='-3'" style="color:#F56C6C">审核未通过</span>
+            <span v-if="scope.row.Status=='3'" style="color:#67C23A">审核通过</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="CreateOn" sortable min-width="100" label="申请日期" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.CreateOn+'') }}
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
+        :total="currentItemCount">
+      </el-pagination>
+    </el-card>
+
+    <el-dialog title="高级查询" :visible.sync="dialogVisible" width="720px">
+      <el-form ref="searchForm" label-width="110px">
+        <el-row>
+
+          <!-- <el-col :span="12">
+            <el-form-item label="生成时间">
+              <el-date-picker size="mini" v-model="CreateOn" type="daterange" style="width:100%" range-separator="至"
+                start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
+            </el-form-item>
+          </el-col> -->
+          <!-- 
+          <el-col :span="12">
+            <el-form-item label="">
+              <el-input size="mini" v-model="searchForm.Id" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col> -->
+
+          <el-col :span="12">
+            <el-form-item label="推荐单位编码">
+              <el-input size="mini" v-model="searchForm.RecUnitId" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="准入证号">
+              <el-input size="mini" v-model="searchForm.AccessCardNo" style="width:100%" placeholder="请输入">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="准入类别">
+              <el-input size="mini" v-model="searchForm.SupplierTypeName" style="width:100%" placeholder="请输入">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="企业名称">
+              <el-input size="mini" v-model="searchForm.SupplierName" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+         
+        </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="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'
+      })
+    },
+    name: 'annualaudit',
+
+    data() {
+      return {
+        historyVisible: false,
+        addshow: false,
+        dialogVisible: false,
+        delevisble:false,
+        //列表数据
+        selectsupplierlist: [],
+        entityList: [],
+        //分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        //列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        //查询时间
+        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        //查询项
+        searchFormReset: {},
+        entityForm: {
+          Id: '',
+          SupplierName: '',
+          SupplierId: '',
+          SupplierTypeName: '',
+        },
+        searchForm: {
+          Id: '',
+          RecUnitId: '',
+          AccessCardNo: '',
+          SupplierTypeName: '',
+          SupplierName: '',
+          Num: '',
+          ProjectName: '',
+          Performance: '',
+          WorkRange: '',
+          Status: '',
+          BackReason: '',
+          ApplyTime: '',
+          AuditDate: '',
+          EnterUserId: '',
+          EnterUserName: '',
+          EnterUserTel: '',
+          SCR: '',
+          SCRQ: '',
+          SCYJ: '',
+          SCJG: '',
+          SPR: '',
+          SPRQ: '',
+          SPYJ: '',
+          SPJG: '',
+          CreateOn: '',
+          CreateUserId: '',
+          CreateBy: '',
+          ModifiedOn: '',
+          ModifiedUserId: '',
+          ModifiedBy: '',
+
+        },
+        tableColumns: [
+
+          // {
+          //   prop: "RecUnitId",
+          //   label: '推荐单位编码',
+          //   width: 100,
+          //   sort: true
+          // },
+          {
+            prop: "OldSupplierName",
+            label: '企业名称',
+            width: 100,
+            sort: true
+          },
+
+          // {
+          //   prop: "OilCertificateNo",
+          //   label: '中石油供应商证书号',
+          //   width: 200,
+          //   sort: true
+          // },
+
+          // {
+          //   prop: "Grade",
+          //   label: '级别',
+          //   width: 100,
+          //   sort: true
+          // },
+
+          
+          // {
+          //   prop: "MgrUnit",
+          //   label: '管理单位',
+          //   width: 100,
+          //   sort: true
+          // },
+
+          // {
+          //   prop: "OperType",
+          //   label: '经营方式',
+          //   width: 100,
+          //   sort: true
+          // },
+
+          // {
+          //   prop: "Country",
+          //   label: '国家',
+          //   width: 100,
+          //   sort: true
+          // },
+          // {
+          //   prop: "MaunAgent",
+          //   label: '所代理制造商名称',
+          //   width: 200,
+          //   sort: true
+          // },
+
+          // {
+          //   prop: "ConstructTeam",
+          //   label: '施工队伍名称',
+          //   width: 100,
+          //   sort: true
+          // },
+
+          // {
+          //   prop: "CommercialNo",
+          //   label: '工商注册号',
+          //   width: 100,
+          //   sort: true
+          // },
+        ],
+        //工作流
+        entrydetail: {
+          process: 'oil_info_change',
+          business: '',
+          instance: '',
+        },
+      }
+    },
+    created() {
+      //查询条件初始值备份
+      Object.assign(this.searchFormReset, this.searchForm)
+      //查询列表
+      this.initDatas()
+      //this.getDictOptions()
+    },
+    methods: {
+      initDatas() {
+        //分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+        }
+        let myCreateOn = []
+        // 解析时间
+        if (this.CreateOn.length == 2) {
+          this.CreateOn[1].setHours(23)
+          this.CreateOn[1].setMinutes(59)
+          this.CreateOn[1].setSeconds(59)
+          myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+          myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+        }
+        //查询条件
+        Object.assign(params, this.searchForm)
+        //访问接口
+        api.getList(myCreateOn.join(','), params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      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']
+          //this.dictOptions.projectList = res.data.items['projectList']
+
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      searchCommand(command) {
+        if (command == 'search') {
+          this.dialogVisible = true
+        } else if (command == 'clear') {
+          this.clearSearch()
+        }
+      },
+      //列表排序功能
+      orderby(column) {
+        if (column.order == 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order == 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initDatas()
+      },
+      clearSearch() {
+        Object.assign(this.searchForm, this.searchFormReset);
+        //this.searchForm = this.searchFormReset;
+        this.CreateOn = ''
+        this.initDatas()
+      },
+      handleSearch() {
+        this.currentPage = 1;
+        this.dialogVisible = false;
+        this.initDatas();
+      },
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initDatas()
+      },
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initDatas()
+      },
+      deleteEntity(row) {
+        api.deleteEntity(row.Id, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.initDatas();
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            });
+
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            });
+          }
+        }).catch(err => {
+          console.error(err)
+        });
+      },
+
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+
+      formatDateTime(date) {
+        var y = date.getFullYear();
+        var m = date.getMonth() + 1;
+        m = m < 10 ? ('0' + m) : m;
+        var d = date.getDate();
+        d = d < 10 ? ('0' + d) : d;
+        var h = date.getHours();
+        var minute = date.getMinutes();
+        minute = minute < 10 ? ('0' + minute) : minute;
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      }
+    }
+  }
+
+</script>
+
+<style lang="scss">
+
+</style>