9346f188 by 杨威

新建宗地后查询宗地信息

1 parent f44227ac
......@@ -60,4 +60,16 @@ export function queryjzx(glBsm) {
}
})
}
/**
* 根据zdbsm查询宗地基本信息
*/
export function getQjZdjbxxDetailById(id) {
return request({
url: '/zd/qjZdjbxx/getQjZdjbxxDetailById',
method: 'get',
params: {
id
}
})
}
......
......@@ -203,9 +203,9 @@ export default {
djzqbsm: this.djzqValue,
syqlxbsm: this.syqlxCode,
xmmc: this.zdProjectName,
zdtzmbsm: this.tzmCode,
// zdtzmbsm: this.tzmCode,
zdtzmbsm: "PSHGSBDCQJDC000000000000DC440010",
};
console.log(data);
insertQjZdjbxx(data)
.then((res) => {
console.log(res.result);
......@@ -214,9 +214,10 @@ export default {
message: "创建成功!",
type: "success",
});
//todo 跳转到宗地基本信息内容表页面 (预留)
this.close()
this.$router.push('/zd');
this.$store.state.zdbsm = res.result;
//todo 跳转到宗地基本信息内容表页面 (预留)
this.close();
this.$router.push("/zd");
} else {
this.$message.error("创建失败!");
}
......@@ -240,8 +241,8 @@ export default {
type: "success",
});
//todo 跳转到自然幢基本信息内容表页面 (预留)
this.close()
this.$router.push('/zrz');
this.close();
this.$router.push("/zrz");
} else {
this.$message.error("创建失败!");
}
......@@ -253,6 +254,7 @@ export default {
.then((res) => {
console.log(res.result);
this.xzq = res.result;
this.$store.state.xzqList = res.result;
})
.catch((error) => {});
},
......@@ -275,6 +277,7 @@ export default {
this.djq = null;
} else {
this.djq = res.result;
this.$store.state.djqList = res.result;
}
})
.catch((error) => {});
......@@ -293,6 +296,7 @@ export default {
this.djzq = null;
} else {
this.djzq = res.result;
this.$store.state.djzqList = res.result;
}
})
.catch((error) => {});
......
......@@ -22,21 +22,53 @@
<tr>
<td colspan="2">行政区</td>
<td colspan="2">
<input type="text" class="formInput" v-model="formData.xzq" />
<el-select
class="formSelect"
v-model="formData.xzqbsm"
@change="changeXzq(formData.xzqbsm)"
>
<el-option
v-for="item in xzqList"
:key="item.xzqbsm"
:label="item.xzqmc"
:value="item.xzqbsm"
>
</el-option>
</el-select>
</td>
<td colspan="2">地籍区</td>
<td colspan="2">
<input type="text" class="formInput" v-model="formData.djq" />
<el-select
class="formSelect"
v-model="formData.djqbsm"
@change="changeDjq(formData.djqbsm)"
>
<el-option
v-for="item in djqList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</td>
<td colspan="2">地籍子区</td>
<td colspan="2">
<input type="text" class="formInput" v-model="formData.djzq" />
<el-select class="formSelect" v-model="formData.djzqbsm">
<el-option
v-for="item in djzqList"
:key="item.bsm"
:label="item.mc"
:value="item.bsm"
>
</el-option>
</el-select>
</td>
</tr>
<tr>
<td colspan="2">权利类型</td>
<td colspan="4">
<el-select class="formSelect" v-model="formData.qllx">
<el-select class="formSelect" v-model="formData.qllxbsm">
<el-option
v-for="item in qllxList"
:key="item.bsm"
......@@ -48,7 +80,7 @@
</td>
<td colspan="2">宗地特征码<i class="requisite">*</i></td>
<td colspan="4">
<el-select class="formSelect" v-model="formData.zdtzm">
<el-select class="formSelect" v-model="formData.zdtzmbsm">
<el-option
v-for="item in zdtzmList"
:key="item.bsm"
......@@ -79,7 +111,9 @@
class="formInput percent78"
v-model="formData.zddm"
/>
<el-button type="primary" class="createBtn" @click="generatorCode">生成</el-button>
<el-button type="primary" class="createBtn" @click="generatorCode"
>生成</el-button
>
</td>
</tr>
<tr>
......@@ -87,7 +121,7 @@
<td colspan="4">
<input type="text" class="formInput" v-model="formData.djh" />
</td>
<td colspan="2">不动产单元号<i class="requisite">*</i></td>
<td colspan="4" class="psr">
<input
......@@ -270,8 +304,12 @@
<script>
import Qlr from "../../../components/formMenu/qlr";
import Qlxz from "../../../components/formMenu/qlxz";
import { getDdicByMC } from "../../../api/common";
import { getBdcdyh } from "../../../api/zd";
import {
getDdicByMC,
getListByXzqbsm,
getListByPbsm,
} from "../../../api/common";
import { getBdcdyh, getQjZdjbxxDetailById } from "../../../api/zd";
export default {
name: "",
components: {
......@@ -285,17 +323,20 @@ export default {
zdtzmList: [],
qlsdfsList: [],
gmjjhyflList: [],
xzqList: this.$store.state.xzqList,
djqList: this.$store.state.djqList,
djzqList: this.$store.state.djzqList,
compareList: [
{ label: "=", value: "=" },
{ label: "<=", value: "<=" },
{ label: ">=", value: ">=" },
],
formData: {
xzq: "",
djq: "",
djzq: "",
qllx: "",
zdtzm:"",
xzqbsm: "",
djqbsm: "",
djzqbsm: "",
qllxbsm: "",
zdtzmbsm: "",
qlsdfs: "",
zddm: "",
djh: "",
......@@ -327,17 +368,31 @@ export default {
},
created() {
this.getDicData();
this.getZdjbxxData();
},
mounted() {},
methods: {
//根据zdbsm查询基本信息
getZdjbxxData() {
getQjZdjbxxDetailById(this.$store.state.zdbsm)
.then((res) => {
if (res.result) {
console.log(res.result);
this.formData = res.result;
}
})
.catch((error) => {});
},
//生成宗地代码
generatorCode(){
getBdcdyh("860101555888GB","zd")
.then((res)=>{
console.log(res)
this.formData.zddm=res.message.substring(0,19);
this.formData.bdcdyh=res.message;
})
generatorCode() {
//前6位是xzqbsm,接着3位djqbsm,3位djzqbsm,最后2位是syqlxbsm 860101555888GB
getBdcdyh("860101555888GB", "zd")
.then((res) => {
console.log(res);
this.formData.zddm = res.result.substring(0, 19);
this.formData.bdcdyh = res.result;
})
.catch((error) => {});
},
getQlrxxData() {
......@@ -374,6 +429,26 @@ export default {
})
.catch((error) => {});
},
//行政区划选择
changeXzq(id) {
getListByXzqbsm(id)
.then((res) => {
this.formData.djqbsm = "";
this.formData.djzqbsm = "";
this.djqList = res.result;
this.$store.state.djqList = res.result;
})
.catch((error) => {});
},
changeDjq(item) {
getListByPbsm(item)
.then((res) => {
this.formData.djzqbsm = "";
this.djzqList = res.result;
this.$store.state.djzqList = res.result;
})
.catch((error) => {});
},
},
computed: {},
watch: {},
......@@ -418,13 +493,13 @@ export default {
float: left;
}
.percent68 {
width: 68%!important;
width: 68% !important;
float: left;
position: relative;
top: 7px;
}
.percent30 {
width: 30%!important;
width: 30% !important;
float: left;
}
.createBtn {
......@@ -438,7 +513,7 @@ export default {
line-height: 37px;
}
.el-select {
width: 100% ;
width: 100%;
}
}
}
......