Bläddra i källkod

技术服务类组件(企业装备、主要工程、专利、奖励)

shihang 6 år sedan
förälder
incheckning
5e8a79026e

+ 21 - 0
src/dashoo.cn/backend/api/business/majorequip/majorequip.go

@@ -0,0 +1,21 @@
+package majorequip
+
+import (
+	"time"
+)
+
+type OilEnterpriseMajorEquipment struct {
+	Id             int       `xorm:"not null pk autoincr INT(10)"`
+	SupplierCertId int       `xorm:"INT(10)"`
+	MainEquipment  string    `xorm:"VARCHAR(100)"`
+	Specifications string    `xorm:"VARCHAR(100)"`
+	Number         string    `xorm:"CHAR(10)"`
+	Remark         string    `xorm:"VARCHAR(500)"`
+	IsDelete       int       `xorm:"INT(10)"`
+	CreateOn       time.Time `xorm:"DATETIME created"` //创建时间
+	CreateUserId   int       `xorm:"INT(10)"`
+	CreateBy       string    `xorm:"VARCHAR(50)"` //创建人
+	ModifiedOn     time.Time `xorm:"DATETIME updated"`
+	ModifiedUserId int       `xorm:"INT(10)"`
+	ModifiedBy     string    `xorm:"VARCHAR(50)"`
+}

+ 21 - 0
src/dashoo.cn/backend/api/business/majorequip/majorequipService.go

@@ -0,0 +1,21 @@
+package majorequip
+
+import (
+	//"fmt"
+	//"strconv"
+
+	. "dashoo.cn/backend/api/mydb"
+	//"dashoo.cn/utils"
+	//. "dashoo.cn/utils/db"
+	"github.com/go-xorm/xorm"
+)
+
+type MajorequipService struct {
+	MyServiceBase
+}
+
+func GetMajorequipService(xormEngine *xorm.Engine) *MajorequipService {
+	s := new(MajorequipService)
+	s.DBE = xormEngine
+	return s
+}

+ 20 - 0
src/dashoo.cn/backend/api/business/patent/patent.go

@@ -0,0 +1,20 @@
+package patent
+
+import "time"
+
+type OilPatentStatistical struct {
+	Id                int       `xorm:"not null pk autoincr INT(10)"`
+	SupplierCertId    int       `xorm:"INT(10)"`
+	Name              string    `xorm:"VARCHAR(100)"`
+	Content           string    `xorm:"VARCHAR(100)"`
+	ApprovalAuthority string    `xorm:"VARCHAR(50)"`
+	ApprovalDate      time.Time `xorm:"DATETIME"`
+	Remark            string    `xorm:"VARCHAR(500)"`
+	IsDelete          int       `xorm:"INT(10)"`
+	CreateOn          time.Time `xorm:"DATETIME created"` //创建时间
+	CreateUserId      int       `xorm:"INT(10)"`
+	CreateBy          string    `xorm:"VARCHAR(50)"` //创建人
+	ModifiedOn        time.Time `xorm:"DATETIME updated"`
+	ModifiedUserId    int       `xorm:"INT(10)"`
+	ModifiedBy        string    `xorm:"VARCHAR(50)"`
+}

+ 21 - 0
src/dashoo.cn/backend/api/business/patent/patentService.go

@@ -0,0 +1,21 @@
+package patent
+
+import (
+	//"fmt"
+	//"strconv"
+
+	. "dashoo.cn/backend/api/mydb"
+	//"dashoo.cn/utils"
+	//. "dashoo.cn/utils/db"
+	"github.com/go-xorm/xorm"
+)
+
+type PatentService struct {
+	MyServiceBase
+}
+
+func GetPatentService(xormEngine *xorm.Engine) *PatentService {
+	s := new(PatentService)
+	s.DBE = xormEngine
+	return s
+}

+ 1 - 2
src/dashoo.cn/backend/api/business/performance/performance.go

