Commit 8e1affdd authored by zhengke's avatar zhengke

no message

parent 16e07c7f
...@@ -29,8 +29,7 @@ ...@@ -29,8 +29,7 @@
> >
<tr> <tr>
<th width="100" style="min-width: 100px;max-width: 100px;">方案名称</th> <th width="100" style="min-width: 100px;max-width: 100px;">方案名称</th>
<th width="100" style="min-width: 100px;max-width: 100px;">类型</th> <th width="100%" class="left-text-indent">提成人员</th>
<th width="100%">提成人员</th>
<th width="150" style="min-width: 150px;max-width: 150px;">创建时间</th> <th width="150" style="min-width: 150px;max-width: 150px;">创建时间</th>
<th width="150" style="min-width: 150px;max-width: 150px;">操作</th> <th width="150" style="min-width: 150px;max-width: 150px;">操作</th>
</tr> </tr>
...@@ -38,15 +37,12 @@ ...@@ -38,15 +37,12 @@
<td> <td>
<span>{{item.Name}}</span> <span>{{item.Name}}</span>
</td> </td>
<td> <td style="padding: 0 10px;" class="left-text-indent">
<span>{{item.EmpType==1?'销售':'引流'}}</span>
</td>
<td style="padding: 0 10px;">
<span v-for="(son,sIndex ) in item.EmpList" :key="sIndex"> <span v-for="(son,sIndex ) in item.EmpList" :key="sIndex">
<span v-if="sIndex<8">{{ son.EmName }}{{item.EmpList.length==sIndex+1?'':'、'}}</span> <span v-if="sIndex<19">{{ son.EmName }}{{item.EmpList.length==sIndex+1?'':'、'}}</span>
</span> </span>
<el-popover <el-popover
v-if="item.EmpList.length>=9" v-if="item.EmpList.length>=20"
placement="top-start" placement="top-start"
title="提成人员" title="提成人员"
width="400" width="400"
...@@ -76,14 +72,21 @@ ...@@ -76,14 +72,21 @@
> >
<tr> <tr>
<td rowspan="2" width="100" style="min-width: 100px;">工资{{textId==1?'利润':'比例'}}</td> <td rowspan="2" width="100" style="min-width: 100px;">工资</td>
<th style="min-width: 220px;" <th style="min-width: 220px;"
v-for="( son , sIndex ) in item.WageRateList" v-for="( son , sIndex ) in item.WageRateList"
:key="sIndex" :key="sIndex"
>{{ son.StartValue }} <span>{{son.EndValue && son.EndValue!=-1?'<业绩<=':'<业绩'}}</span><span v-if="son.EndValue && son.EndValue!=-1">{{ son.EndValue }}</span></th> >
<template v-if="item.EmpType==2">
{{ '引流'+son.StartValue+'条, ' }} <span>{{son.EndValue && son.EndValue!=-1?'成交单数 ':'成交单数 '}}</span><span v-if="son.EndValue && son.EndValue!=-1">{{ son.EndValue }}</span>
</template>
<template v-if="item.EmpType==1">
{{ son.StartValue }} <span>{{son.EndValue && son.EndValue!=-1?'<利润<=':'<利润'}}</span><span v-if="son.EndValue && son.EndValue!=-1">{{ son.EndValue }}</span>
</template>
</th>
</tr> </tr>
<tr> <tr>
<td style="min-width: 220px;" v-for="( son , sIndex ) in item.WageRateList" :key="sIndex">{{ son.Rate }}%</td> <td style="min-width: 220px;" v-for="( son , sIndex ) in item.WageRateList" :key="sIndex">{{ son.Rate }}</td>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -96,14 +99,14 @@ ...@@ -96,14 +99,14 @@
> >
<tr> <tr>
<td rowspan="2" width="100" style="min-width: 100px;">提成{{textId==1?'利润':'比例'}}</td> <td rowspan="2" width="100" style="min-width: 100px;">提成比例</td>
<th style="min-width: 220px;" <th style="min-width: 220px;"
v-for="( son , sIndex ) in item.CommissionRateList" v-for="( son , sIndex ) in item.CommissionRateList"
:key="sIndex" :key="sIndex"
>{{ son.StartValue }} <span>{{son.EndValue && son.EndValue!=-1?'<业绩<=':'<业绩'}}</span><span v-if="son.EndValue && son.EndValue!=-1">{{ son.EndValue }}</span></th> >{{ son.StartValue }} <span>{{son.EndValue && son.EndValue!=-1?'<业绩<=':'<业绩'}}</span><span v-if="son.EndValue && son.EndValue!=-1">{{ son.EndValue }}</span></th>
</tr> </tr>
<tr> <tr>
<td style="min-width: 220px;" v-for="( son , sIndex ) in item.CommissionRateList" :key="sIndex">{{ son.Rate }}%</td> <td style="min-width: 220px;" v-for="( son , sIndex ) in item.CommissionRateList" :key="sIndex">{{ son.Rate }}</td>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -115,14 +118,14 @@ ...@@ -115,14 +118,14 @@
cellpadding="0" cellpadding="0"
> >
<tr> <tr>
<td rowspan="2" width="100" style="min-width: 100px;">年终{{textId==1?'利润':'比例'}}</td> <td rowspan="2" width="100" style="min-width: 100px;">年终比例</td>
<th style="min-width: 220px;" <th style="min-width: 220px;"
v-for="( son , sIndex ) in item.BonusRateList" v-for="( son , sIndex ) in item.BonusRateList"
:key="sIndex" :key="sIndex"
>{{ son.StartValue }} <span>{{son.EndValue && son.EndValue!=-1?'<业绩<=':'<业绩'}}</span><span v-if="son.EndValue && son.EndValue!=-1">{{ son.EndValue }}</span></th> >{{ son.StartValue }} <span>{{son.EndValue && son.EndValue!=-1?'<业绩<=':'<业绩'}}</span><span v-if="son.EndValue && son.EndValue!=-1">{{ son.EndValue }}</span></th>
</tr> </tr>
<tr> <tr>
<td style="min-width: 220px;" v-for="( son , sIndex ) in item.BonusRateList" :key="sIndex">{{ son.Rate }}%</td> <td style="min-width: 220px;" v-for="( son , sIndex ) in item.BonusRateList" :key="sIndex">{{ son.Rate }}</td>
</tr> </tr>
</table> </table>
</div> </div>
...@@ -133,7 +136,7 @@ ...@@ -133,7 +136,7 @@
>暂无数据</div> >暂无数据</div>
</template> </template>
<el-dialog :title="titleName" :visible.sync="ruleVisible" width="750px"> <el-dialog :title="titleName" :visible.sync="ruleVisible" width="750px" @close="resetForm('form')">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<div class="ImpressionTicketing-msgbox"> <div class="ImpressionTicketing-msgbox">
<el-form-item label="规则名称" prop="Name"> <el-form-item label="规则名称" prop="Name">
...@@ -147,15 +150,15 @@ ...@@ -147,15 +150,15 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
<el-form-item class="ImpressionTicketing-OuterFrame" label="基本工资比列"> <el-form-item class="ImpressionTicketing-OuterFrame" label="工资比列">
<div class="ImpressionTicketing-msgbox" <div class="ImpressionTicketing-msgbox"
v-for="(item,index) in form.WageRateList" :key="index"> v-for="(item,index) in form.WageRateList" :key="index">
<div> <div>
<el-form-item <el-form-item
:label="form.WageRateList.length>0?`开始值 ${index+1} `:` ` " :label="msg.EmpType==1&&form.WageRateList.length>0?`${hintStart} ${index+1} `:`${hintStart} ${index+1} ` "
:prop="`WageRateList.${index}.StartValue`" :prop="`WageRateList.${index}.StartValue`"
:rules="rules.StartValue" :rules="rules.StartValue"
label-width="90px" label-width="100px"
label-position="left"> label-position="left">
<el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999" <el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999"
v-model="item.StartValue" clearable></el-input> v-model="item.StartValue" clearable></el-input>
...@@ -163,21 +166,21 @@ ...@@ -163,21 +166,21 @@
</div> </div>
<div> <div>
<el-form-item <el-form-item
:label="form.WageRateList.length>0?`结束值 ${index+1} `:` ` " :label="msg.EmpType==1&&form.WageRateList.length>0?`${hintEnd} ${index+1} `:`${hintEnd} ${index+1} ` "
:prop="`WageRateList.${index}.EndValue`" :prop="`WageRateList.${index}.EndValue`"
:rules="rules.EndValue" :rules="rules.EndValue"
label-width="90px" label-width="100px"
label-position="left"> label-position="left">
<el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999" <el-input-number type="number" :min="-1" :max="99999999"
v-model="item.EndValue" clearable></el-input> v-model="item.EndValue" clearable :controls="false"></el-input-number>
</el-form-item> </el-form-item>
</div> </div>
<div> <div>
<el-form-item <el-form-item
:label="form.WageRateList.length>0?`金额 ${index+1} `:` ` " :label="form.WageRateList.length>0?`工资 ${index+1} `:` ` "
:prop="`WageRateList.${index}.Rate`" :prop="`WageRateList.${index}.Rate`"
:rules="rules.Rate" :rules="rules.Rate"
label-width="90px" label-width="100px"
label-position="left"> label-position="left">
<el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999" <el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999"
v-model="item.Rate"></el-input> v-model="item.Rate"></el-input>
...@@ -196,7 +199,7 @@ ...@@ -196,7 +199,7 @@
:label="form.CommissionRateList.length>0?`开始值 ${index+1} `:` ` " :label="form.CommissionRateList.length>0?`开始值 ${index+1} `:` ` "
:prop="`CommissionRateList.${index}.StartValue`" :prop="`CommissionRateList.${index}.StartValue`"
:rules="rules.StartValue" :rules="rules.StartValue"
label-width="90px" label-width="100px"
label-position="left"> label-position="left">
<el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999" <el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999"
v-model="item.StartValue" clearable></el-input> v-model="item.StartValue" clearable></el-input>
...@@ -207,18 +210,18 @@ ...@@ -207,18 +210,18 @@
:label="form.CommissionRateList.length>0?`结束值 ${index+1} `:` ` " :label="form.CommissionRateList.length>0?`结束值 ${index+1} `:` ` "
:prop="`CommissionRateList.${index}.EndValue`" :prop="`CommissionRateList.${index}.EndValue`"
:rules="rules.EndValue" :rules="rules.EndValue"
label-width="90px" label-width="100px"
label-position="left"> label-position="left">
<el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999" <el-input-number type="number" :min="-1" :max="99999999"
v-model="item.EndValue" clearable></el-input> v-model="item.EndValue" clearable :controls="false"></el-input-number>
</el-form-item> </el-form-item>
</div> </div>
<div> <div>
<el-form-item <el-form-item
:label="form.CommissionRateList.length>0?`金额 ${index+1} `:` ` " :label="form.CommissionRateList.length>0?`工资 ${index+1} `:` ` "
:prop="`CommissionRateList.${index}.Rate`" :prop="`CommissionRateList.${index}.Rate`"
:rules="rules.Rate" :rules="rules.Rate"
label-width="90px" label-width="100px"
label-position="left"> label-position="left">
<el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999" <el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999"
v-model="item.Rate"></el-input> v-model="item.Rate"></el-input>
...@@ -237,7 +240,7 @@ ...@@ -237,7 +240,7 @@
:label="form.BonusRateList.length>0?`开始值 ${index+1} `:` ` " :label="form.BonusRateList.length>0?`开始值 ${index+1} `:` ` "
:prop="`BonusRateList.${index}.StartValue`" :prop="`BonusRateList.${index}.StartValue`"
:rules="rules.StartValue" :rules="rules.StartValue"
label-width="90px" label-width="100px"
label-position="left"> label-position="left">
<el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999" <el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999"
v-model="item.StartValue" clearable></el-input> v-model="item.StartValue" clearable></el-input>
...@@ -248,18 +251,18 @@ ...@@ -248,18 +251,18 @@
:label="form.BonusRateList.length>0?`结束值 ${index+1} `:` ` " :label="form.BonusRateList.length>0?`结束值 ${index+1} `:` ` "
:prop="`BonusRateList.${index}.EndValue`" :prop="`BonusRateList.${index}.EndValue`"
:rules="rules.EndValue" :rules="rules.EndValue"
label-width="90px" label-width="100px"
label-position="left"> label-position="left">
<el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999" <el-input-number type="number" :min="-1" :max="99999999"
v-model="item.EndValue" clearable></el-input> v-model="item.EndValue" clearable :controls="false"></el-input-number>
</el-form-item> </el-form-item>
</div> </div>
<div> <div>
<el-form-item <el-form-item
:label="form.BonusRateList.length>0?`金额 ${index+1} `:` ` " :label="form.BonusRateList.length>0?`工资 ${index+1} `:` ` "
:prop="`BonusRateList.${index}.Rate`" :prop="`BonusRateList.${index}.Rate`"
:rules="rules.Rate" :rules="rules.Rate"
label-width="90px" label-width="100px"
label-position="left"> label-position="left">
<el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999" <el-input onkeyup="this.value=this.value.replace(/[^\d.]/g,'');" :min="0" :max="99999999"
v-model="item.Rate"></el-input> v-model="item.Rate"></el-input>
...@@ -274,7 +277,7 @@ ...@@ -274,7 +277,7 @@
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button size="small" @click="ruleVisible = false,resetForm('form')">取 消</el-button> <el-button size="small" @click="ruleVisible = false,resetForm('form')">取 消</el-button>
<el-button size="small" type="danger" @click="RulesOk('form')" :disabled="ruleLoading">确 定</el-button> <el-button size="small" type="danger" @click="RulesOk('form')" :loading="ruleLoading">确 定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
...@@ -290,7 +293,7 @@ ...@@ -290,7 +293,7 @@
Name: [{ Name: [{
required: true, required: true,
message: '请输入规则名称', message: '请输入规则名称',
trigger: 'change' trigger: "blur"
}], }],
EmployeeId: [{ EmployeeId: [{
required: true, required: true,
...@@ -318,19 +321,19 @@ ...@@ -318,19 +321,19 @@
], ],
WageRateList://工资阶梯列表 WageRateList://工资阶梯列表
{ {
StartValue:null, StartValue:0,
EndValue:null, EndValue:null,
Rate:null Rate:null
}, },
CommissionRateList://提成阶梯列表 CommissionRateList://提成阶梯列表
{ {
StartValue:null, StartValue:0,
EndValue:null, EndValue:null,
Rate:null Rate:null
}, },
BonusRateList://年终奖阶梯列表 BonusRateList://年终奖阶梯列表
{ {
StartValue:null, StartValue:0,
EndValue:null, EndValue:null,
Rate:null Rate:null
} }
...@@ -345,21 +348,21 @@ ...@@ -345,21 +348,21 @@
], ],
WageRateList:[//工资阶梯列表 WageRateList:[//工资阶梯列表
{ {
StartValue:null, StartValue:0,
EndValue:null, EndValue:null,
Rate:null Rate:null
} }
], ],
CommissionRateList:[//提成阶梯列表 CommissionRateList:[//提成阶梯列表
{ {
StartValue:null, StartValue:0,
EndValue:null, EndValue:null,
Rate:null Rate:null
} }
], ],
BonusRateList:[//年终奖阶梯列表 BonusRateList:[//年终奖阶梯列表
{ {
StartValue:null, StartValue:0,
EndValue:null, EndValue:null,
Rate:null Rate:null
} }
...@@ -377,7 +380,9 @@ ...@@ -377,7 +380,9 @@
dataList:[], dataList:[],
msg:{ msg:{
EmpType: '2' EmpType: '2'
} },
hintStart:'',
hintEnd:'',
} }
}, },
created() {}, created() {},
...@@ -411,15 +416,31 @@ ...@@ -411,15 +416,31 @@
this.ruleVisible = true this.ruleVisible = true
if(this.msg.EmpType=='1'){ if(this.msg.EmpType=='1'){
this.titleName = '销售规则' this.titleName = '销售规则'
}else{ this.hintStart = '开始值'
this.hintEnd = '结束值'
this.rules.StartValue[0].message = '请输入开始值'
this.rules.EndValue[0].message = '请输入结束值'
}if(this.msg.EmpType=='2'){
this.titleName = '引流规则' this.titleName = '引流规则'
this.hintStart = '引流条数'
this.hintEnd = '成交单数'
this.rules.StartValue[0].message = '请输入引流条数'
this.rules.EndValue[0].message = '请输入成交单数'
} }
}, },
SetRules(item){//编辑 SetRules(item){//编辑
if(this.msg.EmpType=='1'){ if(this.msg.EmpType=='1'){
this.titleName = '销售规则' this.titleName = '销售规则'
}else{ this.hintStart = '开始值'
this.hintEnd = '结束值'
this.rules.StartValue[0].message = '请输入开始值'
this.rules.EndValue[0].message = '请输入结束值'
}if(this.msg.EmpType=='2'){
this.titleName = '引流规则' this.titleName = '引流规则'
this.hintStart = '引流条数'
this.hintEnd = '成交单数'
this.rules.StartValue[0].message = '请输入引流条数'
this.rules.EndValue[0].message = '请输入成交单数'
} }
let list = [] let list = []
item.EmpList.forEach(x => { item.EmpList.forEach(x => {
...@@ -429,6 +450,7 @@ ...@@ -429,6 +450,7 @@
list.push(data) list.push(data)
}); });
this.ruleVisible = true; this.ruleVisible = true;
item = JSON.parse(JSON.stringify(item))
this.form = { this.form = {
Id:item.Id, Id:item.Id,
Name:item.Name,//规则名称 Name:item.Name,//规则名称
...@@ -447,6 +469,7 @@ ...@@ -447,6 +469,7 @@
type: "warning" type: "warning"
}) })
.then(() => { .then(() => {
this.getList()
return return
this.apipost('ViittoCommission_post_RemoveViittoCommissionRuleService', { this.apipost('ViittoCommission_post_RemoveViittoCommissionRuleService', {
ID: item.Id ID: item.Id
...@@ -520,6 +543,14 @@ ...@@ -520,6 +543,14 @@
this.loading = false; this.loading = false;
if (res.data.resultCode == 1) { if (res.data.resultCode == 1) {
this.dataList = res.data.data; this.dataList = res.data.data;
this.dataList.forEach(j=>{
if(j.EmpList.length>=20){//部门人员
j.EmpListtext = '';
j.EmpList.forEach(x=>{
j.EmpListtext = j.EmpListtext+x.EmName+'、'
})
}
})
}else{ }else{
this.Error(res.data.message) this.Error(res.data.message)
} }
...@@ -530,7 +561,7 @@ ...@@ -530,7 +561,7 @@
let userInfo = this.getLocalStorage() let userInfo = this.getLocalStorage()
let msg = { let msg = {
GroupId: userInfo.RB_Group_id, GroupId: userInfo.RB_Group_id,
BranchId: '49', BranchId: '-1',
DepartmentId: '-1', DepartmentId: '-1',
PostId: '-1', PostId: '-1',
IsLeave: '0' IsLeave: '0'
...@@ -580,6 +611,7 @@ ...@@ -580,6 +611,7 @@
], ],
}; };
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
this.getList()
}, },
} }
} }
...@@ -626,5 +658,14 @@ ...@@ -626,5 +658,14 @@
.ImpressionTicketing-title{ .ImpressionTicketing-title{
padding: 0; padding: 0;
} }
.left-text-indent{
text-align: left;
text-indent: 20px
}
/deep/.el-input-number{
width: inherit;
}
/deep/.el-input-number .el-input__inner{
text-align: left;
}
</style> </style>
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