Browse Source

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

# By huahaiyan (3) and others
# Via huahaiyan
* 'develop' of http://code.dashoo.cn/dashoo/supplier_system:
  年审提交
  保存人员信息时不走下一步
  注释
  资质上传
  生成缴费记录
  生成费用
  添加准入范围,占位锚点
  fixbug
  增项提交审批初审修改
  准入申请
  企业资质
herozyw1 6 years ago
parent
commit
83623756b3
22 changed files with 1125 additions and 276 deletions
  1. 1 1
      src/dashoo.cn/backend/api/business/oilsupplier/annualaudit/annualaudit.go
  2. 24 12
      src/dashoo.cn/backend/api/controllers/oilsupplier/annualaudit.go
  3. 2 1
      src/dashoo.cn/backend/api/controllers/oilsupplier/qualchange.go
  4. 27 10
      src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go
  5. 13 0
      src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go
  6. 128 0
      src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go
  7. 6 0
      src/dashoo.cn/frontend_web/src/api/oilsupplier/supplier.js
  8. 7 0
      src/dashoo.cn/frontend_web/src/api/oilsupplier/supplierappend.js
  9. 1 1
      src/dashoo.cn/frontend_web/src/components/Headbar.vue
  10. 5 8
      src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist.vue
  11. 120 7
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/basisdataopera.vue
  12. 130 10
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/goodsdataopera.vue
  13. 184 87
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/techdataopera.vue
  14. 41 13
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/index.vue
  15. 56 22
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue
  16. 41 6
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue
  17. 34 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue
  18. 66 0
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/basisdataopera.vue
  19. 66 20
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue
  20. 169 72
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/basisedit.vue
  21. 2 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/goodsedit.vue
  22. 2 2
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/techedit.vue

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

@@ -7,7 +7,7 @@ import (
 type OilAnnualAudit struct {
 	Id               int       `xorm:"not null pk autoincr INT(10)"`
 	RecUnitId        string    `xorm:"comment('推荐单位编码') VARCHAR(10)"`
-	CerId            string    `xorm:"comment('准入ID') INT(10)"`
+	CerId            int    `xorm:"comment('准入ID') INT(10)"`
 	AccessCardNo     string    `xorm:"comment('准入证号') VARCHAR(50)"`
 	SupplierTypeName string    `xorm:"comment('准入类别') VARCHAR(50)"`
 	SupplierName     string    `xorm:"comment('企业名称') VARCHAR(50)"`

+ 24 - 12
src/dashoo.cn/backend/api/controllers/oilsupplier/annualaudit.go

@@ -3,6 +3,7 @@ package oilsupplier
 import (
 	"dashoo.cn/backend/api/business/baseUser"
 	"dashoo.cn/backend/api/business/organize"
+	"dashoo.cn/backend/api/business/paymentinfo"
 	"dashoo.cn/business2/areajson"
 	"dashoo.cn/business2/items"
 
@@ -278,7 +279,7 @@ func (this *AnnualAuditController) AddEntity() {
 	var suppliermodel supplier.OilSupplierView
 	suppliermodel = list[0]
 	model.RecUnitId = suppliermodel.RecUnitId
-	model.CerId = suppliermodel.CertId
+	model.CerId, _ = strconv.Atoi(suppliermodel.CertId)
 	model.Status = 0
 	model.BackReason = suppliermodel.BackReason
 	model.CreateOn = time.Now()
@@ -291,20 +292,20 @@ func (this *AnnualAuditController) AddEntity() {
 	//启动工作流
 	processInstanceId := svcActiviti.StartProcess(workflow.OIL_AUDIT_APPLY, utils.ToStr(annualId), this.User.Id)
 	//获得有审核权限的人员
-	var users []userRole.Base_RoleList
-	var userIds string
-	var auditWorkflow auditsetting.Base_OilAuditSetting
-	rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
-	rsvc.GetAuditStepRoleEntity(OilAuditSettingName, firstAudit, workflow.FIRST_TRIAL, &auditWorkflow)
-	users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), "")
-	for _, tmpUser := range users {
-		userIds += strconv.FormatInt(tmpUser.Id, 10) + ","
-	}
-	userIds = strings.Trim(userIds, ",")
+	//var users []userRole.Base_RoleList
+	//var userIds string
+	//var auditWorkflow auditsetting.Base_OilAuditSetting
+	//rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
+	//rsvc.GetAuditStepRoleEntity(OilAuditSettingName, firstAudit, workflow.FIRST_TRIAL, &auditWorkflow)
+	//users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), "")
+	//for _, tmpUser := range users {
+	//	userIds += strconv.FormatInt(tmpUser.Id, 10) + ","
+	//}
+	//userIds = strings.Trim(userIds, ",")
 	var ActiComplete workflow.ActiCompleteVM
 	ActiComplete.ProcessKey = workflow.OIL_AUDIT_APPLY
 	ActiComplete.BusinessKey = strconv.Itoa(annualId)
-	ActiComplete.UserNames = userIds
+	ActiComplete.UserNames = firstAudit
 	ActiComplete.UserId = this.User.Id
 	ActiComplete.Result = "1"
 	ActiComplete.Remarks = "提交给二级单位初审"
@@ -549,6 +550,16 @@ func (this *AnnualAuditController) AnnualAudit() {
 		}
 		if receiveVal == "true" {
 			_, err := svc.UpdateEntityByIdCols(dataother.AnnualId, auditmodel, cols)
+			paysvc := paymentinfo.GetPaymentService(utils.DBE)
+			var Amount float64
+			if list.SupplierTypeName == "01" {
+				Amount =  6000
+			}else if list.SupplierTypeName == "02"{
+				Amount = 7000
+			}else if list.SupplierTypeName == "03" {
+				Amount = 8000
+			}
+			err = paysvc.AddPaymentinfo(list.SupplierId, list.CerId, Amount,"2")
 			if err == nil {
 				errinfo.Message = "审核通过!"
 				errinfo.Code = 0
@@ -604,3 +615,4 @@ func (this *AnnualAuditController) AnnualAudit() {
 		}
 	}
 }
+

+ 2 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/qualchange.go

@@ -3,6 +3,7 @@ package oilsupplier
 import (
 	"dashoo.cn/backend/api/business/oilsupplier/qualchange"
 	"encoding/json"
+	"strconv"
 	"strings"
 	"time"
 
@@ -294,7 +295,7 @@ func (this *QualChangeController) AddEntity() {
 	var suppliermodel supplier.OilSupplierView
 	suppliermodel = list[0]
 	model.RecUnitId = suppliermodel.RecUnitId
-	model.CerId = suppliermodel.CertId
+	model.CerId, _ = strconv.Atoi(suppliermodel.CertId)
 	model.Status = 0
 	model.BackReason = suppliermodel.BackReason
 	//svc.GetEntitysByWhere(""+OilSupplierName, supwhere, &supplierlist)

+ 27 - 10
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1,13 +1,14 @@
 package oilsupplier
 
 import (
-	"dashoo.cn/backend/api/business/auditsetting"
-	"dashoo.cn/backend/api/business/organize"
 	"encoding/json"
 	"strconv"
 	"strings"
 	"time"
 
+	"dashoo.cn/backend/api/business/auditsetting"
+	"dashoo.cn/backend/api/business/organize"
+
 	"dashoo.cn/business2/permission"
 
 	"dashoo.cn/backend/api/business/workflow"
@@ -1007,7 +1008,7 @@ func (this *OilSupplierController) GetDictList() {
 
 	// 部门
 	orgsvc := organize.GetOrganizeService(utils.DBE)
-	dictList["Organizes"] = orgsvc.GetCollectionDetailviewlist("'"+this.User.AccCode+"'")
+	dictList["Organizes"] = orgsvc.GetCollectionDetailviewlist("'" + this.User.AccCode + "'")
 	//var dictCustomer []svccustomer.Customer
 	//customerSvc.GetEntitysByWhere(this.User.AccCode + CustomerName, "", &dictCustomer)
 	//dictList["EntrustCorp"] = &dictCustomer
@@ -1057,7 +1058,7 @@ func (this *OilSupplierController) GetDictListByStatus() {
 
 	// 部门
 	orgsvc := organize.GetOrganizeService(utils.DBE)
-	dictList["Organizes"] = orgsvc.GetCollectionDetailviewlist("'"+this.User.AccCode+"'")
+	dictList["Organizes"] = orgsvc.GetCollectionDetailviewlist("'" + this.User.AccCode + "'")
 	//var dictCustomer []svccustomer.Customer
 	//customerSvc.GetEntitysByWhere(this.User.AccCode + CustomerName, "", &dictCustomer)
 	//dictList["EntrustCorp"] = &dictCustomer
@@ -1071,7 +1072,7 @@ func (this *OilSupplierController) GetDictListByStatus() {
 		users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), this.User.AccCode) //
 		dictList["Auditer"] = users
 	} else if status == "3" {
-		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, "100000172", workflow.PROF_AUDIT, &auditWorkflow)
+		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, "100000172", workflow.PROF_RECE, &auditWorkflow)
 		users = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), "")
 		dictList["Auditer"] = users
 	} else if status == "4" {
@@ -1080,7 +1081,6 @@ func (this *OilSupplierController) GetDictListByStatus() {
 		dictList["Auditer"] = users
 	}
 
-
 	var datainfo DataInfo
 	datainfo.Items = dictList
 	this.Data["json"] = &datainfo
@@ -1331,10 +1331,10 @@ func (this *OilSupplierController) UpdateNumberEntity() {
 		"ModifiedUserId",
 		"ModifiedBy",
 	}
-	if modelCert.Step <= 2 {
-		modelCert.Step = 2 //完成企业基本信息
-		colcerts = append(colcerts, "Step")
-	}
+	//	if modelCert.Step <= 2 {
+	//		modelCert.Step = 2 //完成企业基本信息
+	//		colcerts = append(colcerts, "Step")
+	//	}
 
 	err := svcCert.UpdateEntityBytbl(OilSupplierCertName, certId, &modelCert, colcerts)
 
@@ -1448,3 +1448,20 @@ func (this *OilSupplierController) CanUpdateSupplier() {
 		this.ServeJSON()
 	}
 }
+
+// @Title 获取二级初审人员
+// @Description 获取二级初审人员
+// @router /getauditerbydept/:deptId [get]
+func (this *OilSupplierController) GetAuditerByDept() {
+	Id := this.Ctx.Input.Param(":deptId")
+
+	var auditWorkflow auditsetting.Base_OilAuditSetting
+	rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
+	rsvc.GetAuditStepRoleEntity(OilAuditSettingName, Id, workflow.FIRST_TRIAL, &auditWorkflow)
+	users := rsvc.GetUserByRole(strconv.Itoa(auditWorkflow.RoleId), this.User.AccCode)
+
+	var datainfo ErrorDataInfo
+	datainfo.Item = users
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}

+ 13 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -1,6 +1,7 @@
 package oilsupplier
 
 import (
+	"dashoo.cn/backend/api/business/paymentinfo"
 	"encoding/json"
 	"fmt"
 	"strconv"
@@ -772,6 +773,18 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 				"Step",
 			}
 			certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
+			if supplierCertEntity.Status == "5" {
+				paysvc := paymentinfo.GetPaymentService(utils.DBE)
+				var Amount float64
+				if supplierCertEntity.SupplierTypeCode == "01" {
+					Amount =  6000
+				}else if supplierCertEntity.SupplierTypeCode == "02"{
+					Amount = 7000
+				}else if supplierCertEntity.SupplierTypeCode == "03" {
+					Amount = 8000
+				}
+				paysvc.AddPaymentinfo(supplierCertEntity.SupplierId, supplierCertEntity.Id, Amount,"2")
+			}
 			errinfo.Message = "提交成功!"
 			errinfo.Code = 0
 			this.Data["json"] = &errinfo

+ 128 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go

@@ -457,4 +457,132 @@ func (this *OilSupplierCertAppendController) AuditEntity() {
 		"Status",
 	}
 	certSrv.UpdateEntityByIdCols(certappendId, model, cols)
+}
+
+// @Title 审批
+// @Description 审批
+// @Param 	body body suppliercert.OilSupplierCert
+// @Success	200	{object} controllers.Request
+// @router /auditEntityFir/:id [post]
+func (this *OilSupplierCertAppendController) AuditEntityFir() {
+	certId := this.Ctx.Input.Param(":id")
+	auditer := this.GetString("auditer")
+
+	//取出审批列表
+	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处理失败的异常
+		if err := recover(); err != nil {
+			errinfo.Message = "提交失败," + err.(string)
+			errinfo.Code = -1
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		} else {
+			//返回正确结果
+			errinfo.Message = "审核提交成功"
+			errinfo.Code = 0
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		}
+	}()
+
+	//remarks := ""
+	step := 2
+	status := ""
+	if supplierCertEntity.Status == "1" {
+		status = suppliercert.SECOND_TRIAL_STATUS
+		step = 2
+	} else if supplierCertEntity.Status == "2" {
+		status = suppliercert.THIRD_TRIAL_STATUS
+		step = 2
+		//获得有专业审核接收权限的人员
+		var users1 []userRole.Base_RoleList
+		var auditWorkflow1 auditsetting.Base_OilAuditSetting
+		rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
+		rsvc.GetAuditStepRoleEntity(OilAuditSettingName, "100000172", workflow.PROF_RECE, &auditWorkflow1)
+		users1 = rsvc.GetUserByRole(strconv.Itoa(auditWorkflow1.RoleId), this.User.AccCode)
+		for _, tmpUser := range users1 {
+			auditer += strconv.FormatInt(tmpUser.Id, 10) + ","
+		}
+		auditer = strings.Trim(auditer, ",")
+	} else if supplierCertEntity.Status == "3" {
+		status = suppliercert.PROF_AUDIT_STATUS
+		step = 2
+	} else if supplierCertEntity.Status == "4" {
+		status = suppliercert.CENT_AUDIT_STATUS
+		step = 2
+		//获得有专业审核接收权限的人员
+		var users1 []userRole.Base_RoleList
+		rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
+		users1 = rsvc.GetUserByRole("10000204", this.User.AccCode)
+		for _, tmpUser := range users1 {
+			auditer += strconv.FormatInt(tmpUser.Id, 10) + ","
+		}
+		auditer = strings.Trim(auditer, ",")
+	} else if supplierCertEntity.Status == "5" {
+		status = suppliercert.PAYING_AUDIT_STATUS
+		step = 3
+	}
+
+	svcActiviti := workflow.GetActivitiService(utils.DBE)
+	var ActiComplete workflow.ActiCompleteVM
+	ActiComplete.ProcessKey = workflow.OIL_APPEND_APPLY
+	ActiComplete.BusinessKey = certId
+	ActiComplete.UserNames = auditer
+	ActiComplete.UserId = this.User.Id
+	ActiComplete.Remarks = dataother.AuditorRemark
+	ActiComplete.CallbackUrl = ""
+	if dataother.SuccessStatus == 1 {
+		ActiComplete.Result = "1"
+		receiveVal := svcActiviti.TaskComplete(ActiComplete)
+
+		if receiveVal == "true" {
+			supplierCertEntity.Status = status
+			supplierCertEntity.Step = step
+			cols := []string{
+				"Status",
+				"Step",
+			}
+			certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
+			errinfo.Message = "提交成功!"
+			errinfo.Code = 0
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		} else {
+			errinfo.Message = "工作流异常,请联系管理员!"
+			errinfo.Code = -1
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+			return
+		}
+	} else {
+		ActiComplete.Result = "0"
+		receiveVal := svcActiviti.TaskComplete(ActiComplete)
+
+		if receiveVal == "true" {
+			supplierCertEntity.Status = "0"
+			supplierCertEntity.Step = step
+			cols := []string{
+				"Status",
+				"Step",
+			}
+			certSrv.UpdateEntityByIdCols(certId, supplierCertEntity, cols)
+			errinfo.Message = "提交成功!"
+			errinfo.Code = 0
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+		} else {
+			errinfo.Message = "工作流异常,请联系管理员!"
+			errinfo.Code = -1
+			this.Data["json"] = &errinfo
+			this.ServeJSON()
+			return
+		}
+	}
 }

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

