Browse Source

信息变更,资质变更修改

huahaiyan 6 years ago
parent
commit
401895a082

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

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

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

@@ -0,0 +1,111 @@
+package infochange
+
+import (
+	"dashoo.cn/backend/api/business/auditsetting"
+	"dashoo.cn/backend/api/business/oilsupplier/classorgsetting"
+	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
+	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
+	"dashoo.cn/backend/api/business/workflow"
+	. "dashoo.cn/backend/api/mydb"
+	"dashoo.cn/business2/userRole"
+	"github.com/go-xorm/xorm"
+	"strconv"
+	"strings"
+)
+
+type InfoChangeService struct {
+	MyServiceBase
+}
+
+func GetInfoChangeService(xormEngine *xorm.Engine) *InfoChangeService {
+	s := new(InfoChangeService)
+	s.DBE = xormEngine
+	return s
+}
+
+//func (s *InfoChangeService) GetSupplierList(supname, auditname string) []Suppliername {
+//	var sql string
+//	//sql = `select * from  `+ supname +` where Id not in ( select SupplierId  from `+ auditname +` where  YEAR(CreateOn)=YEAR(NOW()))`
+//	sql = `select * from  `+ supname
+//	//sql = `select c.id,c.value from ( select a.*, b.SupplierId as tempcolum from `+ supname +` a left join `+ auditname +` b on a.Id = b.SupplierId where YEAR(b.CreateOn)=YEAR(NOW())) as c where c.tempcolum is null`
+//	List := make([]Suppliername, 0)
+//	utils.DBE.Sql(sql).Find(&List)
+//	return List
+//}
+
+//通用多部门多实例审核方法
+func (s *InfoChangeService) SubmitOrgAudit(workflowid, certId, annualId, wfName, wfNodeCode, userId, result, remarks, OilSupplierCertSubName, OilClassOrgSettingName string) (processInstanceId string) {
+	//取出审批列表
+	var supplierCert suppliercert.OilSupplierCert
+	s.GetEntityById(certId, &supplierCert)
+
+	//取出准入分类列表
+	var subList []suppliercertsub.OilSupplierCertSub
+	certSubSrv := suppliercertsub.GetOilSupplierCertSubService(s.DBE)
+	subWhere := " 1=1 "
+	subWhere += " and SupplierCertId='" + certId + "'"
+	certSubSrv.GetEntitysByWhere(OilSupplierCertSubName, subWhere, &subList)
+	var subClassIds string
+	for _, certSub := range subList {
+		subClassIds += strconv.Itoa(certSub.SubClassId) + ","
+	}
+	subClassIds = strings.Trim(subClassIds, ",")
+	if len(subClassIds) <= 0 {
+		panic("没有选择准入分类")
+	}
+
+	//取出审核部门
+	classorgSrv := classorgsetting.GetOilClassOrgSettingService(s.DBE)
+	var list []classorgsetting.OilClassOrgSetting
+	var orgListStr string
+	var where string
+	where += " 1=1 "
+	subWhere += " and SupplierTypeCode='" + supplierCert.SupplierTypeCode + "'"
+	where += " and ClassId in (" + subClassIds + ")"
+	where += " and AuditStepCode = '" + wfNodeCode + "'"
+	classorgSrv.GetEntitysByWhere(OilClassOrgSettingName, where, &list)
+	if len(list) <= 0 {
+		panic("未配置准入分类审批部门")
+	}
+
+	subClassIdsCheck := subClassIds + ","
+	//拼接工作流的需要审批的部门及部门相关的审核人员信息
+	var orgAudits []workflow.MultiOrgAuditVM
+	userSvc := userRole.GetUserService(s.DBE)
+	auditSrv := auditsetting.GetOilAuditSettingService(s.DBE)
+	for _, certsetting := range list {
+		var auditSetting auditsetting.Base_OilAuditSetting
+		var orgAudit workflow.MultiOrgAuditVM
+		orgAudit.OrgId = strconv.Itoa(certsetting.OrganizeId)
+		orgAudit.OrgName = certsetting.OrganizeName
+
+		auditWhere := " 1=1 "
+		auditWhere += " and OrganizeId = '" + strconv.Itoa(certsetting.OrganizeId) + "'"
+		auditWhere += " and AuditStepCode = '" + wfNodeCode + "'"
+		auditSrv.GetEntity(&auditSetting, auditWhere)
+		userIds := userSvc.GetUserIdsByRoleId(strconv.Itoa(auditSetting.RoleId))
+		tempstr := strings.Join(userIds, ",")
+		orgAudit.UserIds = strings.Replace(tempstr, "uid_", "", -1)
+		orgAudits = append(orgAudits, orgAudit)
+
+		orgListStr += "org_" + strconv.Itoa(certsetting.OrganizeId) + ","
+		//排除未设置部门的分类
+		subClassIdsCheck = strings.Replace(subClassIdsCheck, strconv.Itoa(certsetting.ClassId)+",", "", 1)
+	}
+	orgListStr = strings.Trim(orgListStr, ",")
+	if len(subClassIdsCheck) > 0 {
+		panic("存在准入分类 " + subClassIdsCheck + " 未设置审核部门")
+	}
+	if len(orgListStr) <= 0 {
+		panic("未找到审核部门")
+	}
+	//多实例工作流
+	svcActiviti := workflow.GetActivitiService(s.DBE)
+	if workflowid == "0" || len(workflowid) <= 0 {
+		//启动工作流
+		processInstanceId = svcActiviti.StartProcess(wfName, annualId, userId)
+	}
+	//多实例提交给下一步
+	svcActiviti.MultiTaskComplete(wfName, annualId, "", orgAudits, userId, result, remarks)
+	return processInstanceId
+}

+ 46 - 0
src/dashoo.cn/backend/api/business/oilsupplier/qualchange/qualchange.go

