Browse Source

查看ccpm已办信息及历史

lizhenhao 2 years ago
parent
commit
aac00bbaf3

+ 5 - 3
src/views/modules/flowable/task/CenterForm.vue

@@ -8,8 +8,8 @@
         <component ref="form" :businessId="businessId" :is="form" :processDefKey="processDefKey"></component>
         <!--操作按钮-->
         <div class="FlowFormFooter">
-          <el-button type="primary" :loading="loading" @click="agree" v-noMoreClick plain>同意</el-button>
-          <el-button type="danger" :loading="loading" @click="reject" v-noMoreClick plain>驳回</el-button>
+          <el-button v-if="type === 'audit'" type="primary" :loading="loading" @click="agree" v-noMoreClick plain>同意</el-button>
+          <el-button v-if="type === 'audit'" type="danger" :loading="loading" @click="reject" v-noMoreClick plain>驳回</el-button>
           <el-button :loading="loading" @click="close" v-noMoreClick plain>关闭</el-button>
         </div>
       </el-card>
@@ -39,6 +39,7 @@
         this.businessId = this.$route.query.id
         this.processDefKey = this.$route.query.processDefKey
         this.title = this.$route.query.title
+        this.type = this.$route.query.type
         this.$nextTick(() => {
           this.$refs.form.getKeyWatch(Math.random().toString())
         })
@@ -78,7 +79,8 @@
         title: '',
         form: '',
         businessId: '',
-        loading: false
+        loading: false,
+        type: ''
       }
     }
   }

+ 37 - 7
src/views/modules/flowable/task/HistoryList.vue

@@ -49,25 +49,30 @@
                 :checkbox-config="{}">
                 <vxe-column type="seq" width="60" title="序号"></vxe-column>
                 <vxe-column type="checkbox"  width="40px"></vxe-column>
-                <vxe-column  title="任务" field="name" >
+                <vxe-column  title="任务" field="name" align="center">
                     <template slot-scope="scope">
                       {{scope.row.name}}
                       <el-button v-if="scope.row.back" type="warning" size="mini" @click="callback(scope.row)">撤销</el-button>
                     </template>
                 </vxe-column>
-                 <vxe-column  title="实例标题" field="vars.title" > </vxe-column>
-                <vxe-column  title="流程名称" field="processDefinitionName" > </vxe-column>
-                <vxe-column  title="办理状态" field="status" >
+                 <vxe-column  title="实例标题" field="vars.title" align="center"> </vxe-column>
+                <vxe-column  title="流程名称" field="processDefinitionName" align="center"> </vxe-column>
+                <vxe-column  title="办理状态" field="status" align="center">
                    <template slot-scope="scope">
                       <el-tag :type="scope.row.level"   effect="dark" size="small">{{scope.row.status}} </el-tag>
                   </template>
                 </vxe-column>
-                <vxe-column  title="流程发起人" field="vars.userName" ></vxe-column>
-                <vxe-column field="endTime" title="完成时间">
+                <vxe-column  title="流程发起人" field="vars.userName" align="center"></vxe-column>
+                <vxe-column field="endTime" title="完成时间" align="center">
                 </vxe-column>
                 <vxe-column title="操作" width="100px" fixed="right" align="center">
                   <template slot-scope="scope">
-                     <el-button  type="text" size="small" @click="detail(scope.row)">历史</el-button>
+                    <div v-if="scope.row.belongProject === 'ccpm'">
+                      <el-button type="text" size="small" @click="hisCcpm(scope.row)">ccpm历史</el-button>
+                    </div>
+                    <div v-else>
+                      <el-button  type="text" size="small" @click="detail(scope.row)">历史</el-button>
+                    </div>
                   </template>
                 </vxe-column>
             </vxe-table>
@@ -203,6 +208,7 @@
           procInsId: row.processInstanceId,
           procDefId: row.processDefinitionId
         }).then(({data}) => {
+          console.log(data)
           this.$router.push({
             path: '/flowable/task/TaskFormDetail',
             query: {readOnly: true, taskId: row.executionId, title: `${row.processDefinitionName}【${row.name}】`, formTitle: `${row.processDefinitionName}`, ...pick(data, 'formType', 'formUrl', 'procDefKey', 'taskDefKey', 'procInsId', 'procDefId', 'taskId', 'status', 'title', 'businessId')}
@@ -237,6 +243,30 @@
         this.$nextTick(() => {
           this.refreshList()
         })
+      },
+      // 报销历史查看
+      hisCcpm (row) {
+        if (row.processDefKey === '13') {
+          let id = row.businessId
+          let title = '报销审批历史'
+          let formUrl = '/reimbursement/ReimbursementFormCcpm'
+          this.toCenterForm(id, title, formUrl, row.processDefKey) // 跳转
+        } else {
+          this.$message.warning('此流程的跨系统审核暂未开放,请前往所属系统进行审核')
+        }
+      },
+      toCenterForm (id, title, formUrl, processDefKey) {
+        let backPath = '/sys/dashboard/workBench/PendingList'
+        this.$router.push({ // 跳转
+          path: '/flowable/task/CenterForm',
+          query: {
+            id: id,
+            backPath: backPath,
+            title: title,
+            formUrl: formUrl,
+            processDefKey: processDefKey
+          }
+        })
       }
     }
   }

+ 4 - 3
src/views/modules/flowable/task/TodoList.vue

@@ -318,12 +318,12 @@
           let id = row.vars.notifyId
           let title = '报销申请审批'
           let formUrl = '/reimbursement/ReimbursementFormCcpm'
-          this.toCenterForm(id, title, formUrl, row.task.processDefKey) // 跳转
+          this.toCenterForm(id, title, formUrl, row.task.processDefKey, 'audit') // 跳转
         } else {
           this.$message.warning('此流程的跨系统审核暂未开放,请前往所属系统进行审核')
         }
       },
