合并开票
This commit is contained in:
@@ -67,7 +67,8 @@
|
||||
<label>合作伙伴邀请码:</label><span>{{ currentMeetingInfo.cooperativeInvitationCode }}</span>
|
||||
</a-col>
|
||||
<a-col :xxl="8" :xl="12" :sm="24">
|
||||
<label>会议通知:</label><span v-if="currentMeetingInfo.meetingFiles"><preview-file :file-id="currentMeetingInfo.meetingFiles"></preview-file></span>
|
||||
<label>会议通知:</label><span v-if="currentMeetingInfo.meetingFiles"><preview-file
|
||||
:file-id="currentMeetingInfo.meetingFiles"></preview-file></span>
|
||||
</a-col>
|
||||
<a-col :xxl="8" :xl="12" :sm="24">
|
||||
<label>报名链接:</label><span></span>
|
||||
@@ -159,7 +160,8 @@
|
||||
<a-button type="primary" icon="plus" @click="addParticipant">添加参会人</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('会员项目')">导出</a-button>
|
||||
<a-button type="danger" icon="delete" @click="batchDel">批量删除</a-button>
|
||||
<a-button type="primary" @click="batchInvoice">合并开票</a-button>
|
||||
<!--当会议费用为0不需要合并开票-->
|
||||
<a-button type="primary" @click="batchInvoice" v-show="currentMeetingInfo.meetingCosts !== 0">合并开票</a-button>
|
||||
<a-button type="primary" @click="batchSetDocker">设置对接人</a-button>
|
||||
</div>
|
||||
|
||||
@@ -198,8 +200,10 @@
|
||||
</template>
|
||||
|
||||
<span slot="action" slot-scope="text, record" class="action-span-cell">
|
||||
<a @click="handleAudit(record)">审核</a>
|
||||
<!-- 只有缴费方式为汇款并且上传了汇款凭证的的才会有审核按钮-->
|
||||
<a @click="handleAudit(record)" v-if="record.payMode === 1 && record.paymentRecord">审核</a>
|
||||
<a @click="handleEdit(record)">编辑</a>
|
||||
<!--删除参会人需要判断改参会人是否与合同关联-->
|
||||
<a @click="handleDelete(record.id)">删除</a>
|
||||
</span>
|
||||
</a-table>
|
||||
@@ -437,25 +441,26 @@ export default {
|
||||
this.$message.warn('请选择一条记录')
|
||||
return
|
||||
}
|
||||
|
||||
// 只能选择相同的单位进行合并开票
|
||||
if (this.selectionRows.length > 0) {
|
||||
// 一个数据不做判断
|
||||
if (this.selectionRows.length === 1) {
|
||||
// 打开模态框
|
||||
this.$refs.batchInvoiceModal.open()
|
||||
this.$refs.batchInvoiceModal.open(this.selectionRows)
|
||||
} else {
|
||||
let initName = this.selectionRows[0].name
|
||||
let initName = this.selectionRows[0].companyId
|
||||
// 单位判重
|
||||
let flag = this.selectionRows.some(item => {
|
||||
return item.name !== initName
|
||||
return item.companyId !== initName
|
||||
})
|
||||
if (flag) {
|
||||
// flag为true 说明有单位不一样
|
||||
this.$message.warn('请选择同一企业的参会人进行开票')
|
||||
return
|
||||
} else {
|
||||
// 打开模态框 要传一个参数
|
||||
this.$refs.batchInvoiceModal.open()
|
||||
// 打开模态框
|
||||
this.$refs.batchInvoiceModal.open(this.selectionRows)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
<a-form-item label="邮寄联系人" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<select-contacts :selected-company="selectedCompany"
|
||||
placeholder="请选择联系人"
|
||||
v-decorator="['contactsId',validatorRules.contactsId]"
|
||||
v-decorator="['postContactId',validatorRules.postContactId]"
|
||||
:maxLength='50'
|
||||
@change="changeSelectContact"
|
||||
ref="selectContacts"
|
||||
@ok="addContactsOk"></select-contacts>
|
||||
</a-form-item>
|
||||
@@ -27,7 +28,7 @@
|
||||
<a-form-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入地址"
|
||||
:maxLength='50'
|
||||
v-decorator="[ 'chargeStandard']"
|
||||
v-decorator="['address']"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -37,7 +38,7 @@
|
||||
<a-form-item label="发票号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入发票号"
|
||||
:maxLength='50'
|
||||
v-decorator="[ 'chargeStandard']"
|
||||
v-decorator="[ 'invoice',validatorRules.invoice]"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -46,8 +47,9 @@
|
||||
<a-col :xl="24" :sm="24">
|
||||
<a-form-item label="开票金额" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input placeholder="请输入开票金额"
|
||||
:maxLength='50'
|
||||
v-decorator="[ 'chargeStandard']"
|
||||
@change="(e) => {e.target.value = e.target.value.replace(/[^0-9.]/g,'')}"
|
||||
:maxLength='13'
|
||||
v-decorator="[ 'invoiceAmount',validatorRules.invoiceAmount]"
|
||||
></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -64,6 +66,8 @@
|
||||
<script>
|
||||
import SelectContacts from '@comp/company/SelectContacts'
|
||||
import {httpAction} from '@api/manage'
|
||||
import {money} from '@/utils/validate'
|
||||
import {getContactsById} from '@api/api'
|
||||
|
||||
export default {
|
||||
name: 'BatchInvocieModal',
|
||||
@@ -88,27 +92,33 @@ export default {
|
||||
sm: {span: 18}
|
||||
},
|
||||
validatorRules: {
|
||||
projectName: {
|
||||
rules: [{required: true, message: '请输入会员项目'}],
|
||||
validateTrigger: 'blur'
|
||||
postContactId: {
|
||||
rules: [{required: true, message: '请选择邮寄联系人'}],
|
||||
validateTrigger: 'change'
|
||||
},
|
||||
particularYear: {
|
||||
rules: [{required: true, message: '请选择年份'}],
|
||||
validateTrigger: ['change', 'blur']
|
||||
invoice: {
|
||||
rules: [{required: true, message: '请输入发票号'}],
|
||||
validateTrigger: ['blur']
|
||||
},
|
||||
directorId: {
|
||||
rules: [{required: true, message: '请选择负责人'}],
|
||||
validateTrigger: ['change', 'blur']
|
||||
invoiceAmount: {
|
||||
rules: [{required: true,validator:this.validateInvoiceAmount}],
|
||||
validateTrigger: [ 'blur']
|
||||
}
|
||||
},
|
||||
url: {
|
||||
add: '/jero/memberProject/add',
|
||||
edit: '/jero/memberProject/edit',
|
||||
add: '/paymentRecord/payPaymentRecord/addPayBill',
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
open(){
|
||||
open(record){
|
||||
this.form.resetFields()
|
||||
console.log(record)
|
||||
// 联系人下拉数据
|
||||
this.selectedCompany = {
|
||||
id:record[0].companyId,
|
||||
companyName:record[0].companyName
|
||||
}
|
||||
this.visible = true
|
||||
},
|
||||
close() {
|
||||
@@ -120,7 +130,7 @@ export default {
|
||||
// 触发表单验证
|
||||
this.form.validateFields((err, values) => {
|
||||
if (!err) {
|
||||
let httpurl = ''
|
||||
let httpurl = this.url.add
|
||||
let method = 'post'
|
||||
const formData = Object.assign(this.model, values)
|
||||
console.log('表单提交数据', formData)
|
||||
@@ -141,6 +151,31 @@ export default {
|
||||
handleCancel() {
|
||||
this.close()
|
||||
},
|
||||
/*
|
||||
* 校验开票金额
|
||||
* */
|
||||
validateInvoiceAmount(rule,value,callback){
|
||||
if(value === '' || value === undefined || value === null){
|
||||
callback('请输入开票金额')
|
||||
}
|
||||
if(value && money(value)){
|
||||
callback()
|
||||
}else {
|
||||
callback('请输入正确格式的金额,')
|
||||
}
|
||||
},
|
||||
/*
|
||||
* 选择邮寄联系人 回显地址
|
||||
* */
|
||||
changeSelectContact(val){
|
||||
// 通过联系人id获取地址
|
||||
getContactsById({id:val}).then(res => {
|
||||
if(res.success){
|
||||
let address = res.result.contactAddress
|
||||
this.form.setFieldsValue({'address':address})
|
||||
}
|
||||
})
|
||||
},
|
||||
addContactsOk(){
|
||||
this.$refs.selectContacts.getContactsList()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user