【修改】增加邮寄联系人信息
This commit is contained in:
+183
-2
@@ -253,6 +253,74 @@
|
||||
</a-row>
|
||||
</div>
|
||||
|
||||
<!-- 邮寄信息 begin-->
|
||||
<a-divider orientation="left">邮寄信息</a-divider>
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="邮寄单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<company-select
|
||||
placeholder="请选择邮寄单位"
|
||||
:disabled="checkFlag || detailFlag"
|
||||
v-decorator="['companyContact',validatorRules.company]"
|
||||
@change="companyContactChange"></company-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="邮寄联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-select
|
||||
placeholder="请选择邮寄联系人"
|
||||
show-search
|
||||
allowClear
|
||||
:disabled="checkFlag || detailFlag"
|
||||
v-decorator="['postContactId']"
|
||||
option-filter-prop="children"
|
||||
:filter-option="filterOption"
|
||||
@change="selectContact"
|
||||
>
|
||||
<a-select-option v-for="item in contactsList" :key="item.id" :value="item.id">{{
|
||||
item.name
|
||||
}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input
|
||||
placeholder="请输入手机号"
|
||||
:maxLength='11'
|
||||
disabled
|
||||
v-decorator="[ 'postContactPhone']"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="邮寄地址" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input
|
||||
placeholder="请输入邮寄地址"
|
||||
:maxLength='50'
|
||||
disabled
|
||||
v-decorator="[ 'postContactAddress']"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="邮编" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input
|
||||
placeholder="请输入邮编"
|
||||
disabled
|
||||
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9]/g,'')}"
|
||||
:maxLength="6"
|
||||
v-decorator="[ 'contactPostCode']"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<!-- 邮寄信息 end-->
|
||||
|
||||
<div v-show="detailFlag">
|
||||
<a-divider orientation="left">审核信息</a-divider>
|
||||
<a-table :pagination=false bordered :data-source="checkInfo" :columns="checkColumns">
|
||||
@@ -277,6 +345,8 @@ import JUpload from '@/components/standardsAssociation/JUpload'
|
||||
import JImageUpload from '@/components/standardsAssociation/JImageUpload'
|
||||
import JDictSelectTag from '@/components/standardsAssociation/JDictSelectTag'
|
||||
import { getMemberInfoById, getCertificateById, getCheckInfo, getByMemberTime } from '@/api/standardsAssociationApi'
|
||||
import {queryContactInfoByMemberId, queryContactList, queryPostInfoById} from '@api/incomePaymentsApi'
|
||||
import CompanySelect from '@comp/customSelect/CompanySelect'
|
||||
|
||||
export default {
|
||||
name: 'CertificatePaymentInfoModal',
|
||||
@@ -284,7 +354,8 @@ export default {
|
||||
JDate,
|
||||
JImageUpload,
|
||||
JUpload,
|
||||
JDictSelectTag
|
||||
JDictSelectTag,
|
||||
CompanySelect
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -296,6 +367,7 @@ export default {
|
||||
width: 1100,
|
||||
visible: false,
|
||||
model: {},
|
||||
contactsList:[],
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 5 }
|
||||
@@ -572,7 +644,7 @@ export default {
|
||||
this.form.setFieldsValue(pick(this.model, 'billNumber', 'companyName', 'paymentType', 'validPeriod', 'paymentTime', 'paymentAmount', 'certificatesNum', 'submissionTime', 'checkTime', 'paymentStatus', 'paymentMethod', 'paymentRecord', 'invoiceRequirements', 'headerName', 'taxNumber', 'invoiceAddress', 'invoicePhone', 'depositBank', 'bankAccount', 'checkMember', 'checkMemberId', 'memberId', 'certificate', 'address', 'postcode', 'serviceCharge', 'paymentMark'))
|
||||
})
|
||||
},
|
||||
detail(record) {
|
||||
async detail(record) {
|
||||
this.paymentMethodFlag = record.paymentMethod
|
||||
this.detailFlag = true
|
||||
this.form.resetFields()
|
||||
@@ -586,11 +658,15 @@ export default {
|
||||
this.loadMember()
|
||||
this.model.certificate = this.certificate
|
||||
}
|
||||
|
||||
this.getCertificateById(record.certificateId)
|
||||
this.getCheckInfo(record.id)
|
||||
var type = this.model.paymentTime
|
||||
this.changgeType(type)
|
||||
this.visible = true
|
||||
// 回显邮寄信息
|
||||
const incomeCompanyInfo = await this.getIncomeCompanyInfo(this.memberId)
|
||||
this.setPostContactInfo(incomeCompanyInfo)
|
||||
this.model.memberId = this.memberId
|
||||
if (this.model.certificatesNum > 0) {
|
||||
this.certificatesFlag = true
|
||||
@@ -655,6 +731,111 @@ export default {
|
||||
this.paymentMethodFlag = ''
|
||||
this.submitFlag = true
|
||||
},
|
||||
// 下拉框的搜索
|
||||
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
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
const that = this
|
||||
// 触发表单验证
|
||||
|
||||
@@ -265,6 +265,72 @@
|
||||
</a-row>
|
||||
<!--缴费 方式 费用类型end -->
|
||||
|
||||
<!-- 邮寄信息 begin-->
|
||||
<a-divider orientation="left">邮寄信息</a-divider>
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="邮寄单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<company-select
|
||||
placeholder="请选择邮寄单位"
|
||||
v-decorator="['companyContact',validatorRules.company]"
|
||||
@change="companyContactChange"></company-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="邮寄联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-select
|
||||
placeholder="请选择邮寄联系人"
|
||||
show-search
|
||||
allowClear
|
||||
v-decorator="['postContactId']"
|
||||
option-filter-prop="children"
|
||||
:filter-option="filterOption"
|
||||
@change="selectContact"
|
||||
>
|
||||
<a-select-option v-for="item in contactsList" :key="item.id" :value="item.id">{{
|
||||
item.name
|
||||
}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input
|
||||
placeholder="请输入手机号"
|
||||
:maxLength='11'
|
||||
disabled
|
||||
v-decorator="[ 'postContactPhone']"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="邮寄地址" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input
|
||||
placeholder="请输入邮寄地址"
|
||||
:maxLength='50'
|
||||
disabled
|
||||
v-decorator="[ 'postContactAddress']"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="邮编" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input
|
||||
placeholder="请输入邮编"
|
||||
disabled
|
||||
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9]/g,'')}"
|
||||
:maxLength="6"
|
||||
v-decorator="[ 'contactPostCode']"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<!-- 邮寄信息 end-->
|
||||
|
||||
<!-- 申请证书信息begin -->
|
||||
<!-- 填写了证书缴费金额才显示-->
|
||||
<template v-if="certificatePaymentAmountFormValue">
|
||||
@@ -476,6 +542,7 @@ import pick from 'lodash.pick'
|
||||
import JDate from '@/components/tools/JDate'
|
||||
import JImageUpload from '@/components/standardsAssociation/JImageUpload'
|
||||
import JDictSelectTag from '@/components/standardsAssociation/JDictSelectTag'
|
||||
import CompanySelect from '@comp/customSelect/CompanySelect'
|
||||
import {
|
||||
getMemberInfoById,
|
||||
getByMemberTime,
|
||||
@@ -484,7 +551,7 @@ 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,queryContactList,queryPostInfoById,queryContactInfoByMemberId } from '@api/incomePaymentsApi'
|
||||
|
||||
export default {
|
||||
name: 'PaymentInfoModal',
|
||||
@@ -493,7 +560,8 @@ export default {
|
||||
JImageUpload,
|
||||
JUpload,
|
||||
JDictSelectTag,
|
||||
PreViewImgModal
|
||||
PreViewImgModal,
|
||||
CompanySelect
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@@ -504,6 +572,7 @@ export default {
|
||||
width: 1000,
|
||||
visible: false,
|
||||
model: {},
|
||||
contactsList:[],// 邮寄联系人下拉框
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 8 },
|
||||
@@ -518,6 +587,11 @@ export default {
|
||||
// 会员性质
|
||||
memberType: '',
|
||||
validatorRules: {
|
||||
company: {
|
||||
rules: [{ required: true, message: '请选择单位' }],
|
||||
validateTrigger: ['blur', 'change'],
|
||||
initialValue: {}
|
||||
},
|
||||
paymentMethod: {
|
||||
rules: [{
|
||||
required: true, message: '请选择缴费方式'
|
||||
@@ -800,6 +874,86 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
// 下拉框的搜索
|
||||
filterOption(input, option) {
|
||||
return (
|
||||
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
|
||||
)
|
||||
},
|
||||
/**
|
||||
* 选择公司 回显默认邮寄联系人
|
||||
* */
|
||||
async companyChange() {
|
||||
// 获取对应的来款企业中的信息
|
||||
const incomeCompanyInfo = await this.getIncomeCompanyInfo(this.memberId)
|
||||
// 查询企业下联系人列表
|
||||
this.contactsList = await this.getContactList({ companyId: incomeCompanyInfo.id })
|
||||
// 获取当前企业的默认邮寄联系人
|
||||
const initPersonInfo = await this.getContactList({ memberId: this.memberId })
|
||||
//回显邮寄联系人
|
||||
this.form.setFieldsValue({
|
||||
'postContactId': initPersonInfo[0].id,
|
||||
companyContact:{id:incomeCompanyInfo.id,companyName:incomeCompanyInfo.companyName}
|
||||
})
|
||||
// 回显邮寄联系人信息
|
||||
this.selectContact(initPersonInfo[0].id)
|
||||
},
|
||||
/**
|
||||
* 选择邮寄单位
|
||||
* */
|
||||
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)
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 通过会员id查询相关信息
|
||||
* */
|
||||
getIncomeCompanyInfo(memberId) {
|
||||
return new Promise(resolve => {
|
||||
queryContactInfoByMemberId({ memberId }).then(res => {
|
||||
if (res.success) {
|
||||
resolve(res.result.records[0])
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 选择邮寄联系人
|
||||
* */
|
||||
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
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 校验总金额 是否与 凭证金额 一致
|
||||
* */
|
||||
@@ -872,6 +1026,8 @@ export default {
|
||||
} else {
|
||||
this.memberId = this.userId
|
||||
}
|
||||
// 回显默认邮寄联系人
|
||||
this.companyChange()
|
||||
// 获取会员单位信息
|
||||
await this.loadMember()
|
||||
|
||||
@@ -1012,6 +1168,7 @@ export default {
|
||||
} else {
|
||||
formData.paymentType = 0
|
||||
}
|
||||
formData.postCompanyId = values.companyContact.id
|
||||
httpAction(httpurl, formData, method).then((res) => {
|
||||
if (res.success) {
|
||||
that.$message.success(res.message)
|
||||
|
||||
@@ -494,6 +494,73 @@
|
||||
</a-col>
|
||||
</a-row>
|
||||
</div>
|
||||
<!-- 邮寄信息 begin-->
|
||||
<a-divider orientation="left">邮寄信息</a-divider>
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="邮寄单位" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<company-select
|
||||
placeholder="请选择邮寄单位"
|
||||
:disabled="checkFlag || detailFlag"
|
||||
v-decorator="['companyContact',validatorRules.company]"
|
||||
@change="companyContactChange"></company-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="邮寄联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-select
|
||||
placeholder="请选择邮寄联系人"
|
||||
show-search
|
||||
allowClear
|
||||
:disabled="checkFlag || detailFlag"
|
||||
v-decorator="['postContactId']"
|
||||
option-filter-prop="children"
|
||||
:filter-option="filterOption"
|
||||
@change="selectContact"
|
||||
>
|
||||
<a-select-option v-for="item in contactsList" :key="item.id" :value="item.id">{{
|
||||
item.name
|
||||
}}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="手机号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input
|
||||
placeholder="请输入手机号"
|
||||
:maxLength='11'
|
||||
disabled
|
||||
v-decorator="[ 'postContactPhone']"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<a-row>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="邮寄地址" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input
|
||||
placeholder="请输入邮寄地址"
|
||||
:maxLength='50'
|
||||
disabled
|
||||
v-decorator="[ 'postContactAddress']"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :span="12">
|
||||
<a-form-item label="邮编" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input
|
||||
placeholder="请输入邮编"
|
||||
disabled
|
||||
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9]/g,'')}"
|
||||
:maxLength="6"
|
||||
v-decorator="[ 'contactPostCode']"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<!-- 邮寄信息 end-->
|
||||
<!-- 审核历史 -->
|
||||
<div v-show="detailFlag">
|
||||
<a-divider orientation="left">审核信息</a-divider>
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user