Browse Source

优化

master
陈裕财 4 years ago
parent
commit
dc39bf7341
  1. 62
      src/views/xm/core/xmTask/XmTaskEdit.vue

62
src/views/xm/core/xmTask/XmTaskEdit.vue

@ -324,7 +324,7 @@
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<el-form-item label="热门费用" prop="hotFee" v-if="editForm.hot==='1' && editForm.taskOut==='1'"> <el-form-item label="热门费用" prop="hotFee" v-if="editForm.hot==='1' && editForm.taskOut==='1'">
{{editForm.hotFee}}&nbsp;
{{needPayMarketAt.hotFee}}&nbsp;
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -337,7 +337,7 @@
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<el-form-item label="置顶费用" prop="topFee" v-if="editForm.top==='1' && editForm.taskOut==='1'"> <el-form-item label="置顶费用" prop="topFee" v-if="editForm.top==='1' && editForm.taskOut==='1'">
{{editForm.topFee}}&nbsp;
{{needPayMarketAt.topFee}}&nbsp;
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -350,7 +350,7 @@
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<el-form-item label="加急费用" prop="urgentFee" v-if="editForm.urgent==='1' && editForm.taskOut==='1'"> <el-form-item label="加急费用" prop="urgentFee" v-if="editForm.urgent==='1' && editForm.taskOut==='1'">
{{editForm.urgentFee}}&nbsp;
{{needPayMarketAt.urgentFee}}&nbsp;
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -363,13 +363,13 @@
</el-col> </el-col>
<el-col :span="18"> <el-col :span="18">
<el-form-item label="客服包办费用" prop="crmSupFee" v-if="editForm.crmSup==='1' && editForm.taskOut==='1'"> <el-form-item label="客服包办费用" prop="crmSupFee" v-if="editForm.crmSup==='1' && editForm.taskOut==='1'">
{{editForm.crmSupFee}}&nbsp;
{{needPayMarketAt.crmSupFee}}&nbsp;
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
</el-col> </el-col>
<el-col :span="6" v-if="needPayMarketAt>0">
<strong> 合计待付款:</strong>&nbsp;&nbsp;<font style="font-size:48px;color:red;"> {{needPayMarketAt}}&nbsp;</font>
<el-col :span="6" v-if="needPayMarketAt.total>0">
<strong> 合计待付款:</strong>&nbsp;&nbsp;<font style="font-size:48px;color:red;"> {{needPayMarketAt.total}}&nbsp;</font>
<br/> <br/>
<el-button class="padding" @click="toPayMarketVisible=true" type="primary">去付款</el-button> <el-button class="padding" @click="toPayMarketVisible=true" type="primary">去付款</el-button>
</el-col> </el-col>
@ -465,30 +465,36 @@
needPayEfundsAt(){ needPayEfundsAt(){
var toPayAt=0; var toPayAt=0;
if(this.editForm.estate=='1' && this.editForm.crowd==='1' && this.editForm.bidStep=='4'){ if(this.editForm.estate=='1' && this.editForm.crowd==='1' && this.editForm.bidStep=='4'){
toPayAt=toPayAt+parseFloat(this.editForm.efunds||this.editForm.budgetAt)
toPayAt=toPayAt+parseFloat(this.editForm.efunds||this.editForm.quoteFinalAt)
} }
return toPayAt; return toPayAt;
}, },
needPayMarketAt(){ needPayMarketAt(){
debugger;
var toPayAtObj={total:0,topFee:0,hotFee:0,urgentFee:0,crmSup:0,shareFee:0}
var toPayAt=0; var toPayAt=0;
var extInfos=this.doInitMarket(this.dicts.crowd_task_market)
Object.assign(toPayAtObj,extInfos)
if(this.editForm.oshare=='1'){ if(this.editForm.oshare=='1'){
toPayAt=toPayAt+parseFloat(this.editForm.shareFee||0) toPayAt=toPayAt+parseFloat(this.editForm.shareFee||0)
} }
if(this.editForm.top=='1'){ if(this.editForm.top=='1'){
toPayAt=toPayAt+parseFloat(this.editForm.topFee||0)
toPayAt=toPayAt+parseFloat(extInfos.topFee||0)
} }
if(this.editForm.hot=='1'){ if(this.editForm.hot=='1'){
toPayAt=toPayAt+parseFloat(this.editForm.hotFee||0)
toPayAt=toPayAt+parseFloat(extInfos.hotFee||0)
} }
if(this.editForm.urgent=='1'){ if(this.editForm.urgent=='1'){
toPayAt=toPayAt+parseFloat(this.editForm.urgentFee||0)
toPayAt=toPayAt+parseFloat(extInfos.urgentFee||0)
} }
if(this.editForm.crmSup=='1'){ if(this.editForm.crmSup=='1'){
toPayAt=toPayAt+parseFloat(this.editForm.crmSupFee||0)
toPayAt=toPayAt+parseFloat(extInfos.crmSupFee||0)
} }
return toPayAt;
}
toPayAtObj.total=toPayAt;
return toPayAtObj;
},
}, },
props:['xmTask','visible','xmProject',"parentTask"], props:['xmTask','visible','xmProject',"parentTask"],
watch: { watch: {
@ -502,8 +508,7 @@
this.setSkills() this.setSkills()
this.activateTabPaneName="2" this.activateTabPaneName="2"
this.supRequires=this.editForm.supRequires?this.editForm.supRequires.split(","):[] this.supRequires=this.editForm.supRequires?this.editForm.supRequires.split(","):[]
this.doAddXmRecordVisit()
this.doInitMarket(this.dicts.crowd_task_market)
this.doAddXmRecordVisit()
// //
} }
}, },
@ -521,7 +526,7 @@
xmTaskSettleSchemel:[], xmTaskSettleSchemel:[],
bidStep:[], bidStep:[],
marketState:[], marketState:[],
crowd_task_market:null,
crowd_task_market:{},
},// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]} },// params=[{categoryId:'0001',itemCode:'sex'}] {'sex':[{optionValue:'1',optionName:'',seqOrder:'1',fp:'',isDefault:'0'},{optionValue:'2',optionName:'',seqOrder:'2',fp:'',isDefault:'0'}]}
load:{ list: false, edit: false, del: false, add: false },//... load:{ list: false, edit: false, del: false, add: false },//...
editFormRules: { editFormRules: {
@ -595,30 +600,19 @@
} }
}); });
}, },
doInitMarket(data){
doInitMarket(data){
if(!data){ if(!data){
return;
return {};
} }
var extInfos=new Map();
var extInfos={};
if(data.extInfos){ if(data.extInfos){
var ext=JSON.parse(data.extInfos) var ext=JSON.parse(data.extInfos)
ext.forEach(k=>{ ext.forEach(k=>{
extInfos.set(k.id,k.value)
extInfos[k.id]=k.value
}) })
} }
if(this.editForm.top=='1'){
this.editForm.topFee=parseFloat(extInfos.get("topFee")||0)
}
if(this.editForm.hot=='1'){
this.editForm.hotFee=parseFloat(extInfos.get("hotFee")||0)
}
if(this.editForm.urgent=='1'){
this.editForm.urgentFee=parseFloat(extInfos.get("urgentFee")||0)
}
if(this.editForm.crmSup=='1'){
this.editForm.crmSupFee=parseFloat(extInfos.get("crmSupFee")||0)
}
return extInfos;
}, },
formatDate: function(time) { formatDate: function(time) {
const date = new Date(time); const date = new Date(time);
@ -918,9 +912,7 @@
this.supRequires=this.editForm.supRequires?this.editForm.supRequires.split(","):[] this.supRequires=this.editForm.supRequires?this.editForm.supRequires.split(","):[]
this.setSkills(); this.setSkills();
this.doAddXmRecordVisit() this.doAddXmRecordVisit()
initSysDicts(this).then(res=>{
this.doInitMarket(res.data.data.crowd_task_market)
})
initSysDicts(this)
}) })
/**在下面写其它函数***/ /**在下面写其它函数***/

Loading…
Cancel
Save