debb055d by zhaoqian

权利人数据保存修改

1 parent 9db815d8
......@@ -17,7 +17,6 @@ export default {
},
//请求字典数据
getDic() {
debugger
let s = this.$store.state;
s.zjzlList = s.zjzlList.length == 0 ? this.getDicData("证件种类") : s.zjzlList;
s.gjList = s.gjList.length == 0 ? this.getDicData("国家和地区") : s.gjList;
......
import request from '@/plugin/axios'
/**
* 新增权利人法人代理人
*/
export function insertQlrDlrFr(data) {
return request({
url: '/system/Qlr/insertQlrDlrFr',
method: 'post',
data: data,
})
}
/**
* 根据glbsm查询qlr信息
*/
export function getQlrInfoByGlbsm(data) {
return request({
url: '/system/Qlr/getQlrByGlbsm',
method: 'get',
params: {
glbsm:data
},
})
}
\ No newline at end of file
......@@ -75,7 +75,7 @@
<td colspan="3">
<el-select class="formSelect" v-model="formData.zjzlbsm">
<el-option
v-for="item in qllxList"
v-for="item in zjlxList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
......@@ -103,7 +103,7 @@
<td colspan="3">
<el-select class="formSelect" v-model="formData.gjbsm">
<el-option
v-for="item in qllxList"
v-for="item in gjList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
......@@ -115,7 +115,7 @@
<td colspan="3">
<el-select class="formSelect" v-model="formData.hjszssbsm">
<el-option
v-for="item in qllxList"
v-for="item in ssList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
......@@ -129,7 +129,7 @@
<td colspan="3">
<el-select class="formSelect" v-model="formData.xbbsm">
<el-option
v-for="item in qllxList"
v-for="item in xbList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
......@@ -147,7 +147,7 @@
<td colspan="3">
<el-select class="formSelect" v-model="formData.sshy">
<el-option
v-for="item in qllxList"
v-for="item in sshyList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
......@@ -176,7 +176,7 @@
<td colspan="3">
<el-select class="formSelect" v-model="formData.fr.zjzlbsm">
<el-option
v-for="item in qllxList"
v-for="item in zjlxList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
......@@ -199,7 +199,7 @@
<td colspan="10">代理人信息</td>
</tr>
<template v-for="(item, index) in formData.dlr">
<tr :key="item.zjh">
<tr :key="item.index">
<td rowspan="2" class="btnCol">
<el-button
type="primary"
......@@ -222,7 +222,7 @@
<td colspan="3">
<el-select class="formSelect" v-model="item.zjzlbsm">
<el-option
v-for="item in qllxList"
v-for="item in zjlxList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
......@@ -231,7 +231,8 @@
</el-select>
</td>
</tr>
<tr :key="item.dh">
<!-- <tr :key="item.dh">-->
<tr>
<td>证件号码</td>
<td colspan="3">
<input type="text" class="formInput" v-model="item.zjh" />
......@@ -251,7 +252,7 @@
<td colspan="3">
<el-select class="formSelect" v-model="formData.gyfsbsm">
<el-option
v-for="item in qllxList"
v-for="item in gyfsList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
......@@ -283,7 +284,7 @@
</table>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="dialogVisible = false"
<el-button type="primary" @click="addNewQlrInfo"
>确 定</el-button
>
<el-button @click="dialogVisible = false">取 消</el-button>
......@@ -293,20 +294,30 @@
</template>
<script>
export default {
import {getDdicByMC} from "../../api/common";
import {insertQlrDlrFr,getQlrInfoByGlbsm} from "../../api/qlr";
export default {
props: {
widtd: {
type: String,
default: "70%",
},
title: {
type: String,
default: "",
},
topHeight: {
type: String,
default: "15vh",
// widtd: {
// type: String,
// default: "70%",
// },
// title: {
// type: String,
// default: "",
// },
// topHeight: {
// type: String,
// default: "15vh",
// },
lx: {
type:String,
},
bsm: {
type:String,
required:true
}
},
data() {
return {
......@@ -316,6 +327,7 @@ export default {
multipleSelection: {},
dialogVisible: false,
formData: {
addQjDlrFrRequest:[],
dlr: [
{
dh: "",
......@@ -357,6 +369,12 @@ export default {
zjzlbsm: "",
},
qllxList: [],
zjlxList: [],
gjList: [],
ssList: [],
xbList: [],
sshyList: [],
gyfsList: [],
};
},
methods: {
......@@ -371,6 +389,25 @@ export default {
this.dialogVisible = true;
}
},
addNewQlrInfo(){
//todo 权利人页面调整
this.formData.glbsm=this.bsm;
//将代理人,法人数据合在一起,名称为addQjDlrFrRequest;
//法人的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]);
}
insertQlrDlrFr(this.formData).then((res)=>{
if(res.code===200){
this.tableData.push(this.formData);
Object.assign(this.$data, this.$options.data())
this.dialogVisible = false;
}
})
},
//修改行数据
changeRow() {
if (this.multipleSelection.length == 1) {
......@@ -437,8 +474,51 @@ export default {
});
}
},
getDdic(){
getDdicByMC("权利人类型").then((res)=>{
this.qllxList=res.result;
})
getDdicByMC("证件种类").then((res)=>{
this.zjlxList=res.result;
})
getDdicByMC("国家和地区").then((res)=>{
this.gjList=res.result;
})
getDdicByMC("省市").then((res)=>{
this.ssList=res.result;
})
getDdicByMC("性别").then((res)=>{
this.xbList=res.result;
})
getDdicByMC("所属行业").then((res)=>{
this.sshyList=res.result;
})
getDdicByMC("共有方式").then((res)=>{
this.gyfsList=res.result;
})
},
getQlrInfo(){
console.log("===========================")
console.log(this.bsm)
getQlrInfoByGlbsm(this.bsm).then((res)=>{
if(res.code){
if(res.result!=null){
this.tableData=res.result;
}
}
})
}
},
};
created(){
console.log("===========================cres")
console.log(this.bsm)
this.getQlrInfo();
},
mounted() {
this.getDdic();
}
};
</script>
<style lang="less">
.temp {
......
<template>
<div class="zrz content-form" v-loading="loading">
<el-form ref="form" :model="form" label-width="160px">
<Qlr ref="qlrxxModule"></Qlr>
<Qlr ref="qlrxxModule" :lx="lx" :bsm="zrzbsm"></Qlr>
<table border="1" width="100%" cellspacing="0" cellpadding="0" class="zrzTable">
<tbody>
<tr height="30">
......@@ -280,6 +280,8 @@
},
data () {
return {
lx:"zrz",
zrzbsm:'',
form:{
zrzbsm:'', //自然幢标识码
zdbsm:'', //宗地标识码
......@@ -395,7 +397,6 @@
}
},
onSave(){
console.log(this.form)
this.loading=true;
// this.form.qlxzList=this.$refs.qlxzModule.getQlxzDataList();
this.form.qlxzList=
......@@ -532,16 +533,17 @@
getZrzDetailByBsm(data){
getZrzDetailByBsm(data).then((res)=>{
if(res.code===200){
console.log(res.result)
this.form=res.result;
}
})
},
consoleLog(data){
console.log("============================")
console.log(data)
}
},
created(){
},
mounted() {
created(){
this.getDDic();
//todo 怎么判断进入到该页面是从新建处进来的,还是从右键宗地进来的!如果是从新建进来的就需要把虚拟宗标识码带过来;
this.source = this.$route.query.source;
......@@ -551,10 +553,14 @@
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() {
}
}
</script>
......