327 lines
9.3 KiB
Vue
327 lines
9.3 KiB
Vue
<template>
|
|
<j-modal :title="title"
|
|
:width="width"
|
|
:visible="visible"
|
|
:confirmLoading="confirmLoading"
|
|
switchFullscreen
|
|
@ok="handleOk"
|
|
@cancel="handleCancel"
|
|
cancelText="关闭">
|
|
<div class="table-page-search-wrapper">
|
|
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
|
<a-row>
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
<a-form-item label="会议名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<a-input placeholder="请输入会议名称" v-model="queryParam.workingGroupProject"></a-input>
|
|
</a-form-item>
|
|
</a-col>
|
|
<a-col :xl="12" :lg="11" :md="12" :sm="24">
|
|
<a-form-item label="会议时间">
|
|
<j-date
|
|
placeholder="请选择开始日期"
|
|
class="query-group-cust"
|
|
v-model="queryParam.startTime"
|
|
:disabled-date="disabledStartCreateDate">
|
|
</j-date>
|
|
<span class="query-group-split-cust"></span>
|
|
<j-date
|
|
placeholder="请选择结束日期"
|
|
class="query-group-cust"
|
|
v-model="queryParam.endTime"
|
|
:disabled-date="disabledEndCreateDate">
|
|
</j-date>
|
|
</a-form-item>
|
|
</a-col>
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
<a-form-item label="年份">
|
|
<j-year-date style="width: 100%" placeholder="请选择年份" v-model="queryParam.particularYear"></j-year-date>
|
|
</a-form-item>
|
|
</a-col>
|
|
|
|
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
|
<span class="table-page-search-submitButtons">
|
|
<a-button type="primary" icon="search" @click="searchQuery">查询</a-button>
|
|
<a-button icon="reload" @click="searchReset" class="reset-button">重置</a-button>
|
|
</span>
|
|
</a-col>
|
|
</a-row>
|
|
</a-form>
|
|
</div>
|
|
|
|
<!-- 操作按钮区域-->
|
|
<div class="table-operator">
|
|
<a-button type="primary" icon="plus" @click="handleAdd">新增</a-button>
|
|
</div>
|
|
<!-- 操作按钮区域-end-->
|
|
|
|
<!-- 表格区域-->
|
|
<div>
|
|
<a-table
|
|
ref="table"
|
|
size="middle"
|
|
bordered
|
|
rowKey="id"
|
|
:scroll="{x: 800}"
|
|
:columns="columns"
|
|
:dataSource="dataSource"
|
|
:pagination="false"
|
|
:loading="loading"
|
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
@change="handleTableChange"
|
|
class="j-table-force-nowrap">
|
|
|
|
<template slot="text" slot-scope="text">
|
|
<j-ellipsis v-if="text && text.length > 0" :value="text" :length="18"></j-ellipsis>
|
|
<span v-else></span>
|
|
</template>
|
|
|
|
<!-- 打包、需要发票、到账、开票、邮寄状态-->
|
|
<template slot="status" slot-scope="text,record">
|
|
<status-slot :statu-obj="record" :status-no="text" :status-type="true"></status-slot>
|
|
</template>
|
|
|
|
<template slot="status-pack" slot-scope="text,record">
|
|
<status-slot :statu-obj="record" :status-no="text"></status-slot>
|
|
</template>
|
|
</a-table>
|
|
</div>
|
|
<!-- /表格区域-->
|
|
<!-- 添加会议参会人-->
|
|
<add-meeting-person ref="modalForm" @ok="modalFormOk"></add-meeting-person>
|
|
</j-modal>
|
|
</template>
|
|
|
|
<script>
|
|
import { JeroListMixin } from '../../../../mixins/JeroListMixin'
|
|
import { associatedProject } from '../../../../api/incomePaymentsApi'
|
|
import JDate from '@comp/tools/JDate'
|
|
import JYearDate from '@comp/jero/JYearDate'
|
|
import JEllipsis from '@comp/jero/JEllipsis'
|
|
import StatusSlot from '@comp/tools/StatusSlot'
|
|
import AddMeetingPerson from '@views/contractManagement/revenueContract/modules/AddMeetingPerson'
|
|
import moment from 'moment'
|
|
import '@/assets/less/TableExpand.less'
|
|
|
|
export default {
|
|
name: 'SelectMeetingProjectModule',
|
|
mixins: [JeroListMixin],
|
|
components:{
|
|
JDate,
|
|
JYearDate,
|
|
StatusSlot,
|
|
JEllipsis,
|
|
AddMeetingPerson
|
|
},
|
|
data() {
|
|
return {
|
|
title: '会议项目列表',
|
|
width: 1200,
|
|
visible: false,
|
|
confirmLoading: false,
|
|
labelCol: {
|
|
xs: { span: 24 },
|
|
sm: { span: 5 }
|
|
},
|
|
wrapperCol: {
|
|
xs: { span: 24 },
|
|
sm: { span: 10 }
|
|
},
|
|
columns: [
|
|
{
|
|
title: '序号',
|
|
dataIndex: '',
|
|
key: 'rowIndex',
|
|
width: 60,
|
|
align: 'center',
|
|
customRender: function (t, r, index) {
|
|
return parseInt(index) + 1
|
|
}
|
|
},
|
|
{
|
|
title: '会议名称',
|
|
align: 'center',
|
|
dataIndex: 'meetingName',
|
|
width: 160,
|
|
scopedSlots: {customRender: 'text'}
|
|
},
|
|
{
|
|
title: '参会单位',
|
|
align: 'center',
|
|
dataIndex: 'companyName',
|
|
width: 260,
|
|
scopedSlots: {customRender: 'text'}
|
|
},
|
|
{
|
|
title: '来款用途',
|
|
align: 'center',
|
|
dataIndex: '',
|
|
width: 80,
|
|
// scopedSlots: {customRender: 'text'}
|
|
},
|
|
{
|
|
title: '参会人员',
|
|
align: 'center',
|
|
dataIndex: 'companyContactName',
|
|
width: 80,
|
|
scopedSlots: {customRender: 'text'}
|
|
},
|
|
{
|
|
title: '应收金额',
|
|
align: 'center',
|
|
dataIndex: 'amountReceivable',
|
|
width: 80,
|
|
scopedSlots: {customRender: 'text'}
|
|
},
|
|
{
|
|
title: '实收金额',
|
|
align: 'center',
|
|
dataIndex: 'paidAmount',
|
|
width: 80,
|
|
scopedSlots: {customRender: 'text'}
|
|
},
|
|
{
|
|
title: '缴费方式',
|
|
align: 'center',
|
|
dataIndex: 'payMode_dictText',
|
|
width: 80,
|
|
scopedSlots: {customRender: 'text'}
|
|
},
|
|
{
|
|
title: '负责人',
|
|
align: 'center',
|
|
dataIndex: '',
|
|
width: 80,
|
|
// scopedSlots: {customRender: 'text'}
|
|
},
|
|
{
|
|
title: '打包',
|
|
align: 'center',
|
|
dataIndex: 'pack',
|
|
width: 80,
|
|
scopedSlots: {customRender: 'status-pack'}
|
|
},
|
|
{
|
|
title: '需要发票',
|
|
align: 'center',
|
|
dataIndex: 'needInvoice',
|
|
scopedSlots: {customRender: 'status-pack'},
|
|
width: 80,
|
|
},
|
|
{
|
|
title: '到账',
|
|
align: 'center',
|
|
dataIndex: 'inAccount',
|
|
scopedSlots: {customRender: 'status'},
|
|
width: 80,
|
|
},
|
|
{
|
|
title: '开票',
|
|
align: 'center',
|
|
dataIndex: 'makeInvoice',
|
|
scopedSlots: {customRender: 'status'},
|
|
width: 80,
|
|
},
|
|
{
|
|
title: '邮寄',
|
|
align: 'center',
|
|
dataIndex: 'mail',
|
|
scopedSlots: {customRender: 'status'},
|
|
width: 80,
|
|
},
|
|
{
|
|
title: '创建时间',
|
|
align: 'center',
|
|
dataIndex: 'createTime',
|
|
width: 160,
|
|
scopedSlots: {customRender: 'text'},
|
|
},
|
|
],
|
|
url: {
|
|
list: '/meeting/payMeetingSituation/page',
|
|
},
|
|
disableMixinCreated: true,
|
|
contractId: '', // 收入合同id
|
|
// 合同信息
|
|
contranctInfo:{},
|
|
// 打包状态
|
|
pack:''
|
|
}
|
|
},
|
|
methods: {
|
|
moment,
|
|
open(record) {
|
|
this.contranctInfo =Object.assign({},record)
|
|
//记录合同id
|
|
this.contractId = this.contranctInfo.id
|
|
// 记录打包状态
|
|
this.pack = this.contranctInfo.pack
|
|
this.loadData()
|
|
this.visible = true
|
|
},
|
|
close() {
|
|
this.queryParam = {}
|
|
this.visible = false
|
|
},
|
|
handleOk() {
|
|
if (this.selectedRowKeys.length <= 0) {
|
|
this.$message.warn('请选择项目后再提交关联')
|
|
return
|
|
}
|
|
let submitData = []
|
|
let projectItem
|
|
this.selectedRowKeys.forEach(item => {
|
|
projectItem = {
|
|
contractId: this.contractId,
|
|
projectId: item,
|
|
projectType: this.projectType
|
|
}
|
|
submitData.push(projectItem)
|
|
})
|
|
associatedProject(submitData).then(res => {
|
|
if (res.success) {
|
|
this.$message.success(res.message)
|
|
this.close()
|
|
this.$emit('ok')
|
|
} else {
|
|
this.$message.warn(res.message)
|
|
}
|
|
})
|
|
},
|
|
handleCancel() {
|
|
this.close()
|
|
},
|
|
/*
|
|
* 打开新增会议参会人员
|
|
* */
|
|
handleAdd(){
|
|
// 传进去一些需要的默认值
|
|
this.$refs.modalForm.open(this.contranctInfo)
|
|
},
|
|
/*
|
|
* 创建时间开始禁用
|
|
* */
|
|
disabledStartCreateDate(startValue) {
|
|
const endValue = this.queryParam.endTime && moment(this.queryParam.endTime, 'YYYY-MM-DD')
|
|
if (!startValue || !endValue) {
|
|
return false
|
|
}
|
|
return startValue.valueOf() > endValue.valueOf()
|
|
},
|
|
/*
|
|
* 创建时间结束禁用
|
|
* */
|
|
disabledEndCreateDate(endValue) {
|
|
const startValue = this.queryParam.startTime && moment(this.queryParam.startTime, 'YYYY-MM-DD')
|
|
if (!endValue || !startValue) {
|
|
return false
|
|
}
|
|
return startValue.valueOf() > endValue.valueOf()
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
@import '~@assets/less/common.less';
|
|
</style> |