代码优化

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 {
// 1.
this.tableData.map((e, v) => {
console.log(e)
this.$message.closeAll()
if (!e.endTime) {
this.$message.error('请选择终结日期!')
@ -262,6 +263,13 @@ export default {
isNum = true
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
@ -271,6 +279,7 @@ export default {
this.tableData.map((e) => {
const item = {
agreementId: e.agreementId, // id
id: e.id,
typeId: e.typeId, // id
trimDay: e.trimDay, //
maId: e.maId || '',