Pārlūkot izejas kodu

合同评价原型-init

yuedefeng 5 gadi atpakaļ
vecāks
revīzija
f5d0c0335c
17 mainītis faili ar 2628 papildinājumiem un 0 dzēšanām
  1. 42 0
      src/dashoo.cn/backend/api/business/oilcontract/contract/contract.go
  2. 16 0
      src/dashoo.cn/backend/api/business/oilcontract/contract/contractService.go
  3. 20 0
      src/dashoo.cn/backend/api/business/oilcontract/contractEvaluationItems/contractEvaluationItems.go
  4. 16 0
      src/dashoo.cn/backend/api/business/oilcontract/contractEvaluationItems/contractEvaluationItemsService.go
  5. 16 0
      src/dashoo.cn/backend/api/business/oilcontract/contractOffGrade/contractOffGrade.go
  6. 16 0
      src/dashoo.cn/backend/api/business/oilcontract/contractOffGrade/contractOffGradeService.go
  7. 23 0
      src/dashoo.cn/backend/api/business/oilcontract/evaluationItems/evaluationItems.go
  8. 16 0
      src/dashoo.cn/backend/api/business/oilcontract/evaluationItems/evaluationItemsService.go
  9. 4 0
      src/dashoo.cn/backend/api/controllers/base.go
  10. 443 0
      src/dashoo.cn/backend/api/controllers/oilcontract/contract.go
  11. 276 0
      src/dashoo.cn/backend/api/controllers/oilcontract/contractEvaluationItems.go
  12. 248 0
      src/dashoo.cn/backend/api/controllers/oilcontract/contractOffGrade.go
  13. 310 0
      src/dashoo.cn/backend/api/controllers/oilcontract/evaluationItems.go
  14. 25 0
      src/dashoo.cn/backend/api/routers/router.go
  15. 41 0
      src/dashoo.cn/frontend_web/src/api/oilcontract/contract.js
  16. 419 0
      src/dashoo.cn/frontend_web/src/pages/oilcontract/contract/_opera/operation.vue
  17. 697 0
      src/dashoo.cn/frontend_web/src/pages/oilcontract/contract/index.vue

+ 42 - 0
src/dashoo.cn/backend/api/business/oilcontract/contract/contract.go

@@ -0,0 +1,42 @@
+package contract
+
+import (
+	"time"
+)
+
+type OilContract struct {
+	Id                   int       `json:"Id" xorm:"not null pk autoincr INT(11) 'Id'"`
+	SupplierId           int       `json:"SupplierId" xorm:"default 0 comment('供应商ID') INT(11) 'SupplierId'"`
+	SupplierName         string    `json:"SupplierName" xorm:"comment('企业名称') VARCHAR(255) 'SupplierName'"`
+	ProjectName          string    `json:"ProjectName" xorm:"comment('项目名称') VARCHAR(500) 'ProjectName'"`
+	ContractNo           string    `json:"ContractNo" xorm:"comment('合同编号') VARCHAR(100) 'ContractNo'"`
+	ProjectPlace         string    `json:"ProjectPlace" xorm:"comment('工程地点') VARCHAR(100) 'ProjectPlace'"`
+	ProjectOwner         string    `json:"ProjectOwner" xorm:"comment('项目负责人') VARCHAR(50) 'ProjectOwner'"`
+	Telephone            string    `json:"Telephone" xorm:"comment('联系人电话') VARCHAR(50) 'Telephone'"`
+	ProjectType          string    `json:"ProjectType" xorm:"comment('项目类别') VARCHAR(50) 'ProjectType'"`
+	ContractMode         string    `json:"ContractMode" xorm:"comment('合同模式') VARCHAR(50) 'ContractMode'"`
+	Amount               string    `json:"Amount" xorm:"comment('合同总金额(万元)') DECIMAL(11,2) 'Amount'"`
+	ContractPeriod       string    `json:"ContractPeriod" xorm:"comment('合同总工期(天)') VARCHAR(50) 'ContractPeriod'"`
+	OpenDate             time.Time `json:"OpenDate" xorm:"comment('开工日期') DATETIME 'OpenDate'"`
+	PlanFinishDate       time.Time `json:"PlanFinishDate" xorm:"comment('计划竣工时间') DATETIME 'PlanFinishDate'"`
+	ConstructionUnit     string    `json:"ConstructionUnit" xorm:"comment('建设单位') VARCHAR(50) 'ConstructionUnit'"`
+	ConstructionOwner    string    `json:"ConstructionOwner" xorm:"comment('建设负责人') VARCHAR(50) 'ConstructionOwner'"`
+	ConstructionTelphone string    `json:"ConstructionTelphone" xorm:"comment('手机号') VARCHAR(50) 'ConstructionTelphone'"`
+	BuildUnit            string    `json:"BuildUnit" xorm:"comment('施工单位') VARCHAR(50) 'BuildUnit'"`
+	BuildOwner           string    `json:"BuildOwner" xorm:"comment('施工负责人') VARCHAR(50) 'BuildOwner'"`
+	BuildTelphone        string    `json:"BuildTelphone" xorm:"comment('手机号') VARCHAR(50) 'BuildTelphone'"`
+	SuperviseUnit        string    `json:"SuperviseUnit" xorm:"comment('监理单位') VARCHAR(50) 'SuperviseUnit'"`
+	SuperviseOwner       string    `json:"SuperviseOwner" xorm:"comment('监理负责人') VARCHAR(50) 'SuperviseOwner'"`
+	SuperviseTelphone    string    `json:"SuperviseTelphone" xorm:"comment('手机号') VARCHAR(50) 'SuperviseTelphone'"`
+	QualityUnit          string    `json:"QualityUnit" xorm:"comment('质量监督单位') VARCHAR(50) 'QualityUnit'"`
+	QualityOwner         string    `json:"QualityOwner" xorm:"comment('质量监督负责人') VARCHAR(50) 'QualityOwner'"`
+	QualityTelphone      string    `json:"QualityTelphone" xorm:"comment('手机号') VARCHAR(50) 'QualityTelphone'"`
+	Remark               string    `json:"Remark" xorm:"comment('备注') VARCHAR(500) 'Remark'"`
+	IsDelete             int       `json:"IsDelete" xorm:"default 0 comment('删除状态,0正常,1已删除') INT(11) 'IsDelete'"`
+	CreateOn             time.Time `json:"CreateOn" xorm:"DATETIME 'CreateOn'"`
+	CreateUserId         int       `json:"CreateUserId" xorm:"INT(11) 'CreateUserId'"`
+	CreateBy             string    `json:"CreateBy" xorm:"VARCHAR(50) 'CreateBy'"`
+	ModifiedOn           time.Time `json:"ModifiedOn" xorm:"DATETIME 'ModifiedOn'"`
+	ModifiedUserId       int       `json:"ModifiedUserId" xorm:"INT(11) 'ModifiedUserId'"`
+	ModifiedBy           string    `json:"ModifiedBy" xorm:"VARCHAR(50) 'ModifiedBy'"`
+}

+ 16 - 0
src/dashoo.cn/backend/api/business/oilcontract/contract/contractService.go

@@ -0,0 +1,16 @@
+package contract
+
+import (
+	. "dashoo.cn/backend/api/mydb"
+	"github.com/go-xorm/xorm"
+)
+
+type OilContractService struct {
+	MyServiceBase
+}
+
+func GetOilContractService(xormEngine *xorm.Engine) *OilContractService {
+	s := new(OilContractService)
+	s.DBE = xormEngine
+	return s
+}

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

@@ -0,0 +1,20 @@
+package contractEvaluationItems
+
+import (
+	"time"
+)
+
+type OilContractEvaluationItems struct {
+	Id             int       `json:"Id" xorm:"not null pk autoincr comment('ID') INT(11) 'Id'"`
+	ContractId     int       `json:"ContractId" xorm:"default 0 comment('合同表ID') INT(11) 'ContractId'"`
+	ParentId       int       `json:"ParentId" xorm:"not null default 0 comment('上级节点ID') INT(11) 'ParentId'"`
+	SequenceNo     string    `json:"SequenceNo" xorm:"default '0' comment('序号') VARCHAR(50) 'SequenceNo'"`
+	Content        string    `json:"content" xorm:"comment('评价内容') VARCHAR(1000) 'content'"`
+	NormalScore    string    `json:"NormalScore" xorm:"comment('标准分值') DECIMAL(11,2) 'NormalScore'"`
+	Score          string    `json:"Score" xorm:"comment('实得分数') DECIMAL(11,2) 'Score'"`
+	LevelCode      int       `json:"LevelCode" xorm:"not null default 0 comment('级别') INT(11) 'LevelCode'"`
+	Remark         string    `json:"Remark" xorm:"comment('备注') VARCHAR(500) 'Remark'"`
+	ModifiedOn     time.Time `json:"ModifiedOn" xorm:"DATETIME 'ModifiedOn'"`
+	ModifiedUserId int       `json:"ModifiedUserId" xorm:"INT(11) 'ModifiedUserId'"`
+	ModifiedBy     string    `json:"ModifiedBy" xorm:"VARCHAR(50) 'ModifiedBy'"`
+}

