|
|
@@ -293,6 +293,16 @@
|
|
|
{{ item.label }}</el-radio>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="12" v-if="inputForm.redInvoiceFlag === '1'">
|
|
|
+ <el-form-item label="红冲原因" prop="redFlushReason" :rules="[
|
|
|
+ { required: true, message: '红冲原因不能为空', trigger: 'blur' }
|
|
|
+ ]">
|
|
|
+ <el-radio-group v-model="inputForm.redFlushReason">
|
|
|
+ <el-radio label="01" size="large">开票有误</el-radio>
|
|
|
+ <el-radio label="04" size="large">销售折让</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="24" v-if="inputForm.redInvoiceFlag === '1' && inputForm.relatedInvoice === '0'">
|
|
|
<el-form-item label="红冲情况说明" prop="situationDetail" :rules="[
|
|
|
{ required: true, message: '红冲情况说明不能为空', trigger: 'blur' }
|
|
|
@@ -335,13 +345,13 @@
|
|
|
{{ item.label }}</el-radio>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
- <el-col :span="24">
|
|
|
+ <!-- <el-col :span="24">
|
|
|
<el-form-item label="开票内容要求" prop="billingContentTerms" :rules="[
|
|
|
]">
|
|
|
<el-input type="textarea" maxlength="500" v-model="inputForm.billingContentTerms" placeholder="开票内容要求"
|
|
|
show-word-limit></el-input>
|
|
|
</el-form-item>
|
|
|
- </el-col>
|
|
|
+ </el-col> -->
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="开票人" prop="billingPeople" :rules="[
|
|
|
]">
|
|
|
@@ -448,6 +458,16 @@
|
|
|
show-word-limit></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item label="是否短信通知" prop="isSmsNotice" :rules="[
|
|
|
+ ]">
|
|
|
+ <el-radio-group v-model="inputForm.isSmsNotice">
|
|
|
+ <el-radio v-for="item in $dictUtils.getDictList('yes_no')" :label="item.value">{{
|
|
|
+ item.label }}
|
|
|
+ </el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
<el-form :disabled="detailFlag !== true">
|
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
@@ -687,7 +707,9 @@ export default {
|
|
|
invoiceNumberStr: '', //红字发票号
|
|
|
redInvoiceRelevancyId: '', //红字发票id
|
|
|
relatedInvoice: '1', //关联发票
|
|
|
- situationDetail: '' //情况说明
|
|
|
+ situationDetail: '', //情况说明
|
|
|
+ isSmsNotice: '0',
|
|
|
+ redFlushReason: '' //红冲原因
|
|
|
},
|
|
|
programRow: '',
|
|
|
bankList: [],
|
|
|
@@ -790,7 +812,9 @@ export default {
|
|
|
invoiceNumberStr: '', //红字发票号
|
|
|
redInvoiceRelevancyId: '', //红字发票id
|
|
|
relatedInvoice: '1', //关联发票
|
|
|
- situationDetail: '' //情况说明
|
|
|
+ situationDetail: '',//情况说明
|
|
|
+ isSmsNotice: '0',
|
|
|
+ redFlushReason: '' //红冲原因
|
|
|
}
|
|
|
this.inputForm.id = id
|
|
|
this.visible = true
|
|
|
@@ -807,7 +831,12 @@ export default {
|
|
|
if (this.commonJS.isEmpty(this.inputForm.redInvoiceFlag)) {
|
|
|
this.inputForm.redInvoiceFlag = '0'
|
|
|
}
|
|
|
-
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.redFlushReason)) {
|
|
|
+ this.inputForm.redFlushReason = '01'
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.isSmsNotice)) {
|
|
|
+ this.inputForm.isSmsNotice = '0'
|
|
|
+ }
|
|
|
if (this.commonJS.isEmpty(this.inputForm.relatedInvoice)) {
|
|
|
this.inputForm.relatedInvoice = '1'
|
|
|
}
|
|
|
@@ -872,8 +901,6 @@ export default {
|
|
|
}
|
|
|
acc = (acc + parseFloat(parseFloat(item.account).toFixed(2)))
|
|
|
})
|
|
|
- console.log('acc', acc)
|
|
|
- console.log('this.inputForm.account', this.inputForm.account)
|
|
|
if (acc.toString() !== this.inputForm.account) {
|
|
|
this.$message.warning('发票明细中 “开票金额”总和 与发票详情中 “发票金额” 不等')
|
|
|
return
|
|
|
@@ -938,6 +965,25 @@ export default {
|
|
|
throw new Error('收款明细的总金额不能超过发票总金额,请重新输入')
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ if (this.inputForm.redInvoiceFlag === '1' && this.inputForm.relatedInvoice === '1') {
|
|
|
+ if (this.inputForm.redFlushReason === "01") {
|
|
|
+ if (-Math.abs(this.inputForm.originalAccount) != -Math.abs(this.inputForm.accountTotal)) {
|
|
|
+ this.loading = false
|
|
|
+ this.$message.error('发票金额必须和需要红冲的金额相同')
|
|
|
+ throw new Error()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (this.inputForm.redFlushReason === "04") {
|
|
|
+ -14999 - 45000
|
|
|
+ if (-Math.abs(this.inputForm.originalAccount) >= -Math.abs(this.inputForm.accountTotal)) {
|
|
|
+ this.loading = false
|
|
|
+ this.$message.error('发票金额必须大于需要红冲的金额')
|
|
|
+ throw new Error()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if (this.commonJS.isNotEmpty(this.inputForm.financeInvoiceReceivablesDTOList)) {
|
|
|
// 如果收款明细中的数据不是空,则将是否收款的状态改为部分收款
|
|
|
this.inputForm.receivablesStatus = '2'
|
|
|
@@ -948,6 +994,7 @@ export default {
|
|
|
this.inputForm.receivablesDate = ''
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
this.$refs['inputForm'].validate((valid) => {
|
|
|
if (valid) {
|
|
|
this.loading = true
|
|
|
@@ -1380,6 +1427,8 @@ export default {
|
|
|
if (value === '0') {
|
|
|
this.inputForm.redInvoiceRelevancyNumber = ''
|
|
|
this.inputForm.invoiceNumberStr = ''
|
|
|
+ this.inputForm.redInvoiceRelevancyId = ''
|
|
|
+
|
|
|
} else {
|
|
|
this.inputForm.situationDetail = ''
|
|
|
}
|