diff --git a/src/api/incomePaymentsApi.js b/src/api/incomePaymentsApi.js
index b497dcc..b583541 100644
--- a/src/api/incomePaymentsApi.js
+++ b/src/api/incomePaymentsApi.js
@@ -56,9 +56,18 @@ const judgeInternalEnterprise = (param) => getAction('/company/payCompanyManagem
// 国际研讨会-判断当前的邀请码是否可用
const judgeMeetingCode = (param) => getAction('/meeting/payMeetingSituation/validInvitationCode', param)
+ // 通过会员id拿到邮寄企业的信息
+const queryContactInfoByMemberId = (params) => getAction('/company/payCompanyManagement/listMeeting', params)
+// 通过企业id查询企业的联系人
+const queryContactList = (params) => getAction('/company/payContactsManagement/queryByCompanyMeeting', params)
+// 通过联系人id查询邮寄信息
+const queryPostInfoById = (params) => getAction('/company/payContactsManagement/queryByIdMeeting', params)
export {
queryCommonProjectById,
+ queryContactInfoByMemberId,
+ queryContactList,
+ queryPostInfoById,
getMeetInfoById,
getSingUpUserInfo,
getContactUserInfo,
diff --git a/src/components/customSelect/BusinessSelect.vue b/src/components/customSelect/BusinessSelect.vue
new file mode 100644
index 0000000..470df9d
--- /dev/null
+++ b/src/components/customSelect/BusinessSelect.vue
@@ -0,0 +1,127 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+ 刷新
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/customSelect/CompanySelect.vue b/src/components/customSelect/CompanySelect.vue
new file mode 100644
index 0000000..545adc9
--- /dev/null
+++ b/src/components/customSelect/CompanySelect.vue
@@ -0,0 +1,87 @@
+
+
+
+
+
+
+
diff --git a/src/views/standardsAssociation/PaymentInfo/modules/CertificatePaymentInfoModal.vue b/src/views/standardsAssociation/PaymentInfo/modules/CertificatePaymentInfoModal.vue
index 631449a..f78ef10 100644
--- a/src/views/standardsAssociation/PaymentInfo/modules/CertificatePaymentInfoModal.vue
+++ b/src/views/standardsAssociation/PaymentInfo/modules/CertificatePaymentInfoModal.vue
@@ -253,6 +253,74 @@
+
+ 邮寄信息
+
+
+
+
+
+
+
+
+
+
+
+ {{
+ item.name
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {e.target.value = e.target.value.replace(/[^0-9]/g,'')}"
+ :maxLength="6"
+ v-decorator="[ 'contactPostCode']">
+
+
+
+
+
+
审核信息
@@ -533,7 +600,8 @@ import {
} from '@/api/standardsAssociationApi'
import JUpload from '@/components/standardsAssociation/JUpload'
import PreViewImgModal from './PreViewImgModal'
-import { commonMemberCost, vipMemberCost,upgradeVip } from '@api/incomePaymentsApi'
+import { commonMemberCost, vipMemberCost,upgradeVip,queryContactInfoByMemberId,queryContactList,queryPostInfoById } from '@api/incomePaymentsApi'
+import CompanySelect from '@comp/customSelect/CompanySelect'
export default {
name: 'PaymentInfoModal',
components: {
@@ -541,7 +609,8 @@ export default {
JImageUpload,
JUpload,
JDictSelectTag,
- PreViewImgModal
+ PreViewImgModal,
+ CompanySelect
},
data() {
return {
@@ -565,6 +634,11 @@ export default {
},
confirmLoading: false,
validatorRules: {
+ company: {
+ rules: [{ required: true, message: '请选择单位' }],
+ validateTrigger: ['blur', 'change'],
+ initialValue: {}
+ },
paymentMethod: {
rules: [{
required: true, message: '请选择缴费方式'
@@ -747,6 +821,7 @@ export default {
endTime: '',
// 申请证书
selectedRowKeys: [],
+ contactsList:[],
count: 2,
// 证书列表
columns: [
@@ -905,6 +980,9 @@ export default {
this.loadMember()
// 查找审核信息
this.getCheckInfo(record.id)
+ // 回显邮寄信息
+ const incomeCompanyInfo = await this.getIncomeCompanyInfo(this.memberId)
+ this.setPostContactInfo(incomeCompanyInfo)
var type = this.model.paymentTime
// 缴费时长选择
this.changgeType(type)
@@ -964,6 +1042,9 @@ export default {
// 获取会员信息
await this.loadMember()
this.visible = true
+ // 回显邮寄信息
+ const incomeCompanyInfo = await this.getIncomeCompanyInfo(this.memberId)
+ this.setPostContactInfo(incomeCompanyInfo)
// 获取会员 类型 1年 五年的
// let type = this.model.paymentTime
// 新增 设置 初始缴费金额
@@ -1005,6 +1086,111 @@ export default {
this.validateCompanyName()
})
},
+ // 下拉框的搜索
+ filterOption(input, option) {
+ return (
+ option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
+ )
+ },
+ /**
+ * 回显邮寄信息 如果列表没有 默认为该企业的邮寄信息
+ * */
+ async setPostContactInfo(incomeCompanyInfo) {
+ let companyContact
+ if (this.model.postCompanyId) {
+ // 用列表的回显
+ companyContact = {
+ id: this.model.postCompanyId,
+ companyName: this.model.postCompanyName
+ }
+ } else {
+ companyContact = {
+ id: incomeCompanyInfo.id,
+ companyName: incomeCompanyInfo.companyName
+ }
+ }
+ // 回显邮寄单位
+ this.form.setFieldsValue({
+ 'companyContact': companyContact
+ })
+ // 查询邮寄单位下的联系人列表
+ this.contactsList = await this.getContactList({ companyId: companyContact.id })
+ // 回显 邮寄联系人
+ if (this.model.postCompanyId) {
+ this.$nextTick(() => {
+ this.form.setFieldsValue({
+ 'postContactId': this.model.postContactId,
+ 'postContactPhone': this.model.postContactPhone,
+ 'contactPostCode': this.model.contactPostCode,
+ 'postContactAddress': this.model.postContactAddress
+ })
+ })
+ } else {
+ // 获取当前企业的默认邮寄联系人
+ const initPersonInfo = await this.getContactList({ memberId: this.memberId })
+ this.form.setFieldsValue({
+ 'postContactId': initPersonInfo[0].id
+ })
+ // 回显邮寄联系人信息
+ this.selectContact(initPersonInfo[0].id)
+ }
+ },
+ /**
+ * 通过会员id查询对应的来款企业的信息
+ * */
+ getIncomeCompanyInfo(memberId) {
+ return new Promise(resolve => {
+ queryContactInfoByMemberId({ memberId }).then(res => {
+ if (res.success) {
+ resolve(res.result.records[0])
+ }
+ })
+ })
+ },
+ /**
+ * 选择邮寄单位
+ * */
+ async companyContactChange(val) {
+ // 清空 邮寄信息
+ this.form.resetFields(['postContactId', 'postContactPhone', 'contactPostCode', 'postContactAddress'])
+ this.contactsList = []
+ this.contactsList = await this.getContactList({ companyId: val.id })
+ },
+ /**
+ * 查询公司联系人列表
+ * @param param 传入memberid 查询的事默认值 传入companyId 查询所有的联系人
+ * */
+ getContactList(param) {
+ return new Promise(resolve => {
+ queryContactList(param).then(res => {
+ if (res.success) {
+ resolve(res.result)
+ }
+ })
+ })
+ },
+ /**
+ * 选择邮寄联系人
+ * */
+ selectContact(val) {
+ if (!val) {
+ // 清除邮寄联系人信息
+ this.form.resetFields(['postContactPhone', 'contactPostCode', 'postContactAddress'])
+ }
+ queryPostInfoById({ id: val }).then(res => {
+ if (res.success) {
+ const contactInfo = res.result
+ // 回显邮寄联系人的信息
+ this.$nextTick(() => {
+ this.form.setFieldsValue({
+ 'postContactPhone': contactInfo.phone,
+ 'contactPostCode': contactInfo.postalCode,
+ 'postContactAddress': contactInfo.contactAddress
+ })
+ })
+ }
+ })
+ },
close() {
this.$emit('close')
this.visible = false