|
@@ -0,0 +1,341 @@
|
|
|
|
+<template>
|
|
|
|
+ <div class="app-container organization-index">
|
|
|
|
+ <div class="title-container">
|
|
|
|
+ <breadcrumb id="breadcrumb-container" class="breadcrumb-container" />
|
|
|
|
+ </div>
|
|
|
|
+ <el-form ref="postForm" class="form-container postInfo-container" style="position: relative;margin-top: 30px">
|
|
|
|
+ <el-tabs v-model="activeName" @tab-click="handleClick" type="border-card">
|
|
|
|
+ <el-tab-pane label="业务分类提成比例(评估人员)" name="evaluator">
|
|
|
|
+ <y-page-list-layout :get-page-list="businessCateMarketerRatioList" :page-list="marketerRatioRecord"
|
|
|
|
+ :page-para="listQuery1">
|
|
|
|
+ <template slot="left">
|
|
|
|
+ <el-button size="mini" type="primary" round icon="el-icon-circle-plus-outline"
|
|
|
|
+ style="float: left;" @click="openCommissionRateFormDig('EVALUATOR')">新增</el-button>
|
|
|
|
+ <el-select v-model="listQuery1.businessCateId" placeholder="业务分类" clearable filterable
|
|
|
|
+ style="margin-left: 20px;width: 500px;float: left;" class="filter-item"
|
|
|
|
+ @change="businessCateMarketerRatioList">
|
|
|
|
+ <el-option v-for="item in cateList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
|
+ </el-select>
|
|
|
|
+ </template>
|
|
|
|
+ <el-table size="medium" slot="table" row-key="id" :data="marketerRatioRecord.records" fit
|
|
|
|
+ highlight-current-row :header-row-style="{ color: '#333333' }"
|
|
|
|
+ style="border-left: 1px solid #EBECED;border-right: 1px solid #EBECED;color: #333333;">
|
|
|
|
+ <el-table-column label="业务类别" width="800" align="center">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <span>{{ row.businessCateName }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="最小提成比例(%)" align="center">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <span>
|
|
|
|
+ {{ row.minRatio }}
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="最大提成比例(%)" align="center">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <span>
|
|
|
|
+ {{ row.maxRatio }}
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="提成下限(元)" align="center">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <span>
|
|
|
|
+ {{ row.lowLimitAmount }}
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <el-button type="success" round @click="edit(row)">编辑</el-button>
|
|
|
|
+ <el-button type="danger" round @click="remove(row.id)">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </y-page-list-layout>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ <el-tab-pane label="业务分类提成比例(客户经理)" name="manager">
|
|
|
|
+ <y-page-list-layout :get-page-list="businessCatekeEvaluatorRatioList" :page-list="evaluatorRatioRecord"
|
|
|
|
+ :page-para="listQuery2">
|
|
|
|
+ <template slot="left">
|
|
|
|
+ <el-button size="mini" type="primary" round icon="el-icon-circle-plus-outline"
|
|
|
|
+ style="float: left;" @click="openCommissionRateFormDig('MANAGER')">新增</el-button>
|
|
|
|
+ <el-select v-model="listQuery2.businessCateId" placeholder="业务分类" clearable filterable
|
|
|
|
+ style="margin-left: 20px;width: 500px;float: left;" class="filter-item"
|
|
|
|
+ @change="businessCatekeEvaluatorRatioList">
|
|
|
|
+ <el-option v-for="item in cateList" :key="item.id" :label="item.name" :value="item.id" />
|
|
|
|
+ </el-select>
|
|
|
|
+ </template>
|
|
|
|
+ <el-table size="medium" slot="table" row-key="id" :data="evaluatorRatioRecord.records" fit
|
|
|
|
+ highlight-current-row :header-row-style="{ color: '#333333' }"
|
|
|
|
+ style="border-left: 1px solid #EBECED;border-right: 1px solid #EBECED;color: #333333;">
|
|
|
|
+ <el-table-column label="业务分类" width="800" align="center">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <span>{{ row.businessCateName }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="提成比例(%)" align="center">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <span>
|
|
|
|
+ {{ row.minRatio }}
|
|
|
|
+ </span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column label="操作" align="center" width="200" class-name="small-padding fixed-width">
|
|
|
|
+ <template slot-scope="{row}">
|
|
|
|
+ <el-button type="success" round @click="edit(row)">编辑</el-button>
|
|
|
|
+ <el-button type="danger" round @click="remove(row.id)">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ </y-page-list-layout>
|
|
|
|
+ </el-tab-pane>
|
|
|
|
+ </el-tabs>
|
|
|
|
+ </el-form>
|
|
|
|
+ <el-dialog :visible.sync="commissionRateFormDialog" width="35%" center custom-class="doWarehouseClass"
|
|
|
|
+ @closed="clean">
|
|
|
|
+ <el-divider content-position="left">
|
|
|
|
+ <span style="color:red;font-weight: bold;">
|
|
|
|
+ 【{{ commissionRateForm.userType === 'EVALUATOR' ? '客户经理' : '评估人员' }}】
|
|
|
|
+ </span>资产业务分类比例设置</el-divider>
|
|
|
|
+ <el-form :model="commissionRateForm" ref="commissionRateForm" :rules="rules">
|
|
|
|
+ <el-form-item label="业务分类:" prop="businessCateId" label-width="180px" class="postInfo-container-item">
|
|
|
|
+ <el-select v-model="commissionRateForm.businessCateId" placeholder="请选择业务分类" style="width: 100%;"
|
|
|
|
+ clearable filterable>
|
|
|
|
+ <el-option v-for="(cate, id) in cateList" :label="cate.name" :value="cate.id"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item label="最小提成比例:" prop="minRatio" label-width="180px" class="postInfo-container-item">
|
|
|
|
+ <span slot="label">最小提成比例
|
|
|
|
+ <el-tooltip class="item" effect="dark" content="(提成比例可以0,表示不提成;50表示提成50%)" placement="top-start">
|
|
|
|
+ <i class="el-icon-question" /></el-tooltip>
|
|
|
|
+ :
|
|
|
|
+ </span>
|
|
|
|
+ <el-input-number v-model="commissionRateForm.minRatio" :step="1" :max="100"
|
|
|
|
+ style="width: 100%;"></el-input-number>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item v-show="commissionRateForm.userType === 'EVALUATOR'" label="最大提成比例:" prop="maxRatio" label-width="180px" class="postInfo-container-item">
|
|
|
|
+ <span slot="label">最大提成比例
|
|
|
|
+ <el-tooltip class="item" effect="dark" content="(提成比例可以0,表示不提成;50表示提成50%)" placement="top-start">
|
|
|
|
+ <i class="el-icon-question" /></el-tooltip>
|
|
|
|
+ :
|
|
|
|
+ </span>
|
|
|
|
+ <el-input-number v-model="commissionRateForm.maxRatio" :step="1" :max="100"
|
|
|
|
+ style="width: 100%;"></el-input-number>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item v-show="commissionRateForm.userType === 'EVALUATOR'" label="提成下限:" prop="lowLimitAmount"
|
|
|
|
+ label-width="180px" class="postInfo-container-item">
|
|
|
|
+ <span slot="label">提成下限
|
|
|
|
+ <el-tooltip class="item" effect="dark" content="(指此类型业务收费金额低于此值时,则按此值计算,当提成下限金额设置为0时,表示以实际收费金额计算)"
|
|
|
|
+ placement="top-start">
|
|
|
|
+ <i class="el-icon-question" /></el-tooltip>
|
|
|
|
+ :
|
|
|
|
+ </span>
|
|
|
|
+ <el-input-number v-model="commissionRateForm.lowLimitAmount" :step="1"
|
|
|
|
+ style="width: 100%;"></el-input-number>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item>
|
|
|
|
+ <el-button type="primary" @click="save('ruleForm')" style="margin-left: 40%;">保存</el-button>
|
|
|
|
+ <el-button @click="commissionRateFormDialog = false">取消</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ </div>
|
|
|
|
+</template>
|
|
|
|
+<script>
|
|
|
|
+import Breadcrumb from '@/components/Breadcrumb'
|
|
|
|
+import YPageListLayout from '@/components/YPageListLayout'
|
|
|
|
+
|
|
|
|
+export default {
|
|
|
|
+ name: 'commissionAssets',
|
|
|
|
+ components: {
|
|
|
|
+ Breadcrumb,
|
|
|
|
+ YPageListLayout
|
|
|
|
+ },
|
|
|
|
+ filters: {
|
|
|
|
+ statusFilter(status) {
|
|
|
|
+ const statusMap = {
|
|
|
|
+ published: 'success',
|
|
|
|
+ draft: 'info',
|
|
|
|
+ deleted: 'danger'
|
|
|
|
+ };
|
|
|
|
+ return statusMap[status]
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ data() {
|
|
|
|
+ return {
|
|
|
|
+ activeName: 'evaluator',
|
|
|
|
+ rules: {
|
|
|
|
+ businessCateId: [{
|
|
|
|
+ required: true,
|
|
|
|
+ message: '业务分类不能为空',
|
|
|
|
+ trigger: 'blur'
|
|
|
|
+ }]
|
|
|
|
+ },
|
|
|
|
+ commissionRateFormDialog: false,
|
|
|
|
+ listQuery1: {
|
|
|
|
+ page: 1,
|
|
|
|
+ size: 10,
|
|
|
|
+ descs: 'id',
|
|
|
|
+ businessType: 'ASSET_BUSINESS',
|
|
|
|
+ userType: 'EVALUATOR'
|
|
|
|
+ },
|
|
|
|
+ listQuery2: {
|
|
|
|
+ page: 1,
|
|
|
|
+ size: 10,
|
|
|
|
+ descs: 'id',
|
|
|
|
+ businessType: 'ASSET_BUSINESS',
|
|
|
|
+ userType: 'MANAGER'
|
|
|
|
+ },
|
|
|
|
+ marketerRatioRecord: {
|
|
|
|
+ records: []
|
|
|
|
+ },
|
|
|
|
+ evaluatorRatioRecord: {
|
|
|
|
+ records: []
|
|
|
|
+ },
|
|
|
|
+ cateList: [],
|
|
|
|
+ commissionRateForm: {
|
|
|
|
+ id: null,
|
|
|
|
+ businessType: null,
|
|
|
|
+ userType: null,
|
|
|
|
+ businessCateId: null,
|
|
|
|
+ minRatio: null,
|
|
|
|
+ maxRatio: null,
|
|
|
|
+ lowLimitAmount: null,
|
|
|
|
+ topLimitAmount: null,
|
|
|
|
+ quarterRatio: null
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ created() {
|
|
|
|
+ this.getBusinessCateList();
|
|
|
|
+ this.businessCateMarketerRatioList();
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+
|
|
|
|
+ handleClick(tab, event) {
|
|
|
|
+ if (tab.name === 'manager') {
|
|
|
|
+ this.businessCateMarketerRatioList();
|
|
|
|
+ } else if (tab.name === 'evaluator') {
|
|
|
|
+ this.businessCatekeEvaluatorRatioList();
|
|
|
|
+ } else if (tab.label === '岗位抽成率') {
|
|
|
|
+ //this.getPostRatio();
|
|
|
|
+ } else {
|
|
|
|
+ //this.getMarketerRatioList();
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ getBusinessCateList() {
|
|
|
|
+ this.$api.dictData.simpleType("资产业务子类").then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.cateList = res.data;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ businessCateMarketerRatioList() {
|
|
|
|
+ this.$api.businessCommissionRate.list(this.listQuery1).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.marketerRatioRecord = res.data;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ businessCatekeEvaluatorRatioList() {
|
|
|
|
+ this.$api.businessCommissionRate.list(this.listQuery2).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.evaluatorRatioRecord = res.data;
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ openCommissionRateFormDig(userType) {
|
|
|
|
+ this.commissionRateForm.businessType = 'ASSET_BUSINESS';
|
|
|
|
+ this.commissionRateForm.userType = userType;
|
|
|
|
+ this.commissionRateFormDialog = true;
|
|
|
|
+ this.getBusinessCateList();
|
|
|
|
+ },
|
|
|
|
+ edit(row) {
|
|
|
|
+ this.commissionRateForm = row;
|
|
|
|
+ this.commissionRateFormDialog = true;
|
|
|
|
+ },
|
|
|
|
+ remove(id) {
|
|
|
|
+ this.$confirm('请确认是否删除此提成比例?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ center: true
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.$api.businessCommissionRate.delete(id).then(res => {
|
|
|
|
+ if (res.code === 200 && res.data) {
|
|
|
|
+ this.$notify({
|
|
|
|
+ title: '成功',
|
|
|
|
+ message: '业务分类提成比例删除成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ this.businessCateMarketerRatioList();
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ save() {
|
|
|
|
+ this.$refs.commissionRateForm.validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ if (this.commissionRateForm.id) {
|
|
|
|
+ this.$api.businessCommissionRate.edit(this.commissionRateForm).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$notify({
|
|
|
|
+ title: '成功',
|
|
|
|
+ message: '业务分类提成比例修改成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ this.commissionRateFormDialog = false;
|
|
|
|
+ if (this.commissionRateForm.userType === 'EVALUATOR') {
|
|
|
|
+ this.businessCateMarketerRatioList();
|
|
|
|
+ } else {
|
|
|
|
+ this.businessCatekeEvaluatorRatioList();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.$api.businessCommissionRate.add(this.commissionRateForm).then(res => {
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ this.$notify({
|
|
|
|
+ title: '成功',
|
|
|
|
+ message: '业务分类提成比例保存成功',
|
|
|
|
+ type: 'success',
|
|
|
|
+ duration: 2000
|
|
|
|
+ });
|
|
|
|
+ this.commissionRateFormDialog = false;
|
|
|
|
+ if (this.commissionRateForm.userType === 'EVALUATOR') {
|
|
|
|
+ this.businessCateMarketerRatioList();
|
|
|
|
+ } else {
|
|
|
|
+ this.businessCatekeEvaluatorRatioList();
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ clean() {
|
|
|
|
+ this.commissionRateForm.id = null;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+<style lang="scss">
|
|
|
|
+.organization-index {
|
|
|
|
+ .el-table [class*=el-table__row--level] .el-table__expand-icon {
|
|
|
|
+ color: red;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</style>
|
|
|
|
+<style scoped lang="scss">
|
|
|
|
+/deep/.doWarehouseClass {
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+}
|
|
|
|
+</style>
|
|
|
|
+
|