@@ -89,4 +89,10 @@ export default {
       method: 'get'
     })
   },
+  getAuditerByDept (deptId, myAxios) {
+    return myAxios({
+      url: '/supplier/getauditerbydept/' + deptId,
+      method: 'GET'
+    })
+  }
 }

+ 7 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/supplierappend.js

@@ -46,4 +46,11 @@ export default {
       method: 'post'
     })
   },
+  auditEntityFir (entityId, auditer, params, myAxios) {
+    return myAxios({
+      url: '/suppliercertappend/auditEntityFir/' + entityId + '?auditer=' + auditer,
+      method: 'post',
+      data: params
+    })
+  }
 }

+ 1 - 1
src/dashoo.cn/frontend_web/src/components/Headbar.vue

@@ -33,7 +33,7 @@
           </a>
           <ul class="list" style="text-align: center;background: #004EA2;">
             <li class="item">
-              <router-link to="/usersetting" style="color: #004EA2; font-weight: bold">账户设置</router-link>
+              <router-link to="/system/usersetting" style="color: #004EA2; font-weight: bold">账户设置</router-link>
             </li>
             <li class="divider" style="color: ActiveBorder;"></li>
             <li class="item">

+ 5 - 8
src/dashoo.cn/frontend_web/src/components/oilsupplier/subfilelist.vue

