Commit d5b68cad authored by zhengke's avatar zhengke

修改

parent fd45c7b7
......@@ -6,30 +6,20 @@
</li>
</ul>
<table class="singeRowTable" border="0" cellspacing="0" cellpadding="0" v-loading="loading">
<thead>
<tr>
<th style="width:30%">线路名称</th>
<th>人员</th>
<th>占比</th>
<th>设置</th>
<th width="300">操作</th>
</tr>
<tr>
<td>全部</td>
<td>地接账户基金</td>
<td>{{allzb}}%</td>
<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>
</thead>
<tbody>
<tr v-for="(item,index) in dataList" :key="index">
<td>{{item.EmployeeName}}</td>
<td>{{item.CommissionPercent}}%</td>
<td>
<el-button @click="SetRules(com)" 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="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>
......@@ -60,12 +50,7 @@
</template>
<script>
import moment from "moment"
import {
constants
} from 'fs';
export default {
name: 'Feedback',
data() {
return {
allzb: 100,
......@@ -73,8 +58,6 @@
loading: false,
ruleVisible: false,
form: {
LineName: '出境日本线',
LineID: 14,
EmployeeId: '',
CommissionPercent: 0,
},
......@@ -106,7 +89,7 @@
type: "warning"
})
.then(() => {
this.apipost('OPCommission_RemoveOPCommission', {
this.apipost('ViittoCommission_post_RemoveViittoCommissionRuleService', {
ID: item.Id
}, res => {
if (res.data.resultCode == 1) {
......@@ -123,8 +106,6 @@
addRule() {
this.ruleVisible = true;
this.form = {
LineName: '出境日本线',
LineID: 14,
EmployeeId: '',
CommissionPercent: 0,
}
......@@ -132,8 +113,6 @@
SetRules(item) {
this.ruleVisible = true;
this.form = {
LineName: '出境日本线',
LineID: 14,
EmployeeId: item.EmployeeId,
CommissionPercent: item.CommissionPercent,
Id: item.Id
......@@ -146,12 +125,10 @@
let newnum = 0;
if (this.form.Id) {
this.dataList.forEach(item => {
item.OPCommissionList.forEach(com => {
if (com.Id != this.form.Id) {
num += com.CommissionPercent;
if (item.Id != this.form.Id) {
num += item.CommissionPercent;
}
})
})
newnum = 100 - num;
} else {
newnum = this.allzb;
......@@ -161,7 +138,7 @@
return;
}
this.apipost(
'OPCommission_SetOPCommission', this.form,
'ViittoCommission_post_SetViittoCommissionRuleService', this.form,
res => {
if (res.data.resultCode == 1) {
this.getList();
......@@ -181,13 +158,13 @@
let userInfo = this.getLocalStorage()
let msg = {
GroupId: userInfo.RB_Group_id,
BranchId: '-1',
BranchId: '49',
DepartmentId: '-1',
PostId: '-1',
IsLeave: '0'
}
this.apipost(
'admin_get_EmployeeGetList', {},
'admin_get_EmployeeGetList', msg,
res => {
if (res.data.resultCode == 1) {
this.EmployeeList = res.data.data
......@@ -198,18 +175,16 @@
},
getList() {
this.loading = true;
this.apipost("OPCommission_GetPageList", {}, res => {
this.apipost("ViittoCommission_get_GetListService", {}, res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.dataList = res.data.data;
// allzb
let num = 0;
this.dataList.forEach(item => {
item.OPCommissionList.forEach(com => {
num += com.CommissionPercent;
})
let num=0;
this.dataList.forEach(item=>{
num+=item.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