Browse Source

收入业务审批

lining 6 năm trước cách đây
mục cha
commit
8d5481c099

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

@@ -6,7 +6,8 @@ import (
 
 type OilCatalog struct {
 	Id             int       `xorm:"not null pk autoincr INT(10)"`
-	CatalogType    int       `xorm:"comment('目录类型: 1 自建项目、2 优势项目、3 关联交易、4 战略合作、5 特殊业务、6 创收业务') INT(11)"`
+	SubId          int       `xorm:"INT(11)"`
+	CatalogType    int       `xorm:"comment('目录类型: 1 自建项目、2 优势项目、3 关联交易、4 战略合作、5 特殊业务、6 创收业务、7 收入业务') INT(11)"`
 	OrderNo        int       `xorm:"comment('序号') INT(11)"`
 	CompanyName    string    `xorm:"comment('企业名称') VARCHAR(255)"`
 	LegalPerson    string    `xorm:"comment('法人名称') VARCHAR(50)"`

+ 48 - 0
src/dashoo.cn/backend/api/business/oilsupplier/oilcatalogsub/oilcatalogsub.go

@@ -0,0 +1,48 @@
+package oilcatalogsub
+
+import "time"
+
+type OilCatalogSub struct {
+	Id              int       `xorm:"not null pk autoincr INT(10)"`
+	Status          string    `xorm:"VARCHAR(10)"`
+	SubmitterId     int       `xorm:"comment('提交人') INT(11)"`
+	Submitter       string    `xorm:"comment('提交人') VARCHAR(50)"`
+	SubmitOn        time.Time `xorm:"DATETIME"`
+	DeptId          int       `xorm:"comment('申请单位') INT(11)"`
+	Dept            string    `xorm:"comment('申请单位') VARCHAR(50)"`
+	FirstAudit      int       `xorm:"comment('初审人') INT(11)"`
+	SecondAudit     int       `xorm:"comment('复审人') INT(11)"`
+	FirstAuditName  string    `xorm:"VARCHAR(50)"`
+	SecondAuditName string    `xorm:"VARCHAR(50)"`
+	WorkflowId      string    `xorm:"VARCHAR(50)"`
+	BusinessKey     string    `xorm:"VARCHAR(50)"`
+	ProcessKey      string    `xorm:"VARCHAR(50)"`
+	AuditIndex      int       `xorm:"INT(11)"`
+	CreateUserId    int       `xorm:"INT(11)"`
+	CreateOn        time.Time `xorm:"DATETIME"`
+	CreateBy        string    `xorm:"VARCHAR(50)"`
+	ModifiedOn      time.Time `xorm:"DATETIME"`
+	ModifiedUserId  int       `xorm:"INT(11)"`
+	ModifiedBy      string    `xorm:"VARCHAR(50)"`
+	Remark          string    `xorm:"VARCHAR(255)"`
+}
+
+const (
+	DRAFT_STATUS        string = "0"  //草稿状态
+	FIRST_TRIAL_STATUS  string = "1"  //二级单位初审
+	SECOND_TRIAL_STATUS string = "2"  //二级单位复审
+	THIRD_TRIAL_STATUS  string = "3"  //专业处接收
+	PROF_AUDIT_STATUS   string = "4"  //专业科室审核
+	CENT_AUDIT_STATUS   string = "5"  // 集中审批
+	PAYING_AUDIT_STATUS string = "6"  //待交费
+	STOREING_STATUS     string = "7"  //待入库
+	STORE_STATUS        string = "8"  //已入库
+	FEN_TRIAL_STATUS    string = "10" //二级单位分办
+	NO_FEN_TRIAL_STATUS    string = "-10" //二级单位分办未通过
+	NOPASS_STATUS       string = "-1" // 初审未通过
+	NO_SECOND_TRIAL_STATUS   string = "-2" // 复审未通过
+	NO_THIRD_TRIAL_STATUS    string = "-3" // 专业处接收未通过
+	NO_PROF_AUDIT_STATUS     string = "-4" // 专业处室未通过
+	NO_CENT_AUDIT_STATUS    string = "-5" // 集中评审未通过
+	ALL_PASE_STATUS    string = "11" //审核完成
+)

+ 17 - 0
src/dashoo.cn/backend/api/business/oilsupplier/oilcatalogsub/oilcatalogsubService.go

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

+ 1 - 0
src/dashoo.cn/backend/api/business/todolist/todolist.go

@@ -26,4 +26,5 @@ const (
 	REGISTER    string = "5" // 注册
 	STORAGE string = "7" // 入库
 	INVOICE string = "8" //待开发票
+	INCOME  string = "9" // 收入业务
 )

+ 2 - 0
src/dashoo.cn/backend/api/business/workflow/workflow.go

@@ -128,6 +128,8 @@ const (
 	OIL_SUPPLIER_INSTORE string = "oil_supplier_instore"
 	// 待开发票
 	OIL_SUPPLIER_VERIFY string = "oil_supplier_verify"
+	// 目录管理审批流程
+	OIL_Catalog string = "oil_catalog"
 
 	// 分办
 	SUB_OFFICE_WZ string = "SUB_OFFICE_WZ"

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

@@ -277,6 +277,7 @@ var (
 	Tmp_OilGoodsAptitudeClassName            string = "tmp_OilGoodsAptitudeClass"
 	TmpOilSupplierCertSubName                string = "tmp_OilSupplierCertSub"
 	OilSupplierSceneFileName                 string = "OilSupplierSceneFile" // 现场考察报告
+	OilCatalogSubName                        string = "OilCatalogSub" // 目录提交审核的主表
 )
 
 //分页信息及数据

+ 12 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/oilcatalog.go

@@ -38,10 +38,17 @@ func (this *OilCatalogController) GetEntityList() {
 			asc = true
 		}
 	}
+	SubId := this.GetString("SubId")
 	CompanyName := this.GetString("CompanyName")
 	Business := this.GetString("Business")
 	catalogType := this.GetString("CatalogType")
+	Status := this.GetString("Status")
 	CreateOn := this.GetString("CreateOn")
+
+	if SubId != "" {
+		where = where + " and SubId=" + SubId
+	}
+
 	if catalogType != "" {
 		where = where + " and CatalogType=" + catalogType
 	}
@@ -52,6 +59,10 @@ func (this *OilCatalogController) GetEntityList() {
 		where = where + " and Business like '%" + Business + "%' "
 	}
 
+	if Status != "" {
+		where = where + " and Status = '" + Status + "'"
+	}
+
 	if CreateOn != "" {
 		dates := strings.Split(CreateOn, ",")
 		if len(dates) == 2 {
@@ -86,6 +97,7 @@ func (this *OilCatalogController) AddEntity() {
 	svc := oilcatalog.GetOilCatalogService(utils.DBE)
 
 	json.Unmarshal(jsonBlob, &model)
+	model.Status = "0"
 	model.CreateOn = time.Now()
 	model.CreateBy = this.User.Realname
 	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()

+ 590 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/oilcatalogsub.go

@@ -0,0 +1,590 @@
+package oilsupplier
+
+import (
+	"dashoo.cn/backend/api/business/audithistory"
+	"dashoo.cn/backend/api/business/auditsetting"
+	"dashoo.cn/backend/api/business/oilsupplier/oilcatalog"
+	"dashoo.cn/backend/api/business/oilsupplier/oilcatalogsub"
+	"dashoo.cn/backend/api/business/workflow"
+	"dashoo.cn/business3/parameter"
+	"dashoo.cn/utils"
+	"encoding/json"
+	"strconv"
+	"strings"
+	"time"
+
+	"dashoo.cn/backend/api/business/baseUser"
+	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/business3/userRole"
+)
+
+type OilCatalogSubController struct {
+	BaseController
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []limsoilcatalogsub.OilCatalogSub
+// @router /list [get]
+func (this *OilCatalogSubController) 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")
+	Status := this.GetString("Status")
+	SubmitterId := this.GetString("SubmitterId")
+	Submitter := this.GetString("Submitter")
+	DeptId := this.GetString("DeptId")
+	Dept := this.GetString("Dept")
+	FirstAudit := this.GetString("FirstAudit")
+	SecondAudit := this.GetString("SecondAudit")
+	BusinessKey := this.GetString("BusinessKey")
+	ProcessKey := this.GetString("ProcessKey")
+	CreateUserId := this.GetString("CreateUserId")
+	CreateOn := this.GetString("CreateOn")
+	CreateBy := this.GetString("CreateBy")
+	ModifiedOn := this.GetString("ModifiedOn")
+	ModifiedUserId := this.GetString("ModifiedUserId")
+	ModifiedBy := this.GetString("ModifiedBy")
+	SubmitOn := this.GetString("SubmitOn")
+
+	if Id != "" {
+		where = where + " and Id = " + Id
+	}
+
+	if Status != "" {
+		where = where + " and Status = '" + Status + "'"
+	}
+
+	if SubmitterId != "" {
+		where = where + " and SubmitterId = " + SubmitterId
+	}
+
+	if Submitter != "" {
+		where = where + " and Submitter like '%" + Submitter + "%'"
+	}
+
+	if DeptId != "" {
+		where = where + " and DeptId = " + DeptId
+	}
+
+	if Dept != "" {
+		where = where + " and Dept like '%" + Dept + "%'"
+	}
+
+	if FirstAudit != "" {
+		where = where + " and FirstAudit = " + FirstAudit
+	}
+
+	if SecondAudit != "" {
+		where = where + " and SecondAudit = " + SecondAudit
+	}
+
+	if BusinessKey != "" {
+		where = where + " and BusinessKey = '" + BusinessKey + "'"
+	}
+
+	if ProcessKey != "" {
+		where = where + " and ProcessKey = '" + ProcessKey + "'"
+	}
+
+	if CreateUserId != "" {
+		where = where + " and CreateUserId =" + this.User.Id
+	}
+
+	if CreateBy != "" {
+		where = where + " and CreateBy like '%" + CreateBy + "%'"
+	}
+
+	if ModifiedOn != "" {
+		where = where + " and ModifiedOn like '%" + ModifiedOn + "%'"
+	}
+
+	if ModifiedUserId != "" {
+		where = where + " and ModifiedUserId =" + 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 + "'"
+		}
+	}
+
+	if SubmitOn != "" {
+		dates := strings.Split(SubmitOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and SubmitOn>='" + minDate + "' and SubmitOn<='" + maxDate + "'"
+		}
+	}
+
+	svc := oilcatalogsub.GetOilCatalogSubService(utils.DBE)
+	var list []oilcatalogsub.OilCatalogSub
+	total := svc.GetPagingEntitiesWithOrderBytbl(this.User.AccCode, 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 *OilCatalogSubController) 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", this.User.AccCode)
+	var userEntity userRole.Base_User
+	userSvc.GetEntityById(this.User.Id, &userEntity)
+	dictList["Supervisers"] = userSvc.GetUserListByDepartmentId(this.User.AccCode, userEntity.Departmentid)
+
+	//var dictCustomer []svccustomer.Customer
+	//customerSvc.GetEntitysByWhere(this.User.AccCode + CustomerName, "", &dictCustomer)
+	//dictList["EntrustCorp"] = &dictCustomer
+
+	var datainfo DataInfo
+	datainfo.Items = dictList
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} oilcatalogsub.OilCatalogSub
+// @router /get/:id [get]
+func (this *OilCatalogSubController) GetEntity() {
+	Id := this.Ctx.Input.Param(":id")
+
+	var model oilcatalogsub.OilCatalogSub
+	svc := oilcatalogsub.GetOilCatalogSubService(utils.DBE)
+	svc.GetEntityByIdBytbl(OilCatalogSubName, Id, &model)
+
+	this.Data["json"] = &model
+	this.ServeJSON()
+}
+
+// @Title 添加
+// @Description 新增
+// @Param 	body body oilcatalogsub.OilCatalogSub
+// @Success	200	{object} controllers.Request
+// @router /add [post]
+func (this *OilCatalogSubController) AddEntity() {
+	var model oilcatalogsub.OilCatalogSub
+	var jsonBlob = this.Ctx.Input.RequestBody
+	svc := oilcatalogsub.GetOilCatalogSubService(utils.DBE)
+
+	json.Unmarshal(jsonBlob, &model)
+	model.Status = "0"
+	model.CreateOn = time.Now()
+	model.CreateBy = this.User.Realname
+	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+
+	_, err := svc.InsertEntityBytbl(OilCatalogSubName, &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 oilcatalogsub.OilCatalogSub
+// @Success	200	{object} controllers.Request
+// @router /update/:id [post]
+func (this *OilCatalogSubController) 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 oilcatalogsub.OilCatalogSub
+	svc := oilcatalogsub.GetOilCatalogSubService(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",
+
+		"Status",
+
+		"SubmitterId",
+
+		"Submitter",
+
+		"DeptId",
+
+		"Dept",
+
+		"FirstAudit",
+
+		"SecondAudit",
+
+		"BusinessKey",
+
+		"ProcessKey",
+
+		"CreateUserId",
+
+		"CreateOn",
+
+		"CreateBy",
+
+		"ModifiedOn",
+
+		"ModifiedUserId",
+
+		"ModifiedBy",
+	}
+	err := svc.UpdateEntityBytbl(OilCatalogSubName, 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 *OilCatalogSubController) 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 oilcatalogsub.OilCatalogSub
+	svc := oilcatalogsub.GetOilCatalogSubService(utils.DBE)
+
+	err := svc.DeleteEntityById(Id, &model)
+
+	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 /deleteentityanditems/:Id [delete]
+func (this *OilCatalogSubController) DeleteEntityAndItems() {
+	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 oilcatalogsub.OilCatalogSub
+
+	svc := oilcatalogsub.GetOilCatalogSubService(utils.DBE)
+	where := "SubId=" + Id
+	svc.DeleteEntityBytbl(OilCatalogName, where)
+
+
+	err := svc.DeleteEntityById(Id, &model)
+
+	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} controllers.Request
+// @router /commitaudit/:id [post]
+func (this *OilCatalogSubController) CommitAuditEntity() {
+	Id := this.Ctx.Input.Param(":id")
+
+	var entity oilcatalogsub.OilCatalogSub
+	svc := oilcatalogsub.GetOilCatalogSubService(utils.DBE)
+	svc.GetEntityById(Id, &entity)
+
+	var catalogsub oilcatalogsub.OilCatalogSub
+	// 跟新主表状态
+	cols := []string{"Status", "AuditIndex"}
+	catalogsub.Status = oilcatalogsub.FIRST_TRIAL_STATUS
+	catalogsub.AuditIndex = entity.AuditIndex + 1
+	where := "Id=" + Id
+	svc.UpdateEntityBywheretbl(OilCatalogSubName, &catalogsub, cols, where)
+	//更新从表状态
+	var catalog oilcatalog.OilCatalog
+	cols = []string{"Status"}
+	catalog.Status = "1"
+	where = "SubId=" + Id
+	svc.UpdateEntityBywheretbl(OilCatalogName, &catalog, cols, where)
+
+	//启动工作流
+	svcActiviti := workflow.GetActivitiService(utils.DBE)
+	processInstanceId := ""
+	businessKey := Id + "-" + strconv.Itoa(catalogsub.AuditIndex)
+	processKey := workflow.OIL_Catalog
+	processInstanceId = svcActiviti.StartProcess2(processKey, businessKey, this.User.Id, "1", "", "")
+
+	//提交到初审
+	var ActiComplete workflow.ActiCompleteVM
+	ActiComplete.ProcessKey = processKey
+	ActiComplete.BusinessKey = businessKey
+	ActiComplete.UserNames = strconv.Itoa(entity.FirstAudit)
+	ActiComplete.UserId = this.User.Id
+	ActiComplete.Result = "1"
+	ActiComplete.Remarks = entity.Remark
+	ActiComplete.CallbackUrl = ""
+	receiveVal := svcActiviti.TaskComplete(ActiComplete)
+
+	cols1 := []string{"WorkflowId", "BusinessKey", "ProcessKey"}
+	catalogsub.BusinessKey = businessKey
+	catalogsub.ProcessKey = processKey
+	catalogsub.WorkflowId = processInstanceId
+	wheresub := "Id=" + Id
+	svc.UpdateEntityBywheretbl(OilCatalogSubName, &catalogsub, cols1, wheresub)
+
+	var audithistoryentity audithistory.Base_AuditHistory
+	audithistoryentity.EntityId = entity.Id
+	audithistoryentity.WorkflowId = entity.WorkflowId
+	audithistoryentity.Process = ActiComplete.ProcessKey
+	audithistoryentity.BusinessKey = ActiComplete.BusinessKey
+	audithistoryentity.Type = ""
+	audithistoryentity.BackStep = entity.Status
+	audithistoryentity.Index = entity.AuditIndex
+	audithistoryentity.CreateOn = time.Now()
+	audithistoryentity.CreateBy = this.User.Realname
+	audithistoryentity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+	svc.InsertEntity(audithistoryentity)
+
+	var errinfo ErrorInfo
+	if receiveVal == "true" {
+		errinfo.Message = "提交成功!"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "工作流异常,请联系管理员!"
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+}
+
+// @Title 审批
+// @Description 审批
+// @Param 	body body suppliercert.OilSupplierCert
+// @Success	200	{object} controllers.Request
+// @router /auditentity/:id [post]
+func (this *OilCatalogSubController) AuditEntity() {
+	var dataother ShenHeModel
+	Id := this.Ctx.Input.Param(":id")
+
+	var jsonblob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonblob, &dataother)
+
+	var entity oilcatalogsub.OilCatalogSub
+	var catalog oilcatalog.OilCatalog
+	svc := oilcatalogsub.GetOilCatalogSubService(utils.DBE)
+	svc.GetEntityById(Id, &entity)
+
+	var errinfo ErrorDataInfo
+	defer func() { //finally处理失败的异常
+		if err := recover(); err != nil {
+			errinfo.Message = "提交失败," + err.(string)
+			errinfo.Code = -1
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		} else {
+			//返回正确结果
+			errinfo.Message = "审核提交成功"
+			errinfo.Code = 0
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		}
+	}()
+
+	//remarks := ""
+	status := ""
+	backstatus := "0"
+	var userIds string
+
+	if entity.Status == oilcatalogsub.FIRST_TRIAL_STATUS {
+		userIds = utils.ToStr(entity.SecondAudit)
+		status = oilcatalogsub.SECOND_TRIAL_STATUS
+		backstatus = oilcatalogsub.NOPASS_STATUS
+	} else if entity.Status == oilcatalogsub.SECOND_TRIAL_STATUS {
+		backstatus = oilcatalogsub.NO_SECOND_TRIAL_STATUS
+		status = oilcatalogsub.CENT_AUDIT_STATUS
+
+		paramSvc := baseparameter.GetBaseparameterService(utils.DBE)
+		topid := paramSvc.GetBaseparameterMessage("", "paramset", "CENT_AUDIT")
+
+		var userlist []userRole.Base_User
+		var setting auditsetting.Base_OilAuditSetting
+		usvc := userRole.GetUserService(utils.DBE)
+		where := "AuditStepCode='" + workflow.PROF_REGULATION + "'"
+		usvc.GetEntity(&setting, where)
+
+		ids := usvc.GetUserIdsByRoleId(strconv.Itoa(setting.RoleId))
+		tempstr := strings.Join(ids, ",")
+		uids := strings.Replace(tempstr, "uid_", "", -1)
+		uids = strings.Trim(uids, ",")
+		if uids != "" {
+			where := "Id in (" + uids + ")" + " and UnitId=" + topid
+			usvc.GetEntities(&userlist, where)
+		}
+		for _, tmpUser := range userlist {
+			userIds += strconv.Itoa(tmpUser.Id) + ","
+		}
+
+		userIds = strings.Trim(userIds, ",")
+
+	} else if entity.Status == oilcatalogsub.CENT_AUDIT_STATUS {
+		userIds = this.User.Id
+		status = oilcatalogsub.ALL_PASE_STATUS
+		backstatus = oilcatalogsub.NO_CENT_AUDIT_STATUS
+	}
+
+	svcActiviti := workflow.GetActivitiService(utils.DBE)
+	var ActiComplete workflow.ActiCompleteVM
+	ActiComplete.ProcessKey = entity.ProcessKey
+	ActiComplete.BusinessKey = entity.BusinessKey
+	ActiComplete.UserNames = userIds
+	ActiComplete.UserId = this.User.Id
+	ActiComplete.Remarks = dataother.AuditorRemark
+	ActiComplete.CallbackUrl = ""
+	if dataother.SuccessStatus == 1 {
+		ActiComplete.Result = "1"
+
+		receiveVal := svcActiviti.TaskComplete(ActiComplete)
+
+		if receiveVal == "true" {
+			// 更新主表状态
+
+			if entity.Status == oilcatalogsub.CENT_AUDIT_STATUS {
+				catalog.Status = "2"
+			} else {
+				catalog.Status = "1"
+			}
+			entity.Status = status
+			cols := []string{
+				"Status",
+			}
+			svc.UpdateEntityByIdCols(Id, &entity, cols)
+			// 从表状态
+
+			where := "SubId=" + Id
+			svc.UpdateEntityBywheretbl(OilCatalogName, &catalog, cols, where)
+			errinfo.Message = "提交成功!"
+			errinfo.Code = 0
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		} else {
+			errinfo.Message = "工作流异常,请联系管理员!"
+			errinfo.Code = -1
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+			return
+		}
+	} else {
+
+		ActiComplete.Result = "0"
+		receiveVal := svcActiviti.TaskComplete(ActiComplete)
+
+		if receiveVal == "true" {
+			// 更新主表状态
+			entity.Status = backstatus
+			cols := []string{
+				"Status",
+			}
+			svc.UpdateEntityByIdCols(Id, entity, cols)
+			// 从表状态
+			catalog.Status = "0"
+			where := "SubId=" + Id
+			svc.UpdateEntityBywheretbl(OilCatalogName, &catalog, cols, where)
+			errinfo.Message = "提交成功!"
+			errinfo.Code = 0
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		} else {
+			errinfo.Message = "工作流异常,请联系管理员!"
+			errinfo.Code = -1
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+			return
+		}
+	}
+}

+ 42 - 5
src/dashoo.cn/backend/api/controllers/oilsupplier/todolist.go

@@ -4,6 +4,7 @@ import (
 	"dashoo.cn/backend/api/business/invoiceinfo"
 	"dashoo.cn/backend/api/business/oilsupplier/annualaudit"
 	"dashoo.cn/backend/api/business/oilsupplier/infochange"
+	"dashoo.cn/backend/api/business/oilsupplier/oilcatalogsub"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercertappend"
 	"dashoo.cn/backend/api/business/register"
@@ -30,7 +31,7 @@ func (this *TodoListController) GetMyTaskEntityList() {
 
 	page := this.GetPageInfoForm()
 
-	stype := this.GetString("Type") // 1 准入 2 增项 3 年审 4 信息变更 5 注册 6 待入库 7 待开发票
+	stype := this.GetString("Type") // 1 准入 2 增项 3 年审 4 信息变更 5 注册 7 待入库 8 待开发票 9 目录审批
 	supplierTypeCode := this.GetString("SupplierTypeCode")
 	supplierName := this.GetString("SupplierName")
 	wfNames := ""
@@ -44,10 +45,12 @@ func (this *TodoListController) GetMyTaskEntityList() {
 		wfNames = workflow.OIL_INFO_CHANGE
 	} else if stype == "5" {
 		wfNames = workflow.OIL_REGISTER_APPLY
-	} else if stype == "6" {
-		wfNames = workflow.OIL_SUPPLIER_INSTORE
 	} else if stype == "7" {
+		wfNames = workflow.OIL_SUPPLIER_INSTORE
+	} else if stype == "8" {
 		wfNames = workflow.OIL_SUPPLIER_VERIFY
+	} else if stype == "9" {
+		wfNames = workflow.OIL_Catalog
 	}
 
 	var todoliststemp []todolist.TodoList
@@ -184,6 +187,22 @@ func (this *TodoListController) GetMyTaskEntityList() {
 				todo.CreateTime = item.CreateTime
 				todoliststemp = append(todoliststemp, todo)
 			}
+		} else if wfName == workflow.OIL_Catalog {
+			// 目录审批
+			var todo todolist.TodoList
+			regsvc := invoiceinfo.GetInvoiceService(utils.DBE)
+			var listinfo oilcatalogsub.OilCatalogSub
+			has = regsvc.GetEntityById(id, &listinfo)
+			if has {
+				todo.Id = listinfo.Id
+				todo.Type = todolist.INCOME
+				todo.SupplierName = ""
+				todo.UserName = this.User.Realname
+				todo.TaskName = item.TaskName
+				todo.Status = listinfo.Status
+				todo.CreateTime = item.CreateTime
+				todoliststemp = append(todoliststemp, todo)
+			}
 		}
 	}
 
@@ -241,10 +260,12 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 		wfNames = workflow.OIL_INFO_CHANGE
 	} else if stype == "5" {
 		wfNames = workflow.OIL_REGISTER_APPLY
-	} else if stype == "6" {
-		wfNames = workflow.OIL_SUPPLIER_INSTORE
 	} else if stype == "7" {
+		wfNames = workflow.OIL_SUPPLIER_INSTORE
+	} else if stype == "8" {
 		wfNames = workflow.OIL_SUPPLIER_VERIFY
+	} else if stype == "9" {
+		wfNames = workflow.OIL_Catalog
 	}
 
 	var todoliststemp []todolist.TodoList
@@ -371,6 +392,22 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 				todo.CreateTime = item.CreateTime
 				todoliststemp = append(todoliststemp, todo)
 			}
+		} else if wfName == workflow.OIL_Catalog {
+			// 目录审批
+			var todo todolist.TodoList
+			regsvc := invoiceinfo.GetInvoiceService(utils.DBE)
+			var listinfo oilcatalogsub.OilCatalogSub
+			has = regsvc.GetEntityById(id, &listinfo)
+			if has {
+				todo.Id = listinfo.Id
+				todo.Type = todolist.INCOME
+				todo.SupplierName = ""
+				todo.UserName = this.User.Realname
+				todo.TaskName = item.TaskName
+				todo.Status = listinfo.Status
+				todo.CreateTime = item.CreateTime
+				todoliststemp = append(todoliststemp, todo)
+			}
 		}
 
 	}

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

@@ -426,6 +426,12 @@ func init() {
 				&oilsupplier.OilInvoiceController{},
 			),
 		),
+		//发票
+		beego.NSNamespace("/oilcatalogsub",
+			beego.NSInclude(
+				&oilsupplier.OilCatalogSubController{},
+			),
+		),
 	)
 	beego.AddNamespace(ns)
 }