@@ -188,7 +188,7 @@
       },
       makesure() {
         if (this.Title == '新增文件') {
-          if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
+          if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {           
             // 上传附件是否完成判断
             if (!this.attachissuccess()) {
               this.$message.error('有附件未成功上传!不能保存数据')
@@ -229,7 +229,7 @@
               })
               this.visible = false
               this.initData()
-              this.$refs.refuploadattach = ''
+              this.$refs.refuploadattach.uploadFiles = []
             } else {
               _this.$message({
                 type: 'warning',
@@ -254,7 +254,7 @@
               })
               this.visible = false
               this.initData()
-              this.$refs.refuploadattach = ''
+              this.$refs.refuploadattach.uploadFiles = []
             } else {
               _this.$message({
                 type: 'warning',
@@ -316,7 +316,7 @@
         this.visible = true
       },
       openDialog(val) {
-        this.Title = '编辑文件'       
+        this.Title = '编辑文件'
         this.SubfileForm.Id = val.Id
         this.SubfileForm.SupplierId = val.SupplierId
         this.SubfileForm.SupplierTypeCode = val.SupplierTypeCode
@@ -333,11 +333,8 @@
         this.SubfileForm.FileName = val.FileName
         this.SubfileForm.EffectDate = new Date(val.EffectDate)
         this.SubfileForm.FileUrl = val.FileUrl
+        this.getwendanginfo(val.FileUrl)
         this.SubfileForm.OtherRemark = val.OtherRemark
-        this.doclist = []
-        if (val.FileUrl != '') {
-          this.getwendanginfo(val.FileUrl)
-        }
         this.SubfileForm.Remark = val.Remark
         this.SubfileForm.IsDelete = val.IsDelete
         this.visible = true

+ 120 - 7
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/basisdataopera.vue

@@ -11,6 +11,8 @@
           <i class="icon icon-table2"></i> 编辑
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">分配</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>
           <router-link :to="'/oilsupplier/addtionaudit/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -113,6 +115,46 @@
       </span>
     </el-dialog>
 
+    <el-dialog title="审核" :visible.sync="dialogMakeSure">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <el-form-item :label="aduitlabel"
+          v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
+          <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 90%" filterable allow-create
+            default-first-option>
+            <el-option v-for="item in auditerOptions" :key="item.id" :label="item.realname" :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="审核状态">
+          <template>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1">通过</el-radio>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2">未通过</el-radio>
+          </template>
+        </el-form-item>
+        <el-form-item label="意见">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核说明"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogMakeSure = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="分配" :visible.sync="dialogAllocation">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <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 auditerOptions" :key="item.id" :label="item.realname" :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogAllocation = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -120,6 +162,7 @@
   import {
     mapGetters
   } from 'vuex'
+  import suppapi from '@/api/oilsupplier/supplier'
   import api from '@/api/oilsupplier/supplierappendsub'
   import api2 from '@/api/oilsupplier/supplierappend'
 
@@ -154,6 +197,13 @@
         }
       }
       return {
+        auditbusList: [], // 待审核业务
+        auditerOptions: [], // 审核人员
+        dialogMakeSure: false,
+        dialogAllocation: false,
+        aduitlabel: '审核人',
+        auditer: '',
+        dictData: null,
         supplierList: [], //供应方公司列表
         supplierOptions: '', //已选择的供应方公司列表
         // serviceType: '', //服务类型()
@@ -234,7 +284,12 @@
             trigger: 'blur'
           }],
         },
-        AnnualId: '', //传的参数
+        shenheForm: {
+          SuccessStatus: 1,
+          AuditorRemark: '',
+          AppendId: 0
+        },
+        AppendId: '', //传的参数
         serviceId: '',
         editFlag: '', //编辑操作标记
       }
@@ -244,9 +299,9 @@
       this.serviceId = this.$route.params.opera
       console.log("---this.serviceId----", this.serviceId)
       this.editFlag = this.$route.query.editFlag
-      this.AnnualId = this.serviceId
+      this.AppendId = this.serviceId
       this.getEntityById()
-      this.dialogFormData.SupplierCertAppendId = this.AnnualId
+      this.dialogFormData.SupplierCertAppendId = this.AppendId
       this.getSortList()
       this.getOrgTreeList() //获取推荐单位层级列表
       this.getTechTreeList() //获取技术服务类层级列表
