Commit 85ba8f46 authored by Mac's avatar Mac

制单修改

parent d942d57c
...@@ -1606,6 +1606,16 @@ export default { ...@@ -1606,6 +1606,16 @@ export default {
}, },
Gourl(GetDetail){ Gourl(GetDetail){
if(GetDetail.OtherType==43){//9月9号新增 如果是43 就跳转到国内的详情 反之按之前的来用
this.$router.push({
name: 'domesticCommissiondetails',
query: {
PeriodId:GetDetail.ReFinanceId,
blank: "y",
tab: "国内销售提成详情"
}
});
}else{
this.$router.push({ this.$router.push({
name: 'CommissionDetail', name: 'CommissionDetail',
query: { query: {
...@@ -1615,6 +1625,8 @@ export default { ...@@ -1615,6 +1625,8 @@ export default {
tab: "提成详情" tab: "提成详情"
} }
}); });
}
}, },
// 单选计算 // 单选计算
checkdIteam(item){ checkdIteam(item){
......
...@@ -1071,6 +1071,16 @@ export default { ...@@ -1071,6 +1071,16 @@ export default {
}); });
}, },
Gourl(GetDetail){ Gourl(GetDetail){
if(GetDetail.OtherType==43){//9月9号新增 如果是43 就跳转到国内的详情 反之按之前的来用
this.$router.push({
name: 'domesticCommissiondetails',
query: {
PeriodId:GetDetail.ReFinanceId,
blank: "y",
tab: "国内销售提成详情"
}
});
}else{
this.$router.push({ this.$router.push({
name: 'CommissionDetail', name: 'CommissionDetail',
query: { query: {
...@@ -1080,6 +1090,8 @@ export default { ...@@ -1080,6 +1090,8 @@ export default {
tab: "提成详情" tab: "提成详情"
} }
}); });
}
}, },
// 获取冲抵列表 // 获取冲抵列表
......
...@@ -24,24 +24,22 @@ ...@@ -24,24 +24,22 @@
<div class="flexOne domesticCommission"> <div class="flexOne domesticCommission">
<div> <div>
<ul class="opUl"> <ul class="opUl">
<!-- <li> <li>
<em>期数</em> <em>出团公司</em>
<el-select v-model="msg.Periods" size="mini" @change="handleCurrentChange(1)"> <el-select v-model="msg.OutBranchId" size="mini" @change="handleCurrentChange(1)" >
<el-option label="不限" :value="0"></el-option> <el-option label="不限" :value="-1"></el-option>
<el-option v-for="(item,index) in PeriodsList" :key="item.index" :label="item.Name" :value="item.Id"></el-option> <el-option v-for="(item,index) in BranchList" :key="item.index" :label="item.BName"
:value="item.Id"></el-option>
</el-select> </el-select>
</li> --> </li>
<li> <li>
<em>选择月份</em> <em>选择月份</em>
<el-date-picker <el-date-picker v-model="Month" value-format="yyyy-MM" type="month" placeholder="选择月">
v-model="Month"
value-format="yyyy-MM"
type="month"
placeholder="选择月">
</el-date-picker> </el-date-picker>
</li> </li>
<li v-show="btnShow"> <li v-show="btnShow">
<el-button size="mini" type="danger" style="border-radius:14px" :loading="btnLoading" @click="generateTable">生成提成</el-button> <el-button size="mini" type="danger" style="border-radius:14px" :loading="btnLoading"
@click="generateTable">生成提成</el-button>
</li> </li>
</ul> </ul>
...@@ -51,6 +49,7 @@ ...@@ -51,6 +49,7 @@
<th>期数</th> <th>期数</th>
<th>名称</th> <th>名称</th>
<th>总金额</th> <th>总金额</th>
<th>所属公司提出</th>
<th>财务单据</th> <th>财务单据</th>
<th>操作信息</th> <th>操作信息</th>
<th>操作</th> <th>操作</th>
...@@ -62,8 +61,9 @@ ...@@ -62,8 +61,9 @@
<p>{{item.SumPrice}}</p> <p>{{item.SumPrice}}</p>
</td> </td>
<td>{{item.BranchCommission}}</td>
<td> <td>
<span v-for="(x,y) in item.FinanceIdList" style="cursor: pointer;text-decoration: underline;"> <span v-for="(x,y) in item.FinanceIdList" style="cursor: pointer;text-decoration: underline;" @click='gofinancialdetail(x)'>
{{x}}{{item.FinanceIdList.length == y+1 ?'':'、'}} {{x}}{{item.FinanceIdList.length == y+1 ?'':'、'}}
</span> </span>
</td> </td>
...@@ -77,6 +77,10 @@ ...@@ -77,6 +77,10 @@
<el-button type="primary" class="CM_look" @click="goUrl('domesticCommissionUser',item.Id)" <el-button type="primary" class="CM_look" @click="goUrl('domesticCommissionUser',item.Id)"
icon="iconfont icon-chakan" circle></el-button> icon="iconfont icon-chakan" circle></el-button>
</el-tooltip> </el-tooltip>
<el-tooltip v-if="cMaker==true" class="item" effect="dark" content="制单" placement="top">
<el-button @click="YijianZD(item)" type="danger" class="CM_look" v-if="cMaker==true"
icon="iconfont icon-mui-icon-add" circle></el-button>
</el-tooltip>
</td> </td>
...@@ -103,14 +107,17 @@ ...@@ -103,14 +107,17 @@
pageIndex: 1, pageIndex: 1,
pageSize: 20, pageSize: 20,
Periods: 0, Periods: 0,
OutBranchId:-1,
}, },
loading: false, loading: false,
//数据源 //数据源
dataList: [], dataList: [],
total: 0, total: 0,
btnShow: false, btnShow: false,
PeriodsList:[], PeriodsList: [],
btnLoading:false btnLoading: false,
BranchList:[],
cMaker:false,//是否可以制单
} }
}, },
mounted() { mounted() {
...@@ -119,16 +126,40 @@ ...@@ -119,16 +126,40 @@
if (ActionMenuCode.indexOf('F_DCommissionSend') != -1) { if (ActionMenuCode.indexOf('F_DCommissionSend') != -1) {
this.btnShow = true; this.btnShow = true;
} }
if (ActionMenuCode.indexOf('home_DCommissionZD') != -1) {
this.cMaker = true;
}
// this.getqishilist() // this.getqishilist()
this.getList(); this.getList();
this.getCompanyList()
}, },
methods: { methods: {
//初始化公司
getCompanyList() {
let userInfo = this.getLocalStorage();
var RB_Group_id = userInfo.RB_Group_id;
let msg = {
Status: 0,
is_show: 0,
RB_Group_Id: RB_Group_id
};
this.apipost(
"admin_get_BranchGetList",
msg,
res => {
if (res.data.resultCode == 1) {
this.BranchList = res.data.data;
}
},
err => { }
);
},
getqishilist() { getqishilist() {
this.apipost( this.apipost(
"sellcommission_GetGNCommissionPeriodsList", "sellcommission_GetGNCommissionPeriodsList",
{ }, {},
res => { res => {
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.PeriodsList = res.data.data; this.PeriodsList = res.data.data;
...@@ -180,26 +211,72 @@ ...@@ -180,26 +211,72 @@
); );
}, },
//生成提成报表 //生成提成报表
generateTable(){ generateTable() {
if(!this.Month||this.Month==""){ if (!this.Month || this.Month == "") {
this.Error("请选择月份!") this.Error("请选择月份!")
return; return;
} }
this.btnLoading=true; this.btnLoading = true;
this.apipost( this.apipost(
"sellcommission_Post_SetGNCommissionSend",{Month:this.Month}, "sellcommission_Post_SetGNCommissionSend", { Month: this.Month },
res => { res => {
this.btnLoading=false; this.btnLoading = false;
if(res.data.resultCode==1){ if (res.data.resultCode == 1) {
this.handleCurrentChange(1); this.handleCurrentChange(1);
this.Success('报表生成成功') this.Success('报表生成成功')
}else{ } else {
this.Error(res.data.message); this.Error(res.data.message);
} }
}, },
null null
); );
},
YijianZD(item) {
let Money
if(this.msg.OutBranch>0){
Money=item.BranchCommission
}else{
Money=item.SumPrice
}
let obj = {
CostType: 16,
Money: Money,
CurrencyId: 1,
XSTC: 1,
OtherType:43,
ReFinanceId:item.Id
}
let query = {
blank: "y",
tab: "新增付款单据",
Type: 2,
IsUploadPic: 1,
orderObj: JSON.stringify(obj)
}
if(this.msg.OutBranch>0){
query.id = 30
query.Name = "分公司销售提成单"
}else{
query.id = 28
query.Name = "总部销售提成单"
}
this.$router.push({
path: "/addFinancialDocuments",
query
});
},
gofinancialdetail(id){
this.$router.push({
name: 'FinancialDocumentsDetail',
query: {
id: id,
blank: 'y',
tab: '单据详情'
}
})
} }
} }
......
...@@ -35,6 +35,14 @@ ...@@ -35,6 +35,14 @@
:value="item.empId"></el-option> :value="item.empId"></el-option>
</el-select> </el-select>
</li> </li>
<li>
<em>出团公司</em>
<el-select v-model="msg.OutBranchId" size="mini" @change="handleCurrentChange(1)" :disabled='disabled'>
<el-option label="不限" :value="-1"></el-option>
<el-option v-for="(item,index) in BranchList" :key="item.index" :label="item.BName"
:value="item.Id"></el-option>
</el-select>
</li>
<li> <li>
<em>公司</em> <em>公司</em>
<el-select v-model="msg.RB_Branch_Id" size="mini" @change="handleCurrentChange(1)" :disabled='disabled'> <el-select v-model="msg.RB_Branch_Id" size="mini" @change="handleCurrentChange(1)" :disabled='disabled'>
...@@ -116,7 +124,8 @@ ...@@ -116,7 +124,8 @@
PeriodId: 0, PeriodId: 0,
UserId: -1, UserId: -1,
RB_Branch_Id: -1, RB_Branch_Id: -1,
RB_Department_Id: -1 RB_Department_Id: -1,
OutBranchId:-1,
}, },
loading: false, loading: false,
//数据源 //数据源
......
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<th>额外扣除</th> <th>额外扣除</th>
<th>最终发放</th> <th>最终发放</th>
<th>期数</th> <th>期数</th>
<th>备注</th> <th width='400'>备注</th>
<!-- <th>操作</th> --> <!-- <th>操作</th> -->
</tr> </tr>
...@@ -182,7 +182,7 @@ ...@@ -182,7 +182,7 @@
if(this.$route.query.UserId && this.$route.query.UserId>0){ if(this.$route.query.UserId && this.$route.query.UserId>0){
this.msg.UserId =Number(this.$route.query.UserId) this.msg.UserId =Number(this.$route.query.UserId)
} }
if(this.$route.query.RB_Branch_Id&& this.$route.query.RB_Branch_Id>0){ if(this.$route.query.RB_Branch_Id){
this.msg.RB_Branch_Id = Number(this.$route.query.RB_Branch_Id) this.msg.RB_Branch_Id = Number(this.$route.query.RB_Branch_Id)
} }
if(this.$route.query.RB_Department_Id && this.$route.query.RB_Department_Id>0){ if(this.$route.query.RB_Department_Id && this.$route.query.RB_Department_Id>0){
......
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