358 lines
12 KiB
Vue
358 lines
12 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="10" :lg="10" :md="10" :sm="24" v-if="$route.query.meetingType === '5' || $route.query.meetingType === '6' ">
|
|
<a-form-item label="成员单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<a-input placeholder="请输入成员单位" v-model="queryParam.companyName"></a-input>
|
|
</a-form-item>
|
|
</a-col>
|
|
<!--工作组发布显示这个-->
|
|
<a-col :xl="10" :lg="10" :md="10" :sm="24" v-else>
|
|
<a-form-item label="成员单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<a-input placeholder="请输入成员单位" v-model="queryParam.chargeCompanyTemporaryName"></a-input>
|
|
</a-form-item>
|
|
</a-col>
|
|
|
|
<a-col :xl="8" :lg="8" :md="8" :sm="24">
|
|
<a-form-item label="已提醒" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
|
<j-dict-select-tag style="width: 100%"
|
|
dict-code="yn"
|
|
v-model="queryParam.remind"
|
|
placeholder="请选择提醒类型"></j-dict-select-tag>
|
|
</a-form-item>
|
|
</a-col>
|
|
|
|
<a-col :xl="4" :lg="8" :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>
|
|
<a-table
|
|
ref="table"
|
|
size="middle"
|
|
bordered
|
|
rowKey="id"
|
|
:columns="newColumns"
|
|
:dataSource="dataSource"
|
|
:pagination="ipagination"
|
|
:loading="loading"
|
|
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
|
@change="handleTableChange">
|
|
|
|
<!-- 项目名称-->
|
|
<template slot="projectName" slot-scope="text, record">
|
|
<j-ellipsis :value="text" :length="18" class="primary-color" @click="openDetailModal(record)"></j-ellipsis>
|
|
</template>
|
|
|
|
|
|
<template slot="text" slot-scope="text">
|
|
<j-ellipsis v-if="!!text" :value="text" :length="20"></j-ellipsis>
|
|
<span v-else></span>
|
|
</template>
|
|
|
|
<span slot="action" class="action-span-cell" slot-scope="text, record">
|
|
<a @click="handleEdit(record)">编辑</a>
|
|
<a @click="handleDelete(record.id)">删除</a>
|
|
</span>
|
|
</a-table>
|
|
<email-error-msg-modal ref="emailError"></email-error-msg-modal>
|
|
</j-modal>
|
|
</template>
|
|
|
|
<script>
|
|
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
|
import {publishRemind,commitePublishRemind,councilPublishRemind} from '@api/incomePaymentsApi'
|
|
import EmailErrorMsgModal from '@views/projectManagement/modules/EmailErrorMsgModal'
|
|
|
|
|
|
export default {
|
|
name: 'PublishRemindModal',
|
|
mixins: [JeroListMixin],
|
|
components:{
|
|
EmailErrorMsgModal
|
|
},
|
|
data() {
|
|
return {
|
|
title: '操作',
|
|
width: 800,
|
|
visible: false,
|
|
confirmLoading: false,
|
|
form: this.$form.createForm(this),
|
|
disableMixinCreated: true,
|
|
// 工作组发布提醒 表头
|
|
columns: [
|
|
{
|
|
title: '序号',
|
|
dataIndex: '',
|
|
key: 'rowIndex',
|
|
width: 60,
|
|
align: 'center',
|
|
customRender: function (t, r, index) {
|
|
return parseInt(index) + 1
|
|
}
|
|
},
|
|
{
|
|
title: '成员单位',
|
|
align: 'center',
|
|
width: 200,
|
|
dataIndex: 'chargeCompanyTemporaryName',
|
|
scopedSlots: {customRender: 'text'}
|
|
},
|
|
{
|
|
title: '企业联系人',
|
|
align: 'center',
|
|
width: 200,
|
|
dataIndex: 'contactsTemporaryNameOne',
|
|
scopedSlots: {customRender: 'text'}
|
|
},
|
|
{
|
|
title: '是否提醒',
|
|
align: 'center',
|
|
width: 200,
|
|
dataIndex: 'remind_dictText',
|
|
// scopedSlots: {customRender: 'text'}
|
|
},
|
|
],
|
|
// 分标委发布提醒 表头
|
|
commitColumns: [
|
|
{
|
|
title: '序号',
|
|
dataIndex: '',
|
|
key: 'rowIndex',
|
|
width: 60,
|
|
align: 'center',
|
|
customRender: function (t, r, index) {
|
|
return parseInt(index) + 1
|
|
}
|
|
},
|
|
{
|
|
title: '成员单位',
|
|
align: 'center',
|
|
width: 200,
|
|
dataIndex: 'companyName',
|
|
scopedSlots: {customRender: 'text'}
|
|
},
|
|
{
|
|
title: '企业联系人',
|
|
align: 'center',
|
|
width: 200,
|
|
dataIndex: 'contactsName',
|
|
scopedSlots: {customRender: 'text'}
|
|
},
|
|
{
|
|
title: '是否提醒',
|
|
align: 'center',
|
|
width: 200,
|
|
dataIndex: 'remind_dictText',
|
|
// scopedSlots: {customRender: 'text'}
|
|
},
|
|
],
|
|
// 理事会成员的表头
|
|
councilColumns: [
|
|
{
|
|
title: '序号',
|
|
dataIndex: '',
|
|
key: 'rowIndex',
|
|
width: 60,
|
|
align: 'center',
|
|
customRender: function (t, r, index) {
|
|
return parseInt(index) + 1
|
|
}
|
|
},
|
|
{
|
|
title: '成员单位',
|
|
align: 'center',
|
|
width: 200,
|
|
dataIndex: 'companyName',
|
|
scopedSlots: {customRender: 'text'}
|
|
},
|
|
{
|
|
title: '企业联系人',
|
|
align: 'center',
|
|
width: 200,
|
|
dataIndex: 'peopleName',
|
|
scopedSlots: {customRender: 'text'}
|
|
},
|
|
{
|
|
title: '是否提醒',
|
|
align: 'center',
|
|
width: 200,
|
|
dataIndex: 'remind_dictText',
|
|
// scopedSlots: {customRender: 'text'}
|
|
},
|
|
],
|
|
model: {},
|
|
labelCol: {
|
|
xs: {span: 24},
|
|
sm: {span: 6}
|
|
},
|
|
wrapperCol: {
|
|
xs: {span: 24},
|
|
sm: {span: 18}
|
|
},
|
|
url: {
|
|
add: '/project/payCommonProject/add',
|
|
edit: '/project/payCommonProject/edit',
|
|
list: '/project/payWorkingGroupSubitem/publishReminderList',
|
|
},
|
|
// 会议维护选中的会议
|
|
selectedMetingList: [],
|
|
newColumns: [],
|
|
// 提醒类型 1 是工作组 2 是分标委 3是理事会
|
|
remindType:'',
|
|
}
|
|
},
|
|
methods: {
|
|
open(meetingList) {
|
|
this.onClearSelected()
|
|
this.visible = true
|
|
// 保存选中的会议
|
|
this.selectedMetingList = [...meetingList]
|
|
|
|
// 分标委会议需要分标标委的id
|
|
if (this.$route.query.meetingType === '5') {
|
|
// 分标委
|
|
this.newColumns = [...this.commitColumns]
|
|
this.filters.id = this.$route.query.id
|
|
this.remindType = 2
|
|
// 分标委成员
|
|
this.url.list = '/payCaseCommitteeSubitem/payCaseCommitteeSubitem/list'
|
|
} else if(this.$route.query.meetingType === '6') {
|
|
this.newColumns = [...this.councilColumns]
|
|
this.filters.id = this.$route.query.councilId
|
|
//理事会成员的接口
|
|
this.url.list = '/payCaseCouncilSubitem/payCaseCouncilSubitem/list'
|
|
this.remindType = 3
|
|
} else {
|
|
// 列表需要工作组id参数
|
|
this.filters.workingGroupId = this.$route.query.workingGroupProjectId
|
|
// 工作组
|
|
this.remindType = 1
|
|
this.newColumns = [...this.columns]
|
|
}
|
|
// 发布提醒需要会议id 只有选择一个会议的时候 才会有这个参数
|
|
if (meetingList.length === 1) {
|
|
this.filters.meetingId = meetingList[0]
|
|
}
|
|
// 选择多个会议的时候不需要提醒字段 这样写是因为无法精准定位每一个人对应的每一个会议 这个人是否被提醒
|
|
if (meetingList.length > 1) {
|
|
// 去掉列表的提醒字段
|
|
this.newColumns = this.newColumns.filter(item => item.dataIndex !== 'remind_dictText')
|
|
}
|
|
this.searchReset()
|
|
},
|
|
close() {
|
|
this.$emit('close')
|
|
this.newColumns = []
|
|
this.visible = false
|
|
},
|
|
handleOk() {
|
|
if (this.confirmLoading) {
|
|
return
|
|
}
|
|
this.confirmLoading = true
|
|
if (this.selectionRows.length === 0) {
|
|
this.$message.warn('请至少选择一个成员')
|
|
this.confirmLoading = false
|
|
return
|
|
} else {
|
|
const param = {
|
|
meetingIds: this.selectedMetingList,
|
|
subitemIds: this.selectedRowKeys,
|
|
projectType:this.remindType
|
|
}
|
|
// 分标委用分标委的接口
|
|
if(this.$route.query.meetingType === '5' ){
|
|
commitePublishRemind(param).then(res => {
|
|
if (res.success) {
|
|
// this.$message.success(res.message)
|
|
if (Array.isArray(res.result) && res.result.length > 0) {
|
|
// msgWarn(this,res.result,0)
|
|
this.$refs.emailError.open()
|
|
this.$refs.emailError.msgList = res.result
|
|
console.log(this.$refs.emailError.msgList, 'this.$refs.emailError.msgList ')
|
|
}
|
|
this.$emit('ok')
|
|
this.confirmLoading = false
|
|
this.handleCancel()
|
|
} else {
|
|
this.$message.warn(res.message)
|
|
}
|
|
}).finally(() => {
|
|
setTimeout(() => {
|
|
this.confirmLoading = false
|
|
}, 1000)
|
|
})
|
|
}else if(this.$route.query.meetingType === '6'){
|
|
// 理事会的用理事会的发布提醒
|
|
councilPublishRemind(param).then(res => {
|
|
if (res.success) {
|
|
// this.$message.success(res.message)
|
|
if (Array.isArray(res.result) && res.result.length > 0) {
|
|
// msgWarn(this,res.result,0)
|
|
this.$refs.emailError.open()
|
|
this.$refs.emailError.msgList = res.result
|
|
console.log(this.$refs.emailError.msgList, 'this.$refs.emailError.msgList ')
|
|
}
|
|
this.$emit('ok')
|
|
this.confirmLoading = false
|
|
this.handleCancel()
|
|
} else {
|
|
this.$message.warn(res.message)
|
|
}
|
|
}).finally(() => {
|
|
setTimeout(() => {
|
|
this.confirmLoading = false
|
|
}, 1000)
|
|
})
|
|
} else {
|
|
param.workingGroupId = this.$route.query.workingGroupProjectId
|
|
publishRemind(param).then(res => {
|
|
if (res.success) {
|
|
// this.$message.success(res.result)
|
|
if (Array.isArray(res.result) && res.result.length > 0) {
|
|
// msgWarn(this,res.result,0)
|
|
this.$refs.emailError.open()
|
|
this.$refs.emailError.msgList = res.result
|
|
console.log(this.$refs.emailError.msgList, 'this.$refs.emailError.msgList ')
|
|
}
|
|
this.$emit('ok')
|
|
this.confirmLoading = false
|
|
this.handleCancel()
|
|
} else {
|
|
this.$message.warn(res.message)
|
|
}
|
|
}).finally(() => {
|
|
setTimeout(() => {
|
|
this.confirmLoading = false
|
|
}, 1000)
|
|
})
|
|
}
|
|
|
|
}
|
|
},
|
|
handleCancel() {
|
|
this.close()
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="less">
|
|
@import '~@assets/less/common.less';
|
|
</style> |