From 0507a412d4c5f7aa2c3a4f6ac60ed083b5fec4dc Mon Sep 17 00:00:00 2001 From: tx <2622874537@qq.com> Date: Tue, 3 Dec 2024 10:22:28 +0800 Subject: [PATCH] 111 --- src/views/system/fee/index.vue | 48 ++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 17 deletions(-) diff --git a/src/views/system/fee/index.vue b/src/views/system/fee/index.vue index c7a69b9..957f0d2 100644 --- a/src/views/system/fee/index.vue +++ b/src/views/system/fee/index.vue @@ -237,7 +237,11 @@ ~ - + {{ timeUnit }} 之间, @@ -356,23 +360,23 @@ export default { 'form.deptId': function(deptId) { this.getAreaListByDeptId(deptId); }, - 'rule': { - handler(newVal) { - newVal.forEach((interval, index) => { - // 跳过第一条,从第二条开始更新 - if (index > 0) { - interval.start = newVal[index - 1].end || ''; // 动态更新 start - } - }); + // 'rule': { + // handler(newVal) { + // newVal.forEach((interval, index) => { + // // 跳过第一条,从第二条开始更新 + // if (index > 0) { + // interval.start = newVal[index - 1].end || ''; // 动态更新 start + // } + // }); - // 更新 more.start 的值为新数组最后一条的 end 值 - if (newVal.length > 0) { - this.more.start = newVal[newVal.length - 1].end || ''; // 设置 more.start - } - }, - deep: true, // 深度监听 - immediate: true // 初始化立即执行 - } + // // 更新 more.start 的值为新数组最后一条的 end 值 + // if (newVal.length > 0) { + // this.more.start = newVal[newVal.length - 1].end || ''; // 设置 more.start + // } + // }, + // deep: true, // 深度监听 + // immediate: true // 初始化立即执行 + // } }, props: { // 用户id @@ -738,6 +742,16 @@ export default { this.title = "修改收费方式"; }); }, + handleIntervalEndChange(index) { + // 更新下一个区间的开始值 + if (index < this.rule.length - 1) { + this.rule[index + 1].start = this.rule[index].end; + } + // 更新 more.start 的值 + if (index === this.rule.length - 1) { + this.more.start = this.rule[index].end; + } + }, submitForm() { if(!this.validateRules()){ return