@@ -10,8 +10,7 @@ type OilThreeYearsPerformance struct {
 	OwnerUnit      string    `xorm:"VARCHAR(100)"`
 	StartTime      time.Time `xorm:"DATETIME"`
 	StopTime       time.Time `xorm:"DATETIME"`
-	Tudge          int       `xorm:"INT(10)"`
-	UseItemValue   string    `xorm:"VARCHAR(20)"`
+	Tudge          string    `xorm:"VARCHAR(50)"`
 	Remark         string    `xorm:"VARCHAR(500)"`
 	IsDelete       int       `xorm:"INT(10)"`
 	CreateOn       time.Time `xorm:"DATETIME created"` //创建时间

+ 19 - 0
src/dashoo.cn/backend/api/business/winning/winning.go

@@ -0,0 +1,19 @@
+package winning
+
+import "time"
+
+type OilWinningProject struct {
+	Id             int       `xorm:"not null pk autoincr INT(10)"`
+	SupplierCertId int       `xorm:"INT(10)"`
+	AwardName      string    `xorm:"VARCHAR(100)"`
+	Authorities    string    `xorm:"VARCHAR(100)"`
+	WinningTime    time.Time `xorm:"DATETIME"`
+	Remark         string    `xorm:"VARCHAR(500)"`
+	IsDelete       int       `xorm:"INT(10)"`
+	CreateOn       time.Time `xorm:"DATETIME created"` //创建时间
+	CreateUserId   int       `xorm:"INT(10)"`
+	CreateBy       string    `xorm:"VARCHAR(50)"` //创建人
+	ModifiedOn     time.Time `xorm:"DATETIME updated"`
+	ModifiedUserId int       `xorm:"INT(10)"`
+	ModifiedBy     string    `xorm:"VARCHAR(50)"`
+}

+ 21 - 0
src/dashoo.cn/backend/api/business/winning/winningService.go

@@ -0,0 +1,21 @@
+package winning
+
+import (
+	//"fmt"
+	//"strconv"
+
+	. "dashoo.cn/backend/api/mydb"
+	//"dashoo.cn/utils"
+	//. "dashoo.cn/utils/db"
+	"github.com/go-xorm/xorm"
+)
+
+type WinningService struct {
+	MyServiceBase
+}
+
+func GetWinningService(xormEngine *xorm.Engine) *WinningService {
+	s := new(WinningService)
+	s.DBE = xormEngine
+	return s
+}

+ 14 - 10
src/dashoo.cn/backend/api/controllers/base.go

@@ -224,16 +224,20 @@ var (
 	UserQualificationName                    string = "UserQualification"   //用户资质表
 	LimsInstrumentGroup                      string = "LimsInstrumentGroup" // 检测仪器关联
 
-	OilBasisBuildName             string = "OilBasisBuild"             // 基建类资质对照表
-	OilGoodsAptitudeName          string = "OilGoodsAptitude"          // 物资类项目与资质对照表
-	OilTableFiledSettingName      string = "OilTableFiledSetting"      // 资质项目与字段对照表
-	OilTechnologyServiceName      string = "OilTechnologyService"      // 技术服务类资质对照表
-	OilSupplierName               string = "OilSupplier"               // 供方基本信息表
-	OilSupplierCertName           string = "OilSupplierCert"           // 供方准入证书信息表
-	OilSupplierCertSubName        string = "OilSupplierCertSub"        // 供方对应准入子分类表
-	OilGoodsAptitudeClassName     string = "OilGoodsAptitudeClass"     // 物资类资质分类层级表
-	OilTechnologyServiceClassName string = "OilTechnologyServiceClass" // 物资类资质分类层级表
-	OilAuditSettingName 		  string = "OilAuditSetting" 		   // 单位审批步骤自定义配置
+	OilBasisBuildName               string = "OilBasisBuild"               // 基建类资质对照表
+	OilGoodsAptitudeName            string = "OilGoodsAptitude"            // 物资类项目与资质对照表
+	OilTableFiledSettingName        string = "OilTableFiledSetting"        // 资质项目与字段对照表
+	OilTechnologyServiceName        string = "OilTechnologyService"        // 技术服务类资质对照表
+	OilSupplierName                 string = "OilSupplier"                 // 供方基本信息表
+	OilSupplierCertName             string = "OilSupplierCert"             // 供方准入证书信息表
+	OilSupplierCertSubName          string = "OilSupplierCertSub"          // 供方对应准入子分类表
+	OilGoodsAptitudeClassName       string = "OilGoodsAptitudeClass"       // 物资类资质分类层级表
+	OilTechnologyServiceClassName   string = "OilTechnologyServiceClass"   // 物资类资质分类层级表
+	OilAuditSettingName             string = "OilAuditSetting"             // 单位审批步骤自定义配置
+	OilEnterpriseMajorEquipmentName string = "OilEnterpriseMajorEquipment" //企业主要装备情况
+	OilThreeYearsPerformanceName    string = "OilThreeYearsPerformance"    //近三年主要工程业绩
+	OilPatentStatisticalName        string = "OilPatentStatistical"        //拥有专利、专有技术及工法
+	OilWinningProjectName           string = "OilWinningProject"           //近三年获得省部级及以上主要技术、管理成果、获奖项目
 )
 
 //分页信息及数据

+ 145 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/majorequip.go

@@ -0,0 +1,145 @@
+package oilsupplier
+
+import (
+	"encoding/json"
+	//"strings"
+
+	//"time"
+	//"fmt"
+
+	"dashoo.cn/backend/api/business/majorequip"
+	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/utils"
+)
+
+type MajorequipController struct {
+	BaseController
+}
+
+// @Title 企业主要装备情况
+// @Description get user by token
+// @Success 200 {object} models.Userblood
+// @router /equipmentlist [get]
+func (this *MajorequipController) MajorequipList() {
+	page := this.GetPageInfoForm()
+	var list []majorequip.OilEnterpriseMajorEquipment
+	svc := majorequip.GetMajorequipService(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
+		}
+	}
+	SupplierCertId := this.GetString("SupplierCertId")
+	if SupplierCertId != "" {
+		where = where + " and SupplierCertId = '" + SupplierCertId + "'"
+	}
+	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()
+}
+
+// @Title 添加企业主要装备情况
+// @Description 添加企业主要装备情况
+// @Success	200	{object} controllers.Request
+// @router /addequipment [post]
+func (this *MajorequipController) AddMajorequip() {
+	var model majorequip.OilEnterpriseMajorEquipment
+	var jsonblob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonblob, &model)
+	model.CreateBy = this.User.Realname
+	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+	svc := majorequip.GetMajorequipService(utils.DBE)
+	_, err := svc.InsertEntityBytbl(OilEnterpriseMajorEquipmentName, &model)
+	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 更新企业主要装备情况
+// @Param	id	path	string	true
+// @Success	200	{object}
+// @router /editequipment/:id [put]
+func (this *MajorequipController) EditEquipment() {
+	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 majorequip.OilEnterpriseMajorEquipment
+	var jsonblob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonblob, &model)
+	var entity majorequip.OilEnterpriseMajorEquipment
+	model.ModifiedBy = this.User.Realname
+	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
+	svc := majorequip.GetMajorequipService(utils.DBE)
+	opdesc := "编辑装备情况-" + model.MainEquipment
+	var cols []string = []string{"MainEquipment", "Specifications", "Number", "Remark", "IsDelete", "ModifiedBy", "ModifiedUserId"}
+	err := svc.UpdateOperationAndWriteLogBytbl(OilEnterpriseMajorEquipmentName, BaseOperationLogName, id, &model, &entity, cols, utils.ToStr(this.User.Id), this.User.Username, opdesc, this.User.AccCode, "装备情况")
+
+	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 /equipmentdelete/:Id [delete]
+func (this *MajorequipController) EquipmentDelete() {
+	Id := this.Ctx.Input.Param(":Id")
+	var errinfo ErrorInfo
+	if Id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	where := " Id= " + Id
+	svc := majorequip.GetMajorequipService(utils.DBE)
+	err := svc.DeleteEntityBytbl(OilEnterpriseMajorEquipmentName, where)
+	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()
+	}
+}

+ 145 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/patent.go

@@ -0,0 +1,145 @@
+package oilsupplier
+
+import (
+	"encoding/json"
+	//"strings"
+
+	//"time"
+	//"fmt"
+
+	"dashoo.cn/backend/api/business/patent"
+	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/utils"
+)
+
+type PatentController struct {
+	BaseController
+}
+
+// @Title 拥有专利、专有技术及工法
+// @Description get user by token
+// @Success 200 {object} models.Userblood
+// @router /patentlist [get]
+func (this *PatentController) PatentList() {
+	page := this.GetPageInfoForm()
+	var list []patent.OilPatentStatistical
+	svc := patent.GetPatentService(utils.DBE)
+	where := " 1=1"
+	orderby := "ApprovalDate"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	SupplierCertId := this.GetString("SupplierCertId")
+	if SupplierCertId != "" {
+		where = where + " and SupplierCertId = '" + SupplierCertId + "'"
+	}
+	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()
+}
+
+// @Title 拥有专利、专有技术及工法
+// @Description 拥有专利、专有技术及工法
+// @Success	200	{object} controllers.Request
+// @router /addpatent [post]
+func (this *PatentController) AddPatent() {
+	var model patent.OilPatentStatistical
+	var jsonblob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonblob, &model)
+	model.CreateBy = this.User.Realname
+	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+	svc := patent.GetPatentService(utils.DBE)
+	_, err := svc.InsertEntityBytbl(OilPatentStatisticalName, &model)
+	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 更新拥有专利、专有技术及工法
+// @Param	id	path	string	true
+// @Success	200	{object}
+// @router /editpatent/:id [put]
+func (this *PatentController) EditPatent() {
+	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 patent.OilPatentStatistical
+	var jsonblob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonblob, &model)
+	var entity patent.OilPatentStatistical
+	model.ModifiedBy = this.User.Realname
+	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
+	svc := patent.GetPatentService(utils.DBE)
+	opdesc := "编辑拥有专利-" + model.Name
+	var cols []string = []string{"Name", "Content", "ApprovalAuthority", "ApprovalDate", "Remark", "IsDelete", "ModifiedBy", "ModifiedUserId"}
+	err := svc.UpdateOperationAndWriteLogBytbl(OilPatentStatisticalName, BaseOperationLogName, id, &model, &entity, cols, utils.ToStr(this.User.Id), this.User.Username, opdesc, this.User.AccCode, "拥有专利")
+
+	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 /patentdelete/:Id [delete]
+func (this *PatentController) PatentDelete() {
+	Id := this.Ctx.Input.Param(":Id")
+	var errinfo ErrorInfo
+	if Id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	where := " Id= " + Id
+	svc := patent.GetPatentService(utils.DBE)
+	err := svc.DeleteEntityBytbl(OilPatentStatisticalName, where)
+	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()
+	}
+}

