|
|
|
@ -78,7 +78,13 @@ |
|
|
|
<!-- 创建规则 --> |
|
|
|
<a-modal v-model="visible2" title="创建规则" width="1186px" :bodyStyle="modeStyle"> |
|
|
|
<div > |
|
|
|
<a-row justify="space-between" class="modal_select" v-for="(item,index) in query1" :key="index"> |
|
|
|
<div class="query_item rule_item rule_item2"> |
|
|
|
<!-- <a-col :span="5" > --> |
|
|
|
<span>规则名称:</span> |
|
|
|
<a-input v-model="query1.rule_name"/> |
|
|
|
<!-- </a-col> --> |
|
|
|
</div> |
|
|
|
<a-row justify="space-between" class="modal_select" v-for="(item,index) in query1.ratio" :key="index"> |
|
|
|
<a-col :span="5" class="query_item rule_item"> |
|
|
|
<span>角色名称:</span> |
|
|
|
<a-select v-model="item.role_type"> |
|
|
|
@ -106,6 +112,7 @@ |
|
|
|
</a-select> |
|
|
|
<a-input v-model="item.amount" v-if="item.calculate==2"/> |
|
|
|
<a-input v-model="item.ratio" v-if="item.calculate==1"/> |
|
|
|
<span class="rule_item_span">%</span> |
|
|
|
</a-col> |
|
|
|
<!-- <a-col :span="6" class="query_item rule_item" > |
|
|
|
<span>结算周期:</span> |
|
|
|
@ -156,11 +163,14 @@ import {ratioList,getUser,ratioStatus,setRatio,ratioDetail}from '../../../api/in |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
return{ |
|
|
|
query1:[ |
|
|
|
query1:{ |
|
|
|
ratio:[ |
|
|
|
{role_type:'1',cost_type:'1',calculate:'1',amount:'',ratio:null,}, |
|
|
|
{role_type:'2',cost_type:'1',calculate:'1',amount:'',ratio:null,}, |
|
|
|
{role_type:'3',cost_type:'1',calculate:'1',amount:'',ratio:null,}, |
|
|
|
], |
|
|
|
rule_name:'' |
|
|
|
}, |
|
|
|
pageSizeOptions: ['10', '20', '30', '40', '50'], |
|
|
|
//一页多少条 |
|
|
|
pageSize:10, |
|
|
|
@ -283,16 +293,17 @@ export default { |
|
|
|
}, |
|
|
|
// 重置query |
|
|
|
resetQurey1(){ |
|
|
|
for(let i=0;i<this.query1.length;i++){ |
|
|
|
this.query1[i].ratio='' |
|
|
|
for(let i=0;i<this.query1.ratio.length;i++){ |
|
|
|
this.query1.ratio[i].ratio='' |
|
|
|
} |
|
|
|
this.query1.rule_name='' |
|
|
|
}, |
|
|
|
addRule(){ |
|
|
|
if(parseInt(this.query1[0].ratio)+parseInt(this.query1[2].ratio)!=100){ |
|
|
|
if(parseInt(this.query1.ratio[0].ratio)+parseInt(this.query1.ratio[2].ratio)!=100){ |
|
|
|
this.$message.error('授权方和平台方的加起来比列要等于100'); |
|
|
|
return |
|
|
|
} |
|
|
|
let data={ratio:this.query1} |
|
|
|
let data=this.query1 |
|
|
|
setRatio(data).then(res=>{ |
|
|
|
if(res.code==200){ |
|
|
|
this.$message.success('创建成功!'); |
|
|
|
@ -357,4 +368,13 @@ export default { |
|
|
|
margin-left: 80px; |
|
|
|
margin-right: 70px; |
|
|
|
} |
|
|
|
.rule_item_span{ |
|
|
|
display: inline-block; |
|
|
|
margin-left: 10px; |
|
|
|
min-width: auto !important; |
|
|
|
} |
|
|
|
.rule_item2 .ant-input{ |
|
|
|
margin-left: 0; |
|
|
|
width: auto; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|