9c4b8bfd by zhaoqian

不动产单元号弹出提示框

1 parent cba8f5ed
...@@ -14,9 +14,8 @@ ...@@ -14,9 +14,8 @@
14 </td> 14 </td>
15 <td colspan="2" align="center" >不动产单元号</td> 15 <td colspan="2" align="center" >不动产单元号</td>
16 <td colspan="4" > 16 <td colspan="4" >
17 <el-input v-model="form.bdcdyh" style="width: 70%" v-show="form.bdcdyh===''||form.bdcdyh==null"></el-input> 17 <el-input v-model="form.bdcdyh" style="width: 70%"></el-input>
18 <el-input v-model="form.bdcdyh" v-show="form.bdcdyh!==''&&form.bdcdyh!=null"></el-input> 18 <el-button @click.prevent="generatorCode" size="mini" type="primary" style="width:25%;margin-left:3%">生成</el-button>
19 <el-button @click.prevent="generatorCode" size="mini" v-show="form.bdcdyh===''||form.bdcdyh==null" type="primary" style="width:25%;margin-left:3%">生成</el-button>
20 </td> 19 </td>
21 </tr> 20 </tr>
22 <tr height="30"> 21 <tr height="30">
...@@ -428,7 +427,32 @@ ...@@ -428,7 +427,32 @@
428 } 427 }
429 }) 428 })
430 }, 429 },
430 open() {
431 this.$confirm('已经存在不动产单元号或者自然幢号, 是否继续?', '提示', {
432 confirmButtonText: '确定',
433 cancelButtonText: '取消',
434 type: 'warning'
435 }).then(() => {
436 getBdcdyh(this.form.zddm,"dz")
437 .then((res)=>{
438 this.form.bdcdyh=res.result;
439 })
440 this.$message({
441 type: 'success',
442 message: '生成成功!'
443 });
444 }).catch(() => {
445 this.$message({
446 type: 'info',
447 message: '已取消'
448 });
449 });
450 },
431 generatorCode(){ 451 generatorCode(){
452 if(this.form.bdcdyh!=null&&this.form.bdcdyh!==''){
453 this.open();
454 return;
455 }
432 getBdcdyh(this.form.zddm,"dz") 456 getBdcdyh(this.form.zddm,"dz")
433 .then((res)=>{ 457 .then((res)=>{
434 this.form.bdcdyh=res.result; 458 this.form.bdcdyh=res.result;
......
...@@ -462,8 +462,41 @@ export default { ...@@ -462,8 +462,41 @@ export default {
462 }) 462 })
463 .catch((error) => {}); 463 .catch((error) => {});
464 }, 464 },
465
466 //不动产单元号再次生成提示框
467 open() {
468 this.$confirm('已经存在不动产单元号或者自然幢号, 是否继续?', '提示', {
469 confirmButtonText: '确定',
470 cancelButtonText: '取消',
471 type: 'warning'
472 }).then(() => {
473 getBdcdyh("860101555888GB", "zd")
474 .then((res) => {
475 console.log(res);
476 this.formData.zddm = res.result.substring(0, 19);
477 this.formData.bdcdyh = res.result;
478 })
479 .catch((error) => {});
480 this.$message({
481 type: 'success',
482 message: '生成成功!'
483 });
484 }).catch(() => {
485 this.$message({
486 type: 'info',
487 message: '已取消'
488 });
489 });
490 },
491
465 //生成宗地代码 492 //生成宗地代码
466 generatorCode() { 493 generatorCode() {
494
495 if((this.formData.zddm!=null&&this.formData.zddm!=='')||(this.formData.bdcdyh!=null&&this.formData.bdcdyh!=='')){
496 this.open();
497 return;
498 }
499
467 //前6位是xzqbsm,接着3位djqbsm,3位djzqbsm,最后2位是syqlxbsm 860101555888GB 500 //前6位是xzqbsm,接着3位djqbsm,3位djzqbsm,最后2位是syqlxbsm 860101555888GB
468 getBdcdyh("860101555888GB", "zd") 501 getBdcdyh("860101555888GB", "zd")
469 .then((res) => { 502 .then((res) => {
......
...@@ -21,9 +21,8 @@ ...@@ -21,9 +21,8 @@
21 <td colspan="2" align="center" >不动产单元号</td> 21 <td colspan="2" align="center" >不动产单元号</td>
22 <!-- todo 此处暂时存放的是不动产单元号标识码,而不是不动产单元号--> 22 <!-- todo 此处暂时存放的是不动产单元号标识码,而不是不动产单元号-->
23 <td colspan="4" > 23 <td colspan="4" >
24 <el-input v-model="form.bdcdyh" v-show="form.bdcdyh === ''||form.bdcdyh == null" style="width: 70%" disabled></el-input> 24 <el-input v-model="form.bdcdyh" style="width: 70%" disabled></el-input>
25 <el-input v-model="form.bdcdyh" v-show="form.bdcdyh !== ''&&form.bdcdyh != null" style="width: 100%" disabled></el-input> 25 <el-button @click.prevent="generatorCode" size="mini" type="primary" style="width:25%;margin-left:3%">生成</el-button>
26 <el-button v-show="form.bdcdyh === ''||form.bdcdyh == null" @click.prevent="generatorCode" size="mini" type="primary" style="width:25%;margin-left:3%">生成</el-button>
27 </td> 26 </td>
28 <td colspan="2" align="center" >原不动产单元</td> 27 <td colspan="2" align="center" >原不动产单元</td>
29 <td colspan="4" > 28 <td colspan="4" >
...@@ -739,7 +738,36 @@ ...@@ -739,7 +738,36 @@
739 console.log("----------------------------------") 738 console.log("----------------------------------")
740 console.log(this.form) 739 console.log(this.form)
741 }, 740 },
741
742 //不动产单元号再次生成提示框
743 open() {
744 this.$confirm('已经存在不动产单元号或者自然幢号, 是否继续?', '提示', {
745 confirmButtonText: '确定',
746 cancelButtonText: '取消',
747 type: 'warning'
748 }).then(() => {
749 getBdcdyh(this.form.zrzh,"h")
750 .then((res)=>{
751 this.form.zrzh=res.result.substring(0,24);
752 this.form.bdcdyh=res.result;
753 })
754 this.$message({
755 type: 'success',
756 message: '生成成功!'
757 });
758 }).catch(() => {
759 this.$message({
760 type: 'info',
761 message: '已取消'
762 });
763 });
764 },
765
742 generatorCode(){ 766 generatorCode(){
767 if((this.form.zrzh!=null&&this.form.zrzh!=='')||(this.form.bdcdyh!=null&&this.form.bdcdyh!=='')){
768 this.open();
769 return;
770 }
743 getBdcdyh(this.form.zrzh,"h") 771 getBdcdyh(this.form.zrzh,"h")
744 .then((res)=>{ 772 .then((res)=>{
745 this.form.zrzh=res.result.substring(0,24); 773 this.form.zrzh=res.result.substring(0,24);
......
...@@ -24,9 +24,8 @@ ...@@ -24,9 +24,8 @@
24 </td> 24 </td>
25 <td colspan="2" >不动产单元号</td> 25 <td colspan="2" >不动产单元号</td>
26 <td colspan="4" > 26 <td colspan="4" >
27 <input class="formInput percent78" v-show="form.bdcdyh === ''||form.bdcdyh == null " :disabled="form.qszt!='0'" v-model="form.bdcdyh" style="width: 70%"> 27 <input class="formInput percent78" :disabled="form.qszt!='0'" v-model="form.bdcdyh" style="width: 70%">
28 <input class="formInput" :disabled="form.qszt!='0'" v-show="form.bdcdyh !== ''&&form.bdcdyh != null " v-model="form.bdcdyh" style="width: 100%"> 28 <el-button @click.prevent="generatorCode" type="primary" size="mini" style="width:25%;margin-left:3%">生成</el-button>
29 <el-button @click.prevent="generatorCode" type="primary" size="mini" style="width:25%;margin-left:3%" v-show="form.bdcdyh === ''||form.bdcdyh == null ">生成</el-button>
30 </td> 29 </td>
31 </tr> 30 </tr>
32 31
...@@ -445,7 +444,33 @@ ...@@ -445,7 +444,33 @@
445 } 444 }
446 }) 445 })
447 }, 446 },
447 open() {
448 this.$confirm('已经存在不动产单元号或者自然幢号, 是否继续?', '提示', {
449 confirmButtonText: '确定',
450 cancelButtonText: '取消',
451 type: 'warning'
452 }).then(() => {
453 getBdcdyh(this.form.zddm,"zrz")
454 .then((res)=>{
455 this.form.zrzh=res.result.substring(0,24);
456 this.form.bdcdyh=res.result;
457 });
458 this.$message({
459 type: 'success',
460 message: '生成成功!'
461 });
462 }).catch(() => {
463 this.$message({
464 type: 'info',
465 message: '已取消'
466 });
467 });
468 },
448 generatorCode(){ 469 generatorCode(){
470 if((this.form.zrzh!=null&&this.form.zrzh!=='')||(this.form.bdcdyh!=null&&this.form.bdcdyh!=='')){
471 this.open();
472 return;
473 }
449 getBdcdyh(this.form.zddm,"zrz") 474 getBdcdyh(this.form.zddm,"zrz")
450 .then((res)=>{ 475 .then((res)=>{
451 this.form.zrzh=res.result.substring(0,24); 476 this.form.zrzh=res.result.substring(0,24);
...@@ -560,6 +585,7 @@ ...@@ -560,6 +585,7 @@
560 background-color: #fff; 585 background-color: #fff;
561 font-size: 14px; 586 font-size: 14px;
562 width: 100%; 587 width: 100%;
588 table-layout: fixed;
563 th { 589 th {
564 height: 36px; 590 height: 36px;
565 line-height: 36px; 591 line-height: 36px;
......