【update】-工作组资料分发、会议发布、设置标签功能
This commit is contained in:
@@ -125,6 +125,11 @@ const addPayConfirm = (param) => postAction('/payConfirmPaymentRecord/add', para
|
||||
// 编辑一个确认来款信息
|
||||
const editPayConfirm = (param) => postAction('/payConfirmPaymentRecord/edit', param)
|
||||
|
||||
|
||||
//2023-07-13 工作组相关功能的接口
|
||||
// 判断当前节点 是否可以发邮件
|
||||
const judgeEmailStatus = (param) => getAction('/sys/message/sysMessageTemplate/queryByCode', param)
|
||||
|
||||
export {
|
||||
getWorkingGroupById,
|
||||
getChargeNotice,
|
||||
@@ -189,5 +194,8 @@ export {
|
||||
|
||||
getPayConfirmList,
|
||||
addPayConfirm,
|
||||
editPayConfirm
|
||||
editPayConfirm,
|
||||
|
||||
|
||||
judgeEmailStatus
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@
|
||||
<a-button type="danger" icon="delete" @click="batchDel" v-has:[authorCode.batchDel]="'attendance:batchDel'">
|
||||
批量删除
|
||||
</a-button>
|
||||
<a-button type="danger" icon="delete" v-has:[authorCode.batchDel]="'attendance:batchDel'">
|
||||
<a-button type="primary" @click="batchSetGuestsUploadFileFlag" v-has:[authorCode.guestsUploadFileFlag]="'attendance:guestsUploadFileFlag'">
|
||||
批量设置资料状态
|
||||
</a-button>
|
||||
<!--当会议费用为0不需要合并开票 -->
|
||||
@@ -313,7 +313,8 @@
|
||||
<a @click="handleEdit(record)" v-if="record.registerCheckResult !== 2" v-has:[authorCode.edit]="'attendance:edit'">编辑</a>
|
||||
<!--删除参会人需要判断改参会人是否与合同关联-->
|
||||
<a @click="handleDelete(record.id)" v-has:[authorCode.delete]="'attendance:delete'">删除</a>
|
||||
<a v-has:[authorCode.delete]="'attendance:delete'">资料状态</a>
|
||||
<!-- 只有嘉宾才可以设置 -->
|
||||
<a @click="setGuestsUploadFileFlag(record)" v-show="record.identity === 1" v-has:[authorCode.guestsUploadFileFlag]="'attendance:guestsUploadFileFlag'">资料状态</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</div>
|
||||
@@ -327,6 +328,8 @@
|
||||
<project-detail-modal ref="projectDetailModal"></project-detail-modal>
|
||||
<!--审核-->
|
||||
<audit-modal ref="auditModal" @ok="modalFormOk"></audit-modal>
|
||||
<!--设置资料状态--即嘉宾是否可以在企业端上传资料-->
|
||||
<set-guess-upload-flag-modal ref="setGuessUploadFlagModal" :meeting-id="meetingId" :meeting-type="meetingTypeValue" @ok="modalFormOk"></set-guess-upload-flag-modal>
|
||||
</a-card>
|
||||
</div>
|
||||
</template>
|
||||
@@ -346,6 +349,7 @@ import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
|
||||
import StatusSlot from '@comp/tools/StatusSlot'
|
||||
import PreviewFile from '@comp/jero/PreviewFile'
|
||||
import JImageUpload from '@comp/jero/JImageUpload'
|
||||
import SetGuessUploadFlagModal from './modules/SetGuessUploadFlagModal'
|
||||
|
||||
|
||||
export default {
|
||||
@@ -362,7 +366,8 @@ export default {
|
||||
PageHeaderTitle,
|
||||
StatusSlot,
|
||||
PreviewFile,
|
||||
JImageUpload
|
||||
JImageUpload,
|
||||
SetGuessUploadFlagModal
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -414,7 +419,13 @@ export default {
|
||||
title: '是否签到',
|
||||
align: 'center',
|
||||
dataIndex: 'checkIn_dictText',
|
||||
width: 100
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '身份',
|
||||
align: 'center',
|
||||
dataIndex: 'identity_dictText',
|
||||
width: 80
|
||||
},
|
||||
{
|
||||
title: '打包',
|
||||
@@ -475,7 +486,8 @@ export default {
|
||||
edit: 'otherMeetingSituation:edit',
|
||||
delete: 'otherMeetingSituation:delete',
|
||||
auditRecord: 'otherMeetingSituation:auditCredentials',
|
||||
auditSignUpInfo: 'otherMeetingSituation:auditSignUp'
|
||||
auditSignUpInfo: 'otherMeetingSituation:auditSignUp',
|
||||
guestsUploadFileFlag: 'otherMeetingSituation:guestsUploadFileFlag'
|
||||
},
|
||||
// 分标委会议的参会情况权限编码
|
||||
committeeMeetingCode: {
|
||||
@@ -486,7 +498,8 @@ export default {
|
||||
edit: 'committeeMeetingSituation:edit',
|
||||
delete: 'committeeMeetingSituation:delete',
|
||||
auditRecord: 'committeeMeetingSituation:auditCredentials',
|
||||
auditSignUpInfo: 'committeeMeetingSituation:auditSignUp'
|
||||
auditSignUpInfo: 'committeeMeetingSituation:auditSignUp',
|
||||
guestsUploadFileFlag: 'committeeMeetingSituation:guestsUploadFileFlag'
|
||||
},
|
||||
// 工作组会议的参会情况的权限编码
|
||||
workGroupMeetingCode: {
|
||||
@@ -497,7 +510,8 @@ export default {
|
||||
edit: 'workGroupMeetingSituation:edit',
|
||||
delete: 'workGroupMeetingSituation:delete',
|
||||
auditRecord: 'workGroupMeetingSituation:auditCredentials',
|
||||
auditSignUpInfo: 'workGroupMeetingSituation:auditSignUp'
|
||||
auditSignUpInfo: 'workGroupMeetingSituation:auditSignUp',
|
||||
guestsUploadFileFlag: 'workGroupMeetingSituation:guestsUploadFileFlag'
|
||||
},
|
||||
// 国际研讨会的参会情况的权限编码
|
||||
internalMeetingCode: {
|
||||
@@ -508,7 +522,8 @@ export default {
|
||||
edit: 'internalMeetingSituation:edit',
|
||||
delete: 'internalMeetingSituation:delete',
|
||||
auditRecord: 'internalMeetingSituation:auditCredentials',
|
||||
auditSignUpInfo: 'internalMeetingSituation:auditSignUp'
|
||||
auditSignUpInfo: 'internalMeetingSituation:auditSignUp',
|
||||
guestsUploadFileFlag: 'internalMeetingSituation:guestsUploadFileFlag'
|
||||
},
|
||||
// 标协会议的参会情况的权限编码
|
||||
standardsMeetingCode: {
|
||||
@@ -519,7 +534,8 @@ export default {
|
||||
edit: 'standardsMeetingSituation:edit',
|
||||
delete: 'standardsMeetingSituation:delete',
|
||||
auditRecord: 'standardsMeetingSituation:auditCredentials',
|
||||
auditSignUpInfo: 'standardsMeetingSituation:auditSignUp'
|
||||
auditSignUpInfo: 'standardsMeetingSituation:auditSignUp',
|
||||
guestsUploadFileFlag: 'standardsMeetingSituation:guestsUploadFileFlag'
|
||||
},
|
||||
// 理事会的参会情况的权限编码
|
||||
councilMeetingCode: {
|
||||
@@ -530,7 +546,8 @@ export default {
|
||||
edit: 'councilMeetingSituation:edit',
|
||||
delete: 'councilMeetingSituation:delete',
|
||||
auditRecord: 'councilMeetingSituation:auditCredentials',
|
||||
auditSignUpInfo: 'councilMeetingSituation:auditSignUp'
|
||||
auditSignUpInfo: 'councilMeetingSituation:auditSignUp',
|
||||
guestsUploadFileFlag: 'councilMeetingSituation:guestsUploadFileFlag'
|
||||
},
|
||||
disableMixinCreated: true,
|
||||
// url: {
|
||||
@@ -598,7 +615,9 @@ export default {
|
||||
// 收款二维码
|
||||
payMentQRCode: '',
|
||||
// 会议费用
|
||||
meetingCostBool: false
|
||||
meetingCostBool: false,
|
||||
meetingId: '',
|
||||
meetingTypeValue: '',
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -609,6 +628,7 @@ export default {
|
||||
const param = {
|
||||
id: this.$route.query.id
|
||||
}
|
||||
|
||||
getMeetInfoById(param).then(res => {
|
||||
if (res.success) {
|
||||
this.currentMeetingInfo = Object.assign({}, res.result)
|
||||
@@ -649,6 +669,9 @@ export default {
|
||||
}
|
||||
})
|
||||
this.filters.meetingId = this.$route.query.id
|
||||
// 存储会议的基础信息
|
||||
this.meetingId = this.$route.query.id
|
||||
this.meetingTypeValue = Number(this.$route.query.meetingType)
|
||||
if(this.disableMixinCreated){
|
||||
this.loadData(1)
|
||||
}
|
||||
@@ -894,6 +917,28 @@ export default {
|
||||
newInput.remove()
|
||||
this.$message.success('复制成功')
|
||||
},
|
||||
// 行内 设置嘉宾是否可上传文件,只有参会方式是嘉宾的可以设置
|
||||
setGuestsUploadFileFlag(record) {
|
||||
// 参会人员不是嘉宾,直接返回
|
||||
if(record.identity !== 1) return
|
||||
this.$refs.setGuessUploadFlagModal.show(record)
|
||||
},
|
||||
// 批量设置嘉宾是否可上传文件,只有参会方式是嘉宾的可以设置
|
||||
batchSetGuestsUploadFileFlag() {
|
||||
if (this.selectedRowKeys.length <= 0) {
|
||||
this.$message.warning('请选择一条记录!')
|
||||
return
|
||||
}
|
||||
// 判断只能身份为嘉宾的数据 设置资料状态
|
||||
let flag = this.selectionRows.some(item => {
|
||||
return item.identity !== 1
|
||||
})
|
||||
if(flag) {
|
||||
this.$message.warn('只有身份为嘉宾的数据才可设置资料状态')
|
||||
return
|
||||
}
|
||||
this.$refs.setGuessUploadFlagModal.showBatch(this.selectedRowKeys)
|
||||
},
|
||||
/*
|
||||
* 通过会议类型设置权限编码
|
||||
* type 会议类型
|
||||
|
||||
@@ -0,0 +1,167 @@
|
||||
<!--设置嘉宾上传文件的标识-->
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="嘉宾是否可上传文件" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-dict-select-tag v-decorator="['guestsUploadFileFlag', validatorRules.guestsUploadFileFlag]"
|
||||
:trigger-change="true"
|
||||
placeholder="请选择状态"
|
||||
dictCode="yn" />
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { httpAction } from '@api/manage'
|
||||
const requestUrlObj = {
|
||||
workGroupMeetingUrl: '/meeting/workGroupMeetingSituation/setGuestsUploadFile', // 工作组
|
||||
standardsMeetingUrl: '/meeting/standardsMeetingSituation/setGuestsUploadFile', // 标协会议
|
||||
internalMeetingUrl: '/meeting/internalMeetingSituation/setGuestsUploadFile', // 国际研讨会的url
|
||||
otherMeetingUrl: '/meeting/ohterMeetingSituation/setGuestsUploadFile', // 其他会议的url
|
||||
committeeMeetingUrl: '/meeting/committeeMeetingSituation/setGuestsUploadFile', // 分标委会议的url
|
||||
councilMeetingUrl: '/meeting/councilMeetingSituation/setGuestsUploadFile', // 理事会的url
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'SetGuessUploadFlagModal',
|
||||
props: {
|
||||
// 会议类型
|
||||
meetingType: {
|
||||
type: Number,
|
||||
required: false
|
||||
},
|
||||
meetingId: {
|
||||
type: String,
|
||||
required: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
requestUrl() {
|
||||
switch (Number(this.meetingType)) {
|
||||
case '1':
|
||||
return requestUrlObj.workGroupMeetingUrl
|
||||
case '2':
|
||||
return requestUrlObj.standardsMeetingUrl
|
||||
case '3':
|
||||
return requestUrlObj.internalMeetingUrl
|
||||
case '4':
|
||||
return requestUrlObj.otherMeetingUrl
|
||||
case '5':
|
||||
return requestUrlObj.committeeMeetingUrl
|
||||
case '6':
|
||||
return requestUrlObj.councilMeetingUrl
|
||||
// 为了解决控制台报错写的
|
||||
default:return requestUrlObj.workGroupMeetingUrl
|
||||
}
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '设置资料状态',
|
||||
width: 800,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 14 }
|
||||
},
|
||||
validatorRules: {
|
||||
guestsUploadFileFlag: {
|
||||
rules: [{ required: true, message: '请选择状态' }],
|
||||
validateTrigger: 'blur'
|
||||
}
|
||||
},
|
||||
url: {
|
||||
// setLabel: '/project/payWorkingGroupSubitem/setLabel'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 行内的展示
|
||||
show(record) {
|
||||
this.form.resetFields()
|
||||
let params = {}
|
||||
if(record) {
|
||||
params.guestsUploadFileFlag = record.guestsUploadFileFlag || 0
|
||||
this.selectedIds = [record.id]
|
||||
}
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(params)
|
||||
})
|
||||
},
|
||||
// 批量处理
|
||||
showBatch(ids) {
|
||||
this.selectedIds = ids
|
||||
this.show()
|
||||
},
|
||||
close() {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
},
|
||||
handleOk() {
|
||||
if (this.confirmLoading) {
|
||||
return
|
||||
}
|
||||
this.confirmLoading = true
|
||||
const that = this
|
||||
// 触发表单验证
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
that.confirmLoading = true
|
||||
let httpUrl = this.requestUrl
|
||||
let method = 'post'
|
||||
const formData = Object.assign({}, values)
|
||||
formData.meetingId = that.meetingId
|
||||
formData.meetingSituationIds = that.selectedIds.join(',')
|
||||
this.confirmLoading = false
|
||||
console.log('表单提交数据', formData)
|
||||
httpAction(httpUrl, formData, method).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.$emit('ok')
|
||||
that.close()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
this.confirmLoading = false
|
||||
}, 1000)
|
||||
})
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
@@ -65,6 +65,11 @@
|
||||
/>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item label="标签名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入标签名称" v-model="queryParam.label" :maxLength='50'></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
@@ -103,6 +108,7 @@
|
||||
<a-button type="primary" @click="setDunningReminder" v-has="'workingGroupMember:setDunningReminder'"
|
||||
v-if="canOperate">催款提醒
|
||||
</a-button>
|
||||
<a-button type="primary" @click="setLabel" v-has="'workingGroupMember:setLabel'">设置标签</a-button>
|
||||
</div>
|
||||
<!-- /操作按钮区域-end-->
|
||||
|
||||
@@ -170,6 +176,8 @@
|
||||
@ok="modalFormOk"></working-group-member-set-charge-notice>
|
||||
|
||||
<email-error-msg-modal ref="emailError"></email-error-msg-modal>
|
||||
|
||||
<work-group-set-label ref="workGroupSetLabel" @ok="modalFormOk"></work-group-set-label>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -186,6 +194,7 @@ import Vue from 'vue'
|
||||
import { ACCESS_TOKEN } from '../../store/mutation-types'
|
||||
import PreviewFile from '../../components/jero/PreviewFile'
|
||||
import EmailErrorMsgModal from './modules/EmailErrorMsgModal'
|
||||
import WorkGroupSetLabel from './modules/WorkGroupSetLabel'
|
||||
|
||||
// eslint-disable-next-line no-undef,no-unused-vars
|
||||
const Base64 = require('js-base64').Base64
|
||||
@@ -200,7 +209,8 @@ export default {
|
||||
WorkingGroupMemberUnitModule,
|
||||
WorkingGroupMemberSetChargeNotice,
|
||||
PreviewFile,
|
||||
EmailErrorMsgModal
|
||||
EmailErrorMsgModal,
|
||||
WorkGroupSetLabel
|
||||
},
|
||||
mixins: [JeroListMixin],
|
||||
computed: {
|
||||
@@ -304,6 +314,12 @@ export default {
|
||||
customRender: (text, record) => (
|
||||
<j-ellipsis value={ record.paidAmount + '元' } length={ 15 }></j-ellipsis>
|
||||
)
|
||||
}, {
|
||||
title: '标签名称',
|
||||
align: 'center',
|
||||
dataIndex: 'label',
|
||||
width: 100,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}, {
|
||||
// 2021-10-22需求变更新加
|
||||
title: '收费通知号',
|
||||
@@ -522,6 +538,14 @@ export default {
|
||||
let url = `${ window._CONFIG['onlinePreviewDomainURL'] }?url=${ encodeURIComponent(fileFullUrl) }`
|
||||
window.open(url)
|
||||
}
|
||||
},
|
||||
// 设置标签
|
||||
setLabel() {
|
||||
if (this.selectedRowKeys.length <= 0) {
|
||||
this.$message.warning('请选择一条记录!')
|
||||
return
|
||||
}
|
||||
this.$refs.workGroupSetLabel.show(this.selectedRowKeys)
|
||||
}
|
||||
// 2021 10 11 沟通后去掉了这个功能
|
||||
// searchReset() {
|
||||
|
||||
@@ -78,6 +78,7 @@
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import {publishRemind,commitePublishRemind,councilPublishRemind} from '@api/incomePaymentsApi'
|
||||
import EmailErrorMsgModal from '@views/projectManagement/modules/EmailErrorMsgModal'
|
||||
import { judgeEmailStatus } from "../../../api/incomePaymentsApi";
|
||||
|
||||
|
||||
export default {
|
||||
@@ -215,6 +216,10 @@ export default {
|
||||
newColumns: [],
|
||||
// 提醒类型 1 是工作组 2 是分标委 3是理事会
|
||||
remindType:'',
|
||||
// 是否需要发邮件
|
||||
needMail: false,
|
||||
// 发消息需要验证的模板code码
|
||||
mailTemplateCode: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -243,6 +248,8 @@ export default {
|
||||
this.filters.workingGroupId = this.$route.query.workingGroupProjectId
|
||||
// 工作组
|
||||
this.remindType = 1
|
||||
// 设置请求的模板CODE TODO 其他两种会议是否处理 还未确认
|
||||
this.mailTemplateCode = 'QY_1_HYTZ_WORK_GROUP_CREATE'
|
||||
this.newColumns = [...this.columns]
|
||||
}
|
||||
// 发布提醒需要会议id 只有选择一个会议的时候 才会有这个参数
|
||||
@@ -255,6 +262,7 @@ export default {
|
||||
this.newColumns = this.newColumns.filter(item => item.dataIndex !== 'remind_dictText')
|
||||
}
|
||||
this.searchReset()
|
||||
this.judgeEmailStatusFunc()
|
||||
},
|
||||
close() {
|
||||
this.$emit('close')
|
||||
@@ -270,85 +278,85 @@ export default {
|
||||
this.$message.warn('请至少选择一个成员')
|
||||
this.confirmLoading = false
|
||||
return
|
||||
}
|
||||
if(this.needMail) {
|
||||
this.$confirm({
|
||||
title: '消息确认',
|
||||
content: '确认要向选择的成员发送邮件吗?',
|
||||
cancelText: '不发送',
|
||||
okText: '确认发送',
|
||||
onOk: function () {
|
||||
callbackFunc(1)
|
||||
},
|
||||
onCancel: function() {
|
||||
callbackFunc(0)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
// 若全局没有配置则不发送邮件信息
|
||||
callbackFunc(0)
|
||||
}
|
||||
// 定义请求成功的方法 sendEmailFlag: 0-不发送 1-发送
|
||||
const callbackFunc = (sendEmailFlag) => {
|
||||
// TODO 分标委、理事会是否需要验证 再定
|
||||
const param = {
|
||||
meetingIds: this.selectedMetingList,
|
||||
subitemIds: this.selectedRowKeys,
|
||||
projectType:this.remindType
|
||||
}
|
||||
let requestFun
|
||||
// 分标委用分标委的接口
|
||||
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)
|
||||
})
|
||||
requestFun = commitePublishRemind
|
||||
}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)
|
||||
})
|
||||
requestFun = councilPublishRemind
|
||||
} 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)
|
||||
})
|
||||
param.sendEmailFlag = sendEmailFlag
|
||||
requestFun = publishRemind
|
||||
}
|
||||
|
||||
requestFun(param).then(res => {
|
||||
if (res.success) {
|
||||
if (Array.isArray(res.result) && res.result.length > 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()
|
||||
},
|
||||
// 判断全局设置的是否需要发邮件
|
||||
judgeEmailStatusFunc() {
|
||||
this.needMail = false
|
||||
if(!this.mailTemplateCode) return
|
||||
// 工作组的会议通知模板 --QY_1_HYTZ_WORK_GROUP_CREATE
|
||||
const params = {
|
||||
code: this.mailTemplateCode
|
||||
}
|
||||
judgeEmailStatus(params).then(res => {
|
||||
if(res.success) {
|
||||
// 发送邮件的类型 1-短信 2-邮件 3-系统 数据字典codem sgType
|
||||
this.needMail = (res.result || {}).templateType.indexOf(2) > -1
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -11,6 +11,28 @@
|
||||
<a-spin :spinning="confirmLoading">
|
||||
|
||||
<template v-if="dataSourceInit.length > 0">
|
||||
<!--查询条件 单个文件分发的时候才存在-->
|
||||
<div class="table-page-search-wrapper" v-if="!isBatch">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row>
|
||||
<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>
|
||||
<!-- 操作按钮区域-->
|
||||
<div class="table-operator">
|
||||
<a-button type="primary" @click="checkAll()">全选</a-button>
|
||||
@@ -47,9 +69,112 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { distribute, batchDistribute, distributeMemberList } from '../../../api/incomePaymentsApi'
|
||||
import { distribute, batchDistribute, distributeMemberList, judgeEmailStatus } from '../../../api/incomePaymentsApi'
|
||||
import EmailErrorMsgModal from '@views/projectManagement/modules/EmailErrorMsgModal.vue'
|
||||
|
||||
// 工作组发布提醒 表头
|
||||
const columns = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '联系人',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {customRender: 'text'}
|
||||
},
|
||||
{
|
||||
title: '成员单位',
|
||||
align: 'center',
|
||||
dataIndex: 'companyName',
|
||||
width: 280,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: '邮件通知',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'remind_dictText',
|
||||
scopedSlots: {customRender: 'text'}
|
||||
}
|
||||
]
|
||||
// 分标委发布提醒 表头
|
||||
const commitColumns = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '联系人',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {customRender: 'text'}
|
||||
},
|
||||
// {
|
||||
// title: '成员单位',
|
||||
// align: 'center',
|
||||
// dataIndex: 'companyName',
|
||||
// width: 280,
|
||||
// scopedSlots: { customRender: 'text' }
|
||||
// },
|
||||
{
|
||||
title: '邮件通知',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'remind_dictText',
|
||||
scopedSlots: {customRender: 'text'}
|
||||
}
|
||||
]
|
||||
// 理事会成员的表头
|
||||
const councilColumns = [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function (t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '联系人',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'name',
|
||||
scopedSlots: {customRender: 'text'}
|
||||
},
|
||||
// {
|
||||
// title: '成员单位',
|
||||
// align: 'center',
|
||||
// dataIndex: 'companyName',
|
||||
// width: 280,
|
||||
// scopedSlots: { customRender: 'text' }
|
||||
// },
|
||||
{
|
||||
title: '邮件通知',
|
||||
align: 'center',
|
||||
width: 200,
|
||||
dataIndex: 'remind_dictText',
|
||||
scopedSlots: {customRender: 'text'}
|
||||
}
|
||||
]
|
||||
|
||||
export default {
|
||||
name: 'WorkGroupDistributeModule',
|
||||
components: { EmailErrorMsgModal },
|
||||
@@ -96,24 +221,10 @@ export default {
|
||||
title: '分发',
|
||||
width: 1000,
|
||||
confirmLoading: false,
|
||||
columns: [
|
||||
{
|
||||
title: '联系人',
|
||||
align: 'center',
|
||||
dataIndex: 'name',
|
||||
width: 280,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
},
|
||||
{
|
||||
title: '成员单位',
|
||||
align: 'center',
|
||||
dataIndex: 'companyName',
|
||||
width: 280,
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}
|
||||
],
|
||||
columns: [],
|
||||
dataSource: [], // 表格中显示的数据
|
||||
dataSourceInit: [], // 所有分发单位的数据
|
||||
dataSourceInitShow: [], // 拥有过滤条件后显示的所有数据
|
||||
/* 分页参数 */
|
||||
ipagination: {
|
||||
current: 1,
|
||||
@@ -127,7 +238,19 @@ export default {
|
||||
total: 0
|
||||
},
|
||||
/* table选中keys*/
|
||||
selectedRowKeys: []
|
||||
selectedRowKeys: [],
|
||||
// 查询条件
|
||||
queryParam: {},
|
||||
lastQueryParam: {},
|
||||
labelCol: {
|
||||
xs: {span: 24},
|
||||
sm: {span: 6}
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: {span: 24},
|
||||
sm: {span: 18}
|
||||
},
|
||||
needMail: false // 消息模板中是否设置了可以发邮件 重要
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -143,6 +266,7 @@ export default {
|
||||
distributeMemberList(param).then(res => {
|
||||
if (res.success) {
|
||||
this.dataSourceInit = res.result || []
|
||||
this.dataSourceInitShow = res.result || []
|
||||
this.loadData(1)
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
@@ -162,7 +286,22 @@ export default {
|
||||
this.selectedRowKeys = []
|
||||
this.ipagination.current = 1
|
||||
this.ipagination.pageSize = 10
|
||||
// 通过不同的项目类型 展示不同的columns 目前里面的信息是一致的
|
||||
// 项目类型:1--工作组;2--分标委;3--理事会
|
||||
if(this.projectType === 1) {
|
||||
this.columns = [...columns]
|
||||
} else if(this.projectType === 2) {
|
||||
this.columns = [...commitColumns]
|
||||
} else {
|
||||
this.columns = [...councilColumns]
|
||||
}
|
||||
// 选择多个资料的时候不需要提醒字段 这样写是因为无法精准定位每一个人对应的每一个资料 这个人是否被提醒
|
||||
if (this.isBatch) {
|
||||
// 去掉列表的提醒字段
|
||||
this.columns = this.columns.filter(item => item.dataIndex !== 'remind_dictText')
|
||||
}
|
||||
this.getMemberList()
|
||||
this.judgeEmailStatusFunc()
|
||||
|
||||
},
|
||||
handleTableChange(pagination) {
|
||||
@@ -185,13 +324,27 @@ export default {
|
||||
//加载数据 若传入参数1则加载第一页的内容
|
||||
if (arg === 1) {
|
||||
this.ipagination.current = 1
|
||||
if(this.lastQueryParam.remind === undefined) {
|
||||
this.dataSourceInitShow = this.dataSourceInit
|
||||
} else {
|
||||
this.dataSourceInitShow = this.dataSourceInit.filter(tt => tt.remind + '' === this.lastQueryParam.remind + '')
|
||||
}
|
||||
}
|
||||
var params = this.getQueryParams()//查询条件
|
||||
this.ipagination.total = this.dataSourceInit.length
|
||||
this.dataSource = this.dataSourceInit.slice((params.pageNo - 1) * params.pageSize, (params.pageNo * params.pageSize))
|
||||
this.ipagination.total = this.dataSourceInitShow.length
|
||||
this.dataSource = this.dataSourceInitShow.slice((params.pageNo - 1) * params.pageSize, (params.pageNo * params.pageSize))
|
||||
},
|
||||
searchQuery() {
|
||||
this.lastQueryParam = {...this.queryParam}
|
||||
this.loadData(1)
|
||||
},
|
||||
searchReset() {
|
||||
this.lastQueryParam = {}
|
||||
this.queryParam = {}
|
||||
this.loadData(1)
|
||||
},
|
||||
checkAll() {
|
||||
this.selectedRowKeys = this.dataSourceInit.map(tt => tt.id)
|
||||
this.selectedRowKeys = this.dataSourceInitShow.map(tt => tt.id)
|
||||
},
|
||||
close() {
|
||||
this.$emit('update:visible', false)
|
||||
@@ -212,68 +365,105 @@ export default {
|
||||
this.confirmLoading = false
|
||||
return
|
||||
}
|
||||
|
||||
if (this.isBatch) {
|
||||
let str = this.selectedRowKeys.join(',')
|
||||
// 批量分发
|
||||
const formData = {
|
||||
contactsIds: str,
|
||||
dataIds: this.recordId,
|
||||
projectId: this.projectId,
|
||||
projectType: this.projectType
|
||||
}
|
||||
batchDistribute(formData).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.close()
|
||||
this.$emit('ok')
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
if(this.needMail) {
|
||||
this.$confirm({
|
||||
title: '消息确认',
|
||||
content: '确认要向选择的成员发送邮件吗?',
|
||||
cancelText: '不发送',
|
||||
okText: '确认发送',
|
||||
onOk: function () {
|
||||
callbackFunc(1)
|
||||
},
|
||||
onCancel: function() {
|
||||
callbackFunc(0)
|
||||
}
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
this.confirmLoading = false
|
||||
}, 1000)
|
||||
})
|
||||
} else {
|
||||
// 单个分发
|
||||
const formData = {
|
||||
contactsIds: this.selectedRowKeys.join(','),
|
||||
dataId: this.recordId,
|
||||
projectId: this.projectId,
|
||||
projectType: this.projectType
|
||||
}
|
||||
distribute(formData).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.close()
|
||||
this.$emit('ok')
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
this.confirmLoading = false
|
||||
}, 1000)
|
||||
})
|
||||
// 若全局没有配置则不发送邮件信息
|
||||
callbackFunc(0)
|
||||
}
|
||||
// 定义请求成功的方法 sendEmailFlag: 0-不发送 1-发送
|
||||
const callbackFunc = (sendEmailFlag) => {
|
||||
if (this.isBatch) {
|
||||
let str = this.selectedRowKeys.join(',')
|
||||
// 批量分发
|
||||
const formData = {
|
||||
contactsIds: str,
|
||||
dataIds: this.recordId,
|
||||
projectId: this.projectId,
|
||||
projectType: this.projectType,
|
||||
sendEmailFlag
|
||||
}
|
||||
batchDistribute(formData).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.close()
|
||||
this.$emit('ok')
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
this.confirmLoading = false
|
||||
}, 1000)
|
||||
})
|
||||
} else {
|
||||
// 单个分发
|
||||
const formData = {
|
||||
contactsIds: this.selectedRowKeys.join(','),
|
||||
dataId: this.recordId,
|
||||
projectId: this.projectId,
|
||||
projectType: this.projectType,
|
||||
sendEmailFlag
|
||||
}
|
||||
distribute(formData).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.close()
|
||||
this.$emit('ok')
|
||||
} else {
|
||||
this.$message.warn(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
this.confirmLoading = false
|
||||
}, 1000)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
},
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
// 判断全局设置的是否需要发邮件
|
||||
judgeEmailStatusFunc() {
|
||||
this.needMail = false
|
||||
// 非工作组项目的情况 不进行请求
|
||||
if(this.projectType !== 1) return
|
||||
const params = {
|
||||
code: 'QY_12_WJTZ_WORK_GROUP_SEND'
|
||||
}
|
||||
judgeEmailStatus(params).then(res => {
|
||||
if(res.success) {
|
||||
// 发送邮件的类型 1-短信 2-邮件 3-系统 数据字典codem sgType
|
||||
this.needMail = (res.result || {}).templateType.indexOf(2) > -1
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
<!--工作组 设置标签-->
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-form-item label="标签名称" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入标签名称"
|
||||
v-decorator="['label',validatorRules.label]"
|
||||
:maxLength='50'
|
||||
@change="e => {e.target.value = (e.target.value + '').trim()}"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { httpAction } from '@api/manage'
|
||||
|
||||
export default {
|
||||
name: 'WorkGroupSetLabel',
|
||||
data() {
|
||||
return {
|
||||
title: '设置标签',
|
||||
width: 800,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
form: this.$form.createForm(this),
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 }
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 14 }
|
||||
},
|
||||
validatorRules: {
|
||||
label: {
|
||||
rules: [{ required: true, message: '请输入标签名称' }],
|
||||
validateTrigger: 'blur'
|
||||
}
|
||||
},
|
||||
url: {
|
||||
setLabel: '/project/payWorkingGroupSubitem/setLabel'
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
show(ids) {
|
||||
this.form.resetFields()
|
||||
this.selectedIds = ids
|
||||
this.visible = true
|
||||
},
|
||||
close() {
|
||||
this.$emit('close')
|
||||
this.visible = false
|
||||
},
|
||||
handleOk() {
|
||||
if (this.confirmLoading) {
|
||||
return
|
||||
}
|
||||
this.confirmLoading = true
|
||||
const that = this
|
||||
// 触发表单验证
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
that.confirmLoading = true
|
||||
let httpUrl = this.url.setLabel
|
||||
let method = 'post'
|
||||
const formData = Object.assign(this.model, values)
|
||||
formData.subIds = that.selectedIds.join(',')
|
||||
console.log('表单提交数据', formData)
|
||||
httpAction(httpUrl, formData, method).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
that.$emit('ok')
|
||||
that.close()
|
||||
} else {
|
||||
that.$message.warning(res.message)
|
||||
}
|
||||
}).finally(() => {
|
||||
setTimeout(() => {
|
||||
this.confirmLoading = false
|
||||
}, 1000)
|
||||
})
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
},
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user