Files
income_payments_client/src/components/ProjectDetailModal.vue
T

632 lines
20 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<template>
<j-modal
:title="title"
:width="width"
:visible="visible"
switchFullscreen
@cancel="handleCancel"
cancelText="关闭">
<!-- 基本信息begin-->
<section class="base-info">
<h3 class="title">基本信息</h3>
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>项目负责人</label>
<span><j-ellipsis :value="basicInfo.principalName" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12" class="detail-item">
<label>待确收金额</label>
<span><j-ellipsis :value="`${basicInfo.receivableAmount ? basicInfo.receivableAmount : '0.00'}元`"
:length="20"></j-ellipsis></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>税率</label>
<span><j-ellipsis :value="basicInfo.taxRate_dictText" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12" class="detail-item">
<label>税额</label>
<span><j-ellipsis :value="`${basicInfo.tax ? basicInfo.tax : '0.00'}元`"
:length="20"></j-ellipsis></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>未税金额</label>
<span><j-ellipsis :value="`${basicInfo.noTaxAmount ? basicInfo.noTaxAmount : '0.00'}元`"
:length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12" class="detail-item">
<label>是否需要发票</label>
<span>{{ basicInfo.needInvoice_dictText }}</span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>是否打包</label>
<span>{{ basicInfo.pack_dictText }}</span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col class="detail-item">
<label>备注</label>
<span><j-ellipsis :value="basicInfo.remarks" :length="20"></j-ellipsis></span>
</a-col>
</a-row>
<!-- 来款方式为合同的显示-->
<a-row :gutter="24" v-if="basicInfo.chargeWay === 2">
<a-col :span="12" class="detail-item">
<label>{{ createIncomeType(basicInfo.projectType) }}</label>
<span>{{ basicInfo.chargeWay_dictText }}</span>
</a-col>
<a-col :span="12" class="detail-item">
<label>合同编号</label>
<span class="contract-num" @click="toContractDetail">{{ basicInfo.contractNum }}</span>
</a-col>
</a-row>
<a-row :gutter="24" v-if="basicInfo.chargeWay === 3">
<a-col :span="12" class="detail-item">
<label>收费通知号</label>
<span><j-ellipsis :value="basicInfo.chargeNoticeNo" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12" class="detail-item">
<label>收费通知</label>
<span><preview-file :file-id="basicInfo.chargeNoticeId"></preview-file></span>
</a-col>
</a-row>
<a-row :gutter="24" v-if="basicInfo.files">
<a-col class="detail-item">
<label>项目资料</label>
<span><preview-file :file-id="basicInfo.files"></preview-file></span>
</a-col>
</a-row>
</section>
<!-- 基本信息end-->
<!-- 企业信息begin-->
<section class="enterprise-info">
<h3 class="title">企业信息</h3>
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>来款企业</label>
<span><j-ellipsis :value="basicInfo.companyName" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12" class="detail-item">
<label>信用代码</label>
<span><j-ellipsis :value="basicInfo.dutyCode" :length="20"></j-ellipsis></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>公司地址</label>
<span><j-ellipsis :value="basicInfo.companyAddress" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12" class="detail-item">
<label>公司电话</label>
<span><j-ellipsis :value="basicInfo.companyPhone" :length="20"></j-ellipsis></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>邮编</label>
<span>{{ basicInfo.postalCodeCompany }}</span>
</a-col>
<a-col :span="12" class="detail-item">
<label>银行户名</label>
<span>{{ basicInfo.bankAccountName }}</span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>开户行</label>
<span>{{ basicInfo.openingBank }}</span>
</a-col>
<a-col :span="12" class="detail-item">
<label>银行账号</label>
<span>{{ basicInfo.bankAccount }}</span>
</a-col>
<a-col :span="12" class="detail-item">
<label>联行号</label>
<span>{{ basicInfo.linkBankNumber || '' }}</span>
</a-col>
</a-row>
</section>
<!--企业信息end-->
<!-- 代付企业--第三方垫付 信息 只有会员缴费 和证书缴费的时候存在 begin-->
<section class="enterprise-info" v-if="(basicInfo.projectType === ProjectTypeEnums.STANDARD_MEMBER_PRO.value || basicInfo.projectType === ProjectTypeEnums.STANDARD_CERTIFICATE_PRO.value) && hasOtherCompany">
<h3 class="title">第三方垫付信息</h3>
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>付款单位发票抬头</label>
<span><j-ellipsis :value="otherCompanyInfo.headerName" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12" class="detail-item">
<label>社会统一代码/税号</label>
<span><j-ellipsis :value="otherCompanyInfo.taxNumber" :length="20"></j-ellipsis></span>
</a-col>
</a-row>
<!-- 增值税发票存在的信息较多-->
<template v-if="Number(otherCompanyInfo.invoiceRequirements) === 2">
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>单位地址</label>
<span><j-ellipsis :value="otherCompanyInfo.invoiceAddress" :length="20"></j-ellipsis></span>
</a-col>
<a-col :span="12" class="detail-item">
<label>电话号码</label>
<span><j-ellipsis :value="otherCompanyInfo.invoicePhone" :length="20"></j-ellipsis></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>开户银行</label>
<span>{{ otherCompanyInfo.depositBank }}</span>
</a-col>
<a-col :span="12" class="detail-item">
<label>银行账户</label>
<span>{{ otherCompanyInfo.bankAccount }}</span>
</a-col>
<a-col :span="12" class="detail-item">
<label>联行号</label>
<span>{{ otherCompanyInfo.linkBankNumber || '' }}</span>
</a-col>
</a-row>
</template>
</section>
<!--代付企业--第三方垫付 信息end-->
<!-- 企业联系人信息start-->
<section>
<h3 class="title">企业联系人信息</h3>
<!-- 项目类型不是工作组正常显示一个企业联系人的信息-->
<template v-if="basicInfo.projectType !== 2">
<a-row :gutter="24">
<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" class="detail-item">
<label>企业联系人职务</label>
<span><j-ellipsis :value="basicInfo.post" :length="17"></j-ellipsis></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>企业联系人电话</label>
<span>{{ basicInfo.phone }}</span>
</a-col>
<a-col :span="12" class="detail-item">
<label>企业联系人邮箱</label>
<span>{{ basicInfo.email }}</span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>企业联系人邮编</label>
<span>{{ basicInfo.postalCodeContacts }}</span>
</a-col>
<a-col :span="12" class="detail-item">
<label>企业联系人地址</label>
<span><j-ellipsis :value="basicInfo.contactAddress" :length="17"></j-ellipsis></span>
</a-col>
</a-row>
</template>
<!-- 工作组项目使用循环显示出联系人信息-->
<template v-if="basicInfo.projectType === 2 && basicInfo.payWorkingGroupSubItemContactsList && basicInfo.payWorkingGroupSubItemContactsList.length > 0">
<div v-for="(item, index) in basicInfo.payWorkingGroupSubItemContactsList" :key="index + ''">
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>企业联系人{{ index + 1 }}</label>
<span><j-ellipsis :value="item.contactsTemporaryName" :length="16"></j-ellipsis></span>
</a-col>
<a-col :span="12" class="detail-item">
<label>企业联系人{{ index + 1 }}备注</label>
<span><j-ellipsis :value="item.remarks" :length="16"></j-ellipsis></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<label>企业联系人{{ index + 1 }}性别</label>
<span>{{ item.gender_dictText }}</span>
</a-col>
<a-col :span="12" class="detail-item">
<label>企业联系人{{ index + 1 }}职务</label>
<span><j-ellipsis :value="item.post" :length="16"></j-ellipsis></span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>企业联系人{{ index + 1 }}电话</label>
<span>{{ item.phone }}</span>
</a-col>
<a-col :span="12" class="detail-item">
<label>企业联系人{{ index + 1 }}邮箱</label>
<span>{{ item.email }}</span>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" class="detail-item">
<label>企业联系人{{ index + 1 }}邮编</label>
<span>{{ item.postalCodeContacts }}</span>
</a-col>
<a-col :span="12" class="detail-item">
<label>企业联系人{{ index + 1 }}地址</label>
<span><j-ellipsis :value="item.contactAddress" :length="16"></j-ellipsis></span>
</a-col>
</a-row>
<a-divider v-if="index + 1 !== basicInfo.payWorkingGroupSubItemContactsList.length"/>
</div>
</template>
</section>
<!-- 企业联系人信息end-->
<!--到账信息begin-->
<section class="payment-info">
<h3 class="title">到账信息</h3>
<div class="payment-info-box">
<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="[]"/>
</div>
</section>
<!--到账信息end-->
<!--开票邮寄信息begin-->
<section class="logistics-info">
<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" slot-scope="record">
<a @click="lookLogistics(record)" v-if="record.postStatus === 1">查看物流</a>
</span>
<!-- <p slot="expandedRowRender" slot-scope="record" style="margin: 0">-->
<!-- {{ record.sendDate }}-->
<!-- </p>-->
</a-table>
</div>
</section>
<!--开票邮寄信息end-->
<template slot="footer">
<a-button @click="handleCancel">关闭</a-button>
</template>
</j-modal>
</template>
<script>
import { queryCommonProjectById, getStanderMemberLastProofInfo, getCertificateLastProofInfo } from '@api/incomePaymentsApi'
import JEllipsis from '@comp/jero/JEllipsis'
import PreviewFile from './jero/PreviewFile'
import { ProjectTypeEnums } from '@/enums/commonEnums'
// import pick from 'lodash.pick'
// import {getAction} from "@api/manage";
const columns = [
{
title: '开票人',
align: 'center',
dataIndex: 'realName'
},
{
title: '日期',
align: 'center',
dataIndex: 'billDate'
},
{
title: '金额(元)',
align: 'center',
dataIndex: 'invoiceAmount'
},
{
title: '票号',
align: 'center',
dataIndex: 'billNo'
},
{
title: '项目',
align: 'center',
dataIndex: 'projectName'
},
{
title: '邮寄人',
align: 'center',
dataIndex: 'mailName'
},
{
title: '快递',
align: 'center',
dataIndex: 'sendMethod_dictText'
},
{
title: '快递单号',
align: 'center',
dataIndex: 'postNo'
},
{
title: '操作',
align: 'center',
dataIndex: '',
scopedSlots: { customRender: 'action' }
}
]
export default {
name: 'ProjectDetailModal',
props: {
// 字段名称是否非id,适用于票据邮寄等页面id不是项目id的情况
notId: {
type: Boolean,
required: false,
default: false
},
// 是否是到账开票模块
isInvoicing: {
type: Boolean,
required: false,
default: false
}
},
data() {
return {
description: '项目详情模态框',
width: 800,
visible: false,
title: '项目信息',
// 当前项目id
currentProjectId: '',
// 基本信息
basicInfo: {},
// 企业信息
enterpriseInfo: {},
// 联系人信息
contactsInfo: {},
columns,
// 到账信息
paymentInfoList: [],
// 开票邮寄信息
logisticsInfoList: [],
// 垫付企业的信息
otherCompanyInfo: {},
ProjectTypeEnums
}
},
computed: {
// 是否是第三方代付
hasOtherCompany() {
// 去掉未审核 去判断的企业是否是标协会企业
let companyName = this.basicInfo.companyName.replaceAll('(未审核)','')
return this.isInvoicing && this.otherCompanyInfo.headerName && (this.otherCompanyInfo.headerName !== companyName)
}
},
components: {
JEllipsis,
PreviewFile
},
methods: {
open(record) {
this.visible = true
// 记录当前项目id
if (this.notId) {
this.currentProjectId = record.projectId
} else {
this.currentProjectId = record.id
}
// 通过id查询项目详情
queryCommonProjectById({ id: this.currentProjectId }).then(res => {
if (res.success) {
console.log(res.result, 'res.result')
// 项目信息
this.basicInfo = res.result
// 到账信息
this.paymentInfoList = res.result.paymentRecord
// 开票邮寄信息
this.logisticsInfoList = res.result.mailBill
} else {
console.log('未查到相应的信息')
}
})
// 到账开票模块显示请求发票信息,查看是否是第三方代付
if(this.isInvoicing) {
/* 如果当前项目是会员项目、会员证书项目 需要请求响应的 第三方付款信息*/
let projectType = Number(record.projectType)
if(projectType === ProjectTypeEnums.STANDARD_MEMBER_PRO.value) {
this.getMemberLastProofInfo(record, getStanderMemberLastProofInfo)
} else if(projectType === ProjectTypeEnums.STANDARD_CERTIFICATE_PRO.value){
this.getMemberLastProofInfo(record, getCertificateLastProofInfo)
}
}
},
getMemberLastProofInfo(record, requestFunc) {
let param = {
projectId: record.id
}
requestFunc && requestFunc(param).then(res => {
if (res.success) {
this.otherCompanyInfo = res.result || {}
}
})
},
handleCancel() {
// 清除之前的信息
this.basicInfo = {}
this.enterpriseInfo = {}
this.contactsInfo = {}
this.otherCompanyInfo = {}
this.paymentInfoList = []
this.logisticsInfoLis = []
this.visible = false
},
/*
* 生成每一个开票信息
* */
createItemInfo(item) {
let porjectItem = ''
if (item.projects.length > 0) {
item.projects.forEach((val, index) => {
if (index === item.projects.length - 1) {
porjectItem += val
} else {
porjectItem += val + '、'
}
})
}
return `${ item.person }${ item.time }开票,金额为:${ item.money }元,票号:${ item.piaoNo },项目:${ porjectItem }`
},
/*
* 查看物流
* */
lookLogistics(record) {
console.log(record)
const com = Number(record.sendMethod) === 1 && 'ems' || 'shunfeng'
// window.open(`https://www.kuaidi100.com/chaxun?com=${ com }&nu=${ record.postNo }`)
let url = ''
if (com === 'shunfeng' && record.principalPhone) {
url = `${window._CONFIG['lookExpressDomainURL']}?com=${ com }&nu=${ record.postNo }&phone=${ record.principalPhone }`
} else {
url = `${window._CONFIG['lookExpressDomainURL']}?com=${ com }&nu=${ record.postNo }`
}
window.open(url, '_blank')
},
/*
* 去合同详情 传入合同id
* */
toContractDetail() {
if (this.basicInfo.contractId) {
this.$router.push({
path: '/contractManagement/RevenueContractDetail', query: {
revenueId: this.basicInfo.contractId
}
})
} else {
this.$message.warn('该项目未与合同关联')
}
},
/*
* 每一个项目的来款方式不同
* */
createIncomeType(val) {
if (val === 1 || val === 2 || val === 4) {
return '来款方式'
} else {
return '缴费方式'
}
}
}
}
</script>
<style scoped lang="less">
.ant-row {
margin: 12px;
}
h3 {
position: relative;
}
label {
color: #666;
}
.detail-item {
display: flex;
label {
flex-shrink: 0;
}
span {
word-break: break-all;
display: block;
}
}
.contract-num {
color: #42b983;
cursor: pointer;
}
h3.title::before {
position: absolute;
top: 4px;
left: -10px;
content: "";
height: 20px;
width: 2px;
background: #069f99;
}
/* 到账信息 */
.payment-info {
margin-bottom: 14px;
&-box {
border: 1px solid #ccc;
}
&-title {
text-align: center;
font-size: 14px;
height: 35px;
line-height: 35px;
letter-spacing: 1px;
color: #fff;
background: #a2e6e4;
}
&-content {
border: 1px solid #ccc;
color: #424242;
//background: #efefef;
padding: 5px;
padding-left: 10px;
//border: 1px solid #ccc;
border-top: none;
}
}
/* 开票邮寄信息 */
.wrap-table {
border: 1px solid #ccc;
border-bottom: none;
}
/deep/ .ant-table-thead {
tr > th {
color: #fff;
background: #a2e6e4;
border: none;
}
}
/deep/ .ant-table-tbody {
tr > td {
border: none;
border-bottom: 1px solid #ccc;
}
}
.ant-divider-horizontal {
margin: 5px 0;
}
</style>