代码优化
This commit is contained in:
parent
2616fa245c
commit
fd7bafeea7
|
|
@ -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 || '',
|
||||
|
|
|
|||
Reference in New Issue