+ 104 - 3
src/dashoo.cn/backend/api/controllers/oilsupplier/performance.go

@@ -1,7 +1,7 @@
 package oilsupplier
 
 import (
-	//	"encoding/json"
+	"encoding/json"
 	//"strings"
 
 	//"time"
@@ -19,7 +19,7 @@ type PerformanceController struct {
 // @Title 获取近三年主要工程业绩列表
 // @Description get user by token
 // @Success 200 {object} models.Userblood
-// @router /performancellist [get]
+// @router /performancelist [get]
 func (this *PerformanceController) PerformanceList() {
 	page := this.GetPageInfoForm()
 	var list []performance.OilThreeYearsPerformance
@@ -35,10 +35,111 @@ func (this *PerformanceController) PerformanceList() {
 			asc = true
 		}
 	}
-	total := svc.GetPagingEntitiesWithOrderBytbl(this.User.AccCode, page.CurrentPage, page.Size, orderby, asc, &list, where)
+	SupplierCertId := this.GetString("SupplierCertId")
+	if SupplierCertId != "" {
+		where = where + " and SupplierCertId = '" + SupplierCertId + "'"
+	}
+	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()
 }
+
+// @Title 添加近三年主要工程业绩
+// @Description 添加近三年主要工程业绩
+// @Success	200	{object} controllers.Request
+// @router /addperformance [post]
+func (this *PerformanceController) AddPerformance() {
+	var model performance.OilThreeYearsPerformance
+	var jsonblob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonblob, &model)
+	model.CreateBy = this.User.Realname
+	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+	svc := performance.GetPerformanceService(utils.DBE)
+	_, err := svc.InsertEntityBytbl(OilThreeYearsPerformanceName, &model)
+	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 更新近三年主要工程业绩
+// @Param	id	path	string	true
+// @Success	200	{object}
+// @router /editperformance/:id [put]
+func (this *PerformanceController) EditPerformance() {
+	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 performance.OilThreeYearsPerformance
+	var jsonblob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonblob, &model)
+	var entity performance.OilThreeYearsPerformance
+	model.ModifiedBy = this.User.Realname
+	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
+	svc := performance.GetPerformanceService(utils.DBE)
+	opdesc := "编辑工程业绩-" + model.ProjectName
+	var cols []string = []string{"ProjectName", "BearContent", "ContainerNo", "OwnerUnit", "StartTime", "StopTime", "Tudge", "Remark", "IsDelete", "ModifiedBy", "ModifiedUserId"}
+	err := svc.UpdateOperationAndWriteLogBytbl(OilThreeYearsPerformanceName, BaseOperationLogName, id, &model, &entity, cols, utils.ToStr(this.User.Id), this.User.Username, opdesc, this.User.AccCode, "工程业绩")
+
+	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 /performancedelete/:Id [delete]
+func (this *PerformanceController) PerformanceDelete() {
+	Id := this.Ctx.Input.Param(":Id")
+	var errinfo ErrorInfo
+	if Id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	where := " Id= " + Id
+	svc := performance.GetPerformanceService(utils.DBE)
+	err := svc.DeleteEntityBytbl(OilThreeYearsPerformanceName, where)
+	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()
+	}
+}

+ 145 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/winning.go

@@ -0,0 +1,145 @@
+package oilsupplier
+
+import (
+	"encoding/json"
+	//"strings"
+
+	//"time"
+	//"fmt"
+
+	"dashoo.cn/backend/api/business/winning"
+	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/utils"
+)
+
+type WinningController struct {
+	BaseController
+}
+
+// @Title 近三年获得省部级及以上主要技术、管理成果、获奖项目
+// @Description get user by token
+// @Success 200 {object} models.Userblood
+// @router /winninglist [get]
+func (this *WinningController) WinningList() {
+	page := this.GetPageInfoForm()
+	var list []winning.OilWinningProject
+	svc := winning.GetWinningService(utils.DBE)
+	where := " 1=1"
+	orderby := "WinningTime"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	SupplierCertId := this.GetString("SupplierCertId")
+	if SupplierCertId != "" {
+		where = where + " and SupplierCertId = '" + SupplierCertId + "'"
+	}
+	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()
+}
+
+// @Title 添加近三年获得省部级及以上主要技术、管理成果、获奖项目
+// @Description 添加近三年获得省部级及以上主要技术、管理成果、获奖项目
+// @Success	200	{object} controllers.Request
+// @router /addwinning [post]
+func (this *WinningController) AddWinning() {
+	var model winning.OilWinningProject
+	var jsonblob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonblob, &model)
+	model.CreateBy = this.User.Realname
+	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+	svc := winning.GetWinningService(utils.DBE)
+	_, err := svc.InsertEntityBytbl(OilWinningProjectName, &model)
+	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 更新近三年获得省部级及以上主要技术、管理成果、获奖项目
+// @Param	id	path	string	true
+// @Success	200	{object}
+// @router /editwinning/:id [put]
+func (this *WinningController) EditWinning() {
+	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 winning.OilWinningProject
+	var jsonblob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonblob, &model)
+	var entity winning.OilWinningProject
+	model.ModifiedBy = this.User.Realname
+	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
+	svc := winning.GetWinningService(utils.DBE)
+	opdesc := "编辑获奖项目-" + model.AwardName
+	var cols []string = []string{"AwardName", "WinningTime", "Authorities", "Remark", "IsDelete", "ModifiedBy", "ModifiedUserId"}
+	err := svc.UpdateOperationAndWriteLogBytbl(OilWinningProjectName, BaseOperationLogName, id, &model, &entity, cols, utils.ToStr(this.User.Id), this.User.Username, opdesc, this.User.AccCode, "获奖项目")
+
+	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 /winningdelete/:Id [delete]
+func (this *WinningController) WinningDelete() {
+	Id := this.Ctx.Input.Param(":Id")
+	var errinfo ErrorInfo
+	if Id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	where := " Id= " + Id
+	svc := winning.GetWinningService(utils.DBE)
+	err := svc.DeleteEntityBytbl(OilWinningProjectName, where)
+	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()
+	}
+}

+ 37 - 0
src/dashoo.cn/backend/api/mydb/myServiceBase.go

@@ -70,6 +70,43 @@ func (s *MyServiceBase) GetPagingEntitiesWithOrderBytbl(AccCode string, pageInde
 	return total
 }
 
+func (s *MyServiceBase) GetPagingEntitiesWithoutAccCode(pageIndex, itemsPerPage int64, order string, asc bool, entitiesPtr interface{}, where ...string) (total int64) {
+	var err error
+	var resultsSlice []map[string][]byte
+	//获取表名
+	tableName := GetTableName(entitiesPtr)
+	if len(where) == 0 {
+		if asc {
+			err = s.DBE.Table(tableName).Limit(int(itemsPerPage), (int(pageIndex)-1)*int(itemsPerPage)).Asc(order).Find(entitiesPtr)
+		} else {
+			err = s.DBE.Table(tableName).Limit(int(itemsPerPage), (int(pageIndex)-1)*int(itemsPerPage)).Desc(order).Find(entitiesPtr)
+		}
+		//获取总记录数
+		sql := "SELECT COUNT(*) AS total FROM " + tableName
+		resultsSlice, err = s.DBE.Query(sql)
+		LogError(err)
+
+	} else {
+		if asc {
+			err = s.DBE.Table(tableName).Where(where[0]).Limit(int(itemsPerPage), (int(pageIndex)-1)*int(itemsPerPage)).Asc(order).Find(entitiesPtr)
+		} else {
+			err = s.DBE.Table(tableName).Where(where[0]).Limit(int(itemsPerPage), (int(pageIndex)-1)*int(itemsPerPage)).Desc(order).Find(entitiesPtr)
+		}
+		sql := "SELECT COUNT(*) AS total FROM " + tableName + " where " + where[0]
+		resultsSlice, err = s.DBE.Query(sql)
+	}
+	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
+}
+
 //样本库分表
 func (s *MyServiceBase) InsertEntityBytbl(tablename string, entity interface{}) (affected int64, err error) {
 	affected, err = s.DBE.Table(tablename).Insert(entity)

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

@@ -259,12 +259,30 @@ func init() {
 				&oilsupplier.OilAuditSettingController{},
 			),
 		),