@@ -333,9 +388,10 @@
       //获取需要修改的增项信息
       getEntityById() {
         let _this = this
-        api2.getEntityById(_this.AnnualId, _this.$axios).then(res => {
+        api2.getEntityById(_this.AppendId, _this.$axios).then(res => {
           _this.formData = res.data
-          console.log("--_this.formData---",_this.formData)
+          this.getDictOptions()
+          console.log("--_this.formData---", _this.formData)
           //显示原推荐单位
           if (_this.formData.RecUnitFlag != null) {
             let arr = _this.formData.RecUnitFlag.split(',')
@@ -359,7 +415,7 @@
           if (valid) {
             let arr = _this.$refs['tjdwCascader'].currentLabels
             _this.formData.RecUnitName = arr[arr.length - 1] //获取推荐单位名
-            if (_this.editFlag == '1' && _this.AnnualId !== '') {
+            if (_this.editFlag == '1' && _this.AppendId !== '') {
               _this.updateData()
             } else {
               _this.addAppend()
@@ -373,7 +429,7 @@
       //更新增项信息
       updateData() {
         let _this = this
-        api2.updateEntity(_this.AnnualId, _this.formData, _this.$axios).then(res => {
+        api2.updateEntity(_this.AppendId, _this.formData, _this.$axios).then(res => {
           if (res.data.code === 0) {
             this.$message({
               type: 'success',
@@ -581,6 +637,63 @@
           .catch(() => {})
       },
 
+      getDictOptions() {
+        console.log("---this.formData----", this.formData)
+        suppapi.getDictListByStatus(this.formData.Status, this.$axios).then(res => {
+          this.dictData = res.data.items
+          this.auditerOptions = res.data.items['Auditer']
+          console.log(this.auditerOptions, 'this.auditerOptions')
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      allocationBtn() {
+        this.dialogAllocation = true
+      },
+      AuditEntity() {
+        this.dialogMakeSure = true
+      },
+      // 审核通过
+      makeSure() {
+        console.log(this.auditer)
+        if (this.shenheForm.SuccessStatus === 1) {
+          if ((!this.auditer || this.auditer === 0) && this.formData.Status !== '2' && this.formData.Status !== '4' &&
+            this.formData.Status !== '5') {
+            this.$message({
+              type: 'warning',
+              message: '请选择审核人!'
+            })
+            return
+          }
+        }
+        this.checkstatus()
+      },
+
+      checkstatus() {
+        let params = this.shenheForm
+        console.log(this.shenheForm, '---this.shenheForm----')
+        api2.auditEntityFir(this.AppendId, this.auditer, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.getEntityById()
+            this.dialogMakeSure = false
+            this.dialogAllocation = 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)
+        })
+      },
+
       //列表排序功能
       orderby(column) {
         if (column.order == 'ascending') {

+ 130 - 10
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/goodsdataopera.vue

@@ -2,8 +2,8 @@
   <div>
     <el-breadcrumb class="heading">
       <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
-      <el-breadcrumb-item :to="{ path: '/oilsupplier/addtionaudit/techlist' }">物资类列表</el-breadcrumb-item>
-      <el-breadcrumb-item>编辑</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/addtionaudit/techlist' }">准入审核列表</el-breadcrumb-item>
+      <el-breadcrumb-item>物资-准入审核</el-breadcrumb-item>
     </el-breadcrumb>
     <el-card class="box-card">
       <div slot="header">
@@ -11,6 +11,8 @@
           <i class="icon icon-table2"></i> 编辑
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">分配</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>
           <router-link :to="'/oilsupplier/addtionaudit/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -102,6 +104,54 @@
       </span>
     </el-dialog>
 
+    <el-dialog title="审核" :visible.sync="dialogMakeSure">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <el-form-item :label="aduitlabel" v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
+          <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择"
+                     style="width: 90%" filterable allow-create default-first-option>
+            <el-option
+              v-for="item in auditerOptions"
+              :key="item.id"
+              :label="item.realname"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="审核状态">
+          <template>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1">通过</el-radio>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2">未通过</el-radio>
+          </template>
+        </el-form-item>
+        <el-form-item label="意见">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核说明"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogMakeSure = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="分配" :visible.sync="dialogAllocation">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <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 auditerOptions"
+              :key="item.id"
+              :label="item.realname"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogAllocation = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+      </div>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -109,6 +159,7 @@
   import {
     mapGetters
   } from 'vuex'
+  import suppapi from '@/api/oilsupplier/supplier'
   import api from '@/api/oilsupplier/supplierappendsub'
   import api2 from '@/api/oilsupplier/supplierappend'
 
@@ -143,6 +194,13 @@
         }
       }
       return {
+        auditbusList: [], // 待审核业务
+        auditerOptions: [], // 审核人员
+        dialogMakeSure: false,
+        dialogAllocation: false,
+        aduitlabel: '审核人',
+        auditer: '',
+        dictData: null,
         supplierList: [], //供应方公司列表
         supplierOptions: '', //已选择的供应方公司列表
         // serviceType: '', //服务类型()
@@ -223,7 +281,12 @@
             trigger: 'blur'
           }],
         },
-        AnnualId: '', //传的参数
+        shenheForm: {
+          SuccessStatus: 1,
+          AuditorRemark: '',
+          AppendId: 0
+        },
+        AppendId: '', //传的参数
         serviceId: '',
         editFlag: '', //编辑操作标记
       }
@@ -231,10 +294,10 @@
     created() {
       // this.serviceType = this.$route.params.opera //获取服务类型
       this.serviceId = this.$route.params.opera
-      this.AnnualId = this.serviceId
+      this.AppendId = this.serviceId
       this.editFlag = '1'
-      this.getEntityById()
-      this.dialogFormData.SupplierCertAppendId = this.AnnualId
+      this.getEntityById()  
+      this.dialogFormData.SupplierCertAppendId = this.AppendId
       this.getSortList()
       this.getOrgTreeList() //获取推荐单位层级列表
       this.getTechTreeList() //获取技术服务类层级列表
@@ -321,9 +384,9 @@
       //获取需要修改的增项信息
       getEntityById() {
         let _this = this
-        api2.getEntityById(_this.AnnualId, _this.$axios).then(res => {
+        api2.getEntityById(_this.AppendId, _this.$axios).then(res => {
           _this.formData = res.data
-          console.log("---_this.formData--",_this.formData)
+          this.getDictOptions()
           //显示原推荐单位
           if (_this.formData.RecUnitFlag != null) {
             let arr = _this.formData.RecUnitFlag.split(',')
@@ -347,7 +410,7 @@
           if (valid) {
             let arr = _this.$refs['tjdwCascader'].currentLabels
             _this.formData.RecUnitName = arr[arr.length - 1] //获取推荐单位名
-            if (_this.editFlag == '1' && _this.AnnualId !== '') {
+            if (_this.editFlag == '1' && _this.AppendId !== '') {
               _this.updateData()
             } else {
               _this.addAppend()
@@ -361,7 +424,7 @@
       //更新增项信息
       updateData() {
         let _this = this
-        api2.updateEntity(_this.AnnualId, _this.formData, _this.$axios).then(res => {
+        api2.updateEntity(_this.AppendId, _this.formData, _this.$axios).then(res => {
           if (res.data.code === 0) {
             this.$message({
               type: 'success',
@@ -569,6 +632,63 @@
           .catch(() => {})
       },
 
+      getDictOptions () {
+        console.log("---this.formData----",this.formData)
+        suppapi.getDictListByStatus(this.formData.Status, this.$axios).then(res => {
+          this.dictData = res.data.items
+          this.auditerOptions = res.data.items['Auditer']
+          console.log(this.auditerOptions, 'this.auditerOptions')
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      allocationBtn () {
+        this.dialogAllocation = true
+      },
+      AuditEntity () {
+        this.dialogMakeSure = true
+      },
+       // 审核通过
+      makeSure () {
+        console.log(this.auditer)
+        if (this.shenheForm.SuccessStatus === 1) {
+          if ((!this.auditer || this.auditer === 0) && this.formData.Status !== '2' && this.formData.Status !== '4' && this.formData.Status !== '5') {
+            this.$message({
+              type: 'warning',
+              message: '请选择审核人!'
+            })
+            return
+          }
+        }
+        this.checkstatus()
+      },
+
+      checkstatus () {
+        let params = this.shenheForm
+        console.log(this.shenheForm, '---this.shenheForm----')
+        api2.auditEntityFir(this.AppendId, this.auditer, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.getEntityById()
+            this.dialogMakeSure = false
+            this.dialogAllocation = 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)
+        })
+      },
+
+
       //列表排序功能
       orderby(column) {
         if (column.order == 'ascending') {

+ 184 - 87
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/techdataopera.vue

@@ -11,7 +11,8 @@
           <i class="icon icon-table2"></i> 编辑
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" @click="AuditEntity">提交审批</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">分配</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>
           <router-link :to="'/oilsupplier/addtionaudit/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -27,18 +28,17 @@
             <el-row>
               <el-col :span="12">
                 <el-form-item label="推荐单位名称" prop="checkSelectedRecUnitName">
-                  <el-cascader ref="tjdwCascader" :options="organizeTreeList" :props="organizeTreeProps" change-on-select :show-all-levels="false" 
-                                v-model="selectedOrgList" @change="getCode2" placeholder="请选择推荐单位" style="width: 100%">
+                  <el-cascader ref="tjdwCascader" :options="organizeTreeList" :props="organizeTreeProps"
+                    change-on-select :show-all-levels="false" v-model="selectedOrgList" @change="getCode2"
+                    placeholder="请选择推荐单位" style="width: 100%">
                   </el-cascader>
                 </el-form-item>
               </el-col>
               <el-col :span="12">
                 <el-form-item label="供应方公司名称" prop="checkSelectedSupplier">
-                  <el-select v-model="supplierOptions" filterable @change="getInfo" placeholder="请选择供应方公司" style="width: 100%">
-                    <el-option
-                      v-for="item in supplierList"
-                      :key="item.SupplierId"
-                      :label="item.SupplierName"
+                  <el-select v-model="supplierOptions" filterable @change="getInfo" placeholder="请选择供应方公司"
+                    style="width: 100%">
+                    <el-option v-for="item in supplierList" :key="item.SupplierId" :label="item.SupplierName"
                       :value="item.SupplierId">
                     </el-option>
                   </el-select>
@@ -66,8 +66,10 @@
           <el-table :data="entityList" border height="calc(100vh - 345px)" style="width: 100%" @sort-change="orderby">
             <el-table-column label="操作" min-width="100" align="center" fixed>
               <template slot-scope="scope">
-                <el-button type="text" title="编辑" size="medium" icon="el-icon-edit" @click="editSortData(scope.row)"></el-button>
-                <el-button type="text" title="删除" size="medium" icon="el-icon-delete" @click="deleteData(scope.row.Id)"></el-button>
+                <el-button type="text" title="编辑" size="medium" icon="el-icon-edit" @click="editSortData(scope.row)">
+                </el-button>
+                <el-button type="text" title="删除" size="medium" icon="el-icon-delete" @click="deleteData(scope.row.Id)">
+                </el-button>
               </template>
             </el-table-column>
             <el-table-column prop="SortFlag" label="分类标记" v-if="1==2" show-overflow-tooltip></el-table-column>
@@ -75,20 +77,22 @@
             <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 @size-change="handleSizeChange" @current-change="handleCurrentChange"
+            :current-page="currentPage" :page-sizes="[10, 15, 20, 25]" :page-size="size"
+            layout="total, sizes, prev, pager, next, jumper" :total="currentItemCount">
           </el-pagination>
         </el-card>
       </div>
     </el-card>
     <!-- 增项分类添加、修改 -->
     <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="800px">
-      <el-form label-width="150px" ref="dialogFormData" :rules="sortEntityFormRules" :model="dialogFormData" >
+      <el-form label-width="150px" ref="dialogFormData" :rules="sortEntityFormRules" :model="dialogFormData">
         <el-row>
           <el-col :span="12">
             <el-form-item label="分类名称" prop="checkSelectedOptList">
-              <el-cascader ref="cascader" :options="optionsList" style="width:100%" :props="orgtreeprops" change-on-select :show-all-levels="false" 
-                v-model="selectedOptList" @change="getCode" placeholder="请选择分类">
+              <el-cascader ref="cascader" :options="optionsList" style="width:100%" :props="orgtreeprops"
+                change-on-select :show-all-levels="false" v-model="selectedOptList" @change="getCode"
+                placeholder="请选择分类">
               </el-cascader>
             </el-form-item>
           </el-col>
@@ -98,8 +102,9 @@
             </el-form-item>
           </el-col>
           <el-col :span="24">
-            <el-form-item label="备注"  prop="Remark">
-              <el-input type="textarea" v-model="dialogFormData.Remark" placeholder="请输入备注"  style="width: 100%"></el-input>
+            <el-form-item label="备注" prop="Remark">
+              <el-input type="textarea" v-model="dialogFormData.Remark" placeholder="请输入备注" style="width: 100%">
+              </el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -109,6 +114,46 @@
         <el-button size="mini" type="primary" @click="ensureOption()">确 定</el-button>
       </span>
     </el-dialog>
+    <el-dialog title="审核" :visible.sync="dialogMakeSure">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <el-form-item :label="aduitlabel"
+          v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
+          <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 90%" filterable allow-create
+            default-first-option>
+            <el-option v-for="item in auditerOptions" :key="item.id" :label="item.realname" :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="审核状态">
+          <template>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1">通过</el-radio>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2">未通过</el-radio>
+          </template>
+        </el-form-item>
+        <el-form-item label="意见">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核说明"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogMakeSure = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="分配" :visible.sync="dialogAllocation">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <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 auditerOptions" :key="item.id" :label="item.realname" :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogAllocation = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+      </div>
+    </el-dialog>
 
   </div>
 </template>
@@ -117,6 +162,7 @@
   import {
     mapGetters
   } from 'vuex'
+  import suppapi from '@/api/oilsupplier/supplier'
   import api from '@/api/oilsupplier/supplierappendsub'
   import api2 from '@/api/oilsupplier/supplierappend'
   import apiCert from '@/api/oilsupplier/suppliercert'
@@ -152,6 +198,13 @@
         }
       }
       return {
+        auditbusList: [], // 待审核业务
+        auditerOptions: [], // 审核人员
+        dialogMakeSure: false,
+        dialogAllocation: false,
+        aduitlabel: '审核人',
+        auditer: '',
+        dictData: null,
         supplierList: [], //供应方公司列表
         supplierOptions: '', //已选择的供应方公司列表
         // serviceType: '', //服务类型()
@@ -181,24 +234,24 @@
           Id: '',
           SupplierId: 1,
           SupplierCertId: 1,
-          RecUnitFlag: '',//推荐单位的级联Id标记
+          RecUnitFlag: '', //推荐单位的级联Id标记
           RecUnitId: '', //推荐单位编码
           RecUnitName: '', //推荐单位名称
           AppendType: '', //增项类别(1 物资类,2 基建类,3 技术服务类)
-          Remark: '',//备注
+          Remark: '', //备注
         },
-        dialogVisible: false,//增项分类dialog
+        dialogVisible: false, //增项分类dialog
         dialogTitle: '',
         dialogFormData: {
           Id: '',
-          SupplierId: 1,//供方表ID
-          SupplierCertId: 1,//供方证书表ID
-          SupplierCertAppendId: '',//增项信息表ID
-          SubClassId: 2,//分类表主键(物资类或基建类或技术服务类)
-          SortFlag: '',//分类标记
-          Code: '',//分类编码
-          Name: '',//分类名称
-          Remark: '',//备注
+          SupplierId: 1, //供方表ID
+          SupplierCertId: 1, //供方证书表ID
+          SupplierCertAppendId: '', //增项信息表ID
+          SubClassId: 2, //分类表主键(物资类或基建类或技术服务类)
+          SortFlag: '', //分类标记
+          Code: '', //分类编码
+          Name: '', //分类名称
+          Remark: '', //备注
         },
         //列表数据
         entityList: [],
@@ -232,6 +285,13 @@
             trigger: 'blur'
           }],
         },
+        shenheForm: {
+          SuccessStatus: 1,
+          AuditorRemark: '',
+          AppendId: 0
+        },
+        AppendId: '', //传的参数
+        serviceId: '',
         Id: '', //传的参数
         editFlag: '', //编辑操作标记
       }
@@ -240,11 +300,9 @@
       // this.serviceType = this.$route.params.opera //获取服务类型
       this.Id = this.$route.query.Id
       this.editFlag = this.$route.query.editFlag
-      if(this.editFlag == '1' && this.Id !== '') {
-        this.getEntityById()
-        this.dialogFormData.SupplierCertAppendId = this.Id
-        this.getSortList()
-      }
+      this.getEntityById()
+      this.dialogFormData.SupplierCertAppendId = this.Id
+      this.getSortList()
       this.getOrgTreeList() //获取推荐单位层级列表
       this.getTechTreeList() //获取技术服务类层级列表
       this.getSupplierList() //获取供应方公司列表
@@ -279,25 +337,6 @@
             console.error(err)
           })
       },
-      //提交审批
-      AuditEntity() {
-        apiCert.auditEntityappend(this.Id, this.$axios).then(res => {
-          if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            });
-          } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            });
-          }
-        }).catch(err => {
-          console.error(err)
-        });
-      },
 
       //获取技术服务类层级列表
       getTechTreeList() {
@@ -312,10 +351,10 @@
       },
 
       //获取SupplierId和SupplierCertId
-      getInfo(vId) {//这个vId也就是value值
+      getInfo(vId) { //这个vId也就是value值
         let obj = {}
-        obj = this.supplierList.find((item)=>{
-          return item.SupplierId === vId;//筛选出匹配数据
+        obj = this.supplierList.find((item) => {
+          return item.SupplierId === vId; //筛选出匹配数据
         })
         this.formData.SupplierId = parseInt(obj.SupplierId)
         this.formData.SupplierCertId = parseInt(obj.SupplierCertId)
@@ -325,7 +364,7 @@
       getCode(item) {
         let sortFlagStr = item.toString()
         this.dialogFormData.SortFlag = sortFlagStr
-        this.getCodeById(item[item.length-1]) //根据分类Id获取Code
+        this.getCodeById(item[item.length - 1]) //根据分类Id获取Code
       },
 
       //根据分类Id获取Code
@@ -351,12 +390,13 @@
         let _this = this
         api2.getEntityById(_this.Id, _this.$axios).then(res => {
           _this.formData = res.data
+          this.getDictOptions()
           //显示原推荐单位
           if (_this.formData.RecUnitFlag != null) {
             let arr = _this.formData.RecUnitFlag.split(',')
             let arr2 = []
             for (let i = 0; i < arr.length; i++) {
-               arr2.push(parseInt(arr[i]))
+              arr2.push(parseInt(arr[i]))
             }
             _this.selectedOrgList = arr2
           }
@@ -373,8 +413,8 @@
         this.$refs['EntityForm'].validate((valid) => {
           if (valid) {
             let arr = _this.$refs['tjdwCascader'].currentLabels
-            _this.formData.RecUnitName = arr[arr.length - 1]  //获取推荐单位名
-            if(_this.editFlag == '1' && _this.Id !== '') {
+            _this.formData.RecUnitName = arr[arr.length - 1] //获取推荐单位名
+            if (_this.editFlag == '1' && _this.Id !== '') {
               _this.updateData()
             } else {
               _this.addAppend()
@@ -443,16 +483,16 @@
               })
             }
           })
-        .catch(err => {
-          console.error(err)
-        })
+          .catch(err => {
+            console.error(err)
+          })
       },
 
       //添加增项分类
       addSortData() {
         let _this = this
         //先判断是否保存了增项信息
-        if(this.checkAppendSave()) {
+        if (this.checkAppendSave()) {
           _this.dialogTitle = '添加'
           _this.dialogVisible = true
           _this.selectedOptList = [] //置空,防止先修改再添加时的已选分类信息保留
@@ -474,7 +514,7 @@
           let arr = _this.dialogFormData.SortFlag.split(',')
           let arr2 = []
           for (let i = 0; i < arr.length; i++) {
-              arr2.push(parseInt(arr[i]))
+            arr2.push(parseInt(arr[i]))
           }
           _this.selectedOptList = arr2
         }
@@ -539,7 +579,7 @@
         }
         return true
       },
-      
+
       //添加增项分类信息
       addSortAppend() {
         let _this = this
@@ -570,30 +610,87 @@
       deleteData(Id) {
         let _this = this
         _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'warning'
-        }).then(() => {
-          api.deleteEntity(Id, _this.$axios)
-            .then(res => {
-              // response
-              if (res.data.code === 0) {
-                _this.$message({
-                  type: 'success',
-                  message: res.data.message
-                })
-                // 更新列表
-                this.getSortList()
-              } else {
-                _this.$message({
-                  type: 'warning',
-                  message: res.data.message
-                })
-              }
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            api.deleteEntity(Id, _this.$axios)
+              .then(res => {
+                // response
+                if (res.data.code === 0) {
+                  _this.$message({
+                    type: 'success',
+                    message: res.data.message
+                  })
+                  // 更新列表
+                  this.getSortList()
+                } else {
+                  _this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
+              })
+              .catch(() => {})
+          })
+          .catch(() => {})
+      },
+
+      getDictOptions() {
+        console.log("---this.formData----", this.formData)
+        suppapi.getDictListByStatus(this.formData.Status, this.$axios).then(res => {
+          this.dictData = res.data.items
+          this.auditerOptions = res.data.items['Auditer']
+          console.log(this.auditerOptions, 'this.auditerOptions')
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      allocationBtn() {
+        this.dialogAllocation = true
+      },
+      AuditEntity() {
+        this.dialogMakeSure = true
+      },
+      // 审核通过
+      makeSure() {
+        console.log(this.auditer)
+        if (this.shenheForm.SuccessStatus === 1) {
+          if ((!this.auditer || this.auditer === 0) && this.formData.Status !== '2' && this.formData.Status !== '4' &&
+            this.formData.Status !== '5') {
+            this.$message({
+              type: 'warning',
+              message: '请选择审核人!'
             })
-            .catch(() => {})
+            return
+          }
+        }
+        this.checkstatus()
+      },
+
+      checkstatus() {
+        let params = this.shenheForm
+        console.log(this.shenheForm, '---this.shenheForm----')
+        api2.auditEntityFir(this.AppendId, this.auditer, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.getEntityById()
+            this.dialogMakeSure = false
+            this.dialogAllocation = 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)
         })
-        .catch(() => {})
       },
 
       //列表排序功能

+ 41 - 13
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/index.vue

@@ -39,7 +39,8 @@
       <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby">
         <el-table-column label="操作" min-width="180" align="center" fixed>
           <template slot-scope="scope">
-            <router-link :to="'/oilsupplier/annualaudit/' + scope.row.SupplierId + '/operation?certid=' + scope.row.CerId +'&WorkflowId='+scope.row.WorkflowId">
+            <router-link
+              :to="'/oilsupplier/annualaudit/' + scope.row.SupplierId + '/operation?certid=' + scope.row.CerId +'&WorkflowId='+scope.row.WorkflowId">
               <el-button type="primary" plain title="查看详情" size="mini">打开</el-button>
             </router-link>
             <el-dropdown @command="MoreCmdClick">
@@ -172,13 +173,20 @@
         <el-row>
           <el-col :span="24">
             <el-form-item label="初审单位">
-              <el-select ref="selectauditOrg" v-model="entityForm.FirstAudit" placeholder="请选择"
-                         style="width: 100%" filterable allow-create default-first-option>
-                <el-option
-                  v-for="item in organizeOption"
-                  :key="item.Id"
-                  :label="item.Fullname"
-                  :value="item.Id">
+              <el-select ref="selectauditOrg" v-model="entityForm.FirstAudit" placeholder="请选择" style="width: 100%"
+                @change="auditOrgChang" filterable allow-create default-first-option>
+                <el-option v-for="item in organizeOption" :key="item.Id" :label="item.Fullname" :value="item.Id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="审批人">
+              <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 100%" 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-form-item>
@@ -222,6 +230,8 @@
         dialogVisible: false,
         delevisble: false,
         organizeOption: [], // 审批部门
+        auditerOption: [],
+        auditer: '',
         //列表数据
         selectsupplierlist: [],
         entityList: [],
@@ -249,7 +259,7 @@
           SupplierName: '',
           SupplierId: '',
           SupplierTypeName: '',
-          FirstAudit:'',
+          FirstAudit: '',
         },
         searchForm: {
           Id: '',
@@ -317,7 +327,7 @@
         //访问接口
         api.getList(myCreateOn.join(','), params, this.$axios).then(res => {
           this.entityList = res.data.items
-          console.log("---this.entityList ----",this.entityList )
+          console.log("---this.entityList ----", this.entityList)
           this.currentItemCount = res.data.currentItemCount
         }).catch(err => {
           console.error(err)
@@ -331,8 +341,8 @@
         this.entityForm.SupplierName = obj.Realname
       },
       addAnnualAudit() {
-        console.log("----this.entityForm--", this.entityForm)
-        api.addEntity(this.entityForm, this.entityForm.FirstAudit, this.$axios).then(res => {
+        console.log("----this.auditer--", this.auditer)
+        api.addEntity(this.entityForm, this.auditer, this.$axios).then(res => {
           if (res.data.code === 0) {
             console.log("--------res.data----", res.data)
             //保存成功后,初始化数据,变成修改
@@ -373,7 +383,25 @@
         })
       },
 
-      getDictOptions () {
+      auditOrgChang(val) {
+        this.auditerOption = []
+        this.auditer = ''
+        supplierapi.getAuditerByDept(val, this.$axios).then(res => {
+          if (res.data.item.length === 0) {
+            this.$message({
+              type: 'warning',
+              message: '该单位未设置审批人员!'
+            })
+            return
+          }
+          this.auditerOption = res.data.item
+          console.log("---this.auditerOption--",this.auditerOption)
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      getDictOptions() {
         supplierapi.getDictList(this.$axios).then(res => {
           this.dictData = res.data.items
           this.organizeOption = res.data.items['Organizes']

+ 56 - 22
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue

@@ -176,8 +176,11 @@
           </el-card>
         </el-tab-pane>
 
+        <el-tab-pane label="准入范围" :disabled="!certId">
+        </el-tab-pane>
+
         <el-tab-pane label="企业资质" :disabled="!certId">
-          <business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId" :SupplierId="formData.Id"
+          <business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId" :SupplierId="formData.Id+''"
             :SupplierTypeCode="classId" :canadd="add_flat" @close="selectAuditOrg" height="360px" style="margin-top: 20px">
           </business-list>
         </el-tab-pane>
@@ -204,7 +207,7 @@
       <el-form ref="searchForm" label-width="110px">
         <el-row>
           <el-col :span="24">
-            <el-form-item label="单位名称">
+            <el-form-item label="二级单位">
               <el-select ref="selectauditOrg" v-model="firstAudit" placeholder="请选择"
                          style="width: 90%" filterable allow-create default-first-option>
                 <el-option
@@ -216,6 +219,19 @@
               </el-select>
             </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-form-item>
+          </el-col>
         </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
@@ -276,6 +292,8 @@
         winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
         businessList: [], // 准入业务
         organizeOption: [], // 审批部门
+        auditerOption: [], // 审批人
+        auditer: '',
         firstAudit: '',
         serviceId: '',
         certId: '',
@@ -468,18 +486,18 @@
         this.formData.HseTraining = fdata.HseTraining
         this.formData.SpecTypeCode = fdata.SpecTypeCode
 
-        this.$refs["BasisInfo"].CityAry = []
-        this.$refs["BasisInfo"].CityAry.push(this.formData.Province)
-        this.$refs["BasisInfo"].CityAry.push(this.formData.City)
-        this.$refs["BasisInfo"].CityAry.push(this.formData.Street)
-        this.$refs["BasisInfo"].LinkCityAry = []
-        this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkProvince)
-        this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkCity)
-        this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkStreet)
-        /*this.$refs["BasisInfo"].UnitRelationAry = []
+        this.$refs['BasisInfo'].CityAry = []
+        this.$refs['BasisInfo'].CityAry.push(this.formData.Province)
+        this.$refs['BasisInfo'].CityAry.push(this.formData.City)
+        this.$refs['BasisInfo'].CityAry.push(this.formData.Street)
+        this.$refs['BasisInfo'].LinkCityAry = []
+        this.$refs['BasisInfo'].LinkCityAry.push(this.formData.LinkProvince)
+        this.$refs['BasisInfo'].LinkCityAry.push(this.formData.LinkCity)
+        this.$refs['BasisInfo'].LinkCityAry.push(this.formData.LinkStreet)
+        /* this.$refs['BasisInfo'].UnitRelationAry = []
         if (this.formData.SpecTypeCode.length > 0) {
           this.$refs['BasisInfo'].UnitRelationAry = this.formData.SpecTypeCode.split(',')
-        }*/
+        } */
       },
 
       isCanUpdateSupplier (supplierId) {
@@ -519,18 +537,18 @@
             this.formDataCert.SkillerTotal = this.formData.SkillerTotal
             this.formDataCert.Status = this.formData.Status
             this.formDataCert.WorkflowId = this.formData.WorkflowId
-            this.$refs["BasisInfo"].CityAry = []
-            this.$refs["BasisInfo"].CityAry.push(this.formData.Province)
-            this.$refs["BasisInfo"].CityAry.push(this.formData.City)
-            this.$refs["BasisInfo"].CityAry.push(this.formData.Street)
-            this.$refs["BasisInfo"].LinkCityAry = []
-            this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkProvince)
-            this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkCity)
-            this.$refs["BasisInfo"].LinkCityAry.push(this.formData.LinkStreet)
-            /*this.$refs["BasisInfo"].UnitRelationAry = []
+            this.$refs['BasisInfo'].CityAry = []
+            this.$refs['BasisInfo'].CityAry.push(this.formData.Province)
+            this.$refs['BasisInfo'].CityAry.push(this.formData.City)
+            this.$refs['BasisInfo'].CityAry.push(this.formData.Street)
+            this.$refs['BasisInfo'].LinkCityAry = []
+            this.$refs['BasisInfo'].LinkCityAry.push(this.formData.LinkProvince)
+            this.$refs['BasisInfo'].LinkCityAry.push(this.formData.LinkCity)
+            this.$refs['BasisInfo'].LinkCityAry.push(this.formData.LinkStreet)
+            /* this.$refs['BasisInfo'].UnitRelationAry = []
             if (this.formData.SpecTypeCode.length > 0) {
               this.$refs['BasisInfo'].UnitRelationAry = this.formData.SpecTypeCode.split(',')
-            }*/
+            } */
 
             this.entrydetail.business = this.certId
             this.entrydetail.instance = this.formDataCert.WorkflowId
@@ -559,6 +577,22 @@
           console.error(err)
         })
       },
+      auditOrgChang (val) {
+        this.auditerOption = []
+        this.auditer = ''
+        api.getAuditerByDept(val, this.$axios).then(res => {
+          if (res.data.item.length === 0) {
+            this.$message({
+              type: 'warning',
+              message: '该单位未设置审批人员!'
+            })
+            return
+          }
+          this.auditerOption = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       /* getCityList(val) {
        let resultData = JSON.parse(val)
        let countstr = JSON.stringify(resultData.districts[0].districts)

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

@@ -176,6 +176,10 @@
             </winning-list>
           </el-card>
         </el-tab-pane>
+
+        <el-tab-pane label="准入范围" :disabled="!certId">
+        </el-tab-pane>
+
         <el-tab-pane label="企业资质" :disabled="!certId">
           <business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId+''" :SupplierId="formData.Id"
             :SupplierTypeCode="classId" :canadd="add_flat" @close="selectAuditOrg" height="360px" style="margin-top: 20px">
@@ -204,9 +208,9 @@
       <el-form ref="searchForm" label-width="110px">
         <el-row>
           <el-col :span="24">
-            <el-form-item label="单位名称">
+            <el-form-item label="二级单位">
               <el-select ref="selectauditOrg" v-model="FirstAudit" placeholder="请选择"
-                         style="width: 90%" filterable allow-create default-first-option>
+                         style="width: 90%" filterable allow-create default-first-option @change="auditOrgChang">
                 <el-option
                   v-for="item in organizeOption"
                   :key="item.Id"
@@ -216,6 +220,19 @@
               </el-select>
             </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-form-item>
+          </el-col>
         </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
@@ -276,6 +293,8 @@
         winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
         businessList: [], // 准入业务
         organizeOption: [], // 审批部门
+        auditerOption: [], // 审批人
+        auditer: '',
         serviceId: '',
         certId: '',
         classId: '01',
@@ -475,10 +494,10 @@
         this.$refs['GoodsInfo'].LinkCityAry.push(this.formData.LinkProvince)
         this.$refs['GoodsInfo'].LinkCityAry.push(this.formData.LinkCity)
         this.$refs['GoodsInfo'].LinkCityAry.push(this.formData.LinkStreet)
-        /*this.$refs['GoodsInfo'].UnitRelationAry = []
+        /* this.$refs['GoodsInfo'].UnitRelationAry = []
         if (this.formData.SpecTypeCode.length > 0) {
           this.$refs['GoodsInfo'].UnitRelationAry = this.formData.SpecTypeCode.split(',')
-        }*/
+        } */
       },
 
       isCanUpdateSupplier (supplierId) {
@@ -526,10 +545,10 @@
             this.$refs['GoodsInfo'].LinkCityAry.push(this.formData.LinkProvince)
             this.$refs['GoodsInfo'].LinkCityAry.push(this.formData.LinkCity)
             this.$refs['GoodsInfo'].LinkCityAry.push(this.formData.LinkStreet)
-            /*this.$refs['GoodsInfo'].UnitRelationAry = []
+            /* this.$refs['GoodsInfo'].UnitRelationAry = []
             if (this.formData.SpecTypeCode.length > 0) {
               this.$refs['GoodsInfo'].UnitRelationAry = this.formData.SpecTypeCode.split(',')
-            }*/
+            } */
 
             this.entrydetail.business = this.certId
             this.entrydetail.instance = this.formDataCert.WorkflowId
@@ -558,6 +577,22 @@
           console.error(err)
         })
       },
+      auditOrgChang (val) {
+        this.auditerOption = []
+        this.auditer = ''
+        api.getAuditerByDept(val, this.$axios).then(res => {
+          if (res.data.item.length === 0) {
+            this.$message({
+              type: 'warning',
+              message: '该单位未设置审批人员!'
+            })
+            return
+          }
+          this.auditerOption = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       /* getCityList(val) {
        let resultData = JSON.parse(val)
        let countstr = JSON.stringify(resultData.districts[0].districts)

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

@@ -175,7 +175,8 @@
             </winning-list>
           </el-card>
         </el-tab-pane>
-
+        <el-tab-pane label="准入范围" :disabled="!certId">
+        </el-tab-pane>
         <el-tab-pane label="企业资质" :disabled="!certId">
           <business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId" :SupplierId="formData.Id"
             :SupplierTypeCode="classId" :canadd="add_flat" @close="selectAuditOrg" height="360px" style="margin-top: 20px">
@@ -203,7 +204,7 @@
       <el-form ref="searchForm" label-width="110px">
         <el-row>
           <el-col :span="24">
-            <el-form-item label="单位名称">
+            <el-form-item label="二级单位">
               <el-select ref="selectauditOrg" v-model="firstAudit" placeholder="请选择"
                          style="width: 90%" filterable allow-create default-first-option>
                 <el-option
@@ -215,6 +216,19 @@
               </el-select>
             </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-form-item>
+          </el-col>
         </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
@@ -275,6 +289,8 @@
         winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
         businessList: [], // 准入业务
         organizeOption: [], // 审批部门
+        auditerOption: [], // 审批人
+        auditer: '',
         firstAudit: '',
         serviceId: '',
         certId: '',
@@ -562,6 +578,22 @@
           console.error(err)
         })
       },
+      auditOrgChang (val) {
+        this.auditerOption = []
+        this.auditer = ''
+        api.getAuditerByDept(val, this.$axios).then(res => {
+          if (res.data.item.length === 0) {
+            this.$message({
+              type: 'warning',
+              message: '该单位未设置审批人员!'
+            })
+            return
+          }
+          this.auditerOption = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       /* getCityList(val) {
         let resultData = JSON.parse(val)
         let countstr = JSON.stringify(resultData.districts[0].districts)

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

@@ -11,6 +11,8 @@
           <i class="icon icon-table2"></i> 编辑
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-right: 3px" @click="AuditdialogShow = true" v-if="formData.Id !='' && formData.Status == ''">提交审批
+          </el-button>
           <router-link :to="'/oilsupplier/supplierappend/basislist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -132,6 +134,30 @@
       </el-pagination>
     </el-dialog>
 
+     <el-dialog title="选择审批单位" :visible.sync="AuditdialogShow" width="520px">
+      <el-form ref="searchForm" label-width="110px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="单位名称">
+              <el-select ref="selectauditOrg" v-model="FirstAudit" placeholder="请选择"
+                         style="width: 90%" filterable allow-create default-first-option>
+                <el-option
+                  v-for="item in organizeOption"
+                  :key="item.Id"
+                  :label="item.Fullname"
+                  :value="item.Id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="AuditdialogShow = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="AuditEntity">确定</el-button>
+      </span>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -139,6 +165,7 @@
   import {
     mapGetters
   } from 'vuex'
+  import suppapi from '@/api/oilsupplier/supplier'
   import api from '@/api/oilsupplier/supplierappendsub'
   import api2 from '@/api/oilsupplier/supplierappend'
 
@@ -166,6 +193,9 @@
         }
       }
       return {
+        AuditdialogShow: false,//提交审核弹框
+        organizeOption: [], // 审批部门
+        FirstAudit: '',
         supplierList: [], //供应方公司列表
         supplierOptions: '', //已选择的供应方公司列表
         // serviceType: '', //服务类型()
@@ -268,6 +298,7 @@
       this.getOrgTreeList() //获取推荐单位层级列表
       this.getBasisList() //获取基建类层级列表
       this.getSupplierList() //获取供应方公司列表
+      this.getDictOptions()
     },
     methods: {
 
@@ -588,6 +619,41 @@
         .catch(() => {})
       },
 
+      //提交审批
+       AuditEntity () {
+        api2.auditEntity(this.formData.Id, this.FirstAudit, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.getEntityById()
+            this.AuditdialogShow = false
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      getDictOptions () {
+        suppapi.getDictList(this.$axios).then(res => {
+          this.dictData = res.data.items
+          this.organizeOption = res.data.items['Organizes']
+          console.log("---this.organizeOption---",this.organizeOption)
+          /* this.UnitRelationOptions = res.data.items['UnitRelation']
+           this.getCityList(res.data.items['GaodeMapChinaAreas'])
+           this.CompanyTypeOptions = res.data.items['CompanyType'] */
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
       //列表排序功能
       orderby(column) {
         if (column.order == 'ascending') {

+ 66 - 20
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/techdataopera.vue

@@ -11,7 +11,8 @@
           <i class="icon icon-table2"></i> 编辑
         </span>
         <span style="float: right;">
-            <el-button type="primary" size="mini" @click="AuditEntity">提交审批</el-button>
+            <el-button type="primary" size="mini" style="margin-right: 3px" @click="AuditdialogShow = true" v-if="formData.Id !='' && formData.Status == ''">提交审批
+          </el-button>
           <router-link :to="'/oilsupplier/supplierappend/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -110,6 +111,30 @@
       </span>
     </el-dialog>
 
+     <el-dialog title="选择审批单位" :visible.sync="AuditdialogShow" width="520px">
+      <el-form ref="searchForm" label-width="110px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="单位名称">
+              <el-select ref="selectauditOrg" v-model="FirstAudit" placeholder="请选择"
+                         style="width: 90%" filterable allow-create default-first-option>
+                <el-option
+                  v-for="item in organizeOption"
+                  :key="item.Id"
+                  :label="item.Fullname"
+                  :value="item.Id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="AuditdialogShow = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="AuditEntity">确定</el-button>
+      </span>
+    </el-dialog>
+
   </div>
 </template>
 
@@ -117,6 +142,7 @@
   import {
     mapGetters
   } from 'vuex'
+  import suppapi from '@/api/oilsupplier/supplier'
   import api from '@/api/oilsupplier/supplierappendsub'
   import api2 from '@/api/oilsupplier/supplierappend'
   import apiCert from '@/api/oilsupplier/suppliercert'
@@ -152,6 +178,9 @@
         }
       }
       return {
+        AuditdialogShow: false,//提交审核弹框
+        organizeOption: [], // 审批部门
+        FirstAudit: '',
         supplierList: [], //供应方公司列表
         supplierOptions: '', //已选择的供应方公司列表
         // serviceType: '', //服务类型()
@@ -248,6 +277,7 @@
       this.getOrgTreeList() //获取推荐单位层级列表
       this.getTechTreeList() //获取技术服务类层级列表
       this.getSupplierList() //获取供应方公司列表
+      this.getDictOptions()
     },
     methods: {
 
@@ -346,25 +376,6 @@
         }).catch(err => {
           console.error(err)
         })
-      },
-       //提交审批
-      AuditEntity() {
-        apiCert.auditEntityappend(this.Id, this.$axios).then(res => {
-          if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            });
-          } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            });
-          }
-        }).catch(err => {
-          console.error(err)
-        });
       },
       //保存增项信息
       saveEntity() {
@@ -597,6 +608,41 @@
         .catch(() => {})
       },
 
+      //提交审批
+       AuditEntity () {
+        api2.auditEntity(this.formData.Id, this.FirstAudit, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.getEntityById()
+            this.AuditdialogShow = false
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      getDictOptions () {
+        suppapi.getDictList(this.$axios).then(res => {
+          this.dictData = res.data.items
+          this.organizeOption = res.data.items['Organizes']
+          console.log("---this.organizeOption---",this.organizeOption)
+          /* this.UnitRelationOptions = res.data.items['UnitRelation']
+           this.getCityList(res.data.items['GaodeMapChinaAreas'])
+           this.CompanyTypeOptions = res.data.items['CompanyType'] */
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
       //列表排序功能
       orderby(column) {
         if (column.order == 'ascending') {

+ 169 - 72
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/basisedit.vue

@@ -11,6 +11,8 @@
           <i class="icon icon-table2"></i> 审批
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">提交专业审批</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>
           <router-link :to="'/oilsupplier/supplieraudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -143,9 +145,9 @@
           </el-card>
         </el-tab-pane>
 
-        <el-tab-pane label="审批意见">
-          <auditbus-list ref="auditbusList" :data="auditbusList" :SupplierCertId="certId" :SupplierId="serviceId"
-                         :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></auditbus-list>
+        <el-tab-pane label="企业资质">
+          <auditbus-list ref="auditbusList" :data="auditbusList" :SupplierCertId="certId + ''" :SupplierId="serviceId+''"
+                         :SupplierTypeCode="classId+''" :Visiblebtn="this.formData.Status" height="360px" style="margin-top: 20px"></auditbus-list>
         </el-tab-pane>
 
         <el-tab-pane label="流程查看">
@@ -158,6 +160,53 @@
         </el-tab-pane>
       </el-tabs>
     </el-card>
+    <el-dialog title="审核" :visible.sync="dialogMakeSure">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <el-form-item :label="aduitlabel" v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
+          <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择"
+                     style="width: 90%" filterable allow-create default-first-option>
+            <el-option
+              v-for="item in auditerOptions"
+              :key="item.id"
+              :label="item.realname"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item label="审核状态">
+          <template>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1">通过</el-radio>
+            <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2">未通过</el-radio>
+          </template>
+        </el-form-item>
+        <el-form-item label="意见">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核说明"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogMakeSure = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="分配" :visible.sync="dialogAllocation">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <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 auditerOptions"
+              :key="item.id"
+              :label="item.realname"
+              :value="item.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogAllocation = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="makeSure()">确 定</el-button>
+      </div>
+    </el-dialog>
   </div>
 </template>
 
@@ -184,11 +233,11 @@
       WfHistory,
       SupplierCertEdit,
 
-      EquipmentList, //企业主要装备情况
-      PerformanceList, //近三年主要工程业绩列表
-      PatentList, //拥有专利、专有技术及工法列表
-      WinningList, //近三年获得省部级及以上主要技术、管理成果、获奖项目列表
-      AuditbusList, //待审核业务
+      EquipmentList, // 企业主要装备情况
+      PerformanceList, // 近三年主要工程业绩列表
+      PatentList, // 拥有专利、专有技术及工法列表
+      WinningList, // 近三年获得省部级及以上主要技术、管理成果、获奖项目列表
+      AuditbusList, // 待审核业务
       BasisInfo
     },
     computed: {
@@ -198,19 +247,27 @@
     },
     name: 'oilsupplierEdit',
 
-    data() {
+    data () {
       return {
-        equipmentList: [], //企业主要装备情况
-        performanceList: [], //近三年主要工程业绩
-        patentList: [], //拥有专利、专有技术及工法
-        winningList: [], //近三年获得省部级及以上主要技术、管理成果、获奖项目
-        auditbusList: [], //待审核业务
-
+        equipmentList: [], // 企业主要装备情况
+        performanceList: [], // 近三年主要工程业绩
+        patentList: [], // 拥有专利、专有技术及工法
+        winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
+        auditbusList: [], // 待审核业务
+        auditerOptions: [], // 审核人员
         serviceId: '',
         certId: '',
         classId: '02',
         dictData: null,
-
+        dialogMakeSure: false,
+        dialogAllocation: false,
+        aduitlabel: '审核人',
+        auditer: '',
+        shenheForm: {
+          SuccessStatus: 1,
+          AuditorRemark: '',
+          AnnualId: 0
+        },
         formData: {
           Id: '',
           SupplierName: '',
@@ -306,8 +363,7 @@
         }
       }
     },
-    created() {
-
+    created () {
       this.serviceId = this.$route.params.opera + ''
       this.certId = this.$route.query.certid + ''
       if (this.serviceId !== 'add' && this.serviceId > 0) {
@@ -315,21 +371,21 @@
       } else {
         this.formData.Id = 0
       }
-      this.getDictOptions()
+      // this.getDictOptions()
       this.initDatas()
     },
     methods: {
-      equipmentdialog() {
-        this.$refs["equipmentList"].showDialog()
+      equipmentdialog () {
+        this.$refs['equipmentList'].showDialog()
       },
-      performancedialog() {
-        this.$refs["performanceList"].showDialog()
+      performancedialog () {
+        this.$refs['performanceList'].showDialog()
       },
-      patentdialog() {
-        this.$refs["patentList"].showDialog()
+      patentdialog () {
+        this.$refs['patentList'].showDialog()
       },
-      winningdialog() {
-        this.$refs["winningList"].showDialog()
+      winningdialog () {
+        this.$refs['winningList'].showDialog()
       },
 
       initDatas () {
@@ -351,89 +407,88 @@
 
             this.entrydetail.business = this.certId
             this.entrydetail.instance = this.formDataCert.WorkflowId
+            this.getDictOptions()
           }).catch(err => {
             console.error(err)
-          });
+          })
         }
       },
 
       getDictOptions () {
-        api.getDictList(this.$axios).then(res => {
+        api.getDictListByStatus(this.formData.Status, this.$axios).then(res => {
           this.dictData = res.data.items
+          this.auditerOptions = res.data.items['Auditer']
         }).catch(err => {
           console.error(err)
         })
       },
 
-      //保存信息
-      saveEntity() {
+      // 保存信息
+      saveEntity () {
         this.$refs['EntityForm'].validate((valid) => {
           if (valid) {
-            //this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
+            // this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
             if (!this.formData.Id) {
               this.addEntity()
             } else {
               this.updateEntity()
             }
-
           } else {
             return false
           }
         })
       },
 
-      //保存信息
-      saveCertEntity() {
+      // 保存信息
+      saveCertEntity () {
         this.$refs['SupplierCertEditCompoment'].saveEntity()
       },
 
-      addEntity() {
+      addEntity () {
         this.formData.SupplierTypeCode = '02'
         this.formData.SupplierTypeName = '基建类'
         api.addEntity(this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
+            // 保存成功后,初始化数据,变成修改
             this.formData.Id = res.data.item.split('_')[0]
             this.certId = res.data.item.split('_')[1]
             this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
-            });
-
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
 
-      updateEntity() {
+      updateEntity () {
         api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
+            // 保存成功后,初始化数据,变成修改
             this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
-            });
-
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
       },
 
-      CheckCompanyBase() {
+      CheckCompanyBase () {
         if (!this.formData.Id) {
           this.$message({
             type: 'error',
@@ -450,51 +505,94 @@
         }
         return true
       },
-      //企业人员结构情况
-      updateNumberEntity() {
+      // 企业人员结构情况
+      updateNumberEntity () {
         if (!this.CheckCompanyBase()) {
           return false
         }
         api.updateNumberEntity(this.formData.Id + '_' + this.certId, this.formDataCert, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
+            // 保存成功后,初始化数据,变成修改
             this.initDatas()
             this.$message({
               type: 'success',
               message: res.data.message
-            });
+            })
           } else {
             this.$message({
               type: 'warning',
               message: res.data.message
-            });
+            })
           }
         }).catch(err => {
           console.error(err)
-        });
+        })
+      },
+
+      AuditEntity () {
+        // apiCert.auditEntity(this.certId, this.$axios).then(res => {
+        //   if (res.data.code === 0) {
+        //     // 保存成功后,初始化数据,变成修改
+        //     this.initDatas()
+        //     this.$message({
+        //       type: 'success',
+        //       message: res.data.message
+        //     })
+        //   } else {
+        //     this.$message({
+        //       type: 'warning',
+        //       message: res.data.message
+        //     })
+        //   }
+        // }).catch(err => {
+        //   console.error(err)
+        // })
+        this.dialogMakeSure = true
+      },
+
+      allocationBtn () {
+        this.dialogAllocation = true
+      },
+      // 审核通过
+      makeSure () {
+        console.log(this.auditer)
+        if (this.shenheForm.SuccessStatus === 1) {
+          if ((!this.auditer || this.auditer === 0) && this.formData.Status !== '2' && this.formData.Status !== '4' && this.formData.Status !== '5') {
+            this.$message({
+              type: 'warning',
+              message: '请选择审核人!'
+            })
+            return
+          }
+        }
+        this.checkstatus()
       },
 
-      AuditEntity() {
-        apiCert.auditEntity(this.certId, this.$axios).then(res => {
+      checkstatus () {
+        let params = this.shenheForm
+        console.log(this.shenheForm, '---this.shenheForm----')
+        apiCert.auditEntityFir(this.certId, this.auditer, params, this.$axios).then(res => {
           if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
             this.initDatas()
+            this.dialogMakeSure = false
+            this.dialogAllocation = 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) {
+      jstimehandle (val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -507,20 +605,19 @@
         }
       },
 
-      formatDateTime(date) {
-        var y = date.getFullYear();
-        var m = date.getMonth() + 1;
-        m = m < 10 ? ('0' + m) : m;
-        var d = date.getDate();
-        d = d < 10 ? ('0' + d) : d;
-        var h = date.getHours();
-        var minute = date.getMinutes();
-        minute = minute < 10 ? ('0' + minute) : minute;
-        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      formatDateTime (date) {
+        var y = date.getFullYear()
+        var m = date.getMonth() + 1
+        m = m < 10 ? ('0' + m) : m
+        var d = date.getDate()
+        d = d < 10 ? ('0' + d) : d
+        var h = date.getHours()
+        var minute = date.getMinutes()
+        minute = minute < 10 ? ('0' + minute) : minute
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute
       }
     }
   }
-
 </script>
 
 <style lang="scss">

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

@@ -11,7 +11,7 @@
           <i class="icon icon-table2"></i> 审批
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">分配</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">提交专业审批</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>
           <router-link :to="'/oilsupplier/supplieraudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
@@ -146,7 +146,7 @@
           </el-card>
         </el-tab-pane>
 
-        <el-tab-pane label="审批意见">
+        <el-tab-pane label="企业资质">
           <auditbus-list ref="auditbusList" :data="auditbusList" :SupplierCertId="certId" :SupplierId="serviceId"
                          :SupplierTypeCode="classId" :Visiblebtn="this.formData.Status" height="360px" style="margin-top: 20px"></auditbus-list>
         </el-tab-pane>

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

@@ -11,7 +11,7 @@
           <i class="icon icon-table2"></i> 审批
         </span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">分配</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="allocationBtn" v-if="this.formData.Status == '3'">提交专业审批</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>
           <router-link :to="'/oilsupplier/supplieraudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
@@ -145,7 +145,7 @@
           </el-card>
         </el-tab-pane>
 
-        <el-tab-pane label="审批意见">
+        <el-tab-pane label="企业资质">
           <auditbus-list ref="auditbusList" :data="auditbusList" :SupplierCertId="certId" :SupplierId="serviceId"
             :SupplierTypeCode="classId" :Visiblebtn="this.formData.Status" height="360px" style="margin-top: 20px"></auditbus-list>
         </el-tab-pane>