9346f188 by 杨威

新建宗地后查询宗地信息

1 parent f44227ac
...@@ -60,4 +60,16 @@ export function queryjzx(glBsm) { ...@@ -60,4 +60,16 @@ export function queryjzx(glBsm) {
60 } 60 }
61 }) 61 })
62 } 62 }
63 /**
64 * 根据zdbsm查询宗地基本信息
65 */
66 export function getQjZdjbxxDetailById(id) {
67 return request({
68 url: '/zd/qjZdjbxx/getQjZdjbxxDetailById',
69 method: 'get',
70 params: {
71 id
72 }
73 })
74 }
63 75
......
...@@ -203,9 +203,9 @@ export default { ...@@ -203,9 +203,9 @@ export default {
203 djzqbsm: this.djzqValue, 203 djzqbsm: this.djzqValue,
204 syqlxbsm: this.syqlxCode, 204 syqlxbsm: this.syqlxCode,
205 xmmc: this.zdProjectName, 205 xmmc: this.zdProjectName,
206 zdtzmbsm: this.tzmCode, 206 // zdtzmbsm: this.tzmCode,
207 zdtzmbsm: "PSHGSBDCQJDC000000000000DC440010",
207 }; 208 };
208 console.log(data);
209 insertQjZdjbxx(data) 209 insertQjZdjbxx(data)
210 .then((res) => { 210 .then((res) => {
211 console.log(res.result); 211 console.log(res.result);
...@@ -214,9 +214,10 @@ export default { ...@@ -214,9 +214,10 @@ export default {
214 message: "创建成功!", 214 message: "创建成功!",
215 type: "success", 215 type: "success",
216 }); 216 });
217 //todo 跳转到宗地基本信息内容表页面 (预留) 217 this.$store.state.zdbsm = res.result;
218 this.close() 218 //todo 跳转到宗地基本信息内容表页面 (预留)
219 this.$router.push('/zd'); 219 this.close();
220 this.$router.push("/zd");
220 } else { 221 } else {
221 this.$message.error("创建失败!"); 222 this.$message.error("创建失败!");
222 } 223 }
...@@ -240,8 +241,8 @@ export default { ...@@ -240,8 +241,8 @@ export default {
240 type: "success", 241 type: "success",
241 }); 242 });
242 //todo 跳转到自然幢基本信息内容表页面 (预留) 243 //todo 跳转到自然幢基本信息内容表页面 (预留)
243 this.close() 244 this.close();
244 this.$router.push('/zrz'); 245 this.$router.push("/zrz");
245 } else { 246 } else {
246 this.$message.error("创建失败!"); 247 this.$message.error("创建失败!");
247 } 248 }
...@@ -253,6 +254,7 @@ export default { ...@@ -253,6 +254,7 @@ export default {
253 .then((res) => { 254 .then((res) => {
254 console.log(res.result); 255 console.log(res.result);
255 this.xzq = res.result; 256 this.xzq = res.result;
257 this.$store.state.xzqList = res.result;
256 }) 258 })
257 .catch((error) => {}); 259 .catch((error) => {});
258 }, 260 },
...@@ -275,6 +277,7 @@ export default { ...@@ -275,6 +277,7 @@ export default {
275 this.djq = null; 277 this.djq = null;
276 } else { 278 } else {
277 this.djq = res.result; 279 this.djq = res.result;
280 this.$store.state.djqList = res.result;
278 } 281 }
279 }) 282 })
280 .catch((error) => {}); 283 .catch((error) => {});
...@@ -293,6 +296,7 @@ export default { ...@@ -293,6 +296,7 @@ export default {
293 this.djzq = null; 296 this.djzq = null;
294 } else { 297 } else {
295 this.djzq = res.result; 298 this.djzq = res.result;
299 this.$store.state.djzqList = res.result;
296 } 300 }
297 }) 301 })
298 .catch((error) => {}); 302 .catch((error) => {});
......
...@@ -22,21 +22,53 @@ ...@@ -22,21 +22,53 @@
22 <tr> 22 <tr>
23 <td colspan="2">行政区</td> 23 <td colspan="2">行政区</td>
24 <td colspan="2"> 24 <td colspan="2">
25 <input type="text" class="formInput" v-model="formData.xzq" /> 25 <el-select
26 class="formSelect"
27 v-model="formData.xzqbsm"
28 @change="changeXzq(formData.xzqbsm)"
29 >
30 <el-option
31 v-for="item in xzqList"
32 :key="item.xzqbsm"
33 :label="item.xzqmc"
34 :value="item.xzqbsm"
35 >
36 </el-option>
37 </el-select>
26 </td> 38 </td>
27 <td colspan="2">地籍区</td> 39 <td colspan="2">地籍区</td>
28 <td colspan="2"> 40 <td colspan="2">
29 <input type="text" class="formInput" v-model="formData.djq" /> 41 <el-select
42 class="formSelect"
43 v-model="formData.djqbsm"
44 @change="changeDjq(formData.djqbsm)"
45 >
46 <el-option
47 v-for="item in djqList"
48 :key="item.bsm"
49 :label="item.mc"
50 :value="item.bsm"
51 >
52 </el-option>
53 </el-select>
30 </td> 54 </td>
31 <td colspan="2">地籍子区</td> 55 <td colspan="2">地籍子区</td>
32 <td colspan="2"> 56 <td colspan="2">
33 <input type="text" class="formInput" v-model="formData.djzq" /> 57 <el-select class="formSelect" v-model="formData.djzqbsm">
58 <el-option
59 v-for="item in djzqList"
60 :key="item.bsm"
61 :label="item.mc"
62 :value="item.bsm"
63 >
64 </el-option>
65 </el-select>
34 </td> 66 </td>
35 </tr> 67 </tr>
36 <tr> 68 <tr>
37 <td colspan="2">权利类型</td> 69 <td colspan="2">权利类型</td>
38 <td colspan="4"> 70 <td colspan="4">
39 <el-select class="formSelect" v-model="formData.qllx"> 71 <el-select class="formSelect" v-model="formData.qllxbsm">
40 <el-option 72 <el-option
41 v-for="item in qllxList" 73 v-for="item in qllxList"
42 :key="item.bsm" 74 :key="item.bsm"
...@@ -48,7 +80,7 @@ ...@@ -48,7 +80,7 @@
48 </td> 80 </td>
49 <td colspan="2">宗地特征码<i class="requisite">*</i></td> 81 <td colspan="2">宗地特征码<i class="requisite">*</i></td>
50 <td colspan="4"> 82 <td colspan="4">
51 <el-select class="formSelect" v-model="formData.zdtzm"> 83 <el-select class="formSelect" v-model="formData.zdtzmbsm">
52 <el-option 84 <el-option
53 v-for="item in zdtzmList" 85 v-for="item in zdtzmList"
54 :key="item.bsm" 86 :key="item.bsm"
...@@ -79,7 +111,9 @@ ...@@ -79,7 +111,9 @@
79 class="formInput percent78" 111 class="formInput percent78"
80 v-model="formData.zddm" 112 v-model="formData.zddm"
81 /> 113 />
82 <el-button type="primary" class="createBtn" @click="generatorCode">生成</el-button> 114 <el-button type="primary" class="createBtn" @click="generatorCode"
115 >生成</el-button
116 >
83 </td> 117 </td>
84 </tr> 118 </tr>
85 <tr> 119 <tr>
...@@ -87,7 +121,7 @@ ...@@ -87,7 +121,7 @@
87 <td colspan="4"> 121 <td colspan="4">
88 <input type="text" class="formInput" v-model="formData.djh" /> 122 <input type="text" class="formInput" v-model="formData.djh" />
89 </td> 123 </td>
90 124
91 <td colspan="2">不动产单元号<i class="requisite">*</i></td> 125 <td colspan="2">不动产单元号<i class="requisite">*</i></td>
92 <td colspan="4" class="psr"> 126 <td colspan="4" class="psr">
93 <input 127 <input
...@@ -270,8 +304,12 @@ ...@@ -270,8 +304,12 @@
270 <script> 304 <script>
271 import Qlr from "../../../components/formMenu/qlr"; 305 import Qlr from "../../../components/formMenu/qlr";
272 import Qlxz from "../../../components/formMenu/qlxz"; 306 import Qlxz from "../../../components/formMenu/qlxz";
273 import { getDdicByMC } from "../../../api/common"; 307 import {
274 import { getBdcdyh } from "../../../api/zd"; 308 getDdicByMC,
309 getListByXzqbsm,
310 getListByPbsm,
311 } from "../../../api/common";
312 import { getBdcdyh, getQjZdjbxxDetailById } from "../../../api/zd";
275 export default { 313 export default {
276 name: "", 314 name: "",
277 components: { 315 components: {
...@@ -285,17 +323,20 @@ export default { ...@@ -285,17 +323,20 @@ export default {
285 zdtzmList: [], 323 zdtzmList: [],
286 qlsdfsList: [], 324 qlsdfsList: [],
287 gmjjhyflList: [], 325 gmjjhyflList: [],
326 xzqList: this.$store.state.xzqList,
327 djqList: this.$store.state.djqList,
328 djzqList: this.$store.state.djzqList,
288 compareList: [ 329 compareList: [
289 { label: "=", value: "=" }, 330 { label: "=", value: "=" },
290 { label: "<=", value: "<=" }, 331 { label: "<=", value: "<=" },
291 { label: ">=", value: ">=" }, 332 { label: ">=", value: ">=" },
292 ], 333 ],
293 formData: { 334 formData: {
294 xzq: "", 335 xzqbsm: "",
295 djq: "", 336 djqbsm: "",
296 djzq: "", 337 djzqbsm: "",
297 qllx: "", 338 qllxbsm: "",
298 zdtzm:"", 339 zdtzmbsm: "",
299 qlsdfs: "", 340 qlsdfs: "",
300 zddm: "", 341 zddm: "",
301 djh: "", 342 djh: "",
...@@ -327,17 +368,31 @@ export default { ...@@ -327,17 +368,31 @@ export default {
327 }, 368 },
328 created() { 369 created() {
329 this.getDicData(); 370 this.getDicData();
371 this.getZdjbxxData();
330 }, 372 },
331 mounted() {}, 373 mounted() {},
332 methods: { 374 methods: {
375 //根据zdbsm查询基本信息
376 getZdjbxxData() {
377 getQjZdjbxxDetailById(this.$store.state.zdbsm)
378 .then((res) => {
379 if (res.result) {
380 console.log(res.result);
381 this.formData = res.result;
382 }
383 })
384 .catch((error) => {});
385 },
333 //生成宗地代码 386 //生成宗地代码
334 generatorCode(){ 387 generatorCode() {
335 getBdcdyh("860101555888GB","zd") 388 //前6位是xzqbsm,接着3位djqbsm,3位djzqbsm,最后2位是syqlxbsm 860101555888GB
336 .then((res)=>{ 389 getBdcdyh("860101555888GB", "zd")
337 console.log(res) 390 .then((res) => {
338 this.formData.zddm=res.message.substring(0,19); 391 console.log(res);
339 this.formData.bdcdyh=res.message; 392 this.formData.zddm = res.result.substring(0, 19);
340 }) 393 this.formData.bdcdyh = res.result;
394 })
395 .catch((error) => {});
341 }, 396 },
342 397
343 getQlrxxData() { 398 getQlrxxData() {
...@@ -374,6 +429,26 @@ export default { ...@@ -374,6 +429,26 @@ export default {
374 }) 429 })
375 .catch((error) => {}); 430 .catch((error) => {});
376 }, 431 },
432 //行政区划选择
433 changeXzq(id) {
434 getListByXzqbsm(id)
435 .then((res) => {
436 this.formData.djqbsm = "";
437 this.formData.djzqbsm = "";
438 this.djqList = res.result;
439 this.$store.state.djqList = res.result;
440 })
441 .catch((error) => {});
442 },
443 changeDjq(item) {
444 getListByPbsm(item)
445 .then((res) => {
446 this.formData.djzqbsm = "";
447 this.djzqList = res.result;
448 this.$store.state.djzqList = res.result;
449 })
450 .catch((error) => {});
451 },
377 }, 452 },
378 computed: {}, 453 computed: {},
379 watch: {}, 454 watch: {},
...@@ -418,13 +493,13 @@ export default { ...@@ -418,13 +493,13 @@ export default {
418 float: left; 493 float: left;
419 } 494 }
420 .percent68 { 495 .percent68 {
421 width: 68%!important; 496 width: 68% !important;
422 float: left; 497 float: left;
423 position: relative; 498 position: relative;
424 top: 7px; 499 top: 7px;
425 } 500 }
426 .percent30 { 501 .percent30 {
427 width: 30%!important; 502 width: 30% !important;
428 float: left; 503 float: left;
429 } 504 }
430 .createBtn { 505 .createBtn {
...@@ -438,7 +513,7 @@ export default { ...@@ -438,7 +513,7 @@ export default {
438 line-height: 37px; 513 line-height: 37px;
439 } 514 }
440 .el-select { 515 .el-select {
441 width: 100% ; 516 width: 100%;
442 } 517 }
443 } 518 }
444 } 519 }
......