参会人合并开票
This commit is contained in:
@@ -71,13 +71,15 @@
|
|||||||
:file-id="currentMeetingInfo.meetingFiles"></preview-file></span>
|
:file-id="currentMeetingInfo.meetingFiles"></preview-file></span>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="8" :xl="12" :sm="24">
|
<a-col :xxl="8" :xl="12" :sm="24">
|
||||||
<label>报名链接:</label><span>{{signUpHerfUrl}}</span>
|
<label>报名链接:</label><span>{{ signUpHerfUrl }}</span>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="8" :xl="12" :sm="24">
|
<a-col :xxl="8" :xl="12" :sm="24">
|
||||||
<label>报名二维码:</label><img class="qr-code" :src="signUpQRCode" alt="报名二维码"/><i class="copy primary-color" @click="copy(signUpHerfUrl)">复制</i>
|
<label>报名二维码:</label><img class="qr-code" :src="signUpQRCode" alt="报名二维码"/><i class="copy primary-color"
|
||||||
|
@click="copy(signUpHerfUrl)">复制</i>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :xxl="8" :xl="12" :sm="24">
|
<a-col :xxl="8" :xl="12" :sm="24">
|
||||||
<label>签到二维码:</label><img class="qr-code" :src="signInQRCode" alt="签到二维码"/><i class="copy primary-color" @click="copy(signUpHerfUrl)">复制</i>
|
<label>签到二维码:</label><img class="qr-code" :src="signInQRCode" alt="签到二维码"/><i class="copy primary-color"
|
||||||
|
@click="copy(signUpHerfUrl)">复制</i>
|
||||||
</a-col>
|
</a-col>
|
||||||
</a-row>
|
</a-row>
|
||||||
<a-row v-show="currentMeetingInfo.meetingType === '2' ">
|
<a-row v-show="currentMeetingInfo.meetingType === '2' ">
|
||||||
@@ -137,9 +139,9 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
<a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="queryParam.identify === '1' ">
|
<a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="queryParam.identity === '1' && currentMeetingInfo.meetingType === '3' ">
|
||||||
<a-form-item label="嘉宾类型">
|
<a-form-item label="嘉宾类型">
|
||||||
<j-dict-select-tag v-model="queryParam.guestType" placeholder="请选择身份"
|
<j-dict-select-tag v-model="queryParam.guestType" placeholder="请选择嘉宾类型"
|
||||||
dictCode="guest_type"/>
|
dictCode="guest_type"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -365,9 +367,9 @@ export default {
|
|||||||
currentMeetingInfo: {},
|
currentMeetingInfo: {},
|
||||||
meetingType: '',
|
meetingType: '',
|
||||||
// 报名二维码
|
// 报名二维码
|
||||||
signUpQRCode:'',
|
signUpQRCode: '',
|
||||||
// 签到二维码
|
// 签到二维码
|
||||||
signInQRCode:'',
|
signInQRCode: '',
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -452,32 +454,36 @@ export default {
|
|||||||
* 合并开票
|
* 合并开票
|
||||||
* */
|
* */
|
||||||
batchInvoice() {
|
batchInvoice() {
|
||||||
|
let meetingId = this.$route.query.id
|
||||||
if (this.selectionRows.length === 0) {
|
if (this.selectionRows.length === 0) {
|
||||||
this.$message.warn('请选择一条记录')
|
this.$message.warn('请选择一条记录')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
// 应收金额为0 不需要发票 打包 都不可以开发票
|
||||||
|
console.log(this.selectionRows)
|
||||||
// 只能选择相同的单位进行合并开票
|
// 只能选择相同的单位进行合并开票
|
||||||
if (this.selectionRows.length > 0) {
|
if (this.selectionRows.length > 0) {
|
||||||
// 一个数据不做判断
|
let initName = this.selectionRows[0].companyId
|
||||||
if (this.selectionRows.length === 1) {
|
// 单位判重
|
||||||
// 打开模态框
|
let flag = this.selectionRows.some(item => {
|
||||||
this.$refs.batchInvoiceModal.open(this.selectionRows)
|
return item.companyId !== initName
|
||||||
|
})
|
||||||
|
// 身份为嘉宾、内部企业和缴费方式为打包和不需要发票的不支持开票
|
||||||
|
let moneyFlag = this.selectionRows.some(item => {
|
||||||
|
return item.amountReceivable === '0.00' || item.needInvoice === 0 || item.payMode === 3
|
||||||
|
})
|
||||||
|
if (flag) {
|
||||||
|
// flag为true 说明有单位不一样
|
||||||
|
this.$message.warn('请选择同一企业的参会人进行开票')
|
||||||
|
return
|
||||||
|
} else if(moneyFlag){
|
||||||
|
this.$message.warn('身份为嘉宾、内部企业和缴费方式为打包和不需要发票的不支持开票')
|
||||||
|
return
|
||||||
} else {
|
} else {
|
||||||
let initName = this.selectionRows[0].companyId
|
// 打开模态框
|
||||||
// 单位判重
|
this.$refs.batchInvoiceModal.open(this.selectionRows,meetingId,this.selectedRowKeys)
|
||||||
let flag = this.selectionRows.some(item => {
|
|
||||||
return item.companyId !== initName
|
|
||||||
})
|
|
||||||
if (flag) {
|
|
||||||
// flag为true 说明有单位不一样
|
|
||||||
this.$message.warn('请选择同一企业的参会人进行开票')
|
|
||||||
return
|
|
||||||
} else {
|
|
||||||
// 打开模态框
|
|
||||||
this.$refs.batchInvoiceModal.open(this.selectionRows)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/*
|
/*
|
||||||
@@ -530,12 +536,12 @@ export default {
|
|||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
let code = ''
|
let code = ''
|
||||||
createQcCode({contact: params}).then(res => {
|
createQcCode({contact: params}).then(res => {
|
||||||
if(res.success){
|
if (res.success) {
|
||||||
code = res.result
|
code = res.result
|
||||||
}else {
|
} else {
|
||||||
console.error('生成二维码失败')
|
console.error('生成二维码失败')
|
||||||
}
|
}
|
||||||
}).finally( () => {
|
}).finally(() => {
|
||||||
resolve(code)
|
resolve(code)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -591,10 +597,12 @@ export default {
|
|||||||
.content {
|
.content {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qr-code {
|
.qr-code {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 100px;
|
height: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.copy {
|
.copy {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|||||||
@@ -251,6 +251,10 @@ export default {
|
|||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// 普通会议的编辑回显值
|
// 普通会议的编辑回显值
|
||||||
if(this.$refs.formother){
|
if(this.$refs.formother){
|
||||||
|
// 打包不显示行程信息
|
||||||
|
if(record.payMode === 3){
|
||||||
|
this.$refs.formother.payModeBool = true
|
||||||
|
}
|
||||||
this.$refs.formother.setFormVal(this.model)
|
this.$refs.formother.setFormVal(this.model)
|
||||||
}
|
}
|
||||||
//国际研讨会的嘉宾前三个的编辑回显值
|
//国际研讨会的嘉宾前三个的编辑回显值
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
<a-form-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="地址" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入地址"
|
<a-input placeholder="请输入地址"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
v-decorator="['address']"
|
v-decorator="['postContactAddress']"
|
||||||
></a-input>
|
></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
<a-form-item label="发票号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item label="发票号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input placeholder="请输入发票号"
|
<a-input placeholder="请输入发票号"
|
||||||
:maxLength='50'
|
:maxLength='50'
|
||||||
v-decorator="[ 'invoice',validatorRules.invoice]"
|
v-decorator="[ 'billNo',validatorRules.billNo]"
|
||||||
></a-input>
|
></a-input>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
@@ -83,6 +83,10 @@ export default {
|
|||||||
form: this.$form.createForm(this),
|
form: this.$form.createForm(this),
|
||||||
// 选中的企业
|
// 选中的企业
|
||||||
selectedCompany:{},
|
selectedCompany:{},
|
||||||
|
// 选中的参会人
|
||||||
|
meetingSituationIds:[],
|
||||||
|
// 当前的会议id
|
||||||
|
meetingId:'',
|
||||||
labelCol: {
|
labelCol: {
|
||||||
xs: {span: 24},
|
xs: {span: 24},
|
||||||
sm: {span: 6}
|
sm: {span: 6}
|
||||||
@@ -96,7 +100,7 @@ export default {
|
|||||||
rules: [{required: true, message: '请选择邮寄联系人'}],
|
rules: [{required: true, message: '请选择邮寄联系人'}],
|
||||||
validateTrigger: 'change'
|
validateTrigger: 'change'
|
||||||
},
|
},
|
||||||
invoice: {
|
billNo: {
|
||||||
rules: [{required: true, message: '请输入发票号'}],
|
rules: [{required: true, message: '请输入发票号'}],
|
||||||
validateTrigger: ['blur']
|
validateTrigger: ['blur']
|
||||||
},
|
},
|
||||||
@@ -106,20 +110,25 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
url: {
|
url: {
|
||||||
add: '/paymentRecord/payPaymentRecord/addPayBill',
|
add: '/meeting/payMeetingSituation/batchPayBill',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
open(record){
|
open(record,meetingId,selectedRowKeys){
|
||||||
this.form.resetFields()
|
this.form.resetFields()
|
||||||
|
this.visible = true
|
||||||
console.log(record)
|
console.log(record)
|
||||||
// 联系人下拉数据
|
// 联系人下拉数据
|
||||||
this.selectedCompany = {
|
this.selectedCompany = {
|
||||||
id:record[0].companyId,
|
id:record[0].companyId,
|
||||||
companyName:record[0].companyName
|
companyName:record[0].companyName
|
||||||
}
|
}
|
||||||
this.visible = true
|
// 记录会议id
|
||||||
|
this.meetingId = meetingId
|
||||||
|
// 记录选中的参会人
|
||||||
|
this.meetingSituationIds = [...selectedRowKeys]
|
||||||
|
|
||||||
},
|
},
|
||||||
close() {
|
close() {
|
||||||
this.$emit('close')
|
this.$emit('close')
|
||||||
@@ -130,14 +139,18 @@ export default {
|
|||||||
// 触发表单验证
|
// 触发表单验证
|
||||||
this.form.validateFields((err, values) => {
|
this.form.validateFields((err, values) => {
|
||||||
if (!err) {
|
if (!err) {
|
||||||
|
that.confirmLoading = true
|
||||||
let httpurl = this.url.add
|
let httpurl = this.url.add
|
||||||
let method = 'post'
|
let method = 'post'
|
||||||
const formData = Object.assign(this.model, values)
|
const formData = Object.assign({}, values)
|
||||||
|
formData.meetingId = this.meetingId
|
||||||
|
formData.meetingSituationIds = this.meetingSituationIds
|
||||||
console.log('表单提交数据', formData)
|
console.log('表单提交数据', formData)
|
||||||
httpAction(httpurl, formData, method).then((res) => {
|
httpAction(httpurl, formData, method).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
that.$message.success(res.message)
|
that.$message.success(res.message)
|
||||||
that.$emit('ok')
|
that.$emit('ok')
|
||||||
|
that.confirmLoading = false
|
||||||
that.close()
|
that.close()
|
||||||
} else {
|
} else {
|
||||||
that.$message.warning(res.message)
|
that.$message.warning(res.message)
|
||||||
@@ -172,7 +185,7 @@ export default {
|
|||||||
getContactsById({id:val}).then(res => {
|
getContactsById({id:val}).then(res => {
|
||||||
if(res.success){
|
if(res.success){
|
||||||
let address = res.result.contactAddress
|
let address = res.result.contactAddress
|
||||||
this.form.setFieldsValue({'address':address})
|
this.form.setFieldsValue({'postContactAddress':address})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user