Commit f6897264 authored by youjie's avatar youjie

票务、同业提成

parent 8cd54aa5
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<div class="flexOne domesticCommission"> <div class="flexOne domesticCommission">
<div> <div>
<ul class="opUl"> <ul class="opUl">
<li> <li>
<em>选择月份</em> <em>选择月份</em>
<el-date-picker v-model="Month" value-format="yyyy-MM" type="month" placeholder="选择月"> <el-date-picker v-model="Month" value-format="yyyy-MM" type="month" placeholder="选择月">
...@@ -161,7 +161,7 @@ ...@@ -161,7 +161,7 @@
</template> </template>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<button class="hollowFixedBtn" @click="outerVisible = false">取消</button> &nbsp; <button class="hollowFixedBtn" @click="outerVisible = false">取消</button> &nbsp;
<button class="normalBtn" type="primary" @click="BillMaking">确定</button> <button class="normalBtn" type="primary" @click="BillMaking">确定</button>
</div> </div>
</el-dialog> </el-dialog>
</div> </div>
...@@ -220,14 +220,14 @@ ...@@ -220,14 +220,14 @@
}else{ }else{
zong += x.WageMoney; zong += x.WageMoney;
} }
}); });
this.totalAmount = zong; this.totalAmount = zong;
}, },
closeChangeMachie(done){//弹出框关闭初始化弹框内表单 closeChangeMachie(done){//弹出框关闭初始化弹框内表单
done(); done();
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.msg.pageIndex = val; this.msg.pageIndex = val;
this.getList(); this.getList();
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
let title = '' let title = ''
if(type==1){ if(type==1){
title = '当期利润差额' title = '当期利润差额'
}else{ }else{
title = '期数详情' title = '期数详情'
} }
...@@ -275,15 +275,47 @@ ...@@ -275,15 +275,47 @@
} }
this.btnLoading = true; this.btnLoading = true;
this.crmapipost( this.crmapipost(
"/api/Commission/SetTicketCommission", { Month: this.Month }, "/api/Commission/SetTicketCommission", {
Month: this.Month,
IsForceSend:0
},
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); let buttomTitle
if(res.data.message.indexOf('Warning')!=-1){
buttomTitle = '强制发放'
}else{
buttomTitle = '确定'
}
this.$confirm(res.data.message, "提示", {
confirmButtonText: buttomTitle,
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
if(buttomTitle=='强制发放'){
this.btnLoading = true;
this.crmapipost(
"/api/Commission/SetTicketCommission", {
Month: this.Month,
IsForceSend: 1 },
res => {
this.btnLoading = false
if (res.data.resultCode == 1) {
this.handleCurrentChange(1);
this.Success('报表生成成功')
}
})
}
})
.catch(() => {
});
} }
} }
); );
...@@ -312,8 +344,8 @@ ...@@ -312,8 +344,8 @@
this.BillMakingFun() this.BillMakingFun()
}) })
.catch(() => {}); .catch(() => {});
}, },
BillMakingFun(){ BillMakingFun(){
this.crmapipost( this.crmapipost(
...@@ -342,7 +374,7 @@ ...@@ -342,7 +374,7 @@
} else { } else {
this.Error(res.data.message) this.Error(res.data.message)
} }
}, },
err => {} err => {}
) )
...@@ -388,4 +420,4 @@ ...@@ -388,4 +420,4 @@
} }
} }
</script> </script>
\ No newline at end of file
...@@ -34,13 +34,13 @@ ...@@ -34,13 +34,13 @@
<ul class="opUl"> <ul class="opUl">
<li> <li>
<em>出团公司</em> <em>出团公司</em>
<el-select filterable v-model='msg.OutBranchId' <el-select filterable v-model='msg.OutBranchId'
@change='handleCurrentChange(1)' :disabled="disabled"> @change='handleCurrentChange(1)' :disabled="disabled">
<el-option label="不限" :value="-1" :key="-1"></el-option> <el-option label="不限" :value="-1" :key="-1"></el-option>
<el-option <el-option
v-for="item in companyList" v-for="item in companyList"
:label='item.BName' :label='item.BName'
:value='item.Id' :value='item.Id'
:key='item.Id' :key='item.Id'
></el-option> ></el-option>
</el-select> </el-select>
...@@ -212,27 +212,54 @@ ...@@ -212,27 +212,54 @@
} }
this.btnLoading = true; this.btnLoading = true;
this.apipost( this.apipost(
"sellcommission_SetTYSaleCommissionSend", { Month: this.Month }, "sellcommission_SetTYSaleCommissionSend", {
Month: this.Month,
IsForceSend:0
},
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.$confirm(res.data.message, "提示", { let buttomTitle
confirmButtonText: "确定", if(res.data.message.indexOf('Warning')!=-1){
cancelButtonText: "取消", buttomTitle = '强制发放'
type: "warning" }else{
}) buttomTitle = '确定'
.then(() => {}) }
.catch(() => {}); this.$confirm(res.data.message, "提示", {
confirmButtonText: buttomTitle,
cancelButtonText: "取消",
type: "warning"
})
.then(() => {
if(buttomTitle=='强制发放'){
this.btnLoading = true;
this.apipost(
"sellcommission_SetTYSaleCommissionSend", {
Month: this.Month,
IsForceSend: 1 },
res => {
this.btnLoading = false
if (res.data.resultCode == 1) {
this.handleCurrentChange(1);
this.Success('报表生成成功')
}
})
}
})
.catch(() => {
});
} }
} }
); );
}, },
// 点击制单 // 点击制单
YijianZD(item) { YijianZD(item) {
let Money let Money
if(this.msg.OutBranchId>-1){ if(this.msg.OutBranchId>-1){
if(item.BranchCommission>0){ if(item.BranchCommission>0){
Money=item.BranchCommission Money=item.BranchCommission
...@@ -240,7 +267,7 @@ ...@@ -240,7 +267,7 @@
this.Error("公司提成为0,不能制单!") this.Error("公司提成为0,不能制单!")
return; return;
} }
}else{ }else{
Money=item.SumPrice Money=item.SumPrice
} }
...@@ -267,12 +294,12 @@ ...@@ -267,12 +294,12 @@
query.id = 28 query.id = 28
query.Name = "总部销售提成单" query.Name = "总部销售提成单"
} }
this.$router.push({ this.$router.push({
path: "/addFinancialDocuments", path: "/addFinancialDocuments",
query query
}); });
}, },
gofinancialdetail(item) { gofinancialdetail(item) {
...@@ -289,4 +316,4 @@ ...@@ -289,4 +316,4 @@
} }
} }
</script> </script>
\ No newline at end of file
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