浏览代码

变更单添加流程跳转

002390 1 年之前
父节点
当前提交
d27fae6066

+ 7 - 0
src/api/changeApply/basic.js

@@ -97,4 +97,11 @@ export function downloadFailData(data) {
     data: data,
     responseType: 'blob',
   })
+}
+
+export function toOA(userName, fdId) {
+  return request({
+    url: `/oaflow/redirectToOa/${userName}/${fdId}`,
+    method: 'get',
+  })
 }

+ 25 - 1
src/views/material/changeApply/index.vue

@@ -59,6 +59,12 @@
           <el-table-column fixed="right" label="操作" width="150" align="center">
             <template slot-scope="scope">
               <el-button type="text" size="small" @click="useSee(scope.row)">查看</el-button>
+              <el-button  
+                v-if="scope.row.oaId && scope.row.oaId !=''" 
+                @click="jumpFlow(scope.row)" 
+                type="text"
+                :size="size"
+              >流程跳转</el-button>
               <el-button @click="handleEdit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">编辑</el-button>
               <el-button type="text" size="small" @click="deleteRow(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3">删除</el-button>
             </template>
@@ -72,7 +78,7 @@
 
 <script>
 import { dicts } from "./dicts";
-import { getChangeList , deleteChangeList} from '@/api/changeApply/basic';
+import { getChangeList , deleteChangeList,toOA} from '@/api/changeApply/basic';
 import useColumns from './columns';
 export default {
   name: 'changeApply',
@@ -102,6 +108,24 @@ export default {
     }
   },
   methods:{
+    async jumpFlow (row){
+
+      const {name} = this.$store.state.user;
+
+      try {
+
+        let {code,msg,oaUrl} = await toOA(name,row.oaId);
+
+        if(code == 200){
+          window.open(oaUrl)
+        }
+        
+      } catch (error) {
+        
+      }finally{
+
+      }
+    },
     
     useReset(){
       this.page.pageNum = 1;

+ 0 - 1
src/views/purchase/task/xie-yi-zhi-cai/index.vue

@@ -181,7 +181,6 @@ export default {
           :columns="tableColumns"
           :size="$attrs.size"
           :dict="dict"
-          
         >
           <template slot="purchaseQuantity" slot-scope="scope">
             <component