From 0c555e8473744d5f534fa7345c3128f8afb3333d Mon Sep 17 00:00:00 2001 From: qsh <> Date: Tue, 23 Jul 2024 16:02:04 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Finance/Commission/Comp/DialogPlan.vue | 65 +++++++++++++++++-- 1 file changed, 60 insertions(+), 5 deletions(-) diff --git a/src/views/Finance/Commission/Comp/DialogPlan.vue b/src/views/Finance/Commission/Comp/DialogPlan.vue index 0170378..5cdd0a5 100644 --- a/src/views/Finance/Commission/Comp/DialogPlan.vue +++ b/src/views/Finance/Commission/Comp/DialogPlan.vue @@ -27,6 +27,20 @@ + + +
+

阶梯结算说明:

+

若设置 0档、1000档、2000档

+

金额为1500,则未满1000的部分按照0档结算提成,1000-1500的部分按照1000档结算

+
+
+

阶梯结算说明:

+

若设置 0档、1000档、2000档

+

金额为1500,则全部按照1000档结算

+
+
+ 添加提成档位 @@ -38,7 +52,12 @@ v-for="(item, index) in formData.rules" :key="index" > - + - +
- + { + opts.value = { + percentage_param1: [], + percentage_param2: [], + percentage_param4: [], + percentage_param5: [] + } formData.value = { percentageName: undefined, - percentageType: 1, + percentageType: 2, rules: [ { ruleParam1: '2', @@ -306,6 +343,24 @@ const submitForm = async () => { function handleRemove(index) { formData.value.rules.splice(index, 1) } + +function planChanged(paramName, editble = true) { + const defaultRule = formData.value.rules[0] + formData.value.rules.forEach((it, index) => { + if (formData.value.percentageType == 2) { + if (!editble) { + it[paramName] = defaultRule[paramName] + } + } else { + if (index > 0) { + it[paramName] = defaultRule[paramName] + } + if (paramName == 'ruleParam2') { + it['ruleParam5'] = defaultRule[paramName] + } + } + }) +}