fix(dzHb,yzgy):权利人,业主共有表单验证
Showing
2 changed files
with
44 additions
and
33 deletions
... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
17 | <el-button style="border:0;padding:0 10px" @click="newAddDz"> | 17 | <el-button style="border:0;padding:0 10px" @click="newAddDz"> |
18 | <i class="iconfont iconicon-test2" style="color:#66b1ff;font-size:20px;position: relative;top:2px;left:-2px"></i>多幢 | 18 | <i class="iconfont iconicon-test2" style="color:#66b1ff;font-size:20px;position: relative;top:2px;left:-2px"></i>多幢 |
19 | </el-button> | 19 | </el-button> |
20 | <el-button style="border:0;padding:0 10px" @click="newAddDz"> | 20 | <el-button style="border:0;padding:0 10px" @click="newAddZrz"> |
21 | <i class="iconfont iconicon-test2" style="color:#66b1ff;font-size:20px;position: relative;top:2px;left:-2px"></i>自然幢 | 21 | <i class="iconfont iconicon-test2" style="color:#66b1ff;font-size:20px;position: relative;top:2px;left:-2px"></i>自然幢 |
22 | </el-button> | 22 | </el-button> |
23 | </template> | 23 | </template> |
... | @@ -245,7 +245,7 @@ | ... | @@ -245,7 +245,7 @@ |
245 | <td>{{item.bdcdyh}}</td> | 245 | <td>{{item.bdcdyh}}</td> |
246 | <td>{{item.xmmc}}</td> | 246 | <td>{{item.xmmc}}</td> |
247 | <td>{{item.bdcqzh}}</td> | 247 | <td>{{item.bdcqzh}}</td> |
248 | <td>{{item.qlr}}</td> | 248 | <td>{{item.qlrmc}}</td> |
249 | <td>{{item.zl}}</td> | 249 | <td>{{item.zl}}</td> |
250 | <td>{{item.zrzCount}}</td> | 250 | <td>{{item.zrzCount}}</td> |
251 | </tr> | 251 | </tr> |
... | @@ -328,7 +328,7 @@ | ... | @@ -328,7 +328,7 @@ |
328 | <td>权利人</td> | 328 | <td>权利人</td> |
329 | <td>坐落</td> | 329 | <td>坐落</td> |
330 | </tr> | 330 | </tr> |
331 | <tr v-if="Data.length==0"> | 331 | <tr v-if="Data.length===0"> |
332 | <td colspan="8"> | 332 | <td colspan="8"> |
333 | <span class="noData">暂无数据</span> | 333 | <span class="noData">暂无数据</span> |
334 | </td> | 334 | </td> |
... | @@ -342,7 +342,7 @@ | ... | @@ -342,7 +342,7 @@ |
342 | <td>{{item.bdcdyh}}</td> | 342 | <td>{{item.bdcdyh}}</td> |
343 | <td>{{item.xmmc}}</td> | 343 | <td>{{item.xmmc}}</td> |
344 | <td>{{item.bdcqzh}}</td> | 344 | <td>{{item.bdcqzh}}</td> |
345 | <td>{{item.qlr}}</td> | 345 | <td>{{item.qlrmc}}</td> |
346 | <td>{{item.zl}}</td> | 346 | <td>{{item.zl}}</td> |
347 | </tr> | 347 | </tr> |
348 | </table> | 348 | </table> |
... | @@ -424,25 +424,26 @@ | ... | @@ -424,25 +424,26 @@ |
424 | methods: { | 424 | methods: { |
425 | getZdData(id) { | 425 | getZdData(id) { |
426 | getQjZdjbxxDetailById(id).then(res => { | 426 | getQjZdjbxxDetailById(id).then(res => { |
427 | this.dzhbhData.xzqbsm = res.result.xzqbsm | 427 | this.dzhbhData.xzqbsm = res.result.xzqbsm; |
428 | this.changeXzq(this.dzhbhData.xzqbsm) | 428 | this.changeXzq(this.dzhbhData.xzqbsm); |
429 | this.dzhbhData.djqbsm = res.result.djqbsm | 429 | this.dzhbhData.djqbsm = res.result.djqbsm; |
430 | this.changeDjq(this.dzhbhData.djqbsm) | 430 | this.changeDjq(this.dzhbhData.djqbsm); |
431 | this.dzhbhData.djzqbsm = res.result.djzqbsm | 431 | this.dzhbhData.djzqbsm = res.result.djzqbsm; |
432 | this.dzhbhData.syqlxbsm = res.result.syqlxbsm | 432 | this.dzhbhData.syqlxbsm = res.result.syqlxbsm; |
433 | this.dzhbhData.zdtzmbsm = res.result.zdtzmbsm | 433 | this.dzhbhData.zdtzmbsm = res.result.zdtzmbsm; |
434 | }) | 434 | }) |
435 | }, | 435 | }, |
436 | newAddDz() { | 436 | newAddDz() { |
437 | this.dzIsVisible = true; | 437 | this.dzIsVisible = true; |
438 | this.reset(); | ||
438 | this.geDztData(this.queryData) | 439 | this.geDztData(this.queryData) |
439 | }, | 440 | }, |
440 | newAddZrz() { | 441 | newAddZrz() { |
441 | this.zrzIsVisible = true; | 442 | this.zrzIsVisible = true; |
443 | this.reset(); | ||
442 | this.geZrztData(this.queryData) | 444 | this.geZrztData(this.queryData) |
443 | }, | 445 | }, |
444 | deleteData(index) { | 446 | deleteData(index) { |
445 | console.log(JSON.stringify(index)+":row") | ||
446 | let data = this.dzhbqData[index]; | 447 | let data = this.dzhbqData[index]; |
447 | // 多幢 | 448 | // 多幢 |
448 | if (data.zrzCount) { | 449 | if (data.zrzCount) { |
... | @@ -453,17 +454,17 @@ | ... | @@ -453,17 +454,17 @@ |
453 | let zrzIndex = this.zrzList.indexOf(data); | 454 | let zrzIndex = this.zrzList.indexOf(data); |
454 | this.zrzList.splice(zrzIndex, 1) | 455 | this.zrzList.splice(zrzIndex, 1) |
455 | } | 456 | } |
456 | this.dzhbqData.splice(index, 1) | 457 | this.dzhbqData.splice(index, 1); |
457 | if (this.dzhbqData.length === 0) { | 458 | if (this.dzhbqData.length === 0) { |
458 | this.dzhbhData.xzqbsm = "" | 459 | this.dzhbhData.xzqbsm = ""; |
459 | this.dzhbhData.djqbsm = "" | 460 | this.dzhbhData.djqbsm = ""; |
460 | this.dzhbhData.djzqbsm = "" | 461 | this.dzhbhData.djzqbsm = ""; |
461 | this.dzhbhData.syqlxbsm = "" | 462 | this.dzhbhData.syqlxbsm = ""; |
462 | this.dzhbhData.zdtzmbsm = "" | 463 | this.dzhbhData.zdtzmbsm = "" |
463 | } | 464 | } |
464 | }, | 465 | }, |
465 | save() { | 466 | save() { |
466 | 467 | ||
467 | }, | 468 | }, |
468 | dzClose() { | 469 | dzClose() { |
469 | this.dzIsVisible = false; | 470 | this.dzIsVisible = false; |
... | @@ -473,22 +474,30 @@ | ... | @@ -473,22 +474,30 @@ |
473 | }, | 474 | }, |
474 | currentChange(val) { | 475 | currentChange(val) { |
475 | this.queryData.pageNo = val; | 476 | this.queryData.pageNo = val; |
476 | this.geDztData(this.queryData); | 477 | if (this.dzIsVisible) { |
478 | this.geDztData(this.queryData); | ||
479 | }else { | ||
480 | this.geZrztData(this.queryData) | ||
481 | } | ||
477 | }, | 482 | }, |
478 | geDztData(data) { | 483 | geDztData(data) { |
479 | dzList(data).then(res => { | 484 | dzList(data).then(res => { |
480 | this.Data = res.result.records | 485 | this.Data = res.result.records; |
481 | this.total = res.result.total; | 486 | this.total = res.result.total; |
482 | }) | 487 | }) |
483 | }, | 488 | }, |
484 | geZrztData(data) { | 489 | geZrztData(data) { |
485 | zrzList(data).then(res => { | 490 | zrzList(data).then(res => { |
486 | this.Data = res.result.records | 491 | this.Data = res.result.records; |
487 | this.total = res.result.total; | 492 | this.total = res.result.total; |
488 | }) | 493 | }) |
489 | }, | 494 | }, |
490 | search() { | 495 | search() { |
491 | this.geDztData(this.queryData) | 496 | if (this.dzIsVisible) { |
497 | this.geDztData(this.queryData); | ||
498 | }else { | ||
499 | this.geZrztData(this.queryData) | ||
500 | } | ||
492 | }, | 501 | }, |
493 | addData(data) { | 502 | addData(data) { |
494 | if (this.dzhbqData.length === 0) { | 503 | if (this.dzhbqData.length === 0) { |
... | @@ -502,7 +511,7 @@ | ... | @@ -502,7 +511,7 @@ |
502 | let arr = []; | 511 | let arr = []; |
503 | arr = this.dzhbqData.filter(i => i.bsm === data.bsm); | 512 | arr = this.dzhbqData.filter(i => i.bsm === data.bsm); |
504 | if (arr.length > 0) { | 513 | if (arr.length > 0) { |
505 | this.$message.info("当前多幢已选择,请重新选择") | 514 | this.$message.info("当前多幢已选择,请重新选择"); |
506 | return | 515 | return |
507 | } | 516 | } |
508 | arr = this.dzhbqData.filter(i => i.zdbsm !== data.zdbsm); | 517 | arr = this.dzhbqData.filter(i => i.zdbsm !== data.zdbsm); |
... | @@ -610,19 +619,23 @@ | ... | @@ -610,19 +619,23 @@ |
610 | pageNo: 1, | 619 | pageNo: 1, |
611 | pageSize: 10 | 620 | pageSize: 10 |
612 | }; | 621 | }; |
613 | this.geDztData(this.queryData) | 622 | if (this.dzIsVisible) { |
623 | this.geDztData(this.queryData); | ||
624 | }else { | ||
625 | this.geZrztData(this.queryData) | ||
626 | } | ||
614 | }, | 627 | }, |
615 | }, | 628 | }, |
616 | watch: { | 629 | watch: { |
617 | zdbsm: function (bsm) { | 630 | zdbsm: function (bsm) { |
618 | this.getZdData(bsm) | 631 | this.getZdData(bsm) |
619 | } | 632 | }, |
620 | } | 633 | } |
621 | } | 634 | } |
622 | </script> | 635 | </script> |
623 | 636 | ||
624 | <style scoped lang="less"> | 637 | <style scoped lang="less"> |
625 | 638 | ||
626 | .psn { | 639 | .psn { |
627 | position: unset !important; | 640 | position: unset !important; |
628 | } | 641 | } | ... | ... |
... | @@ -43,22 +43,22 @@ | ... | @@ -43,22 +43,22 @@ |
43 | > | 43 | > |
44 | </td> | 44 | </td> |
45 | <td> | 45 | <td> |
46 | <el-input v-model="item.jgzwbh" placeholder="请输入建(构)筑物编号"></el-input> | 46 | <el-input v-model="item.jgzwbh" placeholder="请输入建(构)筑物编号" maxlength="10"></el-input> |
47 | </td> | 47 | </td> |
48 | <td> | 48 | <td> |
49 | <el-input v-model="item.jgzsl" oninput="value = (value.match(/^\d{0,10}/g)) || null" | 49 | <el-input v-model="item.jgzsl" oninput="value = (value.match(/^\d{0,9}/g)) || null" |
50 | placeholder="请输入建(构)筑物数量"></el-input> | 50 | placeholder="请输入建(构)筑物数量"></el-input> |
51 | </td> | 51 | </td> |
52 | <td> | 52 | <td> |
53 | <el-input v-model="item.jgzmj" oninput="value = (value.match(/^\d{0,10}(\.?\d{0,3})/g)[0]) || null" | 53 | <el-input v-model="item.jgzmj" oninput="value = (value.match(/^\d{0,9}(\.?\d{0,3})/g)[0]) || null" |
54 | placeholder="请输入建(构)筑物面积(㎡)"></el-input> | 54 | placeholder="请输入建(构)筑物面积(㎡)"></el-input> |
55 | </td> | 55 | </td> |
56 | <td> | 56 | <td> |
57 | <el-input v-model="item.zdmj" oninput="value = (value.match(/^\d{0,10}(\.?\d{0,3})/g)[0]) || null" | 57 | <el-input v-model="item.zdmj" oninput="value = (value.match(/^\d{0,9}(\.?\d{0,3})/g)[0]) || null" |
58 | placeholder="请输入占地面积(㎡)"></el-input> | 58 | placeholder="请输入占地面积(㎡)"></el-input> |
59 | </td> | 59 | </td> |
60 | <td> | 60 | <td> |
61 | <el-input v-model="item.fttdmj" oninput="value = (value.match(/^\d{0,10}(\.?\d{0,3})/g)[0]) || null" | 61 | <el-input v-model="item.fttdmj" oninput="value = (value.match(/^\d{0,9}(\.?\d{0,3})/g)[0]) || null" |
62 | placeholder="请输入分摊土地面积(㎡)"></el-input> | 62 | placeholder="请输入分摊土地面积(㎡)"></el-input> |
63 | </td> | 63 | </td> |
64 | <td> | 64 | <td> |
... | @@ -102,7 +102,6 @@ | ... | @@ -102,7 +102,6 @@ |
102 | methods: { | 102 | methods: { |
103 | getData(id) { | 103 | getData(id) { |
104 | queryYzgy(id).then(res => { | 104 | queryYzgy(id).then(res => { |
105 | console.log(res) | ||
106 | if (res.result != null) { | 105 | if (res.result != null) { |
107 | this.Data = res.result | 106 | this.Data = res.result |
108 | } | 107 | } |
... | @@ -115,7 +114,6 @@ | ... | @@ -115,7 +114,6 @@ |
115 | return | 114 | return |
116 | } | 115 | } |
117 | saveYzgy(this.Data).then(res => { | 116 | saveYzgy(this.Data).then(res => { |
118 | console.log(res) | ||
119 | if (res.success) { | 117 | if (res.success) { |
120 | Message.success("新增成功") | 118 | Message.success("新增成功") |
121 | this.getData(this.$store.state.zrzbsm) | 119 | this.getData(this.$store.state.zrzbsm) | ... | ... |
-
Please register or sign in to post a comment