@@ -0,0 +1,46 @@
+package qualchange
+
+import (
+	"time"
+)
+
+type OilQualChangeDetail struct {
+	Id                int       `xorm:"not null default 0 INT(10)"`
+	ParentId          int       `xorm:"not null default 0 comment('主表Id') INT(10)"`
+	SupplierTypeCode  string    `xorm:"not null default '0' comment('准入类别代码(01 物资类,02 基建类,03 技术服务类)') VARCHAR(5)"`
+	SupplierCertSubId int       `xorm:"not null default 0 comment('供方对应准入子分类表') INT(10)"`
+	CertSubName       string    `xorm:"default '' comment('分类名称') VARCHAR(50)"`
+	NeedFileType      string    `xorm:"not null default '' comment('文件分类') VARCHAR(50)"`
+	NeedFileCode      string    `xorm:"not null default '' comment('文件分类编码') VARCHAR(20)"`
+	OldFileName       string    `xorm:"not null default '' comment('原文件名称') VARCHAR(50)"`
+	FileName          string    `xorm:"not null default '' comment('文件名称') VARCHAR(50)"`
+	FileExt           string    `xorm:"VARCHAR(10)"`
+	FileType          int       `xorm:"default 0 comment('0:不必要文件;1:必上传文件;') INT(10)"`
+	OldEffectDate     time.Time `xorm:"comment('原有效期') DATETIME"`
+	EffectDate        time.Time `xorm:"comment('有效期') DATETIME"`
+	OldFileUrl        string    `xorm:"VARCHAR(100)"`
+	FileUrl           string    `xorm:"VARCHAR(100)"`
+	OtherRemark       string    `xorm:"VARCHAR(500)"`
+	Remark            string    `xorm:"comment('备注') VARCHAR(500)"`
+	IsDelete          int       `xorm:"default 0 comment('删除状态,0正常,1已删除') INT(10)"`
+	CreateOn          time.Time `xorm:"DATETIME"`
+	CreateUserId      int       `xorm:"INT(10)"`
+	CreateBy          string    `xorm:"VARCHAR(50)"`
+	ModifiedOn        time.Time `xorm:"DATETIME"`
+	ModifiedUserId    int       `xorm:"INT(10)"`
+	ModifiedBy        string    `xorm:"VARCHAR(50)"`
+}
+
+type OilQualChangeMain struct {
+	Id             int       `xorm:"not null pk autoincr INT(10)"`
+	SupplierName   string    `xorm:"comment('企业名称') VARCHAR(255)"`
+	AccesscardNo   string    `xorm:"comment('准入证号') VARCHAR(20)"`
+	CommercialNo   string    `xorm:"comment('工商注册号') VARCHAR(20)"`
+	WorkFlowId     string    `xorm:"comment('工作流的ID') VARCHAR(50)"`
+	CreateOn       time.Time `xorm:"DATETIME"`
+	CreateUserId   int       `xorm:"INT(10)"`
+	CreateBy       string    `xorm:"VARCHAR(50)"`
+	ModifiedOn     time.Time `xorm:"DATETIME"`
+	ModifiedUserId int       `xorm:"INT(10)"`
+	ModifiedBy     string    `xorm:"VARCHAR(50)"`
+}

+ 139 - 0
src/dashoo.cn/backend/api/business/oilsupplier/qualchange/qualchangeService.go

