Ver código fonte

增项审批流程

baichengfei 5 anos atrás
pai
commit
019bc31a58

+ 22 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertAppendListener.go

@@ -1,6 +1,8 @@
 package oilsupplier
 
 import (
+	msg2 "dashoo.cn/backend/api/business/msg"
+	"dashoo.cn/backend/api/business/oilsupplier/supplier"
 	"encoding/json"
 	"strconv"
 	"strings"
@@ -226,7 +228,7 @@ func (this *OilSupplierCertAppendListenerController) GetPrePayer() {
 	certSrv.UpdateEntityByIdCols(supplierCertAppendId, supplierCertAppendEntity, cols)
 
 	//创建人即为交费的人员 TODO 取值可能有问题
-	approverIds := supplierCertAppendEntity.CommitComId
+	approverIds := supplierCertAppendEntity.CreateUserId
 	this.Data["json"] = approverIds
 	this.ServeJSON()
 }
@@ -307,3 +309,22 @@ func (this *OilSupplierCertAppendListenerController) ApprovalRefuse() {
 	this.Data["json"] = 1
 	this.ServeJSON()
 }
+
+// @Title 增项申请审核未通过短信通知
+// @Description 审核未通过短信通知
+// @Success	200	{object}
+// @router /audit-reject-notice/:id [post]
+func (this *OilSupplierCertListenerController) AppendAuditRejectNotice(supplierCertAppendEntity suppliercertappend.OilSupplierCertAppend, supplierEntity supplier.OilSupplier) {
+	toMobile := supplierEntity.Mobile
+	bFlag := ""
+	if supplierCertAppendEntity.AppendType == "01" {
+		bFlag = "物资类"
+	} else if supplierCertAppendEntity.AppendType == "02" {
+		bFlag = "基建类"
+	} else {
+		bFlag = "服务类"
+	}
+	msg := "您的" + bFlag + "增项审核未通过,请及时查看!"
+	msgService := msg2.GetMsgService(utils.DBE)
+	msgService.HandleMsg(toMobile, msg, "5-1", supplierCertAppendEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertAppendEntity.CreateUserId), this.User.Username)
+}

+ 27 - 1
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercertListener.go

@@ -1,6 +1,8 @@
 package oilsupplier
 
 import (
+	msg2 "dashoo.cn/backend/api/business/msg"
+	"dashoo.cn/backend/api/business/oilsupplier/supplier"
 	"encoding/json"
 	"strconv"
 	"strings"
@@ -400,6 +402,9 @@ func (this *OilSupplierCertListenerController) ApprovalRefuse() {
 	var supplierCertEntity suppliercert.OilSupplierCert
 	certSrv.GetEntityById(supplierCertId, &supplierCertEntity)
 
+	supplierSrv := supplier.GetOilSupplierService(utils.DBE)
+	var supplierEntity supplier.OilSupplier
+	supplierSrv.GetEntityById(supplierCertEntity.SupplierId, &supplierEntity)
 	cols := []string{
 		"Id",
 		"Status",
@@ -407,7 +412,28 @@ func (this *OilSupplierCertListenerController) ApprovalRefuse() {
 	//进入此步骤,记录在数据库中
 	supplierCertEntity.Status = suppliercert.DRAFT_STATUS //重置为草稿状态
 	certSrv.UpdateEntityByIdCols(supplierCertId, supplierCertEntity, cols)
-
+	// 发送驳回通知短信
+	//this.AuditRejectNotice(supplierCertEntity, supplierEntity)
 	this.Data["json"] = 1
 	this.ServeJSON()
 }
+
+
+// @Title 准入申请审核未通过短信通知
+// @Description 审核未通过短信通知
+// @Success	200	{object}
+// @router /audit-reject-notice/:id [post]
+func (this *OilSupplierCertListenerController) AuditRejectNotice(supplierCertEntity suppliercert.OilSupplierCert, supplierEntity supplier.OilSupplier) {
+	toMobile := supplierEntity.Mobile
+	bFlag := ""
+	if supplierCertEntity.SupplierTypeCode == "01" {
+		bFlag = "物资类"
+	} else if supplierCertEntity.SupplierTypeCode == "02" {
+		bFlag = "基建类"
+	} else {
+		bFlag = "服务类"
+	}
+	msg := "您的" + bFlag + "准入申请未通过,请及时查看!"
+	msgService := msg2.GetMsgService(utils.DBE)
+	msgService.HandleMsg(toMobile, msg, "5-1", supplierCertEntity.CreateBy, supplierEntity.ContactName, strconv.Itoa(supplierCertEntity.CreateUserId), this.User.Username)
+}

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

@@ -965,7 +965,7 @@ func (this *OilSupplierCertAppendController) AppendBusinessOfficeSeparateAuditEn
 	ActiComplete.BusinessKey = supplierCertAppendEntity.BusinessKey
 	ActiComplete.UserId = this.User.Id //审批人员
 	ActiComplete.Result = "1"          //前台审批[同意、不同意]
-	ActiComplete.UserNames = ProfessionalAudit
+	ActiComplete.UserNames = ProfessionalAudit // 直接分配业务处室专业审批人
 	ActiComplete.Remarks = AuditRemark
 	ActiComplete.CallbackUrl = utils.Cfg.MustValue("workflow", "callbackHost")
 	receiveVal := svcActiviti.TaskComplete(ActiComplete)

+ 32 - 11
src/dashoo.cn/frontend_web/src/api/oilsupplier/supplierappend.js

@@ -1,34 +1,34 @@
 export default {
-  getList(CreateOn, params, myAxios) {
+  getList (CreateOn, params, myAxios) {
     return myAxios({
-      url: '/suppliercertappend/list?CreateOn='+ CreateOn,
+      url: '/suppliercertappend/list?CreateOn=' + CreateOn,
       method: 'GET',
       params: params
-    });
+    })
   },
-  getEntityById(id, myAxios) {
+  getEntityById (id, myAxios) {
     return myAxios({
-      url: '/suppliercertappend/getEntityById/'+id,
-      method: 'GET',
+      url: '/suppliercertappend/getEntityById/' + id,
+      method: 'GET'
     })
   },
-  addEntity(formData, myAxios) {
+  addEntity (formData, myAxios) {
     return myAxios({
       url: '/suppliercertappend/add',
       method: 'post',
       data: formData
     })
   },
-  updateEntity(entityId, formData, myAxios) {
+  updateEntity (entityId, formData, myAxios) {
     return myAxios({
-      url: '/suppliercertappend/update/'+entityId,
+      url: '/suppliercertappend/update/' + entityId,
       method: 'post',
       data: formData
     })
   },
-  deleteEntity(entityId, myAxios) {
+  deleteEntity (entityId, myAxios) {
     return myAxios({
-      url: '/suppliercertappend/delete/'+entityId,
+      url: '/suppliercertappend/delete/' + entityId,
       method: 'delete'
     })
   },
@@ -47,6 +47,13 @@ export default {
       params: params
     })
   },
+  companyAuditEntity (entityId, params, myAxios) {
+    return myAxios({
+      url: '/suppliercertappend/company-audit/' + entityId,
+      method: 'post',
+      params: params
+    })
+  },
   // 二级分办单位提交审批
   SeparateUnitAuditEntity (entityId, params, myAxios) {
     return myAxios({
@@ -55,6 +62,20 @@ export default {
       params: params
     })
   },
+  commonAuditEntity (id, params, myAxios) {
+    return myAxios({
+      url: 'suppliercertappend/common-audit/' + id,
+      method: 'post',
+      params: params
+    })
+  },
+  businessOfficeSeparateAuditEntity (id, params, myAxios) {
+    return myAxios({
+      url: 'suppliercertappend/business-separate-audit/' + id,
+      method: 'post',
+      params: params
+    })
+  },
   auditEntityFir (entityId, params, shenheform, myAxios) {
     return myAxios({
       url: '/suppliercertappend/auditEntityFir/' + entityId,

+ 10 - 11
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/basisdataopera.vue

@@ -465,7 +465,7 @@
                 <el-table-column prop="FileUrlList" label="变更后文件" show-overflow-tooltip>
                   <template slot-scope="scope">
 
-                    
+
                   <viewer :images="scope.row.FileUrlList">
                     <div v-for="(tmpUrl,index) in scope.row.FileUrlList" :key="index" style="vertical-align: middle;	text-align: center;">
                       <el-link :href="'http://'+fileurlcut(scope.row.FileUrl, index)" target="_blank" type="primary"
@@ -1728,21 +1728,20 @@ import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
           console.error(err)
         })
       },
-      imgFormat(val,index){
-         console.log(val)
-        if(val !=null && val != undefined && val !=''){
+      imgFormat (val, index) {
+        if (val != null && val != undefined && val != '') {
           let fileurlall = val.split('$')[index]
           let fileurl = fileurlall.split('|')
-          if(fileurl[1] != null && fileurl[1] !='' && fileurl[1] != undefined){
-            let Format  = fileurl[1].split(".")
-            if(Format[1]!=null && Format[1] !='' && Format[1] != undefined){
-               let pictureFormat = Format[1];
-              if("jpg"== pictureFormat || "bmp" ==pictureFormat || "png" ==pictureFormat || "gif" ==pictureFormat|| "jpeg" ==pictureFormat){
-                return false;
+          if (fileurl[1] != null && fileurl[1] != '' && fileurl[1] != undefined) {
+            let Format = fileurl[1].split('.')
+            if (Format[1] != null && Format[1] != '' && Format[1] != undefined) {
+              let pictureFormat = Format[1]
+              if (pictureFormat == 'jpg' || pictureFormat =='bmp' || pictureFormat =='png' || pictureFormat == 'gif' || pictureFormat == 'jpeg') {
+                return false
               }
             }
           }
-          return true;
+          return true
         }
       },
       fileurlcut (val, index) {

+ 288 - 24
src/dashoo.cn/frontend_web/src/pages/oilsupplier/addtionaudit/_opera/goodsdataopera.vue

@@ -22,9 +22,13 @@
             <!-- <el-button slot="reference" plain size="mini" style="margin-right: 8px">查看进度</el-button> -->
           </el-popover>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="itemsshow">查看变更项</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="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="this.formData.Status == '10'">分办</el-button>
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批1流程</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="AuditEntity" v-if="auditBtn && this.formData.Status != '6'">1{{auditTitle}}</el-button>-->
           <el-button type="primary" size="mini" style="margin-left: 8px;"  onclick="window.history.go(-1)">返回</el-button>
         </span>
       </div>
@@ -628,32 +632,53 @@
           <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder">
           </el-input>
         </el-form-item>
-        <!-- <el-form-item :label="aduitlabel"
-          v-if="this.formData.Status != '2' && this.formData.Status != '4' && this.formData.Status !== '5' ">
-          <el-select ref="selectAuditer" v-model="auditer" placeholder="请选择" style="width: 100%" filterable allow-create
-            default-first-option>
-            <el-option v-for="item in secauditerOptions" :key="item.id" :label="item.realname" :value="item.id">
-            </el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="专业科室" v-if="this.formData.Status == '1'">
-          <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
-            style="width: 100%" v-model="majorDept" placeholder="请选择组织">
-          </el-cascader>
-        </el-form-item> -->
-
-
       </el-form>
       <div slot="footer" class="dialog-footer" style="margin-top: -25px">
         <el-button size="small" @click="dialogMakeSure2 = false">取 消</el-button>
         <el-button type="primary" size="small" @click="makeSure()" :loading="btnloading">确 定</el-button>
       </div>
     </el-dialog>
-    <el-dialog title="分配" :visible.sync="dialogAllocation">
+    <el-dialog title="审核" :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 label="意见" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder">
+          </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="btnloading">确 定</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: 100%" filterable allow-create-->
+    <!--        default-first-option>-->
+    <!--        <el-option v-for="item in secauditerOptions" :key="item.Id" :label="item.Realname" :value="item.Id">-->
+    <!--        </el-option>-->
+    <!--      </el-select>-->
+    <!--    </el-form-item>-->
+    <!--    <el-form-item label="意见">-->
+    <!--      <el-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="dialogAllocation = false">取 消</el-button>-->
+    <!--    <el-button type="primary" size="small" @click="makeSure()" :loading="btnloading">确 定</el-button>-->
+    <!--  </div>-->
+    <!--</el-dialog>-->
+    <el-dialog title="分配" :visible.sync="dialogBusinessOfficeSeparateAuditVisible">
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
         <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>
@@ -663,8 +688,27 @@
         </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="btnloading">确 定</el-button>
+        <el-button size="small" @click="dialogBusinessOfficeSeparateAuditVisible = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="businessOfficeSeparateAuditMakeSure()" :loading="btnloading">确 定</el-button>
+      </div>
+    </el-dialog>
+    <el-dialog title="集中评审" :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="btnloading">确 定</el-button>
       </div>
     </el-dialog>
     <el-dialog title="提交初审" :visible.sync="dialogVisible" width="520px">
@@ -839,9 +883,13 @@
         allorgunitOptions: [],
         userOptions: [],
         selectDept: 100000071,
+        ProfessionalAudit: '',
         dialogMakeSure: false,
         dialogAllocation: false,
         dialogMakeSure2: false,
+        dialogCommonAuditMakeSureVisible: false,
+        dialogBusinessOfficeSeparateAuditVisible: false,
+        dialogConcentrateAuditVisible: false,
         aduitlabel: '审核人',
         auditer: '',
         auditerName: '',
@@ -1268,18 +1316,235 @@
       AuditEntity () {
         this.auditOrgChange()
         if (this.formData.Status === '3') {
+          console.log('11')
           this.dialogAllocation = true
         } else if (this.formData.Status === '1') {
+          console.log('22')
           this.dialogMakeSure2 = true
         } else if (this.formData.Status === '10') {
+          console.log('33')
           this.getFirAuditerByDept()
           this.changeOrgUnit(this.selectDept)
           this.dialogVisible = true
         } else {
+          console.log('44')
           this.dialogMakeSure = true
           this.radioChange()
         }
       },
+      // 分办之后的各级审批  --审批 包含:二级单位初审、复审, 业务处室专业审核
+      commonAuditClick () {
+        console.log('审批公共会话框')
+        this.dialogCommonAuditMakeSureVisible = true
+        this.radioChange()
+      },
+      commonAuditMakeSure () {
+        let checkRes = this.commonAuditParamsCheck()
+        console.log('审批结果公共提交,参数检查结果', checkRes)
+        if (!checkRes) {
+          return false
+        }
+        this.btnloading = true
+        let params = {
+          result: this.shenheForm.SuccessStatus,
+          AuditRemark: this.shenheForm.AuditorRemark
+        }
+        console.log('审批结果提交参数:', params)
+        api2.commonAuditEntity(this.formData.Id, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('审批提交,成功返回')
+            // this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+            this.$router.push('/')
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.dialogCommonAuditMakeSureVisible = false
+          this.btnloading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      commonAuditParamsCheck () {
+        if (this.shenheForm.SuccessStatus === 1) {
+          if ((!this.auditer || this.auditer === 0) && (this.formData.Status == '0' || this.formData.Status == '10' || this.formData.Status == '3')) {
+            this.$message({
+              type: 'warning',
+              message: '请选择审核人!'
+            })
+            return
+          }
+          if (this.formData.Status == '10') {
+            if (!this.fushenauditer || this.fushenauditer === 0) {
+              this.$message({
+                type: 'warning',
+                message: '请选择复审人!'
+              })
+              return
+            }
+            if ((this.formData.InStyle != '2' && this.formData.InStyle != '6' && this.formData.InStyle != '4') && (this.formData.inStyle == '3' && this.MgrUnit)) {
+              if (this.selectDept === 0 || this.selectDept == '') {
+                this.$message({
+                  type: 'warning',
+                  message: '请选择专业处室!'
+                })
+                return
+              }
+            }
+            if ((this.formData.InStyle != '2' && this.formData.InStyle != '6' && this.formData.InStyle != '4') && (this.formData.inStyle == '3' && this.MgrUnit)) {
+              if (this.userOptions == null || this.userOptions.length === 0) {
+                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
+          }
+          if (this.shenheForm.AuditorRemark.trim().length < 1 && this.formData.Status === '5') {
+            this.$message({
+              type: 'warning',
+              message: '请填写审批意见!'
+            })
+            return false
+          }
+        } else {
+          if (this.formData.Status === '10') {
+            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
+          }
+        }
+        return true
+      },
+      // 专业处室分办审批
+      businessOfficeSeparateAuditClick () {
+        console.log('专业处室分办审批提交按钮')
+        this.auditOrgChange()
+        console.log('请求部门结束')
+        this.dialogBusinessOfficeSeparateAuditVisible = true
+      },
+      businessOfficeSeparateAuditMakeSure () {
+        if (this.ProfessionalAudit === '') {
+          this.$message({
+            type: 'warning',
+            message: '请选择审批人!'
+          })
+          return
+        }
+        let params = {
+          ProfessionalAudit: this.ProfessionalAudit,
+          AuditRemark: this.shenheForm.AuditorRemark
+        }
+        this.btnloading = true
+        console.log('业务处室专业审批, 提交参数: ', params)
+        api2.businessOfficeSeparateAuditEntity(this.formData.Id, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log('审批提交,成功返回')
+            // this.initDatas()
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+            this.$router.push('/')
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.dialogBusinessOfficeSeparateAuditVisible = false
+          this.btnloading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      // 集中评审按钮
+      concentrateAuditClick () {
+        console.log('集中评审按钮')
+        this.dialogConcentrateAuditVisible = true
+        this.radioChange()
+      },
+      concentrateAuditEntityMakeSure () {
+        console.log('集中评审提交审核结果')
+        let checkRes = this.concentrateAuditParamsCheck()
+        if (!checkRes) {
+          return false
+        }
+        this.btnloading = true
+        let params = {
+          result: this.shenheForm.SuccessStatus,
+          AuditRemark: this.shenheForm.AuditorRemark
+        }
+        api2.commonAuditEntity(this.formData.Id, 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
+            this.$router.push('/')
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.btnloading = 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
+      },
       getDictOptions () {
         let params = {
           status: this.formData.Status,
@@ -1800,7 +2065,6 @@
         })
       },
       imgFormat (val, index) {
-        console.log(val)
         if (val != null && val != undefined && val !='') {
           let fileurlall = val.split('$')[index]
           let fileurl = fileurlall.split('|')

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

@@ -513,7 +513,7 @@
                    @click="dialogVisibleCom = false">取 消</el-button>
         <el-button size="mini"
                    type="primary"
-                   @click="companySubmitToSecUnitSeparate" :loading="loading">确定</el-button>
+                   @click="companySubmitToSecUnitSeparateMakeSure" :loading="loading">确定</el-button>
       </span>
     </el-dialog>
 
@@ -1892,7 +1892,7 @@ export default {
         console.error(err)
       })
     },
-    companySubmitToSecUnitSeparate () {
+    companySubmitToSecUnitSeparateMakeSure () {
       if (this.orgauditOptions == null || this.orgauditOptions.length === 0) {
         this.$message({
           type: 'warning',

+ 56 - 43
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierappend/_opera/goodsdataopera.vue

@@ -28,9 +28,9 @@
                      v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5" @click="saveinfochange">保存
           </el-button>
           <el-button type="primary" size="mini" style="margin-right: 8px" @click="separateUnitSubmitClick"
-            v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 0">提交审核
+            v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 0">提交1审核
           </el-button>
-          <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitfenban"
+          <el-button type="primary" size="mini" style="margin-right: 8px" @click="comSubmitToSeparateUnitClick"
             v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 1">提交
           </el-button>
           <router-link :to="'/oilsupplier/supplierappend/goodslist'">
@@ -663,7 +663,7 @@
                 <el-button type="primary" size="mini" style="margin-right: 8px" @click="separateUnitSubmitClick"
                            v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 0">提交审核
                 </el-button>
-                <el-button type="primary" size="mini" style="margin-right: 8px" @click="commitfenban"
+                <el-button type="primary" size="mini" style="margin-right: 8px" @click="comSubmitToSeparateUnitClick"
                            v-if="formData.Id !='' && formData.Status <= 0 && formData.Status != -5 && IsCompanyUser == 1">提交
                 </el-button>
               </div>
@@ -1027,7 +1027,7 @@
       </el-form>
       <span slot="footer" class="dialog-footer">
         <el-button size="mini" @click="dialogComSubmitToSeparateUnitVisible = false">取 消</el-button>
-        <el-button size="mini" type="primary" @click="SubpEntity" :loading="btnloading">确定</el-button>
+        <el-button size="mini" type="primary" @click="companySubmitToSecUnitSeparate" :loading="btnloading">确定</el-button>
       </span>
     </el-dialog>
 
@@ -2181,10 +2181,9 @@
         this.changeOrgUnit(this.selectDept)
         this.AuditdialogShow = true
       },
-      commitfenban () {
+      comSubmitToSeparateUnitClick () {
         this.dialogComSubmitToSeparateUnitVisible = true
       },
-
       // 根据分类Id获取Code
       getCodeById (Id) {
         let _this = this
@@ -2638,21 +2637,20 @@
       //       console.error(err)
       //     })
       // },
-       imgFormat(val,index){
-         console.log(val)
-        if(val !=null && val != undefined && val !=''){
+      imgFormat (val, index) {
+        if (val != null && val != undefined && val != '') {
           let fileurlall = val.split('$')[index]
           let fileurl = fileurlall.split('|')
-          if(fileurl[1] != null && fileurl[1] !='' && fileurl[1] != undefined){
-            let Format  = fileurl[1].split(".")
-            if(Format[1]!=null && Format[1] !='' && Format[1] != undefined){
-               let pictureFormat = Format[1];
-              if("jpg"== pictureFormat || "bmp" ==pictureFormat || "png" ==pictureFormat || "gif" ==pictureFormat|| "jpeg" ==pictureFormat){
-                return false;
+          if (fileurl[1] != null && fileurl[1] != '' && fileurl[1] != undefined) {
+            let Format = fileurl[1].split('.')
+            if (Format[1] != null && Format[1] != '' && Format[1] != undefined) {
+              let pictureFormat = Format[1]
+              if (pictureFormat == 'jpg' || pictureFormat == 'bmp' || pictureFormat == 'png' || pictureFormat == 'gif' || pictureFormat == 'jpeg') {
+                return false
               }
             }
           }
-          return true;
+          return true
         }
       },
       fileurlcut (val, index) {
@@ -3308,8 +3306,11 @@
       // 二级分办单位提交审批
       separateUnitSubmitAuditMakeSure () {
         console.log('二级分办单位,确认提交审批')
+        let checkRes = this.separateUnitSubmitAuditParamsCheck()
+        if (!checkRes) {
+          return false
+        }
         this.btnloading = true
-        this.separateUnitSubmitAuditParamsCheck()
         let params = {
           firstAudit: this.auditer,
           SecondAudit: this.fushenauditer,
@@ -3343,7 +3344,7 @@
             type: 'warning',
             message: '没有新增准入项,不能提交!'
           })
-          return false
+          return
         }
         for (let idx in this.subfileList1) {
           if (this.subfileList1[idx].OldFileUrl === '' && this.subfileList1[idx].FileUrl === '') {
@@ -3386,8 +3387,43 @@
             return false
           }
         }
+        return true
       },
-      SubpEntity () {
+      // 企业用户自行提交审批
+      companySubmitToSecUnitSeparate () {
+        let checkRes = this.companySubmitToSecUnitParamsCheck
+        if (!checkRes) {
+          return false
+        }
+        this.btnloading = true
+        // this.auditform.FirstAuditName = this.UnitOrg
+        // this.auditform.CertId = this.formData.Id
+        // this.auditform.TypeCode = '01'
+        let params = {
+          UnitId: this.UnitOrg,
+          AuditRemark: this.auditform.AuditRemark
+        }
+        api2.companyAuditEntity(this.formData.Id, params, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            // 保存成功后,初始化数据,变成修改
+            this.getEntityById()
+            this.dialogComSubmitToSeparateUnitVisible = false
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            })
+          }
+          this.btnloading = false
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      companySubmitToSecUnitParamsCheck () {
         if (this.myentityList == null || this.myentityList.length <= 0) {
           this.$message({
             type: 'warning',
@@ -3418,31 +3454,8 @@
           })
           return
         }
-        this.auditform.FirstAuditName = this.UnitOrg
-        this.auditform.CertId = this.formData.Id
-        this.auditform.TypeCode = '01'
-        this.btnloading = true
-        api2.auditEntity(this.formData.Id, this.auditform, this.$axios).then(res => {
-          if (res.data.code === 0) {
-            // 保存成功后,初始化数据,变成修改
-            this.getEntityById()
-            this.dialogComSubmitToSeparateUnitVisible = false
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            })
-          } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            })
-          }
-          this.btnloading = false
-        }).catch(err => {
-          console.error(err)
-        })
+        return true
       },
-
       getorgtreelist () {
         let _this = this
         let params = {

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

@@ -2321,7 +2321,6 @@
           })
       },
        imgFormat(val,index){
-         console.log(val)
         if(val !=null && val != undefined && val !=''){
           let fileurlall = val.split('$')[index]
           let fileurl = fileurlall.split('|')