e73700b4 by 杨威
2 parents f4da53c8 c90f4fe1
......@@ -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,24 @@
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 = '';
}
},
}
};
</script>
......
......@@ -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>
......