@@ -0,0 +1,139 @@
+package qualchange
+
+import (
+	"dashoo.cn/backend/api/business/auditsetting"
+	"dashoo.cn/backend/api/business/oilsupplier/classorgsetting"
+	"dashoo.cn/backend/api/business/oilsupplier/supplier"
+	"dashoo.cn/backend/api/business/oilsupplier/suppliercert"
+	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
+	"dashoo.cn/backend/api/business/workflow"
+	. "dashoo.cn/backend/api/mydb"
+	"dashoo.cn/business2/userRole"
+	"strings"
+
+	"strconv"
+
+	"dashoo.cn/utils"
+	. "dashoo.cn/utils/db"
+	"github.com/go-xorm/xorm"
+)
+
+type QualChangeService struct {
+	MyServiceBase
+}
+
+func GetQualChangeService(xormEngine *xorm.Engine) *QualChangeService {
+	s := new(QualChangeService)
+	s.DBE = xormEngine
+	return s
+}
+
+//获取资质列表
+func (s *QualChangeService) GetQualPagingEntitiesWithOrderBytbl(supname, supcername, supfilename, order, where string, pageIndex, itemsPerPage int64) (int64,[]supplier.OilSupplierView) {
+	var err error
+	var total int64
+	if where == "" {
+		where = " 1=1 "
+	}
+	//获取总记录数
+	sqlCount := `select count(*) from ` + supname + ` a 
+	left join ` + supcername + ` b on a.Id=b.SupplierId 
+	where a.Id in ( select SupplierId from `+ supfilename +`) and `+ where
+	var sql string
+	sql = `select a.*, b.*, b.Id CertId from ` + supname + ` a  
+	left join ` + supcername + ` b on a.Id=b.SupplierId 
+	where a.Id in ( select SupplierId from `+ supfilename +`) and` + where + ` order by ` + order +
+		` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)
+
+	List := make([]supplier.OilSupplierView, 0)
+	utils.DBE.Sql(sql).Find(&List)
+
+	resultsSlice, err := s.DBE.Query(sqlCount)
+	LogError(err)
+	if len(resultsSlice) > 0 {
+		results := resultsSlice[0]
+		for _, value := range results {
+			total, err = strconv.ParseInt(string(value), 10, 64)
+			LogError(err)
+			break
+		}
+	}
+	return total, List
+}
+
+//通用多部门多实例审核方法
+func (s *QualChangeService) SubmitOrgAudit(workflowid, certId, annualId, wfName, wfNodeCode, userId, result, remarks, OilSupplierCertSubName, OilClassOrgSettingName string) (processInstanceId string) {
+	//取出审批列表
+	var supplierCert suppliercert.OilSupplierCert
+	s.GetEntityById(certId, &supplierCert)
+
+	//取出准入分类列表
+	var subList []suppliercertsub.OilSupplierCertSub
+	certSubSrv := suppliercertsub.GetOilSupplierCertSubService(s.DBE)
+	subWhere := " 1=1 "
+	subWhere += " and SupplierCertId='" + certId + "'"
+	certSubSrv.GetEntitysByWhere(OilSupplierCertSubName, subWhere, &subList)
+	var subClassIds string
+	for _, certSub := range subList {
+		subClassIds += strconv.Itoa(certSub.SubClassId) + ","
+	}
+	subClassIds = strings.Trim(subClassIds, ",")
+	if len(subClassIds) <= 0 {
+		panic("没有选择准入分类")
+	}
+
+	//取出审核部门
+	classorgSrv := classorgsetting.GetOilClassOrgSettingService(s.DBE)
+	var list []classorgsetting.OilClassOrgSetting
+	var orgListStr string
+	var where string
+	where += " 1=1 "
+	subWhere += " and SupplierTypeCode='" + supplierCert.SupplierTypeCode + "'"
+	where += " and ClassId in (" + subClassIds + ")"
+	where += " and AuditStepCode = '" + wfNodeCode + "'"
+	classorgSrv.GetEntitysByWhere(OilClassOrgSettingName, where, &list)
+	if len(list) <= 0 {
+		panic("未配置准入分类审批部门")
+	}
+
+	subClassIdsCheck := subClassIds + ","
+	//拼接工作流的需要审批的部门及部门相关的审核人员信息
+	var orgAudits []workflow.MultiOrgAuditVM
+	userSvc := userRole.GetUserService(s.DBE)
+	auditSrv := auditsetting.GetOilAuditSettingService(s.DBE)
+	for _, certsetting := range list {
+		var auditSetting auditsetting.Base_OilAuditSetting
+		var orgAudit workflow.MultiOrgAuditVM
+		orgAudit.OrgId = strconv.Itoa(certsetting.OrganizeId)
+		orgAudit.OrgName = certsetting.OrganizeName
+
+		auditWhere := " 1=1 "
+		auditWhere += " and OrganizeId = '" + strconv.Itoa(certsetting.OrganizeId) + "'"
+		auditWhere += " and AuditStepCode = '" + wfNodeCode + "'"
+		auditSrv.GetEntity(&auditSetting, auditWhere)
+		userIds := userSvc.GetUserIdsByRoleId(strconv.Itoa(auditSetting.RoleId))
+		tempstr := strings.Join(userIds, ",")
+		orgAudit.UserIds = strings.Replace(tempstr, "uid_", "", -1)
+		orgAudits = append(orgAudits, orgAudit)
+
+		orgListStr += "org_" + strconv.Itoa(certsetting.OrganizeId) + ","
+		//排除未设置部门的分类
+		subClassIdsCheck = strings.Replace(subClassIdsCheck, strconv.Itoa(certsetting.ClassId)+",", "", 1)
+	}
+	orgListStr = strings.Trim(orgListStr, ",")
+	if len(subClassIdsCheck) > 0 {
+		panic("存在准入分类 " + subClassIdsCheck + " 未设置审核部门")
+	}
+	if len(orgListStr) <= 0 {
+		panic("未找到审核部门")
+	}
+	//多实例工作流
+	svcActiviti := workflow.GetActivitiService(s.DBE)
+	if workflowid == "0" || len(workflowid) <= 0 {
+		//启动工作流
+		processInstanceId = svcActiviti.StartProcess(wfName, annualId, userId)
+	}
+	//多实例提交给下一步
+	svcActiviti.MultiTaskComplete(wfName, annualId, "", orgAudits, userId, result, remarks)
+	return processInstanceId
+}

+ 416 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/infochange.go

@@ -0,0 +1,416 @@
+package oilsupplier
+
+import (
+	"encoding/json"
+	"strings"
+	"time"
+
+	"dashoo.cn/backend/api/business/oilsupplier/annualaudit"
+	"dashoo.cn/backend/api/business/oilsupplier/supplier"
+	"dashoo.cn/backend/api/business/workflow"
+
+	"dashoo.cn/backend/api/business/baseUser"
+	"dashoo.cn/business/userRole"
+
+	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/utils"
+)
+
+type InfoChangeController struct {
+	BaseController
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []annualaudit.OilAnnualAudit
+// @router /list [get]
+func (this *InfoChangeController) GetEntityList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	SupplierTypeName := this.GetString("SupplierTypeName")
+	RecUnitId := this.GetString("RecUnitId")
+	AccessCardNo := this.GetString("AccessCardNo")
+	SupplierName := this.GetString("SupplierName")
+	CreateOn := this.GetString("CreateOn")
+
+	if SupplierTypeName != "" {
+		where = where + " and SupplierTypeName like '%" + SupplierTypeName + "%'"
+	}
+
+	if RecUnitId != "" {
+		where = where + " and RecUnitId like '%" + RecUnitId + "%'"
+	}
+
+	if AccessCardNo != "" {
+		where = where + " and AccessCardNo like '%" + AccessCardNo + "%'"
+	}
+
+	if SupplierName != "" {
+		where = where + " and SupplierName like '%" + SupplierName + "%'"
+	}
+
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+		}
+	}
+
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	var list []annualaudit.OilAnnualAudit
+	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []annualaudit.OilAnnualAudit
+// @router /mytasks [get]
+func (this *InfoChangeController) GetMyTaskEntityList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	SupplierTypeName := this.GetString("SupplierTypeName")
+	RecUnitId := this.GetString("RecUnitId")
+	AccessCardNo := this.GetString("AccessCardNo")
+	SupplierName := this.GetString("SupplierName")
+	CreateOn := this.GetString("CreateOn")
+
+	if SupplierTypeName != "" {
+		where = where + " and SupplierTypeName like '%" + SupplierTypeName + "%'"
+	}
+
+	if RecUnitId != "" {
+		where = where + " and RecUnitId like '%" + RecUnitId + "%'"
+	}
+
+	if AccessCardNo != "" {
+		where = where + " and AccessCardNo like '%" + AccessCardNo + "%'"
+	}
+
+	if SupplierName != "" {
+		where = where + " and SupplierName like '%" + SupplierName + "%'"
+	}
+
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+		}
+	}
+
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	var list []annualaudit.OilAnnualAudit
+	//找出待办任务
+	actisvc := workflow.GetActivitiService(utils.DBE)
+	certIdList := actisvc.GetMyTasks(workflow.OIL_AUDIT_APPLY, this.User.Id)
+	where += " and Id in (" + certIdList + ")"
+	//根据部门查询待办任务
+
+	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size,orderby,asc, &list, where)
+	//total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
+
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取年审企业名称
+// @Description 获取实体
+// @Success 200 {object} annualaudit.OilAnnualAudit
+// @router /supplierlist [get]
+func (this *InfoChangeController) GetSupplierList() {
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	var supplierlist []annualaudit.Suppliername
+	supplierlist = svc.GetSupplierList(""+OilSupplierName, ""+OilAnnualAuditName)
+	var datainfo DataInfo
+	datainfo.Items = supplierlist
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取字典列表
+// @Description get user by token
+// @Success 200 {object} map[string]interface{}
+// @router /dictlist [get]
+func (this *InfoChangeController) GetDictList() {
+	dictList := make(map[string]interface{})
+	//dictSvc := items.GetItemsService(utils.DBE)
+	userSvc := baseUser.GetBaseUserService(utils.DBE)
+	//customerSvc := svccustomer.GetCustomerService(utils.DBE)
+	//dictList["WellNo"] = dictSvc.GetKeyValueItems("WellNo", "")
+	var userEntity userRole.Base_User
+	userSvc.GetEntityById(this.User.Id, &userEntity)
+	dictList["Supervisers"] = userSvc.GetUserListByDepartmentId("", userEntity.Departmentid)
+
+	//var dictCustomer []svccustomer.Customer
+	//customerSvc.GetEntitysByWhere("" + CustomerName, "", &dictCustomer)
+	//dictList["EntrustCorp"] = &dictCustomer
+
+	var datainfo DataInfo
+	datainfo.Items = dictList
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} annualaudit.OilAnnualAudit
+// @router /get/:id [get]
+func (this *InfoChangeController) GetEntity() {
+	Id := this.Ctx.Input.Param(":id")
+
+	var model annualaudit.OilAnnualAudit
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	svc.GetEntityByIdBytbl(""+OilAnnualAuditName, Id, &model)
+
+	this.Data["json"] = &model
+	this.ServeJSON()
+}
+
+// @Title 添加
+// @Description 新增
+// @Success	200	{object} controllers.Request
+// @router /add [post]
+func (this *InfoChangeController) AddEntity() {
+	var model annualaudit.OilAnnualAudit
+	var errinfo ErrorDataInfo
+	var jsonBlob = this.Ctx.Input.RequestBody
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	json.Unmarshal(jsonBlob, &model)
+	where := "SupplierId = " + utils.ToStr(model.SupplierId) + " and SupplierTypeName = " + model.SupplierTypeName
+	var auditentity []annualaudit.OilAnnualAudit
+	svc.GetEntitysByWhere(""+OilAnnualAuditName, where, &auditentity)
+	if len(auditentity) == 1 {
+		errinfo.Message = "已提交年审,请勿重复提交!"
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	supwhere := "a.Id = " + utils.ToStr(model.SupplierId) + " and b.SupplierTypeCode = " + model.SupplierTypeName
+	supsvc := supplier.GetOilSupplierService(utils.DBE)
+	var list []supplier.OilSupplierView
+	total := supsvc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, 1, 1, "a.Id", true, &list, supwhere)
+	if total == 0 {
+		errinfo.Message = "请先提交准入申请再提交年审!"
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	var suppliermodel supplier.OilSupplierView
+	suppliermodel = list[0]
+	model.RecUnitId = suppliermodel.RecUnitId
+	model.CerId = suppliermodel.CertId
+	model.Status = 0
+	model.BackReason = suppliermodel.BackReason
+	//svc.GetEntitysByWhere(""+OilSupplierName, supwhere, &supplierlist)
+	model.CreateOn = time.Now()
+	model.CreateBy = this.User.Realname
+	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+	//model.OrganizeId, _ = utils.StrTo(this.User.DepartmentId).Int()
+	_, err := svc.InsertEntityBytbl(""+OilAnnualAuditName, &model)
+	annualId := model.Id
+	//工作流开始
+	processInstanceId := svc.SubmitOrgAudit(model.WorkflowId, utils.ToStr(model.CerId), utils.ToStr(model.Id), workflow.OIL_AUDIT_APPLY, workflow.FIRST_TRIAL, this.User.Id, "1", "提交给二级单位初审", OilSupplierCertSubName, OilClassOrgSettingName)
+	var auditmodel annualaudit.OilAnnualAudit
+	auditmodel.WorkflowId = processInstanceId
+	cols := []string{
+		"Id",
+		"WorkflowId",
+	}
+	svc.UpdateEntityByIdCols(annualId, auditmodel, cols)
+	if err == nil {
+		//新增
+		errinfo.Message = "添加成功!"
+		errinfo.Code = 0
+		errinfo.Item = model.Id
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "添加失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+// @Title 修改实体
+// @Description 修改实体
+// @Success	200	{object} controllers.Request
+// @router /update/:id [post]
+func (this *InfoChangeController) UpdateEntity() {
+	id := this.Ctx.Input.Param(":id")
+	var errinfo ErrorInfo
+	if id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+
+	var model annualaudit.OilAnnualAudit
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+
+	var jsonBlob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonBlob, &model)
+	model.ModifiedOn = time.Now()
+	model.ModifiedBy = this.User.Realname
+	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
+
+	cols := []string{
+
+		"Id",
+
+		"Code",
+
+		"Name",
+
+		"F01",
+
+		"F02",
+
+		"F03",
+
+		"F04",
+
+		"F05",
+
+		"F06",
+
+		"F07",
+
+		"F25",
+
+		"Remark",
+
+		"DeletionStateCode",
+
+		"CreateOn",
+
+		"CreateUserId",
+
+		"CreateBy",
+
+		"ModifiedOn",
+
+		"ModifiedUserId",
+
+		"ModifiedBy",
+	}
+	err := svc.UpdateEntityBytbl(""+OilAnnualAuditName, id, &model, cols)
+	if err == nil {
+		errinfo.Message = "修改成功!"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "修改失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+// @Title 删除单条信息
+// @Description
+// @Success 200 {object} ErrorInfo
+// @Failure 403 :id 为空
+// @router /delete/:Id [delete]
+func (this *InfoChangeController) DeleteEntity() {
+	Id := this.Ctx.Input.Param(":Id")
+	var errinfo ErrorInfo
+	if Id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	var model annualaudit.OilAnnualAudit
+	var entityempty annualaudit.OilAnnualAudit
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	opdesc := "删除-" + Id
+	err := svc.DeleteOperationAndWriteLogBytbl(""+OilAnnualAuditName, BaseOperationLogName, Id, &model, &entityempty, utils.ToStr(this.User.Id), this.User.Username, opdesc, "", "钻井日报")
+	if err == nil {
+		errinfo.Message = "删除成功"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "删除失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+// @Title 基建类业务
+// @Description get user by token
+// @Success 200 {object} models.Userblood
+// @router /basiclist [get]
+func (this *InfoChangeController) BasicList() {
+	page := this.GetPageInfoForm()
+	var list []annualaudit.OilAnnualAudit
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	where := " 1=1"
+	orderby := "Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	keyword := this.GetString("keyword")
+	if keyword != "" {
+		where = where + " and Name like '%" + keyword + "%'"
+	}
+	total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}

+ 409 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/qualchange.go

@@ -0,0 +1,409 @@
+package oilsupplier
+
+import (
+	"dashoo.cn/backend/api/business/oilsupplier/qualchange"
+	"encoding/json"
+	"strings"
+	"time"
+
+	"dashoo.cn/backend/api/business/oilsupplier/annualaudit"
+	"dashoo.cn/backend/api/business/oilsupplier/supplier"
+	"dashoo.cn/backend/api/business/workflow"
+
+	"dashoo.cn/backend/api/business/baseUser"
+	"dashoo.cn/business/userRole"
+
+	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/utils"
+)
+
+type QualChangeController struct {
+	BaseController
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []supplier.OilSupplierView
+// @router /list [get]
+func (this *QualChangeController) GetEntityList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " b.Status >= 7 "
+	orderby := "a.CreateOn desc"
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop + " " + Order
+	}
+	CommercialNo := this.GetString("CommercialNo")
+	AccessCardNo := this.GetString("AccessCardNo")
+	SupplierName := this.GetString("SupplierName")
+	CreateOn := this.GetString("CreateOn")
+
+
+	if CommercialNo != "" {
+		where = where + " and a.CommercialNo like '%" + CommercialNo + "%'"
+	}
+
+	if AccessCardNo != "" {
+		where = where + " and b.AccessCardNo like '%" + AccessCardNo + "%'"
+	}
+
+	if SupplierName != "" {
+		where = where + " and a.SupplierName like '%" + SupplierName + "%'"
+	}
+
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and a.CreateOn>='" + minDate + "' and a.CreateOn<='" + maxDate + "'"
+		}
+	}
+
+	svc := qualchange.GetQualChangeService(utils.DBE)
+	var list []supplier.OilSupplierView
+	total, list:= svc.GetQualPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, OilSupplierFileName, orderby, where, page.CurrentPage, page.Size)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []annualaudit.OilAnnualAudit
+// @router /mytasks [get]
+func (this *QualChangeController) GetMyTaskEntityList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	SupplierTypeName := this.GetString("SupplierTypeName")
+	RecUnitId := this.GetString("RecUnitId")
+	AccessCardNo := this.GetString("AccessCardNo")
+	SupplierName := this.GetString("SupplierName")
+	CreateOn := this.GetString("CreateOn")
+
+	if SupplierTypeName != "" {
+		where = where + " and SupplierTypeName like '%" + SupplierTypeName + "%'"
+	}
+
+	if RecUnitId != "" {
+		where = where + " and RecUnitId like '%" + RecUnitId + "%'"
+	}
+
+	if AccessCardNo != "" {
+		where = where + " and AccessCardNo like '%" + AccessCardNo + "%'"
+	}
+
+	if SupplierName != "" {
+		where = where + " and SupplierName like '%" + SupplierName + "%'"
+	}
+
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+		}
+	}
+
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	var list []annualaudit.OilAnnualAudit
+	//找出待办任务
+	actisvc := workflow.GetActivitiService(utils.DBE)
+	certIdList := actisvc.GetMyTasks(workflow.OIL_AUDIT_APPLY, this.User.Id)
+	where += " and Id in (" + certIdList + ")"
+	//根据部门查询待办任务
+
+	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size,orderby,asc, &list, where)
+	//total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
+
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取年审企业名称
+// @Description 获取实体
+// @Success 200 {object} annualaudit.OilAnnualAudit
+// @router /supplierlist [get]
+func (this *QualChangeController) GetSupplierList() {
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	var supplierlist []annualaudit.Suppliername
+	supplierlist = svc.GetSupplierList(""+OilSupplierName, ""+OilAnnualAuditName)
+	var datainfo DataInfo
+	datainfo.Items = supplierlist
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取字典列表
+// @Description get user by token
+// @Success 200 {object} map[string]interface{}
+// @router /dictlist [get]
+func (this *QualChangeController) GetDictList() {
+	dictList := make(map[string]interface{})
+	//dictSvc := items.GetItemsService(utils.DBE)
+	userSvc := baseUser.GetBaseUserService(utils.DBE)
+	//customerSvc := svccustomer.GetCustomerService(utils.DBE)
+	//dictList["WellNo"] = dictSvc.GetKeyValueItems("WellNo", "")
+	var userEntity userRole.Base_User
+	userSvc.GetEntityById(this.User.Id, &userEntity)
+	dictList["Supervisers"] = userSvc.GetUserListByDepartmentId("", userEntity.Departmentid)
+
+	//var dictCustomer []svccustomer.Customer
+	//customerSvc.GetEntitysByWhere("" + CustomerName, "", &dictCustomer)
+	//dictList["EntrustCorp"] = &dictCustomer
+
+	var datainfo DataInfo
+	datainfo.Items = dictList
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} annualaudit.OilAnnualAudit
+// @router /get/:id [get]
+func (this *QualChangeController) GetEntity() {
+	Id := this.Ctx.Input.Param(":id")
+
+	var model annualaudit.OilAnnualAudit
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	svc.GetEntityByIdBytbl(""+OilAnnualAuditName, Id, &model)
+
+	this.Data["json"] = &model
+	this.ServeJSON()
+}
+
+// @Title 添加
+// @Description 新增
+// @Success	200	{object} controllers.Request
+// @router /add [post]
+func (this *QualChangeController) AddEntity() {
+	var model annualaudit.OilAnnualAudit
+	var errinfo ErrorDataInfo
+	var jsonBlob = this.Ctx.Input.RequestBody
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	json.Unmarshal(jsonBlob, &model)
+	where := "SupplierId = " + utils.ToStr(model.SupplierId) + " and SupplierTypeName = " + model.SupplierTypeName
+	var auditentity []annualaudit.OilAnnualAudit
+	svc.GetEntitysByWhere(""+OilAnnualAuditName, where, &auditentity)
+	if len(auditentity) == 1 {
+		errinfo.Message = "已提交年审,请勿重复提交!"
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	supwhere := "a.Id = " + utils.ToStr(model.SupplierId) + " and b.SupplierTypeCode = " + model.SupplierTypeName
+	supsvc := supplier.GetOilSupplierService(utils.DBE)
+	var list []supplier.OilSupplierView
+	total := supsvc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, 1, 1, "a.Id", true, &list, supwhere)
+	if total == 0 {
+		errinfo.Message = "请先提交准入申请再提交年审!"
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	var suppliermodel supplier.OilSupplierView
+	suppliermodel = list[0]
+	model.RecUnitId = suppliermodel.RecUnitId
+	model.CerId = suppliermodel.CertId
+	model.Status = 0
+	model.BackReason = suppliermodel.BackReason
+	//svc.GetEntitysByWhere(""+OilSupplierName, supwhere, &supplierlist)
+	model.CreateOn = time.Now()
+	model.CreateBy = this.User.Realname
+	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+	//model.OrganizeId, _ = utils.StrTo(this.User.DepartmentId).Int()
+	_, err := svc.InsertEntityBytbl(""+OilAnnualAuditName, &model)
+	annualId := model.Id
+	//工作流开始
+	processInstanceId := svc.SubmitOrgAudit(model.WorkflowId, utils.ToStr(model.CerId), utils.ToStr(model.Id), workflow.OIL_AUDIT_APPLY, workflow.FIRST_TRIAL, this.User.Id, "1", "提交给二级单位初审", OilSupplierCertSubName, OilClassOrgSettingName)
+	var auditmodel annualaudit.OilAnnualAudit
+	auditmodel.WorkflowId = processInstanceId
+	cols := []string{
+		"Id",
+		"WorkflowId",
+	}
+	svc.UpdateEntityByIdCols(annualId, auditmodel, cols)
+	if err == nil {
+		//新增
+		errinfo.Message = "添加成功!"
+		errinfo.Code = 0
+		errinfo.Item = model.Id
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "添加失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+// @Title 修改实体
+// @Description 修改实体
+// @Success	200	{object} controllers.Request
+// @router /update/:id [post]
+func (this *QualChangeController) UpdateEntity() {
+	id := this.Ctx.Input.Param(":id")
+	var errinfo ErrorInfo
+	if id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+
+	var model annualaudit.OilAnnualAudit
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+
+	var jsonBlob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonBlob, &model)
+	model.ModifiedOn = time.Now()
+	model.ModifiedBy = this.User.Realname
+	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
+
+	cols := []string{
+
+		"Id",
+
+		"Code",
+
+		"Name",
+
+		"F01",
+
+		"F02",
+
+		"F03",
+
+		"F04",
+
+		"F05",
+
+		"F06",
+
+		"F07",
+
+		"F25",
+
+		"Remark",
+
+		"DeletionStateCode",
+
+		"CreateOn",
+
+		"CreateUserId",
+
+		"CreateBy",
+
+		"ModifiedOn",
+
+		"ModifiedUserId",
+
+		"ModifiedBy",
+	}
+	err := svc.UpdateEntityBytbl(""+OilAnnualAuditName, id, &model, cols)
+	if err == nil {
+		errinfo.Message = "修改成功!"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "修改失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+// @Title 删除单条信息
+// @Description
+// @Success 200 {object} ErrorInfo
+// @Failure 403 :id 为空
+// @router /delete/:Id [delete]
+func (this *QualChangeController) DeleteEntity() {
+	Id := this.Ctx.Input.Param(":Id")
+	var errinfo ErrorInfo
+	if Id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	var model annualaudit.OilAnnualAudit
+	var entityempty annualaudit.OilAnnualAudit
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	opdesc := "删除-" + Id
+	err := svc.DeleteOperationAndWriteLogBytbl(""+OilAnnualAuditName, BaseOperationLogName, Id, &model, &entityempty, utils.ToStr(this.User.Id), this.User.Username, opdesc, "", "钻井日报")
+	if err == nil {
+		errinfo.Message = "删除成功"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "删除失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+// @Title 基建类业务
+// @Description get user by token
+// @Success 200 {object} models.Userblood
+// @router /basiclist [get]
+func (this *QualChangeController) BasicList() {
+	page := this.GetPageInfoForm()
+	var list []annualaudit.OilAnnualAudit
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	where := " 1=1"
+	orderby := "Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	keyword := this.GetString("keyword")
+	if keyword != "" {
+		where = where + " and Name like '%" + keyword + "%'"
+	}
+	total := svc.GetPagingEntitiesWithoutAccCode(page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}

+ 6 - 0
src/dashoo.cn/backend/api/routers/router.go

@@ -316,6 +316,12 @@ func init() {
 				&oilsupplier.PaymentInfoController{},
 			),
 		),
+		//资质变更
+		beego.NSNamespace("/qualchange",
+			beego.NSInclude(
+				&oilsupplier.QualChangeController{},
+			),
+		),
 	)
 	beego.AddNamespace(ns)
 }

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

@@ -0,0 +1,67 @@
+export default {
+  getList (CreateOn, params, myAxios) {
+    return myAxios({
+      url: '/infochange/list?CreateOn=' + CreateOn,
+      method: 'GET',
+      params: params
+    })
+  },
+  getDictList (myAxios) {
+    return myAxios({
+      url: '/infochange/dictlist/',
+      method: 'GET'
+    })
+  },
+  getEntityByCreatorAndType (typeCode, myAxios) {
+    return myAxios({
+      url: '/infochange/getbycreatorandtype/' + typeCode,
+      method: 'GET'
+    })
+  },
+  getEntity (entityId, myAxios) {
+    return myAxios({
+      url: '/infochange/get/' + entityId,
+      method: 'GET'
+    })
+  },
+  addEntity (formData, myAxios) {
+    return myAxios({
+      url: '/infochange/add',
+      method: 'post',
+      data: formData
+    })
+  },
+  updateEntity (entityId, formData, myAxios) {
+    return myAxios({
+      url: '/infochange/update/' + entityId,
+      method: 'post',
+      data: formData
+    })
+  },
+  deleteEntity (entityId, myAxios) {
+    return myAxios({
+      url: '/infochange/delete/' + entityId,
+      method: 'delete'
+    })
+  },
+  auditEntity (entityId, myAxios) {
+    return myAxios({
+      url: '/infochange/audit/' + entityId,
+      method: 'post'
+    })
+  },
+  // 专业审批
+  auditEntityadmission (entityId, myAxios) {
+    return myAxios({
+      url: '/infochange/admission/' + entityId,
+      method: 'post'
+    })
+  },
+  // 增项审批
+  auditEntityappend (entityId, myAxios) {
+    return myAxios({
+      url: '/infochange/auditappend/' + entityId,
+      method: 'post'
+    })
+  }
+}

+ 67 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/qualchange.js

@@ -0,0 +1,67 @@
+export default {
+  getList (CreateOn, params, myAxios) {
+    return myAxios({
+      url: '/qualchange/list?CreateOn=' + CreateOn,
+      method: 'GET',
+      params: params
+    })
+  },
+  getDictList (myAxios) {
+    return myAxios({
+      url: '/qualchange/dictlist/',
+      method: 'GET'
+    })
+  },
+  getEntityByCreatorAndType (typeCode, myAxios) {
+    return myAxios({
+      url: '/qualchange/getbycreatorandtype/' + typeCode,
+      method: 'GET'
+    })
+  },
+  getEntity (entityId, myAxios) {
+    return myAxios({
+      url: '/qualchange/get/' + entityId,
+      method: 'GET'
+    })
+  },
+  addEntity (formData, myAxios) {
+    return myAxios({
+      url: '/qualchange/add',
+      method: 'post',
+      data: formData
+    })
+  },
+  updateEntity (entityId, formData, myAxios) {
+    return myAxios({
+      url: '/qualchange/update/' + entityId,
+      method: 'post',
+      data: formData
+    })
+  },
+  deleteEntity (entityId, myAxios) {
+    return myAxios({
+      url: '/qualchange/delete/' + entityId,
+      method: 'delete'
+    })
+  },
+  auditEntity (entityId, myAxios) {
+    return myAxios({
+      url: '/qualchange/audit/' + entityId,
+      method: 'post'
+    })
+  },
+  // 专业审批
+  auditEntityadmission (entityId, myAxios) {
+    return myAxios({
+      url: '/qualchange/admission/' + entityId,
+      method: 'post'
+    })
+  },
+  // 增项审批
+  auditEntityappend (entityId, myAxios) {
+    return myAxios({
+      url: '/qualchange/auditappend/' + entityId,
+      method: 'post'
+    })
+  }
+}

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

@@ -483,12 +483,13 @@
             if (this.formData.SpecTypeCode.length > 0) {
               this.$refs["TechInfo"].UnitRelationAry = this.formData.SpecTypeCode.split(',')
             }
-
+            //this.$refs["businessList"].getvalue(this.formData.Id,this.formData.SupplierTypeCode,this.certId)
             this.entrydetail.business = this.certId
             this.entrydetail.instance = this.WorkflowId
             if (this.certId && this.WorkflowId) {
               this.$refs['WfHistory'].getHistoryTask() /*刷新工作流*/
             }
+            console.log("---this.entrydetail----",this.entrydetail)
 
           }).catch(err => {
             console.error(err)

+ 400 - 20
src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/_opera/operation.vue

@@ -2,7 +2,7 @@
   <div>
     <el-breadcrumb class="heading">
       <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
-      <el-breadcrumb-item :to="{ path: '/oilsupplier/qualchange' }">技术服务类资质对照表</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/qualchange' }">资质变更</el-breadcrumb-item>
       <el-breadcrumb-item>编辑</el-breadcrumb-item>
     </el-breadcrumb>
     <el-card class="box-card">
@@ -17,10 +17,88 @@
           </router-link>
         </span>
       </div>
-      <el-tab-pane label="企业资质" :disabled="!certId">
-        <business-list ref="businessList" :data="businessList" :SupplierCertId="certId" :SupplierId="serviceId"
-          :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></business-list>
-      </el-tab-pane>
+      <el-table :data="businessList" border>
+        <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="Remark" label="备注" show-overflow-tooltip></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-card class="box-card" style="margin-top: 10px;">
+      <div slot="header" class="clearfix">
+        <span style="font-weight: bold">分类文档</span>
+      </div>
+      <!-- <subfile-list ref="subfileList" :data="subfileList" :SupplierId="SupplierId" :SupplierCertId="SupplierCertId"
+        :SupplierTypeCode="SupplierTypeCode" :businessList="businessList" :BusinessForm="BusinessForm" height="360px"
+        style="margin-top: 20px">
+      </subfile-list> -->
+       <el-table :data="subfileList" border>
+      <el-table-column label="操作" width="150" align="center" fixed>
+        <template slot-scope="scope">
+          <el-button type="primary" plain size="mini" title="编辑" @click="openDialog(scope.row)">编辑</el-button>
+        </template>
+      </el-table-column>
+      <el-table-column prop="NeedFileType" label="文件分类" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="FileName" label="文件名称" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="EffectDate" label="有效日期" show-overflow-tooltip>
+        <template slot-scope="scope">
+          {{ jstimehandle(scope.row.EffectDate+'') }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="OtherRemark" label="其他信息" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="Remark" label="备注信息" show-overflow-tooltip></el-table-column>
+    </el-table>
+
+    <el-dialog :title="Title" :visible.sync="visible" top="5vh">
+      <el-form :model="SubfileForm" label-width="100px">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="有效日期" required>
+              <el-date-picker style="width: 100%" v-model="SubfileForm.EffectDate" type="date" placeholder="请选择有效日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注信息">
+              <el-input v-model="SubfileForm.Remark" type="textarea" :rows=3 placeholder="请输入备注信息"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="文档上传">
+              <el-upload style="margin-top: 10px;" multiple action="" :limit="1" ref="refuploadattach"
+                :http-request="uploadrequest" class="attach-uploader" :show-file-list="true"
+                :before-upload="beforeAvatarUpload">
+                <i class="el-icon-plus attach-uploader-icon"></i>
+              </el-upload>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item class="maintainlog" label="" label-width="120px">
+              <div style="overflow: auto;">
+                <template>
+                  <el-row>
+                    <el-col :span="24" v-for="(v,K) in doclist" :key="v">
+                      <span>
+                        <el-button size="small" type="text" icon="el-icon-delete" title="删除" @click="deletefile(K)">
+                        </el-button>
+                      </span>
+                      <a style="margin-left:10px" @click="clickachment(v.url)">{{ v.name }}</a>
+                    </el-col>
+                  </el-row>
+                </template>
+              </div>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top:-30px;">
+        <el-button @click="visible = false">取 消</el-button>
+        <el-button type="primary" @click="makesure()">确 定</el-button>
+      </div>
+    </el-dialog>
     </el-card>
   </div>
 </template>
@@ -29,17 +107,21 @@
   import {
     mapGetters
   } from 'vuex'
-  import BusinessList from '@/components/oilsupplier/businesslist'
+  // import BusinessList from '@/components/oilsupplier/businesslist'
   import api from '@/api/oilsupplier/technologyservice';
+  // import SubfileList from '@/components/oilsupplier/subfilelist'
+  import uploadajax from '@/assets/js//uploadajax.js'
   export default {
     computed: {
       ...mapGetters({
-        authUser: 'authUser'
+        authUser: 'authUser',
+        session: 'session'
       })
     },
-    components: {
-      BusinessList,
-    },
+    // components: {
+    //   BusinessList,
+    //   SubfileList, //文档
+    // },
     name: 'oiltechnologyserviceEdit',
 
     data() {
@@ -47,8 +129,43 @@
         businessList: [], //准入业务
         serviceId: '',
         certId: '',
-        classId: '03',
+        classId: '',
+        SupplierId: '',
+        SupplierCertId: '',
+        SupplierTypeCode: '',
+        subfileList: [],
+        techList: [],
+        techTreeList: [],
+        orgtreeprops: {
+          value: 'id',
+          label: 'Name',
+          children: 'children'
+        },
+        selectedorg: [],
+
+        Title: '',
+        SubfileForm: {
+          Id: '',
+          SupplierId: '',
+          SupplierTypeCode: '',
+          SupplierCertSubId: '',
+          CertSubName: '',
+          NeedFileType: '',
+          NeedFileCode: '',
+          FileType: '',
+          FileExt: '',
+          FileName: '',
+          EffectDate: new Date(),
+          FileUrl: '',
+          OtherRemark: '',
+          Remark: '',
+          IsDelete: 0
+        },
+        visible: false,
+        selfVisible: this.visible, // 避免vue双向绑定警告
 
+        waituploads: [], // 等待上传的附件列表
+        doclist: [],
       }
     },
     created() {
@@ -59,19 +176,35 @@
       if (this.$route.query.classId) {
         this.classId = this.$route.query.classId + ''
       }
-      this.getDictOptions();
+      this.SupplierId = this.serviceId
+      this.SupplierTypeCode = this.classId
+      this.SupplierCertId = this.certId
+      console.log("---Id---", this.certId, this.serviceId)
+      this.getDictOptions()
+      this.initData()
     },
     methods: {
-      initDatas() {
-        if (this.formData.Id) {
-          api.getEntity(this.formData.Id, this.$axios).then(res => {
-            this.formData = res.data;
-          }).catch(err => {
-            console.error(err)
-          });
+      initData() {
+        let _this = this
+        const params = {
+          SupplierCertId: this.SupplierCertId,
+          SupplierTypeCode: this.SupplierTypeCode,
+          _currentPage: this.currentPage,
+          _size: this.size,
         }
+        this.$axios.get('suppliercertsub/list', {
+            params
+          })
+          .then(res => {
+            _this.businessList = res.data.items
+            _this.currentItemCount = res.data.currentItemCount
+            _this.initFileData()
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
       },
-
       getDictOptions() {
         api.getDictList(this.$axios).then(res => {
           //this.wellNoOptions = res.data.items['WellNo']
@@ -80,13 +213,231 @@
           console.error(err)
         })
       },
+      initFileData() {
+        let _this = this
+        const params = {
+          SupplierId: this.SupplierId,
+          SupplierTypeCode: this.SupplierTypeCode,
+          _currentPage: 1,
+          _size: 1000,
+        }
+        _this.$axios.get('supplierfile/filelist', {
+            params
+          })
+          .then(res => {
+            _this.subfileList = res.data.items
+            _this.currentItemCount = res.data.currentItemCount
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      getCode() {
+        if (this.businessList && this.businessList.length > 0) {
+          for (var i = 0; i < this.businessList.length; i++) {
+            if (this.SubfileForm.SupplierCertSubId == this.businessList[i].Id) {
+              this.SubfileForm.CertSubName = this.businessList[i].Name
+            }
+          }
+        }
+      },
+      makesure() {
+        if (this.Title == '新增文件') {
+          if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
+            // 上传附件是否完成判断
+            if (!this.attachissuccess()) {
+              this.$message.error('有附件未成功上传!不能保存数据')
+              return
+            }
+            this.getattachissuccess()
+            this.addSubfile()
+          } else {
+            this.$message({
+              type: 'warning',
+              message: '请上传文件!'
+            })
+          }
+        } else if (this.Title == '编辑文件') {
+          if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
+            // 上传附件是否完成判断
+            if (!this.attachissuccess()) {
+              this.$message.error('有附件未成功上传!不能保存数据')
+              return
+            }
+            this.getattachissuccess()
+            this.editSubfile()
+          } else {
+            this.editSubfile()
+          }
+        }
+      },
+      editSubfile() {
+        let _this = this
+        _this.SubfileForm.SupplierId = parseInt(_this.SubfileForm.SupplierId)
+        _this.SubfileForm.SupplierCertSubId = parseInt(_this.SubfileForm.SupplierCertSubId)
+        _this.$axios.put('/supplierfile/editsubfile/' + _this.SubfileForm.Id, _this.SubfileForm)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+              this.visible = false
+              this.initFileData()
+              this.$refs.refuploadattach = ''
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      showDialog() {
+        this.Title = '新增文件'
+        this.SubfileForm.Id = ''
+        this.SubfileForm.SupplierId = this.SupplierId
+        this.SubfileForm.SupplierTypeCode = this.SupplierTypeCode
+        this.SubfileForm.SupplierCertSubId = ''
+        this.SubfileForm.CertSubName = ''
+        this.SubfileForm.NeedFileType = ''
+        this.SubfileForm.NeedFileCode = ''
+        this.SubfileForm.FileExt = ''
+        this.SubfileForm.FileType = ''
+        this.SubfileForm.FileName = ''
+        this.SubfileForm.EffectDate = new Date()
+        this.SubfileForm.FileUrl = ''
+        this.SubfileForm.OtherRemark = ''
+        this.SubfileForm.Remark = ''
+        this.SubfileForm.IsDelete = 0
+        this.visible = true
+      },
+      openDialog(val) {
+        this.Title = '编辑文件'
+        this.SubfileForm.Id = val.Id
+        this.SubfileForm.SupplierId = val.SupplierId
+        this.SubfileForm.SupplierTypeCode = val.SupplierTypeCode
+        if (val.SupplierCertSubId == 0) {
+          this.SubfileForm.SupplierCertSubId = ''
+        } else {
+          this.SubfileForm.SupplierCertSubId = val.SupplierCertSubId
+        }
+        this.SubfileForm.CertSubName = val.CertSubName
+        this.SubfileForm.NeedFileType = val.NeedFileType
+        this.SubfileForm.NeedFileCode = val.NeedFileCode
+        this.SubfileForm.FileExt = val.FileExt
+        this.SubfileForm.FileType = val.FileType
+        this.SubfileForm.FileName = val.FileName
+        this.SubfileForm.EffectDate = new Date(val.EffectDate)
+        this.SubfileForm.FileUrl = val.FileUrl
+        this.SubfileForm.OtherRemark = val.OtherRemark
+        if (val.FileUrl != '') {
+          this.getwendanginfo(val.FileUrl)
+        }
+        this.SubfileForm.Remark = val.Remark
+        this.SubfileForm.IsDelete = val.IsDelete
+        this.visible = true
+      },
+      //文档列表
+      getwendanginfo(iUrl) {
+        let _this = this
+        _this.doclist = []
+        let exArr = iUrl.split('|')
+        let params = {
+          name: exArr[1],
+          url: exArr[0]
+        }
+        _this.doclist.push(params)
+      },
 
+      beforeAvatarUpload(file) {
+        let isLt50m = file.size / 1024 / 1024 / 50 < 1
+        if (!isLt50m) {
+          this.$message.error('上传文件大小不能超过 50MB!')
+          return false
+        }
+        return true
+      },
+      uploadrequest(option) {
+        let _this = this
+        axios.post(process.env.upfilehost, {})
+          .then(function (res) {
+            if (res.data && res.data.fid && res.data.fid !== '') {
+              option.action = `http://${res.data.url}/${res.data.fid}`
+              _this.waituploads.push({
+                uid: option.file.uid,
+                url: res.data.publicUrl,
+                fid: res.data.fid
+              })
+              uploadajax(option)
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: '未上传成功!请刷新界面重新上传!'
+              })
+            }
+          })
+          .catch(function (error) {
+            _this.$message({
+              type: 'warning',
+              message: '未上传成功!请重新上传!'
+            })
+          })
+      },
+      // 判断附件是否上传成功
+      attachissuccess() {
+        if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
+          for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
+            if (this.$refs.refuploadattach.uploadFiles[i].status !== 'success') {
+              return false
+            }
+          }
+        }
+        return true
+      },
+      getattachissuccess() {
+        this.SubfileForm.FileUrl = ''
+        if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
+          for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
+            if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {
+              for (let j = 0; j < this.waituploads.length; j++) {
+                if (this.waituploads[j].uid === this.$refs.refuploadattach.uploadFiles[i].uid) {
+                  this.SubfileForm.FileUrl =
+                    `${this.waituploads[j].url}/${this.waituploads[j].fid}|${this.$refs.refuploadattach.uploadFiles[i].name}`
+                  this.SubfileForm.FileName = `${this.$refs.refuploadattach.uploadFiles[i].name}`
+                }
+              }
+            }
+          }
+        }
+      },
+      clickachment(url, uid) {
+        window.open(`http://${url}`)
+      },
+      deletefile() {
+        let _this = this
+        _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          })
+          .then(() => {
+            _this.doclist = []
+          })
+          .catch(() => {})
+      },
       submitqualChange() {
 
       },
       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') {
