2
3
فهرست منبع

准入审批流程

lining 6 سال پیش
والد
کامیت
0f2ec59ebf
17فایلهای تغییر یافته به همراه432 افزوده شده و 192 حذف شده
  1. 1 0
      src/dashoo.cn/backend/api/business/oilsupplier/supplier/oilsupplier.go
  2. 1 0
      src/dashoo.cn/backend/api/business/oilsupplier/suppliercertsub/oilsuppliercertsub.go
  3. 39 7
      src/dashoo.cn/backend/api/business/oilsupplier/suppliercertsub/oilsuppliercertsubService.go
  4. 2 0
      src/dashoo.cn/backend/api/business/workflow/workflow.go
  5. 17 8
      src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go
  6. 52 6
      src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go
  7. 4 5
      src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertsub.go
  8. 26 0
      src/dashoo.cn/backend/api/controllers/system/auditsetting.go
  9. 4 3
      src/dashoo.cn/frontend_web/src/api/oilsupplier/supplier.js
  10. 10 3
      src/dashoo.cn/frontend_web/src/api/oilsupplier/suppliercert.js
  11. 16 12
      src/dashoo.cn/frontend_web/src/components/oilsupplier/auditbuslist.vue
  12. 65 66
      src/dashoo.cn/frontend_web/src/components/oilsupplier/businesslist.vue
  13. 1 1
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue
  14. 1 1
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue
  15. 66 26
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/basisedit.vue
  16. 62 29
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/goodsedit.vue
  17. 65 25
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/techedit.vue

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

@@ -117,5 +117,6 @@ type OilSupplierView struct {
 	ImportFlag        string    `xorm:"comment('进口采购') VARCHAR(255)"`
 	OutsideFlog       string    `xorm:"comment('境外项目') VARCHAR(255)"`
 	Remark            string    `xorm:"comment('备注') VARCHAR(500)"`
+	ThirdAudit        string    `xorm:"comment('备注') VARCHAR(500)"`
 	IsDelete          int       `xorm:"default 0 comment('删除状态,0正常,1已删除') INT(10)"`
 }

+ 1 - 0
src/dashoo.cn/backend/api/business/oilsupplier/suppliercertsub/oilsuppliercertsub.go

@@ -46,6 +46,7 @@ type OilSupplierOpinion struct {
 	SupplierCertSubId int       `xorm:"not null comment('供方对应准入子分类表') INT(10)"`
 	CertSubName       string    `xorm:"VARCHAR(50)"`
 	Opinion           string    `xorm:"not null default '' comment('分类编码') VARCHAR(500)"`
+	Status            string    `xorm:"comment('状态标识( 0 初始 - 1待二级初审 - 2待二级复审 - 3-专业科室接收 4 待专业科室审核 - 5 待集中评审 - 6 待交费 - 7 待入库 - 8 完成)') VARCHAR(5)"`
 	Remark            string    `xorm:"comment('备注') VARCHAR(500)"`
 	AuditStatus       int       `xorm:"TINYINT(4)"`
 	AuditorId         int       `xorm:"INT(10)"`

+ 39 - 7
src/dashoo.cn/backend/api/business/oilsupplier/suppliercertsub/oilsuppliercertsubService.go

@@ -19,6 +19,42 @@ func GetOilSupplierCertSubService(xormEngine *xorm.Engine) *OilSupplierCertSubSe
 	return s
 }
 