+ 16 - 0
src/dashoo.cn/backend/api/business/oilcontract/contractEvaluationItems/contractEvaluationItemsService.go

@@ -0,0 +1,16 @@
+package contractEvaluationItems
+
+import (
+	. "dashoo.cn/backend/api/mydb"
+	"github.com/go-xorm/xorm"
+)
+
+type OilContractEvaluationItemsService struct {
+	MyServiceBase
+}
+
+func GetOilContractEvaluationItemsService(xormEngine *xorm.Engine) *OilContractEvaluationItemsService {
+	s := new(OilContractEvaluationItemsService)
+	s.DBE = xormEngine
+	return s
+}

+ 16 - 0
src/dashoo.cn/backend/api/business/oilcontract/contractOffGrade/contractOffGrade.go

@@ -0,0 +1,16 @@
+package contractOffGrade
+
+import (
+	"time"
+)
+
+type OilContractOffGrade struct {
+	Id               int       `json:"Id" xorm:"not null pk autoincr comment('ID') INT(11) 'Id'"`
+	EvaluationItemId int       `json:"EvaluationItemId" xorm:"default 0 comment('合同表ID') INT(11) 'EvaluationItemId'"`
+	BadRecordId      int       `json:"BadRecordId" xorm:"not null default 0 comment('关联不良记录表ID') INT(11) 'BadRecordId'"`
+	Content          string    `json:"content" xorm:"comment('评价内容') VARCHAR(1000) 'content'"`
+	Remark           string    `json:"Remark" xorm:"comment('备注') VARCHAR(500) 'Remark'"`
+	ModifiedOn       time.Time `json:"ModifiedOn" xorm:"DATETIME 'ModifiedOn'"`
+	ModifiedUserId   int       `json:"ModifiedUserId" xorm:"INT(11) 'ModifiedUserId'"`
+	ModifiedBy       string    `json:"ModifiedBy" xorm:"VARCHAR(50) 'ModifiedBy'"`
+}

+ 16 - 0
src/dashoo.cn/backend/api/business/oilcontract/contractOffGrade/contractOffGradeService.go

@@ -0,0 +1,16 @@
+package contractOffGrade
+
+import (
+	. "dashoo.cn/backend/api/mydb"
+	"github.com/go-xorm/xorm"
+)
+
+type OilContractOffGradeService struct {
+	MyServiceBase
+}
+
+func GetOilContractOffGradeService(xormEngine *xorm.Engine) *OilContractOffGradeService {
+	s := new(OilContractOffGradeService)
+	s.DBE = xormEngine
+	return s
+}

+ 23 - 0
src/dashoo.cn/backend/api/business/oilcontract/evaluationItems/evaluationItems.go

@@ -0,0 +1,23 @@
+package evaluationItems
+
+import (
+	"time"
+)
+
+type OilEvaluationItems struct {
+	Id             int       `json:"Id" xorm:"not null pk autoincr comment('ID') INT(11) 'Id'"`
+	ParentId       int       `json:"ParentId" xorm:"not null default 0 comment('上级节点ID') INT(11) 'ParentId'"`
+	Type           string    `json:"Type" xorm:"default '1' comment('分类:1服务商、2供应商、3承包商') VARCHAR(5) 'Type'"`
+	SequenceNo     string    `json:"SequenceNo" xorm:"default '0' comment('序号') VARCHAR(50) 'SequenceNo'"`
+	Content        string    `json:"content" xorm:"comment('评价内容') VARCHAR(1000) 'content'"`
+	NormalScore    string    `json:"NormalScore" xorm:"comment('标准分值') DECIMAL(11,2) 'NormalScore'"`
+	LevelCode      int       `json:"LevelCode" xorm:"not null default 0 comment('级别') INT(11) 'LevelCode'"`
+	Remark         string    `json:"Remark" xorm:"comment('备注') VARCHAR(500) 'Remark'"`
+	IsDelete       int       `json:"IsDelete" xorm:"default 0 comment('删除状态,0正常,1已删除') INT(11) 'IsDelete'"`
+	CreateOn       time.Time `json:"CreateOn" xorm:"DATETIME 'CreateOn'"`
+	CreateUserId   int       `json:"CreateUserId" xorm:"INT(11) 'CreateUserId'"`
+	CreateBy       string    `json:"CreateBy" xorm:"VARCHAR(50) 'CreateBy'"`
+	ModifiedOn     time.Time `json:"ModifiedOn" xorm:"DATETIME 'ModifiedOn'"`
+	ModifiedUserId int       `json:"ModifiedUserId" xorm:"INT(11) 'ModifiedUserId'"`
+	ModifiedBy     string    `json:"ModifiedBy" xorm:"VARCHAR(50) 'ModifiedBy'"`
+}

+ 16 - 0
src/dashoo.cn/backend/api/business/oilcontract/evaluationItems/evaluationItemsService.go

@@ -0,0 +1,16 @@
+package evaluationItems
+
+import (
+	. "dashoo.cn/backend/api/mydb"
+	"github.com/go-xorm/xorm"
+)
+
+type OilEvaluationItemsService struct {
+	MyServiceBase
+}
+
+func GetOilEvaluationItemsService(xormEngine *xorm.Engine) *OilEvaluationItemsService {
+	s := new(OilEvaluationItemsService)
+	s.DBE = xormEngine
+	return s
+}

+ 4 - 0
src/dashoo.cn/backend/api/controllers/base.go

@@ -287,6 +287,10 @@ var (
 	ImportTechsrvDetailViewName              string = "import_techsrv_detail_view"    //技术服务
 	ImportTechsrvClassViewName               string = "import_techsrv_class_view"     //技术服务
 	ManufacturerName                         string = "Manufacturer"
+	OilContractName                          string = "OilContract"                //合同表
+	OilContractEvaluationItemsName           string = "OilContractEvaluationItems" //合同业绩评价项目
+	OilEvaluationItemsName                   string = "OilEvaluationItems"         //业绩评价项目
+	OilContractOffGradeName					 string = "OilContractOffGrade"        //业绩评价不合格原因
 )
 
 //分页信息及数据

+ 443 - 0
src/dashoo.cn/backend/api/controllers/oilcontract/contract.go

