소스 검색

专业科室提交验证

lining 6 년 전
부모
커밋
d4e3266aea
1개의 변경된 파일23개의 추가작업 그리고 4개의 파일을 삭제
  1. 23 4
      src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplieraudit/_opera/goodsedit.vue

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

@@ -255,7 +255,7 @@
             </el-option>
           </el-select> -->
           <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>
 
@@ -359,7 +359,8 @@
         organizeOption: [],
         orgtreelist: [],
         secorgtreelist: [],
-        majorDept: [100000180,100000192],
+        userOptions: [],
+        majorDept: [100000180, 100000192],
         serviceId: '',
         certId: '',
         classId: '01',
@@ -498,10 +499,21 @@
       }
       this.getDictOptions()
       this.initDatas()
+      this.orgtreeChange(this.majorDept)
       // this.getorgtreelist()
       // this.getorgtreelistbydeptid()
     },
     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)
+        })
+      },
       equipmentdialog () {
         this.$refs['equipmentList'].showDialog()
       },
@@ -594,8 +606,8 @@
         api.getDictListByStatus(params, this.$axios).then(res => {
           this.dictData = res.data.items
           this.orgtreelist = window.toolfun_gettreejson(res.data.items['ProOrgList'], 'id', 'pId', 'id,name')
-          //this.auditerOptions = res.data.items['Auditer']
-          //this.organizeOption = res.data.items['Organizes']
+          // this.auditerOptions = res.data.items['Auditer']
+          // this.organizeOption = res.data.items['Organizes']
         }).catch(err => {
           console.error(err)
         })
@@ -781,6 +793,13 @@
             })
             return
           }
+          if (this.userOptions == null || this.userOptions.length === 0) {
+            this.$message({
+              type: 'warning',
+              message: '该专业科室未配置接收人!'
+            })
+            return
+          }
           if ((!this.auditer || this.auditer === 0) && this.formData.Status !== '2' && this.formData.Status !== '4' && this.formData.Status !== '5') {
             this.$message({
               type: 'warning',