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