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

190 lines
6.5 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"></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">
<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-pack="{record, text}">
<status-slot :statu-obj="record" :status-no="text"></status-slot>
</template>
<!-- 到账-->
<template v-slot:status="{record, text}">
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
</template>
<!-- 开票-->
<template v-slot:status-bill="{record, text}">
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="bill"></status-slot>
</template>
<!-- 邮寄-->
<template v-slot:status-mail="{record, text}">
<status-slot :statu-obj="record" :status-no="text" :status-type="true" status-key="mail"></status-slot>
</template>
<!-- 项目名称-->
<template v-slot:projectName="{record}">
<a-tooltip>
<template slot="title">
{{ record.chargeProject }}
</template>
<div @click="openDetailModal(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>
<!-- 金额-->
<template v-slot:money="{record,text}">
<a-tooltip>
<template slot="title">
{{ text }}元
</template>
{{ text }}元
</a-tooltip>
</template>
</project-table>
</a-spin>
</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 ProjectTable from '@comp/table/ProjectTable'
import ProjectDetailModal from '@views/MessagePage/ProjectDetailModal'
import StatusSlot from '@comp/tools/StatusSlot'
import MineContractModule from '@views/mineContract/modules/MineContractModule'
export default {
name: 'MineProject',
components: { ProjectTable, ProjectDetailModal, StatusSlot, MineContractModule },
mixins: [JeroListMixin],
data() {
return {
columns: [
{
title: '',
dataIndex: 'chargeProject',
scopedSlots: 'projectName',
col: 3
}, {
title: '项目用途',
dataIndex: 'chargeUse_dictText',
scopedSlots: 'text',
col: 3
}, {
title: '应付金额',
dataIndex: 'receivableAmount',
scopedSlots: 'money',
col: 3
}, {
title: '实付金额',
dataIndex: 'paidAmount',
scopedSlots: 'money',
col: 3
}, {
title: '负责人',
dataIndex: 'principalName',
scopedSlots: 'text',
col: 2
}, {
title: '打包',
dataIndex: 'pack',
scopedSlots: 'status-pack',
col: 2
}, {
title: '需要发票',
col: 2,
dataIndex: 'needInvoice',
scopedSlots: 'status-pack',
slot: 'status'
}, {
title: '到账',
dataIndex: 'inAccount',
scopedSlots: 'status',
col: 2
}, {
title: '开票',
dataIndex: 'makeInvoice',
scopedSlots: 'status-bill',
col: 2
}, {
title: '邮寄',
dataIndex: 'mail',
scopedSlots: 'status-mail',
col: 2
}
],
url: {
list: '/project/payCommonProject/queryCompanyPageList'
},
contractId: null,
contractModuleVisible: false
}
},
methods: {
/**
* 分页变化获取数据
* @param pagination
*/
handlePageChange(pagination) {
this.ipagination.current = pagination.current
this.ipagination.pageSize = pagination.pageSize
this.loadData()
},
handleOpenContractModule(contractId) {
this.contractId = contractId
this.contractModuleVisible = true
}
}
}
</script>
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>