|
|
@@ -115,7 +115,7 @@
|
|
|
:precision="2"
|
|
|
:controls="false"
|
|
|
style="width: 100%"
|
|
|
- disabled
|
|
|
+ :disabled="Number(ifRedReversalInvoice) === 1"
|
|
|
:min="0"
|
|
|
>
|
|
|
<template slot="append">
|
|
|
@@ -358,6 +358,7 @@
|
|
|
:contactData="contactData"
|
|
|
ref="tableInfoRef"
|
|
|
:invoiceAmount="form.invoiceAmount"
|
|
|
+ :ifRedReversalInvoice="ifRedReversalInvoice"
|
|
|
@invoiceAmountChange="invoiceAmountChange"
|
|
|
></table-info-new>
|
|
|
|
|
|
@@ -721,6 +722,8 @@
|
|
|
accountStatementDialogFlag: false,
|
|
|
enterprisePage: [],
|
|
|
totalInvoiceAmount: 0,
|
|
|
+ // 是否冲红发票:1-是(不允许编辑金额),0-否(允许编辑金额)
|
|
|
+ ifRedReversalInvoice: 0,
|
|
|
form: {
|
|
|
applyDeptId: '',
|
|
|
applyDeptName: '',
|
|
|
@@ -757,6 +760,8 @@
|
|
|
methods: {
|
|
|
//从发票管理新增发票初始化
|
|
|
async init(row = {}, type) {
|
|
|
+ // 重置冲红标记,避免上次编辑状态污染本次
|
|
|
+ this.ifRedReversalInvoice = 0;
|
|
|
this.businessId = type == 'reissue' ? '' : row.id || '';
|
|
|
this.title =
|
|
|
type == 'add'
|
|
|
@@ -766,6 +771,11 @@
|
|
|
: '修改';
|
|
|
console.log('row', row, type);
|
|
|
this.dialogType = type;
|
|
|
+ // 修改时,先用列表行带过来的 ifRedReversalInvoice 占位(详情接口目前未返回该字段),
|
|
|
+ // 后续 getInfo() 若接口补上该字段,会被详情返回值覆盖
|
|
|
+ if (type === 'update') {
|
|
|
+ this.ifRedReversalInvoice = Number(row?.ifRedReversalInvoice) || 0;
|
|
|
+ }
|
|
|
if (type == 'add' || type == 'reissue') {
|
|
|
this.form.applyDeptId = this.user.info.groupId;
|
|
|
this.form.applyDeptName = this.user.info.groupName;
|
|
|
@@ -1123,6 +1133,10 @@
|
|
|
async getInfo(id) {
|
|
|
this.form = await invoiceApplyInfoV2API(id);
|
|
|
this.form.type = Number(this.form.type);
|
|
|
+ if(this.form.ifRedReversalInvoice){
|
|
|
+ // 冲红发票标记:1 是 / 0 否。仅在 1 时禁止编辑金额相关字段
|
|
|
+ this.ifRedReversalInvoice = Number(this.form.ifRedReversalInvoice);
|
|
|
+ }
|
|
|
this.$nextTick(() => {
|
|
|
// 根据来源类型设置数据源:99 用 tableInfo(setValue),非 99 用 tableInfoNew(putValue)
|
|
|
if (this.form.sourceType == 99) {
|