784f53aa by weimo934

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/views/panel/change/fwsxbg/index.vue
2 parents 35f7856f ebc923f4
......@@ -75,11 +75,11 @@
<tr>
<td colspan="4" class="tdright"><i class="requisite">*</i>权利人名称</td>
<td colspan="6">
<input type="text" class="formInput" v-model="formData.qlrmc" />
<input type="text" class="formInput" v-model="formData.qlrmc" ref="qlrmc" @blur="inputBlur($event)"/>
</td>
<td colspan="4" class="tdright"><i class="requisite">*</i>权利人类型</td>
<td colspan="6">
<el-select class="formSelect" v-model="formData.qlrlxbsm">
<el-select class="formSelect" v-model="formData.qlrlxbsm" ref="qlrlxbsm" @blur="inputBlur($event)">
<el-option
v-for="item in $store.state.qlrlxList"
:key="item.bsm"
......@@ -93,7 +93,7 @@
<tr>
<td colspan="4" class="tdright"><i class="requisite">*</i>证件类型</td>
<td colspan="6">
<el-select class="formSelect" v-model="formData.zjzlbsm">
<el-select class="formSelect" v-model="formData.zjzlbsm" ref="zjzlbsm" @blur="inputBlur($event)">
<el-option
v-for="item in $store.state.zjzlList"
:key="item.bsm"
......@@ -105,18 +105,18 @@
</td>
<td colspan="4" class="tdright"><i class="requisite">*</i>证件号</td>
<td colspan="6">
<input type="text" class="formInput" maxlength="18" v-model="formData.zjh" />
<input type="text" class="formInput" maxlength="18" v-model="formData.zjh" ref="zjh" @blur="inputBlur($event)"/>
</td>
</tr>
<tr>
<td colspan="4" class="tdright"><i class="requisite">*</i>电话</td>
<td colspan="6">
<!-- @blur="inputBlur($event)"-->
<input type="text" class="formInput" v-model="formData.dh" />
<input type="text" class="formInput" v-model="formData.dh" ref="dh" @blur="inputBlur($event)"/>
</td>
<td colspan="4" class="tdright"><i class="requisite">*</i>地址</td>
<td colspan="6">
<input type="text" class="formInput" v-model="formData.dz" />
<input type="text" class="formInput" v-model="formData.dz" ref="dz" @blur="inputBlur($event)"/>
</td>
</tr>
<tr>
......@@ -384,9 +384,21 @@
zjzlbsm: "",
},
glbsm:'',
rules:[],
};
},
methods: {
inputBlur(e){
if(e.target.value!=''){
e.target.style.border=""
}else{
e.target.style.border="1px solid red";
e.target.style.boxSizing = 'border-box';
}
},
//新增行数据
addRow() {
this.update=false;
......@@ -414,39 +426,97 @@
},
//确认权利人信息按钮;可以进行新增;可以进行更新;
addNewQlrInfo(){
//todo 权利人页面调整
this.formData.addQjDlrFrRequest=[];
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.dlrList.length;k++){
//代理人的type字段类型为1,
this.formData.dlrList[k].type=1;
this.formData.addQjDlrFrRequest.push(this.formData.dlrList[k]);
}
//如果是从更新按钮点击确定的则进行更新操作,如果不是,则进行添加操作
if(this.update){
console.log(this.formData)
updateQlrDlrFr(this.formData).then((res)=>{
if(res.code===200){
this.$message.success("修改完成!");
this.getQlrInfo();
this.update=false;
this.dialogVisible = false;
this.rules=[
{
data:this.formData.qlrmc,
name:'权利人名称',
dom:this.$refs.qlrmc,
rule: /^\s*$/g, //非空
},
{
data:this.formData.qlrlxbsm,
name:'权利人类型',
dom:this.$refs.qlrlxbsm,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zjzlbsm,
name:'证件类型',
dom:this.$refs.zjzlbsm,
rule: /^\s*$/g, //非空
},
{
data:this.formData.zjh,
name:'证件号',
dom:this.$refs.zjh,
rule: /^\s*$/g, //非空
},
{
data:this.formData.dh,
name:'电话',
dom:this.$refs.dh,
rule: /^\s*$/g, //非空
},
{
data:this.formData.dz,
name:'地址',
dom:this.$refs.dz,
rule: /^\s*$/g, //非空
},
]
let flag = true;
this.rules.forEach(item=>{
if(item.rule.test(item.data) || item.data == null){
if(item.dom.$el){
item.dom.$el.style.border = '1px solid red';
item.dom.$el.style.boxSizing = 'border-box';
}else{
item.dom.style.border = '1px solid red';
item.dom.style.boxSizing = 'border-box';
}
})
}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();
flag = false;
return false
}
})
this.$nextTick(()=>{
if (flag) {
//todo 权利人页面调整
this.formData.addQjDlrFrRequest=[];
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.dlrList.length;k++){
//代理人的type字段类型为1,
this.formData.dlrList[k].type=1;
this.formData.addQjDlrFrRequest.push(this.formData.dlrList[k]);
}
})
}
//如果是从更新按钮点击确定的则进行更新操作,如果不是,则进行添加操作
if(this.update){
console.log(this.formData)
updateQlrDlrFr(this.formData).then((res)=>{
if(res.code===200){
this.$message.success("修改完成!");
this.getQlrInfo();
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();
}
})
}
}
})
},
//修改行数据
......@@ -623,12 +693,45 @@
this.gyfsList[i].disabled = item.mc === "单独所有";
}
}
console.log(this.tableData.length+":this.tableData[0].length");
if(this.tableData.length>1){
console.log(JSON.stringify(this.tableData[0])+":this.tableData[0].length");
this.gyfs = this.tableData[0].gyfsbsm
}
},
"formData.qlrlxbsm":function (val) {
console.log(this.$refs.qlrlxbsm.$el.style.border+":console.log(this.$refs.qlrlxbsm.$el.style.border)")
if (val != '') {
console.log(this.$refs.qlrlxbsm.$el.style.border+":console.log(this.$refs.qlrlxbsm.$el.style.border)")
this.$refs.qlrlxbsm.$el.style.border = '';
}
},
"formData.zjzlbsm":function (val) {
if (val != '') {
this.$refs.zjzlbsm.$el.style.border = '';
}
},
// "formData.gyfsbsm":function (val) {
// let ddsy = '';
// for(let i = 0;i<this.gyfsList.length;i++){
// if(this.gyfsList[i].mc === "单独所有"){
// ddsy = this.gyfsList[i].bsm
// }
// }
// if(ddsy === val){
// if(this.update){
// if(this.tableData.length > 1){
// this.$message.warning("权利人人数大于1,不能选择单独所有")
// }
// }else{
// if(this.tableData.length > 0){
// this.$message.warning("权利人人数大于1,不能选择单独所有")
// }
// }
//
// }
// }
}
};
</script>
......
<template>
<div>
<el-dialog v-dialogDrag :close-on-click-modal="false"
title="新增"
title="批量户"
:visible.sync="isVisible"
width="70%"
width="72%"
@close="close"
:modal-append-to-body="false"
>
......@@ -187,13 +187,10 @@
</tr>
<tr>
<td colspan="12" rowspan="4" align="center">
<td colspan="12" align="center">
<Qlxz ref="qlxzModule" :hasSyqx='false' :formData="form"></Qlxz>
</td>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr>
<td colspan="2">东墙体归属</td>
......@@ -370,7 +367,7 @@
close: function () {
this.$emit('close')
this.isVisible = false
this.result()
this.reset()
},
reset: function () {
this.form={
......
......@@ -2,7 +2,7 @@
<el-row class="box">
<el-col :span="24">
<el-row>
<el-col :span="24">
<el-col :span="18">
<el-form :inline="true" class="demo-form-inline" label-width="106px">
<el-form-item label="宗地编码">
<el-input
......@@ -18,14 +18,17 @@
@change="query"
></el-input>
</el-form-item>
<el-form-item label="不动产单元号">
<el-input
<el-form-item label="不动产单元号" >
<el-input style="width: 280px;"
maxlength="28"
v-model="queryData.bdcdyh"
placeholder="输入不动产单元号"
@change="query"
></el-input>
</el-form-item>
</el-form>
</el-col>
<el-col :span="6" aria-rowspan="3">
<el-button type="primary" @click="query" icon="el-icon-search">查询</el-button>
<el-button type="warning" @click="reset" icon="el-icon-refresh">重置</el-button>
<el-button
......@@ -34,11 +37,10 @@
>更多查询
</el-button>
<!-- @click="ismore = !ismore" -->
</el-form>
</el-col>
</el-row>
<el-row class="row3" v-if="ismore">
<el-col :span="22">
<el-col :span="18">
<el-form :inline="true" class="demo-form-inline" label-width="106px">
<el-form-item label="权利人名称">
<el-input
......@@ -55,7 +57,7 @@
></el-input>
</el-form-item>
<el-form-item label="不动产权证号">
<el-input
<el-input style="width: 280px;"
placeholder="输入不动产权证号"
v-model="queryData.bdcqzh"
@change="query"
......@@ -63,11 +65,11 @@
</el-form-item>
</el-form>
</el-col>
<el-col :span="2" :offset="offset">
</el-col>
<!-- <el-col :span="2" :offset="offset">
</el-col> -->
</el-row>
<el-row>
<el-col :span="24">
<el-col :span="18">
<el-form :inline="true" :model="queryData" class="demo-form-inline" label-width="106px">
<el-form-item class="demo-form-inline" label="单元范围">
<el-checkbox-group v-model="queryData.dylxs" @change="query">
......@@ -83,8 +85,6 @@
</el-form-item>
</el-form>
</el-col>
<el-col :span="2">
</el-col>
</el-row>
</el-col>
</el-row>
......
<template>
<div class="main">
<div class="main" style="padding: 18px!important;">
<div class="panel content_box">
<el-card class="panel_left">
<div slot="header" class="clearfix">
......@@ -224,6 +224,7 @@ export default {
flex-direction: column;
overflow: hidden;
height: 100%;
.clearfix {
span {
color: #6d7278;
......@@ -244,6 +245,7 @@ export default {
.panel {
@flex();
width: 100%;
padding: 0 0 18px!important;
.panel_left {
width: 35%;
margin-right: 20px;
......@@ -309,7 +311,7 @@ export default {
}
.notice {
padding: 0;
height: calc(100% - 285px);
height: calc(100% - 266px);
@flex();
.news {
float: left;
......
......@@ -378,6 +378,7 @@ export default {
bjztFlag:true,
taskTitle:'添加',
curBsm:'',
qsztList:[],
};
},
created() {
......@@ -401,13 +402,18 @@ export default {
if (this.bsms.length <= 0) {
Message.warning("请选择操作户")
return
}
batchCommit(this.bsms).then(res=>{
if (res.success) {
Message.success("提交成功");
this.getlpbData();
}
})
}else{
if (this.qsztList.indexOf('1') > -1) {
Message.warning("已提交的户无法继续操作")
}else{
batchCommit(this.bsms).then(res=>{
if (res.success) {
Message.success("提交成功");
this.getlpbData();
}
})
}
}
},
loading(){
this.getLpbMenuTree(this.$store.state.zrzbsm);
......@@ -423,23 +429,28 @@ export default {
if (this.bsms.length <= 0) {
Message.warning("请选择操作户")
return
}
switch (val) {
case 'h':
this.plhVisible=true;
break;
case 'zl':
this.plzlVisible=true;
break;
case 'sh':
this.plShVisible=true;
break;
default:
break;
}
}else{
if (this.qsztList.indexOf('1') > -1) {
Message.warning("已提交的户无法继续操作")
}else{
switch (val) {
case 'h':
this.plhVisible=true;
break;
case 'zl':
this.plzlVisible=true;
break;
case 'sh':
this.plShVisible=true;
break;
default:
break;
}
}
}
},
lodding(){
this.getlpbData();
this.getlpbData();
},
plZlClose() {
this.plzlVisible = false;
......@@ -462,6 +473,7 @@ export default {
//清空已选中层户
this.cbsmList = [];
this.bsms = [];
this.qsztList = [];
this.$refs.lpbContent.hbsmList = [];
this.$nextTick(()=>{
//户
......@@ -565,6 +577,16 @@ export default {
this.bsms = data;
}
},
//获取选中户信息
getQsztList(data, type) {
if (type) {
// 双击
} else {
//单击 TO DO
this.qsztList = data;
}
},
//获取选中层bsmlist
getCbsm(data){
this.cbsmList = data;
......@@ -588,9 +610,11 @@ export default {
});
}
},
//调用楼盘表信息查询接口
//调用楼盘表信息查询和图例统计接口
getlpbData() {
this.$refs.lpbContent.loadingData(this.$store.state.zrzbsm,this.scyclx);
this.getDyztBsmList();
this.getLpbFwytAndQlxz();
//改变楼盘表子组件的key值,重新渲染
this.time = new Date().getTime();
},
......@@ -631,18 +655,21 @@ export default {
},
//批量添加不动产单元号
addBdcdyh() {
// this.pd[0].bsm //自然幢标识码
batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,0).then(
(res) => {
if (res.code === 200) {
this.$message.success("生成完成!");
} else if(res.code === 206){
let hasGenerateCount = res.result.hasGenerateCount;
let unGenerateCount = res.result.unGenerateCount;
this.open(hasGenerateCount,unGenerateCount);
if (this.qsztList.indexOf('1') > -1) {
Message.warning("已提交的户无法继续操作")
}else{
batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,0).then(
(res) => {
if (res.code === 200) {
this.$message.success("生成完成!");
} else if(res.code === 206){
let hasGenerateCount = res.result.hasGenerateCount;
let unGenerateCount = res.result.unGenerateCount;
this.open(hasGenerateCount,unGenerateCount);
}
}
}
);
);
}
},
open(hasGenerateCount,unGenerateCount) {
......
......@@ -65,6 +65,7 @@
:rowspan="hs.sjcs"
:colspan="hs.sjhs"
:data-bsm="hs.bsm"
:data-qszt="hs.qszt"
ref="hBsm"
:key="hsIndex"
:class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
......@@ -126,6 +127,7 @@
:rowspan="hs.sjcs"
:colspan="hs.sjhs"
:data-bsm="hs.bsm"
:data-qszt="hs.qszt"
ref="hBsm"
:key="hsIndex"
:class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
......@@ -199,6 +201,7 @@
:rowspan="hs.sjcs"
:colspan="hs.sjhs"
:data-bsm="hs.bsm"
:data-qszt="hs.qszt"
ref="hBsm"
:key="hsIndex"
:class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
......@@ -253,6 +256,7 @@
:rowspan="hs.sjcs"
:colspan="hs.sjhs"
:data-bsm="hs.bsm"
:data-qszt="hs.qszt"
ref="hBsm"
:key="hsIndex"
:class="searchNum == hs.shbw || searchNum == hs.bdcdyh ? 'tdSelect' : ''"
......@@ -425,6 +429,7 @@ export default {
loading: true,
hbsm:'',
hbsmList: [],
hqsztList:[],
cbsmList: [],
time: null, //区分单双击事件的定时器
searchNum: Math.random(),
......@@ -495,6 +500,9 @@ export default {
if(actual){
this.lpbData = res.result == null ? this.yclpbData : res.result;
}
if (this.lpbParent == 'isFwsxbg') {
this.lpbData = this.$parent.scyclx == '0' ? this.yclpbData:this.sclpbData;
}
this.$nextTick(() => {
//渲染楼盘表
this.dataChange();
......@@ -516,11 +524,17 @@ export default {
},
//按照bdcdyh或shbw筛选户
lpbDataMap(sh) {
//清除之前选中户
this.clearChoosedH();
this.searchNum = sh;
if (this.hbsmList.length>0) {
//清除之前选中户
this.clearChoosedH();
}
// console.log("查询searchNum" + searchNum);
},
//接收范围属性变更传入的hbsm
getFwsxbgHbsm(bsm){
this.hbsmList.push(bsm);
},
//自然幢下元素高度宽度计算
dataChange() {
//计算逻辑幢宽度 20为marginRight值
......@@ -619,6 +633,7 @@ export default {
//未选中→选中
e.className = "tdSelect"; //加边框
this.hbsmList.push(bsm); // 将户bsm放进hbsmList
this.hqsztList.push(hs.qszt); // 将户qszt放进hqsztList
switch (this.lpbParent) {
case 'isHbfg':
this.fghbChoosedList.push(hs);
......@@ -631,6 +646,7 @@ export default {
break;
case 'isLpb':
this.$parent.getHbsm(this.hbsmList, false);
this.$parent.getQsztList(this.hqsztList, false);
break;
default:
......@@ -651,7 +667,9 @@ export default {
break;
case 'isLpb':
this.hbsmList = this.hbsmList.filter(i=>i!=bsm);
this.hqsztList = this.hqsztList.filter(i=>i!=hs.qszt);
this.$parent.getHbsm(this.hbsmList, false);
this.$parent.getQsztList(this.hqsztList, false);
break;
default:
......@@ -695,6 +713,7 @@ export default {
});
// 清空hbsmList
this.hbsmList = [];
this.hqsztList = [];
// });
},
//户右键点击事件
......@@ -743,9 +762,12 @@ export default {
}
break;
case 'isFwsxbg':
console.log(item,'item');
this.rightClickFlag = 'fwsxbg';
this.lpbChVisible = true;
if (this.hbsmList[0] == item.bsm) {
this.rightClickFlag = 'fwsxbg';
this.lpbChVisible = true;
}else{
this.lpbChVisible = false;
}
break;
case 'isCxlz':
this.rightClickFlag = 'cxlz';
......@@ -774,7 +796,7 @@ export default {
if (e.target.className.indexOf("tdSelect") == -1) {
//未选中→选中
e.target.className += " tdSelect"; //加边框
this.cbsmList.push(item.bsm); // 将户bsm放进hbsmList
this.cbsmList.push(item.bsm);
} else {
//选中→未选中
e.target.className = "floor";
......@@ -965,35 +987,39 @@ export default {
this.$refs.hBsm.forEach((item) => {
item.className = "tdSelect";
this.hbsmList.push(item.dataset.bsm); // 将户bsm放进hbsmList
this.hqsztList.push(item.dataset.qszt)
});
}else{
this.$refs.hBsm.forEach((item) => {
item.className = "";
this.hbsmList = [];
this.hqsztList = [];
});
}
this.$nextTick(()=>{
this.$parent.getHbsm(this.hbsmList, false);
this.$parent.getQsztList(this.hqsztList, false);
})
},
//幢单元全选
zdySelectAll(val,cs){
let zdyHbsmList = [];
let zdyHqsztList = [];
cs.forEach(i=>{
i.hs.forEach(j=>{
zdyHbsmList.push(j.bsm)
zdyHqsztList.push(j.qszt)
})
});
if (val) {
this.$nextTick(()=>{
console.log(zdyHbsmList);
this.$refs.hBsm.forEach((item) => {
console.log(item.dataset.bsm);
if (zdyHbsmList.indexOf(item.dataset.bsm)>-1) {
item.className = "tdSelect";
this.hbsmList = zdyHbsmList; // 将户bsm放进hbsmList
}
});
this.hbsmList = this.hbsmList.concat(zdyHbsmList);
this.hqsztList = this.hqsztList.concat(zdyHqsztList);
})
}else{
this.$refs.hBsm.forEach((item) => {
......@@ -1006,10 +1032,16 @@ export default {
this.hbsmList = this.hbsmList.filter(i=>i!=j)
}
})
zdyHqsztList.forEach(j=>{
if (item.dataset.qszt == j) {
this.hqsztList = this.hqsztList.filter(i=>i!=j)
}
})
});
}
this.$nextTick(()=>{
this.$parent.getHbsm(this.hbsmList, false);
this.$parent.getQsztList(this.hqsztList, false);
})
},
//逻辑幢、幢单元、层双击
......@@ -1056,7 +1088,8 @@ export default {
console.log(item.dataset.bsm, "item.dataset.bsm");
// 判断hbsmList中是否已经存在
if (this.hbsmList.indexOf(item.dataset.bsm) == -1) {
this.hbsmList.push(item.dataset.bsm); // 将户bsm放进hbsmList
this.hbsmList.push(item.dataset.bsm);
this.hqsztList.push(item.dataset.qszt);
}
}
});
......@@ -1167,9 +1200,6 @@ export default {
margin-right: 0;
}
}
.bottom40 {
// margin-bottom: -30px;
}
.zdy-wrap {
height: auto;
overflow: hidden;
......