我的合同,资料下载

This commit is contained in:
zhaoxiao
2021-09-30 14:32:11 +08:00
parent bc81346d20
commit 4b19f803e3
5 changed files with 62 additions and 52 deletions
+4 -1
View File
@@ -13,6 +13,8 @@ const editUserInfo = (param) => postAction('/company/payContactsManagement/compa
const getSubBidCommitteeDetail = (param) => getAction('/payCaseCommittee/payCaseCommittee/detail', param)
// 资料下载--批量下载
const batchDownloadFile = (param) => getAction('/project/payWorkingGroupDistributionRecord/zipFile', param)
// 我的合同--详情
const getContractDetailById = (param) => getAction('/contract/payIncomeContract/queryCompanyById', param)
export {
queryCommonProjectById,
@@ -21,5 +23,6 @@ export {
getContactUserInfo,
editUserInfo,
getSubBidCommitteeDetail,
batchDownloadFile
batchDownloadFile,
getContractDetailById
}
+4
View File
@@ -151,6 +151,10 @@ export default {
overflow: hidden;
word-break: keep-all;
text-overflow: ellipsis;
font-size: 14px;
font-family: PingFang SC, PingFang SC-Medium;
font-weight: 500;
color: #333333;
}
}
+5 -2
View File
@@ -30,7 +30,6 @@
<!-- table表格区域-->
<div>
<a-table
size="middle"
ref="table"
bordered
rowKey="fileId"
@@ -130,10 +129,14 @@ export default {
* 批量下载
*/
batchDownloadFile() {
if (this.selectedRowKeys.length === 0) {
this.$message.warn('请至少选择一个文件')
return
}
// 获取文件名称
let fileName = ''
let firstFile = this.dataSource.filter(tt => tt.fileId === this.selectedRowKeys[0])
fileName = `${firstFile[0].fileName}${this.selectedRowKeys.length}个文件`
fileName = `${firstFile[0].fileName}${this.selectedRowKeys.length}个文件.zip`
let fileIdStr = this.selectedRowKeys.join(',')
batchDownloadFile({ ids: fileIdStr }).then(res => {
// 调用a标签下载文件的方法
+14 -13
View File
@@ -7,7 +7,7 @@
<a-row :gutter="24">
<a-col :xl="6" :lg="8" :md="8" :sm="24">
<a-form-item label="合同编号/名称">
<a-input placeholder="请输入合同编号/名称" v-model="queryParam.name"></a-input>
<a-input placeholder="请输入合同编号/名称" v-model="queryParam.contractName"></a-input>
</a-form-item>
</a-col>
<a-col :xl="6" :lg="8" :md="8" :sm="24">
@@ -30,13 +30,13 @@
<div @click="d(record)">{{ text }}</div>
</template>
<!-- 项目名称-->
<template v-slot:projectName="{record}">
<template v-slot:projectName="{record, text}">
<a-tooltip>
<template slot="title">
{{ record.chargeProject }}
{{ text }}
</template>
<div @click="openDetail(record)" class="project-name">
{{ record.chargeProject }}
{{ text }}
</div>
</a-tooltip>
</template>
@@ -72,17 +72,17 @@ export default {
columns: [
{
title: '',
dataIndex: 'chargeProject',
dataIndex: 'contractNum',
scopedSlots: 'projectName',
col: 6
col: 5
}, {
title: '合同名称',
dataIndex: 'chargeUse_dictText',
dataIndex: 'contractName',
scopedSlots: 'text',
col: 6
col: 5
}, {
title: '合同金额',
dataIndex: 'receivableAmount',
dataIndex: 'contractAmount',
scopedSlots: 'text',
col: 5
}, {
@@ -92,13 +92,13 @@ export default {
col: 5
}, {
title: '邮寄',
dataIndex: 'mail',
dataIndex: 'postStatus',
scopedSlots: 'status',
col: 2
col: 4
}
],
url: {
list: ''
list: '/contract/payIncomeContract/queryCompanyPageList'
}
}
},
@@ -112,7 +112,8 @@ export default {
this.ipagination.pageSize = pagination.pageSize
this.loadData()
},
openDetail() {
openDetail(record) {
this.$refs.detail.contractId = record.id
this.$refs.detail.open()
}
}
@@ -14,7 +14,7 @@
<a-row>
<a-col :span="6">合同编号</a-col>
<a-col :span="18">
<j-ellipsis :value="title" :length="20"></j-ellipsis>
<j-ellipsis :value="contractDetail.contractNum" :length="20"></j-ellipsis>
</a-col>
</a-row>
</a-col>
@@ -22,7 +22,7 @@
<a-row>
<a-col :span="6">合同名称</a-col>
<a-col :span="18">
<j-ellipsis :value="title" :length="20"></j-ellipsis>
<j-ellipsis :value="contractDetail.contractName" :length="20"></j-ellipsis>
</a-col>
</a-row>
</a-col>
@@ -32,7 +32,7 @@
<a-row>
<a-col :span="6">负责人</a-col>
<a-col :span="18">
<j-ellipsis :value="title" :length="20"></j-ellipsis>
<j-ellipsis :value="contractDetail.principalName" :length="20"></j-ellipsis>
</a-col>
</a-row>
</a-col>
@@ -40,7 +40,7 @@
<a-row>
<a-col :span="6">合同金额</a-col>
<a-col :span="18">
<j-ellipsis :value="title" :length="20"></j-ellipsis>
<j-ellipsis :value="contractDetail.contractAmount" :length="20"></j-ellipsis>
</a-col>
</a-row>
</a-col>
@@ -50,9 +50,9 @@
<a-row>
<a-col :span="3">关联项目</a-col>
<a-col :span="21">
<!-- <span v-for="(item, index) in fileList" :key="index">-->
<!-- <div class="file-name" @click="handlePreview(item)">{{ item.name }}</div>-->
<!-- </span>-->
<span v-for="(item, index) in associatedProjectList" :key="index">
<div>{{ item.chargeProject }}</div>
</span>
</a-col>
</a-row>
</a-col>
@@ -81,6 +81,8 @@
</template>
<script>
import { getContractDetailById } from '@api/incomePaymentsApi'
export default {
name: 'MineContractModule',
data() {
@@ -91,39 +93,14 @@ export default {
loading: false,
columns: [
{
title: '开票人',
title: '合同号',
align: 'center',
dataIndex: 'createBy'
},
{
title: '日期',
align: 'center',
dataIndex: 'billDate'
},
{
title: '金额(元)',
align: 'center',
dataIndex: 'invoiceAmount'
},
{
title: '票号',
align: 'center',
dataIndex: 'billNo'
},
{
title: '项目',
align: 'center',
dataIndex: 'chargeCompanyName'
dataIndex: 'contractNum'
},
{
title: '邮寄人',
align: 'center',
dataIndex: 'liaisonMan'
},
{
title: '快递',
align: 'center',
dataIndex: 'sendMethod'
dataIndex: 'createBy'
},
{
title: '快递单号',
@@ -137,10 +114,31 @@ export default {
scopedSlots: { customRender: 'action' }
}
],
logisticsInfoList: []
contractDetail: {}, // 合同信息
// 邮寄信息
logisticsInfoList: [],
associatedProjectList: [], // 关联项目信息
// 合同id
contractId: ''
}
},
methods: {
/**
* 获取详情信息
*/
initDetailData() {
this.loading = true
this.logisticsInfoList = []
getContractDetailById({ id: this.contractId }).then(res => {
res.result.payMailContract.contractNum = res.result.contractNum
this.logisticsInfoList.push(res.result.payMailContract)
this.associatedProjectList = res.result.listProject
this.contractDetail = res.result
console.log(this.logisticsInfoList, this.associatedProjectList, this.contractDetail)
}).finally(() => {
this.loading = false
})
},
lookLogistics() {
window.open('https://www.ems.com.cn/', '_blank')
},
@@ -149,6 +147,7 @@ export default {
},
open() {
this.visible = true
this.initDetailData()
},
close() {
this.visible = false