Merge branch 'master' of http://yun.pashanhoo.com:9090/renchao/CadastralSystem
Showing
2 changed files
with
14 additions
and
4 deletions
| ... | @@ -314,7 +314,7 @@ | ... | @@ -314,7 +314,7 @@ |
| 314 | methods: { | 314 | methods: { |
| 315 | 315 | ||
| 316 | inputBlur(e){ | 316 | inputBlur(e){ |
| 317 | if(e.target.value!==''&&e.target.value>0&&e.target.value<10){ | 317 | if(e.target.value!==''&&+e.target.value>0&&+e.target.value<10){ |
| 318 | e.target.style.border="" | 318 | e.target.style.border="" |
| 319 | }else{ | 319 | }else{ |
| 320 | e.target.style.border="1px solid red"; | 320 | e.target.style.border="1px solid red"; |
| ... | @@ -424,12 +424,12 @@ | ... | @@ -424,12 +424,12 @@ |
| 424 | data:this.form.ftxs, | 424 | data:this.form.ftxs, |
| 425 | name:'分摊系数', | 425 | name:'分摊系数', |
| 426 | dom:this.$refs.ftxs, | 426 | dom:this.$refs.ftxs, |
| 427 | rule: /^(([1-9]{1}\d*)|(0{1}))(\.\d{1,2})?$/, //非空 | 427 | rule:/^(?!0(\.0{1,2})?$)(\d(\.\d{1,2})?)$/, //大于0小于10的所有保留两位的数字 |
| 428 | }, | 428 | }, |
| 429 | ]; | 429 | ]; |
| 430 | let flag = true; | 430 | let flag = true; |
| 431 | this.rules.forEach(item=>{ | 431 | this.rules.forEach(item=>{ |
| 432 | if(item.rule.test(item.data) || item.data == null){ | 432 | if(!item.rule.test(+item.data) || item.data == null){ |
| 433 | if(item.dom.$el){ | 433 | if(item.dom.$el){ |
| 434 | item.dom.$el.style.border = '1px solid red'; | 434 | item.dom.$el.style.border = '1px solid red'; |
| 435 | item.dom.$el.style.boxSizing = 'border-box'; | 435 | item.dom.$el.style.boxSizing = 'border-box'; |
| ... | @@ -444,6 +444,8 @@ | ... | @@ -444,6 +444,8 @@ |
| 444 | 444 | ||
| 445 | this.form['hbsms'] = this.bsms | 445 | this.form['hbsms'] = this.bsms |
| 446 | this.form.qlxzList= this.$refs.qlxzModule.getQlxzDataList(); | 446 | this.form.qlxzList= this.$refs.qlxzModule.getQlxzDataList(); |
| 447 | this.$nextTick(()=> { | ||
| 448 | if (flag) { | ||
| 447 | for(let i=0;i< this.form.fwjgList.length;i++){ | 449 | for(let i=0;i< this.form.fwjgList.length;i++){ |
| 448 | if(this.form.fwjgList[i].fwjgzdbsm===''){ | 450 | if(this.form.fwjgList[i].fwjgzdbsm===''){ |
| 449 | this.form.fwjgList.splice(i,1); | 451 | this.form.fwjgList.splice(i,1); |
| ... | @@ -471,6 +473,14 @@ | ... | @@ -471,6 +473,14 @@ |
| 471 | this.close(); | 473 | this.close(); |
| 472 | } | 474 | } |
| 473 | }) | 475 | }) |
| 476 | }else{ | ||
| 477 | this.$message({ | ||
| 478 | // message: item.name+'不能为空', | ||
| 479 | message: '表单数据有误', | ||
| 480 | type: "warning", | ||
| 481 | }); | ||
| 482 | } | ||
| 483 | }) | ||
| 474 | }, | 484 | }, |
| 475 | cancel: function () { | 485 | cancel: function () { |
| 476 | this.close() | 486 | this.close() | ... | ... |
| ... | @@ -79,7 +79,7 @@ | ... | @@ -79,7 +79,7 @@ |
| 79 | <td>{{item.bdcdyh}}</td> | 79 | <td>{{item.bdcdyh}}</td> |
| 80 | <td>{{item.xmmc}}</td> | 80 | <td>{{item.xmmc}}</td> |
| 81 | <td>{{item.bdcqzh}}</td> | 81 | <td>{{item.bdcqzh}}</td> |
| 82 | <td>{{item.qlr}}</td> | 82 | <td>{{item.qlrmc}}</td> |
| 83 | <td>{{item.zl}}</td> | 83 | <td>{{item.zl}}</td> |
| 84 | </tr> | 84 | </tr> |
| 85 | </table> | 85 | </table> | ... | ... |
-
Please register or sign in to post a comment