Commit f05aa71d by WF1020

litdav修改

parent 4ecb05f4
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<c-col :span="5"> <c-col :span="5">
<el-form-item label="待支付金额" prop="brdgrp.rec.totamt"> <el-form-item label="待支付金额" prop="brdgrp.rec.totamt">
<c-input v-model="model.brdgrp.rec.totamt" placeholder="请输入金额"></c-input> <c-input v-model="totamt" placeholder="请输入金额"></c-input>
</el-form-item> </el-form-item>
</c-col> </c-col>
</c-col> </c-col>
...@@ -134,25 +134,33 @@ export default { ...@@ -134,25 +134,33 @@ export default {
}, },
methods: {}, methods: {},
created: function() {}, created: function() {},
computed: {
totamt(){
this.model.brdgrp.rec.totamt =
parseFloat(isNaN(this.model.brdgrp.cbs.max.amt) ? 0 : this.model.brdgrp.cbs.max.amt) +
parseFloat(isNaN(this.model.brdgrp.cbs.max2.amt) ? 0 : this.model.brdgrp.cbs.max2.amt)
watch:{ return this.model.brdgrp.rec.totamt
"model.brdgrp.cbs.max.amt":{
handler(val,oldVal){
this.model.brdgrp.rec.totamt = parseFloat(val)+parseFloat(this.model.brdgrp.cbs.max2.amt)
if(isNaN(this.model.brdgrp.rec.totamt)){
this.model.brdgrp.rec.totamt=0
}
}
},
"model.brdgrp.cbs.max2.amt":{
handler(val,oldVal){
this.model.brdgrp.rec.totamt = parseFloat(val)+parseFloat(this.model.brdgrp.cbs.max.amt)
if(isNaN(this.model.brdgrp.rec.totamt)){
this.model.brdgrp.rec.totamt=0
}
}
} }
} }
// watch:{
// "model.brdgrp.cbs.max.amt":{
// handler(val,oldVal){
// this.model.brdgrp.rec.totamt = parseFloat(val)+parseFloat(this.model.brdgrp.cbs.max2.amt)
// if(isNaN(this.model.brdgrp.rec.totamt)){
// this.model.brdgrp.rec.totamt=0
// }
// }
// },
// "model.brdgrp.cbs.max2.amt":{
// handler(val,oldVal){
// this.model.brdgrp.rec.totamt = parseFloat(val)+parseFloat(this.model.brdgrp.cbs.max.amt)
// if(isNaN(this.model.brdgrp.rec.totamt)){
// this.model.brdgrp.rec.totamt=0
// }
// }
// }
// }
}; };
</script> </script>
......
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