2
3
Quellcode durchsuchen

提交审批选择审批人

lining vor 6 Jahren
Ursprung
Commit
ae85d22147

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

@@ -60,6 +60,7 @@
     mapGetters
   } from 'vuex'
   import api from '@/api/system/auditsetting'
+  import supapi from '@/api/oilsupplier/supplier'
   import ElCol from "../../../node_modules/element-ui/packages/col/src/col";
   import ElIcon from "../../../node_modules/element-ui/packages/icon/src/icon";
   export default {
@@ -135,13 +136,27 @@
           })
       },
       handleNodeClick(data) {
+        // this.userOptions = []
+        // api.getAuditerByDept(data.id, this.$axios).then(res => {
+        //   if (res.data.code === 1) {
+        //     this.userOptions = res.data.item
+        //     if (res.data.item.length > 0) {
+        //       this.AuditorForm.UserId = res.data.item[0].id
+        //     }
+        //   }
+        // }).catch(err => {
+        //   console.error(err)
+        // })
+
+        let deptid = data.id
+        console.log(deptid)
         this.userOptions = []
-        api.getAuditerByDept(data.id, this.$axios).then(res => {
-          if (res.data.code === 1) {
-            this.userOptions = res.data.item
-            if (res.data.item.length > 0) {
-              this.AuditorForm.UserId = res.data.item[0].id
-            }
+        let auditstepcode = 'FIRST_TRIAL'
+        supapi.getAuditerByDept(deptid, auditstepcode, this.$axios).then(res => {
+          this.userOptions = res.data.item
+          console.log(this.userOptions)
+          if (res.data.item != null && res.data.item.length > 0) {
+            this.AuditorForm.UserId = res.data.item[0].id
           }
         }).catch(err => {
           console.error(err)