-      toCenterForm (id, title, formUrl, processDefKey) {
+      toCenterForm (id, title, formUrl, processDefKey, type) {
         let backPath = '/sys/dashboard/workBench/PendingList'
         this.$router.push({ // 跳转
           path: '/flowable/task/CenterForm',
@@ -332,7 +332,8 @@
             backPath: backPath,
             title: title,
             formUrl: formUrl,
-            processDefKey: processDefKey
+            processDefKey: processDefKey,
+            type: type
           }
         })
       }

+ 6 - 2
src/views/modules/reimbursement/ReimbursementFormCcpm.vue

@@ -1,10 +1,10 @@
 <template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
   <div>
       <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="method === 'view'"
-               label-width="90px" @submit.native.prevent>
+               label-width="120px" @submit.native.prevent>
 
         <el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
-        <el-row :gutter="26">
+        <el-row>
           <el-col :span="12">
             <el-form-item label="经办人" prop="userName">
               <el-input v-model="inputForm.userName" :disabled="true"></el-input>
@@ -15,6 +15,8 @@
               <el-input v-model="inputForm.no" :disabled="true" placeholder="自动生成"></el-input>
             </el-form-item>
           </el-col>
+        </el-row>
+        <el-row>
           <el-col :span="12">
             <el-form-item label="所属部门" prop="departmentName">
               <el-input v-model="inputForm.departmentName" :disabled="true"></el-input>
@@ -33,6 +35,8 @@
 <!--                <el-input v-model="inputForm.reimDate" :disabled="true"></el-input>-->
             </el-form-item>
           </el-col>
+        </el-row>
+        <el-row>
           <el-col :span="24">
             <el-form-item label="备注" prop="remarks">
               <el-input v-model="inputForm.remarks"

+ 8 - 2
src/views/modules/reimbursement/info/ReimbursementForm.vue

@@ -1,10 +1,10 @@
 <template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
   <div>
     <el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''"  :disabled="status === 'audit' || status === 'taskFormDetail'"
-             label-width="100px" @submit.native.prevent>
+             label-width="120px" @submit.native.prevent>
 
       <el-divider content-position="left"><i class="el-icon-document"></i> 基础信息</el-divider>
-      <el-row :gutter="26">
+      <el-row >
         <el-col :span="12">
           <el-form-item label="经办人" prop="userName">
             <el-input v-model="inputForm.userName" :disabled="true"></el-input>
@@ -15,6 +15,8 @@
             <el-input v-model="inputForm.no" :disabled="true" placeholder="自动生成"></el-input>
           </el-form-item>
         </el-col>
+      </el-row>
+      <el-row>
         <el-col :span="12">
           <el-form-item label="所属部门" prop="departmentName">
             <el-input v-model="inputForm.departmentName" :disabled="true"></el-input>
@@ -32,6 +34,8 @@
             </el-date-picker>
           </el-form-item>
         </el-col>
+      </el-row>
+      <el-row>
         <el-col :span="12">
           <el-form-item label="报销类型" prop="sourceType"
                         :rules="[
@@ -56,6 +60,8 @@
             </el-input>
           </el-form-item>
         </el-col>
+      </el-row>
+      <el-row>
         <el-col :span="24">
           <el-form-item label="备注" prop="remarks">
             <el-input v-model="inputForm.remarks"

+ 4 - 3
src/views/modules/sys/dashboard/workBench/Pending.vue

@@ -611,13 +611,13 @@
           let id = row.vars.notifyId
           let title = '报销申请审批'
           let formUrl = '/reimbursement/ReimbursementFormCcpm'
-          this.toCenterForm(id, title, formUrl) // 跳转
+          this.toCenterForm(id, title, formUrl, 'audit') // 跳转
         } else {
           this.$message.warning('此流程的跨系统审核暂未开放,请前往所属系统进行审核')
         }
       },
       // 审核页面跳转
-      toCenterForm (id, title, formUrl) {
+      toCenterForm (id, title, formUrl, type) {
         let backPath = '/home'
         this.$router.push({ // 跳转
           path: '/flowable/task/CenterForm',
@@ -625,7 +625,8 @@
             id: id,
             backPath: backPath,
             title: title,
-            formUrl: formUrl
+            formUrl: formUrl,
+            type: type
           }
         })
       }