【修改】修改组合缴费

This commit is contained in:
fengachen
2022-07-20 16:23:51 +08:00
parent ee09e03fb1
commit 6c60bfaa7d
4 changed files with 1390 additions and 240 deletions
+1 -1
View File
@@ -241,7 +241,7 @@ export const routerData = [
children: [ children: [
{ {
component: 'standardsAssociation/feehandle/FeeHandle', component: 'standardsAssociation/feehandle/FeeHandle',
id: 'standardsMemberInfo4-4-1', id: 'standardsMemberInfo4-4-2',
meta: { meta: {
keepAlive: false, keepAlive: false,
internalOrExternal: false, internalOrExternal: false,
@@ -13,12 +13,12 @@
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="缴费类型"> <a-form-item label="缴费类型">
<j-dict-select-tag placeholder="请选择缴费类型" v-model="queryParam.paymentType" dictCode="payment_type" /> <j-dict-select-tag placeholder="请选择缴费类型" v-model="queryParam.paymentType" dictCode="payment_type"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-form-item label="缴费状态"> <a-form-item label="缴费状态">
<j-dict-select-tag placeholder="请选择缴费状态" v-model="queryParam.paymentStatus" dictCode="payment_status" /> <j-dict-select-tag placeholder="请选择缴费状态" v-model="queryParam.paymentStatus" dictCode="payment_status"/>
</a-form-item> </a-form-item>
</a-col> </a-col>
@@ -49,12 +49,12 @@
<a-dropdown v-if="selectedRowKeys.length > 0"> <a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay"> <a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel"> <a-menu-item key="1" @click="batchDel">
<a-icon type="delete" /> <a-icon type="delete"/>
删除 删除
</a-menu-item> </a-menu-item>
</a-menu> </a-menu>
<a-button style="margin-left: 8px"> 批量操作 <a-button style="margin-left: 8px"> 批量操作
<a-icon type="down" /> <a-icon type="down"/>
</a-button> </a-button>
</a-dropdown> </a-dropdown>
</div> </div>
@@ -80,7 +80,7 @@
<template slot="imgSlot" slot-scope="text"> <template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<img v-else :src="getImgView(text)" height="25px" alt="" <img v-else :src="getImgView(text)" height="25px" alt=""
style="max-width:80px;font-size: 12px;font-style: italic;" /> style="max-width:80px;font-size: 12px;font-style: italic;"/>
</template> </template>
<template slot="fileSlot" slot-scope="text"> <template slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
@@ -123,22 +123,27 @@
</div> </div>
<paymentInfo-modal ref="modalForm" @ok="modalFormOk"></paymentInfo-modal> <paymentInfo-modal ref="modalForm" @ok="modalFormOk"></paymentInfo-modal>
<!--组合缴费 -->
<combination-payment-modal ref="combinationPayment" @ok="modalFormOk"></combination-payment-modal>
<!--组合缴费 -->
</a-card> </a-card>
</div> </div>
</template> </template>
<script> <script>
import '@/assets/less/TableExpand.less' import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin' import {mixinDevice} from '@/utils/mixin'
import { JeroListMixin } from '@/mixins/JeroListMixin' import {JeroListMixin} from '@/mixins/JeroListMixin'
import { StandardListMixin } from '@/mixins/StandardListMixin' import {StandardListMixin} from '@/mixins/StandardListMixin'
import PaymentInfoModal from './modules/PaymentInfoModal' import PaymentInfoModal from './modules/PaymentInfoModal'
import CombinationPaymentModal from '@views/standardsAssociation/PaymentInfo/modules/CombinationPaymentModal'
import JDictSelectTag from '@/components/standardsAssociation/JDictSelectTag.vue' import JDictSelectTag from '@/components/standardsAssociation/JDictSelectTag.vue'
import JDate from '@/components/tools/JDate.vue' import JDate from '@/components/tools/JDate.vue'
import { getMemberInfoById,withDrawPayment } from '@/api/standardsAssociationApi' import {getMemberInfoById, withDrawPayment} from '@/api/standardsAssociationApi'
import { RangeDateMixin } from '@/mixins/RangeDateMixin' import {RangeDateMixin} from '@/mixins/RangeDateMixin'
import { getAction, getFileAccessHttpUrl } from '@/api/memberManage' import {getAction, getFileAccessHttpUrl} from '@/api/memberManage'
export default { export default {
name: 'MemberInfo', name: 'MemberInfo',
@@ -146,7 +151,8 @@ export default {
components: { components: {
JDictSelectTag, JDictSelectTag,
JDate, JDate,
PaymentInfoModal PaymentInfoModal,
CombinationPaymentModal
}, },
data() { data() {
return { return {
@@ -188,6 +194,11 @@ export default {
this.loadMember() this.loadMember()
}, },
methods: { methods: {
handleAdd() {
this.$refs.combinationPayment.add()
this.$refs.combinationPayment.title = '新增'
this.$refs.combinationPayment.disableSubmit = false
},
initDictConfig() { initDictConfig() {
}, },
/** /**
@@ -216,7 +227,7 @@ export default {
}, },
// 根据会员id获取会员信息 // 根据会员id获取会员信息
loadMember() { loadMember() {
getMemberInfoById({ id: this.userId }).then((res) => { getMemberInfoById({id: this.userId}).then((res) => {
if (res.success) { if (res.success) {
this.memberFlag = true this.memberFlag = true
// 表头 // 表头
@@ -227,7 +238,7 @@ export default {
key: 'rowIndex', key: 'rowIndex',
width: 60, width: 60,
align: 'center', align: 'center',
customRender: function(t, r, index) { customRender: function (t, r, index) {
return parseInt(index) + 1 return parseInt(index) + 1
} }
}, },
@@ -282,7 +293,7 @@ export default {
align: 'center', align: 'center',
// fixed:"right", // fixed:"right",
width: 200, width: 200,
scopedSlots: { customRender: 'action' } scopedSlots: {customRender: 'action'}
} }
] ]
} else { } else {
@@ -295,7 +306,7 @@ export default {
key: 'rowIndex', key: 'rowIndex',
width: 60, width: 60,
align: 'center', align: 'center',
customRender: function(t, r, index) { customRender: function (t, r, index) {
return parseInt(index) + 1 return parseInt(index) + 1
} }
}, },
@@ -343,7 +354,7 @@ export default {
title: '绑定证书', title: '绑定证书',
align: 'center', align: 'center',
dataIndex: 'bind_dictText', dataIndex: 'bind_dictText',
scopedSlots: { customRender: 'bind', title: 'bind' } scopedSlots: {customRender: 'bind', title: 'bind'}
}, },
{ {
title: '核对时间', title: '核对时间',
@@ -354,7 +365,7 @@ export default {
title: '缴费状态', title: '缴费状态',
align: 'center', align: 'center',
dataIndex: 'paymentStatus_dictText', dataIndex: 'paymentStatus_dictText',
scopedSlots: { customRender: 'status' } scopedSlots: {customRender: 'status'}
}, },
{ {
title: '操作', title: '操作',
@@ -362,20 +373,20 @@ export default {
align: 'center', align: 'center',
// fixed:"right", // fixed:"right",
width: 200, width: 200,
scopedSlots: { customRender: 'action' } scopedSlots: {customRender: 'action'}
} }
] ]
} }
}) })
}, },
// 核对凭证 // 核对凭证
handleCheck: function(record) { handleCheck: function (record) {
this.$refs.modalForm.handleCheck(record) this.$refs.modalForm.handleCheck(record)
this.$refs.modalForm.title = '核对凭证' this.$refs.modalForm.title = '核对凭证'
this.$refs.modalForm.pageType = 2 this.$refs.modalForm.pageType = 2
}, },
// 查看 // 查看
handleDetail: function(record) { handleDetail: function (record) {
this.$refs.modalForm.detail(record) this.$refs.modalForm.detail(record)
this.$refs.modalForm.title = '查看' this.$refs.modalForm.title = '查看'
this.$refs.modalForm.disableSubmit = true this.$refs.modalForm.disableSubmit = true
File diff suppressed because it is too large Load Diff
@@ -99,7 +99,7 @@
</a-form-item> </a-form-item>
</a-col> </a-col>
</a-row> </a-row>
<a-row class="payment-table" v-if="!addFlag"> <a-row class="payment-table">
<a-col :span="1"></a-col> <a-col :span="1"></a-col>
<a-col :span="22"> <a-col :span="22">
<table class="table" border="1"> <table class="table" border="1">
@@ -168,83 +168,6 @@
</a-col> </a-col>
<a-col :span="1"></a-col> <a-col :span="1"></a-col>
</a-row> </a-row>
<template v-if="addFlag">
<a-row>
<a-col :span="12">
<a-form-item label="缴费总金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
{{allAmount}}
(请填写分类金额)
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="会员类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<template v-if="memberType === 1 ">
副理事长单位
</template>
<template v-else>
<span v-if="initVal == '2' ">VIP会员</span>
<span v-else>普通会员</span>
</template>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-item label="会员缴费金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:disabled="checkFlag||detailFlag"
v-decorator="['memberPaymentAmount',validatorRules.serviceCharge]"
:trigger-change="true"
@blur="calculateAllAmount"
@change="event => event.target.value = event.target.value.trim()"
placeholder="请输入会员缴费金额"
:maxLength="50"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="缴费时长" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag
:disabled="checkFlag||detailFlag"
ref="paymentTimeJdict"
@change="changgeType"
type="list"
v-decorator="['paymentTime',{ rules: validatorRules.paymentTime.rules, initialValue:paymentTime}]"
:trigger-change="true"
dictCode="payment_time"
placeholder="请选择缴费时长"
/>
</a-form-item>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-item label="证书缴费金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:disabled="checkFlag||detailFlag"
v-decorator="['certificatePaymentAmount',validatorRules.certificatePaymentAmount]"
@blur="calculateAllAmount"
@change="event => event.target.value = event.target.value.trim()"
placeholder="请输入证书缴费金额"
:maxLength="50"></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="其他缴费金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:disabled="checkFlag||detailFlag"
v-decorator="['otherPaymentAmount',validatorRules.certificatePaymentAmount]"
@blur="calculateAllAmount"
@change="event => event.target.value = event.target.value.trim()"
placeholder="请输入其他缴费金额"
:maxLength="50"></a-input>
</a-form-item>
</a-col>
</a-row>
</template>
<!-- 打包会员显示 --> <!-- 打包会员显示 -->
<div v-if="paymentMethodFlag"> <div v-if="paymentMethodFlag">
<a-row> <a-row>
@@ -528,67 +451,6 @@
</div> </div>
<!-- 证书信息 --> <!-- 证书信息 -->
<!-- 申请证书信息begin -->
<!--只有新增的时候显示-->
<template v-if="!model.id">
<a-divider orientation="left">证书申请信息</a-divider>
<a-row>
<a-col :span="12">
<a-form-item label="证书类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag
@change="changeCertificateType"
dictCode="certificate_type"
:triggerChange="true"
v-decorator="['certificateType',validatorRules.certificateType]"
placeholder="请选择证书类型"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label=" 证书代码" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
placeholder="请输入证书代码"
v-decorator="['code',validatorRules.clientCode]"
></a-input>
</a-form-item>
<span class="apply-code-notice">一次申请仅能输入一个证书代码</span>
</a-col>
</a-row>
<a-row>
<a-col :span="12">
<a-form-item label="通讯地址" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
placeholder="请输入通讯地址"
v-decorator="['address',validatorRules.address]"
></a-input>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="邮编" :labelCol="labelCol" :wrapperCol="wrapperCol">
<a-input
:maxLength="50"
placeholder="请输入邮编"
v-decorator="['postcode',validatorRules.postcode]"
></a-input>
</a-form-item>
</a-col>
</a-row>
<a-row v-if="certificateType == '1' ">
<a-col :span="12">
<a-form-item label="备案通知书" :labelCol="labelCol" :wrapperCol="wrapperCol">
<j-dict-select-tag
v-decorator="['noticeOfFiling']"
:triggerChange="true"
placeholder="请选择备案通知书"
dictCode="notice_of_filing"/>
</a-form-item>
</a-col>
</a-row>
</template>
<!-- 申请证书信息end -->
<!-- 审核 --> <!-- 审核 -->
@@ -651,7 +513,7 @@ import {
getCheckInfo, getCheckInfo,
getByMemberTime, getByMemberTime,
downNewestNotice, downNewestNotice,
judgeMemberNotApprove, ajaxGetDictItems judgeMemberNotApprove
} from '@/api/standardsAssociationApi' } from '@/api/standardsAssociationApi'
import JUpload from '@/components/standardsAssociation/JUpload' import JUpload from '@/components/standardsAssociation/JUpload'
import PreViewImgModal from './PreViewImgModal' import PreViewImgModal from './PreViewImgModal'
@@ -722,18 +584,6 @@ export default {
], ],
validateTrigger: 'blur' validateTrigger: 'blur'
}, },
certificatePaymentAmount: {
rules: [
{
required: false, message: '请输入缴费金额'
},
{
pattern: /^[1-9](\d{1,8})?(\.\d{1,2})$|^0\.([1-9](\d{0,1})|\d[1-9])$|^[1-9]\d{0,8}$|^0$/,
message: '请输入合法的金额数字,最多2位小数,8位正数'
}
],
validateTrigger: 'blur'
},
paymentAmount: { paymentAmount: {
rules: [ rules: [
@@ -806,12 +656,10 @@ export default {
url: { url: {
add: '/paymentInfo/add', add: '/paymentInfo/add',
edit: '/paymentInfo/edit', edit: '/paymentInfo/edit',
check: '/paymentInfo/check', check: '/paymentInfo/check'
combinationUrl: '/paymentInfo/addCombination' // 组合缴费
}, },
// 缴费时长 5年vip会员 为true 1年普通会员为 false // 缴费时长 5年vip会员 为true 1年普通会员为 false
typeFlag: false, typeFlag: false,
certificateType: undefined, // 证书类型
// 缴费表头 // 缴费表头
payColumns: [ payColumns: [
{ {
@@ -1008,35 +856,13 @@ export default {
// 提交 // 提交
submitFlag: false, submitFlag: false,
// 最新的缴费通知单信息 // 最新的缴费通知单信息
newestNoticeInfo: {}, newestNoticeInfo: {}
allAmount: 0 // 缴费总金额
} }
}, },
created() { created() {
// this.loadMember(); // this.loadMember();
}, },
methods: { methods: {
/**
* 计算缴费总金额
* */
calculateAllAmount() {
this.$nextTick(() => {
const memberAmount = this.form.getFieldValue('memberPaymentAmount') ? Number(this.form.getFieldValue('memberPaymentAmount')) : 0
const certificateAmount = this.form.getFieldValue('certificatePaymentAmount') ? Number(this.form.getFieldValue('certificatePaymentAmount')) : 0
const otherAmount = this.form.getFieldValue('otherPaymentAmount') ? Number(this.form.getFieldValue('otherPaymentAmount')) : 0
this.form.validateFields(['memberPaymentAmount', 'certificatePaymentAmount', 'otherPaymentAmount'], (err) => {
if (!err) {
this.allAmount = (memberAmount + certificateAmount + otherAmount) + ''
}
})
})
},
/**
* 改变证书类型 世界制造厂证书显示备案通知书
* */
changeCertificateType(val) {
this.certificateType = val
},
/* 添加*/ /* 添加*/
add() { add() {
this.addFlag = true this.addFlag = true
@@ -1117,22 +943,16 @@ export default {
// 获取会员信息 // 获取会员信息
await this.loadMember() await this.loadMember()
this.visible = true this.visible = true
// 获取会员类型 vip会员不展示 升级专用 // 获取会员 类型 1年 五年的
if(this.model.memberType === 2){ // let type = this.model.paymentTime
// 新增 设置 初始缴费金额
if(!this.model.id){
// 判断是否是 副理事单位
this.$nextTick( () => { this.$nextTick( () => {
ajaxGetDictItems('payment_time', null).then((res) => { this.form.setFieldsValue({paymentAmount:commonMemberCost(this.memberType)})
if (res.success) {
let dictOptions = res.result
let index = dictOptions.findIndex(item => item.value === '3' )
dictOptions.splice(index,1)
this.$refs.paymentTimeJdict.setCurrentDictOptions(dictOptions)
}
})
// console.log(this.$refs.paymentTimeJdict.getCurrentDictOptions(),'this.$refs.paymentTimeJdict.getCurrentDictOptions()'
}) })
} }
this.model.memberId = this.memberId this.model.memberId = this.memberId
this.startTime = this.model.effectiveDate ? this.model.effectiveDate : '' this.startTime = this.model.effectiveDate ? this.model.effectiveDate : ''
@@ -1153,15 +973,6 @@ export default {
this.paymentTime = this.model.paymentTime this.paymentTime = this.model.paymentTime
this.paymentRecord = this.model.paymentRecord this.paymentRecord = this.model.paymentRecord
} }
// 新增 设置 初始缴费金额
if(this.addFlag){
// 判断是否是 副理事单位
this.$nextTick( () => {
this.form.setFieldsValue({paymentAmount:commonMemberCost(this.memberType),'memberPaymentAmount': commonMemberCost(this.memberType)})
})
// 计算缴费总金额
this.calculateAllAmount()
}
// 缴费单号 // 缴费单号
// this.billNumber = this.model.billNumber // this.billNumber = this.model.billNumber
this.$nextTick(() => { this.$nextTick(() => {
@@ -1171,7 +982,6 @@ export default {
close() { close() {
this.$emit('close') this.$emit('close')
this.visible = false this.visible = false
this.certificateType = undefined
this.addFlag = false this.addFlag = false
this.typeFlag = false this.typeFlag = false
this.checkFlag = false this.checkFlag = false
@@ -1194,8 +1004,6 @@ export default {
this.isCash = '' this.isCash = ''
this.submitFlag = false this.submitFlag = false
this.initVal = 1 this.initVal = 1
this.confirmLoading = false
this.model = {}
}, },
handleOk() { handleOk() {
@@ -1209,7 +1017,7 @@ export default {
// 提示 // 提示
that.$confirm({ that.$confirm({
title: '确认提交', title: '确认提交',
content: '当前已有待审核缴费订单,为避免重复提交,请确认是否再次提交缴费订单?', content: '是否删除选中数据?',
onOk:function () { onOk:function () {
that.handleSubmit(values) that.handleSubmit(values)
}, },
@@ -1232,7 +1040,7 @@ export default {
let httpurl = '' let httpurl = ''
let method = '' let method = ''
if (!this.model.id) { if (!this.model.id) {
httpurl += this.url.combinationUrl httpurl += this.url.add
method = 'post' method = 'post'
} else { } else {
if (this.checkFlag) { if (this.checkFlag) {
@@ -1341,7 +1149,6 @@ export default {
this.invoiceInfoObj.bankAccount = memberInfo.bankAccount this.invoiceInfoObj.bankAccount = memberInfo.bankAccount
this.headerName = memberInfo.invoiceInfo this.headerName = memberInfo.invoiceInfo
this.memberType = memberInfo.memberNature this.memberType = memberInfo.memberNature
this.model = Object.assign({},memberInfo)
switch (memberInfo.memberNature) { switch (memberInfo.memberNature) {
case 1: case 1:
this.memberNature = '副理事单位' this.memberNature = '副理事单位'
@@ -1349,6 +1156,7 @@ export default {
case 2: case 2:
this.memberNature = '理事单位' this.memberNature = '理事单位'
break break
case 3: case 3:
this.memberNature = '会员单位' this.memberNature = '会员单位'
break break
@@ -1370,20 +1178,19 @@ export default {
switch (Number(value)) { switch (Number(value)) {
// 1年 // 1年
case 1: this.typeFlag = false case 1: this.typeFlag = false
form.setFieldsValue({ 'paymentType': 0, 'paymentAmount': commonMemberCost(this.memberType),'memberPaymentAmount': commonMemberCost(this.memberType) }) form.setFieldsValue({ 'paymentType': 0, 'paymentAmount': commonMemberCost(this.memberType) })
break break
// 5年 // 5年
case 2: case 2:
this.typeFlag = true this.typeFlag = true
form.setFieldsValue({ 'paymentType': 1, 'paymentAmount': vipMemberCost(this.memberType),'memberPaymentAmount': vipMemberCost(this.memberType) }) form.setFieldsValue({ 'paymentType': 1, 'paymentAmount': vipMemberCost(this.memberType) })
break break
// 升级专用 // 升级专用
case 3: case 3:
this.typeFlag = true this.typeFlag = true
form.setFieldsValue({ 'paymentAmount': upgradeVip(this.memberType),'memberPaymentAmount': upgradeVip(this.memberType) }) form.setFieldsValue({ 'paymentAmount': upgradeVip(this.memberType) })
break break
} }
this.calculateAllAmount()
}, },
/* 审核选择*/ /* 审核选择*/
@@ -1537,13 +1344,6 @@ export default {
font-size: 14px; font-size: 14px;
} }
.apply-code-notice {
color: #f5222d;
position: absolute;
bottom: 4px;
left: 25%
}
.remark { .remark {
//margin-left: -100px; //margin-left: -100px;
} }