feat(yzgy):绘制业主共有表单对接接口
Showing
3 changed files
with
214 additions
and
37 deletions
1 | import request from '@/plugin/axios' | 1 | import request from '@/plugin/axios' |
2 | |||
2 | /** | 3 | /** |
3 | * 新增自然幢基本信息 | 4 | * 新增自然幢基本信息 |
4 | */ | 5 | */ |
5 | export function insertZrzjbxx (data) { | 6 | export function insertZrzjbxx(data) { |
6 | return request({ | 7 | return request({ |
7 | url: 'fw/qjZrz/insert', | 8 | url: 'fw/qjZrz/insert', |
8 | method: 'post', | 9 | method: 'post', |
... | @@ -13,13 +14,13 @@ export function insertZrzjbxx (data) { | ... | @@ -13,13 +14,13 @@ export function insertZrzjbxx (data) { |
13 | /** | 14 | /** |
14 | * 生成不动产单元号 | 15 | * 生成不动产单元号 |
15 | */ | 16 | */ |
16 | export function getBdcdyh (dpdm,dptype) { | 17 | export function getBdcdyh(dpdm, dptype) { |
17 | return request({ | 18 | return request({ |
18 | url: '/system/generator/getBdcdyh', | 19 | url: '/system/generator/getBdcdyh', |
19 | method: 'get', | 20 | method: 'get', |
20 | params:{ | 21 | params: { |
21 | dpdm:dpdm, | 22 | dpdm: dpdm, |
22 | dptype:dptype | 23 | dptype: dptype |
23 | } | 24 | } |
24 | }) | 25 | }) |
25 | } | 26 | } |
... | @@ -27,25 +28,46 @@ export function getBdcdyh (dpdm,dptype) { | ... | @@ -27,25 +28,46 @@ export function getBdcdyh (dpdm,dptype) { |
27 | /** | 28 | /** |
28 | * 保存自然幢信息 | 29 | * 保存自然幢信息 |
29 | */ | 30 | */ |
30 | export function saveZrzInfo (data) { | 31 | export function saveZrzInfo(data) { |
31 | return request({ | 32 | return request({ |
32 | url: '/fw/qjZrz/updateQjZrz', | 33 | url: '/fw/qjZrz/updateQjZrz', |
33 | method: 'put', | 34 | method: 'put', |
34 | data:data | 35 | data: data |
35 | }) | 36 | }) |
36 | } | 37 | } |
37 | 38 | ||
38 | /** | 39 | /** |
39 | * 保存自然幢信息 | 40 | * 保存自然幢信息 |
40 | */ | 41 | */ |
41 | export function getZrzDetailByBsm (data) { | 42 | export function getZrzDetailByBsm(data) { |
42 | return request({ | 43 | return request({ |
43 | url: '/fw/qjZrz/getQjZrzDetailById', | 44 | url: '/fw/qjZrz/getQjZrzDetailById', |
44 | method: 'get', | 45 | method: 'get', |
45 | params:{ | 46 | params: { |
46 | id:data | 47 | id: data |
47 | } | 48 | } |
48 | }) | 49 | }) |
49 | } | 50 | } |
50 | 51 | ||
52 | /** | ||
53 | * 新增权籍_建筑物区分所有权业主共有部分调查表 | ||
54 | */ | ||
55 | export function saveYzgy(data) { | ||
56 | return request({ | ||
57 | url: '/system/qjJzwqfsyqyzgybfdc/insertQjJzwqfsyqyzgybfdc', | ||
58 | method: 'post', | ||
59 | data: data | ||
60 | }) | ||
61 | } | ||
62 | |||
63 | /** | ||
64 | * 查询权籍_建筑物区分所有权业主共有部分调查表 | ||
65 | */ | ||
66 | export function queryYzgy(id) { | ||
67 | return request({ | ||
68 | url: '/system/qjJzwqfsyqyzgybfdc/getQjJzwqfsyqyzgybfdcDetailById', | ||
69 | method: 'get', | ||
70 | params: {id} | ||
71 | }) | ||
72 | } | ||
51 | 73 | ... | ... |
... | @@ -50,7 +50,7 @@ | ... | @@ -50,7 +50,7 @@ |
50 | </template> | 50 | </template> |
51 | 51 | ||
52 | <script> | 52 | <script> |
53 | import {getMjftInfo,savemjft} from '../../../api/zd' | 53 | import {getMjftInfo, savemjft} from '../../../api/zd' |
54 | import {Message} from 'element-ui' | 54 | import {Message} from 'element-ui' |
55 | 55 | ||
56 | export default { | 56 | export default { |
... | @@ -59,14 +59,14 @@ | ... | @@ -59,14 +59,14 @@ |
59 | return { | 59 | return { |
60 | tdzl: '', // 土地坐落 继承获取 | 60 | tdzl: '', // 土地坐落 继承获取 |
61 | zdmj: '', // 宗地面积 继承获取 | 61 | zdmj: '', // 宗地面积 继承获取 |
62 | zddm:'', | 62 | zddm: '', |
63 | mjftData: { | 63 | mjftData: { |
64 | zdbsm: '', // 宗地标识码 继承获取 | 64 | zdbsm: '', // 宗地标识码 继承获取 |
65 | tdsyqsyqmjhj: '',// 土地所有权/使用权面积合计 | 65 | tdsyqsyqmjhj: '',// 土地所有权/使用权面积合计 |
66 | fttdmjhj: '', // 分摊土地面积合计 | 66 | fttdmjhj: '', // 分摊土地面积合计 |
67 | dzwdys: '', // 表示同一宗地内所有的定着物单元数 | 67 | dzwdys: '', // 表示同一宗地内所有的定着物单元数 |
68 | dydytdmjhj: '', // 根据该宗地下共有/共用定着物量自动计算。 , | 68 | dydytdmjhj: '', // 根据该宗地下共有/共用定着物量自动计算。 , |
69 | bz: '' , // 备注 | 69 | bz: '', // 备注 |
70 | list: [ | 70 | list: [ |
71 | { | 71 | { |
72 | dydytdmj: '', // 独有独用土地面积 | 72 | dydytdmj: '', // 独有独用土地面积 |
... | @@ -81,10 +81,10 @@ | ... | @@ -81,10 +81,10 @@ |
81 | }, | 81 | }, |
82 | 82 | ||
83 | methods: { | 83 | methods: { |
84 | getData(bsm){ | 84 | getData(bsm) { |
85 | getMjftInfo(bsm).then(res=>{ | 85 | getMjftInfo(bsm).then(res => { |
86 | if (res.success){ | 86 | if (res.success) { |
87 | this.mjftData=res.result | 87 | this.mjftData = res.result |
88 | } | 88 | } |
89 | }) | 89 | }) |
90 | }, | 90 | }, |
... | @@ -96,7 +96,7 @@ | ... | @@ -96,7 +96,7 @@ |
96 | return | 96 | return |
97 | } | 97 | } |
98 | } | 98 | } |
99 | 99 | this.mjftData['zdbsm'] = this.$store.state.zdbsm | |
100 | savemjft(this.mjftData).then(res => { | 100 | savemjft(this.mjftData).then(res => { |
101 | console.log(res) | 101 | console.log(res) |
102 | if (res.success) { | 102 | if (res.success) { |
... | @@ -170,7 +170,7 @@ | ... | @@ -170,7 +170,7 @@ |
170 | }, | 170 | }, |
171 | dzwdsl: function () { | 171 | dzwdsl: function () { |
172 | let self = this | 172 | let self = this |
173 | let num = this.mjftData.list.length?this.mjftData.list.length:0 | 173 | let num = this.mjftData.list.length ? this.mjftData.list.length : 0 |
174 | self.mjftData.dzwdys = num | 174 | self.mjftData.dzwdys = num |
175 | return num; | 175 | return num; |
176 | } | 176 | } |
... | @@ -180,7 +180,7 @@ | ... | @@ -180,7 +180,7 @@ |
180 | }, | 180 | }, |
181 | mounted() { | 181 | mounted() { |
182 | console.log("mounted init...") | 182 | console.log("mounted init...") |
183 | if (this.mjftData.zdbsm){ | 183 | if (this.mjftData.zdbsm) { |
184 | this.getData() | 184 | this.getData() |
185 | } | 185 | } |
186 | }, | 186 | }, | ... | ... |
1 | <template> | 1 | <template> |
2 | <div class="">业主共有</div> | 2 | <div class=""> |
3 | <div class="main"> | ||
4 | <table border="1"> | ||
5 | <tr> | ||
6 | <td colspan="3">宗地代码</td> | ||
7 | <td colspan="4"><input type="text" class="formInput" v-model="zddm " disabled/></td> | ||
8 | </tr> | ||
9 | <tr> | ||
10 | <td colspan="3">建筑物区分所有权业主共有部分权利人</td> | ||
11 | <td colspan="4"><input type="text" class="formInput" v-model="Data.qlr" disabled/></td> | ||
12 | </tr> | ||
13 | </table> | ||
14 | <table border="1"> | ||
15 | <tr> | ||
16 | <td @click="addRow">+</td> | ||
17 | <td>建(构)筑物编号</td> | ||
18 | <td>建(构)筑物数量</td> | ||
19 | <td>建(构)筑物面积(㎡)</td> | ||
20 | <td>占地面积(㎡)</td> | ||
21 | <td>分摊土地面积(㎡)</td> | ||
22 | <td>附记</td> | ||
23 | </tr> | ||
24 | <tr v-for="(item,i) in Data.list" :key="i"> | ||
25 | <td @click="delRow(i)">-</td> | ||
26 | <td><input type="text" class="formInput" v-model="item.jgzwbh"/></td> | ||
27 | <td><input type="number" class="formInput" v-model="item.jgzsl" @keydown="oninput"/></td> | ||
28 | <td><input type="number" class="formInput" v-model.number="item.jgzmj" @keydown="oninput"/></td> | ||
29 | <td><input type="number" class="formInput" v-model.number="item.zdmj" @keydown="oninput"/></td> | ||
30 | <td><input type="number" class="formInput" v-model.number="item.fttdmj" @keydown="oninput"/></td> | ||
31 | <td><input type="text" class="formInput" v-model="item.fj" @keydown="oninput"/></td> | ||
32 | </tr> | ||
33 | <!-- <tr> | ||
34 | <td>统计</td> | ||
35 | <td>{{sumTdsyqsyqmj}}</td> | ||
36 | <td>{{sumDydytdmj}}</td> | ||
37 | <td>{{sumFttdmj}}</td> | ||
38 | <td>{{sumFttdmj}}</td> | ||
39 | <td>{{sumFttdmj}}</td> | ||
40 | <td>{{sumFttdmj}}</td> | ||
41 | </tr>--> | ||
42 | </table> | ||
43 | <div class="pers"> | ||
44 | <el-button @click="save" type="primary">保存</el-button> | ||
45 | </div> | ||
46 | </div> | ||
47 | </div> | ||
3 | </template> | 48 | </template> |
4 | 49 | ||
5 | <script> | 50 | <script> |
6 | export default { | 51 | import {saveYzgy, queryYzgy} from './../../../api/zrz' |
7 | name:"", | 52 | import {Message} from 'element-ui' |
8 | components:{}, | 53 | |
9 | props:{}, | 54 | export default { |
10 | data(){ | 55 | name: "", |
11 | return { | 56 | data() { |
12 | } | 57 | return { |
13 | }, | 58 | tdzl: '', // 土地坐落 继承获取 |
14 | created(){}, | 59 | zdmj: '', // 宗地面积 继承获取 |
15 | mounted(){}, | 60 | zddm: '', |
16 | methods:{}, | 61 | Data: { |
17 | computed: {}, | 62 | glbsm: '', // 宗地标识码 |
18 | watch: {}, | 63 | qlr: '业主共有', //权利人 |
19 | } | 64 | list: [{ |
65 | jgzwbh: '', // 建(构)筑物编号 | ||
66 | jgzsl: '', // 建筑物数量 | ||
67 | jgzmj: '', // 建构筑物面积 | ||
68 | zdmj: '', //占地面积 | ||
69 | fttdmj: '', //分摊土地面积 | ||
70 | fj: '' | ||
71 | }] | ||
72 | } | ||
73 | } | ||
74 | }, | ||
75 | |||
76 | methods: { | ||
77 | getData(id) { | ||
78 | queryYzgy(id).then(res => { | ||
79 | console.log(res) | ||
80 | if (res.result != null) { | ||
81 | this.Data = res.result | ||
82 | } | ||
83 | }) | ||
84 | }, | ||
85 | save() { | ||
86 | console.log(this.Data); | ||
87 | saveYzgy(this.Data).then(res => { | ||
88 | console.log(res) | ||
89 | if (res.success) { | ||
90 | Message.success("新增成功") | ||
91 | } else { | ||
92 | Message.error(res.message) | ||
93 | } | ||
94 | }) | ||
95 | }, | ||
96 | oninput(e) { | ||
97 | e.target.value = (e.target.value.match(/^\d*(\.?\d{0,2})/g)[0]) || null | ||
98 | }, | ||
99 | addRow() { | ||
100 | this.Data.list.push({ | ||
101 | jgzwbh: '', // 建(构)筑物编号 | ||
102 | jgzsl: '', // 建筑物数量 | ||
103 | jgzmj: '', // 建构筑物面积 | ||
104 | zdmj: '', //占地面积 | ||
105 | fttdmj: '', //分摊土地面积 | ||
106 | fj: '' | ||
107 | }) | ||
108 | }, | ||
109 | delRow(index) { | ||
110 | this.Data.list.splice(index, 1) | ||
111 | } | ||
112 | }, | ||
113 | computed: {}, | ||
114 | created() { | ||
115 | console.log("create init...") | ||
116 | }, | ||
117 | mounted() { | ||
118 | console.log("mounted init...") | ||
119 | this.Data.glbsm = this.$store.state.zrzbsm | ||
120 | this.zddm = this.$store.state.zddm | ||
121 | this.getData(this.Data.glbsm) | ||
122 | }, | ||
123 | watch: { | ||
124 | "$store.state.zdbsm": function (bsm) { | ||
125 | this.Data.glbsm = bsm | ||
126 | }, | ||
127 | "$store.state.zddm": function (zddm) { | ||
128 | this.zddm = zddm | ||
129 | } | ||
130 | } | ||
131 | } | ||
20 | </script> | 132 | </script> |
21 | <style scoped lang="less"> | ||
22 | </style> | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
133 | <style scoped lang="less"> | ||
134 | .main { | ||
135 | box-sizing: border-box; | ||
136 | padding: 18px; | ||
137 | height: auto; | ||
138 | width: 80%; | ||
139 | } | ||
140 | |||
141 | table { | ||
142 | margin-top: 10px; | ||
143 | background-color: #fff; | ||
144 | font-size: 14px; | ||
145 | width: 100%; | ||
146 | } | ||
147 | |||
148 | td { | ||
149 | text-align: center; | ||
150 | height: 36px; | ||
151 | min-width: 50px; | ||
152 | } | ||
153 | |||
154 | table .formInput { | ||
155 | margin: 0; | ||
156 | height: 36px; | ||
157 | outline: none; | ||
158 | border: none; | ||
159 | color: #606764; | ||
160 | overflow: visible; | ||
161 | text-align: center; | ||
162 | cursor: text; | ||
163 | } | ||
164 | |||
165 | .pers { | ||
166 | text-align: center; | ||
167 | margin-top: 10px; | ||
168 | } | ||
169 | |||
170 | .pers .el-button { | ||
171 | width: 150px; | ||
172 | } | ||
173 | |||
174 | .dzwsl { | ||
175 | width: 200px; | ||
176 | } | ||
177 | </style> | ... | ... |
-
Please register or sign in to post a comment