我的合同,资料下载

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