|
@@ -83,16 +83,32 @@
|
|
|
fixed="right"
|
|
|
label="操作"
|
|
|
align="center"
|
|
|
- width="120"
|
|
|
+ width="180"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" :size="size" @click="check(scope.row)">查看</el-button>
|
|
|
- <el-button @click="edit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text"
|
|
|
- :size="size">编辑
|
|
|
- </el-button>
|
|
|
- <el-button type="text" :size="size" @click="deleteRow(scope.row)"
|
|
|
- v-if="scope.row.status == 0 || scope.row.status == 3">删除
|
|
|
- </el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ :size="size"
|
|
|
+ @click="check(scope.row)"
|
|
|
+ >查看</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="edit(scope.row)"
|
|
|
+ v-if="scope.row.status == 0 || scope.row.status == 3"
|
|
|
+ type="text"
|
|
|
+ :size="size"
|
|
|
+ >编辑</el-button>
|
|
|
+ <el-button
|
|
|
+ @click="jumpFlow(scope.row)"
|
|
|
+ v-if="scope.row.oaId && scope.row.oaId !=''"
|
|
|
+ type="text"
|
|
|
+ :size="size"
|
|
|
+ >流程跳转</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ :size="size"
|
|
|
+ @click="deleteRow(scope.row)"
|
|
|
+ v-if="scope.row.status == 0 || scope.row.status == 3"
|
|
|
+ >删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-super-table>
|
|
@@ -116,7 +132,7 @@
|
|
|
|
|
|
<script>
|
|
|
import addReq from './add.vue';
|
|
|
- import {getReqList, delReq, importData, fileImport,betchSubmit} from '@/api/requisition/basic';
|
|
|
+ import {getReqList, delReq, importData, fileImport,betchSubmit,toOA} from '@/api/requisition/basic';
|
|
|
import {saveAs} from "file-saver";
|
|
|
import { blobValidate } from "@/utils/ruoyi";
|
|
|
import { SearchColumns, TableColumns } from './columns';
|
|
@@ -180,53 +196,73 @@
|
|
|
},
|
|
|
methods: {
|
|
|
// 批量提交
|
|
|
- async handleBatchSubmit(){
|
|
|
- let filterList = this.checkedList.filter(item => !(item.status == '0' || item.status == '3') )
|
|
|
-
|
|
|
- if(!filterList.length && this.checkedList.length){
|
|
|
+ async handleBatchSubmit(){
|
|
|
+ let filterList = this.checkedList.filter(item => !(item.status == '0' || item.status == '3') )
|
|
|
+
|
|
|
+ if(!filterList.length && this.checkedList.length){
|
|
|
+
|
|
|
+ try {
|
|
|
+
|
|
|
+ this.failLoad = true;
|
|
|
+
|
|
|
+ let ids = this.checkedList.map( item => Number(item.id));
|
|
|
+
|
|
|
+ let {code,msg} = await betchSubmit(ids);
|
|
|
|
|
|
- try {
|
|
|
+ if(code == 200){
|
|
|
+ this.reset();
|
|
|
+ }
|
|
|
|
|
|
- this.failLoad = true;
|
|
|
-
|
|
|
- let ids = this.checkedList.map( item => Number(item.id));
|
|
|
-
|
|
|
- let {code,msg} = await betchSubmit(ids);
|
|
|
+ this.$notify({
|
|
|
+ title: code == 200 ? msg : 'error',
|
|
|
+ type: code == 200 ? 'success' :'error',
|
|
|
+ message: code == 200 ?'' :msg,
|
|
|
+ });
|
|
|
+
|
|
|
+ // if(code == 200){
|
|
|
+ // this.$notify.success({
|
|
|
+ // title: msg,
|
|
|
+ // });
|
|
|
+ // }else{
|
|
|
+ // this.$notify.error({
|
|
|
+ // title: '错误',
|
|
|
+ // message: msg,
|
|
|
+ // });
|
|
|
+ // }
|
|
|
|
|
|
- if(code == 200){
|
|
|
- this.reset();
|
|
|
+ } catch (error) {
|
|
|
+
|
|
|
+ }finally{
|
|
|
+ this.failLoad = false;
|
|
|
}
|
|
|
|
|
|
- this.$notify({
|
|
|
- title: code == 200 ? msg : 'error',
|
|
|
- type: code == 200 ? 'success' :'error',
|
|
|
- message: code == 200 ?'' :msg,
|
|
|
+ }else{
|
|
|
+ this.$notify.warning({
|
|
|
+ title: '警告',
|
|
|
+ message: '存在不符合提交条件数据或未选择数据!',
|
|
|
});
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ async jumpFlow (row){
|
|
|
+
|
|
|
+ const {name} = this.$store.state.user;
|
|
|
|
|
|
- // if(code == 200){
|
|
|
- // this.$notify.success({
|
|
|
- // title: msg,
|
|
|
- // });
|
|
|
- // }else{
|
|
|
- // this.$notify.error({
|
|
|
- // title: '错误',
|
|
|
- // message: msg,
|
|
|
- // });
|
|
|
- // }
|
|
|
+ try {
|
|
|
|
|
|
- } catch (error) {
|
|
|
-
|
|
|
- }finally{
|
|
|
- this.failLoad = false;
|
|
|
+ let {code,msg,oaUrl} = await toOA(name,row.id);
|
|
|
+
|
|
|
+ if(code == 200){
|
|
|
+ window.open(oaUrl)
|
|
|
}
|
|
|
+
|
|
|
+ } catch (error) {
|
|
|
+
|
|
|
+ }finally{
|
|
|
|
|
|
- }else{
|
|
|
- this.$notify.warning({
|
|
|
- title: '警告',
|
|
|
- message: '存在不符合提交条件数据或未选择数据!',
|
|
|
- });
|
|
|
}
|
|
|
},
|
|
|
+
|
|
|
reset() {
|
|
|
// this.queryParams.billCode = ''
|
|
|
// this.queryParams.name = ''
|