|
@@ -255,6 +255,16 @@
|
|
|
</el-input-number>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="是否多张开票" prop="isMultiple"
|
|
|
+ :rules="[
|
|
|
+ {required: true, message:'是否多张开票不能为空', trigger:'blur'}
|
|
|
+ ]">
|
|
|
+ <el-radio v-model="inputForm.isMultiple" v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" size="small" style="margin-right: 20px">
|
|
|
+ {{item.label}}
|
|
|
+ </el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="开票内容要求" prop="billingContentTerms"
|
|
|
:rules="[
|
|
@@ -658,7 +668,8 @@
|
|
|
workAttachmentDtoList: [],
|
|
|
financeInvoiceDetailDTOList: [],
|
|
|
financeInvoiceReceivablesDTOList: [],
|
|
|
- financeInvoiceInvalidDTO: {}
|
|
|
+ financeInvoiceInvalidDTO: {},
|
|
|
+ isMultiple: ''
|
|
|
},
|
|
|
programRow: '',
|
|
|
bankList: [],
|
|
@@ -686,6 +697,7 @@
|
|
|
computed: {
|
|
|
bus: {
|
|
|
get () {
|
|
|
+ this.$refs.uploadComponent.setDividerName('附件')
|
|
|
return this.businessId
|
|
|
},
|
|
|
set (val) {
|
|
@@ -763,7 +775,8 @@
|
|
|
invalidStatus: '',
|
|
|
invoiceId: '',
|
|
|
remarks: ''
|
|
|
- }
|
|
|
+ },
|
|
|
+ isMultiple: ''
|
|
|
}
|
|
|
// if (method === 'add') {
|
|
|
// this.title = `新建发票`
|
|
@@ -794,6 +807,10 @@
|
|
|
if (this.commonJS.isEmpty(this.inputForm.financeInvoiceReceivablesDTOList) || this.inputForm.financeInvoiceReceivablesDTOList.length === 0) {
|
|
|
this.inputForm.financeInvoiceReceivablesDTOList = []
|
|
|
}
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.isMultiple) && this.status !== 'taskFormDetail') {
|
|
|
+ // 是否多张开票 默认为 0 否
|
|
|
+ this.inputForm.isMultiple = '0'
|
|
|
+ }
|
|
|
if (this.status === 'audit' || this.status === 'taskFormDetail') {
|
|
|
method = 'view'
|
|
|
}
|
|
@@ -972,6 +989,14 @@
|
|
|
if (valid) {
|
|
|
this.loading = true
|
|
|
this.inputForm.workAttachmentDtoList = this.$refs.uploadComponent.getDataList()
|
|
|
+ if (this.inputForm.isMultiple === '1') {
|
|
|
+ // 是否多张开票,若选择是,则附件必须上传文件
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList)) {
|
|
|
+ this.loading = false
|
|
|
+ this.$message.error('需上传开票明细相关文件')
|
|
|
+ throw new Error('需上传开票明细相关文件')
|
|
|
+ }
|
|
|
+ }
|
|
|
this.financeInvoiceService.saveForm(this.inputForm).then(({data}) => {
|
|
|
this.inputForm.id = data.businessId
|
|
|
callback(data.businessTable, data.businessId, this.inputForm)
|
|
@@ -1021,7 +1046,8 @@
|
|
|
workAttachmentDtoList: [],
|
|
|
financeInvoiceDetailDTOList: [],
|
|
|
financeInvoiceReceivablesDTOList: [],
|
|
|
- financeInvoiceInvalidDTO: {}
|
|
|
+ financeInvoiceInvalidDTO: {},
|
|
|
+ isMultiple: ''
|
|
|
}
|
|
|
this.bankList = []
|
|
|
this.visible = false
|