9297b584 by 杨威
2 parents a50aa550 04b57908
import request from '@/plugin/axios'
/**
* 新增多幢基本信息
*/
export function insertDzjbxx (data) {
return request({
url: '/fw/qjDz/insertQjDz',
method: 'post',
data: data,
})
}
/**
* 生成不动产单元号
*/
export function getBdcdyh (dpdm,dptype) {
return request({
url: '/system/generator/getBdcdyh',
method: 'get',
params:{
dpdm:dpdm,
dptype:dptype
}
})
}
/**
* 保存自然幢信息
*/
export function saveDzInfo (data) {
return request({
url: '/fw/qjZrz/updateQjZrz',
method: 'put',
data:data
})
}
/**
* 保存自然幢信息
*/
export function getZrzDetailByBsm (data) {
return request({
url: '/fw/qjZrz/getQjZrzDetailById',
method: 'get',
params:{
id:data
}
})
}
\ No newline at end of file
......@@ -504,9 +504,13 @@
if(res.code){
if(res.result!=null){
this.tableData=res.result;
if(this.tableData.length===0){
this.gyfs=this.$store.state.gyfsList[0].bsm;
}else {
this.gyfs=res.result[0].gyfsbsm;
}
}
}
})
}
},
......
......@@ -193,6 +193,10 @@ export default {
});
if (newPath == "/zd") {
this.getRightTree(this.$store.state.zdbsm);
}else if (newPath == "/zrz") {
this.getRightTree(this.$store.state.zdbsm);
}else {
this.getTreeList();
}
},
"$store.state.zdbsm": function(bsm) {
......
......@@ -12,9 +12,9 @@
<el-select v-model="ruleForm.xzqbsm" style="width:100px;" value-key="xzqbsm" placeholder="行政区" @change="changeXzq(ruleForm.xzqbsm)">
<el-option
v-for="item in xzq"
:key="item.xzqbsm"
:label="item.xzqmc"
:value="item.xzqbsm">
:key="item.bsm"
:label="item.mc"
:value="item.bsm">
</el-option>
</el-select>
</el-form-item>
......@@ -110,7 +110,22 @@
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane class="eltabspane" label="多幢" name="dz">多幢</el-tab-pane>
<el-tab-pane class="eltabspane" label="多幢" name="dz">
<el-form :inline="true" :rules="rules2" :model="ruleForm2" ref="ruleForm2" class="dzProject">
<el-form-item label="项目名称" prop="xmmc">
<el-input
v-model="ruleForm2.xmmc"
placeholder="项目名称"
style="width:400px;"
></el-input>
</el-form-item>
<el-form-item class="handleBtn">
<el-button type="primary">导入图形</el-button>
<el-button type="primary" @click="newDz">创建</el-button>
<el-button type="primary" @click="close">取消</el-button>
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane class="eltabspane" label="林权" name="lq">林权</el-tab-pane>
<el-tab-pane class="eltabspane" label="构筑物" name="gzw">构筑物</el-tab-pane>
</el-tabs>
......@@ -124,6 +139,7 @@ import {
} from "../../../api/common";
import { insertQjZdjbxx } from "../../../api/zd";
import { insertZrzjbxx } from "../../../api/zrz";
import { insertDzjbxx } from "../../../api/dz";
export default {
name: "",
......@@ -152,6 +168,11 @@ export default {
xmmc:'',
userbsm:''
},
ruleForm2:{
zdbsm:'',
xmmc:'',
userbsm:''
},
rules: {
xzqbsm: [
{ required: true, message: '请选择行政区', trigger: 'change' }
......@@ -177,6 +198,11 @@ export default {
{ required: true, message: '请输入项目名称', trigger: 'blur' },
],
},
rules2: {
xmmc: [
{ required: true, message: '请输入项目名称', trigger: 'blur' },
],
},
syqlx: [
{
label: "国家所有",
......@@ -232,7 +258,7 @@ export default {
//todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm
this.$refs['ruleForm1'].validate((valid) => {
if (valid) {
insertZrzjbxx(this.ruleForm1)
insertDzjbxx(this.ruleForm1)
.then((res) => {
if (res.code == "200") {
this.$message({
......@@ -262,6 +288,40 @@ export default {
});
},
newDz() {
//todo 在新增时,如果是点击顶部新建里面的自然幢则不传zdbsm 如果是点击右键里面的添加定着物则传zdbsm
this.$refs['ruleForm2'].validate((valid) => {
if (valid) {
insertDzjbxx(this.ruleForm2)
.then((res) => {
if (res.code == "200") {
this.$message({
message: "创建成功!",
type: "success",
});
//todo 跳转到自然幢基本信息内容表页面 (预留)
this.close();
this.$store.state.zdbsm=res.result.zdbsm;
this.$store.state.dzbsm=res.result.bsm;
this.$store.state.xmmc=res.result.xmmc;
this.$router.push({
path: '/dz', query:{
source: 1,
bsm:res.result.bsm
}
});
} else {
this.$message.error("创建失败!");
}
})
.catch((error) => {});
} else {
console.log('error submit!!');
return false;
}
});
},
getXzqList() {
getAllList()
.then((res) => {
......
<template>
<div class="dz content-form">
<el-form ref="form" :model="form" label-width="160px">
<Qlr ref="qlrxxModule"></Qlr>
<Qlr ref="qlrxxModule" :bsm="bsm"></Qlr>
<table border="1" width="100%" cellspacing="0" cellpadding="0" class="dzTable">
<tbody>
<tr height="30">
......@@ -202,6 +202,7 @@
<script>
import Qlr from "../../../components/formMenu/qlr";
import Qlxz from "../../../components/formMenu/qlxz";
import {saveDzInfo,getBdcdyh} from "../../../api/dz";
export default {
name:'zrz',
components:{
......@@ -210,6 +211,7 @@
},
data () {
return {
bsm:'', //此页面的多幢标识码
form:{
dzbsm:'', //多幢标识码
zdbsm:'', //宗地标识码
......@@ -336,9 +338,51 @@
onSave(){
console.log(this.form)
this.form.dzbsm=this.bsm;
this.form.qlxzList= this.$refs.qlxzModule.getQlxzDataList();
if(1>0){
saveDzInfo(this.form).then((res)=>{
if(res.code===200){
this.$message.success("保存完成!")
}else {
this.$message({
message: res.message,
type: "warning",
});
}
})
}
},
onSubmit(){
console.log(this.form)
},
getZddm(zdbsm){
getQjZdjbxxDetailById(zdbsm).then((res)=>{
if(res.code===200){
this.form.zddm=res.result.zddm;
}
})
},
generatorCode(){
getBdcdyh(this.form.zddm,"dz")
.then((res)=>{
// this.form.zrzh=res.result.substring(0,24);
// this.form.bdcdyh=res.result;
})
},
},
created() {
if(this.source===1){
this.bsm=this.$route.query.bsm;
// this.form.zdbsm=this.$store.zdbsm;
// this.form.xmmc=this.$store.xmmc;
this.form.dzbsm=this.$route.query.bsm;
this.getZddm(this.$store.state.zdbsm);
}else {
this.bsm=this.$route.query.bsm;
this.form.dzbsm=this.$route.query.bsm;
}
if(this.source!==1){
}
}
}
......
......@@ -10,7 +10,7 @@
<tr height="30">
<td colspan="2" align="center" >宗地代码</td>
<td colspan="4" >
<el-input v-model="form.zddm" disabled="true"></el-input>
<el-input v-model="form.zddm" disabled></el-input>
<el-input v-show="false" v-model="form.zdbsm"></el-input>
</td>
<td colspan="2" align="center" >自然幢号</td>
......@@ -390,13 +390,18 @@
}
},
onSave(){
// this.loading=true;
this.loading=true;
this.form.zrzbsm=this.bsm;
this.form.qlxzList= this.$refs.qlxzModule.getQlxzDataList();
if(1>0){
saveZrzInfo(this.form).then((res)=>{
if(res.code===200){
this.$message.success("保存完成!")
}else {
this.$message({
message: res.message,
type: "warning",
});
}
this.loading=false;
})
......@@ -484,7 +489,7 @@
// this.form.zdbsm=this.$store.zdbsm;
// this.form.xmmc=this.$store.xmmc;
this.form.zrzbsm=this.$route.query.bsm;
this.getZddm(this.$store.zdbsm);
this.getZddm(this.$store.state.zdbsm);
this.getZrzDetailByBsm(this.$route.query.bsm)
}else {
this.bsm=this.$route.query.bsm;
......