bug:修复前端组合开票的判断
This commit is contained in:
parent
3e035fe70a
commit
de8d04bf3b
@ -231,6 +231,8 @@ export default {
|
|||||||
}],
|
}],
|
||||||
// 遮罩层
|
// 遮罩层
|
||||||
loading: true,
|
loading: true,
|
||||||
|
// 过滤选定列中是否包含已经开发票的列
|
||||||
|
isContainInvoice: null,
|
||||||
// 选中数组
|
// 选中数组
|
||||||
ids: [],
|
ids: [],
|
||||||
invoiceFlags: [],
|
invoiceFlags: [],
|
||||||
@ -321,21 +323,23 @@ export default {
|
|||||||
handleCombination(row) {
|
handleCombination(row) {
|
||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
console.log("id----------", id);
|
|
||||||
this.isErrFlag = false;
|
this.isErrFlag = false;
|
||||||
for (let i = 0; i < this.invoiceFlags.length; i++) {
|
// for (let i = 0; i < this.invoiceFlags.length; i++) {
|
||||||
if (this.invoiceFlags[i] === true) {
|
// if (this.invoiceFlags[i] === true) {
|
||||||
this.msgError("已开票的结算记录不能再次开票")
|
// this.msgError("已开票的结算记录不能再次开票")
|
||||||
this.isErrFlag = true;
|
// this.isErrFlag = true;
|
||||||
break;
|
// break;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (!this.isErrFlag) {
|
if (!this.isContainInvoice) {
|
||||||
|
this.msgError("已开票的结算记录不能再次开票");
|
||||||
|
} else {
|
||||||
this.combinationOpen = true;
|
this.combinationOpen = true;
|
||||||
this.form.receipts = this.settleTotalReceipts;
|
this.form.receipts = this.settleTotalReceipts;
|
||||||
this.form.payable = this.settleTotalPrice;
|
this.form.payable = this.settleTotalPrice;
|
||||||
this.form.settleIds = id;
|
this.form.settleIds = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
formatInvoiceFlag(row) {
|
formatInvoiceFlag(row) {
|
||||||
if (row.invoiceFlag === 1 || row.invoiceFlag === '1') {
|
if (row.invoiceFlag === 1 || row.invoiceFlag === '1') {
|
||||||
@ -395,13 +399,14 @@ export default {
|
|||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
this.ids = selection.map(item => item.settleId)
|
this.ids = selection.map(item => item.settleId);
|
||||||
this.single = selection.length !== 1
|
this.single = selection.length !== 1
|
||||||
this.multiple = !selection.length
|
this.multiple = !selection.length
|
||||||
|
|
||||||
// 是否开票标志数组
|
// 是否开票标志数组
|
||||||
this.invoiceFlags = selection.map(item => item.invoiceFlag)
|
this.invoiceFlags = selection.map(item => item.invoiceFlag)
|
||||||
console.log(this.invoiceFlags)
|
this.isContainInvoice = this.invoiceFlags.filter(flag => flag === 1).length === 0;
|
||||||
|
console.log("this.invoiceFlags---", this.isContainInvoice);
|
||||||
|
|
||||||
// 清空组合结算总价
|
// 清空组合结算总价
|
||||||
this.settleTotalPrice = 0;
|
this.settleTotalPrice = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user