3532e642 by zhaoqian

权利人相关保存

1 parent e8ce05ee
...@@ -11,6 +11,30 @@ export function insertQlrDlrFr(data) { ...@@ -11,6 +11,30 @@ export function insertQlrDlrFr(data) {
11 } 11 }
12 12
13 /** 13 /**
14 * 更新权利人法人代理人
15 */
16 export function updateQlrDlrFr(data) {
17 return request({
18 url: '/system/Qlr/updateQlrDlrFr',
19 method: 'put',
20 data: data,
21 })
22 }
23
24 /**
25 * 删除权利人法人代理人
26 */
27 export function deleteQlrDlrFrByQlrbsm(bsm) {
28 return request({
29 url: '/system/Qlr/deleteQlrDlrFrByQlrbsm',
30 method: 'delete',
31 params: {
32 qlrbsm:bsm
33 },
34 })
35 }
36
37 /**
14 * 根据glbsm查询qlr信息 38 * 根据glbsm查询qlr信息
15 */ 39 */
16 export function getQlrInfoByGlbsm(data) { 40 export function getQlrInfoByGlbsm(data) {
......
...@@ -7,10 +7,9 @@ ...@@ -7,10 +7,9 @@
7 <td colspan="8"> 7 <td colspan="8">
8 <el-row> 8 <el-row>
9 <el-col :span="12" class="fl"> 9 <el-col :span="12" class="fl">
10 <el-radio v-model="gyfs" label="1">单独所有</el-radio> 10 <el-radio-group v-model="gyfs">
11 <el-radio v-model="gyfs" label="2">共同所有</el-radio> 11 <el-radio :label="item.bsm" :key="item.bsm" v-for="item in $store.state.gyfsList">{{item.mc}}</el-radio>
12 <el-radio v-model="gyfs" label="3">按份共有</el-radio> 12 </el-radio-group>
13 <el-radio v-model="gyfs" label="4">其他共有</el-radio>
14 </el-col> 13 </el-col>
15 <el-col :span="4" class="fr"> 14 <el-col :span="4" class="fr">
16 <span class="span" @click="addRow">新增</span> 15 <span class="span" @click="addRow">新增</span>
...@@ -33,15 +32,15 @@ ...@@ -33,15 +32,15 @@
33 </el-table-column> 32 </el-table-column>
34 <el-table-column prop="qlrmc" label="权利人名称" align="center"> 33 <el-table-column prop="qlrmc" label="权利人名称" align="center">
35 </el-table-column> 34 </el-table-column>
36 <el-table-column prop="qlrlx" label="权利人类型" align="center"> 35 <el-table-column prop="qlrlxbsm_dictText" label="权利人类型" align="center">
37 </el-table-column> 36 </el-table-column>
38 <el-table-column prop="zjzl" label="证件种类" align="center"> 37 <el-table-column prop="zjzlbsm_dictText" label="证件种类" align="center">
39 </el-table-column> 38 </el-table-column>
40 <el-table-column prop="zjh" label="证件号" align="center"> 39 <el-table-column prop="zjh" label="证件号" align="center">
41 </el-table-column> 40 </el-table-column>
42 <el-table-column prop="txdz" label="通讯地址" align="center"> 41 <el-table-column prop="dz" label="通讯地址" align="center">
43 </el-table-column> 42 </el-table-column>
44 <el-table-column prop="lxdh" label="联系电话" align="center"> 43 <el-table-column prop="dh" label="联系电话" align="center">
45 </el-table-column> 44 </el-table-column>
46 </el-table> 45 </el-table>
47 <el-dialog 46 <el-dialog
...@@ -198,7 +197,7 @@ ...@@ -198,7 +197,7 @@
198 <tr> 197 <tr>
199 <td colspan="10">代理人信息</td> 198 <td colspan="10">代理人信息</td>
200 </tr> 199 </tr>
201 <template v-for="(item, index) in formData.dlr"> 200 <template v-for="(item, index) in formData.dlrList">
202 <tr :key="item.index"> 201 <tr :key="item.index">
203 <td rowspan="2" class="btnCol"> 202 <td rowspan="2" class="btnCol">
204 <el-button 203 <el-button
...@@ -295,40 +294,35 @@ ...@@ -295,40 +294,35 @@
295 294
296 <script> 295 <script>
297 import {getDdicByMC} from "../../api/common"; 296 import {getDdicByMC} from "../../api/common";
298 import {insertQlrDlrFr,getQlrInfoByGlbsm} from "../../api/qlr"; 297 import {insertQlrDlrFr,getQlrInfoByGlbsm,updateQlrDlrFr,deleteQlrDlrFrByQlrbsm} from "../../api/qlr";
299 298
300 export default { 299 export default {
301 props: { 300 props: {
302 // widtd: { 301 widtd: {
303 // type: String, 302 type: String,
304 // default: "70%", 303 default: "70%",
305 // }, 304 },
306 // title: { 305 title: {
307 // type: String, 306 type: String,
308 // default: "", 307 default: "",
309 // }, 308 },
310 // topHeight: { 309 topHeight: {
311 // type: String, 310 type: String,
312 // default: "15vh", 311 default: "15vh",
313 // },
314 lx: {
315 type:String,
316 }, 312 },
317 bsm: {
318 type:String,
319 required:true
320 }
321 }, 313 },
322 data() { 314 data() {
323 return { 315 return {
324 gyfs: "1", 316 update:false,
317 bsm:'',
318 gyfs: '',
325 tableData: [], 319 tableData: [],
326 //表格选中项 320 //表格选中项
327 multipleSelection: {}, 321 multipleSelection: [],
328 dialogVisible: false, 322 dialogVisible: false,
329 formData: { 323 formData: {
330 addQjDlrFrRequest:[], 324 addQjDlrFrRequest:[],
331 dlr: [ 325 dlrList: [
332 { 326 {
333 dh: "", 327 dh: "",
334 dlrfrmc: "", 328 dlrfrmc: "",
...@@ -368,50 +362,80 @@ ...@@ -368,50 +362,80 @@
368 zjh: "", 362 zjh: "",
369 zjzlbsm: "", 363 zjzlbsm: "",
370 }, 364 },
371 // qlrlxList: [], 365 glbsm:'',
372 // zjzlList: [],
373 // gjList: [],
374 // ssList: [],
375 // xbList: [],
376 // sshyList: [],
377 // gyfsList: [],
378 }; 366 };
379 }, 367 },
380 methods: { 368 methods: {
381 //新增行数据 369 //新增行数据
382 addRow() { 370 addRow() {
383 if (this.gyfs == "1") { 371 this.update=false;
384 this.$message({ 372 let flag=false;
385 message: "当前共有方式不可新增权利人", 373 for(let i = 0;i<this.$store.state.gyfsList.length;i++){
386 type: "warning", 374 let item = this.$store.state.gyfsList[i];
387 }); 375 if(item.mc==="单独所有" && item.bsm===this.gyfs){
388 } else { 376 flag=true;
377 }
378 }
379 if(flag){
380 if(this.tableData.length>0){
381 this.$message({
382 message: "当前方式不可再新增权利人",
383 type: "warning",
384 });
385 }else {
386 this.dialogVisible = true;
387 }
388 }else {
389 this.dialogVisible = true; 389 this.dialogVisible = true;
390 } 390 }
391 }, 391 },
392 //确认权利人信息按钮;可以进行新增;可以进行更新;
392 addNewQlrInfo(){ 393 addNewQlrInfo(){
393 //todo 权利人页面调整 394 //todo 权利人页面调整
395 this.formData.addQjDlrFrRequest=[];
394 this.formData.glbsm=this.bsm; 396 this.formData.glbsm=this.bsm;
397 this.formData.gyfsbsm=this.gyfs;
395 //将代理人,法人数据合在一起,名称为addQjDlrFrRequest; 398 //将代理人,法人数据合在一起,名称为addQjDlrFrRequest;
396 //法人的type字段类型为0 399 //法人的type字段类型为0,
397 this.formData.fr.type=0; 400 this.formData.fr.type=0;
398 this.formData.addQjDlrFrRequest.push(this.formData.fr); 401 this.formData.addQjDlrFrRequest.push(this.formData.fr);
399 for(let k=0;k<this.formData.dlr.length;k++){ 402 for(let k=0;k<this.formData.dlrList.length;k++){
400 this.formData.dlr[k].type=1; 403 //代理人的type字段类型为1,
401 this.formData.addQjDlrFrRequest.push(this.formData.dlr[k]); 404 this.formData.dlrList[k].type=1;
405 this.formData.addQjDlrFrRequest.push(this.formData.dlrList[k]);
402 } 406 }
403 insertQlrDlrFr(this.formData).then((res)=>{ 407
404 if(res.code===200){ 408 //如果是从更新按钮点击确定的则进行更新操作,如果不是,则进行添加操作
405 this.tableData.push(this.formData); 409 if(this.update){
406 Object.assign(this.$data, this.$options.data()) 410 console.log(this.formData)
407 this.dialogVisible = false; 411 updateQlrDlrFr(this.formData).then((res)=>{
408 } 412 if(res.code===200){
409 }) 413 this.$message.success("修改完成!");
414 this.update=false;
415 this.dialogVisible = false;
416 }
417 })
418 }else {
419 insertQlrDlrFr(this.formData).then((res)=>{
420 if(res.code===200){
421 this.tableData.push(this.formData);
422 Object.assign(this.$data, this.$options.data())
423 this.dialogVisible = false;
424 this.getQlrInfo();
425 }
426 })
427 }
428
410 }, 429 },
411 //修改行数据 430 //修改行数据
412 changeRow() { 431 changeRow() {
413 if (this.multipleSelection.length == 1) { 432 if (this.multipleSelection.length === 1) {
414 this.dialogVisible = true; 433 this.dialogVisible = true;
434 this.update=true;
435 this.formData=this.multipleSelection[0];
436 if(this.multipleSelection[0].frList.length>0){
437 this.formData.fr=this.multipleSelection[0].frList[0];
438 }
415 } else { 439 } else {
416 this.$message({ 440 this.$message({
417 message: "请选择一条信息后继续操作", 441 message: "请选择一条信息后继续操作",
...@@ -458,7 +482,7 @@ ...@@ -458,7 +482,7 @@
458 //增删代理人 482 //增删代理人
459 handleClick(obj, ind, type) { 483 handleClick(obj, ind, type) {
460 if (type === "add") { 484 if (type === "add") {
461 this.formData.dlr.push({ 485 this.formData.dlrList.push({
462 id: Math.random(), 486 id: Math.random(),
463 dh: "", 487 dh: "",
464 dlrfrmc: "", 488 dlrfrmc: "",
...@@ -467,7 +491,7 @@ ...@@ -467,7 +491,7 @@
467 zjzlbsm: "", 491 zjzlbsm: "",
468 }); 492 });
469 } else { 493 } else {
470 this.formData.dlr.forEach((item, index) => { 494 this.formData.dlrList.forEach((item, index) => {
471 if (index == ind && this.formData.dlr.length > 1) { 495 if (index == ind && this.formData.dlr.length > 1) {
472 this.formData.dlr.splice(ind, 1); 496 this.formData.dlr.splice(ind, 1);
473 } 497 }
...@@ -475,26 +499,27 @@ ...@@ -475,26 +499,27 @@
475 } 499 }
476 }, 500 },
477 getQlrInfo(){ 501 getQlrInfo(){
478 console.log("===========================")
479 console.log(this.bsm)
480 getQlrInfoByGlbsm(this.bsm).then((res)=>{ 502 getQlrInfoByGlbsm(this.bsm).then((res)=>{
481 if(res.code){ 503 if(res.code){
482 if(res.result!=null){ 504 if(res.result!=null){
483 this.tableData=res.result; 505 this.tableData=res.result;
506 this.gyfs=res.result[0].gyfsbsm;
484 } 507 }
485 } 508 }
486 }) 509 })
487 } 510 }
488 }, 511 },
489 created(){ 512 created(){
490 console.log("===========================cres") 513 },
491 console.log(this.bsm) 514 mounted() {
492 515 this.bsm=localStorage.getItem("zrzbsm");
493 this.getQlrInfo(); 516 this.getQlrInfo();
494 }, 517 if(this.$store.state.gyfsList.length>0){
495 mounted() { 518 this.gyfs=this.$store.state.gyfsList[0].bsm;
496 } 519 }
497 }; 520
521 },
522 };
498 </script> 523 </script>
499 <style lang="less"> 524 <style lang="less">
500 .temp { 525 .temp {
......
...@@ -219,8 +219,12 @@ export default { ...@@ -219,8 +219,12 @@ export default {
219 this.$store.zdbsm=res.result.zdbsm; 219 this.$store.zdbsm=res.result.zdbsm;
220 this.$store.zrzbsm=res.result.bsm; 220 this.$store.zrzbsm=res.result.bsm;
221 this.$store.xmmc=res.result.xmmc; 221 this.$store.xmmc=res.result.xmmc;
222 localStorage.setItem("zrzbsm",res.result.bsm)
222 this.$router.push({ 223 this.$router.push({
223 path: '/zrz', query:{source: 1} 224 path: '/zrz', query:{
225 source: 1,
226 bsm:res.result.bsm
227 }
224 }); 228 });
225 } else { 229 } else {
226 this.$message.error("创建失败!"); 230 this.$message.error("创建失败!");
......
1 <template> 1 <template>
2 <div class="zrz content-form" v-loading="loading"> 2 <div class="zrz content-form" v-loading="loading">
3 <el-form ref="form" :model="form" label-width="160px"> 3 <el-form ref="form" :model="form" label-width="160px">
4 <Qlr ref="qlrxxModule" :lx="lx" :bsm="zrzbsm"></Qlr> 4 <Qlr ref="qlrxxModule"></Qlr>
5 <table border="1" width="100%" cellspacing="0" cellpadding="0" class="zrzTable"> 5 <table border="1" width="100%" cellspacing="0" cellpadding="0" class="zrzTable">
6 <tbody> 6 <tbody>
7 <tr height="30"> 7 <tr height="30">
...@@ -534,14 +534,24 @@ ...@@ -534,14 +534,24 @@
534 getZrzDetailByBsm(data).then((res)=>{ 534 getZrzDetailByBsm(data).then((res)=>{
535 if(res.code===200){ 535 if(res.code===200){
536 this.form=res.result; 536 this.form=res.result;
537 if(this.form.fwjgList.length===0){
538 this.form.fwjgList.push({
539 fwjgzdbsm:'', //房屋结构字典标识码
540 glbsm:'', //关联标识码
541 sx:'', //顺序
542 })
543 }
544 if(this.form.fwytList.length===0){
545 this.form.fwytList.push({
546 glbsm:'', //关联标识码
547 fwytzdbsm:'', //房屋用途字典标识码
548 sx:'', //顺序
549 fwsjytbsm:'', //房屋实际用途字典标识码
550 })
551 }
537 } 552 }
538 }) 553 })
539 }, 554 },
540 consoleLog(data){
541 console.log("============================")
542 console.log(data)
543 }
544
545 }, 555 },
546 created(){ 556 created(){
547 this.getDDic(); 557 this.getDDic();
...@@ -549,18 +559,22 @@ ...@@ -549,18 +559,22 @@
549 this.source = this.$route.query.source; 559 this.source = this.$route.query.source;
550 //source为1代表是从新建中进入道该页面的,source为2代表是从综合查询进入到该页面的 560 //source为1代表是从新建中进入道该页面的,source为2代表是从综合查询进入到该页面的
551 if(this.source===1){ 561 if(this.source===1){
552 this.form.zdbsm=this.$store.zdbsm; 562 this.zrzbsm=this.$route.query.bsm;
563 // this.form.zdbsm=this.$store.zdbsm;
564 // this.form.xmmc=this.$store.xmmc;
565 // this.form.zrzbsm=this.$store.zrzbsm;
553 this.getZddm(this.$store.zdbsm); 566 this.getZddm(this.$store.zdbsm);
554 this.form.xmmc=this.$store.xmmc; 567
555 this.form.zrzbsm=this.$store.zrzbsm;
556 568
557 }else { 569 }else {
558 this.zrzbsm=this.$route.query.bsm; 570 this.zrzbsm=this.$route.query.bsm;
559 this.getZrzDetailByBsm(this.$route.query.bsm) 571 this.getZrzDetailByBsm(this.$route.query.bsm)
560 this.consoleLog(this.zrzbsm)
561 } 572 }
562 }, 573 },
563 mounted() { 574 mounted() {
575 if(this.source!==1){
576 this.getZrzDetailByBsm(this.$route.query.bsm)
577 }
564 } 578 }
565 } 579 }
566 </script> 580 </script>
......