Jelajahi Sumber

报销审批列表添加审批功能

lizhenhao 2 tahun lalu
induk
melakukan
b70aab399e

+ 2 - 0
src/views/modules/zs/reimbursement/info/InfoForm.vue

@@ -611,6 +611,8 @@
       MaterialManagementDialog
     },
     methods: {
+      getUpload () {
+      },
       init (method, id) {
         this.method = method
         this.inputForm = {

+ 14 - 0
src/views/modules/zs/reimbursement/info/InfoList.vue

@@ -165,6 +165,8 @@
               <el-button v-if="hasPermission('zsReimbursement:info:edit') && scope.row.createId === $store.state.user.id && (scope.row.type === '4')" type="text"  size="small" @click="todo(scope.row)">驳回调整</el-button>
               <el-button v-if="hasPermission('zsReimbursement:info:edit') && scope.row.createId === $store.state.user.id && (scope.row.type === '2')" type="text"  size="small" @click="reback(scope.row)">撤回</el-button>
               <el-button v-if="hasPermission('zsReimbursement:info:del') && scope.row.createId === $store.state.user.id && (scope.row.type === '1')" type="text"  size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-if="checkIsAudit(scope.row)" type="text"  size="small" @click="todo(scope.row)">审核</el-button>
+
             </template>
           </vxe-column>
         </vxe-table>
@@ -552,6 +554,18 @@
             console.log(err.response)
           }
         })
+      },
+      // 查询当前登录人是否是数据的审核人
+      checkIsAudit (row) {
+        let loginUserId = this.$store.state.user.id  // 获取当前登录用户id
+        if (this.commonJS.isNotEmpty(row.auditUserIds)) {
+          for (const userId of row.auditUserIds) {
+            if (userId === loginUserId) {  // 当数据的审核人中包含当前登录人id时,返回true
+              return true
+            }
+          }
+        }
+        return false
       }
     }
   }

+ 1 - 0
src/views/modules/zs/reimbursement/info/ReimbursementForm.vue

@@ -771,6 +771,7 @@
         this.$nextTick(() => {
           this.loading = true
           this.$refs.inputForm.resetFields()
+          this.$refs.uploadComponent.clearUpload()
           this.reimbursementService.findById(this.inputForm.id).then(({data}) => {
             if (this.status === 'audit' || this.status === 'taskFormDetail') {
               method = 'view'