+		//企业主要装备情况
+		beego.NSNamespace("/majorequip",
+			beego.NSInclude(
+				&oilsupplier.MajorequipController{},
+			),
+		),
 		//近三年主要工程业绩
 		beego.NSNamespace("/performance",
 			beego.NSInclude(
 				&oilsupplier.PerformanceController{},
 			),
 		),
+		//拥有专利、专有技术及工法
+		beego.NSNamespace("/patent",
+			beego.NSInclude(
+				&oilsupplier.PatentController{},
+			),
+		),
+		//近三年获得省部级及以上主要技术、管理成果、获奖项目
+		beego.NSNamespace("/winning",
+			beego.NSInclude(
+				&oilsupplier.WinningController{},
+			),
+		),
 	)
 	beego.AddNamespace(ns)
 }

+ 254 - 0
src/dashoo.cn/frontend_web/src/components/oilsupplier/equipmentlist.vue

@@ -0,0 +1,254 @@
+<template>
+  <div>
+    <el-table :data="equipmentList">
+      <el-table-column label="操作" width="70" align="center" fixed>
+        <template slot-scope="scope">
+          <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="openDialog(scope.row)"></el-button>
+          <el-button size="small" type="text" style="margin-left:3px" icon="el-icon-delete" title="删除"
+            @click="deletedata(scope.row)"></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column prop="MainEquipment" label="设备名称" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="Specifications" label="规格型号" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="Number" 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-dialog :title="Title" :visible.sync="visible" top="5vh">
+      <el-form ref="refPerformance" :model="EquipmentForm" label-width="100px">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="设备名称">
+              <el-input v-model="EquipmentForm.MainEquipment"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="规格型号">
+              <el-input v-model="EquipmentForm.Specifications"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="数量">
+              <el-input v-model="EquipmentForm.Number"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注信息">
+              <el-input v-model="EquipmentForm.Remark" type="textarea" :rows=3 placeholder="请输入备注信息"></el-input>
+            </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="savedata()">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  export default {
+    name: 'EquipmentList',
+    props: {
+      SupplierCertId: {
+        type: String,
+        default: '0'
+      },
+      visible: {
+        type: Boolean,
+        default: false
+      },
+      equipmentForm: {}
+    },
+    created() {
+      this.initData()
+    },
+    computed: {
+      ...mapGetters({
+        session: 'session'
+      })
+    },
+    data() {
+      return {
+        equipmentList: [],
+        SupplierCertId: '',
+        Title: '',
+        EquipmentForm: {
+          Id: '',
+          SupplierCertId: '',
+          MainEquipment: '',
+          Specifications: '',
+          Number: '',
+          Remark: '',
+        },
+        selfVisible: this.visible, // 避免vue双向绑定警告
+        currentPage: 1, // 分页
+        size: 10,
+        currentItemCount: 0,
+      }
+    },
+    methods: {
+      initData() {
+        let _this = this
+        const params = {
+          SupplierCertId: this.SupplierCertId,
+          _currentPage: this.currentPage,
+          _size: this.size,
+        }
+        this.$axios.get('majorequip/equipmentlist', {
+            params
+          })
+          .then(res => {
+            _this.equipmentList = res.data.items
+            _this.currentItemCount = res.data.currentItemCount
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      savedata() {
+        if (this.Title == '新增企业主要装备情况') {
+          this.addEquipment()
+        } else if (this.Title == '编辑企业主要装备情况') {
+          this.editEquipment()
+        }
+      },
+      addEquipment() {
+        let _this = this
+        _this.EquipmentForm.SupplierCertId = parseInt(_this.EquipmentForm.SupplierCertId)
+        _this.$axios.post('/majorequip/addequipment/', _this.EquipmentForm)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+              this.visible = false
+              this.initData()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      editEquipment() {
+        let _this = this
+        _this.EquipmentForm.SupplierCertId = parseInt(_this.EquipmentForm.SupplierCertId)
+        _this.$axios.put('/majorequip/editequipment/' + _this.EquipmentForm.Id, _this.EquipmentForm)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+              this.visible = false
+              this.initData()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      deletedata(val) {
+        let _this = this;
+        _this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+          .then(() => {
+            _this.$axios.delete('majorequip/equipmentdelete/' + val.Id, {})
+              .then(function (response) {
+                // response
+                if (response.data.code === 0) {
+                  _this.$message({
+                    type: "success",
+                    message: response.data.message
+                  });
+                  _this.initData();
+                } else {
+                  _this.$message({
+                    type: "warning",
+                    message: response.data.message
+                  });
+                }
+              })
+              .catch(function (error) {
+                console.log(error);
+              });
+          })
+          .catch(() => {});
+      },
+      showDialog() {
+        this.Title = '新增企业主要装备情况'
+        this.EquipmentForm.Id = 0
+        this.EquipmentForm.SupplierCertId = this.SupplierCertId
+        this.EquipmentForm.MainEquipment = ''
+        this.EquipmentForm.Specifications = ''
+        this.EquipmentForm.Number = ''
+        this.EquipmentForm.Remark = ''
+        this.visible = true
+      },
+      openDialog(val) {
+        this.Title = '编辑企业主要装备情况'
+        this.EquipmentForm.Id = val.Id
+        this.EquipmentForm.SupplierCertId = val.SupplierCertId
+        this.EquipmentForm.MainEquipment = val.MainEquipment
+        this.EquipmentForm.Specifications = val.Specifications
+        this.EquipmentForm.Number = val.Number
+        this.EquipmentForm.Remark = val.Remark
+        this.visible = true
+      },
+      seachdata() {
+        this.initData()
+      },
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initData()
+      },
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initData()
+      },
+      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)
+        }
+      },
+    }
+  }
+
+</script>
+
+<style>
+
+
+</style>

+ 271 - 0
src/dashoo.cn/frontend_web/src/components/oilsupplier/patentlist.vue

