1,修改用户管理展示岗位信息

2,修复提成比例数据格式为浮点型
3,修复修改提成比例时业务员展示
4,金额数字逢三位加逗号
This commit is contained in:
huangdeliang
2020-10-06 20:16:58 +08:00
parent 0e3b59b12f
commit 92fc73e923
11 changed files with 839 additions and 783 deletions

View File

@ -1,8 +1,8 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="位" prop="postId">
<el-select v-model="queryParams.postId" placeholder="请选择位" clearable size="small" @change="searchPostChange">
<el-form-item label="位" prop="postId">
<el-select v-model="queryParams.postId" placeholder="请选择位" clearable size="small" @change="searchPostChange">
<el-option
v-for="dict in postIdOptions"
:key="dict.dictValue"
@ -76,8 +76,12 @@
<el-table v-loading="loading" :data="commisionList" :span-method="objectSpanMethod"
@selection-change="handleSelectionChange">
<el-table-column label="业务员" align="center" prop="userName"/>
<el-table-column label="位" align="center" prop="postName"/>
<el-table-column label="金额" align="center" prop="amount"/>
<el-table-column label="位" align="center" prop="postName"/>
<el-table-column label="金额" align="center" prop="amount">
<template scope="scope">
{{toThousands(scope.row.amount)}}
</template>
</el-table-column>
<el-table-column label="比例" align="center" prop="rate">
<template scope="scope">
{{scope.row.rate + '%'}}
@ -119,8 +123,8 @@
<el-row :gutter="15">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-col :span="12">
<el-form-item label="位" prop="postId">
<el-select v-model="form.postId" placeholder="请选择位" @change="postChange">
<el-form-item label="位" prop="postId">
<el-select v-model="form.postId" placeholder="请选择位" @change="postChange">
<el-option
v-for="dict in postIdOptions"
:key="dict.dictValue"
@ -228,7 +232,7 @@
{required: true, message: "业务员不能为空", trigger: "change"}
],
postId: [
{required: true, message: "位不能为空", trigger: "change"}
{required: true, message: "位不能为空", trigger: "change"}
],
amount: [
{required: true, message: "金额不能为空", trigger: "blur"}
@ -368,6 +372,7 @@
const ruleId = row.ruleId || this.ids
getCommision(ruleId).then(response => {
this.form = response.data;
this.userIdOptions = this.options[this.form.postId];
this.open = true;
this.title = "修改业务提成比例";
});
@ -436,7 +441,7 @@
this.userIdOptions = this.options[postId];
},
searchPostChange(postId) {
if(!postId) {
if (!postId) {
this.searchUserIdOptions = this.totalUserIdOptions.slice();
return;
}

View File

@ -1,8 +1,8 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="位" prop="postId">
<el-select v-model="queryParams.postId" placeholder="请选择位" clearable size="small" @change="searchPostChange">
<el-form-item label="位" prop="postId">
<el-select v-model="queryParams.postId" placeholder="请选择位" clearable size="small" @change="searchPostChange">
<el-option
v-for="dict in postIdOptions"
:key="dict.dictValue"
@ -52,14 +52,23 @@
<el-table v-loading="loading" :data="commisionList"
@selection-change="handleSelectionChange">
<el-table-column label="业务员" align="center" prop="userName"/>
<el-table-column label="位" align="center" prop="postName"/>
<el-table-column label="总金额" align="center" prop="amount"/>
<el-table-column label="位" align="center" prop="postName"/>
<el-table-column label="总金额" align="center" prop="amount">
<template scope="scope">
{{toThousands(scope.row.amount)}}
</template>
</el-table-column>
<el-table-column label="比例" align="center" prop="rate">
<template scope="scope">
{{scope.row.rate + '%'}}
</template>
</el-table-column>
<el-table-column label="提成" align="center" prop="commision"/>
<el-table-column label="提成" align="center" prop="commision">
<template scope="scope">
{{toThousands(scope.row.commision)}}
</template>
</el-table-column>
</el-table>
<pagination
@ -206,7 +215,7 @@
this.userIdOptions = this.options[postId];
},
searchPostChange(postId) {
if(!postId) {
if (!postId) {
this.searchUserIdOptions = this.totalUserIdOptions.slice();
return;
}

View File

@ -190,7 +190,11 @@
</template>
</el-table-column>
<el-table-column label="客户姓名" align="center" prop="customer" width="120" fixed="left"/>
<el-table-column label="金额" align="center" prop="amount" width="120" fixed="left"/>
<el-table-column label="金额" align="center" prop="amount" width="120" fixed="left">
<template scope="scope">
{{toThousands(scope.row.amount)}}
</template>
</el-table-column>
<el-table-column label="电话" align="center" prop="phone" width="120"/>
<el-table-column label="服务月数" align="center" prop="serveMonth" width="80"/>
<el-table-column label="收款方式" align="center" prop="payType" width="120"/>
@ -408,6 +412,7 @@
<script>
import {listOrder, getOrder, delOrder, addOrder, updateOrder, exportOrder, getOptions} from "@/api/custom/order";
import dayjs from 'dayjs';
const beginTime = dayjs().startOf('month').format('YYYY-MM-DD');
const endTime = dayjs().format('YYYY-MM-DD');

File diff suppressed because it is too large Load Diff