web-zk-admin/src/views/configManage/bonus/kzpz.vue

429 lines
11 KiB
Vue
Raw Normal View History

2025-03-23 10:03:12 +08:00
<template>
<div class="page">
<topBar
v-if="topList.length > 0"
:topList="topList"
:moren="moren"
></topBar>
<div class="main">
<div class="maintable">
<el-table
:data="tableData"
height="400px"
style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }"
:row-class-name="tableRowClassName"
>
<el-table-column
width="200px"
align="center"
prop="gradeName"
2025-05-26 10:41:35 +08:00
:label="'等级'"
2025-03-23 10:03:12 +08:00
>
</el-table-column>
<el-table-column
align="center"
prop="expandRatio"
2025-05-26 10:41:35 +08:00
:label="'拓展比例'+'(%)'"
2025-03-23 10:03:12 +08:00
>
<template slot-scope="scope">
<el-input
clearable
:disabled="ifupdate"
v-model="scope.row.expandRatio"
></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
prop="expandCapping"
2025-05-26 10:41:35 +08:00
:label="`${'拓展封顶'}`+`(${isLocals()})`"
2025-03-23 10:03:12 +08:00
>
<template slot-scope="scope">
<el-input
clearable
:disabled="ifupdate"
v-model="scope.row.expandCapping"
></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
prop="repurchaseRatio"
label="复购拓展比例(%)"
>
<template slot-scope="scope">
<el-input
clearable
:disabled="ifupdate"
v-model="scope.row.repurchaseRatio"
></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
prop="repurchaseCapping"
label="复购拓展封顶($)"
>
<template slot-scope="scope">
<el-input
clearable
:disabled="ifupdate"
v-model="scope.row.repurchaseCapping"
></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
prop="firstCalculate"
label="首购计算"
>
<template slot-scope="scope">
<el-select
clearable
:disabled="ifupdate"
v-model="scope.row.firstCalculate"
>
<el-option
v-for="item in yesNoList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
align="center"
prop="firstAssess"
label="首购考核"
>
<template slot-scope="scope">
<el-select
clearable
:disabled="ifupdate"
v-model="scope.row.firstAssess"
>
<el-option
v-for="item in ssessmentTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
align="center"
prop="repurchaseCalculate"
label="复购计算"
>
<template slot-scope="scope">
<el-select
clearable
:disabled="ifupdate"
v-model="scope.row.repurchaseCalculate"
>
<el-option
v-for="item in yesNoList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
align="center"
prop="repurchaseAssess"
label="复购考核"
>
<template slot-scope="scope">
<el-select
clearable
:disabled="ifupdate"
v-model="scope.row.repurchaseAssess"
>
<el-option
v-for="item in ssessmentTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</template>
</el-table-column>
</el-table>
</div>
<div class="maintable2">
<el-table
:data="tableData2"
style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }"
:row-class-name="tableRowClassName"
>
<el-table-column
width="200px"
align="center"
prop="expandName"
2025-05-26 10:41:35 +08:00
:label="'4-N配置'"
2025-03-23 10:03:12 +08:00
>
</el-table-column>
<el-table-column
align="center"
prop="expandNumber"
2025-05-26 10:41:35 +08:00
:label="'拓展次数(次)'"
2025-03-23 10:03:12 +08:00
>
<template slot-scope="scope">
<el-input
clearable
:disabled="ifupdate"
v-model="scope.row.expandNumber"
></el-input>
</template>
</el-table-column>
<el-table-column
align="center"
prop="expandRatio"
2025-05-26 10:41:35 +08:00
:label="'拓展比例'+'(%)'"
2025-03-23 10:03:12 +08:00
>
<template slot-scope="scope">
<el-input
clearable
:disabled="ifupdate"
v-model="scope.row.expandRatio"
></el-input>
</template>
</el-table-column>
<el-table-column align="center" prop="" label=""> </el-table-column>
<el-table-column align="center" prop="" label=""> </el-table-column>
</el-table>
<el-table
:data="tableData3"
style="width: 100%"
:header-cell-style="{ background: '#EEEEEE' }"
:row-class-name="tableRowClassName"
>
<el-table-column
width="200px"
align="center"
prop="expandName"
2025-05-26 10:41:35 +08:00
:label="'封顶方式'"
2025-03-23 10:03:12 +08:00
>
<template slot-scope="scope">
<el-select
clearable
v-model="scope.row.value"
2025-05-26 10:41:35 +08:00
:placeholder="'请选择'"
2025-03-23 10:03:12 +08:00
:disabled="ifupdate"
>
<el-option
v-for="item in fdWayList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</template>
</el-table-column>
<el-table-column align="center" prop="" label=""> </el-table-column>
<el-table-column align="center" prop="" label=""> </el-table-column>
<el-table-column align="center" prop="" label=""> </el-table-column>
<el-table-column align="center" prop="" label=""> </el-table-column>
</el-table>
</div>
</div>
<div class="footer">
<div style="margin: 0 auto">
<el-button class="thebtn btn1" @click="ifupdate = false"
2025-05-26 10:41:35 +08:00
> {{ '修改' }}</el-button
2025-03-23 10:03:12 +08:00
>
2025-05-26 10:41:35 +08:00
<el-button class="thebtn btn2" @click="savedate">{{'保存'}}</el-button>
2025-03-23 10:03:12 +08:00
</div>
</div>
</div>
</template>
<script>
import topBar from "@/components/topBar";
import {getDealerYesNo} from "@/api/delivery"
import { getExpandList, updateExpand, getbdBonusExpand,getAssessmentType } from "@/api/bonus";
import {getzccsList} from '@/api/siteConfig'
import {saveYfpz} from '@/api/system'
import {isLocals} from "@/utils/numberToCurrency";
export default {
name: "Kzpz",
components: {
topBar,
},
data() {
return {
moren: "kzpz",
topList: [
{
2025-06-08 15:32:44 +08:00
name: '奖项配置',
2025-03-23 10:03:12 +08:00
path: "bonus",
},
{
2025-06-08 15:32:44 +08:00
name: '直推配置',
2025-03-23 10:03:12 +08:00
path: "ztpz",
},
{
2025-06-08 15:32:44 +08:00
name: '拓展配置',
2025-03-23 10:03:12 +08:00
path: "kzpz",
},
{
2025-06-08 15:32:44 +08:00
name: '辅导分红',
2025-03-23 10:03:12 +08:00
path: "fdfh",
},
{
2025-06-08 15:32:44 +08:00
name: '服务补贴',
2025-03-23 10:03:12 +08:00
path: "fwbt",
},
{
2025-06-08 15:32:44 +08:00
name: '奖金扣项',
2025-03-23 10:03:12 +08:00
path: "jjkx",
},
{
2025-06-08 15:32:44 +08:00
name: '云代配置',
2025-03-23 10:03:12 +08:00
path: "ydpz",
},
{
2025-06-08 15:32:44 +08:00
name: '环球积分',
2025-03-23 10:03:12 +08:00
path: "hqjf",
},
{
2025-06-08 15:32:44 +08:00
name: '车奖积分',
2025-03-23 10:03:12 +08:00
path: "njjf",
},
],
tableData: [],
tableData2: [],
tableData3: [],
ifupdate: true,
fdWayList: [
{ value: '1', label: "日" },
{ value: '2', label: "周" },
],
ssessmentTypeList: [],
yesNoList:[]
};
},
created() {
this.getExpandList();
},
methods: {
isLocals,
//获取拓展等级列表
getExpandList() {
getExpandList().then((res) => {
this.tableData = res.rows;
});
getbdBonusExpand().then((res) => {
this.tableData2 = res.rows;
});
getzccsList({key:'EXPAND_CAP_METHOD1'}).then(res=>{
this.tableData3 = res.data
})
//考核类型下拉选
getAssessmentType().then((res) => {
this.ssessmentTypeList = res.data;
});
getDealerYesNo().then(res=>{
this.yesNoList = res.data
})
},
//保存
savedate() {
this.ifupdate = true;
updateExpand({
expandList: this.tableData,
bonusExpands: this.tableData2,
}).then((res) => {
if (res.code == 200) {
this.$message({
message: res.msg,
type: "success",
});
this.getExpandList();
}
});
saveYfpz(this.tableData3).then(res=>{
})
},
tableRowClassName({ row, rowIndex }) {
if (rowIndex % 2 == 1) {
return "warning-row";
} else if (rowIndex % 2 == 0) {
return "success-row";
}
return "";
},
},
};
</script>
<style lang="scss" scoped>
::v-deep .el-input.is-disabled .el-input__inner{
color: #333333;
}
::v-deep .el-table thead {
color: #000000;
}
::v-deep .el-table .warning-row {
background: #f9f9f9;
}
::v-deep .el-input__inner {
width: 160px !important;
}
::v-deep .el-table .success-row {
background: #ffffff;
}
.page {
padding: 20px 20px 36px 20px;
background: #f9f9f9;
font-size: 14px;
.main {
background: #ffffff;
box-shadow: 0px 2px 20px 0px rgba(238, 238, 238, 0.5);
border-radius: 8px;
.maintable {
max-height: 484px;
overflow: auto;
border-bottom: 4px solid #eeeeee;
}
.maintable2 {
max-height: 280px;
overflow: auto;
margin-top: 20px;
}
}
.footer {
display: flex;
margin-top: 20px;
.thebtn {
width: 120px;
height: 48px;
color: #ffffff;
font-size: 14px;
font-weight: bold;
}
.btn1 {
background: #4391fd;
margin-right: 80px;
}
.btn2 {
background: #ffad41;
}
}
}
</style>