002390 il y a 1 an
Parent
commit
162b39d530

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

@@ -152,3 +152,10 @@ export function fileImport(data) {
     responseType: 'blob',
   })
 }
+
+export function toOA(userName, fdId) {
+  return request({
+    url: `/oaflow/redirectToOa/${userName}/${fdId}`,
+    method: 'get',
+  })
+}

+ 0 - 1
src/components/PopDialog/fourClass.vue

@@ -33,7 +33,6 @@
                   :highlight-current="true"
                   :current-node-key="checkId"
                   @node-click="clickTree"
-                  default-expand-all
                   :filter-node-method="filterNode"
                   ref="tree"
                 >

+ 1 - 1
src/views/material/basicFile/columns.js

@@ -148,7 +148,7 @@ export const OtherDictColumns = [
   {
     item:{
       key:"expiryUnitId",
-      title:'效期管理',
+      title:'效期单位',
     },
     attr:{
       is: "el-select",

+ 80 - 44
src/views/material/requisition/index.vue

@@ -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 = ''

+ 8 - 6
src/views/purchase/purchase-order/index.vue

@@ -304,9 +304,10 @@ export default {
     },
     fetchSubmit(puOrderIds){
 
-      try {
+      this.handleConfirmTips(async()=>{
+      
+        try {
 
-        this.handleConfirmTips(async()=>{
 
           this.loading = true;
 
@@ -318,11 +319,12 @@ export default {
 
           }
 
+        }  catch (error) {} 
+        finally{
+          this.loading = false;
+        }
         })
-      } catch (error) {} 
-      finally{
-        this.loading = false;
-      }
+     
     },
 
     // 判断“整单退回”按钮