+////获取待审核业务列表
+//func (s *OilSupplierCertSubService) GetWaitAuditBusinesslist(pageIndex, itemsPerPage int64, order string, certsub, orgsetting string, where string) (int64, []OilSupplierCertSub) {
+//	var err error
+//	var total int64
+//	if where == "" {
+//		where = " 1=1 "
+//	}
+//	//获取总记录数
+//	sqlCount := `select count(*) from ` + certsub + ` a
+//	left join ` + orgsetting + ` b on a.SubClassId=b.ClassId and a.SupplierTypeCode = b.SupplierTypeCode
+//	left join Base_User c on b.OrganizeId = c.DepartmentId
+//	where ` + where
+//	var sql string
+//	sql = `select a.*
+//	from ` + certsub + ` a
+//	left join ` + orgsetting + ` b on a.SubClassId=b.ClassId and a.SupplierTypeCode = b.SupplierTypeCode
+//	left join Base_User c on b.OrganizeId = c.DepartmentId
+//	where ` + where + ` order by ` + order +
+//		` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)
+//
+//	List := make([]OilSupplierCertSub, 0)
+//	utils.DBE.Sql(sql).Find(&List)
+//
+//	resultsSlice, err := s.DBE.Query(sqlCount)
+//	LogError(err)
+//	if len(resultsSlice) > 0 {
+//		results := resultsSlice[0]
+//		for _, value := range results {
+//			total, err = strconv.ParseInt(string(value), 10, 64)
+//			LogError(err)
+//			break
+//		}
+//	}
+//	return total, List
+//}
+
 //获取待审核业务列表
 func (s *OilSupplierCertSubService) GetWaitAuditBusinesslist(pageIndex, itemsPerPage int64, order string, certsub, orgsetting string, where string) (int64, []OilSupplierCertSub) {
 	var err error
@@ -27,15 +63,11 @@ func (s *OilSupplierCertSubService) GetWaitAuditBusinesslist(pageIndex, itemsPer
 		where = " 1=1 "
 	}
 	//获取总记录数
-	sqlCount := `select count(*) from ` + certsub + ` a 
-	left join ` + orgsetting + ` b on a.SubClassId=b.ClassId and a.SupplierTypeCode = b.SupplierTypeCode
-	left join Base_User c on b.OrganizeId = c.DepartmentId
+	sqlCount := `select count(*) from ` + certsub + ` a
 	where ` + where
 	var sql string
 	sql = `select a.*
-	from ` + certsub + ` a 
-	left join ` + orgsetting + ` b on a.SubClassId=b.ClassId and a.SupplierTypeCode = b.SupplierTypeCode
-	left join Base_User c on b.OrganizeId = c.DepartmentId
+	from ` + certsub + ` a
 	where ` + where + ` order by ` + order +
 		` limit ` + utils.ToStr((pageIndex-1)*itemsPerPage) + "," + utils.ToStr(itemsPerPage)
 
@@ -53,4 +85,4 @@ func (s *OilSupplierCertSubService) GetWaitAuditBusinesslist(pageIndex, itemsPer
 		}
 	}
 	return total, List
-}
+}

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

@@ -78,6 +78,8 @@ const (
 
 	//业务处室专业审核
 	PROF_AUDIT string = "PROF_AUDIT"
+	// 集中审批
+	PROF_CONCENT string = "PROF_CONCENT"
 
 	//年审流程图
 	OIL_AUDIT_APPLY string = "oil_audit_apply"

+ 17 - 8
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1031,9 +1031,11 @@ func (this *OilSupplierController) GetDictList() {
 // @Title 获取字典列表By Status
 // @Description get user by token
 // @Success 200 {object} map[string]interface{}
-// @router /dictlistbystatus/:status [get]
+// @router /dictlistbystatus/ [get]
 func (this *OilSupplierController) GetDictListByStatus() {
-	status := this.Ctx.Input.Param(":status")
+	//status := this.Ctx.Input.Param(":status")
+	status := this.GetString("status")
+	majorAduit := this.GetString("majorAduit")
 	dictList := make(map[string]interface{})
 	dictSvc := items.GetItemsService(utils.DBE)
 	userSvc := baseUser.GetBaseUserService(utils.DBE)
@@ -1067,20 +1069,26 @@ func (this *OilSupplierController) GetDictListByStatus() {
 	var users []userRole.Base_RoleList
 	var auditWorkflow auditsetting.Base_OilAuditSetting
 	rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
-	if status == "1" {
+	if status == suppliercert.FIRST_TRIAL_STATUS {
 		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, this.User.DepartmentId, workflow.SECOND_TRIAL, &auditWorkflow)
 		users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), this.User.AccCode) //
 		dictList["Auditer"] = users
-	} else if status == "3" {
-		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, "100000172", workflow.PROF_RECE, &auditWorkflow)
+	} else if status == suppliercert.SECOND_TRIAL_STATUS {
+		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, this.User.DepartmentId, workflow.SECOND_TRIAL, &auditWorkflow)
+	} else if status == suppliercert.THIRD_TRIAL_STATUS {
+		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, majorAduit, workflow.PROF_RECE, &auditWorkflow)
 		users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), "")
 		dictList["Auditer"] = users
-	} else if status == "4" {
-		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, "100000172", workflow.PROF_AUDIT, &auditWorkflow)
+	} else if status == suppliercert.PROF_AUDIT_STATUS {
+		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, this.User.DepartmentId, workflow.PROF_AUDIT, &auditWorkflow)
 		users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), "")
 		dictList["Auditer"] = users
+	} else if status == suppliercert.CENT_AUDIT_STATUS {
+
 	}
 
+	// 获取当
+
 	var datainfo DataInfo
 	datainfo.Items = dictList
 	this.Data["json"] = &datainfo
@@ -1114,7 +1122,8 @@ func (this *OilSupplierController) GetEntityAndCert() {
 	svc.GetEntityByIdBytbl(OilSupplierName, Id, &model)
 
 	var sql string
-	sql = `select a.*, b.Id as CertId, b.AccessCardNo, b.SupplierTypeCode, b.SupplierTypeName, b.Step, b.WorkerTotal, b.ContractNum, b.UniversityNum, b.TechnicalNum, b.AboveProfNum, b.MiddleProfNum, b.NationalRegNum, b.NationalCertTotal, b.DesignerTotal, b.SkillerTotal, b.WorkflowId, b.Status from ` + OilSupplierName + ` a `
+	sql = `select a.*, b.Id as CertId, b.AccessCardNo, b.SupplierTypeCode, b.SupplierTypeName, b.Step, b.WorkerTotal, b.ContractNum, b.UniversityNum, b.TechnicalNum, b.AboveProfNum, 
+         b.MiddleProfNum, b.NationalRegNum, b.NationalCertTotal, b.DesignerTotal, b.SkillerTotal, b.WorkflowId, b.Status, b.ThirdAudit from ` + OilSupplierName + ` a `
 	sql += ` left join ` + OilSupplierCertName + " b on b.SupplierId = a.Id"
 	sql += ` where b.Id ='` + Id + `'`
 	utils.DBE.SQL(sql).Get(&model)

+ 52 - 6
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -690,6 +690,7 @@ func (this *OilSupplierCertController) AuditEntityappend() {
 func (this *OilSupplierCertController) AuditEntityFir() {
 	certId := this.Ctx.Input.Param(":id")
 	auditer := this.GetString("auditer")
+	majorDept := this.GetString("majorDept")
 
 	//取出审批列表
 	certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
@@ -718,9 +719,16 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 	//remarks := ""
 	step := 2
 	status := ""
+	var users string
 	if supplierCertEntity.Status == "1" {
+		users = auditer
 		status = suppliercert.SECOND_TRIAL_STATUS
 		step = 2
+		supplierCertEntity.ThirdAudit,_ = strconv.Atoi(majorDept)
+		cols := []string{
+			"ThirdAudit",
+		}
+		certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
 	} else if supplierCertEntity.Status == "2" {
 		status = suppliercert.THIRD_TRIAL_STATUS
 		step = 2
@@ -728,13 +736,14 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 		var users1 []userRole.Base_RoleList
 		var auditWorkflow1 auditsetting.Base_OilAuditSetting
 		rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
-		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, "100000172", workflow.PROF_RECE, &auditWorkflow1)
+		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, strconv.Itoa(supplierCertEntity.ThirdAudit), workflow.PROF_RECE, &auditWorkflow1)
 		users1 = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow1.RoleId), this.User.AccCode)
 		for _, tmpUser := range users1 {
-			auditer += strconv.FormatInt(tmpUser.Id, 10) + ","
+			users += strconv.FormatInt(tmpUser.Id, 10) + ","
 		}
-		auditer = strings.Trim(auditer, ",")
+		users = strings.Trim(users, ",")
 	} else if supplierCertEntity.Status == "3" {
+		users = auditer
 		status = suppliercert.PROF_AUDIT_STATUS
 		step = 2
 	} else if supplierCertEntity.Status == "4" {
@@ -745,10 +754,11 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 		rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
 		users1 = rsvc.GetUserByRole("10000204", this.User.AccCode)
 		for _, tmpUser := range users1 {
-			auditer += strconv.FormatInt(tmpUser.Id, 10) + ","
+			users += strconv.FormatInt(tmpUser.Id, 10) + ","
 		}
-		auditer = strings.Trim(auditer, ",")
+		users = strings.Trim(users, ",")
 	} else if supplierCertEntity.Status == "5" {
+		users = auditer
 		status = suppliercert.PAYING_AUDIT_STATUS
 		step = 3
 	}
@@ -757,7 +767,7 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 	var ActiComplete workflow.ActiCompleteVM
 	ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_APPLY
 	ActiComplete.BusinessKey = certId
-	ActiComplete.UserNames = auditer
+	ActiComplete.UserNames = users
 	ActiComplete.UserId = this.User.Id
 	ActiComplete.Remarks = dataother.AuditorRemark
 	ActiComplete.CallbackUrl = ""
@@ -842,3 +852,39 @@ func (this *OilSupplierCertController) AuditCallback() {
 	svc.UpdateEntityByIdCols(id, supplierCertEntity, cols)
 	fmt.Println(id, status, step)
 }
+
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} controllers.Request
+// @router /isaccess [get]
+func (this *OilSupplierCertController) IsAccess() {
+	auditstepcode := this.GetString("auditstepcode")
+
+	var users []userRole.Base_RoleList
+	var auditWorkflow auditsetting.Base_OilAuditSetting
+	rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
+	res := false
+
+	if auditstepcode == workflow.PROF_CONCENT {
+		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, this.User.DepartmentId, workflow.PROF_AUDIT, &auditWorkflow)
+		users = rsvc.GetUserByRole("10000204", this.User.AccCode)
+		for _, user := range users {
+			if this.User.Id == strconv.Itoa(int(user.Id))  {
+				res = true
+				break
+			}
+		}
+	} else {
+		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, this.User.DepartmentId, auditstepcode, &auditWorkflow)
+		users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), this.User.AccCode)
+		for _, user := range users {
+			if this.User.Id == strconv.Itoa(int(user.Id))  {
+				res = true
+				break
+			}
+		}
+	}
+
+	this.Data["json"] = res
+	this.ServeJSON()
+}

+ 4 - 5
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertsub.go

@@ -462,15 +462,10 @@ func (this *OilSupplierCertSubController) AuditbusList() {
 		orderby = Prop + " " + Order
 	}
 	where := "1 = 1"
-	where += " and c.Id = '" + this.User.Id + "'"
 	SupplierCertId := this.GetString("SupplierCertId")
-	SupplierTypeCode := this.GetString("SupplierTypeCode")
 	if SupplierCertId != "" {
 		where = where + " and a.SupplierCertId = '" + SupplierCertId + "'"
 	}
-	if SupplierTypeCode != "" {
-		where = where + " and a.SupplierTypeCode = '" + SupplierTypeCode + "'"
-	}
 
 	total, list := svc.GetWaitAuditBusinesslist(page.CurrentPage, page.Size, orderby, OilSupplierCertSubName, OilClassOrgSettingName, where)
 	var datainfo DataInfo
@@ -513,6 +508,10 @@ func (this *OilSupplierCertSubController) AddOpinion() {
 	model.CreateBy = this.User.Realname
 	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
 	svc := suppliercertsub.GetOilSupplierCertSubService(utils.DBE)
+
+	where := "SupplierCertSubId=" + strconv.Itoa(model.SupplierCertSubId) + " and AuditorId= " + strconv.Itoa(model.AuditorId) + " and Status = '" + model.Status + "'"
+	svc.DeleteEntityBytbl(OilSupplierOpinionName, where)
+
 	_, err := svc.InsertEntityBytbl(OilSupplierOpinionName, &model)
 
 	var errinfo ErrorDataInfo

+ 26 - 0
src/dashoo.cn/backend/api/controllers/system/auditsetting.go

@@ -2,6 +2,7 @@ package system
 
 import (
 	"encoding/json"
+	"strconv"
 	"strings"
 	"time"
 
@@ -288,3 +289,28 @@ func (this *OilAuditSettingController) DeleteEntity() {
 		this.ServeJSON()
 	}
 }
+
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} controllers.Request
+// @router /isaccess [get]
+func (this *OilAuditSettingController) IsAccess() {
+	auditstepcode := this.GetString("auditstepcode")
+
+	var users []userRole.Base_RoleList
+	var auditWorkflow auditsetting.Base_OilAuditSetting
+	rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
+	rsvc.GetAuditStepRoleEntity(OilAuditSettingName, this.User.DepartmentId, auditstepcode, &auditWorkflow)
+	users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), this.User.AccCode)
+
+	res := false
+	for _, user := range users {
+		if this.User.Id == strconv.Itoa(int(user.Id))  {
+			res = true
+			break
+		}
+	}
+
+	this.Data["json"] = res
+	this.ServeJSON()
+}

+ 4 - 3
src/dashoo.cn/frontend_web/src/api/oilsupplier/supplier.js

@@ -26,10 +26,11 @@ export default {
       method: 'GET'
     })
   },
-  getDictListByStatus (status, myAxios) {
+  getDictListByStatus (params, myAxios) {
     return myAxios({
-      url: '/supplier/dictlistbystatus/' + status,
-      method: 'GET'
+      url: '/supplier/dictlistbystatus/',
+      method: 'GET',
+      params: params
     })
   },
   getEntity (entityId, myAxios) {

+ 10 - 3
src/dashoo.cn/frontend_web/src/api/oilsupplier/suppliercert.js

@@ -64,11 +64,18 @@ export default {
       method: 'post'
     })
   },
-  auditEntityFir (entityId, auditer, params, myAxios) {
+  auditEntityFir (entityId, audit, params, myAxios) {
     return myAxios({
-      url: '/suppliercert/auditEntityFir/' + entityId + '?auditer=' + auditer,
+      url: '/suppliercert/auditEntityFir/' + entityId,
       method: 'post',
-      data: params
+      data: params,
+      params: audit
+    })
+  },
+  isAccess (auditstepcode, myAxios) {
+    return myAxios({
+      url: '/suppliercert/isaccess?auditstepcode=' + auditstepcode,
+      method: 'get'
     })
   }
 }

+ 16 - 12
src/dashoo.cn/frontend_web/src/components/oilsupplier/auditbuslist.vue

@@ -49,7 +49,8 @@
       </div>
       <auditfile-list ref="auditfileList" :data="auditfileList" :SupplierId="SupplierId"
         :SupplierCertId="SupplierCertId" :SupplierTypeCode="SupplierTypeCode" :businessList="auditbusList"
-        :BusinessForm="BusinessForm" height="360px" style="margin-top: 20px"></auditfile-list>
+         height="360px" style="margin-top: 20px"></auditfile-list>
+      <!--:BusinessForm="BusinessForm"-->
     </el-card>
 
     <el-dialog :title="Title" :visible.sync="visible" top="5vh">
@@ -148,7 +149,8 @@
           AuditorId: '',
           AuditorName: '',
           Remark: '',
-          IsDelete: 0
+          IsDelete: 0,
+          Status: ''
         },
         visible: false,
         selfVisible: this.visible, // 避免vue双向绑定警告
@@ -230,7 +232,8 @@
         _this.AuditForm.SupplierId = parseInt(_this.AuditForm.SupplierId)
         _this.AuditForm.SupplierCertSubId = parseInt(_this.AuditForm.SupplierCertSubId)
         _this.AuditForm.AuditStatus = parseInt(_this.AuditForm.AuditStatus)
-        _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+        _this.AuditForm.Status = this.Visiblebtn
+        _this.$confirm('提交以后将不能修改, 是否继续?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
@@ -269,14 +272,15 @@
           params
         })
           .then(function (response) {
-            if (!response.data.code) {
-              _this.$message({
-                type: 'warning',
-                message: response.data.message
-              })
-            } else {
-              _this.opinionList = response.data.items
-            }
+            _this.opinionList = response.data.items
+            // if (!response.data.code) {
+            //   _this.$message({
+            //     type: 'warning',
+            //     message: response.data.message
+            //   })
+            // } else {
+            //   _this.opinionList = response.data.items
+            // }
           }).catch(err => {
             console.error(err)
           })
@@ -327,7 +331,7 @@
         if (val === '1') {
           return '合格'
         } else if (val === '2') {
-          return '合格'
+          return '合格'
         } else {
           return '----'
         }

+ 65 - 66
src/dashoo.cn/frontend_web/src/components/oilsupplier/businesslist.vue

@@ -89,7 +89,7 @@
       </div>
     </el-dialog>
 
-    <el-dialog title="基建类业务列表" :visible.sync="basicDialog" top="5vh" style="width1000px">
+    <el-dialog title="基建类业务列表" :visible.sync="basicDialog" top="5vh" style="width: 1000px">
       <span style="float: right;">
         <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="seachdata()">查询
         </el-button>
@@ -129,7 +129,7 @@
   export default {
     name: 'EquipmentList',
     components: {
-      SubfileList, //文档
+      SubfileList // 文档
     },
     props: {
       SupplierCertId: {
@@ -147,9 +147,9 @@
       canadd: {
         type: Boolean,
         default: false
-      },
+      }
     },
-    created() {
+    created () {
       this.initData()
     },
     computed: {
@@ -157,7 +157,7 @@
         session: 'session'
       })
     },
-    data() {
+    data () {
       return {
         oneList: [],
         OneCode: '',
@@ -195,45 +195,45 @@
         Size: 10,
         CurrentItemCount: 0,
 
-        subfileList: [], //文档
+        subfileList: [] // 文档
       }
     },
     methods: {
-      getvalue(SupplierId, SupplierTypeCode, certId) {
+      getvalue (SupplierId, SupplierTypeCode, certId) {
         this.SupplierId = SupplierId
         this.SupplierTypeCode = SupplierTypeCode
         this.SupplierCertId = certId
         this.initData()
       },
-      initData() {
+      initData () {
         let _this = this
         const params = {
           SupplierCertId: this.SupplierCertId,
           SupplierTypeCode: this.SupplierTypeCode,
           _currentPage: this.currentPage,
-          _size: this.size,
+          _size: this.size
         }
         this.$axios.get('suppliercertsub/list', {
-            params
-          })
+          params
+        })
           .then(res => {
             _this.businessList = res.data.items
             _this.currentItemCount = res.data.currentItemCount
-            _this.$refs["subfileList"].getvalue(this.SupplierId, this.SupplierTypeCode, this.SupplierCertId)
+            _this.$refs['subfileList'].getvalue(this.SupplierId, this.SupplierTypeCode, this.SupplierCertId)
           })
           .catch(err => {
             // handle error
             console.error(err)
           })
       },
-      savedata() {
-        if (this.Title == '新增准入范围') {
+      savedata () {
+        if (this.Title === '新增准入范围') {
           this.addBusiness()
-        } else if (this.Title == '编辑准入范围') {
+        } else if (this.Title === '编辑准入范围') {
           this.editBusiness()
         }
       },
-      addBusiness() {
+      addBusiness () {
         let _this = this
         _this.BusinessForm.SupplierId = parseInt(_this.BusinessForm.SupplierId)
         _this.BusinessForm.SupplierCertId = parseInt(_this.BusinessForm.SupplierCertId)
@@ -243,7 +243,7 @@
             if (res.data.code === 0) {
               _this.$message({
                 type: 'success',
-                message: res.data.message,
+                message: res.data.message
               })
               _this.BusinessForm.Id = res.data.item + ''
               _this.visible = false
@@ -259,7 +259,7 @@
             console.error(err)
           })
       },
-      editBusiness() {
+      editBusiness () {
         let _this = this
         _this.BusinessForm.SupplierId = parseInt(_this.BusinessForm.SupplierId)
         _this.BusinessForm.SupplierCertId = parseInt(_this.BusinessForm.SupplierCertId)
@@ -269,7 +269,7 @@
             if (res.data.code === 0) {
               _this.$message({
                 type: 'success',
-                message: res.data.message,
+                message: res.data.message
               })
               this.visible = false
               this.initData()
@@ -284,36 +284,36 @@
             console.error(err)
           })
       },
-      deletedata(val) {
-        let _this = this;
-        _this.$confirm("此操作将永久删除该数据, 是否继续?", "提示", {
-            confirmButtonText: "确定",
-            cancelButtonText: "取消",
-            type: "warning"
-          })
+      deletedata (val) {
+        let _this = this
+        _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        })
           .then(() => {
             _this.$axios.delete('suppliercertsub/businessdelete/' + val.Id, {})
               .then(function (response) {
                 if (response.data.code === 0) {
                   _this.$message({
-                    type: "success",
+                    type: 'success',
                     message: response.data.message
-                  });
-                  _this.initData();
+                  })
+                  _this.initData()
                 } else {
                   _this.$message({
-                    type: "warning",
+                    type: 'warning',
                     message: response.data.message
-                  });
+                  })
                 }
               })
               .catch(function (error) {
-                console.log(error);
-              });
+                console.log(error)
+              })
           })
-          .catch(() => {});
+          .catch(() => {})
       },
-      showDialog() {
+      showDialog () {
         this.OneCode = ''
         this.selectedorg = []
         this.keyword = ''
@@ -331,7 +331,7 @@
         this.getbusiness()
         this.visible = true
       },
-      openDialog(val) {
+      openDialog (val) {
         this.Title = '编辑准入范围'
         this.BusinessForm.Id = val.Id
         this.BusinessForm.SupplierId = val.SupplierId
@@ -345,15 +345,15 @@
         this.getbusiness()
         this.visible = true
       },
-      getbusiness() {
+      getbusiness () {
         let _this = this
-        if (_this.SupplierTypeCode == '01') { //获取物资类业务列表
+        if (_this.SupplierTypeCode === '01') { // 获取物资类业务列表
           this.$axios.get('goodsaptitude/goodsparentlist', {})
             .then(res => {
               _this.oneList = res.data.items
-              if (_this.Title == '编辑准入范围') {
+              if (_this.Title === '编辑准入范围') {
                 for (var i = 0; i < _this.oneList.length; i++) {
-                  if (_this.BusinessForm.Code == _this.oneList[i].Code) {
+                  if (_this.BusinessForm.Code === _this.oneList[i].Code) {
                     _this.OneCode = _this.oneList[i].Id
                   }
                 }
@@ -362,15 +362,15 @@
             .catch(err => {
               console.error(err)
             })
-        } else if (_this.SupplierTypeCode == '02') { //获取基建类业务列表
+        } else if (_this.SupplierTypeCode === '02') { // 获取基建类业务列表
           const params = {
             keyword: this.keyword,
             _currentPage: this.CurrentPage,
-            _size: this.Size,
+            _size: this.Size
           }
           this.$axios.get('basisbuild/basiclist', {
-              params
-            })
+            params
+          })
             .then(res => {
               _this.techList = res.data.items
               _this.CurrentItemCount = res.data.currentItemCount
@@ -378,7 +378,7 @@
             .catch(err => {
               console.error(err)
             })
-        } else if (_this.SupplierTypeCode == '03') { //获取技术服务类业务列表
+        } else if (_this.SupplierTypeCode === '03') { // 获取技术服务类业务列表
           this.$axios.get('technologyservice/businesslist', {})
             .then(res => {
               _this.techList = res.data.items
@@ -389,23 +389,23 @@
             })
         }
       },
-      getCode() {
+      getCode () {
         this.ClassId = this.selectedorg[this.selectedorg.length - 1]
         for (var i = 0; i < this.techList.length; i++) {
-          if (this.selectedorg[this.selectedorg.length - 1] == this.techList[i].Id) {
+          if (this.selectedorg[this.selectedorg.length - 1] === this.techList[i].Id) {
             this.BusinessForm.SubClassId = this.techList[i].Id
             this.BusinessForm.Name = this.techList[i].Name
             this.BusinessForm.Code = this.techList[i].Code
           }
         }
       },
-      getChild() {
+      getChild () {
         const params = {
           ParentId: this.OneCode
         }
         this.$axios.get('goodsaptitude/goodschildlist', {
-            params
-          })
+          params
+        })
           .then(res => {
             this.techList = res.data.items
             if (this.techList && this.techList.length > 0) {
@@ -418,28 +418,28 @@
             console.error(err)
           })
       },
-      getParentCode() {
+      getParentCode () {
         this.ClassId = this.OneCode
         for (var i = 0; i < this.oneList.length; i++) {
-          if (this.OneCode == this.oneList[i].Id) {
+          if (this.OneCode === this.oneList[i].Id) {
             this.BusinessForm.SubClassId = this.techList[i].Id
             this.BusinessForm.Name = this.oneList[i].Name
             this.BusinessForm.Code = this.oneList[i].Code
           }
         }
       },
-      getChooseCode(val) {
+      getChooseCode (val) {
         this.ClassId = val.Id
         this.BusinessForm.SubClassId = val.Id
         this.BusinessForm.Code = val.Code
         this.BusinessForm.Name = val.Name
         this.basicDialog = false
       },
-      nextStep() {
-        this.subfileList = this.$refs["subfileList"].subfileList
+      nextStep () {
+        this.subfileList = this.$refs['subfileList'].subfileList
         if (this.subfileList && this.subfileList.length > 0) {
           for (var i = 0; i < this.subfileList.length; i++) {
-            if (this.subfileList[i].FileType == '1' && this.subfileList[i].FileUrl == '') {
+            if (this.subfileList[i].FileType === '1' && this.subfileList[i].FileUrl === '') {
               this.$message({
                 type: 'warning',
                 message: '请上传文件' + this.subfileList[i].NeedFileType + '!'
@@ -453,33 +453,33 @@
         }
       },
 
-      subfiledialog() {
-        this.$refs["subfileList"].showDialog()
+      subfiledialog () {
+        this.$refs['subfileList'].showDialog()
       },
 
-      handleSizeChange(value) {
+      handleSizeChange (value) {
         this.size = value
         this.currentPage = 1
         this.initData()
       },
-      handleCurrentChange(value) {
+      handleCurrentChange (value) {
         this.currentPage = value
         this.initData()
       },
-      HandleSizeChange(value) {
+      HandleSizeChange (value) {
         this.Size = value
         this.CurrentPage = 1
         this.getbusiness()
       },
-      HandleCurrentChange(value) {
+      HandleCurrentChange (value) {
         this.CurrentPage = value
         this.getbusiness()
       },
-      seachdata() {
+      seachdata () {
         this.CurrentPage = -1
         this.getbusiness()
       },
-      jstimehandle(val) {
+      jstimehandle (val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -490,10 +490,9 @@
           val = val.replace('T', ' ')
           return val.substring(0, 10)
         }
-      },
+      }
     }
   }
-
 </script>
 
 <style>

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -181,7 +181,7 @@
         </el-tab-pane>
 
         <el-tab-pane label="企业资质" :disabled="!certId">
-          <business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId+''" :SupplierId="formData.Id"
+          <business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId+''" :SupplierId="formData.Id+''"
             :SupplierTypeCode="classId" :canadd="add_flat" @close="selectAuditOrg" height="360px" style="margin-top: 20px">
           </business-list>
         </el-tab-pane>

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

@@ -178,7 +178,7 @@
         <el-tab-pane label="准入范围" :disabled="!certId">
         </el-tab-pane>
         <el-tab-pane label="企业资质" :disabled="!certId">
-          <business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId" :SupplierId="formData.Id"
+          <business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId" :SupplierId="formData.Id+''"
             :SupplierTypeCode="classId" :canadd="add_flat" @close="selectAuditOrg" height="360px" style="margin-top: 20px">
           </business-list>
         </el-tab-pane>

+ 66 - 26
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/basisedit.vue

@@ -11,8 +11,9 @@
           <i class="icon icon-table2"></i> 审批
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">提交专业审批</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>
+          <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">提交专业审批</el-button>-->
+          <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>-->
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-if="auditBtn && this.formData.Status != '6'">{{auditTitle}}</el-button>
           <router-link :to="'/oilsupplier/supplieraudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -146,7 +147,7 @@
         </el-tab-pane>
 
         <el-tab-pane label="企业资质">
-          <auditbus-list ref="auditbusList" :data="auditbusList" :SupplierCertId="certId + ''" :SupplierId="serviceId+''"
+          <auditbus-list ref="auditbusList" :data="auditbusList" :SupplierCertId="certId" :SupplierId="serviceId+''"
                          :SupplierTypeCode="classId+''" :Visiblebtn="this.formData.Status" height="360px" style="margin-top: 20px"></auditbus-list>
         </el-tab-pane>
 
@@ -162,6 +163,17 @@
     </el-card>
     <el-dialog title="审核" :visible.sync="dialogMakeSure">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <el-form-item label="专业科室" v-if="this.formData.Status == '1'">
+          <el-select ref="selectauditOrg" v-model="majorDept" placeholder="请选择"
+                     style="width: 90%" filterable allow-create default-first-option>
+            <el-option
+              v-for="item in organizeOption"
+              :key="item.Id"
+              :label="item.Fullname"
+              :value="item.Id">
+            </el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item :label="aduitlabel" v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
           <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择"
                      style="width: 90%" filterable allow-create default-first-option>
@@ -255,6 +267,9 @@
         winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
         auditbusList: [], // 待审核业务
         auditerOptions: [], // 审核人员
+        auditerCurOptions: [],
+        organizeOption: [],
+        majorDept: '',
         serviceId: '',
         certId: '',
         classId: '02',
@@ -263,6 +278,9 @@
         dialogAllocation: false,
         aduitlabel: '审核人',
         auditer: '',
+        auditTitle: '审批',
+        auditstepcode: '',
+        auditBtn: false,
         shenheForm: {
           SuccessStatus: 1,
           AuditorRemark: '',
@@ -328,6 +346,7 @@
           NationalCertTotal: 0,
           DesignerTotal: 0,
           SkillerTotal: 0,
+          ThirdAudit: 0,
           Remark: '',
           IsDelete: '',
           CreateOn: '',
@@ -359,7 +378,8 @@
         entrydetail: {
           process: 'oil_supplier_apply_1',
           business: '',
-          instance: ''
+          instance: '',
+          status: ''
         }
       }
     },
@@ -407,17 +427,48 @@
 
             this.entrydetail.business = this.certId
             this.entrydetail.instance = this.formDataCert.WorkflowId
+            this.entrydetail.status = this.formData.Status
+            if (this.formData.Status === '1') {
+              this.aduitlabel = '复审人员'
+              this.auditTitle = '初审'
+              this.auditstepcode = 'FIRST_TRIAL'
+            } else if (this.formData.Status === '2') {
+              this.auditTitle = '复审'
+              this.auditstepcode = 'SECOND_TRIAL'
+            } else if (this.formData.Status === '3') {
+              this.auditTitle = '提交专业审批'
+              this.auditstepcode = 'PROF_RECE'
+            } else if (this.formData.Status === '4') {
+              this.auditTitle = '专业审批'
+              this.auditstepcode = 'PROF_AUDIT'
+            } else if (this.formData.Status === '5') {
+              this.auditTitle = '集中审批'
+              this.auditstepcode = 'PROF_CONCENT'
+            }
             this.getDictOptions()
+            this.isAccess()
           }).catch(err => {
             console.error(err)
           })
         }
       },
+      isAccess () {
+        apiCert.isAccess(this.auditstepcode, this.$axios).then(res => {
+          this.auditBtn = res.data
+        }).catch(err => {
+          console.log(err)
+        })
+      },
 
       getDictOptions () {
-        api.getDictListByStatus(this.formData.Status, this.$axios).then(res => {
+        let params = {
+          status: this.formData.Status,
+          majorAduit: this.formData.ThirdAudit
+        }
+        api.getDictListByStatus(params, this.$axios).then(res => {
           this.dictData = res.data.items
           this.auditerOptions = res.data.items['Auditer']
+          this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
           console.error(err)
         })
@@ -530,24 +581,11 @@
       },
 
       AuditEntity () {
-        // apiCert.auditEntity(this.certId, 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)
-        // })
-        this.dialogMakeSure = true
+        if (this.formData.Status === '3') {
+          this.dialogAllocation = true
+        } else {
+          this.dialogMakeSure = true
+        }
       },
 
       allocationBtn () {
@@ -555,7 +593,6 @@
       },
       // 审核通过
       makeSure () {
-        console.log(this.auditer)
         if (this.shenheForm.SuccessStatus === 1) {
           if ((!this.auditer || this.auditer === 0) && this.formData.Status !== '2' && this.formData.Status !== '4' && this.formData.Status !== '5') {
             this.$message({
@@ -570,8 +607,11 @@
 
       checkstatus () {
         let params = this.shenheForm
-        console.log(this.shenheForm, '---this.shenheForm----')
-        apiCert.auditEntityFir(this.certId, this.auditer, params, this.$axios).then(res => {
+        let audit = {
+          auditer: this.auditer,
+          majorDept: this.majorDept
+        }
+        apiCert.auditEntityFir(this.certId, audit, params, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.initDatas()
             this.dialogMakeSure = false

+ 62 - 29
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/goodsedit.vue

@@ -11,8 +11,8 @@
           <i class="icon icon-table2"></i> 审批
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">提交专业审批</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>
+          <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">提交专业审批</el-button>-->
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-if="auditBtn && this.formData.Status != '6'">{{auditTitle}}</el-button>
           <router-link :to="'/oilsupplier/supplieraudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -115,7 +115,7 @@
             <div slot="header" class="clearfix">
               <span>企业主要装备情况</span>
             </div>
-            <equipment-list ref="equipmentList" :data="equipmentList" :SupplierCertId="certId" height="360px"
+            <equipment-list ref="equipmentList" :data="equipmentList" :SupplierCertId="certId+''" height="360px"
                             style="margin-top: 20px"></equipment-list>
           </el-card>
 
@@ -147,7 +147,7 @@
         </el-tab-pane>
 
         <el-tab-pane label="企业资质">
-          <auditbus-list ref="auditbusList" :data="auditbusList" :SupplierCertId="certId" :SupplierId="serviceId"
+          <auditbus-list ref="auditbusList" :data="auditbusList" :SupplierCertId="certId" :SupplierId="serviceId+''"
                          :SupplierTypeCode="classId" :Visiblebtn="this.formData.Status" height="360px" style="margin-top: 20px"></auditbus-list>
         </el-tab-pane>
 
@@ -163,6 +163,17 @@
     </el-card>
     <el-dialog title="审核" :visible.sync="dialogMakeSure">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <el-form-item label="专业科室" v-if="this.formData.Status == '1'">
+          <el-select ref="selectauditOrg" v-model="majorDept" placeholder="请选择"
+                     style="width: 90%" filterable allow-create default-first-option>
+            <el-option
+              v-for="item in organizeOption"
+              :key="item.Id"
+              :label="item.Fullname"
+              :value="item.Id">
+            </el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item :label="aduitlabel" v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
           <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择"
                      style="width: 90%" filterable allow-create default-first-option>
@@ -256,6 +267,9 @@
         winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
         auditbusList: [], // 待审核业务
         auditerOptions: [], // 审核人员
+        auditerCurOptions: [],
+        organizeOption: [],
+        majorDept: '',
         serviceId: '',
         certId: '',
         classId: '01',
@@ -264,6 +278,8 @@
         dialogAllocation: false,
         aduitlabel: '审核人',
         auditer: '',
+        auditTitle: '审批',
+        auditBtn: false,
         shenheForm: {
           SuccessStatus: 1,
           AuditorRemark: '',
@@ -330,6 +346,7 @@
           NationalCertTotal: 0,
           DesignerTotal: 0,
           SkillerTotal: 0,
+          ThirdAudit: 0,
           Remark: '',
           IsDelete: '',
           CreateOn: '',
@@ -361,7 +378,8 @@
         entrydetail: {
           process: 'oil_supplier_apply_1',
           business: '',
-          instance: ''
+          instance: '',
+          status: ''
         }
       }
     },
@@ -409,26 +427,52 @@
 
             this.entrydetail.business = this.certId
             this.entrydetail.instance = this.formDataCert.WorkflowId
+            this.entrydetail.status = this.formData.Status
             if (this.formData.Status === '1') {
               this.aduitlabel = '复审人员'
+              this.auditTitle = '初审'
+              this.auditstepcode = 'FIRST_TRIAL'
+            } else if (this.formData.Status === '2') {
+              this.auditTitle = '复审'
+              this.auditstepcode = 'SECOND_TRIAL'
+            } else if (this.formData.Status === '3') {
+              this.auditTitle = '提交专业审批'
+              this.auditstepcode = 'PROF_RECE'
+            } else if (this.formData.Status === '4') {
+              this.auditTitle = '专业审批'
+              this.auditstepcode = 'PROF_AUDIT'
+            } else if (this.formData.Status === '5') {
+              this.auditTitle = '集中审批'
+              this.auditstepcode = 'PROF_CONCENT'
             }
             this.getDictOptions()
+            this.isAccess()
           }).catch(err => {
             console.error(err)
           })
         }
       },
+      isAccess () {
+        apiCert.isAccess(this.auditstepcode, this.$axios).then(res => {
+          this.auditBtn = res.data
+        }).catch(err => {
+          console.log(err)
+        })
+      },
 
       getDictOptions () {
-        api.getDictListByStatus(this.formData.Status, this.$axios).then(res => {
+        let params = {
+          status: this.formData.Status,
+          majorAduit: this.formData.ThirdAudit
+        }
+        api.getDictListByStatus(params, this.$axios).then(res => {
           this.dictData = res.data.items
           this.auditerOptions = res.data.items['Auditer']
-          console.log(this.auditerOptions, 'this.auditerOptions')
+          this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
           console.error(err)
         })
       },
-
       // 保存信息
       saveEntity () {
         this.$refs['EntityForm'].validate((valid) => {
@@ -536,31 +580,17 @@
       },
 
       AuditEntity () {
-        // apiCert.auditEntity(this.certId, 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)
-        // });
-        this.dialogMakeSure = true
+        if (this.formData.Status === '3') {
+          this.dialogAllocation = true
+        } else {
+          this.dialogMakeSure = true
+        }
       },
       allocationBtn () {
         this.dialogAllocation = true
       },
       // 审核通过
       makeSure () {
-        console.log(this.auditer)
         if (this.shenheForm.SuccessStatus === 1) {
           if ((!this.auditer || this.auditer === 0) && this.formData.Status !== '2' && this.formData.Status !== '4' && this.formData.Status !== '5') {
             this.$message({
@@ -575,8 +605,11 @@
 
       checkstatus () {
         let params = this.shenheForm
-        console.log(this.shenheForm, '---this.shenheForm----')
-        apiCert.auditEntityFir(this.certId, this.auditer, params, this.$axios).then(res => {
+        let audit = {
+          auditer: this.auditer,
+          majorDept: this.majorDept
+        }
+        apiCert.auditEntityFir(this.certId, audit, params, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.initDatas()
             this.dialogMakeSure = false

+ 65 - 25
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/techedit.vue

@@ -11,8 +11,9 @@
           <i class="icon icon-table2"></i> 审批
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">提交专业审批</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>
+          <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">提交专业审批</el-button>-->
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-if="auditBtn && this.formData.Status != '6'">{{auditTitle}}</el-button>
+          <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>-->
           <router-link :to="'/oilsupplier/supplieraudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -146,7 +147,7 @@
         </el-tab-pane>
 
         <el-tab-pane label="企业资质">
-          <auditbus-list ref="auditbusList" :data="auditbusList" :SupplierCertId="certId" :SupplierId="serviceId"
+          <auditbus-list ref="auditbusList" :data="auditbusList" :SupplierCertId="certId" :SupplierId="serviceId+''"
             :SupplierTypeCode="classId" :Visiblebtn="this.formData.Status" height="360px" style="margin-top: 20px"></auditbus-list>
         </el-tab-pane>
 
@@ -162,6 +163,17 @@
     </el-card>
     <el-dialog title="审核" :visible.sync="dialogMakeSure">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <el-form-item label="专业科室" v-if="this.formData.Status == '1'">
+          <el-select ref="selectauditOrg" v-model="majorDept" placeholder="请选择"
+                     style="width: 90%" filterable allow-create default-first-option>
+            <el-option
+              v-for="item in organizeOption"
+              :key="item.Id"
+              :label="item.Fullname"
+              :value="item.Id">
+            </el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item :label="aduitlabel" v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
           <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择"
                      style="width: 90%" filterable allow-create default-first-option>
@@ -255,10 +267,15 @@
         winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
         auditbusList: [], // 待审核业务
         auditerOptions: [], // 审核人员
+        auditerCurOptions: [],
+        organizeOption: [],
+        majorDept: '',
         dialogMakeSure: false,
         dialogAllocation: false,
         aduitlabel: '审核人',
         auditer: '',
+        auditTitle: '审批',
+        auditBtn: false,
         serviceId: '',
         certId: '',
         classId: '03',
@@ -324,6 +341,7 @@
           NationalCertTotal: 0,
           DesignerTotal: 0,
           SkillerTotal: 0,
+          ThirdAudit: 0,
           Remark: '',
           IsDelete: '',
           CreateOn: '',
@@ -360,7 +378,8 @@
         entrydetail: {
           process: 'oil_supplier_apply_1',
           business: '',
-          instance: ''
+          instance: '',
+          status: ''
         }
       }
     },
@@ -408,18 +427,48 @@
 
             this.entrydetail.business = this.certId
             this.entrydetail.instance = this.formDataCert.WorkflowId
+            this.entrydetail.status = this.formData.Status
+            if (this.formData.Status === '1') {
+              this.aduitlabel = '复审人员'
+              this.auditTitle = '初审'
+              this.auditstepcode = 'FIRST_TRIAL'
+            } else if (this.formData.Status === '2') {
+              this.auditTitle = '复审'
+              this.auditstepcode = 'SECOND_TRIAL'
+            } else if (this.formData.Status === '3') {
+              this.auditTitle = '提交专业审批'
+              this.auditstepcode = 'PROF_RECE'
+            } else if (this.formData.Status === '4') {
+              this.auditTitle = '专业审批'
+              this.auditstepcode = 'PROF_AUDIT'
+            } else if (this.formData.Status === '5') {
+              this.auditTitle = '集中审批'
+              this.auditstepcode = 'PROF_CONCENT'
+            }
             this.getDictOptions()
+            this.isAccess()
           }).catch(err => {
             console.error(err)
           })
         }
       },
+      isAccess () {
+        apiCert.isAccess(this.auditstepcode, this.$axios).then(res => {
+          this.auditBtn = res.data
+        }).catch(err => {
+          console.log(err)
+        })
+      },
 
       getDictOptions () {
-        api.getDictListByStatus(this.formData.Status, this.$axios).then(res => {
+        let params = {
+          status: this.formData.Status,
+          majorAduit: this.formData.ThirdAudit
+        }
+        api.getDictListByStatus(params, this.$axios).then(res => {
           this.dictData = res.data.items
           this.auditerOptions = res.data.items['Auditer']
-          console.log(this.auditerOptions, 'this.auditerOptions')
+          this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
           console.error(err)
         })
@@ -532,24 +581,11 @@
       },
 
       AuditEntity () {
-        // apiCert.auditEntity(this.certId, 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)
-        // })
-        this.dialogMakeSure = true
+        if (this.formData.Status === '3') {
+          this.dialogAllocation = true
+        } else {
+          this.dialogMakeSure = true
+        }
       },
 
       allocationBtn () {
@@ -572,8 +608,12 @@
 
       checkstatus () {
         let params = this.shenheForm
+        let audit = {
+          auditer: this.auditer,
+          majorDept: this.majorDept
+        }
         console.log(this.shenheForm, '---this.shenheForm----')
-        apiCert.auditEntityFir(this.certId, this.auditer, params, this.$axios).then(res => {
+        apiCert.auditEntityFir(this.certId, audit, params, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.initDatas()
             this.dialogMakeSure = false