+ 4 - 4
src/dashoo.cn/frontend_web/nuxt.config.ignore.js

@@ -165,10 +165,10 @@ module.exports = {
     'pages/oilsupplier/badrecord/*.*',
     // 'pages/oilsupplier/basisbuild/*.*',
     'pages/oilsupplier/compayaudit/*.*',
-    // 'pages/oilsupplier/goodsaptitude/*.*',
-    // 'pages/oilsupplier/infochange/*.*',
-    // 'pages/oilsupplier/infochangech/*.*',
-    // 'pages/oilsupplier/supplier/*.*',
+    'pages/oilsupplier/goodsaptitude/*.*',
+    'pages/oilsupplier/infochange/*.*',
+    'pages/oilsupplier/infochangech/*.*',
+    'pages/oilsupplier/supplier/*.*',
     'pages/oilsupplier/supplierappend/*.*',
     'pages/oilsupplier/supplieraudit/*.*',
     'pages/oilsupplier/suppliercert/*.*',

+ 60 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/oilcatalogsub.js

@@ -0,0 +1,60 @@
+export default {
+  getList (CreateOn, params, myAxios) {
+    return myAxios({
+      url: '/oilcatalogsub/list?CreateOn=' + CreateOn,
+      method: 'GET',
+      params: params
+    })
+  },
+  getDictList (myAxios) {
+    return myAxios({
+      url: '/oilcatalogsub/dictlist/',
+      method: 'GET'
+    })
+  },
+  getEntity (entityId, myAxios) {
+    return myAxios({
+      url: '/oilcatalogsub/get/' + entityId,
+      method: 'GET'
+    })
+  },
+  addEntity (formData, myAxios) {
+    return myAxios({
+      url: '/oilcatalogsub/add',
+      method: 'post',
+      data: formData
+    })
+  },
+  updateEntity (entityId, formData, myAxios) {
+    return myAxios({
+      url: '/oilcatalogsub/update/' + entityId,
+      method: 'post',
+      data: formData
+    })
+  },
+  deleteEntity (entityId, myAxios) {
+    return myAxios({
+      url: '/oilcatalogsub/delete/' + entityId,
+      method: 'delete'
+    })
+  },
+  deleteEntityAndItems (entityId, myAxios) {
+    return myAxios({
+      url: '/oilcatalogsub/deleteentityanditems/' + entityId,
+      method: 'delete'
+    })
+  },
+  commitAudit (entityId, myAxios) {
+    return myAxios({
+      url: '/oilcatalogsub/commitaudit/' + entityId,
+      method: 'post'
+    })
+  },
+  auditEntity (entityId, params, myAxios) {
+    return myAxios({
+      url: '/oilcatalogsub/auditentity/' + entityId,
+      data: params,
+      method: 'post'
+    })
+  }
+}

+ 7 - 1
src/dashoo.cn/frontend_web/src/pages/index.vue

@@ -18,7 +18,8 @@
               <el-option label="年审" value="3"></el-option>
               <el-option label="信息变更" value="4"></el-option>
               <el-option label="注册审核" value="5"></el-option>
-              <el-option label="待入库" value="6"></el-option>
+              <el-option label="待入库" value="7"></el-option>
+              <el-option label="收入业务" value="9"></el-option>
             </el-select>
           </el-form-item>
           <el-form-item label="类别">
@@ -58,6 +59,7 @@
               <span v-if="scope.row.Type=='5'" style="color:#E6A23C">企业注册-待审批</span>
               <span v-if="scope.row.Type=='7'" style="color:#E6A23C">准入-{{scope.row.TaskName}}</span>
               <span v-if="scope.row.Type=='8'" style="color:#E6A23C">发票</span>
+              <span v-if="scope.row.Type=='9'" style="color:#E6A23C">收入业务-{{scope.row.TaskName}}</span>
             </template>
           </el-table-column>
 
@@ -125,6 +127,7 @@
                 <span v-if="scope.row.Type=='4'" style="color:#E6A23C">信息变更-{{scope.row.TaskName}}</span>
                 <span v-if="scope.row.Type=='5'" style="color:#E6A23C">企业注册-待审批</span>
                 <span v-if="scope.row.Type=='8'" style="color:#E6A23C">发票</span>
+                <span v-if="scope.row.Type=='9'" style="color:#E6A23C">收入业务-{{scope.row.TaskName}}</span>
               </template>
             </el-table-column>
             <el-table-column label="类别" prop="SupplierTypeCode">
@@ -610,6 +613,9 @@
         } else if (val.Type === '8') {
           this.initInvoiceDatas(val.Id)
           this.invoiceVisible = true
+        } else if (val.Type === '9') {
+          // /oilsupplier/oilcatalogsub/2/incomeedit
+          this.$router.push('/oilsupplier/oilcatalogsub/' + val.Id + '/incomeedit')
         }
       },
       initInvoiceDatas (Id) {

+ 0 - 205
src/dashoo.cn/frontend_web/src/pages/oilsupplier/oilcatalog/_opera/incomeedit.vue

@@ -1,205 +0,0 @@
-<template>
-  <div>
-    <el-breadcrumb class="heading">
-      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
-      <el-breadcrumb-item :to="{ path: '/oilsupplier/oilcatalog/income' }">收入业务</el-breadcrumb-item>
-      <el-breadcrumb-item>添加</el-breadcrumb-item>
-    </el-breadcrumb>
-    <el-card class="box-card">
-      <div slot="header">
-        <div slot="header">
-          <span><i class="icon icon-table2"></i></span>
-          <el-button style="float: right; padding: 3px 0" type="text" @click="saveEntity">保存信息</el-button>
-        </div>
-      </div>
-
-      <el-form label-width="150px" ref="EntityForm">
-        <el-row>
-          <el-col :span="8">
-            <el-form-item label="提交人" prop="Submitter">
-              <el-input v-model="formData.Submitter" :readonly="true" placeholder="请输入" style="width: 100%"></el-input>
-            </el-form-item>
-          </el-col>
-          <!--<el-col :span="6">-->
-            <!--<el-form-item label="提交单位" prop="DeptId">-->
-              <!--<el-select filterable v-model="formData.DeptId" maxlength="255" clearable placeholder="请选择分办单位"-->
-                         <!--style="width: 100%" >-->
-                <!--<el-option v-for="item in organizeOption" :key="item.Id" :label="item.Fullname" :value="item.Id">-->
-                <!--</el-option>-->
-              <!--</el-select>-->
-            <!--</el-form-item>-->
-          <!--</el-col>-->
-          <el-col :span="8">
-            <el-form-item label="初审人员" prop="FirstAuditName" :rules="{ required: true, message: '初审人员不能为空', trigger: 'blur'}">
-              <el-input ref="selectAuditer" readonly v-model="formData.FirstAuditName" placeholder="请选择初审人">
-                <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
-              </el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item label="复审人员" prop="SecondAudit" :rules="{ required: true, message: '复审人员不能为空', trigger: 'blur'}">
-              <el-select ref="secondAudit" v-model="formData.SecondAudit" placeholder="请选择复审人" style="width: 100%" filterable
-                         allow-create default-first-option>
-                <el-option v-for="item in secauditerOptions" :key="item.Id" :label="item.Realname" :value="item.Id">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="16">
-            <el-form-item label="备注" prop="Remark">
-              <el-input  type="textarea" v-model="formData.Remark"
-                        placeholder="请输入">
-              </el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-card>
-    <el-card class="box-card">
-      <div slot="header">
-        <span>
-          <i class="icon icon-table2"></i> 明细
-        </span>
-      </div>
-      <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" size="mini">
-        <el-table-column label="操作" min-width="100px" align="center" fixed="right">
-          <template slot-scope="scope">
-            <el-button type="primary" size="mini" @click="editOilcatalog(scope.row)" plain>{{btnName}}</el-button>
-            <el-popover placement="top" title="提示">
-              <el-alert
-                title=""
-                description="确认要删除吗?"
-                type="warning"
-                :closable="false">
-              </el-alert>
-              <br/>
-              <div style="text-align: right; margin: 0">
-                <el-button type="danger" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
-              </div>
-              <el-button slot="reference" type="danger" title="删除" style="margin-left:10px" size="mini" plain v-if="showBtn">删除</el-button>
-            </el-popover>
-          </template>
-
-        </el-table-column>
-        <!--<el-table-column sortable min-width="80" align="center" show-overflow-tooltip prop="SupplierName" label="序号"></el-table-column>-->
-        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="CompanyName" label="企业名称"></el-table-column>
-        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="LegalPerson" label="法人姓名"></el-table-column>
-        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="Address" label="企业注册地址"></el-table-column>
-        <el-table-column sortable min-width="150" align="center" show-overflow-tooltip prop="USCCode" label="全国统一信用代码"></el-table-column>
-        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="RegCapital" label="注册资本"></el-table-column>
-        <el-table-column sortable min-width="500" align="center" show-overflow-tooltip prop="RecordScope" label="申请备案范围"></el-table-column>
-        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="IDCode" label="法人身份证号"></el-table-column>
-        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="Remark" label="备注"></el-table-column>
-
-      </el-table>
-    </el-card>
-
-    <choose-auditor ref="chooseAuditor"
-                    @close="setAuditer"
-                    @hideChooseAuditer="chooseAuditorVisible=false"
-                    :visible="chooseAuditorVisible"></choose-auditor>
-
-  </div>
-</template>
-
-<script>
-  import { mapGetters } from 'vuex'
-  import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
-  import sipapi from '@/api/oilsupplier/supplier'
-
-  export default {
-    computed: {
-      ...mapGetters({
-        authUser: 'authUser'
-      })
-    },
-    components: {
-      ChooseAuditor
-    },
-    name: 'incomeedit',
-
-    data () {
-      return {
-        chooseAuditorVisible: false,
-
-        organizeOption: [],
-        secauditerOptions: [],
-        entityList: [],
-
-        formData: {
-          Id: '',
-          Status: '',
-          SubmitterId: '',
-          Submitter: '',
-          DeptId: '',
-          Dept: '',
-          FirstAudit: '',
-          FirstAuditName: '',
-          SecondAudit: '',
-          SecondAuditName: ''
-        }
-      }
-    },
-    created () {
-      console.log(this.authUser.Profile, 'this.authUser.Profile')
-      this.formData.SubmitterId = this.authUser.Profile.Id
-      this.formData.Submitter = this.authUser.Profile.Realname
-      this.getDictOptions()
-    },
-    methods: {
-      chooseAuditorShow () {
-        this.$refs['chooseAuditor'].getorgtreelist('01')
-        this.chooseAuditorVisible = true
-      },
-      setAuditer (val, name) {
-        this.formData.FirstAudit = val
-        this.formData.FirstAuditName = name
-        this.chooseAuditorVisible = false
-        this.auditOrgChang(this.formData.FirstAudit)
-      },
-      auditOrgChang (val) {
-        let auditstepcode = 'SECOND_TRIAL'
-        sipapi.getAuditerByFirst(val, auditstepcode, this.$axios)
-          .then(res => {
-            this.secauditerOptions = res.data.item
-          })
-          .catch(err => {
-            console.error(err)
-          })
-      },
-
-      getDictOptions () {
-        let params = {
-
-        }
-        sipapi.getDictListByStatus(params, this.$axios).then(res => {
-          this.organizeOption = res.data.items['Allunitorglist']
-        }).catch(err => {
-          console.error(err)
-        })
-      },
-
-      saveEntity () {
-        console.log(this.formData, 'this.formData')
-        this.$refs['EntityForm'].validate((valid) => {
-          console.log(this.formData, 'this.formData')
-          if (valid) {
-            this.formData.SecondAuditName = this.$refs.secondAudit.selectedLabel + ''
-            if (!this.formData.Id) {
-              this.addEntity()
-            } else {
-              this.updateEntity()
-            }
-          } else {
-            return false
-          }
-        })
-      }
-
-    }
-  }
-</script>
-
-<style scoped>
-
-</style>

+ 0 - 536
src/dashoo.cn/frontend_web/src/pages/oilsupplier/oilcatalog/_opera/index.vue

@@ -1,536 +0,0 @@
-<template>
-  <div>
-    <el-breadcrumb class="heading">
-      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
-      <el-breadcrumb-item>{{cardTitle}}目录</el-breadcrumb-item>
-    </el-breadcrumb>
-    <el-card class="box-card" style="height: calc(100vh - 115px);" v-loading="loading">
-      <div slot="header">
-        <span>
-          <i class="icon icon-table2"></i> {{cardTitle}}目录
-        </span>
-        <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
-          <el-form-item label="时间">
-            <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
-                            start-placeholder="有效期" end-placeholder="有效期"></el-date-picker>
-          </el-form-item>
-          <el-form-item label="企业名称">
-            <el-input size="mini" v-model="searchForm.CompanyName" style="width:100%" placeholder="请输入"></el-input>
-          </el-form-item>
-          <el-form-item label="业务范围">
-            <el-input size="mini" v-model="searchForm.Business" style="width:100%" placeholder="请输入"></el-input>
-          </el-form-item>
-          <!--<el-form-item label="准入类型">-->
-            <!--<el-select size="mini" style="width:100px" v-model="searchForm.SupplierTypeName" placeholder="准入类别">-->
-              <!--<el-option label="全部" value=""></el-option>-->
-              <!--<el-option label="物资类" value="物资类"></el-option>-->
-              <!--<el-option label="基建类" value="基建类"></el-option>-->
-              <!--<el-option label="技术服务类" value="技术服务类"></el-option>-->
-            <!--</el-select>-->
-          <!--</el-form-item>-->
-
-          <el-form-item>
-            <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
-              查询
-              <el-dropdown-menu slot="dropdown">
-                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
-              </el-dropdown-menu>
-            </el-dropdown>
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="showdialog()">添加</el-button>
-            <router-link :to="'/oilsupplier/oilcatalog/income'">
-              <el-button type="warning" size="mini" style="margin-left:10px; margin-top: -4px;">返回</el-button>
-            </router-link>
-          </el-form-item>
-        </el-form>
-      </div>
-      <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby" size="mini">
-        <el-table-column label="操作" min-width="100px" align="center" fixed="right">
-          <template slot-scope="scope">
-            <el-button type="primary" size="mini" @click="editOilcatalog(scope.row)" plain>{{btnName}}</el-button>
-            <el-popover placement="top" title="提示">
-              <el-alert
-                title=""
-                description="确认要删除吗?"
-                type="warning"
-                :closable="false">
-              </el-alert>
-              <br/>
-              <div style="text-align: right; margin: 0">
-                <el-button type="danger" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
-              </div>
-              <el-button slot="reference" type="danger" title="删除" style="margin-left:10px" size="mini" plain v-if="showBtn">删除</el-button>
-            </el-popover>
-          </template>
-
-        </el-table-column>
-        <!--<el-table-column sortable min-width="80" align="center" show-overflow-tooltip prop="SupplierName" label="序号"></el-table-column>-->
-        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="CompanyName" label="企业名称"></el-table-column>
-        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="LegalPerson" label="法人姓名"></el-table-column>
-        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="Address" label="企业注册地址"></el-table-column>
-        <el-table-column sortable min-width="150" align="center" show-overflow-tooltip prop="USCCode" label="全国统一信用代码"></el-table-column>
-        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="RegCapital" label="注册资本"></el-table-column>
-        <el-table-column sortable min-width="500" align="center" show-overflow-tooltip prop="RecordScope" label="申请备案范围"></el-table-column>
-        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="IDCode" label="法人身份证号"></el-table-column>
-        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="Remark" label="备注"></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="addshow"
-               width="60%">
-      <el-form label-width="135px" ref="EntityForm" :model="formData">
-        <el-row>
-          <el-col :span="12">
-            <el-form-item label="企业名称" prop="CompanyName" :rules="{ required: true, message: '供方名称不能为空', trigger: 'blur'}">
-              <el-input v-model="formData.CompanyName" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="法人姓名" prop="LegalPerson" :rules="{ required: true, message: '法人姓名不能为空', trigger: 'blur'}">
-              <el-input v-model="formData.LegalPerson" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="法人身份证号" prop="IDCode" :rules="{ required: true, message: '法人身份证号不能为空', trigger: 'blur'}">
-              <el-input v-model="formData.IDCode" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="注册地址" prop="Address" :rules="{ required: true, message: '注册地址不能为空', trigger: 'blur'}">
-              <el-input v-model="formData.Address" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="12">
-            <el-form-item label="全国统一信用代码" prop="USCCode" :rules="{ required: true, message: '全国统一信用代码不能为空', trigger: 'blur'}">
-              <el-input v-model="formData.USCCode" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
-            </el-form-item>
-          </el-col><el-col :span="12">
-          <el-form-item label="注册资金" prop="RegCapital" :rules="{ required: true, message: '注册资金不能为空', trigger: 'blur'}">
-            <el-input v-model="formData.RegCapital" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
-          </el-form-item>
-        </el-col>
-          <el-col :span="24">
-            <el-form-item label="申请备案范围" prop="RecordScope" :rules="{ required: true, message: '申请备案范围不能为空', trigger: 'blur'}">
-              <el-input v-model="formData.RecordScope"  type="textarea" style="width: 100%"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="备注">
-              <el-input v-model="formData.Remark"  placeholder="请输入" type="textarea" style="width: 100%">
-              </el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item style="text-align: center;">
-              <el-button type="primary" size="mini" @click="saveOilcatalog">保存</el-button>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </el-dialog>
-    <el-dialog title="提交初审"
-               :visible.sync="dialogVisible"
-               width="520px">
-      <el-form ref="searchForm"
-               label-width="100px">
-        <el-row>
-          <el-col :span="24">
-            <el-form-item label="初审人员">
-              <el-input ref="selectAuditer" readonly v-model="auditform.auditerName" placeholder="请选择初审人">
-                <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
-              </el-input>
-            </el-form-item>
-            <el-form-item label="复审人员">
-              <el-select ref="selectAuditer" v-model="auditform.fushenauditer" placeholder="请选择复审人" style="width: 100%" filterable
-                         allow-create default-first-option>
-                <el-option v-for="item in secauditerOptions" :key="item.Id" :label="item.Realname" :value="item.Id">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :span="24">
-            <el-form-item label="备注">
-              <el-input v-model="auditform.AuditRemark"
-                        type="textarea"
-                        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"
-                   >确定</el-button>
-      </span>
-    </el-dialog>
-
-    <choose-auditor ref="chooseAuditor"
-                    @close="setAuditer"
-                    @hideChooseAuditer="chooseAuditorVisible=false"
-                    :visible="chooseAuditorVisible"></choose-auditor>
-
-  </div>
-</template>
-<script>
-  import { mapGetters } from 'vuex'
-  import api from '@/api/oilsupplier/oilcatalog'
-  import sipapi from '@/api/oilsupplier/supplier'
-  import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
-
-  export default {
-    computed: {
-      ...mapGetters({
-        authUser: 'authUser'
-      })
-    },
-    components: {
-      ChooseAuditor
-    },
-    name: 'oilcatalog',
-
-    data () {
-      var validDate = (rule, value, callback) => {
-        if (!value || !value[0] || !value[1]) {
-          callback(new Error('请选择时间'))
-        } else {
-          callback()
-        }
-      }
-
-      return {
-        dialogVisible: false,
-        chooseAuditorVisible: false,
-        btnName: '打开',
-        showBtn: false,
-        cardTitle: '收入业务',
-        catalogType: '7',
-        addShowTitle: '添加目录',
-        addshow: false,
-        loading: false,
-
-        // 分页参数
-        size: 10,
-        currentPage: 1,
-        currentItemCount: 0,
-
-        // 查询时间
-        CreateOn: null,
-        ValidityDate: null,
-
-        secauditerOptions: [],
-        // 列表数据
-        entityList: [],
-        // 列表排序
-        Column: {
-          Order: '',
-          Prop: ''
-        },
-        // 查询项
-        searchFormReset: {},
-        searchForm: {
-          CompanyName: '',
-          Business: ''
-
-        },
-        rules: {
-          ValidityDate: [{
-            validator: validDate,
-            trigger: 'blur'
-          }]
-        },
-        formData: {
-          Id: '',
-          CatalogType: '7',
-          CompanyName: '',
-          LegalPerson: '',
-          Address: '',
-          USCCode: '',
-          RegCapital: '',
-          RecordScope: '',
-          IDCode: '',
-          Business: '',
-          Remark: '',
-          Status: '',
-          FirstAudit: '',
-          SecondAudit: ''
-        },
-        auditform: {
-          auditer: '',
-          auditerName: '',
-          fushenauditer: '',
-          AuditRemark: ''
-        }
-      }
-    },
-    created () {
-      // this.isAccess()
-      this.initDatas()
-    },
-
-    methods: {
-      submitOilcatalog () {
-        this.dialogVisible = true
-      },
-      chooseAuditorShow () {
-        this.$refs['chooseAuditor'].getorgtreelist('01')
-        this.chooseAuditorVisible = true
-      },
-      setAuditer (val, name) {
-        this.auditform.auditer = val
-        this.auditform.auditerName = name
-        this.chooseAuditorVisible = false
-        this.auditOrgChang(this.auditform.auditer)
-      },
-      auditOrgChang (val) {
-        let auditstepcode = 'SECOND_TRIAL'
-        sipapi.getAuditerByFirst(val, auditstepcode, this.$axios)
-          .then(res => {
-            this.secauditerOptions = res.data.item
-          })
-          .catch(err => {
-            console.error(err)
-          })
-      },
-      showdialog () {
-        this.addshow = true
-      },
-      isAccess () {
-        let params = {
-          RoleId: '10000203'
-        }
-        api.isAccess(params, this.$axios).then(res => {
-          this.showBtn = res.data
-          if (this.showBtn) {
-            this.btnName = '编辑'
-          } else {
-            this.btnName = '打开'
-          }
-        }).catch(err => {
-          console.log(err)
-        })
-      },
-      exportExcel () {
-        if (this.entityList == null || this.entityList.length <= 0) {
-          this.$message({
-            type: 'warning',
-            message: '没有数据可以导出'
-          })
-          return
-        }
-        this.loading = true
-        let params = {
-          CardTitle: this.cardTitle,
-          CatalogType: this.formData.CatalogType
-        }
-        api.exportExcelAll(params, this.$axios).then(res => {
-          this.loading = false
-          let docurl = res.data
-          // 内网服务器专用
-          if (process.client && docurl.indexOf('upfile') === 0) {
-            const myDomain = window.location.host
-            location.href = 'http://' + myDomain + '/' + docurl
-          } else {
-            location.href = 'http://' + docurl
-          }
-        })
-      },
-      addOilcatalog () {
-        this.addshow = true
-        this.formData.Id = ''
-        this.formData.CompanyName = ''
-        this.formData.Business = ''
-        this.formData.Remark = ''
-        this.ValidityDate = null
-      },
-      editOilcatalog (row) {
-        this.addshow = true
-        this.formData.Id = row.Id
-        this.formData.CatalogType = row.CatalogType
-        this.formData.CompanyName = row.CompanyName
-        this.formData.Business = row.Business
-        this.formData.Remark = row.Remark
-        this.ValidityDate = [new Date(row.ValidityFrom), new Date(row.ValidityTo)]
-      },
-      saveOilcatalog () {
-
-        this.formData.RegCapital = parseFloat(this.formData.RegCapital)
-
-        if (this.ValidityDate && this.ValidityDate.length === 2) {
-          this.ValidityDate[1].setHours(23)
-          this.ValidityDate[1].setMinutes(59)
-          this.ValidityDate[1].setSeconds(59)
-          this.formData.ValidityFrom = this.ValidityDate[0]
-          this.formData.ValidityTo = this.ValidityDate[1]
-        }
-        if (this.formData.Id > 0) {
-          this.editEntity()
-        } else {
-          this.addEntity()
-        }
-      },
-      editEntity () {
-        this.$refs['EntityForm'].validate((valid) => {
-          if (valid) {
-            api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
-              if (res.data.code === 0) {
-                this.$message({
-                  type: 'success',
-                  message: res.data.message
-                })
-                this.addshow = false
-                this.initDatas()
-              } else {
-                this.$message({
-                  type: 'warning',
-                  message: res.data.message
-                })
-              }
-            })
-          }
-        })
-      },
-      addEntity () {
-        this.$refs['EntityForm'].validate((valid) => {
-          if (valid) {
-            api.addEntity(this.formData, this.$axios).then(res => {
-              if (res.data.code === 0) {
-                this.$message({
-                  type: 'success',
-                  message: res.data.message
-                })
-                this.addshow = false
-                this.initDatas()
-              } else {
-                this.$message({
-                  type: 'warning',
-                  message: res.data.message
-                })
-              }
-            })
-          }
-        })
-      },
-      initDatas () {
-        // 分页及列表条件
-        let params = {
-          _currentPage: this.currentPage,
-          _size: this.size,
-          Order: this.Column.Order,
-          Prop: this.Column.Prop,
-          CatalogType: this.formData.CatalogType
-        }
-        let myCreateOn = []
-        // 解析时间
-        if (this.CreateOn && 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, params, this.$axios).then(res => {
-          this.entityList = res.data.items
-          this.currentItemCount = res.data.currentItemCount
-        })
-      },
-
-      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.CreateOn = ''
-        this.initDatas()
-      },
-      handleSearch () {
-        this.currentPage = 1
-        this.dialogVisible = false
-        this.initDatas()
-      },
-      handleCurrentChange (value) {
-        this.currentPage = value
-        this.initDatas()
-      },
-      handleSizeChange (value) {
-        this.size = value
-        this.currentPage = 1
-        this.initDatas()
-      },
-      deleteEntity (row) {
-        api.deleteEntity(row.Id, this.$axios).then(res => {
-          if (res.data.code === 0) {
-            this.initDatas()
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            })
-          } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            })
-          }
-        }).catch(err => {
-          console.error(err)
-        })
-      },
-
-      jstimehandle (val) {
-        if (val === '') {
-          return '----'
-        } else if (val === '0001-01-01T08:00:00+08:00') {
-          return '----'
-        } else if (val === '5000-01-01T23:59:59+08:00') {
-          return '永久'
-        } else {
-          val = val.replace('T', ' ')
-          return val.substring(0, 10)
-        }
-      },
-
-      formatDateTime (date) {
-        var y = date.getFullYear()
-        var m = date.getMonth() + 1
-        m = m < 10 ? ('0' + m) : m
-        var d = date.getDate()
-        d = d < 10 ? ('0' + d) : d
-        var h = date.getHours()
-        var minute = date.getMinutes()
-        minute = minute < 10 ? ('0' + minute) : minute
-        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
-      }
-    }
-  }
-</script>
-
-<style lang="scss">
-  .el-pagination {
-    margin: 1rem 0 2rem;
-    text-align: right;
-  }
-</style>

