zhengnaiwen_citu 5 месяцев назад
Родитель
Сommit
c2d920c063

+ 6 - 1
src/api/approval.js

@@ -15,7 +15,12 @@ export function getApprovalProgress (data) {
   return http.post('/work/flow/instance/process', data)
 }
 
-// 进度明细
+// 加急
 export function getApprovalUrge (data) {
   return http.post('/work/flow/instance/urge', data)
 }
+
+// 工单申请表
+export function getApprovalApply (data) {
+  return http.post('/work/flow/instance/submit/table', data)
+}

+ 15 - 0
src/views/workOrder/components/ApprovalDetails.vue

@@ -0,0 +1,15 @@
+<template>
+  <div>
+
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'ApprovalDetails'
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 0 - 0
src/views/workOrder/components/approvalProgress.vue → src/views/workOrder/components/ApprovalProgress1.vue


+ 18 - 8
src/views/workOrder/components/IndexPage.vue

@@ -13,28 +13,30 @@
       <template #status="{ row }">
         <el-tag size="small" :type="statusList[row.status].color">{{ statusList[row.status].text }}</el-tag>
       </template>
-      <!-- <template #opType="{ row }">
-        <el-tag size="small" :type="statusList[row.opType].color">{{ statusList[row.opType].text }}</el-tag>
-      </template> -->
       <template #actions="{ row }">
-        <m-button type="primary" text @click="onDetails(row)">审批进度</m-button>
+        <m-button type="primary" text @click="onProcess(row)">审批进度</m-button>
+        <m-button type="primary" text @click="onDetails(row)">申请明细</m-button>
         <slot name="actions" :row="row"></slot>
       </template>
     </m-table>
     <ApprovalProgress ref="approvalProgressRefs"></ApprovalProgress>
+    <ApprovalDetails ref="approvalDetailsRefs"></ApprovalDetails>
   </div>
 </template>
 
 <script>
 import {
   getApprovalList,
-  getApprovalProgress
+  getApprovalProgress,
+  getApprovalApply
 } from '@/api/approval'
-import ApprovalProgress from './approvalProgress.vue'
+import ApprovalProgress from './ApprovalProgress'
+import ApprovalDetails from './ApprovalDetails'
 export default {
   name: 'IndexPage',
   components: {
-    ApprovalProgress
+    ApprovalProgress,
+    ApprovalDetails
   },
   props: {
     dataType: {
@@ -107,7 +109,7 @@ export default {
         this.loading = false
       }
     },
-    async onDetails ({ workFlowInstanceId }) {
+    async onProcess ({ workFlowInstanceId }) {
       try {
         const { data } = await getApprovalProgress({ workFlowInstanceId })
         this.$refs.approvalProgressRefs.open(data)
@@ -115,6 +117,14 @@ export default {
         this.$message.error(error)
       }
     },
+    async onDetails ({ workFlowInstanceId }) {
+      try {
+        const { data } = await getApprovalApply({ workFlowInstanceId })
+        console.log(data)
+      } catch (error) {
+        this.$message.error(error)
+      }
+    },
     onSearch () {
       this.pageInfo.current = 1
       this.onInit()

+ 1 - 1
src/views/workOrder/myOrder/index.vue

@@ -23,7 +23,7 @@ export default {
         this.$message.success('加急成功')
         this.$refs.indexPageRefs.onInit()
       } catch (error) {
-        this.$message.error('加急失败')
+        this.$message.error(error)
       }
     }
   }