@@ -0,0 +1,271 @@
+<template>
+  <div>
+    <el-table :data="patentList" :stripe="true">
+      <el-table-column label="操作" width="70" align="center" fixed>
+        <template slot-scope="scope">
+          <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="openDialog(scope.row)"></el-button>
+          <el-button size="small" type="text" style="margin-left:3px" icon="el-icon-delete" title="删除"
+            @click="deletedata(scope.row)"></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column prop="Name" label="名称" show-overflow-tooltip>
+      </el-table-column>
+      <el-table-column prop="Content" label="主要内容" show-overflow-tooltip>
+      </el-table-column>
+      <el-table-column prop="ApprovalAuthority" label="批准机关" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="ApprovalDate" label="批准日期" show-overflow-tooltip>
+        <template slot-scope="scope">
+          {{ jstimehandle(scope.row.ApprovalDate+'') }}
+        </template>
+      </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-dialog :title="Title" :visible.sync="visible" top="5vh">
+      <el-form ref="refPatent" :model="PatentForm" label-width="100px">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="名称">
+              <el-input v-model="PatentForm.Name"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="主要内容">
+              <el-input v-model="PatentForm.Content"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="批准机关">
+              <el-input v-model="PatentForm.ApprovalAuthority"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="批准日期">
+              <el-date-picker style="width: 100%" v-model="PatentForm.ApprovalDate" type="date" placeholder="请选择批准日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注信息">
+              <el-input v-model="PatentForm.Remark" type="textarea" :rows=3 placeholder="请输入备注信息"></el-input>
+            </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="savedata()">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  export default {
+    name: 'PatentList',
+    props: {
+      SupplierCertId: {
+        type: String,
+        default: '0'
+      },
+      visible: {
+        type: Boolean,
+        default: false
+      },
+      patentForm: {}
+    },
+    created() {
+      this.initData()
+    },
+    computed: {
+      ...mapGetters({
+        session: 'session'
+      })
+    },
+    data() {
+      return {
+        patentList: [],
+        SupplierCertId: '',
+        Title: '',
+        PatentForm: {
+          Id: '',
+          SupplierCertId: '',
+          Name: '',
+          Content: '',
+          ApprovalAuthority: '',
+          ApprovalDate: new Date(),
+          Remark: '',
+        },
+        selfVisible: this.visible,
+        currentPage: 1, // 分页
+        size: 10,
+        currentItemCount: 0,
+      }
+    },
+    methods: {
+      initData() {
+        let _this = this
+        // request
+        const params = {
+          SupplierCertId: this.SupplierCertId,
+          _currentPage: this.currentPage,
+          _size: this.size,
+        }
+        this.$axios.get('patent/patentlist', {
+            params
+          })
+          .then(res => {
+            _this.patentList = res.data.items
+            _this.currentItemCount = res.data.currentItemCount
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      savedata() {
+        if (this.Title == '新增拥有专利、专有技术及工法') {
+          this.addPantent()
+        } else if (this.Title == '编辑拥有专利、专有技术及工法') {
+          this.editPantent()
+        }
+      },
+      addPantent() {
+        let _this = this
+        _this.PatentForm.SupplierCertId = parseInt(_this.PatentForm.SupplierCertId)
+        _this.$axios.post('/patent/addpatent', _this.PatentForm)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+              this.visible = false
+              this.initData()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      editPantent() {
+        let _this = this
+        _this.PatentForm.SupplierCertId = parseInt(_this.PatentForm.SupplierCertId)
+        _this.$axios.put('/patent/editpatent/' + _this.PatentForm.Id, _this.PatentForm)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+              this.visible = false
+              this.initData()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      deletedata(val) {
+        let _this = this;
+        _this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+          .then(() => {
+            _this.$axios.delete('patent/patentdelete/' + val.Id, {})
+              .then(function (response) {
+                // response
+                if (response.data.code === 0) {
+                  _this.$message({
+                    type: "success",
+                    message: response.data.message
+                  });
+                  _this.initData();
+                } else {
+                  _this.$message({
+                    type: "warning",
+                    message: response.data.message
+                  });
+                }
+              })
+              .catch(function (error) {
+                console.log(error);
+              });
+          })
+          .catch(() => {});
+      },
+      showDialog() {
+        this.Title = '新增拥有专利、专有技术及工法'
+        this.PatentForm.Id = 0
+        this.PatentForm.SupplierCertId = this.SupplierCertId
+        this.PatentForm.Name = ''
+        this.PatentForm.Content = ''
+        this.PatentForm.ApprovalAuthority = ''
+        this.PatentForm.ApprovalDate = new Date()
+        this.PatentForm.Remark = ''
+        this.visible = true
+      },
+      openDialog(val) {
+        this.Title = '编辑拥有专利、专有技术及工法'
+        this.PatentForm.Id = val.Id
+        this.PatentForm.SupplierCertId = val.SupplierCertId
+        this.PatentForm.Name = val.Name
+        this.PatentForm.Content = val.Content
+        this.PatentForm.ApprovalAuthority = val.ApprovalAuthority
+        this.PatentForm.ApprovalDate = new Date(val.ApprovalDate)
+        this.PatentForm.Remark = val.Remark
+        this.visible = true
+      },
+      seachdata() {
+        this.initData()
+      },
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initData()
+      },
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initData()
+      },
+      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)
+        }
+      },
+    }
+  }
+
+</script>
+
+<style>
+
+
+</style>

+ 212 - 60
src/dashoo.cn/frontend_web/src/components/oilsupplier/performancelist.vue

@@ -1,52 +1,92 @@
 <template>
   <div>
-    <el-dialog title="近三年主要工程业绩" :visible.sync="visible" top="5vh" width="90%">
-      <!-- <el-form label-width="90px">
+    <el-table :data="performanceList">
+      <el-table-column label="操作" width="70" align="center" fixed>
+        <template slot-scope="scope">
+          <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="openDialog(scope.row)"></el-button>
+          <el-button size="small" type="text" style="margin-left:3px" icon="el-icon-delete" title="删除"
+            @click="deletedata(scope.row)"></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column prop="ProjectName" label="设备名称" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="BearContent" label="主要内容" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="OwnerUnit" label="业主单位" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="StartTime" label="起始时间" show-overflow-tooltip>
+        <template slot-scope="scope">
+          {{ jstimehandle(scope.row.StartTime+'') }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="StopTime" label="结束时间" show-overflow-tooltip>
+        <template slot-scope="scope">
+          {{ jstimehandle(scope.row.StartTime+'') }}
+        </template>
+      </el-table-column>
+      <el-table-column prop="Tudge" label="有无事故" show-overflow-tooltip>
+        <template slot-scope="scope">
+          <el-tag v-show="scope.row.Tudge=='无事故'" type="primary">无事故</el-tag>
+          <el-tag v-show="scope.row.Tudge=='有事故'" type="danger">有事故</el-tag>
+        </template>
+      </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-dialog :title="Title" :visible.sync="visible" top="5vh">
+      <el-form ref="refPerformance" :model="PerformanceForm" label-width="100px">
         <el-row>
           <el-col :span="12">
-            <el-form-item label="查询条件">
-              <el-input v-model="keyword" placeholder="请输入身份证号或姓名或内部编号" style="width:60%"></el-input>
-              <router-link :to="'/biobank/source/addsource/operation'">
-                <el-button style="float: right;margin-left:10px;" type="primary">添加新来源</el-button>
-              </router-link>
-              <el-button style="float: right;" type="primary" class="el-button" @click="seachdata">查 询</el-button>
+            <el-form-item label="设备名称">
+              <el-input v-model="PerformanceForm.ProjectName"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="主要内容">
+              <el-input v-model="PerformanceForm.BearContent"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="业主单位">
+              <el-input v-model="PerformanceForm.OwnerUnit"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="起始时间">
+              <el-date-picker style="width: 100%" v-model="PerformanceForm.StartTime" type="date" placeholder="请选择起始时间">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="结束时间">
+              <el-date-picker style="width: 100%" v-model="PerformanceForm.StopTime" type="date" placeholder="请选择结束时间">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="有无事故">
+              <el-select ref="refplace" v-model="PerformanceForm.Tudge" style="width:100%"
+                placeholder="请选择是否发生过质量、安全、环境事故">
+                <el-option label="无事故" value="无事故"></el-option>
+                <el-option label="有事故" value="有事故"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注信息">
+              <el-input v-model="PerformanceForm.Remark" type="textarea" :rows=3 placeholder="请输入备注信息"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
-      </el-form> -->
-      <el-table :data="performanceList" :stripe="true">
-        <!-- <el-table-column label="操作" width="80">
-          <template slot-scope="scope">
-            <el-button size="small" @click="handleselect(scope.row)" type="text" title="选择">
-              <i class="icon icon-checkmark"></i> 选择</el-button>
-          </template>
-        </el-table-column> -->
-        <el-table-column prop="ProjectName" label="设备名称" show-overflow-tooltip>
-        </el-table-column>
-        <el-table-column prop="BearContent" label="主要内容" show-overflow-tooltip>
-        </el-table-column>
-        <el-table-column prop="OwnerUnit" label="业主单位" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="StartTime" label="起始时间" show-overflow-tooltip>
-          <template slot-scope="scope">
-            {{ jstimehandle(scope.row.StartTime+'') }}
-          </template>
-        </el-table-column>
-        <el-table-column prop="StopTime" label="结束时间" show-overflow-tooltip>
-          <template slot-scope="scope">
-            {{ jstimehandle(scope.row.StartTime+'') }}
-          </template>
-        </el-table-column>
-        <el-table-column prop="Tudge" 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-form>
+      <div slot="footer" class="dialog-footer" style="margin-top:-30px;">
+        <el-button @click="visible = false">取 消</el-button>
+        <el-button type="primary" @click="savedata()">确 定</el-button>
+      </div>
     </el-dialog>
   </div>
+
 </template>
 
 <script>
@@ -56,10 +96,15 @@
   export default {
     name: 'PerformanceList',
     props: {
+      SupplierCertId: {
+        type: String,
+        default: '0'
+      },
       visible: {
         type: Boolean,
         default: false
-      }
+      },
+      performanceForm: {}
     },
     created() {
       this.initData()
@@ -69,35 +114,37 @@
         session: 'session'
       })
     },
