【修改】增加邮寄联系人信息
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -0,0 +1,127 @@
|
||||
<template>
|
||||
<j-modal
|
||||
:title="title"
|
||||
:width="width"
|
||||
:visible="visible"
|
||||
:confirmLoading="confirmLoading"
|
||||
switchFullscreen
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
cancelText="关闭">
|
||||
|
||||
<div class="table-page-search-wrapper">
|
||||
<a-form layout="inline" @keyup.enter.native="searchQuery">
|
||||
<a-row :gutter="24">
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<a-form-item>
|
||||
<a-input placeholder="请输入企业名称" v-model="queryParam.companyName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :xl="6" :lg="7" :md="8" :sm="24">
|
||||
<span class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery" icon="search" v-has="'paymentinfo:search'">查询</a-button>
|
||||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">刷新</a-button>
|
||||
</span>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form>
|
||||
</div>
|
||||
<div>
|
||||
<a-table
|
||||
ref="table"
|
||||
size="middle"
|
||||
bordered
|
||||
rowKey="id"
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange, type: 'radio'}"
|
||||
@change="handleTableChange"
|
||||
class="j-table-force-nowrap">
|
||||
<template slot="text" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="30"></j-ellipsis>
|
||||
</template>
|
||||
</a-table>
|
||||
</div>
|
||||
</j-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {JeroListMixin} from '@/mixins/JeroListMixin'
|
||||
import JEllipsis from '@comp/jero/JEllipsis'
|
||||
|
||||
|
||||
export default {
|
||||
name: 'BusinessSelect',
|
||||
mixins: [JeroListMixin],
|
||||
components: {
|
||||
JEllipsis
|
||||
},
|
||||
props: {
|
||||
// 理事会时需要传2,默认为0
|
||||
memberNature: {
|
||||
type: Number,
|
||||
default: null
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '选择企业',
|
||||
width: 800,
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
url: {
|
||||
list: '/company/payCompanyManagement/listMeeting'
|
||||
},
|
||||
selectedCompany: {},
|
||||
selectedRowKeys: [],
|
||||
columns: [
|
||||
{
|
||||
title: '序号',
|
||||
dataIndex: '',
|
||||
key: 'rowIndex',
|
||||
width: 60,
|
||||
align: 'center',
|
||||
customRender: function(t, r, index) {
|
||||
return parseInt(index) + 1
|
||||
}
|
||||
}, {
|
||||
title: '企业名称',
|
||||
align: 'center',
|
||||
dataIndex: 'companyName',
|
||||
scopedSlots: { customRender: 'text' }
|
||||
}
|
||||
],
|
||||
dataSource: [],
|
||||
disableMixinCreated: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
searchReset() {
|
||||
this.queryParam = {}
|
||||
this.lastQueryParam = {}
|
||||
this.loadData(1)
|
||||
},
|
||||
handleOk() {
|
||||
this.$emit('ok', this.selectedCompany)
|
||||
this.close()
|
||||
},
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
close() {
|
||||
this.visible = false
|
||||
this.selectedCompany = {}
|
||||
},
|
||||
onSelectChange(selectedRowKeys, selectionRows) {
|
||||
this.selectedCompany = selectionRows[0]
|
||||
this.selectedRowKeys = selectedRowKeys
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
@import '~@assets/less/common.less';
|
||||
</style>
|
||||
@@ -0,0 +1,87 @@
|
||||
<template>
|
||||
<div class="company-select">
|
||||
<a-row>
|
||||
<a-col :span="24">
|
||||
<a-input @click="chooseBusiness" :value="value[valueKey]" v-bind="$attrs" :readOnly="true" unselectable="on"></a-input>
|
||||
</a-col>
|
||||
</a-row>
|
||||
|
||||
<business-select ref="businessSelect" @ok="handleOk" v-bind="$attrs"></business-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import BusinessSelect from '@comp/customSelect/BusinessSelect'
|
||||
|
||||
export default {
|
||||
name: 'CompanySelect',
|
||||
components: { BusinessSelect },
|
||||
props: {
|
||||
// 是否可以选择
|
||||
isCompanyDisabled: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: false
|
||||
},
|
||||
value: {
|
||||
type: [Object],
|
||||
default: () => {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
// 回显数据的key
|
||||
valueKey: {
|
||||
type: String,
|
||||
default: 'companyName'
|
||||
},
|
||||
// 是否可以新增:true--可以;false--不可以(组件作为查询条件时不可新增)
|
||||
canAdd: {
|
||||
type: Boolean,
|
||||
required: false,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* 打开选择企业的模态框,如果父级传参为true则点击不弹模态框
|
||||
*/
|
||||
chooseBusiness() {
|
||||
if (this.isCompanyDisabled) {
|
||||
return
|
||||
}
|
||||
this.$refs.businessSelect.searchReset()
|
||||
this.$refs.businessSelect.visible = true
|
||||
this.$refs.businessSelect.selectedRowKeys[0] = this.value.id
|
||||
},
|
||||
/**
|
||||
* 选中后抛出企业信息(id, companyName)
|
||||
* @param value
|
||||
*/
|
||||
handleOk(value) {
|
||||
const company = {
|
||||
id: value.id,
|
||||
companyName: value.companyName
|
||||
}
|
||||
this.$emit('change', company)
|
||||
}
|
||||
},
|
||||
// 2.2新增 在组件内定义 指定父组件调用时候的传值属性和事件类型
|
||||
model: {
|
||||
prop: 'value',
|
||||
event: 'change'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
a-input:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.form-btn {
|
||||
padding-top: 1px;
|
||||
padding-left: 8px;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
</style>
|
||||
+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