Browse Source

feat:财务管理新增重新还款申请

lazy 4 weeks ago
parent
commit
83fc008850

+ 7 - 0
src/api/financialManagement/financialManagement.js

@@ -122,3 +122,10 @@ export function cashFlowGetExitDetail(params) {
     method: 'get'
   })
 }
+
+export function reApplyPayment(params) {
+  return request({
+    url: '/cashFlow/repayApplyAgain/' + params,
+    method: 'get'
+  })
+}

+ 13 - 1
src/views/financialManagement/index.vue

@@ -45,7 +45,7 @@
 <script>
 import { mapGetters } from 'vuex'
 import indexTable from './indexTable'
-import { getList, delteRowData } from '@/api/financialManagement/financialManagement'
+import { getList, delteRowData, reApplyPayment } from '@/api/financialManagement/financialManagement'
 export default {
   name: 'Demo',
   mixins: [indexTable],
@@ -151,6 +151,18 @@ export default {
           }
         })
       }
+
+      if (type === 'reApply') {
+        this.handleReapply(row.id)
+      }
+    },
+    async handleReapply(id) {
+      const res = await reApplyPayment(id)
+
+      if (res.success) {
+        this.$message.success('操作成功')
+        this.$router.go(0)
+      }
     }
   }
 }

+ 14 - 2
src/views/financialManagement/indexTable.js

@@ -136,6 +136,13 @@ export default {
                 icon: 'iconfont icon-shanchu',
                 power: 'deleteFinancial',
                 category: 'delete'
+              },
+              {
+                msg: '重新发起还款申请',
+                icon: 'iconfont icon-shuaxin',
+                power: '',
+                rowPower: ['资方融资款项'],
+                category: 'reApply'
               }
             ]
             const options = btnList.map(item => {
@@ -162,8 +169,13 @@ export default {
     },
     tablePower() {
       return ({ item, row }) => {
-        const { rowPower } = item
-        if (rowPower) {
+        const { rowPower, category } = item
+        if (category === 'reApply') {
+          if (rowPower && rowPower.includes(row.cashTypeDict.name)) {
+            return true
+          }
+          return false
+        } else if (rowPower) {
           // entryOutType 出入帐类型 1--入账 2--出账 出账只存在查看按钮
           if (rowPower.includes(row.cashStatus) || row.entryOutType === '2') {
             return false