Pārlūkot izejas kodu

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

sufan 7 mēneši atpakaļ
vecāks
revīzija
9c5842c72d

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

@@ -225,3 +225,62 @@ export function paymentReviewSubmit(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>
 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 {
   name: 'FinancingManage',
@@ -95,7 +104,10 @@ export default {
           showTooltip: true,
           prop: 'contractNumber',
           width: '120'
-
+        },
+        {
+          label: '批次号',
+          prop: 'quotaDisburseBatch'
         },
         {
           label: '项目名称',
@@ -145,7 +157,6 @@ export default {
         },
         {
           label: '操作',
-          show: true,
           render: (h, row) => {
             const btnList = [
               {
@@ -165,10 +176,87 @@ export default {
               {
                 msg: '查看',
                 icon: 'iconfont icon-Magnifier',
-                power: 'code',
+                power: '',
                 tabPower: ['all', 'pending'],
-                // rowPower: [],
                 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 => {
@@ -176,14 +264,14 @@ export default {
                 this.tablePower({ item, tab: this.activeName, row }) &&
                 <el-tooltip class='item' effect='dark' content={item.msg} placement='top' >
                   <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>
                 </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 }) => {
         const { tabPower, rowPower } = item
         if (rowPower) {
-          if (tabPower.includes(tab) && rowPower.includes(row.statusName)) {
+          if (tabPower.includes(tab) && rowPower.includes(row.stageStr)) {
             return true
           }
         } else {
@@ -223,6 +311,7 @@ export default {
   },
   methods: {
     fetchData(type) {
+      this.loading = true
       if (type === 'search') {
         this.page = 1
         this.size = 10
@@ -236,11 +325,13 @@ export default {
       }
       if (this.activeName === 'all') {
         getAllList(params).then(({ rows, records }) => {
+          this.loading = false
           this.tableData = rows
           this.total = records
         })
       } else {
         getList(params).then(({ rows, records }) => {
+          this.loading = false
           this.tableData = rows
           this.total = records
         })
@@ -255,7 +346,7 @@ export default {
         }
       })
     },
-    handlerOperate(type, row) {
+    handlerOperate(type, row, item) {
       const { id, taskId } = row
       if (type === 'timeAxis') {
         this.timeAxisParams.businessKey = id
@@ -342,6 +433,9 @@ export default {
           })
         }
       }
+      if (type === 'click') {
+        item.click(id)
+      }
     },
     handleTabClick(tab) {
       this.activeName = tab.name

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

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