项目详情修改

This commit is contained in:
zhaoxiao
2021-10-09 15:07:43 +08:00
parent 284fd5f687
commit d02b028949
6 changed files with 163 additions and 152 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import { getAction, postAction } from '@api/manage'
// 普通项目管理-通过项目id查询其他的信息
const queryCommonProjectById = (param) => getAction('/project/payCommonProject/queryById', param)
const queryCommonProjectById = (param) => getAction('/project/payCommonProject/queryCompanyById', param)
// 通过会议id获取会议的详细信息
const getMeetInfoById = (params) => getAction('/meeting/payMeeting/queryById',params)
// 通过id获取参会人详细信息
+21 -18
View File
@@ -1,17 +1,19 @@
<template>
<!-- 父组件的文件id如果是异步获取的 需要加上v-if判断-->
<div style="display: inline-block">
<span v-for="(item) of fileList" :key="item.id">{{ item.name +' ' }}
<span class="m-l-4 color-blue" @click="handleDownLoad(item)">下载</span> <span class="m-l-4 color-blue" @click="handlePreview(item)">查看</span>
</span>
</div>
<div style="display: inline-block">
<!-- 2021-10-09 author:zx 把span换成了div实现多个文件显示换行-->
<div v-for="(item) of fileList" :key="item.id">{{ item.name + ' ' }}
<span class="m-l-4 color-blue" @click="handleDownLoad(item)">下载</span>
<span class="m-l-4 color-blue" @click="handlePreview(item)">查看</span>
</div>
</div>
</template>
<script>
import Vue from 'vue'
import {ACCESS_TOKEN} from '@/store/mutation-types'
import {getFileInfo} from '@/api/api'
import {downloadFile} from '@api/manage'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import { getFileInfo } from '@/api/api'
import { downloadFile } from '@api/manage'
// eslint-disable-next-line
const Base64 = require('js-base64').Base64
@@ -30,7 +32,7 @@ export default {
data() {
return {
fileInfo: {},
fileList: [],
fileList: []
}
},
mounted() {
@@ -51,7 +53,7 @@ export default {
getFileInfo(id) {
return new Promise(resolve => {
let result = {}
getFileInfo({id: id}).then(res => {
getFileInfo({ id: id }).then(res => {
if (res.success) {
result = res.result
}
@@ -64,31 +66,31 @@ export default {
* 获取文件信息
* */
async initFileList(fileIds) {
if(fileIds){
if (fileIds) {
const fileList = []
let arr = fileIds.split(',')
for (let i = 0; i < arr.length; i++) {
let fileObj = {}
fileObj = await this.getFileInfo(arr[i])
fileList.push({id: fileObj.id, name: fileObj.fileName})
fileList.push({ id: fileObj.id, name: fileObj.fileName })
}
this.fileList = [...fileList]
}else {
} else {
this.fileList = []
}
},
handleDownLoad(file){
handleDownLoad(file) {
console.log(file)
downloadFile(`sys/common/download/${file.id}`, file.name)
downloadFile(`sys/common/download/${ file.id }`, file.name)
},
handlePreview(file) {
if (file && file.id) {
const fileFullUrl = `${window._CONFIG['domianWebSocketURL']}/sys/common/download/${file.id}?token=${Vue.ls.get(ACCESS_TOKEN)}&fullfilename=${file.name}`
let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(Base64.encode(fileFullUrl))}`
const fileFullUrl = `${ window._CONFIG['domianWebSocketURL'] }/sys/common/download/${ file.id }?token=${ Vue.ls.get(ACCESS_TOKEN) }&fullfilename=${ file.name }`
let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(Base64.encode(fileFullUrl)) }`
// let url = `${window._CONFIG['onlinePreviewDomainURL']}?url=${encodeURIComponent(fileFullUrl)}`
window.open(url)
}
},
}
}
}
</script>
@@ -98,6 +100,7 @@ export default {
color: #069f99 !important;
cursor: pointer;
}
.m-l-4 {
margin-left: 4px;
}
+110 -117
View File
@@ -10,106 +10,74 @@
<section class="base-info">
<h3 class="title">基本信息</h3>
<a-row :gutter="24">
<a-col :span="12">
<label>项目名称</label>
<span><j-ellipsis :value="basicInfo.chargeProject" :length="20"></j-ellipsis></span>
</a-col>
<!-- 我的项目--款项用途-->
<a-col :span="12" v-if="projectType === 1">
<label>款项用途</label>
<span><j-ellipsis :value="basicInfo.chargeWay_dictText" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12">
<label>项目负责人</label>
<span><j-ellipsis :value="basicInfo.principalName" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12">
<label>金额</label>
<span><j-ellipsis :value="basicInfo.receivableAmount" :length="20"></j-ellipsis></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>备注</label>
<span><j-ellipsis :value="basicInfo.remarks" :length="20"></j-ellipsis></span>
</a-col>
</a-row>
<!-- 来款方式为合同的显示-->
<a-row :gutter="24" v-if="!!basicInfo.contractNum">
<a-col :span="12">
<label>{{createIncomeType(basicInfo.projectType)}}</label>
<span>{{ basicInfo.chargeWay_dictText }}</span>
<label>金额</label>
<span><j-ellipsis :value="`${basicInfo.receivableAmount}元`" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12">
<label>合同编号</label>
<span class="contract-num" @click="toContractDetail">{{ basicInfo.contractNum }}</span>
<label>实付金额</label>
<span><j-ellipsis :value="`${basicInfo.paidAmount}元`" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12">
<label>打包</label>
<span><j-ellipsis :value="basicInfo.pack_dictText" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12">
<label>需要发票</label>
<span><j-ellipsis :value="basicInfo.needInvoice_dictText" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12">
<label>付款方式</label>
<span><j-ellipsis :value="basicInfo.chargeWay_dictText" :length="20"></j-ellipsis></span>
</a-col>
<!-- 合同-->
<a-col :span="12" v-if="basicInfo.chargeWay === 2">
<label>合同号</label>
<span class="contract-num" @click="toContractDetail"><j-ellipsis :value="basicInfo.contractNum"
:length="20"></j-ellipsis></span>
</a-col>
<!-- 收费通知-->
<a-col :span="12" v-if="basicInfo.chargeWay === 3">
<label>收费通知号</label>
<span><j-ellipsis :value="basicInfo.chargeNoticeNo" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12" v-if="basicInfo.chargeWay === 3">
<label>收费通知</label>
<span><preview-file :file-id="basicInfo.chargeNoticeId"></preview-file></span>
</a-col>
<!-- 我的项目--项目资料-->
<a-col :span="12" class="files" v-if="projectType === 1">
<label>项目资料</label>
<div>
<preview-file :file-id="basicInfo.files"></preview-file>
</div>
</a-col>
</a-row>
</section>
<!-- 基本信息end-->
<!-- 企业信息begin-->
<section class="enterprise-info">
<h3 class="title">企业信息</h3>
<a-row :gutter="24">
<a-col :span="12">
<label>来款企业</label>
<span><j-ellipsis :value="basicInfo.companyName" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12">
<label>企业联系人</label>
<span>{{ basicInfo.name }}</span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>企业联系人性别</label>
<span>{{ basicInfo.gender_dictText }}</span>
</a-col>
<a-col :span="12">
<label>企业联系人职务</label>
<span>{{ basicInfo.post }}</span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>企业联系人电话</label>
<span>{{ basicInfo.phone }}</span>
</a-col>
<a-col :span="12">
<label>企业联系人邮箱</label>
<span>{{ basicInfo.email }}</span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>企业联系人邮编</label>
<span>{{ basicInfo.postalCodeContacts }}</span>
</a-col>
<a-col :span="12">
<label>企业联系人地址</label>
<span><j-ellipsis :value="basicInfo.contactAddress" :length="20"></j-ellipsis></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>是否需要发票</label>
<span>{{ basicInfo.needInvoice_dictText }}</span>
</a-col>
<a-col :span="12">
<label>是否打包</label>
<span>{{ basicInfo.pack_dictText }}</span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>企业邮编</label>
<span>{{ basicInfo.postalCodeCompany }}</span>
</a-col>
<a-col :span="12">
<label>企业地址</label>
<span><j-ellipsis :value="basicInfo.companyAddress" :length="20"></j-ellipsis></span>
</a-col>
</a-row>
</section>
<!--企业信息end-->
<!--到账信息begin-->
<section class="payment-info">
<h3 class="title">到账信息</h3>
<section class="payment-info-title">到账信息</section>
<div class="payment-info-content" v-for="item of paymentInfoList" :key="item.id">
{{ item.paymentDate }}到账{{ item.amountReceived }}
</div>
<h3 class="title">付款信息</h3>
<section class="payment-info-title">付款信息</section>
<template v-if="paymentInfoList && paymentInfoList.length > 0">
<div class="payment-info-content" v-for="item of paymentInfoList" :key="item.id">
{{ item.paymentDate }}付款{{ item.amountReceived }}
</div>
</template>
<a-list v-else :data-source="[]" style="margin-top: 30px; border-bottom: 1px solid #d5d5d5;"/>
</section>
<!--到账信息end-->
<!--开票邮寄信息begin-->
@@ -125,8 +93,8 @@
:dataSource="logisticsInfoList"
class="j-table-force-nowrap"
>
<span slot="action" class="action-span-cell">
<a @click="lookLogistics()">查看物流</a>
<span slot="action" slot-scope="record" class="action-span-cell">
<a @click="lookLogistics()" v-if="record.postStatus === 1">查看物流</a>
</span>
<!-- <p slot="expandedRowRender" slot-scope="record" style="margin: 0">-->
<!-- {{ record.sendDate }}-->
@@ -138,12 +106,16 @@
<template slot="footer">
<a-button @click="handleCancel">关闭</a-button>
</template>
<mine-contract-module :visible.sync="contractDetailVisible" :contract-id="contractId"></mine-contract-module>
</j-modal>
</template>
<script>
import {queryCommonProjectById} from '@api/incomePaymentsApi'
import { queryCommonProjectById } from '@api/incomePaymentsApi'
import JEllipsis from '@comp/jero/JEllipsis'
import PreviewFile from '@comp/jero/PreviewFile'
import MineContractModule from '@views/mineContract/modules/MineContractModule'
// import {getAction} from "@api/manage";
const paymentInfoList = [
{
@@ -160,7 +132,7 @@ const paymentInfoList = [
id: 1003,
year: '2021',
money: '200'
},
}
]
const logisticsInfoList = [
{
@@ -180,49 +152,49 @@ const columns = [
{
title: '开票人',
align: 'center',
dataIndex: 'createBy',
dataIndex: 'createBy'
},
{
title: '日期',
align: 'center',
dataIndex: 'billDate',
dataIndex: 'billDate'
},
{
title: '金额(元)',
align: 'center',
dataIndex: 'invoiceAmount',
dataIndex: 'invoiceAmount'
},
{
title: '票号',
align: 'center',
dataIndex: 'billNo',
dataIndex: 'billNo'
},
{
title: '项目',
align: 'center',
dataIndex: 'chargeCompanyName',
dataIndex: 'chargeCompanyName'
},
{
title: '邮寄人',
align: 'center',
dataIndex: 'liaisonMan',
dataIndex: 'liaisonMan'
},
{
title: '快递',
align: 'center',
dataIndex: 'sendMethod',
dataIndex: 'sendMethod'
},
{
title: '快递单号',
align: 'center',
dataIndex: 'postNo',
dataIndex: 'postNo'
},
{
title: '操作',
align: 'center',
dataIndex: '',
scopedSlots: {customRender: 'action'}
},
scopedSlots: { customRender: 'action' }
}
]
export default {
name: 'ProjectDetailModal',
@@ -232,6 +204,12 @@ export default {
type: Boolean,
required: false,
default: false
},
// 项目类型,我的项目--1
projectType: {
type: Number,
required: false,
default: null
}
},
data() {
@@ -253,11 +231,16 @@ export default {
paymentInfoList,
// 开票邮寄信息
logisticsInfoList,
// 合同详情
contractDetailVisible: false,
contractId: ''
}
},
computed: {},
components: {
JEllipsis
JEllipsis,
PreviewFile,
MineContractModule
},
methods: {
open(record) {
@@ -269,7 +252,7 @@ export default {
this.currentProjectId = record.id
}
// 通过id查询项目详情
queryCommonProjectById({id: this.currentProjectId}).then(res => {
queryCommonProjectById({ id: this.currentProjectId }).then(res => {
if (res.success) {
console.log(res.result, 'res.result')
// 项目信息
@@ -282,7 +265,6 @@ export default {
console.log('未查到相应的信息')
}
})
},
handleCancel() {
this.visible = false
@@ -301,7 +283,7 @@ export default {
}
})
}
return `${item.person}${item.time}开票,金额为:${item.money}元,票号:${item.piaoNo},项目:${porjectItem}`
return `${ item.person }${ item.time }开票,金额为:${ item.money }元,票号:${ item.piaoNo },项目:${ porjectItem }`
},
/*
* 查看物流
@@ -313,13 +295,15 @@ export default {
* 去合同详情 传入合同id
* */
toContractDetail() {
if(this.basicInfo.contractId){
this.$router.push({
path: '/contractManagement/RevenueContractDetail', query: {
revenueId: this.basicInfo.contractId
}
})
}else {
if (this.basicInfo.contractId) {
this.contractId = this.basicInfo.contractId
this.contractDetailVisible = true
// this.$router.push({
// path: '/contractManagement/RevenueContractDetail', query: {
// revenueId: this.basicInfo.contractId
// }
// })
} else {
this.$message.warn('该项目未与合同关联')
}
},
@@ -328,12 +312,10 @@ export default {
* */
createIncomeType(val) {
if (val === 1 || val === 2 || val === 4) {
return '来款方式'
}else {
return '缴费方式'
return '来款方式'
} else {
return '缴费方式'
}
}
}
}
@@ -367,6 +349,17 @@ h3.title::before {
background: #069f99;
}
/*基本信息*/
.base-info {
.ant-col {
margin: 3px 0;
}
.files {
display: flex;
}
}
/* 到账信息 */
.payment-info {
margin-bottom: 14px;
+8 -5
View File
@@ -27,7 +27,8 @@
<project-table :column-data="columns" :table-data="dataSource" @change="handlePageChange">
<!-- 打包需要发票到账开票邮寄-->
<template v-slot:status="{record, text}">
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="payMailContract" :get-info-func="getContractDetailById"></status-slot>
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="payMailContract"
:get-info-func="getContractDetailById"></status-slot>
</template>
<!-- 项目名称-->
<template v-slot:projectName="{record, text}">
@@ -55,7 +56,7 @@
<!-- 表格区域end-->
</a-card>
<mine-contract-module ref="detail"></mine-contract-module>
<mine-contract-module :visible.sync="detailVisible" :contract-id="contractId"></mine-contract-module>
</div>
</template>
<script>
@@ -101,7 +102,9 @@ export default {
],
url: {
list: '/contract/payIncomeContract/queryCompanyPageList'
}
},
contractId: '',
detailVisible: false,
}
},
methods: {
@@ -116,8 +119,8 @@ export default {
this.loadData()
},
openDetail(record) {
this.$refs.detail.contractId = record.id
this.$refs.detail.open()
this.contractId = record.id
this.detailVisible = true
}
}
}
@@ -77,6 +77,7 @@
</a-table>
</div>
</a-spin>
<project-detail-modal ref="projectDetail"></project-detail-modal>
</j-modal>
</template>
@@ -88,11 +89,28 @@ import ProjectDetailModal from '@views/MessagePage/ProjectDetailModal'
export default {
name: 'MineContractModule',
components: { ProjectDetailModal },
props: {
visible: {
type: Boolean,
default: false
},
// 合同id
contractId: {
type: String,
default: ''
}
},
watch: {
visible(val) {
if (val) {
this.initDetailData()
}
}
},
data() {
return {
title: '合同信息',
width: 800,
visible: false,
loading: false,
columns: [
{
@@ -120,9 +138,7 @@ export default {
contractDetail: {}, // 合同信息
// 邮寄信息
logisticsInfoList: [],
associatedProjectList: [], // 关联项目信息
// 合同id
contractId: ''
associatedProjectList: [] // 关联项目信息
}
},
methods: {
@@ -137,7 +153,6 @@ export default {
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
})
@@ -146,6 +161,7 @@ export default {
* 打开项目详情模态框
* */
openDetailModal(record) {
console.log(this.contractId)
console.log(record)
// 用projectId替换id
let param = JSON.parse(JSON.stringify(record))
@@ -158,12 +174,8 @@ export default {
handleCancel() {
this.close()
},
open() {
this.visible = true
this.initDetailData()
},
close() {
this.visible = false
this.$emit('update:visible', false)
}
}
}
+1 -1
View File
@@ -80,7 +80,7 @@
<!-- 表格区域end-->
</a-card>
<project-detail-modal ref="projectDetail"></project-detail-modal>
<project-detail-modal ref="projectDetail" :project-type="1"></project-detail-modal>
</div>
</template>
<script>