-    watch: {
-      visible(val) {
-        this.selfVisible = val
-        if (this.visible) {
-          this.createoptions
-        }
-      },
-      selfVisible(val) {
-        this.$emit('update:visible', val)
-      }
-    },
     data() {
       return {
         performanceList: [],
+        SupplierCertId: '',
+        Title: '',
+        PerformanceForm: {
+          Id: '',
+          SupplierCertId: '',
+          ProjectName: '',
+          BearContent: '',
+          OwnerUnit: '',
+          StartTime: new Date(),
+          StopTime: new Date(),
+          Tudge: '',
+          Remark: '',
+        },
+        selfVisible: this.visible, // 避免vue双向绑定警告
         currentPage: 1, // 分页
         size: 10,
         currentItemCount: 0,
-        selfVisible: this.visible // 避免vue双向绑定警告
       }
     },
     methods: {
       initData() {
         let _this = this
-        // request
         const params = {
+          SupplierCertId: this.SupplierCertId,
           _currentPage: this.currentPage,
           _size: this.size,
         }
-        this.$axios.get('performance/performancellist', {
+        this.$axios.get('performance/performancelist', {
             params
           })
           .then(res => {
@@ -109,6 +156,115 @@
             console.error(err)
           })
       },
+      savedata() {
+        if (this.Title == '新增近三年主要工程业绩') {
+          this.addPerformance()
+        } else if (this.Title == '编辑近三年主要工程业绩') {
+          this.editPerformance()
+        }
+      },
+      addPerformance() {
+        let _this = this
+        _this.PerformanceForm.SupplierCertId = parseInt(_this.PerformanceForm.SupplierCertId)
+        _this.$axios.post('/performance/addperformance/', _this.PerformanceForm)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+              this.visible = false
+              this.initData()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      editPerformance() {
+        let _this = this
+        _this.PerformanceForm.SupplierCertId = parseInt(_this.PerformanceForm.SupplierCertId)
+        _this.$axios.put('/performance/editperformance/' + _this.PerformanceForm.Id, _this.PerformanceForm)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+              this.visible = false
+              this.initData()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      deletedata(val){
+         let _this = this;
+        _this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+          .then(() => {
+            _this.$axios.delete('performance/performancedelete/' + val.Id, {})
+              .then(function (response) {
+                // response
+                if (response.data.code === 0) {
+                  _this.$message({
+                    type: "success",
+                    message: response.data.message
+                  });
+                  _this.initData();
+                } else {
+                  _this.$message({
+                    type: "warning",
+                    message: response.data.message
+                  });
+                }
+              })
+              .catch(function (error) {
+                console.log(error);
+              });
+          })
+          .catch(() => {});
+      },
+      showDialog() {
+        this.Title = '新增近三年主要工程业绩'
+        this.PerformanceForm.Id = 0
+        this.PerformanceForm.SupplierCertId = this.SupplierCertId
+        this.PerformanceForm.ProjectName = ''
+        this.PerformanceForm.BearContent = ''
+        this.PerformanceForm.OwnerUnit = ''
+        this.PerformanceForm.StartTime = new Date()
+        this.PerformanceForm.StopTime = new Date()
+        this.PerformanceForm.Tudge = ''
+        this.PerformanceForm.Remark = ''
+        this.visible = true
+      },
+      openDialog(val) {
+        this.Title = '编辑近三年主要工程业绩'
+        this.PerformanceForm.Id = val.Id
+        this.PerformanceForm.SupplierCertId = val.SupplierCertId
+        this.PerformanceForm.ProjectName = val.ProjectName
+        this.PerformanceForm.BearContent = val.BearContent
+        this.PerformanceForm.OwnerUnit = val.OwnerUnit
+        this.PerformanceForm.StartTime = new Date(val.StartTime)
+        this.PerformanceForm.StopTime = new Date(val.StopTime)
+        this.PerformanceForm.Tudge = val.Tudge
+        this.PerformanceForm.Remark = val.Remark
+        this.visible = true
+      },
       seachdata() {
         this.initData()
       },
@@ -130,13 +286,9 @@
           return '永久'
         } else {
           val = val.replace('T', ' ')
-          return val.substring(0, 16)
+          return val.substring(0, 10)
         }
       },
-      //   handleselect(val) {
-      //     this.$emit('close', val)
-      //     this.selfVisible = false
-      //   }
     }
   }
 

+ 130 - 0
src/dashoo.cn/frontend_web/src/components/oilsupplier/winningdialog.vue

@@ -0,0 +1,130 @@
+<template>
+  <div>
+    <el-dialog :title="Title" :visible.sync="visible" top="5vh">
+      <el-form ref="refWinning" :model="WinningForm" label-width="100px">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="奖项名称">
+              <el-input v-model="WinningForm.AwardName"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="颁奖机关">
+              <el-input v-model="WinningForm.Authorities"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="获奖时间">
+              <el-date-picker style="width: 100%" v-model="WinningForm.WinningTime" type="date" placeholder="请选择获奖时间">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注信息">
+              <el-input v-model="WinningForm.Remark" type="textarea" :rows=3 placeholder="请输入备注信息"></el-input>
+            </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="savedata()">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  export default {
+    name: 'winningdialog',
+    props: {
+      visible: {
+        type: Boolean,
+        default: false
+      },
+      WinningForm: {}
+    },
+    created() {},
+    computed: {
+      ...mapGetters({
+        session: 'session'
+      })
+    },
+    watch: {
+      visible(val) {
+        this.selfVisible = val
+        if (this.visible) {
+          this.WinningForm.Id = this.WinningForm.Id
+          if (this.WinningForm.Id == 0) {
+            this.Title = '新增近三年获得省部级及以上主要技术、管理成果、获奖项目'
+          }
+          this.WinningForm.SupplierCertId = this.WinningForm.SupplierCertId
+        }
+      },
+      selfVisible(val) {
+        this.$emit('update:visible', val)
+      },
+    },
+    data() {
+      return {
+        Title: '',
+        WinningForm: {
+          Id: '',
+          SupplierCertId: '',
+          Authorities: '',
+          OwnerUnit: '',
+          WinningTime: new Date(),
+          Remark: '',
+        },
+        selfVisible: this.visible // 避免vue双向绑定警告
+      }
+    },
+    methods: {
+      savedata() {
+        if (this.Title == '新增近三年获得省部级及以上主要技术、管理成果、获奖项目') {
+          this.addWinning()
+        } else if (this.Title == '编辑近三年获得省部级及以上主要技术、管理成果、获奖项目') {
+          this.editWinning()
+        }
+      },
+      addWinning() {
+        let _this = this
+        _this.WinningForm.SupplierCertId = parseInt(_this.WinningForm.SupplierCertId)
+        _this.$axios.post('/winning/addwinning/', _this.WinningForm)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+              this.callback()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      callback() {
+        this.selfVisible = false
+        this.$emit('close')
+      },
+    }
+  }
+
+</script>
+
+<style>
+  .samplerecoveope .el-radio {
+    padding: 8px 15px 0 0;
+    margin-left: -2px;
+  }
+
+</style>

+ 259 - 0
src/dashoo.cn/frontend_web/src/components/oilsupplier/winninglist.vue

@@ -0,0 +1,259 @@
+<template>
+  <div>
+    <el-table :data="winningList" :stripe="true">
+      <el-table-column label="操作" width="70" align="center" fixed>
+        <template slot-scope="scope">
+          <el-button type="text" title="编辑" size="small" icon="el-icon-edit" @click="openDialog(scope.row)"></el-button>
+          <el-button size="small" type="text" style="margin-left:3px" icon="el-icon-delete" title="删除"
+            @click="deletedata(scope.row)"></el-button>
+        </template>
+      </el-table-column>
+      <el-table-column prop="AwardName" label="奖项名称" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="Authorities" label="颁奖机关" show-overflow-tooltip></el-table-column>
+      <el-table-column prop="WinningTime" label="获奖时间" show-overflow-tooltip>
+        <template slot-scope="scope">
+          {{ jstimehandle(scope.row.WinningTime+'') }}
+        </template>
+      </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-dialog :title="Title" :visible.sync="visible" top="5vh">
+      <el-form ref="refWinning" :model="WinningForm" label-width="100px">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="奖项名称">
+              <el-input v-model="WinningForm.AwardName"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="颁奖机关">
+              <el-input v-model="WinningForm.Authorities"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="获奖时间">
+              <el-date-picker style="width: 100%" v-model="WinningForm.WinningTime" type="date" placeholder="请选择获奖时间">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注信息">
+              <el-input v-model="WinningForm.Remark" type="textarea" :rows=3 placeholder="请输入备注信息"></el-input>
+            </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="savedata()">确 定</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  export default {
+    name: 'WinningList',
+    props: {
+      SupplierCertId: {
+        type: String,
+        default: '0'
+      },
+      visible: {
+        type: Boolean,
+        default: false
+      },
+      winningForm: {}
+    },
+    created() {
+      this.initData()
+    },
+    computed: {
+      ...mapGetters({
+        session: 'session'
+      })
+    },
+    data() {
+      return {
+        winningList: [],
+        SupplierCertId: '',
+        Title: '',
+        WinningForm: {
+          Id: '',
+          SupplierCertId: '',
+          Authorities: '',
+          OwnerUnit: '',
+          WinningTime: new Date(),
+          Remark: '',
+        },
+        selfVisible: this.visible,
+        currentPage: 1, // 分页
+        size: 10,
+        currentItemCount: 0,
+      }
+    },
+    methods: {
+      initData() {
+        let _this = this
+        // request
+        const params = {
+          SupplierCertId: this.SupplierCertId,
+          _currentPage: this.currentPage,
+          _size: this.size,
+        }
+        this.$axios.get('winning/winninglist', {
+            params
+          })
+          .then(res => {
+            _this.winningList = res.data.items
+            _this.currentItemCount = res.data.currentItemCount
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      savedata() {
+        if (this.Title == '新增近三年获得省部级及以上主要技术、管理成果、获奖项目') {
+          this.addWinning()
+        } else if (this.Title == '编辑近三年获得省部级及以上主要技术、管理成果、获奖项目') {
+          this.editWinning()
+        }
+      },
+      addWinning() {
+        let _this = this
+        _this.WinningForm.SupplierCertId = parseInt(_this.WinningForm.SupplierCertId)
+        _this.$axios.post('/winning/addwinning', _this.WinningForm)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+              this.visible = false
+              this.initData()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      editWinning() {
+        let _this = this
+        _this.WinningForm.SupplierCertId = parseInt(_this.WinningForm.SupplierCertId)
+        _this.$axios.put('/winning/editwinning/' + _this.WinningForm.Id, _this.WinningForm)
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message,
+              })
+              this.visible = false
+              this.initData()
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      deletedata(val) {
+        let _this = this;
+        _this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
+            confirmButtonText: "确定",
+            cancelButtonText: "取消",
+            type: "warning"
+          })
+          .then(() => {
+            _this.$axios.delete('winning/winningdelete/' + val.Id, {})
+              .then(function (response) {
+                // response
+                if (response.data.code === 0) {
+                  _this.$message({
+                    type: "success",
+                    message: response.data.message
+                  });
+                  _this.initData();
+                } else {
+                  _this.$message({
+                    type: "warning",
+                    message: response.data.message
+                  });
+                }
+              })
+              .catch(function (error) {
+                console.log(error);
+              });
+          })
+          .catch(() => {});
+      },
+      showDialog() {
+        this.Title = '新增近三年获得省部级及以上主要技术、管理成果、获奖项目'
+        this.WinningForm.Id = 0
+        this.WinningForm.SupplierCertId = this.SupplierCertId
+        this.WinningForm.AwardName = ''
+        this.WinningForm.Authorities = ''
+        this.WinningForm.WinningTime = new Date()
+        this.WinningForm.Remark = ''
+        this.visible = true
+      },
+      openDialog(val) {
+        this.Title = '编辑近三年获得省部级及以上主要技术、管理成果、获奖项目'
+        this.WinningForm.Id = val.Id
+        this.WinningForm.SupplierCertId = val.SupplierCertId
+        this.WinningForm.AwardName = val.AwardName
+        this.WinningForm.Authorities = val.Authorities
+        this.WinningForm.WinningTime = new Date(val.WinningTime)
+        this.WinningForm.Remark = val.Remark
+        this.visible = true
+      },
+      seachdata() {
+        this.initData()
+      },
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initData()
+      },
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initData()
+      },
+      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)
+        }
+      },
+    }
+  }
+
+</script>
+
+<style>
+
+
+</style>

