|
@@ -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.stop="useSee(scope.row)">查看</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="scope.row.status == '1'"
|
|
|
+ type="text"
|
|
|
+ size="mini"
|
|
|
+ @click.stop="handleBack(scope.row)"
|
|
|
+ >流程收回</el-button>
|
|
|
<el-button
|
|
|
v-if="scope.row.oaId && scope.row.oaId !=''"
|
|
|
@click.stop="jumpFlow(scope.row)"
|
|
@@ -79,10 +85,12 @@
|
|
|
<script>
|
|
|
import { dicts } from "./dicts";
|
|
|
import { getChangeList , deleteChangeList,toOA} from '@/api/changeApply/basic';
|
|
|
+// 流程收回通用接口
|
|
|
+import {oaBack} from '@/api/requisition/basic';
|
|
|
import useColumns from './columns';
|
|
|
export default {
|
|
|
name: 'changeApply',
|
|
|
- dicts:dicts,
|
|
|
+ dicts:[...dicts, 'oa_templete_id'],
|
|
|
components: {
|
|
|
AddChangeOrders:() => import('./add/index.vue'),
|
|
|
SeeChangeOrders:() => import('./see/index.vue'),
|
|
@@ -127,6 +135,30 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ //流程收回
|
|
|
+ async handleBack(row){
|
|
|
+ console.log('row', row)
|
|
|
+ console.log('this.dicts.type', this.dict)
|
|
|
+ try {
|
|
|
+ const { msg, code } = await oaBack({
|
|
|
+ fdTemplateId: this.dict.type.oa_templete_id.find(item => {
|
|
|
+ return item.label == "物料变更单"
|
|
|
+ }).value,
|
|
|
+ fdId: row.oaId,
|
|
|
+ billCode: row.code,
|
|
|
+ billMaker: row.createBy
|
|
|
+ });
|
|
|
+ if (code === 200) {
|
|
|
+ this.$emit("success");
|
|
|
+ this.$notify.success(msg);
|
|
|
+ }
|
|
|
+ } catch (err) {
|
|
|
+ console.error(err);
|
|
|
+ } finally {
|
|
|
+ this.useQuery(this.params, this.page);
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
useReset(){
|
|
|
this.page.pageNum = 1;
|
|
|
this.page.pageSize = 10;
|