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