+ 52 - 66
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -439,39 +439,43 @@
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>企业主要装备情况</span>
-              <el-button style="float: right; padding: 3px 0" type="text">添加</el-button>
+              <el-button style="float: right; padding: 3px 0" type="text" @click="equipmentdialog">添加</el-button>
             </div>
-            <supplier-file-table height="360px" style="margin-top: 20px"></supplier-file-table>
+            <equipment-list ref="equipmentList" :data="EquipmentList" :SupplierCertId="certId" height="360px"
+              style="margin-top: 20px"></equipment-list>
           </el-card>
 
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>近三年主要工程业绩</span>
-              <el-button style="float: right; padding: 3px 0" type="text">添加</el-button>
+              <el-button style="float: right; padding: 3px 0" type="text" @click="performancedialog">添加</el-button>
             </div>
-            <el-table :data="performanceList" height="360px" style="margin-top: 20px"></el-table>
+            <performance-list ref="performanceList" :data="performanceList" :SupplierCertId="certId" height="360px"
+              style="margin-top: 20px"></performance-list>
           </el-card>
 
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>拥有专利、专有技术及工法</span>
-              <el-button style="float: right; padding: 3px 0" type="text">添加</el-button>
+              <el-button style="float: right; padding: 3px 0" type="text" @click="patentdialog">添加</el-button>
             </div>
