给单据中多账户的选择增加校验

This commit is contained in:
季圣华 2021-12-15 21:53:31 +08:00
parent 7ab8c93647
commit 94313bb177

View File

@ -150,6 +150,18 @@
that.accountMoneyList.push(formData.threeAccountPrice)
allPrice = allPrice + formData.threeAccountPrice
}
if(that.accountIdList.length<2 || that.accountMoneyList.length<2) {
this.$message.warning('抱歉多账户结算必须选择两个以上账户和金额');
that.confirmLoading = false;
return;
}
if((formData.oneAccountId && !formData.oneAccountPrice)||
(formData.twoAccountId && !formData.twoAccountPrice)||
(formData.threeAccountId && !formData.threeAccountPrice)) {
this.$message.warning('抱歉请填写结算金额');
that.confirmLoading = false;
return;
}
that.$emit('ok', that.accountIdList, that.accountMoneyList, allPrice);
that.confirmLoading = false;
that.close();