宗地表单校验完善
Showing
2 changed files
with
35 additions
and
17 deletions
... | @@ -599,9 +599,6 @@ export default { | ... | @@ -599,9 +599,6 @@ export default { |
599 | rule: /^\s*$/g, //非空 | 599 | rule: /^\s*$/g, //非空 |
600 | }, | 600 | }, |
601 | ) | 601 | ) |
602 | if (ind == item.list.length-1) { | ||
603 | temp += item.list.length; | ||
604 | } | ||
605 | if(this.hasSyqx){ | 602 | if(this.hasSyqx){ |
606 | rules.push( | 603 | rules.push( |
607 | { | 604 | { |
... | @@ -613,6 +610,9 @@ export default { | ... | @@ -613,6 +610,9 @@ export default { |
613 | } | 610 | } |
614 | ) | 611 | ) |
615 | } | 612 | } |
613 | if (ind == item.list.length-1) { | ||
614 | temp += item.list.length; | ||
615 | } | ||
616 | }) | 616 | }) |
617 | }) | 617 | }) |
618 | this.rulesResult = true; | 618 | this.rulesResult = true; |
... | @@ -664,6 +664,18 @@ export default { | ... | @@ -664,6 +664,18 @@ export default { |
664 | 664 | ||
665 | // }, | 665 | // }, |
666 | }, | 666 | }, |
667 | watch:{ | ||
668 | countList: { | ||
669 | handler : function (newVal, oldVal) { | ||
670 | newVal.forEach((item,ind)=>{ | ||
671 | if(item.qlxzdm != ''){ | ||
672 | this.$refs.qlxzdm[ind].$el.style.border="" | ||
673 | } | ||
674 | }) | ||
675 | }, | ||
676 | deep:true | ||
677 | } , | ||
678 | } | ||
667 | }; | 679 | }; |
668 | </script> | 680 | </script> |
669 | <style lang="less"> | 681 | <style lang="less"> | ... | ... |
... | @@ -627,7 +627,6 @@ export default { | ... | @@ -627,7 +627,6 @@ export default { |
627 | updateZDxx(formData) { | 627 | updateZDxx(formData) { |
628 | //获取权利性质数据 | 628 | //获取权利性质数据 |
629 | this.formData.list = this.$refs.qlxzModule.getQlxzDataList(); | 629 | this.formData.list = this.$refs.qlxzModule.getQlxzDataList(); |
630 | this.$refs.qlxzModule.getRules(); | ||
631 | console.log(this.$refs.qlxzModule.getRulesResult(),'this.$refs.qlxzModule.getRules()'); | 630 | console.log(this.$refs.qlxzModule.getRulesResult(),'this.$refs.qlxzModule.getRules()'); |
632 | //判断容密高是否为区间值,如果是区间值,则将输入框的值赋予 | 631 | //判断容密高是否为区间值,如果是区间值,则将输入框的值赋予 |
633 | this.formData.jyrjl = this.isInterval(this.formData.jyrjl) ? this.rjl : this.formData.jyrjl; | 632 | this.formData.jyrjl = this.isInterval(this.formData.jyrjl) ? this.rjl : this.formData.jyrjl; |
... | @@ -689,14 +688,8 @@ export default { | ... | @@ -689,14 +688,8 @@ export default { |
689 | rule: /^\s*$/g, //非空 | 688 | rule: /^\s*$/g, //非空 |
690 | }, | 689 | }, |
691 | ] | 690 | ] |
692 | //判断宗地代码和不动产单元号是否手动修改过(宗地代码和不动产单元号的前14位是否和底盘代码一致) | ||
693 | if(this.formData.zddm.substring(0,14) != this.dpdm || this.formData.bdcdyh.substring(0,14) != this.dpdm){ | ||
694 | this.$message({ | ||
695 | message: '宗地代码或不动产单元号有误,请核对后再试一次', | ||
696 | type: "warning", | ||
697 | }); | ||
698 | }else{ | ||
699 | // console.log(this.rules,'rules'); | 691 | // console.log(this.rules,'rules'); |
692 | this.$refs.qlxzModule.getRules(); | ||
700 | let flag = true; | 693 | let flag = true; |
701 | this.rules.forEach(item=>{ | 694 | this.rules.forEach(item=>{ |
702 | if(item.rule.test(item.data) || item.data == null){ | 695 | if(item.rule.test(item.data) || item.data == null){ |
... | @@ -717,10 +710,17 @@ export default { | ... | @@ -717,10 +710,17 @@ export default { |
717 | } | 710 | } |
718 | }) | 711 | }) |
719 | this.$nextTick(()=>{ | 712 | this.$nextTick(()=>{ |
720 | if(flag){ | 713 | if(flag && this.$refs.qlxzModule.getRulesResult()){ |
721 | //宗地面积处理 | 714 | //宗地面积处理 |
722 | // console.log(this.formData.zdmj,'this.formData.zdmj'); | 715 | // console.log(this.formData.zdmj,'this.formData.zdmj'); |
723 | // this.formData.zdmj = this.formData.zdmj.replace(/[^\d\.]/g,'') | 716 | // this.formData.zdmj = this.formData.zdmj.replace(/[^\d\.]/g,'') |
717 | //判断宗地代码和不动产单元号是否手动修改过(宗地代码和不动产单元号的前14位是否和底盘代码一致) | ||
718 | if(this.formData.zddm.substring(0,14) != this.dpdm || this.formData.bdcdyh.substring(0,14) != this.dpdm){ | ||
719 | this.$message({ | ||
720 | message: '宗地代码或不动产单元号有误,请核对后再试一次', | ||
721 | type: "warning", | ||
722 | }); | ||
723 | }else{ | ||
724 | updateQjZdjbxx(this.formData) | 724 | updateQjZdjbxx(this.formData) |
725 | .then((res) => { | 725 | .then((res) => { |
726 | if (res.code == 200) { | 726 | if (res.code == 200) { |
... | @@ -758,6 +758,7 @@ export default { | ... | @@ -758,6 +758,7 @@ export default { |
758 | self.updAttributes(this.$store.state.zdbsm,'zd',this.geoAttributes,function (res) { | 758 | self.updAttributes(this.$store.state.zdbsm,'zd',this.geoAttributes,function (res) { |
759 | console.log("属性保存完成!!"); | 759 | console.log("属性保存完成!!"); |
760 | }); | 760 | }); |
761 | } | ||
761 | }else{ | 762 | }else{ |
762 | this.$message({ | 763 | this.$message({ |
763 | // message: item.name+'不能为空', | 764 | // message: item.name+'不能为空', |
... | @@ -767,11 +768,6 @@ export default { | ... | @@ -767,11 +768,6 @@ export default { |
767 | } | 768 | } |
768 | }) | 769 | }) |
769 | 770 | ||
770 | |||
771 | } | ||
772 | |||
773 | |||
774 | |||
775 | }, | 771 | }, |
776 | inputBlur(e){ | 772 | inputBlur(e){ |
777 | if(e.target.value!=''){ | 773 | if(e.target.value!=''){ |
... | @@ -885,6 +881,16 @@ export default { | ... | @@ -885,6 +881,16 @@ export default { |
885 | zdbsm:function (val) { | 881 | zdbsm:function (val) { |
886 | this.getZdjbxxData(val) | 882 | this.getZdjbxxData(val) |
887 | this.curZdbsm = val; | 883 | this.curZdbsm = val; |
884 | }, | ||
885 | "formData.bdcdyh":function (val) { | ||
886 | if (val != '') { | ||
887 | this.$refs.bdcdyh.style.border = ''; | ||
888 | } | ||
889 | }, | ||
890 | "formData.zddm":function (val) { | ||
891 | if (val != '') { | ||
892 | this.$refs.zddm.style.border = ''; | ||
893 | } | ||
888 | } | 894 | } |
889 | }, | 895 | }, |
890 | }; | 896 | }; | ... | ... |
-
Please register or sign in to post a comment