+ 3 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/oilcatalog/income.vue

@@ -38,9 +38,6 @@
             </el-dropdown>
           </el-form-item>
           <el-form-item>
-            <router-link :to="'/oilsupplier/oilcatalog/_opera/incomeedit'">
-              <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">收入业务申请</el-button>
-            </router-link>
             <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel">导出</el-button>
           </el-form-item>
         </el-form>
@@ -48,7 +45,7 @@
       <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby" size="mini">
         <el-table-column label="操作" min-width="100px" align="center" fixed="right">
           <template slot-scope="scope">
-            <el-button type="primary" size="mini" @click="editOilcatalog(scope.row)" plain>{{btnName}}</el-button>
+            <!--<el-button type="primary" size="mini" @click="editOilcatalog(scope.row)" plain>{{btnName}}</el-button>-->
             <el-popover placement="top" title="提示">
               <el-alert
                 title=""
@@ -315,7 +312,8 @@
           _size: this.size,
           Order: this.Column.Order,
           Prop: this.Column.Prop,
-          CatalogType: this.formData.CatalogType
+          CatalogType: this.formData.CatalogType,
+          Status: '2'
         }
         let myCreateOn = []
         // 解析时间

+ 709 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/oilcatalogsub/_opera/incomeedit.vue

@@ -0,0 +1,709 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/oilcatalogsub' }">收入业务</el-breadcrumb-item>
+      <el-breadcrumb-item>添加</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card">
+      <div slot="header">
+        <div slot="header">
+          <span><i class="icon icon-table2"></i></span>
+          <span style="float: right;">
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="saveEntity" v-if="isEdit && formData.Status <= 0">保存信息</el-button>
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="submitEntity" v-if="isEdit && formData.Status <= 0">提交审批</el-button>
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="approvalEntity" v-if="auditBtn && formData.Status == 1">初审</el-button>
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="approvalEntity" v-if="auditBtn && formData.Status == 2">复审</el-button>
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="approvalEntity" v-if="auditBtn && formData.Status == 5">审批</el-button>
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="auhistory">审批流程</el-button>
+            <router-link :to="'/oilsupplier/oilcatalogsub'">
+            <el-button type="warning" size="mini" style="margin-left:10px; margin-top: -4px;" v-if="isEdit && formData.Status <= 0">返回</el-button>
+          </router-link>
+          </span>
+        </div>
+      </div>
+
+      <el-form label-width="150px" ref="EntityForm" :model="formData" :disabled="formData.Status > 0">
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="提交人" prop="Submitter">
+              <el-input v-model="formData.Submitter" :readonly="true" placeholder="请输入" style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+          <!--<el-col :span="6">-->
+            <!--<el-form-item label="提交单位" prop="DeptId">-->
+              <!--<el-select filterable v-model="formData.DeptId" maxlength="255" clearable placeholder="请选择分办单位"-->
+                         <!--style="width: 100%" >-->
+                <!--<el-option v-for="item in organizeOption" :key="item.Id" :label="item.Fullname" :value="item.Id">-->
+                <!--</el-option>-->
+              <!--</el-select>-->
+            <!--</el-form-item>-->
+          <!--</el-col>-->
+          <el-col :span="8">
+            <el-form-item label="初审人员" prop="FirstAuditName" :rules="{ required: true, message: '初审人员不能为空', trigger: 'change'}">
+              <el-input ref="selectAuditer" readonly v-model="formData.FirstAuditName" placeholder="请选择初审人">
+                <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow" :readonly="formData.Status > 0"></el-button>
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="复审人员" prop="SecondAudit" :rules="{ required: true, message: '复审人员不能为空', trigger: 'change'}">
+              <el-select ref="secondAudit" v-model="formData.SecondAudit" placeholder="请选择复审人" style="width: 100%" filterable
+                         allow-create default-first-option :disabled="formData.Status > 0">
+                <el-option v-for="item in secauditerOptions" :key="item.Id" :label="item.Realname" :value="item.Id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="16">
+            <el-form-item label="备注" prop="Remark">
+              <el-input  type="textarea" v-model="formData.Remark"
+                        placeholder="请输入">
+              </el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </el-card>
+    <el-card class="box-card">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 明细
+          <span style="float: right;">
+            <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="addItems" v-if="isEdit && formData.Status <= 0">添加明细</el-button>
+          </span>
+        </span>
+      </div>
+      <el-table :data="entityList" border style="width: 100%" size="mini">
+        <el-table-column label="操作" width="150px" align="center" fixed="right">
+          <template slot-scope="scope">
+            <el-button type="primary" size="mini" @click="editOilcatalog(scope.row)" plain>编辑</el-button>
+            <el-popover placement="top" title="提示">
+              <el-alert
+                title=""
+                description="确认要删除吗?"
+                type="warning"
+                :closable="false">
+              </el-alert>
+              <br/>
+              <div style="text-align: right; margin: 0">
+                <el-button type="danger" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
+              </div>
+              <el-button slot="reference" type="danger" title="删除" style="margin-left:10px" size="mini" plain v-if="isEdit && scope.row.Status == 0">删除</el-button>
+            </el-popover>
+          </template>
+
+        </el-table-column>
+        <!--<el-table-column sortable min-width="80" align="center" show-overflow-tooltip prop="SupplierName" label="序号"></el-table-column>-->
+        <el-table-column sortable width="120" align="center" show-overflow-tooltip prop="CompanyName" label="企业名称"></el-table-column>
+        <el-table-column sortable width="100" align="center" show-overflow-tooltip prop="LegalPerson" label="法人姓名"></el-table-column>
+        <el-table-column sortable width="120" align="center" show-overflow-tooltip prop="IDCode" label="法人身份证号"></el-table-column>
+        <el-table-column sortable width="120" align="center" show-overflow-tooltip prop="Address" label="企业注册地址"></el-table-column>
+        <el-table-column sortable width="150" align="center" show-overflow-tooltip prop="USCCode" label="全国统一信用代码"></el-table-column>
+        <el-table-column sortable width="100" align="center" show-overflow-tooltip prop="RegCapital" label="注册资本"></el-table-column>
+        <el-table-column sortable width="655" align="center" show-overflow-tooltip prop="RecordScope" label="申请备案范围"></el-table-column>
+        <el-table-column sortable width="100" align="center" show-overflow-tooltip prop="Remark" label="备注"></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>
+
+    <choose-auditor ref="chooseAuditor"
+                    @close="setAuditer"
+                    @hideChooseAuditer="chooseAuditorVisible=false"
+                    :visible="chooseAuditorVisible"></choose-auditor>
+
+
+    <el-dialog title="添加收入业务目录"
+               :visible.sync="showadddialog"
+               width="60%">
+      <el-form label-width="135px" ref="IncomeEntity" :model="incomeData" :rules="rules" :disabled="incomeData.Status != 0">
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="企业名称" prop="CompanyName">
+              <el-input v-model="incomeData.CompanyName" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="法人姓名" prop="LegalPerson">
+              <el-input v-model="incomeData.LegalPerson" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="法人身份证号" prop="IDCode">
+              <el-input v-model="incomeData.IDCode" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="注册地址" prop="Address">
+              <el-input v-model="incomeData.Address" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="全国统一信用代码" prop="USCCode">
+              <el-input v-model="incomeData.USCCode" :maxlength="255" placeholder="请输入" style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col><el-col :span="12">
+          <el-form-item label="注册资金" prop="RegCapital">
+            <el-input type="number" v-model.number="incomeData.RegCapital" :min="1" placeholder="请输入" style="width: 100%">
+              <template slot="append">万元</template>
+            </el-input>
+          </el-form-item>
+        </el-col>
+          <el-col :span="24">
+            <el-form-item label="申请备案范围" prop="RecordScope">
+              <el-input v-model="incomeData.RecordScope"  type="textarea" style="width: 100%"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item label="备注">
+              <el-input v-model="incomeData.Remark"  placeholder="请输入" type="textarea" style="width: 100%">
+              </el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="24">
+            <el-form-item style="text-align: center;">
+              <el-button type="primary" size="mini" @click="saveOilcatalog" v-if="incomeData.Status == 0">保存</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </el-dialog>
+    <el-dialog title="审批流程" :visible.sync="audithistoryshow" width="1200px">
+      <wf-multi-history :entryinfo="entrydetail"></wf-multi-history>
+    </el-dialog>
+
+    <el-dialog title="审核" :visible.sync="dialogMakeSure">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+
+        <el-form-item label="审核状态">
+          <template>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1">通过</el-radio>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2">退回</el-radio>
+          </template>
+        </el-form-item>
+        <el-form-item prop="AuditorRemark" label="意见"
+                      :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审批意见"
+                    minlength="20"></el-input>
+        </el-form-item>
+
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogMakeSure = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+  import { mapGetters } from 'vuex'
+  import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
+  import sipapi from '@/api/oilsupplier/supplier'
+  import api from '@/api/oilsupplier/oilcatalogsub'
+  import catapi from '@/api/oilsupplier/oilcatalog'
+  import WfMultiHistory from '@/components/workflow/wfmultihistory.vue'
+  import apiCert from '@/api/oilsupplier/suppliercert'
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    components: {
+      ChooseAuditor,
+      WfMultiHistory
+    },
+    name: 'incomeedit',
+
+    data () {
+      /// 注册资金限制
+      var checkMoney = (rule, value, callback) => {
+        if (value < 0) {
+          callback(new Error('注册资金不能小于0'))
+        } else {
+          callback()
+        }
+      }
+
+      var checkLegalPersonId = (rule, value, callback) => {
+        if (value === '') {
+          callback(new Error('请输入身份证号'))
+        } else {
+          let re1 = /(^\d{18}$)|(^\d{17}(\d|X|x)$)/
+          if (!re1.test(this.incomeData.IDCode)) {
+            callback(new Error('请输入正确格式的法定代表人身份证号'))
+          } else {
+            callback()
+          }
+        }
+      }
+      var checkCommercialNo = (rule, value, callback) => {
+        if (value === '') {
+          callback(new Error('请输入统一社会信用代码'))
+        } else {
+          let re4 = /^[^_IOZSVa-z\W]{2}\d{6}[^_IOZSVa-z\W]{10}$/g
+          if (!re4.test(this.incomeData.USCCode)) {
+            callback(new Error('请填写正确的18位统一社会信用代码'))
+          } else {
+            callback()
+          }
+        }
+      }
+
+      return {
+        dialogMakeSure: false,
+        audithistoryshow: false,
+        chooseAuditorVisible: false,
+        showadddialog: false,
+        auditBtn: false,
+        isEdit: true,
+
+        auditstepcode: '',
+        // 分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        // 列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+
+        organizeOption: [],
+        secauditerOptions: [],
+        entityList: [],
+
+        shenheForm: {
+          SuccessStatus: 1,
+          AuditorRemark: '',
+          AnnualId: 0
+        },
+        entrydetail: {
+          process: 'oil_catalog',
+          business: '',
+          instance: ''
+        },
+        formData: {
+          Id: '',
+          Status: '',
+          SubmitterId: '',
+          Submitter: '',
+          DeptId: '',
+          Dept: '',
+          FirstAudit: '',
+          FirstAuditName: '',
+          SecondAudit: '',
+          SecondAuditName: '',
+          Remark: '',
+          WorkflowId: '',
+          BusinessKey: '',
+          ProcessKey: '',
+          CreateUserId: ''
+        },
+        incomeData: {
+          Id: '',
+          SubId: '',
+          CatalogType: 7,
+          CompanyName: '',
+          LegalPerson: '',
+          Address: '',
+          USCCode: '',
+          RegCapital: '',
+          RecordScope: '',
+          IDCode: '',
+          Business: '',
+          Remark: '',
+          Status: '',
+          FirstAudit: '',
+          SecondAudit: ''
+        },
+        rules: {
+          CompanyName: [
+            { required: true, message: '供方名称不能为空', trigger: 'blur' }
+          ],
+          LegalPerson: [
+            { required: true, message: '法人姓名不能为空', trigger: 'blur' }
+          ],
+          IDCode: [
+            { required: true, validator: checkLegalPersonId, trigger: 'change' }
+          ],
+          Address: [
+            { required: true, message: '注册地址不能为空', trigger: 'blur' }
+          ],
+          USCCode: [
+            { required: true, validator: checkCommercialNo, trigger: 'change' }
+          ],
+          RegCapital: [
+            { required: true, validator: checkMoney, trigger: 'change' },
+            { type: 'number', message: '只能输入数字', trigger: 'blur' }
+          ],
+          RecordScope: [
+            { required: true, message: '申请备案范围不能为空', trigger: 'blur' }
+          ]
+        }
+      }
+    },
+    created () {
+      this.formData.SubmitterId = this.authUser.Profile.Id
+      this.formData.Submitter = this.authUser.Profile.Realname
+      this.getDictOptions()
+
+      this.serviceId = this.$route.params.opera
+      if (this.serviceId !== 'add' && this.serviceId > 0) {
+        this.formData.Id = this.serviceId
+        this.initDatas()
+      } else {
+        this.formData.Id = 0
+      }
+    },
+    methods: {
+      // 审批
+      approvalEntity () {
+        this.dialogMakeSure = true
+      },
+      makeSure () {
+        let params = this.shenheForm
+        api.auditEntity(this.formData.Id, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.initDatas()
+            this.dialogMakeSure = false
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.applyLoading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      isAccess () {
+        let params = {
+          id: this.formData.Id,
+          auditstepcode: this.auditstepcode,
+          processkey: this.formData.ProcessKey
+        }
+        apiCert.isAccess(params, this.$axios).then(res => {
+          this.auditBtn = res.data
+        }).catch(err => {
+          console.log(err)
+        })
+      },
+
+      // 审批流程
+      auhistory () {
+        this.audithistoryshow = true
+      },
+      submitEntity () {
+        if (this.formData.Id === 0) {
+          this.$message({
+            type: 'warning',
+            message: '请先保存审批信息!'
+          })
+          return
+        }
+        if (this.entityList == null || this.entityList.length === 0) {
+          this.$message({
+            type: 'warning',
+            message: '没有录入收入业务目录,不允许提交'
+          })
+          return
+        }
+        this.$confirm('确定提交申请', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          api.commitAudit(this.formData.Id, this.$axios).then(res => {
+            if (res.data.code === 0) {
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+              this.showadddialog = false
+              this.initDatas()
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+        })
+      },
+      editOilcatalog (val) {
+        this.incomeData.Id = val.Id
+        this.incomeData.SubId = val.SubId
+        this.incomeData.CatalogType = val.CatalogType
+        this.incomeData.CompanyName = val.CompanyName
+        this.incomeData.LegalPerson = val.LegalPerson
+        this.incomeData.Address = val.Address
+        this.incomeData.USCCode = val.USCCode
+        this.incomeData.RegCapital = val.RegCapital
+        this.incomeData.RecordScope = val.RecordScope
+        this.incomeData.IDCode = val.IDCode
+        this.incomeData.Business = val.Business
+        this.incomeData.ProcessKey = val.ProcessKey
+        this.incomeData.Status = val.Status
+        this.showadddialog = true
+      },
+      addItems () {
+        if (this.formData.Id === 0) {
+          this.$message({
+            type: 'warning',
+            message: '请先保存审批信息!'
+          })
+          return
+        }
+        this.showadddialog = true
+      },
+
+      chooseAuditorShow () {
+        this.$refs['chooseAuditor'].getorgtreelist('01')
+        this.chooseAuditorVisible = true
+      },
+      setAuditer (val, name) {
+        this.formData.FirstAudit = val
+        this.formData.FirstAuditName = name
+        this.chooseAuditorVisible = false
+        this.auditOrgChang(this.formData.FirstAudit)
+      },
+      auditOrgChang (val) {
+        let auditstepcode = 'SECOND_TRIAL'
+        sipapi.getAuditerByFirst(val, auditstepcode, this.$axios)
+          .then(res => {
+            this.secauditerOptions = res.data.item
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+
+      getDictOptions () {
+        let params = {
+
+        }
+        sipapi.getDictListByStatus(params, this.$axios).then(res => {
+          this.organizeOption = res.data.items['Allunitorglist']
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      saveOilcatalog () {
+        // this.incomeData.RegCapital = parseFloat(this.incomeData.RegCapital)
+        this.incomeData.SubId = this.formData.Id
+        if (this.incomeData.Id > 0) {
+          this.editOilcatalogEntity()
+        } else {
+          this.addOilcatalogEntity()
+        }
+      },
+      editOilcatalogEntity () {
+        this.$refs['IncomeEntity'].validate((valid) => {
+          if (valid) {
+            catapi.updateEntity(this.incomeData.Id, this.incomeData, this.$axios).then(res => {
+              if (res.data.code === 0) {
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+                this.showadddialog = false
+                this.initincomeDatas()
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            })
+          }
+        })
+      },
+      addOilcatalogEntity () {
+        let _this = this
+        _this.$refs['IncomeEntity'].validate((valid) => {
+          if (valid) {
+            catapi.addEntity(_this.incomeData, _this.$axios).then(res => {
+              if (res.data.code === 0) {
+                _this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+                _this.initincomeDatas()
+                _this.showadddialog = false
+              } else {
+                _this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            })
+          }
+        })
+      },
+
+      initDatas () {
+        if (this.formData.Id) {
+          api.getEntity(this.formData.Id, this.$axios).then(res => {
+            this.formData = res.data
+            this.entrydetail.business = this.formData.Id
+            this.entrydetail.process = this.formData.ProcessKey
+            this.entrydetail.instance = this.formData.WorkflowId
+            this.auditOrgChang(this.formData.FirstAudit)
+            this.initincomeDatas()
+
+            if (this.formData.Status === '1') {
+              this.auditstepcode = 'FIRST_TRIAL'
+            } else if (this.formData.Status === '2') {
+              this.auditstepcode = 'SECOND_TRIAL'
+            } else if (this.formData.Status === '5') {
+              this.auditstepcode = 'PROF_REGULATION'
+            }
+            if (this.formData.CreateUserId != '') {
+              if (this.authUser.Profile.Id != this.formData.CreateUserId) {
+                this.isEdit = false
+              }
+            }
+            this.isAccess()
+          }).catch(err => {
+            console.error(err)
+          })
+        }
+      },
+      initincomeDatas () {
+        // 分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+          CatalogType: '7',
+          SubId: this.formData.Id
+        }
+        let myCreateOn = []
+        // 查询条件
+        catapi.getList(myCreateOn, params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+        })
+      },
+
+      saveEntity () {
+        this.$refs['EntityForm'].validate((valid) => {
+          if (valid) {
+            this.formData.SecondAuditName = this.$refs.secondAudit.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)
+        })
+      },
+
+      deleteEntity (row) {
+        catapi.deleteEntity(row.Id, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.initincomeDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      // 列表排序功能
+      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.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()
+      }
+
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>

+ 266 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/oilcatalogsub/index.vue

@@ -0,0 +1,266 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item></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>
+        <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="SubmitOn" 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="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+          <el-form-item>
+            <router-link :to="'/oilsupplier/oilcatalogsub/add/incomeedit'">
+              <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">收入业务申请</el-button>
+            </router-link>
+          </el-form-item>
+        </el-form>
+      </div>
+      <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" size="mini">
+        <el-table-column label="操作" min-width="100px" align="center" fixed="right">
+          <template slot-scope="scope">
+            <router-link :to="'/oilsupplier/oilcatalogsub/' + scope.row.Id + '/incomeedit'">
+              <el-button type="primary" plain title="打开" size="mini">打开</el-button>
+            </router-link>
+            <el-popover placement="top" title="提示">
+              <el-alert title="" description="确认要删除吗?" type="warning" :closable="false">
+              </el-alert>
+              <br/>
+              <div style="text-align: right; margin: 0">
+                <el-button type="danger" size="mini" @click="deleteEntityanditems(scope.row)">删除</el-button>
+              </div>
+              <el-button slot="reference" type="danger" plain title="删除" style="margin-left:10px" size="mini"
+                        v-if="scope.row.Status <= 0">删除</el-button>
+            </el-popover>
+          </template>
+
+        </el-table-column>
+        <!--<el-table-column sortable min-width="80" align="center" show-overflow-tooltip prop="SupplierName" label="序号"></el-table-column>-->
+        <el-table-column sortable width="120" align="center" show-overflow-tooltip prop="Status" label="审批状态">
+          <template slot-scope="scope">
+            <span v-if="scope.row.Status=='0' || scope.row.Status==''" style="color:#E6A23C">待提交</span>
+            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">待初审</span>
+            <span v-if="scope.row.Status=='-1'" style="color:#F56C6C">初审未通过</span>
+            <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待复审</span>
+            <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">复审未通过</span>
+            <span v-if="scope.row.Status=='3'" style="color:#E6A23C">待专业处室分办</span>
+            <span v-if="scope.row.Status=='4'" style="color:#E6A23C">待专业处室审批</span>
+            <span v-if="scope.row.Status=='-4'" style="color:#F56C6C">专业处室审批未通过</span>
+            <span v-if="scope.row.Status=='5'" style="color:#E6A23C">企管法规处审批</span>
+            <span v-if="scope.row.Status=='-5'" style="color:#F56C6C">企管法规处审批未通过</span>
+            <span v-if="scope.row.Status=='11'" style="color:#67C23A">审批通过</span>
+          </template>
+        </el-table-column>
+        <el-table-column sortable width="100" align="center" show-overflow-tooltip prop="Submitter" label="申请人"></el-table-column>
+        <el-table-column sortable width="100" align="center" show-overflow-tooltip prop="CreateOn" label="创建时间">
+          <template slot-scope="scope" >
+            <span>{{ jstimehandle(scope.row.CreateOn+'') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column sortable width="100" align="center" show-overflow-tooltip prop="SubmitOn" label="提交时候">
+          <template slot-scope="scope" >
+            <span>{{ jstimehandle(scope.row.SubmitOn+'') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column sortable min-width="120" align="center" show-overflow-tooltip prop="Remark" label="备注"></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>
+
+  </div>
+</template>
+<script>
+  import { mapGetters } from 'vuex'
+  import api from '@/api/oilsupplier/oilcatalogsub'
+
+  export default {
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'oilcatalog',
+
+    data () {
+      return {
+
+        // 分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+
+        // 查询时间
+        CreateOn: null,
+        SubmitOn: null,
+
+        secauditerOptions: [],
+        // 列表数据
+        entityList: [],
+        // 列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        // 查询项
+        searchFormReset: {},
+        searchForm: {
+        }
+      }
+    },
+    created () {
+      // this.isAccess()
+      this.initDatas()
+    },
+
+    methods: {
+      initDatas () {
+        // 分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop
+        }
+        let myCreateOn = []
+        // 解析时间
+        if (this.SubmitOn && this.SubmitOn.length === 2) {
+          this.SubmitOn[1].setHours(23)
+          this.SubmitOn[1].setMinutes(59)
+          this.SubmitOn[1].setSeconds(59)
+          myCreateOn.push(this.formatDateTime(this.SubmitOn[0]))
+          myCreateOn.push(this.formatDateTime(this.SubmitOn[1]))
+        }
+        // 查询条件
+        Object.assign(params, this.searchForm)
+        api.getList(myCreateOn, params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          this.currentItemCount = res.data.currentItemCount
+        })
+      },
+      deleteEntityanditems (row) {
+        api.deleteEntityAndItems(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)
+        })
+      },
+
+      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.CreateOn = ''
+        this.initDatas()
+      },
+      handleSearch () {
+        this.currentPage = 1
+        this.dialogVisible = false
+        this.initDatas()
+      },
+      handleCurrentChange (value) {
+        this.currentPage = value
+        this.initDatas()
+      },
+      handleSizeChange (value) {
+        this.size = value
+        this.currentPage = 1
+        this.initDatas()
+      },
+      deleteEntity (row) {
+        api.deleteEntity(row.Id, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      jstimehandle (val) {
+        if (val === '') {
+          return '----'
+        } else if (val === '0001-01-01T00:00:00Z') {
+          return '----'
+        } else if (val === '0001-01-01T08:00:00+08:00') {
+          return '----'
+        } else if (val === '5000-01-01T23:59:59+08:00') {
+          return ''
+        } else {
+          val = val.replace('T', ' ')
+          return val.substring(0, 10)
+        }
+      },
+
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
+      }
+    }
+  }
+</script>
+
+<style lang="scss">
+  .el-pagination {
+    margin: 1rem 0 2rem;
+    text-align: right;
+  }
+</style>