e73700b4 by 杨威
2 parents f4da53c8 c90f4fe1
...@@ -75,11 +75,11 @@ ...@@ -75,11 +75,11 @@
75 <tr> 75 <tr>
76 <td colspan="4" class="tdright"><i class="requisite">*</i>权利人名称</td> 76 <td colspan="4" class="tdright"><i class="requisite">*</i>权利人名称</td>
77 <td colspan="6"> 77 <td colspan="6">
78 <input type="text" class="formInput" v-model="formData.qlrmc" /> 78 <input type="text" class="formInput" v-model="formData.qlrmc" ref="qlrmc" @blur="inputBlur($event)"/>
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"> 82 <el-select class="formSelect" v-model="formData.qlrlxbsm" ref="qlrlxbsm" @blur="inputBlur($event)">
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"> 96 <el-select class="formSelect" v-model="formData.zjzlbsm" ref="zjzlbsm" @blur="inputBlur($event)">
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"
...@@ -105,18 +105,18 @@ ...@@ -105,18 +105,18 @@
105 </td> 105 </td>
106 <td colspan="4" class="tdright"><i class="requisite">*</i>证件号</td> 106 <td colspan="4" class="tdright"><i class="requisite">*</i>证件号</td>
107 <td colspan="6"> 107 <td colspan="6">
108 <input type="text" class="formInput" maxlength="18" v-model="formData.zjh" /> 108 <input type="text" class="formInput" maxlength="18" v-model="formData.zjh" ref="zjh" @blur="inputBlur($event)"/>
109 </td> 109 </td>
110 </tr> 110 </tr>
111 <tr> 111 <tr>
112 <td colspan="4" class="tdright"><i class="requisite">*</i>电话</td> 112 <td colspan="4" class="tdright"><i class="requisite">*</i>电话</td>
113 <td colspan="6"> 113 <td colspan="6">
114 <!-- @blur="inputBlur($event)"--> 114 <!-- @blur="inputBlur($event)"-->
115 <input type="text" class="formInput" v-model="formData.dh" /> 115 <input type="text" class="formInput" v-model="formData.dh" ref="dh" @blur="inputBlur($event)"/>
116 </td> 116 </td>
117 <td colspan="4" class="tdright"><i class="requisite">*</i>地址</td> 117 <td colspan="4" class="tdright"><i class="requisite">*</i>地址</td>
118 <td colspan="6"> 118 <td colspan="6">
119 <input type="text" class="formInput" v-model="formData.dz" /> 119 <input type="text" class="formInput" v-model="formData.dz" ref="dz" @blur="inputBlur($event)"/>
120 </td> 120 </td>
121 </tr> 121 </tr>
122 <tr> 122 <tr>
...@@ -384,9 +384,21 @@ ...@@ -384,9 +384,21 @@
384 zjzlbsm: "", 384 zjzlbsm: "",
385 }, 385 },
386 glbsm:'', 386 glbsm:'',
387
388 rules:[],
387 }; 389 };
388 }, 390 },
389 methods: { 391 methods: {
392
393 inputBlur(e){
394 if(e.target.value!=''){
395 e.target.style.border=""
396 }else{
397 e.target.style.border="1px solid red";
398 e.target.style.boxSizing = 'border-box';
399 }
400 },
401
390 //新增行数据 402 //新增行数据
391 addRow() { 403 addRow() {
392 this.update=false; 404 this.update=false;
...@@ -414,39 +426,97 @@ ...@@ -414,39 +426,97 @@
414 }, 426 },
415 //确认权利人信息按钮;可以进行新增;可以进行更新; 427 //确认权利人信息按钮;可以进行新增;可以进行更新;
416 addNewQlrInfo(){ 428 addNewQlrInfo(){
417 //todo 权利人页面调整 429
418 this.formData.addQjDlrFrRequest=[]; 430 this.rules=[
419 this.formData.glbsm=this.bsm; 431 {
420 //将代理人,法人数据合在一起,名称为addQjDlrFrRequest; 432 data:this.formData.qlrmc,
421 //法人的type字段类型为0, 433 name:'权利人名称',
422 this.formData.fr.type=0; 434 dom:this.$refs.qlrmc,
423 this.formData.addQjDlrFrRequest.push(this.formData.fr); 435 rule: /^\s*$/g, //非空
424 for(let k=0;k<this.formData.dlrList.length;k++){ 436 },
425 //代理人的type字段类型为1, 437 {
426 this.formData.dlrList[k].type=1; 438 data:this.formData.qlrlxbsm,
427 this.formData.addQjDlrFrRequest.push(this.formData.dlrList[k]); 439 name:'权利人类型',
428 } 440 dom:this.$refs.qlrlxbsm,
429 //如果是从更新按钮点击确定的则进行更新操作,如果不是,则进行添加操作 441 rule: /^\s*$/g, //非空
430 if(this.update){ 442 },
431 console.log(this.formData) 443 {
432 updateQlrDlrFr(this.formData).then((res)=>{ 444 data:this.formData.zjzlbsm,
433 if(res.code===200){ 445 name:'证件类型',
434 this.$message.success("修改完成!"); 446 dom:this.$refs.zjzlbsm,
435 this.getQlrInfo(); 447 rule: /^\s*$/g, //非空
436 this.update=false; 448 },
437 this.dialogVisible = false; 449 {
450 data:this.formData.zjh,
451 name:'证件号',
452 dom:this.$refs.zjh,
453 rule: /^\s*$/g, //非空
454 },
455 {
456 data:this.formData.dh,
457 name:'电话',
458 dom:this.$refs.dh,
459 rule: /^\s*$/g, //非空
460 },
461 {
462 data:this.formData.dz,
463 name:'地址',
464 dom:this.$refs.dz,
465 rule: /^\s*$/g, //非空
466 },
467 ]
468 let flag = true;
469 this.rules.forEach(item=>{
470 if(item.rule.test(item.data) || item.data == null){
471 if(item.dom.$el){
472 item.dom.$el.style.border = '1px solid red';
473 item.dom.$el.style.boxSizing = 'border-box';
474 }else{
475 item.dom.style.border = '1px solid red';
476 item.dom.style.boxSizing = 'border-box';
438 } 477 }
439 }) 478 flag = false;
440 }else { 479 return false
441 insertQlrDlrFr(this.formData).then((res)=>{ 480 }
442 if(res.code===200){ 481 })
443 this.tableData.push(this.formData); 482 this.$nextTick(()=>{
444 Object.assign(this.$data, this.$options.data()) 483 if (flag) {
445 this.dialogVisible = false; 484 //todo 权利人页面调整
446 this.getQlrInfo(); 485 this.formData.addQjDlrFrRequest=[];
486 this.formData.glbsm=this.bsm;
487 //将代理人,法人数据合在一起,名称为addQjDlrFrRequest;
488 //法人的type字段类型为0,
489 this.formData.fr.type=0;
490 this.formData.addQjDlrFrRequest.push(this.formData.fr);
491 for(let k=0;k<this.formData.dlrList.length;k++){
492 //代理人的type字段类型为1,
493 this.formData.dlrList[k].type=1;
494 this.formData.addQjDlrFrRequest.push(this.formData.dlrList[k]);
447 } 495 }
448 }) 496 //如果是从更新按钮点击确定的则进行更新操作,如果不是,则进行添加操作
449 } 497 if(this.update){
498 console.log(this.formData)
499 updateQlrDlrFr(this.formData).then((res)=>{
500 if(res.code===200){
501 this.$message.success("修改完成!");
502 this.getQlrInfo();
503 this.update=false;
504 this.dialogVisible = false;
505 }
506 })
507 }else {
508 insertQlrDlrFr(this.formData).then((res)=>{
509 if(res.code===200){
510 this.tableData.push(this.formData);
511 Object.assign(this.$data, this.$options.data())
512 this.dialogVisible = false;
513 this.getQlrInfo();
514 }
515 })
516 }
517 }
518 })
519
450 520
451 }, 521 },
452 //修改行数据 522 //修改行数据
...@@ -623,12 +693,24 @@ ...@@ -623,12 +693,24 @@
623 this.gyfsList[i].disabled = item.mc === "单独所有"; 693 this.gyfsList[i].disabled = item.mc === "单独所有";
624 } 694 }
625 } 695 }
626 console.log(this.tableData.length+":this.tableData[0].length");
627 if(this.tableData.length>1){ 696 if(this.tableData.length>1){
628 console.log(JSON.stringify(this.tableData[0])+":this.tableData[0].length");
629 this.gyfs = this.tableData[0].gyfsbsm 697 this.gyfs = this.tableData[0].gyfsbsm
630 } 698 }
631 }, 699 },
700
701 "formData.qlrlxbsm":function (val) {
702 console.log(this.$refs.qlrlxbsm.$el.style.border+":console.log(this.$refs.qlrlxbsm.$el.style.border)")
703 if (val != '') {
704 console.log(this.$refs.qlrlxbsm.$el.style.border+":console.log(this.$refs.qlrlxbsm.$el.style.border)")
705 this.$refs.qlrlxbsm.$el.style.border = '';
706 }
707 },
708
709 "formData.zjzlbsm":function (val) {
710 if (val != '') {
711 this.$refs.zjzlbsm.$el.style.border = '';
712 }
713 },
632 } 714 }
633 }; 715 };
634 </script> 716 </script>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
2 <el-row class="box"> 2 <el-row class="box">
3 <el-col :span="24"> 3 <el-col :span="24">
4 <el-row> 4 <el-row>
5 <el-col :span="24"> 5 <el-col :span="18">
6 <el-form :inline="true" class="demo-form-inline" label-width="106px"> 6 <el-form :inline="true" class="demo-form-inline" label-width="106px">
7 <el-form-item label="宗地编码"> 7 <el-form-item label="宗地编码">
8 <el-input 8 <el-input
...@@ -18,14 +18,17 @@ ...@@ -18,14 +18,17 @@
18 @change="query" 18 @change="query"
19 ></el-input> 19 ></el-input>
20 </el-form-item> 20 </el-form-item>
21 <el-form-item label="不动产单元号"> 21 <el-form-item label="不动产单元号" >
22 <el-input 22 <el-input style="width: 280px;"
23 maxlength="28" 23 maxlength="28"
24 v-model="queryData.bdcdyh" 24 v-model="queryData.bdcdyh"
25 placeholder="输入不动产单元号" 25 placeholder="输入不动产单元号"
26 @change="query" 26 @change="query"
27 ></el-input> 27 ></el-input>
28 </el-form-item> 28 </el-form-item>
29 </el-form>
30 </el-col>
31 <el-col :span="6" aria-rowspan="3">
29 <el-button type="primary" @click="query" icon="el-icon-search">查询</el-button> 32 <el-button type="primary" @click="query" icon="el-icon-search">查询</el-button>
30 <el-button type="warning" @click="reset" icon="el-icon-refresh">重置</el-button> 33 <el-button type="warning" @click="reset" icon="el-icon-refresh">重置</el-button>
31 <el-button 34 <el-button
...@@ -34,11 +37,10 @@ ...@@ -34,11 +37,10 @@
34 >更多查询 37 >更多查询
35 </el-button> 38 </el-button>
36 <!-- @click="ismore = !ismore" --> 39 <!-- @click="ismore = !ismore" -->
37 </el-form>
38 </el-col> 40 </el-col>
39 </el-row> 41 </el-row>
40 <el-row class="row3" v-if="ismore"> 42 <el-row class="row3" v-if="ismore">
41 <el-col :span="22"> 43 <el-col :span="18">
42 <el-form :inline="true" class="demo-form-inline" label-width="106px"> 44 <el-form :inline="true" class="demo-form-inline" label-width="106px">
43 <el-form-item label="权利人名称"> 45 <el-form-item label="权利人名称">
44 <el-input 46 <el-input
...@@ -55,7 +57,7 @@ ...@@ -55,7 +57,7 @@
55 ></el-input> 57 ></el-input>
56 </el-form-item> 58 </el-form-item>
57 <el-form-item label="不动产权证号"> 59 <el-form-item label="不动产权证号">
58 <el-input 60 <el-input style="width: 280px;"
59 placeholder="输入不动产权证号" 61 placeholder="输入不动产权证号"
60 v-model="queryData.bdcqzh" 62 v-model="queryData.bdcqzh"
61 @change="query" 63 @change="query"
...@@ -63,11 +65,11 @@ ...@@ -63,11 +65,11 @@
63 </el-form-item> 65 </el-form-item>
64 </el-form> 66 </el-form>
65 </el-col> 67 </el-col>
66 <el-col :span="2" :offset="offset"> 68 <!-- <el-col :span="2" :offset="offset">
67 </el-col> 69 </el-col> -->
68 </el-row> 70 </el-row>
69 <el-row> 71 <el-row>
70 <el-col :span="24"> 72 <el-col :span="18">
71 <el-form :inline="true" :model="queryData" class="demo-form-inline" label-width="106px"> 73 <el-form :inline="true" :model="queryData" class="demo-form-inline" label-width="106px">
72 <el-form-item class="demo-form-inline" label="单元范围"> 74 <el-form-item class="demo-form-inline" label="单元范围">
73 <el-checkbox-group v-model="queryData.dylxs" @change="query"> 75 <el-checkbox-group v-model="queryData.dylxs" @change="query">
...@@ -83,8 +85,6 @@ ...@@ -83,8 +85,6 @@
83 </el-form-item> 85 </el-form-item>
84 </el-form> 86 </el-form>
85 </el-col> 87 </el-col>
86 <el-col :span="2">
87 </el-col>
88 </el-row> 88 </el-row>
89 </el-col> 89 </el-col>
90 </el-row> 90 </el-row>
......