Commit c0f2c89f authored by liudong1993's avatar liudong1993

1

parent 1f4056ef
...@@ -54,6 +54,10 @@ ...@@ -54,6 +54,10 @@
<el-button size="mini" type="danger" style="border-radius:14px" :loading="btnLoading" <el-button size="mini" type="danger" style="border-radius:14px" :loading="btnLoading"
@click="generateTable">生成提成</el-button> @click="generateTable">生成提成</el-button>
</li> </li>
<li v-show="btnShow2">
<el-button size="mini" type="danger" style="border-radius:14px" :loading="btnLoading2"
@click="generateTable2">生成年终</el-button>
</li>
</ul> </ul>
</div> </div>
<table v-loading="loading" class="singeRowTable" border="0" cellspacing="0" cellpadding="0"> <table v-loading="loading" class="singeRowTable" border="0" cellspacing="0" cellpadding="0">
...@@ -153,7 +157,9 @@ ...@@ -153,7 +157,9 @@
dataList: [], dataList: [],
total: 0, total: 0,
btnShow: false, btnShow: false,
btnShow2: false,
btnLoading: false, btnLoading: false,
btnLoading2: false,
cMaker: false,//是否可以制单 cMaker: false,//是否可以制单
disabled: true disabled: true
} }
...@@ -162,7 +168,10 @@ ...@@ -162,7 +168,10 @@
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
this.getCompanyMsg.RB_Group_Id=userInfo.RB_Group_id; //集团ID this.getCompanyMsg.RB_Group_Id=userInfo.RB_Group_id; //集团ID
let ActionMenuCode = userInfo.ActionMenuCode; let ActionMenuCode = userInfo.ActionMenuCode;
this.msg.OutBranchId = userInfo.RB_Branch_id this.msg.OutBranchId = userInfo.RB_Branch_id;
if(userInfo.RB_Group_id=2&&userInfo.EmployeeId==955){
this.btnShow2 = true;
}
if (ActionMenuCode.indexOf('F_DCommissionSend') != -1) { if (ActionMenuCode.indexOf('F_DCommissionSend') != -1) {
this.btnShow = true; this.btnShow = true;
} }
...@@ -274,6 +283,30 @@ ...@@ -274,6 +283,30 @@
} }
); );
}, },
//生成提成报表
generateTable2() {
this.$confirm("年终奖励默认进入最新一期提成里!", this.$t('tips.tips'), {
confirmButtonText: "确定",
cancelButtonText: this.$t('pub.cancelBtn'),
type: "warning"
}).then(() => {
this.btnLoading2 = true;
this.apipost(
"sellcommission_SetTYSaleYearBonusSend", {
Month: this.Month,
IsForceSend: 1 },
res => {
this.btnLoading2 = false
if (res.data.resultCode == 1) {
this.handleCurrentChange(1);
this.Success('年终生成成功')
}
})
})
.catch(() => {
});
},
// 点击制单 // 点击制单
YijianZD(item,type) { YijianZD(item,type) {
if(this.msg.OutBranchId==-1){ if(this.msg.OutBranchId==-1){
......
...@@ -204,6 +204,7 @@ ...@@ -204,6 +204,7 @@
<th>其他线人数</th> <th>其他线人数</th>
<th>其他线奖励</th> <th>其他线奖励</th>
<th v-if="userInfo.RB_Group_id=2&&userInfo.RB_Branch_id==0">组长奖励</th> <th v-if="userInfo.RB_Group_id=2&&userInfo.RB_Branch_id==0">组长奖励</th>
<th v-if="userInfo.RB_Group_id=2&&userInfo.EmployeeId==955">年终奖励</th>
<th>总提成</th> <th>总提成</th>
<th>公司提成</th> <th>公司提成</th>
<th>期数</th> <th>期数</th>
...@@ -224,6 +225,7 @@ ...@@ -224,6 +225,7 @@
:style="{'color': item.BonusMoney?'#409EFF':''}" :style="{'color': item.BonusMoney?'#409EFF':''}"
:class="[item.BonusMoney?'cursor-p':'']" :class="[item.BonusMoney?'cursor-p':'']"
@click="objNew=item,objNew.PeriodsId=msg.PeriodId,isGroupLeaderReward=true">{{item.BonusMoney?item.BonusMoney:'-'}}</td> @click="objNew=item,objNew.PeriodsId=msg.PeriodId,isGroupLeaderReward=true">{{item.BonusMoney?item.BonusMoney:'-'}}</td>
<td v-if="userInfo.RB_Group_id=2&&userInfo.EmployeeId==955"><span style="cursor: pointer;" @click="openCommissionYearBonus(item.UserId,item.UserName,item.PeriodId)">{{item.YearBonusMoney?item.YearBonusMoney:'-'}}</span></td>
<td>{{item.TotalCMoney?item.TotalCMoney:'-'}} <td>{{item.TotalCMoney?item.TotalCMoney:'-'}}
<span v-if="item.TotalExtraReward"> <span v-if="item.TotalExtraReward">
(额外奖励:{{item.TotalExtraReward}}) (额外奖励:{{item.TotalExtraReward}})
...@@ -288,6 +290,34 @@ ...@@ -288,6 +290,34 @@
<button class="hollowFixedBtn" @click="outerVisible = false">取消</button> &nbsp; <button class="hollowFixedBtn" @click="outerVisible = false">取消</button> &nbsp;
</div> </div>
</el-dialog> </el-dialog>
<el-dialog width="1000px" :title="DigName+'-年终明细'" :visible.sync="yearBonusVisible" center>
<div
class="cm_content"
style="width: 100%;margin-bottom: 5px; "
>
<table
class="po_content singeRowTable"
style="border:1px solid #E6E6E6;"
cellspacing="0"
cellpadding="0"
v-loading="loading">
<tr>
<th>月份</th>
<th>人数</th>
</tr>
<tr v-for="item in yearBonusDataList">
<td>{{item.TradeDate}}</td>
<td :style="item.GuestNum>=35?'color:red':''">{{item.GuestNum}}</td>
</tr>
<tr v-if="yearBonusDataList.length==0">
<td style="text-align:center" colspan="3">{{$t('system.content_noData')}}</td>
</tr>
</table>
</div>
<div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="yearBonusVisible = false">取消</button> &nbsp;
</div>
</el-dialog>
<GroupLeaderReward v-if="isGroupLeaderReward" :obj="objNew" @close="isGroupLeaderReward=false"></GroupLeaderReward> <GroupLeaderReward v-if="isGroupLeaderReward" :obj="objNew" @close="isGroupLeaderReward=false"></GroupLeaderReward>
</div> </div>
</template> </template>
...@@ -304,6 +334,7 @@ ...@@ -304,6 +334,7 @@
isGroupLeaderReward: false, isGroupLeaderReward: false,
objNew:{}, objNew:{},
outerVisible:false,//提成比例弹窗 outerVisible:false,//提成比例弹窗
yearBonusVisible:false,//年终明细弹窗
Month: moment().format("YYYY-MM"), Month: moment().format("YYYY-MM"),
msg: { msg: {
pageIndex: 1, pageIndex: 1,
...@@ -343,6 +374,7 @@ ...@@ -343,6 +374,7 @@
}, },
disabled:true, disabled:true,
rateDataList: [], rateDataList: [],
yearBonusDataList: [],
DigName:'', DigName:'',
userInfo: {} userInfo: {}
} }
...@@ -493,7 +525,28 @@ ...@@ -493,7 +525,28 @@
}, },
null null
); );
} },
openCommissionYearBonus(userId,name,PeriodId){
this.DigName = name;
this.yearBonusVisible = true;
this.getCommissionYearBonusData(userId,PeriodId);
},
getCommissionYearBonusData(userId,PeriodId){
this.loading = true;
this.apipost(
"sellcommission_GetTYSaleYearBonusDetail",
{UserId : userId,PeroidsId: PeriodId},
res => {
this.loading = false;
if (res.data.resultCode == 1) {
this.yearBonusDataList = res.data.data;
} else {
this.Error(res.data.message);
}
},
null
);
},
} }
} }
</script> </script>
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