Browse Source

feat(融资管理):添加字段

sufan 6 months ago
parent
commit
9c5842c72d

+ 59 - 0
src/api/financingManage/index.js

@@ -225,3 +225,62 @@ export function paymentReviewSubmit(data) {
     data
     data
   })
   })
 }
 }
+
+// 打包下载支用文件
+export function downloadDisburseFile(params) {
+  return request({
+    url: '/financing/downloadDisburseFileZip',
+    method: 'get',
+    params,
+    responseType: 'arraybuffer'
+  })
+}
+
+// 打包下载付款文件
+export function downloadPaymentFile(params) {
+  return request({
+    url: '/financing/downloadPaymentFileZip',
+    method: 'get',
+    params,
+    responseType: 'arraybuffer'
+  })
+}
+
+// 打包下载合同文件
+export function downloadContractFile(params) {
+  return request({
+    url: '/financing/downloadContractFileZip',
+    method: 'get',
+    params,
+    responseType: 'arraybuffer'
+  })
+}
+
+// 打包合同出证文件下载
+export function downloadContractReportFile(params) {
+  return request({
+    url: '/financing/downloadContractReportFileZip',
+    method: 'get',
+    params,
+    responseType: 'arraybuffer'
+  })
+}
+
+// 重新下载合同签署文件
+export function flushSignFiles(params) {
+  return request({
+    url: '/financing/flushSignFiles',
+    method: 'get',
+    params,
+    responseType: 'arraybuffer'
+  })
+}
+
+// 生成新的合同链接
+export function generateContractLink(params) {
+  return request({
+    url: '/financing/flush/url',
+    method: 'get',
+    params
+  })
+}

+ 104 - 10
src/views/financingManage/index.vue

@@ -56,7 +56,16 @@
 
 
 <script>
 <script>
 import { mapGetters } from 'vuex'
 import { mapGetters } from 'vuex'
-import { getList, getAllList } from '@/api/financingManage'
+import {
+  getList,
+  getAllList,
+  downloadDisburseFile,
+  downloadPaymentFile,
+  downloadContractFile,
+  downloadContractReportFile,
+  flushSignFiles,
+  generateContractLink } from '@/api/financingManage'
+import { exportFile } from '@/utils'
 
 
 export default {
 export default {
   name: 'FinancingManage',
   name: 'FinancingManage',
@@ -95,7 +104,10 @@ export default {
           showTooltip: true,
           showTooltip: true,
           prop: 'contractNumber',
           prop: 'contractNumber',
           width: '120'
           width: '120'
-
+        },
+        {
+          label: '批次号',
+          prop: 'quotaDisburseBatch'
         },
         },
         {
         {
           label: '项目名称',
           label: '项目名称',
@@ -145,7 +157,6 @@ export default {
         },
         },
         {
         {
           label: '操作',
           label: '操作',
-          show: true,
           render: (h, row) => {
           render: (h, row) => {
             const btnList = [
             const btnList = [
               {
               {
@@ -165,10 +176,87 @@ export default {
               {
               {
                 msg: '查看',
                 msg: '查看',
                 icon: 'iconfont icon-Magnifier',
                 icon: 'iconfont icon-Magnifier',
-                power: 'code',
+                power: '',
                 tabPower: ['all', 'pending'],
                 tabPower: ['all', 'pending'],
-                // rowPower: [],
                 category: 'see'
                 category: 'see'
+              },
+              {
+                msg: '支用文件下载',
+                icon: 'iconfont icon-xiazai',
+                power: '',
+                tabPower: ['all'],
+                rowPower: ['支用审核', '合同制作', '合同签署', '合同审核', '付款申请', '付款审核', null],
+                category: 'click',
+                click: (id) => {
+                  downloadDisburseFile({ Loading: true, id }).then((res) => {
+                    exportFile(res)
+                  })
+                }
+              },
+              {
+                msg: '付款文件下载',
+                icon: 'iconfont icon-xiazai',
+                power: '',
+                tabPower: ['all'],
+                rowPower: ['付款申请', '付款审核', null],
+                category: 'click',
+                click: (id) => {
+                  downloadPaymentFile({ Loading: true, id }).then((res) => {
+                    exportFile(res)
+                  })
+                }
+              },
+              {
+                msg: '合同文件下载',
+                icon: 'iconfont icon-xiazai',
+                power: '',
+                tabPower: ['all'],
+                rowPower: ['合同签署', '合同审核', '付款申请', '付款审核', null],
+                category: 'click',
+                click: (id) => {
+                  downloadContractFile({ Loading: true, id }).then((res) => {
+                    exportFile(res)
+                  })
+                }
+              },
+              {
+                msg: '合同出证文件下载',
+                icon: 'iconfont icon-xiazai',
+                power: '',
+                tabPower: ['all'],
+                rowPower: ['合同审核', '付款申请', '付款审核', null],
+                category: 'click',
+                click: (id) => {
+                  downloadContractReportFile({ Loading: true, id }).then((res) => {
+                    exportFile(res)
+                  })
+                }
+              },
+              {
+                msg: '重新下载合同签署文件',
+                icon: 'iconfont icon-xiazai',
+                power: '',
+                tabPower: ['all'],
+                rowPower: ['合同审核', '付款申请', '付款审核', null],
+                category: 'click',
+                click: (id) => {
+                  flushSignFiles({ Loading: true, id }).then((res) => {
+                    exportFile(res)
+                  })
+                }
+              },
+              {
+                msg: '生成新的合同链接',
+                icon: 'iconfont icon-shuaxin',
+                power: '',
+                tabPower: ['all'],
+                rowPower: ['合同签署'],
+                category: 'click',
+                click: (id) => {
+                  generateContractLink({ Loading: true, id }).then(() => {
+                    this.$message.success('生成新的合同链接成功')
+                  })
+                }
               }
               }
             ]
             ]
             const options = btnList.map(item => {
             const options = btnList.map(item => {
@@ -176,14 +264,14 @@ export default {
                 this.tablePower({ item, tab: this.activeName, row }) &&
                 this.tablePower({ item, tab: this.activeName, row }) &&
                 <el-tooltip class='item' effect='dark' content={item.msg} placement='top' >
                 <el-tooltip class='item' effect='dark' content={item.msg} placement='top' >
                   <span class='table-icon-box'>
                   <span class='table-icon-box'>
-                    <i class={item.icon} onClick={() => { this.handlerOperate(item.category, row) }}></i>
+                    <i class={item.icon} onClick={() => { this.handlerOperate(item.category, row, item) }}></i>
                   </span>
                   </span>
                 </el-tooltip>
                 </el-tooltip>
               )
               )
             })
             })
-            return <div>{ options }</div>
+            return <div style='word-wrap: break-word'>{ options }</div>
           },
           },
-          width: 120
+          width: 130
         }
         }
       ]
       ]
     }
     }
