Files
income_payments_enterprise_…/src/views/workTeam/WorkTeam.vue
T
2021-09-30 14:49:19 +08:00

174 lines
5.7 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" show-meeting-btn button-text="工作组会议" @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}">
<div @click="openDetailModal(record)" class="project-name">
{{ record.chargeProject }}
</div>
</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>
<project-detail-modal ref="projectDetail"></project-detail-modal>
</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'
export default {
name: 'WorkTeam',
components: { ProjectTable, ProjectDetailModal, StatusSlot },
mixins: [JeroListMixin],
data() {
return {
columns: [
{
title: '',
dataIndex: 'chargeProject',
scopedSlots: 'projectName',
col: 4
}, {
title: '应付金额',
dataIndex: 'receivableAmount',
scopedSlots: 'text',
col: 4
}, {
title: '实付金额',
dataIndex: 'paidAmount',
scopedSlots: 'text',
col: 3
}, {
title: '负责人',
dataIndex: '',
scopedSlots: 'text',
col: 3
}, {
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/payWorkingGroupSubitem/queryCompanyPageList'
}
}
},
methods: {
/**
* 分页变化获取数据
* @param pagination
*/
handlePageChange(pagination) {
this.ipagination.current = pagination.current
this.ipagination.pageSize = pagination.pageSize
this.loadData()
}
}
}
</script>
<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>