Files
income_payments_enterprise_…/src/views/mineProject/MineProject.vue
T

193 lines
6.4 KiB
Vue

<template>
<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.chargeProject" :maxLength="50"></a-input>
</a-form-item>
</a-col>
<!-- <a-col :xl="6" :lg="8" :md="8" :sm="24">-->
<!-- <a-form-item label="需要发票">-->
<!-- <j-dict-select-tag dict-code="invoice_type" placeholder="请选择是否需要发票"-->
<!-- v-model="queryParam.needInvoice"></j-dict-select-tag>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<!-- <a-col :xl="6" :lg="8" :md="8" :sm="24">-->
<!-- <a-form-item label="打包项目">-->
<!-- <j-dict-select-tag dict-code="yn" placeholder="请选择是否打包"-->
<!-- v-model="queryParam.pack"></j-dict-select-tag>-->
<!-- </a-form-item>-->
<!-- </a-col>-->
<a-col :xl="6" :lg="8" :md="8" :sm="24">
<a-form-item label="运行年份">
<j-year-date style="width:100%" placeholder="请选择运行年份" v-model="queryParam.year"></j-year-date>
</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-table
ref="table"
rowKey="id"
size="middle"
:scroll="{x: 1200}"
:columns="columns"
:dataSource="dataSource"
:pagination="ipagination"
:loading="loading"
@change="handleTableChange"
class="j-table-force-nowrap">
<!-- 项目名称-->
<template slot="projectName" slot-scope="text, record">
<j-ellipsis :value="text" :length="20" class="project-name" @click="openDetailModal(record)"></j-ellipsis>
</template>
<template slot="text" slot-scope="text, record">
<j-ellipsis :value="text" :length="20"></j-ellipsis>
</template>
<!-- 缴费凭证-->
<span slot="action" class="action-span-cell" slot-scope="text,record">
<a @click="paymentVoucher(record)" :disabled="Number(record.receivableAmount) === 0">申请开票</a>
</span>
</a-table>
</div>
<!-- 表格区域end-->
</a-card>
<project-detail-modal ref="projectDetail" @openContractModule="handleOpenContractModule"></project-detail-modal>
<mine-contract-module :contract-id="contractId" :visible.sync="contractModuleVisible"
@openProjectDetail="openDetailModal"></mine-contract-module>
</div>
</template>
<script>
import { JeroListMixin } from '@/mixins/JeroListMixin'
import ProjectDetailModal from '@views/MessagePage/ProjectDetailModal'
import MineContractModule from '@views/mineContract/modules/MineContractModule'
import JYearDate from '@comp/jero/JYearDate'
export default {
name: 'MineProject',
components: { ProjectDetailModal, MineContractModule, JYearDate },
mixins: [JeroListMixin],
data() {
return {
columns: [
{
title: '序号',
dataIndex: '',
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function (t, r, index) {
return parseInt(index) + 1
}
}, {
title: '项目名称',
dataIndex: 'chargeProject',
align: 'center',
scopedSlots: { customRender: 'projectName' }
}, {
title: '项目负责人',
dataIndex: 'principalName',
align: 'center',
scopedSlots: { customRender: 'text' }
}, {
title: '负责人联系电话',
dataIndex: 'principalPhone',
align: 'center',
scopedSlots: { customRender: 'text' }
}, {
title: '负责人邮箱',
dataIndex: 'principalEmail',
align: 'center',
scopedSlots: { customRender: 'text' }
}, {
title: '缴费凭证状态',
dataIndex: 'paymentStatus_dictText',
align: 'center',
width: 180,
scopedSlots: { customRender: 'text' }
}, {
title: '操作',
dataIndex: 'action',
align: 'center',
fixed: 'right',
width: 160,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: '/project/payCommonProject/queryCompanyPageList'
},
contractId: null,
contractModuleVisible: false,
disableMixinCreated: true
}
},
created() {
this.queryParam = {
year: this.getCurrentYear()
}
this.lastQueryParam = {
year: this.getCurrentYear()
}
this.loadData()
},
methods: {
/**
* 打开收入合同详情
* @param contractId
*/
handleOpenContractModule(contractId) {
this.contractId = contractId
this.contractModuleVisible = true
},
/**
* 缴费凭证
* @param record
*/
paymentVoucher(record) {
this.$router.push({
path: '/MessagePage/PaymentVoucher',
query: {
projectId: record.id,
projectName: record.chargeProject,
projectType: 1
}
})
},
searchReset() {
this.queryParam = {
year: this.getCurrentYear()
}
this.lastQueryParam = {
year: this.getCurrentYear()
}
this.loadData(1)
},
getCurrentYear() {
return new Date().getFullYear().toString()
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>