【修改】修改组合缴费

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: [
{
component: 'standardsAssociation/feehandle/FeeHandle',
id: 'standardsMemberInfo4-4-1',
id: 'standardsMemberInfo4-4-2',
meta: {
keepAlive: false,
internalOrExternal: false,
@@ -13,12 +13,12 @@
</a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<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-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<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-col>
@@ -35,7 +35,7 @@
<a-col :xl="6" :lg="7" :md="8" :sm="24">
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
<a-button @click="searchReset" icon="reload" style="margin-left: 8px" class="reset-button">重置</a-button>
<a-button @click="searchReset" icon="reload" style="margin-left: 8px" class="reset-button">重置</a-button>
</span>
</a-col>
</a-row>
@@ -49,12 +49,12 @@
<a-dropdown v-if="selectedRowKeys.length > 0">
<a-menu slot="overlay">
<a-menu-item key="1" @click="batchDel">
<a-icon type="delete" />
<a-icon type="delete"/>
删除
</a-menu-item>
</a-menu>
<a-button style="margin-left: 8px"> 批量操作
<a-icon type="down" />
<a-icon type="down"/>
</a-button>
</a-dropdown>
</div>
@@ -80,7 +80,7 @@
<template slot="imgSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
<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 slot="fileSlot" slot-scope="text">
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
@@ -123,22 +123,27 @@
</div>
<paymentInfo-modal ref="modalForm" @ok="modalFormOk"></paymentInfo-modal>
<!--组合缴费 -->
<combination-payment-modal ref="combinationPayment" @ok="modalFormOk"></combination-payment-modal>
<!--组合缴费 -->
</a-card>
</div>
</template>
<script>
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeroListMixin } from '@/mixins/JeroListMixin'
import { StandardListMixin } from '@/mixins/StandardListMixin'
import {mixinDevice} from '@/utils/mixin'
import {JeroListMixin} from '@/mixins/JeroListMixin'
import {StandardListMixin} from '@/mixins/StandardListMixin'
import PaymentInfoModal from './modules/PaymentInfoModal'
import CombinationPaymentModal from '@views/standardsAssociation/PaymentInfo/modules/CombinationPaymentModal'
import JDictSelectTag from '@/components/standardsAssociation/JDictSelectTag.vue'
import JDate from '@/components/tools/JDate.vue'
import { getMemberInfoById,withDrawPayment } from '@/api/standardsAssociationApi'
import { RangeDateMixin } from '@/mixins/RangeDateMixin'
import { getAction, getFileAccessHttpUrl } from '@/api/memberManage'
import {getMemberInfoById, withDrawPayment} from '@/api/standardsAssociationApi'
import {RangeDateMixin} from '@/mixins/RangeDateMixin'
import {getAction, getFileAccessHttpUrl} from '@/api/memberManage'
export default {
name: 'MemberInfo',
@@ -146,7 +151,8 @@ export default {
components: {
JDictSelectTag,
JDate,
PaymentInfoModal
PaymentInfoModal,
CombinationPaymentModal
},
data() {
return {
@@ -188,6 +194,11 @@ export default {
this.loadMember()
},
methods: {
handleAdd() {
this.$refs.combinationPayment.add()
this.$refs.combinationPayment.title = '新增'
this.$refs.combinationPayment.disableSubmit = false
},
initDictConfig() {
},
/**
@@ -216,7 +227,7 @@ export default {
},
// 根据会员id获取会员信息
loadMember() {
getMemberInfoById({ id: this.userId }).then((res) => {
getMemberInfoById({id: this.userId}).then((res) => {
if (res.success) {
this.memberFlag = true
// 表头
@@ -227,7 +238,7 @@ export default {
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function(t, r, index) {
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
@@ -282,7 +293,7 @@ export default {
align: 'center',
// fixed:"right",
width: 200,
scopedSlots: { customRender: 'action' }
scopedSlots: {customRender: 'action'}
}
]
} else {
@@ -295,7 +306,7 @@ export default {
key: 'rowIndex',
width: 60,
align: 'center',
customRender: function(t, r, index) {
customRender: function (t, r, index) {
return parseInt(index) + 1
}
},
@@ -343,7 +354,7 @@ export default {
title: '绑定证书',
align: 'center',
dataIndex: 'bind_dictText',
scopedSlots: { customRender: 'bind', title: 'bind' }
scopedSlots: {customRender: 'bind', title: 'bind'}
},
{
title: '核对时间',
@@ -354,7 +365,7 @@ export default {
title: '缴费状态',
align: 'center',
dataIndex: 'paymentStatus_dictText',
scopedSlots: { customRender: 'status' }
scopedSlots: {customRender: 'status'}
},
{
title: '操作',
@@ -362,20 +373,20 @@ export default {
align: 'center',
// fixed:"right",
width: 200,
scopedSlots: { customRender: 'action' }
scopedSlots: {customRender: 'action'}
}
]
}
})
},
// 核对凭证
handleCheck: function(record) {
handleCheck: function (record) {
this.$refs.modalForm.handleCheck(record)
this.$refs.modalForm.title = '核对凭证'
this.$refs.modalForm.pageType = 2
},
// 查看
handleDetail: function(record) {
handleDetail: function (record) {
this.$refs.modalForm.detail(record)
this.$refs.modalForm.title = '查看'
this.$refs.modalForm.disableSubmit = true
File diff suppressed because it is too large Load Diff
@@ -99,7 +99,7 @@
</a-form-item>
</a-col>
</a-row>
<a-row class="payment-table" v-if="!addFlag">
<a-row class="payment-table">
<a-col :span="1"></a-col>
<a-col :span="22">
<table class="table" border="1">
@@ -168,83 +168,6 @@
</a-col>
<a-col :span="1"></a-col>
</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">
<a-row>
@@ -528,67 +451,6 @@
</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,
getByMemberTime,
downNewestNotice,
judgeMemberNotApprove, ajaxGetDictItems
judgeMemberNotApprove
} from '@/api/standardsAssociationApi'
import JUpload from '@/components/standardsAssociation/JUpload'
import PreViewImgModal from './PreViewImgModal'
@@ -722,18 +584,6 @@ export default {
],
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: {
rules: [
@@ -806,12 +656,10 @@ export default {
url: {
add: '/paymentInfo/add',
edit: '/paymentInfo/edit',
check: '/paymentInfo/check',
combinationUrl: '/paymentInfo/addCombination' // 组合缴费
check: '/paymentInfo/check'
},
// 缴费时长 5年vip会员 为true 1年普通会员为 false
typeFlag: false,
certificateType: undefined, // 证书类型
// 缴费表头
payColumns: [
{
@@ -1008,35 +856,13 @@ export default {
// 提交
submitFlag: false,
// 最新的缴费通知单信息
newestNoticeInfo: {},
allAmount: 0 // 缴费总金额
newestNoticeInfo: {}
}
},
created() {
// this.loadMember();
},
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() {
this.addFlag = true
@@ -1117,22 +943,16 @@ export default {
// 获取会员信息
await this.loadMember()
this.visible = true
// 获取会员类型 vip会员不展示 升级专用
if(this.model.memberType === 2){
// 获取会员 类型 1年 五年的
// let type = this.model.paymentTime
// 新增 设置 初始缴费金额
if(!this.model.id){
// 判断是否是 副理事单位
this.$nextTick( () => {
ajaxGetDictItems('payment_time', null).then((res) => {
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.form.setFieldsValue({paymentAmount:commonMemberCost(this.memberType)})
})
}
this.model.memberId = this.memberId
this.startTime = this.model.effectiveDate ? this.model.effectiveDate : ''
@@ -1153,15 +973,6 @@ export default {
this.paymentTime = this.model.paymentTime
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.$nextTick(() => {
@@ -1171,7 +982,6 @@ export default {
close() {
this.$emit('close')
this.visible = false
this.certificateType = undefined
this.addFlag = false
this.typeFlag = false
this.checkFlag = false
@@ -1194,8 +1004,6 @@ export default {
this.isCash = ''
this.submitFlag = false
this.initVal = 1
this.confirmLoading = false
this.model = {}
},
handleOk() {
@@ -1209,7 +1017,7 @@ export default {
// 提示
that.$confirm({
title: '确认提交',
content: '当前已有待审核缴费订单,为避免重复提交,请确认是否再次提交缴费订单?',
content: '是否删除选中数据?',
onOk:function () {
that.handleSubmit(values)
},
@@ -1219,7 +1027,7 @@ export default {
}
})
}else {
this.handleSubmit(values)
this.handleSubmit(values)
}
}
@@ -1232,7 +1040,7 @@ export default {
let httpurl = ''
let method = ''
if (!this.model.id) {
httpurl += this.url.combinationUrl
httpurl += this.url.add
method = 'post'
} else {
if (this.checkFlag) {
@@ -1341,7 +1149,6 @@ export default {
this.invoiceInfoObj.bankAccount = memberInfo.bankAccount
this.headerName = memberInfo.invoiceInfo
this.memberType = memberInfo.memberNature
this.model = Object.assign({},memberInfo)
switch (memberInfo.memberNature) {
case 1:
this.memberNature = '副理事单位'
@@ -1349,6 +1156,7 @@ export default {
case 2:
this.memberNature = '理事单位'
break
case 3:
this.memberNature = '会员单位'
break
@@ -1370,20 +1178,19 @@ export default {
switch (Number(value)) {
// 1年
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
// 5年
case 2:
this.typeFlag = true
form.setFieldsValue({ 'paymentType': 1, 'paymentAmount': vipMemberCost(this.memberType),'memberPaymentAmount': vipMemberCost(this.memberType) })
form.setFieldsValue({ 'paymentType': 1, 'paymentAmount': vipMemberCost(this.memberType) })
break
// 升级专用
case 3:
this.typeFlag = true
form.setFieldsValue({ 'paymentAmount': upgradeVip(this.memberType),'memberPaymentAmount': upgradeVip(this.memberType) })
form.setFieldsValue({ 'paymentAmount': upgradeVip(this.memberType) })
break
}
this.calculateAllAmount()
},
/* 审核选择*/
@@ -1537,13 +1344,6 @@ export default {
font-size: 14px;
}
.apply-code-notice {
color: #f5222d;
position: absolute;
bottom: 4px;
left: 25%
}
.remark {
//margin-left: -100px;
}