|
@@ -142,6 +142,10 @@ import corpOption from './config/corpOption.json'
|
|
|
export default {
|
|
|
name: "financialAccount",
|
|
|
props: {
|
|
|
+ debitAmount: {
|
|
|
+ type: Number,
|
|
|
+ default: 0,
|
|
|
+ },
|
|
|
addBut: {
|
|
|
type: Boolean,
|
|
|
default: true
|
|
@@ -394,14 +398,14 @@ export default {
|
|
|
amountSum += Number(this.data[item].amount)
|
|
|
}
|
|
|
let res = await getApplyAmount({ srcBillId: this.srcBillId, billType: "申请" })
|
|
|
- if ((Number(this.form.debitAmount) - Number(res.data.data)) <= amountSum) {
|
|
|
- return true
|
|
|
+ if ((Number(this.debitAmount) - Number(res.data.data)) <= amountSum) {
|
|
|
+ return '可结算金额:' + res.data.data + '元'
|
|
|
}
|
|
|
} else {
|
|
|
for (let item in this.data) {
|
|
|
let res = await getApplyAmount({ srcBillId: this.data[item].itemId, billType: "申请" })
|
|
|
if ((Number(this.data[item].itemorderAmount) - Number(res.data.data)) <= this.data[item].amount) {
|
|
|
- return this.data[item].srcOrderno
|
|
|
+ return '合同号:' + this.data[item].srcOrderno + '可结算金额:' + res.data.data + '元'
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -434,9 +438,9 @@ export default {
|
|
|
let forData = await this.forData()
|
|
|
if (forData) {
|
|
|
if (this.addBut) {
|
|
|
- return this.$message.error('已付费金额大于货款')
|
|
|
+ return this.$message.error(forData)
|
|
|
} else {
|
|
|
- return this.$message.error('合同号:' + forData + '已付费金额大于货款')
|
|
|
+ return this.$message.error(forData)
|
|
|
}
|
|
|
}
|
|
|
|