修改新增企业 新增联系人组件 是否调用无权限接口
This commit is contained in:
+6
-2
@@ -109,9 +109,12 @@ export const transitRESTful = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 通过企业名称获取该企业下的联系人
|
// 通过企业名称获取该企业下的联系人
|
||||||
const getContactsByCompany = (params) => getAction('/company/payContactsManagement/queryByCompanyMeeting', params)
|
const getContactsByCompany = (params) => getAction('/company/payContactsManagement/queryByCompany', params)
|
||||||
|
// 通过企业名称获取该企业下的联系人无权限接口
|
||||||
|
const getContactsByCompanyNoLimit = (params) => getAction('/company/payContactsManagement/queryByCompanyMeeting', params)
|
||||||
// 通过联系人id获取联系人信息
|
// 通过联系人id获取联系人信息
|
||||||
const getContactsById = (param) => getAction('/company/payContactsManagement/queryByIdMeeting', param)
|
const getContactsById = (param) => getAction('/company/payContactsManagement/queryByIdMeeting', param)
|
||||||
|
|
||||||
// 加密获取key 与 iv
|
// 加密获取key 与 iv
|
||||||
const getKeyIv = (param) => getAction('/sys/getEncryptedString',param)
|
const getKeyIv = (param) => getAction('/sys/getEncryptedString',param)
|
||||||
|
|
||||||
@@ -176,7 +179,8 @@ export {
|
|||||||
queryallRoles,
|
queryallRoles,
|
||||||
getContactsById,
|
getContactsById,
|
||||||
getFileInfo,
|
getFileInfo,
|
||||||
getKeyIv
|
getKeyIv,
|
||||||
|
getContactsByCompanyNoLimit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export default {
|
|||||||
visible: false,
|
visible: false,
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
url: {
|
url: {
|
||||||
list: '/company/payCompanyManagement/listMeeting'
|
list: '/company/payCompanyManagement/list'
|
||||||
},
|
},
|
||||||
selectedCompany: {},
|
selectedCompany: {},
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
@@ -93,7 +93,9 @@ export default {
|
|||||||
scopedSlots: { customRender: 'text' }
|
scopedSlots: { customRender: 'text' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
dataSource: []
|
dataSource: [],
|
||||||
|
// 是否调用无权限接口
|
||||||
|
isLimit: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -110,7 +112,19 @@ export default {
|
|||||||
onSelectChange(selectedRowKeys, selectionRows) {
|
onSelectChange(selectedRowKeys, selectionRows) {
|
||||||
this.selectedCompany = selectionRows[0]
|
this.selectedCompany = selectionRows[0]
|
||||||
this.selectedRowKeys = selectedRowKeys
|
this.selectedRowKeys = selectedRowKeys
|
||||||
}
|
},
|
||||||
|
/*
|
||||||
|
* 重写一下查询 之前调用的是混入的查询
|
||||||
|
* */
|
||||||
|
searchReset() {
|
||||||
|
// 调用无权限接口
|
||||||
|
if(this.isLimit){
|
||||||
|
this.url.list = '/company/payCompanyManagement/listMeeting'
|
||||||
|
}
|
||||||
|
this.lastQueryParam = {}
|
||||||
|
this.queryParam = {}
|
||||||
|
this.loadData(1)
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -44,6 +44,12 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
required: false,
|
required: false,
|
||||||
default: true
|
default: true
|
||||||
|
},
|
||||||
|
// 是否调用无权限接口
|
||||||
|
isLimit:{
|
||||||
|
type:Boolean,
|
||||||
|
required:false,
|
||||||
|
default:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -54,6 +60,8 @@ export default {
|
|||||||
if (this.isCompanyDisabled) {
|
if (this.isCompanyDisabled) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 修改参数 是否调用无权限接口
|
||||||
|
this.$refs.businessSelect.isLimit = this.isLimit
|
||||||
this.$refs.businessSelect.searchReset()
|
this.$refs.businessSelect.searchReset()
|
||||||
this.$refs.businessSelect.visible = true
|
this.$refs.businessSelect.visible = true
|
||||||
this.$refs.businessSelect.selectedRowKeys[0] = this.value.id
|
this.$refs.businessSelect.selectedRowKeys[0] = this.value.id
|
||||||
@@ -74,7 +82,8 @@ export default {
|
|||||||
*/
|
*/
|
||||||
addCompany() {
|
addCompany() {
|
||||||
this.$refs.businessAdd.title = '新增企业'
|
this.$refs.businessAdd.title = '新增企业'
|
||||||
this.$refs.businessAdd.add()
|
// 传参是否调用无权限接口
|
||||||
|
this.$refs.businessAdd.add(this.isLimit)
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 接收回显
|
* 接收回显
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import ContactManagementModule from '@views/businessManagement/modules/ContactManagementModule'
|
import ContactManagementModule from '@views/businessManagement/modules/ContactManagementModule'
|
||||||
import { getContactsByCompany } from '@api/api'
|
import { getContactsByCompany,getContactsByCompanyNoLimit } from '@api/api'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SelectContacts',
|
name: 'SelectContacts',
|
||||||
@@ -66,6 +66,12 @@ export default {
|
|||||||
type: String,
|
type: String,
|
||||||
required: false,
|
required: false,
|
||||||
default: 'string'
|
default: 'string'
|
||||||
|
},
|
||||||
|
// 是否调用无权限接口
|
||||||
|
isLimit:{
|
||||||
|
type:Boolean,
|
||||||
|
required:false,
|
||||||
|
default:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -115,15 +121,29 @@ export default {
|
|||||||
const params = {
|
const params = {
|
||||||
companyId: this.selectedCompany.id
|
companyId: this.selectedCompany.id
|
||||||
}
|
}
|
||||||
return new Promise(resolve => {
|
// 是否调用无权限接口
|
||||||
getContactsByCompany(params).then(res => {
|
if(this.isLimit){
|
||||||
this.contactsList = res.result
|
// 调用无权限接口
|
||||||
if (this.initContacts && this.initContacts.hasOwnProperty.call(this.initContacts, 'id')) {
|
return new Promise(resolve => {
|
||||||
this.contactsList.push(this.initContacts)
|
getContactsByCompanyNoLimit(params).then(res => {
|
||||||
}
|
this.contactsList = res.result
|
||||||
resolve()
|
if (this.initContacts && this.initContacts.hasOwnProperty.call(this.initContacts, 'id')) {
|
||||||
|
this.contactsList.push(this.initContacts)
|
||||||
|
}
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
}else{
|
||||||
|
return new Promise(resolve => {
|
||||||
|
getContactsByCompany(params).then(res => {
|
||||||
|
this.contactsList = res.result
|
||||||
|
if (this.initContacts && this.initContacts.hasOwnProperty.call(this.initContacts, 'id')) {
|
||||||
|
this.contactsList.push(this.initContacts)
|
||||||
|
}
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
@@ -131,7 +151,8 @@ export default {
|
|||||||
*/
|
*/
|
||||||
addContacts() {
|
addContacts() {
|
||||||
if (this.selectedCompany && Object.keys(this.selectedCompany).length > 0) {
|
if (this.selectedCompany && Object.keys(this.selectedCompany).length > 0) {
|
||||||
this.$refs.contactForm.add()
|
// 传入是否调用无权限接口的参数 去判断
|
||||||
|
this.$refs.contactForm.add(this.isLimit)
|
||||||
this.$refs.contactForm.title = '新增'
|
this.$refs.contactForm.title = '新增'
|
||||||
this.$refs.contactForm.disableSubmit = false
|
this.$refs.contactForm.disableSubmit = false
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -186,13 +186,19 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
add: '/company/payCompanyManagement/addMeeting',
|
add: '/company/payCompanyManagement/add',
|
||||||
edit: '/company/payCompanyManagement/edit'
|
edit: '/company/payCompanyManagement/edit'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add() {
|
add(limit) {
|
||||||
|
// true 是调用无权限接口
|
||||||
|
if(limit){
|
||||||
|
this.url.add = '/company/payCompanyManagement/addMeeting'
|
||||||
|
}else {
|
||||||
|
this.url.add = '/company/payCompanyManagement/add'
|
||||||
|
}
|
||||||
this.edit({})
|
this.edit({})
|
||||||
},
|
},
|
||||||
edit(record) {
|
edit(record) {
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ export default {
|
|||||||
sm: { span: 21 }
|
sm: { span: 21 }
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
add: '/company/payContactsManagement/addMeeting',
|
add: '/company/payContactsManagement/add',
|
||||||
edit: '/company/payContactsManagement/edit'
|
edit: '/company/payContactsManagement/edit'
|
||||||
},
|
},
|
||||||
validatorRules: {
|
validatorRules: {
|
||||||
@@ -200,7 +200,13 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
add() {
|
add(limit) {
|
||||||
|
// true 是调用无权限接口
|
||||||
|
if(limit){
|
||||||
|
this.url.add = '/company/payContactsManagement/addMeeting'
|
||||||
|
}else {
|
||||||
|
this.url.add = '/company/payContactsManagement/add'
|
||||||
|
}
|
||||||
this.edit({})
|
this.edit({})
|
||||||
if (this.isCompanyDisabled) {
|
if (this.isCompanyDisabled) {
|
||||||
let company = {
|
let company = {
|
||||||
|
|||||||
@@ -70,12 +70,14 @@
|
|||||||
</a-col>
|
</a-col>
|
||||||
<a-col :span="12" style="display: flex">
|
<a-col :span="12" style="display: flex">
|
||||||
<label>会议通知:</label>
|
<label>会议通知:</label>
|
||||||
<preview-file :file-id="currentMeetingInfo.meetingFiles" v-if="currentMeetingInfo.meetingFiles"></preview-file>
|
<preview-file :file-id="currentMeetingInfo.meetingFiles"
|
||||||
|
v-if="currentMeetingInfo.meetingFiles"></preview-file>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row type="flex">
|
<a-row type="flex">
|
||||||
<label>收费二维码:</label>
|
<label>收费二维码:</label>
|
||||||
<j-image-upload :return-id="true" v-if="currentMeetingInfo.paymentQrCode" v-model="currentMeetingInfo.paymentQrCode" disabled></j-image-upload>
|
<j-image-upload :return-id="true" v-if="currentMeetingInfo.paymentQrCode"
|
||||||
|
v-model="currentMeetingInfo.paymentQrCode" disabled></j-image-upload>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row>
|
<a-row>
|
||||||
<a-col :span="24">
|
<a-col :span="24">
|
||||||
@@ -94,10 +96,11 @@
|
|||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :xxl="8" :xl="12" :sm="24">
|
<a-col :xxl="8" :xl="12" :sm="24">
|
||||||
<a-form-item label="参会企业" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="参会企业" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<add-meeting-company @change="changeCompany" v-decorator="['companyId',validatorRules.companyId]"
|
<company-select @change="changeCompany" v-decorator="['companyId',validatorRules.companyId]"
|
||||||
placeholder="请选择参会企业"
|
placeholder="请选择参会企业"
|
||||||
:maxLength='50'>
|
:is-limit="true"
|
||||||
</add-meeting-company>
|
:maxLength='50'>
|
||||||
|
</company-select>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -106,6 +109,7 @@
|
|||||||
<a-form-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="姓名" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<select-contacts :selected-company="selectedCompany"
|
<select-contacts :selected-company="selectedCompany"
|
||||||
placeholder="请选择参会人"
|
placeholder="请选择参会人"
|
||||||
|
:is-limit="true"
|
||||||
v-decorator="['companyContactId',validatorRules.companyContactId]"
|
v-decorator="['companyContactId',validatorRules.companyContactId]"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
@change="changeContact"
|
@change="changeContact"
|
||||||
@@ -239,12 +243,12 @@ import SelectContacts from '@comp/company/SelectContacts'
|
|||||||
import OtherMeetingForm from '@views/incomePayments/meetManage/OtherMeetingForm'
|
import OtherMeetingForm from '@views/incomePayments/meetManage/OtherMeetingForm'
|
||||||
import SeminarVipForm from '@views/incomePayments/meetManage/modules/SeminarVipForm'
|
import SeminarVipForm from '@views/incomePayments/meetManage/modules/SeminarVipForm'
|
||||||
import SeminarPartnerForm from '@views/incomePayments/meetManage/modules/SeminarPartnerForm'
|
import SeminarPartnerForm from '@views/incomePayments/meetManage/modules/SeminarPartnerForm'
|
||||||
import AddMeetingCompany from '@comp/company/AddMeetingCompany'
|
|
||||||
import {httpAction} from '@api/manage'
|
import {httpAction} from '@api/manage'
|
||||||
import {getContactsById} from '@api/api'
|
import {getContactsById} from '@api/api'
|
||||||
import pick from 'lodash.pick'
|
import pick from 'lodash.pick'
|
||||||
import PreviewFile from '@comp/jero/PreviewFile'
|
import PreviewFile from '@comp/jero/PreviewFile'
|
||||||
import JImageUpload from '@comp/jero/JImageUpload'
|
import JImageUpload from '@comp/jero/JImageUpload'
|
||||||
|
import CompanySelect from '@comp/company/CompanySelect'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'SignUpPage',
|
name: 'SignUpPage',
|
||||||
@@ -254,9 +258,9 @@ export default {
|
|||||||
// JDictSelectTag,
|
// JDictSelectTag,
|
||||||
OtherMeetingForm,
|
OtherMeetingForm,
|
||||||
SeminarVipForm,
|
SeminarVipForm,
|
||||||
AddMeetingCompany,
|
|
||||||
PreviewFile,
|
PreviewFile,
|
||||||
JImageUpload
|
JImageUpload,
|
||||||
|
CompanySelect
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -341,7 +345,7 @@ export default {
|
|||||||
// 是否有邀请码
|
// 是否有邀请码
|
||||||
inviteCodeBool: false,
|
inviteCodeBool: false,
|
||||||
// 邀请码错误状态
|
// 邀请码错误状态
|
||||||
codeErrorBool:true,
|
codeErrorBool: true,
|
||||||
url: {
|
url: {
|
||||||
add: '/meeting/payMeetingSituation/signUp'
|
add: '/meeting/payMeetingSituation/signUp'
|
||||||
}
|
}
|
||||||
@@ -468,7 +472,7 @@ export default {
|
|||||||
}
|
}
|
||||||
this.form.validateFields((err, values) => {
|
this.form.validateFields((err, values) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
if(this.codeErrorBool){
|
if (this.codeErrorBool) {
|
||||||
this.$message.error('邀请码填写错误')
|
this.$message.error('邀请码填写错误')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
@@ -594,13 +598,14 @@ export default {
|
|||||||
this.identifyType = 1
|
this.identifyType = 1
|
||||||
this.guestType = 1
|
this.guestType = 1
|
||||||
break
|
break
|
||||||
default :this.guestType = null
|
default :
|
||||||
|
this.guestType = null
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
* 校验邀请码是否正确 给出提示
|
* 校验邀请码是否正确 给出提示
|
||||||
* */
|
* */
|
||||||
validateCode(){
|
validateCode() {
|
||||||
let code = this.form.getFieldValue('code')
|
let code = this.form.getFieldValue('code')
|
||||||
let flag = false
|
let flag = false
|
||||||
switch (code) {
|
switch (code) {
|
||||||
@@ -620,15 +625,16 @@ export default {
|
|||||||
case this.currentMeetingInfo.vipInvitationCode:
|
case this.currentMeetingInfo.vipInvitationCode:
|
||||||
flag = true
|
flag = true
|
||||||
break
|
break
|
||||||
default : flag = false
|
default :
|
||||||
|
flag = false
|
||||||
}
|
}
|
||||||
// 保存错误状态
|
// 保存错误状态
|
||||||
this.codeErrorBool = !flag
|
this.codeErrorBool = !flag
|
||||||
// 判断guestType 是否等于 null
|
// 判断guestType 是否等于 null
|
||||||
if(!flag){
|
if (!flag) {
|
||||||
// 错误
|
// 错误
|
||||||
this.$message.warn('邀请码填写错误')
|
this.$message.warn('邀请码填写错误')
|
||||||
}else {
|
} else {
|
||||||
this.$message.success('邀请码填写正确')
|
this.$message.success('邀请码填写正确')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -756,6 +762,7 @@ export default {
|
|||||||
left: 15px;
|
left: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.center {
|
.center {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|||||||
Reference in New Issue
Block a user