Browse Source

是否已确认交费进行判断, 准入基建类代码整理

baichengfei 5 years ago
parent
commit
dd062f90e0

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

@@ -91,4 +91,12 @@ func (s *PaymentService) AddPaymentinfo(SupplierId int, SupplierCertId int, Amou
 		"(? ,? , ?, ?)"
 	_,err = s.DBE.Exec(sql, SupplierId, SupplierCertId, Amount, PayType)
 	return  err
+}
+
+// 通过SrcId PayType 获取未交费的paymentInfo TODO SrcId是否一定有值?
+func (s *PaymentService) GetPaymentInfoBySrcId(SrcId string, PayType string, entitiesPtr interface{}) error {
+	sql :="SELECT * FROM OilPaymentInfo where IsPay in ('1', '2') and SrcId=" + SrcId + " and PayType=" + PayType
+	err := s.DBE.SQL(sql).Find(entitiesPtr)
+
+	return err
 }

+ 28 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/annualaudit.go

@@ -1829,8 +1829,34 @@ func (this *AnnualAuditController) UpdatePayStatus() {
 	var annualAuditEntity annualaudit.OilAnnualAudit
 	annualAuditSrv.GetEntityById(certId, &annualAuditEntity)
 
-	// PayType = 2
-	//TODO SrcId获取表id,更新isPay状态为1
+	paySrv := paymentinfo.GetPaymentService(utils.DBE)
+	var paymentInfoEntities []paymentinfo.OilPaymentInfo
+	err := paySrv.GetPaymentInfoBySrcId(certId, "2", &paymentInfoEntities)
+
+	if err != nil {
+		errinfo.Message = "未知错误,请稍后再试!"
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+
+	if len(paymentInfoEntities) == 1 {
+		for _, item := range  paymentInfoEntities {
+			if item.IsPay == "1" {
+				errinfo.Message = "已确认交费!请耐心等待"
+				errinfo.Code = -1
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+			}
+			if item.IsPay == "2" {
+				errinfo.Message = "已交费!请勿重复操作!"
+				errinfo.Code = -1
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+			}
+		}
+	}
+
 	sql :="UPDATE OilPaymentInfo SET IsPay ='1' where SrcId=" + certId
 	annualAuditSrv.DBE.Exec(sql)
 	errinfo.Message = "确认交费成功!"

+ 36 - 3
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -1041,6 +1041,13 @@ func (this *OilSupplierCertController) IsAccess() {
 		where := "AuditStepCode='" + auditstepcode + "'"
 		svc.GetEntity(&setting, where)
 		res = svc.UserInRoleById(this.User.Id, strconv.Itoa(setting.RoleId))
+	} else if auditstepcode == workflow.PAYING_FEE { // 待交费
+		certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
+		var supplierCertEntity suppliercert.OilSupplierCert
+		certSrv.GetEntityById(id, &supplierCertEntity)
+		if strconv.Itoa(supplierCertEntity.CreateUserId) == this.User.Id {
+			res = true
+		}
 	} else {
 		// TODO 单独检查交费用户的按钮权限 当前用户是否和创建人相同
 		//var users []suppliercert.UserList
@@ -1833,9 +1840,35 @@ func (this *OilSupplierCertController) UpdatePayStatus() {
 	var supplierCertEntity suppliercert.OilSupplierCert
 	supplierCertSrv.GetEntityById(certId, &supplierCertEntity)
 
-	// PayType = 1
-	//TODO SrcId获取表id,更新isPay状态为1
-	sql :="UPDATE OilPaymentInfo SET IsPay ='1' where SrcId=" + certId
+	paySrv := paymentinfo.GetPaymentService(utils.DBE)
+	var paymentInfoEntities []paymentinfo.OilPaymentInfo
+	err := paySrv.GetPaymentInfoBySrcId(certId, "1", &paymentInfoEntities)
+
+	if err != nil {
+		errinfo.Message = "未知错误,请稍后再试!"
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+
+	if len(paymentInfoEntities) == 1 {
+		for _, item := range  paymentInfoEntities {
+			if item.IsPay == "1" {
+				errinfo.Message = "已确认交费!请耐心等待"
+				errinfo.Code = -1
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+			}
+			if item.IsPay == "2" {
+				errinfo.Message = "已交费!请勿重复操作!"
+				errinfo.Code = -1
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+			}
+		}
+	}
+
+	sql :="UPDATE OilPaymentInfo SET IsPay ='1' where SrcId=" + certId + " and PayType='1'"
 	supplierCertSrv.DBE.Exec(sql)
 	errinfo.Message = "确认交费成功!"
 	errinfo.Code = 0

+ 28 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertappend.go

@@ -1600,8 +1600,34 @@ func (this *OilSupplierCertAppendController) UpdatePayStatus() {
 	var supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend
 	supplierCerAppendtSrv.GetEntityById(certId, &supplierCertAppendEntity)
 
-	// PayType = 3
-	// TODO SrcId获取表id,更新isPay状态为1
+	paySrv := paymentinfo.GetPaymentService(utils.DBE)
+	var paymentInfoEntities []paymentinfo.OilPaymentInfo
+	err := paySrv.GetPaymentInfoBySrcId(certId, "3", &paymentInfoEntities)
+
+	if err != nil {
+		errinfo.Message = "未知错误,请稍后再试!"
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+
+	if len(paymentInfoEntities) == 1 {
+		for _, item := range  paymentInfoEntities {
+			if item.IsPay == "1" {
+				errinfo.Message = "已确认交费!请耐心等待"
+				errinfo.Code = -1
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+			}
+			if item.IsPay == "2" {
+				errinfo.Message = "已交费!请勿重复操作!"
+				errinfo.Code = -1
+				this.Data["json"] = &errinfo
+				this.ServeJSON()
+			}
+		}
+	}
+
 	sql :="UPDATE OilPaymentInfo SET IsPay ='1' where SrcId=" + certId
 	supplierCerAppendtSrv.DBE.Exec(sql)
 	errinfo.Message = "确认交费成功!"

+ 335 - 37
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/basisedit.vue

@@ -15,20 +15,13 @@
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity" v-else>审批</el-button>-->
           <!--<el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity"-->
           <!--v-if="auditBtn && this.formData.Status != '6'">{{auditTitle}}</el-button>-->
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity()"
-            v-if="auditBtn && this.formData.Status == '1'">初审</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity()"
-            v-if="auditBtn && this.formData.Status == '2'">复审</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity()"
-            v-if="auditBtn && this.formData.Status == '3'">提交专业审核</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity()"
-            v-if="auditBtn && this.formData.Status == '4'">专业审核</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity('5')"
-            v-if="auditBtn && this.formData.Status == '5'">集中评审</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="AuditEntity()"
-            v-if="this.formData.Status == '10'">分办</el-button>
-          <el-button type="primary" size="mini" style="margin-left: 8px" @click="paySureClick()"
-            v-if="parseInt(this.formData.Status) === 6">交费</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick()" v-if="auditBtn && this.formData.Status == '1'">初审</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick()" v-if="auditBtn && this.formData.Status == '2'">复审</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="businessOfficeSeparateAuditClick()" v-if="auditBtn && this.formData.Status == '3'">提交专业审核</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="commonAuditClick()" v-if="auditBtn && this.formData.Status == '4'">专业审核</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="concentrateAuditClick()" v-if="auditBtn && this.formData.Status == '5'">集中评审</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="secUnitSeparateAuditClick()" v-if="this.formData.Status == '10'">分办</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="paySureClick()" v-if="auditBtn && parseInt(this.formData.Status) === 6">交费</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" onclick="window.history.go(-1)">返回</el-button>
         </span>
       </div>
@@ -221,6 +214,44 @@
         <el-button type="primary" size="small" @click="makeSure()" :loading="loading">确 定</el-button>
       </div>
     </el-dialog>
+    <el-dialog :title="atitle" :visible.sync="dialogConcentrateAuditVisible">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <el-form-item label="审核状态">
+          <template>
+            <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 porp="AuditorRemark" label="意见"
+                      :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder"
+                    minlength="20"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogConcentrateAuditVisible = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="concentrateAuditEntityMakeSure()" :loading="loading">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog :title="atitle" :visible.sync="dialogCommonAuditMakeSureVisible">
+      <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
+        <el-form-item label="审核状态">
+          <template>
+            <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 porp="AuditorRemark" label="意见"
+                      :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder"
+                    minlength="20"></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer" style="margin-top: -25px">
+        <el-button size="small" @click="dialogCommonAuditMakeSureVisible = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="commonAuditMakeSure()" :loading="loading">确 定</el-button>
+      </div>
+    </el-dialog>
     <el-dialog title="审核" :visible.sync="dialogMakeSure2">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
         <el-form-item label="审核状态">
@@ -263,16 +294,11 @@
         <el-button type="primary" size="small" @click="makeSure()" :loading="loading">确 定</el-button>
       </div>
     </el-dialog>
-    <el-dialog title="提交领导审核" :visible.sync="dialogAllocation">
+    <el-dialog title="提交领导审核" :visible.sync="dialogBusinessOfficeSeparateAuditVisible">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
-        <!-- <el-form-item label="审批人部门">
-          <el-cascader :options="secorgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false"
-            filterable style="width: 100%" @change="auditOrgChange" placeholder="请选择组织">
-          </el-cascader>
-        </el-form-item> -->
         <el-form-item label="审批人">
-          <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 100%" filterable allow-create
-            default-first-option>
+          <el-select ref="selectAuditer" v-model="ProfessionalAudit" 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>
@@ -282,11 +308,11 @@
         </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()" :loading="loading">确 定</el-button>
+        <el-button size="small" @click="dialogBusinessOfficeSeparateAuditVisible = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="businessOfficeSeparateAuditMakeSure()" :loading="loading">确 定</el-button>
       </div>
     </el-dialog>
-    <el-dialog title="提交初审" :visible.sync="dialogVisible" width="520px">
+    <el-dialog title="提交初审" :visible.sync="dialogSecUnitSeparateVisible" width="520px">
       <el-form ref="searchForm" label-width="100px">
         <el-row>
           <el-col :span="24">
@@ -297,11 +323,8 @@
               </el-radio-group>
             </el-form-item>
           </el-col>
-          <el-col :span="24" v-if="shenheForm.SuccessStatus == 1">
+          <el-col :span="24" v-if="parseInt(shenheForm.SuccessStatus) === 1">
             <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-select ref="selectAuditer"
                          v-model="auditer"
                          placeholder="请选择初审人"
@@ -319,15 +342,12 @@
             </el-form-item>
             <el-form-item label="复审人员">
               <el-select ref="selectAuditer" v-model="fushenauditer" placeholder="请选择复审人" style="width: 100%" filterable
-                allow-create default-first-option>
+                         allow-create default-first-option>
                 <el-option v-for="item in secauditerOptions" :key="item.Id" :label="item.Realname" :value="item.Id">
                 </el-option>
               </el-select>
             </el-form-item>
             <el-form-item label="专业处室" v-if="inStyle != '2' && inStyle != '4' && inStyle != '6' && inStyle != '3' ">
-              <!--<el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable-->
-                <!--style="width: 100%" v-model="majorDept" placeholder="请选择专业处室">-->
-              <!--</el-cascader>-->
               <el-select  v-model="selectDept" filterable disabled
                           placeholder="请选择" style="width: 100%" @change="changeOrgUnit">
                 <el-option  v-for="item in allorgunitOptions" :key="item.Id" :label="item.Fullname"
@@ -336,13 +356,13 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="24" v-if="shenheForm.SuccessStatus == 1">
+          <el-col :span="24" v-if="parseInt(shenheForm.SuccessStatus) === 1">
             <el-form-item label="备注">
               <el-input v-model="auditform.AuditRemark" type="textarea" placeholder="请输入备注内容">
               </el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="24" v-if="shenheForm.SuccessStatus == 0">
+          <el-col :span="24" v-if="parseInt(shenheForm.SuccessStatus) === 0">
             <el-form-item label="退回原因">
               <el-input v-model="backRemark" type="textarea" placeholder="请输入退回原因,不少于5个字!">
               </el-input>
@@ -351,8 +371,8 @@
         </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
-        <el-button size="mini" type="primary" @click="makeSure()" :loading="loading">确定</el-button>
+        <el-button @click="dialogSecUnitSeparateVisible = false">取 消</el-button>
+        <el-button type="primary" @click="secUnitSeparateAuditMakeSure()" :loading="loading">确定</el-button>
       </span>
     </el-dialog>
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
@@ -411,6 +431,7 @@
         loading: false,
         btnstatus: '',
         backRemark: '',
+        ProfessionalAudit: '', // 业务处室专业审批人id
         chooseAuditorVisible: false,
         textplaceholder: '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)',
         equipmentList: [], // 企业主要装备情况
@@ -446,6 +467,10 @@
         dialogMakeSure: false,
         dialogMakeSure2: false,
         dialogAllocation: false,
+        dialogConcentrateAuditVisible: false,
+        dialogCommonAuditMakeSureVisible: false,
+        dialogBusinessOfficeSeparateAuditVisible: false,
+        dialogSecUnitSeparateVisible: false,
         add_flat: false,
         delete_flat: false,
         aduitlabel: '审核人',
@@ -722,6 +747,9 @@
               } else {
                 this.shenheForm.AuditorRemark = '集中评审通过。'
               }
+            } else if (this.formData.Status === '6') {
+              this.auditTitle = '确认交费'
+              this.auditstepcode = 'PAYING_FEE'
             } else if (this.formData.Status === '10') {
               this.auditTitle = '分办'
               this.auditstepcode = 'FEN_TRIAL'
@@ -970,6 +998,276 @@
         }
       },
 
+      // 业务处室接收——分办 ⬇
+      businessOfficeSeparateAuditClick (val) {
+        console.log('业务处室接收————分办')
+        this.auditOrgChange()
+        console.log('请求部门结束')
+        this.dialogBusinessOfficeSeparateAuditVisible = true
+      },
+      businessOfficeSeparateAuditMakeSure () {
+        if (this.ProfessionalAudit === '') {
+          this.$message({
+            type: 'warning',
+            message: '请选择审批人!'
+          })
+          return
+        }
+        this.loading = true
+        let params = {
+          ProfessionalAudit: this.ProfessionalAudit,
+          AuditRemark: this.shenheForm.AuditorRemark
+        }
+        console.log('业务处室专业审批, 提交参数: ', params)
+        apiCert.businessOfficeSeparateAuditEntity(this.certId, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('审批提交,成功返回')
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.dialogBusinessOfficeSeparateAuditVisible = false
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      commonAuditClick () {
+        console.log('审批公共会话框')
+        this.dialogCommonAuditMakeSureVisible = true
+        this.radioChange()
+      },
+      commonAuditMakeSure () {
+        console.log('审批结果公共提交')
+        let checkRes = this.commonAuditParamsCheck()
+        console.log(checkRes, '审批结果公共提交')
+        if (!checkRes) {
+          return false
+        }
+        this.loading = true
+        let params = {
+          result: this.shenheForm.SuccessStatus,
+          AuditRemark: this.shenheForm.AuditorRemark
+        }
+        console.log('审批结果提交参数:', params)
+        apiCert.commonAuditEntity(this.certId, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('审批提交,成功返回')
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.dialogCommonAuditMakeSureVisible = false
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      commonAuditParamsCheck () {
+        if (this.shenheForm.SuccessStatus === 1) {
+          if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3' && this.formData.Status !== '5' && this.formData.Status !== '10') {
+            this.$message({
+              type: 'warning',
+              message: '审批意见不能低于20个字符!'
+            })
+            return false
+          }
+          if (this.shenheForm.AuditorRemark.trim().length < 1 && this.formData.Status === '5') {
+            this.$message({
+              type: 'warning',
+              message: '请填写审批意见!'
+            })
+            return false
+          }
+        } else {
+          if (this.shenheForm.AuditorRemark.trim().length < 5 && this.formData.Status !== '3' && this.formData.Status !== '5') {
+            this.$message({
+              type: 'warning',
+              message: '退回意见不能低于5个字符!'
+            })
+            return
+          }
+          if (this.shenheForm.AuditorRemark.trim().length < 1 && this.formData.Status === '5') {
+            this.$message({
+              type: 'warning',
+              message: '请填写退回意见!'
+            })
+            return false
+          }
+        }
+        return true
+      },
+      // 集中评审按钮
+      concentrateAuditClick () {
+        console.log('集中评审按钮')
+        this.dialogConcentrateAuditVisible = true
+        this.radioChange()
+      },
+      concentrateAuditEntityMakeSure () {
+        console.log('集中评审提交审核结果')
+        let checkRes = this.concentrateAuditParamsCheck()
+        if (!checkRes) {
+          return false
+        }
+        this.loading = true
+        let params = {
+          result: this.shenheForm.SuccessStatus,
+          AuditRemark: this.shenheForm.AuditorRemark
+        }
+        apiCert.commonAuditEntity(this.certId, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('审批提交,成功返回')
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+            this.dialogConcentrateAuditVisible = false
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      concentrateAuditParamsCheck () {
+        console.log('集中评审提交参数检查')
+        if (this.shenheForm.SuccessStatus === 1) {
+          if (this.shenheForm.AuditorRemark.trim().length < 1) {
+            this.$message({
+              type: 'warning',
+              message: '请填写审批意见!'
+            })
+            return false
+          }
+        } else {
+          if (this.shenheForm.AuditorRemark.trim().length < 1) {
+            this.$message({
+              type: 'warning',
+              message: '请填写退回意见!'
+            })
+            return false
+          }
+        }
+        return true
+      },
+      // 二级单位分办审批会话框 ⬇
+      secUnitSeparateAuditClick (val) {
+        console.log('二级单位分办审批会话框')
+        this.auditOrgChange()
+        this.btnstatus = val
+        this.getFirAuditerByDept()
+        this.changeOrgUnit(this.selectDept)
+        this.dialogSecUnitSeparateVisible = true
+      },
+      // 二级单位分办审批结果确认 ⬇
+      secUnitSeparateAuditMakeSure () {
+        console.log('二级单位分办审批结果确认')
+        this.secUnitSeparateAuditParamsCheck()
+        this.loading = true
+        let params = {
+          FirstAudit: this.auditer,
+          SecondAudit: this.fushenauditer,
+          ThirdAudit: this.selectDept,
+          AuditRemark: this.auditform.AuditRemark
+        }
+        console.log('二级单位分办审批结果提交参数:', params)
+        apiCert.separateAuditEntity(this.certId, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('审批提交,成功返回')
+            this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.dialogSecUnitSeparateVisible = false
+          this.loading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      // 二级单位分办审批参数检查 ⬇
+      secUnitSeparateAuditParamsCheck () {
+        if (this.shenheForm.SuccessStatus === 1) {
+          if (this.auditer === '') {
+            this.$message({
+              type: 'warning',
+              message: '请选择初审人!'
+            })
+            return
+          }
+          if (this.fushenauditer === '') {
+            this.$message({
+              type: 'warning',
+              message: '请选择复审人!'
+            })
+            return
+          }
+          if (![2, 4, 6].includes(parseInt(this.inStyle))) {
+            if (this.userOptions == null || this.userOptions.length === 0) {
+              this.$message({
+                type: 'warning',
+                message: '该专业科室未配置接收人!'
+              })
+              return
+            }
+          }
+          if (this.shenheForm.AuditorRemark.trim().length < 1 && this.formData.Status === '5') {
+            this.$message({
+              type: 'warning',
+              message: '请填写审批意见!'
+            })
+            return
+          }
+          if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3' && this.formData.Status !== '5' && this.formData.Status !== '10') {
+            this.$message({
+              type: 'warning',
+              message: '审批意见不能低于20个字符!'
+            })
+            return false
+          }
+        } else {
+          this.shenheForm.AuditorRemark = this.backRemark
+          if (this.shenheForm.AuditorRemark.trim().length < 5 && this.formData.Status !== '3' && this.formData.Status !== '5') {
+            this.$message({
+              type: 'warning',
+              message: '退回意见不能低于5个字符!'
+            })
+            return
+          }
+          if (this.shenheForm.AuditorRemark.trim().length < 1 && this.formData.Status === '5') {
+            this.$message({
+              type: 'warning',
+              message: '请填写退回意见!'
+            })
+            return false
+          }
+        }
+      },
       allocationBtn () {
         this.dialogAllocation = true
       },