|
@@ -16,13 +16,13 @@
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="isCleared" label="核销" width="70px">
|
|
|
<template slot-scope="{ row }">
|
|
|
- <span v-if="row.isCleared==0 ">
|
|
|
+ <span v-if="row.isCleared == 0">
|
|
|
未销账
|
|
|
</span>
|
|
|
- <span v-if="row.isCleared==3 ">
|
|
|
+ <span v-if="row.isCleared == 3">
|
|
|
部分销账
|
|
|
</span>
|
|
|
- <span v-if="row.isCleared==9 ">
|
|
|
+ <span v-if="row.isCleared == 9">
|
|
|
销账
|
|
|
</span>
|
|
|
</template>
|
|
@@ -220,29 +220,93 @@ export default {
|
|
|
methods: {
|
|
|
armbChange(row) {
|
|
|
if (row.dc == 'C') {
|
|
|
- if (Number(row.currentStlAmountRMB) > Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
|
|
|
- row.currentStlAmountRMB = 0
|
|
|
- return this.$message.error("本次对账金额不能大于未对账金额");
|
|
|
+ if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) > 0) {
|
|
|
+ if (Number(row.currentStlAmountRMB) < 0) {
|
|
|
+ row.currentStlAmountRMB = 0
|
|
|
+ return this.$message.error("本次对账金额不能输入负数");
|
|
|
+ }
|
|
|
+ if (Number(row.currentStlAmountRMB) > Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
|
|
|
+ row.currentStlAmountRMB = 0
|
|
|
+ return this.$message.error("本次对账金额不能超过未对账金额");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) < 0) {
|
|
|
+ if (Number(row.currentStlAmountRMB) >= 0) {
|
|
|
+ row.currentStlAmountRMB = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)
|
|
|
+ return this.$message.error("本次对账金额不能输入非负数");
|
|
|
+ }
|
|
|
+ if (Number(row.currentStlAmountRMB) < Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
|
|
|
+ row.currentStlAmountRMB = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)
|
|
|
+ return this.$message.error("本次对账金额不能超过未对账金额");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (row.dc == 'D') {
|
|
|
- if (Number(row.currentStlAmountRMB) > Number(row.amount - row.stlTtlAmount)) {
|
|
|
- row.currentStlAmountRMB = 0
|
|
|
- return this.$message.error("本次对账金额不能大于未对账金额");
|
|
|
+ if (Number(row.amount - row.stlTtlAmount) > 0) {
|
|
|
+ if (Number(row.currentStlAmountRMB) < 0) {
|
|
|
+ row.currentStlAmountRMB = 0
|
|
|
+ return this.$message.error("本次对账金额不能输入负数");
|
|
|
+ }
|
|
|
+ if (Number(row.currentStlAmountRMB) > Number(row.amount - row.stlTtlAmount)) {
|
|
|
+ row.currentStlAmountRMB = 0
|
|
|
+ return this.$message.error("本次对账金额不能超过未对账金额");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (Number(row.amount - row.stlTtlAmount) < 0) {
|
|
|
+ if (Number(row.currentStlAmountRMB) >= 0) {
|
|
|
+ row.currentStlAmountRMB = Number(row.amount - row.stlTtlAmount)
|
|
|
+ return this.$message.error("本次对账金额不能输入非负数");
|
|
|
+ }
|
|
|
+ if (Number(row.currentStlAmountRMB) < Number(row.amount - row.stlTtlAmount)) {
|
|
|
+ row.currentStlAmountRMB = Number(row.amount - row.stlTtlAmount)
|
|
|
+ return this.$message.error("本次对账金额不能超过未对账金额");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
ausdChange(row) {
|
|
|
if (row.dc == 'C') {
|
|
|
- if (Number(row.currentStlAmountUSD) > Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
|
|
|
- row.currentStlAmountUSD = 0
|
|
|
- return this.$message.error("本次对账金额不能大于未对账金额");
|
|
|
+ if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) > 0) {
|
|
|
+ if (Number(row.currentStlAmountUSD) < 0) {
|
|
|
+ row.currentStlAmountUSD = 0
|
|
|
+ return this.$message.error("本次对账金额不能输入负数");
|
|
|
+ }
|
|
|
+ if (Number(row.currentStlAmountUSD) > Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
|
|
|
+ row.currentStlAmountUSD = 0
|
|
|
+ return this.$message.error("本次对账金额不能超过未对账金额");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount) < 0) {
|
|
|
+ if (Number(row.currentStlAmountUSD) >= 0) {
|
|
|
+ row.currentStlAmountUSD = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)
|
|
|
+ return this.$message.error("本次对账金额不能输入非负数");
|
|
|
+ }
|
|
|
+ if (Number(row.currentStlAmountUSD) < Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)) {
|
|
|
+ row.currentStlAmountUSD = Number(row.amount - row.appliedAmount - row.appliedAmountStl - row.stlTtlAmount)
|
|
|
+ return this.$message.error("本次对账金额不能超过未对账金额");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
if (row.dc == 'D') {
|
|
|
- if (Number(row.currentStlAmountUSD) > Number(row.amount - row.stlTtlAmount)) {
|
|
|
- row.currentStlAmountUSD = 0
|
|
|
- return this.$message.error("本次对账金额不能大于未对账金额");
|
|
|
+ if (Number(row.amount - row.stlTtlAmount) > 0) {
|
|
|
+ if (Number(row.currentStlAmountUSD) < 0) {
|
|
|
+ row.currentStlAmountUSD = 0
|
|
|
+ return this.$message.error("本次对账金额不能输入负数");
|
|
|
+ }
|
|
|
+ if (Number(row.currentStlAmountUSD) > Number(row.amount - row.stlTtlAmount)) {
|
|
|
+ row.currentStlAmountUSD = 0
|
|
|
+ return this.$message.error("本次对账金额不能超过未对账金额");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (Number(row.amount - row.stlTtlAmount) < 0) {
|
|
|
+ if (Number(row.currentStlAmountUSD) >= 0) {
|
|
|
+ row.currentStlAmountUSD = Number(row.amount - row.stlTtlAmount)
|
|
|
+ return this.$message.error("本次对账金额不能输入非负数");
|
|
|
+ }
|
|
|
+ if (Number(row.currentStlAmountUSD) < Number(row.amount - row.stlTtlAmount)) {
|
|
|
+ row.currentStlAmountUSD = Number(row.amount - row.stlTtlAmount)
|
|
|
+ return this.$message.error("本次对账金额不能超过未对账金额");
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
},
|