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