构筑物
Showing
1 changed file
with
35 additions
and
1 deletions
| ... | @@ -25,7 +25,7 @@ | ... | @@ -25,7 +25,7 @@ |
| 25 | <td colspan="2">其他建筑面积(㎡)</td> | 25 | <td colspan="2">其他建筑面积(㎡)</td> |
| 26 | <td colspan="4"><input type="text" v-model="form.qtjzmj" class="inputtitle"/></td> | 26 | <td colspan="4"><input type="text" v-model="form.qtjzmj" class="inputtitle"/></td> |
| 27 | <td colspan="2">分摊系数</td> | 27 | <td colspan="2">分摊系数</td> |
| 28 | <td colspan="4"><input type="text" v-model="form.ftxs" class="inputtitle"/></td> | 28 | <td colspan="4"><input type="number" @blur="inputBlur($event)" ref="ftxs" v-model="form.ftxs" class="inputtitle"/></td> |
| 29 | </tr> | 29 | </tr> |
| 30 | <tr> | 30 | <tr> |
| 31 | <td colspan="2">户型</td> | 31 | <td colspan="2">户型</td> |
| ... | @@ -315,6 +315,16 @@ | ... | @@ -315,6 +315,16 @@ |
| 315 | } | 315 | } |
| 316 | }, | 316 | }, |
| 317 | methods: { | 317 | methods: { |
| 318 | |||
| 319 | inputBlur(e){ | ||
| 320 | if(e.target.value!==''&&e.target.value>0&&e.target.value<10){ | ||
| 321 | e.target.style.border="" | ||
| 322 | }else{ | ||
| 323 | e.target.style.border="1px solid red"; | ||
| 324 | e.target.style.boxSizing = 'border-box'; | ||
| 325 | } | ||
| 326 | }, | ||
| 327 | |||
| 318 | lodding:function(){ | 328 | lodding:function(){ |
| 319 | this.$emit('lodding') | 329 | this.$emit('lodding') |
| 320 | }, | 330 | }, |
| ... | @@ -411,6 +421,30 @@ | ... | @@ -411,6 +421,30 @@ |
| 411 | this.fwjgTitleRowspan=1; //房屋结构的单元格垂直合并数量 | 421 | this.fwjgTitleRowspan=1; //房屋结构的单元格垂直合并数量 |
| 412 | }, | 422 | }, |
| 413 | save: function () { | 423 | save: function () { |
| 424 | |||
| 425 | this.rules=[ | ||
| 426 | { | ||
| 427 | data:this.form.ftxs, | ||
| 428 | name:'分摊系数', | ||
| 429 | dom:this.$refs.ftxs, | ||
| 430 | rule: /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/, //非空 | ||
| 431 | }, | ||
| 432 | ]; | ||
| 433 | let flag = true; | ||
| 434 | this.rules.forEach(item=>{ | ||
| 435 | if(item.rule.test(item.data) || item.data == null){ | ||
| 436 | if(item.dom.$el){ | ||
| 437 | item.dom.$el.style.border = '1px solid red'; | ||
| 438 | item.dom.$el.style.boxSizing = 'border-box'; | ||
| 439 | }else{ | ||
| 440 | item.dom.style.border = '1px solid red'; | ||
| 441 | item.dom.style.boxSizing = 'border-box'; | ||
| 442 | } | ||
| 443 | flag = false; | ||
| 444 | return false | ||
| 445 | } | ||
| 446 | }) | ||
| 447 | |||
| 414 | this.form['hbsms'] = this.bsms | 448 | this.form['hbsms'] = this.bsms |
| 415 | this.form.qlxzList= this.$refs.qlxzModule.getQlxzDataList(); | 449 | this.form.qlxzList= this.$refs.qlxzModule.getQlxzDataList(); |
| 416 | for(let i=0;i< this.form.fwjgList.length;i++){ | 450 | for(let i=0;i< this.form.fwjgList.length;i++){ | ... | ... |
-
Please register or sign in to post a comment