b299b5bf by 杨威
2 parents 50024357 a084c209
......@@ -11,6 +11,30 @@ export function insertQlrDlrFr(data) {
}
/**
* 更新权利人法人代理人
*/
export function updateQlrDlrFr(data) {
return request({
url: '/system/Qlr/updateQlrDlrFr',
method: 'put',
data: data,
})
}
/**
* 删除权利人法人代理人
*/
export function deleteQlrDlrFrByQlrbsm(bsm) {
return request({
url: '/system/Qlr/deleteQlrDlrFrByQlrbsm',
method: 'delete',
params: {
qlrbsm:bsm
},
})
}
/**
* 根据glbsm查询qlr信息
*/
export function getQlrInfoByGlbsm(data) {
......
......@@ -7,10 +7,9 @@
<td colspan="8">
<el-row>
<el-col :span="12" class="fl">
<el-radio v-model="gyfs" label="1">单独所有</el-radio>
<el-radio v-model="gyfs" label="2">共同所有</el-radio>
<el-radio v-model="gyfs" label="3">按份共有</el-radio>
<el-radio v-model="gyfs" label="4">其他共有</el-radio>
<el-radio-group v-model="gyfs">
<el-radio :label="item.bsm" :key="item.bsm" v-for="item in $store.state.gyfsList">{{item.mc}}</el-radio>
</el-radio-group>
</el-col>
<el-col :span="4" class="fr">
<span class="span" @click="addRow">新增</span>
......@@ -33,15 +32,15 @@
</el-table-column>
<el-table-column prop="qlrmc" label="权利人名称" align="center">
</el-table-column>
<el-table-column prop="qlrlx" label="权利人类型" align="center">
<el-table-column prop="qlrlxbsm_dictText" label="权利人类型" align="center">
</el-table-column>
<el-table-column prop="zjzl" label="证件种类" align="center">
<el-table-column prop="zjzlbsm_dictText" label="证件种类" align="center">
</el-table-column>
<el-table-column prop="zjh" label="证件号" align="center">
</el-table-column>
<el-table-column prop="txdz" label="通讯地址" align="center">
<el-table-column prop="dz" label="通讯地址" align="center">
</el-table-column>
<el-table-column prop="lxdh" label="联系电话" align="center">
<el-table-column prop="dh" label="联系电话" align="center">
</el-table-column>
</el-table>
<el-dialog
......@@ -198,7 +197,7 @@
<tr>
<td colspan="10">代理人信息</td>
</tr>
<template v-for="(item, index) in formData.dlr">
<template v-for="(item, index) in formData.dlrList">
<tr :key="item.index">
<td rowspan="2" class="btnCol">
<el-button
......@@ -295,40 +294,35 @@
<script>
import {getDdicByMC} from "../../api/common";
import {insertQlrDlrFr,getQlrInfoByGlbsm} from "../../api/qlr";
import {insertQlrDlrFr,getQlrInfoByGlbsm,updateQlrDlrFr,deleteQlrDlrFrByQlrbsm} from "../../api/qlr";
export default {
props: {
// widtd: {
// type: String,
// default: "70%",
// },
// title: {
// type: String,
// default: "",
// },
// topHeight: {
// type: String,
// default: "15vh",
// },
lx: {
type:String,
widtd: {
type: String,
default: "70%",
},
title: {
type: String,
default: "",
},
topHeight: {
type: String,
default: "15vh",
},
bsm: {
type:String,
required:true
}
},
data() {
return {
gyfs: "1",
update:false,
bsm:'',
gyfs: '',
tableData: [],
//表格选中项
multipleSelection: {},
multipleSelection: [],
dialogVisible: false,
formData: {
addQjDlrFrRequest:[],
dlr: [
dlrList: [
{
dh: "",
dlrfrmc: "",
......@@ -368,50 +362,80 @@
zjh: "",
zjzlbsm: "",
},
// qlrlxList: [],
// zjzlList: [],
// gjList: [],
// ssList: [],
// xbList: [],
// sshyList: [],
// gyfsList: [],
glbsm:'',
};
},
methods: {
//新增行数据
addRow() {
if (this.gyfs == "1") {
this.$message({
message: "当前共有方式不可新增权利人",
type: "warning",
});
} else {
this.update=false;
let flag=false;
for(let i = 0;i<this.$store.state.gyfsList.length;i++){
let item = this.$store.state.gyfsList[i];
if(item.mc==="单独所有" && item.bsm===this.gyfs){
flag=true;
}
}
if(flag){
if(this.tableData.length>0){
this.$message({
message: "当前方式不可再新增权利人",
type: "warning",
});
}else {
this.dialogVisible = true;
}
}else {
this.dialogVisible = true;
}
},
//确认权利人信息按钮;可以进行新增;可以进行更新;
addNewQlrInfo(){
//todo 权利人页面调整
this.formData.addQjDlrFrRequest=[];
this.formData.glbsm=this.bsm;
this.formData.gyfsbsm=this.gyfs;
//将代理人,法人数据合在一起,名称为addQjDlrFrRequest;
//法人的type字段类型为0
//法人的type字段类型为0,
this.formData.fr.type=0;
this.formData.addQjDlrFrRequest.push(this.formData.fr);
for(let k=0;k<this.formData.dlr.length;k++){
this.formData.dlr[k].type=1;
this.formData.addQjDlrFrRequest.push(this.formData.dlr[k]);
for(let k=0;k<this.formData.dlrList.length;k++){
//代理人的type字段类型为1,
this.formData.dlrList[k].type=1;
this.formData.addQjDlrFrRequest.push(this.formData.dlrList[k]);
}
insertQlrDlrFr(this.formData).then((res)=>{
if(res.code===200){
this.tableData.push(this.formData);
Object.assign(this.$data, this.$options.data())
this.dialogVisible = false;
}
})
//如果是从更新按钮点击确定的则进行更新操作,如果不是,则进行添加操作
if(this.update){
console.log(this.formData)
updateQlrDlrFr(this.formData).then((res)=>{
if(res.code===200){
this.$message.success("修改完成!");
this.update=false;
this.dialogVisible = false;
}
})
}else {
insertQlrDlrFr(this.formData).then((res)=>{
if(res.code===200){
this.tableData.push(this.formData);
Object.assign(this.$data, this.$options.data())
this.dialogVisible = false;
this.getQlrInfo();
}
})
}
},
//修改行数据
changeRow() {
if (this.multipleSelection.length == 1) {
if (this.multipleSelection.length === 1) {
this.dialogVisible = true;
this.update=true;
this.formData=this.multipleSelection[0];
if(this.multipleSelection[0].frList.length>0){
this.formData.fr=this.multipleSelection[0].frList[0];
}
} else {
this.$message({
message: "请选择一条信息后继续操作",
......@@ -458,7 +482,7 @@
//增删代理人
handleClick(obj, ind, type) {
if (type === "add") {
this.formData.dlr.push({
this.formData.dlrList.push({
id: Math.random(),
dh: "",
dlrfrmc: "",
......@@ -467,7 +491,7 @@
zjzlbsm: "",
});
} else {
this.formData.dlr.forEach((item, index) => {
this.formData.dlrList.forEach((item, index) => {
if (index == ind && this.formData.dlr.length > 1) {
this.formData.dlr.splice(ind, 1);
}
......@@ -475,26 +499,27 @@
}
},
getQlrInfo(){
console.log("===========================")
console.log(this.bsm)
getQlrInfoByGlbsm(this.bsm).then((res)=>{
if(res.code){
if(res.result!=null){
this.tableData=res.result;
this.gyfs=res.result[0].gyfsbsm;
}
}
})
}
},
created(){
console.log("===========================cres")
console.log(this.bsm)
this.getQlrInfo();
},
mounted() {
created(){
},
mounted() {
this.bsm=localStorage.getItem("zrzbsm");
this.getQlrInfo();
if(this.$store.state.gyfsList.length>0){
this.gyfs=this.$store.state.gyfsList[0].bsm;
}
};
},
};
</script>
<style lang="less">
.temp {
......
......@@ -219,8 +219,12 @@ export default {
this.$store.zdbsm=res.result.zdbsm;
this.$store.zrzbsm=res.result.bsm;
this.$store.xmmc=res.result.xmmc;
localStorage.setItem("zrzbsm",res.result.bsm)
this.$router.push({
path: '/zrz', query:{source: 1}
path: '/zrz', query:{
source: 1,
bsm:res.result.bsm
}
});
} else {
this.$message.error("创建失败!");
......
<template>
<div class="zrz content-form" v-loading="loading">
<el-form ref="form" :model="form" label-width="160px">
<Qlr ref="qlrxxModule" :lx="lx" :bsm="zrzbsm"></Qlr>
<Qlr ref="qlrxxModule"></Qlr>
<table border="1" width="100%" cellspacing="0" cellpadding="0" class="zrzTable">
<tbody>
<tr height="30">
......@@ -534,14 +534,24 @@
getZrzDetailByBsm(data).then((res)=>{
if(res.code===200){
this.form=res.result;
if(this.form.fwjgList.length===0){
this.form.fwjgList.push({
fwjgzdbsm:'', //房屋结构字典标识码
glbsm:'', //关联标识码
sx:'', //顺序
})
}
if(this.form.fwytList.length===0){
this.form.fwytList.push({
glbsm:'', //关联标识码
fwytzdbsm:'', //房屋用途字典标识码
sx:'', //顺序
fwsjytbsm:'', //房屋实际用途字典标识码
})
}
}
})
},
consoleLog(data){
console.log("============================")
console.log(data)
}
},
created(){
this.getDDic();
......@@ -549,18 +559,22 @@
this.source = this.$route.query.source;
//source为1代表是从新建中进入道该页面的,source为2代表是从综合查询进入到该页面的
if(this.source===1){
this.form.zdbsm=this.$store.zdbsm;
this.zrzbsm=this.$route.query.bsm;
// this.form.zdbsm=this.$store.zdbsm;
// this.form.xmmc=this.$store.xmmc;
// this.form.zrzbsm=this.$store.zrzbsm;
this.getZddm(this.$store.zdbsm);
this.form.xmmc=this.$store.xmmc;
this.form.zrzbsm=this.$store.zrzbsm;
}else {
this.zrzbsm=this.$route.query.bsm;
this.getZrzDetailByBsm(this.$route.query.bsm)
this.consoleLog(this.zrzbsm)
}
},
mounted() {
if(this.source!==1){
this.getZrzDetailByBsm(this.$route.query.bsm)
}
}
}
</script>
......