Pārlūkot izejas kodu

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

lijunqing 6 gadi atpakaļ
vecāks
revīzija
f4b548e077
31 mainītis faili ar 1633 papildinājumiem un 957 dzēšanām
  1. 13 11
      src/dashoo.cn/backend/api/business/oilsupplier/suppliercert/oilsuppliercert.go
  2. 8 0
      src/dashoo.cn/backend/api/business/workflow/workflow.go
  3. 4 3
      src/dashoo.cn/backend/api/controllers/oilsupplier/goodsaptitude.go
  4. 30 0
      src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go
  5. 78 28
      src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go
  6. 4 1
      src/dashoo.cn/backend/api/controllers/oilsupplier/technologyservice.go
  7. 2 2
      src/dashoo.cn/frontend_web/src/api/oilsupplier/goodsaptitude.js
  8. 6 0
      src/dashoo.cn/frontend_web/src/api/oilsupplier/supplier.js
  9. 2 2
      src/dashoo.cn/frontend_web/src/api/oilsupplier/technologyservice.js
  10. 13 6
      src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist.vue
  11. 78 23
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/basisbuild/_opera/operation.vue
  12. 2 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/basisbuild/index.vue
  13. 93 19
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/goodsaptitude/_opera/operation.vue
  14. 2 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/goodsaptitude/index.vue
  15. 1 0
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/_opera/auditoperation.vue
  16. 1 0
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/_opera/operation.vue
  17. 129 51
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue
  18. 640 611
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue
  19. 122 45
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue
  20. 1 0
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/basislist.vue
  21. 1 0
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/goodslist.vue
  22. 1 0
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/techlist.vue
  23. 1 0
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/basisdataopera.vue
  24. 1 0
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/goodsdataopera.vue
  25. 1 0
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue
  26. 114 26
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/basisedit.vue
  27. 105 42
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/goodsedit.vue
  28. 107 24
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/techedit.vue
  29. 5 1
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/index.vue
  30. 66 56
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/technologyservice/_opera/operation.vue
  31. 2 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/technologyservice/index.vue

+ 13 - 11
src/dashoo.cn/backend/api/business/oilsupplier/suppliercert/oilsuppliercert.go

