diff --git a/src/components/company/AddMeetingCompany.vue b/src/components/company/AddMeetingCompany.vue
index 6717206..2664c74 100644
--- a/src/components/company/AddMeetingCompany.vue
+++ b/src/components/company/AddMeetingCompany.vue
@@ -36,6 +36,12 @@ export default {
valueKey: {
type: String,
default: 'companyName'
+ },
+ // 是否返回企业的全部信息,如果是 则再change方法中以第二个参数返回
+ fullCompanyInfo: {
+ type: Boolean,
+ required: false,
+ default: false
}
},
components: {
@@ -70,7 +76,11 @@ export default {
* */
setCompanyVal(selectedVal) {
let {id, companyName} = selectedVal
- this.$emit('change', {id, companyName})
+ if(this.fullCompanyInfo) {
+ this.$emit('change', {id, companyName}, {...selectedVal})
+ } else {
+ this.$emit('change', {id, companyName})
+ }
}
},
model: {
diff --git a/src/enums/commonEnums.js b/src/enums/commonEnums.js
index 51150fc..d20ef86 100644
--- a/src/enums/commonEnums.js
+++ b/src/enums/commonEnums.js
@@ -7,4 +7,18 @@ export const ProjectTypeEnums = {
MEMBER_PRO: {name: '资料网员', value: 4},
STANDARD_MEMBER_PRO: {name: '标协会员项目', value: 5},
STANDARD_CERTIFICATE_PRO: {name: '标协证书项目', value: 6},
-}
\ No newline at end of file
+}
+
+// 参会人员身份类型
+export const MeetIdentifyTypeEnums = {
+ guest: { name: '嘉宾', index: 1 },
+ attendee: { name: '参会人', index: 2 },
+ internal: { name: '内部企业', index: 3 }
+}
+
+// 需要发票的类型
+export const InvoiceTypeEnums = {
+ noNeed: { name: '不需要', index: 0 },
+ plain: { name: '增值税普通发票', index: 1 },
+ special: { name: '增值税专用发票', index: 2 }
+}
diff --git a/src/views/incomePayments/meetManage/OtherMeetingForm.vue b/src/views/incomePayments/meetManage/OtherMeetingForm.vue
index 5d39bd3..8883d95 100644
--- a/src/views/incomePayments/meetManage/OtherMeetingForm.vue
+++ b/src/views/incomePayments/meetManage/OtherMeetingForm.vue
@@ -1,32 +1,5 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
缴费信息
@@ -104,12 +77,87 @@
-
-
-
- 邮寄信息
+
+
+
+ 发票信息
-
+
+
+ {e.target.value = (e.target.value + '').trim()}">
+
+
+
+
+ {e.target.value = (e.target.value + '').trim()}">
+
+
+
+
+
+
+ {e.target.value = (e.target.value + '').trim()}">
+
+
+
+
+ e.target.value = (e.target.value.replace(/[^0-9-]/g, '')).trim()">
+
+
+
+
+ {e.target.value = (e.target.value + '').trim()}">
+
+
+
+
+ {e.target.value = (e.target.value + '').trim()}">
+
+
+
+
+ {e.target.value = (e.target.value + '').trim()}">
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 邮寄信息
+
+
-
+
-
+
{
if (!err) {
+ // 如果需要发票,判断当前的发票信息是否进行了修改,用于最后提交的时候判断是否请求接口,减少冗余的请求
+ let needInvoice = Number(values.needInvoice)
+ if (needInvoice) {
+ let confirmArr = [
+ {name: '企业名称', key: 'companyName'},
+ {name: '信用代码', key: 'dutyCode'},
+ ]
+ if(needInvoice === InvoiceTypeEnums.special.index) {
+ confirmArr = confirmArr.concat([
+ {name: '公司地址', key: 'companyAddress'},
+ {name: '公司电话', key: 'companyPhone'},
+ {name: '开户行', key: 'openingBank'},
+ {name: '银行账号', key: 'bankAccount'},
+ {name: '联行号', key: 'linkBankNumber'}
+ ])
+ }
+ let changeInvoiceFlag = confirmArr.some(tt => {
+ if(this.selectedCompany[tt.key] !== values[tt.key]) {
+ return true
+ }
+ })
+ values.changeInvoiceFlag = changeInvoiceFlag
+ }
this.$emit('formData', values)
} else {
this.$emit('formData', {stop: true})
@@ -398,7 +506,10 @@ export default {
setFormVal(record) {
// this.isEditBool = record.checkResult === 1
this.isEditBool = false
- this.needInvoiceBool = record.needInvoice === 0
+ this.needInvoiceBool = record.needInvoice !== 0
+ this.changeInvoice(record.needInvoice)
+ // this.selectedInvoiceType = Number(record.needInvoice)
+
// 是否已经到账
this.isCheckInBool = record.inAccount === 1
// 回显邮寄联系人
@@ -424,7 +535,8 @@ export default {
'amountReceivable',
'taxRate',
'tax',
- 'noTaxAmount'
+ 'noTaxAmount',
+ 'invoiceProject' // 发票项目
))
})
@@ -434,11 +546,43 @@ export default {
* 选择发票
* */
changeInvoice(val) {
+ this.selectedInvoiceType = Number(val)
if (val === '0') {
// 不需要发票
- this.needInvoiceBool = true
- } else {
this.needInvoiceBool = false
+ } else {
+ this.needInvoiceBool = true
+ }
+ this.setInvoiceFormItem()
+ },
+ // 设置表单中发票的信息
+ setInvoiceFormItem() {
+ if (this.selectedInvoiceType === InvoiceTypeEnums.special.index) {
+ this.$nextTick(() => {
+ this.form.setFieldsValue(pick(this.selectedCompany, 'companyName', 'dutyCode', 'companyAddress', 'companyPhone', 'bankAccount', 'openingBank', 'linkBankNumber'))
+ })
+ } else if(this.selectedInvoiceType === InvoiceTypeEnums.plain.index) {
+ this.$nextTick(() => {
+ this.form.setFieldsValue(pick(this.selectedCompany, 'companyName', 'dutyCode'))
+ })
+ }
+ },
+ // 清空 发票信息的数据
+ clearInvoiceFormItem() {
+ this.form.resetFields(['companyName', 'dutyCode', 'companyAddress', 'companyPhone', 'bankAccount', 'openingBank', 'linkBankNumber'])
+ },
+ /*
+ * 验证发票信息-电话号码 的正确性
+ * */
+ checkCompanyPhone(rule, value, callback) {
+ const reg = /^((13[0-9])|(14[579])|(15([0-3]|[5-9]))|(17[0135678])|(18[0-9])|(19[8|9])|(16[6]))\d{8}$|^([0-9]{3,4}-)[0-9]{7,8}$/
+ if (!value) {
+ callback('请输入电话号码')
+ }
+ if (value && !reg.test(value)) {
+ callback(new Error('请输入正确格式的电话号码'))
+ } else {
+ callback()
}
},
addContactsOk() {
diff --git a/src/views/incomePayments/meetManage/SignUpInfoEdit.vue b/src/views/incomePayments/meetManage/SignUpInfoEdit.vue
index 0167801..0c5becd 100644
--- a/src/views/incomePayments/meetManage/SignUpInfoEdit.vue
+++ b/src/views/incomePayments/meetManage/SignUpInfoEdit.vue
@@ -11,6 +11,7 @@
@@ -43,25 +44,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -324,10 +306,19 @@ export default {
// 参会单位回显
this.model.companyId = {
id:this.model.companyId,
- companyName:this.model.companyName
+ companyName:this.model.companyName,
}
// 参会人回显
- this.selectedCompany = this.model.companyId
+ // this.selectedCompany = this.model.companyId
+ this.selectedCompany = Object.assign({}, this.model.companyId, {
+ // 写入发票的信息,因为需要回显
+ dutyCode:this.model.dutyCode, // 信用代码
+ companyAddress:this.model.companyAddress, // 公司地址
+ companyPhone:this.model.companyPhone, // 公司电话
+ openingBank:this.model.openingBank, // 开户行
+ bankAccount:this.model.bankAccount, // 银行账号
+ linkBankNumber:this.model.linkBankNumber // 联行号
+ })
this.selectPerson = {
id:this.model.companyContactTemporaryId,
name:this.model.companyContactName
@@ -465,8 +456,9 @@ export default {
/*
* 选择参会企业
* */
- changeCompany(value) {
- this.selectedCompany = value
+ changeCompany(value, otherParams) {
+ // this.selectedCompany = value
+ this.selectedCompany = otherParams
// 去掉未审核 去判断的企业是否是标协会企业
let companyName = this.selectedCompany.companyName.replaceAll('(未审核)','')
@@ -495,10 +487,13 @@ export default {
this.form.resetFields(['companyContactId','phone'])
if(this.$refs.formother ){
this.$refs.formother.clearFormItem()
+ // 设置发票的相关信息
+ this.$refs.formother.setInvoiceFormItem()
}
// 判断当前企业是否是内部企业
console.log('-----this.selectedCompany-----', this.selectedCompany)
this.judgeInternalEnterprise(this.selectedCompany.id)
+
},
/*
* 选择联系人获取信息