@@ -194,7 +282,7 @@ export default {
       return ({ item, tab, row }) => {
       return ({ item, tab, row }) => {
         const { tabPower, rowPower } = item
         const { tabPower, rowPower } = item
         if (rowPower) {
         if (rowPower) {
-          if (tabPower.includes(tab) && rowPower.includes(row.statusName)) {
+          if (tabPower.includes(tab) && rowPower.includes(row.stageStr)) {
             return true
             return true
           }
           }
         } else {
         } else {
@@ -223,6 +311,7 @@ export default {
   },
   },
   methods: {
   methods: {
     fetchData(type) {
     fetchData(type) {
+      this.loading = true
       if (type === 'search') {
       if (type === 'search') {
         this.page = 1
         this.page = 1
         this.size = 10
         this.size = 10
@@ -236,11 +325,13 @@ export default {
       }
       }
       if (this.activeName === 'all') {
       if (this.activeName === 'all') {
         getAllList(params).then(({ rows, records }) => {
         getAllList(params).then(({ rows, records }) => {
+          this.loading = false
           this.tableData = rows
           this.tableData = rows
           this.total = records
           this.total = records
         })
         })
       } else {
       } else {
         getList(params).then(({ rows, records }) => {
         getList(params).then(({ rows, records }) => {
+          this.loading = false
           this.tableData = rows
           this.tableData = rows
           this.total = records
           this.total = records
         })
         })
@@ -255,7 +346,7 @@ export default {
         }
         }
       })
       })
     },
     },
-    handlerOperate(type, row) {
+    handlerOperate(type, row, item) {
       const { id, taskId } = row
       const { id, taskId } = row
       if (type === 'timeAxis') {
       if (type === 'timeAxis') {
         this.timeAxisParams.businessKey = id
         this.timeAxisParams.businessKey = id
@@ -342,6 +433,9 @@ export default {
           })
           })
         }
         }
       }
       }
+      if (type === 'click') {
+        item.click(id)
+      }
     },
     },
     handleTabClick(tab) {
     handleTabClick(tab) {
       this.activeName = tab.name
       this.activeName = tab.name

+ 3 - 4
src/views/financingManage/limitExpenditure/components/FinancingInfo.vue

@@ -450,12 +450,11 @@ export default {
       })
       })
     },
     },
     getBusinessTypeInfoData() {
     getBusinessTypeInfoData() {
-      if(this.refinancingManagement) {
+      if (this.refinancingManagement) {
         getBusinessTypeByManagement({ refinancingManagementId: this.refinancingManagement.id }).then(({ data }) => {
         getBusinessTypeByManagement({ refinancingManagementId: this.refinancingManagement.id }).then(({ data }) => {
           this.businessTypeInfo = data.data
           this.businessTypeInfo = data.data
         })
         })
       }
       }
-    
     },
     },
     getBusinessTypeInfo() {
     getBusinessTypeInfo() {
       this.ruleForm.businessType = ''
       this.ruleForm.businessType = ''
@@ -488,11 +487,11 @@ export default {
     getParams(type) {
     getParams(type) {
       return new Promise((resolve, reject) => {
       return new Promise((resolve, reject) => {
         if (type === 'temp') {
         if (type === 'temp') {
-          resolve(this.ruleForm)
+          resolve({ ...this.ruleForm, refinancingManagementId: this.refinancingManagement.id })
         } else {
         } else {
           this.$refs.ruleForm.validate(valid => {
           this.$refs.ruleForm.validate(valid => {
             if (valid) {
             if (valid) {
-              resolve(this.ruleForm)
+              resolve({ ...this.ruleForm, refinancingManagementId: this.refinancingManagement.id })
             } else {
             } else {
               reject()
               reject()
               return false
               return false