@@ -30,7 +30,7 @@ type OilSupplierCert struct {
 	MgrUnit           string    `xorm:"comment('管理单位') VARCHAR(255)"`
 	AddinTime         string    `xorm:"comment('准入日期') VARCHAR(255)"`
 	EffectTime        string    `xorm:"comment('生效日期') VARCHAR(255)"`
-	ApplyTime         time.Time    `xorm:"comment('年审到期日期') VARCHAR(255)"`
+	ApplyTime         time.Time `xorm:"comment('年审到期日期') VARCHAR(255)"`
 	SupplierNo        string    `xorm:"comment('供应商准入证编号') VARCHAR(255)"`
 	MdmFlag           string    `xorm:"default '0' comment('MDM标志') VARCHAR(2)"`
 	InternalFlag      string    `xorm:"comment('国内采购') VARCHAR(255)"`
@@ -50,6 +50,7 @@ type OilSupplierCert struct {
 	DesignerTotal     int       `xorm:"default 0 comment('设计人员总数') INT(10)"`
 	SkillerTotal      int       `xorm:"default 0 comment('技术工人总数') INT(10)"`
 	WorkflowId        string    `xorm:"default '0' comment('工作流的ID') VARCHAR(255)"`
+	ProcessKey        string    `xorm:"default '0' comment('工作流的名称') VARCHAR(255)"`
 	FirstAudit        int       `xorm:"default 0 comment('初审') INT(10)"`
 	SecondAudit       int       `xorm:"default 0 comment('复审') INT(10)"`
 	ThirdAudit        int       `xorm:"default 0 comment('专业科室审批') INT(10)"`
@@ -69,18 +70,19 @@ type OilSupplierVM struct {
 	AccessCardNo     string
 	SupplierTypeCode string
 	SupplierTypeName string
-	InStyle 		 string
+	InStyle          string
 }
 
 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" //已入库
+	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" //二级单位初审
 	NOPASS_STATUS       string = "-1" // 最终审核没有通过
 )

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

@@ -73,6 +73,14 @@ const (
 	//二级物资供方准入流程图
 	OIL_SECOND_SUPPLIER_APPLY string = "oil_second_supplier_apply"
 
+	//企业用户准入流程图
+	OIL_ENUSER_SUPPLIER_APPLY string = "oil_enuser_supplier_apply"
+
+	//企业用户一级物资准入流程图
+	OIL_FIRST_ENUSER_SUPPLIER_APPLY string = "oil_first_enuser_supplier_apply"
+	//企业用户二级物资准入流程图
+	OIL_SECOND_ENUSER_SUPPLIER_APPLY string = "oil_second_enuser_supplier_apply"
+
 	//一级物资供方增项流程图
 	OIL_FIRST_APPEND_APPLY string = "oil_first_append_apply"
 	//二级物资供方准入流程图

+ 4 - 3
src/dashoo.cn/backend/api/controllers/oilsupplier/goodsaptitude.go

@@ -2,6 +2,7 @@ package oilsupplier
 
 import (
 	"encoding/json"
+	"strconv"
 	"strings"
 	"time"
 
@@ -155,18 +156,18 @@ func (this *OilGoodsAptitudeController) GetEntity() {
 // @Title 添加
 // @Description 新增
 // @Success	200	{object} controllers.Request
-// @router /add [post]
+// @router /add/:id [post]
 func (this *OilGoodsAptitudeController) AddEntity() {
+	classId := this.Ctx.Input.Param(":id")
 	var model goodsaptitude.OilGoodsAptitude
 	var jsonBlob = this.Ctx.Input.RequestBody
 	svc := goodsaptitude.GetOilGoodsAptitudeService(utils.DBE)
-
 	json.Unmarshal(jsonBlob, &model)
 	model.CreateOn = time.Now()
 	model.CreateBy = this.User.Realname
 	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+	model.ClassId ,_ = strconv.Atoi(classId)
 	//model.OrganizeId, _ = utils.StrTo(this.User.DepartmentId).Int()
-
 	_, err := svc.InsertEntityBytbl(""+OilGoodsAptitudeName, &model)
 
 	var errinfo ErrorDataInfo

+ 30 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1300,6 +1300,18 @@ func (this *OilSupplierController) GetMyTaskEntityList() {
 	}
 	if actisvc.GetMyTasks(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id) != "" {
 		certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetMyTasks(workflow.OIL_SECOND_SUPPLIER_APPLY, this.User.Id))
+		certIdList = certIdList + ","
+	}
+	if actisvc.GetMyTasks(workflow.OIL_ENUSER_SUPPLIER_APPLY, this.User.Id) != "" {
+		certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetMyTasks(workflow.OIL_ENUSER_SUPPLIER_APPLY, this.User.Id))
+		certIdList = certIdList + ","
+	}
+	if actisvc.GetMyTasks(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id) != "" {
+		certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetMyTasks(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, this.User.Id))
+		certIdList = certIdList + ","
+	}
+	if actisvc.GetMyTasks(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id) != "" {
+		certIdList = fmt.Sprintf("%s %s", certIdList, actisvc.GetMyTasks(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, this.User.Id))
 	}
 	certIdList = strings.Trim(certIdList, ",")
 	certIdarr := strings.Split(certIdList, ",")
@@ -1851,6 +1863,24 @@ func (this *OilSupplierController) GetAuditerByDept() {
 	this.ServeJSON()
 }
 
+// @Title 获取二级复审人员根据初审人员
+// @Description 获取二级复审人员根据初审人员
+// @router /getauditerbyfirst/:firstId [get]
+func (this *OilSupplierController) GetAuditerByFist() {
+	Id := this.Ctx.Input.Param(":firstId")
+	auditstepcode := this.GetString("auditstepcode")
+	certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
+	var userentity userRole.Base_User
+	certSrv.GetEntityById(Id,&userentity)
+	depId := strings.Split(userentity.Superior,",")
+	var users []userRole.Base_RoleList
+	certSrv.GetAuditUser(depId[len(depId)-1], auditstepcode, &users)
+	var datainfo ErrorDataInfo
+	datainfo.Item = users
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
 // @Title 获取二级初审人员(不需要验证登录)
 // @Description 获取二级初审人员(不需要验证登录)
 // @router /getauditerbydeptandnologin [get]

+ 78 - 28
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -563,6 +563,8 @@ func (this *OilSupplierCertController) AuditEntity() {
 	certId := this.Ctx.Input.Param(":id")
 	firstAudit := this.GetString("FirstAuditName")
 	AuditRemark := this.GetString("AuditRemark")
+	secondAudit := this.GetString("SecondAudit")
+	thirdAudit := this.GetString("ThirdAudit")
 
 	//取出审批列表
 	certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
@@ -605,12 +607,22 @@ func (this *OilSupplierCertController) AuditEntity() {
 	if supplierCertEntity.WorkflowId == "0" || len(supplierCertEntity.WorkflowId) <= 0 {
 		//启动工作流
 		businessKey = certId + "-" +  strconv.Itoa(supplierCertEntity.AuditIndex)
-		if supplierCertEntity.InStyle == "2" {
-			processInstanceId = svcActiviti.StartProcess(workflow.OIL_FIRST_SUPPLIER_APPLY, businessKey, this.User.Id)
-		}else if  supplierCertEntity.InStyle == "3" {
-			processInstanceId = svcActiviti.StartProcess(workflow.OIL_SECOND_SUPPLIER_APPLY, businessKey, this.User.Id)
-		}else {
-			processInstanceId = svcActiviti.StartProcess(workflow.OIL_SUPPLIER_APPLY, businessKey, this.User.Id)
+		if this.User.IsCompanyUser == 1 {
+			if supplierCertEntity.InStyle == "2" {
+				processInstanceId = svcActiviti.StartProcess(workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY, businessKey, this.User.Id)
+			} else if supplierCertEntity.InStyle == "3" {
+				processInstanceId = svcActiviti.StartProcess(workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY, businessKey, this.User.Id)
+			} else {
+				processInstanceId = svcActiviti.StartProcess(workflow.OIL_ENUSER_SUPPLIER_APPLY, businessKey, this.User.Id)
+			}
+		}else if this.User.IsCompanyUser == 0 {
+			if supplierCertEntity.InStyle == "2" {
+				processInstanceId = svcActiviti.StartProcess(workflow.OIL_FIRST_SUPPLIER_APPLY, businessKey, this.User.Id)
+			} else if supplierCertEntity.InStyle == "3" {
+				processInstanceId = svcActiviti.StartProcess(workflow.OIL_SECOND_SUPPLIER_APPLY, businessKey, this.User.Id)
+			} else {
+				processInstanceId = svcActiviti.StartProcess(workflow.OIL_SUPPLIER_APPLY, businessKey, this.User.Id)
+			}
 		}
 
 	} else {
@@ -623,12 +635,22 @@ func (this *OilSupplierCertController) AuditEntity() {
 	//}
 	//userIds = strings.Trim(userIds, ",")
 	var ActiComplete workflow.ActiCompleteVM
-	if supplierCertEntity.InStyle == "2" {
-		ActiComplete.ProcessKey = workflow.OIL_FIRST_SUPPLIER_APPLY
-	}else if  supplierCertEntity.InStyle == "3" {
-		ActiComplete.ProcessKey = workflow.OIL_SECOND_SUPPLIER_APPLY
-	}else{
-		ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_APPLY
+	if this.User.IsCompanyUser == 1 {
+		if supplierCertEntity.InStyle == "2" {
+			ActiComplete.ProcessKey = workflow.OIL_FIRST_ENUSER_SUPPLIER_APPLY
+		} else if supplierCertEntity.InStyle == "3" {
+			ActiComplete.ProcessKey = workflow.OIL_SECOND_ENUSER_SUPPLIER_APPLY
+		} else {
+			ActiComplete.ProcessKey = workflow.OIL_ENUSER_SUPPLIER_APPLY
+		}
+	}else if this.User.IsCompanyUser == 0 {
+		if supplierCertEntity.InStyle == "2" {
+			ActiComplete.ProcessKey = workflow.OIL_FIRST_SUPPLIER_APPLY
+		} else if supplierCertEntity.InStyle == "3" {
+			ActiComplete.ProcessKey = workflow.OIL_SECOND_SUPPLIER_APPLY
+		} else {
+			ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_APPLY
+		}
 	}
 
 	ActiComplete.BusinessKey = businessKey
@@ -656,11 +678,19 @@ func (this *OilSupplierCertController) AuditEntity() {
 	//记下workflowID(首次提交时才会记录,中间状态请忽略) 及审批状态
 
 	supplierCertEntity.WorkflowId = processInstanceId
-	supplierCertEntity.Status = suppliercert.FIRST_TRIAL_STATUS //二级单位初审
+	if this.User.IsCompanyUser == 1 {
+		supplierCertEntity.Status = suppliercert.FEN_TRIAL_STATUS //分办
+	}else if this.User.IsCompanyUser == 0 {
+		supplierCertEntity.Status = suppliercert.FIRST_TRIAL_STATUS //二级单位初审
+	}
+
 	supplierCertEntity.Step = 2
 	supplierCertEntity.FirstAudit, _ = strconv.Atoi(firstAudit)
 	supplierCertEntity.AuditIndex = supplierCertEntity.AuditIndex + 1
 	supplierCertEntity.BusinessKey = ActiComplete.BusinessKey
+	supplierCertEntity.SecondAudit,_ = strconv.Atoi(secondAudit)
+	supplierCertEntity.ThirdAudit,_ = strconv.Atoi(thirdAudit)
+	supplierCertEntity.ProcessKey = ActiComplete.ProcessKey
 	cols := []string{
 		"Id",
 		"WorkflowId",
@@ -669,6 +699,9 @@ func (this *OilSupplierCertController) AuditEntity() {
 		"FirstAudit",
 		"AuditIndex",
 		"BusinessKey",
+		"SecondAudit",
+		"ThirdAudit",
+		"ProcessKey",
 	}
 	certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
 
@@ -729,17 +762,23 @@ func (this *OilSupplierCertController) AuditEntityadmission() {
 // @Success	200	{object} controllers.Request
 // @router /auditEntityFir/:id [post]
 func (this *OilSupplierCertController) AuditEntityFir() {
+	var dataother ShenHeModel
 	certId := this.Ctx.Input.Param(":id")
 	auditer := this.GetString("auditer")
-	majorDept := this.GetString("majorDept")
+	firstAudit := this.GetString("FirstAuditName")
+	AuditRemark := this.GetString("AuditRemark")
+	secondAudit := this.GetString("SecondAudit")
+	thirdAudit := this.GetString("ThirdAudit")
+	//majorDept := this.GetString("majorDept")
+	if AuditRemark != "" {
+		dataother.AuditorRemark = AuditRemark
+	}
 
 	//取出审批列表
 	certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
 	var supplierCertEntity suppliercert.OilSupplierCert
 	certSrv.GetEntityById(certId, &supplierCertEntity)
-
 	var jsonblob = this.Ctx.Input.RequestBody
-	var dataother ShenHeModel
 	json.Unmarshal(jsonblob, &dataother)
 	var errinfo ErrorDataInfo
 	defer func() { //finally处理失败的异常
@@ -767,16 +806,33 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 			supplierCertEntity.Status = "4"
 		}
 	}
-	if supplierCertEntity.Status == suppliercert.FIRST_TRIAL_STATUS {
-		userIds = auditer
-		status = suppliercert.SECOND_TRIAL_STATUS
-		backstatus = "-1"
+	if supplierCertEntity.Status == suppliercert.FEN_TRIAL_STATUS {
+		userIds = firstAudit
+		status = suppliercert.FIRST_TRIAL_STATUS
 		step = 2
-		supplierCertEntity.ThirdAudit,_ = strconv.Atoi(majorDept)
+		supplierCertEntity.Step = 2
+		supplierCertEntity.FirstAudit, _ = strconv.Atoi(firstAudit)
+		supplierCertEntity.SecondAudit,_ = strconv.Atoi(secondAudit)
+		supplierCertEntity.ThirdAudit,_ = strconv.Atoi(thirdAudit)
 		cols := []string{
+			"Id",
+			"Step",
+			"FirstAudit",
+			"SecondAudit",
 			"ThirdAudit",
 		}
 		certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
+	}
+	if supplierCertEntity.Status == suppliercert.FIRST_TRIAL_STATUS {
+		userIds = utils.ToStr(supplierCertEntity.SecondAudit)
+		status = suppliercert.SECOND_TRIAL_STATUS
+		backstatus = "-1"
+		step = 2
+		//supplierCertEntity.ThirdAudit,_ = strconv.Atoi(majorDept)
+		//cols := []string{
+		//	"ThirdAudit",
+		//}
+		//certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
 	} else if supplierCertEntity.Status == suppliercert.SECOND_TRIAL_STATUS {
 		status = suppliercert.THIRD_TRIAL_STATUS
 		step = 2
@@ -833,13 +889,7 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 
 	svcActiviti := workflow.GetActivitiService(utils.DBE)
 	var ActiComplete workflow.ActiCompleteVM
-	if supplierCertEntity.InStyle == "2" {
-		ActiComplete.ProcessKey = workflow.OIL_FIRST_SUPPLIER_APPLY
-	}else if  supplierCertEntity.InStyle == "3" {
-		ActiComplete.ProcessKey = workflow.OIL_SECOND_SUPPLIER_APPLY
-	}else{
-		ActiComplete.ProcessKey = workflow.OIL_SUPPLIER_APPLY
-	}
+	ActiComplete.ProcessKey = supplierCertEntity.ProcessKey
 	ActiComplete.BusinessKey = supplierCertEntity.BusinessKey
 	ActiComplete.UserNames = userIds
 	ActiComplete.UserId = this.User.Id

+ 4 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/technologyservice.go

@@ -2,6 +2,7 @@ package oilsupplier
 
 import (
 	"encoding/json"
+	"strconv"
 	"strings"
 	"time"
 
@@ -153,8 +154,9 @@ func (this *OilTechnologyServiceController) GetEntity() {
 // @Title 添加
 // @Description 新增
 // @Success	200	{object} controllers.Request
-// @router /add [post]
+// @router /add/:id [post]
 func (this *OilTechnologyServiceController) AddEntity() {
+	classId := this.Ctx.Input.Param(":id")
 	var model technologyservice.OilTechnologyService
 	var jsonBlob = this.Ctx.Input.RequestBody
 	svc := technologyservice.GetOilTechnologyServiceService(utils.DBE)
@@ -163,6 +165,7 @@ func (this *OilTechnologyServiceController) AddEntity() {
 	model.CreateOn = time.Now()
 	model.CreateBy = this.User.Realname
 	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+	model.ClassId ,_ = strconv.Atoi(classId)
 	//model.OrganizeId, _ = utils.StrTo(this.User.DepartmentId).Int()
 
 	_, err := svc.InsertEntityBytbl(""+OilTechnologyServiceName, &model)

+ 2 - 2
src/dashoo.cn/frontend_web/src/api/oilsupplier/goodsaptitude.js

@@ -18,9 +18,9 @@ export default {
       method: 'GET'
     })
   },
-  addEntity (formData, myAxios) {
+  addEntity (entityId,formData, myAxios) {
     return myAxios({
-      url: '/goodsaptitude/add',
+      url: '/goodsaptitude/add/' + entityId,
       method: 'post',
       data: formData
     })

+ 6 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/supplier.js

@@ -103,6 +103,12 @@ export default {
       method: 'GET'
     })
   },
+  getAuditerByFirst (firstId, auditstepcode, myAxios) {
+    return myAxios({
+      url: '/supplier/getauditerbyfirst/' + firstId + '?auditstepcode=' + auditstepcode,
+      method: 'GET'
+    })
+  },
   getAuditerByDeptAndNoLogin (params, myAxios) {
     return myAxios({
       url: '/supplier/getauditerbydeptandnologin',

+ 2 - 2
src/dashoo.cn/frontend_web/src/api/oilsupplier/technologyservice.js

@@ -18,9 +18,9 @@ export default {
       method: 'GET'
     })
   },
-  addEntity (formData, myAxios) {
+  addEntity (entityId, formData, myAxios) {
     return myAxios({
-      url: '/technologyservice/add',
+      url: '/technologyservice/add/' + entityId,
       method: 'post',
       data: formData
     })

+ 13 - 6
src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist.vue

@@ -3,9 +3,12 @@
     <el-card class="box-card" style="margin-top: 10px;">
       <div slot="header" class="clearfix">
         <span style="font-weight: bold">准入范围</span>
-        <el-button type="primary" size="mini" style="float: right;margin-right: 3px" @click="nextStep()" v-if="canadd">
+        <el-button type="primary" size="mini" style="float: right;margin-right: 3px" @click="nextStep()" v-if="canadd && IsCompanyUser == 0">
           提交审批
         </el-button>
+        <el-button type="primary" size="mini" style="float: right;margin-right: 3px" @click="nextStep()" v-if="canadd && IsCompanyUser == 1">
+          分办
+        </el-button>
       </div>
       <el-table :data="businessList" border bordertooltip-effect="dark" style="height: calc(100vh - 500px);">
         <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
@@ -141,12 +144,10 @@
         type: String
       },
     },
-    created() {
-      this.initTableHeader()
-    },
     computed: {
       ...mapGetters({
-        session: 'session'
+        session: 'session',
+        authUser: 'authUser'
       })
     },
     data() {
@@ -191,9 +192,14 @@
 
         waituploads: [], // 等待上传的附件列表
         doclist: [],
-        dynamicTableColumns:[]
+        dynamicTableColumns:[],
+        IsCompanyUser: '',
       }
     },
+    created() {
+      this.initTableHeader()
+      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
+    },
     methods: {
       initTableHeader(){
         console.log("flag:"+this.flag)
@@ -506,6 +512,7 @@
       },
       getattachissuccess() {
         this.SubfileForm.FileUrl = ''
+        this.SubfileForm.FileName = ''
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
             if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {

+ 78 - 23
src/dashoo.cn/frontend_web/src/pages/oilsupplier/basisbuild/_opera/operation.vue

@@ -19,32 +19,44 @@
       </div>
       <el-form label-width="240px" ref="EntityForm" :model="formData">
         <el-row>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label="编码" label-width="110px">
-              <el-input v-model="formData.Code" placeholder="请输入" style="width: 100%"></el-input>
-            </el-form-item>
-          </el-col>
           <el-col :span="8">
             <el-form-item v-if="serviceId == 'add'" label="名称" label-width="110px">
-              <el-input v-model="formData.Name" placeholder="请输入" style="width: 100%"></el-input>
+              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择名称">
+                <el-button slot="append" placeholder="选择" @click="goodsDialog = true">选择</el-button>
+              </el-input>
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
-         <el-row>
-            <el-col :span="6" v-for="(item,i) in dynamicTableColumns" :key="i" >
+          <el-row>
+            <el-col :span="6" v-for="(item,i) in dynamicTableColumns" :key="i">
               <el-form-item :label="item.label">
                 <el-switch v-model="formData[item.prop]" active-value="1" inactive-value="0"></el-switch>
               </el-form-item>
             </el-col>
-        </el-row>
-
-
-
+          </el-row>
         </el-row>
       </el-form>
     </el-card>
+    <el-dialog title="基建类业务列表" :visible.sync="goodsDialog" top="5vh">
+        <el-table :data="techList" border>
+        <el-table-column label="操作" width="70" align="center" fixed>
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="getChooseCode(scope.row)">选择</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
+      </el-table>
+      <el-pagination @size-change="HandleSizeChange" @current-change="HandleCurrentChange" :current-page="CurrentPage"
+        :page-sizes="[10, 15, 20, 25]" :page-size="Size" layout="total, sizes, prev, pager, next, jumper"
+        :total="CurrentItemCount">
+      </el-pagination>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" size="mini" @click="selectgood()">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -64,6 +76,9 @@
 
     data() {
       return {
+        auditerName: '',
+        goodsDialog: false,
+        techList: [],
         serviceId: '',
         formData: {
           Id: '',
@@ -104,7 +119,12 @@
           ModifiedBy: '',
 
         },
-        dynamicTableColumns:[]
+        dynamicTableColumns: [],
+        CurrentPage: 1, // 分页
+        Size: 10,
+        classId: '',
+        CurrentItemCount: 0,
+        flagId: 0 //标记是否第一次点击
         //下拉选择项
         //wellNoOptions: [],
         //supervisersOptions: [],
@@ -113,28 +133,54 @@
     },
     created() {
       this.serviceId = this.$route.params.opera;
-      console.log("----this.serviceId---",this.serviceId)
+      console.log("----this.serviceId---", this.serviceId)
       this.getDictOptions();
       console.log(this.serviceId);
-      if(this.serviceId != 'add' && this.serviceId>0) {
+      if (this.serviceId != 'add' && this.serviceId > 0) {
         this.formData.Id = this.serviceId;
         this.initDatas();
       } else {
         this.formData.Id = 0;
       }
-       this.initTableHeader();
+      this.initTableHeader();
+      this.getbusiness()
     },
     methods: {
-       initTableHeader(){
-        
+      initTableHeader() {
+
         setapi.initBbTableHeader(this.$axios).then(res => {
-          
-          this.dynamicTableColumns=res.data.items
+
+          this.dynamicTableColumns = res.data.items
           console.log(res.data.items)
         })
       },
+      getChooseCode(val) {
+        this.classId = val.Id
+        this.formData.Code = val.Code
+        this.formData.Name = val.Name
+        this.auditerName = val.Name
+        this.goodsDialog = false
+      },
+      getbusiness() {
+        let _this = this
+          const params = {
+            keyword: this.keyword,
+            _currentPage: this.CurrentPage,
+            _size: this.Size
+          }
+          _this.$axios.get('basisbuild/basiclist', {
+              params
+            })
+            .then(res => {
+              _this.techList = res.data.items
+              _this.CurrentItemCount = res.data.currentItemCount
+            })
+            .catch(err => {
+              console.error(err)
+            })
+      },
       initDatas() {
-        if(this.formData.Id) {
+        if (this.formData.Id) {
           api.getEntity(this.formData.Id, this.$axios).then(res => {
             this.formData = res.data;
           }).catch(err => {
@@ -212,7 +258,15 @@
           console.error(err)
         });
       },
-
+      HandleSizeChange(value) {
+        this.Size = value
+        this.CurrentPage = 1
+        this.getbusiness()
+      },
+      HandleCurrentChange(value) {
+        this.CurrentPage = value
+        this.getbusiness()
+      },
       jstimehandle(val) {
         if (val === '') {
           return '----'
@@ -239,4 +293,5 @@
       }
     }
   }
+
 </script>

+ 2 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/basisbuild/index.vue

@@ -9,11 +9,11 @@
         <span>
           <i class="icon icon-table2"></i> 基建类资质对照表
         </span>
-        <!-- <span style="float: right;">
+        <span style="float: right;">
           <router-link :to="'/oilsupplier/basisbuild/add/operation'">
             <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">添加</el-button>
           </router-link>
-        </span> -->
+        </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="至"

+ 93 - 19
src/dashoo.cn/frontend_web/src/pages/oilsupplier/goodsaptitude/_opera/operation.vue

@@ -19,7 +19,7 @@
       </div>
       <el-form label-width="240px" ref="EntityForm" :model="formData">
         <el-row>
-          <el-col :span="8">
+          <!-- <el-col :span="8">
             <el-form-item v-if="serviceId == 'add'" label="编码" label-width="110px">
               <el-input v-model="formData.Code" placeholder="请输入" style="width: 100%"></el-input>
             </el-form-item>
@@ -45,11 +45,13 @@
             <el-form-item v-if="serviceId == 'add'" label="小类名称" label-width="110px">
               <el-input v-model="formData.SmallClassName" placeholder="请输入" style="width: 100%"></el-input>
             </el-form-item>
-          </el-col>
+          </el-col> -->
 
           <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label="品名" label-width="110px">
-              <el-input v-model="formData.GoodsName" placeholder="请输入" style="width: 100%"></el-input>
+            <el-form-item v-if="serviceId == 'add'" label="名称" label-width="110px">
+              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择名称">
+                <el-button slot="append" placeholder="选择" @click="goodsDialog = true">选择</el-button>
+              </el-input>
             </el-form-item>
           </el-col>
 
@@ -82,14 +84,26 @@
           </el-col>
         </el-row>
         <el-row>
-            <el-col :span="6" v-for="(item,i) in dynamicTableColumns" :key="i" >
-              <el-form-item :label="item.label">
-                <el-switch v-model="formData[item.prop]" active-value="1" inactive-value="0"></el-switch>
-              </el-form-item>
-            </el-col>
+          <el-col :span="6" v-for="(item,i) in dynamicTableColumns" :key="i">
+            <el-form-item :label="item.label">
+              <el-switch v-model="formData[item.prop]" active-value="1" inactive-value="0"></el-switch>
+            </el-form-item>
+          </el-col>
         </el-row>
       </el-form>
     </el-card>
+    <el-dialog title="物资类业务列表" :visible.sync="goodsDialog" top="5vh">
+      <el-row :gutter="20" style="height: calc(100vh - 450px); overflow: auto; margin-top:20px">
+        <el-col :span="20">
+          <el-tree highlight-current :expand-on-click-node="true" node-key="CodeName" :data="orgtreelist"
+            :props="orgtreeprops" ref="orgmanagetree" show-checkbox lazy :load="getChildrens" :filter-node-method="filterNode">
+          </el-tree>
+        </el-col>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" size="mini" @click="selectgood()">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -109,7 +123,17 @@
 
     data() {
       return {
+        goodsDialog: false,
         serviceId: '',
+        orgtreelist: [],
+        orgtreeprops: {
+          value: 'Id',
+          label: 'CodeName',
+          children: 'children',
+          isLeaf: 'Leaf'
+        },
+        auditerName: '',
+        classid: '',
         formData: {
           Id: '',
           Code: '',
@@ -177,8 +201,8 @@
           ModifiedUserId: '',
           ModifiedBy: '',
         },
-        dynamicTableColumns:[]
-
+        dynamicTableColumns: [],
+        checkList: []
         //下拉选择项
         //wellNoOptions: [],
         //supervisersOptions: [],
@@ -189,29 +213,79 @@
       this.serviceId = this.$route.params.opera;
       this.getDictOptions();
       console.log(this.serviceId);
-     
+
       if (this.serviceId != 'add' && this.serviceId > 0) {
         this.formData.Id = this.serviceId;
         this.initDatas()
       } else {
         this.formData.Id = 0;
       }
-       this.initTableHeader();
+      this.initTableHeader();
     },
     methods: {
-       initTableHeader(){
-        
+      initTableHeader() {
+
         setapi.initGoodTableHeader(this.$axios).then(res => {
-          
-          this.dynamicTableColumns=res.data.items
+
+          this.dynamicTableColumns = res.data.items
           console.log(res.data.items)
         })
       },
+      selectgood () {
+        let val = this.$refs.orgmanagetree.getCheckedNodes()
+        this.checkList = []
+        for (var i = 0; i < val.length; i++) {
+          if (val[i].Code.length == 8) {
+            this.checkList.push(val[i])
+          }
+        }
+        if (this.checkList.length > 1){
+          this.$message({
+            type: 'warning',
+            message: '只能选择一个分类!'
+          })
+          return
+        }else if(this.checkList.length == 1) {
+          this.auditerName = this.checkList[0].Name
+           this.formData.Code = this.checkList[0].Code
+           this.formData.Name = this.checkList[0].Name
+           this.classid = this.checkList[0].Id
+        }
+        this.goodsDialog = false
+        console.log("---",this.checkList)
+      },
+      //获取下一级所有分类
+      getChildrens(val, resolve) {
+        let Id = 0
+        if (val.level === 0) {
+          Id = 0
+        } else {
+          Id = val.data.Id
+        }
+        this.$axios.get('goodsaptitude/goodschildlistbypid/' + Id, {})
+          .then(res => {
+            if (!res.data.items || res.data.items.length <= 0) {
+              val.isLeaf = true
+              return resolve([])
+            }
+            for (let idx in res.data.items) {
+              res.data.items[idx].Leaf = res.data.items[idx].Leaf === '1' ? true : false
+            }
+            return resolve(res.data.items)
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      filterNode(value, data) {
+        if (!value) return true;
+        return data.CodeName.indexOf(value) !== -1;
+      },
       initDatas() {
         if (this.formData.Id) {
           api.getEntity(this.formData.Id, this.$axios).then(res => {
             this.formData = res.data;
-            console.log("---this.formData ----",this.formData )
+            console.log("---this.formData ----", this.formData)
           }).catch(err => {
             console.error(err)
           });
@@ -246,7 +320,7 @@
       },
 
       addEntity() {
-        api.addEntity(this.formData, this.$axios).then(res => {
+        api.addEntity(this.classid, this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
             //保存成功后,初始化数据,变成修改
             this.formData.Id = res.data.item;

+ 2 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/goodsaptitude/index.vue

@@ -9,11 +9,11 @@
         <span>
           <i class="icon icon-table2"></i> 物资类项目与资质对照表
         </span>
-        <!-- <span style="float: right;">
+        <span style="float: right;">
           <router-link :to="'/oilsupplier/goodsaptitude/add/operation'">
             <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">添加</el-button>
           </router-link>
-        </span> -->
+        </span>
         <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
 
           <el-form-item label="上报时间">

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/_opera/auditoperation.vue

@@ -380,6 +380,7 @@
       },
       getattachissuccess() {
         this.SubfileForm.FileUrl = ''
+        this.SubfileForm.FileName = ''
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
             if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/_opera/operation.vue

@@ -484,6 +484,7 @@
       },
       getattachissuccess() {
         this.SubfileForm.FileUrl = ''
+        this.SubfileForm.FileName = ''
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
             if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {

+ 129 - 51
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue

@@ -8,9 +8,11 @@
 
     <no-ssr>
       <div>
-        <float-img-btn ref="floatBtn" text="下一步" :itemWidth="58" :itemHeight="30" :coefficientHeight="0.8" @onFloatBtnClicked="nextTab">
+        <float-img-btn ref="floatBtn" text="下一步" :itemWidth="58" :itemHeight="30" :coefficientHeight="0.8"
+          @onFloatBtnClicked="nextTab">
         </float-img-btn>
-        <float-img-btn ref="floatBtn" text="上一步" :itemWidth="58" :itemHeight="30" :coefficientHeight="0.85" @onFloatBtnClicked="backTab" v-if="certId">
+        <float-img-btn ref="floatBtn" text="上一步" :itemWidth="58" :itemHeight="30" :coefficientHeight="0.85"
+          @onFloatBtnClicked="backTab" v-if="certId">
         </float-img-btn>
       </div>
     </no-ssr>
@@ -183,8 +185,8 @@
               <span>拥有专利、专有技术及工法</span>
               <el-button style="float: right; padding: 3px 0" type="text" @click="patentdialog">添加</el-button>
             </div>
-            <patent-list ref="patentList" :data.sync="patentList" :SupplierCertId="certId+''" :SupplierTypeCode="classId"
-              :canadd="add_flat" height="360px" style="margin-top: 20px">
+            <patent-list ref="patentList" :data.sync="patentList" :SupplierCertId="certId+''"
+              :SupplierTypeCode="classId" :canadd="add_flat" height="360px" style="margin-top: 20px">
             </patent-list>
           </el-card>
 
@@ -205,8 +207,8 @@
             height="360px" style="margin-top: 20px"></business-list>
         </el-tab-pane>
         <el-tab-pane label="企业资质" :disabled="!certId">
-          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" :flag="flag" @close="selectAuditOrg"
-            height="360px" style="margin-top: 20px"></subfile-list>
+          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" :flag="flag"
+            @close="selectAuditOrg" height="360px" style="margin-top: 20px"></subfile-list>
         </el-tab-pane>
 
         <el-tab-pane label="审批流程" v-if="formDataCert.Status > 0">
@@ -237,26 +239,26 @@
       </el-tabs>
     </el-card>
     <el-dialog title="提交初审" :visible.sync="dialogVisible" width="520px">
-      <el-form ref="searchForm" label-width="70px">
+      <el-form ref="searchForm" label-width="100px">
         <el-row>
-          <!--<el-col :span="24">
-            <el-form-item label="二级单位">
-              <el-cascader :options="orgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false"
-                filterable style="width: 100%" @change="auditOrgChang" v-model="secOrganize" placeholder="请选择组织">
-              </el-cascader>
-            </el-form-item>
-          </el-col>-->
           <el-col :span="24">
-            <el-form-item label="审批人">
-              <!--<el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 90%" filterable
-                allow-create default-first-option>
-                <el-option v-for="item in auditerOption" :key="item.id" :label="item.realname" :value="item.id">
-                </el-option>
-              </el-select>-->
-              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择审批人">
+            <el-form-item label="初审人员">
+              <el-input ref="selectAuditer" readonly v-model="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="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-form-item label="专业处室">
+              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
+                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室">
+              </el-cascader>
+            </el-form-item>
           </el-col>
           <el-col :span="24">
             <el-form-item label="说明">
@@ -271,6 +273,29 @@
         <el-button size="mini" type="primary" @click="AuditEntity">确定</el-button>
       </span>
     </el-dialog>
+    <el-dialog title="分办" :visible.sync="dialogVisibleCom" 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="auditerName" placeholder="请选择分办人">
+                <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
+              </el-input>
+            </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="dialogVisibleCom = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="SubpEntity">确定</el-button>
+      </span>
+    </el-dialog>
 
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
       :visible="chooseAuditorVisible"></choose-auditor>
@@ -331,10 +356,14 @@
         chooseAuditorVisible: false,
         showReturn: 1,
         IsCompanyUser: 0,
+        fushenauditer: '', //复审人员
+        majorDept: [100000180, 100000210],
         dialogVisible: false,
+        dialogVisibleCom: false,
         canUpdateSupplier: true,
         dictData: null,
         applyLoading: false,
+        secauditerOptions: [],
         equipmentList: [], // 企业主要装备情况
         performanceList: [], // 近三年主要工程业绩
         patentList: [], // 拥有专利、专有技术及工法
@@ -342,7 +371,6 @@
         businessList: [], // 准入业务
         subfileList: [], // 资质
         organizeOption: [], // 审批部门
-        auditerOption: [], // 审批人
         secOrganize: [],
         orgtreelist: [],
         auditer: '',
@@ -352,19 +380,21 @@
         certId: '',
         classId: '02',
         auditform: {
-          FirstAuditName: '',
-          CertId: '',
-          AuditRemark: ''
+          FirstAuditName: "",
+          SecondAudit: "",
+          ThirdAudit: "",
+          CertId: "",
+          AuditRemark: ""
         },
         orgtreeprops: {
           value: 'id',
-          label: 'Fullname',
+          label: 'name',
           children: 'children'
         },
         formData: {
           Id: '',
           SupplierName: '',
-          CredentialFlag:'1',
+          CredentialFlag: '1',
           OilCertificateNo: '',
           Grade: '',
           MgrUnit: '',
@@ -472,7 +502,7 @@
           classId: '03',
           workflowId: ''
         },
-        flag:'02'
+        flag: '02',
       }
     },
 
@@ -489,9 +519,10 @@
       } else {
         this.formData.Id = 0
       }
-      this.getDictOptions()
-      this.getorgtreelist()
       this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
+      console.log("----this.IsCompanyUser----",this.IsCompanyUser)
+      this.getDictOptions()
+      //this.getorgtreelist()
       if (this.IsCompanyUser && this.serviceId === 'add') {
         apiCert.getEntityByCreatorAndType('02', this.$axios).then(res => {
           this.certId = res.data.Id
@@ -659,7 +690,7 @@
       getbuslist() {
         this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
       },
-      nextTab () {
+      nextTab() {
         let totalTab = 3
         if (this.formData.AuditIndex > 0) {
           totalTab = 4
@@ -691,7 +722,7 @@
         }
       },
 
-      backTab () {
+      backTab() {
         let totalTab = 3
         if (this.formData.AuditIndex > 0) {
           totalTab = 4
@@ -713,18 +744,21 @@
           this.activeName = totalTab + ''
         }
       },
-
       getDictOptions() {
-        api.getDictList(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.organizeOption = res.data.items['Organizes']
-          /* this.UnitRelationOptions = res.data.items['UnitRelation']
-           this.getCityList(res.data.items['GaodeMapChinaAreas'])
-           this.CompanyTypeOptions = res.data.items['CompanyType'] */
+          this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
+          // this.auditerOptions = res.data.items['Auditer']
+          // this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
           console.error(err)
         })
       },
+
       getorgtreelist() {
         let _this = this
         let params = {
@@ -747,15 +781,15 @@
           })
       },
       auditOrgChang(val) {
-        let deptid = val[val.length - 1]
-        this.auditerOption = []
-        this.auditer = ''
-        let auditstepcode = 'FIRST_TRIAL'
-        api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
-          this.auditerOption = res.data.item
-        }).catch(err => {
-          console.error(err)
-        })
+        let auditstepcode = "SECOND_TRIAL";
+        api
+          .getAuditerByFirst(val, auditstepcode, this.$axios)
+          .then(res => {
+            this.secauditerOptions = res.data.item
+          })
+          .catch(err => {
+            console.error(err);
+          });
       },
       /* getCityList(val) {
        let resultData = JSON.parse(val)
@@ -765,7 +799,7 @@
        }, */
 
       // 保存信息
-      saveEntity () {
+      saveEntity() {
         let valid1 = false
         let valid2 = false
         this.$refs['BasisInfo'].$refs['EntityForm'].validate((valid) => {
@@ -825,7 +859,7 @@
         })
       },
 
-      updateEntity () {
+      updateEntity() {
         api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
             //更新子表
@@ -859,7 +893,7 @@
         return true
       },
       // 企业人员结构情况
-      updateNumberEntity () {
+      updateNumberEntity() {
         if (!this.CheckCompanyBase()) {
           return false
         }
@@ -883,9 +917,15 @@
         })
       },
       selectAuditOrg() {
-        this.dialogVisible = true
+        console.log("----this.IsCompanyUser",this.IsCompanyUser)
+        if (this.IsCompanyUser === 0) {
+          this.dialogVisible = true
+        }else if (this.IsCompanyUser === 1){
+          this.dialogVisibleCom = true
+        }
       },
       chooseAuditorShow() {
+        console.log("--this.formData.SupplierTypeCode----", this.formData.SupplierTypeCode)
         this.$refs['chooseAuditor'].getorgtreelist(this.formData.SupplierTypeCode)
         this.chooseAuditorVisible = true
       },
@@ -893,6 +933,7 @@
         this.auditer = val
         this.auditerName = name
         this.chooseAuditorVisible = false
+        this.auditOrgChang(this.auditer)
       },
       AuditEntity(val) {
         if (this.auditer === '') {
@@ -905,6 +946,8 @@
         this.applyLoading = true
         this.auditform.FirstAuditName = this.auditer
         this.auditform.CertId = this.certId
+        this.auditform.SecondAudit = this.fushenauditer
+        this.auditform.ThirdAudit = this.majorDept[this.majorDept.length - 1]
         apiCert.auditEntity(this.certId, this.auditform, this.$axios).then(res => {
           if (res.data.code === 0) {
             // 保存成功后,初始化数据,变成修改
@@ -925,6 +968,41 @@
           console.error(err)
         })
       },
+      SubpEntity() {
+        if (this.auditer === "") {
+          this.$message({
+            type: "warning",
+            message: "请选择分办人!"
+          })
+          return
+        }
+        this.applyLoading = true
+        this.auditform.FirstAuditName = this.auditer
+        this.auditform.CertId = this.certId
+        console.log("--this.audiform--", this.auditform)
+        apiCert
+          .auditEntity(this.certId, this.auditform, this.$axios)
+          .then(res => {
+            if (res.data.code === 0) {
+              // 保存成功后,初始化数据,变成修改
+              this.initDatas()
+              this.dialogVisibleCom = 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)
+          })
+      },
 
       nexStepCB() {
         this.formData.Step += 1

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 640 - 611
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue


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

@@ -8,9 +8,11 @@
 
     <no-ssr>
       <div>
-        <float-img-btn ref="floatBtn" text="下一步" :itemWidth="58" :itemHeight="30" :coefficientHeight="0.8" @onFloatBtnClicked="nextTab">
+        <float-img-btn ref="floatBtn" text="下一步" :itemWidth="58" :itemHeight="30" :coefficientHeight="0.8"
+          @onFloatBtnClicked="nextTab">
         </float-img-btn>
-        <float-img-btn ref="floatBtn" text="上一步" :itemWidth="58" :itemHeight="30" :coefficientHeight="0.85" @onFloatBtnClicked="backTab" v-if="certId">
+        <float-img-btn ref="floatBtn" text="上一步" :itemWidth="58" :itemHeight="30" :coefficientHeight="0.85"
+          @onFloatBtnClicked="backTab" v-if="certId">
         </float-img-btn>
       </div>
     </no-ssr>
@@ -185,8 +187,8 @@
               <el-button style="float: right; padding: 3px 0" type="text" @click="patentdialog"
                 v-if="formDataCert.Status <= 0">添加</el-button>
             </div>
-            <patent-list ref="patentList" :data.sync="patentList" :SupplierCertId="certId+''" :SupplierTypeCode="classId"
-              :canadd="add_flat" height="360px" style="margin-top: 20px"></patent-list>
+            <patent-list ref="patentList" :data.sync="patentList" :SupplierCertId="certId+''"
+              :SupplierTypeCode="classId" :canadd="add_flat" height="360px" style="margin-top: 20px"></patent-list>
           </el-card>
 
           <el-card class="box-card" style="margin-top: 10px;">
@@ -205,8 +207,8 @@
             style="margin-top: 20px"></tech-list>
         </el-tab-pane>
         <el-tab-pane label="企业资质" :disabled="!certId">
-          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" :flag="flag" @close="selectAuditOrg"
-            height="360px" style="margin-top: 20px"></subfile-list>
+          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" :flag="flag"
+            @close="selectAuditOrg" height="360px" style="margin-top: 20px"></subfile-list>
         </el-tab-pane>
 
         <el-tab-pane label="审批流程" v-if="formDataCert.Status > 0">
@@ -236,26 +238,26 @@
     </el-card>
 
     <el-dialog title="提交初审" :visible.sync="dialogVisible" width="520px">
-      <el-form ref="searchForm" label-width="70px">
+      <el-form ref="searchForm" label-width="100px">
         <el-row>
-          <!--<el-col :span="24">
-            <el-form-item label="二级单位">
-              <el-cascader :options="orgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false"
-                filterable style="width: 100%" @change="auditOrgChang" v-model="secOrganize" placeholder="请选择组织">
-              </el-cascader>
-            </el-form-item>
-          </el-col>-->
           <el-col :span="24">
-            <el-form-item label="审批人">
-              <!--<el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 90%" filterable
-                allow-create default-first-option>
-                <el-option v-for="item in auditerOption" :key="item.id" :label="item.realname" :value="item.id">
-                </el-option>
-              </el-select>-->
-              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择审批人">
+            <el-form-item label="初审人员">
+              <el-input ref="selectAuditer" readonly v-model="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="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-form-item label="专业处室">
+              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
+                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室">
+              </el-cascader>
+            </el-form-item>
           </el-col>
           <el-col :span="24">
             <el-form-item label="说明">
@@ -270,6 +272,29 @@
         <el-button size="mini" type="primary" @click="AuditEntity">确定</el-button>
       </span>
     </el-dialog>
+    <el-dialog title="分办" :visible.sync="dialogVisibleCom" 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="auditerName" placeholder="请选择分办人">
+                <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
+              </el-input>
+            </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="dialogVisibleCom = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="SubpEntity">确定</el-button>
+      </span>
+    </el-dialog>
 
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
       :visible="chooseAuditorVisible"></choose-auditor>
@@ -325,7 +350,7 @@
     },
     name: 'oilsupplierEdit',
 
-    data () {
+    data() {
       var checkWorkerTotal = (rule, value, callback) => {
         if (value <= 0) {
           return callback(new Error('企业员工总数必须大于0'))
@@ -347,6 +372,10 @@
         IsCompanyUser: 0,
         dialogVisible: false,
         canUpdateSupplier: true,
+        fushenauditer: '', //复审人员
+        majorDept: [],
+        secauditerOptions: [],
+        dialogVisibleCom: false,
         dictData: null,
         applyLoading: false,
         equipmentList: [], // 企业主要装备情况
@@ -356,7 +385,6 @@
         techList: [], // 准入业务
         subfileList: [], // 资质
         organizeOption: [], // 审批部门
-        auditerOption: [], // 审批人
         orgtreelist: [],
         secOrganize: [],
         auditer: '',
@@ -366,13 +394,15 @@
         certId: '',
         classId: '03',
         auditform: {
-          FirstAuditName: '',
-          CertId: '',
-          AuditRemark: ''
+          FirstAuditName: "",
+          SecondAudit: "",
+          ThirdAudit: "",
+          CertId: "",
+          AuditRemark: ""
         },
         orgtreeprops: {
           value: 'id',
-          label: 'Fullname',
+          label: 'name',
           children: 'children'
         },
         formData: {
@@ -516,10 +546,9 @@
       } else {
         this.formData.Id = 0
       }
-      this.getDictOptions()
-      this.getorgtreelist()
-
       this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
+      this.getDictOptions()
+      //this.getorgtreelist()
       if (this.IsCompanyUser && this.serviceId === 'add') {
         apiCert.getEntityByCreatorAndType('03', this.$axios).then(res => {
           this.certId = res.data.Id
@@ -691,7 +720,11 @@
       },
 
       getDictOptions() {
-        api.getDictList(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.organizeOption = res.data.items['Organizes']
           /* this.UnitRelationOptions = res.data.items['UnitRelation']
@@ -723,17 +756,18 @@
           })
       },
       auditOrgChang(val) {
-        let deptid = val[val.length - 1]
-        this.auditerOption = []
-        this.auditer = ''
-        let auditstepcode = 'FIRST_TRIAL'
-        api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
-          this.auditerOption = res.data.item
-        }).catch(err => {
-          console.error(err)
-        })
+          console.log("------val", val)
+        let auditstepcode = "SECOND_TRIAL";
+        api
+          .getAuditerByFirst(val, auditstepcode, this.$axios)
+          .then(res => {
+            this.secauditerOptions = res.data.item
+          })
+          .catch(err => {
+            console.error(err);
+          });
       },
-      nextTab () {
+      nextTab() {
         let totalTab = 3
         if (this.formData.AuditIndex > 0) {
           totalTab = 4
@@ -765,7 +799,7 @@
         }
       },
 
-      backTab () {
+      backTab() {
         let totalTab = 3
         if (this.formData.AuditIndex > 0) {
           totalTab = 4
@@ -795,7 +829,7 @@
       }, */
 
       // 保存信息
-      saveEntity () {
+      saveEntity() {
         let valid1 = false
         let valid2 = false
 
@@ -856,7 +890,7 @@
         })
       },
 
-      updateEntity () {
+      updateEntity() {
         api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
             //更新子表
@@ -920,7 +954,12 @@
         })
       },
       selectAuditOrg() {
-        this.dialogVisible = true
+        console.log("----this.IsCompanyUser",this.IsCompanyUser)
+        if (this.IsCompanyUser === 0) {
+          this.dialogVisible = true
+        }else if (this.IsCompanyUser === 1){
+          this.dialogVisibleCom = true
+        }
       },
       chooseAuditorShow() {
         this.$refs['chooseAuditor'].getorgtreelist(this.formData.SupplierTypeCode)
@@ -930,6 +969,7 @@
         this.auditer = val
         this.auditerName = name
         this.chooseAuditorVisible = false
+        this.auditOrgChang(this.auditer)
       },
       AuditEntity() {
         //this.auditer = val
@@ -943,6 +983,8 @@
         this.applyLoading = true
         this.auditform.FirstAuditName = this.auditer
         this.auditform.CertId = this.certId
+        this.auditform.SecondAudit = this.fushenauditer
+        this.auditform.ThirdAudit = this.majorDept[this.majorDept.length - 1]
         apiCert.auditEntity(this.certId, this.auditform, this.$axios).then(res => {
           if (res.data.code === 0) {
             // 保存成功后,初始化数据,变成修改
@@ -963,6 +1005,41 @@
           console.error(err)
         })
       },
+      SubpEntity() {
+        if (this.auditer === "") {
+          this.$message({
+            type: "warning",
+            message: "请选择分办人!"
+          })
+          return
+        }
+        this.applyLoading = true
+        this.auditform.FirstAuditName = this.auditer
+        this.auditform.CertId = this.certId
+        console.log("--this.audiform--", this.auditform)
+        apiCert
+          .auditEntity(this.certId, this.auditform, this.$axios)
+          .then(res => {
+            if (res.data.code === 0) {
+              // 保存成功后,初始化数据,变成修改
+              this.initDatas()
+              this.dialogVisibleCom = 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)
+          })
+      },
 
       jstimehandle(val) {
         if (val === '') {

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/basislist.vue

@@ -57,6 +57,7 @@
         <el-table-column min-width="110" align="center" prop="Status" label="审核状态" show-overflow-tooltip>
           <template slot-scope="scope">
             <span v-if="scope.row.Status=='0' || scope.row.Status==''" style="color:#E6A23C">待提交</span>
+            <span v-if="scope.row.Status=='10'" 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>

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/goodslist.vue

@@ -56,6 +56,7 @@
         <el-table-column min-width="110" align="center" prop="Status" label="审核状态" show-overflow-tooltip>
           <template slot-scope="scope">
             <span v-if="scope.row.Status=='0' || scope.row.Status==''" style="color:#E6A23C">待提交</span>
+            <span v-if="scope.row.Status=='10'" 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>

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/techlist.vue

@@ -57,6 +57,7 @@
         <el-table-column min-width="110" align="center" prop="Status" label="审核状态" show-overflow-tooltip>
           <template slot-scope="scope">
             <span v-if="scope.row.Status=='0' || scope.row.Status==''" style="color:#E6A23C">待提交</span>
+            <span v-if="scope.row.Status=='10'" 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>

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/basisdataopera.vue

@@ -621,6 +621,7 @@
       },
       getattachissuccess() {
         this.SubfileForm.FileUrl = ''
+        this.SubfileForm.FileName = ''
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
             if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/goodsdataopera.vue

@@ -723,6 +723,7 @@
       },
       getattachissuccess() {
         this.SubfileForm.FileUrl = ''
+        this.SubfileForm.FileName = ''
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
             if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue

@@ -696,6 +696,7 @@
       },
       getattachissuccess() {
         this.SubfileForm.FileUrl = ''
+        this.SubfileForm.FileName = ''
         if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
           for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
             if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {

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

@@ -25,6 +25,8 @@
             v-if="auditBtn && this.formData.Status == '4'">专业审批</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity"
             v-if="auditBtn && this.formData.Status == '5'">集中审批</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity"
+            v-if="this.formData.Status == '10'">分办</el-button>
           <router-link :to="'/oilsupplier/supplieraudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -191,13 +193,12 @@
     </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-form-item label="专业科室" v-if="this.formData.Status == '1'">
           <el-cascader :options="orgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false" filterable
             style="width: 100%" v-model="majorDept" placeholder="请选择组织">
           </el-cascader>
-        </el-form-item>
-        <el-form-item :label="aduitlabel"
-          v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
+        </el-form-item> -->
+        <el-form-item :label="aduitlabel" v-if="this.formData.Status == '3'">
           <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 100%" filterable allow-create
             default-first-option>
             <el-option v-for="item in auditerOptions" :key="item.id" :label="item.realname" :value="item.id">
@@ -207,11 +208,12 @@
         <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>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2">退回</el-radio>
           </template>
         </el-form-item>
         <el-form-item label="意见" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
-          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)"></el-input>
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)">
+          </el-input>
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top: -25px">
@@ -224,37 +226,37 @@
         <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>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2">退回</el-radio>
           </template>
         </el-form-item>
         <el-form-item label="意见" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
-          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)"></el-input>
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)">
+          </el-input>
         </el-form-item>
-        <el-divider></el-divider>
+        <!-- <el-divider></el-divider> -->
         <!-- <el-form-item label="复审部门" v-if="this.formData.Status == '1'">
           <el-cascader :options="secorgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false"
             filterable style="width: 100%" @change="auditOrgChange" placeholder="请选择组织">
           </el-cascader>
         </el-form-item> -->
-        <el-form-item :label="aduitlabel"
-          v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
+        <el-form-item :label="aduitlabel" v-if="this.formData.Status == '3'">
           <el-select ref="selectAuditer" v-model="auditer" 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-divider></el-divider>
-        <el-form-item label="专业科室" v-if="this.formData.Status == '1'">
-          <!-- <el-select ref="selectAuditer" v-model="majorDept" placeholder="请选择" style="width: 90%" filterable allow-create
+        <!-- <el-divider></el-divider> -->
+        <!-- <el-form-item label="专业科室" v-if="this.formData.Status == '1'"> -->
+        <!-- <el-select ref="selectAuditer" v-model="majorDept" placeholder="请选择" style="width: 90%" filterable allow-create
             default-first-option>
             <el-option v-for="item in orgtreelist" :key="item.id" :label="item.name" :value="item.id">
             </el-option>
           </el-select> -->
-          <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
+        <!-- <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
             style="width: 100%" v-model="majorDept" placeholder="请选择组织">
           </el-cascader>
-        </el-form-item>
+        </el-form-item> -->
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top: -25px">
         <el-button size="small" @click="dialogMakeSure2 = false">取 消</el-button>
@@ -284,6 +286,43 @@
         <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
       </div>
     </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="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="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-form-item label="专业处室">
+              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
+                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室">
+              </el-cascader>
+            </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" @click="makeSure()">确定</el-button>
+      </span>
+    </el-dialog>
+    <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
+      :visible="chooseAuditorVisible"></choose-auditor>
   </div>
 </template>
 
@@ -305,9 +344,11 @@
   import AuditbusList from '@/components/oilsupplier/auditbuslist'
   import BasisInfo from '@/components/oilsupplier/basisinfo'
   import BusinessList from '@/components/oilsupplier/businesslist'
+  import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
 
   export default {
     components: {
+      ChooseAuditor,
       SupplierFileTable,
       WfHistory,
       WfBackHistory,
@@ -342,11 +383,22 @@
         organizeOption: [],
         orgtreelist: [],
         secorgtreelist: [],
-        majorDept: [100000180,100000210],
+        auditer: "",
+        auditerName: "",
+        fushenauditer: '', //复审人员
+        majorDept: [100000180, 100000210],
+        auditform: {
+          FirstAuditName: "",
+          SecondAudit: "",
+          ThirdAudit: "",
+          CertId: "",
+          AuditRemark: ""
+        },
         serviceId: '',
         certId: '',
         classId: '02',
         dictData: null,
+        dialogVisible: false,
         dialogMakeSure: false,
         dialogMakeSure2: false,
         dialogAllocation: false,
@@ -380,6 +432,7 @@
           CommercialNo: '',
           OrganCode: '',
           CountryTaxNo: '',
+          ProcessKey: '',
           LocalTaxNo: '',
           Address: '',
           Province: '',
@@ -459,7 +512,7 @@
           WorkflowId: ''
         },
         entrydetail: {
-          process: 'oil_supplier_apply_1',
+          process: '',
           business: '',
           instance: '',
           status: ''
@@ -468,13 +521,15 @@
           certId: '',
           classId: '03',
           workflowId: ''
-        }
+        },
+        IsCompanyUser: '',
       }
     },
     created() {
       this.companyid = this.authUser.Profile.Superior
       this.serviceId = this.$route.params.opera + ''
       this.certId = this.$route.query.certid + ''
+      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
       if (this.serviceId !== 'add' && this.serviceId > 0) {
         this.formData.Id = this.serviceId
       } else {
@@ -522,7 +577,7 @@
 
             this.backhistroy.certId = this.certId
             this.backhistroy.workflowId = this.formDataCert.WorkflowId
-
+            this.entrydetail.process = this.formData.ProcessKey
             if (this.formData.Status === '1') {
               this.aduitlabel = '复审人员'
               this.auditTitle = '初审'
@@ -539,6 +594,9 @@
             } else if (this.formData.Status === '5') {
               this.auditTitle = '集中审批'
               this.auditstepcode = 'PROF_REGULATION'
+            } else if (this.formData.Status === '10') {
+              this.auditTitle = '分办'
+              this.auditstepcode = 'FEN_TRIAL'
             }
             this.$refs['equipmentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['performanceList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
@@ -551,6 +609,29 @@
           })
         }
       },
+      chooseAuditorShow() {
+        this.$refs["chooseAuditor"].getorgtreelist(
+          this.formData.SupplierTypeCode
+        );
+        this.chooseAuditorVisible = true;
+      },
+      setAuditer(val, name) {
+        this.auditer = val;
+        this.auditerName = name;
+        this.chooseAuditorVisible = false;
+        this.auditOrgChang(this.auditer)
+      },
+      auditOrgChang(val) {
+        console.log("------val", val)
+        let auditstepcode = "SECOND_TRIAL";
+        api.getAuditerByFirst(val, auditstepcode, this.$axios)
+          .then(res => {
+            this.secauditerOptions = res.data.item
+          })
+          .catch(err => {
+            console.error(err);
+          });
+      },
       isAccess() {
         apiCert.isAccess(this.auditstepcode, this.$axios).then(res => {
           this.auditBtn = res.data
@@ -738,6 +819,8 @@
           this.dialogAllocation = true
         } else if (this.formData.Status === '1') {
           this.dialogMakeSure2 = true
+        } else if (this.formData.Status === '10') {
+          this.dialogVisible = true
         } else {
           this.dialogMakeSure = true
         }
@@ -748,7 +831,7 @@
       },
       // 审核通过
       makeSure() {
-        if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3') {
+        if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3'&& this.formData.Status !== '10') {
           this.$message({
             type: 'warning',
             message: '审批意见不能低于20个字符!'
@@ -756,15 +839,14 @@
           return
         }
         if (this.shenheForm.SuccessStatus === 1) {
-          if (this.formData.Status === '1' && this.majorDept.length === 0) {
+          if (this.userOptions == null || this.userOptions.length === 0) {
             this.$message({
               type: 'warning',
-              message: '请选择专业科室!'
+              message: '该专业科室未配置接收人!'
             })
             return
           }
-          if ((!this.auditer || this.auditer === 0) && this.formData.Status !== '2' && this.formData.Status !== '4' &&
-            this.formData.Status !== '5') {
+          if ((!this.auditer || this.auditer === 0) && this.formData.Status === '3') {
             this.$message({
               type: 'warning',
               message: '请选择审核人!'
@@ -779,11 +861,17 @@
         let params = this.shenheForm
         let audit = {
           auditer: this.auditer,
-          majorDept: this.majorDept[this.majorDept.length - 1]
+          majorDept: this.majorDept[this.majorDept.length - 1],
+          FirstAuditName: this.auditer,
+          SecondAudit: this.fushenauditer,
+          ThirdAudit: this.majorDept[this.majorDept.length - 1],
+          AuditRemark: this.auditform.AuditRemark
         }
+        console.log(params, '---params----')
         apiCert.auditEntityFir(this.certId, audit, params, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.initDatas()
+            this.dialogVisible = false
             this.dialogMakeSure = false
             this.dialogAllocation = false
             this.dialogMakeSure2 = false

+ 105 - 42
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/goodsedit.vue

@@ -23,6 +23,8 @@
             v-if="auditBtn && this.formData.Status == '4' && this.formData.InStyle != '2'">专业审批</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity"
             v-if="auditBtn && this.formData.Status == '5' && this.formData.InStyle != '3'">集中审批</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity"
+            v-if="this.formData.Status == '10'">分办</el-button>
           <router-link :to="'/oilsupplier/supplieraudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -189,22 +191,21 @@
     </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-cascader :options="orgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false" filterable
+        <!-- <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-cascader :options="orgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false" filterable
             style="width: 100%" v-model="majorDept" placeholder="请选择组织">
           </el-cascader>
-        </el-form-item>
-        <el-form-item :label="aduitlabel"
-          v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
+        </el-form-item> -->
+        <el-form-item :label="aduitlabel" v-if="this.formData.Status == '3'">
           <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 100%" filterable allow-create
             default-first-option>
             <el-option v-for="item in auditerOptions" :key="item.id" :label="item.realname" :value="item.id">
@@ -214,7 +215,7 @@
         <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>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2">退回</el-radio>
           </template>
         </el-form-item>
         <el-form-item porp="AuditorRemark" label="意见"
@@ -234,7 +235,7 @@
         <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>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2">退回</el-radio>
           </template>
         </el-form-item>
         <el-form-item prop="AuditorRemark" label="意见"
@@ -243,27 +244,26 @@
             minlength="20"></el-input>
         </el-form-item>
 
-        <el-divider></el-divider>
+        <!-- <el-divider></el-divider> -->
 
-        <el-form-item :label="aduitlabel"
-          v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
+        <el-form-item :label="aduitlabel" v-if="this.formData.Status == '3'">
           <el-select ref="selectAuditer" v-model="auditer" 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-divider></el-divider>
-        <el-form-item label="专业科室" v-if="this.formData.Status == '1' && this.formData.InStyle != '2'">
-          <!-- <el-select ref="selectAuditer" v-model="majorDept" placeholder="请选择" style="width: 90%" filterable allow-create
+        <!-- <el-divider></el-divider> -->
+        <!-- <el-form-item label="专业科室" v-if="this.formData.Status == '1' && this.formData.InStyle != '2'"> -->
+        <!-- <el-select ref="selectAuditer" v-model="majorDept" placeholder="请选择" style="width: 90%" filterable allow-create
             default-first-option>
             <el-option v-for="item in orgtreelist" :key="item.id" :label="item.name" :value="item.id">
             </el-option>
           </el-select> -->
-          <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
+        <!-- <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
             style="width: 100%" v-model="majorDept" placeholder="请选择组织" @change="orgtreeChange">
           </el-cascader>
-        </el-form-item>
+        </el-form-item> -->
 
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top: -25px">
@@ -295,6 +295,41 @@
         <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
       </div>
     </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="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="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-form-item label="专业处室">
+              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
+                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室">
+              </el-cascader>
+            </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" @click="makeSure()">确定</el-button>
+      </span>
+    </el-dialog>
 
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
       :visible="chooseAuditorVisible"></choose-auditor>
@@ -348,6 +383,7 @@
       return {
         auditer: '',
         auditerName: '',
+        dialogVisible: false,
         chooseAuditorVisible: false,
         equipmentList: [], // 企业主要装备情况
         performanceList: [], // 近三年主要工程业绩
@@ -362,7 +398,17 @@
         orgtreelist: [],
         secorgtreelist: [],
         userOptions: [],
+        auditer: "",
+        auditerName: "",
+        fushenauditer: '', //复审人员
         majorDept: [100000180, 100000192],
+        auditform: {
+          FirstAuditName: "",
+          SecondAudit: "",
+          ThirdAudit: "",
+          CertId: "",
+          AuditRemark: ""
+        },
         serviceId: '',
         certId: '',
         classId: '01',
@@ -414,6 +460,7 @@
           SafetyLicense: '',
           TechServiceLic: '',
           TJInNotify: '',
+          ProcessKey: '',
           SpecIndustryCert: '',
           LegalPerson: '',
           CategoryCode: '',
@@ -478,11 +525,12 @@
           WorkflowId: ''
         },
         entrydetail: {
-          process: 'oil_supplier_apply_1',
+          process: '',
           business: '',
           instance: '',
           status: ''
         },
+        IsCompanyUser: '',
         backhistroy: {
           certId: '',
           classId: '03',
@@ -494,6 +542,7 @@
       this.companyid = this.authUser.Profile.Superior
       this.serviceId = this.$route.params.opera + ''
       this.certId = this.$route.query.certid + ''
+      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
       if (this.serviceId !== 'add' && this.serviceId > 0) {
         this.formData.Id = this.serviceId
       } else {
@@ -535,15 +584,28 @@
         this.chooseAuditorVisible = true
       },
       setAuditer(val, name) {
-        this.auditer = val
-        this.auditerName = name
-        this.chooseAuditorVisible = false
+        this.auditer = val;
+        this.auditerName = name;
+        this.chooseAuditorVisible = false;
+        this.auditOrgChang(this.auditer)
+      },
+      auditOrgChang(val) {
+        console.log("------val", val)
+        let auditstepcode = "SECOND_TRIAL";
+        api.getAuditerByFirst(val, auditstepcode, this.$axios)
+          .then(res => {
+            this.secauditerOptions = res.data.item
+          })
+          .catch(err => {
+            console.error(err);
+          });
       },
 
       initDatas() {
         if (this.formData.Id) {
           api.getEntityAndCert(this.certId, this.$axios).then(res => {
             this.formData = res.data
+            console.log("--this.formData--", this.formData)
             this.formDataCert.WorkerTotal = this.formData.WorkerTotal
             this.formDataCert.ContractNum = this.formData.ContractNum
             this.formDataCert.UniversityNum = this.formData.UniversityNum
@@ -556,14 +618,14 @@
             this.formDataCert.SkillerTotal = this.formData.SkillerTotal
             this.formDataCert.Status = this.formData.Status
             this.formDataCert.WorkflowId = this.formData.WorkflowId
-            console.log("---", this.formData.Status,this.formData.InStyle)
+            console.log("---", this.formData.Status, this.formData.InStyle)
             this.entrydetail.business = this.formData.BusinessKey
             this.entrydetail.instance = this.formDataCert.WorkflowId
             this.entrydetail.status = this.formData.Status
 
             this.backhistroy.certId = this.certId
             this.backhistroy.workflowId = this.formDataCert.WorkflowId
-
+            this.entrydetail.process = this.formData.ProcessKey
             if (this.formData.Status === '1') {
               this.aduitlabel = '复审人员'
               this.auditTitle = '初审'
@@ -592,9 +654,10 @@
           })
         }
       },
-      isAccess () {
+      isAccess() {
         apiCert.isAccess(this.auditstepcode, this.$axios).then(res => {
           this.auditBtn = res.data
+          console.log("------", this.auditBtn)
         }).catch(err => {
           console.log(err)
         })
@@ -778,6 +841,8 @@
           this.dialogAllocation = true
         } else if (this.formData.Status === '1') {
           this.dialogMakeSure2 = true
+        } else if (this.formData.Status === '10') {
+          this.dialogVisible = true
         } else {
           this.dialogMakeSure = true
         }
@@ -787,7 +852,7 @@
       },
       // 审核通过
       makeSure() {
-        if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3') {
+        if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3'&& this.formData.Status !== '10') {
           this.$message({
             type: 'warning',
             message: '审批意见不能低于20个字符!'
@@ -795,13 +860,6 @@
           return
         }
         if (this.shenheForm.SuccessStatus === 1) {
-          if (this.formData.Status === '1' && this.majorDept.length === 0) {
-            this.$message({
-              type: 'warning',
-              message: '请选择专业科室!'
-            })
-            return
-          }
           if (this.userOptions == null || this.userOptions.length === 0) {
             this.$message({
               type: 'warning',
@@ -809,8 +867,7 @@
             })
             return
           }
-          if ((!this.auditer || this.auditer === 0) && this.formData.Status !== '2' && this.formData.Status !== '4' &&
-            this.formData.Status !== '5') {
+          if ((!this.auditer || this.auditer === 0) && this.formData.Status == '3') {
             this.$message({
               type: 'warning',
               message: '请选择审核人!'
@@ -825,11 +882,17 @@
         let params = this.shenheForm
         let audit = {
           auditer: this.auditer,
-          majorDept: this.majorDept[this.majorDept.length - 1]
+          majorDept: this.majorDept[this.majorDept.length - 1],
+          FirstAuditName: this.auditer,
+          SecondAudit: this.fushenauditer,
+          ThirdAudit: this.majorDept[this.majorDept.length - 1],
+          AuditRemark: this.auditform.AuditRemark
         }
+        console.log(params, '---params----')
         apiCert.auditEntityFir(this.certId, audit, params, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.initDatas()
+            this.dialogVisible = false
             this.dialogMakeSure = false
             this.dialogAllocation = false
             this.dialogMakeSure2 = false

+ 107 - 24
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/techedit.vue

@@ -23,6 +23,8 @@
             v-if="auditBtn && this.formData.Status == '4'">专业审批</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity"
             v-if="auditBtn && this.formData.Status == '5'">集中审批</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity"
+            v-if="this.formData.Status == '10'">分办</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>
@@ -194,16 +196,16 @@
           </template>
         </el-form-item>
         <el-form-item label="意见" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
-          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)"></el-input>
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)">
+          </el-input>
         </el-form-item>
-        <el-divider></el-divider>
+        <!-- <el-divider></el-divider> -->
         <!-- <el-form-item label="专业科室" v-if="this.formData.Status == '1'">
           <el-cascader :options="orgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false" filterable
             style="width: 100%" v-model="majorDept" placeholder="请选择组织">
           </el-cascader>
         </el-form-item> -->
-        <el-form-item :label="aduitlabel"
-          v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
+        <el-form-item :label="aduitlabel" v-if="this.formData.Status == '3'">
           <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 100%" filterable allow-create
             default-first-option>
             <el-option v-for="item in auditerOptions" :key="item.id" :label="item.realname" :value="item.id">
@@ -226,33 +228,33 @@
           </template>
         </el-form-item>
         <el-form-item label="意见" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
-          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)"></el-input>
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)">
+          </el-input>
         </el-form-item>
-        <el-divider></el-divider>
+        <!-- <el-divider></el-divider> -->
         <!-- <el-form-item label="复审部门" v-if="this.formData.Status == '1'">
           <el-cascader :options="secorgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false"
             filterable style="width: 100%" @change="auditOrgChange" placeholder="请选择组织">
           </el-cascader>
         </el-form-item> -->
-        <el-form-item :label="aduitlabel"
-          v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
+        <el-form-item :label="aduitlabel" v-if="this.formData.Status == '3'">
           <el-select ref="selectAuditer" v-model="auditer" 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-divider></el-divider>
-        <el-form-item label="专业科室" v-if="this.formData.Status == '1'">
-          <!-- <el-select ref="selectAuditer" v-model="majorDept" placeholder="请选择" style="width: 90%" filterable allow-create
+        <!-- <el-divider></el-divider> -->
+        <!-- <el-form-item label="专业科室" v-if="this.formData.Status == '1'"> -->
+        <!-- <el-select ref="selectAuditer" v-model="majorDept" placeholder="请选择" style="width: 90%" filterable allow-create
             default-first-option>
             <el-option v-for="item in orgtreelist" :key="item.id" :label="item.name" :value="item.id">
             </el-option>
           </el-select> -->
-          <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
+        <!-- <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
             style="width: 100%" v-model="majorDept" placeholder="请选择组织">
           </el-cascader>
-        </el-form-item>
+        </el-form-item> -->
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top: -25px">
         <el-button size="small" @click="dialogMakeSure2 = false">取 消</el-button>
@@ -282,6 +284,43 @@
         <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
       </div>
     </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="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="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-form-item label="专业处室">
+              <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
+                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室">
+              </el-cascader>
+            </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" @click="makeSure()">确定</el-button>
+      </span>
+    </el-dialog>
+    <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
+      :visible="chooseAuditorVisible"></choose-auditor>
   </div>
 </template>
 
@@ -303,9 +342,11 @@
   import AuditbusList from '@/components/oilsupplier/auditbuslist'
   import TechInfo from '@/components/oilsupplier/techinfo'
   import BusinessList from '@/components/oilsupplier/businesslist'
+  import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
 
   export default {
     components: {
+      ChooseAuditor,
       SupplierFileTable,
       WfHistory,
       WfBackHistory,
@@ -338,7 +379,17 @@
         auditerCurOptions: [],
         orgtreelist: [],
         secorgtreelist: [],
+        auditer: "",
+        auditerName: "",
+        fushenauditer: '', //复审人员
         majorDept: [],
+        auditform: {
+          FirstAuditName: "",
+          SecondAudit: "",
+          ThirdAudit: "",
+          AuditRemark: ""
+        },
+        dialogVisible: false,
         dialogMakeSure: false,
         dialogMakeSure2: false,
         dialogAllocation: false,
@@ -351,7 +402,7 @@
         certId: '',
         classId: '03',
         dictData: null,
-        companyid:'',
+        companyid: '',
 
         orgtreeprops: {
           value: 'id',
@@ -403,6 +454,7 @@
           Telphone: '',
           Fax: '',
           CompanyTel: '',
+          ProcessKey: '',
           QQ: '',
           CompanyUrl: '',
           SpecSupplier: '',
@@ -455,11 +507,12 @@
           AnnualId: 0
         },
         entrydetail: {
-          process: 'oil_supplier_apply_1',
+          process: '',
           business: '',
           instance: '',
           status: ''
         },
+        IsCompanyUser: '',
         backhistroy: {
           certId: '',
           classId: '03',
@@ -471,6 +524,7 @@
       this.companyid = this.authUser.Profile.Superior
       this.serviceId = this.$route.params.opera + ''
       this.certId = this.$route.query.certid + ''
+      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
       if (this.serviceId !== 'add' && this.serviceId > 0) {
         this.formData.Id = this.serviceId
       } else {
@@ -519,7 +573,7 @@
 
             this.backhistroy.certId = this.certId
             this.backhistroy.workflowId = this.formDataCert.WorkflowId
-
+            this.entrydetail.process = this.formData.ProcessKey
             if (this.formData.Status === '1') {
               this.aduitlabel = '复审人员'
               this.auditTitle = '初审'
@@ -550,6 +604,29 @@
           })
         }
       },
+      chooseAuditorShow() {
+        this.$refs["chooseAuditor"].getorgtreelist(
+          this.formData.SupplierTypeCode
+        );
+        this.chooseAuditorVisible = true;
+      },
+      setAuditer(val, name) {
+        this.auditer = val;
+        this.auditerName = name;
+        this.chooseAuditorVisible = false;
+        this.auditOrgChang(this.auditer)
+      },
+      auditOrgChang(val) {
+        console.log("------val", val)
+        let auditstepcode = "SECOND_TRIAL";
+        api.getAuditerByFirst(val, auditstepcode, this.$axios)
+          .then(res => {
+            this.secauditerOptions = res.data.item
+          })
+          .catch(err => {
+            console.error(err);
+          });
+      },
       isAccess() {
         apiCert.isAccess(this.auditstepcode, this.$axios).then(res => {
           this.auditBtn = res.data
@@ -739,6 +816,8 @@
           this.dialogAllocation = true
         } else if (this.formData.Status === '1') {
           this.dialogMakeSure2 = true
+        } else if (this.formData.Status === '10') {
+          this.dialogVisible = true
         } else {
           this.dialogMakeSure = true
         }
@@ -748,8 +827,8 @@
         this.dialogAllocation = true
       },
       // 审核通过
-      makeSure () {
-        if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3') {
+      makeSure() {
+        if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3'&& this.formData.Status !== '10') {
           this.$message({
             type: 'warning',
             message: '审批意见不能低于20个字符!'
@@ -757,15 +836,14 @@
           return
         }
         if (this.shenheForm.SuccessStatus === 1) {
-          if (this.formData.Status === '1' && this.majorDept.length === 0) {
+          if (this.userOptions == null || this.userOptions.length === 0) {
             this.$message({
               type: 'warning',
-              message: '请选择专业科室!'
+              message: '该专业科室未配置接收人!'
             })
             return
           }
-          if ((!this.auditer || this.auditer === 0) && this.formData.Status !== '2' && this.formData.Status !== '4' &&
-            this.formData.Status !== '5') {
+          if ((!this.auditer || this.auditer === 0) && this.formData.Status === '3') {
             this.$message({
               type: 'warning',
               message: '请选择审核人!'
@@ -780,12 +858,17 @@
         let params = this.shenheForm
         let audit = {
           auditer: this.auditer,
-          majorDept: this.majorDept[this.majorDept.length - 1]
+          majorDept: this.majorDept[this.majorDept.length - 1],
+          FirstAuditName: this.auditer,
+          SecondAudit: this.fushenauditer,
+          ThirdAudit: this.majorDept[this.majorDept.length - 1],
+          AuditRemark: this.auditform.AuditRemark
         }
-        console.log(this.shenheForm, '---this.shenheForm----')
+        console.log(params, '---params----')
         apiCert.auditEntityFir(this.certId, audit, params, this.$axios).then(res => {
           if (res.data.code === 0) {
             this.initDatas()
+            this.dialogVisible = false
             this.dialogMakeSure = false
             this.dialogAllocation = false
             this.dialogMakeSure2 = false

+ 5 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/index.vue

@@ -35,7 +35,8 @@
         <el-table-column label="操作" min-width="90" align="center" fixed="right">
           <template slot-scope="scope">
             <router-link :to="'/oilsupplier/supplieraudit/' + scope.row.Id + '/' + (scope.row.SupplierTypeCode === '01' ? 'goodsedit' : (scope.row.SupplierTypeCode === '02' ? 'basisedit' : 'techedit')) + '?certid=' + scope.row.CertId">
-              <el-button type="primary" plain size="mini" title="分办" v-if="scope.row.Status == '3'">分办</el-button>
+              <el-button type="primary" plain size="mini" title="分办" v-if="scope.row.Status == '3'&&IsCompanyUser == 0">分办</el-button>
+              <el-button type="primary" plain size="mini" title="分办" v-if="scope.row.Status == '10'&&IsCompanyUser == 1">分办</el-button>
               <el-button type="primary" plain size="mini" title="审核" v-else>审核</el-button>
             </router-link>
 
@@ -57,6 +58,7 @@
         <el-table-column min-width="110" align="center" prop="Status" label="审核状态" show-overflow-tooltip>
           <template slot-scope="scope">
             <span v-if="scope.row.Status=='0' || scope.row.Status==''" style="color:#E6A23C">待提交</span>
+            <span v-if="scope.row.Status=='10'" 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>
@@ -462,6 +464,7 @@
 
     data() {
       return {
+        IsCompanyUser: 0,
         dialogVisible: false,
         //列表数据
         entityList: [],
@@ -908,6 +911,7 @@
       }
     },
     created() {
+      this.IsCompanyUser = this.authUser.Profile.IsCompanyUser
       //查询条件初始值备份
       Object.assign(this.searchFormReset, this.searchForm);
       //查询列表

+ 66 - 56
src/dashoo.cn/frontend_web/src/pages/oilsupplier/technologyservice/_opera/operation.vue

@@ -20,63 +20,12 @@
       <el-form label-width="240px" ref="EntityForm" :model="formData">
          <el-row>
            <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label="编码" label-width="110px">
-              <el-input v-model="formData.Code" placeholder="请输入" style="width: 100%"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
             <el-form-item v-if="serviceId == 'add'" label="名称" label-width="110px">
-              <el-input v-model="formData.Name" placeholder="请输入" style="width: 100%"></el-input>
-            </el-form-item>
-          </el-col>
-           <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="一级编码">
-              <el-input v-model="formData.Code1" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="一级名称">
-              <el-input v-model="formData.Name1" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="二级编码">
-              <el-input v-model="formData.Code2" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="二级名称">
-              <el-input v-model="formData.Name2" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="三级编码">
-              <el-input v-model="formData.Code3" style="width:100%" placeholder="请输入"></el-input>
+              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择名称">
+                <el-button slot="append" placeholder="选择" @click="goodsDialog = true">选择</el-button>
+              </el-input>
             </el-form-item>
           </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="三级名称">
-              <el-input v-model="formData.Name3" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="四级编码">
-              <el-input v-model="formData.Code4" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="四级名称">
-              <el-input v-model="formData.Name4" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
           <el-col :span="8">
             <el-form-item v-if="serviceId == 'add'" label-width="110px" label="部门ID">
               <el-input v-model="formData.OrgId" style="width:100%" placeholder="请输入"></el-input>
@@ -92,6 +41,18 @@
         </el-row>
       </el-form>
     </el-card>
+    <el-dialog title="技术服务类业务列表" :visible.sync="goodsDialog" top="5vh">
+      <el-row :gutter="20" style="height: calc(100vh - 450px); overflow: auto; margin-top:20px">
+        <el-col :span="20">
+          <el-tree highlight-current :expand-on-click-node="true" node-key="CodeName" :data="orgtreelist"
+            :props="orgtreeprops" ref="orgmanagetree" show-checkbox>
+          </el-tree>
+        </el-col>
+      </el-row>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" size="mini" @click="selectgood()">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -111,6 +72,15 @@
 
     data() {
       return {
+        auditerName: '',
+        classid: '',
+        goodsDialog: false,
+        orgtreelist: [],
+        orgtreeprops: {
+          value: 'Id',
+          label: 'CodeName',
+          children: 'children'
+        },
         serviceId: '',
         formData: {
           Id: '',
@@ -188,7 +158,8 @@
           ModifiedBy: '',
 
         },
-        dynamicTableColumns:[]
+        dynamicTableColumns:[],
+        checkList: []
         //下拉选择项
         //wellNoOptions: [],
         //supervisersOptions: [],
@@ -206,6 +177,7 @@
         this.formData.Id = 0;
       }
         this.initTableHeader();
+        this.getorgtreelist()
     },
     methods: {
        initTableHeader(){
@@ -216,6 +188,44 @@
           console.log(res.data.items)
         })
       },
+      getorgtreelist() {
+        let _this = this
+        let params = {
+          keyword: _this.keyword
+        }
+        this.$axios.get('technologyservice/techbuslist', {
+            params
+          })
+          .then(res => {
+            _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'ParentId', 'Id,Code,Name,CodeName')
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      selectgood () {
+        let val = this.$refs.orgmanagetree.getCheckedNodes()
+        this.checkList = []
+        for (var i = 0; i < val.length; i++) {
+          if (!val[i].children || val[i].children.length <= 0) {
+            this.checkList.push(val[i])
+          }
+        }
+        if (this.checkList.length > 1){
+          this.$message({
+            type: 'warning',
+            message: '只能选择一个分类!'
+          })
+          return
+        }else if(this.checkList.length == 1) {
+          this.auditerName = this.checkList[0].Name
+           this.formData.Code = this.checkList[0].Code
+           this.formData.Name = this.checkList[0].Name
+           this.classid = this.checkList[0].id
+        }
+        this.goodsDialog = false
+        console.log("---",this.checkList)
+      },
       initDatas() {
         if(this.formData.Id) {
           api.getEntity(this.formData.Id, this.$axios).then(res => {
@@ -254,7 +264,7 @@
       },
 
       addEntity() {
-        api.addEntity(this.formData, this.$axios).then(res => {
+        api.addEntity(this.classid,this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
             //保存成功后,初始化数据,变成修改
             this.formData.Id = res.data.item;

+ 2 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/technologyservice/index.vue

@@ -9,11 +9,11 @@
         <span>
           <i class="icon icon-table2"></i> 技术服务类资质对照表
         </span>
-        <!-- <span style="float: right;">
+        <span style="float: right;">
           <router-link :to="'/oilsupplier/technologyservice/add/operation'">
             <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;">添加</el-button>
           </router-link>
-        </span> -->
+        </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="至"

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels