Commit ff0fb21d authored by 华国豪's avatar 华国豪 🙄
parents 60b46435 dd2db4ec
...@@ -46,9 +46,9 @@ ...@@ -46,9 +46,9 @@
.totalTabal td{ .totalTabal td{
height:33px; height:33px;
} }
body{ /* body{
min-width: 100%!important; min-width: 100%!important;
} } */
</style> </style>
<template> <template>
......
...@@ -10,8 +10,8 @@ ...@@ -10,8 +10,8 @@
border-left: 1px solid #d1d1d1; border-left: 1px solid #d1d1d1;
border-right: 1px solid #d1d1d1; border-right: 1px solid #d1d1d1;
font-size: 14px; font-size: 14px;
/* width:100%; */ width:100%;
min-width: 5752px; min-width: 1500px;
padding-bottom: 5px; padding-bottom: 5px;
} }
...@@ -24,29 +24,12 @@ ...@@ -24,29 +24,12 @@
border-right: 1px solid #d1d1d1; border-right: 1px solid #d1d1d1;
position: relative; position: relative;
background-color: #E6E6E6; background-color: #E6E6E6;
width:250px;
} }
th[class=first]:before {
content: "";
position: absolute;
width: 1px;
height: 252px;
/*这里需要自己调整,根据td的宽度和高度*/
top: 0;
left: 0;
background-color: #d1d1d1;
display: block;
transform: rotate(-81deg);
/*这里需要自己调整,根据线的位置*/
transform-origin: top;
}
.LP_table td { .LP_table td {
border-bottom: 1px solid #d1d1d1; border-bottom: 1px solid #d1d1d1;
border-right: 1px solid #d1d1d1; border-right: 1px solid #d1d1d1;
text-align: center; text-align: center;
padding: 5px; padding: 5px 0;
min-width: 250px;
} }
.LP_table .el-button--primary { .LP_table .el-button--primary {
...@@ -64,51 +47,89 @@ ...@@ -64,51 +47,89 @@
right: 30px; right: 30px;
top: 5px; top: 5px;
} }
.comLessDiv{
width:100%;
height:40px;
margin-top:5px;
padding-bottom:5px;
border-bottom:1px solid #d1d1d1;
}
.comLessDiv:last-child{
border:0;
padding-bottom:0;
}
.addLessPrice{
margin-left:10px;
color:seagreen;
cursor: pointer;
}
.lessBtn{
margin-top:5px;
}
</style> </style>
<template> <template>
<div> <div>
<div class="query-box">
<ul>
<li>
<input type='button' class="normalBtn" @click="AddItem()" value="新增"></input>
</li>
</ul>
</div>
<div class="LM_mainDiv"> <div class="LM_mainDiv">
<!--保存--> <!--保存-->
<table border="0" cellspacing="0" cellpadding="0" class="LP_table" v-loading="this.loading"> <table border="0" cellspacing="0" cellpadding="0" class="LP_table" v-loading="this.loading">
<tr> <tr>
<th class="first"> <th width="200">公司</th>
<span class="Lp_role">岗位</span> <th width="400">线路/系列</th>
<span class="Lp_company">公司</span> <th>所有人</th>
</th> <th>部门主管</th>
<template v-for="item in BranchList"> <th>分公司总经理</th>
<th> <th>当团op</th>
{{item.BName}} <th width="200">操作</th>
</th>
</template>
<th>
操作
</th>
</tr> </tr>
<tr v-for="(item,index) in PageData"> <tr v-for="(item,index) in dataList">
<td> <td>
<el-select :placeholder="$t('pub.pleaseSel')" class="w150" v-model="item.RoleId"> {{item.BName}} <i class="iconfont icon-bumenguanli-tianjia addLessPrice" @click="addLessPrice(item)"></i>
<el-option label="不限" :value="0"></el-option> </td>
<el-option v-for="item in RoleList" :label="item.PostName" :value="item.PostId" :key="item.PostId"></el-option> <td>
<div v-for="subItem in item.LessPriceList" class="comLessDiv">
<el-select class='w150' v-model="subItem.LineId" filterable :placeholder="$t('pub.pleaseSel')" @change="getLineTeamList(subItem)">
<el-option label="不限" :value='commonSelect'></el-option>
<el-option v-for="item in LineList" :label='item.LineName' :value='item.LineID' :key='item.LineID'>
</el-option>
</el-select> </el-select>
{{subItem.LineTeamList}}
<!-- <el-select class='w150' v-model="subItem.LineTeamId" filterable :placeholder="$t('pub.pleaseSel')">
<el-option label="不限" :value='commonSelect'></el-option>
<el-option v-for="sitem in subItem.LineTeamList" :label='sitem.LtName' :value='sitem.LtID' :key='sitem.LtID'>
</el-option>
</el-select> -->
</div>
</td>
<td>
<div v-for="subItem in item.LessPriceList" class="comLessDiv">
<el-input class="w80" placeholder="少价金額" v-model="subItem.LessMoney" @keyup.native="checkPrice(subItem,'LessMoney')"></el-input>
<el-input class="w80" placeholder="减少提成百分比" v-model="subItem.LessPercent" @keyup.native="checkPrice(subItem,'LessPercent')"></el-input>
</div>
</td>
<td>
<div v-for="subItem in item.LessPriceList" class="comLessDiv">
<el-input class="w80" placeholder="少价金額" v-model="subItem.DeptLessMoney" @keyup.native="checkPrice(subItem,'DeptLessMoney')"></el-input>
<el-input class="w80" placeholder="减少提成百分比" v-model="subItem.DeptLessPercent" @keyup.native="checkPrice(subItem,'DeptLessPercent')"></el-input>
</div>
</td>
<td>
<div v-for="subItem in item.LessPriceList" class="comLessDiv">
<el-input class="w80" placeholder="少价金額" v-model="subItem.FilialeLessMoney" @keyup.native="checkPrice(subItem,'FilialeLessMoney')"></el-input>
<el-input class="w80" placeholder="减少提成百分比" v-model="subItem.FilialeLessPercent" @keyup.native="checkPrice(subItem,'FilialeLessPercent')"></el-input>
</div>
</td> </td>
<template v-for="subItem in item.DetailExtList">
<td> <td>
<el-input class="w80" placeholder="少价金額" v-model="subItem.LessMoney"></el-input> <div v-for="subItem in item.LessPriceList" class="comLessDiv">
<el-input class="w80" placeholder="减少提成百分比" v-model="subItem.LessPercent"></el-input> <el-input class="w80" placeholder="少价金額" v-model="subItem.OPLessMoney" @keyup.native="checkPrice(subItem,'OPLessMoney')"></el-input>
<el-input class="w80" placeholder="减少提成百分比" v-model="subItem.OPLessPercent" @keyup.native="checkPrice(subItem,'OPLessPercent')"></el-input>
</div>
</td> </td>
</template>
<td> <td>
<input type='button' class="normalBtn" @click="SaveLessPrice(item)" value="保存"></input> <div v-for="(subItem,subIndex) in item.LessPriceList" class="comLessDiv">
<input type='button' class="normalBtn" @click="RemoveItem(item,index)" value="删除"></input> <input type='button' class="normalBtn lessBtn" @click="SaveLessPrice(subItem,index)" value="保存"></input>
<input type='button' class="normalBtn lessBtn" @click="RemoveItem(item,subItem,subIndex)" value="删除"></input>
</div>
</td> </td>
</tr> </tr>
</table> </table>
...@@ -120,47 +141,24 @@ ...@@ -120,47 +141,24 @@
data() { data() {
return { return {
//分公司列表 //分公司列表
BranchList: [], dataList: [],
qMsg: {
PageIndex: 1,
PageSize: 100
},
PageData: [],
//角色列表 //角色列表
RoleList: [], RoleList: [],
loading:false loading:false,
LineList: [],
commonSelect:0,
}; };
}, },
methods: { methods: {
AddItem() {
var obj = {
Id: 0,
RoleId: 0,
DetailExtList: [],
};
this.BranchList.forEach(item => {
obj.DetailExtList.push({
Id: 0,
ManagerId: 0,
RB_Branch_Id: item.Id,
LessMoney: 0,
LessPercent: 0
});
});
if (this.PageData == null) {
this.PageData = [];
}
this.PageData.push(obj);
},
//保存少价管理 //保存少价管理
SaveLessPrice(item) { SaveLessPrice(subItem) {
this.apipost( this.apipost(
"lessprice_post_Set", item, "lessprice_post_Set", subItem,
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.Success("操作成功!"); this.Success(res.data.message);
this.GetList(); // this.getList();
} else { }else{
this.Error(res.data.message); this.Error(res.data.message);
} }
}, },
...@@ -168,61 +166,101 @@ ...@@ -168,61 +166,101 @@
); );
}, },
//获取列表 //获取列表
GetList() { GetLessList() {
this.loading = true; this.loading = true;
this.apipost( var that=this;
"lessprice_get_GetPageList", this.qMsg, that.apipost(
"lessprice_get_GetPageList", {},
res => { res => {
this.loading = false; that.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.BranchList = res.data.data.branchList; var data = res.data.data;
this.PageData = res.data.data.DataList.pageData; data.forEach(x=>{
x.LessPriceList.forEach(y=>{
that.getLineTeamList(y);
})
})
that.dataList=data;
console.log(that.dataList,'resssss');
}else{
that.Error(res.data.message);
} }
}, },
err => {} err => {}
); );
}, },
//获取列表 //获取列表
GetRoleList() { RemoveItem(item,subItem, index) {
let userInfo=this.getLocalStorage(); if(subItem.Id==0){
this.apipost( item.LessPriceList.splice(index,1);
"admin_get_PostGetList", {"RB_Group_Id":userInfo.RB_Group_id}, return;
res => {
if (res.data.resultCode == 1) {
this.RoleList = res.data.data;
} }
},
err => {}
);
},
//获取列表
RemoveItem(item, index) {
var that = this; var that = this;
this.Confirm("是否删除此少价信息?", function () { this.Confirm("是否删除此少价信息?", function () {
if (item.Id > 0) { if (subItem.Id > 0) {
that.apipost( that.apipost(
"lessprice_post_Remove", { "lessprice_post_Remove", {
ID: item.Id ID: subItem.Id
}, },
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
that.Success("操作成功!"); that.Success("操作成功!");
that.GetList(); // that.getList();
} else { } else {
that.Error(res.data.message); that.Error(res.data.message);
} }
}, },
err => {} err => {}
); );
} else {
that.PageData.splice(index, 1);
} }
}); });
}, },
//获取线路列表
getLineList() {
this.apipost("line_post_GetAllList", {}, res => {
if (res.data.resultCode == 1) {
this.LineList = res.data.data;
}
});
},
//获取系列列表
getLineTeamList(subItem) {
this.apipost("team_post_GetList", {
lineID: subItem.LineId,
isTOOP: 1
}, res => {
if (res.data.resultCode == 1) {
//subItem.LineTeamId = 0;
subItem.LineTeamList = res.data.data;
}
});
},
//点击添加
addLessPrice(item){
var obj = {
DeptLessMoney:0,
DeptLessPercent:0,
DetailExtList:'',
FilialeLessMoney:0,
FilialeLessPercent:0,
Id:0,
LessMoney:0,
LessPercent:0,
LineId:0,
LineTeamId:0,
OPLessMoney:0,
OPLessPercent:0,
RB_Branch_Id:item.Id,
RB_Group_Id:0,
LineTeamList:[],
}
item.LessPriceList.push(obj);
}
}, },
mounted() { mounted() {
this.GetRoleList(); this.getLineList();
this.GetList(); this.GetLessList();
}, },
}; };
......
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