Browse Source

审批流程配置

lining 6 years ago
parent
commit
69b2c92249

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

@@ -160,7 +160,9 @@ func (this *QualChangeController) GetMyTaskEntityList() {
 		}
 	}
 	certIdList = strings.Join(appendIdarr, ",")
-	where += " and Id in (" + certIdList + ")"
+	if certIdList != "" {
+		where += " and Id in (" + certIdList + ")"
+	}
 	where += " and Status != -2 "
 
 	svc := qualchange.GetQualChangeService(utils.DBE)

+ 31 - 9
src/dashoo.cn/backend/api/controllers/oilsupplier/supplier.go

@@ -1838,20 +1838,22 @@ func (this *OilSupplierController) CanUpdateSupplier() {
 	}
 }
 
-// @Title 获取二级审人员
-// @Description 获取二级审人员
+// @Title 获取二级审人员
+// @Description 获取二级审人员
 // @router /getauditerbydept/:deptId [get]
 func (this *OilSupplierController) GetAuditerByDept() {
 	Id := this.Ctx.Input.Param(":deptId")
 	auditstepcode := this.GetString("auditstepcode")
-
-	var org organize.Base_Organize
 	svc := organize.GetOrganizeService(utils.DBE)
-	has := svc.GetEntityById(Id, &org)
-	ids := Id
-	if has && org.Category == "unit" {
-		ids = svc.GetAllChildById(Id)
-	}
+	unitId := svc.GetMyUnitDepartmentId(Id)
+	ids := svc.GetAllChildById(unitId)
+	//var org organize.Base_Organize
+	//svc := organize.GetOrganizeService(utils.DBE)
+	//has := svc.GetEntityById(Id, &org)
+	//ids := Id
+	//if has && org.Category == "unit" {
+	//	ids = svc.GetAllChildById(Id)
+	//}
 	//var auditWorkflow []auditsetting.Base_OilAuditSetting
 	//rsvc := auditsetting.GetOilAuditSettingService(utils.DBE)
 	//rsvc.GetAuditStepRoleEntity(OilAuditSettingName, Id, workflow.FIRST_TRIAL, &auditWorkflow)
@@ -1873,6 +1875,26 @@ func (this *OilSupplierController) GetAuditerByDept() {
 	this.ServeJSON()
 }
 
+// @Title 获取二级初审人员
+// @Description 获取二级初审人员
+// @router /getfirauditerbydept/:deptId [get]
+func (this *OilSupplierController) GetFirAuditerByDept() {
+	Id := this.Ctx.Input.Param(":deptId")
+	auditstepcode := this.GetString("auditstepcode")
+
+	svc := organize.GetOrganizeService(utils.DBE)
+
+	ids := svc.GetAllChildById(Id)
+
+	certSrv := suppliercert.GetOilSupplierCertService(utils.DBE)
+	var users []userRole.Base_RoleList
+	certSrv.GetAuditUser(ids, auditstepcode, &users)
+	var datainfo ErrorDataInfo
+	datainfo.Item = users
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
 // @Title 获取二级复审人员根据初审人员
 // @Description 获取二级复审人员根据初审人员
 // @router /getauditerbyfirst/:firstId [get]

+ 4 - 2
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -5,6 +5,7 @@ import (
 	"dashoo.cn/backend/api/business/codecsequence"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
 	"dashoo.cn/backend/api/business/paymentinfo"
+	"dashoo.cn/business2/items"
 	"encoding/json"
 	"fmt"
 	"strconv"
@@ -872,9 +873,10 @@ func (this *OilSupplierCertController) AuditEntityFir() {
 		//var users []suppliercert.UserList
 		//where := "OrganizeId=100000178 and AuditStepCode='" + workflow.PROF_REGULATION + "'"
 		//certSrv.GetEntitysByWhere(OilAuditSettingName,where, &users)
-
+		dictSvc := items.GetItemsService(utils.DBE)
+		deptIds := dictSvc.GetKeyValueItems("CENT_AUDIT")
 		var users []userRole.Base_RoleList
-		certSrv.GetAuditUser("100000178", workflow.PROF_REGULATION, &users)
+		certSrv.GetAuditUser(deptIds[0].Value, workflow.PROF_REGULATION, &users)
 
 		for _, tmpUser := range users {
 			userIds += strconv.FormatInt(tmpUser.Id, 10) + ","

+ 37 - 11
src/dashoo.cn/backend/api/controllers/oilsupplier/todolist.go

@@ -81,7 +81,10 @@ func (this *TodoListController) GetMyTaskEntityList() {
 		}
 	}
 	certIdList = strings.Join(certIdarr, ",")
-	where += " and b.Id in (" + certIdList + ")"
+	if certIdList != "" {
+		where += " and b.Id in (" + certIdList + ")"
+	}
+
 	//根据部门查询待办任务
 
 	svc := supplier.GetOilSupplierService(utils.DBE)
@@ -111,7 +114,10 @@ func (this *TodoListController) GetMyTaskEntityList() {
 		}
 	}
 	appendIdList = strings.Join(appendIdarr, ",")
-	whereapp += " and b.Id in (" + appendIdList + ")"
+	if appendIdList != "" {
+		whereapp += " and b.Id in (" + appendIdList + ")"
+	}
+
 
 	var listapp []suppliercertappend.OilSupplierCertAppendTodo
 	svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
@@ -138,7 +144,9 @@ func (this *TodoListController) GetMyTaskEntityList() {
 		}
 	}
 	certIdList = strings.Join(annuIdarr, ",")
-	whereannu += " and Id in (" + certIdList + ")"
+	if certIdList != "" {
+		whereannu += " and Id in (" + certIdList + ")"
+	}
 	//根据部门查询待办任务
 	whereannu += " and Status != 2 "
 	svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listannu, whereannu)
@@ -163,8 +171,9 @@ func (this *TodoListController) GetMyTaskEntityList() {
 		}
 	}
 	certIdList = strings.Join(appendIdarr, ",")
