|
@@ -0,0 +1,334 @@
|
|
|
+<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="first">
|
|
|
+ <y-page-list-layout :get-page-list="getMarketerRatioList" :page-list="marketerRatioRecord">
|
|
|
+ <el-table
|
|
|
+ size="medium"
|
|
|
+ slot="table"
|
|
|
+ row-key="id"
|
|
|
+ v-loading="listLoading"
|
|
|
+ :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="项目类型" min-width="150" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.itemCate }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="项目来源" min-width="150" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.itemSource }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="提成比例" min-width="30" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-input v-model="row.ratio" placeholder="请输入内容">
|
|
|
+ <i slot="suffix" style="font-size:normal;margin-right: 10px;line-height: 30px">%</i>
|
|
|
+ </el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" width="250" class-name="small-padding fixed-width">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-button
|
|
|
+ class-name="filter-item"
|
|
|
+ type="primary"
|
|
|
+ @click="updateRatio(row)"
|
|
|
+ round
|
|
|
+ >保存</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </y-page-list-layout>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="预提金额">
|
|
|
+ <y-page-list-layout :get-page-list="getBaseAmount" :page-list="baseAmount">
|
|
|
+ <el-table
|
|
|
+ size="medium"
|
|
|
+ slot="table"
|
|
|
+ row-key="id"
|
|
|
+ v-loading="listLoading"
|
|
|
+ :data="baseAmount.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="工号" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.staffNo }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="姓名" align="center">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span>{{ row.name }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="部门-岗位" align="center" width="360">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <span v-for="(item, index) in row.departmentPostVOList" :key="index">
|
|
|
+ <span v-if="index > 0">、</span>
|
|
|
+ {{ item.departmentName }}-{{ item.postName }}
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="默认提成金额" align="center" width="360">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-input v-model="row.baseAmount">
|
|
|
+ <i slot="suffix" style="font-size:normal;margin-right: 10px;line-height: 30px">¥</i>
|
|
|
+ </el-input>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="操作" align="center" width="100">
|
|
|
+ <template slot-scope="{row}">
|
|
|
+ <el-button
|
|
|
+ class-name="filter-item"
|
|
|
+ type="primary"
|
|
|
+ @click="updateBaseAmount(row)"
|
|
|
+ round
|
|
|
+ >保存</el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ </y-page-list-layout>
|
|
|
+ </el-tab-pane>
|
|
|
+ <el-tab-pane label="配置项">
|
|
|
+ <el-form ref="postForm" :model="globalConfigs" class="form-container">
|
|
|
+ <div class="createPost-main-container">
|
|
|
+ <div class="postInfo-container">
|
|
|
+ <div style="margin-bottom: 30px">
|
|
|
+ <h3 class="title">
|
|
|
+ <div class="avatar-wrapper icon-title">配</div>
|
|
|
+ <div class="icon-info">配置项</div>
|
|
|
+ </h3>
|
|
|
+ </div>
|
|
|
+ <el-row>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
|
+ <el-form-item
|
|
|
+ label="土规部市场人员提成比例:"
|
|
|
+ label-width="250px"
|
|
|
+ :rules="{required: true, message: '必填', trigger: 'blur'}"
|
|
|
+ class="postInfo-container-item"
|
|
|
+ >
|
|
|
+ <el-input v-model="globalConfigs.marketerBrokeragePercentage.value" class="filter-item" @blur="doSave(globalConfigs.marketerBrokeragePercentage)">
|
|
|
+ <i slot="suffix" style="font-size:normal;margin-right: 10px;line-height: 30px">%</i>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
|
+ <el-form-item
|
|
|
+ label="土规部参与项目整体提成比例:"
|
|
|
+ label-width="250px"
|
|
|
+ :rules="{required: true, message: '必填', trigger: 'blur'}"
|
|
|
+ class="postInfo-container-item"
|
|
|
+ >
|
|
|
+ <el-input v-model="globalConfigs.participantBrokeragePercentage.value" class="filter-item" @blur="doSave(globalConfigs.participantBrokeragePercentage)">
|
|
|
+ <i slot="suffix" style="font-size:normal;margin-right: 10px;line-height: 30px">%</i>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
|
+ <el-form-item
|
|
|
+ label="土规部非市场人员每月默认预提金额:"
|
|
|
+ label-width="300px"
|
|
|
+ :rules="{required: true, message: '必填', trigger: 'blur'}"
|
|
|
+ class="postInfo-container-item"
|
|
|
+ >
|
|
|
+ <el-input v-model="globalConfigs.nonMarketerMonthBrokerage.value" class="filter-item" @blur="doSave(globalConfigs.nonMarketerMonthBrokerage)">
|
|
|
+ <i slot="suffix" style="font-size:normal;margin-right: 10px;line-height: 30px">¥</i>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :lg="6" :span="6">
|
|
|
+ <el-form-item
|
|
|
+ label="系统自定义一年月份个数:"
|
|
|
+ label-width="250px"
|
|
|
+ :rules="{required: true, message: '必填', trigger: 'blur'}"
|
|
|
+ class="postInfo-container-item"
|
|
|
+ >
|
|
|
+ <el-input v-model="globalConfigs.monthOfYear.value" class="filter-item" @blur="doSave(globalConfigs.monthOfYear)">
|
|
|
+ <i slot="suffix" style="font-size:normal;margin-right: 10px;line-height: 30px">个</i>
|
|
|
+ </el-input>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-form>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </el-form>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+ import Breadcrumb from '@/components/Breadcrumb'
|
|
|
+ import PermissionButton from '@/components/PermissionButton/PermissionButton'
|
|
|
+ import YPageListLayout from '@/components/YPageListLayout'
|
|
|
+
|
|
|
+ export default {
|
|
|
+ name: 'rateEntry',
|
|
|
+ components: {
|
|
|
+ Breadcrumb,
|
|
|
+ YPageListLayout
|
|
|
+ },
|
|
|
+ filters: {
|
|
|
+ statusFilter(status) {
|
|
|
+ const statusMap = {
|
|
|
+ published: 'success',
|
|
|
+ draft: 'info',
|
|
|
+ deleted: 'danger'
|
|
|
+ };
|
|
|
+ return statusMap[status]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ activeName: 'first',
|
|
|
+ postForm:{},
|
|
|
+ marketerRatioRecord: {},
|
|
|
+ baseAmount:{},
|
|
|
+ itemPageData: {},
|
|
|
+ globalConfigs:{
|
|
|
+ marketerBrokeragePercentage:{
|
|
|
+ id:null,
|
|
|
+ value:null
|
|
|
+ },
|
|
|
+ participantBrokeragePercentage:{
|
|
|
+ id:null,
|
|
|
+ value:null
|
|
|
+ },
|
|
|
+ nonMarketerMonthBrokerage:{
|
|
|
+ id:null,
|
|
|
+ value:null
|
|
|
+ },
|
|
|
+ monthOfYear:{
|
|
|
+ id:null,
|
|
|
+ value:null
|
|
|
+ },
|
|
|
+ },
|
|
|
+ listLoading: false,
|
|
|
+ listQuery: {
|
|
|
+ current: 1,
|
|
|
+ size: 10,
|
|
|
+ descs: 'id',
|
|
|
+ me: false
|
|
|
+ },
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.getMarketerRatioList();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ doSave(config) {
|
|
|
+ if (!config.value) {
|
|
|
+ this.$notify({
|
|
|
+ title: '错误',
|
|
|
+ message: '不能配置为空',
|
|
|
+ type: 'error',
|
|
|
+ duration: 2000
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.$api.globalConfig.edit(config).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '修改成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ this.listLoading = false
|
|
|
+ });
|
|
|
+ },
|
|
|
+ getBaseAmount(){
|
|
|
+ const that = this;
|
|
|
+ this.listLoading = true;
|
|
|
+ this.$api.baseAmount.list(that.listQuery).then(res => {
|
|
|
+ that.baseAmount = res.data;
|
|
|
+ setTimeout(() => {
|
|
|
+ that.listLoading = false
|
|
|
+ }, 200)
|
|
|
+ }).catch(() => {
|
|
|
+ that.listLoading = false
|
|
|
+ });
|
|
|
+ },
|
|
|
+ updateRatio(row){
|
|
|
+ this.$api.marketerRatio.edit(row).then(res => {
|
|
|
+ if (res.code === 200) {
|
|
|
+ this.$notify({
|
|
|
+ title: '成功',
|
|
|
+ message: '修改成功',
|
|
|
+ type: 'success',
|
|
|
+ duration: 2000
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
+ },
|
|
|
+ handleClick(tab, event) {
|
|
|
+ if (tab.label==='预提金额'){
|
|
|
+ this.getBaseAmount();
|
|
|
+ }else if (tab.label==='配置项') {
|
|
|
+ this.getGlobalConfig();
|
|
|
+ }else {
|
|
|
+ this.getMarketerRatioList()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getGlobalConfig(){
|
|
|
+ const that = this;
|
|
|
+ this.listLoading = true;
|
|
|
+ this.$api.globalConfig.getByKey("FINANCE").then(res => {
|
|
|
+ that.globalConfigs = res.data;
|
|
|
+ setTimeout(() => {
|
|
|
+ that.listLoading = false
|
|
|
+ }, 200)
|
|
|
+ }).catch(() => {
|
|
|
+ that.listLoading = false
|
|
|
+ });
|
|
|
+ },
|
|
|
+ resetTemp() {
|
|
|
+ this.temp = {
|
|
|
+ code: '',
|
|
|
+ name: 1,
|
|
|
+ parentId: '',
|
|
|
+ phone: ''
|
|
|
+ }
|
|
|
+ },
|
|
|
+ searchList() {
|
|
|
+ this.listQuery.current = 1;
|
|
|
+ },
|
|
|
+ getMarketerRatioList() {
|
|
|
+ const that = this;
|
|
|
+ this.listLoading = true;
|
|
|
+ this.$api.marketerRatio.list(that.listQuery).then(res => {
|
|
|
+ that.marketerRatioRecord = res.data;
|
|
|
+ setTimeout(() => {
|
|
|
+ that.listLoading = false
|
|
|
+ }, 200)
|
|
|
+ }).catch(() => {
|
|
|
+ that.listLoading = false
|
|
|
+ });
|
|
|
+ },
|
|
|
+ }
|
|
|
+ }
|
|
|
+</script>
|
|
|
+<style lang="scss">
|
|
|
+ .organization-index {
|
|
|
+ .el-table [class*=el-table__row--level] .el-table__expand-icon {
|
|
|
+ color: red;
|
|
|
+ }
|
|
|
+ }
|
|
|
+</style>
|
|
|
+<style scoped lang="scss">
|
|
|
+</style>
|