浏览代码

Merge branch 'develop' of http://code.dashoo.cn/dashoo/supplier_system into develop

dubch 4 年之前
父节点
当前提交
0fc6f24847

+ 213 - 208
src/dashoo.cn/backend/api/controllers/oilcontract/contractSumScore.go

@@ -110,20 +110,19 @@ func (this *OilContractSumScoreController) GetEntityList() {
 
 	where = where + " and items.Category = '0' "
 
-
 	//超级管理员和有查看所有数据权限的用户不加条件
 	svcPerm := permission.GetPermissionService(utils.DBE)
-	isauth  := svcPerm.IsAuthorized(this.User.Id, "oil_contract.SumStore.AllRecord")
-	if(!isauth){
+	isauth := svcPerm.IsAuthorized(this.User.Id, "oil_contract.SumStore.AllRecord")
+	if !isauth {
 		// 权限过滤  自己创建的评价 ,同二级部门创建的评价 ,企管法规处能看
 		where = where + " and ( score.CreateUserId =  '" + this.User.Id + "' "
-		where = where + " or score.UnitId = '" +  strconv.Itoa(this.User.UnitId) + "' "
+		where = where + " or score.UnitId = '" + strconv.Itoa(this.User.UnitId) + "' "
 		where = where + " )"
 	}
 
 	svc := contractSumScore.GetOilContractSumScoreService(utils.DBE)
 	var list []contractSumScore.OilContractSumScoreVo
-	total := svc.GetMyPagingEntitiesWithOrderBytbl( page.CurrentPage, page.Size, orderby, asc, &list, where)
+	total := svc.GetMyPagingEntitiesWithOrderBytbl(page.CurrentPage, page.Size, orderby, asc, &list, where)
 	var datainfo DataInfo
 	datainfo.Items = list
 	datainfo.CurrentItemCount = total
@@ -137,7 +136,7 @@ func (this *OilContractSumScoreController) GetEntityList() {
 // @Description get user by token
 // @Success 200 {object} []contractSumScore.OilContractSumScore
 // @router /compute-list [get]
-func (this *OilContractSumScoreController) GetComputeEntityList(){
+func (this *OilContractSumScoreController) GetComputeEntityList() {
 	//获取分页信息
 	page := this.GetPageInfoForm()
 	where := " 1=1 "
@@ -153,19 +152,28 @@ func (this *OilContractSumScoreController) GetComputeEntityList(){
 	}
 	SupplierName := this.GetString("SupplierName")
 	//CreateOn     := this.GetString("CreateOn")
-	ContractClass         := this.GetString("ContractClass","01")
+	ContractClass := this.GetString("ContractClass", "01")
+	Evaluate := this.GetString("Evaluate", "")
 
 	if SupplierName != "" {
 		where = where + " and contract.SupplierName like '%" + SupplierName + "%'"
 	}
-	if ContractClass != ""{
+	if ContractClass != "" {
 		where = where + " and contract.ContractClass = '" + ContractClass + "'"
 	}
 
+	if Evaluate == "1" {
+
+	} else if Evaluate == "2" {
+
+	} else if Evaluate == "3" {
+
+	}
+
 	// 今年的汇总
-	year   := strconv.Itoa(time.Now().Year())
-	month  := "01"
-	day    := "01"
+	year := strconv.Itoa(time.Now().Year())
+	month := "01"
+	day := "01"
 	where = where + " and review.CreateOn>='" + year + "-" + month + "-" + day + "' "
 
 	//if CreateOn != "" {
@@ -221,7 +229,7 @@ func (this *OilContractSumScoreController) GetDictList() {
 // @Success 200 {object} contractSumScore.OilContractSumScore
 // @router /get/:id/:category [get]
 func (this *OilContractSumScoreController) GetEntity() {
-	Id       := this.Ctx.Input.Param(":id")
+	Id := this.Ctx.Input.Param(":id")
 	Category := this.Ctx.Input.Param(":category")
 	var model contractSumScore.OilContractSumScore
 	svc := contractSumScore.GetOilContractSumScoreService(utils.DBE)
@@ -229,38 +237,38 @@ func (this *OilContractSumScoreController) GetEntity() {
 
 	var item contractSumScoreItems.OilContractSumScoreItems
 	itemSvc := contractSumScoreItems.GetOilContractSumScoreItemsService(utils.DBE)
-	where := " 1=1 AND SumScoreId= '" + utils.ToStr( model.Id) + "' AND Category =  '" + Category +  "'"
-	itemSvc.GetEntityByWhere(OilContractSumScoreItemsName,where,&item)
+	where := " 1=1 AND SumScoreId= '" + utils.ToStr(model.Id) + "' AND Category =  '" + Category + "'"
+	itemSvc.GetEntityByWhere(OilContractSumScoreItemsName, where, &item)
 
 	var result contractSumScore.OilContractSumScoreVo
 	result.Id = model.Id
-	result.SupplierId   = model.SupplierId
+	result.SupplierId = model.SupplierId
 	result.SupplierName = model.SupplierName
-	result.ContractClass= model.ContractClass
-	result.Year         = model.Year
-	result.Status       = model.Status
-	result.WorkflowId   = model.WorkflowId
-	result.Processkey   = model.Processkey
-	result.Category     = item.Category
-	result.SumScoreId   = item.SumScoreId
-	result.SumScore     = item.SumScore
-	result.Content1     = item.Content1
-	result.Content2     = item.Content2
-	result.Content3     = item.Content3
-	result.Content4     = item.Content4
-	result.Content5     = item.Content5
-	result.Content6     = item.Content6
-	result.Content7     = item.Content7
-	result.Content8     = item.Content8
-
-	result.SumScore1    = item.SumScore1
-	result.SumScore2    = item.SumScore2
-	result.SumScore3    = item.SumScore3
-	result.SumScore4    = item.SumScore4
-	result.SumScore5    = item.SumScore5
-	result.SumScore6    = item.SumScore6
-	result.SumScore7    = item.SumScore7
-	result.SumScore8    = item.SumScore8
+	result.ContractClass = model.ContractClass
+	result.Year = model.Year
+	result.Status = model.Status
+	result.WorkflowId = model.WorkflowId
+	result.Processkey = model.Processkey
+	result.Category = item.Category
+	result.SumScoreId = item.SumScoreId
+	result.SumScore = item.SumScore
+	result.Content1 = item.Content1
+	result.Content2 = item.Content2
+	result.Content3 = item.Content3
+	result.Content4 = item.Content4
+	result.Content5 = item.Content5
+	result.Content6 = item.Content6
+	result.Content7 = item.Content7
+	result.Content8 = item.Content8
+
+	result.SumScore1 = item.SumScore1
+	result.SumScore2 = item.SumScore2
+	result.SumScore3 = item.SumScore3
+	result.SumScore4 = item.SumScore4
+	result.SumScore5 = item.SumScore5
+	result.SumScore6 = item.SumScore6
+	result.SumScore7 = item.SumScore7
+	result.SumScore8 = item.SumScore8
 
 	result.NormalSumScore1 = item.NormalSumScore1
 	result.NormalSumScore2 = item.NormalSumScore2
@@ -339,15 +347,15 @@ func (this *OilContractSumScoreController) AddEntity() {
 	json.Unmarshal(jsonBlob, &model)
 
 	var entity contractSumScore.OilContractSumScore
-	entity.SupplierId   = model.SupplierId
+	entity.SupplierId = model.SupplierId
 	entity.SupplierName = model.SupplierName
-	entity.ContractClass= model.ContractClass
-	entity.Year         = model.Year
-	entity.Status     = "0"
-	entity.Unit       = this.User.Unit
-	entity.UnitId     = this.User.UnitId
-	entity.CreateOn   = time.Now()
-	entity.CreateBy   = this.User.Realname
+	entity.ContractClass = model.ContractClass
+	entity.Year = model.Year
+	entity.Status = "0"
+	entity.Unit = this.User.Unit
+	entity.UnitId = this.User.UnitId
+	entity.CreateOn = time.Now()
+	entity.CreateBy = this.User.Realname
 	entity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
 
 	svc := contractSumScore.GetOilContractSumScoreService(utils.DBE)
@@ -355,36 +363,36 @@ func (this *OilContractSumScoreController) AddEntity() {
 
 	var item contractSumScoreItems.OilContractSumScoreItems
 	item.SumScoreId = entity.Id
-	item.Category   = 0                      // 二级单位创建
-	item.SumScore   = model.SumScore
-	item.Content1   = model.Content1
+	item.Category = 0 // 二级单位创建
+	item.SumScore = model.SumScore
+	item.Content1 = model.Content1
 	item.NormalSumScore1 = model.NormalSumScore1
-	item.SumScore1  = model.SumScore1
-	item.Content2   = model.Content2
+	item.SumScore1 = model.SumScore1
+	item.Content2 = model.Content2
 	item.NormalSumScore2 = model.NormalSumScore2
-	item.SumScore2  = model.SumScore2
-	item.Content3   = model.Content3
+	item.SumScore2 = model.SumScore2
+	item.Content3 = model.Content3
 	item.NormalSumScore3 = model.NormalSumScore3
-	item.SumScore3  = model.SumScore3
-	item.Content4   = model.Content4
+	item.SumScore3 = model.SumScore3
+	item.Content4 = model.Content4
 	item.NormalSumScore4 = model.NormalSumScore4
-	item.SumScore4  = model.SumScore4
-	item.Content5   = model.Content5
+	item.SumScore4 = model.SumScore4
+	item.Content5 = model.Content5
 	item.NormalSumScore5 = model.NormalSumScore5
-	item.SumScore5  = model.SumScore5
-	item.Content6   = model.Content6
+	item.SumScore5 = model.SumScore5
+	item.Content6 = model.Content6
 	item.NormalSumScore6 = model.NormalSumScore6
-	item.SumScore6  = model.SumScore6
-	item.Content7   = model.Content7
+	item.SumScore6 = model.SumScore6
+	item.Content7 = model.Content7
 	item.NormalSumScore7 = model.NormalSumScore7
-	item.SumScore7  = model.SumScore7
-	item.Content8   = model.Content8
+	item.SumScore7 = model.SumScore7
+	item.Content8 = model.Content8
 	item.NormalSumScore8 = model.NormalSumScore8
-	item.SumScore8  = model.SumScore8
+	item.SumScore8 = model.SumScore8
 	item.Conclusion = model.Conclusion
-	item.Note       = model.Note
-	item.CreateOn   = time.Now()
-	item.CreateBy   = this.User.Realname
+	item.Note = model.Note
+	item.CreateOn = time.Now()
+	item.CreateBy = this.User.Realname
 	item.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
 	item.B1 = model.B1
 	item.B2 = model.B2
@@ -400,36 +408,36 @@ func (this *OilContractSumScoreController) AddEntity() {
 
 	var item2 contractSumScoreItems.OilContractSumScoreItems
 	item2.SumScoreId = entity.Id
-	item2.Category   = 1                      // 二级单位创建
-	item2.SumScore   = model.SumScore
-	item2.Content1   = model.Content1
+	item2.Category = 1 // 二级单位创建
+	item2.SumScore = model.SumScore
+	item2.Content1 = model.Content1
 	item2.NormalSumScore1 = model.NormalSumScore1
-	item2.SumScore1  = model.SumScore1
-	item2.Content2   = model.Content2
+	item2.SumScore1 = model.SumScore1
+	item2.Content2 = model.Content2
 	item2.NormalSumScore2 = model.NormalSumScore2
-	item2.SumScore2  = model.SumScore2
-	item2.Content3   = model.Content3
+	item2.SumScore2 = model.SumScore2
+	item2.Content3 = model.Content3
 	item2.NormalSumScore3 = model.NormalSumScore3
-	item2.SumScore3  = model.SumScore3
-	item2.Content4   = model.Content4
+	item2.SumScore3 = model.SumScore3
+	item2.Content4 = model.Content4
 	item2.NormalSumScore4 = model.NormalSumScore4
-	item2.SumScore4  = model.SumScore4
-	item2.Content5   = model.Content5
+	item2.SumScore4 = model.SumScore4
+	item2.Content5 = model.Content5
 	item2.NormalSumScore5 = model.NormalSumScore5
-	item2.SumScore5  = model.SumScore5
-	item2.Content6   = model.Content6
+	item2.SumScore5 = model.SumScore5
+	item2.Content6 = model.Content6
 	item2.NormalSumScore6 = model.NormalSumScore6
-	item2.SumScore6  = model.SumScore6
-	item2.Content7   = model.Content7
+	item2.SumScore6 = model.SumScore6
+	item2.Content7 = model.Content7
 	item2.NormalSumScore7 = model.NormalSumScore7
-	item2.SumScore7  = model.SumScore7
-	item2.Content8   = model.Content8
+	item2.SumScore7 = model.SumScore7
+	item2.Content8 = model.Content8
 	item2.NormalSumScore8 = model.NormalSumScore8
-	item2.SumScore8  = model.SumScore8
+	item2.SumScore8 = model.SumScore8
 	item2.Conclusion = model.Conclusion
-	item2.Note       = model.Note
-	item2.CreateOn   = time.Now()
-	item2.CreateBy   = this.User.Realname
+	item2.Note = model.Note
+	item2.CreateOn = time.Now()
+	item2.CreateBy = this.User.Realname
 	item2.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
 	item2.B1 = model.B1
 	item2.B2 = model.B2
@@ -484,9 +492,9 @@ func (this *OilContractSumScoreController) UpdateEntity() {
 	var jsonBlob = this.Ctx.Input.RequestBody
 	json.Unmarshal(jsonBlob, &model)
 
-	model.Status     = "0"
-	model.ModifiedOn   = time.Now()
-	model.ModifiedBy   = this.User.Realname
+	model.Status = "0"
+	model.ModifiedOn = time.Now()
+	model.ModifiedBy = this.User.Realname
 	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
 	cols := []string{
 		"SupplierId",
@@ -502,38 +510,38 @@ func (this *OilContractSumScoreController) UpdateEntity() {
 
 	var item contractSumScoreItems.OilContractSumScoreItems
 	itemSvc := contractSumScoreItems.GetOilContractSumScoreItemsService(utils.DBE)
-	where := " 1=1 AND SumScoreId= '" + utils.ToStr( model.Id) + "' AND Category = 0 "
-	itemSvc.GetEntityByWhere(OilContractSumScoreItemsName,where,&item)
-	item.Category   = 0                       // 二级单位创建
-	item.SumScore   = model.SumScore
-	item.Content1   = model.Content1
+	where := " 1=1 AND SumScoreId= '" + utils.ToStr(model.Id) + "' AND Category = 0 "
+	itemSvc.GetEntityByWhere(OilContractSumScoreItemsName, where, &item)
+	item.Category = 0 // 二级单位创建
+	item.SumScore = model.SumScore
+	item.Content1 = model.Content1
 	item.NormalSumScore1 = model.NormalSumScore1
-	item.SumScore1  = model.SumScore1
-	item.Content2   = model.Content2
+	item.SumScore1 = model.SumScore1
+	item.Content2 = model.Content2
 	item.NormalSumScore2 = model.NormalSumScore2
-	item.SumScore2  = model.SumScore2
-	item.Content3   = model.Content3
+	item.SumScore2 = model.SumScore2
+	item.Content3 = model.Content3
 	item.NormalSumScore3 = model.NormalSumScore3
-	item.SumScore3  = model.SumScore3
-	item.Content4   = model.Content4
+	item.SumScore3 = model.SumScore3
+	item.Content4 = model.Content4
 	item.NormalSumScore4 = model.NormalSumScore4
-	item.SumScore4  = model.SumScore4
-	item.Content5   = model.Content5
+	item.SumScore4 = model.SumScore4
+	item.Content5 = model.Content5
 	item.NormalSumScore5 = model.NormalSumScore5
-	item.SumScore5  = model.SumScore5
-	item.Content6   = model.Content6
+	item.SumScore5 = model.SumScore5
+	item.Content6 = model.Content6
 	item.NormalSumScore6 = model.NormalSumScore6
-	item.SumScore6  = model.SumScore6
-	item.Content7   = model.Content7
+	item.SumScore6 = model.SumScore6
+	item.Content7 = model.Content7
 	item.NormalSumScore7 = model.NormalSumScore7
-	item.SumScore7  = model.SumScore7
-	item.Content8   = model.Content8
+	item.SumScore7 = model.SumScore7
+	item.Content8 = model.Content8
 	item.NormalSumScore8 = model.NormalSumScore8
-	item.SumScore8  = model.SumScore8
+	item.SumScore8 = model.SumScore8
 	item.Conclusion = model.Conclusion
-	item.Note       = model.Note
-	item.ModifiedOn   = time.Now()
-	item.ModifiedBy   = this.User.Realname
+	item.Note = model.Note
+	item.ModifiedOn = time.Now()
+	item.ModifiedBy = this.User.Realname
 	item.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
 	item.B1 = model.B1
 	item.B2 = model.B2
@@ -590,41 +598,41 @@ func (this *OilContractSumScoreController) UpdateEntity() {
 		"Result1",
 		"Result2",
 	}
-	err2 := itemSvc.UpdateEntityBytbl(OilContractSumScoreItemsName,item.Id,&item,cols2)
+	err2 := itemSvc.UpdateEntityBytbl(OilContractSumScoreItemsName, item.Id, &item, cols2)
 
 	var item3 contractSumScoreItems.OilContractSumScoreItems
-	where3 := " 1=1 AND SumScoreId= '" + utils.ToStr( model.Id) + "' AND Category = 1 "
-	itemSvc.GetEntityByWhere(OilContractSumScoreItemsName,where3,&item3)
-	item3.Category   = 1                       // 专业科室单位创建
-	item3.SumScore   = model.SumScore
-	item3.Content1   = model.Content1
+	where3 := " 1=1 AND SumScoreId= '" + utils.ToStr(model.Id) + "' AND Category = 1 "
+	itemSvc.GetEntityByWhere(OilContractSumScoreItemsName, where3, &item3)
+	item3.Category = 1 // 专业科室单位创建
+	item3.SumScore = model.SumScore
+	item3.Content1 = model.Content1
 	item3.NormalSumScore1 = model.NormalSumScore1
-	item3.SumScore1  = model.SumScore1
-	item3.Content2   = model.Content2
+	item3.SumScore1 = model.SumScore1
+	item3.Content2 = model.Content2
 	item3.NormalSumScore2 = model.NormalSumScore2
-	item3.SumScore2  = model.SumScore2
-	item3.Content3   = model.Content3
+	item3.SumScore2 = model.SumScore2
+	item3.Content3 = model.Content3
 	item3.NormalSumScore3 = model.NormalSumScore3
-	item3.SumScore3  = model.SumScore3
-	item3.Content4   = model.Content4
+	item3.SumScore3 = model.SumScore3
+	item3.Content4 = model.Content4
 	item3.NormalSumScore4 = model.NormalSumScore4
-	item3.SumScore4  = model.SumScore4
-	item3.Content5   = model.Content5
+	item3.SumScore4 = model.SumScore4
+	item3.Content5 = model.Content5
 	item3.NormalSumScore5 = model.NormalSumScore5
-	item3.SumScore5  = model.SumScore5
-	item3.Content6   = model.Content6
+	item3.SumScore5 = model.SumScore5
+	item3.Content6 = model.Content6
 	item3.NormalSumScore6 = model.NormalSumScore6
-	item3.SumScore6  = model.SumScore6
-	item3.Content7   = model.Content7
+	item3.SumScore6 = model.SumScore6
+	item3.Content7 = model.Content7
 	item3.NormalSumScore7 = model.NormalSumScore7
-	item3.SumScore7  = model.SumScore7
-	item3.Content8   = model.Content8
+	item3.SumScore7 = model.SumScore7
+	item3.Content8 = model.Content8
 	item3.NormalSumScore8 = model.NormalSumScore8
-	item3.SumScore8  = model.SumScore8
+	item3.SumScore8 = model.SumScore8
 	item3.Conclusion = model.Conclusion
-	item3.Note       = model.Note
-	item3.ModifiedOn   = time.Now()
-	item3.ModifiedBy   = this.User.Realname
+	item3.Note = model.Note
+	item3.ModifiedOn = time.Now()
+	item3.ModifiedBy = this.User.Realname
 	item3.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
 	item3.B1 = model.B1
 	item3.B2 = model.B2
@@ -680,8 +688,7 @@ func (this *OilContractSumScoreController) UpdateEntity() {
 		"Result1",
 		"Result2",
 	}
-	err3 := itemSvc.UpdateEntityBytbl(OilContractSumScoreItemsName,item3.Id,&item3,cols3)
-
+	err3 := itemSvc.UpdateEntityBytbl(OilContractSumScoreItemsName, item3.Id, &item3, cols3)
 
 	if err == nil && err2 == nil && err3 == nil {
 		errinfo.Message = "修改成功!"
@@ -719,40 +726,40 @@ func (this *OilContractSumScoreController) DocExport() {
 
 	var supplierModel supplier.OilSupplier
 	supplierSvc := supplier.GetOilSupplierService(utils.DBE)
-	supplierSvc.GetEntityByIdBytbl(OilSupplierName,model.SupplierId,&supplierModel)
+	supplierSvc.GetEntityByIdBytbl(OilSupplierName, model.SupplierId, &supplierModel)
 
 	var supplierCertModel suppliercert.OilSupplierCert
 	suppliercertSvc := suppliercert.GetOilSupplierCertService(utils.DBE)
-	suppliercertSvc.GetEntityByIdBytbl(OilSupplierCertName,model.SupplierId,&supplierCertModel)
+	suppliercertSvc.GetEntityByIdBytbl(OilSupplierCertName, model.SupplierId, &supplierCertModel)
 
 	var item contractSumScoreItems.OilContractSumScoreItems
 	itemSvc := contractSumScoreItems.GetOilContractSumScoreItemsService(utils.DBE)
-	where := " 1=1 AND SumScoreId= '" + utils.ToStr( model.Id) + "' AND Category =  '0' "
-	itemSvc.GetEntityByWhere(OilContractSumScoreItemsName,where,&item)
+	where := " 1=1 AND SumScoreId= '" + utils.ToStr(model.Id) + "' AND Category =  '0' "
+	itemSvc.GetEntityByWhere(OilContractSumScoreItemsName, where, &item)
 
 	datamap := structToMapDemo(model)
 	datamap["AccessCardNo"] = supplierCertModel.AccessCardNo
-	datamap["ContactName"]  = supplierModel.ContactName
-	datamap["Mobile"]       = supplierModel.Mobile
-	datamap["Result1"]      = item.Result2
-	datamap["Result2"]      = item.Result1
-
-	datamap["SumScore1"]    = item.SumScore1
-	datamap["Content1"]     = item.Content1
-	datamap["SumScore2"]    = item.SumScore2
-	datamap["Content2"]     = item.Content2
-	datamap["SumScore3"]    = item.SumScore3
-	datamap["Content3"]     = item.Content3
-	datamap["SumScore4"]    = item.SumScore4
-	datamap["Content4"]     = item.Content4
-	datamap["SumScore5"]    = item.SumScore5
-	datamap["Content5"]     = item.Content5
-	datamap["SumScore6"]    = item.SumScore6
-	datamap["Content6"]     = item.Content6
-	datamap["SumScore7"]    = item.SumScore7
-	datamap["Content7"]     = item.Content7
-	datamap["SumScore8"]    = item.SumScore8
-	datamap["Content8"]     = item.Content8
+	datamap["ContactName"] = supplierModel.ContactName
+	datamap["Mobile"] = supplierModel.Mobile
+	datamap["Result1"] = item.Result2
+	datamap["Result2"] = item.Result1
+
+	datamap["SumScore1"] = item.SumScore1
+	datamap["Content1"] = item.Content1
+	datamap["SumScore2"] = item.SumScore2
+	datamap["Content2"] = item.Content2
+	datamap["SumScore3"] = item.SumScore3
+	datamap["Content3"] = item.Content3
+	datamap["SumScore4"] = item.SumScore4
+	datamap["Content4"] = item.Content4
+	datamap["SumScore5"] = item.SumScore5
+	datamap["Content5"] = item.Content5
+	datamap["SumScore6"] = item.SumScore6
+	datamap["Content6"] = item.Content6
+	datamap["SumScore7"] = item.SumScore7
+	datamap["Content7"] = item.Content7
+	datamap["SumScore8"] = item.SumScore8
+	datamap["Content8"] = item.Content8
 
 	datamap["B1"] = item.B1
 	datamap["B2"] = item.B2
@@ -768,20 +775,20 @@ func (this *OilContractSumScoreController) DocExport() {
 
 	t := time.Now()
 	datamap["CreateDate"] = t.Format("2006年01月02日")
-	datamap["Creater"]    = this.User.Realname
+	datamap["Creater"] = this.User.Realname
 
 	if item.Conclusion == 1 {
 		datamap["Conclusion"] = "☑优秀 □合格 □观察使用 □不合格"
-	}else if item.Conclusion == 2 {
+	} else if item.Conclusion == 2 {
 		datamap["Conclusion"] = "□优秀 ☑合格 □观察使用 □不合格"
-	}else if item.Conclusion == 3 {
+	} else if item.Conclusion == 3 {
 		datamap["Conclusion"] = "□优秀 □合格 □观察使用 ☑不合格"
-	}else {
+	} else {
 		datamap["Conclusion"] = "□优秀 □合格 ☑观察使用 □不合格"
 	}
 
 	fileName := "承包商年度评价表和综合年度评价表.docx"
-	Url      := utils.Cfg.MustValue("workflow", "contractSumScoreUrl")
+	Url := utils.Cfg.MustValue("workflow", "contractSumScoreUrl")
 
 	//datamap["TableComment"] = []string{"MajorEquipments", "ThreeYears", "Patent", "Winning"}
 	retDocUrl := svcActiviti.FillWordTemplate(datamap, Url, fileName)
@@ -793,11 +800,12 @@ func (this *OilContractSumScoreController) DocExport() {
 	this.Data["json"] = &datainfo
 	this.ServeJSON()
 }
+
 // @Title 从数据录入数据导出到Excel文档
 // @Description 数据存入Excel
 // @Success	200	{object} controllers.Request
 // @router /exportexcel [get]
-func (this *OilContractSumScoreController)  ExcelExport(){
+func (this *OilContractSumScoreController) ExcelExport() {
 	//获取分页信息
 	where := " 1=1 "
 	orderby := "score.Id"
@@ -876,11 +884,11 @@ func (this *OilContractSumScoreController)  ExcelExport(){
 
 	//超级管理员和有查看所有数据权限的用户不加条件
 	svcPerm := permission.GetPermissionService(utils.DBE)
-	isauth  := svcPerm.IsAuthorized(this.User.Id, "oil_contract.SumStore.AllRecord")
-	if(!isauth){
+	isauth := svcPerm.IsAuthorized(this.User.Id, "oil_contract.SumStore.AllRecord")
+	if !isauth {
 		// 权限过滤  自己创建的评价 ,同二级部门创建的评价 ,企管法规处能看
 		where = where + " and ( score.CreateUserId =  '" + this.User.Id + "' "
-		where = where + " or score.UnitId = '" +  strconv.Itoa(this.User.UnitId) + "' "
+		where = where + " or score.UnitId = '" + strconv.Itoa(this.User.UnitId) + "' "
 		where = where + " )"
 	}
 
@@ -891,11 +899,11 @@ func (this *OilContractSumScoreController)  ExcelExport(){
 	var Url string
 	var fileName string
 	fileName = ""
-	Url      = ""
+	Url = ""
 	if ContractClass == "03" {
 		fileName = "服务商年度评价表.xlsx"
 		Url = utils.Cfg.MustValue("workflow", "ServiceSumScoreUrl")
-	} else if ContractClass == "01"{
+	} else if ContractClass == "01" {
 		fileName = "供应商年度评价表.xlsx"
 		Url = utils.Cfg.MustValue("workflow", "GoodsSumScoreUrl")
 	}
@@ -905,7 +913,7 @@ func (this *OilContractSumScoreController)  ExcelExport(){
 	var datamap = make(map[string]interface{})
 	datamap["data"] = list
 
-	retDocUrl := svcActiviti.FillExcel(datamap,ContractClass, Url, fileName)
+	retDocUrl := svcActiviti.FillExcel(datamap, ContractClass, Url, fileName)
 	var datainfo ErrorDataInfo
 	datainfo.Code = 0
 	datainfo.Item = retDocUrl
@@ -919,7 +927,7 @@ func (this *OilContractSumScoreController)  ExcelExport(){
 // @Param 	body body contractSumScore.OilContractSumScore
 // @Success	200	{object} controllers.Request
 // @router /save-sec-score/:id [post]
-func (this *OilContractSumScoreController) SaveScoreItemsBySec(){
+func (this *OilContractSumScoreController) SaveScoreItemsBySec() {
 	id := this.Ctx.Input.Param(":id")
 	var errinfo ErrorInfo
 	if id == "" {
@@ -936,40 +944,40 @@ func (this *OilContractSumScoreController) SaveScoreItemsBySec(){
 
 	where := "SumScoreId=" + id + " AND Category = 1 "
 	// 清除掉之前的
-	itemSvc.DeleteEntityBytbl(OilContractSumScoreItemsName,where)
+	itemSvc.DeleteEntityBytbl(OilContractSumScoreItemsName, where)
 
 	var item contractSumScoreItems.OilContractSumScoreItems
-	item.SumScoreId,_ = strconv.Atoi(id)
-	item.Category   = 1                      // 二级单位创建
-	item.SumScore   = model.SumScore
-	item.Content1   = model.Content1
+	item.SumScoreId, _ = strconv.Atoi(id)
+	item.Category = 1 // 二级单位创建
+	item.SumScore = model.SumScore
+	item.Content1 = model.Content1
 	item.NormalSumScore1 = model.NormalSumScore1
-	item.SumScore1  = model.SumScore1
-	item.Content2   = model.Content2
+	item.SumScore1 = model.SumScore1
+	item.Content2 = model.Content2
 	item.NormalSumScore2 = model.NormalSumScore2
-	item.SumScore2  = model.SumScore2
-	item.Content3   = model.Content3
+	item.SumScore2 = model.SumScore2
+	item.Content3 = model.Content3
 	item.NormalSumScore3 = model.NormalSumScore3
-	item.SumScore3  = model.SumScore3
-	item.Content4   = model.Content4
+	item.SumScore3 = model.SumScore3
+	item.Content4 = model.Content4
 	item.NormalSumScore4 = model.NormalSumScore4
-	item.SumScore4  = model.SumScore4
-	item.Content5   = model.Content5
+	item.SumScore4 = model.SumScore4
+	item.Content5 = model.Content5
 	item.NormalSumScore5 = model.NormalSumScore5
-	item.SumScore5  = model.SumScore5
-	item.Content6   = model.Content6
+	item.SumScore5 = model.SumScore5
+	item.Content6 = model.Content6
 	item.NormalSumScore6 = model.NormalSumScore6
-	item.SumScore6  = model.SumScore6
-	item.Content7   = model.Content7
+	item.SumScore6 = model.SumScore6
+	item.Content7 = model.Content7
 	item.NormalSumScore7 = model.NormalSumScore7
-	item.SumScore7  = model.SumScore7
-	item.Content8   = model.Content8
+	item.SumScore7 = model.SumScore7
+	item.Content8 = model.Content8
 	item.NormalSumScore8 = model.NormalSumScore8
-	item.SumScore8  = model.SumScore8
+	item.SumScore8 = model.SumScore8
 	item.Conclusion = model.Conclusion
-	item.Note       = model.Note
-	item.CreateOn   = time.Now()
-	item.CreateBy   = this.User.Realname
+	item.Note = model.Note
+	item.CreateOn = time.Now()
+	item.CreateBy = this.User.Realname
 	item.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
 
 	item.B1 = model.B1
@@ -984,7 +992,7 @@ func (this *OilContractSumScoreController) SaveScoreItemsBySec(){
 	item.Result1 = model.Result1
 	item.Result2 = model.Result2
 
-	_,err := itemSvc.InsertEntityBytbl(OilContractSumScoreItemsName, &item)
+	_, err := itemSvc.InsertEntityBytbl(OilContractSumScoreItemsName, &item)
 
 	if err == nil {
 		errinfo.Message = "修改成功!"
@@ -999,7 +1007,6 @@ func (this *OilContractSumScoreController) SaveScoreItemsBySec(){
 	}
 }
 
-
 // @Title 删除单条信息
 // @Description
 // @Success 200 {object} ErrorInfo
@@ -1021,7 +1028,7 @@ func (this *OilContractSumScoreController) DeleteEntity() {
 
 	// 审核中不能删除
 	svc.GetEntityByIdBytbl(OilContractSumScoreName, Id, &model)
-	if model.Status > "0" && model.Status < "8"  {
+	if model.Status > "0" && model.Status < "8" {
 		errinfo.Message = "该年度评价正在审核,不允许删除!"
 		errinfo.Code = -1
 		this.Data["json"] = &errinfo
@@ -1029,7 +1036,6 @@ func (this *OilContractSumScoreController) DeleteEntity() {
 		return
 	}
 
-
 	opdesc := "删除-" + Id
 	err := svc.DeleteOperationAndWriteLogBytbl(this.User.AccCode+OilContractSumScoreName, BaseOperationLogName, Id, &model, &entityempty, utils.ToStr(this.User.Id), this.User.Username, opdesc, this.User.AccCode, "钻井日报")
 	if err == nil {
@@ -1045,7 +1051,6 @@ func (this *OilContractSumScoreController) DeleteEntity() {
 	}
 }
 
-
 // @Title 二级单位提交审批 --启动工作流
 // @Description 二级单位提交审批
 // @Success	200	{object} controllers.Request

+ 92 - 96
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-basis-year/_opera/operation.vue

@@ -288,7 +288,7 @@ import baseList from './baselist'
 import WfHistory from '@/components/workflow/wfhistory.vue'
 import submitPopup from '@/components/oilcontract/submitPopup.vue'
 import apiCert from '@/api/oilsupplier/suppliercert'
-import permissionApi from '@/api/oilcontract/permission';
+import permissionApi from '@/api/oilcontract/permission'
 
 export default {
   computed: {
@@ -304,7 +304,7 @@ export default {
     submitPopup
   },
 
-  data() {
+  data () {
     var validateFen = (rule, value, callback) => {
       console.log(rule, value, callback)
       // if (value === '') {
@@ -312,9 +312,9 @@ export default {
       // } else if (value !== this.ruleForm.pass) {
       //   callback(new Error('两次输入密码不一致!'));
       // } else {
-      callback();
+      callback()
       // }
-    };
+    }
     return {
       entityList: [],
       // 当前操作
@@ -323,50 +323,50 @@ export default {
       rules: {
         SumScore: [
           {required: true, message: '请填写', trigger: 'change'},
-          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'},
+          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'}
           // { validator: validateFen, trigger: 'change' }
         ],
         SumScore1: [
           {required: true, message: '请填写', trigger: 'change'},
-          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'},
+          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'}
         ],
         SumScore2: [
           {required: true, message: '请填写', trigger: 'change'},
-          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'},
+          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'}
         ],
         SumScore3: [
           {required: true, message: '请填写', trigger: 'change'},
-          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'},
+          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'}
         ],
         SumScore4: [
           {required: true, message: '请填写', trigger: 'change'},
-          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'},
+          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'}
         ],
         SumScore5: [
           {required: true, message: '请填写', trigger: 'change'},
-          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'},
+          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'}
         ],
         SumScore6: [
           {required: true, message: '请填写', trigger: 'change'},
-          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'},
+          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'}
         ],
         SumScore7: [
           {required: true, message: '请填写', trigger: 'change'},
-          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'},
+          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'}
         ],
         SumScore8: [
           {required: true, message: '请填写', trigger: 'change'},
-          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'},
+          {pattern: /^\+?((0|([1-9]+\d*))|((0\.\d+)|([1-9]+\d*\.\d+)))$/, message: '填写格式不正确', trigger: 'change'}
         ],
         Result1: [
-          {required: true, message: '请填写', trigger: 'blur'},
+          {required: true, message: '请填写', trigger: 'blur'}
         ],
         Result2: [
-          {required: true, message: '请填写', trigger: 'blur'},
+          {required: true, message: '请填写', trigger: 'blur'}
         ],
         Conclusion: [
-          {required: true, message: '请填写', trigger: 'change'},
-        ],
+          {required: true, message: '请填写', trigger: 'change'}
+        ]
       },
       entrydetail: {
         process: '',
@@ -377,17 +377,17 @@ export default {
       serviceId: '',
       // 评价信息
       evaluateData: {
-        Id: 0,
+        Id: 0
       },
       // 评价信息(专业处室)
       evaluateDataZhuan: {
-        Id: 0,
+        Id: 0
       },
       typeList: [],
       // 接口反的信息
       formData: {
         Id: 0,
-        Status: 0,
+        Status: 0
       },
 
       editData: {},
@@ -396,40 +396,40 @@ export default {
       auditBtnBoolean: true,
       auditBtnBooleanZhuan: false,
       auditstepcode: '',
-      //下拉选择项
-      //wellNoOptions: [],
-      //supervisersOptions: [],
+      // 下拉选择项
+      // wellNoOptions: [],
+      // supervisersOptions: [],
 
       departmentBoolean: false,
       checkBoolean: false,
-      saveButton: false,
+      saveButton: false
     }
   },
   watch: {},
-  created() {
+  created () {
     // console.log('接受操作', this.$route.query.item)
-    this.serviceId = this.$route.params.opera;
+    this.serviceId = this.$route.params.opera
     if (this.$route.query.item) {
       if (this.$route.query.item.SupplierId > 0) {
         api.GetResultEntity(this.$route.query.item.SupplierId, this.$axios).then(res => {
           console.log('结果', res)
           this.evaluateData.Result1 = res.data.Result1
-          if (res.data.Result2 && res.data.Result2 == "0") {
-            this.evaluateData.Result2 = "否"
+          if (res.data.Result2 && res.data.Result2 == '0') {
+            this.evaluateData.Result2 = '否'
           } else {
-            this.evaluateData.Result2 = "是"
+            this.evaluateData.Result2 = '是'
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       }
     }
-    if (this.serviceId != 'add' && this.serviceId > 0) {  //编辑进入
+    if (this.serviceId != 'add' && this.serviceId > 0) { // 编辑进入
       this.formData.Id = this.serviceId
       this.refreshPage()
     } else { // 新增进入
       this.formData = this.$route.query.item
-      this.formData.Id = 0;
+      this.formData.Id = 0
       this.formData.Status = 0
       this.initPage(this.$route.query.item)
     }
@@ -437,7 +437,7 @@ export default {
   },
   methods: {
     // 导出
-    exportExcel() {
+    exportExcel () {
       api.docexportEle(this.formData.Id, this.$axios).then(res => {
         if (res.data.code === 0) {
           let docurl = res.data.item
@@ -496,47 +496,46 @@ export default {
         console.error(err)
       })
     },
-    //刷新数据接口
-    refreshPage() {
-      //拿id查审核流程
+    // 刷新数据接口
+    refreshPage () {
+      // 拿id查审核流程
       this.showIdDatas()
       this.showIdDatass()
-
     },
     // 审核
-    commonAuditClick(index) {
+    commonAuditClick (index) {
       var index = Number(index)
       switch (index) {
         // 提交审核
         case 0:
-          this.saveEntity();
+          this.saveEntity()
           this.$refs.submitpopup.dialogVisibleCom = true
-          break;
+          break
         // 初审
         case 1:
           this.$refs.submitpopup.dialogCommonAuditMakeSureVisible = true
-          break;
+          break
         // 复审
         case 2:
           this.$refs.submitpopup.dialogCommonAuditMakeSureVisible = true
-          break;
+          break
         // 专业科室接收
         case 3:
           this.$refs.submitpopup.auditOrgChange()
           this.$refs.submitpopup.dialogBusinessOfficeSeparateAuditVisible = true
-          break;
+          break
         // 专业处室审核
         case 4:
-          this.saveEntity();
+          this.saveEntity()
           this.$refs.submitpopup.dialogCommonAuditMakeSureVisible = true
-          break;
+          break
         // 企管法规处
         case 7:
           this.$refs.submitpopup.dialogCommonAuditMakeSureVisible = true
-          break;
+          break
       }
     },
-    initPage(item) {
+    initPage (item) {
       this.evaluateData = item
 
       this.$set(this.evaluateData, 'SupplierId', Number(item.SupplierId))
@@ -553,17 +552,16 @@ export default {
       this.$set(this.evaluateData, 'Result1', '')
       this.$set(this.evaluateData, 'Result2', '')
       // this.getList()
-
     },
     // 获取编辑信息
-    showIdDatas() {
+    showIdDatas () {
       if (this.formData.Id) {
         api.getEntity(0, this.formData.Id, this.$axios).then(res => {
           console.log('用id去查详情信息111111111111', res)
           this.entrydetail.business = ''
           var item = res.data
-          this.formData = res.data;
-          this.evaluateData = res.data;
+          this.formData = res.data
+          this.evaluateData = res.data
           this.evaluateData.Conclusion = Number(item.Conclusion)
           this.entrydetail.business = item.Id
           this.entrydetail.instance = item.WorkflowId
@@ -573,27 +571,26 @@ export default {
           // this.getList()
         }).catch(err => {
           console.error(err)
-        });
+        })
       }
     },
     // 获取编辑信息(专业处室)
-    showIdDatass() {
+    showIdDatass () {
       if (this.formData.Id) {
         api.getEntity(1, this.formData.Id, this.$axios).then(res => {
           console.log('用id去查专业处室详情信息', res)
           var item = res.data
-          this.evaluateDataZhuan = res.data;
+          this.evaluateDataZhuan = res.data
           this.evaluateDataZhuan.Conclusion = Number(item.Conclusion)
         }).catch(err => {
           console.error(err)
-        });
+        })
       }
     },
 
-
-    //保存信息
-    saveEntity() {
-      if (this.formData.Status != '4') {//普通二级用户评价evaluation_listType_one
+    // 保存信息
+    saveEntity () {
+      if (this.formData.Status != '4') { // 普通二级用户评价evaluation_listType_one
         // this.evaluation_list = this.$refs.evaluation_list_one.entityListData.entityList
         // this.evaluation_list = this.evaluation_list.concat(this.$refs.evaluation_listType_one.entityListData.entityList)
         // 获取第一列评价格式
@@ -613,10 +610,10 @@ export default {
             //   this.$message.error('业绩评价填写的分数有误');
             // }
           } else {
-            this.$message.error('评价信息填写的有误');
+            this.$message.error('评价信息填写的有误')
           }
         })
-      } else {//专业处室评价
+      } else { // 专业处室评价
         // this.evaluation_list = this.$refs.evaluation_list_two.entityListData.entityList
         // this.evaluation_list = this.evaluation_list.concat(this.$refs.evaluation_listType_two.entityListData.entityList)
         // // 获取第一列评价格式
@@ -626,13 +623,13 @@ export default {
           if (valid) {
             this.majorEvaluate()
           } else {
-            this.$message.error('评价信息填写的有误');
+            this.$message.error('评价信息填写的有误')
           }
         })
       }
     },
-    //专业处室评价
-    majorEvaluate() {
+    // 专业处室评价
+    majorEvaluate () {
       // 先隐藏条件评价
       // for(var i = 1 ; i <= 8 ; i++){
       //   this.evaluateDataZhuan['B'+i] = parseInt(this.typeList[i-1].value)
@@ -644,15 +641,15 @@ export default {
           this.$message({
             type: 'success',
             message: res.data.message
-          });
-          this.refreshPage();
+          })
+          this.refreshPage()
         }
       }).catch(err => {
         console.error(err)
-      });
+      })
     },
-    //新增评价
-    addEntity() {
+    // 新增评价
+    addEntity () {
       // 先隐藏条件评价
       this.evaluateData.Conclusion = parseInt(this.evaluateData.Conclusion)
       // for(var i = 1 ; i <= 8 ; i++){
@@ -660,46 +657,46 @@ export default {
       // }
       api.addEntity(this.evaluateData, this.$axios).then(res => {
         if (res.data.code === 0) {
-          this.formData.Id = res.data.item;
+          this.formData.Id = res.data.item
           this.$message({
             type: 'success',
             message: res.data.message
-          });
-          this.refreshPage();
+          })
+          this.refreshPage()
         } else {
           this.$message({
             type: 'warning',
             message: res.data.message
-          });
+          })
         }
       }).catch(err => {
         console.error(err)
-      });
+      })
     },
 
-    updateEntity() {
+    updateEntity () {
       // 先隐藏条件评价
       // for(var i = 1 ; i <= 8 ; i++){
       //   this.evaluateData['B'+i] = parseInt(this.typeList[i-1].value)
       // }
       api.updateEntity(this.formData.Id, this.evaluateData, this.$axios).then(res => {
         if (res.data.code === 0) {
-          this.refreshPage();
+          this.refreshPage()
           this.$message({
             type: 'success',
             message: res.data.message
-          });
+          })
         } else {
           this.$message({
             type: 'warning',
             message: res.data.message
-          });
+          })
         }
       }).catch(err => {
         console.error(err)
-      });
+      })
     },
-    getAuditStepCodeByStatus() {
+    getAuditStepCodeByStatus () {
       if (this.formData.Status === '1') {
         this.auditstepcode = 'FIRST_TRIAL'
       } else if (this.formData.Status === '2') {
@@ -718,7 +715,7 @@ export default {
         this.auditstepcode = 'SUB_OFFICE_WZ'
       }
     },
-    isAccess() {
+    isAccess () {
       this.getAuditStepCodeByStatus()
       let params = {
         id: this.formData.Id,
@@ -745,11 +742,11 @@ export default {
       })
     },
 
-    supplierChangeHandler() {
+    supplierChangeHandler () {
       this.evaluateData.SupplierName = this.$refs['SupplierSelect'].selectedLabel
     },
     // 获取条件数组
-    getList() {
+    getList () {
       var item = this.formData
       console.log(2222, item)
       var list = []
@@ -795,7 +792,7 @@ export default {
       this.typeList = list
     },
 
-    jstimehandle(val) {
+    jstimehandle (val) {
       if (val === '') {
         return '----'
       } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -807,23 +804,22 @@ export default {
         return val.substring(0, 10)
       }
     },
-    onBack() {
+    onBack () {
       this.$router.go(-1)
     },
-    formatDateTime(date) {
-      var y = date.getFullYear();
-      var m = date.getMonth() + 1;
-      m = m < 10 ? ('0' + m) : m;
-      var d = date.getDate();
-      d = d < 10 ? ('0' + d) : d;
-      var h = date.getHours();
-      var minute = date.getMinutes();
-      minute = minute < 10 ? ('0' + minute) : minute;
-      return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+    formatDateTime (date) {
+      var y = date.getFullYear()
+      var m = date.getMonth() + 1
+      m = m < 10 ? ('0' + m) : m
+      var d = date.getDate()
+      d = d < 10 ? ('0' + d) : d
+      var h = date.getHours()
+      var minute = date.getMinutes()
+      minute = minute < 10 ? ('0' + minute) : minute
+      return y + '-' + m + '-' + d + ' ' + h + ':' + minute
     }
   }
 }
-
 </script>
 
 <style lang="scss">

+ 21 - 10
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-basis-year/index.vue

@@ -16,6 +16,17 @@
           <!-- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel">导出</el-button> -->
         </span>
         <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+          <el-form-item label="企业名称">
+            <el-input size="mini" clearable v-model="searchForm.SupplierName" placeholder="请输入企业名称"></el-input>
+          </el-form-item>
+          <el-form-item label="评价结果">
+            <el-select size="mini" v-model="searchForm.Evaluate" placeholder="请选择" style="width: 100%" clearable>
+              <el-option label="全部" value="" key="01"></el-option>
+              <el-option label="优秀" value="1" key="02"></el-option>
+              <el-option label="合格" value="2" key="03"></el-option>
+              <el-option label="不合格" value="3" key="04"></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="上报时间">
             <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
                             start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
@@ -35,7 +46,7 @@
       <el-table id="rebateSetTable" highlight-current-row stripe size="mini" :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby" v-loading="tableLoading">
         <el-table-column label="操作" header-align="center" width="100" align="center" fixed v-if="jurisdictionBoolean">
           <template slot-scope="scope">
-              <el-button type="text" title="生成" size="small" icon="el-icon-edit" @click="onNavigateScore(scope.row)">生成</el-button>
+              <el-button type="text" title="查看" size="small" icon="el-icon-edit" @click="onNavigateScore(scope.row)">查看</el-button>
           </template>
         </el-table-column>
         <el-table-column sortable show-overflow-tooltip prop="SupplierName" header-align="center" width="130" align="center" label="承包商名称"></el-table-column>
@@ -219,13 +230,13 @@
           switch (index) {
             case 1:
               return '优秀'
-              break;
+              break
             case 2:
               return '合格'
-              break;
+              break
             case 3:
               return '不合格'
-              break;
+              break
             default:
               return '--'
           }
@@ -246,7 +257,7 @@
 
     data () {
       return {
-        tableLoading:false,
+        tableLoading: false,
 
         tableWidth: '290px',
         dialogVisible: false,
@@ -311,7 +322,7 @@
         })
       },
       initDatas () {
-        this.tableLoading = true;
+        this.tableLoading = true
         // 分页及列表条件
         // <el-option label="物资类" value="01" key="01"></el-option>
         // <el-option label="基建类" value="02" key="02"></el-option>
@@ -336,11 +347,11 @@
         Object.assign(params, this.searchForm)
         // 访问接口
         api.GetComputeList(myCreateOn.join(','), params, this.$axios).then(res => {
-          this.tableLoading = false;
+          this.tableLoading = false
           this.entityList = res.data.items
           this.currentItemCount = res.data.currentItemCount
         }).catch(err => {
-          this.tableLoading = false;
+          this.tableLoading = false
           console.error(err)
         })
       },
@@ -454,7 +465,7 @@
         }
         return wbout
       },
-      formatDateTime(date) {
+      formatDateTime (date) {
         var y = date.getFullYear()
         var m = date.getMonth() + 1
         m = m < 10 ? ('0' + m) : m
@@ -471,7 +482,7 @@
         this.$router.push({
           path: '/oilcontract/contract-basis-year/' + 'add' + '/operation',
           query: {
-            item: item,
+            item: item
             // SupplierId:item.SupplierId,
           }
         })

+ 12 - 1
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-goods-year/index.vue

@@ -16,6 +16,17 @@
           <!-- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel">导出</el-button> -->
         </span>
         <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+          <el-form-item label="企业名称">
+            <el-input size="mini" clearable v-model="searchForm.SupplierName" placeholder="请输入企业名称"></el-input>
+          </el-form-item>
+          <el-form-item label="评价结果">
+            <el-select size="mini" v-model="searchForm.Evaluate" placeholder="请选择" style="width: 100%" clearable>
+              <el-option label="全部" value="" key="01"></el-option>
+              <el-option label="优秀" value="1" key="02"></el-option>
+              <el-option label="合格" value="2" key="03"></el-option>
+              <el-option label="不合格" value="3" key="04"></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="上报时间">
             <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
                             start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
@@ -35,7 +46,7 @@
       <el-table id="rebateSetTable" highlight-current-row stripe size="mini" :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby" v-loading="tableLoading">
         <el-table-column label="操作" v-if="jurisdictionBoolean" header-align="center" width="100" align="center" fixed>
             <template slot-scope="scope">
-                <el-button type="text" title="生成" size="small" icon="el-icon-edit" @click="onNavigateScore(scope.row)">生成</el-button>
+                <el-button type="text" title="查看" size="small" icon="el-icon-edit" @click="onNavigateScore(scope.row)">查看</el-button>
             </template>
         </el-table-column>
 

+ 12 - 1
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract-service-year/index.vue

@@ -16,6 +16,17 @@
           <!-- <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel">导出</el-button> -->
         </span>
         <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+          <el-form-item label="企业名称">
+            <el-input size="mini" clearable v-model="searchForm.SupplierName" placeholder="请输入企业名称"></el-input>
+          </el-form-item>
+          <el-form-item label="评价结果">
+            <el-select size="mini" v-model="searchForm.Evaluate" placeholder="请选择" style="width: 100%" clearable>
+              <el-option label="全部" value="" key="01"></el-option>
+              <el-option label="优秀" value="1" key="02"></el-option>
+              <el-option label="合格" value="2" key="03"></el-option>
+              <el-option label="不合格" value="3" key="04"></el-option>
+            </el-select>
+          </el-form-item>
           <el-form-item label="上报时间">
             <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
                             start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
@@ -35,7 +46,7 @@
       <el-table id="rebateSetTable" highlight-current-row stripe size="mini" :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby" v-loading="tableLoading">
         <el-table-column v-if="jurisdictionBoolean" label="操作" header-align="center" width="100" align="center" fixed>
           <template slot-scope="scope">
-              <el-button type="text" title="生成" size="small" icon="el-icon-edit" @click="onNavigateScore(scope.row)">生成</el-button>
+              <el-button type="text" title="查看" size="small" icon="el-icon-edit" @click="onNavigateScore(scope.row)">查看</el-button>
           </template>
         </el-table-column>
         <el-table-column sortable show-overflow-tooltip prop="SupplierName" header-align="center" min-width="130" align="center" label="服务商名称"></el-table-column>