[update] -增加企业是否是内部企业的判断

This commit is contained in:
fengchenchen
2022-04-26 11:44:44 +08:00
parent 14e270dd65
commit b4bfed5fa9
3 changed files with 68 additions and 5 deletions
+9 -1
View File
@@ -106,6 +106,11 @@ const getCertificateLastProofInfo = (param) => getAction('/paymentCheck/payPayme
// 通过合同邮寄表id获取邮寄详情
const queryMailDetailById = (param) => getAction('/payMailContract/payMailContract/queryById', param)
// 修改企业是否是内部企业的接口
const updateInternalEnterprise = (param) => postAction('/company/payCompanyManagement/updateInternalEnterprise', param)
// 判断当前企业是否是内部企业
const judgeInternalEnterprise = (param) => getAction('/company/payCompanyManagement/getInternalEnterprise', param)
export {
getWorkingGroupById,
getChargeNotice,
@@ -158,5 +163,8 @@ export {
getLastProofInfo,
getStanderMemberLastProofInfo,
getCertificateLastProofInfo,
queryMailDetailById
queryMailDetailById,
updateInternalEnterprise,
judgeInternalEnterprise
}
@@ -62,6 +62,9 @@
<template slot="text" slot-scope="text">
<j-ellipsis :value="text" :length="18"></j-ellipsis>
</template>
<template slot="switch" slot-scope="text, record">
<a-switch :checked="text === 'true'" @change="(val) => onSwitchChange(val, record)" />
</template>
<span slot="action" class="action-span-cell" slot-scope="text, record">
<a @click="handleAudit(record.id)" v-if="record.status===2"
@@ -69,6 +72,7 @@
<a @click="handleEdit(record)" v-has="'company:edit'">编辑</a>
<a @click="confirmDelete(record)" v-has="'company:delete'">删除</a>
</span>
</a-table>
</div>
<business-management-module ref="modalForm" @ok="modalFormOk"></business-management-module>
@@ -82,7 +86,7 @@ import JEllipsis from '@comp/jero/JEllipsis'
import BusinessManagementModule from './modules/BusinessManagementModule'
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
import IconImg from '@/assets/imgs/icon/icon_company_management.png'
import { aduitCompany, checkContactByCompany } from '../../api/incomePaymentsApi'
import { aduitCompany, checkContactByCompany, updateInternalEnterprise } from '../../api/incomePaymentsApi'
import { getAction } from '../../api/manage'
export default {
@@ -154,7 +158,13 @@ export default {
width: 300,
dataIndex: 'bankAccountName',
scopedSlots: { customRender: 'text' }
}, {
}, {
title: '是否是内部企业',
align: 'center',
width: 150,
dataIndex: 'internalEnterprise',
scopedSlots: { customRender: 'switch' }
},{
title: '操作',
dataIndex: 'action',
align: 'center',
@@ -287,6 +297,24 @@ export default {
}
})
}
},
onSwitchChange(val, record) {
console.log('---------val, record--------', val, record)
let params = {
id: record.id,
internalEnterprise: val
}
this.isLoading = true
updateInternalEnterprise(params).then(res => {
if(res.success) {
this.$message.success(res.message)
this.loadData()
} else {
this.isLoading = false
}
}, () => {
this.isLoading = false
})
}
}
}
@@ -294,4 +322,4 @@ export default {
<style scoped lang="less">
@import '~@assets/less/common.less';
</style>
</style>
@@ -67,7 +67,7 @@
<a-radio-group :disabled="model.checkResult === 1" v-decorator="['identity',validatorRules.identify]" @change="changeIdentify">
<a-radio :value="1">嘉宾</a-radio>
<a-radio :value="2">参会人</a-radio>
<a-radio :value="3">内部企业</a-radio>
<a-radio :value="3" :disabled="!isInternalEnterprise">内部企业</a-radio>
</a-radio-group>
</a-form-item>
</a-col>
@@ -132,6 +132,7 @@ import SeminarPartnerForm from '@views/incomePayments/meetManage/modules/Seminar
import AddMeetingCompany from '@comp/company/AddMeetingCompany'
import {getContactsById} from '@api/api'
import {getSingUpUserInfo, validateStandard, getMeetInfoById} from '@api/incomeMeetingApi'
import { judgeInternalEnterprise } from '../../../api/incomePaymentsApi'
import {httpAction} from '@api/manage'
import pick from 'lodash.pick'
import PageHeaderTitle from '@comp/layouts/PageHeaderTitle'
@@ -243,6 +244,8 @@ export default {
edit:'/meeting/councilMeetingSituation/edit'
},
title:'添加参会人',
// 当前参会企业是否是内部企业
isInternalEnterprise: false
}
},
created() {
@@ -294,6 +297,7 @@ export default {
* 编辑
* */
edit(record){
this.isInternalEnterprise = false
this.form.resetFields()
this.model = Object.assign({},record)
if(this.model.id){
@@ -473,6 +477,9 @@ export default {
if(this.$refs.formother ){
this.$refs.formother.clearFormItem()
}
// 判断当前企业是否是内部企业
console.log('-----this.selectedCompany-----', this.selectedCompany)
this.judgeInternalEnterprise(this.selectedCompany.id)
},
/*
* 选择联系人获取信息
@@ -491,6 +498,26 @@ export default {
}
})
},
/*
* 判断当前的企业是否是内部企业,如果是修改isInternalEnterprise
* */
judgeInternalEnterprise(id) {
let params = {
id: id
}
judgeInternalEnterprise(params).then(res => {
if(res.success) {
this.isInternalEnterprise = res.result !== 'false'
}
}).finally(() => {
// 清空form表单身份的数据
this.form.setFieldsValue({
identity: null
})
// 嘉宾类型置空
this.guestType = null
})
},
/**
* @Description 通过会议id获取会议信息
* @Date 2021-11-29