Commit d5b68cad authored by zhengke's avatar zhengke

修改

parent fd45c7b7
...@@ -6,30 +6,20 @@ ...@@ -6,30 +6,20 @@
</li> </li>
</ul> </ul>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading"> <table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<tr> <thead>
<th style="width:30%">线路名称</th> <tr>
<th>人员</th> <th>人员</th>
<th>占比</th> <th>占比</th>
<th>设置</th> <th width="300">操作</th>
</tr> </tr>
<tr> </thead>
<td>全部</td> <tbody>
<td>地接账户基金</td> <tr v-for="(item,index) in dataList" :key="index">
<td>{{allzb}}%</td> <td>{{item.EmployeeName}}</td>
<td> <td>{{item.CommissionPercent}}%</td>
<!-- <el-button @click="SetRules(item)" style="padding:4px" type="primary" icon="el-icon-edit" circle></el-button>
<el-button @click="Delete(item)" style="padding:4px" type="danger" icon="el-icon-delete" circle></el-button> -->
</td>
</tr>
<tbody v-for="(item,i) in dataList" :key="i">
<tr v-for="(com,index) in item.OPCommissionList" :key="index">
<td :rowspan="item.OPCommissionList.length" v-if="index==0">{{item.LineName}}</td>
<td>{{com.EmployeeName}}</td>
<td>{{com.CommissionPercent}}%</td>
<td> <td>
<el-button @click="SetRules(com)" style="padding:4px" type="primary" icon="el-icon-edit" circle></el-button> <el-button @click="SetRules(item)" style="padding:4px" type="primary" icon="el-icon-edit" circle></el-button>
<el-button @click="Delete(com)" style="padding:4px" type="danger" icon="el-icon-delete" circle></el-button> <el-button @click="Delete(item)" style="padding:4px" type="danger" icon="el-icon-delete" circle></el-button>
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -60,12 +50,7 @@ ...@@ -60,12 +50,7 @@
</template> </template>
<script> <script>
import moment from "moment"
import {
constants
} from 'fs';
export default { export default {
name: 'Feedback',
data() { data() {
return { return {
allzb: 100, allzb: 100,
...@@ -73,8 +58,6 @@ ...@@ -73,8 +58,6 @@
loading: false, loading: false,
ruleVisible: false, ruleVisible: false,
form: { form: {
LineName: '出境日本线',
LineID: 14,
EmployeeId: '', EmployeeId: '',
CommissionPercent: 0, CommissionPercent: 0,
}, },
...@@ -106,7 +89,7 @@ ...@@ -106,7 +89,7 @@
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
this.apipost('OPCommission_RemoveOPCommission', { this.apipost('ViittoCommission_post_RemoveViittoCommissionRuleService', {
ID: item.Id ID: item.Id
}, res => { }, res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
...@@ -123,8 +106,6 @@ ...@@ -123,8 +106,6 @@
addRule() { addRule() {
this.ruleVisible = true; this.ruleVisible = true;
this.form = { this.form = {
LineName: '出境日本线',
LineID: 14,
EmployeeId: '', EmployeeId: '',
CommissionPercent: 0, CommissionPercent: 0,
} }
...@@ -132,8 +113,6 @@ ...@@ -132,8 +113,6 @@
SetRules(item) { SetRules(item) {
this.ruleVisible = true; this.ruleVisible = true;
this.form = { this.form = {
LineName: '出境日本线',
LineID: 14,
EmployeeId: item.EmployeeId, EmployeeId: item.EmployeeId,
CommissionPercent: item.CommissionPercent, CommissionPercent: item.CommissionPercent,
Id: item.Id Id: item.Id
...@@ -146,11 +125,9 @@ ...@@ -146,11 +125,9 @@
let newnum = 0; let newnum = 0;
if (this.form.Id) { if (this.form.Id) {
this.dataList.forEach(item => { this.dataList.forEach(item => {
item.OPCommissionList.forEach(com => { if (item.Id != this.form.Id) {
if (com.Id != this.form.Id) { num += item.CommissionPercent;
num += com.CommissionPercent;
} }
})
}) })
newnum = 100 - num; newnum = 100 - num;
} else { } else {
...@@ -161,7 +138,7 @@ ...@@ -161,7 +138,7 @@
return; return;
} }
this.apipost( this.apipost(
'OPCommission_SetOPCommission', this.form, 'ViittoCommission_post_SetViittoCommissionRuleService', this.form,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.getList(); this.getList();
...@@ -181,13 +158,13 @@ ...@@ -181,13 +158,13 @@
let userInfo = this.getLocalStorage() let userInfo = this.getLocalStorage()
let msg = { let msg = {
GroupId: userInfo.RB_Group_id, GroupId: userInfo.RB_Group_id,
BranchId: '-1', BranchId: '49',
DepartmentId: '-1', DepartmentId: '-1',
PostId: '-1', PostId: '-1',
IsLeave: '0' IsLeave: '0'
} }
this.apipost( this.apipost(
'admin_get_EmployeeGetList', {}, 'admin_get_EmployeeGetList', msg,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data this.EmployeeList = res.data.data
...@@ -198,18 +175,16 @@ ...@@ -198,18 +175,16 @@
}, },
getList() { getList() {
this.loading = true; this.loading = true;
this.apipost("OPCommission_GetPageList", {}, res => { this.apipost("ViittoCommission_get_GetListService", {}, res => {
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.dataList = res.data.data; this.dataList = res.data.data;
// allzb // allzb
let num = 0; let num=0;
this.dataList.forEach(item => { this.dataList.forEach(item=>{
item.OPCommissionList.forEach(com => { num+=item.CommissionPercent;
num += com.CommissionPercent;
})
}) })
this.allzb = 100 - num; this.allzb=100-num;
} }
}); });
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment