Bläddra i källkod

资质变更审批流程修改

huahaiyan 6 år sedan
förälder
incheckning
efedce61fd

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

@@ -44,6 +44,8 @@ type OilQualChangeMain struct {
 	CommercialNo   string    `xorm:"comment('工商注册号') VARCHAR(20)"`
 	Step           int       `xorm:"comment('页面上第几步') INT(10)"`
 	AuditIndex     int       `xorm:"default 0 comment('审批次数') INT(11)"`
+	FirstAudit     int       `xorm:"default 0 comment('初审') INT(11)"`
+	SecondAudit    int       `xorm:"default 0 comment('复审') INT(11)"`
 	BusinessKey    string    `xorm:"VARCHAR(255)"`
 	Status         string    `xorm:"comment('状态标识') VARCHAR(10)"`
 	WorkFlowId     string    `xorm:"comment('工作流的ID') VARCHAR(50)"`

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

@@ -84,12 +84,13 @@ const (
 	PAYING_AUDIT_STATUS string = "6"  //待缴费
 	STOREING_STATUS     string = "7"  //待入库
 	STORE_STATUS        string = "8"  //已入库
-	FEN_TRIAL_STATUS    string = "10" //二级单位初审
+	FEN_TRIAL_STATUS    string = "10" //二级单位分办
 	NOPASS_STATUS       string = "-1" // 初审未通过
 	NO_SECOND_TRIAL_STATUS   string = "-2" // 复审未通过
 	NO_THIRD_TRIAL_STATUS    string = "-3" // 专业处接收未通过
 	NO_PROF_AUDIT_STATUS     string = "-4" // 专业处室未通过
 	NO_CENT_AUDIT_STATUS    string = "-5" // 集中评审未通过
+	ALL_PASE_STATUS    string = "11" //审核完成
 
 	DOOGS_TYPECODE string = "01" // 物资类
 	BASIS_TYPECODE string = "02" // 基建类

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

@@ -1081,7 +1081,7 @@ func (this *InfoChangeController) InfoAudit() {
 		step = 2
 		backstatus = suppliercert.NOPASS_STATUS
 	} else if infomodel.Status == suppliercert.SECOND_TRIAL_STATUS {
-		status = suppliercert.THIRD_TRIAL_STATUS
+		status = suppliercert.CENT_AUDIT_STATUS
 		backstatus = suppliercert.NO_SECOND_TRIAL_STATUS
 		step = 2
 		dictSvc := items.GetItemsService(utils.DBE)
@@ -1095,8 +1095,8 @@ func (this *InfoChangeController) InfoAudit() {
 			}
 		}
 		userIds = strings.Trim(userIds, ",")
-	}else if infomodel.Status == suppliercert.THIRD_TRIAL_STATUS {
-		status = suppliercert.PROF_AUDIT_STATUS
+	}else if infomodel.Status == suppliercert.CENT_AUDIT_STATUS {
+		status = suppliercert.ALL_PASE_STATUS
 		step = 3
 		backstatus = suppliercert.NO_THIRD_TRIAL_STATUS
 	}
@@ -1113,7 +1113,7 @@ func (this *InfoChangeController) InfoAudit() {
 		ActiComplete.Result = "1"
 		receiveVal := svcActiviti.TaskComplete(ActiComplete)
 		infomodel.Status = status
-		if infomodel.Status == suppliercert.THIRD_TRIAL_STATUS {
+		if infomodel.Status == suppliercert.CENT_AUDIT_STATUS {
 			var infochangeitemmodel infochange.OilInfoChangeItem
 			infochangeitemmodel.ChangeStatus = 1
 			itemswhere := "InfoId = " + utils.ToStr(infoid)
@@ -1150,8 +1150,8 @@ func (this *InfoChangeController) InfoAudit() {
 		ActiComplete.Result = "0"
 		receiveVal := svcActiviti.TaskComplete(ActiComplete)
 		if receiveVal == "true" {
-			if infomodel.Status == suppliercert.THIRD_TRIAL_STATUS {
-				infomodel.Status = suppliercert.NO_CENT_AUDIT_STATUS
+			if infomodel.Status == suppliercert.CENT_AUDIT_STATUS {
+				infomodel.Status = backstatus
 			} else {
 				infomodel.Status = backstatus
 				// 审批历史

+ 102 - 82
src/dashoo.cn/backend/api/controllers/oilsupplier/qualchange.go

@@ -2,6 +2,7 @@ package oilsupplier
 
 import (
 	"dashoo.cn/backend/api/business/audithistory"
+	"dashoo.cn/business2/items"
 	"encoding/json"
 	"strconv"
 	"strings"
@@ -30,7 +31,6 @@ type QualShenHeModel struct {
 	QualId        int
 	SuccessStatus int
 	AuditorRemark string
-	Auditer       int
 	SuppId        int
 }
 
@@ -512,15 +512,14 @@ func (this *QualChangeController) EditQualChange() {
 	mainentirt.Status = "0"
 	mainentirt.Step = 1
 	err = svc.UpdateEntityBywheretbl(OilQualChangeMainName, &mainentirt, []string{"SupplierCertId", "Status", "Step"}, qmwhere)
-	qualmainId := mainentirt.Id
 
-	qdwhere := " SupplierId = " + utils.ToStr(model.SupplierId) + " and FileId = "+ id
+	qdwhere := " SupplierId = " + utils.ToStr(model.SupplierId) + " and FileId = "+ utils.ToStr(model.Id)
 	svc.GetEntitysByWhere(OilQualChangeDetailName, qdwhere, &qualdetaimodel)
 	entity = model
 	entity.Id = 0
-	entity.ParentId = qualmainId
+	entity.ParentId, _ = strconv.Atoi(id)
 	entity.SupplierCertId = model.SupplierCertId
-	entity.FileId, _ = utils.StrTo(id).Int()
+	entity.FileId = model.Id
 	if len(qualdetaimodel) == 0 {
 		entity.CreateOn = time.Now()
 		entity.CreateBy = this.User.Realname
@@ -550,6 +549,7 @@ func (this *QualChangeController) EditQualChange() {
 func (this *QualChangeController) AuditEntity() {
 	suppId := this.Ctx.Input.Param(":id")
 	firstAudit := this.GetString("auditer")
+	fushenauditer := this.GetString("fushenauditer")
 	Remark := this.GetString("Remark")
 	//取出审批列表
 	svc := qualchange.GetQualChangeService(utils.DBE)
@@ -599,6 +599,8 @@ func (this *QualChangeController) AuditEntity() {
 		qualmainmodel.WorkFlowId = processInstanceId
 		qualmainmodel.Status = suppliercert.FIRST_TRIAL_STATUS //二级单位初审
 		qualmainmodel.AuditIndex = qualmain.AuditIndex + 1
+		qualmainmodel.FirstAudit, _ = strconv.Atoi(firstAudit)
+		qualmainmodel.SecondAudit, _ = strconv.Atoi(fushenauditer)
 		qualmainmodel.BusinessKey = ActiComplete.BusinessKey
 		qualmainmodel.CreateOn = time.Now()
 		qualmainmodel.CreateBy = this.User.Realname
@@ -611,6 +613,8 @@ func (this *QualChangeController) AuditEntity() {
 			"Status",
 			"Step",
 			"AuditIndex",
+			"FirstAudit",
+			"SecondAudit",
 			"BusinessKey",
 			"CreateOn",
 			"CreateBy",
@@ -645,17 +649,16 @@ func (this *QualChangeController) AuditEntity() {
 // @router /qualaudit [post]
 func (this *QualChangeController) QualAudit() {
 	svc := qualchange.GetQualChangeService(utils.DBE)
-	var jsonblob = this.Ctx.Input.RequestBody
+	var jsonblob= this.Ctx.Input.RequestBody
 	var dataother QualShenHeModel
 	json.Unmarshal(jsonblob, &dataother)
 	//取出审批列表
-	var qualid = dataother.QualId
+	var qualid= dataother.QualId
 	var qualmodel qualchange.OilQualChangeMain
 	svc.GetEntityById(utils.ToStr(dataother.QualId), &qualmodel)
 	var qualdetail []qualchange.OilQualChangeDetail
 	where := "ParentId = " + utils.ToStr(qualid)
 	svc.GetEntities(&qualdetail, where)
-	var qualchanentity qualchange.OilQualChangeMain
 	var errinfo ErrorDataInfo
 	defer func() { //finally处理失败的异常
 		if err := recover(); err != nil {
@@ -671,16 +674,37 @@ func (this *QualChangeController) QualAudit() {
 			this.ServeJSON()
 		}
 	}()
-	var userIds string
-	certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
-	var users []userRole.Base_RoleList
-	certSrv.GetAuditUser("100000178", workflow.PROF_REGULATION, &users)
 
-	for _, tmpUser := range users {
-		userIds += strconv.FormatInt(tmpUser.Id, 10) + ","
-	}
-	userIds = strings.Trim(userIds, ",")
+	//审核状态判断进行的操作
 	step := 2
+	status := ""
+	backstatus := "0"
+	var userIds string
+	if qualmodel.Status == suppliercert.FIRST_TRIAL_STATUS {
+		userIds = utils.ToStr(qualmodel.SecondAudit)
+		status = suppliercert.SECOND_TRIAL_STATUS
+		step = 2
+		backstatus = suppliercert.NOPASS_STATUS
+	} else if qualmodel.Status == suppliercert.SECOND_TRIAL_STATUS {
+		status = suppliercert.CENT_AUDIT_STATUS
+		backstatus = suppliercert.NO_SECOND_TRIAL_STATUS
+		step = 2
+		dictSvc := items.GetItemsService(utils.DBE)
+		deptIds := dictSvc.GetKeyValueItems("CENT_AUDIT")
+		var users []userRole.Base_RoleList
+		certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
+		for _, dept := range deptIds {
+			certSrv.GetAuditUser(dept.Value, workflow.PROF_REGULATION, &users)
+			for _, tmpUser := range users {
+				userIds += strconv.FormatInt(tmpUser.Id, 10) + ","
+			}
+		}
+		userIds = strings.Trim(userIds, ",")
+	} else if qualmodel.Status == suppliercert.CENT_AUDIT_STATUS {
+		status = suppliercert.ALL_PASE_STATUS
+		step = 3
+		backstatus = suppliercert.NO_THIRD_TRIAL_STATUS
+	}
 	svcActiviti := workflow.GetActivitiService(utils.DBE)
 	var ActiComplete workflow.ActiCompleteVM
 	ActiComplete.ProcessKey = workflow.OIL_QUAL_CHANGE
@@ -689,25 +713,22 @@ func (this *QualChangeController) QualAudit() {
 	ActiComplete.UserId = this.User.Id
 	ActiComplete.Remarks = dataother.AuditorRemark
 	ActiComplete.CallbackUrl = ""
+	var myerr error
 	if dataother.SuccessStatus == 1 {
 		ActiComplete.Result = "1"
-		if qualmodel.Status == "1" {
-			qualchanentity.Status = "2" //二级单位初审
-		} else if qualmodel.Status == "2" {
-			qualchanentity.Status = "3" //企业法规处审批
-			step = 3
-		}
 		receiveVal := svcActiviti.TaskComplete(ActiComplete)
+		qualmodel.Status = status
+		qualmodel.Step = step
 		if receiveVal == "true" {
 			cols := []string{
 				"Id",
 				"Status",
 				"Step",
 			}
-			_, err := svc.UpdateEntityByIdCols(qualid, qualchanentity, cols)
+			_, err := svc.UpdateEntityByIdCols(qualid, qualmodel, cols)
 			if err == nil {
 				//原信息表更新
-				if qualmodel.Status == "2" {
+				if qualmodel.Status == suppliercert.CENT_AUDIT_STATUS {
 					if len(qualdetail) > 0 {
 						for i := 0; i < len(qualdetail); i++ {
 							var supfilemodel supplierfile.OilSupplierFile
@@ -718,74 +739,73 @@ func (this *QualChangeController) QualAudit() {
 						}
 					}
 				}
-				errinfo.Message = "提交成功!"
-				errinfo.Code = 0
-				this.Data["json"] = &errinfo
-				this.ServeJSON()
+				if myerr == nil {
+					errinfo.Message = "提交成功!"
+					errinfo.Code = 0
+					this.Data["json"] = &errinfo
+					this.ServeJSON()
+				} else {
+					errinfo.Message = "提交失败!"
+					errinfo.Code = -1
+					this.Data["json"] = &errinfo
+					this.ServeJSON()
+				}
 			} else {
-				errinfo.Message = "提交失败!"
+				errinfo.Message = "工作流异常,请联系管理员!"
 				errinfo.Code = -1
 				this.Data["json"] = &errinfo
 				this.ServeJSON()
+				return
 			}
-
 		} else {
-			errinfo.Message = "工作流异常,请联系管理员!"
-			errinfo.Code = -1
-			this.Data["json"] = &errinfo
-			this.ServeJSON()
-			return
-		}
-	} else {
-		ActiComplete.Result = "0"
-		if qualmodel.Status == "1" {
-			qualchanentity.Status = "-2" //二级单位初审
-		} else if qualmodel.Status == "2" {
-			qualchanentity.Status = "-3" //企业法规处审批
-		}
-		receiveVal := svcActiviti.TaskComplete(ActiComplete)
-		if qualchanentity.Status == "-2" {
-			// 审批历史
-			var audithistoryentity audithistory.Base_AuditHistory
-			audithistoryentity.EntityId = qualid
-			audithistoryentity.WorkflowId = qualmodel.WorkFlowId
-			audithistoryentity.Process = ActiComplete.ProcessKey
-			audithistoryentity.BusinessKey = ActiComplete.BusinessKey
-			audithistoryentity.Type = "05"
-			audithistoryentity.BackStep = qualmodel.Status
-			audithistoryentity.Index = qualmodel.AuditIndex
-			audithistoryentity.CreateOn = time.Now()
-			audithistoryentity.CreateBy = this.User.Realname
-			audithistoryentity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
-			certSrv.InsertEntity(audithistoryentity)
-			qualchanentity.WorkFlowId = ""
-		}
-		if receiveVal == "true" {
-			qualchanentity.Step = step
-			cols := []string{
-				"Id",
-				"Status",
-				"Step",
-				"WorkFlowId",
-			}
-			_, err := svc.UpdateEntityByIdCols(qualid, qualchanentity, cols)
-			if err == nil {
-				errinfo.Message = "提交成功!"
-				errinfo.Code = 0
-				this.Data["json"] = &errinfo
-				this.ServeJSON()
+			ActiComplete.Result = "0"
+			receiveVal := svcActiviti.TaskComplete(ActiComplete)
+			if receiveVal == "true" {
+				if qualmodel.Status == suppliercert.CENT_AUDIT_STATUS {
+					qualmodel.Status = backstatus
+				} else {
+					qualmodel.Status = backstatus
+					// 审批历史
+					var audithistoryentity audithistory.Base_AuditHistory
+					audithistoryentity.EntityId = qualid
+					audithistoryentity.WorkflowId = qualmodel.WorkFlowId
+					audithistoryentity.Process = ActiComplete.ProcessKey
+					audithistoryentity.BusinessKey = ActiComplete.BusinessKey
+					audithistoryentity.Type = "04"
+					audithistoryentity.BackStep = qualmodel.Status
+					audithistoryentity.Index = qualmodel.AuditIndex
+					audithistoryentity.CreateOn = time.Now()
+					audithistoryentity.CreateBy = this.User.Realname
+					audithistoryentity.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+					_, myerr = svc.InsertEntity(audithistoryentity)
+					qualmodel.WorkFlowId = ""
+				}
+				qualmodel.Step = 1
+				cols := []string{
+					"Status",
+					"Step",
+				}
+				_, myerr := svc.UpdateEntityByIdCols(qualid, qualmodel, cols)
+
+				if myerr == nil {
+					errinfo.Message = "提交成功!"
+					errinfo.Code = 0
+					this.Data["json"] = &errinfo
+					this.ServeJSON()
+				} else {
+					errinfo.Message = "提交失败!"
+					errinfo.Code = -1
+					this.Data["json"] = &errinfo
+					this.ServeJSON()
+				}
+
 			} else {
-				errinfo.Message = "提交失败!"
+				errinfo.Message = "工作流异常,请联系管理员!"
 				errinfo.Code = -1
 				this.Data["json"] = &errinfo
 				this.ServeJSON()
+				return
 			}
-		} else {
-			errinfo.Message = "工作流异常,请联系管理员!"
-			errinfo.Code = -1
-			this.Data["json"] = &errinfo
-			this.ServeJSON()
-			return
 		}
 	}
-}
+}

+ 1 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/annualfistaudit.vue

@@ -65,7 +65,7 @@
             <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">复审未通过</span>
             <span v-if="scope.row.Status=='3'" style="color:#E6A23C">待专业处室分办</span>
             <span v-if="scope.row.Status=='4'" style="color:#E6A23C">待专业处室审批</span>
-            <span v-if="scope.row.Status=='-4'" style="color:#F56C6C">专业处室审批未通过</span>
+            <span v-if="scope.row.Status=='-5'" style="color:#F56C6C">专业处室审批未通过</span>
             <span v-if="scope.row.Status=='5'" style="color:#67C23A">审核通过</span>
           </template>
         </el-table-column>

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

@@ -79,7 +79,7 @@
             <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">复审未通过</span>
             <span v-if="scope.row.Status=='3'" style="color:#E6A23C">待专业处室分办</span>
             <span v-if="scope.row.Status=='4'" style="color:#E6A23C">待专业处室审批</span>
-            <span v-if="scope.row.Status=='-4'" style="color:#F56C6C">专业处室审批未通过</span>
+            <span v-if="scope.row.Status=='-5'" style="color:#F56C6C">专业处室审批未通过</span>
             <span v-if="scope.row.Status=='5'" style="color:#67C23A">审核通过</span>
           </template>
         </el-table-column>

+ 0 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/operation.vue

@@ -1004,11 +1004,6 @@
           console.error(err)
         });
       },
-      setAuditer(val, name) {
-        this.auditer = val
-        this.auditerName = name
-        this.chooseAuditorVisible = false
-      },
       chooseAuditorShow() {
         this.$refs['chooseAuditor'].getorgtreelist()
         this.chooseAuditorVisible = true

+ 7 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/index.vue

@@ -50,11 +50,13 @@
         </el-table-column>
         <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
           <template slot-scope="scope">
-            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">已申请</span>
-            <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">初审未通过</span>
-            <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待法规处审核</span>
-            <span v-if="scope.row.Status=='-3'" style="color:#F56C6C">审核未通过</span>
-            <span v-if="scope.row.Status=='3'" style="color:#67C23A">审核通过</span>
+            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">待初审</span>
+            <span v-if="scope.row.Status=='-1'" style="color:#F56C6C">初审未通过</span>
+            <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待复审</span>
+            <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">复审未通过</span>
+            <span v-if="scope.row.Status=='3'" style="color:#E6A23C">待法规处审核</span>
+            <span v-if="scope.row.Status=='-5'" style="color:#F56C6C">审核未通过</span>
+            <span v-if="scope.row.Status=='4'" style="color:#67C23A">审核通过</span>
           </template> 
         </el-table-column>
         <el-table-column prop="ConmmitTime" sortable min-width="100" label="申请日期" align="center" show-overflow-tooltip>

+ 7 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/infoaudit.vue

@@ -51,11 +51,13 @@
         </el-table-column>
         <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
           <template slot-scope="scope">
-            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">已申请</span>
-            <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">初审未通过</span>
-            <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待法规处审核</span>
-            <span v-if="scope.row.Status=='-3'" style="color:#F56C6C">审核未通过</span>
-            <span v-if="scope.row.Status=='3'" style="color:#67C23A">审核通过</span>
+            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">待初审</span>
+            <span v-if="scope.row.Status=='-1'" style="color:#F56C6C">初审未通过</span>
+            <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待复审</span>
+            <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">复审未通过</span>
+            <span v-if="scope.row.Status=='3'" style="color:#E6A23C">待法规处审核</span>
+            <span v-if="scope.row.Status=='-5'" style="color:#F56C6C">审核未通过</span>
+            <span v-if="scope.row.Status=='4'" style="color:#67C23A">审核通过</span>
           </template>
         </el-table-column>
         <el-table-column prop="CreateOn" sortable min-width="100" label="申请日期" align="center" show-overflow-tooltip>

+ 36 - 13
src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/_opera/auditoperation.vue

@@ -12,7 +12,7 @@
         </span>
         <span style="float: right;">
           <el-button type="primary" size="mini" @click="commitshow = true"
-            v-if="butnshow == 0 && (QualStatus == '1' || QualStatus == '2')">审核</el-button>
+            v-if="QualStatus > 0">审核</el-button>
           <router-link :to="'/oilsupplier/qualchange/qualaudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
           </router-link>
@@ -87,21 +87,15 @@
       <el-form label-width="120px" :model="entityForm" :rules="rules" ref="EntityFormref">
         <el-row>
           <el-col :span="24">
-            <!-- <el-form-item label="提交审批人" v-if="QualStatus == '1'" prop="auditer" required>
-              <el-select ref="selectAuditer" v-model="entityForm.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> -->
             <el-form-item label="审核状态">
               <template>
-                <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1">通过</el-radio>
-                <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2">未通过</el-radio>
+                <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="1" @change="radioChange">通过</el-radio>
+                <el-radio class="radio" v-model="shenheForm.SuccessStatus" :label="2" @change="radioChange">未通过</el-radio>
               </template>
             </el-form-item>
-            <el-form-item label="意见">
-              <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="请输入审核说明"></el-input>
+            <el-form-item label="意见" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
+              <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder">
+              </el-input>
             </el-form-item>
           </el-col>
         </el-row>
@@ -142,6 +136,7 @@
 
     data() {
       return {
+        textplaceholder: '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)',
         businessList: [], //准入业务
         serviceId: '',
         certId: '',
@@ -295,9 +290,29 @@
           .catch(err => {
             console.error(err)
           })
+      },
+       //审核通过
+      makeSure() {
+        if (this.shenheForm.SuccessStatus === 1) {
+          if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3') {
+            this.$message({
+              type: 'warning',
+              message: '审批意见不能低于20个字符!'
+            })
+            return
+          }
+        } else {
+          if (this.shenheForm.AuditorRemark.trim().length < 5 && this.formData.Status !== '3') {
+            this.$message({
+              type: 'warning',
+              message: '退回意见不能低于5个字符!'
+            })
+            return
+          }
+        }
+        this.QualChangeAuditLaw()
       },
       QualChangeAuditLaw() {
-        this.shenheForm.Auditer = this.entityForm.auditer
         this.shenheForm.QualId = parseInt(this.QualId)
         this.shenheForm.SuppId = parseInt(this.SupplierId)
 
@@ -333,6 +348,14 @@
         _this.doclist.push(params)
       },
 
+      radioChange() {
+        if (this.shenheForm.SuccessStatus === 1) {
+          this.textplaceholder = '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)'
+        } else {
+          this.textplaceholder = '退回意见不能少于5个字'
+        }
+      },
+
       beforeAvatarUpload(file) {
         let isLt50m = file.size / 1024 / 1024 / 50 < 1
         if (!isLt50m) {

+ 41 - 12
src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/_opera/operation.vue

@@ -12,7 +12,7 @@
         </span>
         <span style="float: right;">
           <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="historychange">历史变更</el-button> -->
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button>
+          <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button> -->
           <el-button type="primary" size="mini" @click="submitqualChange"
             v-if="(QualStatus == 0 || QualStatus == '' || QualStatus == -2 || QualStatus == 3) && !butnab">提交申请
           </el-button>
@@ -119,18 +119,18 @@
       <el-form label-width="90px" :model="entityForm" ref="EntityFormref">
         <el-row>
           <el-col :span="24">
-            <el-form-item label="审批人" prop="auditer">
-              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择审人">
+            <el-form-item label="初审人员">
+              <el-input ref="selectAuditer" readonly v-model="auditerName" placeholder="请选择审人">
                 <el-button slot="append" icon="el-icon-search" @click="chooseAuditorShow"></el-button>
               </el-input>
             </el-form-item>
-            <!-- <el-form-item label="审批人" prop="auditer" required>
-              <el-select ref="selectAuditer" v-model="entityForm.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-form-item label="复审人员">
+              <el-select ref="selectAuditer" v-model="fushenauditer" placeholder="请选择复审人" style="width: 100%" filterable
+                allow-create default-first-option>
+                <el-option v-for="item in secauditerOptions" :key="item.id" :label="item.realname" :value="item.id">
                 </el-option>
               </el-select>
-            </el-form-item> -->
+            </el-form-item>
           </el-col>
           <el-col :span="24">
             <el-form-item label="说明">
@@ -186,6 +186,7 @@
 
     data() {
       return {
+        secauditerOptions:[],
         yasuoname: '',
         audithistoryshow: false,
         backhistroy: {
@@ -195,6 +196,7 @@
         },
         QualId: '',
         chooseAuditorVisible: false,
+        fushenauditer: '',
         auditer: '',
         auditerName: '',
         businessList: [], //准入业务
@@ -221,6 +223,7 @@
           SupplierTypeName: '',
           FirstAudit: '',
           auditer: '',
+          fushenauditer: '',
           Remark: ''
         },
         Title: '',
@@ -369,7 +372,7 @@
         _this.SubfileForm.SupplierId = parseInt(_this.SubfileForm.SupplierId)
         _this.SubfileForm.SupplierCertSubId = parseInt(_this.SubfileForm.SupplierCertSubId)
         _this.SubfileForm.SupplierCertId = parseInt(_this.SupplierCertId)
-        _this.$axios.put('/qualchange/editqualchange/' + _this.SubfileForm.Id, _this.SubfileForm)
+        _this.$axios.put('/qualchange/editqualchange/' + _this.QualId, _this.SubfileForm)
           .then(res => {
             if (res.data.code === 0) {
               _this.$message({
@@ -502,6 +505,21 @@
         this.commitshow = true
       },
       addQualChangeAudit() {
+        if (this.auditer === "") {
+          this.$message({
+            type: "warning",
+            message: "请选择初审人!"
+          })
+          return
+        }
+        if (this.fushenauditer === "") {
+          this.$message({
+            type: "warning",
+            message: "请选择复审人!"
+          })
+          return
+        }
+        this.entityForm.fushenauditer = this.fushenauditer
         this.entityForm.auditer = this.auditer
         quaapi.auditEntity(this.SupplierId, this.entityForm, this.$axios).then(res => {
           if (res.data.code === 0) {
@@ -524,9 +542,20 @@
         })
       },
       setAuditer(val, name) {
-        this.auditer = val
-        this.auditerName = name
-        this.chooseAuditorVisible = false
+        this.auditer = val;
+        this.auditerName = name;
+        this.chooseAuditorVisible = false;
+        this.auditOrgChang(this.auditer)
+      },
+      auditOrgChang(val) {
+        let auditstepcode = "SECOND_TRIAL";
+        supplierapi.getAuditerByFirst(val, auditstepcode, this.$axios)
+          .then(res => {
+            this.secauditerOptions = res.data.item
+          })
+          .catch(err => {
+            console.error(err);
+          });
       },
       chooseAuditorShow() {
         this.$refs['chooseAuditor'].getorgtreelist()

+ 7 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/index.vue

@@ -52,11 +52,13 @@
         </el-table-column>
         <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
           <template slot-scope="scope">
-            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">已申请</span>
-            <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">初审未通过</span>
-            <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待法规处审核</span>
-            <span v-if="scope.row.Status=='-3'" style="color:#F56C6C">审核未通过</span>
-            <span v-if="scope.row.Status=='3'" style="color:#67C23A">审核通过</span>
+            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">待初审</span>
+            <span v-if="scope.row.Status=='-1'" style="color:#F56C6C">初审未通过</span>
+            <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待复审</span>
+            <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">复审未通过</span>
+            <span v-if="scope.row.Status=='5'" style="color:#E6A23C">待法规处审核</span>
+            <span v-if="scope.row.Status=='-5'" style="color:#F56C6C">审核未通过</span>
+            <span v-if="scope.row.Status=='11'" style="color:#67C23A">审核通过</span>
           </template>
         </el-table-column>
         <el-table-column prop="ConmmitTime" sortable min-width="100" label="申请日期" align="center" show-overflow-tooltip>

+ 7 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/qualaudit.vue

@@ -53,11 +53,13 @@
         </el-table-column>
         <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
           <template slot-scope="scope">
-            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">已申请</span>
-            <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">初审未通过</span>
-            <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待法规处审核</span>
-            <span v-if="scope.row.Status=='-3'" style="color:#F56C6C">审核未通过</span>
-            <span v-if="scope.row.Status=='3'" style="color:#67C23A">审核通过</span>
+            <span v-if="scope.row.Status=='1'" style="color:#E6A23C">待初审</span>
+            <span v-if="scope.row.Status=='-1'" style="color:#F56C6C">初审未通过</span>
+            <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待复审</span>
+            <span v-if="scope.row.Status=='-2'" style="color:#F56C6C">复审未通过</span>
+            <span v-if="scope.row.Status=='5'" style="color:#E6A23C">待法规处审核</span>
+            <span v-if="scope.row.Status=='-5'" style="color:#F56C6C">审核未通过</span>
+            <span v-if="scope.row.Status=='11'" style="color:#67C23A">审核通过</span>
           </template>
         </el-table-column>
         <el-table-column prop="CreateOn" sortable min-width="100" label="申请日期" align="center" show-overflow-tooltip>

+ 2 - 2
src/dashoo.cn/frontend_web/src/pages/system/users.vue

@@ -40,9 +40,9 @@
                 title="编辑"></el-button>
               <el-button size="small" type="text" style="margin-left:3px" icon="el-icon-delete" title="删除" @click="deletedata(scope.row)"></el-button>
               <!-- <el-button size="small" type="text" style="margin-left:1px" title="权限" @click="permission(scope.row)"><i class="icon icon-lock"></i></el-button> -->
-              <el-button size="small" type="text" style="margin-left:3px" title="密码重置" @click="resetpwd(scope.row)">
+              <!-- <el-button size="small" type="text" style="margin-left:3px" title="密码重置" @click="resetpwd(scope.row)">
                 <i class="icon icon-spinner11"></i>
-              </el-button>
+              </el-button> -->
               <el-button size="small" type="text" style="margin-left:3px" title="设置角色" @click="roleset(scope.row)">
                 <i class="icon icon-users"></i>
               </el-button>