Commit d5676542 authored by Mac's avatar Mac

修改销售制单处理

parent d8c0b493
......@@ -184,5 +184,24 @@ export function getSaleAchievementsRankStatistics(data) {
});
}
// 获取可发放提成的用户
export function getSellCommissionSendEmployeeList(data) {
return request({
url: '/SellCommission/GetSellCommissionSendEmployeeList',
method: 'post',
data
});
}
// 设置用户已发
export function setSellCommissionSendEmployee(data) {
return request({
url: '/SellCommission/SetSellCommissionSendEmployee',
method: 'post',
data
});
}
......@@ -116,6 +116,31 @@
</div>
</template>
<el-dialog title="设置发放用户" width="700px"
:visible.sync="costmode" center >
<el-table
:data="SendEmployeeList"
border
@selection-change="handleSelectionChange"
style="width: 100%">
<el-table-column type="selection" width="55" :selectable="checkSelectable"></el-table-column>
<el-table-column prop="UserName" label="用户" > </el-table-column>
<el-table-column prop="StudentCount" label="学生数量" > </el-table-column>
<el-table-column prop="CurrentPeriodMoney" label="应发提成金额" > </el-table-column>
<el-table-column prop="IsGiveOut" label="是否已发放" >
<template slot-scope="scope">
<span v-if='scope.row.IsGiveOut==1'>已发放</span>
<span v-if='scope.row.IsGiveOut==2'>未发放</span>
</template>
</el-table-column>
</el-table>
<div style="margin-top: 10px;">金额总额:{{totalAmount}}</div>
<div slot="footer" class="dialog-footer">
<el-button class="hollowFixedBtn" @click="costmode=false">取消</el-button>
<el-button class="normalBtn" type="primary" @click="preservetransaction()">确定</el-button>
</div>
</el-dialog>
</div>
</template>
......@@ -129,7 +154,9 @@
import{
getSellCommissionPeriodsPageList,
setSellCommissionRule,
setSellCommissionInfo
setSellCommissionInfo,
getSellCommissionSendEmployeeList,
setSellCommissionSendEmployee
} from '../../api/finance/index'
export default {
meta: {
......@@ -157,7 +184,11 @@
CompanyList:[],
isgenerate:false,//是否有生成的权限
iscMaker:false,//是否有制单的权限
SendEmployeeList:[],//可发放提成的用户列表
costmode:false,
multipleSelection:[],
totalAmount:0,//选中的金额总额
CheckID:0,
}
},
created() {
......@@ -232,6 +263,7 @@
});
},
generalFinancacls(item) {
this.CheckID = item.Id
if(this.msg.SchoolId == -1){
if(item.SumPrice>0){
this.tishi(item.SumPrice,item.Id)
......@@ -291,13 +323,63 @@
focus: true
}
}).onOk(() => {
this.goaddFinancial(Money,Id)
// this.goaddFinancial(Money,Id)
this.getcomSendEmployeeList(Id)
});
},
getcomSendEmployeeList(Id){//获取可发放提成的用户
getSellCommissionSendEmployeeList({PeriodId:Id}).then(res => {
this.SendEmployeeList = res.Data.Data;
this.costmode = true
}).catch(() => {
})
},
handleCurrentChanges(val){
this.msg.PageIndex= val;
this.getList()
},
checkSelectable(row){
return row.showInventoryNum==2
},
handleSelectionChange(val) {
this.multipleSelection = val;
let zong = 0
this.multipleSelection.forEach(x=>{
zong +=x.CurrentPeriodMoney
})
this.totalAmount = zong
},
preservetransaction(){
let that = this
this.$q.dialog({
title: "设置用户状态",
message: "确认后无法更改用户制单状态,如果需修改请联系管理员",
persistent: true,
cancel: {
label: "取消",
flat: true
},
ok: {
label: "确认",
flat: true,
focus: true
}
}).onOk(() => {
let EmpIds = '';
let data = []
this.multipleSelection.forEach(x=>{
data.push(x.UserId)
})
EmpIds = data.join(',')
setSellCommissionSendEmployee({PeriodId:this.CheckID,EmpIds:EmpIds}).then(res => {
this.goaddFinancial(this.totalAmount,this.CheckID)
this.$message.success('设置成功');
}).catch(() => {
})
});
}
},
......
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