@@ -112,3 +463,32 @@
   }
 
 </script>
+<style lang='scss'>
+  .attach-uploader .el-upload {
+    border: 1px dashed #63B8FF;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+    // margin-bottom: -17px;
+    margin-top: -15px;
+    margin-left: 20px
+  }
+
+  .attach-uploader .el-upload:hover {
+    border-color: #228B22;
+  }
+
+  .attach-uploader-icon {
+    font-size: 25px;
+    color: #63B8FF;
+    width: 50px;
+    height: 50px;
+    line-height: 50px;
+    text-align: center;
+  }
+
+  .attach-uploader-icon:hover {
+    color: #228B22;
+  }
+
+</style>

+ 13 - 11
src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/index.vue

@@ -39,7 +39,7 @@
       <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby">
         <el-table-column label="操作" min-width="90" align="center" fixed>
           <template slot-scope="scope">
-            <router-link :to="'/oilsupplier/qualchange/' + scope.row.SupplierId + '/operation?certid=' + scope.row.SupplierCertId +'&classId='+ scope.row.SupplierTypeCode">
+            <router-link :to="'/oilsupplier/qualchange/' + scope.row.Id + '/operation?certid=' + scope.row.CertId +'&classId='+ scope.row.SupplierTypeCode">
               <el-button type="primary" plain title="编辑" size="mini">编辑</el-button>
             </router-link>
           </template>
