598f15de by zhaoqian

户表单的验证

1 parent 14e81702
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
79 </td> 79 </td>
80 <td colspan="4" class="tdright"><i class="requisite">*</i>权利人类型</td> 80 <td colspan="4" class="tdright"><i class="requisite">*</i>权利人类型</td>
81 <td colspan="6"> 81 <td colspan="6">
82 <el-select class="formSelect" v-model="formData.qlrlxbsm" ref="qlrlxbsm" @blur="inputBlur($event)"> 82 <el-select class="formSelect" v-model="formData.qlrlxbsm" ref="qlrlxbsm">
83 <el-option 83 <el-option
84 v-for="item in $store.state.qlrlxList" 84 v-for="item in $store.state.qlrlxList"
85 :key="item.bsm" 85 :key="item.bsm"
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
93 <tr> 93 <tr>
94 <td colspan="4" class="tdright"><i class="requisite">*</i>证件类型</td> 94 <td colspan="4" class="tdright"><i class="requisite">*</i>证件类型</td>
95 <td colspan="6"> 95 <td colspan="6">
96 <el-select class="formSelect" v-model="formData.zjzlbsm" ref="zjzlbsm" @blur="inputBlur($event)"> 96 <el-select class="formSelect" v-model="formData.zjzlbsm" ref="zjzlbsm">
97 <el-option 97 <el-option
98 v-for="item in $store.state.zjzlList" 98 v-for="item in $store.state.zjzlList"
99 :key="item.bsm" 99 :key="item.bsm"
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
66 <tr height="30"> 66 <tr height="30">
67 <td colspan="2" align="center" >房屋类型<i class="requisite">*</i></td> 67 <td colspan="2" align="center" >房屋类型<i class="requisite">*</i></td>
68 <td colspan="4" > 68 <td colspan="4" >
69 <el-select v-model="form.fwlxbsm" placeholder="请选择" :disabled="disableFlag" @blur="inputBlur($event)" ref="fwlxbsm"> 69 <el-select v-model="form.fwlxbsm" placeholder="请选择" :disabled="disableFlag" ref="fwlxbsm">
70 <el-option 70 <el-option
71 v-for="item in $store.state.fwlxList" 71 v-for="item in $store.state.fwlxList"
72 :key="item.bsm" 72 :key="item.bsm"
...@@ -77,7 +77,7 @@ ...@@ -77,7 +77,7 @@
77 </td> 77 </td>
78 <td colspan="2" align="center" >房屋性质<i class="requisite">*</i></td> 78 <td colspan="2" align="center" >房屋性质<i class="requisite">*</i></td>
79 <td colspan="4" > 79 <td colspan="4" >
80 <el-select v-model="form.fwxzbsm" placeholder="请选择" :disabled="disableFlag" @blur="inputBlur($event)" ref="fwxzbsm"> 80 <el-select v-model="form.fwxzbsm" placeholder="请选择" :disabled="disableFlag" ref="fwxzbsm">
81 <el-option 81 <el-option
82 v-for="item in $store.state.fwxzOptions" 82 v-for="item in $store.state.fwxzOptions"
83 :key="item.bsm" 83 :key="item.bsm"
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
127 <tr height="30"> 127 <tr height="30">
128 <td colspan="2" align="center" >产别<i class="requisite">*</i></td> 128 <td colspan="2" align="center" >产别<i class="requisite">*</i></td>
129 <td colspan="4" > 129 <td colspan="4" >
130 <el-select v-model="form.fwcbbsm" placeholder="请选择" :disabled="disableFlag" @blur="inputBlur($event)" ref="fwcbbsm"> 130 <el-select v-model="form.fwcbbsm" placeholder="请选择" :disabled="disableFlag" ref="fwcbbsm">
131 <el-option 131 <el-option
132 v-for="item in $store.state.cbOptions" 132 v-for="item in $store.state.cbOptions"
133 :key="item.bsm" 133 :key="item.bsm"
...@@ -138,7 +138,7 @@ ...@@ -138,7 +138,7 @@
138 </td> 138 </td>
139 <td colspan="2" align="center" >产权来源<i class="requisite">*</i></td> 139 <td colspan="2" align="center" >产权来源<i class="requisite">*</i></td>
140 <td colspan="4" > 140 <td colspan="4" >
141 <el-select v-model="form.fwcqlybsm" placeholder="请选择" :disabled="disableFlag" @blur="inputBlur($event)" ref="fwcqlybsm"> 141 <el-select v-model="form.fwcqlybsm" placeholder="请选择" :disabled="disableFlag" ref="fwcqlybsm">
142 <el-option 142 <el-option
143 v-for="item in $store.state.cqlyOptions" 143 v-for="item in $store.state.cqlyOptions"
144 :key="item.bsm" 144 :key="item.bsm"
...@@ -204,11 +204,11 @@ ...@@ -204,11 +204,11 @@
204 <tr height="30"> 204 <tr height="30">
205 <td colspan="2" align="center" >分摊系数</td> 205 <td colspan="2" align="center" >分摊系数</td>
206 <td colspan="2" align="center" > 206 <td colspan="2" align="center" >
207 <el-input v-model="form.ycftxs" type="number" :disabled="form.scyclx==='1'||disableFlag" @blur="inputFtxsBlur($event)" ref="ycftxs"></el-input> 207 <input class="formInput" v-model="form.ycftxs" type="number" :disabled="form.scyclx==='1'||disableFlag" @blur="inputFtxsBlur($event)" ref="ycftxs"></input>
208 </td> 208 </td>
209 <td colspan="2" align="center" >分摊系数</td> 209 <td colspan="2" align="center" >分摊系数</td>
210 <td colspan="2" align="center" > 210 <td colspan="2" align="center" >
211 <el-input v-model="form.scftxs" type="number" :disabled="form.scyclx==='0'||disableFlag" @blur="inputFtxsBlur($event)" ref="scftxs"></el-input> 211 <input class="formInput" v-model="form.scftxs" type="number" :disabled="form.scyclx==='0'||disableFlag" @blur="inputFtxsBlur($event)" ref="scftxs"></input>
212 </td> 212 </td>
213 </tr> 213 </tr>
214 214
...@@ -327,7 +327,7 @@ ...@@ -327,7 +327,7 @@
327 <span>坐落<i class="requisite">*</i></span> 327 <span>坐落<i class="requisite">*</i></span>
328 </td> 328 </td>
329 <td colspan="10" > 329 <td colspan="10" >
330 <el-input v-model="form.zl" ref="zl" @blur="inputBlur($event)" :disabled="disableFlag"></el-input> 330 <input class="formInput" v-model="form.zl" ref="zl" @blur="inputBlur($event)" :disabled="disableFlag" />
331 </td> 331 </td>
332 </tr> 332 </tr>
333 333
...@@ -840,7 +840,9 @@ ...@@ -840,7 +840,9 @@
840 let ftxsflag = true; 840 let ftxsflag = true;
841 841
842 this.ftxsrules.forEach(item=>{ 842 this.ftxsrules.forEach(item=>{
843 if(item.data !==""){ 843 console.log(item.data+":item.data")
844 console.log(item.data !=="" +":item.data !==")
845 if(item.data !=="" && item.data !==null){
844 if(!item.rule.test(+item.data) || item.data == null){ 846 if(!item.rule.test(+item.data) || item.data == null){
845 if(item.dom.$el){ 847 if(item.dom.$el){
846 item.dom.$el.style.border = '1px solid red'; 848 item.dom.$el.style.border = '1px solid red';
...@@ -1025,6 +1027,15 @@ ...@@ -1025,6 +1027,15 @@
1025 immediate:false 1027 immediate:false
1026 }, 1028 },
1027 1029
1030 "form.fwxzbsm":{
1031 handler:function (val) {
1032 if (val != '') {
1033 this.$refs.fwxzbsm.$el.style.border = '';
1034 }
1035 },
1036 immediate:false
1037 },
1038
1028 "form.fwcqlybsm":{ 1039 "form.fwcqlybsm":{
1029 handler:function (val) { 1040 handler:function (val) {
1030 if (val != '') { 1041 if (val != '') {
......