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