Browse Source

优化

master
ltlzx 4 years ago
parent
commit
7e94b1da1a
  1. 12
      src/components/dateSelect/index.vue
  2. 32
      src/components/page/fundSettlement/splitProportion.vue

12
src/components/dateSelect/index.vue

@ -78,7 +78,7 @@
<div>{{entrust_goods.goods[0].goods_type==1?'文化资源数据':'文化数字内容'}}-关联资源</div>
</div>
<div class="tab_content">
<p class="tab_content_title">文化资源数据集</p>
<p class="tab_content_title">{{entrust_goods.goods[0].goods_type==1?'文化资源数据':'文化数字内容'}}</p>
</div>
<div class="content_table">
<a-table :columns="columns1" :data-source="entrust_goods.source_gather" bordered :pagination="false">
@ -88,12 +88,12 @@
</a-table>
</div>
<div class="tab_content">
<!-- <div class="tab_content">
<p class="tab_content_title">文化资源数据</p>
</div>
<div class="content_table">
<a-table :columns="columns" :data-source="entrust_goods.source" bordered :pagination="false"></a-table>
</div>
</div> -->
</div>
</a-tab-pane>
@ -112,7 +112,7 @@
<div class="tab_body">
<div class="tab_body_title">
<p class="tab_body_title_bg"></p>
<div>文化资源数据-基本信息</div>
<div>{{sourceDate.collectionType}}-基本信息</div>
</div>
<div class="tab_content ">
<div class="tab_content_infoImg">
@ -150,7 +150,7 @@
<div class="tab_body_title">
<p class="tab_body_title_bg"></p>
<div>文化资源数据-关联资源</div>
<div>{{sourceDate.collectionType}}-关联资源</div>
</div>
<div v-for="(item,index) in sourceDate.entrust_goods.source" :key="index">
<div class="tab_content">
@ -303,6 +303,7 @@
if(res.data.length!=0){
this.userinfo=res.data.userinfo
this.entrust_goods=res.data.entrust_goods
this.columns1[0].title=this.entrust_goods.goods[0].goods_type==1?'文化资源数据集名称': '文化数字内容集名称'
}
}else{
this.$message.error(res.msg);
@ -330,6 +331,7 @@
let goods=[res.data.entrust_goods.goods]
this.entrust_goods=res.data.entrust_goods
this.entrust_goods.goods=goods
this.columns1[0].title=this.entrust_goods.goods[0].goods_type==1?'文化资源数据集名称': '文化数字内容集名称'
}else{
this.$message.error(res.msg);
}

32
src/components/page/fundSettlement/splitProportion.vue

@ -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>

Loading…
Cancel
Save