@@ -0,0 +1,443 @@
+package oilcontract
+
+import (
+	"encoding/json"
+	"strings"
+	"time"
+
+	"dashoo.cn/backend/api/business/baseUser"
+	//	"dashoo.cn/backend/api/business/items"
+	"dashoo.cn/backend/api/business/oilcontract/contract"
+	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/business2/userRole"
+	"dashoo.cn/utils"
+)
+
+type OilContractController struct {
+	BaseController
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []oilcontract.OilContract
+// @router /list [get]
+func (this *OilContractController) GetEntityList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	Id := this.GetString("Id")
+	SupplierId := this.GetString("SupplierId")
+	SupplierName := this.GetString("SupplierName")
+	ProjectName := this.GetString("ProjectName")
+	ContractNo := this.GetString("ContractNo")
+	ProjectPlace := this.GetString("ProjectPlace")
+	ProjectOwner := this.GetString("ProjectOwner")
+	Telephone := this.GetString("Telephone")
+	ProjectType := this.GetString("ProjectType")
+	ContractMode := this.GetString("ContractMode")
+	Amount := this.GetString("Amount")
+	ContractPeriod := this.GetString("ContractPeriod")
+	OpenDate := this.GetString("OpenDate")
+	PlanFinishDate := this.GetString("PlanFinishDate")
+	ConstructionUnit := this.GetString("ConstructionUnit")
+	ConstructionOwner := this.GetString("ConstructionOwner")
+	ConstructionTelphone := this.GetString("ConstructionTelphone")
+	BuildUnit := this.GetString("BuildUnit")
+	BuildOwner := this.GetString("BuildOwner")
+	BuildTelphone := this.GetString("BuildTelphone")
+	SuperviseUnit := this.GetString("SuperviseUnit")
+	SuperviseOwner := this.GetString("SuperviseOwner")
+	SuperviseTelphone := this.GetString("SuperviseTelphone")
+	QualityUnit := this.GetString("QualityUnit")
+	QualityOwner := this.GetString("QualityOwner")
+	QualityTelphone := this.GetString("QualityTelphone")
+	Remark := this.GetString("Remark")
+	IsDelete := this.GetString("IsDelete")
+	CreateOn := this.GetString("CreateOn")
+	CreateUserId := this.GetString("CreateUserId")
+	CreateBy := this.GetString("CreateBy")
+	ModifiedOn := this.GetString("ModifiedOn")
+	ModifiedUserId := this.GetString("ModifiedUserId")
+	ModifiedBy := this.GetString("ModifiedBy")
+
+	if Id != "" {
+		where = where + " and Id like '%" + Id + "%'"
+	}
+
+	if SupplierId != "" {
+		where = where + " and SupplierId like '%" + SupplierId + "%'"
+	}
+
+	if SupplierName != "" {
+		where = where + " and SupplierName like '%" + SupplierName + "%'"
+	}
+
+	if ProjectName != "" {
+		where = where + " and ProjectName like '%" + ProjectName + "%'"
+	}
+
+	if ContractNo != "" {
+		where = where + " and ContractNo like '%" + ContractNo + "%'"
+	}
+
+	if ProjectPlace != "" {
+		where = where + " and ProjectPlace like '%" + ProjectPlace + "%'"
+	}
+
+	if ProjectOwner != "" {
+		where = where + " and ProjectOwner like '%" + ProjectOwner + "%'"
+	}
+
+	if Telephone != "" {
+		where = where + " and Telephone like '%" + Telephone + "%'"
+	}
+
+	if ProjectType != "" {
+		where = where + " and ProjectType like '%" + ProjectType + "%'"
+	}
+
+	if ContractMode != "" {
+		where = where + " and ContractMode like '%" + ContractMode + "%'"
+	}
+
+	if Amount != "" {
+		where = where + " and Amount like '%" + Amount + "%'"
+	}
+
+	if ContractPeriod != "" {
+		where = where + " and ContractPeriod like '%" + ContractPeriod + "%'"
+	}
+
+	if OpenDate != "" {
+		where = where + " and OpenDate like '%" + OpenDate + "%'"
+	}
+
+	if PlanFinishDate != "" {
+		where = where + " and PlanFinishDate like '%" + PlanFinishDate + "%'"
+	}
+
+	if ConstructionUnit != "" {
+		where = where + " and ConstructionUnit like '%" + ConstructionUnit + "%'"
+	}
+
+	if ConstructionOwner != "" {
+		where = where + " and ConstructionOwner like '%" + ConstructionOwner + "%'"
+	}
+
+	if ConstructionTelphone != "" {
+		where = where + " and ConstructionTelphone like '%" + ConstructionTelphone + "%'"
+	}
+
+	if BuildUnit != "" {
+		where = where + " and BuildUnit like '%" + BuildUnit + "%'"
+	}
+
+	if BuildOwner != "" {
+		where = where + " and BuildOwner like '%" + BuildOwner + "%'"
+	}
+
+	if BuildTelphone != "" {
+		where = where + " and BuildTelphone like '%" + BuildTelphone + "%'"
+	}
+
+	if SuperviseUnit != "" {
+		where = where + " and SuperviseUnit like '%" + SuperviseUnit + "%'"
+	}
+
+	if SuperviseOwner != "" {
+		where = where + " and SuperviseOwner like '%" + SuperviseOwner + "%'"
+	}
+
+	if SuperviseTelphone != "" {
+		where = where + " and SuperviseTelphone like '%" + SuperviseTelphone + "%'"
+	}
+
+	if QualityUnit != "" {
+		where = where + " and QualityUnit like '%" + QualityUnit + "%'"
+	}
+
+	if QualityOwner != "" {
+		where = where + " and QualityOwner like '%" + QualityOwner + "%'"
+	}
+
+	if QualityTelphone != "" {
+		where = where + " and QualityTelphone like '%" + QualityTelphone + "%'"
+	}
+
+	if Remark != "" {
+		where = where + " and Remark like '%" + Remark + "%'"
+	}
+
+	if IsDelete != "" {
+		where = where + " and IsDelete like '%" + IsDelete + "%'"
+	}
+
+	if CreateOn != "" {
+		where = where + " and CreateOn like '%" + CreateOn + "%'"
+	}
+
+	if CreateUserId != "" {
+		where = where + " and CreateUserId like '%" + CreateUserId + "%'"
+	}
+
+	if CreateBy != "" {
+		where = where + " and CreateBy like '%" + CreateBy + "%'"
+	}
+
+	if ModifiedOn != "" {
+		where = where + " and ModifiedOn like '%" + ModifiedOn + "%'"
+	}
+
+	if ModifiedUserId != "" {
+		where = where + " and ModifiedUserId like '%" + ModifiedUserId + "%'"
+	}
+
+	if ModifiedBy != "" {
+		where = where + " and ModifiedBy like '%" + ModifiedBy + "%'"
+	}
+
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+		}
+	}
+
+	svc := contract.GetOilContractService(utils.DBE)
+	var list []contract.OilContract
+	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取字典列表
+// @Description get user by token
+// @Success 200 {object} map[string]interface{}
+// @router /dictlist [get]
+func (this *OilContractController) GetDictList() {
+	dictList := make(map[string]interface{})
+	//dictSvc := items.GetItemsService(utils.DBE)
+	userSvc := baseUser.GetBaseUserService(utils.DBE)
+	//customerSvc := svccustomer.GetCustomerService(utils.DBE)
+	//dictList["WellNo"] = dictSvc.GetKeyValueItems("WellNo", "")
+	var userEntity userRole.Base_User
+	userSvc.GetEntityById(this.User.Id, &userEntity)
+	dictList["Supervisers"] = userSvc.GetUserListByDepartmentId("", userEntity.Departmentid)
+
+	//var dictCustomer []svccustomer.Customer
+	//customerSvc.GetEntitysByWhere("" + CustomerName, "", &dictCustomer)
+	//dictList["EntrustCorp"] = &dictCustomer
+
+	var datainfo DataInfo
+	datainfo.Items = dictList
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} oilcontract.OilContract
+// @router /get/:id [get]
+func (this *OilContractController) GetEntity() {
+	Id := this.Ctx.Input.Param(":id")
+
+	var model contract.OilContract
+	svc := contract.GetOilContractService(utils.DBE)
+	svc.GetEntityByIdBytbl(OilContractName, Id, &model)
+
+	this.Data["json"] = &model
+	this.ServeJSON()
+}
+
+// @Title 添加
+// @Description 新增
+// @Param 	body body oilcontract.OilContract
+// @Success	200	{object} controllers.Request
+// @router /add [post]
+func (this *OilContractController) AddEntity() {
+	var model contract.OilContract
+	var jsonBlob = this.Ctx.Input.RequestBody
+	svc := contract.GetOilContractService(utils.DBE)
+
+	json.Unmarshal(jsonBlob, &model)
+	model.CreateOn = time.Now()
+	model.CreateBy = this.User.Realname
+	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+
+	_, err := svc.InsertEntityBytbl(OilContractName, &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 	body body oilcontract.OilContract
+// @Success	200	{object} controllers.Request
+// @router /update/:id [post]
+func (this *OilContractController) UpdateEntity() {
+	id := this.Ctx.Input.Param(":id")
+	var errinfo ErrorInfo
+	if id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+
+	var model contract.OilContract
+	svc := contract.GetOilContractService(utils.DBE)
+
+	var jsonBlob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonBlob, &model)
+	model.ModifiedOn = time.Now()
+	model.ModifiedBy = this.User.Realname
+	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
+
+	cols := []string{
+
+		"Id",
+
+		"SupplierId",
+
+		"SupplierName",
+
+		"ProjectName",
+
+		"ContractNo",
+
+		"ProjectPlace",
+
+		"ProjectOwner",
+
+		"Telephone",
+
+		"ProjectType",
+
+		"ContractMode",
+
+		"Amount",
+
+		"ContractPeriod",
+
+		"OpenDate",
+
+		"PlanFinishDate",
+
+		"ConstructionUnit",
+
+		"ConstructionOwner",
+
+		"ConstructionTelphone",
+
+		"BuildUnit",
+
+		"BuildOwner",
+
+		"BuildTelphone",
+
+		"SuperviseUnit",
+
+		"SuperviseOwner",
+
+		"SuperviseTelphone",
+
+		"QualityUnit",
+
+		"QualityOwner",
+
+		"QualityTelphone",
+
+		"Remark",
+
+		"IsDelete",
+
+		"CreateOn",
+
+		"CreateUserId",
+
+		"CreateBy",
+
+		"ModifiedOn",
+
+		"ModifiedUserId",
+
+		"ModifiedBy",
+	}
+	err := svc.UpdateEntityBytbl(OilContractName, id, &model, cols)
+	if err == nil {
+		errinfo.Message = "修改成功!"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "修改失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+// @Title 删除单条信息
+// @Description
+// @Success 200 {object} ErrorInfo
+// @Failure 403 :id 为空
+// @router /delete/:Id [delete]
+func (this *OilContractController) DeleteEntity() {
+	Id := this.Ctx.Input.Param(":Id")
+	var errinfo ErrorInfo
+	if Id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	var model contract.OilContract
+	var entityempty contract.OilContract
+	svc := contract.GetOilContractService(utils.DBE)
+	opdesc := "删除-" + Id
+	err := svc.DeleteOperationAndWriteLogBytbl(OilContractName, BaseOperationLogName, Id, &model, &entityempty, utils.ToStr(this.User.Id), this.User.Username, opdesc, "", "钻井日报")
+	if err == nil {
+		errinfo.Message = "删除成功"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "删除失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}

+ 276 - 0
src/dashoo.cn/backend/api/controllers/oilcontract/contractEvaluationItems.go

@@ -0,0 +1,276 @@
+package oilcontract
+
+import (
+	"encoding/json"
+	"time"
+
+	"dashoo.cn/backend/api/business/baseUser"
+	//	"dashoo.cn/backend/api/business/items"
+	"dashoo.cn/backend/api/business/oilcontract/contractEvaluationItems"
+	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/business2/userRole"
+	"dashoo.cn/utils"
+)
+
+type OilContractEvaluationItemsController struct {
+	BaseController
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []contractEvaluationItems.OilContractEvaluationItems
+// @router /list [get]
+func (this *OilContractEvaluationItemsController) GetEntityList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	Id := this.GetString("Id")
+	ContractId := this.GetString("ContractId")
+	ParentId := this.GetString("ParentId")
+	SequenceNo := this.GetString("SequenceNo")
+	Content := this.GetString("Content")
+	NormalScore := this.GetString("NormalScore")
+	Score := this.GetString("Score")
+	LevelCode := this.GetString("LevelCode")
+	Remark := this.GetString("Remark")
+	ModifiedOn := this.GetString("ModifiedOn")
+	ModifiedUserId := this.GetString("ModifiedUserId")
+	ModifiedBy := this.GetString("ModifiedBy")
+
+	if Id != "" {
+		where = where + " and Id like '%" + Id + "%'"
+	}
+
+	if ContractId != "" {
+		where = where + " and ContractId like '%" + ContractId + "%'"
+	}
+
+	if ParentId != "" {
+		where = where + " and ParentId like '%" + ParentId + "%'"
+	}
+
+	if SequenceNo != "" {
+		where = where + " and SequenceNo like '%" + SequenceNo + "%'"
+	}
+
+	if Content != "" {
+		where = where + " and Content like '%" + Content + "%'"
+	}
+
+	if NormalScore != "" {
+		where = where + " and NormalScore like '%" + NormalScore + "%'"
+	}
+
+	if Score != "" {
+		where = where + " and Score like '%" + Score + "%'"
+	}
+
+	if LevelCode != "" {
+		where = where + " and LevelCode like '%" + LevelCode + "%'"
+	}
+
+	if Remark != "" {
+		where = where + " and Remark like '%" + Remark + "%'"
+	}
+
+	if ModifiedOn != "" {
+		where = where + " and ModifiedOn like '%" + ModifiedOn + "%'"
+	}
+
+	if ModifiedUserId != "" {
+		where = where + " and ModifiedUserId like '%" + ModifiedUserId + "%'"
+	}
+
+	if ModifiedBy != "" {
+		where = where + " and ModifiedBy like '%" + ModifiedBy + "%'"
+	}
+
+	svc := contractEvaluationItems.GetOilContractEvaluationItemsService(utils.DBE)
+	var list []contractEvaluationItems.OilContractEvaluationItems
+	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取字典列表
+// @Description get user by token
+// @Success 200 {object} map[string]interface{}
+// @router /dictlist [get]
+func (this *OilContractEvaluationItemsController) GetDictList() {
+	dictList := make(map[string]interface{})
+	//dictSvc := items.GetItemsService(utils.DBE)
+	userSvc := baseUser.GetBaseUserService(utils.DBE)
+	//customerSvc := svccustomer.GetCustomerService(utils.DBE)
+	//dictList["WellNo"] = dictSvc.GetKeyValueItems("WellNo", "")
+	var userEntity userRole.Base_User
+	userSvc.GetEntityById(this.User.Id, &userEntity)
+	dictList["Supervisers"] = userSvc.GetUserListByDepartmentId("", userEntity.Departmentid)
+
+	//var dictCustomer []svccustomer.Customer
+	//customerSvc.GetEntitysByWhere("" + CustomerName, "", &dictCustomer)
+	//dictList["EntrustCorp"] = &dictCustomer
+
+	var datainfo DataInfo
+	datainfo.Items = dictList
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} contractEvaluationItems.OilContractEvaluationItems
+// @router /get/:id [get]
+func (this *OilContractEvaluationItemsController) GetEntity() {
+	Id := this.Ctx.Input.Param(":id")
+
+	var model contractEvaluationItems.OilContractEvaluationItems
+	svc := contractEvaluationItems.GetOilContractEvaluationItemsService(utils.DBE)
+	svc.GetEntityByIdBytbl(OilContractEvaluationItemsName, Id, &model)
+
+	this.Data["json"] = &model
+	this.ServeJSON()
+}
+
+// @Title 添加
+// @Description 新增
+// @Param 	body body contractEvaluationItems.OilContractEvaluationItems
+// @Success	200	{object} controllers.Request
+// @router /add [post]
+func (this *OilContractEvaluationItemsController) AddEntity() {
+	var model contractEvaluationItems.OilContractEvaluationItems
+	var jsonBlob = this.Ctx.Input.RequestBody
+	svc := contractEvaluationItems.GetOilContractEvaluationItemsService(utils.DBE)
+
+	json.Unmarshal(jsonBlob, &model)
+
+	_, err := svc.InsertEntityBytbl(OilContractEvaluationItemsName, &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 	body body contractEvaluationItems.OilContractEvaluationItems
+// @Success	200	{object} controllers.Request
+// @router /update/:id [post]
+func (this *OilContractEvaluationItemsController) UpdateEntity() {
+	id := this.Ctx.Input.Param(":id")
+	var errinfo ErrorInfo
+	if id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+
+	var model contractEvaluationItems.OilContractEvaluationItems
+	svc := contractEvaluationItems.GetOilContractEvaluationItemsService(utils.DBE)
+
+	var jsonBlob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonBlob, &model)
+	model.ModifiedOn = time.Now()
+	model.ModifiedBy = this.User.Realname
+	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
+
+	cols := []string{
+
+		"Id",
+
+		"ContractId",
+
+		"ParentId",
+
+		"SequenceNo",
+
+		"Content",
+
+		"NormalScore",
+
+		"Score",
+
+		"LevelCode",
+
+		"Remark",
+
+		"ModifiedOn",
+
+		"ModifiedUserId",
+
+		"ModifiedBy",
+	}
+	err := svc.UpdateEntityBytbl(OilContractEvaluationItemsName, id, &model, cols)
+	if err == nil {
+		errinfo.Message = "修改成功!"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "修改失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+// @Title 删除单条信息
+// @Description
+// @Success 200 {object} ErrorInfo
+// @Failure 403 :id 为空
+// @router /delete/:Id [delete]
+func (this *OilContractEvaluationItemsController) DeleteEntity() {
+	Id := this.Ctx.Input.Param(":Id")
+	var errinfo ErrorInfo
+	if Id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	var model contractEvaluationItems.OilContractEvaluationItems
+	var entityempty contractEvaluationItems.OilContractEvaluationItems
+	svc := contractEvaluationItems.GetOilContractEvaluationItemsService(utils.DBE)
+	opdesc := "删除-" + Id
+	err := svc.DeleteOperationAndWriteLogBytbl(OilContractEvaluationItemsName, BaseOperationLogName, Id, &model, &entityempty, utils.ToStr(this.User.Id), this.User.Username, opdesc, "", "钻井日报")
+	if err == nil {
+		errinfo.Message = "删除成功"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "删除失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}

+ 248 - 0
src/dashoo.cn/backend/api/controllers/oilcontract/contractOffGrade.go

@@ -0,0 +1,248 @@
+package oilcontract
+
+import (
+	"encoding/json"
+	"time"
+
+	"dashoo.cn/backend/api/business/baseUser"
+	//	"dashoo.cn/backend/api/business/items"
+	"dashoo.cn/backend/api/business/oilcontract/contractOffGrade"
+	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/business2/userRole"
+	"dashoo.cn/utils"
+)
+
+type OilContractOffGradeController struct {
+	BaseController
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []contractOffGrade.OilContractOffGrade
+// @router /list [get]
+func (this *OilContractOffGradeController) GetEntityList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	Id := this.GetString("Id")
+	EvaluationItemId := this.GetString("EvaluationItemId")
+	BadRecordId := this.GetString("BadRecordId")
+	Content := this.GetString("Content")
+	Remark := this.GetString("Remark")
+	ModifiedOn := this.GetString("ModifiedOn")
+	ModifiedUserId := this.GetString("ModifiedUserId")
+	ModifiedBy := this.GetString("ModifiedBy")
+
+	if Id != "" {
+		where = where + " and Id like '%" + Id + "%'"
+	}
+
+	if EvaluationItemId != "" {
+		where = where + " and EvaluationItemId like '%" + EvaluationItemId + "%'"
+	}
+
+	if BadRecordId != "" {
+		where = where + " and BadRecordId like '%" + BadRecordId + "%'"
+	}
+
+	if Content != "" {
+		where = where + " and Content like '%" + Content + "%'"
+	}
+
+	if Remark != "" {
+		where = where + " and Remark like '%" + Remark + "%'"
+	}
+
+	if ModifiedOn != "" {
+		where = where + " and ModifiedOn like '%" + ModifiedOn + "%'"
+	}
+
+	if ModifiedUserId != "" {
+		where = where + " and ModifiedUserId like '%" + ModifiedUserId + "%'"
+	}
+
+	if ModifiedBy != "" {
+		where = where + " and ModifiedBy like '%" + ModifiedBy + "%'"
+	}
+
+	svc := contractOffGrade.GetOilContractOffGradeService(utils.DBE)
+	var list []contractOffGrade.OilContractOffGrade
+	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取字典列表
+// @Description get user by token
+// @Success 200 {object} map[string]interface{}
+// @router /dictlist [get]
+func (this *OilContractOffGradeController) GetDictList() {
+	dictList := make(map[string]interface{})
+	//dictSvc := items.GetItemsService(utils.DBE)
+	userSvc := baseUser.GetBaseUserService(utils.DBE)
+	//customerSvc := svccustomer.GetCustomerService(utils.DBE)
+	//dictList["WellNo"] = dictSvc.GetKeyValueItems("WellNo", "")
+	var userEntity userRole.Base_User
+	userSvc.GetEntityById(this.User.Id, &userEntity)
+	dictList["Supervisers"] = userSvc.GetUserListByDepartmentId("", userEntity.Departmentid)
+
+	//var dictCustomer []svccustomer.Customer
+	//customerSvc.GetEntitysByWhere("" + CustomerName, "", &dictCustomer)
+	//dictList["EntrustCorp"] = &dictCustomer
+
+	var datainfo DataInfo
+	datainfo.Items = dictList
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} contractOffGrade.OilContractOffGrade
+// @router /get/:id [get]
+func (this *OilContractOffGradeController) GetEntity() {
+	Id := this.Ctx.Input.Param(":id")
+
+	var model contractOffGrade.OilContractOffGrade
+	svc := contractOffGrade.GetOilContractOffGradeService(utils.DBE)
+	svc.GetEntityByIdBytbl(OilContractOffGradeName, Id, &model)
+
+	this.Data["json"] = &model
+	this.ServeJSON()
+}
+
+// @Title 添加
+// @Description 新增
+// @Param 	body body contractOffGrade.OilContractOffGrade
+// @Success	200	{object} controllers.Request
+// @router /add [post]
+func (this *OilContractOffGradeController) AddEntity() {
+	var model contractOffGrade.OilContractOffGrade
+	var jsonBlob = this.Ctx.Input.RequestBody
+	svc := contractOffGrade.GetOilContractOffGradeService(utils.DBE)
+
+	json.Unmarshal(jsonBlob, &model)
+
+	_, err := svc.InsertEntityBytbl(OilContractOffGradeName, &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 	body body contractOffGrade.OilContractOffGrade
+// @Success	200	{object} controllers.Request
+// @router /update/:id [post]
+func (this *OilContractOffGradeController) UpdateEntity() {
+	id := this.Ctx.Input.Param(":id")
+	var errinfo ErrorInfo
+	if id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+
+	var model contractOffGrade.OilContractOffGrade
+	svc := contractOffGrade.GetOilContractOffGradeService(utils.DBE)
+
+	var jsonBlob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonBlob, &model)
+	model.ModifiedOn = time.Now()
+	model.ModifiedBy = this.User.Realname
+	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
+
+	cols := []string{
+
+		"Id",
+
+		"EvaluationItemId",
+
+		"BadRecordId",
+
+		"Content",
+
+		"Remark",
+
+		"ModifiedOn",
+
+		"ModifiedUserId",
+
+		"ModifiedBy",
+	}
+	err := svc.UpdateEntityBytbl(OilContractOffGradeName, id, &model, cols)
+	if err == nil {
+		errinfo.Message = "修改成功!"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "修改失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+// @Title 删除单条信息
+// @Description
+// @Success 200 {object} ErrorInfo
+// @Failure 403 :id 为空
+// @router /delete/:Id [delete]
+func (this *OilContractOffGradeController) DeleteEntity() {
+	Id := this.Ctx.Input.Param(":Id")
+	var errinfo ErrorInfo
+	if Id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	var model contractOffGrade.OilContractOffGrade
+	var entityempty contractOffGrade.OilContractOffGrade
+	svc := contractOffGrade.GetOilContractOffGradeService(utils.DBE)
+	opdesc := "删除-" + Id
+	err := svc.DeleteOperationAndWriteLogBytbl(OilContractOffGradeName, BaseOperationLogName, Id, &model, &entityempty, utils.ToStr(this.User.Id), this.User.Username, opdesc, "", "钻井日报")
+	if err == nil {
+		errinfo.Message = "删除成功"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "删除失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}

+ 310 - 0
src/dashoo.cn/backend/api/controllers/oilcontract/evaluationItems.go

@@ -0,0 +1,310 @@
+package oilcontract
+
+import (
+	"encoding/json"
+	"strings"
+	"time"
+
+	"dashoo.cn/backend/api/business/baseUser"
+	//	"dashoo.cn/backend/api/business/items"
+	"dashoo.cn/backend/api/business/oilcontract/evaluationItems"
+	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/business2/userRole"
+	"dashoo.cn/utils"
+)
+
+type OilEvaluationItemsController struct {
+	BaseController
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []evaluationItems.OilEvaluationItems
+// @router /list [get]
+func (this *OilEvaluationItemsController) GetEntityList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	Id := this.GetString("Id")
+	ParentId := this.GetString("ParentId")
+	Type := this.GetString("Type")
+	SequenceNo := this.GetString("SequenceNo")
+	Content := this.GetString("Content")
+	NormalScore := this.GetString("NormalScore")
+	LevelCode := this.GetString("LevelCode")
+	Remark := this.GetString("Remark")
+	IsDelete := this.GetString("IsDelete")
+	CreateOn := this.GetString("CreateOn")
+	CreateUserId := this.GetString("CreateUserId")
+	CreateBy := this.GetString("CreateBy")
+	ModifiedOn := this.GetString("ModifiedOn")
+	ModifiedUserId := this.GetString("ModifiedUserId")
+	ModifiedBy := this.GetString("ModifiedBy")
+
+	if Id != "" {
+		where = where + " and Id like '%" + Id + "%'"
+	}
+
+	if ParentId != "" {
+		where = where + " and ParentId like '%" + ParentId + "%'"
+	}
+
+	if Type != "" {
+		where = where + " and Type like '%" + Type + "%'"
+	}
+
+	if SequenceNo != "" {
+		where = where + " and SequenceNo like '%" + SequenceNo + "%'"
+	}
+
+	if Content != "" {
+		where = where + " and Content like '%" + Content + "%'"
+	}
+
+	if NormalScore != "" {
+		where = where + " and NormalScore like '%" + NormalScore + "%'"
+	}
+
+	if LevelCode != "" {
+		where = where + " and LevelCode like '%" + LevelCode + "%'"
+	}
+
+	if Remark != "" {
+		where = where + " and Remark like '%" + Remark + "%'"
+	}
+
+	if IsDelete != "" {
+		where = where + " and IsDelete like '%" + IsDelete + "%'"
+	}
+
+	if CreateOn != "" {
+		where = where + " and CreateOn like '%" + CreateOn + "%'"
+	}
+
+	if CreateUserId != "" {
+		where = where + " and CreateUserId like '%" + CreateUserId + "%'"
+	}
+
+	if CreateBy != "" {
+		where = where + " and CreateBy like '%" + CreateBy + "%'"
+	}
+
+	if ModifiedOn != "" {
+		where = where + " and ModifiedOn like '%" + ModifiedOn + "%'"
+	}
+
+	if ModifiedUserId != "" {
+		where = where + " and ModifiedUserId like '%" + ModifiedUserId + "%'"
+	}
+
+	if ModifiedBy != "" {
+		where = where + " and ModifiedBy like '%" + ModifiedBy + "%'"
+	}
+
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+		}
+	}
+
+	svc := evaluationItems.GetOilEvaluationItemsService(utils.DBE)
+	var list []evaluationItems.OilEvaluationItems
+	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &list, where)
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取字典列表
+// @Description get user by token
+// @Success 200 {object} map[string]interface{}
+// @router /dictlist [get]
+func (this *OilEvaluationItemsController) GetDictList() {
+	dictList := make(map[string]interface{})
+	//dictSvc := items.GetItemsService(utils.DBE)
+	userSvc := baseUser.GetBaseUserService(utils.DBE)
+	//customerSvc := svccustomer.GetCustomerService(utils.DBE)
+	//dictList["WellNo"] = dictSvc.GetKeyValueItems("WellNo", "")
+	var userEntity userRole.Base_User
+	userSvc.GetEntityById(this.User.Id, &userEntity)
+	dictList["Supervisers"] = userSvc.GetUserListByDepartmentId("", userEntity.Departmentid)
+
+	//var dictCustomer []svccustomer.Customer
+	//customerSvc.GetEntitysByWhere("" + CustomerName, "", &dictCustomer)
+	//dictList["EntrustCorp"] = &dictCustomer
+
+	var datainfo DataInfo
+	datainfo.Items = dictList
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} evaluationItems.OilEvaluationItems
+// @router /get/:id [get]
+func (this *OilEvaluationItemsController) GetEntity() {
+	Id := this.Ctx.Input.Param(":id")
+
+	var model evaluationItems.OilEvaluationItems
+	svc := evaluationItems.GetOilEvaluationItemsService(utils.DBE)
+	svc.GetEntityByIdBytbl(OilEvaluationItemsName, Id, &model)
+
+	this.Data["json"] = &model
+	this.ServeJSON()
+}
+
+// @Title 添加
+// @Description 新增
+// @Param 	body body evaluationItems.OilEvaluationItems
+// @Success	200	{object} controllers.Request
+// @router /add [post]
+func (this *OilEvaluationItemsController) AddEntity() {
+	var model evaluationItems.OilEvaluationItems
+	var jsonBlob = this.Ctx.Input.RequestBody
+	svc := evaluationItems.GetOilEvaluationItemsService(utils.DBE)
+
+	json.Unmarshal(jsonBlob, &model)
+	model.CreateOn = time.Now()
+	model.CreateBy = this.User.Realname
+	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+
+	_, err := svc.InsertEntityBytbl(OilEvaluationItemsName, &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 	body body evaluationItems.OilEvaluationItems
+// @Success	200	{object} controllers.Request
+// @router /update/:id [post]
+func (this *OilEvaluationItemsController) UpdateEntity() {
+	id := this.Ctx.Input.Param(":id")
+	var errinfo ErrorInfo
+	if id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+
+	var model evaluationItems.OilEvaluationItems
+	svc := evaluationItems.GetOilEvaluationItemsService(utils.DBE)
+
+	var jsonBlob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonBlob, &model)
+	model.ModifiedOn = time.Now()
+	model.ModifiedBy = this.User.Realname
+	model.ModifiedUserId, _ = utils.StrTo(this.User.Id).Int()
+
+	cols := []string{
+
+		"Id",
+
+		"ParentId",
+
+		"Type",
+
+		"SequenceNo",
+
+		"Content",
+
+		"NormalScore",
+
+		"LevelCode",
+
+		"Remark",
+
+		"IsDelete",
+
+		"CreateOn",
+
+		"CreateUserId",
+
+		"CreateBy",
+
+		"ModifiedOn",
+
+		"ModifiedUserId",
+
+		"ModifiedBy",
+	}
+	err := svc.UpdateEntityBytbl(OilEvaluationItemsName, id, &model, cols)
+	if err == nil {
+		errinfo.Message = "修改成功!"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "修改失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+// @Title 删除单条信息
+// @Description
+// @Success 200 {object} ErrorInfo
+// @Failure 403 :id 为空
+// @router /delete/:Id [delete]
+func (this *OilEvaluationItemsController) DeleteEntity() {
+	Id := this.Ctx.Input.Param(":Id")
+	var errinfo ErrorInfo
+	if Id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+	var model evaluationItems.OilEvaluationItems
+	var entityempty evaluationItems.OilEvaluationItems
+	svc := evaluationItems.GetOilEvaluationItemsService(utils.DBE)
+	opdesc := "删除-" + Id
+	err := svc.DeleteOperationAndWriteLogBytbl(OilEvaluationItemsName, BaseOperationLogName, Id, &model, &entityempty, utils.ToStr(this.User.Id), this.User.Username, opdesc, "", "钻井日报")
+	if err == nil {
+		errinfo.Message = "删除成功"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "删除失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}

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

@@ -8,6 +8,7 @@ import (
 	"dashoo.cn/backend/api/controllers/bankapi"
 	"dashoo.cn/backend/api/controllers/casbin"
 	"dashoo.cn/backend/api/controllers/document"
+	"dashoo.cn/backend/api/controllers/oilcontract"
 	"dashoo.cn/backend/api/controllers/oilsupplier"
 	"dashoo.cn/backend/api/controllers/register"
 	"dashoo.cn/backend/api/controllers/rtx"
@@ -458,6 +459,30 @@ func init() {
 				&oilsupplier.ManufacturerController{},
 			),
 		),
+		//合同列表
+		beego.NSNamespace("/contract",
+			beego.NSInclude(
+				&oilcontract.OilContractController{},
+			),
+		),
+		//合同评价项目列表
+		beego.NSNamespace("/contract-evaluation-items",
+			beego.NSInclude(
+				&oilcontract.OilContractEvaluationItemsController{},
+			),
+		),
+		//合同不合格原因列表
+		beego.NSNamespace("/contract-off-grade",
+			beego.NSInclude(
+				&oilcontract.OilContractOffGradeController{},
+			),
+		),
+		//合同评价项目维护列表
+		beego.NSNamespace("/evaluation-items",
+			beego.NSInclude(
+				&oilcontract.OilEvaluationItemsController{},
+			),
+		),
 	)
 	beego.AddNamespace(ns)
 }

+ 41 - 0
src/dashoo.cn/frontend_web/src/api/oilcontract/contract.js

@@ -0,0 +1,41 @@
+export default {
+  getList(CreateOn, params, myAxios) {
+    return myAxios({
+      url: '/contract/list?CreateOn='+ CreateOn,
+      method: 'GET',
+      params: params
+    });
+  },
+  getDictList(myAxios) {
+    return myAxios({
+      url: '/contract/dictlist/',
+      method: 'GET'
+    });
+  },
+  getEntity(entityId, myAxios) {
+    return myAxios({
+      url: '/contract/get/'+entityId,
+      method: 'GET',
+    })
+  },
+  addEntity(formData, myAxios) {
+    return myAxios({
+      url: '/contract/add',
+      method: 'post',
+      data: formData
+    })
+  },
+  updateEntity(entityId, formData, myAxios) {
+    return myAxios({
+      url: '/contract/update/'+entityId,
+      method: 'post',
+      data: formData
+    })
+  },
+  deleteEntity(entityId, myAxios) {
+    return myAxios({
+      url: '/contract/delete/'+entityId,
+      method: 'delete'
+    })
+  },
+}

+ 419 - 0
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract/_opera/operation.vue

@@ -0,0 +1,419 @@
+
+
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/oilcontract' }">合同表</el-breadcrumb-item>
+      <el-breadcrumb-item>编辑</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card" style="mini-height: calc(100vh - 113px);">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 编辑
+        </span>
+        <span style="float: right;">
+          <el-button type="primary" size="mini" @click="saveEntity">保存</el-button>
+          <router-link :to="'/oilcontract/contract'">
+            <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
+          </router-link>
+        </span>
+      </div>
+      <el-form label-width="110px" ref="EntityForm" :model="formData">
+        <el-row>
+          <!--<el-col :span="8">
+            <el-form-item label="DEMO">
+              <el-select ref="selectWellNo" v-model="formData.WellNoId" filterable placeholder="请选择" style="width: 100%">
+                <el-option
+                  v-for="item in wellNoOptions"
+                  :key="item.Id"
+                  :label="item.Value"
+                  :value="item.Id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>-->
+
+          <!-- <el-col :span="8">
+            <el-form-item label="">
+              <el-input v-model="formData.Id" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col> -->
+
+          <el-col :span="8">
+            <el-form-item label="企业名称">
+              <el-select ref="SupplierSelect" v-model="formData.SupplierId" placeholder="请选择" style="width: 100%" @change="supplierChangeHandler">
+                <el-option key="1" label="天津油气公司" value="1"></el-option>
+                <el-option key="2" label="北京管道公司" value="2"></el-option>
+                <el-option key="3" label="上海监控公司" value="3"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="合同分类">
+              <el-select placeholder="请选择" style="width: 100%">
+                <el-option key="1" label="服务商" value="1"></el-option>
+                <el-option key="2" label="承包商" value="2"></el-option>
+                <el-option key="3" label="供应商" value="3"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="项目名称">
+              <el-input v-model="formData.ProjectName" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="合同编号">
+              <el-input v-model="formData.ContractNo" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="工程地点">
+              <el-input v-model="formData.ProjectPlace" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="项目负责人">
+              <el-input v-model="formData.ProjectOwner" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="联系人电话">
+              <el-input v-model="formData.Telephone" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="项目类别">
+              <el-select v-model="formData.ProjectType" placeholder="请选择" style="width: 100%">
+                <el-option key="1" label="咨询" value="1"></el-option>
+                <el-option key="2" label="勘探" value="2"></el-option>
+                <el-option key="3" label="设计" value="3"></el-option>
+                <el-option key="4" label="施工" value="4"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="合同模式">
+              <el-input v-model="formData.ContractMode" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="是否分包">
+              <el-select placeholder="请选择" style="width: 100%">
+                <el-option key="1" label="是" value="1"></el-option>
+                <el-option key="2" label="否" value="2"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="合同总金额">
+              <el-input v-model="formData.Amount" placeholder="请输入"  style="width: 100%">
+                <template slot="append">(万元)</template>
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="合同总工期">
+              <el-input v-model="formData.ContractPeriod" placeholder="请输入"  style="width: 100%">
+                <template slot="append">(天)</template>
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="开工日期">
+              <el-input v-model="formData.OpenDate" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="计划竣工时间">
+              <el-input v-model="formData.PlanFinishDate" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="建设单位">
+              <el-input v-model="formData.ConstructionUnit" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="建设负责人">
+              <el-input v-model="formData.ConstructionOwner" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="手机号">
+              <el-input v-model="formData.ConstructionTelphone" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="施工单位">
+              <el-input v-model="formData.BuildUnit" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="施工负责人">
+              <el-input v-model="formData.BuildOwner" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="手机号">
+              <el-input v-model="formData.BuildTelphone" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="监理单位">
+              <el-input v-model="formData.SuperviseUnit" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="监理负责人">
+              <el-input v-model="formData.SuperviseOwner" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="手机号">
+              <el-input v-model="formData.SuperviseTelphone" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="质量监督单位">
+              <el-input v-model="formData.QualityUnit" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="质量监督负责人">
+              <el-input v-model="formData.QualityOwner" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="8">
+            <el-form-item label="手机号">
+              <el-input v-model="formData.QualityTelphone" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="24">
+            <el-form-item label="备注">
+              <el-input type="textarea" v-model="formData.Remark" placeholder="请输入"  style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </el-card>
+  </div>
+</template>
+
+<script>
+  import {
+    mapGetters
+  } from 'vuex'
+  import api from '@/api/oilcontract/contract';
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'oilcontractEdit',
+
+    data() {
+      return {
+        serviceId: '',
+        formData: {
+          Id: '',
+          SupplierId: '1',
+          SupplierName: '',
+          ProjectName: '',
+          ContractNo: '',
+          ProjectPlace: '',
+          ProjectOwner: '',
+          Telephone: '',
+          ProjectType: '1',
+          ContractMode: '',
+          Amount: '',
+          ContractPeriod: '',
+          OpenDate: '',
+          PlanFinishDate: '',
+          ConstructionUnit: '',
+          ConstructionOwner: '',
+          ConstructionTelphone: '',
+          BuildUnit: '',
+          BuildOwner: '',
+          BuildTelphone: '',
+          SuperviseUnit: '',
+          SuperviseOwner: '',
+          SuperviseTelphone: '',
+          QualityUnit: '',
+          QualityOwner: '',
+          QualityTelphone: '',
+          Remark: '',
+          IsDelete: '',
+          CreateOn: '',
+          CreateUserId: '',
+          CreateBy: '',
+          ModifiedOn: '',
+          ModifiedUserId: '',
+          ModifiedBy: '',
+
+        },
+
+        //下拉选择项
+        //wellNoOptions: [],
+        //supervisersOptions: [],
+
+      }
+    },
+    created() {
+      this.serviceId = this.$route.params.opera;
+      this.getDictOptions();
+      console.log(this.serviceId);
+      if(this.serviceId != 'add' && this.serviceId>0) {
+        this.formData.Id = this.serviceId;
+        this.initDatas();
+      } else {
+        this.formData.Id = 0;
+      }
+    },
+    methods: {
+      initDatas() {
+        if(this.formData.Id) {
+          api.getEntity(this.formData.Id, this.$axios).then(res => {
+            this.formData = res.data;
+          }).catch(err => {
+            console.error(err)
+          });
+        }
+      },
+
+      getDictOptions() {
+        api.getDictList(this.$axios).then(res => {
+          //this.wellNoOptions = res.data.items['WellNo']
+          //this.supervisersOptions = res.data.items['Supervisers']
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      //保存信息
+      saveEntity() {
+        this.$refs['EntityForm'].validate((valid) => {
+          if (valid) {
+            //this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
+
+            if (!this.formData.Id) {
+              this.addEntity();
+            } else {
+              this.updateEntity();
+            }
+
+          } else {
+            return false
+          }
+        })
+      },
+
+      addEntity() {
+        api.addEntity(this.formData, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            //保存成功后,初始化数据,变成修改
+            this.formData.Id = res.data.item;
+            this.initDatas();
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            });
+
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            });
+          }
+        }).catch(err => {
+          console.error(err)
+        });
+      },
+
+      updateEntity() {
+        api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            //保存成功后,初始化数据,变成修改
+            this.initDatas();
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            });
+
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            });
+          }
+        }).catch(err => {
+          console.error(err)
+        });
+      },
+
+      supplierChangeHandler() {
+        this.formData.SupplierName = this.$refs['SupplierSelect'].selectedLabel
+      },
+
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+
+      formatDateTime(date) {
+        var y = date.getFullYear();
+        var m = date.getMonth() + 1;
+        m = m < 10 ? ('0' + m) : m;
+        var d = date.getDate();
+        d = d < 10 ? ('0' + d) : d;
+        var h = date.getHours();
+        var minute = date.getMinutes();
+        minute = minute < 10 ? ('0' + minute) : minute;
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      }
+    }
+  }
+
+</script>
+
+<style lang="scss">
+
+</style>

+ 697 - 0
src/dashoo.cn/frontend_web/src/pages/oilcontract/contract/index.vue

@@ -0,0 +1,697 @@
+
+
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/oilcontract' }">合同表</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card" style="height: calc(100vh - 115px);">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 合同表
+        </span>
+        <span style="float: right;">
+          <router-link :to="'/oilcontract/contract/add/operation'">
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">添加</el-button>
+          </router-link>
+        </span>
+        <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+          <el-form-item label="上报时间">
+            <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
+                            start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
+          </el-form-item>
+
+          <el-form-item>
+            <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
+              查询
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="search">高级查询</el-dropdown-item>
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+        </el-form>
+      </div>
+      <el-table size="mini" :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby">
+        <el-table-column label="操作" min-width="100" align="center" fixed>
+          <template slot-scope="scope">
+            <router-link :to="'/oilsupplier/oilcontract/' + 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>
+              <br/>
+              <div style="text-align: right; margin: 0">
+                <el-button type="primary" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
+              </div>
+              <el-button slot="reference" type="text" title="删除" style="margin-left:3px" size="small" @click="scope.row.deleteConfirmFlag = true">
+                <i class="el-icon-delete"></i>
+              </el-button>
+            </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-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+                     :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
+      </el-pagination>
+    </el-card>
+
+    <el-dialog title="高级查询" :visible.sync="dialogVisible" width="720px">
+      <el-form ref="advancedsearchForm" label-width="110px">
+        <el-row>
+
+          <el-col :span="12">
+            <el-form-item label="生成时间">
+              <el-date-picker size="mini" v-model="CreateOn" type="daterange" style="width:100%" range-separator="至"
+                              start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="">
+              <el-input size="mini" v-model="searchForm.Id" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="供应商ID">
+              <el-input size="mini" v-model="searchForm.SupplierId" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="企业名称">
+              <el-input size="mini" v-model="searchForm.SupplierName" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="项目名称">
+              <el-input size="mini" v-model="searchForm.ProjectName" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="合同编号">
+              <el-input size="mini" v-model="searchForm.ContractNo" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="工程地点">
+              <el-input size="mini" v-model="searchForm.ProjectPlace" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="项目负责人">
+              <el-input size="mini" v-model="searchForm.ProjectOwner" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="联系人电话">
+              <el-input size="mini" v-model="searchForm.Telephone" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="项目类别">
+              <el-input size="mini" v-model="searchForm.ProjectType" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="合同模式">
+              <el-input size="mini" v-model="searchForm.ContractMode" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="合同总金额(万元)">
+              <el-input size="mini" v-model="searchForm.Amount" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="合同总工期(天)">
+              <el-input size="mini" v-model="searchForm.ContractPeriod" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="开工日期">
+              <el-input size="mini" v-model="searchForm.OpenDate" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="计划竣工时间">
+              <el-input size="mini" v-model="searchForm.PlanFinishDate" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="建设单位">
+              <el-input size="mini" v-model="searchForm.ConstructionUnit" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="建设负责人">
+              <el-input size="mini" v-model="searchForm.ConstructionOwner" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="手机号">
+              <el-input size="mini" v-model="searchForm.ConstructionTelphone" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="施工单位">
+              <el-input size="mini" v-model="searchForm.BuildUnit" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="施工负责人">
+              <el-input size="mini" v-model="searchForm.BuildOwner" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="手机号">
+              <el-input size="mini" v-model="searchForm.BuildTelphone" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="监理单位">
+              <el-input size="mini" v-model="searchForm.SuperviseUnit" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="监理负责人">
+              <el-input size="mini" v-model="searchForm.SuperviseOwner" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="手机号">
+              <el-input size="mini" v-model="searchForm.SuperviseTelphone" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="质量监督单位">
+              <el-input size="mini" v-model="searchForm.QualityUnit" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="质量监督负责人">
+              <el-input size="mini" v-model="searchForm.QualityOwner" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="手机号">
+              <el-input size="mini" v-model="searchForm.QualityTelphone" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="备注">
+              <el-input size="mini" v-model="searchForm.Remark" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="删除状态,0正常,1已删除">
+              <el-input size="mini" v-model="searchForm.IsDelete" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="">
+              <el-input size="mini" v-model="searchForm.CreateOn" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="">
+              <el-input size="mini" v-model="searchForm.CreateUserId" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="">
+              <el-input size="mini" v-model="searchForm.CreateBy" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="">
+              <el-input size="mini" v-model="searchForm.ModifiedOn" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="">
+              <el-input size="mini" v-model="searchForm.ModifiedUserId" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="">
+              <el-input size="mini" v-model="searchForm.ModifiedBy" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="handleSearch">查 询</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+<script>
+  import { mapGetters } from 'vuex';
+  import api from '@/api/oilcontract/contract';
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'oilcontract',
+
+    data() {
+      return {
+        dialogVisible: false,
+        //列表数据
+        entityList: [],
+        //分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        //列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        //查询时间
+        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        //查询项
+        searchFormReset: {},
+        searchForm: {
+          Id: '',
+          SupplierId: '',
+          SupplierName: '',
+          ProjectName: '',
+          ContractNo: '',
+          ProjectPlace: '',
+          ProjectOwner: '',
+          Telephone: '',
+          ProjectType: '',
+          ContractMode: '',
+          Amount: '',
+          ContractPeriod: '',
+          OpenDate: '',
+          PlanFinishDate: '',
+          ConstructionUnit: '',
+          ConstructionOwner: '',
+          ConstructionTelphone: '',
+          BuildUnit: '',
+          BuildOwner: '',
+          BuildTelphone: '',
+          SuperviseUnit: '',
+          SuperviseOwner: '',
+          SuperviseTelphone: '',
+          QualityUnit: '',
+          QualityOwner: '',
+          QualityTelphone: '',
+          Remark: '',
+          IsDelete: '',
+          CreateOn: '',
+          CreateUserId: '',
+          CreateBy: '',
+          ModifiedOn: '',
+          ModifiedUserId: '',
+          ModifiedBy: '',
+
+        },
+        tableColumns: [
+
+          {
+            prop: "Id",
+            label: '',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "SupplierId",
+            label: '供应商ID',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "SupplierName",
+            label: '企业名称',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "ProjectName",
+            label: '项目名称',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "ContractNo",
+            label: '合同编号',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "ProjectPlace",
+            label: '工程地点',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "ProjectOwner",
+            label: '项目负责人',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "Telephone",
+            label: '联系人电话',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "ProjectType",
+            label: '项目类别',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "ContractMode",
+            label: '合同模式',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "Amount",
+            label: '合同总金额(万元)',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "ContractPeriod",
+            label: '合同总工期(天)',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "OpenDate",
+            label: '开工日期',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "PlanFinishDate",
+            label: '计划竣工时间',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "ConstructionUnit",
+            label: '建设单位',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "ConstructionOwner",
+            label: '建设负责人',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "ConstructionTelphone",
+            label: '手机号',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "BuildUnit",
+            label: '施工单位',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "BuildOwner",
+            label: '施工负责人',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "BuildTelphone",
+            label: '手机号',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "SuperviseUnit",
+            label: '监理单位',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "SuperviseOwner",
+            label: '监理负责人',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "SuperviseTelphone",
+            label: '手机号',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "QualityUnit",
+            label: '质量监督单位',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "QualityOwner",
+            label: '质量监督负责人',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "QualityTelphone",
+            label: '手机号',
+            width: 100,
+            sort: true
+          },
+
+          {
+            prop: "Remark",
+            label: '备注',
+            width: 100,
+            sort: true
+          }]
+      }
+    },
+    created() {
+      //查询条件初始值备份
+      Object.assign(this.searchFormReset, this.searchForm);
+      //查询列表
+      this.initDatas();
+      //this.getDictOptions()
+    },
+    methods: {
+      initDatas() {
+        //分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+        }
+        let myCreateOn = []
+        // 解析时间
+        if (this.CreateOn.length == 2) {
+          this.CreateOn[1].setHours(23)
+          this.CreateOn[1].setMinutes(59)
+          this.CreateOn[1].setSeconds(59)
+          myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+          myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+        }
+        //查询条件
+        Object.assign(params, this.searchForm)
+        //访问接口
+        api.getList(myCreateOn.join(','), params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      getDictOptions() {
+        api.getDictList(this.$axios).then(res => {
+          //this.dictOptions.customerList = res.data.items['customerList']
+          //this.dictOptions.projectList = res.data.items['projectList']
+
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      searchCommand(command) {
+        if (command == 'search') {
+          this.dialogVisible = true
+        } else if (command == 'clear') {
+          this.clearSearch()
+        }
+      },
+      //列表排序功能
+      orderby(column) {
+        if (column.order == 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order == 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initDatas()
+      },
+      clearSearch() {
+        Object.assign(this.searchForm, this.searchFormReset);
+        //this.searchForm = this.searchFormReset;
+        this.CreateOn = ''
+        this.initDatas()
+      },
+      handleSearch() {
+        this.currentPage = 1;
+        this.dialogVisible = false;
+        this.initDatas();
+      },
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initDatas()
+      },
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initDatas()
+      },
+      deleteEntity(row) {
+        row.deleteConfirmFlag = false;
+        api.deleteEntity(row.Id, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.initDatas();
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            });
+
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            });
+          }
+        }).catch(err => {
+          console.error(err)
+        });
+      },
+
+      jstimehandle(val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return '永久'
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+
+      formatDateTime(date) {
+        var y = date.getFullYear();
+        var m = date.getMonth() + 1;
+        m = m < 10 ? ('0' + m) : m;
+        var d = date.getDate();
+        d = d < 10 ? ('0' + d) : d;
+        var h = date.getHours();
+        var minute = date.getMinutes();
+        minute = minute < 10 ? ('0' + minute) : minute;
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      }
+    }
+  }
+
+</script>
+
+<style lang="scss">
+  .el-pagination {
+    margin: 1rem 0 2rem;
+    text-align: right;
+  }
+</style>