390 lines
10 KiB
Vue
390 lines
10 KiB
Vue
<template>
|
|
<div class="page">
|
|
<topBar
|
|
v-if="topList.length > 0"
|
|
:top-list="topList"
|
|
:moren="moren"
|
|
/>
|
|
<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"
|
|
:label="'等级'"
|
|
/>
|
|
<el-table-column
|
|
align="center"
|
|
prop="expandRatio"
|
|
:label="'拓展比例'+'(%)'"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-input
|
|
v-model="scope.row.expandRatio"
|
|
clearable
|
|
:disabled="ifupdate"
|
|
/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
align="center"
|
|
prop="expandCapping"
|
|
:label="`${'拓展封顶'}`+`(${isLocals()})`"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-input
|
|
v-model="scope.row.expandCapping"
|
|
clearable
|
|
:disabled="ifupdate"
|
|
/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
align="center"
|
|
prop="repurchaseRatio"
|
|
label="复购拓展比例(%)"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-input
|
|
v-model="scope.row.repurchaseRatio"
|
|
clearable
|
|
:disabled="ifupdate"
|
|
/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
align="center"
|
|
prop="repurchaseCapping"
|
|
label="复购拓展封顶($)"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-input
|
|
v-model="scope.row.repurchaseCapping"
|
|
clearable
|
|
:disabled="ifupdate"
|
|
/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
align="center"
|
|
prop="firstCalculate"
|
|
label="首购计算"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-select
|
|
v-model="scope.row.firstCalculate"
|
|
clearable
|
|
:disabled="ifupdate"
|
|
>
|
|
<el-option
|
|
v-for="item in yesNoList"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"
|
|
/>
|
|
</el-select>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
align="center"
|
|
prop="firstAssess"
|
|
label="首购考核"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-select
|
|
v-model="scope.row.firstAssess"
|
|
clearable
|
|
:disabled="ifupdate"
|
|
>
|
|
<el-option
|
|
v-for="item in ssessmentTypeList"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"
|
|
/>
|
|
</el-select>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
align="center"
|
|
prop="repurchaseCalculate"
|
|
label="复购计算"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-select
|
|
v-model="scope.row.repurchaseCalculate"
|
|
clearable
|
|
:disabled="ifupdate"
|
|
>
|
|
<el-option
|
|
v-for="item in yesNoList"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"
|
|
/>
|
|
</el-select>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
align="center"
|
|
prop="repurchaseAssess"
|
|
label="复购考核"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-select
|
|
v-model="scope.row.repurchaseAssess"
|
|
clearable
|
|
:disabled="ifupdate"
|
|
>
|
|
<el-option
|
|
v-for="item in ssessmentTypeList"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"
|
|
/>
|
|
</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"
|
|
:label="'4-N配置'"
|
|
/>
|
|
<el-table-column
|
|
align="center"
|
|
prop="expandNumber"
|
|
:label="'拓展次数(次)'"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-input
|
|
v-model="scope.row.expandNumber"
|
|
clearable
|
|
:disabled="ifupdate"
|
|
/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column
|
|
align="center"
|
|
prop="expandRatio"
|
|
:label="'拓展比例'+'(%)'"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-input
|
|
v-model="scope.row.expandRatio"
|
|
clearable
|
|
:disabled="ifupdate"
|
|
/>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column align="center" prop="" label="" />
|
|
<el-table-column align="center" prop="" label="" />
|
|
</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"
|
|
:label="'封顶方式'"
|
|
>
|
|
<template slot-scope="scope">
|
|
<el-select
|
|
v-model="scope.row.value"
|
|
clearable
|
|
:placeholder="'请选择'"
|
|
:disabled="ifupdate"
|
|
>
|
|
<el-option
|
|
v-for="item in fdWayList"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"
|
|
/>
|
|
</el-select>
|
|
</template>
|
|
</el-table-column>
|
|
<el-table-column align="center" prop="" label="" />
|
|
|
|
<el-table-column align="center" prop="" label="" />
|
|
<el-table-column align="center" prop="" label="" />
|
|
<el-table-column align="center" prop="" label="" />
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
<div style="margin: 0 auto">
|
|
<el-button
|
|
class="thebtn btn1"
|
|
@click="ifupdate = false"
|
|
> {{ '修改' }}</el-button>
|
|
<el-button class="thebtn btn2" @click="savedate">{{ '保存' }}</el-button>
|
|
</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'
|
|
import { mixin } from './mixins'
|
|
export default {
|
|
name: 'Kzpz',
|
|
components: {
|
|
topBar
|
|
},
|
|
mixins: [mixin],
|
|
data() {
|
|
return {
|
|
moren: 'kzpz',
|
|
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>
|