-	whereInfo += " and Id in (" + certIdList + ")"
-
+	if certIdList != "" {
+		whereInfo += " and Id in (" + certIdList + ")"
+	}
 	var listInfo []infochange.OilInfoChange
 	svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listInfo, whereInfo)
 	for _, item :=range listInfo {
@@ -187,7 +196,10 @@ func (this *TodoListController) GetMyTaskEntityList() {
 		}
 	}
 	certIdList = strings.Join(appendIdarr, ",")
-	wherequal :=  "Id in (" + certIdList + ")"
+	wherequal := "1=1 "
+	if certIdList != "" {
+		wherequal += " and Id in (" + certIdList + ")"
+	}
 	wherequal += " and Status != -2 "
 
 	var listqual []qualchange.OilQualChangeMain
@@ -271,7 +283,10 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 		}
 	}
 	certIdList = strings.Join(certIdarr, ",")
-	where += " and b.Id in (" + certIdList + ")"
+	if certIdList != "" {
+		where += " and b.Id in (" + certIdList + ")"
+	}
+
 	//根据部门查询待办任务
 
 	svc := supplier.GetOilSupplierService(utils.DBE)
@@ -301,7 +316,10 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 		}
 	}
 	appendIdList = strings.Join(appendIdarr, ",")
-	whereapp += " and b.Id in (" + appendIdList + ")"
+	if appendIdList != "" {
+		whereapp += " and b.Id in (" + appendIdList + ")"
+	}
+
 
 	var listapp []suppliercertappend.OilSupplierCertAppendTodo
 	svcapp := suppliercertappend.GetOilSupplierCertAppendService(utils.DBE)
@@ -328,7 +346,10 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 		}
 	}
 	certIdList = strings.Join(annuIdarr, ",")
-	whereannu += " and Id in (" + certIdList + ")"
+	if certIdList != "" {
+		whereannu += " and Id in (" + certIdList + ")"
+	}
+
 	//根据部门查询待办任务
 	whereannu += " and Status != 2 "
 	svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listannu, whereannu)
@@ -353,7 +374,9 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 		}
 	}
 	certIdList = strings.Join(appendIdarr, ",")
-	whereInfo += " and Id in (" + certIdList + ")"
+	if certIdList != "" {
+		whereInfo += " and Id in (" + certIdList + ")"
+	}
 
 	var listInfo []infochange.OilInfoChange
 	svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size, orderby, asc, &listInfo, whereInfo)
@@ -377,7 +400,10 @@ func (this *TodoListController) GetMyTaskFinishedList() {
 		}
 	}
 	certIdList = strings.Join(appendIdarr, ",")
-	wherequal :=  "Id in (" + certIdList + ")"
+	wherequal := "1=1 "
+	if certIdList != "" {
+		wherequal += " and Id in (" + certIdList + ")"
+	}
 	wherequal += " and Status != -2 "
 
 	var listqual []qualchange.OilQualChangeMain

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

@@ -61,7 +61,9 @@ func (this *WorkflowController) UserList() {
 	svc := permission.GetPermissionService(utils.DBE)
 	var users []userRole.Base_User
 
-	where := "IsVisible=1 and AccCode='" + this.User.AccCode + "' "
+
+
+	where := "IsVisible=1"
 	if keyword != "" {
 		where = where + " and Realname like '%" + keyword + "%'"
 	}
@@ -74,6 +76,30 @@ func (this *WorkflowController) UserList() {
 	this.ServeJSON()
 }
 
+// @Title 获取所有用户Post
+// @Description get user by token
+// @Success 200 {object} models.User
+// @router /userlist_post [post]
+func (this *WorkflowController) UserListByPost() {
+	userIds :=  this.GetString("userids")//this.Ctx.Input.Param(":userIds")
+	svc := permission.GetPermissionService(utils.DBE)
+	var users []userRole.Base_User
+
+
+
+	where := "IsVisible=1"
+	if userIds != "" {
+		where = where + " and Id in (" + userIds + ")"
+	}
+	total := svc.GetPagingEntitiesWithOrder(1, 1000, "Id", false, &users, where)
+
+	var datainfo DataInfo
+	datainfo.Items = users
+	datainfo.CurrentItemCount = total
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
 // @Title get
 // @Description get SampleType by token
 // @Success 200 {object} samplesubpackage.SampleSubpackage

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

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

+ 1 - 1
src/dashoo.cn/frontend_web/src/components/oilsupplier/chooseauditor.vue

@@ -153,7 +153,7 @@
         let deptid = data.id
         this.userOptions = []
         let auditstepcode = 'FIRST_TRIAL' // 初审人
-        supapi.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+        supapi.getFirAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
           this.userOptions = res.data.item
           if (res.data.item != null && res.data.item.length > 0) {
             this.AuditorForm.UserId = res.data.item[0].id

+ 22 - 8
src/dashoo.cn/frontend_web/src/components/workflow/wfhistory.vue

@@ -53,7 +53,7 @@
       entryinfo: {}
     },
     created () {
-      this.getuserlist()
+      this.getHistoryTask()
     },
     computed: {
       ...mapGetters({
@@ -63,7 +63,7 @@
     watch: {
       entryinfo: {
         handler: function (newVal, oldVal) {
-          this.getuserlist()
+          this.getHistoryTask()
         },
         deep: true
       }
@@ -77,11 +77,13 @@
         instance: '',
         selfVisible: this.visible, // 避免vue双向绑定警告
         historyTask: [],
+        tmp_historyTask: [],
         userlist: [],
       }
     },
     methods: {
       getHistoryTask() {
+        this.tmp_historyTask = []
         let _this = this
         const params = {
           process: _this.entryinfo.process,
@@ -92,7 +94,17 @@
           params
         })
           .then(res => {
-            _this.historyTask = res.data.items
+            this.tmp_historyTask = res.data.items
+            let useridstr = ''
+            for (let i = 0; i < this.tmp_historyTask.length; i++) {
+              if (this.tmp_historyTask[i].users !== '') {
+                useridstr = useridstr + this.tmp_historyTask[i].users + ','
+              }
+            }
+            if (useridstr) {
+              useridstr = useridstr.substring(0, useridstr.length - 1)
+            }
+            this.getuserlist(useridstr)
           })
           .catch(err => {
             // handle error
@@ -122,13 +134,15 @@
         }
         return userNames;
       },
-      getuserlist() {
-        let _this = this
-        _this.$axios.get('workflow/userlist', {})
+      getuserlist (val) {
+        // let params = {
+        //   userids: val
+        // }
+        this.$axios.post('workflow/userlist_post?userids=' + val)
           .then(res => {
             // response
-            _this.userlist = res.data.items
-            this.getHistoryTask()
+            this.userlist = res.data.items
+            this.historyTask = this.tmp_historyTask
           })
           .catch(err => {
             // handle error

+ 18 - 8
src/dashoo.cn/frontend_web/src/components/workflow/wfmultihistory.vue

@@ -53,7 +53,7 @@
       entryinfo: {}
     },
     created () {
-      this.getuserlist()
+      this.getHistoryTask()
     },
     computed: {
       ...mapGetters({
@@ -63,7 +63,7 @@
     watch: {
       entryinfo: {
         handler: function (newVal, oldVal) {
-          this.getuserlist()
+          this.getHistoryTask()
         },
         deep: true
       }
@@ -108,7 +108,18 @@
           params
         })
           .then(res => {
-            _this.historyTask = res.data.items
+            // _this.historyTask = res.data.items
+            this.tmp_historyTask = res.data.items
+            let useridstr = ''
+            for (let i = 0; i < this.tmp_historyTask.length; i++) {
+              if (this.tmp_historyTask[i].users !== '') {
+                useridstr = useridstr + this.tmp_historyTask[i].users + ','
+              }
+            }
+            if (useridstr) {
+              useridstr = useridstr.substring(0, useridstr.length - 1)
+            }
+            this.getuserlist(useridstr)
           })
           .catch(err => {
             // handle error
@@ -138,13 +149,12 @@
         }
         return userNames;
       },
-      getuserlist() {
-        let _this = this
-        _this.$axios.get('workflow/userlist', {})
+      getuserlist (val) {
+        this.$axios.post('workflow/userlist_post?userids=' + val)
           .then(res => {
             // response
-            _this.userlist = res.data.items
-            this.getHistoryTask()
+            this.userlist = res.data.items
+            this.historyTask = this.tmp_historyTask
           })
           .catch(err => {
             // handle error

+ 36 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue

@@ -256,7 +256,7 @@
             </el-form-item>
             <el-form-item label="专业处室">
               <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
-                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室">
+                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">
               </el-cascader>
             </el-form-item>
           </el-col>
@@ -379,6 +379,7 @@
         IsCompanyUser: 0,
         fushenauditer: '', //复审人员
         majorDept: [100000000, 100000128, 100000151],
+        userOptions: [],
         dialogVisible: false,
         dialogVisibleCom: false,
         canUpdateSupplier: true,
@@ -576,8 +577,19 @@
       } else {
         this.initDatas()
       }
+      this.orgtreeChange(this.majorDept)
     },
     methods: {
+      orgtreeChange(val) {
+        this.userOptions = []
+        let deptid = val[val.length - 1]
+        let auditstepcode = 'PROF_RECE'
+        api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+          this.userOptions = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       inputCompany(val) {
         if (!this.certId) { // 已经关联到子表了,就不能再切换主表ID了
           api.getEntityByName(val, this.$axios).then(res => {
@@ -983,10 +995,31 @@
         this.auditOrgChang(this.auditer)
       },
       AuditEntity(val) {
-        if (this.auditer === '') {
+        if (this.auditer === "") {
+          this.$message({
+            type: "warning",
+            message: "请选择初审人!"
+          })
+          return
+        }
+        if (this.fushenauditer === "") {
+          this.$message({
+            type: "warning",
+            message: "请选择复审人!"
+          })
+          return
+        }
+        if (this.majorDept.length === 0) {
+          this.$message({
+            type: "warning",
+            message: "请选择专业处室!"
+          })
+          return
+        }
+        if (this.userOptions == null || this.userOptions.length === 0) {
           this.$message({
             type: 'warning',
-            message: '请选择审批人!'
+            message: '该专业科室未配置接收人!'
           })
           return
         }

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

@@ -356,7 +356,7 @@
             </el-form-item>
             <el-form-item label="专业处室">
               <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
-                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室">
+                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">
               </el-cascader>
             </el-form-item>
           </el-col>
@@ -480,7 +480,7 @@
         activeName: "0",
         fushenauditer: '', //复审人员
         majorDept: [100000000, 100000001, 100000071], //专业可是
-        chooseAuditorVisible: false,
+        userOptions: [],
         dialogVisibleCom: false,
         showReturn: 1,
         IsCompanyUser: 0,
@@ -683,8 +683,19 @@
         this.initDatas();
       }
       this.isAccess()
+      this.orgtreeChange(this.majorDept)
     },
     methods: {
+      orgtreeChange(val) {
+        this.userOptions = []
+        let deptid = val[val.length - 1]
+        let auditstepcode = 'PROF_RECE'
+        api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+          this.userOptions = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       isAccess() {
         apiCert.isAccess('PROF_REGULATION', this.$axios).then(res => {
           this.createBtn = res.data
@@ -1160,10 +1171,31 @@
         this.auditOrgChang(this.auditer)
       },
       AuditEntity(val) {
-        if (this.auditer === "" || this.fushenauditer === "" || this.majorDept === "") {
+        if (this.auditer === "") {
+          this.$message({
+            type: "warning",
+            message: "请选择初审人!"
+          })
+          return
+        }
+        if (this.fushenauditer === "") {
+          this.$message({
+            type: "warning",
+            message: "请选择复审人!"
+          })
+          return
+        }
+        if (this.majorDept.length === 0) {
           this.$message({
             type: "warning",
-            message: "请选择审批人!"
+            message: "请选择专业处室!"
+          })
+          return
+        }
+        if (this.userOptions == null || this.userOptions.length === 0) {
+          this.$message({
+            type: 'warning',
+            message: '该专业科室未配置接收人!'
           })
           return
         }

+ 35 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -255,7 +255,7 @@
             </el-form-item>
             <el-form-item label="专业处室">
               <el-cascader :options="orgtreelist" :props="orgtreeprops" :show-all-levels="false" filterable
-                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室">
+                style="width: 100%" v-model="majorDept" placeholder="请选择专业处室" @change="orgtreeChange">
               </el-cascader>
             </el-form-item>
           </el-col>
@@ -381,6 +381,7 @@
         canUpdateSupplier: true,
         fushenauditer: '', //复审人员
         majorDept: [],
+        userOptions: [],
         secauditerOptions: [],
         dialogVisibleCom: false,
         dictData: null,
@@ -574,8 +575,19 @@
       } else {
         this.initDatas()
       }
+      this.orgtreeChange(this.majorDept)
     },
     methods: {
+      orgtreeChange(val) {
+        this.userOptions = []
+        let deptid = val[val.length - 1]
+        let auditstepcode = 'PROF_RECE'
+        api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+          this.userOptions = res.data.item
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       inputCompany(val) {
         if (!this.certId) {
           api.getEntityByName(val, this.$axios).then(res => {
@@ -740,6 +752,7 @@
         api.getDictListByStatus(params, this.$axios).then(res => {
           this.dictData = res.data.items
           this.organizeOption = res.data.items['Organizes']
+          this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
           /* this.UnitRelationOptions = res.data.items['UnitRelation']
           this.getCityList(res.data.items['GaodeMapChinaAreas'])
           this.CompanyTypeOptions = res.data.items['CompanyType'] */
@@ -993,6 +1006,27 @@
           })
           return
         }
+        if (this.fushenauditer === "") {
+          this.$message({
+            type: "warning",
+            message: "请选择复审人!"
+          })
+          return
+        }
+        if (this.majorDept.length === 0) {
+          this.$message({
+            type: "warning",
+            message: "请选择专业处室!"
+          })
+          return
+        }
+        if (this.userOptions == null || this.userOptions.length === 0) {
+          this.$message({
+            type: 'warning',
+            message: '该专业科室未配置接收人!'
+          })
+          return
+        }
         this.applyLoading = true
         this.auditform.FirstAuditName = this.auditer
         this.auditform.CertId = this.certId

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

@@ -207,12 +207,12 @@
         </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="意见" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
-          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder">
           </el-input>
         </el-form-item>
       </el-form>
@@ -225,12 +225,12 @@
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
         <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="意见" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
-          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder">
           </el-input>
         </el-form-item>
         <!-- <el-divider></el-divider> -->
@@ -371,8 +371,9 @@
 
     data() {
       return {
-        equipmentList: [], // 企业主要情况
-        performanceList: [], // 近三年主要业绩
+        textplaceholder: '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)',
+        equipmentList: [], // 企业主要装备情况
+        performanceList: [], // 近三年主要工程业绩
         patentList: [], // 拥有专利、专有技术及工法
         winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
         auditbusList: [], // 待审核业务
@@ -541,6 +542,13 @@
       // this.getorgtreelistbydeptid()
     },
     methods: {
+      radioChange () {
+        if (this.shenheForm.SuccessStatus === 1) {
+          this.textplaceholder = '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)'
+        } else {
+          this.textplaceholder = '退回意见不能少于5个字'
+        }
+      },
       equipmentdialog() {
         this.$refs['equipmentList'].showDialog()
       },
@@ -695,13 +703,13 @@
         } else {
           return
         }
-        let deplist = []
-        deplist = this.companyid.split(",")
-        let deptid = deplist[deplist.length - 1]
-        console.log(deptid)
-        this.auditerOptions = []
-        this.auditer = ''
-        api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+        // let deplist = []
+        // deplist = this.companyid.split(",")
+        // let deptid = deplist[deplist.length - 1]
+        // console.log(deptid)
+        // this.auditerOptions = []
+        // this.auditer = ''
+        api.getAuditerByDept(this.authUser.Profile.DepartmentId, auditstepcode, this.$axios).then(res => {
           this.secauditerOptions = res.data.item
         }).catch(err => {
           console.error(err)
@@ -831,25 +839,33 @@
       },
       // 审核通过
       makeSure() {
-        if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3'&& this.formData.Status !== '10') {
-          this.$message({
-            type: 'warning',
-            message: '审批意见不能低于20个字符!'
-          })
-          return
-        }
         if (this.shenheForm.SuccessStatus === 1) {
-          if (this.userOptions == null || this.userOptions.length === 0) {
+          if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3' && this.formData.Status !== '10') {
             this.$message({
               type: 'warning',
-              message: '该专业科室未配置接收人!'
+              message: '审批意见不能低于20个字符!'
             })
             return
           }
-          if ((!this.auditer || this.auditer === 0) && this.formData.Status === '3') {
+          // if (this.userOptions == null || this.userOptions.length === 0) {
+          //   this.$message({
+          //     type: 'warning',
+          //     message: '该专业科室未配置接收人!'
+          //   })
+          //   return
+          // }
+          // if ((!this.auditer || this.auditer === 0) && this.formData.Status == '3') {
+          //   this.$message({
+          //     type: 'warning',
+          //     message: '请选择审核人!'
+          //   })
+          //   return
+          // }
+        } else {
+          if (this.shenheForm.AuditorRemark.trim().length < 5 && this.formData.Status !== '3' && this.formData.Status !== '10') {
             this.$message({
               type: 'warning',
-              message: '请选择审核人!'
+              message: '退回意见不能低于5个字符!'
             })
             return
           }

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

@@ -214,13 +214,13 @@
         </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 porp="AuditorRemark" label="意见"
           :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
-          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)"
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder"
             minlength="20"></el-input>
         </el-form-item>
       </el-form>
@@ -234,13 +234,13 @@
 
         <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 prop="AuditorRemark" label="意见"
           :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
-          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)"
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder"
             minlength="20"></el-input>
         </el-form-item>
 
@@ -381,6 +381,7 @@
 
     data() {
       return {
+        textplaceholder: '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)',
         auditer: '',
         auditerName: '',
         dialogVisible: false,
@@ -555,6 +556,13 @@
       // this.getorgtreelistbydeptid()
     },
     methods: {
+      radioChange () {
+        if (this.shenheForm.SuccessStatus === 1) {
+          this.textplaceholder = '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)'
+        } else {
+          this.textplaceholder = '退回意见不能少于5个字'
+        }
+      },
       orgtreeChange(val) {
         this.userOptions = []
         let deptid = val[val.length - 1]
@@ -717,13 +725,13 @@
         } else {
           return
         }
-        let deplist = []
-        deplist = this.companyid.split(",")
-        let deptid = deplist[deplist.length - 1]
-        console.log(deptid)
-        this.auditerOptions = []
-        this.auditer = ''
-        api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+        // let deplist = []
+        // deplist = this.companyid.split(",")
+        // let deptid = deplist[deplist.length - 1]
+        // console.log(deptid)
+        // this.auditerOptions = []
+        // this.auditer = ''
+        api.getAuditerByDept(this.authUser.Profile.DepartmentId, auditstepcode, this.$axios).then(res => {
           this.secauditerOptions = res.data.item
         }).catch(err => {
           console.error(err)
@@ -852,25 +860,33 @@
       },
       // 审核通过
       makeSure() {
-        if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3'&& this.formData.Status !== '10') {
-          this.$message({
-            type: 'warning',
-            message: '审批意见不能低于20个字符!'
-          })
-          return
-        }
         if (this.shenheForm.SuccessStatus === 1) {
-          if (this.userOptions == null || this.userOptions.length === 0) {
+          if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3' && this.formData.Status !== '10') {
             this.$message({
               type: 'warning',
-              message: '该专业科室未配置接收人!'
+              message: '审批意见不能低于20个字符!'
             })
             return
           }
-          if ((!this.auditer || this.auditer === 0) && this.formData.Status == '3') {
+          // if (this.userOptions == null || this.userOptions.length === 0) {
+          //   this.$message({
+          //     type: 'warning',
+          //     message: '该专业科室未配置接收人!'
+          //   })
+          //   return
+          // }
+          // if ((!this.auditer || this.auditer === 0) && this.formData.Status == '3') {
+          //   this.$message({
+          //     type: 'warning',
+          //     message: '请选择审核人!'
+          //   })
+          //   return
+          // }
+        } else {
+          if (this.shenheForm.AuditorRemark.trim().length < 5 && this.formData.Status !== '3' && this.formData.Status !== '10') {
             this.$message({
               type: 'warning',
-              message: '请选择审核人!'
+              message: '退回意见不能低于5个字符!'
             })
             return
           }

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

@@ -191,12 +191,12 @@
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
         <el-form-item label="审核状态" required>
           <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="意见" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
-          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder">
           </el-input>
         </el-form-item>
         <!-- <el-divider></el-divider> -->
@@ -223,12 +223,12 @@
       <el-form :model="shenheForm" label-width="100px" ref="shenheForm">
         <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="意见" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]">
-          <el-input type="textarea" v-model="shenheForm.AuditorRemark" placeholder="审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)">
+          <el-input type="textarea" v-model="shenheForm.AuditorRemark" :placeholder="textplaceholder">
           </el-input>
         </el-form-item>
         <!-- <el-divider></el-divider> -->
@@ -369,8 +369,9 @@
 
     data() {
       return {
-        equipmentList: [], // 企业主要情况
-        performanceList: [], // 近三年主要业绩
+        textplaceholder: '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)',
+        equipmentList: [], // 企业主要装备情况
+        performanceList: [], // 近三年主要工程业绩
         patentList: [], // 拥有专利、专有技术及工法
         winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
         auditbusList: [], // 待审核业务
@@ -537,6 +538,13 @@
       //this.getorgtreelistbydeptid()
     },
     methods: {
+      radioChange () {
+        if (this.shenheForm.SuccessStatus === 1) {
+          this.textplaceholder = '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)'
+        } else {
+          this.textplaceholder = '退回意见不能少于5个字'
+        }
+      },
       equipmentdialog() {
         this.$refs['equipmentList'].showDialog()
       },
@@ -692,13 +700,13 @@
         } else {
           return
         }
-        let deplist = []
-        deplist = this.companyid.split(",")
-        let deptid = deplist[deplist.length - 1]
-        console.log(deptid)
-        this.auditerOptions = []
-        this.auditer = ''
-        api.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+        // let deplist = []
+        // deplist = this.companyid.split(",")
+        // let deptid = deplist[deplist.length - 1]
+        // console.log(deptid)
+        // this.auditerOptions = []
+        // this.auditer = ''
+        api.getAuditerByDept(this.authUser.Profile.DepartmentId, auditstepcode, this.$axios).then(res => {
           this.secauditerOptions = res.data.item
         }).catch(err => {
           console.error(err)
@@ -828,25 +836,33 @@
       },
       // 审核通过
       makeSure() {
-        if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3'&& this.formData.Status !== '10') {
-          this.$message({
-            type: 'warning',
-            message: '审批意见不能低于20个字符!'
-          })
-          return
-        }
         if (this.shenheForm.SuccessStatus === 1) {
-          if (this.userOptions == null || this.userOptions.length === 0) {
+          if (this.shenheForm.AuditorRemark.trim().length < 20 && this.formData.Status !== '3' && this.formData.Status !== '10') {
             this.$message({
               type: 'warning',
-              message: '该专业科室未配置接收人!'
+              message: '审批意见不能低于20个字符!'
             })
             return
           }
-          if ((!this.auditer || this.auditer === 0) && this.formData.Status === '3') {
+          // if (this.userOptions == null || this.userOptions.length === 0) {
+          //   this.$message({
+          //     type: 'warning',
+          //     message: '该专业科室未配置接收人!'
+          //   })
+          //   return
+          // }
+          // if ((!this.auditer || this.auditer === 0) && this.formData.Status == '3') {
+          //   this.$message({
+          //     type: 'warning',
+          //     message: '请选择审核人!'
+          //   })
+          //   return
+          // }
+        } else {
+          if (this.shenheForm.AuditorRemark.trim().length < 5 && this.formData.Status !== '3' && this.formData.Status !== '10') {
             this.$message({
               type: 'warning',
-              message: '请选择审核人!'
+              message: '退回意见不能低于5个字符!'
             })
             return
           }

+ 0 - 14
src/dashoo.cn/frontend_web/src/pages/system/auditsetting/_opera/operation.vue

@@ -211,7 +211,6 @@
     },
     methods: {
       handleNodeClick (data) {
-        console.log(data, '========')
         this.userOptions = []
         api.getAuditerByDept(data.id, this.$axios).then(res => {
           if (res.data.code === 1) {
@@ -227,25 +226,21 @@
           //     })
           //   }
           // }
-          console.log(this.userOptions, 'userOptions')
         }).catch(err => {
           console.error(err)
         })
       },
       handleSelectionChange (val) {
         this.selectedOptions = val
-        console.log(val, 'val')
       },
       delSelectionChange (val) {
         this.selectdelOptions = val
-        console.log(this.selectdelOptions, 'val')
       },
       toggleSelection () {
         if (!this.userselectOptions) {
           this.userselectOptions = []
         }
         if (this.userselectOptions.length === 0) {
-          console.log('qqq')
           this.userselectOptions = this.selectedOptions.concat()
         } else {
           for (let i = 0; i < this.selectedOptions.length; i++) {
@@ -260,13 +255,9 @@
             }
           }
         }
-        console.log(this.selectedOptions, 'selectedOptions')
-        console.log(this.userselectOptions, 'userselectOptions')
       },
       delSelection () {
-        console.log(this.selectdelOptions.length)
         if (this.selectdelOptions.length > 0) {
-          console.log()
           for (let i = 0; i < this.selectdelOptions.length; i++) {
             for (let j = 0; j < this.userselectOptions.length; j++) {
               if (this.selectdelOptions[i].id === this.userselectOptions[j].id) {
@@ -275,13 +266,11 @@
               }
             }
           }
-          console.log(this.userselectOptions, 'this.userselectOptions')
         }
       },
       getAuditUserList () {
         api.getAuditUserList(this.formData.Id, this.$axios).then(res => {
           this.userselectOptions = res.data
-          console.log(this.userselectOptions, '11111111111')
         }).catch(err => {
           console.error(err)
         })
@@ -322,7 +311,6 @@
         })
           .then(res => {
             _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
-            console.log(_this.orgtreelist)
           })
           .catch(err => {
             console.error(err)
@@ -344,7 +332,6 @@
       saveEntity () {
         this.$refs['EntityForm'].validate((valid) => {
           if (valid) {
-            console.log(this.step)
             if (this.step == 1) {
               // 二级单位初审
               this.formData.AuditStepCode = 'FIRST_TRIAL'
@@ -393,7 +380,6 @@
             this.auditers = this.auditers.substring(0, this.auditers.lastIndexOf(','))
             this.formData.UserId = this.auditers
             this.formData.UserName = names.substring(0, names.lastIndexOf(','))
-            console.log(this.formData)
             if (!this.formData.Id) {
               this.addEntity()
             } else {