我的合同,资料下载

This commit is contained in:
zhaoxiao
2021-09-30 11:44:06 +08:00
parent 4c0b98922e
commit bc81346d20
8 changed files with 329 additions and 24 deletions
+4 -1
View File
@@ -11,6 +11,8 @@ const getContactUserInfo = (param) => getAction('/company/payContactsManagement/
const editUserInfo = (param) => postAction('/company/payContactsManagement/companyEdit', param)
// 获取分标委详情
const getSubBidCommitteeDetail = (param) => getAction('/payCaseCommittee/payCaseCommittee/detail', param)
// 资料下载--批量下载
const batchDownloadFile = (param) => getAction('/project/payWorkingGroupDistributionRecord/zipFile', param)
export {
queryCommonProjectById,
@@ -18,5 +20,6 @@ export {
getSingUpUserInfo,
getContactUserInfo,
editUserInfo,
getSubBidCommitteeDetail
getSubBidCommitteeDetail,
batchDownloadFile
}
+12
View File
@@ -107,4 +107,16 @@
.main-box {
min-width: 1100px;
margin: 12px 12px 0 12px;
}
// 封装的列表组件中项目名称的样式
.project-name {
cursor: pointer;
font-size: 16px;
font-family: PingFang SC, PingFang SC-Bold;
font-weight: 700;
color: #069f99;
overflow: hidden;
word-break: keep-all;
text-overflow: ellipsis;
}
+21 -5
View File
@@ -33,7 +33,7 @@
size="middle"
ref="table"
bordered
rowKey="id"
rowKey="fileId"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
@@ -52,7 +52,7 @@
<j-ellipsis :value="text" :length="20"></j-ellipsis>
</template>
<span slot="action" class="action-span-cell" slot-scope="text, record" >
<span slot="action" class="action-span-cell" slot-scope="text, record">
<a @click="downloadFile(record)">下载</a>
</span>
</a-table>
@@ -62,7 +62,8 @@
</template>
<script>
import { JeroListMixin } from '@/mixins/JeroListMixin'
import { downloadFile } from '@api/manage'
import { downloadFile, downloadFileByA } from '@api/manage'
import { batchDownloadFile } from '@api/incomePaymentsApi'
export default {
name: 'DataDownload',
@@ -117,12 +118,27 @@ export default {
}
},
methods: {
/**
* 下载文件
* @param record
*/
downloadFile(record) {
console.log(record.fileId, record.fileName)
downloadFile(`sys/common/download/${record.fileId}`, record.fileName)
downloadFile(`sys/common/download/${ record.fileId }`, record.fileName)
},
/**
* 批量下载
*/
batchDownloadFile() {
// 获取文件名称
let fileName = ''
let firstFile = this.dataSource.filter(tt => tt.fileId === this.selectedRowKeys[0])
fileName = `${firstFile[0].fileName}等${this.selectedRowKeys.length}个文件`
let fileIdStr = this.selectedRowKeys.join(',')
batchDownloadFile({ ids: fileIdStr }).then(res => {
// 调用a标签下载文件的方法
downloadFileByA(res, fileName)
})
}
}
}
+114 -4
View File
@@ -1,13 +1,123 @@
<template>
<div>我的合同</div>
<div class="main-box">
<a-card :bordered="false">
<!--查询区域begin-->
<div class="table-page-search-wrapper">
<a-form layout="inline" @keyup.enter.native="searchQuery">
<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-form-item>
</a-col>
<a-col :xl="6" :lg="8" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button class="reset-button" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
</span>
</a-col>
</a-row>
</a-form>
</div>
<!--查询区域end-->
<!-- 表格区域-->
<div>
<a-spin :spinning="loading">
<project-table :column-data="columns" :table-data="dataSource" @change="handlePageChange">
<!-- 打包、需要发票、到账、开票、邮寄-->
<template v-slot:status="{record, text}">
<div @click="d(record)">{{ text }}</div>
</template>
<!-- 项目名称-->
<template v-slot:projectName="{record}">
<a-tooltip>
<template slot="title">
{{ record.chargeProject }}
</template>
<div @click="openDetail(record)" class="project-name">
{{ record.chargeProject }}
</div>
</a-tooltip>
</template>
<!-- 需要tooltip的文本-->
<template v-slot:text="{record,text}">
<a-tooltip>
<template slot="title">
{{ text }}
</template>
{{ text }}
</a-tooltip>
</template>
</project-table>
</a-spin>
</div>
<!-- 表格区域end-->
</a-card>
<mine-contract-module ref="detail"></mine-contract-module>
</div>
</template>
<script>
import { JeroListMixin } from '@/mixins/JeroListMixin'
import ProjectTable from '@comp/table/ProjectTable'
import MineContractModule from '@views/mineContract/modules/MineContractModule'
export default {
name: 'MineContract',
components: { ProjectTable, MineContractModule },
mixins: [JeroListMixin],
data() {
return {}
return {
columns: [
{
title: '',
dataIndex: 'chargeProject',
scopedSlots: 'projectName',
col: 6
}, {
title: '合同名称',
dataIndex: 'chargeUse_dictText',
scopedSlots: 'text',
col: 6
}, {
title: '合同金额',
dataIndex: 'receivableAmount',
scopedSlots: 'text',
col: 5
}, {
title: '负责人',
dataIndex: 'principalName',
scopedSlots: 'text',
col: 5
}, {
title: '邮寄',
dataIndex: 'mail',
scopedSlots: 'status',
col: 2
}
],
url: {
list: ''
}
}
},
methods: {}
methods: {
/**
* 分页变化获取数据
* @param pagination
*/
handlePageChange(pagination) {
this.ipagination.current = pagination.current
this.ipagination.pageSize = pagination.pageSize
this.loadData()
},
openDetail() {
this.$refs.detail.open()
}
}
}
</script>
<style scoped lang="less"></style>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
@@ -0,0 +1,174 @@
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@cancel="handleCancel"
cancelText="关闭">
<a-spin :spinning="loading">
<div>
<h3 class="title">基本信息</h3>
<a-row>
<a-col :span="12">
<a-row>
<a-col :span="6">合同编号:</a-col>
<a-col :span="18">
<j-ellipsis :value="title" :length="20"></j-ellipsis>
</a-col>
</a-row>
</a-col>
<a-col :span="12">
<a-row>
<a-col :span="6">合同名称:</a-col>
<a-col :span="18">
<j-ellipsis :value="title" :length="20"></j-ellipsis>
</a-col>
</a-row>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-row>
<a-col :span="6">负责人:</a-col>
<a-col :span="18">
<j-ellipsis :value="title" :length="20"></j-ellipsis>
</a-col>
</a-row>
</a-col>
<a-col :span="12">
<a-row>
<a-col :span="6">合同金额:</a-col>
<a-col :span="18">
<j-ellipsis :value="title" :length="20"></j-ellipsis>
</a-col>
</a-row>
</a-col>
</a-row>
<a-row>
<a-col>
<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>-->
</a-col>
</a-row>
</a-col>
</a-row>
</div>
<h3 class="title">合同邮寄信息</h3>
<div class="wrap-table">
<a-table
ref="table"
size="middle"
rowKey="id"
:pagination="false"
:columns="columns"
:dataSource="logisticsInfoList"
class="j-table-force-nowrap"
>
<span slot="action" class="action-span-cell">
<a @click="lookLogistics()">查看物流</a>
</span>
</a-table>
</div>
</a-spin>
</j-modal>
</template>
<script>
export default {
name: 'MineContractModule',
data() {
return {
title: '合同信息',
width: 800,
visible: false,
loading: false,
columns: [
{
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'
},
{
title: '邮寄人',
align: 'center',
dataIndex: 'liaisonMan'
},
{
title: '快递',
align: 'center',
dataIndex: 'sendMethod'
},
{
title: '快递单号',
align: 'center',
dataIndex: 'postNo'
},
{
title: '操作',
align: 'center',
dataIndex: '',
scopedSlots: { customRender: 'action' }
}
],
logisticsInfoList: []
}
},
methods: {
lookLogistics() {
window.open('https://www.ems.com.cn/', '_blank')
},
handleCancel() {
this.close()
},
open() {
this.visible = true
},
close() {
this.visible = false
}
}
}
</script>
<style scoped lang="less">
h3 {
position: relative;
}
h3.title::before {
position: absolute;
top: 4px;
left: -10px;
content: "";
height: 20px;
width: 2px;
background: #069f99;
}
</style>
-10
View File
@@ -157,14 +157,4 @@ export default {
<style scoped lang="less">
@import '~@assets/less/common.less';
.project-name {
cursor: pointer;
font-size: 16px;
font-family: PingFang SC, PingFang SC-Bold;
font-weight: 700;
color: #069f99;
overflow: hidden;
word-break: keep-all;
text-overflow: ellipsis;
}
</style>
@@ -21,9 +21,9 @@
<a-row>
<a-col :span="3">项目资料:</a-col>
<a-col :span="18">
<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 fileList" :key="index">
<div class="file-name" @click="handlePreview(item)">{{ item.name }}</div>
</span>
</a-col>
</a-row>
</a-col>
+1 -1
View File
@@ -37,7 +37,7 @@
<!-- 表格区域-->
<div>
<a-spin :spinning="loading">
<project-table :column-data="columns" :table-data="dataSource" @change="handlePageChange">
<project-table :column-data="columns" :table-data="dataSource" show-meeting-btn button-text="工作组会议" @change="handlePageChange">
<!-- 打包、需要发票、到账、开票、邮寄-->
<template v-slot:status="{record, text}">
<div @click="d(record)">{{ text }}</div>