代码优化

This commit is contained in:
BianLzhaoMin 2024-08-16 15:53:26 +08:00
parent 2616fa245c
commit fd7bafeea7
1 changed files with 9 additions and 0 deletions

View File

@ -247,6 +247,7 @@ export default {
try { try {
// 1. // 1.
this.tableData.map((e, v) => { this.tableData.map((e, v) => {
console.log(e)
this.$message.closeAll() this.$message.closeAll()
if (!e.endTime) { if (!e.endTime) {
this.$message.error('请选择终结日期!') this.$message.error('请选择终结日期!')
@ -262,6 +263,13 @@ export default {
isNum = true isNum = true
throw new Error() throw new Error()
} }
if (e.trimDay < 0 && Math.abs(e.trimDay) > e.leaseDays) {
this.$message.error('减免天数不能大于应结算天数!')
this.activeIndex = v
this.$refs[`editIpt_${v}`][0].focus()
isNum = true
throw new Error()
}
}) })
if (isNum) return if (isNum) return
@ -271,6 +279,7 @@ export default {
this.tableData.map((e) => { this.tableData.map((e) => {
const item = { const item = {
agreementId: e.agreementId, // id agreementId: e.agreementId, // id
id: e.id,
typeId: e.typeId, // id typeId: e.typeId, // id
trimDay: e.trimDay, // trimDay: e.trimDay, //
maId: e.maId || '', maId: e.maId || '',