@@ -48,11 +48,7 @@
         </el-table-column>
         <el-table-column prop="SupplierName" label="企业名称" sortable min-width="110" align="center" show-overflow-tooltip>
         </el-table-column>
-        <el-table-column prop="SupplierTypeCode" label="准入类别" sortable min-width="110" align="center"
-          show-overflow-tooltip>
-          <template slot-scope="scope">
-            {{ checkSupplierTypeName(scope.row.SupplierTypeCode) }}
-          </template>
+        <el-table-column prop="CommercialNo" label="工商注册号" sortable min-width="110" align="center" show-overflow-tooltip>
         </el-table-column>
         <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
           <template slot-scope="scope">
@@ -60,19 +56,25 @@
               title="初审未通过" type="warning">
             </el-alert>
             <el-alert v-if="scope.row.Status=='4'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="审核未通过" type="error">
+              title=" 待集中评审" type="warning">
             </el-alert>
             <el-alert v-if="scope.row.Status=='0'" :closable="false" style="background:rgba(255,255,255,0.2)"
               title="已申请" type="info">
             </el-alert>
             <el-alert v-if="scope.row.Status=='1'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="初审通过" type="success">
+              title="待二级复审 " type="warning">
             </el-alert>
             <el-alert v-if="scope.row.Status=='5'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="已交费" type="success">
+              title="待交费 " type="warning">
             </el-alert>
             <el-alert v-if="scope.row.Status=='3'" :closable="false" style="background:rgba(255,255,255,0.2)"
-              title="专业审核通过" type="success">
+              title=" 待专业科室审核" type="warning">
+            </el-alert>
+            <el-alert v-if="scope.row.Status=='6'" :closable="false" style="background:rgba(255,255,255,0.2)"
+              title=" 待入库" type="warning">
+            </el-alert>
+            <el-alert v-if="scope.row.Status=='7'" :closable="false" style="background:rgba(255,255,255,0.2)"
+              title=" 完成" type="success">
             </el-alert>
           </template>
         </el-table-column>
@@ -233,7 +235,7 @@
         //查询条件
         Object.assign(params, this.searchForm)
         //访问接口
-        this.$axios.get('suppliercertsub/list?CreateOn=' + myCreateOn.join(','), {
+        this.$axios.get('qualchange/list?CreateOn=' + myCreateOn.join(','), {
           params
         }).then(res => {
           console.log("----res.data---", res.data)