【修改】 会议报名判断企业是否是内部企业
This commit is contained in:
@@ -22,7 +22,9 @@ const signUpApi = {
|
|||||||
// 上传汇款凭证
|
// 上传汇款凭证
|
||||||
uploadPayRecord:(params) =>http.post(`${URL_CONFIG}meeting/payMeetingSituation/editTerminal`, params),
|
uploadPayRecord:(params) =>http.post(`${URL_CONFIG}meeting/payMeetingSituation/editTerminal`, params),
|
||||||
// 通过单位名称校验是否标协会员
|
// 通过单位名称校验是否标协会员
|
||||||
validateStandard:(params) => http.get(`${URL_CONFIG}meeting/internalMeetingSituation/checkMember`,params)
|
validateStandard:(params) => http.get(`${URL_CONFIG}meeting/internalMeetingSituation/checkMember`,params),
|
||||||
|
// 判断当前企业是否是内部企业
|
||||||
|
judgeInternalEnterprise : (params) => http.get(`${URL_CONFIG}company/payCompanyManagement/getInternalEnterprise`,params),
|
||||||
}
|
}
|
||||||
|
|
||||||
export default signUpApi
|
export default signUpApi
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ Page({
|
|||||||
wx.showModal({
|
wx.showModal({
|
||||||
title: '提示',
|
title: '提示',
|
||||||
content: '是否选中该企业',
|
content: '是否选中该企业',
|
||||||
success: function (res) {
|
success: async function (res) {
|
||||||
if (res.confirm) {
|
if (res.confirm) {
|
||||||
//这里是点击了确定以后
|
//这里是点击了确定以后
|
||||||
if (that.data.page === 'guoji') {
|
if (that.data.page === 'guoji') {
|
||||||
@@ -124,6 +124,8 @@ Page({
|
|||||||
'selectedCompany.companyName':e.currentTarget.dataset.company.companyName,
|
'selectedCompany.companyName':e.currentTarget.dataset.company.companyName,
|
||||||
'selectedCompany.id':e.currentTarget.dataset.company.id,
|
'selectedCompany.id':e.currentTarget.dataset.company.id,
|
||||||
})
|
})
|
||||||
|
let bool = await that.judgeCompany(e.currentTarget.dataset.company.id)
|
||||||
|
prevPage.setIdentityDisabled(bool)
|
||||||
wx.navigateBack({
|
wx.navigateBack({
|
||||||
delta: 1,
|
delta: 1,
|
||||||
})
|
})
|
||||||
@@ -140,6 +142,8 @@ Page({
|
|||||||
'selectedCompany.companyName':e.currentTarget.dataset.company.companyName,
|
'selectedCompany.companyName':e.currentTarget.dataset.company.companyName,
|
||||||
'selectedCompany.id':e.currentTarget.dataset.company.id,
|
'selectedCompany.id':e.currentTarget.dataset.company.id,
|
||||||
})
|
})
|
||||||
|
let bool = await that.judgeCompany(e.currentTarget.dataset.company.id)
|
||||||
|
prevPage.setIdentityDisabled(bool)
|
||||||
wx.navigateBack({
|
wx.navigateBack({
|
||||||
delta: 1,
|
delta: 1,
|
||||||
})
|
})
|
||||||
@@ -152,6 +156,20 @@ Page({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 判断选择的企业是否是内部企业
|
||||||
|
judgeCompany(id){
|
||||||
|
const param = {
|
||||||
|
id:id
|
||||||
|
}
|
||||||
|
return new Promise(resolve => {
|
||||||
|
signUpApi.judgeInternalEnterprise(param).then(res => {
|
||||||
|
if(res.success){
|
||||||
|
resolve(res.result === 'true' )
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
},
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -14,15 +14,18 @@ Page({
|
|||||||
// 参会身份数组
|
// 参会身份数组
|
||||||
identifyList: [{
|
identifyList: [{
|
||||||
value: '2',
|
value: '2',
|
||||||
name: '参会人'
|
name: '参会人',
|
||||||
|
disabled:false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '1',
|
value: '1',
|
||||||
name: '嘉宾'
|
name: '嘉宾',
|
||||||
|
disabled:false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '3',
|
value: '3',
|
||||||
name: '内部企业'
|
name: '内部企业',
|
||||||
|
disabled:true
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
// 缴费方式
|
// 缴费方式
|
||||||
@@ -112,8 +115,59 @@ Page({
|
|||||||
departureTime: e.detail.value
|
departureTime: e.detail.value
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 内部企业是否禁用 只有参会单位是内部企业才能选 否则禁用内部企业
|
||||||
|
setIdentityDisabled(bool){
|
||||||
|
const identifyLiseSelect = [
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
name: '参会人',
|
||||||
|
disabled:false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
name: '嘉宾',
|
||||||
|
disabled:false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '3',
|
||||||
|
name: '内部企业',
|
||||||
|
disabled:false
|
||||||
|
},
|
||||||
|
]
|
||||||
|
const identifyLiseSelectDisabled = [
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
name: '参会人',
|
||||||
|
disabled:false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
name: '嘉宾',
|
||||||
|
disabled:false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '3',
|
||||||
|
name: '内部企业',
|
||||||
|
disabled:true
|
||||||
|
},
|
||||||
|
]
|
||||||
|
if(bool){
|
||||||
|
// bool为真 说明是内部企业可以选择内部企业
|
||||||
|
this.setData({
|
||||||
|
'identifyList':identifyLiseSelect
|
||||||
|
})
|
||||||
|
|
||||||
|
}else{
|
||||||
|
// 否则不能选中
|
||||||
|
console.log('不是内部i企业')
|
||||||
|
this.setData({
|
||||||
|
'identifyList':identifyLiseSelectDisabled
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
// 选择参会身份
|
// 选择参会身份
|
||||||
changeIdentity(e) {
|
changeIdentity(e) {
|
||||||
|
// 如果没有选择参会单位 让先选择参会
|
||||||
const that = this
|
const that = this
|
||||||
this.setData({
|
this.setData({
|
||||||
selectedIdentity: e.detail.value
|
selectedIdentity: e.detail.value
|
||||||
@@ -185,6 +239,23 @@ Page({
|
|||||||
})
|
})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!formData.companyId ){
|
||||||
|
wx.showToast({
|
||||||
|
title: '请选择参会单位',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if(!formData.companyContactId ){
|
||||||
|
wx.showToast({
|
||||||
|
title: '请选择参会人',
|
||||||
|
icon: 'none',
|
||||||
|
duration: 2000
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
// 参会身份验证
|
// 参会身份验证
|
||||||
if (formData.identity === '') {
|
if (formData.identity === '') {
|
||||||
wx.showToast({
|
wx.showToast({
|
||||||
|
|||||||
@@ -25,7 +25,8 @@
|
|||||||
<view>
|
<view>
|
||||||
<radio-group name='identity' bindchange="changeIdentity">
|
<radio-group name='identity' bindchange="changeIdentity">
|
||||||
<label class="radio radio-item" wx:for="{{identifyList}}" wx:key="item">
|
<label class="radio radio-item" wx:for="{{identifyList}}" wx:key="item">
|
||||||
<radio class="radio-scale" value="{{item.value}}" color="#069F99"/>{{item.name}}
|
<radio wx:if="{{!item.disabled}}" class="radio-scale" value="{{item.value}}" color="#069F99" disabled="{{item.disabled}}" />
|
||||||
|
<text wx:if="{{!item.disabled}}">{{item.name}}</text>
|
||||||
</label>
|
</label>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -19,15 +19,9 @@ Page({
|
|||||||
// 会议详情
|
// 会议详情
|
||||||
meetingDetailInfo: {},
|
meetingDetailInfo: {},
|
||||||
// 参会身份
|
// 参会身份
|
||||||
identifyList: [{
|
identifyList: [
|
||||||
value: '2',
|
|
||||||
name: '参会人'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: '3',
|
|
||||||
name: '内部企业'
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
|
isNbqyBool:false,
|
||||||
// 邀请码数组
|
// 邀请码数组
|
||||||
inviteCodeArr: [],
|
inviteCodeArr: [],
|
||||||
// 是否出现输入邀请码 参会身份选择嘉宾才出现
|
// 是否出现输入邀请码 参会身份选择嘉宾才出现
|
||||||
@@ -211,13 +205,48 @@ Page({
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
const identifyListDisabled = [
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
name: '参会人',
|
||||||
|
disabled:false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '3',
|
||||||
|
name: '内部企业',
|
||||||
|
disabled:false
|
||||||
|
},
|
||||||
|
]
|
||||||
|
const identifyList = [
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
name: '参会人',
|
||||||
|
disabled:false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '3',
|
||||||
|
name: '内部企业',
|
||||||
|
disabled:true
|
||||||
|
},
|
||||||
|
]
|
||||||
|
if(this.data.isNbqyBool){
|
||||||
|
// 是内部企业
|
||||||
|
this.setData({
|
||||||
|
identifyList:identifyListDisabled
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
this.setData({
|
||||||
|
identifyList:identifyList
|
||||||
|
})
|
||||||
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
identity: '',
|
identity: '',
|
||||||
vipBool: false,
|
vipBool: false,
|
||||||
speakerBool: false,
|
speakerBool: false,
|
||||||
cooperatieBool: false,
|
cooperatieBool: false,
|
||||||
guestBool: false,
|
guestBool: false,
|
||||||
guestType:''
|
guestType:'',
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -511,6 +540,49 @@ Page({
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
// 内部企业是否禁用 只有参会单位是内部企业才能选 否则禁用内部企业
|
||||||
|
setIdentityDisabled(bool){
|
||||||
|
this.setData({
|
||||||
|
isNbqyBool:bool
|
||||||
|
})
|
||||||
|
const identifyLiseSelect = [
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
name: '参会人',
|
||||||
|
disabled:false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '3',
|
||||||
|
name: '内部企业',
|
||||||
|
disabled:false
|
||||||
|
},
|
||||||
|
]
|
||||||
|
const identifyLiseSelectDisabled = [
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
name: '参会人',
|
||||||
|
disabled:false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '3',
|
||||||
|
name: '内部企业',
|
||||||
|
disabled:true
|
||||||
|
},
|
||||||
|
]
|
||||||
|
if(bool){
|
||||||
|
// bool为真 说明是内部企业可以选择内部企业
|
||||||
|
this.setData({
|
||||||
|
'identifyList':identifyLiseSelect
|
||||||
|
})
|
||||||
|
|
||||||
|
}else{
|
||||||
|
// 否则不能选中
|
||||||
|
console.log('不是内部i企业')
|
||||||
|
this.setData({
|
||||||
|
'identifyList':identifyLiseSelectDisabled
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
// 获取会议的详情
|
// 获取会议的详情
|
||||||
queryMeetingDetail(id) {
|
queryMeetingDetail(id) {
|
||||||
const that = this
|
const that = this
|
||||||
|
|||||||
@@ -44,7 +44,8 @@
|
|||||||
<view>
|
<view>
|
||||||
<radio-group name='identity' bindchange="changeIdentify">
|
<radio-group name='identity' bindchange="changeIdentify">
|
||||||
<label class="radio radio-item" wx:for="{{identifyList}}" wx:key="item">
|
<label class="radio radio-item" wx:for="{{identifyList}}" wx:key="item">
|
||||||
<radio class="radio-scale" value="{{item.value}}" color="#069F99"/>{{item.name}}
|
<radio wx:if="{{!item.disabled}}" class="radio-scale" value="{{item.value}}" color="#069F99" disabled="{{item.disabled}}" />
|
||||||
|
<text wx:if="{{!item.disabled}}">{{item.name}}</text>
|
||||||
</label>
|
</label>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
Reference in New Issue
Block a user