Commit 6bcd6292 authored by pengyunqian's avatar pengyunqian

update:佣金百分号

parent 69a54967
...@@ -70,12 +70,26 @@ ...@@ -70,12 +70,26 @@
prop="first_commission_value" prop="first_commission_value"
label="一级分销金额" label="一级分销金额"
> >
<template #default="scope">
<span>
{{ scope.row.first_commission_value + "%" }}
</span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
align="center" align="center"
prop="second_commission_value" prop="second_commission_value"
label="二级分销金额" label="二级分销金额"
> >
<template #default="scope">
<span>
{{
scope.row.second_commission_value
? scope.row.second_commission_value + "%"
: "0%"
}}
</span>
</template>
</el-table-column> </el-table-column>
<el-table-column align="center" prop="online_status" label="状态"> <el-table-column align="center" prop="online_status" label="状态">
<template #default="scope"> <template #default="scope">
...@@ -186,7 +200,7 @@ ...@@ -186,7 +200,7 @@
<el-form-item label="一级佣金:" prop="first_commission_value"> <el-form-item label="一级佣金:" prop="first_commission_value">
<el-input <el-input
v-model="ruleForm.first_commission_value" v-model="ruleForm.first_commission_value"
@input="changeValue($event,'first_commission_value')" @input="changeValue($event, 'first_commission_value')"
:disabled="shopStart !== 0" :disabled="shopStart !== 0"
> >
<template #append>%</template> <template #append>%</template>
...@@ -195,7 +209,7 @@ ...@@ -195,7 +209,7 @@
<el-form-item label="二级佣金: " prop="second_commission_value"> <el-form-item label="二级佣金: " prop="second_commission_value">
<el-input <el-input
v-model="ruleForm.second_commission_value" v-model="ruleForm.second_commission_value"
@input="changeValue($event,'second_commission_value')" @input="changeValue($event, 'second_commission_value')"
:disabled="shopStart !== 0" :disabled="shopStart !== 0"
> >
<template #append>%</template> <template #append>%</template>
...@@ -301,7 +315,9 @@ ...@@ -301,7 +315,9 @@
<!-- {{ <!-- {{
shopStart == 0 ? "返回" : "返回" shopStart == 0 ? "返回" : "返回"
}} --> }} -->
<el-button type="primary" @click="cancel" style="width: 150px">返回</el-button> <el-button type="primary" @click="cancel" style="width: 150px"
>返回</el-button
>
</span> </span>
</template> </template>
</el-dialog> </el-dialog>
...@@ -416,8 +432,10 @@ export default { ...@@ -416,8 +432,10 @@ export default {
}; };
}, },
methods: { methods: {
changeValue(value,level){ changeValue(value, level) {
value && value.indexOf('.')!==value.length-1 &&(this.ruleForm[level] = parseFloat(value)) value &&
value.indexOf(".") !== value.length - 1 &&
(this.ruleForm[level] = parseFloat(value));
}, },
// 查看详情列表 // 查看详情列表
async handleClick(row) { async handleClick(row) {
...@@ -594,8 +612,8 @@ export default { ...@@ -594,8 +612,8 @@ export default {
let addParams = { let addParams = {
goods_sku_id, goods_sku_id,
marketing_name, marketing_name,
first_commission_value, first_commission_value: first_commission_value + "",
second_commission_value, second_commission_value: second_commission_value + "",
start_time: this.formatTime(start_time), start_time: this.formatTime(start_time),
end_time: this.formatTime(end_time), end_time: this.formatTime(end_time),
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment