|
@@ -266,6 +266,34 @@
|
|
|
<!-- </el-input-number>-->
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="是否红字发票" prop="redInvoiceFlag"
|
|
|
+ :rules="[
|
|
|
+ {required: true, message:'是否红字发票不能为空', trigger:'blur'}
|
|
|
+ ]">
|
|
|
+ <el-radio v-model="inputForm.redInvoiceFlag" v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value" style="margin-right: 20px">
|
|
|
+ {{item.label}}</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col v-if="inputForm.redInvoiceFlag === '1'" :span="12">
|
|
|
+ <el-form-item label="关联红字发票" prop="redInvoiceRelevancyNumber"
|
|
|
+ :rules="[
|
|
|
+ {required: true, message:'关联红字发票不能为空', trigger:'blur'},{required: true, message:'关联红字发票不能为空', trigger:'change'}
|
|
|
+ ]">
|
|
|
+ <el-input :readonly="true" placeholder="请关联红字发票" v-model="inputForm.redInvoiceRelevancyNumber" @focus="openWorkInvoiceForm()" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ <el-col v-if="inputForm.redInvoiceFlag === '1'" :span="12">
|
|
|
+ <el-form-item label="关联发票号" prop="invoiceNumberStr"
|
|
|
+ :rules="[
|
|
|
+ ]">
|
|
|
+ <el-input :disabled="true" placeholder="关联发票号" v-model="inputForm.invoiceNumberStr" clearable></el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="是否多张开票" prop="isMultiple"
|
|
|
:rules="[
|
|
@@ -647,6 +675,8 @@
|
|
|
<WorkClientForm ref="workClientForm" @getWorkClient="getWorkClient"></WorkClientForm>
|
|
|
<user-select1 ref="userSelect1" @doSubmit="selectUser1"></user-select1>
|
|
|
<user-select2 ref="userSelect2" @doSubmit="selectUser2"></user-select2>
|
|
|
+ <WorkInvoiceForm ref="workInvoiceForm" @getWorkInvoiceRadioChoose="getWorkInvoice"></WorkInvoiceForm>
|
|
|
+
|
|
|
<!-- 邮箱弹窗-->
|
|
|
<el-dialog v-model="dialogFormVisible" style="width: 50%" title="邮箱修改">
|
|
|
<el-form :model="form" label-width="160px">
|
|
@@ -696,6 +726,7 @@
|
|
|
import userService from "../../../api/sys/userService";
|
|
|
import UserSelect1 from '@/views/utils/UserTreeSelect'
|
|
|
import UserSelect2 from '@/views/utils/UserTreeSelect'
|
|
|
+ import WorkInvoiceForm from './WorkInvoiceChooseRadio'
|
|
|
export default {
|
|
|
props: {
|
|
|
businessId: {
|
|
@@ -759,7 +790,11 @@
|
|
|
financeInvoiceReceivablesDTOList: [],
|
|
|
financeInvoiceInvalidDTO: {},
|
|
|
isMultiple: '',
|
|
|
- actualDrawerEmailAddress: ''
|
|
|
+ actualDrawerEmailAddress: '',
|
|
|
+ redInvoiceFlag: '0', //是否红字发票
|
|
|
+ redInvoiceRelevancyNumber: '', //红字发票编号
|
|
|
+ invoiceNumberStr: '', //红字发票号
|
|
|
+ redInvoiceRelevancyId: '', //红字发票id
|
|
|
},
|
|
|
programRow: '',
|
|
|
bankList: [],
|
|
@@ -791,7 +826,8 @@
|
|
|
SelectTree,
|
|
|
UpLoadComponent,
|
|
|
UserSelect1,
|
|
|
- UserSelect2
|
|
|
+ UserSelect2,
|
|
|
+ WorkInvoiceForm
|
|
|
},
|
|
|
computed: {
|
|
|
bus: {
|
|
@@ -876,7 +912,11 @@
|
|
|
remarks: ''
|
|
|
},
|
|
|
isMultiple: '',
|
|
|
- actualDrawerEmailAddress: ''
|
|
|
+ actualDrawerEmailAddress: '',
|
|
|
+ redInvoiceFlag: '0', //是否红字发票
|
|
|
+ redInvoiceRelevancyNumber: '', //红字发票编号
|
|
|
+ invoiceNumberStr: '', //红字发票号
|
|
|
+ redInvoiceRelevancyId: '', //红字发票id
|
|
|
}
|
|
|
// if (method === 'add') {
|
|
|
// this.title = `新建发票`
|
|
@@ -916,6 +956,9 @@
|
|
|
if (this.commonJS.isEmpty(this.inputForm.workAttachmentDtoList) || this.inputForm.workAttachmentDtoList.length === 0) {
|
|
|
this.inputForm.workAttachmentDtoList = []
|
|
|
}
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.redInvoiceFlag)) {
|
|
|
+ this.inputForm.redInvoiceFlag = '0'
|
|
|
+ }
|
|
|
if (this.commonJS.isEmpty(this.inputForm.financeInvoiceReceivablesDTOList) || this.inputForm.financeInvoiceReceivablesDTOList.length === 0) {
|
|
|
this.inputForm.financeInvoiceReceivablesDTOList = []
|
|
|
}
|
|
@@ -965,6 +1008,7 @@
|
|
|
allAmount: ''
|
|
|
})
|
|
|
}
|
|
|
+ console.log('data',this.inputForm)
|
|
|
this.$refs.uploadComponent.newUpload(method, this.inputForm.workAttachmentDtoList, 'invoice')
|
|
|
this.loading = false
|
|
|
})
|
|
@@ -1054,6 +1098,17 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ //判断是否是红字发票
|
|
|
+ if (this.inputForm.account > 0 && this.inputForm.redInvoiceFlag == '1'){
|
|
|
+ this.loading = false
|
|
|
+ this.$message.error("发票金额为正数,不可为红字发票,请将是否红字发票请选择否")
|
|
|
+ throw new Error()
|
|
|
+ }
|
|
|
+ if (this.inputForm.account < 0 && this.inputForm.redInvoiceFlag == '0'){
|
|
|
+ this.loading = false
|
|
|
+ this.$message.error("发票金额为负数,请将是否红字发票请选择是,并选择关联的发票信息")
|
|
|
+ throw new Error()
|
|
|
+ }
|
|
|
if (this.commonJS.isNotEmpty(this.inputForm.financeInvoiceBaseDTOList)) {
|
|
|
let i = this.inputForm.financeInvoiceBaseDTOList.length
|
|
|
for (let j = 0; j < i; j++) {
|
|
@@ -1562,6 +1617,11 @@
|
|
|
var result = this.inputForm.account.replace(reg, regStrs[i][1])
|
|
|
this.inputForm.account = result
|
|
|
}
|
|
|
+ if(this.inputForm.account<0){
|
|
|
+ this.inputForm.redInvoiceFlag = "1"
|
|
|
+ }else{
|
|
|
+ this.inputForm.redInvoiceFlag = "0"
|
|
|
+ }
|
|
|
},
|
|
|
//点开邮箱
|
|
|
openDia() {
|
|
@@ -1602,6 +1662,16 @@
|
|
|
this.inputForm.reconciliationPeopleName=user[0].name
|
|
|
this.inputForm.reconciliationPeople=user[0].id
|
|
|
},
|
|
|
+ openWorkInvoiceForm() {
|
|
|
+ this.$refs.workInvoiceForm.init()
|
|
|
+ },
|
|
|
+ getWorkInvoice(row) {
|
|
|
+ console.log("getWorkInvoice",row)
|
|
|
+ this.inputForm.redInvoiceRelevancyNumber = row.no
|
|
|
+ this.inputForm.invoiceNumberStr = row.number
|
|
|
+ this.inputForm.redInvoiceRelevancyId = row.id
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
}
|
|
|
}
|
|
|
</script>
|