-            <supplier-file-table height="360px" style="margin-top: 20px"></supplier-file-table>
+            <patent-list ref="patentList" :data="patentList" :SupplierCertId="certId" height="360px"
+              style="margin-top: 20px">
+            </patent-list>
           </el-card>
 
           <el-card class="box-card" style="margin-top: 10px;">
             <div slot="header" class="clearfix">
               <span>近三年获得省部级及以上主要技术、管理成果、获奖项目</span>
-              <el-button style="float: right; padding: 3px 0" type="text">添加</el-button>
+              <el-button style="float: right; padding: 3px 0" type="text" @click="winningdialog">添加</el-button>
             </div>
-            <supplier-file-table height="360px" style="margin-top: 20px"></supplier-file-table>
+            <winning-list ref="winningList" :data="winningList" :SupplierCertId="certId" height="360px"
+              style="margin-top: 20px">
+            </winning-list>
           </el-card>
-
         </el-tab-pane>
 
         <el-tab-pane label="选择准入范围" :disabled="formData.Step < 2">
-
           <el-card class="box-card">
             <div slot="header" class="clearfix">
               <span style="font-weight: bold">分类</span>
@@ -483,7 +487,6 @@
                   <router-link :to="'/oilsupplier/oilsuppliercertsub/' + scope.row.Id + '/operation'">
                     <el-button type="text" title="编辑" size="small" icon="el-icon-edit"></el-button>
                   </router-link>
-
                   <el-popover placement="top" title="提示" v-model="scope.row.deleteConfirmFlag">
                     <el-alert title="" description="确认要删除吗?" type="warning" :closable="false">
                     </el-alert>
@@ -498,16 +501,9 @@
                   </el-popover>
                 </template>
               </el-table-column>
-
               <el-table-column v-for="column in tableColumns" :key="column.Id" v-if="column.prop != 'CreateOn'"
                 :prop="column.prop" sortable min-width="100" :label="column.label" align="center" show-overflow-tooltip>
               </el-table-column>
-
-              <!--<el-table-column prop="CreateOn" sortable min-width="150" label="生成时间" align="center" show-overflow-tooltip>
-                <template slot-scope="scope">
-                  {{ jstimehandle(scope.row.CreateOn+'') }}
-                </template>
-              </el-table-column>-->
             </el-table>
           </el-card>
 
@@ -518,8 +514,6 @@
             </div>
             <supplier-file-table height="360px" style="margin-top: 20px"></supplier-file-table>
           </el-card>
-
-
         </el-tab-pane>
 
         <el-tab-pane label="审批流程">
@@ -534,10 +528,8 @@
           </el-card>
         </el-tab-pane>
       </el-tabs>
-
     </el-card>
 
-    <performance-list @close="performancelistCallback" :visible.sync="performancelist"></performance-list>
   </div>
 </template>
 
@@ -550,7 +542,10 @@
   import WfHistory from '@/components/workflow/wfhistory.vue'
   import SupplierCertEdit from '@/components/oilsupplier/suppliercertedit.vue'
 
+  import EquipmentList from '../../../../components/oilsupplier/equipmentlist'
   import PerformanceList from '../../../../components/oilsupplier/performancelist'
+  import PatentList from '../../../../components/oilsupplier/patentlist'
+  import WinningList from '../../../../components/oilsupplier/winninglist'
 
   export default {
     components: {
@@ -558,7 +553,10 @@
       WfHistory,
       SupplierCertEdit,
 
+      EquipmentList, //企业主要装备情况
       PerformanceList, //近三年主要工程业绩列表
+      PatentList, //拥有专利、专有技术及工法列表
+      WinningList, //近三年获得省部级及以上主要技术、管理成果、获奖项目列表
     },
     computed: {
       ...mapGetters({
@@ -569,8 +567,10 @@
 
     data() {
       return {
-        performanceList: [],
-        performancelist: false,
+        equipmentlist: [], //企业主要装备情况
+        performanceList: [], //近三年主要工程业绩       
+        patentList: [], //拥有专利、专有技术及工法      
+        winningList: [], //近三年获得省部级及以上主要技术、管理成果、获奖项目
 
         serviceId: '',
         certId: '',
@@ -654,41 +654,22 @@
           instance: '145001',
         },
 
-        tableColumns: [
-          /*{
-            prop: "SubClassId",
-            label: '',
-            width: 100,
-            sort: true
-          },*/
-
-          {
-            prop: "Code",
-            label: '分类编码',
-            width: 100,
-            sort: true
-          },
-
-          {
-            prop: "Name",
-            label: '分类名称',
-            width: 100,
-            sort: true
-          },
-
-          {
-            prop: "Remark",
-            label: '备注',
-            width: 100,
-            sort: true
-          }
-
-        ]
-
-        //下拉选择项
-        //wellNoOptions: [],
-        //supervisersOptions: [],
-
+        tableColumns: [{
+          prop: "Code",
+          label: '分类编码',
+          width: 100,
+          sort: true
+        }, {
+          prop: "Name",
+          label: '分类名称',
+          width: 100,
+          sort: true
+        }, {
+          prop: "Remark",
+          label: '备注',
+          width: 100,
+          sort: true
+        }]
       }
     },
     created() {
@@ -703,9 +684,17 @@
       }
     },
     methods: {
-      //近三年主要工程业绩列表返回
-      performancelistCallback(val) {
-        console.log("11111111111111111111111111")
+      equipmentdialog() {
+        this.$refs["equipmentList"].showDialog()
+      },
+      performancedialog() {
+        this.$refs["performanceList"].showDialog()
+      },
+      patentdialog() {
+        this.$refs["patentList"].showDialog()
+      },
+      winningdialog() {
+        this.$refs["winningList"].showDialog()
       },
 
       initDatas() {
@@ -719,10 +708,7 @@
       },
 
       getDictOptions() {
-        api.getDictList(this.$axios).then(res => {
-          //this.wellNoOptions = res.data.items['WellNo']
-          //this.supervisersOptions = res.data.items['Supervisers']
-        }).catch(err => {
+        api.getDictList(this.$axios).then(res => {}).catch(err => {
           console.error(err)
         })
       },